From: Holger Schemel Date: Wed, 28 Mar 2007 23:04:46 +0000 (+0200) Subject: rnd-20070329-1-src X-Git-Tag: 3.2.4^2~54 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a1810845210edd7c609a0ce30d235c487a79a1c0;p=rocksndiamonds.git rnd-20070329-1-src * added displaying of most game panel control elements (not animated) --- diff --git a/ChangeLog b/ChangeLog index cce0d41b..8c5aafdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-03-28 + * added displaying of most game panel control elements (not animated) + 2007-03-26 * added new configuration directives to display additional game engine values on the game control panel, like the following examples: @@ -5,6 +8,9 @@ - game.panel.penguins - number of penguins to rescue - game.panel.level_name - level name of current level +2007-03-24 + * added support for preview tile sizes "1" and "2" (1x1 and 2x2 pixels) + 2007-03-23 * added new player option "no centering when relocating" for "invisible" teleportations to level areas that look exactly the same, giving the diff --git a/src/conf_gfx.c b/src/conf_gfx.c index 62727950..969f8b28 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -5586,12 +5586,6 @@ struct ConfigInfo image_config[] = { "game.panel.emc_magic_ball.y", "-1" }, { "game.panel.emc_magic_ball_switch.x", "-1" }, { "game.panel.emc_magic_ball_switch.y", "-1" }, - { "game.panel.emc_magic_ball_time.x", "-1" }, - { "game.panel.emc_magic_ball_time.y", "-1" }, - { "game.panel.emc_magic_ball_time.align", "left" }, - { "game.panel.emc_magic_ball_time.valign", "top" }, - { "game.panel.emc_magic_ball_time.chars", "-1" }, - { "game.panel.emc_magic_ball_time.font", "font.text_2" }, { "game.panel.light_switch.x", "-1" }, { "game.panel.light_switch.y", "-1" }, diff --git a/src/conf_var.c b/src/conf_var.c index f9e708ef..349a5991 100644 --- a/src/conf_var.c +++ b/src/conf_var.c @@ -2328,30 +2328,6 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.emc_magic_ball_switch.y", &game.panel.emc_magic_ball_switch.y }, - { - "game.panel.emc_magic_ball_time.x", - &game.panel.emc_magic_ball_time.x - }, - { - "game.panel.emc_magic_ball_time.y", - &game.panel.emc_magic_ball_time.y - }, - { - "game.panel.emc_magic_ball_time.align", - &game.panel.emc_magic_ball_time.align - }, - { - "game.panel.emc_magic_ball_time.valign", - &game.panel.emc_magic_ball_time.valign - }, - { - "game.panel.emc_magic_ball_time.chars", - &game.panel.emc_magic_ball_time.chars - }, - { - "game.panel.emc_magic_ball_time.font", - &game.panel.emc_magic_ball_time.font - }, { "game.panel.light_switch.x", &game.panel.light_switch.x diff --git a/src/conftime.h b/src/conftime.h index e4ecb8a0..b19271da 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-03-27 00:25" +#define COMPILE_DATE_STRING "2007-03-29 01:00" diff --git a/src/game.c b/src/game.c index 4b4a44cf..25407197 100644 --- a/src/game.c +++ b/src/game.c @@ -168,41 +168,40 @@ #define GAME_CONTROL_EM_STEEL_EXIT 34 #define GAME_CONTROL_EMC_MAGIC_BALL 35 #define GAME_CONTROL_EMC_MAGIC_BALL_SWITCH 36 -#define GAME_CONTROL_EMC_MAGIC_BALL_TIME 37 -#define GAME_CONTROL_LIGHT_SWITCH 38 -#define GAME_CONTROL_LIGHT_SWITCH_TIME 39 -#define GAME_CONTROL_TIMEGATE_SWITCH 40 -#define GAME_CONTROL_TIMEGATE_SWITCH_TIME 41 -#define GAME_CONTROL_SWITCHGATE_SWITCH 42 -#define GAME_CONTROL_EMC_LENSES 43 -#define GAME_CONTROL_EMC_LENSES_TIME 44 -#define GAME_CONTROL_EMC_MAGNIFIER 45 -#define GAME_CONTROL_EMC_MAGNIFIER_TIME 46 -#define GAME_CONTROL_BALLOON_SWITCH 47 -#define GAME_CONTROL_DYNABOMB_NUMBER 48 -#define GAME_CONTROL_DYNABOMB_SIZE 49 -#define GAME_CONTROL_DYNABOMB_POWER 50 -#define GAME_CONTROL_PENGUINS 51 -#define GAME_CONTROL_SOKOBAN_OBJECTS 52 -#define GAME_CONTROL_SOKOBAN_FIELDS 53 -#define GAME_CONTROL_ROBOT_WHEEL 54 -#define GAME_CONTROL_CONVEYOR_BELT_1 55 -#define GAME_CONTROL_CONVEYOR_BELT_1_SWITCH 56 -#define GAME_CONTROL_CONVEYOR_BELT_2 57 -#define GAME_CONTROL_CONVEYOR_BELT_2_SWITCH 58 -#define GAME_CONTROL_CONVEYOR_BELT_3 59 -#define GAME_CONTROL_CONVEYOR_BELT_3_SWITCH 60 -#define GAME_CONTROL_CONVEYOR_BELT_4 61 -#define GAME_CONTROL_CONVEYOR_BELT_4_SWITCH 62 -#define GAME_CONTROL_MAGIC_WALL 63 -#define GAME_CONTROL_MAGIC_WALL_TIME 64 -#define GAME_CONTROL_BD_MAGIC_WALL 65 -#define GAME_CONTROL_DC_MAGIC_WALL 66 -#define GAME_CONTROL_PLAYER_NAME 67 -#define GAME_CONTROL_LEVEL_NAME 68 -#define GAME_CONTROL_LEVEL_AUTHOR 69 - -#define NUM_GAME_CONTROLS 70 +#define GAME_CONTROL_LIGHT_SWITCH 37 +#define GAME_CONTROL_LIGHT_SWITCH_TIME 38 +#define GAME_CONTROL_TIMEGATE_SWITCH 39 +#define GAME_CONTROL_TIMEGATE_SWITCH_TIME 40 +#define GAME_CONTROL_SWITCHGATE_SWITCH 41 +#define GAME_CONTROL_EMC_LENSES 42 +#define GAME_CONTROL_EMC_LENSES_TIME 43 +#define GAME_CONTROL_EMC_MAGNIFIER 44 +#define GAME_CONTROL_EMC_MAGNIFIER_TIME 45 +#define GAME_CONTROL_BALLOON_SWITCH 46 +#define GAME_CONTROL_DYNABOMB_NUMBER 47 +#define GAME_CONTROL_DYNABOMB_SIZE 48 +#define GAME_CONTROL_DYNABOMB_POWER 49 +#define GAME_CONTROL_PENGUINS 50 +#define GAME_CONTROL_SOKOBAN_OBJECTS 51 +#define GAME_CONTROL_SOKOBAN_FIELDS 52 +#define GAME_CONTROL_ROBOT_WHEEL 53 +#define GAME_CONTROL_CONVEYOR_BELT_1 54 +#define GAME_CONTROL_CONVEYOR_BELT_1_SWITCH 55 +#define GAME_CONTROL_CONVEYOR_BELT_2 56 +#define GAME_CONTROL_CONVEYOR_BELT_2_SWITCH 57 +#define GAME_CONTROL_CONVEYOR_BELT_3 58 +#define GAME_CONTROL_CONVEYOR_BELT_3_SWITCH 59 +#define GAME_CONTROL_CONVEYOR_BELT_4 60 +#define GAME_CONTROL_CONVEYOR_BELT_4_SWITCH 61 +#define GAME_CONTROL_MAGIC_WALL 62 +#define GAME_CONTROL_MAGIC_WALL_TIME 63 +#define GAME_CONTROL_BD_MAGIC_WALL 64 +#define GAME_CONTROL_DC_MAGIC_WALL 65 +#define GAME_CONTROL_PLAYER_NAME 66 +#define GAME_CONTROL_LEVEL_NAME 67 +#define GAME_CONTROL_LEVEL_AUTHOR 68 + +#define NUM_GAME_CONTROLS 69 int game_control_value[NUM_GAME_CONTROLS]; int last_game_control_value[NUM_GAME_CONTROLS]; @@ -402,11 +401,6 @@ static struct GameControlInfo game_controls[] = &game.panel.emc_magic_ball_switch, TYPE_ELEMENT, }, - { - GAME_CONTROL_EMC_MAGIC_BALL_TIME, - &game.panel.emc_magic_ball_time, - TYPE_INTEGER, - }, { GAME_CONTROL_LIGHT_SWITCH, &game.panel.light_switch, @@ -1746,6 +1740,8 @@ void InitGameControlValues() /* determine panel value width for later calculation of alignment */ if (type == TYPE_INTEGER || type == TYPE_STRING) pos->width = pos->chars * getFontWidth(pos->font); + else if (type == TYPE_ELEMENT) + pos->width = MINI_TILESIZE; } } @@ -1811,50 +1807,73 @@ void UpdateGameControlValues() game_control_value[GAME_CONTROL_TIME_SS] = TapeTime % 60; for (i = 0; i < 8; i++) - game_control_value[GAME_CONTROL_DROP_NEXT_1 + i] = 0; + game_control_value[GAME_CONTROL_DROP_NEXT_1 + i] = EL_UNDEFINED; game_control_value[GAME_CONTROL_SHIELD_NORMAL] = - (local_player->shield_normal_time_left > 0 ? 1 : 0); + (local_player->shield_normal_time_left > 0 ? EL_SHIELD_NORMAL_ACTIVE : + EL_EMPTY); game_control_value[GAME_CONTROL_SHIELD_NORMAL_TIME] = local_player->shield_normal_time_left; game_control_value[GAME_CONTROL_SHIELD_DEADLY] = - (local_player->shield_deadly_time_left > 0 ? 1 : 0); + (local_player->shield_deadly_time_left > 0 ? EL_SHIELD_DEADLY_ACTIVE : + EL_EMPTY); game_control_value[GAME_CONTROL_SHIELD_DEADLY_TIME] = local_player->shield_deadly_time_left; - game_control_value[GAME_CONTROL_EXIT] = 0; - game_control_value[GAME_CONTROL_EM_EXIT] = 0; - game_control_value[GAME_CONTROL_SP_EXIT] = 0; - game_control_value[GAME_CONTROL_STEEL_EXIT] = 0; - game_control_value[GAME_CONTROL_EM_STEEL_EXIT] = 0; + if (local_player->gems_still_needed > 0 || + local_player->sokobanfields_still_needed > 0 || + local_player->lights_still_needed > 0) + { + game_control_value[GAME_CONTROL_EXIT] = EL_EXIT_CLOSED; + game_control_value[GAME_CONTROL_EM_EXIT] = EL_EM_EXIT_CLOSED; + game_control_value[GAME_CONTROL_SP_EXIT] = EL_SP_EXIT_CLOSED; + game_control_value[GAME_CONTROL_STEEL_EXIT] = EL_STEEL_EXIT_CLOSED; + game_control_value[GAME_CONTROL_EM_STEEL_EXIT] = EL_EM_STEEL_EXIT_CLOSED; + } + else + { + game_control_value[GAME_CONTROL_EXIT] = EL_EXIT_OPEN; + game_control_value[GAME_CONTROL_EM_EXIT] = EL_EM_EXIT_OPEN; + game_control_value[GAME_CONTROL_SP_EXIT] = EL_SP_EXIT_OPEN; + game_control_value[GAME_CONTROL_STEEL_EXIT] = EL_STEEL_EXIT_OPEN; + game_control_value[GAME_CONTROL_EM_STEEL_EXIT] = EL_EM_STEEL_EXIT_OPEN; + } - game_control_value[GAME_CONTROL_EMC_MAGIC_BALL] = 0; - game_control_value[GAME_CONTROL_EMC_MAGIC_BALL_SWITCH] = 0; - game_control_value[GAME_CONTROL_EMC_MAGIC_BALL_TIME] = 0; + game_control_value[GAME_CONTROL_EMC_MAGIC_BALL] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_EMC_MAGIC_BALL_SWITCH] = EL_UNDEFINED; - game_control_value[GAME_CONTROL_LIGHT_SWITCH] = 0; + game_control_value[GAME_CONTROL_LIGHT_SWITCH] = + (game.light_time_left > 0 ? EL_LIGHT_SWITCH_ACTIVE : EL_LIGHT_SWITCH); game_control_value[GAME_CONTROL_LIGHT_SWITCH_TIME] = game.light_time_left; - game_control_value[GAME_CONTROL_TIMEGATE_SWITCH] = 0; + game_control_value[GAME_CONTROL_TIMEGATE_SWITCH] = + (game.timegate_time_left > 0 ? EL_TIMEGATE_OPEN : EL_TIMEGATE_CLOSED); game_control_value[GAME_CONTROL_TIMEGATE_SWITCH_TIME] = game.timegate_time_left; - game_control_value[GAME_CONTROL_SWITCHGATE_SWITCH] = 0; + game_control_value[GAME_CONTROL_SWITCHGATE_SWITCH] = EL_UNDEFINED; - game_control_value[GAME_CONTROL_EMC_LENSES] = 0; + game_control_value[GAME_CONTROL_EMC_LENSES] = + (game.lenses_time_left > 0 ? EL_EMC_LENSES : EL_EMPTY); game_control_value[GAME_CONTROL_EMC_LENSES_TIME] = game.lenses_time_left; - game_control_value[GAME_CONTROL_EMC_MAGNIFIER] = 0; + game_control_value[GAME_CONTROL_EMC_MAGNIFIER] = + (game.magnify_time_left > 0 ? EL_EMC_MAGNIFIER : EL_EMPTY); game_control_value[GAME_CONTROL_EMC_MAGNIFIER_TIME] = game.magnify_time_left; - game_control_value[GAME_CONTROL_BALLOON_SWITCH] = 0; + game_control_value[GAME_CONTROL_BALLOON_SWITCH] = + (game.wind_direction == MV_LEFT ? EL_BALLOON_SWITCH_LEFT : + game.wind_direction == MV_RIGHT ? EL_BALLOON_SWITCH_RIGHT : + game.wind_direction == MV_UP ? EL_BALLOON_SWITCH_UP : + game.wind_direction == MV_DOWN ? EL_BALLOON_SWITCH_DOWN : + EL_BALLOON_SWITCH_NONE); game_control_value[GAME_CONTROL_DYNABOMB_NUMBER] = local_player->dynabomb_count; game_control_value[GAME_CONTROL_DYNABOMB_SIZE] = local_player->dynabomb_size; game_control_value[GAME_CONTROL_DYNABOMB_POWER] = - local_player->dynabomb_xl; + (local_player->dynabomb_xl ? EL_DYNABOMB_INCREASE_POWER : EL_EMPTY); game_control_value[GAME_CONTROL_PENGUINS] = local_player->friends_still_needed; @@ -1864,22 +1883,22 @@ void UpdateGameControlValues() game_control_value[GAME_CONTROL_SOKOBAN_FIELDS] = local_player->sokobanfields_still_needed; - game_control_value[GAME_CONTROL_ROBOT_WHEEL] = 0; + game_control_value[GAME_CONTROL_ROBOT_WHEEL] = EL_UNDEFINED; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_1] = 0; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_1_SWITCH] = 0; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_2] = 0; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_2_SWITCH] = 0; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_3] = 0; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_3_SWITCH] = 0; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_4] = 0; - game_control_value[GAME_CONTROL_CONVEYOR_BELT_4_SWITCH] = 0; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_1] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_1_SWITCH] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_2] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_2_SWITCH] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_3] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_3_SWITCH] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_4] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_CONVEYOR_BELT_4_SWITCH] = EL_UNDEFINED; - game_control_value[GAME_CONTROL_MAGIC_WALL] = 0; + game_control_value[GAME_CONTROL_MAGIC_WALL] = EL_UNDEFINED; game_control_value[GAME_CONTROL_MAGIC_WALL_TIME] = game.magic_wall_time_left; - game_control_value[GAME_CONTROL_BD_MAGIC_WALL] = 0; - game_control_value[GAME_CONTROL_DC_MAGIC_WALL] = 0; + game_control_value[GAME_CONTROL_BD_MAGIC_WALL] = EL_UNDEFINED; + game_control_value[GAME_CONTROL_DC_MAGIC_WALL] = EL_UNDEFINED; game_control_value[GAME_CONTROL_PLAYER_NAME] = 0; game_control_value[GAME_CONTROL_LEVEL_NAME] = 0; @@ -1969,6 +1988,14 @@ void DisplayGameControlValues() BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto, src_x, src_y, MINI_TILEX, MINI_TILEY, dst_x, dst_y); } + else if (value != EL_UNDEFINED) + { + int graphic = el2edimg(value); + int dst_x = PANEL_XPOS(pos); + int dst_y = PANEL_YPOS(pos); + + DrawMiniGraphicExt(drawto, dst_x, dst_y, graphic); + } } else if (type == TYPE_STRING) { @@ -1985,6 +2012,8 @@ void DisplayGameControlValues() free(s_cut); } } + + redraw_mask |= REDRAW_DOOR_1; } } diff --git a/src/game.h b/src/game.h index b93c9750..b658d1f4 100644 --- a/src/game.h +++ b/src/game.h @@ -55,7 +55,6 @@ struct GamePanelInfo struct TextPosInfo em_steel_exit; struct TextPosInfo emc_magic_ball; struct TextPosInfo emc_magic_ball_switch; - struct TextPosInfo emc_magic_ball_time; struct TextPosInfo light_switch; struct TextPosInfo light_switch_time; struct TextPosInfo timegate_switch;