diff options
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/assets.cpp | 4 | ||||
-rw-r--r-- | src/game/game.cpp | 4 | ||||
-rw-r--r-- | src/game/game.hpp | 5 | ||||
-rw-r--r-- | src/game/interface.cpp | 2 |
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); |