From: Holger Schemel Date: Thu, 17 Jul 2003 01:35:06 +0000 (+0200) Subject: rnd-20030717-1-src X-Git-Tag: 3.0.0^2~20 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4bd981e9a75290ad6178c167ce8e02635ca7fa53;p=rocksndiamonds.git rnd-20030717-1-src --- diff --git a/src/conftime.h b/src/conftime.h index 392061d4..627707ba 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2003-07-16 20:28]" +#define COMPILE_DATE_STRING "[2003-07-17 03:29]" diff --git a/src/editor.c b/src/editor.c index d780a053..a7dafcf9 100644 --- a/src/editor.c +++ b/src/editor.c @@ -3478,7 +3478,8 @@ static void MapSelectboxGadget(int id) int x = selectbox_info[id].x + xoffset_left; int y = selectbox_info[id].y + yoffset_left; - DrawTextF(x, y, FONT_TEXT_1, selectbox_info[id].text_left); + if (selectbox_info[id].text_left) + DrawTextF(x, y, FONT_TEXT_1, selectbox_info[id].text_left); if (selectbox_info[id].text_right) { @@ -3509,7 +3510,9 @@ static void MapRadiobuttonGadget(int id) boolean checked = (*radiobutton_info[id].value == radiobutton_info[id].checked_value); - DrawTextF(x, y, FONT_TEXT_1, radiobutton_info[id].text_right); + if (radiobutton_info[id].text_right) + DrawTextF(x, y, FONT_TEXT_1, radiobutton_info[id].text_right); + ModifyGadget(level_editor_gadget[radiobutton_info[id].gadget_id], GDI_CHECKED, checked, GDI_END); @@ -3523,7 +3526,9 @@ static void MapCheckbuttonGadget(int id) int x = checkbutton_info[id].x + xoffset_right; int y = checkbutton_info[id].y + yoffset_right; - DrawTextF(x, y, FONT_TEXT_1, checkbutton_info[id].text_right); + if (checkbutton_info[id].text_right) + DrawTextF(x, y, FONT_TEXT_1, checkbutton_info[id].text_right); + ModifyGadget(level_editor_gadget[checkbutton_info[id].gadget_id], GDI_CHECKED, *checkbutton_info[id].value, GDI_Y, SY + checkbutton_info[id].y, GDI_END); diff --git a/src/files.c b/src/files.c index 21717f1d..c075e6c5 100644 --- a/src/files.c +++ b/src/files.c @@ -2199,12 +2199,36 @@ void LoadSpecialMenuDesignSettings() SetupFileHash *setup_file_hash; int i, j; +#if 0 + for (i=0; image_config_vars[i].token != NULL; i++) + printf("::: '%s'\n", image_config_vars[i].token); + + printf("!!! '%lx'\n", image_config[353].token); + +#if 0 + for (j=0; image_config[j].token != NULL; j++) + { + printf("!!! %d: '%lx'\n", j, image_config[j].token); + printf("!!! %d: '%s'\n", j, image_config[j].token); + } + + printf("::: DONE\n"); +#endif +#endif + + /* always start with reliable default values from default config */ for (i=0; image_config_vars[i].token != NULL; i++) + { + /* + printf("::: %d\n", i); + */ + for (j=0; image_config[j].token != NULL; j++) if (strcmp(image_config_vars[i].token, image_config[j].token) == 0) *image_config_vars[i].value = get_integer_from_string(image_config[j].value); + } if ((setup_file_hash = loadSetupFileHash(filename)) == NULL) return; diff --git a/src/game.c b/src/game.c index 2a63d3ce..78aa5158 100644 --- a/src/game.c +++ b/src/game.c @@ -1923,9 +1923,18 @@ void Explode(int ex, int ey, int phase, int mode) RemoveMovingField(x, y); } +#if 1 + #if 1 if (IS_EXPLOSION_PROOF(element)) continue; +#else + /* indestructible elements can only explode in center (but not flames) */ + if ((IS_EXPLOSION_PROOF(element) && (x != ex || y != ey)) || + element == EL_FLAMES) + continue; +#endif + #else if ((IS_INDESTRUCTIBLE(element) && (game.engine_version < VERSION_IDENT(2,2,0) || @@ -1947,8 +1956,13 @@ void Explode(int ex, int ey, int phase, int mode) } /* save walkable background elements while explosion on same tile */ +#if 1 if (IS_INDESTRUCTIBLE(element)) Back[x][y] = element; +#else + if (IS_INDESTRUCTIBLE(element) && IS_WALKABLE(element)) + Back[x][y] = element; +#endif /* ignite explodable elements reached by other explosion */ if (element == EL_EXPLOSION) @@ -3426,7 +3440,9 @@ void StartMoving(int x, int y) if (Stop[x][y]) return; - GfxAction[x][y] = ACTION_DEFAULT; + /* !!! this should be handled more generic (not only for more) !!! */ + if (element != EL_MOLE && GfxAction[x][y] != ACTION_DIGGING) + GfxAction[x][y] = ACTION_DEFAULT; if (CAN_FALL(element) && y < lev_fieldy - 1) { @@ -4005,6 +4021,11 @@ void StartMoving(int x, int y) { Feld[newx][newy] = EL_AMOEBA_SHRINKING; PlaySoundLevel(x, y, SND_MOLE_DIGGING); + + ResetGfxAnimation(x, y); + GfxAction[x][y] = ACTION_DIGGING; + DrawLevelField(x, y); + MovDelay[newx][newy] = 0; /* start amoeba shrinking delay */ return; /* wait for shrinking amoeba */ } @@ -5635,9 +5656,10 @@ void GameActions() #if 1 graphic = el_act_dir2img(element, GfxAction[x][y], MovDir[x][y]); #if 0 - if (element == EL_PACMAN) - printf("::: %d, %d, %d\n", - IS_ANIMATED(graphic), IS_MOVING(x, y), Stop[x][y]); + if (element == EL_MOLE) + printf("::: %d, %d, %d [%d]\n", + IS_ANIMATED(graphic), IS_MOVING(x, y), Stop[x][y], + GfxAction[x][y]); #endif #if 0 if (element == EL_YAMYAM) @@ -5653,7 +5675,7 @@ void GameActions() DrawLevelGraphicAnimationIfNeeded(x, y, graphic); #if 0 - if (element == EL_YAMYAM) + if (element == EL_MOLE) printf("::: %d, %d\n", graphic, GfxFrame[x][y]); #endif } diff --git a/src/init.c b/src/init.c index 45211a85..839551ba 100644 --- a/src/init.c +++ b/src/init.c @@ -966,8 +966,10 @@ static void set_sound_parameters(int sound, char **parameter_raw) static void InitSoundInfo() { +#if 0 struct PropertyMapping *property_mapping = getSoundListPropertyMapping(); int num_property_mappings = getSoundListPropertyMappingSize(); +#endif int *sound_effect_properties; int num_sounds = getSoundListSize(); int i, j; @@ -1033,6 +1035,8 @@ static void InitSoundInfo() free(sound_effect_properties); +#if 0 + /* !!! now handled in InitElementSoundInfo() !!! */ /* initialize element/sound mapping from dynamic configuration */ for (i=0; i < num_property_mappings; i++) { @@ -1043,8 +1047,12 @@ static void InitSoundInfo() if (action < 0) action = ACTION_DEFAULT; + printf("::: %d: %d, %d, %d ['%s']\n", + i, element, action, sound, element_info[element].token_name); + element_info[element].sound[action] = sound; } +#endif #if 0 /* TEST ONLY */ diff --git a/src/libgame/system.c b/src/libgame/system.c index bfa9966b..04d06e69 100644 --- a/src/libgame/system.c +++ b/src/libgame/system.c @@ -1072,9 +1072,9 @@ inline Key GetEventKey(KeyEvent *event, boolean with_modifiers) inline KeyMod HandleKeyModState(Key key, int key_status) { -#if !defined(TARGET_SDL) static KeyMod current_modifiers = KMOD_None; +#if !defined(TARGET_SDL) if (key != KSYM_UNDEFINED) /* new key => check for modifier key change */ { KeyMod new_modifier = KMOD_None; @@ -1114,9 +1114,9 @@ inline KeyMod HandleKeyModState(Key key, int key_status) else current_modifiers &= ~new_modifier; } +#endif return current_modifiers; -#endif } inline KeyMod GetKeyModState()