Minetest 5.9.0-dev
 
Loading...
Searching...
No Matches
Game Class Reference
+ Collaboration diagram for Game:

Classes

struct  Flags
 

Public Member Functions

 Game ()
 
 ~Game ()
 
bool startup (bool *kill, InputHandler *input, RenderingEngine *rendering_engine, const GameStartData &game_params, std::string &error_message, bool *reconnect, ChatBackend *chat_backend)
 
void run ()
 
void shutdown ()
 

Protected Member Functions

bool init (const std::string &map_dir, const std::string &address, u16 port, const SubgameSpec &gamespec)
 
bool initSound ()
 
bool createSingleplayerServer (const std::string &map_dir, const SubgameSpec &gamespec, u16 port)
 
void copyServerClientCache ()
 
bool createClient (const GameStartData &start_data)
 
bool initGui ()
 
bool connectToServer (const GameStartData &start_data, bool *connect_ok, bool *aborted)
 
bool getServerContent (bool *aborted)
 
void updateInteractTimers (f32 dtime)
 
bool checkConnection ()
 
bool handleCallbacks ()
 
void processQueues ()
 
void updateProfilers (const RunStats &stats, const FpsControl &draw_times, f32 dtime)
 
void updateDebugState ()
 
void updateStats (RunStats *stats, const FpsControl &draw_times, f32 dtime)
 
void updateProfilerGraphs (ProfilerGraph *graph)
 
void processUserInput (f32 dtime)
 
void processKeyInput ()
 
void processItemSelection (u16 *new_playeritem)
 
void dropSelectedItem (bool single_item=false)
 
void openInventory ()
 
void openConsole (float scale, const wchar_t *line=NULL)
 
void toggleFreeMove ()
 
void toggleFreeMoveAlt ()
 
void togglePitchMove ()
 
void toggleFast ()
 
void toggleNoClip ()
 
void toggleCinematic ()
 
void toggleBlockBounds ()
 
void toggleAutoforward ()
 
void toggleMinimap (bool shift_pressed)
 
void toggleFog ()
 
void toggleDebug ()
 
void toggleUpdateCamera ()
 
void increaseViewRange ()
 
void decreaseViewRange ()
 
void toggleFullViewRange ()
 
void checkZoomEnabled ()
 
void updateCameraDirection (CameraOrientation *cam, float dtime)
 
void updateCameraOrientation (CameraOrientation *cam, float dtime)
 
void updatePlayerControl (const CameraOrientation &cam)
 
void updatePauseState ()
 
void step (f32 dtime)
 
void processClientEvents (CameraOrientation *cam)
 
void updateCamera (f32 dtime)
 
void updateSound (f32 dtime)
 
void processPlayerInteraction (f32 dtime, bool show_hud)
 
PointedThing updatePointedThing (const core::line3d< f32 > &shootline, bool liquids_pointable, const std::optional< Pointabilities > &pointabilities, bool look_for_object, const v3s16 &camera_offset)
 
void handlePointingAtNothing (const ItemStack &playerItem)
 
void handlePointingAtNode (const PointedThing &pointed, const ItemStack &selected_item, const ItemStack &hand_item, f32 dtime)
 
void handlePointingAtObject (const PointedThing &pointed, const ItemStack &playeritem, const v3f &player_position, bool show_debug)
 
void handleDigging (const PointedThing &pointed, const v3s16 &nodepos, const ItemStack &selected_item, const ItemStack &hand_item, f32 dtime)
 
void updateFrame (ProfilerGraph *graph, RunStats *stats, f32 dtime, const CameraOrientation &cam)
 
void updateClouds (float dtime)
 
void updateShadows ()
 
void drawScene (ProfilerGraph *graph, RunStats *stats)
 
void showOverlayMessage (const char *msg, float dtime, int percent, bool draw_clouds=true)
 
void readSettings ()
 
bool isKeyDown (GameKeyType k)
 
bool wasKeyDown (GameKeyType k)
 
bool wasKeyPressed (GameKeyType k)
 
bool wasKeyReleased (GameKeyType k)
 

Static Protected Member Functions

static void settingChangedCallback (const std::string &setting_name, void *data)
 

Private Member Functions

void showDeathFormspec ()
 
void showPauseMenu ()
 
void pauseAnimation ()
 
void resumeAnimation ()
 
void handleClientEvent_None (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_PlayerDamage (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_PlayerForceMove (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_Deathscreen (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_ShowFormSpec (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_ShowLocalFormSpec (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HandleParticleEvent (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HudAdd (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HudRemove (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_HudChange (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetSky (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetSun (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetMoon (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_SetStars (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_OverrideDayNigthRatio (ClientEvent *event, CameraOrientation *cam)
 
void handleClientEvent_CloudParams (ClientEvent *event, CameraOrientation *cam)
 
void updateChat (f32 dtime)
 
bool nodePlacement (const ItemDefinition &selected_def, const ItemStack &selected_item, const v3s16 &nodepos, const v3s16 &neighborpos, const PointedThing &pointed, const NodeMetadata *meta)
 
f32 getSensitivityScaleFactor () const
 
bool isTouchCrosshairDisabled ()
 

Private Attributes

InputHandlerinput = nullptr
 
Clientclient = nullptr
 
Serverserver = nullptr
 
ClientDynamicInfo client_display_info {}
 
float dynamic_info_send_timer = 0
 
IWritableTextureSourcetexture_src = nullptr
 
IWritableShaderSourceshader_src = nullptr
 
IWritableItemDefManageritemdef_manager = nullptr
 
NodeDefManagernodedef_manager = nullptr
 
std::unique_ptr< ISoundManagersound_manager
 
SoundMakersoundmaker = nullptr
 
ChatBackendchat_backend = nullptr
 
LogOutputBuffer m_chat_log_buf
 
EventManagereventmgr = nullptr
 
QuicktuneShortcutterquicktune = nullptr
 
std::unique_ptr< GameUIm_game_ui
 
GUIChatConsolegui_chat_console = nullptr
 
MapDrawControldraw_control = nullptr
 
Cameracamera = nullptr
 
Cloudsclouds = nullptr
 
Skysky = nullptr
 
Hudhud = nullptr
 
Minimapmapper = nullptr
 
std::unordered_map< u32, u32 > m_hud_server_to_client
 
GameRunData runData
 
Flags m_flags
 
IrrlichtDevice * device
 
RenderingEnginem_rendering_engine
 
video::IVideoDriver * driver
 
scene::ISceneManager * smgr
 
bool * kill
 
std::string * error_message
 
bool * reconnect_requested
 
PausedNodesList paused_animated_nodes
 
bool simple_singleplayer_mode
 
int crack_animation_length
 
IntervalLimiter profiler_interval
 
bool m_cache_doubletap_jump
 
bool m_cache_enable_clouds
 
bool m_cache_enable_joysticks
 
bool m_cache_enable_particles
 
bool m_cache_enable_fog
 
bool m_cache_enable_noclip
 
bool m_cache_enable_free_move
 
f32 m_cache_mouse_sensitivity
 
f32 m_cache_joystick_frustum_sensitivity
 
f32 m_repeat_place_time
 
f32 m_repeat_dig_time
 
f32 m_cache_cam_smoothing
 
bool m_invert_mouse
 
bool m_enable_hotbar_mouse_wheel
 
bool m_invert_hotbar_mouse_wheel
 
bool m_first_loop_after_window_activation = false
 
bool m_camera_offset_changed = false
 
bool m_game_focused = false
 
bool m_does_lost_focus_pause_game = false
 
bool m_is_paused = false
 
bool m_touch_simulate_aux1 = false
 
bool m_touch_use_crosshair
 

Static Private Attributes

static const ClientEventHandler clientEventHandler [CLIENTEVENT_MAX]
 

Constructor & Destructor Documentation

◆ Game()

Game::Game ( )

References g_settings, readSettings(), Settings::registerChangedCallback(), and settingChangedCallback().

+ Here is the call graph for this function:

◆ ~Game()

Game::~Game ( )

References camera, clearTextureNameCache(), client, Settings::deregisterChangedCallback(), draw_control, eventmgr, RenderingEngine::finalize(), g_settings, hud, itemdef_manager, m_rendering_engine, nodedef_manager, quicktune, server, settingChangedCallback(), shader_src, sound_manager, soundmaker, and texture_src.

+ Here is the call graph for this function:

Member Function Documentation

◆ checkConnection()

bool Game::checkConnection ( )
inlineprotected

References error_message, errorstream, fmtgettext(), and reconnect_requested.

Referenced by getServerContent(), and run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkZoomEnabled()

void Game::checkZoomEnabled ( )
protected

References PlayerFovSpec::fov, Player::getFov(), LocalPlayer::getZoomFOV(), and m_game_ui.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ connectToServer()

◆ copyServerClientCache()

void Game::copyServerClientCache ( )
protected

References clientMediaUpdateCacheCopy(), and infostream.

Referenced by createSingleplayerServer().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createClient()

bool Game::createClient ( const GameStartData start_data)
protected

References IWritableShaderSource::addShaderConstantSetterFactory(), camera, clouds, connectToServer(), crack_animation_length, device, draw_control, driver, error_message, errorstream, g_touchscreengui, g_version_hash, getServerContent(), IWritableTextureSource::getTexture(), hud, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, initGui(), Player::inventory, isTouchCrosshairDisabled(), m_cache_enable_clouds, m_rendering_engine, mapper, N_, ShadowRenderer::preInit(), PROJECT_NAME_C, TouchScreenGUI::setUseCrosshair(), shader_src, showOverlayMessage(), simple_singleplayer_mode, sky, smgr, texture_src, and utf8_to_wide().

Referenced by startup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ createSingleplayerServer()

bool Game::createSingleplayerServer ( const std::string &  map_dir,
const SubgameSpec gamespec,
u16  port 
)
protected

References InputHandler::cancelPressed(), InputHandler::clear(), copyServerClientCache(), device, error_message, errorstream, fmtgettext(), g_settings, Settings::get(), Settings::getBool(), input, Address::isIPv6(), FpsControl::limit(), m_rendering_engine, N_, FpsControl::reset(), Address::Resolve(), RenderingEngine::run(), runInThread(), Address::serializeString(), Address::setAddress(), showOverlayMessage(), simple_singleplayer_mode, warningstream, and BaseException::what().

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ decreaseViewRange()

void Game::decreaseViewRange ( )
protected

References fwgettext(), g_settings, Sky::getFogDistance(), Settings::getS16(), itos(), m_game_ui, Settings::set(), and sky.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ drawScene()

void Game::drawScene ( ProfilerGraph graph,
RunStats stats 
)
protected

References BS, camera, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD_FRONT, GameRunData::damage_flash, ProfilerGraph::draw(), RenderingEngine::draw_scene(), RunStats::drawtime, driver, GameRunData::fog_range, FOG_RANGE_ALL, g_fontengine, g_profiler, g_touchscreengui, Camera::getCameraMode(), Sky::getFogColor(), FontEngine::getFont(), Sky::getSkyColor(), Profiler::graphAdd(), HUD_FLAG_CROSSHAIR_VISIBLE, HUD_FLAG_WIELDITEM_VISIBLE, Player::hud_flags, isTouchCrosshairDisabled(), m_cache_enable_fog, m_game_ui, m_rendering_engine, PRECISION_MICRO, runData, sky, and TimeTaker::stop().

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ dropSelectedItem()

void Game::dropSelectedItem ( bool  single_item = false)
protected

References IDropAction::count, MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, and InventoryLocation::setCurrentPlayer().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSensitivityScaleFactor()

f32 Game::getSensitivityScaleFactor ( ) const
private

Referenced by updateCameraOrientation().

+ Here is the caller graph for this function:

◆ getServerContent()

bool Game::getServerContent ( bool *  aborted)
protected

References InputHandler::cancelPressed(), checkConnection(), InputHandler::clear(), device, RenderingEngine::draw_load_screen(), error_message, errorstream, g_settings, Settings::getBool(), guienv, infostream, input, LC_Init, FpsControl::limit(), m_rendering_engine, FpsControl::reset(), RenderingEngine::run(), step(), texture_src, USE_CURL, utf8_to_wide(), and wstrgettext().

Referenced by createClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleCallbacks()

bool Game::handleCallbacks ( )
inlineprotected

References MainGameCallback::changepassword_requested, MainGameCallback::changevolume_requested, MainGameCallback::disconnect_requested, g_gamecallback, g_menumgr, guienv, guiroot, input, InputHandler::keycache, MainGameCallback::keyconfig_changed, MainGameCallback::keyconfig_requested, KeyCache::populate(), MainGameCallback::show_open_url_dialog, and texture_src.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleClientEvent_CloudParams()

void Game::handleClientEvent_CloudParams ( ClientEvent event,
CameraOrientation cam 
)
private

◆ handleClientEvent_Deathscreen()

void Game::handleClientEvent_Deathscreen ( ClientEvent event,
CameraOrientation cam 
)
private

References GameRunData::damage_flash, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, runData, and showDeathFormspec().

+ Here is the call graph for this function:

◆ handleClientEvent_HandleParticleEvent()

void Game::handleClientEvent_HandleParticleEvent ( ClientEvent event,
CameraOrientation cam 
)
private

◆ handleClientEvent_HudAdd()

void Game::handleClientEvent_HudAdd ( ClientEvent event,
CameraOrientation cam 
)
private

◆ handleClientEvent_HudChange()

void Game::handleClientEvent_HudChange ( ClientEvent event,
CameraOrientation cam 
)
private

◆ handleClientEvent_HudRemove()

void Game::handleClientEvent_HudRemove ( ClientEvent event,
CameraOrientation cam 
)
private

References ClientEvent::hudrm, ClientEvent::id, m_hud_server_to_client, and Player::removeHud().

+ Here is the call graph for this function:

◆ handleClientEvent_None()

void Game::handleClientEvent_None ( ClientEvent event,
CameraOrientation cam 
)
private

References FATAL_ERROR.

◆ handleClientEvent_OverrideDayNigthRatio()

void Game::handleClientEvent_OverrideDayNigthRatio ( ClientEvent event,
CameraOrientation cam 
)
private

◆ handleClientEvent_PlayerDamage()

void Game::handleClientEvent_PlayerDamage ( ClientEvent event,
CameraOrientation cam 
)
private

◆ handleClientEvent_PlayerForceMove()

void Game::handleClientEvent_PlayerForceMove ( ClientEvent event,
CameraOrientation cam 
)
private

◆ handleClientEvent_SetMoon()

void Game::handleClientEvent_SetMoon ( ClientEvent event,
CameraOrientation cam 
)
private

References ClientEvent::moon_params, MoonParams::scale, Sky::setMoonScale(), Sky::setMoonTexture(), Sky::setMoonVisible(), sky, MoonParams::texture, texture_src, MoonParams::tonemap, and MoonParams::visible.

+ Here is the call graph for this function:

◆ handleClientEvent_SetSky()

◆ handleClientEvent_SetStars()

void Game::handleClientEvent_SetStars ( ClientEvent event,
CameraOrientation cam 
)
private

References StarParams::count, StarParams::day_opacity, StarParams::scale, Sky::setStarColor(), Sky::setStarCount(), Sky::setStarDayOpacity(), Sky::setStarScale(), Sky::setStarsVisible(), sky, ClientEvent::star_params, StarParams::starcolor, and StarParams::visible.

+ Here is the call graph for this function:

◆ handleClientEvent_SetSun()

void Game::handleClientEvent_SetSun ( ClientEvent event,
CameraOrientation cam 
)
private

References SunParams::scale, Sky::setSunriseTexture(), Sky::setSunriseVisible(), Sky::setSunScale(), Sky::setSunTexture(), Sky::setSunVisible(), sky, ClientEvent::sun_params, SunParams::sunrise, SunParams::sunrise_visible, SunParams::texture, texture_src, SunParams::tonemap, and SunParams::visible.

+ Here is the call graph for this function:

◆ handleClientEvent_ShowFormSpec()

void Game::handleClientEvent_ShowFormSpec ( ClientEvent event,
CameraOrientation cam 
)
private

References GUIFormSpecMenu::create(), ClientEvent::formname, ClientEvent::formspec, RenderingEngine::get_gui_env(), input, InputHandler::joystick, m_game_ui, m_rendering_engine, ClientEvent::show_formspec, and sound_manager.

+ Here is the call graph for this function:

◆ handleClientEvent_ShowLocalFormSpec()

void Game::handleClientEvent_ShowLocalFormSpec ( ClientEvent event,
CameraOrientation cam 
)
private

References GUIFormSpecMenu::create(), ClientEvent::formname, ClientEvent::formspec, RenderingEngine::get_gui_env(), input, InputHandler::joystick, m_game_ui, m_rendering_engine, ClientEvent::show_formspec, and sound_manager.

+ Here is the call graph for this function:

◆ handleDigging()

void Game::handleDigging ( const PointedThing pointed,
const v3s16 nodepos,
const ItemStack selected_item,
const ItemStack hand_item,
f32  dtime 
)
protected

◆ handlePointingAtNode()

void Game::handlePointingAtNode ( const PointedThing pointed,
const ItemStack selected_item,
const ItemStack hand_item,
f32  dtime 
)
protected

◆ handlePointingAtNothing()

void Game::handlePointingAtNothing ( const ItemStack playerItem)
protected

References infostream, INTERACT_ACTIVATE, POINTEDTHING_NOTHING, and PointedThing::type.

Referenced by processPlayerInteraction().

+ Here is the caller graph for this function:

◆ handlePointingAtObject()

void Game::handlePointingAtObject ( const PointedThing pointed,
const ItemStack playeritem,
const v3f player_position,
bool  show_debug 
)
protected

References ClientActiveObject::debugInfoText(), KeyType::DIG, dir(), ClientActiveObject::directReportPunch(), ClientActiveObject::getPosition(), infostream, ClientActiveObject::infoText(), INTERACT_PLACE, INTERACT_START_DIGGING, isKeyDown(), m_game_ui, object_hit_delay, GameRunData::object_hit_delay_timer, KeyType::PLACE, GameRunData::punching, runData, GameRunData::selected_object, GameRunData::time_from_last_punch, unescape_translate(), utf8_to_wide(), wasKeyDown(), and wasKeyPressed().

Referenced by processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ increaseViewRange()

void Game::increaseViewRange ( )
protected

References fwgettext(), g_settings, Sky::getFogDistance(), Settings::getS16(), itos(), m_game_ui, Settings::set(), and sky.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

bool Game::init ( const std::string &  map_dir,
const std::string &  address,
u16  port,
const SubgameSpec gamespec 
)
protected

References createItemDefManager(), createNodeDefManager(), createShaderSource(), createSingleplayerServer(), createTextureSource(), eventmgr, initSound(), itemdef_manager, N_, nodedef_manager, quicktune, shader_src, showOverlayMessage(), and texture_src.

Referenced by startup().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initGui()

bool Game::initGui ( )
protected

References ChatBackend::applySettings(), chat_backend, ChatBackend::clearRecentChat(), device, g_menumgr, g_settings, g_touchscreengui, Settings::getBool(), gui_chat_console, guienv, m_game_ui, and texture_src.

Referenced by createClient().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initSound()

bool Game::initSound ( )
protected

References createOpenALSoundManager(), eventmgr, g_settings, g_sound_manager_singleton, Settings::getBool(), infostream, nodedef_manager, SoundMaker::registerReceiver(), sound_manager, and soundmaker.

Referenced by init().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isKeyDown()

bool Game::isKeyDown ( GameKeyType  k)
inlineprotected

References input, and InputHandler::isKeyDown().

Referenced by handlePointingAtNode(), handlePointingAtObject(), nodePlacement(), processKeyInput(), processPlayerInteraction(), and updatePlayerControl().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isTouchCrosshairDisabled()

bool Game::isTouchCrosshairDisabled ( )
inlineprivate

References camera, CAMERA_MODE_FIRST, Camera::getCameraMode(), and m_touch_use_crosshair.

Referenced by createClient(), drawScene(), processPlayerInteraction(), and updateCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nodePlacement()

bool Game::nodePlacement ( const ItemDefinition selected_def,
const ItemStack selected_item,
const v3s16 nodepos,
const v3s16 neighborpos,
const PointedThing pointed,
const NodeMetadata meta 
)
private

References BS, ContentFeatures::buildable_to, CPT2_4DIR, CPT2_COLOR, CPT2_COLORED_4DIR, CPT2_COLORED_FACEDIR, CPT2_COLORED_WALLMOUNTED, CPT2_FACEDIR, CPT2_WALLMOUNTED, GUIFormSpecMenu::create(), dir(), ContentFeatures::drawtype, errorstream, facedir_dirs, floatToInt(), g_settings, NodeDefManager::get(), RenderingEngine::get_gui_env(), Settings::getBool(), MapNode::getFaceDir(), NodeDefManager::getId(), Map::getNode(), MapNode::getParam2(), LocalPlayer::getStandingNodePos(), SimpleMetadata::getString(), MapNode::getWallMountedDir(), ContentFeatures::groups, infostream, input, INTERACT_PLACE, isKeyDown(), InputHandler::isRandom(), itemgroup_get(), InputHandler::joystick, m_game_ui, SoundMaker::m_player_rightpunch_sound, m_rendering_engine, ItemStack::metadata, MYMAX, mystoi(), ItemDefinition::name, NDT_SIGNLIKE, NDT_TORCHLIKE, ItemDefinition::node_placement_prediction, nodedef_manager, p(), ContentFeatures::param_type_2, ItemDefinition::place_param2, ContentFeatures::rightclickable, InventoryLocation::setNodeMeta(), MapNode::setParam2(), KeyType::SNEAK, sound_manager, ItemDefinition::sound_place, ItemDefinition::sound_place_failed, soundmaker, verbosestream, ContentFeatures::walkable, and ItemDefinition::wallmounted_rotate_vertical.

Referenced by handlePointingAtNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openConsole()

void Game::openConsole ( float  scale,
const wchar_t *  line = NULL 
)
protected

References gui_chat_console, porting::hasPhysicalKeyboardAndroid(), GUIChatConsole::isOpenInhibited(), GUIChatConsole::openConsole(), GUIChatConsole::replaceAndAddToHistory(), GUIChatConsole::setCloseOnEnter(), and porting::showTextInputDialog().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openInventory()

void Game::openInventory ( )
protected

References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), LocalPlayer::getCAO(), PlayerInventoryFormSource::getForm(), Client::getInventory(), infostream, input, InputHandler::joystick, PlayerInventoryFormSource::m_client, m_game_ui, m_rendering_engine, InventoryLocation::setCurrentPlayer(), and sound_manager.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pauseAnimation()

void Game::pauseAnimation ( )
private

References paused_animated_nodes, pauseNodeAnimation(), and smgr.

Referenced by updatePauseState().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processClientEvents()

void Game::processClientEvents ( CameraOrientation cam)
protected

References CLIENTEVENT_MAX, clientEventHandler, FATAL_ERROR_IF, and ClientEventHandler::handler.

Referenced by run().

+ Here is the caller graph for this function:

◆ processItemSelection()

void Game::processItemSelection ( u16 *  new_playeritem)
protected

References dir(), g_touchscreengui, TouchScreenGUI::getHotbarSelection(), InputHandler::getMouseWheel(), Player::getWieldIndex(), KeyType::HOTBAR_NEXT, KeyType::HOTBAR_PREV, Player::hud_hotbar_itemcount, input, m_enable_hotbar_mouse_wheel, m_invert_hotbar_mouse_wheel, MYMIN, PLAYER_INVENTORY_SIZE, KeyType::SLOT_1, and wasKeyDown().

Referenced by processUserInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processKeyInput()

void Game::processKeyInput ( )
protected

References KeyType::AUTOFORWARD, KeyType::BACKWARD, InputHandler::cancelPressed(), KeyType::CHAT, checkZoomEnabled(), KeyType::CINEMATIC, KeyType::CMD, KeyType::CMD_LOCAL, KeyType::CONSOLE, QuicktuneShortcutter::dec(), KeyType::DEC_VOLUME, KeyType::DECREASE_VIEWING_RANGE, decreaseViewRange(), KeyType::DROP, dropSelectedItem(), KeyType::FASTMOVE, KeyType::FREEMOVE, fwgettext(), g_settings, Settings::getBool(), Settings::getFloat(), QuicktuneShortcutter::getMessage(), gui_chat_console, QuicktuneShortcutter::hasMessage(), QuicktuneShortcutter::inc(), KeyType::INC_VOLUME, KeyType::INCREASE_VIEWING_RANGE, increaseViewRange(), input, KeyType::INVENTORY, isKeyDown(), GUIChatConsole::isOpenInhibited(), KeyType::JUMP, GameRunData::jump_timer_up, m_game_ui, KeyType::MINIMAP, KeyType::MUTE, myround(), QuicktuneShortcutter::next(), KeyType::NOCLIP, openConsole(), openInventory(), KeyType::PITCHMOVE, QuicktuneShortcutter::prev(), quicktune, KeyType::QUICKTUNE_DEC, KeyType::QUICKTUNE_INC, KeyType::QUICKTUNE_NEXT, KeyType::QUICKTUNE_PREV, KeyType::RANGESELECT, GameRunData::reset_jump_timer, runData, KeyType::SCREENSHOT, Settings::setBool(), Settings::setFloat(), showPauseMenu(), KeyType::SNEAK, KeyType::TOGGLE_BLOCK_BOUNDS, KeyType::TOGGLE_CHAT, KeyType::TOGGLE_DEBUG, KeyType::TOGGLE_FOG, KeyType::TOGGLE_HUD, KeyType::TOGGLE_PROFILER, KeyType::TOGGLE_UPDATE_CAMERA, toggleAutoforward(), toggleBlockBounds(), toggleCinematic(), toggleDebug(), toggleFast(), toggleFog(), toggleFreeMove(), toggleFreeMoveAlt(), toggleFullViewRange(), toggleMinimap(), toggleNoClip(), togglePitchMove(), toggleUpdateCamera(), utf8_to_wide(), wasKeyDown(), wasKeyPressed(), and KeyType::ZOOM.

Referenced by processUserInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processPlayerInteraction()

void Game::processPlayerInteraction ( f32  dtime,
bool  show_hud 
)
protected

References TouchScreenGUI::applyContextControls(), BS, GameRunData::btn_down_for_dig, camera, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT, InputHandler::clearWasKeyPressed(), JoystickController::clearWasKeyPressed(), InputHandler::clearWasKeyReleased(), JoystickController::clearWasKeyReleased(), KeyType::DIG, GameRunData::dig_instantly, GameRunData::dig_time, GameRunData::digging, GameRunData::digging_blocked, PointedThing::dump(), g_settings, g_touchscreengui, Settings::getBool(), Camera::getCameraMode(), ItemStack::getDefinition(), Camera::getDirection(), Camera::getHeadPosition(), TouchInteraction::getMode(), Camera::getOffset(), Camera::getPosition(), LocalPlayer::getPosition(), TouchScreenGUI::getShootline(), getToolRange(), Player::getWieldedItem(), handlePointingAtNode(), handlePointingAtNothing(), handlePointingAtObject(), hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, infostream, input, INTERACT_STOP_DIGGING, INTERACT_USE, intToFloat(), isKeyDown(), isTouchCrosshairDisabled(), itemdef_manager, InputHandler::joystick, ItemDefinition::liquids_pointable, m_game_ui, SoundMaker::m_player_leftpunch_sound, SoundMaker::m_player_leftpunch_sound2, PointedThing::node_undersurface, GameRunData::nodig_delay_timer, KeyType::PLACE, ItemDefinition::pointabilities, GameRunData::pointed_old, POINTEDTHING_NODE, POINTEDTHING_NOTHING, POINTEDTHING_OBJECT, GameRunData::punching, GameRunData::repeat_place_timer, runData, Camera::setDigging(), ItemDefinition::sound_use, ItemDefinition::sound_use_air, soundmaker, ItemDefinition::touch_interaction, PointedThing::type, updatePointedThing(), Hud::updateSelectionMesh(), ItemDefinition::usable, wasKeyDown(), wasKeyPressed(), and wasKeyReleased().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processQueues()

void Game::processQueues ( )
protected

References IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), shader_src, and texture_src.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processUserInput()

void Game::processUserInput ( f32  dtime)
protected

References InputHandler::clear(), GUIChatConsole::closeConsoleAtOnce(), device, g_touchscreengui, gui_chat_console, guienv, TouchScreenGUI::hide(), infostream, input, isMenuActive(), GUIChatConsole::isOpen(), GameRunData::jump_timer_down, GameRunData::jump_timer_up, m_cache_doubletap_jump, m_game_focused, m_game_ui, GameRunData::new_playeritem, processItemSelection(), processKeyInput(), InputHandler::releaseAllKeys(), runData, TouchScreenGUI::show(), InputHandler::step(), and TouchScreenGUI::step().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readSettings()

void Game::readSettings ( )
protected

References g_settings, Settings::getBool(), Settings::getFloat(), m_cache_cam_smoothing, m_cache_doubletap_jump, m_cache_enable_clouds, m_cache_enable_fog, m_cache_enable_free_move, m_cache_enable_joysticks, m_cache_enable_noclip, m_cache_enable_particles, m_cache_joystick_frustum_sensitivity, m_cache_mouse_sensitivity, m_does_lost_focus_pause_game, m_enable_hotbar_mouse_wheel, m_invert_hotbar_mouse_wheel, m_invert_mouse, m_repeat_dig_time, m_repeat_place_time, and rangelim.

Referenced by Game().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ resumeAnimation()

void Game::resumeAnimation ( )
private

References paused_animated_nodes.

Referenced by updatePauseState().

+ Here is the caller graph for this function:

◆ run()

◆ settingChangedCallback()

void Game::settingChangedCallback ( const std::string &  setting_name,
void *  data 
)
staticprotected

Referenced by Game(), and ~Game().

+ Here is the caller graph for this function:

◆ showDeathFormspec()

void Game::showDeathFormspec ( )
private

References GUIFormSpecMenu::create(), RenderingEngine::get_gui_env(), input, InputHandler::joystick, m_game_ui, m_rendering_engine, SIZE_TAG, and sound_manager.

Referenced by handleClientEvent_Deathscreen().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showOverlayMessage()

void Game::showOverlayMessage ( const char *  msg,
float  dtime,
int  percent,
bool  draw_clouds = true 
)
protected

References RenderingEngine::draw_load_screen(), guienv, m_rendering_engine, texture_src, and wstrgettext().

Referenced by connectToServer(), createClient(), createSingleplayerServer(), init(), and shutdown().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showPauseMenu()

void Game::showPauseMenu ( )
private

References GUIFormSpecMenu::create(), g_settings, g_touchscreengui, Settings::get(), RenderingEngine::get_gui_env(), Settings::getBool(), input, InputHandler::joystick, m_game_ui, m_rendering_engine, PROJECT_NAME_C, simple_singleplayer_mode, SIZE_TAG, sound_manager, str_formspec_escape(), strgettext(), and VERSION_STRING.

Referenced by processKeyInput(), and run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ shutdown()

void Game::shutdown ( )

References ChatBackend::addMessage(), chat_backend, LogOutputBuffer::clear(), client, clouds, MainMenuManager::deletingMenu(), device, g_menumgr, g_touchscreengui, gui_chat_console, TouchScreenGUI::hide(), m_chat_log_buf, m_game_ui, m_rendering_engine, MainMenuManager::m_stack, MainMenuManager::menuCount(), N_, IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), FpsControl::reset(), RenderingEngine::run(), runInThread(), server, shader_src, showOverlayMessage(), sky, sleep_ms, sound_manager, soundmaker, and texture_src.

Referenced by the_game().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startup()

bool Game::startup ( bool *  kill,
InputHandler input,
RenderingEngine rendering_engine,
const GameStartData game_params,
std::string &  error_message,
bool *  reconnect,
ChatBackend chat_backend 
)

◆ step()

void Game::step ( f32  dtime)
inlineprotected

References device, g_menumgr, g_settings, Settings::getFloat(), m_is_paused, and MainMenuManager::pausesGame().

Referenced by connectToServer(), getServerContent(), and run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleAutoforward()

void Game::toggleAutoforward ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleBlockBounds()

void Game::toggleBlockBounds ( )
protected

References Hud::BLOCK_BOUNDS_CURRENT, Hud::BLOCK_BOUNDS_MAX, Hud::BLOCK_BOUNDS_NEAR, Hud::BLOCK_BOUNDS_OFF, hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_game_ui, and Hud::toggleBlockBounds().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleCinematic()

void Game::toggleCinematic ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleDebug()

void Game::toggleDebug ( )
protected

References draw_control, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_game_ui, and MapDrawControl::show_wireframe.

Referenced by processKeyInput().

+ Here is the caller graph for this function:

◆ toggleFast()

void Game::toggleFast ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, m_touch_simulate_aux1, and Settings::set().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFog()

void Game::toggleFog ( )
protected

References g_settings, Settings::getBool(), m_game_ui, and Settings::setBool().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFreeMove()

void Game::toggleFreeMove ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().

Referenced by processKeyInput(), and toggleFreeMoveAlt().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFreeMoveAlt()

void Game::toggleFreeMoveAlt ( )
protected

References GameRunData::jump_timer_down, GameRunData::jump_timer_down_before, GameRunData::jump_timer_up, m_cache_doubletap_jump, GameRunData::reset_jump_timer, runData, and toggleFreeMove().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleFullViewRange()

void Game::toggleFullViewRange ( )
protected

References draw_control, Sky::getFogDistance(), m_game_ui, MapDrawControl::range_all, and sky.

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleMinimap()

void Game::toggleMinimap ( bool  shift_pressed)
protected

References g_settings, Settings::getBool(), Minimap::getModeDef(), Minimap::getModeIndex(), Hud::hasElementOfType(), hud, HUD_ELEM_MINIMAP, HUD_FLAG_MINIMAP_RADAR_VISIBLE, HUD_FLAG_MINIMAP_VISIBLE, MinimapModeDef::label, m_game_ui, mapper, MINIMAP_TYPE_RADAR, Minimap::nextMode(), Minimap::toggleMinimapShape(), MinimapModeDef::type, and utf8_to_wide().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleNoClip()

void Game::toggleNoClip ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ togglePitchMove()

void Game::togglePitchMove ( )
protected

References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().

Referenced by processKeyInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ toggleUpdateCamera()

void Game::toggleUpdateCamera ( )
protected

References Game::Flags::disable_camera_update, m_flags, and m_game_ui.

Referenced by processKeyInput().

+ Here is the caller graph for this function:

◆ updateCamera()

◆ updateCameraDirection()

void Game::updateCameraDirection ( CameraOrientation cam,
float  dtime 
)
protected

References device, driver, g_touchscreengui, input, isMenuActive(), InputHandler::isRandom(), m_first_loop_after_window_activation, InputHandler::setMousePos(), and updateCameraOrientation().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateCameraOrientation()

void Game::updateCameraOrientation ( CameraOrientation cam,
float  dtime 
)
protected

References camera, CAMERA_MODE_THIRD_FRONT, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, driver, g_touchscreengui, JoystickController::getAxisWithoutDead(), Camera::getCameraMode(), InputHandler::getMousePos(), TouchScreenGUI::getPitchChange(), getSensitivityScaleFactor(), TouchScreenGUI::getYawChange(), input, JA_FRUSTUM_HORIZONTAL, JA_FRUSTUM_VERTICAL, InputHandler::joystick, m_cache_enable_joysticks, m_cache_joystick_frustum_sensitivity, m_cache_mouse_sensitivity, m_invert_mouse, rangelim, and InputHandler::setMousePos().

Referenced by updateCameraDirection().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateChat()

void Game::updateChat ( f32  dtime)
private

References ChatBackend::addMessage(), ChatBackend::addUnparsedMessage(), chat_backend, LogOutputBuffer::empty(), LogOutputBuffer::get(), ChatBackend::getRecentBuffer(), ChatBackend::getRecentChat(), m_chat_log_buf, m_game_ui, ChatBuffer::resetLinesModified(), ChatBackend::step(), and utf8_to_wide().

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateClouds()

void Game::updateClouds ( float  dtime)
protected

References BS, camera, clouds, GameRunData::fog_range, Camera::getCameraNode(), Sky::getCloudColor(), Sky::getCloudsVisible(), Clouds::getColor(), Camera::getOffset(), Clouds::isCameraInsideCloud(), Sky::overrideColors(), runData, Sky::setInClouds(), sky, Clouds::step(), and Clouds::update().

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateDebugState()

void Game::updateDebugState ( )
protected

References MapDrawControl::allow_noclip, Hud::disableBlockBounds(), draw_control, hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_cache_enable_noclip, m_game_ui, and MapDrawControl::show_wireframe.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateFrame()

void Game::updateFrame ( ProfilerGraph graph,
RunStats stats,
f32  dtime,
const CameraOrientation cam 
)
protected

◆ updateInteractTimers()

void Game::updateInteractTimers ( f32  dtime)
inlineprotected

References GameRunData::nodig_delay_timer, GameRunData::object_hit_delay_timer, runData, and GameRunData::time_from_last_punch.

Referenced by run().

+ Here is the caller graph for this function:

◆ updatePauseState()

void Game::updatePauseState ( )
protected

References g_menumgr, m_is_paused, pauseAnimation(), MainMenuManager::pausesGame(), resumeAnimation(), simple_singleplayer_mode, and sound_manager.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePlayerControl()

void Game::updatePlayerControl ( const CameraOrientation cam)
protected

References KeyType::AUX1, PlayerControl::aux1, KeyType::BACKWARD, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, PlayerSettings::continuous_forward, KeyType::DIG, KeyType::FORWARD, g_touchscreengui, LocalPlayer::getAutojump(), InputHandler::getMovementDirection(), InputHandler::getMovementSpeed(), LocalPlayer::getPlayerSettings(), input, LocalPlayer::isDead(), isKeyDown(), KeyType::JUMP, KeyType::LEFT, m_touch_simulate_aux1, PlayerControl::movement_direction, PlayerControl::movement_speed, KeyType::PLACE, KeyType::RIGHT, KeyType::SNEAK, and KeyType::ZOOM.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updatePointedThing()

PointedThing Game::updatePointedThing ( const core::line3d< f32 > &  shootline,
bool  liquids_pointable,
const std::optional< Pointabilities > &  pointabilities,
bool  look_for_object,
const v3s16 camera_offset 
)
protected

Returns the object or node the player is pointing at. Also updates the selected thing in the Hud.

Parameters
[in]shootlinethe shootline, starting from the camera position. This also gives the maximal distance of the search.
[in]liquids_pointableif false, liquids are ignored
[in]pointabilitiesitem specific pointable overriding
[in]look_for_objectif false, objects are ignored
[in]camera_offsetoffset of the camera
[out]selected_objectthe selected object or NULL if not found

References BS, Environment::continueRaycast(), dir(), ClientActiveObject::doShowSelectionBox(), final_color_blend(), floatToInt(), g_6dirs, g_settings, Settings::getBool(), ClientEnvironment::getClientMap(), getInteriorLight(), MapNode::getNeighbors(), Map::getNode(), Map::getNodeDefManager(), ClientActiveObject::getPosition(), GenericCAO::getProperties(), GenericCAO::getSceneNode(), ClientActiveObject::getSelectionBox(), Hud::getSelectionBoxes(), MapNode::getSelectionBoxes(), Hud::getSelectionPos(), hud, PointedThing::intersection_normal, intToFloat(), PointedThing::node_undersurface, PointedThing::object_id, p(), POINTEDTHING_NODE, POINTEDTHING_OBJECT, Hud::pointing_at_object, PointedThing::raw_intersection_normal, ObjectProperties::rotate_selectionbox, runData, GameRunData::selected_object, Hud::setSelectedFaceNormal(), Hud::setSelectionMeshColor(), Hud::setSelectionPos(), Hud::setSelectionRotation(), and PointedThing::type.

Referenced by processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateProfilerGraphs()

void Game::updateProfilerGraphs ( ProfilerGraph graph)
inlineprotected

References g_profiler, Profiler::graphPop(), and ProfilerGraph::put().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateProfilers()

void Game::updateProfilers ( const RunStats stats,
const FpsControl draw_times,
f32  dtime 
)
protected

References FpsControl::busy_time, Profiler::clear(), RunStats::drawtime, g_profiler, g_settings, Settings::getFloat(), Profiler::graphAdd(), Profiler::graphSet(), infostream, m_game_ui, Profiler::print(), profiler_interval, FpsControl::sleep_time, and IntervalLimiter::step().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateShadows()

void Game::updateShadows ( )
protected

References camera, RenderingEngine::get_shadow_renderer(), ShadowRenderer::getDirectionalLight(), Sky::getMoonDirection(), Sky::getMoonVisible(), Sky::getSunDirection(), Sky::getSunVisible(), getWickedTimeOfDay(), m_camera_offset_changed, runData, DirectionalLight::setDirection(), ShadowRenderer::setShadowIntensity(), ShadowRenderer::setTimeOfDay(), sky, GameRunData::time_of_day_smooth, and DirectionalLight::update_frustum().

Referenced by updateFrame().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateSound()

void Game::updateSound ( f32  dtime)
protected

References BS, camera, device, NodeDefManager::get(), Camera::getCameraNode(), Camera::getDirection(), LocalPlayer::getFootstepNodePos(), Map::getNode(), Camera::getOffset(), LocalPlayer::getParent(), Player::getSpeed(), ClientActiveObject::getVelocity(), intToFloat(), SoundMaker::m_player_step_sound, SoundMaker::makes_footstep_sound, LocalPlayer::makes_footstep_sound, nodedef_manager, ContentFeatures::sound_footstep, sound_manager, sound_volume_control(), soundmaker, and SoundMaker::step().

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateStats()

void Game::updateStats ( RunStats stats,
const FpsControl draw_times,
f32  dtime 
)
protected

References Jitter::avg, RunStats::busy_time_jitter, Jitter::counter, RunStats::dtime_jitter, FpsControl::getBusyMs(), Jitter::max, Jitter::max_fraction, Jitter::max_sample, Jitter::min, and Jitter::min_sample.

Referenced by run().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasKeyDown()

bool Game::wasKeyDown ( GameKeyType  k)
inlineprotected

References input, and InputHandler::wasKeyDown().

Referenced by handlePointingAtObject(), processItemSelection(), processKeyInput(), and processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasKeyPressed()

bool Game::wasKeyPressed ( GameKeyType  k)
inlineprotected

References input, and InputHandler::wasKeyPressed().

Referenced by handlePointingAtNode(), handlePointingAtObject(), processKeyInput(), processPlayerInteraction(), and updateCamera().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ wasKeyReleased()

bool Game::wasKeyReleased ( GameKeyType  k)
inlineprotected

References input, and InputHandler::wasKeyReleased().

Referenced by processPlayerInteraction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ camera

◆ chat_backend

ChatBackend* Game::chat_backend = nullptr
private

Referenced by initGui(), shutdown(), startup(), and updateChat().

◆ client

Client* Game::client = nullptr
private

Referenced by ~Game(), and shutdown().

◆ client_display_info

ClientDynamicInfo Game::client_display_info {}
private

Referenced by run().

◆ clientEventHandler

const ClientEventHandler Game::clientEventHandler
staticprivate
Initial value:
= {
}
void handleClientEvent_CloudParams(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:3133
void handleClientEvent_OverrideDayNigthRatio(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:3125
void handleClientEvent_HudAdd(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2920
void handleClientEvent_PlayerDamage(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2827
void handleClientEvent_SetSky(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:3025
void handleClientEvent_SetStars(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:3115
void handleClientEvent_ShowFormSpec(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2877
void handleClientEvent_SetSun(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:3095
void handleClientEvent_PlayerForceMove(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2855
void handleClientEvent_HudRemove(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2953
void handleClientEvent_HudChange(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2966
void handleClientEvent_None(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2822
void handleClientEvent_SetMoon(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:3106
void handleClientEvent_HandleParticleEvent(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2913
void handleClientEvent_ShowLocalFormSpec(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2901
void handleClientEvent_Deathscreen(ClientEvent *event, CameraOrientation *cam)
Definition: game.cpp:2861

Referenced by processClientEvents().

◆ clouds

◆ crack_animation_length

int Game::crack_animation_length
private

Referenced by createClient(), and handleDigging().

◆ device

◆ draw_control

◆ driver

video::IVideoDriver* Game::driver
private

◆ dynamic_info_send_timer

float Game::dynamic_info_send_timer = 0
private

Referenced by run().

◆ error_message

std::string* Game::error_message
private

◆ eventmgr

EventManager* Game::eventmgr = nullptr
private

◆ gui_chat_console

GUIChatConsole* Game::gui_chat_console = nullptr
private

◆ hud

◆ input

◆ itemdef_manager

◆ kill

bool* Game::kill
private

Referenced by run(), and startup().

◆ m_cache_cam_smoothing

f32 Game::m_cache_cam_smoothing
private

Referenced by readSettings(), and run().

◆ m_cache_doubletap_jump

bool Game::m_cache_doubletap_jump
private

◆ m_cache_enable_clouds

bool Game::m_cache_enable_clouds
private

Referenced by createClient(), and readSettings().

◆ m_cache_enable_fog

bool Game::m_cache_enable_fog
private

Referenced by drawScene(), and readSettings().

◆ m_cache_enable_free_move

bool Game::m_cache_enable_free_move
private

Referenced by readSettings(), and updateFrame().

◆ m_cache_enable_joysticks

bool Game::m_cache_enable_joysticks
private

◆ m_cache_enable_noclip

bool Game::m_cache_enable_noclip
private

Referenced by readSettings(), and updateDebugState().

◆ m_cache_enable_particles

bool Game::m_cache_enable_particles
private

Referenced by handleDigging(), and readSettings().

◆ m_cache_joystick_frustum_sensitivity

f32 Game::m_cache_joystick_frustum_sensitivity
private

◆ m_cache_mouse_sensitivity

f32 Game::m_cache_mouse_sensitivity
private

◆ m_camera_offset_changed

bool Game::m_camera_offset_changed = false
private

◆ m_chat_log_buf

LogOutputBuffer Game::m_chat_log_buf
private

Referenced by shutdown(), and updateChat().

◆ m_does_lost_focus_pause_game

bool Game::m_does_lost_focus_pause_game = false
private

Referenced by readSettings(), and run().

◆ m_enable_hotbar_mouse_wheel

bool Game::m_enable_hotbar_mouse_wheel
private

◆ m_first_loop_after_window_activation

bool Game::m_first_loop_after_window_activation = false
private

Referenced by startup(), and updateCameraDirection().

◆ m_flags

Flags Game::m_flags
private

Referenced by toggleUpdateCamera(), and updateCamera().

◆ m_game_focused

bool Game::m_game_focused = false
private

Referenced by processUserInput().

◆ m_game_ui

◆ m_hud_server_to_client

std::unordered_map<u32, u32> Game::m_hud_server_to_client
private

◆ m_invert_hotbar_mouse_wheel

bool Game::m_invert_hotbar_mouse_wheel
private

◆ m_invert_mouse

bool Game::m_invert_mouse
private

◆ m_is_paused

bool Game::m_is_paused = false
private

◆ m_rendering_engine

◆ m_repeat_dig_time

f32 Game::m_repeat_dig_time
private

Referenced by handleDigging(), and readSettings().

◆ m_repeat_place_time

f32 Game::m_repeat_place_time
private

◆ m_touch_simulate_aux1

bool Game::m_touch_simulate_aux1 = false
private

◆ m_touch_use_crosshair

bool Game::m_touch_use_crosshair
private

◆ mapper

Minimap* Game::mapper = nullptr
private

◆ nodedef_manager

◆ paused_animated_nodes

PausedNodesList Game::paused_animated_nodes
private

Referenced by pauseAnimation(), and resumeAnimation().

◆ profiler_interval

IntervalLimiter Game::profiler_interval
private

Referenced by updateProfilers().

◆ quicktune

QuicktuneShortcutter* Game::quicktune = nullptr
private

Referenced by ~Game(), init(), and processKeyInput().

◆ reconnect_requested

bool* Game::reconnect_requested
private

◆ runData

◆ server

Server* Game::server = nullptr
private

Referenced by ~Game(), and shutdown().

◆ shader_src

IWritableShaderSource* Game::shader_src = nullptr
private

◆ simple_singleplayer_mode

bool Game::simple_singleplayer_mode
private

◆ sky

◆ smgr

scene::ISceneManager* Game::smgr
private

◆ sound_manager

◆ soundmaker

◆ texture_src


The documentation for this class was generated from the following file: