Minetest  0.4.16
drawscene.h
Go to the documentation of this file.
1 /*
2 Minetest
3 Copyright (C) 2010-2014 celeron55, Perttu Ahola <celeron55@gmail.com>
4 
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation; either version 2.1 of the License, or
8 (at your option) any later version.
9 
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14 
15 You should have received a copy of the GNU Lesser General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 
20 #ifndef DRAWSCENE_H_
21 #define DRAWSCENE_H_
22 
23 #include "camera.h"
24 #include "hud.h"
25 #include "minimap.h"
27 
28 
29 void draw_load_screen(const std::wstring &text, IrrlichtDevice *device,
30  gui::IGUIEnvironment *guienv, ITextureSource *tsrc, float dtime = 0,
31  int percent = 0, bool clouds = true);
32 
33 void draw_scene(video::IVideoDriver *driver, scene::ISceneManager *smgr,
34  Camera &camera, Client &client, LocalPlayer *player,
35  Hud &hud, Minimap *mapper, gui::IGUIEnvironment *guienv,
36  const v2u32 &screensize, const video::SColor &skycolor,
37  bool show_hud, bool show_minimap);
38 
39 #endif /* DRAWSCENE_H_ */
TimeTaker
Definition: timetaker.h:31
Hud::drawLuaElements
void drawLuaElements(const v3s16 &camera_offset)
Definition: hud.cpp:290
draw_sidebyside_3d_mode
void draw_sidebyside_3d_mode(Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
Definition: drawscene.cpp:269
draw_load_screen
void draw_load_screen(const std::wstring &text, IrrlichtDevice *device, gui::IGUIEnvironment *guienv, ITextureSource *tsrc, float dtime, int percent, bool clouds)
Definition: drawscene.cpp:601
v2s32
core::vector2d< s32 > v2s32
Definition: irr_v2d.h:29
settings.h
draw_top_bottom_3d_mode
void draw_top_bottom_3d_mode(Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
Definition: drawscene.cpp:325
draw_interlaced_3d_mode
void draw_interlaced_3d_mode(Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
Definition: drawscene.cpp:210
errorstream
std::ostream errorstream
Camera
Definition: camera.h:61
v2u32
core::vector2d< u32 > v2u32
Definition: irr_v2d.h:30
Camera::drawWieldedTool
void drawWieldedTool(irr::core::matrix4 *translation=NULL)
Definition: camera.cpp:516
filesys.h
porting::device
static irr::IrrlichtDevice * device
Definition: porting.cpp:760
Minimap::drawMinimap
void drawMinimap()
Definition: minimap.cpp:476
hud.h
g_settings
Settings * g_settings
Definition: settings.cpp:37
ClientEnvironment::getClientMap
ClientMap & getClientMap()
Definition: clientenvironment.cpp:79
guiscalingfilter.h
draw_image
video::ITexture * draw_image(const v2u32 &screensize, paralax_sign psign, const irr::core::matrix4 &startMatrix, const irr::core::vector3df &focusPoint, bool show_hud, video::IVideoDriver *driver, Camera &camera, scene::ISceneManager *smgr, Hud &hud, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, const video::SColor &skycolor)
Definition: drawscene.cpp:126
Clouds::step
void step(float dtime)
Definition: clouds.cpp:353
draw_scene
void draw_scene(video::IVideoDriver *driver, scene::ISceneManager *smgr, Camera &camera, Client &client, LocalPlayer *player, Hud &hud, Minimap *mapper, gui::IGUIEnvironment *guienv, const v2u32 &screensize, const video::SColor &skycolor, bool show_hud, bool show_minimap)
Definition: drawscene.cpp:510
SettingNotFoundException
Definition: exceptions.h:90
FontEngine::getLineHeight
unsigned int getLineHeight(unsigned int font_size=FONT_SIZE_UNSPECIFIED, FontMode mode=FM_Unspecified)
get line height for a specific font (including empty room between lines)
Definition: fontengine.cpp:197
ITextureSource
Definition: tile.h:100
draw_hud
video::ITexture * draw_hud(video::IVideoDriver *driver, const v2u32 &screensize, bool show_hud, Hud &hud, Client &client, bool draw_crosshair, video::SColor skycolor, gui::IGUIEnvironment *guienv, Camera &camera)
Definition: drawscene.cpp:184
draw_anaglyph_3d_mode
void draw_anaglyph_3d_mode(Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv)
Definition: drawscene.cpp:35
Settings::getBool
bool getBool(const std::string &name) const
Definition: settings.cpp:383
Hud::drawSelectionMesh
void drawSelectionMesh()
Definition: hud.cpp:526
draw_load_screen
void draw_load_screen(const std::wstring &text, IrrlichtDevice *device, gui::IGUIEnvironment *guienv, ITextureSource *tsrc, float dtime=0, int percent=0, bool clouds=true)
Definition: drawscene.cpp:601
Camera::getCameraNode
scene::ICameraSceneNode * getCameraNode() const
Definition: camera.h:69
draw2DImageFilterScaled
void draw2DImageFilterScaled(video::IVideoDriver *driver, video::ITexture *txr, const core::rect< s32 > &destrect, const core::rect< s32 > &srcrect, const core::rect< s32 > *cliprect, const video::SColor *const colors, bool usealpha)
Definition: guiscalingfilter.cpp:153
minimap.h
drawscene.h
draw_scene
void draw_scene(video::IVideoDriver *driver, scene::ISceneManager *smgr, Camera &camera, Client &client, LocalPlayer *player, Hud &hud, Minimap *mapper, gui::IGUIEnvironment *guienv, const v2u32 &screensize, const video::SColor &skycolor, bool show_hud, bool show_minimap)
Definition: drawscene.cpp:510
fontengine.h
irrlichttypes_extrabloated.h
g_menuclouds
Clouds * g_menuclouds
Definition: clouds.cpp:30
Clouds::render
virtual void render()
Definition: clouds.cpp:95
HUD_FLAG_CROSSHAIR_VISIBLE
#define HUD_FLAG_CROSSHAIR_VISIBLE
Definition: hud.h:40
g_fontengine
FontEngine * g_fontengine
reference to access font engine, has to be initialized by main
Definition: fontengine.cpp:35
EYECOUNT
@ EYECOUNT
Definition: drawscene.cpp:32
Hud
Definition: hud.h:105
Minimap
Definition: minimap.h:120
g_menucloudsmgr
irr::scene::ISceneManager * g_menucloudsmgr
Definition: clouds.cpp:31
draw_pageflip_3d_mode
void draw_pageflip_3d_mode(Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
Definition: drawscene.cpp:381
timetaker.h
paralax_sign
paralax_sign
Definition: drawscene.cpp:29
rangelim
#define rangelim(d, min, max)
Definition: numeric.h:30
Client::getPlayerItem
u16 getPlayerItem() const
Definition: client.h:390
ITextureSource::getTexture
virtual video::ITexture * getTexture(u32 id)=0
HUD_FLAG_WIELDITEM_VISIBLE
#define HUD_FLAG_WIELDITEM_VISIBLE
Definition: hud.h:41
CAMERA_MODE_THIRD
@ CAMERA_MODE_THIRD
Definition: camera.h:53
LocalPlayer
Definition: localplayer.h:42
camera.h
Settings::get
const std::string & get(const std::string &name) const
Definition: settings.cpp:374
guienv
gui::IGUIEnvironment * guienv
Definition: clientlauncher.cpp:41
scaledown
int scaledown(int coef, int size)
Definition: drawscene.cpp:463
Settings::getU16
u16 getU16(const std::string &name) const
Definition: settings.cpp:389
init_texture
void init_texture(video::IVideoDriver *driver, const v2u32 &screensize, video::ITexture **texture, const char *name)
Definition: drawscene.cpp:114
Camera::drawNametags
void drawNametags()
Definition: camera.cpp:542
Hud::drawHotbar
void drawHotbar(u16 playeritem)
Definition: hud.cpp:447
Client
Definition: client.h:252
RIGHT
@ RIGHT
Definition: drawscene.cpp:31
FontEngine::getTextWidth
unsigned int getTextWidth(const std::string &text, unsigned int font_size=FONT_SIZE_UNSPECIFIED, FontMode mode=FM_Unspecified)
get text width if a text for a specific font
Definition: fontengine.h:58
LEFT
@ LEFT
Definition: drawscene.cpp:30
CAMERA_MODE_THIRD_FRONT
@ CAMERA_MODE_THIRD_FRONT
Definition: camera.h:53
Player::hud_flags
u32 hud_flags
Definition: player.h:178
Settings::getFloat
float getFloat(const std::string &name) const
Definition: settings.cpp:407
porting::getWindowSize
v2u32 getWindowSize()
Definition: porting.cpp:767
clouds.h
Camera::getCameraMode
CameraMode getCameraMode()
Definition: camera.h:155
Camera::getOffset
v3s16 getOffset() const
Definition: camera.h:89
TimeTaker::stop
u64 stop(bool quiet=false)
Definition: timetaker.cpp:35
ClientMap::renderPostFx
void renderPostFx(CameraMode cam_mode)
Definition: clientmap.cpp:704
clientmap.h
draw_plain
void draw_plain(Camera &camera, bool show_hud, Hud &hud, video::IVideoDriver *driver, scene::ISceneManager *smgr, const v2u32 &screensize, bool draw_wield_tool, Client &client, gui::IGUIEnvironment *guienv, video::SColor skycolor)
Definition: drawscene.cpp:468
Client::getEnv
ClientEnvironment & getEnv()
Definition: client.h:373
Hud::drawCrosshair
void drawCrosshair()
Definition: hud.cpp:501