From: Holger Schemel Date: Sun, 11 Feb 2024 00:03:33 +0000 (+0100) Subject: added GDash game elements and sounds for Boulder Dash game engine X-Git-Tag: 4.4.0.0-test-1~407 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=ecd487a200655acd9d2a23b8d1858969369ee09d;p=rocksndiamonds.git added GDash game elements and sounds for Boulder Dash game engine --- diff --git a/src/game_bd/bd_elements.h b/src/game_bd/bd_elements.h new file mode 100644 index 00000000..bf4bd5a8 --- /dev/null +++ b/src/game_bd/bd_elements.h @@ -0,0 +1,399 @@ +/* + * Copyright (c) 2007, 2008, 2009, Czirkos Zoltan + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef BD_ELEMENTS_H +#define BD_ELEMENTS_H + + +/* These are the objects in caves. */ +typedef enum _element +{ + O_SPACE, + O_DIRT, + O_DIRT_SLOPED_UP_RIGHT, + O_DIRT_SLOPED_UP_LEFT, + O_DIRT_SLOPED_DOWN_LEFT, + O_DIRT_SLOPED_DOWN_RIGHT, + O_DIRT_BALL, + O_DIRT_BALL_F, + O_DIRT_LOOSE, + O_DIRT_LOOSE_F, + O_DIRT2, + O_BRICK, + O_BRICK_SLOPED_UP_RIGHT, + O_BRICK_SLOPED_UP_LEFT, + O_BRICK_SLOPED_DOWN_LEFT, + O_BRICK_SLOPED_DOWN_RIGHT, + O_BRICK_NON_SLOPED, + O_MAGIC_WALL, + O_PRE_OUTBOX, + O_OUTBOX, + O_PRE_INVIS_OUTBOX, + O_INVIS_OUTBOX, + O_STEEL, + O_STEEL_SLOPED_UP_RIGHT, + O_STEEL_SLOPED_UP_LEFT, + O_STEEL_SLOPED_DOWN_LEFT, + O_STEEL_SLOPED_DOWN_RIGHT, + O_STEEL_EXPLODABLE, + O_STEEL_EATABLE, + O_BRICK_EATABLE, + O_STONE, + O_STONE_F, + O_FLYING_STONE, + O_FLYING_STONE_F, + O_MEGA_STONE, + O_MEGA_STONE_F, + O_DIAMOND, + O_DIAMOND_F, + O_FLYING_DIAMOND, + O_FLYING_DIAMOND_F, + O_NUT, + O_NUT_F, + O_BLADDER_SPENDER, + O_INBOX, + O_H_EXPANDING_WALL, + O_V_EXPANDING_WALL, + O_EXPANDING_WALL, + O_H_EXPANDING_STEEL_WALL, + O_V_EXPANDING_STEEL_WALL, + O_EXPANDING_STEEL_WALL, + O_EXPANDING_WALL_SWITCH, + O_CREATURE_SWITCH, + O_BITER_SWITCH, + O_REPLICATOR_SWITCH, + O_CONVEYOR_SWITCH, + O_CONVEYOR_DIR_SWITCH, + O_ACID, + O_FALLING_WALL, + O_FALLING_WALL_F, + O_BOX, + O_TIME_PENALTY, + O_GRAVESTONE, + O_STONE_GLUED, + O_DIAMOND_GLUED, + O_DIAMOND_KEY, + O_TRAPPED_DIAMOND, + O_CLOCK, + O_DIRT_GLUED, + O_KEY_1, + O_KEY_2, + O_KEY_3, + O_DOOR_1, + O_DOOR_2, + O_DOOR_3, + + O_POT, + O_GRAVITY_SWITCH, + O_PNEUMATIC_HAMMER, + O_TELEPORTER, + O_SKELETON, + O_WATER, + O_WATER_1, + O_WATER_2, + O_WATER_3, + O_WATER_4, + O_WATER_5, + O_WATER_6, + O_WATER_7, + O_WATER_8, + O_WATER_9, + O_WATER_10, + O_WATER_11, + O_WATER_12, + O_WATER_13, + O_WATER_14, + O_WATER_15, + O_WATER_16, + O_COW_1, + O_COW_2, + O_COW_3, + O_COW_4, + O_COW_ENCLOSED_1, + O_COW_ENCLOSED_2, + O_COW_ENCLOSED_3, + O_COW_ENCLOSED_4, + O_COW_ENCLOSED_5, + O_COW_ENCLOSED_6, + O_COW_ENCLOSED_7, + O_WALLED_DIAMOND, + O_WALLED_KEY_1, + O_WALLED_KEY_2, + O_WALLED_KEY_3, + + O_AMOEBA, + O_AMOEBA_2, + O_REPLICATOR, + O_CONVEYOR_LEFT, + O_CONVEYOR_RIGHT, + O_LAVA, + O_SWEET, + O_VOODOO, + O_SLIME, + O_BLADDER, + O_BLADDER_1, + O_BLADDER_2, + O_BLADDER_3, + O_BLADDER_4, + O_BLADDER_5, + O_BLADDER_6, + O_BLADDER_7, + O_BLADDER_8, + + O_WAITING_STONE, + O_CHASING_STONE, + O_GHOST, + O_FIREFLY_1, + O_FIREFLY_2, + O_FIREFLY_3, + O_FIREFLY_4, + O_ALT_FIREFLY_1, + O_ALT_FIREFLY_2, + O_ALT_FIREFLY_3, + O_ALT_FIREFLY_4, + O_BUTTER_1, + O_BUTTER_2, + O_BUTTER_3, + O_BUTTER_4, + O_ALT_BUTTER_1, + O_ALT_BUTTER_2, + O_ALT_BUTTER_3, + O_ALT_BUTTER_4, + O_STONEFLY_1, + O_STONEFLY_2, + O_STONEFLY_3, + O_STONEFLY_4, + O_BITER_1, + O_BITER_2, + O_BITER_3, + O_BITER_4, + O_DRAGONFLY_1, + O_DRAGONFLY_2, + O_DRAGONFLY_3, + O_DRAGONFLY_4, + + O_PRE_PL_1, + O_PRE_PL_2, + O_PRE_PL_3, + O_PLAYER, + O_PLAYER_BOMB, + O_PLAYER_GLUED, + O_PLAYER_STIRRING, + + O_BOMB, + O_BOMB_TICK_1, + O_BOMB_TICK_2, + O_BOMB_TICK_3, + O_BOMB_TICK_4, + O_BOMB_TICK_5, + O_BOMB_TICK_6, + O_BOMB_TICK_7, + + O_NITRO_PACK, + O_NITRO_PACK_F, + O_NITRO_PACK_EXPLODE, + + O_PRE_CLOCK_1, + O_PRE_CLOCK_2, + O_PRE_CLOCK_3, + O_PRE_CLOCK_4, + O_PRE_DIA_1, + O_PRE_DIA_2, + O_PRE_DIA_3, + O_PRE_DIA_4, + O_PRE_DIA_5, + O_EXPLODE_1, + O_EXPLODE_2, + O_EXPLODE_3, + O_EXPLODE_4, + O_EXPLODE_5, + O_PRE_STONE_1, + O_PRE_STONE_2, + O_PRE_STONE_3, + O_PRE_STONE_4, + O_PRE_STEEL_1, + O_PRE_STEEL_2, + O_PRE_STEEL_3, + O_PRE_STEEL_4, + O_GHOST_EXPL_1, + O_GHOST_EXPL_2, + O_GHOST_EXPL_3, + O_GHOST_EXPL_4, + O_BOMB_EXPL_1, + O_BOMB_EXPL_2, + O_BOMB_EXPL_3, + O_BOMB_EXPL_4, + O_NITRO_EXPL_1, + O_NITRO_EXPL_2, + O_NITRO_EXPL_3, + O_NITRO_EXPL_4, + O_AMOEBA_2_EXPL_1, + O_AMOEBA_2_EXPL_2, + O_AMOEBA_2_EXPL_3, + O_AMOEBA_2_EXPL_4, + O_NUT_EXPL_1, + O_NUT_EXPL_2, + O_NUT_EXPL_3, + O_NUT_EXPL_4, + + /* these are used internally for the pneumatic hammer, and should not be used in the editor! */ + /* (not even as an effect destination or something like that) */ + O_PLAYER_PNEUMATIC_LEFT, + O_PLAYER_PNEUMATIC_RIGHT, + O_PNEUMATIC_ACTIVE_LEFT, + O_PNEUMATIC_ACTIVE_RIGHT, + + O_UNKNOWN, /* unknown element imported or read from bdcff */ + O_NONE, /* do not draw this element when creating cave; can be used, + for example, to skip drawing a maze's path */ + + O_MAX, /* remembering last index: this should get an integer value + which is 1 more than the one above. */ + + /* fake elements to help drawing */ + O_FAKE_BONUS, + O_INBOX_CLOSED, + O_INBOX_OPEN, + O_OUTBOX_CLOSED, + O_OUTBOX_OPEN, + O_COVERED, + O_PLAYER_LEFT, + O_PLAYER_RIGHT, + O_PLAYER_TAP, + O_PLAYER_BLINK, + O_PLAYER_TAP_BLINK, + O_CREATURE_SWITCH_ON, + O_EXPANDING_WALL_SWITCH_HORIZ, + O_EXPANDING_WALL_SWITCH_VERT, + O_GRAVITY_SWITCH_ACTIVE, + O_REPLICATOR_SWITCH_ON, + O_REPLICATOR_SWITCH_OFF, + O_CONVEYOR_DIR_NORMAL, + O_CONVEYOR_DIR_CHANGED, + O_CONVEYOR_SWITCH_OFF, + O_CONVEYOR_SWITCH_ON, + + O_MAGIC_WALL_ACTIVE, + O_REPLICATOR_ACTIVE, + O_CONVEYOR_LEFT_ACTIVE, + O_CONVEYOR_RIGHT_ACTIVE, + O_BITER_SWITCH_1, + O_BITER_SWITCH_2, + O_BITER_SWITCH_3, + O_BITER_SWITCH_4, + + O_QUESTION_MARK, + O_EATABLE, + O_DOWN_ARROW, + O_LEFTRIGHT_ARROW, + O_EVERYDIR_ARROW, + O_GLUED, + O_OUT, + O_EXCLAMATION_MARK, + + O_MAX_ALL, + + SCANNED=0x100, + COVERED=0x200, + + /* binary AND this to elements to get rid of properties above. */ + O_MASK = ~(SCANNED | COVERED) +} GdElement; + +typedef enum _sound +{ + GD_S_NONE, + + GD_S_STONE, + GD_S_NUT, + GD_S_NUT_CRACK, + GD_S_DIRT_BALL, + GD_S_NITRO, + GD_S_FALLING_WALL, + GD_S_EXPANDING_WALL, + GD_S_WALL_REAPPEAR, + GD_S_DIAMOND_RANDOM, /* randomly select a diamond sound */ + GD_S_DIAMOND_1, + GD_S_DIAMOND_2, + GD_S_DIAMOND_3, + GD_S_DIAMOND_4, + GD_S_DIAMOND_5, + GD_S_DIAMOND_6, + GD_S_DIAMOND_7, + GD_S_DIAMOND_8, + GD_S_DIAMOND_COLLECT, + GD_S_SKELETON_COLLECT, + GD_S_PNEUMATIC_COLLECT, + GD_S_BOMB_COLLECT, + GD_S_CLOCK_COLLECT, + GD_S_SWEET_COLLECT, + GD_S_KEY_COLLECT, + GD_S_DIAMOND_KEY_COLLECT, + GD_S_SLIME, + GD_S_LAVA, + GD_S_REPLICATOR, + GD_S_ACID_SPREAD, + GD_S_BLADDER_MOVE, + GD_S_BLADDER_CONVERT, + GD_S_BLADDER_SPENDER, + GD_S_BITER_EAT, + + GD_S_DOOR_OPEN, + GD_S_WALK_EARTH, + GD_S_WALK_EMPTY, + GD_S_STIRRING, + GD_S_BOX_PUSH, + GD_S_TELEPORTER, + GD_S_TIMEOUT_10, + GD_S_TIMEOUT_9, + GD_S_TIMEOUT_8, + GD_S_TIMEOUT_7, + GD_S_TIMEOUT_6, + GD_S_TIMEOUT_5, + GD_S_TIMEOUT_4, + GD_S_TIMEOUT_3, + GD_S_TIMEOUT_2, + GD_S_TIMEOUT_1, + GD_S_TIMEOUT_0, + GD_S_EXPLOSION, + GD_S_BOMB_EXPLOSION, + GD_S_GHOST_EXPLOSION, + GD_S_VOODOO_EXPLOSION, + GD_S_NITRO_EXPLOSION, + GD_S_BOMB_PLACE, + GD_S_FINISHED, + GD_S_SWITCH_BITER, + GD_S_SWITCH_CREATURES, + GD_S_SWITCH_GRAVITY, + GD_S_SWITCH_EXPANDING, + GD_S_SWITCH_CONVEYOR, + GD_S_SWITCH_REPLICATOR, + + GD_S_AMOEBA, /* loop */ + GD_S_AMOEBA_MAGIC, /* loop */ + GD_S_MAGIC_WALL, /* loop */ + GD_S_COVER, /* loop */ + GD_S_PNEUMATIC_HAMMER, /* loop */ + GD_S_WATER, /* loop */ + + GD_S_CRACK, + GD_S_GRAVITY_CHANGE, + GD_S_BONUS_LIFE, + + GD_S_MAX, +} GdSound; + +#endif // BD_ELEMENTS_H diff --git a/src/game_bd/export_bd.h b/src/game_bd/export_bd.h index 4f7edfe9..53e72c61 100644 --- a/src/game_bd/export_bd.h +++ b/src/game_bd/export_bd.h @@ -16,6 +16,8 @@ // functions and definitions exported from game_bd to main program // ============================================================================ +#include "bd_elements.h" + // ---------------------------------------------------------------------------- // constant definitions