- fixed bug (missing array boundary check) which could crash the game
- fixed problem with setting mouse cursor in SDL version in fullscreen
- fixed problem with flickering when drawing toon animations
- - fixed problem with player animation when snapping and moving
Release Version 3.0.2 [22 AUG 2003]
-----------------------------------
FONT_TEXT_1, GFX_SPECIAL_ARG_PREVIEW,
IMG_FONT_TEXT_1_PREVIEW
},
- {
- FONT_TEXT_1, GFX_SPECIAL_ARG_PLAYING,
- IMG_FONT_TEXT_1_PLAYING
- },
{
FONT_TEXT_1, GFX_SPECIAL_ARG_SCORES,
IMG_FONT_TEXT_1_SCORES
{ "font.text_1.PREVIEW.y", "160" },
{ "font.text_1.PREVIEW.width", "16" },
{ "font.text_1.PREVIEW.height", "16" },
- { "font.text_1.PLAYING", "RocksFontEM.pcx" },
- { "font.text_1.PLAYING.x", "0" },
- { "font.text_1.PLAYING.y", "160" },
- { "font.text_1.PLAYING.width", "16" },
- { "font.text_1.PLAYING.height", "16" },
{ "font.text_1.SCORES", "RocksFontMedium.pcx" },
{ "font.text_1.SCORES.x", "0" },
{ "font.text_1.SCORES.y", "480" },
#define IMG_FONT_TEXT_1 1227
#define IMG_FONT_TEXT_1_LEVELS 1228
#define IMG_FONT_TEXT_1_PREVIEW 1229
-#define IMG_FONT_TEXT_1_PLAYING 1230
-#define IMG_FONT_TEXT_1_SCORES 1231
-#define IMG_FONT_TEXT_1_ACTIVE_SCORES 1232
-#define IMG_FONT_TEXT_2 1233
-#define IMG_FONT_TEXT_2_LEVELS 1234
-#define IMG_FONT_TEXT_2_PREVIEW 1235
-#define IMG_FONT_TEXT_2_SCORES 1236
-#define IMG_FONT_TEXT_2_ACTIVE_SCORES 1237
-#define IMG_FONT_TEXT_3 1238
-#define IMG_FONT_TEXT_3_LEVELS 1239
-#define IMG_FONT_TEXT_3_PREVIEW 1240
-#define IMG_FONT_TEXT_3_SCORES 1241
-#define IMG_FONT_TEXT_3_ACTIVE_SCORES 1242
-#define IMG_FONT_TEXT_4 1243
-#define IMG_FONT_TEXT_4_LEVELS 1244
-#define IMG_FONT_TEXT_4_SCORES 1245
-#define IMG_FONT_TEXT_4_ACTIVE_SCORES 1246
-#define IMG_FONT_INPUT_1 1247
-#define IMG_FONT_INPUT_1_MAIN 1248
-#define IMG_FONT_INPUT_1_ACTIVE 1249
-#define IMG_FONT_INPUT_1_ACTIVE_MAIN 1250
-#define IMG_FONT_INPUT_1_ACTIVE_SETUP 1251
-#define IMG_FONT_INPUT_2 1252
-#define IMG_FONT_INPUT_2_ACTIVE 1253
-#define IMG_FONT_OPTION_OFF 1254
-#define IMG_FONT_OPTION_ON 1255
-#define IMG_FONT_VALUE_1 1256
-#define IMG_FONT_VALUE_2 1257
-#define IMG_FONT_VALUE_OLD 1258
-#define IMG_FONT_LEVEL_NUMBER 1259
-#define IMG_FONT_TAPE_RECORDER 1260
-#define IMG_FONT_GAME_INFO 1261
-#define IMG_GLOBAL_BORDER 1262
-#define IMG_GLOBAL_DOOR 1263
-#define IMG_EDITOR_ELEMENT_BORDER 1264
-#define IMG_EDITOR_ELEMENT_BORDER_INPUT 1265
-#define IMG_BACKGROUND 1266
-#define IMG_BACKGROUND_MAIN 1267
-#define IMG_BACKGROUND_LEVELS 1268
-#define IMG_BACKGROUND_SCORES 1269
-#define IMG_BACKGROUND_EDITOR 1270
-#define IMG_BACKGROUND_INFO 1271
-#define IMG_BACKGROUND_SETUP 1272
-#define IMG_BACKGROUND_DOOR 1273
+#define IMG_FONT_TEXT_1_SCORES 1230
+#define IMG_FONT_TEXT_1_ACTIVE_SCORES 1231
+#define IMG_FONT_TEXT_2 1232
+#define IMG_FONT_TEXT_2_LEVELS 1233
+#define IMG_FONT_TEXT_2_PREVIEW 1234
+#define IMG_FONT_TEXT_2_SCORES 1235
+#define IMG_FONT_TEXT_2_ACTIVE_SCORES 1236
+#define IMG_FONT_TEXT_3 1237
+#define IMG_FONT_TEXT_3_LEVELS 1238
+#define IMG_FONT_TEXT_3_PREVIEW 1239
+#define IMG_FONT_TEXT_3_SCORES 1240
+#define IMG_FONT_TEXT_3_ACTIVE_SCORES 1241
+#define IMG_FONT_TEXT_4 1242
+#define IMG_FONT_TEXT_4_LEVELS 1243
+#define IMG_FONT_TEXT_4_SCORES 1244
+#define IMG_FONT_TEXT_4_ACTIVE_SCORES 1245
+#define IMG_FONT_INPUT_1 1246
+#define IMG_FONT_INPUT_1_MAIN 1247
+#define IMG_FONT_INPUT_1_ACTIVE 1248
+#define IMG_FONT_INPUT_1_ACTIVE_MAIN 1249
+#define IMG_FONT_INPUT_1_ACTIVE_SETUP 1250
+#define IMG_FONT_INPUT_2 1251
+#define IMG_FONT_INPUT_2_ACTIVE 1252
+#define IMG_FONT_OPTION_OFF 1253
+#define IMG_FONT_OPTION_ON 1254
+#define IMG_FONT_VALUE_1 1255
+#define IMG_FONT_VALUE_2 1256
+#define IMG_FONT_VALUE_OLD 1257
+#define IMG_FONT_LEVEL_NUMBER 1258
+#define IMG_FONT_TAPE_RECORDER 1259
+#define IMG_FONT_GAME_INFO 1260
+#define IMG_GLOBAL_BORDER 1261
+#define IMG_GLOBAL_DOOR 1262
+#define IMG_EDITOR_ELEMENT_BORDER 1263
+#define IMG_EDITOR_ELEMENT_BORDER_INPUT 1264
+#define IMG_BACKGROUND 1265
+#define IMG_BACKGROUND_MAIN 1266
+#define IMG_BACKGROUND_LEVELS 1267
+#define IMG_BACKGROUND_SCORES 1268
+#define IMG_BACKGROUND_EDITOR 1269
+#define IMG_BACKGROUND_INFO 1270
+#define IMG_BACKGROUND_SETUP 1271
+#define IMG_BACKGROUND_DOOR 1272
-#define NUM_IMAGE_FILES 1274
+#define NUM_IMAGE_FILES 1273
#endif /* CONF_GFX_H */
-#define COMPILE_DATE_STRING "[2003-08-30 14:20]"
+#define COMPILE_DATE_STRING "[2003-09-01 19:13]"
static int element_shift = 0;
-static int editor_hl_boulderdash[] =
+static int editor_el_boulderdash[] =
{
EL_CHAR('B'),
EL_CHAR('O'),
EL_CHAR('A'),
EL_CHAR('S'),
EL_CHAR('H'),
-};
-static int editor_el_boulderdash[] =
-{
EL_PLAYER_1,
EL_EMPTY,
EL_SAND,
EL_BD_FIREFLY_DOWN,
EL_EMPTY,
};
-static int num_editor_hl_boulderdash = SIZEOF_ARRAY_INT(editor_hl_boulderdash);
static int num_editor_el_boulderdash = SIZEOF_ARRAY_INT(editor_el_boulderdash);
-static int editor_hl_emerald_mine[] =
+static int editor_el_emerald_mine[] =
{
EL_CHAR('E'),
EL_CHAR('M'),
EL_CHAR('I'),
EL_CHAR('N'),
EL_CHAR('E'),
-};
-static int editor_el_emerald_mine[] =
-{
EL_PLAYER_1,
EL_PLAYER_2,
EL_PLAYER_3,
EL_EM_GATE_3_GRAY,
EL_EM_GATE_4_GRAY,
};
-static int num_editor_hl_emerald_mine=SIZEOF_ARRAY_INT(editor_hl_emerald_mine);
-static int num_editor_el_emerald_mine=SIZEOF_ARRAY_INT(editor_el_emerald_mine);
+static int num_editor_el_emerald_mine = SIZEOF_ARRAY_INT(editor_el_emerald_mine);
-static int editor_hl_more[] =
+static int editor_el_more[] =
{
EL_CHAR('M'),
EL_CHAR('O'),
EL_CHAR('R'),
EL_CHAR('E'),
-};
-static int editor_el_more[] =
-{
EL_KEY_1,
EL_KEY_2,
EL_KEY_3,
EL_EMC_WALL_6,
EL_EMC_WALL_7,
};
-static int num_editor_hl_more = SIZEOF_ARRAY_INT(editor_hl_more);
static int num_editor_el_more = SIZEOF_ARRAY_INT(editor_el_more);
-static int editor_hl_sokoban[] =
+static int editor_el_sokoban[] =
{
EL_CHAR('S'),
EL_CHAR('O'),
EL_CHAR('B'),
EL_CHAR('A'),
EL_CHAR('N'),
-};
-static int editor_el_sokoban[] =
-{
EL_SOKOBAN_OBJECT,
EL_SOKOBAN_FIELD_EMPTY,
EL_SOKOBAN_FIELD_FULL,
EL_STEELWALL,
};
-static int num_editor_hl_sokoban = SIZEOF_ARRAY_INT(editor_hl_sokoban);
static int num_editor_el_sokoban = SIZEOF_ARRAY_INT(editor_el_sokoban);
-static int editor_hl_supaplex[] =
+static int editor_el_supaplex[] =
{
EL_CHAR('S'),
EL_CHAR('U'),
EL_CHAR('L'),
EL_CHAR('E'),
EL_CHAR('X'),
-};
-static int editor_el_supaplex[] =
-{
EL_SP_EMPTY,
EL_SP_ZONK,
EL_SP_BASE,
EL_SP_CHIP_TOP,
EL_SP_CHIP_BOTTOM,
};
-static int num_editor_hl_supaplex = SIZEOF_ARRAY_INT(editor_hl_supaplex);
static int num_editor_el_supaplex = SIZEOF_ARRAY_INT(editor_el_supaplex);
-static int editor_hl_diamond_caves[] =
+static int editor_el_diamond_caves[] =
{
EL_CHAR('D'),
EL_CHAR('I'),
EL_CHAR(' '),
EL_CHAR('I'),
EL_CHAR('I'),
-};
-static int editor_el_diamond_caves[] =
-{
EL_PEARL,
EL_CRYSTAL,
EL_WALL_PEARL,
EL_EXTRA_TIME,
EL_EMPTY,
};
-static int num_editor_hl_diamond_caves = SIZEOF_ARRAY_INT(editor_hl_diamond_caves);
static int num_editor_el_diamond_caves = SIZEOF_ARRAY_INT(editor_el_diamond_caves);
-static int editor_hl_dx_boulderdash[] =
+static int editor_el_dx_boulderdash[] =
{
EL_CHAR('D'),
EL_CHAR('X'),
EL_CHAR('A'),
EL_CHAR('S'),
EL_CHAR('H'),
-};
-static int editor_el_dx_boulderdash[] =
-{
EL_SPRING,
EL_TUBE_RIGHT_DOWN,
EL_TUBE_HORIZONTAL_DOWN,
EL_EMPTY,
EL_EMPTY
};
-static int num_editor_hl_dx_boulderdash = SIZEOF_ARRAY_INT(editor_hl_dx_boulderdash);
static int num_editor_el_dx_boulderdash = SIZEOF_ARRAY_INT(editor_el_dx_boulderdash);
-static int editor_hl_chars[] =
+static int editor_el_chars[] =
{
EL_CHAR('T'),
EL_CHAR('E'),
EL_CHAR('X'),
EL_CHAR('T'),
-};
-static int editor_el_chars[] =
-{
EL_CHAR(' '),
EL_CHAR('!'),
EL_CHAR('"'),
EL_CHAR(FONT_ASCII_CURSOR),
EL_CHAR(' ')
};
-static int num_editor_hl_chars = SIZEOF_ARRAY_INT(editor_hl_chars);
static int num_editor_el_chars = SIZEOF_ARRAY_INT(editor_el_chars);
-static int editor_hl_custom[] =
+static int editor_el_custom[] =
{
EL_CHAR('C'),
EL_CHAR('U'),
EL_CHAR('N'),
EL_CHAR('T'),
EL_CHAR('S'),
-};
-static int editor_el_custom[] =
-{
EL_CUSTOM_START + 0,
EL_CUSTOM_START + 1,
EL_CUSTOM_START + 2,
EL_CUSTOM_START + 126,
EL_CUSTOM_START + 127
};
-static int num_editor_hl_custom = SIZEOF_ARRAY_INT(editor_hl_custom);
static int num_editor_el_custom = SIZEOF_ARRAY_INT(editor_el_custom);
-static int editor_hl_custom_more[] =
-{
-};
-
static int editor_el_custom_more[] =
{
EL_CUSTOM_START + 128,
EL_CUSTOM_START + 254,
EL_CUSTOM_START + 255
};
-static int num_editor_hl_custom_more = SIZEOF_ARRAY_INT(editor_hl_custom_more);
static int num_editor_el_custom_more = SIZEOF_ARRAY_INT(editor_el_custom_more);
static int *editor_elements = NULL; /* dynamically allocated */
static struct
{
boolean *setup_value;
-
- int *headline_list;
- int *headline_list_size;
-
int *element_list;
int *element_list_size;
}
editor_elements_info[] =
{
- {
- &setup.editor.el_boulderdash,
- editor_hl_boulderdash, &num_editor_hl_boulderdash,
- editor_el_boulderdash, &num_editor_el_boulderdash
- },
- {
- &setup.editor.el_emerald_mine,
- editor_hl_emerald_mine, &num_editor_hl_emerald_mine,
- editor_el_emerald_mine, &num_editor_el_emerald_mine
- },
- {
- &setup.editor.el_more,
- editor_hl_more, &num_editor_hl_more,
- editor_el_more, &num_editor_el_more
- },
- {
- &setup.editor.el_sokoban,
- editor_hl_sokoban, &num_editor_hl_sokoban,
- editor_el_sokoban, &num_editor_el_sokoban
- },
- {
- &setup.editor.el_supaplex,
- editor_hl_supaplex, &num_editor_hl_supaplex,
- editor_el_supaplex, &num_editor_el_supaplex
- },
- {
- &setup.editor.el_diamond_caves,
- editor_hl_diamond_caves, &num_editor_hl_diamond_caves,
- editor_el_diamond_caves, &num_editor_el_diamond_caves
- },
- {
- &setup.editor.el_dx_boulderdash,
- editor_hl_dx_boulderdash, &num_editor_hl_dx_boulderdash,
- editor_el_dx_boulderdash, &num_editor_el_dx_boulderdash
- },
- {
- &setup.editor.el_chars,
- editor_hl_chars, &num_editor_hl_chars,
- editor_el_chars, &num_editor_el_chars
- },
- {
- &setup.editor.el_custom,
- editor_hl_custom, &num_editor_hl_custom,
- editor_el_custom, &num_editor_el_custom
- },
- {
- &setup.editor.el_custom_more,
- editor_hl_custom_more, &num_editor_hl_custom_more,
- editor_el_custom_more, &num_editor_el_custom_more
- },
- {
- NULL,
- NULL, NULL,
- NULL, NULL
- }
+ { &setup.editor.el_boulderdash, editor_el_boulderdash,
+ &num_editor_el_boulderdash },
+ { &setup.editor.el_emerald_mine, editor_el_emerald_mine,
+ &num_editor_el_emerald_mine },
+ { &setup.editor.el_more, editor_el_more,
+ &num_editor_el_more },
+ { &setup.editor.el_sokoban, editor_el_sokoban,
+ &num_editor_el_sokoban },
+ { &setup.editor.el_supaplex, editor_el_supaplex,
+ &num_editor_el_supaplex },
+ { &setup.editor.el_diamond_caves, editor_el_diamond_caves,
+ &num_editor_el_diamond_caves },
+ { &setup.editor.el_dx_boulderdash, editor_el_dx_boulderdash,
+ &num_editor_el_dx_boulderdash },
+ { &setup.editor.el_chars, editor_el_chars,
+ &num_editor_el_chars },
+ { &setup.editor.el_custom, editor_el_custom,
+ &num_editor_el_custom },
+ { &setup.editor.el_custom_more, editor_el_custom_more,
+ &num_editor_el_custom_more },
+ { NULL, NULL,
+ NULL }
};
/* determine size of element list */
for (i=0; editor_elements_info[i].setup_value != NULL; i++)
- {
if (*editor_elements_info[i].setup_value)
- {
- if (setup.editor.el_headlines)
- num_editor_elements += *editor_elements_info[i].headline_list_size;
-
num_editor_elements += *editor_elements_info[i].element_list_size;
- }
- }
if (num_editor_elements < ED_NUM_ELEMENTLIST_BUTTONS)
{
/* fill element list */
for (i=0; editor_elements_info[i].setup_value != NULL; i++)
- {
if (*editor_elements_info[i].setup_value)
- {
- if (setup.editor.el_headlines)
- for (j=0; j < *editor_elements_info[i].headline_list_size; j++)
- editor_elements[pos++] = editor_elements_info[i].headline_list[j];
-
- for (j=0; j < *editor_elements_info[i].element_list_size; j++)
+ for (j=0; j<*editor_elements_info[i].element_list_size; j++)
editor_elements[pos++] = editor_elements_info[i].element_list[j];
- }
- }
/* correct position of element list scrollbar */
if (element_shift < 0)
static void ReinitializeElementListButtons()
{
- static boolean last_setup_value_headlines = FALSE;
static boolean initialization_needed = TRUE;
int i;
if (!initialization_needed) /* check if editor element setup has changed */
- {
- if (last_setup_value_headlines != setup.editor.el_headlines)
- initialization_needed = TRUE;
-
for (i=0; editor_elements_info[i].setup_value != NULL; i++)
if (editor_elements_info[i].last_setup_value !=
*editor_elements_info[i].setup_value)
initialization_needed = TRUE;
- }
if (!initialization_needed)
return;
CreateLevelEditorGadgets();
/* store current setup values for next invocation of this function */
- last_setup_value_headlines = setup.editor.el_headlines;
for (i=0; editor_elements_info[i].setup_value != NULL; i++)
editor_elements_info[i].last_setup_value =
*editor_elements_info[i].setup_value;
fclose(file);
}
-#if 1
-
-static void LoadLevel_InitVersion(struct LevelInfo *level, char *filename)
-{
- if (leveldir_current == NULL) /* only when dumping level */
- return;
-
- /* determine correct game engine version of current level */
- if (IS_LEVELCLASS_CONTRIBUTION(leveldir_current) ||
- IS_LEVELCLASS_USER(leveldir_current))
- {
-#if 0
- printf("\n::: This level is private or contributed: '%s'\n", filename);
-#endif
-
- /* For user contributed and private levels, use the version of
- the game engine the levels were created for.
- Since 2.0.1, the game engine version is now directly stored
- in the level file (chunk "VERS"), so there is no need anymore
- to set the game version from the file version (except for old,
- pre-2.0 levels, where the game version is still taken from the
- file format version used to store the level -- see above). */
-
- /* do some special adjustments to support older level versions */
- if (level->file_version == FILE_VERSION_1_0)
- {
- Error(ERR_WARN, "level file '%s'has version number 1.0", filename);
- Error(ERR_WARN, "using high speed movement for player");
-
- /* player was faster than monsters in (pre-)1.0 levels */
- level->double_speed = TRUE;
- }
-
- /* Default behaviour for EM style gems was "slippery" only in 2.0.1 */
- if (level->game_version == VERSION_IDENT(2,0,1))
- level->em_slippery_gems = TRUE;
- }
- else
- {
-#if 0
- printf("\n::: ALWAYS USE LATEST ENGINE FOR THIS LEVEL: [%d] '%s'\n",
- leveldir_current->sort_priority, filename);
-#endif
-
- /* Always use the latest version of the game engine for all but
- user contributed and private levels; this allows for actual
- corrections in the game engine to take effect for existing,
- converted levels (from "classic" or other existing games) to
- make the game emulation more accurate, while (hopefully) not
- breaking existing levels created from other players. */
-
- level->game_version = GAME_VERSION_ACTUAL;
-
- /* Set special EM style gems behaviour: EM style gems slip down from
- normal, steel and growing wall. As this is a more fundamental change,
- it seems better to set the default behaviour to "off" (as it is more
- natural) and make it configurable in the level editor (as a property
- of gem style elements). Already existing converted levels (neither
- private nor contributed levels) are changed to the new behaviour. */
-
- if (level->file_version < FILE_VERSION_2_0)
- level->em_slippery_gems = TRUE;
- }
-}
-
-static void LoadLevel_InitElements(struct LevelInfo *level, char *filename)
-{
- int i, j;
-
- /* map custom element change events that have changed in newer versions
- (these following values have accidentally changed in version 3.0.1) */
- if (level->game_version <= VERSION_IDENT(3,0,0))
- {
- for (i=0; i < NUM_CUSTOM_ELEMENTS; i++)
- {
- int element = EL_CUSTOM_START + i;
-
- /* order of checking events to be mapped is important */
- for (j=CE_BY_OTHER; j >= CE_BY_PLAYER; j--)
- {
- if (HAS_CHANGE_EVENT(element, j - 2))
- {
- SET_CHANGE_EVENT(element, j - 2, FALSE);
- SET_CHANGE_EVENT(element, j, TRUE);
- }
- }
-
- /* order of checking events to be mapped is important */
- for (j=CE_OTHER_GETS_COLLECTED; j >= CE_COLLISION; j--)
- {
- if (HAS_CHANGE_EVENT(element, j - 1))
- {
- SET_CHANGE_EVENT(element, j - 1, FALSE);
- SET_CHANGE_EVENT(element, j, TRUE);
- }
- }
- }
- }
-
- /* initialize "can_change" field for old levels with only one change page */
- if (level->game_version <= VERSION_IDENT(3,0,2))
- {
- for (i=0; i < NUM_CUSTOM_ELEMENTS; i++)
- {
- int element = EL_CUSTOM_START + i;
-
- if (CAN_CHANGE(element))
- element_info[element].change->can_change = TRUE;
- }
- }
-
- /* initialize element properties for level editor etc. */
- InitElementPropertiesEngine(level->game_version);
-}
-
-static void LoadLevel_InitPlayfield(struct LevelInfo *level, char *filename)
-{
- int x, y;
-
- /* map elements that have changed in newer versions */
- for(y=0; y<level->fieldy; y++)
- {
- for(x=0; x<level->fieldx; x++)
- {
- int element = level->field[x][y];
-
- if (level->game_version <= VERSION_IDENT(2,2,0))
- {
- /* map game font elements */
- element = (element == EL_CHAR('[') ? EL_CHAR_AUMLAUT :
- element == EL_CHAR('\\') ? EL_CHAR_OUMLAUT :
- element == EL_CHAR(']') ? EL_CHAR_UUMLAUT :
- element == EL_CHAR('^') ? EL_CHAR_COPYRIGHT : element);
- }
-
- if (level->game_version < VERSION_IDENT(3,0,0))
- {
- /* map Supaplex gravity tube elements */
- element = (element == EL_SP_GRAVITY_PORT_LEFT ? EL_SP_PORT_LEFT :
- element == EL_SP_GRAVITY_PORT_RIGHT ? EL_SP_PORT_RIGHT :
- element == EL_SP_GRAVITY_PORT_UP ? EL_SP_PORT_UP :
- element == EL_SP_GRAVITY_PORT_DOWN ? EL_SP_PORT_DOWN :
- element);
- }
-
- level->field[x][y] = element;
- }
- }
-
- /* copy elements to runtime playfield array */
- for(x=0; x<MAX_LEV_FIELDX; x++)
- for(y=0; y<MAX_LEV_FIELDY; y++)
- Feld[x][y] = level->field[x][y];
-
- /* initialize level size variables for faster access */
- lev_fieldx = level->fieldx;
- lev_fieldy = level->fieldy;
-
- /* determine border element for this level */
- SetBorderElement();
-}
-
-#else
-
static void LoadLevel_InitLevel(struct LevelInfo *level, char *filename)
{
int i, j, x, y;
InitElementPropertiesEngine(level->game_version);
}
-#endif
-
void LoadLevelTemplate(int level_nr)
{
char *filename = getLevelFilename(level_nr);
LoadLevelFromFilename(&level_template, filename);
- LoadLevel_InitVersion(&level, filename);
- LoadLevel_InitElements(&level, filename);
-
ActivateLevelTemplate();
}
if (level.use_custom_template)
LoadLevelTemplate(-1);
-#if 1
- LoadLevel_InitVersion(&level, filename);
- LoadLevel_InitElements(&level, filename);
- LoadLevel_InitPlayfield(&level, filename);
-#else
LoadLevel_InitLevel(&level, filename);
-#endif
}
static void SaveLevel_VERS(FILE *file, struct LevelInfo *level)
#define SETUP_TOKEN_EDITOR_EL_DX_BOULDERDASH 6
#define SETUP_TOKEN_EDITOR_EL_CHARS 7
#define SETUP_TOKEN_EDITOR_EL_CUSTOM 8
-#define SETUP_TOKEN_EDITOR_EL_HEADLINES 9
-#define NUM_EDITOR_SETUP_TOKENS 10
+#define NUM_EDITOR_SETUP_TOKENS 9
/* shortcut setup */
#define SETUP_TOKEN_SHORTCUT_SAVE_GAME 0
{ TYPE_SWITCH, &sei.el_chars, "editor.el_chars" },
{ TYPE_SWITCH, &sei.el_custom, "editor.el_custom" },
{ TYPE_SWITCH, &sei.el_custom_more, "editor.el_custom_more" },
- { TYPE_SWITCH, &sei.el_headlines, "editor.el_headlines" },
};
static struct TokenInfo shortcut_setup_tokens[] =
si->editor.el_custom = TRUE;
si->editor.el_custom_more = FALSE;
- si->editor.el_headlines = TRUE;
-
si->shortcut.save_game = DEFAULT_KEY_SAVE_GAME;
si->shortcut.load_game = DEFAULT_KEY_LOAD_GAME;
si->shortcut.toggle_pause = DEFAULT_KEY_TOGGLE_PAUSE;
Bang(x, y);
}
-void ShowEnvelope()
-{
- int i, x, y;
-
- /* open envelope window horizontally */
- for (i=2; i <= level.envelope_xsize + 2; i += 2)
- {
- int startx = (SXSIZE / MINI_TILEX - i) / 2;
- int starty = (SYSIZE / MINI_TILEY) / 2 - 1;
-
- SetDrawtoField(DRAW_BUFFERED);
-
- BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
-
- SetDrawtoField(DRAW_BACKBUFFER);
-
- for (y=0; y < 2; y++) for (x=0; x < i; x++)
- {
- int ex = (x == 0 ? -1 : x == i - 1 ? +1 : 0);
- int ey = (y == 0 ? -1 : y == 1 ? +1 : 0);
-
- DrawEnvelopeBorder(startx + x, starty + y, ex, ey);
- }
-
- redraw_mask |= REDRAW_FIELD | REDRAW_FROM_BACKBUFFER;
- BackToFront();
-
- Delay(GAME_FRAME_DELAY);
- }
-
- /* open envelope window vertically */
- for (i=2; i <= level.envelope_ysize + 2; i += 2)
- {
- int xsize = level.envelope_xsize + 2;
- int startx = (SXSIZE / MINI_TILEX - (xsize - 1)) / 2;
- int starty = (SYSIZE / MINI_TILEY - i) / 2;
-
- SetDrawtoField(DRAW_BUFFERED);
-
- BlitBitmap(fieldbuffer, backbuffer, FX, FY, SXSIZE, SYSIZE, SX, SY);
-
- SetDrawtoField(DRAW_BACKBUFFER);
-
- for (y=0; y < i; y++) for (x=0; x < xsize; x++)
- {
- int ex = (x == 0 ? -1 : x == xsize - 1 ? +1 : 0);
- int ey = (y == 0 ? -1 : y == i - 1 ? +1 : 0);
-
- DrawEnvelopeBorder(startx + x, starty + y, ex, ey);
- }
-
- DrawTextToTextArea(SX + (startx + 1) * MINI_TILEX,
- SY + (starty + 1) * MINI_TILEY, level.envelope,
- FONT_TEXT_1, level.envelope_xsize, i - 2);
-
- redraw_mask |= REDRAW_FIELD | REDRAW_FROM_BACKBUFFER;
- BackToFront();
-
- Delay(GAME_FRAME_DELAY);
- }
-
- Delay(3000);
-
- SetDrawtoField(DRAW_BUFFERED);
-
- redraw_mask |= REDRAW_FIELD;
- BackToFront();
-}
-
void RelocatePlayer(int x, int y, int element)
{
struct PlayerInfo *player = &stored_player[element - EL_PLAYER_1];
/* check for change of center element (but change it only once) */
if (IS_CUSTOM_ELEMENT(center_element) &&
- HAS_ANY_CHANGE_EVENT(center_element, CE_OTHER_IS_TOUCHING) &&
+ element_info[center_element].change_events & CE_OTHER_IS_TOUCHING &&
!change_center_element)
{
for (j=0; j < element_info[center_element].num_change_pages; j++)
struct ElementChangeInfo *change =
&element_info[center_element].change_page[j];
- if (change->events & CH_EVENT_BIT(CE_OTHER_IS_TOUCHING) &&
+ if (change->events & CE_OTHER_IS_TOUCHING &&
change->trigger_element == border_element)
{
change_center_element = TRUE;
/* check for change of border element */
if (IS_CUSTOM_ELEMENT(border_element) &&
- HAS_ANY_CHANGE_EVENT(border_element, CE_OTHER_IS_TOUCHING))
+ element_info[border_element].change_events & CE_OTHER_IS_TOUCHING)
{
for (j=0; j < element_info[border_element].num_change_pages; j++)
{
struct ElementChangeInfo *change =
&element_info[border_element].change_page[j];
- if (change->events & CH_EVENT_BIT(CE_OTHER_IS_TOUCHING) &&
+ if (change->events & CE_OTHER_IS_TOUCHING &&
change->trigger_element == center_element)
{
CheckElementChangeExt(xx,yy, border_element,CE_OTHER_IS_TOUCHING, j);
el2edimg(EL_KEY_1 + key_nr));
redraw_mask |= REDRAW_DOOR_1;
}
- else if (element == EL_ENVELOPE)
- {
- ShowEnvelope();
- }
else if (IS_DROPPABLE(element)) /* can be collected and dropped */
{
int i;
{
for (act=0; act<NUM_ACTIONS; act++)
{
- if (graphic_info[element_info[i].graphic[act]].bitmap == NULL)
+ int graphic;
+
+ graphic = element_info[i].graphic[act];
+ if (graphic > 0 && graphic_info[graphic].bitmap == NULL)
element_info[i].graphic[act] = -1;
- if (graphic_info[element_info[i].crumbled[act]].bitmap == NULL)
+ graphic = element_info[i].crumbled[act];
+ if (graphic > 0 && graphic_info[graphic].bitmap == NULL)
element_info[i].crumbled[act] = -1;
for (dir=0; dir<NUM_DIRECTIONS; dir++)
{
- int graphic;
-
graphic = element_info[i].direction_graphic[act][dir];
- if (graphic_info[graphic].bitmap == NULL)
+ if (graphic > 0 && graphic_info[graphic].bitmap == NULL)
element_info[i].direction_graphic[act][dir] = -1;
graphic = element_info[i].direction_crumbled[act][dir];
- if (graphic_info[graphic].bitmap == NULL)
+ if (graphic > 0 && graphic_info[graphic].bitmap == NULL)
element_info[i].direction_crumbled[act][dir] = -1;
}
}
graphic_info = checked_calloc(num_images * sizeof(struct GraphicInfo));
+#if 0
+ printf("::: graphic_info: %d entries\n", num_images);
+#endif
+
#if defined(TARGET_X11_NATIVE_PERFORMANCE_WORKAROUND)
if (clipmasks_initialized)
{
for (i=0; i<(depth + 1) * 3; i++)
printf(" ");
+#if 1
+ printf("filename == '%s' ['%s', '%s'] [%d])\n",
+ node->filename, node->fullpath, node->basepath, node->user_defined);
+#else
printf("filename == '%s' (%s) [%s] (%d)\n",
node->filename, node->name, node->identifier, node->sort_priority);
+#endif
if (node->node_group != NULL)
dumpTreeInfo(node->node_group, depth + 1);
#endif
}
+static void freeTreeInfo(TreeInfo *ldi)
+{
+ if (ldi->filename)
+ free(ldi->filename);
+ if (ldi->fullpath)
+ free(ldi->fullpath);
+ if (ldi->basepath)
+ free(ldi->basepath);
+ if (ldi->identifier)
+ free(ldi->identifier);
+
+ if (ldi->name)
+ free(ldi->name);
+ if (ldi->name_sorting)
+ free(ldi->name_sorting);
+ if (ldi->author)
+ free(ldi->author);
+
+ if (ldi->class_desc)
+ free(ldi->class_desc);
+
+ if (ldi->type == TREE_TYPE_LEVEL_DIR)
+ {
+ if (ldi->graphics_set)
+ free(ldi->graphics_set);
+ if (ldi->sounds_set)
+ free(ldi->sounds_set);
+ if (ldi->music_set)
+ free(ldi->music_set);
+
+ if (ldi->graphics_path)
+ free(ldi->graphics_path);
+ if (ldi->sounds_path)
+ free(ldi->sounds_path);
+ if (ldi->music_path)
+ free(ldi->music_path);
+ }
+}
+
void setSetupInfo(struct TokenInfo *token_info,
int token_nr, char *token_value)
{
ti_new->node_parent = node_parent;
ti_new->parent_link = TRUE;
+#if 1
+ setString(&ti_new->identifier, node_parent->identifier);
+ setString(&ti_new->name, ".. (parent directory)");
+ setString(&ti_new->name_sorting, ti_new->name);
+
+ setString(&ti_new->filename, "..");
+ setString(&ti_new->fullpath, node_parent->fullpath);
+
+ ti_new->sort_priority = node_parent->sort_priority;
+
+ setString(&ti_new->class_desc, getLevelClassDescription(ti_new));
+#else
ti_new->identifier = getStringCopy(node_parent->identifier);
ti_new->name = ".. (parent directory)";
ti_new->name_sorting = getStringCopy(ti_new->name);
ti_new->fullpath = getStringCopy(node_parent->fullpath);
ti_new->sort_priority = node_parent->sort_priority;
+
ti_new->class_desc = getLevelClassDescription(ti_new);
+#endif
pushTreeInfo(&node_parent->node_group, ti_new);
}
getHashEntry(setup_file_hash, levelinfo_tokens[i].text));
*leveldir_new = ldi;
+#if 1
+ if (strcmp(leveldir_new->name, ANONYMOUS_NAME) == 0)
+ setString(&leveldir_new->name, leveldir_new->filename);
+#else
if (strcmp(leveldir_new->name, ANONYMOUS_NAME) == 0)
{
free(leveldir_new->name);
leveldir_new->name = getStringCopy(leveldir_new->filename);
}
+#endif
DrawInitText(leveldir_new->name, 150, FC_YELLOW);
if (node_parent == NULL) /* top level group */
{
- leveldir_new->basepath = level_directory;
- leveldir_new->fullpath = leveldir_new->filename;
+ leveldir_new->basepath = getStringCopy(level_directory);
+ leveldir_new->fullpath = getStringCopy(leveldir_new->filename);
}
else /* sub level group */
{
- leveldir_new->basepath = node_parent->basepath;
+ leveldir_new->basepath = getStringCopy(node_parent->basepath);
leveldir_new->fullpath = getPath2(node_parent->fullpath, directory_name);
}
leveldir_new->last_level =
leveldir_new->first_level + leveldir_new->levels - 1;
+#if 1
+ leveldir_new->user_defined =
+ (strcmp(leveldir_new->basepath, options.level_directory) != 0);
+#else
leveldir_new->user_defined =
(leveldir_new->basepath == options.level_directory ? FALSE : TRUE);
+#endif
leveldir_new->color = LEVELCOLOR(leveldir_new);
+#if 1
+ setString(&leveldir_new->class_desc, getLevelClassDescription(leveldir_new));
+#else
leveldir_new->class_desc = getLevelClassDescription(leveldir_new);
+#endif
leveldir_new->handicap_level = /* set handicap to default value */
(leveldir_new->user_defined ?
getHashEntry(setup_file_hash, levelinfo_tokens[i].text));
*artwork_new = ldi;
+#if 1
+ if (strcmp(artwork_new->name, ANONYMOUS_NAME) == 0)
+ setString(&artwork_new->name, artwork_new->filename);
+#else
if (strcmp(artwork_new->name, ANONYMOUS_NAME) == 0)
{
free(artwork_new->name);
artwork_new->name = getStringCopy(artwork_new->filename);
}
+#endif
#if 0
DrawInitText(artwork_new->name, 150, FC_YELLOW);
artwork_new->fullpath = getPath2(node_parent->fullpath, directory_name);
}
+#if 1
+ artwork_new->user_defined =
+ (strcmp(artwork_new->basepath, OPTIONS_ARTWORK_DIRECTORY(type)) != 0);
+#else
artwork_new->user_defined =
(artwork_new->basepath == OPTIONS_ARTWORK_DIRECTORY(type) ? FALSE : TRUE);
+#endif
/* (may use ".sort_priority" from "setup_file_hash" above) */
artwork_new->color = ARTWORKCOLOR(artwork_new);
+#if 1
+ setString(&artwork_new->class_desc, getLevelClassDescription(artwork_new));
+#else
artwork_new->class_desc = getLevelClassDescription(artwork_new);
+#endif
if (setup_file_hash == NULL) /* (after determining ".user_defined") */
{
+#if 0
if (artwork_new->name != NULL)
+ {
free(artwork_new->name);
+ artwork_new->name = NULL;
+ }
+#endif
+
+#if 0
+ if (artwork_new->identifier != NULL)
+ {
+ free(artwork_new->identifier);
+ artwork_new->identifier = NULL;
+ }
+#endif
if (strcmp(artwork_new->filename, ".") == 0)
{
if (artwork_new->user_defined)
{
+#if 1
+ setString(&artwork_new->identifier, "private");
+#else
artwork_new->identifier = getStringCopy("private");
+#endif
artwork_new->sort_priority = ARTWORKCLASS_USER;
}
else
{
+#if 1
+ setString(&artwork_new->identifier, "classic");
+#else
artwork_new->identifier = getStringCopy("classic");
+#endif
artwork_new->sort_priority = ARTWORKCLASS_CLASSICS;
}
/* set to new values after changing ".sort_priority" */
artwork_new->color = ARTWORKCOLOR(artwork_new);
+#if 1
+ setString(&artwork_new->class_desc,
+ getLevelClassDescription(artwork_new));
+#else
artwork_new->class_desc = getLevelClassDescription(artwork_new);
+#endif
}
else
{
+#if 1
+ setString(&artwork_new->identifier, artwork_new->filename);
+#else
artwork_new->identifier = getStringCopy(artwork_new->filename);
+#endif
}
+#if 1
+ setString(&artwork_new->name, artwork_new->identifier);
+ setString(&artwork_new->name_sorting, artwork_new->name);
+#else
artwork_new->name = getStringCopy(artwork_new->identifier);
artwork_new->name_sorting = getStringCopy(artwork_new->name);
+#endif
}
DrawInitText(artwork_new->name, 150, FC_YELLOW);
setTreeInfoToDefaults(artwork_new, type);
+#if 1
+ setString(&artwork_new->filename, UNDEFINED_FILENAME);
+ setString(&artwork_new->fullpath, UNDEFINED_FILENAME);
+ setString(&artwork_new->basepath, UNDEFINED_FILENAME);
+
+ setString(&artwork_new->identifier, UNDEFINED_FILENAME);
+ setString(&artwork_new->name, UNDEFINED_FILENAME);
+ setString(&artwork_new->name_sorting, UNDEFINED_FILENAME);
+#else
artwork_new->filename = getStringCopy(UNDEFINED_FILENAME);
artwork_new->fullpath = getStringCopy(UNDEFINED_FILENAME);
artwork_new->basepath = getStringCopy(UNDEFINED_FILENAME);
artwork_new->identifier = getStringCopy(UNDEFINED_FILENAME);
artwork_new->name = getStringCopy(UNDEFINED_FILENAME);
artwork_new->name_sorting = getStringCopy(UNDEFINED_FILENAME);
+#endif
return artwork_new;
}
static void SaveUserLevelInfo()
{
+ LevelDirTree *level_info;
char *filename;
FILE *file;
int i;
return;
}
+ level_info = newTreeInfo();
+
/* always start with reliable default values */
- setTreeInfoToDefaults(&ldi, TREE_TYPE_LEVEL_DIR);
+ setTreeInfoToDefaults(level_info, TREE_TYPE_LEVEL_DIR);
-#if 0
- /* !!! FIX ME !!! */
- setString(&ldi.name, getLoginName());
- setString(&ldi.author, getRealName());
- ldi.levels = 100;
- ldi.first_level = 1;
- ldi.sort_priority = LEVELCLASS_USER_START;
- ldi.readonly = FALSE;
- setString(&ldi.graphics_set, GFX_CLASSIC_SUBDIR);
- setString(&ldi.sounds_set, SND_CLASSIC_SUBDIR);
- setString(&ldi.music_set, MUS_CLASSIC_SUBDIR);
+#if 1
+ setString(&level_info->name, getLoginName());
+ setString(&level_info->author, getRealName());
+ level_info->levels = 100;
+ level_info->first_level = 1;
+ level_info->sort_priority = LEVELCLASS_USER_START;
+ level_info->readonly = FALSE;
+ setString(&level_info->graphics_set, GFX_CLASSIC_SUBDIR);
+ setString(&level_info->sounds_set, SND_CLASSIC_SUBDIR);
+ setString(&level_info->music_set, MUS_CLASSIC_SUBDIR);
#else
ldi.name = getStringCopy(getLoginName());
ldi.author = getStringCopy(getRealName());
fprintf(file, "%s\n\n", getFormattedSetupEntry(TOKEN_STR_FILE_IDENTIFIER,
getCookie("LEVELINFO")));
+ ldi = *level_info;
for (i=0; i<NUM_LEVELINFO_TOKENS; i++)
if (i != LEVELINFO_TOKEN_IDENTIFIER &&
i != LEVELINFO_TOKEN_NAME_SORTING &&
SetFilePermissions(filename, PERMS_PRIVATE);
+ freeTreeInfo(level_info);
free(filename);
}
/* "ioctl()" expects pointer to 'int' value for stereo flag
(boolean is defined as 'char', which will not work here) */
unsigned int fragment_spec = 0;
- int fragment_size_query;
+ int fragment_size_query = -1;
int stereo = TRUE;
struct
{
if (leveldir_current == NULL) /* should never happen */
Error(ERR_EXIT, "leveldir_current == NULL");
+ memset(&snd_ctrl, 0, sizeof(SoundControl)); /* to make valgrind happy */
+
snd_ctrl.active = FALSE;
snd_ctrl.state = type;
snd_ctrl.data_len = strlen(set_identifier) + 1;
else if (stereo_position > SOUND_MAX_RIGHT)
stereo_position = SOUND_MAX_RIGHT;
+ memset(&snd_ctrl, 0, sizeof(SoundControl)); /* to make valgrind happy */
+
snd_ctrl.active = TRUE;
snd_ctrl.nr = nr;
snd_ctrl.volume = volume;
if (!audio.sound_available)
return;
+ memset(&snd_ctrl, 0, sizeof(SoundControl)); /* to make valgrind happy */
+
snd_ctrl.active = FALSE;
snd_ctrl.nr = nr;
snd_ctrl.state = state;
boolean el_chars;
boolean el_custom;
boolean el_custom_more;
-
- boolean el_headlines;
};
struct SetupShortcutInfo
int area_xsize, int area_ysize)
{
int area_line = 0;
- int font_height = getFontHeight(font_nr);
+ int font_height = getFontWidth(font_nr);
if (text == NULL)
return;
/* toon animation functions */
/* ========================================================================= */
-static int get_toon_direction(char *direction_raw)
+static int get_toon_direction(char *direction_string_raw)
{
- static char *direction = NULL;
+ char *direction_string = getStringToLower(direction_string_raw);
+ int direction = (strcmp(direction_string, "left") == 0 ? MV_LEFT :
+ strcmp(direction_string, "right") == 0 ? MV_RIGHT :
+ strcmp(direction_string, "up") == 0 ? MV_UP :
+ strcmp(direction_string, "down") == 0 ? MV_DOWN :
+ MV_NO_MOVING);
- /* !!! MEMORY LEAK HERE! FIX IT! !!! */
- setString(&direction, getStringToLower(direction_raw));
+ free(direction_string);
- return (strcmp(direction, "left") == 0 ? MV_LEFT :
- strcmp(direction, "right") == 0 ? MV_RIGHT :
- strcmp(direction, "up") == 0 ? MV_UP :
- strcmp(direction, "down") == 0 ? MV_DOWN : MV_NO_MOVING);
+ return direction;
}
void InitToonScreen(Bitmap *save_buffer,
{ ".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, },
#define GFX_SPECIAL_ARG_EDITOR 3
#define GFX_SPECIAL_ARG_INFO 4
#define GFX_SPECIAL_ARG_SETUP 5
-#define GFX_SPECIAL_ARG_PLAYING 6
-#define GFX_SPECIAL_ARG_DOOR 7
-#define GFX_SPECIAL_ARG_PREVIEW 8
-#define GFX_SPECIAL_ARG_CRUMBLED 9
+#define GFX_SPECIAL_ARG_DOOR 6
+#define GFX_SPECIAL_ARG_PREVIEW 7
+#define GFX_SPECIAL_ARG_CRUMBLED 8
-#define NUM_SPECIAL_GFX_ARGS 10
+#define NUM_SPECIAL_GFX_ARGS 9
/* values for image configuration suffixes */
#define GAME_MODE_EDITOR 3
#define GAME_MODE_INFO 4
#define GAME_MODE_SETUP 5
-#define GAME_MODE_PLAYING 6
-#define GAME_MODE_PSEUDO_DOOR 7
-#define GAME_MODE_PSEUDO_PREVIEW 8
-#define GAME_MODE_PSEUDO_CRUMBLED 9
+#define GAME_MODE_PSEUDO_DOOR 6
+#define GAME_MODE_PSEUDO_PREVIEW 7
+#define GAME_MODE_PSEUDO_CRUMBLED 8
/* there are no special config file suffixes for these modes */
+#define GAME_MODE_PLAYING 9
#define GAME_MODE_PSEUDO_TYPENAME 10
#define GAME_MODE_QUIT 11
{ TYPE_SWITCH, &setup.editor.el_custom, "Custom:" },
{ TYPE_SWITCH, &setup.editor.el_custom_more, "More Custom:" },
{ TYPE_EMPTY, NULL, "" },
- { TYPE_SWITCH, &setup.editor.el_headlines, "Headlines:" },
- { TYPE_EMPTY, NULL, "" },
{ TYPE_LEAVE_MENU, execSetupMain, "Back" },
{ 0, NULL, NULL }
};
{ EL_STEELWALL, EL_INVISIBLE_STEELWALL }
};
int steel_type = (BorderElement == EL_STEELWALL ? 0 : 1);
- int steel_position = (x == -1 && y == -1 ? 0 :
- x == lev_fieldx && y == -1 ? 1 :
- x == -1 && y == lev_fieldy ? 2 :
- x == lev_fieldx && y == lev_fieldy ? 3 :
- x == -1 || x == lev_fieldx ? 4 :
- y == -1 || y == lev_fieldy ? 5 : 6);
+ int steel_position = (x == -1 && y == -1 ? 0 :
+ x == lev_fieldx && y == -1 ? 1 :
+ x == -1 && y == lev_fieldy ? 2 :
+ x == lev_fieldx && y == lev_fieldy ? 3 :
+ x == -1 || x == lev_fieldx ? 4 :
+ y == -1 || y == lev_fieldy ? 5 : 6);
return border[steel_position][steel_type];
}
DrawMiniGraphic(sx, sy, el2edimg(getBorderElement(x, y)));
}
-void DrawEnvelopeBorder(int sx, int sy, int ex, int ey)
-{
- int border[8][2] =
- {
- { EL_STEELWALL_TOPLEFT, EL_INVISIBLE_STEELWALL_TOPLEFT },
- { EL_STEELWALL_TOPRIGHT, EL_INVISIBLE_STEELWALL_TOPRIGHT },
- { EL_STEELWALL_BOTTOMLEFT, EL_INVISIBLE_STEELWALL_BOTTOMLEFT },
- { EL_STEELWALL_BOTTOMRIGHT, EL_INVISIBLE_STEELWALL_BOTTOMRIGHT },
- { EL_STEELWALL_VERTICAL, EL_INVISIBLE_STEELWALL_VERTICAL },
- { EL_STEELWALL_HORIZONTAL, EL_INVISIBLE_STEELWALL_HORIZONTAL },
- { EL_STEELWALL, EL_INVISIBLE_STEELWALL },
- { EL_EMPTY, EL_EMPTY }
- };
- int steel_type = (BorderElement == EL_STEELWALL ? 0 : 1);
- int steel_position = (ex == -1 && ey == -1 ? 0 :
- ex == +1 && ey == -1 ? 1 :
- ex == -1 && ey == +1 ? 2 :
- ex == +1 && ey == +1 ? 3 :
- ex == -1 || ex == +1 ? 4 :
- ey == -1 || ey == +1 ? 5 : 7);
- int element = border[steel_position][steel_type];
-
- DrawMiniGraphic(sx, sy, el2edimg(element));
-}
-
void getMicroGraphicSource(int graphic, Bitmap **bitmap, int *x, int *y)
{
Bitmap *src_bitmap = graphic_info[graphic].bitmap;
unsigned int old_door_state;
int last_game_status = game_status; /* save current game status */
+#if 1
+ SetMouseCursor(CURSOR_DEFAULT);
+#endif
+
#if defined(PLATFORM_UNIX)
/* pause network game while waiting for request to answer */
if (options.network &&
SetDrawBackgroundMask(REDRAW_FIELD | REDRAW_DOOR_1);
+#if 0
SetMouseCursor(CURSOR_DEFAULT);
+#endif
while(result < 0)
{
void DrawMiniElement(int, int, int);
void DrawMiniElementOrWall(int, int, int, int);
-void DrawEnvelopeBorder(int, int, int, int);
void getMicroGraphicSource(int, Bitmap **, int *, int *);
void DrawMicroElement(int, int, int);