1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

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
This commit is contained in:
Loic Blot 2021-04-29 09:30:19 +02:00 committed by Loïc Blot
parent a47a00228b
commit ccdd886e27
4 changed files with 12 additions and 14 deletions

View file

@ -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;