Translated using Weblate (Japanese)
[oweals/minetest.git] / src / drawscene.cpp
index c3c3b2ef207d2c2e3b739104a8585d77f756b7ee..509f341d5741dec798bbf732a1533e3c5739648b 100644 (file)
@@ -18,7 +18,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 */
 
 #include "drawscene.h"
-#include "main.h" // for g_settings
 #include "settings.h"
 #include "clouds.h"
 #include "clientmap.h"
@@ -417,10 +416,11 @@ void draw_plain(Camera& camera, bool show_hud, Hud& hud,
                camera.drawWieldedTool();
 }
 
-void draw_scene(video::IVideoDriver* driver, scene::ISceneManager* smgr,
-               Camera& camera, Client& client, LocalPlayer* player, Hud& hud,
-               gui::IGUIEnvironment* guienv, std::vector<aabb3f> hilightboxes,
-               const v2u32& screensize, video::SColor skycolor, bool show_hud)
+void draw_scene(video::IVideoDriver *driver, scene::ISceneManager *smgr,
+               Camera &camera, Client& client, LocalPlayer *player, Hud &hud,
+               Mapper &mapper, gui::IGUIEnvironment *guienv,
+               std::vector<aabb3f> hilightboxes, const v2u32 &screensize,
+               video::SColor skycolor, bool show_hud, bool show_minimap)
 {
        TimeTaker timer("smgr");
 
@@ -485,6 +485,8 @@ void draw_scene(video::IVideoDriver* driver, scene::ISceneManager* smgr,
                        hud.drawCrosshair();
                hud.drawHotbar(client.getPlayerItem());
                hud.drawLuaElements(camera.getOffset());
+               if (show_minimap)
+                       mapper.drawMinimap();
        }
 
        guienv->drawAll();