X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame_mm%2Fmm_game.c;h=e2a2e5f8745093c0387e208640e44a1128d6c26f;hp=8d9743c6df6fc5cdfec7c9ad9cd54f511d38781f;hb=b903ee03857c26c3816a37b4c7c858c24250a7ef;hpb=cbb59760b8dc2b89395a41c1dd56f8a3d5ec1478 diff --git a/src/game_mm/mm_game.c b/src/game_mm/mm_game.c index 8d9743c6..e2a2e5f8 100644 --- a/src/game_mm/mm_game.c +++ b/src/game_mm/mm_game.c @@ -92,6 +92,7 @@ static int MovingOrBlocked2Element_MM(int, int); static void Bang_MM(int, int); static void RaiseScore_MM(int); +static void RaiseScoreElement_MM(int); static void RemoveMovingField_MM(int, int); static void InitMovingField_MM(int, int, int); static void ContinueMoving_MM(int, int); @@ -1527,8 +1528,6 @@ boolean HitElement(int element, int hit_mask) if (game_mm.kettles_still_needed > 0) game_mm.kettles_still_needed--; - RaiseScore_MM(10); - if (game_mm.kettles_still_needed == 0) { CheckExitMM(); @@ -1540,16 +1539,13 @@ boolean HitElement(int element, int hit_mask) { game_mm.num_keys++; } - else if (element == EL_LIGHTBALL) - { - RaiseScore_MM(10); - } else if (IS_PACMAN(element)) { DeletePacMan(ELX, ELY); - RaiseScore_MM(50); } + RaiseScoreElement_MM(element); + return FALSE; } @@ -2821,7 +2817,7 @@ void ClickElement(int x, int y, int button) else if (element == EL_LIGHTBALL) { Bang_MM(x, y); - RaiseScore_MM(10); + RaiseScoreElement_MM(element); DrawLaser(0, DL_LASER_ENABLED); } @@ -3893,7 +3889,7 @@ void GameWon_MM() if (!setup.sound_loops) PlaySoundStereo(SND_SIRR, SOUND_MAX_RIGHT); if (TimePlayed < 999 && !(TimePlayed % 10)) - RaiseScore_MM(native_mm_level.score[SC_ZEITBONUS]); + RaiseScore_MM(native_mm_level.score[SC_TIME_BONUS]); if (TimePlayed < 900 && !(TimePlayed % 10)) TimePlayed += 10; else @@ -4162,6 +4158,10 @@ void RaiseScoreElement_MM(int element) switch(element) { case EL_PACMAN: + case EL_PACMAN_RIGHT: + case EL_PACMAN_UP: + case EL_PACMAN_LEFT: + case EL_PACMAN_DOWN: RaiseScore_MM(native_mm_level.score[SC_PACMAN]); break; @@ -4169,6 +4169,15 @@ void RaiseScoreElement_MM(int element) RaiseScore_MM(native_mm_level.score[SC_KEY]); break; + case EL_KETTLE: + case EL_CELL: + RaiseScore_MM(native_mm_level.score[SC_COLLECTIBLE]); + break; + + case EL_LIGHTBALL: + RaiseScore_MM(native_mm_level.score[SC_LIGHTBALL]); + break; + default: break; }