summaryrefslogtreecommitdiffstats
path: root/src/game/client/experiments.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
committeruntodesu <kirill@untode.su>2025-12-26 14:50:33 +0500
commit6c2abde5c99a236453b795abaa6d7d70105e31f7 (patch)
treef085049b9615a7d03cca5de40adb6529d6c13e11 /src/game/client/experiments.cc
parentf40d09cb8f712e87691af4912f3630d92d692779 (diff)
downloadvoxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.tar.bz2
voxelius-6c2abde5c99a236453b795abaa6d7d70105e31f7.zip
Just a big Ctrl+H refactoring
Diffstat (limited to 'src/game/client/experiments.cc')
-rw-r--r--src/game/client/experiments.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/game/client/experiments.cc b/src/game/client/experiments.cc
index eb415f7..4df6f1e 100644
--- a/src/game/client/experiments.cc
+++ b/src/game/client/experiments.cc
@@ -19,10 +19,10 @@
#include "client/globals.hh"
#include "client/session.hh"
-static void on_glfw_mouse_button(const io::GlfwMouseButtonEvent& event)
+static void on_glfw_mouse_button(const GlfwMouseButtonEvent& event)
{
if(!globals::gui_screen && session::is_ingame()) {
- if((event.action == GLFW_PRESS) && world::player_target::voxel) {
+ if((event.action == GLFW_PRESS) && player_target::voxel) {
if(event.button == GLFW_MOUSE_BUTTON_LEFT) {
experiments::attack();
return;
@@ -38,20 +38,20 @@ static void on_glfw_mouse_button(const io::GlfwMouseButtonEvent& event)
void experiments::init(void)
{
- globals::dispatcher.sink<io::GlfwMouseButtonEvent>().connect<&on_glfw_mouse_button>();
+ globals::dispatcher.sink<GlfwMouseButtonEvent>().connect<&on_glfw_mouse_button>();
}
void experiments::init_late(void)
{
- gui::hotbar::slots[0] = game_items::cobblestone;
- gui::hotbar::slots[1] = game_items::stone;
- gui::hotbar::slots[2] = game_items::dirt;
- gui::hotbar::slots[3] = game_items::grass;
- gui::hotbar::slots[4] = game_items::oak_leaves;
- gui::hotbar::slots[5] = game_items::oak_planks;
- gui::hotbar::slots[6] = game_items::oak_log;
- gui::hotbar::slots[7] = game_items::glass;
- gui::hotbar::slots[8] = game_items::slime;
+ hotbar::slots[0] = game_items::cobblestone;
+ hotbar::slots[1] = game_items::stone;
+ hotbar::slots[2] = game_items::dirt;
+ hotbar::slots[3] = game_items::grass;
+ hotbar::slots[4] = game_items::oak_leaves;
+ hotbar::slots[5] = game_items::oak_planks;
+ hotbar::slots[6] = game_items::oak_log;
+ hotbar::slots[7] = game_items::glass;
+ hotbar::slots[8] = game_items::slime;
}
void experiments::shutdown(void)
@@ -68,16 +68,16 @@ void experiments::update_late(void)
void experiments::attack(void)
{
- globals::dimension->set_voxel(nullptr, world::player_target::coord);
+ globals::dimension->set_voxel(nullptr, player_target::coord);
}
void experiments::interact(void)
{
- auto active_item = gui::hotbar::slots[gui::hotbar::active_slot];
+ auto active_item = hotbar::slots[hotbar::active_slot];
if(active_item) {
if(auto place_voxel = active_item->get_place_voxel()) {
- globals::dimension->set_voxel(place_voxel, world::player_target::coord + world::player_target::normal);
+ globals::dimension->set_voxel(place_voxel, player_target::coord + player_target::normal);
return;
}
}