X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fdrawscene.cpp;h=9672affeae65841ae3b6e20b3a9c50d653a03316;hb=37b7f094e3ea502339794f64e8bad22444c6fb54;hp=f7b916a8cbd9369f243193b7bfc5066af1cecf02;hpb=ab75b1b923db157a7d05c5498456a0fd1faee883;p=oweals%2Fminetest.git diff --git a/src/drawscene.cpp b/src/drawscene.cpp index f7b916a8c..9672affea 100644 --- a/src/drawscene.cpp +++ b/src/drawscene.cpp @@ -21,6 +21,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "main.h" // for g_settings #include "settings.h" #include "clouds.h" +#include "clientmap.h" #include "util/timetaker.h" typedef enum { @@ -426,6 +427,13 @@ void draw_scene(video::IVideoDriver* driver, scene::ISceneManager* smgr, bool draw_crosshair = ((player->hud_flags & HUD_FLAG_CROSSHAIR_VISIBLE) && (camera.getCameraMode() != CAMERA_MODE_THIRD_FRONT)); +#ifdef HAVE_TOUCHSCREENGUI + try { + draw_crosshair = !g_settings->getBool("touchtarget"); + } + catch(SettingNotFoundException) {} +#endif + std::string draw_mode = g_settings->get("3d_mode"); smgr->drawAll(); @@ -458,6 +466,14 @@ void draw_scene(video::IVideoDriver* driver, scene::ISceneManager* smgr, draw_plain(camera, show_hud, hud, hilightboxes, driver, draw_wield_tool, client, guienv); } + + /* + Post effects + */ + { + client.getEnv().getClientMap().renderPostFx(camera.getCameraMode()); + } + //TODO how to make those 3d too if (show_hud) {