rnd-20070916-1-src
authorHolger Schemel <info@artsoft.org>
Sat, 15 Sep 2007 22:57:21 +0000 (00:57 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 30 Aug 2014 08:56:19 +0000 (10:56 +0200)
* 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

ChangeLog
src/conf_gfx.c
src/conf_var.c
src/conftime.h
src/editor.c
src/game.c
src/game.h
src/libgame/toons.c
src/screens.c

index 71611b3de477485de11b72b973d405be8438bb7e..adba9e8e511f404008472e9494181313581a475a 100644 (file)
--- 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
 
index f3bebdf5960ce02388e8a476cf51f2ce445e6383..271ef2eb73b1453e1f76b477699bf68633f387bf 100644 (file)
@@ -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"                },
index 4a6389ad826491c77359b4429925038f8c73162b..f0993e6e4832d8c337af80dcc8b067dcb2f36ffe 100644 (file)
@@ -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
index 5926ae2cb526e780330bf9c780daf165a86646a9..e57d99c841cab2c3659dddb3274e77d383f46c06 100644 (file)
@@ -1 +1 @@
-#define COMPILE_DATE_STRING "2007-09-13 23:31"
+#define COMPILE_DATE_STRING "2007-09-16 00:50"
index fe8976f21c9254c4ad2cb7c0b14efbb95b1f85be..38af449cea7298ab48d53438bbf56a515beca7ec 100644 (file)
@@ -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();
 
index 2cd5f41f7c9b42d5e41e3d761fb8affab20bda05..30a12e54269a8a7b305e93d6ff4205c8957bfc23 100644 (file)
 #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;
 
index c1fb5b127127675c74e5ac749ad53eb9f2d7eccc..f4216805b6606b776b1e06cb562de5db66416b2b 100644 (file)
@@ -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;
index 2a233e4cbb847f1e3c101bfd7d78ad60c5f6cc4d..300ae70bf3da93d4f8505d87896424cc7bc3ae13 100644 (file)
@@ -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)
   {
index ec482ba103a418556d8560a9f1dae19642673a35..7ec7fac55947037fcbafe46592a9b580848a2bfe 100644 (file)
@@ -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);