2006-10-14
* fixed bug that prevented player from correctly being created in the
top left corner by a custom element change in a level without player
+ * fixed bug that prevented player from being killed when indestructible,
+ non-walkable element is placed on player position by extended change
2006-10-13
* added page fading effects for remaining info sub-screens
{ "menu.button_next_level.clone_from", "menu.button_right" },
{ "menu.button_next_level.active", "RocksDC.pcx" },
{ "menu.button_next_level.active.clone_from", "menu.button_right.active" },
- { "menu.button_last_level", "RocksDC.pcx" },
- { "menu.button_last_level.clone_from", "menu.button_left" },
- { "menu.button_last_level.active", "RocksDC.pcx" },
- { "menu.button_last_level.active.clone_from", "menu.button_left.active" },
+ { "menu.button_prev_level", "RocksDC.pcx" },
+ { "menu.button_prev_level.clone_from", "menu.button_left" },
+ { "menu.button_prev_level.active", "RocksDC.pcx" },
+ { "menu.button_prev_level.active.clone_from", "menu.button_left.active" },
{ "menu.scrollbar", "RocksDC.pcx" },
{ "menu.scrollbar.xpos", "8" },
{ "menu.fade_delay", "250" },
{ "menu.post_delay", "125" },
+ { "main.button.name.x", "-1" },
+ { "main.button.name.y", "-1" },
+ { "main.button.levels.x", "-1" },
+ { "main.button.levels.y", "-1" },
+ { "main.button.scores.x", "-1" },
+ { "main.button.scores.y", "-1" },
+ { "main.button.editor.x", "-1" },
+ { "main.button.editor.y", "-1" },
+ { "main.button.info.x", "-1" },
+ { "main.button.info.y", "-1" },
+ { "main.button.game.x", "-1" },
+ { "main.button.game.y", "-1" },
+ { "main.button.setup.x", "-1" },
+ { "main.button.setup.y", "-1" },
+ { "main.button.quit.x", "-1" },
+ { "main.button.quit.y", "-1" },
+ { "main.button.prev_level.x", "-1" },
+ { "main.button.prev_level.y", "-1" },
+ { "main.button.next_level.x", "-1" },
+ { "main.button.next_level.y", "-1" },
+
+ { "main.text.name.x", "-1" },
+ { "main.text.name.y", "-1" },
+ { "main.text.name.width", "-1" },
+ { "main.text.name.height", "-1" },
+ { "main.text.levels.x", "-1" },
+ { "main.text.levels.y", "-1" },
+ { "main.text.levels.width", "-1" },
+ { "main.text.levels.height", "-1" },
+ { "main.text.scores.x", "-1" },
+ { "main.text.scores.y", "-1" },
+ { "main.text.scores.width", "-1" },
+ { "main.text.scores.height", "-1" },
+ { "main.text.editor.x", "-1" },
+ { "main.text.editor.y", "-1" },
+ { "main.text.editor.width", "-1" },
+ { "main.text.editor.height", "-1" },
+ { "main.text.info.x", "-1" },
+ { "main.text.info.y", "-1" },
+ { "main.text.info.width", "-1" },
+ { "main.text.info.height", "-1" },
+ { "main.text.game.x", "-1" },
+ { "main.text.game.y", "-1" },
+ { "main.text.game.width", "-1" },
+ { "main.text.game.height", "-1" },
+ { "main.text.setup.x", "-1" },
+ { "main.text.setup.y", "-1" },
+ { "main.text.setup.width", "-1" },
+ { "main.text.setup.height", "-1" },
+ { "main.text.quit.x", "-1" },
+ { "main.text.quit.y", "-1" },
+ { "main.text.quit.width", "-1" },
+ { "main.text.quit.height", "-1" },
+
+ { "main.text.current_level.x", "-1" },
+ { "main.text.current_level.y", "-1" },
+ { "main.text.first_level.x", "-1" },
+ { "main.text.first_level.y", "-1" },
+ { "main.text.last_level.x", "-1" },
+ { "main.text.last_level.y", "-1" },
+ { "main.text.levelset_info.x", "-1" },
+ { "main.text.levelset_info.y", "-1" },
+ { "main.text.level_info.x", "-1" },
+ { "main.text.level_info.y", "-1" },
+
+ { "main.input.name.x", "-1" },
+ { "main.input.name.y", "-1" },
+
+ { "preview.x", "148" },
+ { "preview.y", "388" },
+ { "preview.xsize", "66" },
+ { "preview.ysize", "34" },
+ { "preview.tile_size", "4" },
+ { "preview.step_offset", "1" },
+ { "preview.step_delay", "50" },
+
{ "door_1.width", "-1" },
{ "door_1.height", "-1" },
{ "door_1.step_offset", "2" },
{ "door_2.step_delay", "10" },
{ "door_2.anim_mode", "default" },
- { "preview.x", "148" },
- { "preview.y", "388" },
- { "preview.xsize", "66" },
- { "preview.ysize", "34" },
- { "preview.tile_size", "4" },
- { "preview.step_offset", "1" },
- { "preview.step_delay", "50" },
-
{ "game.panel.level.x", "37" },
{ "game.panel.level.y", "20" },
{ "game.panel.gems.x", "29" },
#define IMG_MENU_BUTTON_LEAVE_MENU_ACTIVE 1480
#define IMG_MENU_BUTTON_NEXT_LEVEL 1481
#define IMG_MENU_BUTTON_NEXT_LEVEL_ACTIVE 1482
-#define IMG_MENU_BUTTON_LAST_LEVEL 1483
-#define IMG_MENU_BUTTON_LAST_LEVEL_ACTIVE 1484
+#define IMG_MENU_BUTTON_PREV_LEVEL 1483
+#define IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE 1484
#define IMG_MENU_SCROLLBAR 1485
#define IMG_MENU_SCROLLBAR_ACTIVE 1486
#define IMG_FONT_INITIAL_1 1487
-#define COMPILE_DATE_STRING "[2006-10-14 12:10]"
+#define COMPILE_DATE_STRING "[2006-10-14 22:55]"
#define USE_GFX_RESET_ONLY_WHEN_MOVING (USE_NEW_STUFF * 1)
#define USE_GFX_RESET_PLAYER_ARTWORK (USE_NEW_STUFF * 1)
+#define USE_FIX_KILLED_BY_NON_WALKABLE (USE_NEW_STUFF * 1)
+
/* for DigField() */
#define DF_NO_PUSH 0
#if USE_NEW_CUSTOM_VALUE
int last_ce_value = CustomValue[x][y];
#endif
+ boolean player_explosion_protected = PLAYER_EXPLOSION_PROTECTED(x, y);
boolean new_element_is_player = ELEM_IS_PLAYER(new_element);
boolean add_player_onto_element = (new_element_is_player &&
#if USE_CODE_THAT_BREAKS_SNAKE_BITE
/* check if element under the player changes from accessible to unaccessible
(needed for special case of dropping element which then changes) */
/* (must be checked after creating new element for walkable group elements) */
+#if USE_FIX_KILLED_BY_NON_WALKABLE
+ if (IS_PLAYER(x, y) && !player_explosion_protected &&
+ IS_ACCESSIBLE(old_element) && !IS_ACCESSIBLE(new_element))
+ {
+ Bang(x, y);
+
+ return;
+ }
+#else
if (IS_PLAYER(x, y) && !PLAYER_EXPLOSION_PROTECTED(x, y) &&
IS_ACCESSIBLE(old_element) && !IS_ACCESSIBLE(new_element))
{
return;
}
+#endif
#endif
/* "ChangeCount" not set yet to allow "entered by player" change one time */
int x, y;
};
+struct Rect
+{
+ int x, y;
+ int width, height;
+};
+
/* ========================================================================= */
/* exported variables */
static boolean anim_restart = TRUE;
static boolean reset_delay = TRUE;
static int toon_nr = 0;
- int draw_mode;
if (!setup.toons || screen_info.num_toons == 0)
return;
if (anim_running)
{
#if 0
+ int draw_mode;
+
redraw_mask |= (REDRAW_FIELD | REDRAW_FROM_BACKBUFFER);
/* Redraw background even when in direct drawing mode */
struct SpecialSuffixInfo special_suffix_info[NUM_SPECIAL_GFX_ARGS + 1 + 1] =
{
- { ".[DEFAULT]", GAME_MODE_DEFAULT, },
- { ".TITLE", GAME_MODE_TITLE, },
- { ".MAIN", GAME_MODE_MAIN, },
- { ".LEVELS", GAME_MODE_LEVELS },
- { ".SCORES", GAME_MODE_SCORES, },
- { ".EDITOR", GAME_MODE_EDITOR, },
- { ".INFO", GAME_MODE_INFO, },
- { ".SETUP", GAME_MODE_SETUP, },
- { ".PLAYING", GAME_MODE_PLAYING, },
- { ".DOOR", GAME_MODE_PSEUDO_DOOR, },
- { ".PREVIEW", GAME_MODE_PSEUDO_PREVIEW, },
- { ".CRUMBLED", GAME_MODE_PSEUDO_CRUMBLED, },
+ { ".[DEFAULT]", GFX_SPECIAL_ARG_DEFAULT, },
+ { ".TITLE", GFX_SPECIAL_ARG_TITLE, },
+ { ".MAIN", GFX_SPECIAL_ARG_MAIN, },
+ { ".LEVELS", GFX_SPECIAL_ARG_LEVELS },
+ { ".SCORES", GFX_SPECIAL_ARG_SCORES, },
+ { ".EDITOR", GFX_SPECIAL_ARG_EDITOR, },
+ { ".INFO", GFX_SPECIAL_ARG_INFO, },
+ { ".SETUP", GFX_SPECIAL_ARG_SETUP, },
+ { ".PLAYING", GFX_SPECIAL_ARG_PLAYING, },
+ { ".DOOR", GFX_SPECIAL_ARG_DOOR, },
+ { ".PREVIEW", GFX_SPECIAL_ARG_PREVIEW, },
+ { ".CRUMBLED", GFX_SPECIAL_ARG_CRUMBLED, },
/* empty suffix always matches -- check as last entry in InitMusicInfo() */
- { "", GAME_MODE_DEFAULT, },
+ { "", GFX_SPECIAL_ARG_DEFAULT, },
{ NULL, 0, }
};
{ "menu.fade_delay", &menu.fade_delay },
{ "menu.post_delay", &menu.post_delay },
+ { "main.button.name.x", &menu.main.button.name.x },
+ { "main.button.name.y", &menu.main.button.name.y },
+ { "main.button.levels.x", &menu.main.button.levels.x },
+ { "main.button.levels.y", &menu.main.button.levels.y },
+ { "main.button.scores.x", &menu.main.button.scores.x },
+ { "main.button.scores.y", &menu.main.button.scores.y },
+ { "main.button.editor.x", &menu.main.button.editor.x },
+ { "main.button.editor.y", &menu.main.button.editor.y },
+ { "main.button.info.x", &menu.main.button.info.x },
+ { "main.button.info.y", &menu.main.button.info.y },
+ { "main.button.game.x", &menu.main.button.game.x },
+ { "main.button.game.y", &menu.main.button.game.y },
+ { "main.button.setup.x", &menu.main.button.setup.x },
+ { "main.button.setup.y", &menu.main.button.setup.y },
+ { "main.button.quit.x", &menu.main.button.quit.x },
+ { "main.button.quit.y", &menu.main.button.quit.y },
+ { "main.button.prev_level.x", &menu.main.button.prev_level.x },
+ { "main.button.prev_level.y", &menu.main.button.prev_level.y },
+ { "main.button.next_level.x", &menu.main.button.next_level.x },
+ { "main.button.next_level.y", &menu.main.button.next_level.y },
+
+ { "main.text.name.x", &menu.main.text.name.x },
+ { "main.text.name.y", &menu.main.text.name.y },
+ { "main.text.name.width", &menu.main.text.name.width },
+ { "main.text.name.height", &menu.main.text.name.height },
+ { "main.text.levels.x", &menu.main.text.levels.x },
+ { "main.text.levels.y", &menu.main.text.levels.y },
+ { "main.text.levels.width", &menu.main.text.levels.width },
+ { "main.text.levels.height", &menu.main.text.levels.height },
+ { "main.text.scores.x", &menu.main.text.scores.x },
+ { "main.text.scores.y", &menu.main.text.scores.y },
+ { "main.text.scores.width", &menu.main.text.scores.width },
+ { "main.text.scores.height", &menu.main.text.scores.height },
+ { "main.text.editor.x", &menu.main.text.editor.x },
+ { "main.text.editor.y", &menu.main.text.editor.y },
+ { "main.text.editor.width", &menu.main.text.editor.width },
+ { "main.text.editor.height", &menu.main.text.editor.height },
+ { "main.text.info.x", &menu.main.text.info.x },
+ { "main.text.info.y", &menu.main.text.info.y },
+ { "main.text.info.width", &menu.main.text.info.width },
+ { "main.text.info.height", &menu.main.text.info.height },
+ { "main.text.game.x", &menu.main.text.game.x },
+ { "main.text.game.y", &menu.main.text.game.y },
+ { "main.text.game.width", &menu.main.text.game.width },
+ { "main.text.game.height", &menu.main.text.game.height },
+ { "main.text.setup.x", &menu.main.text.setup.x },
+ { "main.text.setup.y", &menu.main.text.setup.y },
+ { "main.text.setup.width", &menu.main.text.setup.width },
+ { "main.text.setup.height", &menu.main.text.setup.height },
+ { "main.text.quit.x", &menu.main.text.quit.x },
+ { "main.text.quit.y", &menu.main.text.quit.y },
+ { "main.text.quit.width", &menu.main.text.quit.width },
+ { "main.text.quit.height", &menu.main.text.quit.height },
+
+ { "main.text.current_level.x",&menu.main.text.current_level.x },
+ { "main.text.current_level.y",&menu.main.text.current_level.y },
+ { "main.text.first_level.x", &menu.main.text.first_level.x },
+ { "main.text.first_level.y", &menu.main.text.first_level.y },
+ { "main.text.last_level.x", &menu.main.text.last_level.x },
+ { "main.text.last_level.y", &menu.main.text.last_level.y },
+ { "main.text.levelset_info.x",&menu.main.text.levelset_info.x },
+ { "main.text.levelset_info.y",&menu.main.text.levelset_info.y },
+ { "main.text.level_info.x", &menu.main.text.level_info.x },
+ { "main.text.level_info.y", &menu.main.text.level_info.y },
+
+ { "main.input.name.x", &menu.main.input.name.x },
+ { "main.input.name.y", &menu.main.input.name.y },
+
+ { "preview.x", &preview.x },
+ { "preview.y", &preview.y },
+ { "preview.xsize", &preview.xsize },
+ { "preview.ysize", &preview.ysize },
+ { "preview.tile_size", &preview.tile_size },
+ { "preview.step_offset", &preview.step_offset },
+ { "preview.step_delay", &preview.step_delay },
+
{ "door_1.width", &door_1.width },
{ "door_1.height", &door_1.height },
{ "door_1.step_offset", &door_1.step_offset },
{ "door_2.step_delay", &door_2.step_delay },
{ "door_2.anim_mode", &door_2.anim_mode },
- { "preview.x", &preview.x },
- { "preview.y", &preview.y },
- { "preview.xsize", &preview.xsize },
- { "preview.ysize", &preview.ysize },
- { "preview.tile_size", &preview.tile_size },
- { "preview.step_offset", &preview.step_offset },
- { "preview.step_delay", &preview.step_delay },
-
{ "game.panel.level.x", &game.panel.level.x },
{ "game.panel.level.y", &game.panel.level.y },
{ "game.panel.gems.x", &game.panel.gems.x },
int draw_masked[NUM_SPECIAL_GFX_ARGS];
};
+struct MenuMainButtonInfo
+{
+ struct XY name;
+ struct XY levels;
+ struct XY scores;
+ struct XY editor;
+ struct XY info;
+ struct XY game;
+ struct XY setup;
+ struct XY quit;
+ struct XY prev_level;
+ struct XY next_level;
+};
+
+struct MenuMainTextInfo
+{
+ struct Rect name;
+ struct Rect levels;
+ struct Rect scores;
+ struct Rect editor;
+ struct Rect info;
+ struct Rect game;
+ struct Rect setup;
+ struct Rect quit;
+
+ struct XY current_level;
+ struct XY first_level;
+ struct XY last_level;
+ struct XY levelset_info;
+ struct XY level_info;
+};
+
+struct MenuMainInputInfo
+{
+ struct XY name;
+};
+
+struct MenuMainInfo
+{
+ struct MenuMainButtonInfo button;
+ struct MenuMainTextInfo text;
+ struct MenuMainInputInfo input;
+};
+
struct MenuInfo
{
int draw_xoffset[NUM_SPECIAL_GFX_ARGS];
int sound[NUM_SPECIAL_GFX_ARGS];
int music[NUM_SPECIAL_GFX_ARGS];
+
+ struct MenuMainInfo main;
};
struct DoorInfo
#define MAX_MENU_TEXT_LENGTH_MEDIUM (MAX_MENU_TEXT_LENGTH_BIG * 2)
/* buttons and scrollbars identifiers */
-#define SCREEN_CTRL_ID_LAST_LEVEL 0
+#define SCREEN_CTRL_ID_PREV_LEVEL 0
#define SCREEN_CTRL_ID_NEXT_LEVEL 1
-#define SCREEN_CTRL_ID_LAST_PLAYER 2
+#define SCREEN_CTRL_ID_PREV_PLAYER 2
#define SCREEN_CTRL_ID_NEXT_PLAYER 3
#define SCREEN_CTRL_ID_SCROLL_UP 4
#define SCREEN_CTRL_ID_SCROLL_DOWN 5
g == IMG_MENU_BUTTON_RIGHT ? IMG_MENU_BUTTON_RIGHT_ACTIVE :
g == IMG_MENU_BUTTON_LEAVE_MENU ? IMG_MENU_BUTTON_LEAVE_MENU_ACTIVE :
g == IMG_MENU_BUTTON_ENTER_MENU ? IMG_MENU_BUTTON_ENTER_MENU_ACTIVE :
- g == IMG_MENU_BUTTON_LAST_LEVEL ? IMG_MENU_BUTTON_LAST_LEVEL_ACTIVE :
+ g == IMG_MENU_BUTTON_PREV_LEVEL ? IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE :
g == IMG_MENU_BUTTON_NEXT_LEVEL ? IMG_MENU_BUTTON_NEXT_LEVEL_ACTIVE :
IMG_MENU_BUTTON_ACTIVE);
{
switch (gadget_id)
{
- case SCREEN_CTRL_ID_LAST_LEVEL:
+ case SCREEN_CTRL_ID_PREV_LEVEL:
*x = mSX + TILEX * getLastLevelButtonPos();
*y = mSY + TILEY * (MENU_SCREEN_START_YPOS + 1);
break;
*y = mSY + TILEY * (MENU_SCREEN_START_YPOS + 1);
break;
- case SCREEN_CTRL_ID_LAST_PLAYER:
+ case SCREEN_CTRL_ID_PREV_PLAYER:
*x = mSX + TILEX * 10;
*y = mSY + TILEY * MENU_SCREEN_START_YPOS;
break;
} menubutton_info[NUM_SCREEN_MENUBUTTONS] =
{
{
- IMG_MENU_BUTTON_LAST_LEVEL, IMG_MENU_BUTTON_LAST_LEVEL_ACTIVE,
+ IMG_MENU_BUTTON_PREV_LEVEL, IMG_MENU_BUTTON_PREV_LEVEL_ACTIVE,
getScreenMenuButtonPos,
- SCREEN_CTRL_ID_LAST_LEVEL,
+ SCREEN_CTRL_ID_PREV_LEVEL,
SCREEN_MASK_MAIN,
"last level"
},
{
IMG_MENU_BUTTON_LEFT, IMG_MENU_BUTTON_LEFT_ACTIVE,
getScreenMenuButtonPos,
- SCREEN_CTRL_ID_LAST_PLAYER,
+ SCREEN_CTRL_ID_PREV_PLAYER,
SCREEN_MASK_INPUT,
"last player"
},
switch (id)
{
- case SCREEN_CTRL_ID_LAST_LEVEL:
+ case SCREEN_CTRL_ID_PREV_LEVEL:
HandleMainMenu_SelectLevel(step, -1);
break;
HandleMainMenu_SelectLevel(step, +1);
break;
- case SCREEN_CTRL_ID_LAST_PLAYER:
+ case SCREEN_CTRL_ID_PREV_PLAYER:
HandleSetupScreen_Input_Player(step, -1);
break;