X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame.c;h=3a9a773661e15b791d594d1ea7d7e48c17a67989;hb=0196637b0c226707f177cf52c7c1182bf08e7956;hp=1b16a6f995ad6f7313d1aebb0de762f5cbd299b4;hpb=eea88cc5712224a52d4c606795f021be11ef5135;p=rocksndiamonds.git diff --git a/src/game.c b/src/game.c index 1b16a6f9..3a9a7736 100644 --- a/src/game.c +++ b/src/game.c @@ -89,7 +89,7 @@ // game panel display and control definitions #define GAME_PANEL_LEVEL_NUMBER 0 #define GAME_PANEL_GEMS 1 -#define GAME_PANEL_GEMS_TOTAL 2 +#define GAME_PANEL_GEMS_NEEDED 2 #define GAME_PANEL_GEMS_COLLECTED 3 #define GAME_PANEL_GEMS_SCORE 4 #define GAME_PANEL_INVENTORY_COUNT 5 @@ -246,8 +246,8 @@ static struct GamePanelControlInfo game_panel_controls[] = TYPE_INTEGER, }, { - GAME_PANEL_GEMS_TOTAL, - &game.panel.gems_total, + GAME_PANEL_GEMS_NEEDED, + &game.panel.gems_needed, TYPE_INTEGER, }, { @@ -2291,10 +2291,10 @@ static void UpdateGameControlValues(void) level.game_engine_type == GAME_ENGINE_TYPE_MM ? game_mm.kettles_still_needed : game.gems_still_needed); - int gems_total = level.gems_needed; + int gems_needed = level.gems_needed; int gems_collected = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.game->cave->diamonds_collected : - gems_total - gems); + gems_needed - gems); int gems_score = (level.game_engine_type == GAME_ENGINE_TYPE_BD ? game_bd.game->cave->diamond_value : level.score[SC_EMERALD]); @@ -2325,7 +2325,7 @@ static void UpdateGameControlValues(void) // used instead of "level_nr" (for network games) game_panel_controls[GAME_PANEL_LEVEL_NUMBER].value = levelset.level_nr; game_panel_controls[GAME_PANEL_GEMS].value = gems; - game_panel_controls[GAME_PANEL_GEMS_TOTAL].value = gems_total; + game_panel_controls[GAME_PANEL_GEMS_NEEDED].value = gems_needed; game_panel_controls[GAME_PANEL_GEMS_COLLECTED].value = gems_collected; game_panel_controls[GAME_PANEL_GEMS_SCORE].value = gems_score; @@ -2722,7 +2722,7 @@ static void DisplayGameControlValues(void) if (PANEL_DEACTIVATED(pos)) continue; - if (pos->class == get_hash_from_key("extra_panel_items") && + if (pos->class == get_hash_from_string("extra_panel_items") && !setup.prefer_extra_panel_items) continue; @@ -2814,7 +2814,7 @@ static void DisplayGameControlValues(void) 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") && + boolean skip = (pos->class == get_hash_from_string("mm_engine_only") && level.game_engine_type != GAME_ENGINE_TYPE_MM); if (graphic != IMG_UNDEFINED && !skip)