From: Holger Schemel Date: Sun, 29 Aug 1999 18:52:59 +0000 (+0200) Subject: rnd-19990829-2-src X-Git-Tag: 1.4.0^2~19 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=5b0dc92b2f5aba6cebec2c334728a4d17a3d75df;p=rocksndiamonds.git rnd-19990829-2-src --- diff --git a/src/editor.c b/src/editor.c index 50988c0d..f3feeba7 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1076,6 +1076,11 @@ int editor_element[] = EL_SWITCHGATE_SWITCH_1, EL_ENVELOPE, + EL_TIMEGATE_CLOSED, + EL_TIMEGATE_OPEN, + EL_TIMEGATE_SWITCH_OFF, + EL_LEERRAUM, + EL_LANDMINE, EL_SAND_INVISIBLE, EL_STEEL_SLANTED, @@ -1086,10 +1091,10 @@ int editor_element[] = EL_LIGHT_SWITCH_OFF, EL_LIGHT_SWITCH_ON, - EL_FORCE_FIELD_PASSIVE, + EL_SHIELD_PASSIVE, + EL_SHIELD_ACTIVE, EL_EXTRA_TIME, EL_LEERRAUM, - EL_FORCE_FIELD_ACTIVE, /* EL_CHAR('D'), diff --git a/src/files.c b/src/files.c index ce0a95be..364a0462 100644 --- a/src/files.c +++ b/src/files.c @@ -355,6 +355,8 @@ static void setLevelInfoToDefaults() level.amoeba_speed = 10; level.time_magic_wall = 10; level.time_wheel = 10; + level.time_light = 10; + level.time_timegate = 10; level.amoeba_content = EL_DIAMANT; level.double_speed = FALSE; level.gravity = FALSE; diff --git a/src/game.c b/src/game.c index d7fb2368..e3fc38ba 100644 --- a/src/game.c +++ b/src/game.c @@ -101,8 +101,9 @@ #define NUM_GAME_BUTTONS 6 /* forward declaration for internal use */ +static void CloseAllOpenTimegates(void); static void CheckGravityMovement(struct PlayerInfo *); -static void KillHeroUnlessForceField(struct PlayerInfo *); +static void KillHeroUnlessShield(struct PlayerInfo *); static void MapGameButtons(); static void HandleGameButtons(struct GadgetInfo *); @@ -408,7 +409,7 @@ static void InitField(int x, int y, boolean init_game) case EL_LIGHT_SWITCH_ON: if (init_game) - game.light_time_left = 10 * FRAMES_PER_SECOND; + game.light_time_left = level.time_light * FRAMES_PER_SECOND; break; default: @@ -480,8 +481,8 @@ void InitGame() player->last_jx = player->last_jy = 0; player->jx = player->jy = 0; - player->force_field_passive_time_left = 0; - player->force_field_active_time_left = 0; + player->shield_passive_time_left = 0; + player->shield_active_time_left = 0; DigField(player, 0, 0, 0, 0, DF_NO_PUSH); SnapField(player, 0, 0); @@ -515,8 +516,10 @@ void InitGame() AllPlayersGone = FALSE; game.magic_wall_active = FALSE; game.magic_wall_time_left = 0; - game.switchgate_pos = 0; game.light_time_left = 0; + game.timegate_time_left = 0; + game.switchgate_pos = 0; + for (i=0; i<4; i++) { game.belt_dir[i] = MV_NO_MOVING; @@ -696,6 +699,11 @@ void InitGame() DrawAllPlayers(); FadeToFront(); + /* after drawing the level, corect some elements */ + + if (game.timegate_time_left == 0) + CloseAllOpenTimegates(); + if (setup.soft_scrolling) XCopyArea(display, fieldbuffer, backbuffer, gc, FX, FY, SXSIZE, SYSIZE, SX, SY); @@ -1257,7 +1265,7 @@ void Explode(int ex, int ey, int phase, int mode) if (IS_MASSIVE(element) || element == EL_BURNING) continue; - if (IS_PLAYER(x, y) && FORCE_FIELD_ON(PLAYERINFO(x, y))) + if (IS_PLAYER(x, y) && SHIELD_ON(PLAYERINFO(x, y))) { if (IS_ACTIVE_BOMB(element)) { @@ -1272,7 +1280,7 @@ void Explode(int ex, int ey, int phase, int mode) if (element == EL_EXPLODING) element = Store2[x][y]; - if (IS_PLAYER(ex, ey) && !FORCE_FIELD_ON(PLAYERINFO(ex, ey))) + if (IS_PLAYER(ex, ey) && !SHIELD_ON(PLAYERINFO(ex, ey))) { switch(StorePlayer[ex][ey]) { @@ -1373,7 +1381,7 @@ void Explode(int ex, int ey, int phase, int mode) int element = Store2[x][y]; if (IS_PLAYER(x, y)) - KillHeroUnlessForceField(PLAYERINFO(x, y)); + KillHeroUnlessShield(PLAYERINFO(x, y)); else if (IS_EXPLOSIVE(element)) { Feld[x][y] = Store2[x][y]; @@ -1650,39 +1658,79 @@ static void ToggleSwitchgateSwitch(int x, int y) } } -static void ToggleLightSwitch(int x, int y) +static void RedrawAllLightSwitchesAndInvisibleElements() { - int element = Feld[x][y]; - int xx, yy; - - game.light_time_left = - (element == EL_LIGHT_SWITCH_OFF ? 10 * FRAMES_PER_SECOND : 0); + int x, y; - for (yy=0; yy 0) { - Feld[xx][yy] = EL_LIGHT_SWITCH_ON; - DrawLevelField(xx, yy); + Feld[x][y] = EL_LIGHT_SWITCH_ON; + DrawLevelField(x, y); } else if (element == EL_LIGHT_SWITCH_ON && game.light_time_left == 0) { - Feld[xx][yy] = EL_LIGHT_SWITCH_OFF; - DrawLevelField(xx, yy); + Feld[x][y] = EL_LIGHT_SWITCH_OFF; + DrawLevelField(x, y); } if (element == EL_INVISIBLE_STEEL || element == EL_UNSICHTBAR || element == EL_SAND_INVISIBLE) + DrawLevelField(x, y); + } + } +} + +static void ToggleLightSwitch(int x, int y) +{ + int element = Feld[x][y]; + + game.light_time_left = + (element == EL_LIGHT_SWITCH_OFF ? + level.time_light * FRAMES_PER_SECOND : 0); + + RedrawAllLightSwitchesAndInvisibleElements(); +} + +static void ActivateTimegateSwitch(int x, int y) +{ + int xx, yy; + + game.timegate_time_left = level.time_timegate * FRAMES_PER_SECOND; + + for (yy=0; yy 0) + { + game.timegate_time_left--; + + if (game.timegate_time_left == 0) + CloseAllOpenTimegates(); + } + if (TimeFrames >= (1000 / GameFrameDelay)) { TimeFrames = 0; @@ -4220,12 +4374,12 @@ void GameActions() for (i=0; i 0) - stored_player[i].force_field_active_time_left--; + if (stored_player[i].shield_active_time_left > 0) + stored_player[i].shield_active_time_left--; } } @@ -4390,7 +4544,7 @@ boolean MoveFigureOneStep(struct PlayerInfo *player, #if 1 TestIfBadThingHitsHero(new_jx, new_jy); #else - if (player->force_field_time_left == 0) + if (player->shield_time_left == 0) KillHero(player); #endif } @@ -4710,9 +4864,9 @@ void TestIfGoodThingHitsBadThing(int goodx, int goody) { struct PlayerInfo *player = PLAYERINFO(goodx, goody); - if (player->force_field_active_time_left > 0) + if (player->shield_active_time_left > 0) Bang(killx, killy); - else if (player->force_field_passive_time_left == 0) + else if (player->shield_passive_time_left == 0) KillHero(player); } else @@ -4772,9 +4926,9 @@ void TestIfBadThingHitsGoodThing(int badx, int bady) { struct PlayerInfo *player = PLAYERINFO(killx, killy); - if (player->force_field_active_time_left > 0) + if (player->shield_active_time_left > 0) Bang(badx, bady); - else if (player->force_field_passive_time_left == 0) + else if (player->shield_passive_time_left == 0) KillHero(player); } else @@ -4846,17 +5000,17 @@ void KillHero(struct PlayerInfo *player) if (IS_PFORTE(Feld[jx][jy])) Feld[jx][jy] = EL_LEERRAUM; - /* deactivate force field (else Bang()/Explode() would not work right) */ - player->force_field_passive_time_left = 0; - player->force_field_active_time_left = 0; + /* deactivate shield (else Bang()/Explode() would not work right) */ + player->shield_passive_time_left = 0; + player->shield_active_time_left = 0; Bang(jx, jy); BuryHero(player); } -static void KillHeroUnlessForceField(struct PlayerInfo *player) +static void KillHeroUnlessShield(struct PlayerInfo *player) { - if (!FORCE_FIELD_ON(player)) + if (!SHIELD_ON(player)) KillHero(player); } @@ -4981,16 +5135,16 @@ int DigField(struct PlayerInfo *player, PlaySoundStereo(SND_GONG, PSND_MAX_RIGHT); break; - case EL_FORCE_FIELD_PASSIVE: + case EL_SHIELD_PASSIVE: RemoveField(x, y); - player->force_field_passive_time_left += 10; + player->shield_passive_time_left += 10; PlaySoundLevel(x, y, SND_PONG); break; - case EL_FORCE_FIELD_ACTIVE: + case EL_SHIELD_ACTIVE: RemoveField(x, y); - player->force_field_passive_time_left += 10; - player->force_field_active_time_left += 10; + player->shield_passive_time_left += 10; + player->shield_active_time_left += 10; PlaySoundLevel(x, y, SND_PONG); break; @@ -5137,6 +5291,12 @@ int DigField(struct PlayerInfo *player, return MF_ACTION; break; + case EL_TIMEGATE_SWITCH_OFF: + ActivateTimegateSwitch(x, y); + + return MF_ACTION; + break; + case EL_SP_EXIT: if (local_player->gems_still_needed > 0) return MF_NO_ACTION; @@ -5238,6 +5398,7 @@ int DigField(struct PlayerInfo *player, break; case EL_SWITCHGATE_OPEN: + case EL_TIMEGATE_OPEN: if (!IN_LEV_FIELD(x + dx, y + dy) || !IS_FREE(x + dx, y + dy)) return MF_NO_ACTION; diff --git a/src/init.c b/src/init.c index 78e38abe..c41f8c76 100644 --- a/src/init.c +++ b/src/init.c @@ -561,6 +561,8 @@ void InitGfx() { GFX_SOKOBAN_OBJEKT, 1 }, { GFX_FUNKELN_BLAU, 3 }, { GFX_FUNKELN_WEISS, 3 }, + { GFX2_SHIELD_PASSIVE, 3 }, + { GFX2_SHIELD_ACTIVE, 3 }, { -1, 0 } }; @@ -872,7 +874,9 @@ void InitElementProperties() EL_EM_GATE_3X, EL_EM_GATE_4X, EL_SWITCHGATE_OPEN, - EL_SWITCHGATE_CLOSED + EL_SWITCHGATE_CLOSED, + EL_TIMEGATE_OPEN, + EL_TIMEGATE_CLOSED }; static int ep_pforte_num = sizeof(ep_pforte)/sizeof(int); @@ -941,8 +945,12 @@ void InitElementProperties() EL_BELT4_SWITCH_LEFT, EL_BELT4_SWITCH_MIDDLE, EL_BELT4_SWITCH_RIGHT, + EL_SWITCHGATE_SWITCH_1, + EL_SWITCHGATE_SWITCH_2, EL_LIGHT_SWITCH_OFF, EL_LIGHT_SWITCH_ON, + EL_TIMEGATE_SWITCH_OFF, + EL_TIMEGATE_SWITCH_ON, EL_SIGN_EXCLAMATION, EL_SIGN_RADIOACTIVITY, EL_SIGN_STOP, @@ -986,6 +994,8 @@ void InitElementProperties() EL_EM_GATE_4X, EL_SWITCHGATE_OPEN, EL_SWITCHGATE_CLOSED, + EL_TIMEGATE_OPEN, + EL_TIMEGATE_CLOSED, EL_SP_HARD_GRAY, EL_SP_HARD_GREEN, EL_SP_HARD_BLUE, @@ -1613,7 +1623,8 @@ void InitElementProperties() EL_SP_PORT_X, EL_SP_PORT_Y, EL_SP_PORT_XY, - EL_SWITCHGATE_OPEN + EL_SWITCHGATE_OPEN, + EL_TIMEGATE_OPEN }; static int ep_quick_gate_num = sizeof(ep_quick_gate)/sizeof(int); diff --git a/src/main.c b/src/main.c index f6439e8f..f94664ab 100644 --- a/src/main.c +++ b/src/main.c @@ -463,14 +463,14 @@ char *element_info[] = "white door", /* 260 */ "gray door (opened by white key)", "white key", - "force field (passive)", + "shield (passive)", "extra time", "switch gate (open)", "switch gate (closed)", "switch for switch gate", "switch for switch gate", - "time gate", - "time gate with magic wheel", /* 270 */ + "-", + "-", /* 270 */ "red conveyor belt (left)", "red conveyor belt (middle)", "red conveyor belt (right)", @@ -521,10 +521,11 @@ char *element_info[] = "dx unknown 42", "-", "-", /* 320 */ - "force field (active, kills enemies)", - "-", - "-", - "-", + "shield (active, kills enemies)", + "time gate (open)", + "time gate (closed)", + "switch for time gate", + "switch for time gate", "-", "-", "-" diff --git a/src/main.h b/src/main.h index 4e6bd02f..eb644bc8 100644 --- a/src/main.h +++ b/src/main.h @@ -191,7 +191,7 @@ typedef unsigned char byte; #define TAPE_IS_STOPPED(x) (!(x).recording && !(x).playing &&!(x).pausing) #define PLAYERINFO(x,y) (&stored_player[StorePlayer[x][y]-EL_SPIELER1]) -#define FORCE_FIELD_ON(p) ((p)->force_field_passive_time_left > 0) +#define SHIELD_ON(p) ((p)->shield_passive_time_left > 0) /* Pixmaps with graphic file */ #define PIX_BACK 0 @@ -354,8 +354,8 @@ struct PlayerInfo int key[4]; int dynamite; int dynabomb_count, dynabomb_size, dynabombs_left, dynabomb_xl; - int force_field_passive_time_left; - int force_field_active_time_left; + int shield_passive_time_left; + int shield_active_time_left; }; struct LevelInfo @@ -373,6 +373,8 @@ struct LevelInfo int amoeba_content; int time_magic_wall; int time_wheel; + int time_light; + int time_timegate; boolean double_speed; boolean gravity; }; @@ -421,10 +423,11 @@ struct GameInfo int yam_content_nr; boolean magic_wall_active; int magic_wall_time_left; + int light_time_left; + int timegate_time_left; int belt_dir[4]; int belt_dir_nr[4]; int switchgate_pos; - int light_time_left; }; struct GlobalInfo @@ -853,14 +856,16 @@ extern char *element_info[]; #define EL_DOOR_WHITE 260 #define EL_DOOR_WHITE_GRAY 261 #define EL_KEY_WHITE 262 -#define EL_FORCE_FIELD_PASSIVE 263 +#define EL_SHIELD_PASSIVE 263 #define EL_EXTRA_TIME 264 #define EL_SWITCHGATE_OPEN 265 #define EL_SWITCHGATE_CLOSED 266 #define EL_SWITCHGATE_SWITCH_1 267 #define EL_SWITCHGATE_SWITCH_2 268 -#define EL_TIME_GATE 269 -#define EL_TIME_GATE_WHEEL 270 + +#define EL_UNUSED_269 269 +#define EL_UNUSED_270 270 + #define EL_BELT1_LEFT 271 #define EL_BELT1_MIDDLE 272 #define EL_BELT1_RIGHT 273 @@ -913,7 +918,11 @@ extern char *element_info[]; #define EL_UNUSED_319 319 #define EL_UNUSED_320 320 -#define EL_FORCE_FIELD_ACTIVE 321 +#define EL_SHIELD_ACTIVE 321 +#define EL_TIMEGATE_OPEN 322 +#define EL_TIMEGATE_CLOSED 323 +#define EL_TIMEGATE_SWITCH_ON 324 +#define EL_TIMEGATE_SWITCH_OFF 325 /* "real" (and therefore drawable) runtime elements */ #define EL_SIEB_LEER 500 @@ -935,6 +944,8 @@ extern char *element_info[]; #define EL_DYNABOMB_ACTIVE_4 516 #define EL_SWITCHGATE_OPENING 517 #define EL_SWITCHGATE_CLOSING 518 +#define EL_TIMEGATE_OPENING 519 +#define EL_TIMEGATE_CLOSING 520 /* "unreal" (and therefore not drawable) runtime elements */ #define EL_BLOCKED 600 @@ -1175,6 +1186,8 @@ extern char *element_info[]; #define GFX_SPIELER4_PUSH_LEFT (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE + 4) #define GFX_MAUER_DOWN (GFX_START_ROCKSHEROES +12*HEROES_PER_LINE + 0) #define GFX_MAUER_UP (GFX_START_ROCKSHEROES +12*HEROES_PER_LINE + 3) +#define GFX2_SHIELD_PASSIVE (GFX_START_ROCKSHEROES +14*HEROES_PER_LINE + 1) +#define GFX2_SHIELD_ACTIVE (GFX_START_ROCKSHEROES +14*HEROES_PER_LINE + 5) #define GFX_SONDE_START (GFX_START_ROCKSHEROES + 9*HEROES_PER_LINE + 8) #define GFX_SCHWEIN_DOWN (GFX_START_ROCKSHEROES + 0*HEROES_PER_LINE + 8) @@ -1185,18 +1198,20 @@ extern char *element_info[]; #define GFX_DRACHE_UP (GFX_START_ROCKSHEROES + 2*HEROES_PER_LINE +12) #define GFX_DRACHE_LEFT (GFX_START_ROCKSHEROES + 3*HEROES_PER_LINE + 8) #define GFX_DRACHE_RIGHT (GFX_START_ROCKSHEROES + 3*HEROES_PER_LINE +12) +/* #define GFX_MOLE_DOWN (GFX_START_ROCKSHEROES + 4*HEROES_PER_LINE + 8) #define GFX_MOLE_UP (GFX_START_ROCKSHEROES + 4*HEROES_PER_LINE +12) #define GFX_MOLE_LEFT (GFX_START_ROCKSHEROES + 5*HEROES_PER_LINE + 8) #define GFX_MOLE_RIGHT (GFX_START_ROCKSHEROES + 5*HEROES_PER_LINE +12) +*/ #define GFX_PINGUIN_DOWN (GFX_START_ROCKSHEROES + 6*HEROES_PER_LINE + 8) #define GFX_PINGUIN_UP (GFX_START_ROCKSHEROES + 6*HEROES_PER_LINE +12) #define GFX_PINGUIN_LEFT (GFX_START_ROCKSHEROES + 7*HEROES_PER_LINE + 8) #define GFX_PINGUIN_RIGHT (GFX_START_ROCKSHEROES + 7*HEROES_PER_LINE +12) #define GFX_BLURB_LEFT (GFX_START_ROCKSHEROES +10*HEROES_PER_LINE + 8) #define GFX_BLURB_RIGHT (GFX_START_ROCKSHEROES +10*HEROES_PER_LINE +12) -#define GFX_FUNKELN_BLAU (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE + 8) -#define GFX_FUNKELN_WEISS (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE +12) +#define GFX_FUNKELN_BLAU (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE + 9) +#define GFX_FUNKELN_WEISS (GFX_START_ROCKSHEROES +11*HEROES_PER_LINE +13) #define GFX_FLAMMEN_LEFT (GFX_START_ROCKSHEROES +12*HEROES_PER_LINE + 8) #define GFX_FLAMMEN_RIGHT (GFX_START_ROCKSHEROES +13*HEROES_PER_LINE + 8) #define GFX_FLAMMEN_UP (GFX_START_ROCKSHEROES +14*HEROES_PER_LINE + 8) @@ -1318,12 +1333,11 @@ extern char *element_info[]; #define GFX_BELT3_SWITCH_RIGHT (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 2) #define GFX_BELT4_SWITCH_RIGHT (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 3) -#define GFX_SWITCHGATE_OPEN (GFX_START_ROCKSDC + 15 * DC_PER_LINE + 4) -#define GFX_SWITCHGATE_CLOSED (GFX_START_ROCKSDC + 15 * DC_PER_LINE + 0) #define GFX_SWITCHGATE_SWITCH_1 (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 4) #define GFX_SWITCHGATE_SWITCH_2 (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 5) #define GFX_LIGHT_SWITCH_OFF (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 6) #define GFX_LIGHT_SWITCH_ON (GFX_START_ROCKSDC + 12 * DC_PER_LINE + 7) +#define GFX_TIMEGATE_SWITCH (GFX_START_ROCKSDC + 15 * DC_PER_LINE + 0) #define GFX_ENVELOPE (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 4) #define GFX_SIGN_EXCLAMATION (GFX_START_ROCKSDC + 14 * DC_PER_LINE + 5) @@ -1332,8 +1346,16 @@ extern char *element_info[]; #define GFX_STEEL_SLANTED (GFX_START_ROCKSDC + 15 * DC_PER_LINE + 5) #define GFX_EXTRA_TIME (GFX_START_ROCKSDC + 0 * DC_PER_LINE + 8) -#define GFX_FORCE_FIELD_PASSIVE (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 8) -#define GFX_FORCE_FIELD_ACTIVE (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 8) +#define GFX_SHIELD_ACTIVE (GFX_START_ROCKSDC + 1 * DC_PER_LINE + 8) +#define GFX_SHIELD_PASSIVE (GFX_START_ROCKSDC + 2 * DC_PER_LINE + 8) +#define GFX_MOLE_DOWN (GFX_START_ROCKSDC + 3 * DC_PER_LINE + 8) +#define GFX_MOLE_UP (GFX_START_ROCKSDC + 3 * DC_PER_LINE + 12) +#define GFX_MOLE_LEFT (GFX_START_ROCKSDC + 4 * DC_PER_LINE + 8) +#define GFX_MOLE_RIGHT (GFX_START_ROCKSDC + 4 * DC_PER_LINE + 12) +#define GFX_SWITCHGATE_CLOSED (GFX_START_ROCKSDC + 5 * DC_PER_LINE + 8) +#define GFX_SWITCHGATE_OPEN (GFX_START_ROCKSDC + 5 * DC_PER_LINE + 12) +#define GFX_TIMEGATE_CLOSED (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 8) +#define GFX_TIMEGATE_OPEN (GFX_START_ROCKSDC + 6 * DC_PER_LINE + 12) /* graphics from "RocksFont" */ #define GFX_CHAR_START (GFX_START_ROCKSFONT) @@ -1375,8 +1397,6 @@ extern char *element_info[]; #define GFX_DOOR_WHITE GFX_CHAR_FRAGE #define GFX_DOOR_WHITE_GRAY GFX_CHAR_FRAGE #define GFX_KEY_WHITE GFX_CHAR_FRAGE -#define GFX_TIME_GATE GFX_CHAR_FRAGE -#define GFX_TIME_GATE_WHEEL GFX_CHAR_FRAGE #define GFX_SIGN_RADIOACTIVITY GFX_CHAR_FRAGE #define GFX_SIGN_WHEELCHAIR GFX_CHAR_FRAGE #define GFX_SIGN_PARKING GFX_CHAR_FRAGE diff --git a/src/tools.c b/src/tools.c index 046d47c4..fbd0ca17 100644 --- a/src/tools.c +++ b/src/tools.c @@ -606,9 +606,14 @@ void DrawPlayer(struct PlayerInfo *player) DrawGraphicShiftedThruMask(sx, sy, sxx, syy, graphic, NO_CUTTING); - if (FORCE_FIELD_ON(player)) - DrawGraphicAnimationShiftedThruMask(sx, sy, sxx, syy, GFX_FUNKELN_BLAU, + if (SHIELD_ON(player)) + { + int graphic = (player->shield_active_time_left ? GFX2_SHIELD_ACTIVE : + GFX2_SHIELD_PASSIVE); + + DrawGraphicAnimationShiftedThruMask(sx, sy, sxx, syy, graphic, 3, 8, ANIM_OSCILLATE); + } if (player->Pushing && player->GfxPos) { @@ -2504,15 +2509,13 @@ int el2gfx(int element) case EL_DOOR_WHITE: return GFX_DOOR_WHITE; case EL_DOOR_WHITE_GRAY: return GFX_DOOR_WHITE_GRAY; case EL_KEY_WHITE: return GFX_KEY_WHITE; - case EL_FORCE_FIELD_PASSIVE:return GFX_FORCE_FIELD_PASSIVE; - case EL_FORCE_FIELD_ACTIVE: return GFX_FORCE_FIELD_ACTIVE; + case EL_SHIELD_PASSIVE: return GFX_SHIELD_PASSIVE; + case EL_SHIELD_ACTIVE: return GFX_SHIELD_ACTIVE; case EL_EXTRA_TIME: return GFX_EXTRA_TIME; case EL_SWITCHGATE_OPEN: return GFX_SWITCHGATE_OPEN; case EL_SWITCHGATE_CLOSED: return GFX_SWITCHGATE_CLOSED; case EL_SWITCHGATE_SWITCH_1:return GFX_SWITCHGATE_SWITCH_1; case EL_SWITCHGATE_SWITCH_2:return GFX_SWITCHGATE_SWITCH_2; - case EL_TIME_GATE: return GFX_TIME_GATE; - case EL_TIME_GATE_WHEEL: return GFX_TIME_GATE_WHEEL; case EL_BELT1_LEFT: return GFX_BELT1_LEFT; case EL_BELT1_MIDDLE: return GFX_BELT1_MIDDLE; case EL_BELT1_RIGHT: return GFX_BELT1_RIGHT; @@ -2561,6 +2564,10 @@ int el2gfx(int element) case EL_SAND_INVISIBLE: return GFX_SAND_INVISIBLE; case EL_DX_UNKNOWN_15: return GFX_DX_UNKNOWN_15; case EL_DX_UNKNOWN_42: return GFX_DX_UNKNOWN_42; + case EL_TIMEGATE_OPEN: return GFX_TIMEGATE_OPEN; + case EL_TIMEGATE_CLOSED: return GFX_TIMEGATE_CLOSED; + case EL_TIMEGATE_SWITCH_ON: return GFX_TIMEGATE_SWITCH; + case EL_TIMEGATE_SWITCH_OFF:return GFX_TIMEGATE_SWITCH; default: {