// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// https://www.artsoft.org/
// ----------------------------------------------------------------------------
// main.c
// ============================================================================
boolean game_status_last_screen = -1;
boolean level_editor_test_game = FALSE;
boolean network_playing = FALSE;
-
-#if defined(TARGET_SDL)
boolean network_server = FALSE;
SDL_Thread *server_thread;
-#endif
int key_joystick_mapping = 0;
-short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+short Tile[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short Last[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int BX2, BY2;
int SBX_Left, SBX_Right;
int SBY_Upper, SBY_Lower;
-int ZX, ZY;
-int ExitX, ExitY;
-int AllPlayersGone;
int TimeFrames, TimePlayed, TimeLeft, TapeTime;
struct PlayerInfo stored_player[MAX_PLAYERS], *local_player = NULL;
struct HiScore highscore[MAX_SCORE_ENTRIES];
struct TapeInfo tape;
-struct SetupInfo setup;
struct GameInfo game;
struct GlobalInfo global;
struct BorderInfo border;
SetupFileHash *hide_setup_hash = NULL;
-/* ------------------------------------------------------------------------- */
-/* element definitions */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// element definitions
+// ----------------------------------------------------------------------------
struct ElementInfo element_info[MAX_NUM_ELEMENTS + 1];
-/* this contains predefined structure elements to initialize "element_info" */
+// this contains predefined structure elements to initialize "element_info"
struct ElementNameInfo element_name_info[MAX_NUM_ELEMENTS + 1] =
{
- /* keyword to start parser: "ELEMENT_INFO_START" <-- do not change! */
+ // keyword to start parser: "ELEMENT_INFO_START" <-- do not change!
- /* ----------------------------------------------------------------------- */
- /* "real" level file elements */
- /* ----------------------------------------------------------------------- */
+ // --------------------------------------------------------------------------
+ // "real" level file elements
+ // --------------------------------------------------------------------------
{
"empty_space",
{
"bd_butterfly.right",
"bd_butterfly",
- "butterfly (starts moving right)"},
+ "butterfly (starts moving right)"
+ },
{
"bd_butterfly.up",
"bd_butterfly",
{
"bd_butterfly.left",
"bd_butterfly",
- "butterfly (starts moving left)"},
+ "butterfly (starts moving left)"
+ },
{
"bd_butterfly.down",
"bd_butterfly",
- "butterfly (starts moving down)"},
+ "butterfly (starts moving down)"
+ },
{
"bd_firefly.right",
"bd_firefly",
{
"spaceship.right",
"spaceship",
- "spaceship (starts moving right)"},
+ "spaceship (starts moving right)"
+ },
{
"spaceship.up",
"spaceship",
{
"spaceship.left",
"spaceship",
- "spaceship (starts moving left)"},
+ "spaceship (starts moving left)"
+ },
{
"spaceship.down",
"spaceship",
- "spaceship (starts moving down)"},
+ "spaceship (starts moving down)"
+ },
{
"pacman.right",
"pacman",
"letter ''"
},
{
- "char_unused",
+ "char_button",
"char",
"letter 'button'"
},
{
- "char_unused",
+ "char_up",
"char",
"letter 'up'"
},
{
- "char_unused",
+ "char_down",
"char",
"letter 'down'"
},
{
"emc_steelwall_1",
"steelwall",
- "steel wall"
+ "steel wall 1 (EMC style)"
},
{
"emc_steelwall_2",
"steelwall",
- "steel wall"
+ "steel wall 2 (EMC style)"
},
{
"emc_steelwall_3",
"steelwall",
- "steel wall"
+ "steel wall 3 (EMC style)"
},
{
"emc_steelwall_4",
"steelwall",
- "steel wall"
+ "steel wall 4 (EMC style)"
},
{
"emc_wall_1",
"wall",
- "normal wall"
+ "normal wall 1 (EMC style)"
},
{
"emc_wall_2",
"wall",
- "normal wall"
+ "normal wall 2 (EMC style)"
},
{
"emc_wall_3",
"wall",
- "normal wall"
+ "normal wall 3 (EMC style)"
},
{
"emc_wall_4",
"wall",
- "normal wall"
+ "normal wall 4 (EMC style)"
},
{
"emc_wall_5",
"wall",
- "normal wall"
+ "normal wall 5 (EMC style)"
},
{
"emc_wall_6",
"wall",
- "normal wall"
+ "normal wall 6 (EMC style)"
},
{
"emc_wall_7",
"wall",
- "normal wall"
+ "normal wall 7 (EMC style)"
},
{
"emc_wall_8",
"wall",
- "normal wall"
+ "normal wall 8 (EMC style)"
},
{
"tube_any",
{
"emc_wall_9",
"wall",
- "normal wall"
+ "normal wall 9 (EMC style)"
},
{
"emc_wall_10",
"wall",
- "normal wall"
+ "normal wall 10 (EMC style)"
},
{
"emc_wall_11",
"wall",
- "normal wall"
+ "normal wall 11 (EMC style)"
},
{
"emc_wall_12",
"wall",
- "normal wall"
+ "normal wall 12 (EMC style)"
},
{
"emc_wall_13",
"wall",
- "normal wall"
+ "normal wall 13 (EMC style)"
},
{
"emc_wall_14",
"wall",
- "normal wall"
+ "normal wall 14 (EMC style)"
},
{
"emc_wall_15",
"wall",
- "normal wall"
+ "normal wall 15 (EMC style)"
},
{
"emc_wall_16",
"wall",
- "normal wall"
+ "normal wall 16 (EMC style)"
},
{
"emc_wall_slippery_1",
"wall",
- "slippery wall"
+ "slippery wall 1 (EMC style)"
},
{
"emc_wall_slippery_2",
"wall",
- "slippery wall"
+ "slippery wall 2 (EMC style)"
},
{
"emc_wall_slippery_3",
"wall",
- "slippery wall"
+ "slippery wall 3 (EMC style)"
},
{
"emc_wall_slippery_4",
"wall",
- "slippery wall"
+ "slippery wall 4 (EMC style)"
},
{
"emc_fake_grass",
"steel letter ''"
},
{
- "steel_char_unused",
+ "steel_char_button",
"steel_char",
"steel letter 'button'"
},
{
- "steel_char_unused",
+ "steel_char_up",
"steel_char",
"steel letter 'up'"
},
{
- "steel_char_unused",
+ "steel_char_down",
"steel_char",
"steel letter 'down'"
},
{
"dc_steelwall_1_left",
"steelwall",
- "steel wall (left)"
+ "steel wall 1 (left)"
},
{
"dc_steelwall_1_right",
"steelwall",
- "steel wall (right)"
+ "steel wall 1 (right)"
},
{
"dc_steelwall_1_top",
"steelwall",
- "steel wall (top)"
+ "steel wall 1 (top)"
},
{
"dc_steelwall_1_bottom",
"steelwall",
- "steel wall (bottom)"
+ "steel wall 1 (bottom)"
},
{
"dc_steelwall_1_horizontal",
"steelwall",
- "steel wall (top/bottom)"
+ "steel wall 1 (top/bottom)"
},
{
"dc_steelwall_1_vertical",
"steelwall",
- "steel wall (left/right)"
+ "steel wall 1 (left/right)"
},
{
"dc_steelwall_1_topleft",
"steelwall",
- "steel wall (top/left)"
+ "steel wall 1 (top/left)"
},
{
"dc_steelwall_1_topright",
"steelwall",
- "steel wall (top/right)"
+ "steel wall 1 (top/right)"
},
{
"dc_steelwall_1_bottomleft",
"steelwall",
- "steel wall (bottom/left)"
+ "steel wall 1 (bottom/left)"
},
{
"dc_steelwall_1_bottomright",
"steelwall",
- "steel wall (bottom/right)"
+ "steel wall 1 (bottom/right)"
},
{
"dc_steelwall_1_topleft_2",
"steelwall",
- "steel wall (top/left corner)"
+ "steel wall 1 (top/left corner)"
},
{
"dc_steelwall_1_topright_2",
"steelwall",
- "steel wall (top/right corner)"
+ "steel wall 1 (top/right corner)"
},
{
"dc_steelwall_1_bottomleft_2",
"steelwall",
- "steel wall (bottom/left corner)"
+ "steel wall 1 (bottom/left corner)"
},
{
"dc_steelwall_1_bottomright_2",
"steelwall",
- "steel wall (bottom/right corner)"
+ "steel wall 1 (bottom/right corner)"
},
{
"dc_steelwall_2_left",
"steelwall",
- "steel wall (left)"
+ "steel wall 2 (left)"
},
{
"dc_steelwall_2_right",
"steelwall",
- "steel wall (right)"
+ "steel wall 2 (right)"
},
{
"dc_steelwall_2_top",
"steelwall",
- "steel wall (top)"
+ "steel wall 2 (top)"
},
{
"dc_steelwall_2_bottom",
"steelwall",
- "steel wall (bottom)"
+ "steel wall 2 (bottom)"
},
{
"dc_steelwall_2_horizontal",
"steelwall",
- "steel wall (horizontal)"
+ "steel wall 2 (horizontal)"
},
{
"dc_steelwall_2_vertical",
"steelwall",
- "steel wall (vertical)"
+ "steel wall 2 (vertical)"
},
{
"dc_steelwall_2_middle",
"steelwall",
- "steel wall (middle)"
+ "steel wall 2 (middle)"
},
{
"dc_steelwall_2_single",
"steelwall",
- "steel wall (single)"
+ "steel wall 2 (single)"
},
{
"dc_switchgate_switch_up",
{
"mm_steel_wall_1",
"mm_steel_wall",
- "steel wall"
+ "steel wall 1 (MM style)"
},
{
"mm_steel_wall_2",
"mm_steel_wall",
- "steel wall"
+ "steel wall 2 (MM style)"
},
{
"mm_steel_wall_3",
"mm_steel_wall",
- "steel wall"
+ "steel wall 3 (MM style)"
},
{
"mm_steel_wall_4",
"mm_steel_wall",
- "steel wall"
+ "steel wall 4 (MM style)"
},
{
"mm_steel_wall_5",
"mm_steel_wall",
- "steel wall"
+ "steel wall 5 (MM style)"
},
{
"mm_steel_wall_6",
"mm_steel_wall",
- "steel wall"
+ "steel wall 6 (MM style)"
},
{
"mm_steel_wall_7",
"mm_steel_wall",
- "steel wall"
+ "steel wall 7 (MM style)"
},
{
"mm_steel_wall_8",
"mm_steel_wall",
- "steel wall"
+ "steel wall 8 (MM style)"
},
{
"mm_steel_wall_9",
"mm_steel_wall",
- "steel wall"
+ "steel wall 9 (MM style)"
},
{
"mm_steel_wall_10",
"mm_steel_wall",
- "steel wall"
+ "steel wall 10 (MM style)"
},
{
"mm_steel_wall_11",
"mm_steel_wall",
- "steel wall"
+ "steel wall 11 (MM style)"
},
{
"mm_steel_wall_12",
"mm_steel_wall",
- "steel wall"
+ "steel wall 12 (MM style)"
},
{
"mm_steel_wall_13",
"mm_steel_wall",
- "steel wall"
+ "steel wall 13 (MM style)"
},
{
"mm_steel_wall_14",
"mm_steel_wall",
- "steel wall"
+ "steel wall 14 (MM style)"
},
{
"mm_steel_wall_15",
"mm_steel_wall",
- "steel wall"
+ "steel wall 15 (MM style)"
},
{
"mm_steel_wall_16",
"mm_steel_wall",
- "steel wall"
+ "steel wall 16 (MM style)"
},
{
"mm_wooden_wall_1",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 1 (MM style)"
},
{
"mm_wooden_wall_2",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 2 (MM style)"
},
{
"mm_wooden_wall_3",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 3 (MM style)"
},
{
"mm_wooden_wall_4",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 4 (MM style)"
},
{
"mm_wooden_wall_5",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 5 (MM style)"
},
{
"mm_wooden_wall_6",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 6 (MM style)"
},
{
"mm_wooden_wall_7",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 7 (MM style)"
},
{
"mm_wooden_wall_8",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 8 (MM style)"
},
{
"mm_wooden_wall_9",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 9 (MM style)"
},
{
"mm_wooden_wall_10",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 10 (MM style)"
},
{
"mm_wooden_wall_11",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 11 (MM style)"
},
{
"mm_wooden_wall_12",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 12 (MM style)"
},
{
"mm_wooden_wall_13",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 13 (MM style)"
},
{
"mm_wooden_wall_14",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 14 (MM style)"
},
{
"mm_wooden_wall_15",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 15 (MM style)"
},
{
"mm_wooden_wall_16",
"mm_wooden_wall",
- "wooden wall"
+ "wooden wall 16 (MM style)"
},
{
"mm_ice_wall_1",
"mm_ice_wall",
- "ice wall"
+ "ice wall 1"
},
{
"mm_ice_wall_2",
"mm_ice_wall",
- "ice wall"
+ "ice wall 2"
},
{
"mm_ice_wall_3",
"mm_ice_wall",
- "ice wall"
+ "ice wall 3"
},
{
"mm_ice_wall_4",
"mm_ice_wall",
- "ice wall"
+ "ice wall 4"
},
{
"mm_ice_wall_5",
"mm_ice_wall",
- "ice wall"
+ "ice wall 5"
},
{
"mm_ice_wall_6",
"mm_ice_wall",
- "ice wall"
+ "ice wall 6"
},
{
"mm_ice_wall_7",
"mm_ice_wall",
- "ice wall"
+ "ice wall 7"
},
{
"mm_ice_wall_8",
"mm_ice_wall",
- "ice wall"
+ "ice wall 8"
},
{
"mm_ice_wall_9",
"mm_ice_wall",
- "ice wall"
+ "ice wall 9"
},
{
"mm_ice_wall_10",
"mm_ice_wall",
- "ice wall"
+ "ice wall 10"
},
{
"mm_ice_wall_11",
"mm_ice_wall",
- "ice wall"
+ "ice wall 11"
},
{
"mm_ice_wall_12",
"mm_ice_wall",
- "ice wall"
+ "ice wall 12"
},
{
"mm_ice_wall_13",
"mm_ice_wall",
- "ice wall"
+ "ice wall 13"
},
{
"mm_ice_wall_14",
"mm_ice_wall",
- "ice wall"
+ "ice wall 14"
},
{
"mm_ice_wall_15",
"mm_ice_wall",
- "ice wall"
+ "ice wall 15"
},
{
"mm_ice_wall_16",
"mm_ice_wall",
- "ice wall"
+ "ice wall 16"
},
{
"mm_amoeba_wall_1",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 1"
},
{
"mm_amoeba_wall_2",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 2"
},
{
"mm_amoeba_wall_3",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 3"
},
{
"mm_amoeba_wall_4",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 4"
},
{
"mm_amoeba_wall_5",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 5"
},
{
"mm_amoeba_wall_6",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 6"
},
{
"mm_amoeba_wall_7",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 7"
},
{
"mm_amoeba_wall_8",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 8"
},
{
"mm_amoeba_wall_9",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 9"
},
{
"mm_amoeba_wall_10",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 10"
},
{
"mm_amoeba_wall_11",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 11"
},
{
"mm_amoeba_wall_12",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 12"
},
{
"mm_amoeba_wall_13",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 13"
},
{
"mm_amoeba_wall_14",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 14"
},
{
"mm_amoeba_wall_15",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 15"
},
{
"mm_amoeba_wall_16",
"mm_amoeba_wall",
- "amoeba wall"
+ "amoeba wall 16"
},
{
"mm_wooden_block",
{
"df_wooden_wall_1",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 1 (DF style)"
},
{
"df_wooden_wall_2",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 2 (DF style)"
},
{
"df_wooden_wall_3",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 3 (DF style)"
},
{
"df_wooden_wall_4",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 4 (DF style)"
},
{
"df_wooden_wall_5",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 5 (DF style)"
},
{
"df_wooden_wall_6",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 6 (DF style)"
},
{
"df_wooden_wall_7",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 7 (DF style)"
},
{
"df_wooden_wall_8",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 8 (DF style)"
},
{
"df_wooden_wall_9",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 9 (DF style)"
},
{
"df_wooden_wall_10",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 10 (DF style)"
},
{
"df_wooden_wall_11",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 11 (DF style)"
},
{
"df_wooden_wall_12",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 12 (DF style)"
},
{
"df_wooden_wall_13",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 13 (DF style)"
},
{
"df_wooden_wall_14",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 14 (DF style)"
},
{
"df_wooden_wall_15",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 15 (DF style)"
},
{
"df_wooden_wall_16",
"df_wooden_wall",
- "wooden wall (DF style)"
+ "wooden wall 16 (DF style)"
},
{
"df_steel_wall_1",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 1 (DF style)"
},
{
"df_steel_wall_2",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 2 (DF style)"
},
{
"df_steel_wall_3",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 3 (DF style)"
},
{
"df_steel_wall_4",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 4 (DF style)"
},
{
"df_steel_wall_5",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 5 (DF style)"
},
{
"df_steel_wall_6",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 6 (DF style)"
},
{
"df_steel_wall_7",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 7 (DF style)"
},
{
"df_steel_wall_8",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 8 (DF style)"
},
{
"df_steel_wall_9",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 9 (DF style)"
},
{
"df_steel_wall_10",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 10 (DF style)"
},
{
"df_steel_wall_11",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 11 (DF style)"
},
{
"df_steel_wall_12",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 12 (DF style)"
},
{
"df_steel_wall_13",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 13 (DF style)"
},
{
"df_steel_wall_14",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 14 (DF style)"
},
{
"df_steel_wall_15",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 15 (DF style)"
},
{
"df_steel_wall_16",
"df_steel_wall",
- "steel wall (DF style)"
+ "steel wall 16 (DF style)"
},
{
"df_empty_space",
{
"mm_steel_wall",
"mm_steel_wall",
- "steel wall",
+ "steel wall (MM style)",
},
{
"mm_wooden_wall",
"mm_wooden_wall",
- "wooden wall",
+ "wooden wall (MM style)",
},
{
"mm_ice_wall",
"df_wooden_wall",
"wooden wall (DF style)",
},
+ {
+ "spring.left",
+ "spring",
+ "spring (starts moving left)"
+ },
+ {
+ "spring.right",
+ "spring",
+ "spring (starts moving right)"
+ },
- /* ----------------------------------------------------------------------- */
- /* "real" (and therefore drawable) runtime elements */
- /* ----------------------------------------------------------------------- */
+ // --------------------------------------------------------------------------
+ // "real" (and therefore drawable) runtime elements
+ // --------------------------------------------------------------------------
{
"dynabomb_player_1.active",
"pac man (eating down)"
},
- /* ----------------------------------------------------------------------- */
- /* "unreal" (and therefore not drawable) runtime elements */
- /* ----------------------------------------------------------------------- */
+ // --------------------------------------------------------------------------
+ // "unreal" (and therefore not drawable) runtime elements
+ // --------------------------------------------------------------------------
{
"blocked",
"-"
},
- /* ----------------------------------------------------------------------- */
- /* dummy elements (never used as game elements, only used as graphics) */
- /* ----------------------------------------------------------------------- */
+ // --------------------------------------------------------------------------
+ // dummy elements (never used as game elements, only used as graphics)
+ // --------------------------------------------------------------------------
{
"steelwall_topleft",
"hide elements used in this level"
},
- /* keyword to stop parser: "ELEMENT_INFO_END" <-- do not change! */
+ // keyword to stop parser: "ELEMENT_INFO_END" <-- do not change!
{
NULL,
};
-/* ------------------------------------------------------------------------- */
-/* element action and direction definitions */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// element action and direction definitions
+// ----------------------------------------------------------------------------
struct ElementActionInfo element_action_info[NUM_ACTIONS + 1 + 1] =
{
{ ".part_32", ACTION_PART_32, FALSE },
{ ".other", ACTION_OTHER, FALSE },
- /* empty suffix always matches -- check as last entry in InitSoundInfo() */
+ // empty suffix always matches -- check as last entry in InitSoundInfo()
{ "", ACTION_DEFAULT, TRUE },
{ NULL, 0, 0 }
{ ".TOONS", GFX_SPECIAL_ARG_TOONS, },
{ ".SCORESOLD", GFX_SPECIAL_ARG_SCORESOLD, },
{ ".SCORESNEW", GFX_SPECIAL_ARG_SCORESNEW, },
+ { ".NO_TITLE", GFX_SPECIAL_ARG_NO_TITLE, },
{ ".FADING", GFX_SPECIAL_ARG_FADING, },
{ ".QUIT", GFX_SPECIAL_ARG_QUIT, },
- /* empty suffix always matches -- check as last entry in InitMusicInfo() */
+ // empty suffix always matches -- check as last entry in InitMusicInfo()
{ "", GFX_SPECIAL_ARG_DEFAULT, },
{ NULL, 0, }
};
-#include "conf_var.c" /* include auto-generated data structure definitions */
+#include "conf_var.c" // include auto-generated data structure definitions
-/* ------------------------------------------------------------------------- */
-/* font definitions */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// font definitions
+// ----------------------------------------------------------------------------
-/* Important: When one entry is a prefix of another entry, the longer entry
- must come first, because the dynamic configuration does prefix matching!
- (These definitions must match the corresponding definitions in "main.h"!) */
+// Important: When one entry is a prefix of another entry, the longer entry
+// must come first, because the dynamic configuration does prefix matching!
+// (These definitions must match the corresponding definitions in "main.h"!)
struct FontInfo font_info[NUM_FONTS + 1] =
{
struct GlobalAnimInfo global_anim_info[NUM_GLOBAL_ANIM_TOKENS + 1];
-/* this contains predefined structure elements to init "global_anim_info" */
+// this contains predefined structure elements to init "global_anim_info"
struct GlobalAnimNameInfo global_anim_name_info[NUM_GLOBAL_ANIM_TOKENS + 1] =
{
- /* (real) graphic definitions used to define animation graphics */
+ // (real) graphic definitions used to define animation graphics
{ "gfx.global.anim_1", },
{ "gfx.global.anim_2", },
{ "gfx.global.anim_3", },
{ "gfx.global.anim_31", },
{ "gfx.global.anim_32", },
- /* (dummy) graphic definitions used to define animation controls */
+ // (dummy) graphic definitions used to define animation controls
{ "global.anim_1", },
{ "global.anim_2", },
{ "global.anim_3", },
{ NULL }
};
+struct GlobalAnimEventInfo global_anim_event_info =
+{
+ NULL, 0
+};
+
-/* ------------------------------------------------------------------------- */
-/* music token prefix definitions */
-/* ------------------------------------------------------------------------- */
+// ----------------------------------------------------------------------------
+// music token prefix definitions
+// ----------------------------------------------------------------------------
struct MusicPrefixInfo music_prefix_info[NUM_MUSIC_PREFIXES + 1] =
{
};
-/* ========================================================================= */
-/* main() */
-/* ========================================================================= */
+// ============================================================================
+// main()
+// ============================================================================
static void print_usage(void)
{
" \"autoplay LEVELDIR [NR ...]\" play level tapes for LEVELDIR\n"
" \"autoffwd LEVELDIR [NR ...]\" ffwd level tapes for LEVELDIR\n"
" \"autowarp LEVELDIR [NR ...]\" warp level tapes for LEVELDIR\n"
+ " \"patch tapes MODE LEVELDIR [NR]\" patch level tapes for LEVELDIR\n"
" \"convert LEVELDIR [NR]\" convert levels in LEVELDIR\n"
" \"create images DIRECTORY\" write BMP images to DIRECTORY\n"
" \"create CE image DIRECTORY\" write BMP image to DIRECTORY\n"
char *config_filename = getProgramConfigFilename(command_filename);
char *userdata_basename = getBaseNameNoSuffix(command_filename);
char *userdata_subdir;
+#if defined(PLATFORM_UNIX)
char *userdata_subdir_unix;
+#endif
// read default program config, if existing
if (fileExists(config_filename))
LoadSetupFromFilename(config_filename);
}
+#if defined(PLATFORM_UNIX)
// set user data directory for Linux/Unix (but not Mac OS X)
userdata_subdir_unix = getStringCat2(".", userdata_basename);
+#endif
// set program title from potentially redefined program title
if (setup.internal.program_title != NULL &&
EventLoop();
CloseAllAndExit(0);
- return 0; /* to keep compilers happy */
+ return 0; // to keep compilers happy
}