mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Move hard coded minimap to builtin (#14071)
This commit is contained in:
parent
f2b99332d9
commit
adaa4cc2f3
20 changed files with 51 additions and 87 deletions
|
@ -36,7 +36,7 @@ RenderingCore::~RenderingCore()
|
|||
delete shadow_renderer;
|
||||
}
|
||||
|
||||
void RenderingCore::draw(video::SColor _skycolor, bool _show_hud, bool _show_minimap,
|
||||
void RenderingCore::draw(video::SColor _skycolor, bool _show_hud,
|
||||
bool _draw_wield_tool, bool _draw_crosshair)
|
||||
{
|
||||
v2u32 screensize = device->getVideoDriver()->getScreenSize();
|
||||
|
@ -46,7 +46,6 @@ void RenderingCore::draw(video::SColor _skycolor, bool _show_hud, bool _show_min
|
|||
context.draw_crosshair = _draw_crosshair;
|
||||
context.draw_wield_tool = _draw_wield_tool;
|
||||
context.show_hud = _show_hud;
|
||||
context.show_minimap = _show_minimap;
|
||||
|
||||
pipeline->reset(context);
|
||||
pipeline->run(context);
|
||||
|
@ -55,4 +54,4 @@ void RenderingCore::draw(video::SColor _skycolor, bool _show_hud, bool _show_min
|
|||
v2u32 RenderingCore::getVirtualSize() const
|
||||
{
|
||||
return virtual_size;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public:
|
|||
RenderingCore &operator=(const RenderingCore &) = delete;
|
||||
RenderingCore &operator=(RenderingCore &&) = delete;
|
||||
|
||||
void draw(video::SColor _skycolor, bool _show_hud, bool _show_minimap,
|
||||
void draw(video::SColor _skycolor, bool _show_hud,
|
||||
bool _draw_wield_tool, bool _draw_crosshair);
|
||||
|
||||
v2u32 getVirtualSize() const;
|
||||
|
|
|
@ -46,7 +46,6 @@ struct PipelineContext
|
|||
v2u32 target_size;
|
||||
|
||||
bool show_hud {true};
|
||||
bool show_minimap {true};
|
||||
bool draw_wield_tool {true};
|
||||
bool draw_crosshair {true};
|
||||
};
|
||||
|
|
|
@ -64,9 +64,6 @@ void DrawHUD::run(PipelineContext &context)
|
|||
context.hud->drawHotbar(context.client->getEnv().getLocalPlayer()->getWieldIndex());
|
||||
context.hud->drawLuaElements(context.client->getCamera()->getOffset());
|
||||
context.client->getCamera()->drawNametags();
|
||||
auto mapper = context.client->getMinimap();
|
||||
if (mapper && context.show_minimap)
|
||||
mapper->drawMinimap();
|
||||
}
|
||||
context.device->getGUIEnvironment()->drawAll();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue