diff options
Diffstat (limited to 'src/drawscene.cpp')
-rw-r--r-- | src/drawscene.cpp | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/drawscene.cpp b/src/drawscene.cpp index b089e71e6..509f341d5 100644 --- a/src/drawscene.cpp +++ b/src/drawscene.cpp @@ -18,12 +18,12 @@ 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" #include "util/timetaker.h" #include "fontengine.h" +#include "guiscalingfilter.h" typedef enum { LEFT = -1, @@ -324,19 +324,19 @@ void draw_sidebyside_3d_mode(Camera& camera, bool show_hud, //makeColorKeyTexture mirrors texture so we do it twice to get it right again driver->makeColorKeyTexture(hudtexture, irr::video::SColor(255, 0, 0, 0)); - driver->draw2DImage(left_image, + draw2DImageFilterScaled(driver, left_image, irr::core::rect<s32>(0, 0, screensize.X/2, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(0, 0, screensize.X/2, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); - driver->draw2DImage(right_image, + draw2DImageFilterScaled(driver, right_image, irr::core::rect<s32>(screensize.X/2, 0, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(screensize.X/2, 0, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); @@ -380,19 +380,19 @@ void draw_top_bottom_3d_mode(Camera& camera, bool show_hud, //makeColorKeyTexture mirrors texture so we do it twice to get it right again driver->makeColorKeyTexture(hudtexture, irr::video::SColor(255, 0, 0, 0)); - driver->draw2DImage(left_image, + draw2DImageFilterScaled(driver, left_image, irr::core::rect<s32>(0, 0, screensize.X, screensize.Y/2), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(0, 0, screensize.X, screensize.Y/2), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); - driver->draw2DImage(right_image, + draw2DImageFilterScaled(driver, right_image, irr::core::rect<s32>(0, screensize.Y/2, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, false); - driver->draw2DImage(hudtexture, + draw2DImageFilterScaled(driver, hudtexture, irr::core::rect<s32>(0, screensize.Y/2, screensize.X, screensize.Y), irr::core::rect<s32>(0, 0, screensize.X, screensize.Y), 0, 0, true); @@ -416,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"); @@ -484,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(); |