added graphical panel values for time and health (mainly for MM engine)
authorHolger Schemel <info@artsoft.org>
Sun, 19 Mar 2017 14:04:17 +0000 (15:04 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:11 +0000 (23:21 +0100)
graphics/gfx_classic/Makefile
graphics/gfx_classic/RocksDoorMM.ilbm [new file with mode: 0644]
src/conf_gfx.c
src/game.c
src/game.h
src/game_mm/export.h
src/game_mm/mm_game.c
src/libgame/misc.c
src/libgame/system.h

index 7b89ce594b8c43a794054a77fd1cdc3dfe23a103..34b7f0fa241d08b30ab74383a8341b1e35436f5e 100644 (file)
@@ -26,6 +26,7 @@ FILES = RocksBusy.$(EXT)              \
        RocksDF.$(EXT)                  \
        RocksDoor.$(EXT)                \
        RocksDoor2.$(EXT)               \
+       RocksDoorMM.$(EXT)              \
        RocksEMC.$(EXT)                 \
        RocksElements.$(EXT)            \
        RocksFontBig.$(EXT)             \
diff --git a/graphics/gfx_classic/RocksDoorMM.ilbm b/graphics/gfx_classic/RocksDoorMM.ilbm
new file mode 100644 (file)
index 0000000..a169056
Binary files /dev/null and b/graphics/gfx_classic/RocksDoorMM.ilbm differ
index 02b7b78a55135792e7810a8f35c56b57711b1eb0..782cbc6afa79e6e1e0e1e6f6ae35d6123dffc28a 100644 (file)
@@ -6088,6 +6088,32 @@ struct ConfigInfo image_config[] =
   { "menu.scrollbar.active.ypos",              "10"                    },
   { "menu.scrollbar.active.frames",            "1"                     },
 
+  { "gfx.game.panel.time_anim",                        "RocksDoorMM.png"       },
+  { "gfx.game.panel.time_anim.x",              "5"                     },
+  { "gfx.game.panel.time_anim.y",              "0"                     },
+  { "gfx.game.panel.time_anim.width",          "90"                    },
+  { "gfx.game.panel.time_anim.height",         "35"                    },
+  { "gfx.game.panel.time_anim.frames",         "1"                     },
+  { "gfx.game.panel.time_anim.active",         "RocksDoorMM.png"       },
+  { "gfx.game.panel.time_anim.active.x",       "105"                   },
+  { "gfx.game.panel.time_anim.active.y",       "0"                     },
+  { "gfx.game.panel.time_anim.active.width",   "90"                    },
+  { "gfx.game.panel.time_anim.active.height",  "35"                    },
+  { "gfx.game.panel.time_anim.active.frames",  "1"                     },
+
+  { "gfx.game.panel.health_anim",              "RocksDoorMM.png"       },
+  { "gfx.game.panel.health_anim.x",            "5"                     },
+  { "gfx.game.panel.health_anim.y",            "35"                    },
+  { "gfx.game.panel.health_anim.width",                "90"                    },
+  { "gfx.game.panel.health_anim.height",       "35"                    },
+  { "gfx.game.panel.health_anim.frames",       "1"                     },
+  { "gfx.game.panel.health_anim.active",       "RocksDoorMM.png"       },
+  { "gfx.game.panel.health_anim.active.x",     "105"                   },
+  { "gfx.game.panel.health_anim.active.y",     "35"                    },
+  { "gfx.game.panel.health_anim.active.width", "90"                    },
+  { "gfx.game.panel.health_anim.active.height",        "35"                    },
+  { "gfx.game.panel.health_anim.active.frames",        "1"                     },
+
   { "gfx.game.button.stop",                    "RocksDoor.png"         },
   { "gfx.game.button.stop.x",                  "305"                   },
   { "gfx.game.button.stop.y",                  "185"                   },
@@ -8328,6 +8354,27 @@ struct ConfigInfo image_config[] =
   { "game.panel.time_ss.draw_masked",          "true"                  },
   { "game.panel.time_ss.draw_order",           "0"                     },
 
+  { "game.panel.time_anim.x",                  "5"                     },
+  { "game.panel.time_anim.y",                  "72"                    },
+  { "game.panel.time_anim.direction",          "right"                 },
+  { "game.panel.time_anim.class",              "mm_engine_only"        },
+
+  { "game.panel.health.x",                     "-1"                    },
+  { "game.panel.health.y",                     "-1"                    },
+  { "game.panel.health.align",                 "center"                },
+  { "game.panel.health.valign",                        "top"                   },
+  { "game.panel.health.digits",                        "-1"                    },
+  { "game.panel.health.font",                  "font.text_2"           },
+  { "game.panel.health.font_narrow",           "font.text_1"           },
+  { "game.panel.health.draw_masked",           "true"                  },
+  { "game.panel.health.draw_order",            "0"                     },
+
+  { "game.panel.health_anim.x",                        "5"                     },
+  { "game.panel.health_anim.y",                        "107"                   },
+  { "game.panel.health_anim.direction",                "right"                 },
+  { "game.panel.health_anim.class",            "mm_engine_only"        },
+  { "game.panel.health_anim.style",            "reverse"               },
+
   { "game.panel.frame.x",                      "-1"                    },
   { "game.panel.frame.y",                      "-1"                    },
   { "game.panel.frame.align",                  "left"                  },
index 5391ce9197c8728f4f831641fb88e930f44e12ba..b8383b115ea588318b9140be09c719d4b59bd3b6 100644 (file)
 #define GAME_PANEL_TIME_HH                     32
 #define GAME_PANEL_TIME_MM                     33
 #define GAME_PANEL_TIME_SS                     34
-#define GAME_PANEL_FRAME                       35
-#define GAME_PANEL_SHIELD_NORMAL               36
-#define GAME_PANEL_SHIELD_NORMAL_TIME          37
-#define GAME_PANEL_SHIELD_DEADLY               38
-#define GAME_PANEL_SHIELD_DEADLY_TIME          39
-#define GAME_PANEL_EXIT                                40
-#define GAME_PANEL_EMC_MAGIC_BALL              41
-#define GAME_PANEL_EMC_MAGIC_BALL_SWITCH       42
-#define GAME_PANEL_LIGHT_SWITCH                        43
-#define GAME_PANEL_LIGHT_SWITCH_TIME           44
-#define GAME_PANEL_TIMEGATE_SWITCH             45
-#define GAME_PANEL_TIMEGATE_SWITCH_TIME                46
-#define GAME_PANEL_SWITCHGATE_SWITCH           47
-#define GAME_PANEL_EMC_LENSES                  48
-#define GAME_PANEL_EMC_LENSES_TIME             49
-#define GAME_PANEL_EMC_MAGNIFIER               50
-#define GAME_PANEL_EMC_MAGNIFIER_TIME          51
-#define GAME_PANEL_BALLOON_SWITCH              52
-#define GAME_PANEL_DYNABOMB_NUMBER             53
-#define GAME_PANEL_DYNABOMB_SIZE               54
-#define GAME_PANEL_DYNABOMB_POWER              55
-#define GAME_PANEL_PENGUINS                    56
-#define GAME_PANEL_SOKOBAN_OBJECTS             57
-#define GAME_PANEL_SOKOBAN_FIELDS              58
-#define GAME_PANEL_ROBOT_WHEEL                 59
-#define GAME_PANEL_CONVEYOR_BELT_1             60
-#define GAME_PANEL_CONVEYOR_BELT_2             61
-#define GAME_PANEL_CONVEYOR_BELT_3             62
-#define GAME_PANEL_CONVEYOR_BELT_4             63
-#define GAME_PANEL_CONVEYOR_BELT_1_SWITCH      64
-#define GAME_PANEL_CONVEYOR_BELT_2_SWITCH      65
-#define GAME_PANEL_CONVEYOR_BELT_3_SWITCH      66
-#define GAME_PANEL_CONVEYOR_BELT_4_SWITCH      67
-#define GAME_PANEL_MAGIC_WALL                  68
-#define GAME_PANEL_MAGIC_WALL_TIME             69
-#define GAME_PANEL_GRAVITY_STATE               70
-#define GAME_PANEL_GRAPHIC_1                   71
-#define GAME_PANEL_GRAPHIC_2                   72
-#define GAME_PANEL_GRAPHIC_3                   73
-#define GAME_PANEL_GRAPHIC_4                   74
-#define GAME_PANEL_GRAPHIC_5                   75
-#define GAME_PANEL_GRAPHIC_6                   76
-#define GAME_PANEL_GRAPHIC_7                   77
-#define GAME_PANEL_GRAPHIC_8                   78
-#define GAME_PANEL_ELEMENT_1                   79
-#define GAME_PANEL_ELEMENT_2                   80
-#define GAME_PANEL_ELEMENT_3                   81
-#define GAME_PANEL_ELEMENT_4                   82
-#define GAME_PANEL_ELEMENT_5                   83
-#define GAME_PANEL_ELEMENT_6                   84
-#define GAME_PANEL_ELEMENT_7                   85
-#define GAME_PANEL_ELEMENT_8                   86
-#define GAME_PANEL_ELEMENT_COUNT_1             87
-#define GAME_PANEL_ELEMENT_COUNT_2             88
-#define GAME_PANEL_ELEMENT_COUNT_3             89
-#define GAME_PANEL_ELEMENT_COUNT_4             90
-#define GAME_PANEL_ELEMENT_COUNT_5             91
-#define GAME_PANEL_ELEMENT_COUNT_6             92
-#define GAME_PANEL_ELEMENT_COUNT_7             93
-#define GAME_PANEL_ELEMENT_COUNT_8             94
-#define GAME_PANEL_CE_SCORE_1                  95
-#define GAME_PANEL_CE_SCORE_2                  96
-#define GAME_PANEL_CE_SCORE_3                  97
-#define GAME_PANEL_CE_SCORE_4                  98
-#define GAME_PANEL_CE_SCORE_5                  99
-#define GAME_PANEL_CE_SCORE_6                  100
-#define GAME_PANEL_CE_SCORE_7                  101
-#define GAME_PANEL_CE_SCORE_8                  102
-#define GAME_PANEL_CE_SCORE_1_ELEMENT          103
-#define GAME_PANEL_CE_SCORE_2_ELEMENT          104
-#define GAME_PANEL_CE_SCORE_3_ELEMENT          105
-#define GAME_PANEL_CE_SCORE_4_ELEMENT          106
-#define GAME_PANEL_CE_SCORE_5_ELEMENT          107
-#define GAME_PANEL_CE_SCORE_6_ELEMENT          108
-#define GAME_PANEL_CE_SCORE_7_ELEMENT          109
-#define GAME_PANEL_CE_SCORE_8_ELEMENT          110
-#define GAME_PANEL_PLAYER_NAME                 111
-#define GAME_PANEL_LEVEL_NAME                  112
-#define GAME_PANEL_LEVEL_AUTHOR                        113
-
-#define NUM_GAME_PANEL_CONTROLS                        114
+#define GAME_PANEL_TIME_ANIM                   35
+#define GAME_PANEL_HEALTH                      36
+#define GAME_PANEL_HEALTH_ANIM                 37
+#define GAME_PANEL_FRAME                       38
+#define GAME_PANEL_SHIELD_NORMAL               39
+#define GAME_PANEL_SHIELD_NORMAL_TIME          40
+#define GAME_PANEL_SHIELD_DEADLY               41
+#define GAME_PANEL_SHIELD_DEADLY_TIME          42
+#define GAME_PANEL_EXIT                                43
+#define GAME_PANEL_EMC_MAGIC_BALL              44
+#define GAME_PANEL_EMC_MAGIC_BALL_SWITCH       45
+#define GAME_PANEL_LIGHT_SWITCH                        46
+#define GAME_PANEL_LIGHT_SWITCH_TIME           47
+#define GAME_PANEL_TIMEGATE_SWITCH             48
+#define GAME_PANEL_TIMEGATE_SWITCH_TIME                49
+#define GAME_PANEL_SWITCHGATE_SWITCH           50
+#define GAME_PANEL_EMC_LENSES                  51
+#define GAME_PANEL_EMC_LENSES_TIME             52
+#define GAME_PANEL_EMC_MAGNIFIER               53
+#define GAME_PANEL_EMC_MAGNIFIER_TIME          54
+#define GAME_PANEL_BALLOON_SWITCH              55
+#define GAME_PANEL_DYNABOMB_NUMBER             56
+#define GAME_PANEL_DYNABOMB_SIZE               57
+#define GAME_PANEL_DYNABOMB_POWER              58
+#define GAME_PANEL_PENGUINS                    59
+#define GAME_PANEL_SOKOBAN_OBJECTS             60
+#define GAME_PANEL_SOKOBAN_FIELDS              61
+#define GAME_PANEL_ROBOT_WHEEL                 62
+#define GAME_PANEL_CONVEYOR_BELT_1             63
+#define GAME_PANEL_CONVEYOR_BELT_2             64
+#define GAME_PANEL_CONVEYOR_BELT_3             65
+#define GAME_PANEL_CONVEYOR_BELT_4             66
+#define GAME_PANEL_CONVEYOR_BELT_1_SWITCH      67
+#define GAME_PANEL_CONVEYOR_BELT_2_SWITCH      68
+#define GAME_PANEL_CONVEYOR_BELT_3_SWITCH      69
+#define GAME_PANEL_CONVEYOR_BELT_4_SWITCH      70
+#define GAME_PANEL_MAGIC_WALL                  71
+#define GAME_PANEL_MAGIC_WALL_TIME             72
+#define GAME_PANEL_GRAVITY_STATE               73
+#define GAME_PANEL_GRAPHIC_1                   74
+#define GAME_PANEL_GRAPHIC_2                   75
+#define GAME_PANEL_GRAPHIC_3                   76
+#define GAME_PANEL_GRAPHIC_4                   77
+#define GAME_PANEL_GRAPHIC_5                   78
+#define GAME_PANEL_GRAPHIC_6                   79
+#define GAME_PANEL_GRAPHIC_7                   80
+#define GAME_PANEL_GRAPHIC_8                   81
+#define GAME_PANEL_ELEMENT_1                   82
+#define GAME_PANEL_ELEMENT_2                   83
+#define GAME_PANEL_ELEMENT_3                   84
+#define GAME_PANEL_ELEMENT_4                   85
+#define GAME_PANEL_ELEMENT_5                   86
+#define GAME_PANEL_ELEMENT_6                   87
+#define GAME_PANEL_ELEMENT_7                   88
+#define GAME_PANEL_ELEMENT_8                   89
+#define GAME_PANEL_ELEMENT_COUNT_1             90
+#define GAME_PANEL_ELEMENT_COUNT_2             91
+#define GAME_PANEL_ELEMENT_COUNT_3             92
+#define GAME_PANEL_ELEMENT_COUNT_4             93
+#define GAME_PANEL_ELEMENT_COUNT_5             94
+#define GAME_PANEL_ELEMENT_COUNT_6             95
+#define GAME_PANEL_ELEMENT_COUNT_7             96
+#define GAME_PANEL_ELEMENT_COUNT_8             97
+#define GAME_PANEL_CE_SCORE_1                  98
+#define GAME_PANEL_CE_SCORE_2                  99
+#define GAME_PANEL_CE_SCORE_3                  100
+#define GAME_PANEL_CE_SCORE_4                  101
+#define GAME_PANEL_CE_SCORE_5                  102
+#define GAME_PANEL_CE_SCORE_6                  103
+#define GAME_PANEL_CE_SCORE_7                  104
+#define GAME_PANEL_CE_SCORE_8                  105
+#define GAME_PANEL_CE_SCORE_1_ELEMENT          106
+#define GAME_PANEL_CE_SCORE_2_ELEMENT          107
+#define GAME_PANEL_CE_SCORE_3_ELEMENT          108
+#define GAME_PANEL_CE_SCORE_4_ELEMENT          109
+#define GAME_PANEL_CE_SCORE_5_ELEMENT          110
+#define GAME_PANEL_CE_SCORE_6_ELEMENT          111
+#define GAME_PANEL_CE_SCORE_7_ELEMENT          112
+#define GAME_PANEL_CE_SCORE_8_ELEMENT          113
+#define GAME_PANEL_PLAYER_NAME                 114
+#define GAME_PANEL_LEVEL_NAME                  115
+#define GAME_PANEL_LEVEL_AUTHOR                        116
+
+#define NUM_GAME_PANEL_CONTROLS                        117
 
 struct GamePanelOrderInfo
 {
@@ -219,6 +222,8 @@ struct GamePanelControlInfo
   struct TextPosInfo *pos;
   int type;
 
+  int graphic, graphic_active;
+
   int value, last_value;
   int frame, last_frame;
   int gfx_frame;
@@ -402,6 +407,27 @@ static struct GamePanelControlInfo game_panel_controls[] =
     &game.panel.time_ss,
     TYPE_INTEGER,
   },
+  {
+    GAME_PANEL_TIME_ANIM,
+    &game.panel.time_anim,
+    TYPE_GRAPHIC,
+
+    IMG_GFX_GAME_PANEL_TIME_ANIM,
+    IMG_GFX_GAME_PANEL_TIME_ANIM_ACTIVE
+  },
+  {
+    GAME_PANEL_HEALTH,
+    &game.panel.health,
+    TYPE_INTEGER,
+  },
+  {
+    GAME_PANEL_HEALTH_ANIM,
+    &game.panel.health_anim,
+    TYPE_GRAPHIC,
+
+    IMG_GFX_GAME_PANEL_HEALTH_ANIM,
+    IMG_GFX_GAME_PANEL_HEALTH_ANIM_ACTIVE
+  },
   {
     GAME_PANEL_FRAME,
     &game.panel.frame,
@@ -2179,6 +2205,8 @@ void UpdateGameControlValues()
                     local_player->gems_still_needed > 0 ||
                     local_player->sokobanfields_still_needed > 0 ||
                     local_player->lights_still_needed > 0);
+  int health = (level.game_engine_type == GAME_ENGINE_TYPE_MM ?
+               MIN(MAX(0, 100 - game_mm.laser_overload_value), 100) : 100);
 
   UpdatePlayfieldElementCount();
 
@@ -2269,6 +2297,14 @@ void UpdateGameControlValues()
   game_panel_controls[GAME_PANEL_TIME_MM].value = (time / 60) % 60;
   game_panel_controls[GAME_PANEL_TIME_SS].value = time % 60;
 
+  if (game.no_time_limit)
+    game_panel_controls[GAME_PANEL_TIME_ANIM].value = 100;
+  else
+    game_panel_controls[GAME_PANEL_TIME_ANIM].value = time * 100 / level.time;
+
+  game_panel_controls[GAME_PANEL_HEALTH].value = health;
+  game_panel_controls[GAME_PANEL_HEALTH_ANIM].value = health;
+
   game_panel_controls[GAME_PANEL_FRAME].value = FrameCounter;
 
   game_panel_controls[GAME_PANEL_SHIELD_NORMAL].value =
@@ -2421,6 +2457,36 @@ void UpdateGameControlValues()
        gpc->frame = getGraphicAnimationFrame(el2panelimg(gpc->value),
                                              gpc->gfx_frame);
 
+       if (ANIM_MODE(graphic) == ANIM_RANDOM)
+         gfx.anim_random_frame = last_anim_random_frame;
+      }
+    }
+    else if (gpc->type == TYPE_GRAPHIC)
+    {
+      if (gpc->graphic != IMG_UNDEFINED)
+      {
+       int last_anim_random_frame = gfx.anim_random_frame;
+       int graphic = gpc->graphic;
+
+       if (gpc->value != gpc->last_value)
+       {
+         gpc->gfx_frame = 0;
+         gpc->gfx_random = INIT_GFX_RANDOM();
+       }
+       else
+       {
+         gpc->gfx_frame++;
+
+         if (ANIM_MODE(graphic) == ANIM_RANDOM &&
+             IS_NEXT_FRAME(gpc->gfx_frame, graphic))
+           gpc->gfx_random = INIT_GFX_RANDOM();
+       }
+
+       if (ANIM_MODE(graphic) == ANIM_RANDOM)
+         gfx.anim_random_frame = gpc->gfx_random;
+
+       gpc->frame = getGraphicAnimationFrame(graphic, gpc->gfx_frame);
+
        if (ANIM_MODE(graphic) == ANIM_RANDOM)
          gfx.anim_random_frame = last_anim_random_frame;
       }
@@ -2544,6 +2610,94 @@ void DisplayGameControlValues()
                     dst_x, dst_y);
       }
     }
+    else if (type == TYPE_GRAPHIC)
+    {
+      int graphic        = gpc->graphic;
+      int graphic_active = gpc->graphic_active;
+      Bitmap *src_bitmap;
+      int src_x, src_y;
+      int width, height;
+      int dst_x = PANEL_XPOS(pos);
+      int dst_y = PANEL_YPOS(pos);
+      boolean skip = (pos->class == get_hash_from_key("mm_engine_only") &&
+                     level.game_engine_type != GAME_ENGINE_TYPE_MM);
+
+      if (graphic != IMG_UNDEFINED && !skip)
+      {
+       if (pos->style == STYLE_REVERSE)
+         value = 100 - value;
+
+       getGraphicSource(graphic_active, frame, &src_bitmap, &src_x, &src_y);
+
+       if (pos->direction & MV_HORIZONTAL)
+       {
+         width  = graphic_info[graphic_active].width * value / 100;
+         height = graphic_info[graphic_active].height;
+
+         if (pos->direction == MV_LEFT)
+         {
+           src_x += graphic_info[graphic_active].width - width;
+           dst_x += graphic_info[graphic_active].width - width;
+         }
+       }
+       else
+       {
+         width  = graphic_info[graphic_active].width;
+         height = graphic_info[graphic_active].height * value / 100;
+
+         if (pos->direction == MV_UP)
+         {
+           src_y += graphic_info[graphic_active].height - height;
+           dst_y += graphic_info[graphic_active].height - height;
+         }
+       }
+
+       if (draw_masked)
+         BlitBitmapMasked(src_bitmap, drawto, src_x, src_y, width, height,
+                          dst_x, dst_y);
+       else
+         BlitBitmap(src_bitmap, drawto, src_x, src_y, width, height,
+                    dst_x, dst_y);
+
+       getGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
+
+       if (pos->direction & MV_HORIZONTAL)
+       {
+         if (pos->direction == MV_RIGHT)
+         {
+           src_x += width;
+           dst_x += width;
+         }
+         else
+         {
+           dst_x = PANEL_XPOS(pos);
+         }
+
+         width = graphic_info[graphic].width - width;
+       }
+       else
+       {
+         if (pos->direction == MV_DOWN)
+         {
+           src_y += height;
+           dst_y += height;
+         }
+         else
+         {
+           dst_y = PANEL_YPOS(pos);
+         }
+
+         height = graphic_info[graphic].height - height;
+       }
+
+       if (draw_masked)
+         BlitBitmapMasked(src_bitmap, drawto, src_x, src_y, width, height,
+                          dst_x, dst_y);
+       else
+         BlitBitmap(src_bitmap, drawto, src_x, src_y, width, height,
+                    dst_x, dst_y);
+      }
+    }
     else if (type == TYPE_STRING)
     {
       boolean active = (value != 0);
index 65e0375a75e9db07ba9dc6dcc0485c291486deaf..5d5e887d4857270541ce491bd39c2e3a88128102 100644 (file)
@@ -57,6 +57,9 @@ struct GamePanelInfo
   struct TextPosInfo time_hh;
   struct TextPosInfo time_mm;
   struct TextPosInfo time_ss;
+  struct TextPosInfo time_anim;
+  struct TextPosInfo health;
+  struct TextPosInfo health_anim;
   struct TextPosInfo frame;
   struct TextPosInfo shield_normal;
   struct TextPosInfo shield_normal_time;
index 07417cee825c1930be9ec088cf685b6a5bc201b1..2c7ccea12ce7564ef5bd4d2f1fda27fff397e8e9 100644 (file)
@@ -145,6 +145,8 @@ struct GameInfo_MM
 
   boolean cheat_no_overload;
   boolean cheat_no_explosion;
+
+  int laser_overload_value;
 };
 
 struct LevelInfo_MM
index 97dc986b20ea1fba1c617dbffb010cb660319b5c..0502660ba22cbe7fac7ca49702639d92312f819a 100644 (file)
@@ -307,6 +307,8 @@ void InitGameEngine_MM()
   game_mm.game_over = FALSE;
   game_mm.game_over_cause = 0;
 
+  game_mm.laser_overload_value = 0;
+
   /* set global laser control values (must be set before "InitLaser()") */
   laser.start_edge.x = 0;
   laser.start_edge.y = 0;
@@ -2922,6 +2924,8 @@ static void GameActions_MM_Ext(byte action[MAX_PLAYERS], boolean warp_mode)
       laser.overload_value = 0;
     }
 
+    game_mm.laser_overload_value = laser.overload_value;
+
     if (laser.overload_value < MAX_LASER_OVERLOAD - 8)
     {
       int color_up = 0xFF * laser.overload_value / MAX_LASER_OVERLOAD;
index 3e7719e1da6a32292a6a1339784f5ed27024150e..72e4f051bf47a44f17b66d28be20fa693e151274 100644 (file)
@@ -2922,6 +2922,9 @@ int get_parameter_value(char *value_raw, char *suffix, int type)
 
     if (string_has_parameter(value, "inner_corners"))
       result |= STYLE_INNER_CORNERS;
+
+    if (string_has_parameter(value, "reverse"))
+      result |= STYLE_REVERSE;
   }
   else if (strEqual(suffix, ".fade_mode"))
   {
index 2fd5e97b7fde94f66eaaf79d4da28450a4c0aeb0..2ca0021fb6d224ad9bbe5a7466fef9d1304daea2 100644 (file)
 #define STYLE_NONE             0
 #define STYLE_ACCURATE_BORDERS (1 << 0)
 #define STYLE_INNER_CORNERS    (1 << 1)
+#define STYLE_REVERSE          (1 << 2)
 
 #define STYLE_DEFAULT          STYLE_NONE
 
@@ -1415,6 +1416,10 @@ struct TextPosInfo
   boolean draw_player;         /* special case for network player buttons */
   int sort_priority;           /* also used for suffix ".draw_order" */
   int id;
+
+  int direction;               /* needed for panel time/health graphics */
+  int class;                   /* needed for panel time/health graphics */
+  int style;                   /* needed for panel time/health graphics */
 };
 
 struct LevelStats