From: Holger Schemel Date: Sat, 15 Sep 2007 22:57:21 +0000 (+0200) Subject: rnd-20070916-1-src X-Git-Tag: 3.2.5^2~10 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=041e5e848c15b4a07020a6d9fe392fcda53d72a8;p=rocksndiamonds.git rnd-20070916-1-src * fixed small bug in toon drawing (introduced when fixing the crash bug) * added graphics definition "game.panel.highscore" to display the current levels current high score in the game panel --- diff --git a/ChangeLog b/ChangeLog index 71611b3d..adba9e8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-09-16 + * fixed small bug in toon drawing (introduced when fixing the crash bug) + +2007-09-15 + * added graphics definition "game.panel.highscore" to display the + current levels current high score in the game panel + 2007-09-13 * version number set to 3.2.5 diff --git a/src/conf_gfx.c b/src/conf_gfx.c index f3bebdf5..271ef2eb 100644 --- a/src/conf_gfx.c +++ b/src/conf_gfx.c @@ -5752,6 +5752,15 @@ struct ConfigInfo image_config[] = { "game.panel.score.draw_masked", "true" }, { "game.panel.score.draw_order", "0" }, + { "game.panel.highscore.x", "-1" }, + { "game.panel.highscore.y", "-1" }, + { "game.panel.highscore.align", "left" }, + { "game.panel.highscore.valign", "top" }, + { "game.panel.highscore.digits", "5" }, + { "game.panel.highscore.font", "font.text_2" }, + { "game.panel.highscore.draw_masked", "true" }, + { "game.panel.highscore.draw_order", "0" }, + { "game.panel.time.x", "50" }, { "game.panel.time.y", "194" }, { "game.panel.time.align", "center" }, diff --git a/src/conf_var.c b/src/conf_var.c index 4a6389ad..f0993e6e 100644 --- a/src/conf_var.c +++ b/src/conf_var.c @@ -2748,6 +2748,38 @@ struct TokenIntPtrInfo image_config_vars[] = "game.panel.score.draw_order", &game.panel.score.sort_priority }, + { + "game.panel.highscore.x", + &game.panel.highscore.x + }, + { + "game.panel.highscore.y", + &game.panel.highscore.y + }, + { + "game.panel.highscore.align", + &game.panel.highscore.align + }, + { + "game.panel.highscore.valign", + &game.panel.highscore.valign + }, + { + "game.panel.highscore.digits", + &game.panel.highscore.size + }, + { + "game.panel.highscore.font", + &game.panel.highscore.font + }, + { + "game.panel.highscore.draw_masked", + &game.panel.highscore.draw_masked + }, + { + "game.panel.highscore.draw_order", + &game.panel.highscore.sort_priority + }, { "game.panel.time.x", &game.panel.time.x diff --git a/src/conftime.h b/src/conftime.h index 5926ae2c..e57d99c8 100644 --- a/src/conftime.h +++ b/src/conftime.h @@ -1 +1 @@ -#define COMPILE_DATE_STRING "2007-09-13 23:31" +#define COMPILE_DATE_STRING "2007-09-16 00:50" diff --git a/src/editor.c b/src/editor.c index fe8976f2..38af449c 100644 --- a/src/editor.c +++ b/src/editor.c @@ -10300,7 +10300,10 @@ static void HandleCounterButtons(struct GadgetInfo *gi) if (counter_id == ED_COUNTER_ID_SELECT_LEVEL) { LoadLevel(level_nr); + LoadScore(level_nr); + TapeErase(); + ResetUndoBuffer(); DrawEditModeWindow(); diff --git a/src/game.c b/src/game.c index 2cd5f41f..30a12e54 100644 --- a/src/game.c +++ b/src/game.c @@ -161,90 +161,91 @@ #define GAME_PANEL_KEY_WHITE 27 #define GAME_PANEL_KEY_WHITE_COUNT 28 #define GAME_PANEL_SCORE 29 -#define GAME_PANEL_TIME 30 -#define GAME_PANEL_TIME_HH 31 -#define GAME_PANEL_TIME_MM 32 -#define GAME_PANEL_TIME_SS 33 -#define GAME_PANEL_SHIELD_NORMAL 34 -#define GAME_PANEL_SHIELD_NORMAL_TIME 35 -#define GAME_PANEL_SHIELD_DEADLY 36 -#define GAME_PANEL_SHIELD_DEADLY_TIME 37 -#define GAME_PANEL_EXIT 38 -#define GAME_PANEL_EMC_MAGIC_BALL 39 -#define GAME_PANEL_EMC_MAGIC_BALL_SWITCH 40 -#define GAME_PANEL_LIGHT_SWITCH 41 -#define GAME_PANEL_LIGHT_SWITCH_TIME 42 -#define GAME_PANEL_TIMEGATE_SWITCH 43 -#define GAME_PANEL_TIMEGATE_SWITCH_TIME 44 -#define GAME_PANEL_SWITCHGATE_SWITCH 45 -#define GAME_PANEL_EMC_LENSES 46 -#define GAME_PANEL_EMC_LENSES_TIME 47 -#define GAME_PANEL_EMC_MAGNIFIER 48 -#define GAME_PANEL_EMC_MAGNIFIER_TIME 49 -#define GAME_PANEL_BALLOON_SWITCH 50 -#define GAME_PANEL_DYNABOMB_NUMBER 51 -#define GAME_PANEL_DYNABOMB_SIZE 52 -#define GAME_PANEL_DYNABOMB_POWER 53 -#define GAME_PANEL_PENGUINS 54 -#define GAME_PANEL_SOKOBAN_OBJECTS 55 -#define GAME_PANEL_SOKOBAN_FIELDS 56 -#define GAME_PANEL_ROBOT_WHEEL 57 -#define GAME_PANEL_CONVEYOR_BELT_1 58 -#define GAME_PANEL_CONVEYOR_BELT_2 59 -#define GAME_PANEL_CONVEYOR_BELT_3 60 -#define GAME_PANEL_CONVEYOR_BELT_4 61 -#define GAME_PANEL_CONVEYOR_BELT_1_SWITCH 62 -#define GAME_PANEL_CONVEYOR_BELT_2_SWITCH 63 -#define GAME_PANEL_CONVEYOR_BELT_3_SWITCH 64 -#define GAME_PANEL_CONVEYOR_BELT_4_SWITCH 65 -#define GAME_PANEL_MAGIC_WALL 66 -#define GAME_PANEL_MAGIC_WALL_TIME 67 -#define GAME_PANEL_GRAVITY_STATE 68 -#define GAME_PANEL_GRAPHIC_1 69 -#define GAME_PANEL_GRAPHIC_2 70 -#define GAME_PANEL_GRAPHIC_3 71 -#define GAME_PANEL_GRAPHIC_4 72 -#define GAME_PANEL_GRAPHIC_5 73 -#define GAME_PANEL_GRAPHIC_6 74 -#define GAME_PANEL_GRAPHIC_7 75 -#define GAME_PANEL_GRAPHIC_8 76 -#define GAME_PANEL_ELEMENT_1 77 -#define GAME_PANEL_ELEMENT_2 78 -#define GAME_PANEL_ELEMENT_3 79 -#define GAME_PANEL_ELEMENT_4 80 -#define GAME_PANEL_ELEMENT_5 81 -#define GAME_PANEL_ELEMENT_6 82 -#define GAME_PANEL_ELEMENT_7 83 -#define GAME_PANEL_ELEMENT_8 84 -#define GAME_PANEL_ELEMENT_COUNT_1 85 -#define GAME_PANEL_ELEMENT_COUNT_2 86 -#define GAME_PANEL_ELEMENT_COUNT_3 87 -#define GAME_PANEL_ELEMENT_COUNT_4 88 -#define GAME_PANEL_ELEMENT_COUNT_5 89 -#define GAME_PANEL_ELEMENT_COUNT_6 90 -#define GAME_PANEL_ELEMENT_COUNT_7 91 -#define GAME_PANEL_ELEMENT_COUNT_8 92 -#define GAME_PANEL_CE_SCORE_1 93 -#define GAME_PANEL_CE_SCORE_2 94 -#define GAME_PANEL_CE_SCORE_3 95 -#define GAME_PANEL_CE_SCORE_4 96 -#define GAME_PANEL_CE_SCORE_5 97 -#define GAME_PANEL_CE_SCORE_6 98 -#define GAME_PANEL_CE_SCORE_7 99 -#define GAME_PANEL_CE_SCORE_8 100 -#define GAME_PANEL_CE_SCORE_1_ELEMENT 101 -#define GAME_PANEL_CE_SCORE_2_ELEMENT 102 -#define GAME_PANEL_CE_SCORE_3_ELEMENT 103 -#define GAME_PANEL_CE_SCORE_4_ELEMENT 104 -#define GAME_PANEL_CE_SCORE_5_ELEMENT 105 -#define GAME_PANEL_CE_SCORE_6_ELEMENT 106 -#define GAME_PANEL_CE_SCORE_7_ELEMENT 107 -#define GAME_PANEL_CE_SCORE_8_ELEMENT 108 -#define GAME_PANEL_PLAYER_NAME 109 -#define GAME_PANEL_LEVEL_NAME 110 -#define GAME_PANEL_LEVEL_AUTHOR 111 - -#define NUM_GAME_PANEL_CONTROLS 112 +#define GAME_PANEL_HIGHSCORE 30 +#define GAME_PANEL_TIME 31 +#define GAME_PANEL_TIME_HH 32 +#define GAME_PANEL_TIME_MM 33 +#define GAME_PANEL_TIME_SS 34 +#define GAME_PANEL_SHIELD_NORMAL 35 +#define GAME_PANEL_SHIELD_NORMAL_TIME 36 +#define GAME_PANEL_SHIELD_DEADLY 37 +#define GAME_PANEL_SHIELD_DEADLY_TIME 38 +#define GAME_PANEL_EXIT 39 +#define GAME_PANEL_EMC_MAGIC_BALL 40 +#define GAME_PANEL_EMC_MAGIC_BALL_SWITCH 41 +#define GAME_PANEL_LIGHT_SWITCH 42 +#define GAME_PANEL_LIGHT_SWITCH_TIME 43 +#define GAME_PANEL_TIMEGATE_SWITCH 44 +#define GAME_PANEL_TIMEGATE_SWITCH_TIME 45 +#define GAME_PANEL_SWITCHGATE_SWITCH 46 +#define GAME_PANEL_EMC_LENSES 47 +#define GAME_PANEL_EMC_LENSES_TIME 48 +#define GAME_PANEL_EMC_MAGNIFIER 49 +#define GAME_PANEL_EMC_MAGNIFIER_TIME 50 +#define GAME_PANEL_BALLOON_SWITCH 51 +#define GAME_PANEL_DYNABOMB_NUMBER 52 +#define GAME_PANEL_DYNABOMB_SIZE 53 +#define GAME_PANEL_DYNABOMB_POWER 54 +#define GAME_PANEL_PENGUINS 55 +#define GAME_PANEL_SOKOBAN_OBJECTS 56 +#define GAME_PANEL_SOKOBAN_FIELDS 57 +#define GAME_PANEL_ROBOT_WHEEL 58 +#define GAME_PANEL_CONVEYOR_BELT_1 59 +#define GAME_PANEL_CONVEYOR_BELT_2 60 +#define GAME_PANEL_CONVEYOR_BELT_3 61 +#define GAME_PANEL_CONVEYOR_BELT_4 62 +#define GAME_PANEL_CONVEYOR_BELT_1_SWITCH 63 +#define GAME_PANEL_CONVEYOR_BELT_2_SWITCH 64 +#define GAME_PANEL_CONVEYOR_BELT_3_SWITCH 65 +#define GAME_PANEL_CONVEYOR_BELT_4_SWITCH 66 +#define GAME_PANEL_MAGIC_WALL 67 +#define GAME_PANEL_MAGIC_WALL_TIME 68 +#define GAME_PANEL_GRAVITY_STATE 69 +#define GAME_PANEL_GRAPHIC_1 70 +#define GAME_PANEL_GRAPHIC_2 71 +#define GAME_PANEL_GRAPHIC_3 72 +#define GAME_PANEL_GRAPHIC_4 73 +#define GAME_PANEL_GRAPHIC_5 74 +#define GAME_PANEL_GRAPHIC_6 75 +#define GAME_PANEL_GRAPHIC_7 76 +#define GAME_PANEL_GRAPHIC_8 77 +#define GAME_PANEL_ELEMENT_1 78 +#define GAME_PANEL_ELEMENT_2 79 +#define GAME_PANEL_ELEMENT_3 80 +#define GAME_PANEL_ELEMENT_4 81 +#define GAME_PANEL_ELEMENT_5 82 +#define GAME_PANEL_ELEMENT_6 83 +#define GAME_PANEL_ELEMENT_7 84 +#define GAME_PANEL_ELEMENT_8 85 +#define GAME_PANEL_ELEMENT_COUNT_1 86 +#define GAME_PANEL_ELEMENT_COUNT_2 87 +#define GAME_PANEL_ELEMENT_COUNT_3 88 +#define GAME_PANEL_ELEMENT_COUNT_4 89 +#define GAME_PANEL_ELEMENT_COUNT_5 90 +#define GAME_PANEL_ELEMENT_COUNT_6 91 +#define GAME_PANEL_ELEMENT_COUNT_7 92 +#define GAME_PANEL_ELEMENT_COUNT_8 93 +#define GAME_PANEL_CE_SCORE_1 94 +#define GAME_PANEL_CE_SCORE_2 95 +#define GAME_PANEL_CE_SCORE_3 96 +#define GAME_PANEL_CE_SCORE_4 97 +#define GAME_PANEL_CE_SCORE_5 98 +#define GAME_PANEL_CE_SCORE_6 99 +#define GAME_PANEL_CE_SCORE_7 100 +#define GAME_PANEL_CE_SCORE_8 101 +#define GAME_PANEL_CE_SCORE_1_ELEMENT 102 +#define GAME_PANEL_CE_SCORE_2_ELEMENT 103 +#define GAME_PANEL_CE_SCORE_3_ELEMENT 104 +#define GAME_PANEL_CE_SCORE_4_ELEMENT 105 +#define GAME_PANEL_CE_SCORE_5_ELEMENT 106 +#define GAME_PANEL_CE_SCORE_6_ELEMENT 107 +#define GAME_PANEL_CE_SCORE_7_ELEMENT 108 +#define GAME_PANEL_CE_SCORE_8_ELEMENT 109 +#define GAME_PANEL_PLAYER_NAME 110 +#define GAME_PANEL_LEVEL_NAME 111 +#define GAME_PANEL_LEVEL_AUTHOR 112 + +#define NUM_GAME_PANEL_CONTROLS 113 struct GamePanelOrderInfo { @@ -419,6 +420,11 @@ static struct GamePanelControlInfo game_panel_controls[] = &game.panel.score, TYPE_INTEGER, }, + { + GAME_PANEL_HIGHSCORE, + &game.panel.highscore, + TYPE_INTEGER, + }, { GAME_PANEL_TIME, &game.panel.time, @@ -2078,7 +2084,7 @@ void InitGameControlValues() if (nr != i) { - Error(ERR_INFO, "'game_panel_controls' structure corrupted"); + Error(ERR_INFO, "'game_panel_controls' structure corrupted at %d", i); Error(ERR_EXIT, "this should not happen -- please debug"); } @@ -2244,6 +2250,7 @@ void UpdateGameControlValues() } game_panel_controls[GAME_PANEL_SCORE].value = score; + game_panel_controls[GAME_PANEL_HIGHSCORE].value = highscore[0].Score; game_panel_controls[GAME_PANEL_TIME].value = time; diff --git a/src/game.h b/src/game.h index c1fb5b12..f4216805 100644 --- a/src/game.h +++ b/src/game.h @@ -42,6 +42,7 @@ struct GamePanelInfo struct TextPosInfo key_white; struct TextPosInfo key_white_count; struct TextPosInfo score; + struct TextPosInfo highscore; struct TextPosInfo time; struct TextPosInfo time_hh; struct TextPosInfo time_mm; diff --git a/src/libgame/toons.c b/src/libgame/toons.c index 2a233e4c..300ae70b 100644 --- a/src/libgame/toons.c +++ b/src/libgame/toons.c @@ -149,9 +149,6 @@ void DrawAnim(Bitmap *toon_bitmap, GC toon_clip_gc, buffer_x, buffer_y); #endif - if (width == 0 || height == 0) - return; - /* correct values to avoid off-screen blitting (start position) */ if (pad_dest_x < screen_info.startx) { diff --git a/src/screens.c b/src/screens.c index ec482ba1..7ec7fac5 100644 --- a/src/screens.c +++ b/src/screens.c @@ -1293,6 +1293,7 @@ void DrawMainMenuExt(int fade_mask, boolean do_fading) level_nr = leveldir_current->handicap_level; LoadLevel(level_nr); + LoadScore(level_nr); SetMainBackgroundImage(IMG_BACKGROUND_MAIN);