summaryrefslogtreecommitdiff
path: root/src/client/hud.h
diff options
context:
space:
mode:
authorLoic Blot <loic.blot@unix-experience.fr>2021-04-29 09:30:19 +0200
committerLoïc Blot <nerzhul@users.noreply.github.com>2021-05-03 19:49:19 +0200
commitccdd886e273ec2fa5f8cfe1d1f474914eccb2abf (patch)
tree076dd76bafc39c824aaa4e372502514c14d6640a /src/client/hud.h
parenta47a00228b7be97a740081ec9ed86f108021ad6d (diff)
downloadminetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.tar.gz
minetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.tar.bz2
minetest-ccdd886e273ec2fa5f8cfe1d1f474914eccb2abf.zip
refacto: Hud: make driver, client, player, inventory, tsrc private & drop unused guienv
also fix c_content.h, on client it includes the src/client/hud.h instead of src/hud.h, which leads to wrong file dependency on the lua stack
Diffstat (limited to 'src/client/hud.h')
-rw-r--r--src/client/hud.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/client/hud.h b/src/client/hud.h
index cbfdf1ba3..d341105d2 100644
--- a/src/client/hud.h
+++ b/src/client/hud.h
@@ -35,13 +35,6 @@ struct ItemStack;
class Hud
{
public:
- video::IVideoDriver *driver;
- gui::IGUIEnvironment *guienv;
- Client *client;
- LocalPlayer *player;
- Inventory *inventory;
- ITextureSource *tsrc;
-
video::SColor crosshair_argb;
video::SColor selectionbox_argb;
@@ -54,7 +47,7 @@ public:
bool pointing_at_object = false;
- Hud(gui::IGUIEnvironment *guienv, Client *client, LocalPlayer *player,
+ Hud(Client *client, LocalPlayer *player,
Inventory *inventory);
~Hud();
@@ -105,6 +98,12 @@ private:
void drawCompassRotate(HudElement *e, video::ITexture *texture,
const core::rect<s32> &rect, int way);
+ Client *client = nullptr;
+ video::IVideoDriver *driver = nullptr;
+ LocalPlayer *player = nullptr;
+ Inventory *inventory = nullptr;
+ ITextureSource *tsrc = nullptr;
+
float m_hud_scaling; // cached minetest setting
float m_scale_factor;
v3s16 m_camera_offset;