From 86e110774e5210b326e6867b134bd638d93554d3 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Sun, 26 May 2002 22:34:39 +0200 Subject: [PATCH] rnd-20020526-1-src --- src/editor.c | 4 +- src/game.c | 196 ++++++++---- src/game.h | 1 - src/libgame/sound.c | 18 +- src/libgame/sound.h | 1 + src/main.c | 757 +++++++++++++++++++++++--------------------- src/main.h | 323 ++++++++++--------- src/timestamp.h | 2 +- 8 files changed, 710 insertions(+), 592 deletions(-) diff --git a/src/editor.c b/src/editor.c index 8e2258fc..871aa164 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1273,8 +1273,8 @@ static char *getElementInfoText(int element) { char *info_text = "unknown"; - if (element < num_element_info) - info_text = element_info[element]; + if (element < NUM_LEVEL_ELEMENTS) + info_text = element_info[element].editor_description; else Error(ERR_WARN, "no element description for element %d", element); diff --git a/src/game.c b/src/game.c index e76ca5a9..38650b36 100644 --- a/src/game.c +++ b/src/game.c @@ -100,41 +100,30 @@ static void CloseAllOpenTimegates(void); static void CheckGravityMovement(struct PlayerInfo *); static void KillHeroUnlessProtected(int, int); +void PlaySoundLevel(int, int, int); +void PlaySoundLevelAction(int, int, int); + static void MapGameButtons(); static void HandleGameButtons(struct GadgetInfo *); static struct GadgetInfo *game_gadget[NUM_GAME_BUTTONS]; -static boolean is_loop_sound[NUM_SOUND_EFFECTS]; -static boolean is_loop_sound_initialized = FALSE; -static int loop_sounds[] = +static char *loop_sound_actions[] = { - SND_BD_MAGIC_WALL_RUNNING, - SND_BD_BUTTERFLY_MOVING, - SND_BD_FIREFLY_MOVING, - SND_SP_SNIKSNAK_MOVING, - SND_SP_ELECTRON_MOVING, - SND_DYNAMITE_BURNING, - SND_BUG_MOVING, - SND_SPACESHIP_MOVING, - SND_YAMYAM_MOVING, - SND_YAMYAM_WAITING, - SND_ROBOT_WHEEL_RUNNING, - SND_MAGIC_WALL_RUNNING, - SND_BALLOON_MOVING, - SND_MOLE_MOVING, - SND_TIMEGATE_WHEEL_RUNNING, - SND_CONVEYOR_BELT_RUNNING, - SND_DYNABOMB_BURNING, - SND_PACMAN_MOVING, - SND_PENGUIN_MOVING, - SND_PIG_MOVING, - SND_DRAGON_MOVING, - SND_DRAGON_BREATHING_FIRE + ".waiting", + ".moving", + ".running", + ".burning", + ".growing", + ".attacking" }; +static boolean is_loop_sound[NUM_SOUND_EFFECTS]; +static boolean sound_info_initialized = FALSE; #define IS_LOOP_SOUND(x) (is_loop_sound[x]) +#define SND_MOVING 1 +#define SND_WAITING 2 #ifdef DEBUG @@ -729,17 +718,34 @@ void InitGame() } /* initialize sound effect properties */ - if (!is_loop_sound_initialized) + if (!sound_info_initialized) { - int i; + int i, j; for (i=0; i len_action_text && + strcmp(&sound_effects[i].text[len_effect_text - len_action_text], + loop_sound_actions[j]) == 0) + is_loop_sound[i] = TRUE; + } + } + + for (i=0; iscore += value; diff --git a/src/game.h b/src/game.h index 081964f5..11167b9c 100644 --- a/src/game.h +++ b/src/game.h @@ -90,7 +90,6 @@ void RemoveHero(struct PlayerInfo *); int DigField(struct PlayerInfo *, int, int, int, int, int); boolean SnapField(struct PlayerInfo *, int, int); boolean PlaceBomb(struct PlayerInfo *); -void PlaySoundLevel(int, int, int); void RaiseScore(int); void RaiseScoreElement(int); void RequestQuitGame(boolean); diff --git a/src/libgame/sound.c b/src/libgame/sound.c index b29d5dd6..414ab122 100644 --- a/src/libgame/sound.c +++ b/src/libgame/sound.c @@ -71,6 +71,8 @@ #define SOUND_VOLUME_LEFT(x) (stereo_volume[x]) #define SOUND_VOLUME_RIGHT(x) (stereo_volume[SOUND_MAX_LEFT2RIGHT-x]) +#define SAME_SOUND_NR(x,y) ((x).nr == (y).nr) +#define SAME_SOUND_DATA(x,y) ((x).data_ptr == (y).data_ptr) #if 0 struct SoundHeader_SUN @@ -826,9 +828,9 @@ static void Mixer_InsertSound(SoundControl snd_ctrl) return; } - /* check if sound is already being played (and how often) */ + /* check if (and how often) this sound sample is already playing */ for (k=0, i=audio.first_sound_channel; i= 2) { @@ -878,7 +884,7 @@ static void Mixer_InsertSound(SoundControl snd_ctrl) int playing_time = playing_current - mixer[i].playing_starttime; int actual; - if (!mixer[i].active || mixer[i].nr != snd_ctrl.nr) + if (!mixer[i].active || !SAME_SOUND_NR(mixer[i], snd_ctrl)) continue; actual = 1000 * playing_time / mixer[i].data_len; @@ -1008,7 +1014,7 @@ static void HandleSoundRequest(SoundControl snd_ctrl) } for(i=audio.first_sound_channel; i'", /* 150 */ - "letter '?'", - "letter '@'", - "letter 'A'", - "letter 'B'", - "letter 'C'", - "letter 'D'", - "letter 'E'", - "letter 'F'", - "letter 'G'", - "letter 'H'", /* 160 */ - "letter 'I'", - "letter 'J'", - "letter 'K'", - "letter 'L'", - "letter 'M'", - "letter 'N'", - "letter 'O'", - "letter 'P'", - "letter 'Q'", - "letter 'R'", /* 170 */ - "letter 'S'", - "letter 'T'", - "letter 'U'", - "letter 'V'", - "letter 'W'", - "letter 'X'", - "letter 'Y'", - "letter 'Z'", - "letter 'Ä'", - "letter 'Ö'", /* 180 */ - "letter 'Ü'", - "letter '^'", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", /* 190 */ - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "letter ''", - "growing wall (horizontal)", /* 200 */ - "growing wall (vertical)", - "growing wall (all directions)", - "red door (EM style)", - "yellow door (EM style)", - "green door (EM style)", - "blue door (EM style)", - "yellow key (EM style)", - "green key (EM style)", - "blue key (EM style)", - "empty space", /* 210 */ - "zonk", - "base", - "murphy", - "infotron", - "chip (single)", - "hardware", - "exit", - "orange disk", - "port (leading right)", - "port (leading down)", /* 220 */ - "port (leading left)", - "port (leading up)", - "port (leading right)", - "port (leading down)", - "port (leading left)", - "port (leading up)", - "snik snak", - "yellow disk", - "terminal", - "red disk", /* 230 */ - "port (vertical)", - "port (horizontal)", - "port (all directions)", - "electron", - "buggy base", - "chip (left half)", - "chip (right half)", - "hardware", - "hardware", - "hardware", /* 240 */ - "hardware", - "hardware", - "hardware", - "hardware", - "hardware", - "hardware", - "hardware", - "chip (upper half)", - "chip (lower half)", - "gray door (EM style, red key)", /* 250 */ - "gray door (EM style, yellow key)", - "gray door (EM style, green key)", - "gray door (EM style, blue key)", - "unknown", - "unknown", + { "empty_space", "empty space" }, /* 0 */ + { "sand", "sand" }, + { "wall", "normal wall" }, + { "wall", "round wall" }, + { "rock", "rock" }, + { "key", "key" }, + { "emerald", "emerald" }, + { "exit", "closed exit" }, + { "player", "player" }, + { "bug", "bug" }, + { "spaceship", "spaceship" }, /* 10 */ + { "yamyam", "yam yam" }, + { "robot", "robot" }, + { "wall", "steel wall" }, + { "diamond", "diamond" }, + { "amoeba", "dead amoeba" }, + { "quicksand", "empty quicksand" }, + { "quicksand", "quicksand with rock" }, + { "amoeba", "amoeba drop" }, + { "bomb", "bomb" }, + { "magic_wall", "magic wall" }, /* 20 */ + { "speed_pill", "speed pill" }, + { "acid", "acid pool" }, + { "amoeba", "dropping amoeba" }, + { "amoeba", "normal amoeba" }, + { "nut", "nut with emerald" }, + { "gameoflife", "Conway's wall of life" }, + { "biomaze", "biomaze" }, + { "dynamite", "burning dynamite" }, + { NULL, "unknown" }, + { "robot_wheel", "magic wheel" }, /* 30 */ + { "robot_wheel", "magic wheel (running)" }, + { "key", "red key" }, + { "key", "yellow key" }, + { "key", "green key" }, + { "key", "blue key" }, + { "gate", "red door" }, + { "gate", "yellow door" }, + { "gate", "green door" }, + { "gate", "blue door" }, + { "gate", "gray door (opened by red key)" }, /* 40 */ + { "gate", "gray door (opened by yellow key)"}, + { "gate", "gray door (opened by green key)"}, + { "gate", "gray door (opened by blue key)"}, + { "dynamite", "dynamite" }, + { "pacman", "pac man" }, + { "wall", "invisible normal wall" }, + { "lamp", "lamp (off)" }, + { "lamp", "lamp (on)" }, + { "wall", "wall with emerald" }, + { "wall", "wall with diamond" }, /* 50 */ + { "amoeba", "amoeba with content" }, + { "bd_amoeba", "amoeba (BD style)" }, + { "time_orb_full", "time orb (full)" }, + { "time_orb_empty", "time orb (empty)" }, + { "wall", "growing wall" }, + { "bd_diamond", "diamond (BD style)" }, + { "emerald", "yellow emerald" }, + { "wall", "wall with BD style diamond" }, + { "wall", "wall with yellow emerald" }, + { "dark_yamyam", "dark yam yam" }, /* 60 */ + { "bd_magic_wall", "magic wall (BD style)" }, + { "wall", "invisible steel wall" }, + { NULL, "-" }, + { "dynabomb_nr", "increases number of bombs" }, + { "dynabomb_sz", "increases explosion size" }, + { "dynabomb_xl", "increases power of explosion" }, + { "sokoban_object", "sokoban object" }, + { "sokoban_field", "sokoban empty field" }, + { "sokoban_field", "sokoban field with object" }, + { "bd_butterfly", "butterfly (starts moving right)"}, /* 70 */ + { "bd_butterfly", "butterfly (starts moving up)" }, + { "bd_butterfly", "butterfly (starts moving left)"}, + { "bd_butterfly", "butterfly (starts moving down)"}, + { "bd_firefly", "firefly (starts moving right)" }, + { "bd_firefly", "firefly (starts moving up)" }, + { "bd_firefly", "firefly (starts moving left)" }, + { "bd_firefly", "firefly (starts moving down)" }, + { "bd_butterfly", "butterfly" }, + { "bd_firefly", "firefly" }, + { "player", "yellow player" }, /* 80 */ + { "player", "red player" }, + { "player", "green player" }, + { "player", "blue player" }, + { "bug", "bug (starts moving right)" }, + { "bug", "bug (starts moving up)" }, + { "bug", "bug (starts moving left)" }, + { "bug", "bug (starts moving down)" }, + { "spaceship", "spaceship (starts moving right)"}, + { "spaceship", "spaceship (starts moving up)" }, + { "spaceship", "spaceship (starts moving left)"}, /* 90 */ + { "spaceship", "spaceship (starts moving down)"}, + { "pacman", "pac man (starts moving right)" }, + { "pacman", "pac man (starts moving up)" }, + { "pacman", "pac man (starts moving left)" }, + { "pacman", "pac man (starts moving down)" }, + { "emerald", "red emerald" }, + { "emerald", "purple emerald" }, + { "wall", "wall with red emerald" }, + { "wall", "wall with purple emerald" }, + { NULL, "unknown" }, /* 100 */ + { NULL, "unknown" }, + { NULL, "unknown" }, + { NULL, "unknown" }, + { NULL, "unknown" }, + { NULL, "normal wall (BD style)" }, + { "bd_rock", "rock (BD style)" }, + { "exit", "open exit" }, + { NULL, "black orb bomb" }, + { "amoeba", "amoeba" }, + { "mole", "mole" }, /* 110 */ + { "penguin", "penguin" }, + { "satellite", "satellite" }, + { NULL, "arrow left" }, + { NULL, "arrow right" }, + { NULL, "arrow up" }, + { NULL, "arrow down" }, + { "pig", "pig" }, + { "dragon", "fire breathing dragon" }, + { "key", "red key (EM style)" }, + { NULL, "letter ' '" }, /* 120 */ + { NULL, "letter '!'" }, + { NULL, "letter '\"'" }, + { NULL, "letter '#'" }, + { NULL, "letter '$'" }, + { NULL, "letter '%'" }, + { NULL, "letter '&'" }, + { NULL, "letter '''" }, + { NULL, "letter '('" }, + { NULL, "letter ')'" }, + { NULL, "letter '*'" }, /* 130 */ + { NULL, "letter '+'" }, + { NULL, "letter ','" }, + { NULL, "letter '-'" }, + { NULL, "letter '.'" }, + { NULL, "letter '/'" }, + { NULL, "letter '0'" }, + { NULL, "letter '1'" }, + { NULL, "letter '2'" }, + { NULL, "letter '3'" }, + { NULL, "letter '4'" }, /* 140 */ + { NULL, "letter '5'" }, + { NULL, "letter '6'" }, + { NULL, "letter '7'" }, + { NULL, "letter '8'" }, + { NULL, "letter '9'" }, + { NULL, "letter ':'" }, + { NULL, "letter ';'" }, + { NULL, "letter '<'" }, + { NULL, "letter '='" }, + { NULL, "letter '>'" }, /* 150 */ + { NULL, "letter '?'" }, + { NULL, "letter '@'" }, + { NULL, "letter 'A'" }, + { NULL, "letter 'B'" }, + { NULL, "letter 'C'" }, + { NULL, "letter 'D'" }, + { NULL, "letter 'E'" }, + { NULL, "letter 'F'" }, + { NULL, "letter 'G'" }, + { NULL, "letter 'H'" }, /* 160 */ + { NULL, "letter 'I'" }, + { NULL, "letter 'J'" }, + { NULL, "letter 'K'" }, + { NULL, "letter 'L'" }, + { NULL, "letter 'M'" }, + { NULL, "letter 'N'" }, + { NULL, "letter 'O'" }, + { NULL, "letter 'P'" }, + { NULL, "letter 'Q'" }, + { NULL, "letter 'R'" }, /* 170 */ + { NULL, "letter 'S'" }, + { NULL, "letter 'T'" }, + { NULL, "letter 'U'" }, + { NULL, "letter 'V'" }, + { NULL, "letter 'W'" }, + { NULL, "letter 'X'" }, + { NULL, "letter 'Y'" }, + { NULL, "letter 'Z'" }, + { NULL, "letter 'Ä'" }, + { NULL, "letter 'Ö'" }, /* 180 */ + { NULL, "letter 'Ü'" }, + { NULL, "letter '^'" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, /* 190 */ + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { NULL, "letter ''" }, + { "wall", "growing wall (horizontal)" }, /* 200 */ + { "wall", "growing wall (vertical)" }, + { "wall", "growing wall (all directions)" }, + { "gate", "red door (EM style)" }, + { "gate", "yellow door (EM style)" }, + { "gate", "green door (EM style)" }, + { "gate", "blue door (EM style)" }, + { "key", "yellow key (EM style)" }, + { "key", "green key (EM style)" }, + { "key", "blue key (EM style)" }, + { "empty_space", "empty space" }, /* 210 */ + { "sp_zonk", "zonk" }, + { "sp_base", "base" }, + { "player", "murphy" }, + { "sp_infotron", "infotron" }, + { "wall", "chip (single)" }, + { "wall", "hardware" }, + { "sp_exit", "exit" }, + { "sp_disk_orange", "orange disk" }, + { "sp_port", "port (leading right)" }, + { "sp_port", "port (leading down)" }, /* 220 */ + { "sp_port", "port (leading left)" }, + { "sp_port", "port (leading up)" }, + { "sp_port", "port (leading right)" }, + { "sp_port", "port (leading down)" }, + { "sp_port", "port (leading left)" }, + { "sp_port", "port (leading up)" }, + { "sp_sniksnak", "snik snak" }, + { "sp_disk_yellow", "yellow disk" }, + { "sp_terminal", "terminal" }, + { "sp_disk_red", "red disk" }, /* 230 */ + { "sp_port", "port (vertical)" }, + { "sp_port", "port (horizontal)" }, + { "sp_port", "port (all directions)" }, + { "sp_electron", "electron" }, + { "sp_buggy_base", "buggy base" }, + { "wall", "chip (left half)" }, + { "wall", "chip (right half)" }, + { "wall", "hardware" }, + { "wall", "hardware" }, + { "wall", "hardware" }, /* 240 */ + { "wall", "hardware" }, + { "wall", "hardware" }, + { "wall", "hardware" }, + { "wall", "hardware" }, + { "wall", "hardware" }, + { "wall", "hardware" }, + { "wall", "hardware" }, + { "wall", "chip (upper half)" }, + { "wall", "chip (lower half)" }, + { "gate", "gray door (EM style, red key)" }, /* 250 */ + { "gate", "gray door (EM style, yellow key)"}, + { "gate", "gray door (EM style, green key)"}, + { "gate", "gray door (EM style, blue key)"}, + { NULL, "unknown" }, + { NULL, "unknown" }, /* 256 */ - "pearl", /* (256) */ - "crystal", - "wall with pearl", - "wall with crystal", - "white door", /* 260 */ - "gray door (opened by white key)", - "white key", - "shield (passive)", - "extra time", - "switch gate (open)", - "switch gate (closed)", - "switch for switch gate", - "switch for switch gate", - "-", - "-", /* 270 */ - "red conveyor belt (left)", - "red conveyor belt (middle)", - "red conveyor belt (right)", - "switch for red conveyor belt (left)", - "switch for red conveyor belt (middle)", - "switch for red conveyor belt (right)", - "yellow conveyor belt (left)", - "yellow conveyor belt (middle)", - "yellow conveyor belt (right)", - "switch for yellow conveyor belt (left)", /* 280 */ - "switch for yellow conveyor belt (middle)", - "switch for yellow conveyor belt (right)", - "green conveyor belt (left)", - "green conveyor belt (middle)", - "green conveyor belt (right)", - "switch for green conveyor belt (left)", - "switch for green conveyor belt (middle)", - "switch for green conveyor belt (right)", - "blue conveyor belt (left)", - "blue conveyor belt (middle)", /* 290 */ - "blue conveyor belt (right)", - "switch for blue conveyor belt (left)", - "switch for blue conveyor belt (middle)", - "switch for blue conveyor belt (right)", - "land mine", - "mail envelope", - "light switch (off)", - "light switch (on)", - "sign (exclamation)", - "sign (radio activity)", /* 300 */ - "sign (stop)", - "sign (wheel chair)", - "sign (parking)", - "sign (one way)", - "sign (heart)", - "sign (triangle)", - "sign (round)", - "sign (exit)", - "sign (yin yang)", - "sign (other)", /* 310 */ - "mole (starts moving left)", - "mole (starts moving right)", - "mole (starts moving up)", - "mole (starts moving down)", - "steel wall (slanted)", - "invisible sand", - "dx unknown 15", - "dx unknown 42", - "-", - "-", /* 320 */ - "shield (active, kills enemies)", - "time gate (open)", - "time gate (closed)", - "switch for time gate", - "switch for time gate", - "balloon", - "send balloon to the left", - "send balloon to the right", - "send balloon up", - "send balloon down", /* 330 */ - "send balloon in any direction", - "steel wall", - "steel wall", - "steel wall", - "steel wall", - "normal wall", - "normal wall", - "normal wall", - "normal wall", - "normal wall", /* 340 */ - "normal wall", - "normal wall", - "normal wall", - "tube (all directions)", - "tube (vertical)", - "tube (horizontal)", - "tube (vertical & left)", - "tube (vertical & right)", - "tube (horizontal & up)", - "tube (horizontal & down)", /* 350 */ - "tube (left & up)", - "tube (left & down)", - "tube (right & up)", - "tube (right & down)", - "spring", - "trap", - "stable bomb (DX style)", - "-" + { "pearl", "pearl" }, /* (256) */ + { "crystal", "crystal" }, + { "wall", "wall with pearl" }, + { "wall", "wall with crystal" }, + { "gate", "white door" }, /* 260 */ + { "gate", "gray door (opened by white key)"}, + { "key", "white key" }, + { "shield_passive", "shield (passive)" }, + { "extra_time", "extra time" }, + { "switchgate", "switch gate (open)" }, + { "switchgate", "switch gate (closed)" }, + { "switchgate_switch", "switch for switch gate" }, + { "switchgate_switch", "switch for switch gate" }, + { NULL, "-" }, + { NULL, "-" }, /* 270 */ + { "conveyor_belt", "red conveyor belt (left)" }, + { "conveyor_belt", "red conveyor belt (middle)" }, + { "conveyor_belt", "red conveyor belt (right)" }, + { "conveyor_belt_switch", "switch for red conveyor belt (left)"}, + { "conveyor_belt_switch", "switch for red conveyor belt (middle)"}, + { "conveyor_belt_switch", "switch for red conveyor belt (right)"}, + { "conveyor_belt", "yellow conveyor belt (left)" }, + { "conveyor_belt", "yellow conveyor belt (middle)" }, + { "conveyor_belt", "yellow conveyor belt (right)" }, + { "conveyor_belt_switch", "switch for yellow conveyor belt (left)"}, + { "conveyor_belt_switch", "switch for yellow conveyor belt (middle)"}, + { "conveyor_belt_switch", "switch for yellow conveyor belt (right)"}, + { "conveyor_belt", "green conveyor belt (left)" }, + { "conveyor_belt", "green conveyor belt (middle)" }, + { "conveyor_belt", "green conveyor belt (right)" }, + { "conveyor_belt_switch", "switch for green conveyor belt (left)"}, + { "conveyor_belt_switch", "switch for green conveyor belt (middle)"}, + { "conveyor_belt_switch", "switch for green conveyor belt (right)"}, + { "conveyor_belt", "blue conveyor belt (left)" }, + { "conveyor_belt", "blue conveyor belt (middle)" }, + { "conveyor_belt", "blue conveyor belt (right)" }, + { "conveyor_belt_switch", "switch for blue conveyor belt (left)"}, + { "conveyor_belt_switch", "switch for blue conveyor belt (middle)"}, + { "conveyor_belt_switch", "switch for blue conveyor belt (right)"}, + { "sand", "land mine" }, + { "envelope", "mail envelope" }, + { "light_switch", "light switch (off)" }, + { "light_switch", "light switch (on)" }, + { "wall", "sign (exclamation)" }, + { "wall", "sign (radio activity)" }, /* 300 */ + { "wall", "sign (stop)" }, + { "wall", "sign (wheel chair)" }, + { "wall", "sign (parking)" }, + { "wall", "sign (one way)" }, + { "wall", "sign (heart)" }, + { "wall", "sign (triangle)" }, + { "wall", "sign (round)" }, + { "wall", "sign (exit)" }, + { "wall", "sign (yin yang)" }, + { "wall", "sign (other)" }, /* 310 */ + { "mole", "mole (starts moving left)" }, + { "mole", "mole (starts moving right)" }, + { "mole", "mole (starts moving up)" }, + { "mole", "mole (starts moving down)" }, + { "wall", "steel wall (slanted)" }, + { "sand", "invisible sand" }, + { NULL, "dx unknown 15" }, + { NULL, "dx unknown 42" }, + { NULL, "-" }, + { NULL, "-" }, /* 320 */ + { "shield_active", "shield (active, kills enemies)"}, + { "timegate", "time gate (open)" }, + { "timegate", "time gate (closed)" }, + { "timegate_wheel", "switch for time gate" }, + { "timegate_wheel", "switch for time gate" }, + { "balloon", "balloon" }, + { "wall", "send balloon to the left" }, + { "wall", "send balloon to the right" }, + { "balloon_switch", "send balloon up" }, + { "balloon_switch", "send balloon down" }, /* 330 */ + { "balloon_switch", "send balloon in any direction" }, + { "wall", "steel wall" }, + { "wall", "steel wall" }, + { "wall", "steel wall" }, + { "wall", "steel wall" }, + { "wall", "normal wall" }, + { "wall", "normal wall" }, + { "wall", "normal wall" }, + { "wall", "normal wall" }, + { "wall", "normal wall" }, /* 340 */ + { "wall", "normal wall" }, + { "wall", "normal wall" }, + { "wall", "normal wall" }, + { "tube", "tube (all directions)" }, + { "tube", "tube (vertical)" }, + { "tube", "tube (horizontal)" }, + { "tube", "tube (vertical & left)" }, + { "tube", "tube (vertical & right)" }, + { "tube", "tube (horizontal & up)" }, + { "tube", "tube (horizontal & down)" }, /* 350 */ + { "tube", "tube (left & up)" }, + { "tube", "tube (left & down)" }, + { "tube", "tube (right & up)" }, + { "tube", "tube (right & down)" }, + { "spring", "spring" }, + { "trap", "trap" }, + { "dx_bomb", "stable bomb (DX style)" }, + { NULL, "-" } /* "-------------------------------", */ }; -int num_element_info = sizeof(element_info)/sizeof(char *); /* ========================================================================= */ diff --git a/src/main.h b/src/main.h index dbeb5021..e51f1157 100644 --- a/src/main.h +++ b/src/main.h @@ -331,6 +331,12 @@ struct GlobalInfo int fps_slowdown_factor; }; +struct ElementInfo +{ + char *sound_class_name; + char *editor_description; +}; + extern GC tile_clip_gc; extern Bitmap *pix[]; extern Pixmap tile_clipmask[]; @@ -388,13 +394,9 @@ extern struct HiScore highscore[]; extern struct TapeInfo tape; extern struct GameInfo game; extern struct GlobalInfo global; - +extern struct ElementInfo element_info[]; extern struct SoundEffectInfo sound_effects[]; -extern char *sound_name[]; -extern char *element_info[]; -extern int num_element_info; - /* often used screen positions */ #define SX 8 #define SY 8 @@ -818,6 +820,9 @@ extern int num_element_info; #define EL_TRAP_INACTIVE 356 #define EL_DX_SUPABOMB 357 +#define NUM_LEVEL_ELEMENTS 358 + + /* "real" (and therefore drawable) runtime elements */ #define EL_FIRST_RUNTIME_EL 500 @@ -1443,148 +1448,172 @@ extern int num_element_info; #define SND_BD_MAGIC_WALL_ACTIVATING 6 #define SND_BD_MAGIC_WALL_CHANGING 7 #define SND_BD_MAGIC_WALL_RUNNING 8 -#define SND_BD_AMOEBA_GROWING 9 -#define SND_BD_AMOEBA_TURNING_TO_GEM 10 -#define SND_BD_AMOEBA_TURNING_TO_ROCK 11 -#define SND_BD_BUTTERFLY_MOVING 12 -#define SND_BD_FIREFLY_MOVING 13 -#define SND_BD_EXIT_ENTERING 14 -#define SND_SP_EMPTY_SPACE_DIGGING 15 -#define SND_SP_BASE_DIGGING 16 -#define SND_SP_BUGGY_BASE_DIGGING 17 -#define SND_SP_BUGGY_BASE_ACTIVATING 18 -#define SND_SP_INFOTRON_COLLECTING 19 -#define SND_SP_INFOTRON_IMPACT 20 -#define SND_SP_ZONK_PUSHING 21 -#define SND_SP_ZONK_IMPACT 22 -#define SND_SP_DISK_RED_COLLECTING 23 -#define SND_SP_DISK_ORANGE_PUSHING 24 -#define SND_SP_DISK_YELLOW_PUSHING 25 -#define SND_SP_PORT_PASSING 26 -#define SND_SP_EXIT_ENTERING 27 -#define SND_SP_ELEMENT_EXPLODING 28 -#define SND_SP_SNIKSNAK_MOVING 29 -#define SND_SP_ELECTRON_MOVING 30 -#define SND_SP_TERMINAL_ACTIVATING 31 -#define SND_SOKOBAN_OBJECT_PUSHING 32 -#define SND_SOKOBAN_FIELD_FILLING 33 -#define SND_SOKOBAN_FIELD_CLEARING 34 -#define SND_SOKOBAN_GAME_SOLVING 35 -#define SND_EMPTY_SPACE_DIGGING 36 -#define SND_SAND_DIGGING 37 -#define SND_EMERALD_COLLECTING 38 -#define SND_EMERALD_IMPACT 39 -#define SND_DIAMOND_COLLECTING 40 -#define SND_DIAMOND_IMPACT 41 -#define SND_DIAMOND_BREAKING 42 -#define SND_ROCK_PUSHING 43 -#define SND_ROCK_IMPACT 44 -#define SND_BOMB_PUSHING 45 -#define SND_NUT_PUSHING 46 -#define SND_NUT_CRACKING 47 -#define SND_NUT_IMPACT 48 -#define SND_DYNAMITE_COLLECTING 49 -#define SND_DYNAMITE_PLACING 50 -#define SND_DYNAMITE_BURNING 51 -#define SND_KEY_COLLECTING 52 -#define SND_GATE_PASSING 53 -#define SND_BUG_MOVING 54 -#define SND_SPACESHIP_MOVING 55 -#define SND_YAMYAM_MOVING 56 -#define SND_YAMYAM_WAITING 57 -#define SND_YAMYAM_EATING_DIAMOND 58 -#define SND_ROBOT_MOVING 59 -#define SND_ROBOT_WHEEL_ACTIVATING 60 -#define SND_ROBOT_WHEEL_RUNNING 61 -#define SND_MAGIC_WALL_ACTIVATING 62 -#define SND_MAGIC_WALL_CHANGING 63 -#define SND_MAGIC_WALL_RUNNING 64 -#define SND_AMOEBA_GROWING 65 -#define SND_AMOEBA_DROPPING 66 -#define SND_ACID_SPLASHING 67 -#define SND_QUICKSAND_FILLING 68 -#define SND_QUICKSAND_SLIPPING_THROUGH 69 -#define SND_QUICKSAND_EMPTYING 70 -#define SND_EXIT_OPENING 71 -#define SND_EXIT_ENTERING 72 -#define SND_BALLOON_MOVING 73 -#define SND_BALLOON_PUSHING 74 -#define SND_SPRING_MOVING 75 -#define SND_SPRING_PUSHING 76 -#define SND_SPRING_IMPACT 77 -#define SND_WALL_GROWING 78 -#define SND_PEARL_COLLECTING 79 -#define SND_PEARL_BREAKING 80 -#define SND_PEARL_IMPACT 81 -#define SND_CRYSTAL_COLLECTING 82 -#define SND_CRYSTAL_IMPACT 83 -#define SND_ENVELOPE_COLLECTING 84 -#define SND_SAND_INVISIBLE_DIGGING 85 -#define SND_SHIELD_PASSIVE_COLLECTING 86 -#define SND_SHIELD_PASSIVE_ACTIVATED 87 -#define SND_SHIELD_ACTIVE_COLLECTING 88 -#define SND_SHIELD_ACTIVE_ACTIVATED 89 -#define SND_EXTRA_TIME_COLLECTING 90 -#define SND_MOLE_MOVING 91 -#define SND_MOLE_EATING_AMOEBA 92 -#define SND_SWITCHGATE_SWITCH_ACTIVATING 93 -#define SND_SWITCHGATE_OPENING 94 -#define SND_SWITCHGATE_CLOSING 95 -#define SND_SWITCHGATE_PASSING 96 -#define SND_TIMEGATE_WHEEL_ACTIVATING 97 -#define SND_TIMEGATE_WHEEL_RUNNING 98 -#define SND_TIMEGATE_OPENING 99 -#define SND_TIMEGATE_CLOSING 100 -#define SND_TIMEGATE_PASSING 101 -#define SND_CONVEYOR_BELT_SWITCH_ACTIVATING 102 -#define SND_CONVEYOR_BELT_RUNNING 103 -#define SND_LIGHT_SWITCH_ACTIVATING 104 -#define SND_LIGHT_SWITCH_DEACTIVATING 105 -#define SND_DX_BOMB_PUSHING 106 -#define SND_TRAP_INACTIVE_DIGGING 107 -#define SND_TRAP_ACTIVATING 108 -#define SND_AMOEBA_TURNING_TO_GEM 109 -#define SND_AMOEBA_TURNING_TO_ROCK 110 -#define SND_SPEED_PILL_COLLECTING 111 -#define SND_DYNABOMB_NR_COLLECTING 112 -#define SND_DYNABOMB_SZ_COLLECTING 113 -#define SND_DYNABOMB_XL_COLLECTING 114 -#define SND_DYNABOMB_PLACING 115 -#define SND_DYNABOMB_BURNING 116 -#define SND_SATELLITE_MOVING 117 -#define SND_SATELLITE_PUSHING 118 -#define SND_LAMP_ACTIVATING 119 -#define SND_LAMP_DEACTIVATING 120 -#define SND_TIME_ORB_FULL_COLLECTING 121 -#define SND_TIME_ORB_FULL_IMPACT 122 -#define SND_TIME_ORB_EMPTY_PUSHING 123 -#define SND_TIME_ORB_EMPTY_IMPACT 124 -#define SND_GAMEOFLIFE_GROWING 125 -#define SND_BIOMAZE_GROWING 126 -#define SND_PACMAN_MOVING 127 -#define SND_PACMAN_EATING_AMOEBA 128 -#define SND_DARK_YAMYAM_MOVING 129 -#define SND_DARK_YAMYAM_WAITING 130 -#define SND_DARK_YAMYAM_EATING_ANY 131 -#define SND_PENGUIN_MOVING 132 -#define SND_PENGUIN_ENTERING_EXIT 133 -#define SND_PIG_MOVING 134 -#define SND_PIG_EATING_GEM 135 -#define SND_DRAGON_MOVING 136 -#define SND_DRAGON_BREATHING_FIRE 137 -#define SND_PLAYER_DYING 138 -#define SND_ELEMENT_EXPLODING 139 -#define SND_GAME_STARTING 140 -#define SND_GAME_RUNNING_OUT_OF_TIME 141 -#define SND_GAME_LEVELTIME_BONUS 142 -#define SND_GAME_LOSING 143 -#define SND_GAME_WINNING 144 -#define SND_MENU_DOOR_OPENING 145 -#define SND_MENU_DOOR_CLOSING 146 -#define SND_MENU_HALL_OF_FAME 147 -#define SND_MENU_INFO_SCREEN 148 - -#define NUM_SOUND_EFFECTS 149 +#define SND_BD_AMOEBA_WAITING 9 +#define SND_BD_AMOEBA_CREATING 10 +#define SND_BD_AMOEBA_GROWING 11 +#define SND_BD_AMOEBA_TURNING_TO_GEM 12 +#define SND_BD_AMOEBA_TURNING_TO_ROCK 13 +#define SND_BD_BUTTERFLY_MOVING 14 +#define SND_BD_BUTTERFLY_WAITING 15 +#define SND_BD_FIREFLY_MOVING 16 +#define SND_BD_FIREFLY_WAITING 17 +#define SND_BD_EXIT_ENTERING 18 +#define SND_SP_EMPTY_SPACE_DIGGING 19 +#define SND_SP_BASE_DIGGING 20 +#define SND_SP_BUGGY_BASE_DIGGING 21 +#define SND_SP_BUGGY_BASE_ACTIVATING 22 +#define SND_SP_INFOTRON_COLLECTING 23 +#define SND_SP_INFOTRON_IMPACT 24 +#define SND_SP_ZONK_PUSHING 25 +#define SND_SP_ZONK_IMPACT 26 +#define SND_SP_DISK_RED_COLLECTING 27 +#define SND_SP_DISK_ORANGE_PUSHING 28 +#define SND_SP_DISK_YELLOW_PUSHING 29 +#define SND_SP_PORT_PASSING 30 +#define SND_SP_EXIT_ENTERING 31 +#define SND_SP_ELEMENT_EXPLODING 32 +#define SND_SP_SNIKSNAK_MOVING 33 +#define SND_SP_SNIKSNAK_WAITING 34 +#define SND_SP_ELECTRON_MOVING 35 +#define SND_SP_ELECTRON_WAITING 36 +#define SND_SP_TERMINAL_ACTIVATING 37 +#define SND_SOKOBAN_OBJECT_PUSHING 38 +#define SND_SOKOBAN_FIELD_FILLING 39 +#define SND_SOKOBAN_FIELD_CLEARING 40 +#define SND_SOKOBAN_GAME_SOLVING 41 +#define SND_EMPTY_SPACE_DIGGING 42 +#define SND_SAND_DIGGING 43 +#define SND_EMERALD_COLLECTING 44 +#define SND_EMERALD_IMPACT 45 +#define SND_DIAMOND_COLLECTING 46 +#define SND_DIAMOND_IMPACT 47 +#define SND_DIAMOND_BREAKING 48 +#define SND_ROCK_PUSHING 49 +#define SND_ROCK_IMPACT 50 +#define SND_BOMB_PUSHING 51 +#define SND_NUT_PUSHING 52 +#define SND_NUT_CRACKING 53 +#define SND_NUT_IMPACT 54 +#define SND_DYNAMITE_COLLECTING 55 +#define SND_DYNAMITE_PLACING 56 +#define SND_DYNAMITE_BURNING 57 +#define SND_KEY_COLLECTING 58 +#define SND_GATE_PASSING 59 +#define SND_BUG_MOVING 60 +#define SND_BUG_WAITING 61 +#define SND_SPACESHIP_MOVING 62 +#define SND_SPACESHIP_WAITING 63 +#define SND_YAMYAM_MOVING 64 +#define SND_YAMYAM_WAITING 65 +#define SND_YAMYAM_EATING_DIAMOND 66 +#define SND_ROBOT_STEPPING 67 +#define SND_ROBOT_WAITING 68 +#define SND_ROBOT_WHEEL_ACTIVATING 69 +#define SND_ROBOT_WHEEL_RUNNING 70 +#define SND_MAGIC_WALL_ACTIVATING 71 +#define SND_MAGIC_WALL_CHANGING 72 +#define SND_MAGIC_WALL_RUNNING 73 +#define SND_AMOEBA_WAITING 74 +#define SND_AMOEBA_CREATING 75 +#define SND_AMOEBA_GROWING 76 +#define SND_AMOEBA_DROPPING 77 +#define SND_ACID_SPLASHING 78 +#define SND_QUICKSAND_FILLING 79 +#define SND_QUICKSAND_SLIPPING_THROUGH 80 +#define SND_QUICKSAND_EMPTYING 81 +#define SND_EXIT_OPENING 82 +#define SND_EXIT_ENTERING 83 +#define SND_BALLOON_MOVING 84 +#define SND_BALLOON_WAITING 85 +#define SND_BALLOON_PUSHING 86 +#define SND_BALLOON_SWITCH_ACTIVATING 87 +#define SND_SPRING_MOVING 88 +#define SND_SPRING_PUSHING 89 +#define SND_SPRING_IMPACT 90 +#define SND_WALL_GROWING 91 +#define SND_PEARL_COLLECTING 92 +#define SND_PEARL_BREAKING 93 +#define SND_PEARL_IMPACT 94 +#define SND_CRYSTAL_COLLECTING 95 +#define SND_CRYSTAL_IMPACT 96 +#define SND_ENVELOPE_COLLECTING 97 +#define SND_SAND_INVISIBLE_DIGGING 98 +#define SND_SHIELD_PASSIVE_COLLECTING 99 +#define SND_SHIELD_PASSIVE_ACTIVATED 100 +#define SND_SHIELD_ACTIVE_COLLECTING 101 +#define SND_SHIELD_ACTIVE_ACTIVATED 102 +#define SND_EXTRA_TIME_COLLECTING 103 +#define SND_MOLE_MOVING 104 +#define SND_MOLE_WAITING 105 +#define SND_MOLE_EATING_AMOEBA 106 +#define SND_SWITCHGATE_SWITCH_ACTIVATING 107 +#define SND_SWITCHGATE_OPENING 108 +#define SND_SWITCHGATE_CLOSING 109 +#define SND_SWITCHGATE_PASSING 110 +#define SND_TIMEGATE_WHEEL_ACTIVATING 111 +#define SND_TIMEGATE_WHEEL_RUNNING 112 +#define SND_TIMEGATE_OPENING 113 +#define SND_TIMEGATE_CLOSING 114 +#define SND_TIMEGATE_PASSING 115 +#define SND_CONVEYOR_BELT_SWITCH_ACTIVATING 116 +#define SND_CONVEYOR_BELT_RUNNING 117 +#define SND_LIGHT_SWITCH_ACTIVATING 118 +#define SND_LIGHT_SWITCH_DEACTIVATING 119 +#define SND_DX_BOMB_PUSHING 120 +#define SND_TRAP_INACTIVE_DIGGING 121 +#define SND_TRAP_ACTIVATING 122 +#define SND_TUBE_PASSING 123 +#define SND_AMOEBA_TURNING_TO_GEM 124 +#define SND_AMOEBA_TURNING_TO_ROCK 125 +#define SND_SPEED_PILL_COLLECTING 126 +#define SND_DYNABOMB_NR_COLLECTING 127 +#define SND_DYNABOMB_SZ_COLLECTING 128 +#define SND_DYNABOMB_XL_COLLECTING 129 +#define SND_DYNABOMB_PLACING 130 +#define SND_DYNABOMB_BURNING 131 +#define SND_SATELLITE_MOVING 132 +#define SND_SATELLITE_WAITING 133 +#define SND_SATELLITE_PUSHING 134 +#define SND_LAMP_ACTIVATING 135 +#define SND_LAMP_DEACTIVATING 136 +#define SND_TIME_ORB_FULL_COLLECTING 137 +#define SND_TIME_ORB_FULL_IMPACT 138 +#define SND_TIME_ORB_EMPTY_PUSHING 139 +#define SND_TIME_ORB_EMPTY_IMPACT 140 +#define SND_GAMEOFLIFE_WAITING 141 +#define SND_GAMEOFLIFE_CREATING 142 +#define SND_GAMEOFLIFE_GROWING 143 +#define SND_BIOMAZE_WAITING 144 +#define SND_BIOMAZE_CREATING 145 +#define SND_BIOMAZE_GROWING 146 +#define SND_PACMAN_MOVING 147 +#define SND_PACMAN_WAITING 148 +#define SND_PACMAN_EATING_AMOEBA 149 +#define SND_DARK_YAMYAM_MOVING 150 +#define SND_DARK_YAMYAM_WAITING 151 +#define SND_DARK_YAMYAM_EATING_ANY 152 +#define SND_PENGUIN_MOVING 153 +#define SND_PENGUIN_WAITING 154 +#define SND_PENGUIN_ENTERING_EXIT 155 +#define SND_PIG_MOVING 156 +#define SND_PIG_WAITING 157 +#define SND_PIG_EATING_GEM 158 +#define SND_DRAGON_MOVING 159 +#define SND_DRAGON_WAITING 160 +#define SND_DRAGON_ATTACKING 161 +#define SND_PLAYER_DYING 162 +#define SND_ELEMENT_EXPLODING 163 +#define SND_GAME_STARTING 164 +#define SND_GAME_RUNNING_OUT_OF_TIME 165 +#define SND_GAME_LEVELTIME_BONUS 166 +#define SND_GAME_LOSING 167 +#define SND_GAME_WINNING 168 +#define SND_MENU_DOOR_OPENING 169 +#define SND_MENU_DOOR_CLOSING 170 +#define SND_MENU_HALL_OF_FAME 171 +#define SND_MENU_INFO_SCREEN 172 + +#define NUM_SOUND_EFFECTS 173 /* values for game_status */ diff --git a/src/timestamp.h b/src/timestamp.h index b3b1a58d..5f5a2fae 100644 --- a/src/timestamp.h +++ b/src/timestamp.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "[2002-05-20 23:45]" +#define COMPILE_DATE_STRING "[2002-05-26 22:32]" -- 2.34.1