X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FDoGameStuff.c;h=ce1d77e2d6b8b12d181ea63b15d112e17dab2160;hb=0b8567c8bcbe637936fa01d253de81254fa4fb3e;hp=27aa1c566c563625b2cb670727fc1a649258440a;hpb=8d3d7d213a9691455a49544624bf380e85f43461;p=rocksndiamonds.git diff --git a/src/game_sp/DoGameStuff.c b/src/game_sp/DoGameStuff.c index 27aa1c56..ce1d77e2 100644 --- a/src/game_sp/DoGameStuff.c +++ b/src/game_sp/DoGameStuff.c @@ -25,7 +25,7 @@ int subDoGameStuff() int si, cx, dx, bl; - subAnimateMurphy(MurphyPosIndex); // move Murphy in any direction + subAnimateMurphy(&MurphyPosIndex); // move Murphy in any direction // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // Build a database of locations and subs-to-call of animatable fields only: @@ -66,16 +66,60 @@ int subDoGameStuff() } // loop locloop_g_22B8 ' until all animatables done } +#if 0 + printf("::: DoGameStuff.c: KillMurphyFlag == %d [%d]\n", + KillMurphyFlag, MurphyMoveCounter); +#endif + // All animations are done now // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - if (KillMurphyFlag == 1 || MurphyMoveCounter == 0) { +#if 1 + if (LeadOutCounter == 0 && + !game_sp_info.LevelSolved && + !game_sp_info.GameOver) +#else if (LeadOutCounter == 0) +#endif { +#if 0 + printf("::: DoGameStuff.c: killing murphy [%d] ...\n", KillMurphyFlag); +#endif + KillMurphyFlag = 0; // no more "kill Murphy" ExplodeFieldSP(MurphyExplodePos); // Explode LeadOutCounter = 0x40; // quit: start lead-out + +#if 1 +#if 1 + printf("::: DoGameStuff.c: !!!!!!!!!! GAME OVER !!!!!!!!!!\n"); +#endif + + game_sp_info.GameOver = TRUE; +#endif + } + +#if 1 +#if 0 + printf("::: *** %d, %d, %d\n", KillMurphyFlag, + game_sp_info.LevelSolved, game_sp_info.GameOver); +#endif + +#if 0 + if (KillMurphyFlag == 1 && + !game_sp_info.LevelSolved && + !game_sp_info.GameOver) + { +#if 1 + printf("::: DoGameStuff.c: !!!!!!!!!! GAME OVER !!!!!!!!!!\n"); +#endif + + game_sp_info.GameOver = TRUE; } +#endif +#endif + } // loc_g_22FB: