From ced3a20aacf26642ccc3ffd136f64247c67e5769 Mon Sep 17 00:00:00 2001 From: Moshe Piekarski Date: Mon, 4 Nov 2019 03:04:21 -0500 Subject: Remove unused score tracker from Pacbox AI Change-Id: I0a72f397f8d22b6543380e963383f6f7649a777b --- apps/plugins/pacbox/pacbox.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'apps') diff --git a/apps/plugins/pacbox/pacbox.c b/apps/plugins/pacbox/pacbox.c index e635b3ca4d..33c1cf6bba 100755 --- a/apps/plugins/pacbox/pacbox.c +++ b/apps/plugins/pacbox/pacbox.c @@ -505,7 +505,6 @@ void ai_turn( unsigned char level, unsigned char turn) unsigned char ai( unsigned char turn ) { unsigned char position; /* pac-mans current position */ - unsigned char score = ram_[0x4E81]; /* current score */ unsigned char level; /* current game level */ unsigned char map[20] = {0,1,2,3,4,5,4,4,6,7,4,8,8,9,10,10,11,10,12,12}; @@ -558,11 +557,9 @@ unsigned char ai( unsigned char turn ) /*move joystick if necessary */ - if(ai_location[level][turn] < 70) - { - if(ai_location[level][turn] < 30) /* handle turns using pinky's location as basis for turn timing */ + if(ai_location[level][turn] < 30) { - if((ai_location[level][turn] < 10) && (ai_location[level][turn] > 0)) + if((ai_location[level][turn] < 10) && (ai_location[level][turn] > 0)) /* handle turns using ghosts eaten as basis for turn timing */ { if( ram_[0x4DD0] == ai_location[level][turn]) { @@ -571,7 +568,7 @@ unsigned char ai( unsigned char turn ) } } - if( ram_[0x4D31] == (ai_location[level][turn] + 30)) + if( ram_[0x4D31] == (ai_location[level][turn] + 30)) /* handle turns using pinky's location as basis for turn timing */ { ai_turn(level,turn); turn++; @@ -581,14 +578,6 @@ unsigned char ai( unsigned char turn ) ai_turn(level,turn); turn++; } - }else /* handle turns on eating ghost after center of tile using score as basis for turn timing */ - { - if( score == (ai_location[level][turn]-70)) - { - ai_turn(level,turn); - turn++; - } - } } /* reset turn counter and joystick direction on level start */ -- cgit v1.2.3