summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-27 18:03:09 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-27 18:03:09 +0200
commit4d2aa957a4f7bcf3bbe789c78d2b244d20a774c8 (patch)
tree2aeb9bf34d0db891a635ad98db2b2d461579ac61 /src/game
parent57c16150a33c495861b4efe4436a76c52144f245 (diff)
A different icon for restocking grenades.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/assets.cpp4
-rw-r--r--src/game/game.cpp4
-rw-r--r--src/game/game.hpp5
-rw-r--r--src/game/interface.cpp2
4 files changed, 8 insertions, 7 deletions
diff --git a/src/game/assets.cpp b/src/game/assets.cpp
index f2deedf..6d4aff6 100644
--- a/src/game/assets.cpp
+++ b/src/game/assets.cpp
@@ -159,10 +159,10 @@ void load(void)
ambients[AMBIENT_WATER].load("assets/ambience/water.ogg");
ambients[AMBIENT_WATER].volume = 0.1f;
- ui.crystals.load("assets/ui/crystals_", 1);
-
ui.icon_builder.load("assets/ui/icon_builder_", 1);
+ ui.icon_crystals.load("assets/ui/icon_crystals_", 1);
ui.icon_fire.load("assets/ui/icon_fire_", 1);
+ ui.icon_grenade.load("assets/ui/icon_grenade_", 1);
ui.icon_grenades.load("assets/ui/icon_grenades_", 1);
ui.icon_health.load("assets/ui/icon_health_", 1);
ui.icon_move.load("assets/ui/icon_move_", 1);
diff --git a/src/game/game.cpp b/src/game/game.cpp
index 162a274..c585314 100644
--- a/src/game/game.cpp
+++ b/src/game/game.cpp
@@ -257,7 +257,7 @@ bool state_t::populate_pie_menu(std::vector<interface::pie_item_t> &items)
if (soldiers) {
items.push_back((interface::pie_item_t){&assets::ui.icon_fire, "Fire", COMMAND_FIRE});
if (grenades)
- items.push_back((interface::pie_item_t){&assets::ui.icon_grenades, "Throw a grenade", COMMAND_THROW_GRENADE});
+ items.push_back((interface::pie_item_t){&assets::ui.icon_grenade, "Throw a grenade", COMMAND_THROW_GRENADE});
if (restock_shells)
items.push_back((interface::pie_item_t){&assets::ui.icon_shells, "Restock shells", COMMAND_RESTOCK_SHELLS});
if (restock_grenades)
@@ -265,7 +265,7 @@ bool state_t::populate_pie_menu(std::vector<interface::pie_item_t> &items)
}
if (scientists)
- items.push_back((interface::pie_item_t){&assets::ui.crystals, "Gather", COMMAND_GATHER});
+ items.push_back((interface::pie_item_t){&assets::ui.icon_crystals, "Gather", COMMAND_GATHER});
if (builders) {
items.push_back((interface::pie_item_t){&assets::ui.icon_repair, "Repair", COMMAND_REPAIR});
diff --git a/src/game/game.hpp b/src/game/game.hpp
index 1fd986f..4c361df 100644
--- a/src/game/game.hpp
+++ b/src/game/game.hpp
@@ -267,10 +267,10 @@ namespace game {
} deco_assets_t;
typedef struct {
- render::animated_texture_t crystals;
- audio::sound_t crystal_tick;
render::animated_texture_t icon_builder,
+ icon_crystals,
icon_fire,
+ icon_grenade,
icon_grenades,
icon_health,
icon_move,
@@ -281,6 +281,7 @@ namespace game {
icon_soldier,
icon_stop,
icon_teleporter;
+ audio::sound_t crystal_tick;
} ui_assets_t;
extern soldier_assets_t soldier;
diff --git a/src/game/interface.cpp b/src/game/interface.cpp
index ab11f85..5fc52f3 100644
--- a/src/game/interface.cpp
+++ b/src/game/interface.cpp
@@ -513,7 +513,7 @@ void state_t::render_to(render::state_t *render)
render->render_rect(rect, sf::Color(0, 0, 0, 140));
rect = rectf_t(v2f_t(0.0f, 0.0f), 1.1f * v2f_t(em, em));
- render->render(0.0, &assets::ui.crystals, rect, sf::Color::White);
+ render->render(0.0, &assets::ui.icon_crystals, rect, sf::Color::White);
x = v2f_t(1.1f * em, 0.0f);
render->render_text(x, em, std::to_string(game->crystals), render::ALIGN_LEFT_TOP, sf::Color::White);