X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=c0d43b8bf432636e9960977340fedff96188d52f;hb=0a05f4c2fbfe8ef1c372694a10d94818bff18d09;hp=423fc4c85fb5785071da7f2be6b80fe97afedeaf;hpb=df8111be2dc97172f30c7162eca4641d027e2aa4;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 423fc4c8..c0d43b8b 100644 --- a/src/game.c +++ b/src/game.c @@ -19,12 +19,14 @@ #include "init.h" #include "files.h" #include "tape.h" -#include "joystick.h" #include "network.h" /* this switch controls how rocks move horizontally */ #define OLD_GAME_BEHAVIOUR FALSE +/* EXPERIMENTAL STUFF */ +#define USE_NEW_AMOEBA_CODE FALSE + /* for DigField() */ #define DF_NO_PUSH 0 #define DF_DIG 1 @@ -171,10 +173,10 @@ void GetPlayerConfig() setup.sound = FALSE; if (!audio.loops_available) - { setup.sound_loops = FALSE; + + if (!audio.music_available) setup.sound_music = FALSE; - } if (!video.fullscreen_available) setup.fullscreen = FALSE; @@ -268,7 +270,7 @@ static void InitField(int x, int y, boolean init_game) StorePlayer[x][y] = Feld[x][y]; - if (options.verbose) + if (options.debug) { printf("Player %d activated.\n", player->element_nr); printf("[Local player is %d and currently %s.]\n", @@ -437,6 +439,14 @@ void InitGame() boolean emulate_sb = TRUE; /* unless non-SOKOBAN elements found */ boolean emulate_sp = TRUE; /* unless non-SUPAPLEX elements found */ +#if DEBUG +#if USE_NEW_AMOEBA_CODE + printf("Using new amoeba code.\n"); +#else + printf("Using old amoeba code.\n"); +#endif +#endif + /* don't play tapes over network */ network_playing = (options.network && !tape.playing); @@ -659,7 +669,7 @@ void InitGame() tape.player_participates[i] = TRUE; } - if (options.verbose) + if (options.debug) { for (i=0; i= GAME_VERSION_2_0) - Elementeigenschaften2[ep_slippery[i]] |= EP_BIT_SLIPPERY_GEMS; +#endif + Elementeigenschaften2[ep_em_slippery_wall[i]] |= + EP_BIT_EM_SLIPPERY_WALL; else - Elementeigenschaften2[ep_slippery[i]] &= ~EP_BIT_SLIPPERY_GEMS; + Elementeigenschaften2[ep_em_slippery_wall[i]] &= + ~EP_BIT_EM_SLIPPERY_WALL; } } @@ -793,7 +819,7 @@ void InitGame() KeyboardAutoRepeatOff(); - if (options.verbose) + if (options.debug) { for (i=0; i<4; i++) printf("Player %d %sactive.\n", @@ -2615,7 +2641,7 @@ void StartMoving(int x, int y) #endif #else else if ((IS_SLIPPERY(Feld[x][y+1]) || - (IS_SLIPPERY_GEMS(Feld[x][y+1]) && IS_GEM(element))) && + (IS_EM_SLIPPERY_WALL(Feld[x][y+1]) && IS_GEM(element))) && !IS_FALLING(x, y+1) && !JustStopped[x][y+1] && element != EL_DX_SUPABOMB && element != EL_SP_DISK_ORANGE) #endif @@ -4503,10 +4529,12 @@ void GameActions() AmoebeWaechst(x, y); else if (element == EL_DEAMOEBING) AmoebeSchrumpft(x, y); -#if 0 + +#if !USE_NEW_AMOEBA_CODE else if (IS_AMOEBALIVE(element)) AmoebeAbleger(x, y); #endif + else if (element == EL_LIFE || element == EL_LIFE_ASYNC) Life(x, y); else if (element == EL_ABLENK_EIN) @@ -4590,8 +4618,8 @@ void GameActions() } } -#if 1 - /* new experimental amoeba growth stuff*/ +#if USE_NEW_AMOEBA_CODE + /* new experimental amoeba growth stuff */ #if 1 if (!(FrameCounter % 8)) #endif @@ -6487,7 +6515,7 @@ static void HandleGameButtons(struct GadgetInfo *gi) setup.sound_music = FALSE; FadeMusic(); } - else if (audio.loops_available) + else if (audio.music_available) { setup.sound = setup.sound_music = TRUE; if (num_bg_loops)