diff options
author | Moshe Piekarski <mendelmunkis@protonmail.com> | 2019-11-04 03:04:21 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-04-06 02:52:32 +0200 |
commit | ced3a20aacf26642ccc3ffd136f64247c67e5769 (patch) | |
tree | 6f9cf2c203600587cb068e80d576e0bc7df136fb /apps/plugins/pacbox | |
parent | a463f68abb865fa2f7b61e51f1567b3012973942 (diff) | |
download | rockbox-ced3a20aacf26642ccc3ffd136f64247c67e5769.tar.gz rockbox-ced3a20aacf26642ccc3ffd136f64247c67e5769.zip |
Remove unused score tracker from Pacbox AI
Change-Id: I0a72f397f8d22b6543380e963383f6f7649a777b
Diffstat (limited to 'apps/plugins/pacbox')
-rwxr-xr-x | apps/plugins/pacbox/pacbox.c | 17 |
1 files changed, 3 insertions, 14 deletions
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) | |||
505 | unsigned char ai( unsigned char turn ) | 505 | unsigned char ai( unsigned char turn ) |
506 | { | 506 | { |
507 | unsigned char position; /* pac-mans current position */ | 507 | unsigned char position; /* pac-mans current position */ |
508 | unsigned char score = ram_[0x4E81]; /* current score */ | ||
509 | unsigned char level; /* current game level */ | 508 | unsigned char level; /* current game level */ |
510 | unsigned char map[20] = {0,1,2,3,4,5,4,4,6,7,4,8,8,9,10,10,11,10,12,12}; | 509 | unsigned char map[20] = {0,1,2,3,4,5,4,4,6,7,4,8,8,9,10,10,11,10,12,12}; |
511 | 510 | ||
@@ -558,11 +557,9 @@ unsigned char ai( unsigned char turn ) | |||
558 | 557 | ||
559 | 558 | ||
560 | /*move joystick if necessary */ | 559 | /*move joystick if necessary */ |
561 | if(ai_location[level][turn] < 70) | 560 | if(ai_location[level][turn] < 30) |
562 | { | ||
563 | if(ai_location[level][turn] < 30) /* handle turns using pinky's location as basis for turn timing */ | ||
564 | { | 561 | { |
565 | if((ai_location[level][turn] < 10) && (ai_location[level][turn] > 0)) | 562 | if((ai_location[level][turn] < 10) && (ai_location[level][turn] > 0)) /* handle turns using ghosts eaten as basis for turn timing */ |
566 | { | 563 | { |
567 | if( ram_[0x4DD0] == ai_location[level][turn]) | 564 | if( ram_[0x4DD0] == ai_location[level][turn]) |
568 | { | 565 | { |
@@ -571,7 +568,7 @@ unsigned char ai( unsigned char turn ) | |||
571 | } | 568 | } |
572 | } | 569 | } |
573 | 570 | ||
574 | if( ram_[0x4D31] == (ai_location[level][turn] + 30)) | 571 | if( ram_[0x4D31] == (ai_location[level][turn] + 30)) /* handle turns using pinky's location as basis for turn timing */ |
575 | { | 572 | { |
576 | ai_turn(level,turn); | 573 | ai_turn(level,turn); |
577 | turn++; | 574 | turn++; |
@@ -581,14 +578,6 @@ unsigned char ai( unsigned char turn ) | |||
581 | ai_turn(level,turn); | 578 | ai_turn(level,turn); |
582 | turn++; | 579 | turn++; |
583 | } | 580 | } |
584 | }else /* handle turns on eating ghost after center of tile using score as basis for turn timing */ | ||
585 | { | ||
586 | if( score == (ai_location[level][turn]-70)) | ||
587 | { | ||
588 | ai_turn(level,turn); | ||
589 | turn++; | ||
590 | } | ||
591 | } | ||
592 | } | 581 | } |
593 | 582 | ||
594 | /* reset turn counter and joystick direction on level start */ | 583 | /* reset turn counter and joystick direction on level start */ |