// (c) 1995-2014 by Artsoft Entertainment
// Holger Schemel
// info@artsoft.org
-// http://www.artsoft.org/
+// https://www.artsoft.org/
// ----------------------------------------------------------------------------
// main.h
// ============================================================================
#include "game_mm/game_mm.h"
#include "engines.h"
-#include "conf_gfx.h" /* include auto-generated data structure definitions */
-#include "conf_snd.h" /* include auto-generated data structure definitions */
-#include "conf_mus.h" /* include auto-generated data structure definitions */
+#include "conf_gfx.h" // include auto-generated data structure definitions
+#include "conf_snd.h" // include auto-generated data structure definitions
+#include "conf_mus.h" // include auto-generated data structure definitions
#define IMG_UNDEFINED (-1)
#define IN_LEV_FIELD(x, y) IN_FIELD(x, y, lev_fieldx, lev_fieldy)
#define IN_SCR_FIELD(x, y) IN_FIELD_MINMAX(x,y, BX1,BY1, BX2,BY2)
-/* values for configurable properties (custom elem's only, else pre-defined) */
-/* (never change these values, as they are stored in level files!) */
+// values for configurable properties (custom elem's only, else pre-defined)
+// (never change these values, as they are stored in level files!)
#define EP_DIGGABLE 0
#define EP_COLLECTIBLE_ONLY 1
#define EP_DONT_RUN_INTO 2
#define EP_GRAVITY_REACHABLE 30
#define EP_DONT_GET_HIT_BY 31
-/* values for pre-defined properties */
-/* (from here on, values can be changed by inserting new values) */
+// values for pre-defined properties
+// (from here on, values can be changed by inserting new values)
#define EP_PLAYER 32
#define EP_CAN_PASS_MAGIC_WALL 33
#define EP_CAN_PASS_DC_MAGIC_WALL 34
#define EP_ACTIVE_BOMB 57
#define EP_INACTIVE 58
-/* values for special configurable properties (depending on level settings) */
+// values for special configurable properties (depending on level settings)
#define EP_EM_SLIPPERY_WALL 59
-/* values for special graphics properties (no effect on game engine) */
+// values for special graphics properties (no effect on game engine)
#define EP_GFX_CRUMBLED 60
-/* values for derived properties (determined from properties above) */
+// values for derived properties (determined from properties above)
#define EP_ACCESSIBLE_OVER 61
#define EP_ACCESSIBLE_INSIDE 62
#define EP_ACCESSIBLE_UNDER 63
#define EP_MAYBE_DONT_COLLIDE_WITH 82
#define EP_CAN_BE_CLONED_BY_ANDROID 83
-/* values for internal purpose only (level editor) */
+// values for internal purpose only (level editor)
#define EP_WALK_TO_OBJECT 84
#define EP_DEADLY 85
#define EP_EDITOR_CASCADE 86
#define EP_EDITOR_CASCADE_ACTIVE 87
#define EP_EDITOR_CASCADE_INACTIVE 88
-/* values for internal purpose only (game engine) */
+// values for internal purpose only (game engine)
#define EP_HAS_ACTION 89
#define EP_CAN_CHANGE_OR_HAS_ACTION 90
-/* values for internal purpose only (other) */
+// values for internal purpose only (other)
#define EP_OBSOLETE 91
#define NUM_ELEMENT_PROPERTIES 92
(PROPERTY_VAR(e,p) &= ~PROPERTY_BIT(p)))
-/* values for change events for custom elements (stored in level file) */
+// values for change events for custom elements (stored in level file)
#define CE_DELAY 0
#define CE_TOUCHED_BY_PLAYER 1
#define CE_PRESSED_BY_PLAYER 2
#define CE_VALUE_CHANGES_OF_X 41
#define CE_SCORE_CHANGES 42
#define CE_SCORE_CHANGES_OF_X 43
+#define CE_CLICKED_BY_MOUSE 44
+#define CE_PRESSED_BY_MOUSE 45
+#define CE_MOUSE_CLICKED_ON_X 46
+#define CE_MOUSE_PRESSED_ON_X 47
-#define NUM_CHANGE_EVENTS 44
+#define NUM_CHANGE_EVENTS 48
#define NUM_CE_BITFIELDS ((NUM_CHANGE_EVENTS + 31) / 32)
+#define CE_HEADLINE_SPECIAL_EVENTS 250
+#define CE_UNDEFINED 255
+
#define CE_BITMASK_DEFAULT 0
#define CH_EVENT_BITFIELD_NR(e) (e / 32)
#define SET_ANY_CHANGE_EVENT(e,c,v) (IS_CUSTOM_ELEMENT(e) ? \
CH_ANY_EVENT_VAR(e,c) = (v) : 0)
-/* values for player bitmasks */
+// values for player bitmasks
#define PLAYER_BITS_NONE 0
#define PLAYER_BITS_1 (1 << 0)
#define PLAYER_BITS_2 (1 << 1)
#define PLAYER_BITS_TRIGGER (1 << 4)
#define PLAYER_BITS_ACTION (1 << 5)
-/* values for move directions (bits 0 - 3: basic move directions) */
+// values for move directions (bits 0 - 3: basic move directions)
#define MV_BIT_PREVIOUS 4
#define MV_BIT_TRIGGER 5
#define MV_BIT_TRIGGER_BACK 6
#define MV_NORMAL (1 << MV_BIT_NORMAL)
#define MV_REVERSE (1 << MV_BIT_REVERSE)
-/* values for move stepsize */
+// values for move stepsize
#define STEPSIZE_NOT_MOVING 0
#define STEPSIZE_VERY_SLOW 1
#define STEPSIZE_SLOW 2
#define STEPSIZE_FAST 8
#define STEPSIZE_VERY_FAST 16
#define STEPSIZE_EVEN_FASTER 32
-#define STEPSIZE_SLOWER 50 /* (symbolic value only) */
-#define STEPSIZE_FASTER 200 /* (symbolic value only) */
-#define STEPSIZE_RESET 100 /* (symbolic value only) */
+#define STEPSIZE_SLOWER 50 // (symbolic value only)
+#define STEPSIZE_FASTER 200 // (symbolic value only)
+#define STEPSIZE_RESET 100 // (symbolic value only)
-/* values for change side for custom elements */
+// values for change side for custom elements
#define CH_SIDE_NONE MV_NONE
#define CH_SIDE_LEFT MV_LEFT
#define CH_SIDE_RIGHT MV_RIGHT
#define CH_SIDE_TOP_BOTTOM MV_VERTICAL
#define CH_SIDE_ANY MV_ANY_DIRECTION
-/* values for change player for custom elements */
+#define CH_SIDE_FROM_BUTTON(b) ((b) == MB_LEFTBUTTON ? CH_SIDE_LEFT : \
+ (b) == MB_RIGHTBUTTON ? CH_SIDE_RIGHT : \
+ (b) == MB_MIDDLEBUTTON ? CH_SIDE_TOP_BOTTOM : \
+ CH_SIDE_NONE)
+
+// values for change player for custom elements
#define CH_PLAYER_NONE PLAYER_BITS_NONE
#define CH_PLAYER_1 PLAYER_BITS_1
#define CH_PLAYER_2 PLAYER_BITS_2
#define CH_PLAYER_4 PLAYER_BITS_4
#define CH_PLAYER_ANY PLAYER_BITS_ANY
-/* values for change page for custom elements */
+// values for change page for custom elements
#define CH_PAGE_ANY_FILE (0xff)
#define CH_PAGE_ANY (0xffffffff)
-/* values for change power for custom elements */
+// values for change power for custom elements
#define CP_WHEN_EMPTY 0
#define CP_WHEN_DIGGABLE 1
#define CP_WHEN_DESTRUCTIBLE 2
#define CP_WHEN_REMOVABLE 4
#define CP_WHEN_WALKABLE 5
-/* values for change actions for custom elements (stored in level file) */
+// values for change actions for custom elements (stored in level file)
#define CA_NO_ACTION 0
#define CA_EXIT_PLAYER 1
#define CA_KILL_PLAYER 2
#define CA_SET_PLAYER_INVENTORY 18
#define CA_SET_CE_ARTWORK 19
#define CA_SET_LEVEL_RANDOM_SEED 20
+#define CA_MOVE_PLAYER_NEW 21
#define CA_HEADLINE_LEVEL_ACTIONS 250
#define CA_HEADLINE_PLAYER_ACTIONS 251
#define CA_HEADLINE_ENGINE_ACTIONS 253
#define CA_UNDEFINED 255
-/* values for change action mode for custom elements */
+// values for change action mode for custom elements
#define CA_MODE_UNDEFINED 0
#define CA_MODE_SET 1
#define CA_MODE_ADD 2
#define CA_MODE_DIVIDE 5
#define CA_MODE_MODULO 6
-/* values for change action parameters for custom elements */
+// values for change action parameters for custom elements
#define CA_ARG_MIN 0
#define CA_ARG_0 0
#define CA_ARG_1 1
#define CA_ARG_INVENTORY_RM_HEADLINE (CA_ARG_INVENTORY + 999)
#define CA_ARG_UNDEFINED 65535
-/* values for custom move patterns (bits 0 - 3: basic move directions) */
+// values for custom move patterns (bits 0 - 3: basic move directions)
#define MV_BIT_TOWARDS_PLAYER 4
#define MV_BIT_AWAY_FROM_PLAYER 5
#define MV_BIT_ALONG_LEFT_SIDE 6
#define MV_BIT_TURNING_RANDOM 16
#define MV_BIT_WIND_DIRECTION 17
-/* values for custom move patterns */
+// values for custom move patterns
#define MV_TOWARDS_PLAYER (1 << MV_BIT_TOWARDS_PLAYER)
#define MV_AWAY_FROM_PLAYER (1 << MV_BIT_AWAY_FROM_PLAYER)
#define MV_ALONG_LEFT_SIDE (1 << MV_BIT_ALONG_LEFT_SIDE)
#define MV_TURNING_RANDOM (1 << MV_BIT_TURNING_RANDOM)
#define MV_WIND_DIRECTION (1 << MV_BIT_WIND_DIRECTION)
-/* values for initial move direction */
+// values for initial move direction
#define MV_START_NONE (MV_NONE)
#define MV_START_AUTOMATIC (MV_NONE)
#define MV_START_LEFT (MV_LEFT)
#define MV_START_RANDOM (MV_ALL_DIRECTIONS)
#define MV_START_PREVIOUS (MV_PREVIOUS)
-/* values for elements left behind by custom elements */
+// values for elements left behind by custom elements
#define LEAVE_TYPE_UNLIMITED 0
#define LEAVE_TYPE_LIMITED 1
-/* values for slippery property for custom elements */
+// values for slippery property for custom elements
#define SLIPPERY_ANY_RANDOM 0
#define SLIPPERY_ANY_LEFT_RIGHT 1
#define SLIPPERY_ANY_RIGHT_LEFT 2
#define SLIPPERY_ONLY_LEFT 3
#define SLIPPERY_ONLY_RIGHT 4
-/* values for explosion type for custom elements */
+// values for explosion type for custom elements
#define EXPLODES_3X3 0
#define EXPLODES_1X1 1
#define EXPLODES_CROSS 2
-/* macros for configurable properties */
+// macros for configurable properties
#define IS_DIGGABLE(e) HAS_PROPERTY(e, EP_DIGGABLE)
#define IS_COLLECTIBLE_ONLY(e) HAS_PROPERTY(e, EP_COLLECTIBLE_ONLY)
#define DONT_RUN_INTO(e) HAS_PROPERTY(e, EP_DONT_RUN_INTO)
#define IS_GRAVITY_REACHABLE(e) HAS_PROPERTY(e, EP_GRAVITY_REACHABLE)
#define DONT_GET_HIT_BY(e) HAS_PROPERTY(e, EP_DONT_GET_HIT_BY)
-/* macros for special configurable properties */
+// macros for special configurable properties
#define IS_EM_SLIPPERY_WALL(e) HAS_PROPERTY(e, EP_EM_SLIPPERY_WALL)
-/* macros for special graphics properties */
+// macros for special graphics properties
#define GFX_CRUMBLED(e) HAS_PROPERTY(GFX_ELEMENT(e), EP_GFX_CRUMBLED)
-/* macros for pre-defined properties */
-#define ELEM_IS_PLAYER(e) HAS_PROPERTY(e, EP_PLAYER)
+// macros for pre-defined properties
+#define IS_PLAYER_ELEMENT(e) HAS_PROPERTY(e, EP_PLAYER)
#define CAN_PASS_MAGIC_WALL(e) HAS_PROPERTY(e, EP_CAN_PASS_MAGIC_WALL)
#define CAN_PASS_DC_MAGIC_WALL(e) HAS_PROPERTY(e, EP_CAN_PASS_DC_MAGIC_WALL)
#define IS_SWITCHABLE(e) HAS_PROPERTY(e, EP_SWITCHABLE)
#define IS_ACTIVE_BOMB(e) HAS_PROPERTY(e, EP_ACTIVE_BOMB)
#define IS_INACTIVE(e) HAS_PROPERTY(e, EP_INACTIVE)
-/* macros for derived properties */
+// macros for derived properties
#define IS_ACCESSIBLE_OVER(e) HAS_PROPERTY(e, EP_ACCESSIBLE_OVER)
#define IS_ACCESSIBLE_INSIDE(e) HAS_PROPERTY(e, EP_ACCESSIBLE_INSIDE)
#define IS_ACCESSIBLE_UNDER(e) HAS_PROPERTY(e, EP_ACCESSIBLE_UNDER)
#define IS_OBSOLETE(e) HAS_PROPERTY(e, EP_OBSOLETE)
-/* special macros used in game engine */
+// special macros used in game engine
#define IS_FILE_ELEMENT(e) ((e) >= 0 && \
(e) <= NUM_FILE_ELEMENTS)
#define IS_DC_STEELWALL_2(e) ((e) >= EL_DC_STEELWALL_2_LEFT && \
(e) <= EL_DC_STEELWALL_2_SINGLE)
+// !!! IMPROVE THIS !!!
+#define IS_EM_ELEMENT(e) (map_element_EM_to_RND_cave(map_element_RND_to_EM_cave(e)) == (e))
+
#define MM_WALL_BASE(e) ((e) & 0xfff0)
#define MM_WALL_BITS(e) ((e) & 0x000f)
#define GFX_ELEMENT(e) (element_info[e].gfx_element)
-/* !!! CHECK THIS !!! */
+// !!! CHECK THIS !!!
#if 1
#define TILE_GFX_ELEMENT(x, y) \
(GfxElement[x][y] != EL_UNDEFINED && \
- Feld[x][y] != EL_EXPLOSION ? \
- GfxElement[x][y] : Feld[x][y])
+ Tile[x][y] != EL_EXPLOSION ? \
+ GfxElement[x][y] : Tile[x][y])
#else
#define TILE_GFX_ELEMENT(x, y) \
GFX_ELEMENT(GfxElement[x][y] != EL_UNDEFINED && \
- Feld[x][y] != EL_EXPLOSION ? \
- GfxElement[x][y] : Feld[x][y])
+ Tile[x][y] != EL_EXPLOSION ? \
+ GfxElement[x][y] : Tile[x][y])
#endif
-/* !!! "use sound" deactivated due to problems with level "bug machine" !!! */
-/* (solution: add separate "use sound of element" to level file and editor) */
+// !!! "use sound" deactivated due to problems with level "bug machine" !!!
+// (solution: add separate "use sound of element" to level file and editor)
#if 0
#define SND_ELEMENT(e) GFX_ELEMENT(e)
#else
(ge == EL_ANY_ELEMENT ? TRUE : \
IS_GROUP_ELEMENT(ge) ? IS_IN_GROUP(e, GROUP_NR(ge)) : (e) == (ge))
-#define IS_PLAYER(x, y) (ELEM_IS_PLAYER(StorePlayer[x][y]))
+#define IS_PLAYER(x, y) (IS_PLAYER_ELEMENT(StorePlayer[x][y]))
-#define IS_FREE(x, y) (Feld[x][y] == EL_EMPTY && !IS_PLAYER(x, y))
-#define IS_FREE_OR_PLAYER(x, y) (Feld[x][y] == EL_EMPTY)
+#define IS_FREE(x, y) (Tile[x][y] == EL_EMPTY && !IS_PLAYER(x, y))
+#define IS_FREE_OR_PLAYER(x, y) (Tile[x][y] == EL_EMPTY)
#define IS_MOVING(x,y) (MovPos[x][y] != 0)
#define IS_FALLING(x,y) (MovPos[x][y] != 0 && MovDir[x][y] == MV_DOWN)
-#define IS_BLOCKED(x,y) (Feld[x][y] == EL_BLOCKED)
+#define IS_BLOCKED(x,y) (Tile[x][y] == EL_BLOCKED)
#define IS_MV_DIAGONAL(x) ((x) & MV_HORIZONTAL && (x) & MV_VERTICAL)
#define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_PLAYER_1])
#define SHIELD_ON(p) ((p)->shield_normal_time_left > 0)
-#define ENEMY_PROTECTED_FIELD(x,y) (IS_PROTECTED(Feld[x][y]) || \
+#define ENEMY_PROTECTED_FIELD(x,y) (IS_PROTECTED(Tile[x][y]) || \
IS_PROTECTED(Back[x][y]))
-#define EXPLOSION_PROTECTED_FIELD(x,y) (IS_EXPLOSION_PROOF(Feld[x][y]))
+#define EXPLOSION_PROTECTED_FIELD(x,y) (IS_EXPLOSION_PROOF(Tile[x][y]))
#define PLAYER_ENEMY_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \
ENEMY_PROTECTED_FIELD(x, y))
#define PLAYER_EXPLOSION_PROTECTED(x,y) (SHIELD_ON(PLAYERINFO(x, y)) || \
#define BUTTON_ACTIVE(b) (ActiveButton[b])
#define FONT_ACTIVE(f) (ActiveFont[f])
-/* fundamental game speed values */
-#define MICROLEVEL_SCROLL_DELAY 50 /* delay for scrolling micro level */
-#define MICROLEVEL_LABEL_DELAY 250 /* delay for micro level label */
+// fundamental game speed values
+#define MICROLEVEL_SCROLL_DELAY 50 // delay for scrolling micro level
+#define MICROLEVEL_LABEL_DELAY 250 // delay for micro level label
-/* boundaries of arrays etc. */
+// boundaries of arrays etc.
#define MAX_LEVEL_NAME_LEN 32
#define MAX_LEVEL_AUTHOR_LEN 32
#define MAX_ELEMENT_NAME_LEN 32
#define MIN_ELEMENTS_IN_GROUP 1
#define MAX_ELEMENTS_IN_GROUP 16
#define MIN_ANDROID_ELEMENTS 1
-#define MAX_ANDROID_ELEMENTS 16
+#define MAX_ANDROID_ELEMENTS 32
+#define MAX_ANDROID_ELEMENTS_OLD 16 // (extended since version 4.2.0.0)
-/* values for elements with content */
+// values for elements with content
#define MIN_ELEMENT_CONTENTS 1
#define STD_ELEMENT_CONTENTS 4
#define MAX_ELEMENT_CONTENTS 8
-/* values for initial player inventory */
+// values for initial player inventory
#define MIN_INITIAL_INVENTORY_SIZE 1
#define MAX_INITIAL_INVENTORY_SIZE 8
-/* often used screen positions */
+// often used screen positions
#define TILESIZE 32
#define TILEX TILESIZE
#define TILEY TILESIZE
#define MICROLABEL1_YPOS (MICROLEVEL_YPOS - 36)
#define MICROLABEL2_YPOS (MICROLEVEL_YPOS + MICROLEVEL_YSIZE + 7)
-/* values for GfxRedraw */
+// values for GfxRedraw
#define GFX_REDRAW_NONE (0)
#define GFX_REDRAW_TILE (1 << 0)
#define GFX_REDRAW_TILE_CRUMBLED (1 << 1)
#define GFX_REDRAW_TILE_CRUMBLED_NEIGHBOURS (1 << 2)
#define GFX_REDRAW_TILE_TWINKLED (1 << 3)
-/* score for elements */
+// score for elements
#define SC_EMERALD 0
#define SC_DIAMOND 1
#define SC_BUG 2
#define SC_ELEM_BONUS 14
#define SC_UNKNOWN_15 15
-#define LEVEL_SCORE_ELEMENTS 16 /* level elements with score */
+#define LEVEL_SCORE_ELEMENTS 16 // level elements with score
-/* "real" level file elements */
+// "real" level file elements
#define EL_UNDEFINED -1
#define EL_EMPTY_SPACE 0
#define EL_WALL 2
#define EL_WALL_SLIPPERY 3
#define EL_ROCK 4
-#define EL_KEY_OBSOLETE 5 /* obsolete; now EL_KEY_1 */
+#define EL_KEY_OBSOLETE 5 // obsolete; now EL_KEY_1
#define EL_EMERALD 6
#define EL_EXIT_CLOSED 7
-#define EL_PLAYER_OBSOLETE 8 /* obsolete; now EL_PLAYER_1 */
+#define EL_PLAYER_OBSOLETE 8 // obsolete; now EL_PLAYER_1
#define EL_BUG 9
#define EL_SPACESHIP 10
#define EL_YAMYAM 11
#define EL_PIG 117
#define EL_DRAGON 118
-#define EL_EM_KEY_1_FILE_OBSOLETE 119 /* obsolete; now EL_EM_KEY_1 */
+#define EL_EM_KEY_1_FILE_OBSOLETE 119 // obsolete; now EL_EM_KEY_1
#define EL_CHAR_START 120
#define EL_CHAR_ASCII0 (EL_CHAR_START - 32)
#define EL_CHAR_ASCII0_START (EL_CHAR_ASCII0 + 32)
-#include "conf_chr.h" /* include auto-generated data structure definitions */
+#include "conf_chr.h" // include auto-generated data structure definitions
#define EL_CHAR_ASCII0_END (EL_CHAR_ASCII0 + 111)
#define EL_CHAR_END (EL_CHAR_START + 79)
#define EL_EM_GATE_3 205
#define EL_EM_GATE_4 206
-#define EL_EM_KEY_2_FILE_OBSOLETE 207 /* obsolete; now EL_EM_KEY_2 */
-#define EL_EM_KEY_3_FILE_OBSOLETE 208 /* obsolete; now EL_EM_KEY_3 */
-#define EL_EM_KEY_4_FILE_OBSOLETE 209 /* obsolete; now EL_EM_KEY_4 */
+#define EL_EM_KEY_2_FILE_OBSOLETE 207 // obsolete; now EL_EM_KEY_2
+#define EL_EM_KEY_3_FILE_OBSOLETE 208 // obsolete; now EL_EM_KEY_3
+#define EL_EM_KEY_4_FILE_OBSOLETE 209 // obsolete; now EL_EM_KEY_4
#define EL_SP_START 210
#define EL_SP_EMPTY_SPACE (EL_SP_START + 0)
#define EL_CONVEYOR_BELT_4_SWITCH_MIDDLE 293
#define EL_CONVEYOR_BELT_4_SWITCH_RIGHT 294
#define EL_LANDMINE 295
-#define EL_ENVELOPE_OBSOLETE 296 /* obsolete; now EL_ENVELOPE_1 */
+#define EL_ENVELOPE_OBSOLETE 296 // obsolete; now EL_ENVELOPE_1
#define EL_LIGHT_SWITCH 297
#define EL_LIGHT_SWITCH_ACTIVE 298
#define EL_SIGN_EXCLAMATION 299
#define EL_UNUSED_358 358
#define EL_UNUSED_359 359
-/* ---------- begin of custom elements section ----------------------------- */
+// ---------- begin of custom elements section --------------------------------
#define EL_CUSTOM_START 360
-#include "conf_cus.h" /* include auto-generated data structure definitions */
+#include "conf_cus.h" // include auto-generated data structure definitions
#define NUM_CUSTOM_ELEMENTS 256
#define EL_CUSTOM_END 615
-/* ---------- end of custom elements section ------------------------------- */
+// ---------- end of custom elements section ----------------------------------
#define EL_EM_KEY_1 616
#define EL_EM_KEY_2 617
#define EL_ENVELOPE_3 622
#define EL_ENVELOPE_4 623
-/* ---------- begin of group elements section ------------------------------ */
+// ---------- begin of group elements section ---------------------------------
#define EL_GROUP_START 624
-#include "conf_grp.h" /* include auto-generated data structure definitions */
+#include "conf_grp.h" // include auto-generated data structure definitions
#define NUM_GROUP_ELEMENTS 32
#define EL_GROUP_END 655
-/* ---------- end of custom elements section ------------------------------- */
+// ---------- end of custom elements section ----------------------------------
#define EL_UNKNOWN 656
#define EL_TRIGGER_ELEMENT 657
#define EL_TRIGGER_PLAYER 658
-/* SP style elements */
+// SP style elements
#define EL_SP_GRAVITY_ON_PORT_RIGHT 659
#define EL_SP_GRAVITY_ON_PORT_DOWN 660
#define EL_SP_GRAVITY_ON_PORT_LEFT 661
#define EL_SP_GRAVITY_OFF_PORT_LEFT 665
#define EL_SP_GRAVITY_OFF_PORT_UP 666
-/* EMC style elements */
+// EMC style elements
#define EL_BALLOON_SWITCH_NONE 667
#define EL_EMC_GATE_5 668
#define EL_EMC_GATE_6 669
#define EL_STEEL_CHAR_ASCII0 (EL_STEEL_CHAR_START - 32)
#define EL_STEEL_CHAR_ASCII0_START (EL_STEEL_CHAR_ASCII0 + 32)
-/* (auto-generated data structure definitions included with normal chars) */
+// (auto-generated data structure definitions included with normal chars)
#define EL_STEEL_CHAR_ASCII0_END (EL_STEEL_CHAR_ASCII0 + 111)
#define EL_STEEL_CHAR_END (EL_STEEL_CHAR_START + 79)
#define EL_MM_END_2 (EL_DF_START2 + 430)
#define EL_MM_END EL_MM_END_2
-#define NUM_FILE_ELEMENTS 1215
+#define EL_SPRING_LEFT 1215
+#define EL_SPRING_RIGHT 1216
+#define NUM_FILE_ELEMENTS 1217
-/* "real" (and therefore drawable) runtime elements */
+
+// "real" (and therefore drawable) runtime elements
#define EL_FIRST_RUNTIME_REAL NUM_FILE_ELEMENTS
#define EL_DYNABOMB_PLAYER_1_ACTIVE (EL_FIRST_RUNTIME_REAL + 0)
#define EL_MM_RUNTIME_START EL_MM_EXIT_OPENING
#define EL_MM_RUNTIME_END EL_MM_AMOEBA_WALL_GROWING
-/* "unreal" (and therefore not drawable) runtime elements */
+// "unreal" (and therefore not drawable) runtime elements
#define EL_FIRST_RUNTIME_UNREAL (NUM_DRAWABLE_ELEMENTS)
#define EL_BLOCKED (EL_FIRST_RUNTIME_UNREAL + 0)
#define NUM_RUNTIME_ELEMENTS (EL_FIRST_RUNTIME_UNREAL + 24)
-/* dummy elements (never used as game elements, only used as graphics) */
+// dummy elements (never used as game elements, only used as graphics)
#define EL_FIRST_DUMMY NUM_RUNTIME_ELEMENTS
#define EL_STEELWALL_TOPLEFT (EL_FIRST_DUMMY + 0)
#define EL_MM_DUMMY_START EL_MM_MASK_MCDUFFIN_RIGHT
#define EL_MM_DUMMY_END EL_MM_MASK_CIRCLE
-/* internal elements (only used for internal purposes like copying) */
+// internal elements (only used for internal purposes like copying)
#define EL_FIRST_INTERNAL (EL_FIRST_DUMMY + 47)
#define EL_INTERNAL_CLIPBOARD_CUSTOM (EL_FIRST_INTERNAL + 0)
#define MAX_NUM_ELEMENTS (EL_FIRST_INTERNAL + 38)
-/* values for graphics/sounds action types */
-#define ACTION_DEFAULT 0
-#define ACTION_WAITING 1
-#define ACTION_FALLING 2
-#define ACTION_MOVING 3
-#define ACTION_DIGGING 4
-#define ACTION_SNAPPING 5
-#define ACTION_COLLECTING 6
-#define ACTION_DROPPING 7
-#define ACTION_PUSHING 8
-#define ACTION_WALKING 9
-#define ACTION_PASSING 10
-#define ACTION_IMPACT 11
-#define ACTION_BREAKING 12
-#define ACTION_ACTIVATING 13
-#define ACTION_DEACTIVATING 14
-#define ACTION_OPENING 15
-#define ACTION_CLOSING 16
-#define ACTION_ATTACKING 17
-#define ACTION_GROWING 18
-#define ACTION_SHRINKING 19
-#define ACTION_ACTIVE 20
-#define ACTION_FILLING 21
-#define ACTION_EMPTYING 22
-#define ACTION_CHANGING 23
-#define ACTION_EXPLODING 24
-#define ACTION_BORING 25
-#define ACTION_BORING_1 26
-#define ACTION_BORING_2 27
-#define ACTION_BORING_3 28
-#define ACTION_BORING_4 29
-#define ACTION_BORING_5 30
-#define ACTION_BORING_6 31
-#define ACTION_BORING_7 32
-#define ACTION_BORING_8 33
-#define ACTION_BORING_9 34
-#define ACTION_BORING_10 35
-#define ACTION_SLEEPING 36
-#define ACTION_SLEEPING_1 37
-#define ACTION_SLEEPING_2 38
-#define ACTION_SLEEPING_3 39
-#define ACTION_AWAKENING 40
-#define ACTION_DYING 41
-#define ACTION_TURNING 42
-#define ACTION_TURNING_FROM_LEFT 43
-#define ACTION_TURNING_FROM_RIGHT 44
-#define ACTION_TURNING_FROM_UP 45
-#define ACTION_TURNING_FROM_DOWN 46
-#define ACTION_SMASHED_BY_ROCK 47
-#define ACTION_SMASHED_BY_SPRING 48
-#define ACTION_EATING 49
-#define ACTION_TWINKLING 50
-#define ACTION_SPLASHING 51
-#define ACTION_HITTING 52
-#define ACTION_PAGE_1 53
-#define ACTION_PAGE_2 54
-#define ACTION_PAGE_3 55
-#define ACTION_PAGE_4 56
-#define ACTION_PAGE_5 57
-#define ACTION_PAGE_6 58
-#define ACTION_PAGE_7 59
-#define ACTION_PAGE_8 60
-#define ACTION_PAGE_9 61
-#define ACTION_PAGE_10 62
-#define ACTION_PAGE_11 63
-#define ACTION_PAGE_12 64
-#define ACTION_PAGE_13 65
-#define ACTION_PAGE_14 66
-#define ACTION_PAGE_15 67
-#define ACTION_PAGE_16 68
-#define ACTION_PAGE_17 69
-#define ACTION_PAGE_18 70
-#define ACTION_PAGE_19 71
-#define ACTION_PAGE_20 72
-#define ACTION_PAGE_21 73
-#define ACTION_PAGE_22 74
-#define ACTION_PAGE_23 75
-#define ACTION_PAGE_24 76
-#define ACTION_PAGE_25 77
-#define ACTION_PAGE_26 78
-#define ACTION_PAGE_27 79
-#define ACTION_PAGE_28 80
-#define ACTION_PAGE_29 81
-#define ACTION_PAGE_30 82
-#define ACTION_PAGE_31 83
-#define ACTION_PAGE_32 84
-#define ACTION_PART_1 85
-#define ACTION_PART_2 86
-#define ACTION_PART_3 87
-#define ACTION_PART_4 88
-#define ACTION_PART_5 89
-#define ACTION_PART_6 90
-#define ACTION_PART_7 91
-#define ACTION_PART_8 92
-#define ACTION_PART_9 93
-#define ACTION_PART_10 94
-#define ACTION_PART_11 95
-#define ACTION_PART_12 96
-#define ACTION_PART_13 97
-#define ACTION_PART_14 98
-#define ACTION_PART_15 99
-#define ACTION_PART_16 100
-#define ACTION_PART_17 101
-#define ACTION_PART_18 102
-#define ACTION_PART_19 103
-#define ACTION_PART_20 104
-#define ACTION_PART_21 105
-#define ACTION_PART_22 106
-#define ACTION_PART_23 107
-#define ACTION_PART_24 108
-#define ACTION_PART_25 109
-#define ACTION_PART_26 110
-#define ACTION_PART_27 111
-#define ACTION_PART_28 112
-#define ACTION_PART_29 113
-#define ACTION_PART_30 114
-#define ACTION_PART_31 115
-#define ACTION_PART_32 116
-#define ACTION_OTHER 117
-
-#define NUM_ACTIONS 118
+// values for graphics/sounds action types
+enum
+{
+ ACTION_DEFAULT = 0,
+ ACTION_WAITING,
+ ACTION_FALLING,
+ ACTION_MOVING,
+ ACTION_DIGGING,
+ ACTION_SNAPPING,
+ ACTION_COLLECTING,
+ ACTION_DROPPING,
+ ACTION_PUSHING,
+ ACTION_WALKING,
+ ACTION_PASSING,
+ ACTION_IMPACT,
+ ACTION_BREAKING,
+ ACTION_ACTIVATING,
+ ACTION_DEACTIVATING,
+ ACTION_OPENING,
+ ACTION_CLOSING,
+ ACTION_ATTACKING,
+ ACTION_GROWING,
+ ACTION_SHRINKING,
+ ACTION_ACTIVE,
+ ACTION_FILLING,
+ ACTION_EMPTYING,
+ ACTION_CHANGING,
+ ACTION_EXPLODING,
+ ACTION_BORING,
+ ACTION_BORING_1,
+ ACTION_BORING_2,
+ ACTION_BORING_3,
+ ACTION_BORING_4,
+ ACTION_BORING_5,
+ ACTION_BORING_6,
+ ACTION_BORING_7,
+ ACTION_BORING_8,
+ ACTION_BORING_9,
+ ACTION_BORING_10,
+ ACTION_SLEEPING,
+ ACTION_SLEEPING_1,
+ ACTION_SLEEPING_2,
+ ACTION_SLEEPING_3,
+ ACTION_AWAKENING,
+ ACTION_DYING,
+ ACTION_TURNING,
+ ACTION_TURNING_FROM_LEFT,
+ ACTION_TURNING_FROM_RIGHT,
+ ACTION_TURNING_FROM_UP,
+ ACTION_TURNING_FROM_DOWN,
+ ACTION_SMASHED_BY_ROCK,
+ ACTION_SMASHED_BY_SPRING,
+ ACTION_EATING,
+ ACTION_TWINKLING,
+ ACTION_SPLASHING,
+ ACTION_HITTING,
+ ACTION_PAGE_1,
+ ACTION_PAGE_2,
+ ACTION_PAGE_3,
+ ACTION_PAGE_4,
+ ACTION_PAGE_5,
+ ACTION_PAGE_6,
+ ACTION_PAGE_7,
+ ACTION_PAGE_8,
+ ACTION_PAGE_9,
+ ACTION_PAGE_10,
+ ACTION_PAGE_11,
+ ACTION_PAGE_12,
+ ACTION_PAGE_13,
+ ACTION_PAGE_14,
+ ACTION_PAGE_15,
+ ACTION_PAGE_16,
+ ACTION_PAGE_17,
+ ACTION_PAGE_18,
+ ACTION_PAGE_19,
+ ACTION_PAGE_20,
+ ACTION_PAGE_21,
+ ACTION_PAGE_22,
+ ACTION_PAGE_23,
+ ACTION_PAGE_24,
+ ACTION_PAGE_25,
+ ACTION_PAGE_26,
+ ACTION_PAGE_27,
+ ACTION_PAGE_28,
+ ACTION_PAGE_29,
+ ACTION_PAGE_30,
+ ACTION_PAGE_31,
+ ACTION_PAGE_32,
+ ACTION_PART_1,
+ ACTION_PART_2,
+ ACTION_PART_3,
+ ACTION_PART_4,
+ ACTION_PART_5,
+ ACTION_PART_6,
+ ACTION_PART_7,
+ ACTION_PART_8,
+ ACTION_PART_9,
+ ACTION_PART_10,
+ ACTION_PART_11,
+ ACTION_PART_12,
+ ACTION_PART_13,
+ ACTION_PART_14,
+ ACTION_PART_15,
+ ACTION_PART_16,
+ ACTION_PART_17,
+ ACTION_PART_18,
+ ACTION_PART_19,
+ ACTION_PART_20,
+ ACTION_PART_21,
+ ACTION_PART_22,
+ ACTION_PART_23,
+ ACTION_PART_24,
+ ACTION_PART_25,
+ ACTION_PART_26,
+ ACTION_PART_27,
+ ACTION_PART_28,
+ ACTION_PART_29,
+ ACTION_PART_30,
+ ACTION_PART_31,
+ ACTION_PART_32,
+ ACTION_OTHER,
+
+ NUM_ACTIONS
+};
#define ACTION_BORING_LAST ACTION_BORING_10
#define ACTION_SLEEPING_LAST ACTION_SLEEPING_3
-/* values for special image configuration suffixes (must match game mode) */
-#define GFX_SPECIAL_ARG_DEFAULT 0
-#define GFX_SPECIAL_ARG_LOADING 1
-#define GFX_SPECIAL_ARG_TITLE_INITIAL 2
-#define GFX_SPECIAL_ARG_TITLE_INITIAL_1 3
-#define GFX_SPECIAL_ARG_TITLE_INITIAL_2 4
-#define GFX_SPECIAL_ARG_TITLE_INITIAL_3 5
-#define GFX_SPECIAL_ARG_TITLE_INITIAL_4 6
-#define GFX_SPECIAL_ARG_TITLE_INITIAL_5 7
-#define GFX_SPECIAL_ARG_TITLE 8
-#define GFX_SPECIAL_ARG_TITLE_1 9
-#define GFX_SPECIAL_ARG_TITLE_2 10
-#define GFX_SPECIAL_ARG_TITLE_3 11
-#define GFX_SPECIAL_ARG_TITLE_4 12
-#define GFX_SPECIAL_ARG_TITLE_5 13
-#define GFX_SPECIAL_ARG_MAIN 14
-#define GFX_SPECIAL_ARG_LEVELS 15
-#define GFX_SPECIAL_ARG_LEVELNR 16
-#define GFX_SPECIAL_ARG_SCORES 17
-#define GFX_SPECIAL_ARG_EDITOR 18
-#define GFX_SPECIAL_ARG_INFO 19
-#define GFX_SPECIAL_ARG_SETUP 20
-#define GFX_SPECIAL_ARG_PLAYING 21
-#define GFX_SPECIAL_ARG_DOOR 22
-#define GFX_SPECIAL_ARG_TAPE 23
-#define GFX_SPECIAL_ARG_PANEL 24
-#define GFX_SPECIAL_ARG_PREVIEW 25
-#define GFX_SPECIAL_ARG_CRUMBLED 26
-#define GFX_SPECIAL_ARG_MAINONLY 27
-#define GFX_SPECIAL_ARG_TYPENAME 28
-#define GFX_SPECIAL_ARG_SUBMENU 29
-#define GFX_SPECIAL_ARG_MENU 30
-#define GFX_SPECIAL_ARG_TOONS 31
-#define GFX_SPECIAL_ARG_SCORESOLD 32
-#define GFX_SPECIAL_ARG_SCORESNEW 33
-#define GFX_SPECIAL_ARG_FADING 34
-#define GFX_SPECIAL_ARG_QUIT 35
-
-#define NUM_SPECIAL_GFX_ARGS 36
-
-/* these additional definitions are currently only used for draw offsets */
-#define GFX_SPECIAL_ARG_INFO_MAIN 0
-#define GFX_SPECIAL_ARG_INFO_TITLE 1
-#define GFX_SPECIAL_ARG_INFO_ELEMENTS 2
-#define GFX_SPECIAL_ARG_INFO_MUSIC 3
-#define GFX_SPECIAL_ARG_INFO_CREDITS 4
-#define GFX_SPECIAL_ARG_INFO_PROGRAM 5
-#define GFX_SPECIAL_ARG_INFO_VERSION 6
-#define GFX_SPECIAL_ARG_INFO_LEVELSET 7
-
-#define NUM_SPECIAL_GFX_INFO_ARGS 8
-
-/* these additional definitions are currently only used for draw offsets */
-/* (must match SETUP_MODE_* values as defined in src/screens.c) */
-/* (should also match corresponding entries in src/conf_gfx.c) */
-#define GFX_SPECIAL_ARG_SETUP_MAIN 0
-#define GFX_SPECIAL_ARG_SETUP_GAME 1
-#define GFX_SPECIAL_ARG_SETUP_EDITOR 2
-#define GFX_SPECIAL_ARG_SETUP_GRAPHICS 3
-#define GFX_SPECIAL_ARG_SETUP_SOUND 4
-#define GFX_SPECIAL_ARG_SETUP_ARTWORK 5
-#define GFX_SPECIAL_ARG_SETUP_INPUT 6
-#define GFX_SPECIAL_ARG_SETUP_TOUCH 7
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS 8
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_1 9
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_2 10
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_3 11
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_4 12
-#define GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5 13
-#define GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK 14
-#define GFX_SPECIAL_ARG_SETUP_CHOOSE_OTHER 15
-
-#define NUM_SPECIAL_GFX_SETUP_ARGS 16
-
-
-/* values for image configuration suffixes */
-#define GFX_ARG_X 0
-#define GFX_ARG_Y 1
-#define GFX_ARG_XPOS 2
-#define GFX_ARG_YPOS 3
-#define GFX_ARG_WIDTH 4
-#define GFX_ARG_HEIGHT 5
-#define GFX_ARG_VERTICAL 6
-#define GFX_ARG_OFFSET 7
-#define GFX_ARG_XOFFSET 8
-#define GFX_ARG_YOFFSET 9
-#define GFX_ARG_2ND_MOVEMENT_TILE 10
-#define GFX_ARG_2ND_VERTICAL 11
-#define GFX_ARG_2ND_OFFSET 12
-#define GFX_ARG_2ND_XOFFSET 13
-#define GFX_ARG_2ND_YOFFSET 14
-#define GFX_ARG_2ND_SWAP_TILES 15
-#define GFX_ARG_FRAMES 16
-#define GFX_ARG_FRAMES_PER_LINE 17
-#define GFX_ARG_START_FRAME 18
-#define GFX_ARG_DELAY 19
-#define GFX_ARG_ANIM_MODE 20
-#define GFX_ARG_GLOBAL_SYNC 21
-#define GFX_ARG_CRUMBLED_LIKE 22
-#define GFX_ARG_DIGGABLE_LIKE 23
-#define GFX_ARG_BORDER_SIZE 24
-#define GFX_ARG_STEP_OFFSET 25
-#define GFX_ARG_STEP_XOFFSET 26
-#define GFX_ARG_STEP_YOFFSET 27
-#define GFX_ARG_STEP_DELAY 28
-#define GFX_ARG_DIRECTION 29
-#define GFX_ARG_POSITION 30
-#define GFX_ARG_DRAW_XOFFSET 31
-#define GFX_ARG_DRAW_YOFFSET 32
-#define GFX_ARG_DRAW_MASKED 33
-#define GFX_ARG_DRAW_ORDER 34
-#define GFX_ARG_INIT_DELAY_FIXED 35
-#define GFX_ARG_INIT_DELAY_RANDOM 36
-#define GFX_ARG_ANIM_DELAY_FIXED 37
-#define GFX_ARG_ANIM_DELAY_RANDOM 38
-#define GFX_ARG_POST_DELAY_FIXED 39
-#define GFX_ARG_POST_DELAY_RANDOM 40
-#define GFX_ARG_INIT_EVENT 41
-#define GFX_ARG_INIT_EVENT_ACTION 42
-#define GFX_ARG_ANIM_EVENT 43
-#define GFX_ARG_ANIM_EVENT_ACTION 44
-#define GFX_ARG_NAME 45
-#define GFX_ARG_SCALE_UP_FACTOR 46
-#define GFX_ARG_TILE_SIZE 47
-#define GFX_ARG_CLONE_FROM 48
-#define GFX_ARG_FADE_MODE 49
-#define GFX_ARG_FADE_DELAY 50
-#define GFX_ARG_POST_DELAY 51
-#define GFX_ARG_AUTO_DELAY 52
-#define GFX_ARG_ALIGN 53
-#define GFX_ARG_VALIGN 54
-#define GFX_ARG_SORT_PRIORITY 55
-#define GFX_ARG_CLASS 56
-#define GFX_ARG_STYLE 57
-#define GFX_ARG_ACTIVE_XOFFSET 58
-#define GFX_ARG_ACTIVE_YOFFSET 59
-#define GFX_ARG_PRESSED_XOFFSET 60
-#define GFX_ARG_PRESSED_YOFFSET 61
-
-#define NUM_GFX_ARGS 62
-
-
-/* values for sound configuration suffixes */
-#define SND_ARG_MODE_LOOP 0
-#define SND_ARG_VOLUME 1
-#define SND_ARG_PRIORITY 2
-
-#define NUM_SND_ARGS 3
-
-
-/* values for music configuration suffixes */
-#define MUS_ARG_MODE_LOOP 0
-
-#define NUM_MUS_ARGS 1
-
-
-/* values for font configuration (definitions must match those from main.c) */
-#define FONT_INITIAL_1 0
-#define FONT_INITIAL_2 1
-#define FONT_INITIAL_3 2
-#define FONT_INITIAL_4 3
-#define FONT_TITLE_1 4
-#define FONT_TITLE_2 5
-#define FONT_MENU_1_ACTIVE 6
-#define FONT_MENU_2_ACTIVE 7
-#define FONT_MENU_1 8
-#define FONT_MENU_2 9
-#define FONT_TEXT_1_ACTIVE 10
-#define FONT_TEXT_2_ACTIVE 11
-#define FONT_TEXT_3_ACTIVE 12
-#define FONT_TEXT_4_ACTIVE 13
-#define FONT_TEXT_1 14
-#define FONT_TEXT_2 15
-#define FONT_TEXT_3 16
-#define FONT_TEXT_4 17
-#define FONT_ENVELOPE_1 18
-#define FONT_ENVELOPE_2 19
-#define FONT_ENVELOPE_3 20
-#define FONT_ENVELOPE_4 21
-#define FONT_REQUEST 22
-#define FONT_INPUT_1_ACTIVE 23
-#define FONT_INPUT_2_ACTIVE 24
-#define FONT_INPUT_1 25
-#define FONT_INPUT_2 26
-#define FONT_OPTION_OFF_NARROW 27
-#define FONT_OPTION_OFF 28
-#define FONT_OPTION_ON_NARROW 29
-#define FONT_OPTION_ON 30
-#define FONT_VALUE_1 31
-#define FONT_VALUE_2 32
-#define FONT_VALUE_OLD_NARROW 33
-#define FONT_VALUE_OLD 34
-#define FONT_VALUE_NARROW 35
-#define FONT_LEVEL_NUMBER_ACTIVE 36
-#define FONT_LEVEL_NUMBER 37
-#define FONT_TAPE_RECORDER 38
-#define FONT_GAME_INFO 39
-#define FONT_INFO_ELEMENTS 40
-#define FONT_INFO_LEVELSET 41
-#define FONT_MAIN_NETWORK_PLAYERS 42
-
-#define NUM_FONTS 43
+// values for special image configuration suffixes (must match game mode)
+enum
+{
+ GFX_SPECIAL_ARG_DEFAULT = 0,
+ GFX_SPECIAL_ARG_LOADING,
+ GFX_SPECIAL_ARG_TITLE_INITIAL,
+ GFX_SPECIAL_ARG_TITLE_INITIAL_1,
+ GFX_SPECIAL_ARG_TITLE_INITIAL_2,
+ GFX_SPECIAL_ARG_TITLE_INITIAL_3,
+ GFX_SPECIAL_ARG_TITLE_INITIAL_4,
+ GFX_SPECIAL_ARG_TITLE_INITIAL_5,
+ GFX_SPECIAL_ARG_TITLE,
+ GFX_SPECIAL_ARG_TITLE_1,
+ GFX_SPECIAL_ARG_TITLE_2,
+ GFX_SPECIAL_ARG_TITLE_3,
+ GFX_SPECIAL_ARG_TITLE_4,
+ GFX_SPECIAL_ARG_TITLE_5,
+ GFX_SPECIAL_ARG_MAIN,
+ GFX_SPECIAL_ARG_NAMES,
+ GFX_SPECIAL_ARG_LEVELS,
+ GFX_SPECIAL_ARG_LEVELNR,
+ GFX_SPECIAL_ARG_SCORES,
+ GFX_SPECIAL_ARG_EDITOR,
+ GFX_SPECIAL_ARG_INFO,
+ GFX_SPECIAL_ARG_SETUP,
+ GFX_SPECIAL_ARG_PLAYING,
+ GFX_SPECIAL_ARG_DOOR,
+ GFX_SPECIAL_ARG_TAPE,
+ GFX_SPECIAL_ARG_PANEL,
+ GFX_SPECIAL_ARG_PREVIEW,
+ GFX_SPECIAL_ARG_CRUMBLED,
+ GFX_SPECIAL_ARG_MAINONLY,
+ GFX_SPECIAL_ARG_NAMESONLY,
+ GFX_SPECIAL_ARG_TYPENAME,
+ GFX_SPECIAL_ARG_TYPENAMES,
+ GFX_SPECIAL_ARG_SUBMENU,
+ GFX_SPECIAL_ARG_MENU,
+ GFX_SPECIAL_ARG_TOONS,
+ GFX_SPECIAL_ARG_SCORESOLD,
+ GFX_SPECIAL_ARG_SCORESNEW,
+ GFX_SPECIAL_ARG_NO_TITLE,
+ GFX_SPECIAL_ARG_FADING,
+ GFX_SPECIAL_ARG_QUIT,
+
+ NUM_SPECIAL_GFX_ARGS
+};
+
+// these additional definitions are currently only used for draw offsets
+enum
+{
+ GFX_SPECIAL_ARG_INFO_MAIN = 0,
+ GFX_SPECIAL_ARG_INFO_TITLE,
+ GFX_SPECIAL_ARG_INFO_ELEMENTS,
+ GFX_SPECIAL_ARG_INFO_MUSIC,
+ GFX_SPECIAL_ARG_INFO_CREDITS,
+ GFX_SPECIAL_ARG_INFO_PROGRAM,
+ GFX_SPECIAL_ARG_INFO_VERSION,
+ GFX_SPECIAL_ARG_INFO_LEVELSET,
+
+ NUM_SPECIAL_GFX_INFO_ARGS
+};
+
+// these additional definitions are currently only used for draw offsets
+// (must match SETUP_MODE_* values as defined in src/screens.c)
+// (should also match corresponding entries in src/conf_gfx.c)
+enum
+{
+ GFX_SPECIAL_ARG_SETUP_MAIN = 0,
+ GFX_SPECIAL_ARG_SETUP_GAME,
+ GFX_SPECIAL_ARG_SETUP_ENGINES,
+ GFX_SPECIAL_ARG_SETUP_EDITOR,
+ GFX_SPECIAL_ARG_SETUP_GRAPHICS,
+ GFX_SPECIAL_ARG_SETUP_SOUND,
+ GFX_SPECIAL_ARG_SETUP_ARTWORK,
+ GFX_SPECIAL_ARG_SETUP_INPUT,
+ GFX_SPECIAL_ARG_SETUP_TOUCH,
+ GFX_SPECIAL_ARG_SETUP_SHORTCUTS,
+ GFX_SPECIAL_ARG_SETUP_SHORTCUTS_1,
+ GFX_SPECIAL_ARG_SETUP_SHORTCUTS_2,
+ GFX_SPECIAL_ARG_SETUP_SHORTCUTS_3,
+ GFX_SPECIAL_ARG_SETUP_SHORTCUTS_4,
+ GFX_SPECIAL_ARG_SETUP_SHORTCUTS_5,
+ GFX_SPECIAL_ARG_SETUP_CHOOSE_ARTWORK,
+ GFX_SPECIAL_ARG_SETUP_CHOOSE_OTHER,
+
+ NUM_SPECIAL_GFX_SETUP_ARGS
+};
+
+// values for image configuration suffixes
+enum
+{
+ GFX_ARG_X = 0,
+ GFX_ARG_Y,
+ GFX_ARG_XPOS,
+ GFX_ARG_YPOS,
+ GFX_ARG_WIDTH,
+ GFX_ARG_HEIGHT,
+ GFX_ARG_VERTICAL,
+ GFX_ARG_OFFSET,
+ GFX_ARG_XOFFSET,
+ GFX_ARG_YOFFSET,
+ GFX_ARG_2ND_MOVEMENT_TILE,
+ GFX_ARG_2ND_VERTICAL,
+ GFX_ARG_2ND_OFFSET,
+ GFX_ARG_2ND_XOFFSET,
+ GFX_ARG_2ND_YOFFSET,
+ GFX_ARG_2ND_SWAP_TILES,
+ GFX_ARG_FRAMES,
+ GFX_ARG_FRAMES_PER_LINE,
+ GFX_ARG_START_FRAME,
+ GFX_ARG_DELAY,
+ GFX_ARG_ANIM_MODE,
+ GFX_ARG_GLOBAL_SYNC,
+ GFX_ARG_CRUMBLED_LIKE,
+ GFX_ARG_DIGGABLE_LIKE,
+ GFX_ARG_BORDER_SIZE,
+ GFX_ARG_STEP_OFFSET,
+ GFX_ARG_STEP_XOFFSET,
+ GFX_ARG_STEP_YOFFSET,
+ GFX_ARG_STEP_DELAY,
+ GFX_ARG_DIRECTION,
+ GFX_ARG_POSITION,
+ GFX_ARG_DRAW_XOFFSET,
+ GFX_ARG_DRAW_YOFFSET,
+ GFX_ARG_DRAW_MASKED,
+ GFX_ARG_DRAW_ORDER,
+ GFX_ARG_INIT_DELAY_FIXED,
+ GFX_ARG_INIT_DELAY_RANDOM,
+ GFX_ARG_INIT_DELAY_ACTION,
+ GFX_ARG_ANIM_DELAY_FIXED,
+ GFX_ARG_ANIM_DELAY_RANDOM,
+ GFX_ARG_ANIM_DELAY_ACTION,
+ GFX_ARG_POST_DELAY_FIXED,
+ GFX_ARG_POST_DELAY_RANDOM,
+ GFX_ARG_POST_DELAY_ACTION,
+ GFX_ARG_INIT_EVENT,
+ GFX_ARG_INIT_EVENT_ACTION,
+ GFX_ARG_ANIM_EVENT,
+ GFX_ARG_ANIM_EVENT_ACTION,
+ GFX_ARG_NAME,
+ GFX_ARG_SCALE_UP_FACTOR,
+ GFX_ARG_TILE_SIZE,
+ GFX_ARG_CLONE_FROM,
+ GFX_ARG_FADE_MODE,
+ GFX_ARG_FADE_DELAY,
+ GFX_ARG_POST_DELAY,
+ GFX_ARG_AUTO_DELAY,
+ GFX_ARG_AUTO_DELAY_UNIT,
+ GFX_ARG_ALIGN,
+ GFX_ARG_VALIGN,
+ GFX_ARG_SORT_PRIORITY,
+ GFX_ARG_CLASS,
+ GFX_ARG_STYLE,
+ GFX_ARG_ACTIVE_XOFFSET,
+ GFX_ARG_ACTIVE_YOFFSET,
+ GFX_ARG_PRESSED_XOFFSET,
+ GFX_ARG_PRESSED_YOFFSET,
+
+ NUM_GFX_ARGS
+};
+
+// values for sound configuration suffixes
+enum
+{
+ SND_ARG_MODE_LOOP = 0,
+ SND_ARG_VOLUME,
+ SND_ARG_PRIORITY,
+
+ NUM_SND_ARGS
+};
+
+// values for music configuration suffixes
+enum
+{
+ MUS_ARG_MODE_LOOP = 0,
+
+ NUM_MUS_ARGS
+};
+
+// values for font configuration (definitions must match those from main.c)
+enum
+{
+ FONT_INITIAL_1 = MAIN_FONT_INITIAL_1,
+ FONT_INITIAL_2 = MAIN_FONT_INITIAL_2,
+ FONT_INITIAL_3 = MAIN_FONT_INITIAL_3,
+ FONT_INITIAL_4 = MAIN_FONT_INITIAL_4,
+ FONT_TITLE_1,
+ FONT_TITLE_2,
+ FONT_MENU_1_ACTIVE,
+ FONT_MENU_2_ACTIVE,
+ FONT_MENU_1,
+ FONT_MENU_2,
+ FONT_TEXT_1_ACTIVE,
+ FONT_TEXT_2_ACTIVE,
+ FONT_TEXT_3_ACTIVE,
+ FONT_TEXT_4_ACTIVE,
+ FONT_TEXT_1,
+ FONT_TEXT_2,
+ FONT_TEXT_3,
+ FONT_TEXT_4,
+ FONT_ENVELOPE_1,
+ FONT_ENVELOPE_2,
+ FONT_ENVELOPE_3,
+ FONT_ENVELOPE_4,
+ FONT_REQUEST,
+ FONT_INPUT_1_ACTIVE,
+ FONT_INPUT_2_ACTIVE,
+ FONT_INPUT_1,
+ FONT_INPUT_2,
+ FONT_OPTION_OFF_NARROW,
+ FONT_OPTION_OFF,
+ FONT_OPTION_ON_NARROW,
+ FONT_OPTION_ON,
+ FONT_VALUE_1,
+ FONT_VALUE_2,
+ FONT_VALUE_OLD_NARROW,
+ FONT_VALUE_OLD,
+ FONT_VALUE_NARROW,
+ FONT_LEVEL_NUMBER_ACTIVE,
+ FONT_LEVEL_NUMBER,
+ FONT_TAPE_RECORDER,
+ FONT_GAME_INFO,
+ FONT_INFO_ELEMENTS,
+ FONT_INFO_LEVELSET,
+ FONT_MAIN_NETWORK_PLAYERS,
+
+ NUM_FONTS
+};
+
#define NUM_INITIAL_FONTS 4
-/* values for toon animation configuration */
+// values for toon animation configuration
#define MAX_NUM_TOONS 20
-/* values for global animation configuration (must match those from main.c) */
+// values for global animation configuration (must match those from main.c)
#define NUM_GLOBAL_ANIMS MAX_GLOBAL_ANIMS
#define NUM_GLOBAL_ANIM_PARTS MAX_GLOBAL_ANIM_PARTS
#define NUM_GLOBAL_ANIM_PARTS_ALL (NUM_GLOBAL_ANIM_PARTS + 1)
#define GLOBAL_ANIM_ID_PART_LAST (NUM_GLOBAL_ANIM_PARTS - 1)
#define GLOBAL_ANIM_ID_PART_BASE (NUM_GLOBAL_ANIM_PARTS)
-/* values for global border graphics */
+// values for global border graphics
#define IMG_GLOBAL_BORDER_FIRST IMG_GLOBAL_BORDER
#define IMG_GLOBAL_BORDER_LAST IMG_GLOBAL_BORDER_PLAYING
-/* values for game_status (must match special image configuration suffixes) */
-#define GAME_MODE_DEFAULT 0
-#define GAME_MODE_LOADING 1
-#define GAME_MODE_TITLE_INITIAL 2
-#define GAME_MODE_TITLE_INITIAL_1 3
-#define GAME_MODE_TITLE_INITIAL_2 4
-#define GAME_MODE_TITLE_INITIAL_3 5
-#define GAME_MODE_TITLE_INITIAL_4 6
-#define GAME_MODE_TITLE_INITIAL_5 7
-#define GAME_MODE_TITLE 8
-#define GAME_MODE_TITLE_1 9
-#define GAME_MODE_TITLE_2 10
-#define GAME_MODE_TITLE_3 11
-#define GAME_MODE_TITLE_4 12
-#define GAME_MODE_TITLE_5 13
-#define GAME_MODE_MAIN 14
-#define GAME_MODE_LEVELS 15
-#define GAME_MODE_LEVELNR 16
-#define GAME_MODE_SCORES 17
-#define GAME_MODE_EDITOR 18
-#define GAME_MODE_INFO 19
-#define GAME_MODE_SETUP 20
-#define GAME_MODE_PLAYING 21
-#define GAME_MODE_PSEUDO_DOOR 22
-#define GAME_MODE_PSEUDO_TAPE 23
-#define GAME_MODE_PSEUDO_PANEL 24
-#define GAME_MODE_PSEUDO_PREVIEW 25
-#define GAME_MODE_PSEUDO_CRUMBLED 26
-#define GAME_MODE_PSEUDO_MAINONLY 27
-#define GAME_MODE_PSEUDO_TYPENAME 28
-#define GAME_MODE_PSEUDO_SUBMENU 29
-#define GAME_MODE_PSEUDO_MENU 30
-#define GAME_MODE_PSEUDO_TOONS 31
-#define GAME_MODE_PSEUDO_SCORESOLD 32
-#define GAME_MODE_PSEUDO_SCORESNEW 33
-#define GAME_MODE_PSEUDO_FADING 34
-#define GAME_MODE_QUIT 35
-
-#define NUM_GAME_MODES 36
-
-/* special definitions currently only used for custom artwork configuration */
+// values for game_status (must match special image configuration suffixes)
+#define GAME_MODE_DEFAULT GFX_SPECIAL_ARG_DEFAULT
+#define GAME_MODE_LOADING GFX_SPECIAL_ARG_LOADING
+#define GAME_MODE_TITLE_INITIAL GFX_SPECIAL_ARG_TITLE_INITIAL
+#define GAME_MODE_TITLE_INITIAL_1 GFX_SPECIAL_ARG_TITLE_INITIAL_1
+#define GAME_MODE_TITLE_INITIAL_2 GFX_SPECIAL_ARG_TITLE_INITIAL_2
+#define GAME_MODE_TITLE_INITIAL_3 GFX_SPECIAL_ARG_TITLE_INITIAL_3
+#define GAME_MODE_TITLE_INITIAL_4 GFX_SPECIAL_ARG_TITLE_INITIAL_4
+#define GAME_MODE_TITLE_INITIAL_5 GFX_SPECIAL_ARG_TITLE_INITIAL_5
+#define GAME_MODE_TITLE GFX_SPECIAL_ARG_TITLE
+#define GAME_MODE_TITLE_1 GFX_SPECIAL_ARG_TITLE_1
+#define GAME_MODE_TITLE_2 GFX_SPECIAL_ARG_TITLE_2
+#define GAME_MODE_TITLE_3 GFX_SPECIAL_ARG_TITLE_3
+#define GAME_MODE_TITLE_4 GFX_SPECIAL_ARG_TITLE_4
+#define GAME_MODE_TITLE_5 GFX_SPECIAL_ARG_TITLE_5
+#define GAME_MODE_MAIN GFX_SPECIAL_ARG_MAIN
+#define GAME_MODE_NAMES GFX_SPECIAL_ARG_NAMES
+#define GAME_MODE_LEVELS GFX_SPECIAL_ARG_LEVELS
+#define GAME_MODE_LEVELNR GFX_SPECIAL_ARG_LEVELNR
+#define GAME_MODE_SCORES GFX_SPECIAL_ARG_SCORES
+#define GAME_MODE_EDITOR GFX_SPECIAL_ARG_EDITOR
+#define GAME_MODE_INFO GFX_SPECIAL_ARG_INFO
+#define GAME_MODE_SETUP GFX_SPECIAL_ARG_SETUP
+#define GAME_MODE_PLAYING GFX_SPECIAL_ARG_PLAYING
+#define GAME_MODE_PSEUDO_DOOR GFX_SPECIAL_ARG_DOOR
+#define GAME_MODE_PSEUDO_TAPE GFX_SPECIAL_ARG_TAPE
+#define GAME_MODE_PSEUDO_PANEL GFX_SPECIAL_ARG_PANEL
+#define GAME_MODE_PSEUDO_PREVIEW GFX_SPECIAL_ARG_PREVIEW
+#define GAME_MODE_PSEUDO_CRUMBLED GFX_SPECIAL_ARG_CRUMBLED
+#define GAME_MODE_PSEUDO_MAINONLY GFX_SPECIAL_ARG_MAINONLY
+#define GAME_MODE_PSEUDO_NAMESONLY GFX_SPECIAL_ARG_NAMESONLY
+#define GAME_MODE_PSEUDO_TYPENAME GFX_SPECIAL_ARG_TYPENAME
+#define GAME_MODE_PSEUDO_TYPENAMES GFX_SPECIAL_ARG_TYPENAMES
+#define GAME_MODE_PSEUDO_SUBMENU GFX_SPECIAL_ARG_SUBMENU
+#define GAME_MODE_PSEUDO_MENU GFX_SPECIAL_ARG_MENU
+#define GAME_MODE_PSEUDO_TOONS GFX_SPECIAL_ARG_TOONS
+#define GAME_MODE_PSEUDO_SCORESOLD GFX_SPECIAL_ARG_SCORESOLD
+#define GAME_MODE_PSEUDO_SCORESNEW GFX_SPECIAL_ARG_SCORESNEW
+#define GAME_MODE_PSEUDO_NO_TITLE GFX_SPECIAL_ARG_NO_TITLE
+#define GAME_MODE_PSEUDO_FADING GFX_SPECIAL_ARG_FADING
+#define GAME_MODE_QUIT GFX_SPECIAL_ARG_QUIT
+
+#define NUM_GAME_MODES NUM_SPECIAL_GFX_ARGS
+
+// special definitions currently only used for custom artwork configuration
#define MUSIC_PREFIX_BACKGROUND 0
#define NUM_MUSIC_PREFIXES 1
-/* definitions for demo animation lists */
+// definitions for demo animation lists
#define HELPANIM_LIST_NEXT -1
#define HELPANIM_LIST_END -999
-/* program information and versioning definitions */
+// program information and versioning definitions
#define PROGRAM_VERSION_SUPER 4
-#define PROGRAM_VERSION_MAJOR 1
-#define PROGRAM_VERSION_MINOR 1
-#define PROGRAM_VERSION_PATCH 1
+#define PROGRAM_VERSION_MAJOR 2
+#define PROGRAM_VERSION_MINOR 3
+#define PROGRAM_VERSION_PATCH 2
#define PROGRAM_VERSION_EXTRA ""
#define PROGRAM_TITLE_STRING "Rocks'n'Diamonds"
#define PROGRAM_AUTHOR_STRING "Holger Schemel"
#define PROGRAM_EMAIL_STRING "info@artsoft.org"
-#define PROGRAM_WEBSITE_STRING "http://www.artsoft.org/"
-#define PROGRAM_COPYRIGHT_STRING "Copyright \xa9""1995-2018 by Holger Schemel"
+#define PROGRAM_WEBSITE_STRING "https://www.artsoft.org/"
+#define PROGRAM_COPYRIGHT_STRING "Copyright \xa9""1995-2021 by Holger Schemel"
#define PROGRAM_COMPANY_STRING "A Game by Artsoft Entertainment"
#define PROGRAM_ICON_FILENAME "RocksIcon32x32.png"
PROGRAM_VERSION_MINOR, \
PROGRAM_VERSION_PATCH)
-/* values for game_emulation */
+// values for game_emulation
#define EMU_NONE 0
#define EMU_BOULDERDASH 1
-#define EMU_SOKOBAN 2
+#define EMU_UNUSED_2 2
#define EMU_SUPAPLEX 3
-/* values for level file type identifier */
+// values for level file type identifier
#define LEVEL_FILE_TYPE_UNKNOWN 0
#define LEVEL_FILE_TYPE_RND 1
#define LEVEL_FILE_TYPE_BD 2
#define NUM_LEVEL_FILE_TYPES 9
-/* values for game engine type identifier */
+// values for game engine type identifier
#define GAME_ENGINE_TYPE_UNKNOWN LEVEL_FILE_TYPE_UNKNOWN
#define GAME_ENGINE_TYPE_RND LEVEL_FILE_TYPE_RND
#define GAME_ENGINE_TYPE_EM LEVEL_FILE_TYPE_EM
#define NUM_ENGINE_TYPES 4
-/* values for automatically playing tapes */
+// values for automatically playing tapes
#define AUTOPLAY_NONE 0
#define AUTOPLAY_PLAY (1 << 0)
#define AUTOPLAY_FFWD (1 << 1)
#define AUTOPLAY_WARP (1 << 2)
#define AUTOPLAY_TEST (1 << 3)
+#define AUTOPLAY_SAVE (1 << 4)
+#define AUTOPLAY_FIX (1 << 5)
#define AUTOPLAY_WARP_NO_DISPLAY AUTOPLAY_TEST
#define AUTOPLAY_MODE_NONE 0
#define AUTOPLAY_MODE_FFWD (AUTOPLAY_MODE_PLAY | AUTOPLAY_FFWD)
#define AUTOPLAY_MODE_WARP (AUTOPLAY_MODE_FFWD | AUTOPLAY_WARP)
#define AUTOPLAY_MODE_TEST (AUTOPLAY_MODE_WARP | AUTOPLAY_TEST)
+#define AUTOPLAY_MODE_SAVE (AUTOPLAY_MODE_TEST | AUTOPLAY_SAVE)
+#define AUTOPLAY_MODE_FIX (AUTOPLAY_MODE_TEST | AUTOPLAY_FIX)
#define AUTOPLAY_MODE_WARP_NO_DISPLAY AUTOPLAY_MODE_TEST
struct TextPosInfo yes;
struct TextPosInfo no;
struct TextPosInfo confirm;
+
struct TextPosInfo player_1;
struct TextPosInfo player_2;
struct TextPosInfo player_3;
struct TextPosInfo player_4;
+
+ struct TextPosInfo touch_yes;
+ struct TextPosInfo touch_no;
+ struct TextPosInfo touch_confirm;
};
struct MenuMainButtonInfo
struct MenuPosInfo insert_solution;
struct MenuPosInfo play_solution;
+
+ struct MenuPosInfo switch_ecs_aga;
};
struct MenuMainTextInfo
struct TextPosInfo network_players;
};
+struct MenuSetupButtonInfo
+{
+ struct MenuPosInfo prev_player;
+ struct MenuPosInfo next_player;
+
+ struct MenuPosInfo touch_back;
+ struct MenuPosInfo touch_next;
+ struct MenuPosInfo touch_back2;
+ struct MenuPosInfo touch_next2;
+};
+
+struct MenuSetupInfo
+{
+ struct MenuSetupButtonInfo button;
+};
+
struct TitleFadingInfo
{
int fade_mode;
int fade_delay;
int post_delay;
int auto_delay;
+ int auto_delay_unit;
};
struct TitleMessageInfo
int fade_delay;
int post_delay;
int auto_delay;
+ int auto_delay_unit;
};
struct InitInfo
int scrollbar_xoffset;
+ struct MenuPosInfo list_setup[NUM_SPECIAL_GFX_SETUP_ARGS];
+
int list_size[NUM_SPECIAL_GFX_ARGS];
int list_size_info[NUM_SPECIAL_GFX_INFO_ARGS];
int music[NUM_SPECIAL_GFX_ARGS];
struct MenuMainInfo main;
+ struct MenuSetupInfo setup;
};
struct DoorInfo
int anim_mode;
int align;
int valign;
+ int sort_priority;
boolean autowrap;
boolean centered;
boolean wrap_single_words;
+
+ // run-time values
+ Bitmap *bitmap;
+ int sx, sy;
+ int xsize, ysize;
};
struct PreviewInfo
int step_offset;
int step_delay;
int anim_mode;
+
+ boolean redefined; // redefined by custom artwork
};
struct EditorTabsInfo
struct RectWithBorder door_2[NUM_SPECIAL_GFX_ARGS];
};
-struct HiScore
+struct ScoreEntry
+{
+ char tape_basename[MAX_FILENAME_LEN + 1];
+ char name[MAX_PLAYER_NAME_LEN + 1];
+ int score;
+ int time; // time (in frames) or steps played
+};
+
+struct ScoreInfo
{
- char Name[MAX_PLAYER_NAME_LEN + 1];
- int Score;
+ int file_version; // file format version the score is stored with
+ int game_version; // game release version the score was created with
+
+ char level_identifier[MAX_FILENAME_LEN + 1];
+ int level_nr;
+
+ int num_entries;
+ int last_added;
+ int last_added_local;
+
+ boolean updated;
+ boolean uploaded;
+ boolean force_last_added;
+
+ struct ScoreEntry entry[MAX_SCORE_ENTRIES];
};
struct Content
int game_engine_type;
- /* level stored in native format for the alternative native game engines */
+ // level stored in native format for the alternative native game engines
struct LevelInfo_EM *native_em_level;
struct LevelInfo_SP *native_sp_level;
struct LevelInfo_MM *native_mm_level;
- int file_version; /* file format version the level is stored with */
- int game_version; /* game release version the level was created with */
+ int file_version; // file format version the level is stored with
+ int game_version; // game release version the level was created with
struct DateInfo creation_date;
- boolean encoding_16bit_field; /* level contains 16-bit elements */
- boolean encoding_16bit_yamyam; /* yamyam contains 16-bit elements */
- boolean encoding_16bit_amoeba; /* amoeba contains 16-bit elements */
+ boolean encoding_16bit_field; // level contains 16-bit elements
+ boolean encoding_16bit_yamyam; // yamyam contains 16-bit elements
+ boolean encoding_16bit_amoeba; // amoeba contains 16-bit elements
int fieldx, fieldy;
- int time; /* available time (seconds) */
+ int time; // available time (seconds)
int gems_needed;
boolean auto_count_gems;
+ boolean rate_time_over_score;
char name[MAX_LEVEL_NAME_LEN + 1];
char author[MAX_LEVEL_AUTHOR_LEN + 1];
int explosion_element[MAX_PLAYERS];
boolean use_explosion_element[MAX_PLAYERS];
- /* values for the new EMC elements */
+ // values for the new EMC elements
int android_move_time;
int android_clone_time;
boolean ball_random;
- boolean ball_state_initial;
+ boolean ball_active_initial;
int ball_time;
int lenses_score;
int magnify_score;
int num_android_clone_elements;
int android_clone_element[MAX_ANDROID_ELEMENTS];
- int can_move_into_acid_bits; /* bitfield to store property for elements */
- int dont_collide_with_bits; /* bitfield to store property for elements */
+ int can_move_into_acid_bits; // bitfield to store property for elements
+ int dont_collide_with_bits; // bitfield to store property for elements
- int initial_player_stepsize[MAX_PLAYERS]; /* initial player speed */
+ int initial_player_stepsize[MAX_PLAYERS]; // initial player speed
boolean initial_player_gravity[MAX_PLAYERS];
boolean use_initial_inventory[MAX_PLAYERS];
int initial_inventory_size[MAX_PLAYERS];
int initial_inventory_content[MAX_PLAYERS][MAX_INITIAL_INVENTORY_SIZE];
- boolean em_slippery_gems; /* EM style "gems slip from wall" behaviour */
- boolean em_explodes_by_fire; /* EM style chain explosion behaviour */
- boolean use_spring_bug; /* for compatibility with old levels */
- boolean use_time_orb_bug; /* for compatibility with old levels */
- boolean instant_relocation; /* no visual delay when relocating player */
- boolean shifted_relocation; /* no level centering when relocating player */
- boolean lazy_relocation; /* only redraw off-screen player relocation */
- boolean can_pass_to_walkable; /* player can pass to empty or walkable tile */
- boolean grow_into_diggable; /* amoeba can grow into anything diggable */
- boolean auto_exit_sokoban; /* automatically finish solved Sokoban levels */
- boolean solved_by_one_player; /* level is solved if one player enters exit */
-
- boolean continuous_snapping; /* repeated snapping without releasing key */
- boolean block_snap_field; /* snapping blocks field to show animation */
- boolean block_last_field; /* player blocks previous field while moving */
- boolean sp_block_last_field; /* player blocks previous field while moving */
-
- /* values for MM/DF elements */
+ boolean em_slippery_gems; // EM style "gems slip from wall" behaviour
+ boolean em_explodes_by_fire; // EM style chain explosion behaviour
+ boolean use_spring_bug; // for compatibility with old levels
+ boolean use_time_orb_bug; // for compatibility with old levels
+ boolean use_life_bugs; // for compatibility with old levels
+ boolean instant_relocation; // no visual delay when relocating player
+ boolean shifted_relocation; // no level centering when relocating player
+ boolean lazy_relocation; // only redraw off-screen player relocation
+ boolean can_pass_to_walkable; // player can pass to empty or walkable tile
+ boolean grow_into_diggable; // amoeba can grow into anything diggable
+ boolean sb_fields_needed; // all Sokoban fields must be solved
+ boolean sb_objects_needed; // all Sokoban objects must be solved
+ boolean auto_exit_sokoban; // automatically finish solved Sokoban levels
+ boolean solved_by_one_player; // level is solved if one player enters exit
+ boolean finish_dig_collect; // only finished dig/collect triggers ce action
+ boolean keep_walkable_ce; // keep walkable CE if it changes to the player
+
+ boolean continuous_snapping; // repeated snapping without releasing key
+ boolean block_snap_field; // snapping blocks field to show animation
+ boolean block_last_field; // player blocks previous field while moving
+ boolean sp_block_last_field; // player blocks previous field while moving
+
+ // values for MM/DF elements
boolean mm_laser_red, mm_laser_green, mm_laser_blue;
boolean df_laser_red, df_laser_green, df_laser_blue;
int mm_time_fuse;
int mm_time_ball;
int mm_time_block;
- /* ('int' instead of 'boolean' because used as selectbox value in editor) */
- int use_step_counter; /* count steps instead of seconds for level */
+ // ('int' instead of 'boolean' because used as selectbox value in editor)
+ int use_step_counter; // count steps instead of seconds for level
+
+ int time_score_base; // use time score for 1 or 10 seconds/steps
short field[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
- boolean use_custom_template; /* use custom properties from template file */
+ boolean use_custom_template; // use custom properties from template file
- boolean file_has_custom_elements; /* set when level file contains CEs */
+ boolean file_has_custom_elements; // set when level file contains CEs
- boolean no_valid_file; /* set when level file missing or invalid */
- boolean no_level_file; /* set when falling back to level template */
+ boolean no_valid_file; // set when level file missing or invalid
+ boolean no_level_file; // set when falling back to level template
- boolean changed; /* set when level was changed in the editor */
+ boolean changed; // set when level was changed in the editor
- /* runtime flags to handle bugs in old levels (not stored in level file) */
+ // runtime flags to handle bugs in old levels (not stored in level file)
boolean use_action_after_change_bug;
};
struct NetworkLevelInfo
{
- char *leveldir_identifier; /* network levelset identifier */
+ char *leveldir_identifier; // network levelset identifier
- struct LevelFileInfo file_info; /* file info for level file */
- struct LevelFileInfo tmpl_info; /* file info for level template */
+ struct LevelFileInfo file_info; // file info for level file
+ struct LevelFileInfo tmpl_info; // file info for level template
- boolean use_network_level_files; /* use levels from network server */
- boolean use_custom_template; /* use CEs from level template */
+ boolean use_network_level_files; // use levels from network server
+ boolean use_custom_template; // use CEs from level template
};
struct GlobalInfo
boolean autoplay_all;
boolean autoplay_mode;
+ char *patchtapes_mode;
+ char *patchtapes_leveldir;
+ int patchtapes_level[MAX_TAPES_PER_SET];
+ boolean patchtapes_all;
+
char *convert_leveldir;
int convert_level_nr;
- char *create_images_dir;
+ char *dumplevel_leveldir;
+ int dumplevel_level_nr;
+
+ char *dumptape_leveldir;
+ int dumptape_level_nr;
+
+ char *create_sketch_images_dir;
+ char *create_collect_images_dir;
int num_toons;
float frames_per_second;
boolean show_frames_per_second;
- /* global values for fading screens and masking borders */
+ // global values for fading screens and masking borders
int border_status;
- /* values for global animations */
+ // values for global animations
int anim_status;
int anim_status_next;
boolean use_envelope_request;
+
+ char **user_names;
};
struct ElementChangeInfo
{
- boolean can_change; /* use or ignore this change info */
+ boolean can_change; // use or ignore this change info
- boolean has_event[NUM_CHANGE_EVENTS]; /* change events */
+ boolean has_event[NUM_CHANGE_EVENTS]; // change events
- int trigger_player; /* player triggering change */
- int trigger_side; /* side triggering change */
- int trigger_page; /* page triggering change */
+ int trigger_player; // player triggering change
+ int trigger_side; // side triggering change
+ int trigger_page; // page triggering change
- int target_element; /* target element after change */
+ int target_element; // target element after change
- int delay_fixed; /* added frame delay before changed (fixed) */
- int delay_random; /* added frame delay before changed (random) */
- int delay_frames; /* either 1 (frames) or 50 (seconds; 50 fps) */
+ int delay_fixed; // added frame delay before changed (fixed)
+ int delay_random; // added frame delay before changed (random)
+ int delay_frames; // either 1 (frames) or 50 (seconds; 50 fps)
- int initial_trigger_element; /* initial element triggering change */
+ int initial_trigger_element; // initial element triggering change
- struct Content target_content;/* elements for extended change target */
- boolean use_target_content; /* use extended change target */
- boolean only_if_complete; /* only use complete target content */
- boolean use_random_replace; /* use random value for replacing elements */
- int random_percentage; /* random value for replacing elements */
- int replace_when; /* type of elements that can be replaced */
+ struct Content target_content;// elements for extended change target
+ boolean use_target_content; // use extended change target
+ boolean only_if_complete; // only use complete target content
+ boolean use_random_replace; // use random value for replacing elements
+ int random_percentage; // random value for replacing elements
+ int replace_when; // type of elements that can be replaced
- boolean explode; /* explode instead of change */
+ boolean explode; // explode instead of change
- boolean has_action; /* execute action on specified condition */
- int action_type; /* type of action */
- int action_mode; /* mode of action */
- int action_arg; /* parameter of action */
- int action_element; /* element related to action */
+ boolean has_action; // execute action on specified condition
+ int action_type; // type of action
+ int action_mode; // mode of action
+ int action_arg; // parameter of action
+ int action_element; // element related to action
- /* ---------- internal values used at runtime when playing ---------- */
+ // ---------- internal values used at runtime when playing ----------
- int trigger_element; /* element triggering change */
+ int trigger_element; // element triggering change
/* functions that are called before, while and after the change of an
element -- currently only used for non-custom elements */
void (*change_function)(int x, int y);
void (*post_change_function)(int x, int y);
- short actual_trigger_element; /* element that actually triggered change */
- int actual_trigger_side; /* element side that triggered the change */
- int actual_trigger_player; /* player which actually triggered change */
- int actual_trigger_player_bits; /* player bits of triggering players */
- int actual_trigger_ce_value; /* CE value of element that triggered change */
- int actual_trigger_ce_score; /* CE score of element that triggered change */
+ short actual_trigger_element; // element that actually triggered change
+ int actual_trigger_side; // element side that triggered the change
+ int actual_trigger_player; // player which actually triggered change
+ int actual_trigger_player_bits; // player bits of triggering players
+ int actual_trigger_ce_value; // CE value of element that triggered change
+ int actual_trigger_ce_score; // CE score of element that triggered change
- boolean can_change_or_has_action; /* can_change | has_action */
+ boolean can_change_or_has_action; // can_change | has_action
- /* ---------- internal values used in level editor ---------- */
+ // ---------- internal values used in level editor ----------
- int direct_action; /* change triggered by actions on element */
- int other_action; /* change triggered by other element actions */
+ int direct_action; // change triggered by actions on element
+ int other_action; // change triggered by other element actions
};
struct ElementGroupInfo
{
- int num_elements; /* number of elements in this group */
- int element[MAX_ELEMENTS_IN_GROUP]; /* list of elements in this group */
+ int num_elements; // number of elements in this group
+ int element[MAX_ELEMENTS_IN_GROUP]; // list of elements in this group
- int choice_mode; /* how to choose element from group */
+ int choice_mode; // how to choose element from group
- /* ---------- internal values used at runtime when playing ---------- */
+ // ---------- internal values used at runtime when playing ----------
/* the following is the same as above, but with recursively resolved group
elements (group elements may also contain further group elements!) */
int num_elements_resolved;
short element_resolved[NUM_FILE_ELEMENTS];
- int choice_pos; /* current element choice position */
+ int choice_pos; // current element choice position
};
struct ElementNameInfo
{
- /* ---------- token and description strings ---------- */
+ // ---------- token and description strings ----------
- char *token_name; /* element token used in config files */
- char *class_name; /* element class used in config files */
- char *editor_description; /* pre-defined description for level editor */
+ char *token_name; // element token used in config files
+ char *class_name; // element class used in config files
+ char *editor_description; // pre-defined description for level editor
};
struct ElementInfo
{
- /* ---------- token and description strings ---------- */
+ // ---------- token and description strings ----------
- char *token_name; /* element token used in config files */
- char *class_name; /* element class used in config files */
- char *editor_description; /* pre-defined description for level editor */
- char *custom_description; /* alternative description from config file */
- char description[MAX_ELEMENT_NAME_LEN + 1]; /* for custom/group elements */
+ char *token_name; // element token used in config files
+ char *class_name; // element class used in config files
+ char *editor_description; // pre-defined description for level editor
+ char *custom_description; // alternative description from config file
+ char description[MAX_ELEMENT_NAME_LEN + 1]; // for custom/group elements
- /* ---------- graphic and sound definitions ---------- */
+ // ---------- graphic and sound definitions ----------
- int graphic[NUM_ACTIONS]; /* default graphics for several actions */
+ int graphic[NUM_ACTIONS]; // default graphics for several actions
int direction_graphic[NUM_ACTIONS][NUM_DIRECTIONS_FULL];
- /* special graphics for left/right/up/down */
+ // special graphics for left/right/up/down
- int crumbled[NUM_ACTIONS]; /* crumbled graphics for several actions */
+ int crumbled[NUM_ACTIONS]; // crumbled graphics for several actions
int direction_crumbled[NUM_ACTIONS][NUM_DIRECTIONS_FULL];
- /* crumbled graphics for left/right/up/down */
+ // crumbled graphics for left/right/up/down
int special_graphic[NUM_SPECIAL_GFX_ARGS];
- /* special graphics for certain screens */
+ // special graphics for certain screens
- int sound[NUM_ACTIONS]; /* default sounds for several actions */
+ int sound[NUM_ACTIONS]; // default sounds for several actions
- /* ---------- special element property values ---------- */
+ // ---------- special element property values ----------
- unsigned int properties[NUM_EP_BITFIELDS]; /* element base properties */
+ unsigned int properties[NUM_EP_BITFIELDS]; // element base properties
- boolean use_gfx_element; /* use custom graphic element */
- int gfx_element_initial; /* initial optional custom graphic element */
+ boolean use_gfx_element; // use custom graphic element
+ int gfx_element_initial; // initial optional custom graphic element
- int access_direction; /* accessible from which direction */
+ int access_direction; // accessible from which direction
- int collect_score_initial; /* initial score value for collecting */
- int collect_count_initial; /* initial count value for collecting */
+ int collect_score_initial; // initial score value for collecting
+ int collect_count_initial; // initial count value for collecting
- int ce_value_fixed_initial; /* initial value for custom variable (fix) */
- int ce_value_random_initial; /* initial value for custom variable (rnd) */
- boolean use_last_ce_value; /* use value from element before change */
+ int ce_value_fixed_initial; // initial value for custom variable (fix)
+ int ce_value_random_initial; // initial value for custom variable (rnd)
+ boolean use_last_ce_value; // use value from element before change
- int push_delay_fixed; /* constant delay before pushing */
- int push_delay_random; /* additional random delay before pushing */
- int drop_delay_fixed; /* constant delay after dropping */
- int drop_delay_random; /* additional random delay after dropping */
- int move_delay_fixed; /* constant delay after moving */
- int move_delay_random; /* additional random delay after moving */
+ int push_delay_fixed; // constant delay before pushing
+ int push_delay_random; // additional random delay before pushing
+ int drop_delay_fixed; // constant delay after dropping
+ int drop_delay_random; // additional random delay after dropping
+ int move_delay_fixed; // constant delay after moving
+ int move_delay_random; // additional random delay after moving
+ int step_delay_fixed; // constant delay while moving
+ int step_delay_random; // additional random delay while moving
- int move_pattern; /* direction movable element moves to */
- int move_direction_initial; /* initial direction element moves to */
- int move_stepsize; /* step size element moves with */
+ int move_pattern; // direction movable element moves to
+ int move_direction_initial; // initial direction element moves to
+ int move_stepsize; // step size element moves with
- int move_enter_element; /* element that can be entered (and removed) */
- int move_leave_element; /* element that can be left behind */
- int move_leave_type; /* change (limited) or leave (unlimited) */
+ int move_enter_element; // element that can be entered (and removed)
+ int move_leave_element; // element that can be left behind
+ int move_leave_type; // change (limited) or leave (unlimited)
- int slippery_type; /* how/where other elements slip away */
+ int slippery_type; // how/where other elements slip away
- struct Content content; /* new elements after explosion */
+ struct Content content; // new elements after explosion
- int explosion_type; /* type of explosion, like 3x3, 3+3 or 1x1 */
- int explosion_delay; /* duration of explosion of this element */
- int ignition_delay; /* delay for explosion by other explosion */
+ int explosion_type; // type of explosion, like 3x3, 3+3 or 1x1
+ int explosion_delay; // duration of explosion of this element
+ int ignition_delay; // delay for explosion by other explosion
- struct ElementChangeInfo *change_page; /* actual list of change pages */
- struct ElementChangeInfo *change; /* pointer to current change page */
+ struct ElementChangeInfo *change_page; // actual list of change pages
+ struct ElementChangeInfo *change; // pointer to current change page
- int num_change_pages; /* actual number of change pages */
- int current_change_page; /* currently edited change page */
+ int num_change_pages; // actual number of change pages
+ int current_change_page; // currently edited change page
- struct ElementGroupInfo *group; /* pointer to element group info */
+ struct ElementGroupInfo *group; // pointer to element group info
- /* ---------- internal values used at runtime when playing ---------- */
+ // ---------- internal values used at runtime when playing ----------
boolean has_change_event[NUM_CHANGE_EVENTS];
- int event_page_nr[NUM_CHANGE_EVENTS]; /* page number for each event */
- struct ElementChangeInfo *event_page[NUM_CHANGE_EVENTS]; /* page for event */
+ int event_page_nr[NUM_CHANGE_EVENTS]; // page number for each event
+ struct ElementChangeInfo *event_page[NUM_CHANGE_EVENTS]; // page for event
boolean in_group[NUM_GROUP_ELEMENTS];
- int gfx_element; /* runtime optional custom graphic element */
+ int gfx_element; // runtime optional custom graphic element
- int collect_score; /* runtime score value for collecting */
+ int collect_score; // runtime score value for collecting
- /* count of this element on playfield, calculated after each frame */
+ // count of this element on playfield, calculated after each frame
int element_count;
- /* ---------- internal values used in level editor ---------- */
+ // ---------- internal values used in level editor ----------
- int access_type; /* walkable or passable */
- int access_layer; /* accessible over/inside/under */
- int access_protected; /* protection against deadly elements */
- int walk_to_action; /* diggable/collectible/pushable */
- int smash_targets; /* can smash player/enemies/everything */
- int deadliness; /* deadly when running/colliding/touching */
+ int access_type; // walkable or passable
+ int access_layer; // accessible over/inside/under
+ int access_protected; // protection against deadly elements
+ int walk_to_action; // diggable/collectible/pushable
+ int smash_targets; // can smash player/enemies/everything
+ int deadliness; // deadly when running/colliding/touching
- boolean can_explode_by_fire; /* element explodes by fire */
- boolean can_explode_smashed; /* element explodes when smashed */
- boolean can_explode_impact; /* element explodes on impact */
+ boolean can_explode_by_fire; // element explodes by fire
+ boolean can_explode_smashed; // element explodes when smashed
+ boolean can_explode_impact; // element explodes on impact
- boolean modified_settings; /* set for all modified custom elements */
+ boolean modified_settings; // set for all modified custom elements
};
struct FontInfo
{
- char *token_name; /* font token used in config files */
+ char *token_name; // font token used in config files
- int graphic; /* default graphic for this font */
+ int graphic; // default graphic for this font
int special_graphic[NUM_SPECIAL_GFX_ARGS];
- /* special graphics for certain screens */
+ // special graphics for certain screens
int special_bitmap_id[NUM_SPECIAL_GFX_ARGS];
- /* internal bitmap ID for special graphics */
+ // internal bitmap ID for special graphics
};
struct GlobalAnimNameInfo
{
- char *token_name; /* global animation token in config files */
+ char *token_name; // global animation token in config files
};
struct GlobalAnimInfo
{
- char *token_name; /* global animation token in config files */
+ char *token_name; // global animation token in config files
- /* global animation graphic and control definitions */
+ // global animation graphic and control definitions
int graphic[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS];
- /* global animation sound and music definitions */
+ // global animation sound and music definitions
int sound[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS];
int music[NUM_GLOBAL_ANIM_PARTS_ALL][NUM_SPECIAL_GFX_ARGS];
};
+struct GlobalAnimEventListInfo
+{
+ int *event_value;
+ int num_event_values;
+};
+
+struct GlobalAnimEventInfo
+{
+ struct GlobalAnimEventListInfo **event_list;
+ int num_event_lists;
+};
+
struct GraphicInfo
{
- Bitmap **bitmaps; /* bitmaps in all required sizes */
- Bitmap *bitmap; /* bitmap in default size */
+ Bitmap **bitmaps; // bitmaps in all required sizes
+ Bitmap *bitmap; // bitmap in default size
- int src_image_width; /* scaled bitmap size, but w/o small images */
- int src_image_height; /* scaled bitmap size, but w/o small images */
+ int src_image_width; // scaled bitmap size, but w/o small images
+ int src_image_height; // scaled bitmap size, but w/o small images
- int src_x, src_y; /* start position of animation frames */
- int width, height; /* width/height of each animation frame */
+ int src_x, src_y; // start position of animation frames
+ int width, height; // width/height of each animation frame
- int offset_x, offset_y; /* x/y offset to next animation frame */
- int offset2_x, offset2_y; /* x/y offset to second movement tile */
+ int offset_x, offset_y; // x/y offset to next animation frame
+ int offset2_x, offset2_y; // x/y offset to second movement tile
- boolean double_movement; /* animation has second movement tile */
- int swap_double_tiles; /* explicitely force or forbid tile swapping */
+ boolean double_movement; // animation has second movement tile
+ int swap_double_tiles; // explicitely force or forbid tile swapping
int anim_frames;
int anim_frames_per_line;
int anim_start_frame;
- int anim_delay; /* important: delay of 1 means "no delay"! */
+ int anim_delay; // important: delay of 1 means "no delay"!
int anim_mode;
boolean anim_global_sync;
- int crumbled_like; /* element for cloning crumble graphics */
- int diggable_like; /* element for cloning digging graphics */
-
- int border_size; /* border size for "crumbled" graphics */
-
- int scale_up_factor; /* optional factor for scaling image up */
- int tile_size; /* optional explicitly defined tile size */
-
- int clone_from; /* graphic for cloning *all* settings */
-
- int init_delay_fixed; /* optional initial delay values for global */
- int init_delay_random; /* animations (pause interval before start) */
- int anim_delay_fixed; /* optional delay values for bored/sleeping */
- int anim_delay_random; /* and global animations (animation length) */
- int post_delay_fixed; /* optional delay values after bored/global */
- int post_delay_random; /* animations (pause before next animation) */
-
- int init_event; /* optional event triggering animation start */
- int init_event_action; /* optional action called on animation start */
- int anim_event; /* optional event triggering animation end */
- int anim_event_action; /* optional action called on animation end */
-
- int step_offset; /* optional step offset of toon animations */
- int step_xoffset; /* optional step offset of toon animations */
- int step_yoffset; /* optional step offset of toon animations */
- int step_delay; /* optional step delay of toon animations */
- int direction; /* optional move direction of toon animations */
- int position; /* optional draw position of toon animations */
- int x; /* optional draw position of toon animations */
- int y; /* optional draw position of toon animations */
-
- int draw_xoffset; /* optional offset for drawing font chars */
- int draw_yoffset; /* optional offset for drawing font chars */
-
- int draw_masked; /* optional setting for drawing envelope gfx */
- int draw_order; /* optional draw order for global animations */
-
- int fade_mode; /* optional setting for drawing title screens */
- int fade_delay; /* optional setting for drawing title screens */
- int post_delay; /* optional setting for drawing title screens */
- int auto_delay; /* optional setting for drawing title screens */
- int align, valign; /* optional setting for drawing title screens */
- int sort_priority; /* optional setting for drawing title screens */
+ int crumbled_like; // element for cloning crumble graphics
+ int diggable_like; // element for cloning digging graphics
+
+ int border_size; // border size for "crumbled" graphics
+
+ int scale_up_factor; // optional factor for scaling image up
+ int tile_size; // optional explicitly defined tile size
+
+ int clone_from; // graphic for cloning *all* settings
+
+ int init_delay_fixed; // optional initial delay values for global
+ int init_delay_random; // animations (pause interval before start)
+ int init_delay_action; // optional action called on animation start
+ int anim_delay_fixed; // optional delay values for bored/sleeping
+ int anim_delay_random; // and global animations (animation length)
+ int anim_delay_action; // optional action called on animation end
+ int post_delay_fixed; // optional delay values after bored/global
+ int post_delay_random; // animations (pause before next animation)
+ int post_delay_action; // optional action called after post delay
+
+ int init_event; // optional event triggering animation start
+ int init_event_action; // optional action called on animation start
+ int anim_event; // optional event triggering animation end
+ int anim_event_action; // optional action called on animation end
+
+ int step_offset; // optional step offset of toon animations
+ int step_xoffset; // optional step offset of toon animations
+ int step_yoffset; // optional step offset of toon animations
+ int step_delay; // optional step delay of toon animations
+ int direction; // optional move direction of toon animations
+ int position; // optional draw position of toon animations
+ int x; // optional draw position of toon animations
+ int y; // optional draw position of toon animations
+
+ int draw_xoffset; // optional offset for drawing font chars
+ int draw_yoffset; // optional offset for drawing font chars
+
+ int draw_masked; // optional setting for drawing envelope gfx
+ int draw_order; // optional draw order for global animations
+
+ int fade_mode; // optional setting for drawing title screens
+ int fade_delay; // optional setting for drawing title screens
+ int post_delay; // optional setting for drawing title screens
+ int auto_delay; // optional setting for drawing title screens
+ int auto_delay_unit; // optional setting for drawing title screens
+ int align, valign; // optional setting for drawing title screens
+ int sort_priority; // optional setting for drawing title screens
int class;
int style;
int pressed_xoffset;
int pressed_yoffset;
- boolean use_image_size; /* use image size as default width and height */
+ boolean use_image_size; // use image size as default width and height
};
struct SoundInfo
extern DrawBuffer *drawto_field;
extern int game_status;
-extern boolean game_status_last_screen;
+extern int game_status_last_screen;
extern boolean level_editor_test_game;
extern boolean network_playing;
-#if defined(TARGET_SDL)
-extern boolean network_server;
-extern SDL_Thread *server_thread;
-#endif
-
extern int key_joystick_mapping;
-extern short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short Tile[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern short Last[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
extern int BX2, BY2;
extern int SBX_Left, SBX_Right;
extern int SBY_Upper, SBY_Lower;
-extern int ZX, ZY;
-extern int ExitX, ExitY;
-extern int AllPlayersGone;
extern int TimeFrames, TimePlayed, TimeLeft, TapeTime;
extern int graphics_action_mapping[];
extern struct LevelInfo level, level_template;
-extern struct HiScore highscore[];
+extern struct ScoreInfo scores, server_scores;
extern struct TapeInfo tape;
extern struct GlobalInfo global;
extern struct BorderInfo border;
extern struct FontInfo font_info[];
extern struct GlobalAnimInfo global_anim_info[];
extern struct GlobalAnimNameInfo global_anim_name_info[];
+extern struct GlobalAnimEventInfo global_anim_event_info;
extern struct MusicPrefixInfo music_prefix_info[];
extern struct GraphicInfo *graphic_info;
extern struct SoundInfo *sound_info;
extern struct ConfigInfo helpanim_config[];
extern struct ConfigInfo helptext_config[];
-#endif /* MAIN_H */
+#endif // MAIN_H