#include <game_internal.h>
Classes | |
| struct | Flags |
Public Member Functions | |
| Game () | |
| ~Game () | |
| bool | startup (volatile std::sig_atomic_t *kill, InputHandler *input, RenderingEngine *rendering_engine, GameStartData &game_params, GameErrorData &errordata, ChatBackend *chat_backend) |
| void | run () |
| void | shutdown () |
| Client * | getClient () |
Public Attributes | |
| int | crack_animation_length |
Protected Member Functions | |
| bool | init (GameStartData &start_data) |
| bool | initSound () |
| bool | createServer (GameStartData &start_data) |
| 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 () |
| 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) |
| bool | shouldShowTouchControls () |
| void | dropSelectedItem (bool single_item=false) |
| 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) |
| bool | getTogglableKeyState (GameKeyType key, bool toggling_enabled, bool prev_key_state) |
| void | updatePlayerControl (const CameraOrientation &cam) |
| void | updatePauseState () |
| void | step (f32 dtime) |
| void | processClientEvents (CameraOrientation *cam) |
| void | updateCameraMode () |
| void | updateCameraOffset () |
| 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 ItemStack &hand_item, 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, float *indef_pos=nullptr) |
| bool | fogEnabled () |
| void | readSettings () |
| float | getAxisValue (GameKeyType k) |
| 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) |
Static Private Attributes | |
| static const ClientEventHandler | clientEventHandler [CLIENTEVENT_MAX] |
| Game::Game | ( | ) |
References clearTextureNameCache(), g_logger, g_settings, m_chat_log_buf, m_game_ui, readSettings(), Settings::registerChangedCallback(), and settingChangedCallback().
Referenced by settingChangedCallback().
| Game::~Game | ( | ) |
References camera, clearTextureNameCache(), Settings::deregisterAllChangedCallbacks(), draw_control, eventmgr, RenderingEngine::finalize(), g_settings, hud, itemdef_manager, m_rendering_engine, nodedef_manager, quicktune, shader_src, sound_manager, soundmaker, and texture_src.
|
protected |
References errordata, fmtgettext(), GameErrorData::setError(), unescape_translate(), utf8_to_wide(), and wide_to_utf8().
Referenced by connectToServer(), getServerContent(), and run().
|
protected |
References PlayerFovSpec::fov, Player::getFov(), LocalPlayer::getZoomFOV(), m_game_ui, and GameUI::showTranslatedStatusText().
Referenced by processKeyInput().
|
protected |
References Address::Address(), Client::Client(), FrameMarker::FrameMarker(), GameClientData::address, GameClientData::allow_login_or_register, IPv6AddressBytes::bytes, InputHandler::cancelPressed(), checkConnection(), InputHandler::clear(), device, draw_control, errordata, errorstream, eventmgr, fmtgettext(), g_settings, GAME_CONNECTION_TIMEOUT, GAME_FALLBACK_TIMEOUT, Settings::getBool(), Address::getPort(), infostream, input, Address::isAny(), Address::isIPv6(), Address::isValid(), itemdef_manager, LC_Init, FpsControl::limit(), m_item_visuals_manager, m_rendering_engine, GameErrorData::message, N_, GameClientData::name, nodedef_manager, GameClientData::password, FpsControl::reset(), Address::Resolve(), RenderingEngine::run(), Address::serializeString(), Address::setAddress(), Address::setPort(), shader_src, showOverlayMessage(), simple_singleplayer_mode, GameParams::socket_port, sound_manager, step(), texture_src, warningstream, and BaseException::what().
Referenced by createClient().
|
protected |
References clientMediaUpdateCacheCopy(), and infostream.
Referenced by createServer().
|
protected |
References Camera::Camera(), Hud::Hud(), IWritableShaderSource::addShaderConstantSetter(), IWritableShaderSource::addShaderUniformSetterFactory(), camera, clouds, connectToServer(), crack_animation_length, device, draw_control, driver, errordata, g_version_hash, getServerContent(), ITextureSource::getTextureDimensions(), hud, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, initGui(), Player::inventory, m_rendering_engine, mapper, GameErrorData::message, myrand(), N_, ShadowRenderer::preInit(), GameErrorData::setError(), shader_src, showOverlayMessage(), simple_singleplayer_mode, sky, smgr, texture_src, and utf8_to_wide().
Referenced by startup().
|
protected |
References Server::Server(), InputHandler::cancelPressed(), InputHandler::clear(), copyServerClientCache(), UDPSocket::Create(), device, errordata, fmtgettext(), g_settings, GameParams::game_spec, Settings::get(), Settings::getBool(), UDPSocket::GetLocalAddress(), Address::getPort(), input, Address::isIPv6(), FpsControl::limit(), m_rendering_engine, m_shutdown_progress, GameErrorData::message, N_, WorldSpec::path, FpsControl::reset(), Address::Resolve(), RenderingEngine::run(), runInThread(), Address::serializeString(), Address::setAddress(), GameErrorData::setError(), showOverlayMessage(), simple_singleplayer_mode, GameParams::socket_port, warningstream, BaseException::what(), and GameStartData::world_spec.
Referenced by init().
|
protected |
References fwgettext(), g_settings, Settings::getS16(), itos(), m_game_ui, Settings::set(), GameUI::showStatusText(), and sky.
Referenced by processKeyInput().
|
protected |
References BS, camera, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD_FRONT, GameRunData::damage_flash, ProfilerGraph::draw(), RenderingEngine::draw_scene(), RunStats::drawtime, driver, FM_Mono, GameRunData::fog_range, FOG_RANGE_ALL, fogEnabled(), g_fontengine, g_profiler, Camera::getCameraMode(), FontEngine::getDefaultFontSize(), FontEngine::getFont(), Profiler::graphAdd(), HUD_FLAG_CROSSHAIR_VISIBLE, HUD_FLAG_WIELDITEM_VISIBLE, Player::hud_flags, isTouchShootlineUsed(), GameUI::m_flags, m_game_ui, m_rendering_engine, PRECISION_MICRO, runData, sky, TimeTaker::stop(), and ZoneScoped.
Referenced by updateFrame().
|
protected |
References IDropAction::IDropAction(), IDropAction::count, MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, and InventoryLocation::setCurrentPlayer().
Referenced by processKeyInput().
|
inlineprotected |
References m_cache_enable_fog, and sky.
Referenced by drawScene().
|
inlineprotected |
References InputHandler::getAxisValue(), and input.
Referenced by updatePlayerControl().
|
inline |
|
private |
|
protected |
References FrameMarker::FrameMarker(), InputHandler::cancelPressed(), checkConnection(), InputHandler::clear(), device, RenderingEngine::draw_load_screen(), errordata, errorstream, fmtgettext(), guienv, infostream, input, LC_Init, FpsControl::limit(), m_rendering_engine, GameErrorData::message, FpsControl::reset(), RenderingEngine::run(), step(), texture_src, utf8_to_wide(), and wstrgettext().
Referenced by createClient().
|
protected |
References isKeyDown(), and wasKeyPressed().
Referenced by updatePlayerControl().
|
private |
References clouds.
|
private |
References m_game_formspec, and GameFormSpec::showDeathFormspecLegacy().
|
private |
|
private |
References PlayerHud::add(), Player::hud, and m_hud_server_to_client.
|
private |
References CASE_SET, PlayerHud::get(), Player::hud, HUD_STAT_ALIGN, HUD_STAT_DIR, HUD_STAT_HIDEABLE, HUD_STAT_ITEM, HUD_STAT_NAME, HUD_STAT_NUMBER, HUD_STAT_OFFSET, HUD_STAT_POS, HUD_STAT_SCALE, HUD_STAT_SIZE, HUD_STAT_STYLE, HUD_STAT_TEXT, HUD_STAT_TEXT2, HUD_STAT_WORLD_POS, HUD_STAT_Z_INDEX, HudElementStat_END, and m_hud_server_to_client.
|
private |
References Player::hud, m_hud_server_to_client, and PlayerHud::remove().
|
private |
References FATAL_ERROR.
|
private |
|
private |
References SimpleTriggerEvent::SimpleTriggerEvent(), GameRunData::damage_flash, g_settings, Settings::getBool(), LocalPlayer::getCAO(), GenericCAO::getProperties(), ObjectProperties::hp_max, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, MYMIN, MtEvent::PLAYER_DAMAGE, PLAYER_MAX_HP_DEFAULT, rangelim(), and runData.
|
private |
References CameraOrientation::camera_pitch, and CameraOrientation::camera_yaw.
|
private |
References sky, and texture_src.
|
private |
References draw_control, g_settings, Settings::getFloat(), Settings::getS16(), infostream, rangelim(), sky, texture_src, ClientEvent::type, and MapDrawControl::wanted_range.
|
private |
References sky.
|
private |
References sky, and texture_src.
|
private |
References m_game_formspec, and GameFormSpec::showCSMFormSpec().
|
private |
References m_game_formspec, GameFormSpec::showFormSpec(), and GameFormSpec::showPlayerInventory().
|
private |
References m_game_formspec, and GameFormSpec::showPauseMenuFormSpec().
|
private |
|
protected |
References NodeDugEvent::NodeDugEvent(), GameRunData::btn_down_for_dig, camera, crack_animation_length, GameRunData::dig_index, GameRunData::dig_instantly, GameRunData::dig_time, GameRunData::dig_time_complete, DigParams::diggable, GameRunData::digging, GameRunData::digging_blocked, g_settings, SoundSpec::gain, NodeDefManager::get(), Settings::getBool(), getDigParams(), NodeDefManager::getId(), Map::getNode(), ItemStack::getToolCapabilities(), infostream, INTERACT_DIGGING_COMPLETED, INTERACT_START_DIGGING, itemdef_manager, SoundMaker::m_player_leftpunch_sound, m_repeat_dig_time, DigParams::main_group, ItemStack::name, SoundSpec::name, nodedef_manager, GameRunData::nodig_delay_timer, runData, Camera::setDigging(), soundmaker, DigParams::time, and ItemStack::wear.
Referenced by handlePointingAtNode().
|
protected |
References SoundSpec::SoundSpec(), camera, KeyType::DIG, GameRunData::digging_blocked, NodeDefManager::get(), ItemStack::getDefinition(), Map::getNode(), Map::getNodeMetadata(), SimpleMetadata::getString(), handleDigging(), infostream, isKeyDown(), itemdef_manager, m_game_ui, SoundMaker::m_player_rightpunch_sound, m_repeat_place_time, ContentFeatures::name, PointedThing::node_abovesurface, PointedThing::node_undersurface, nodedef_manager, nodePlacement(), GameRunData::nodig_delay_timer, KeyType::PLACE, GameRunData::repeat_place_timer, runData, Camera::setDigging(), GameUI::setInfoText(), soundmaker, unescape_translate(), utf8_to_wide(), and wasKeyPressed().
Referenced by processPlayerInteraction().
|
protected |
References infostream, INTERACT_ACTIVATE, POINTEDTHING_NOTHING, and PointedThing::type.
Referenced by processPlayerInteraction().
|
protected |
References ClientActiveObject::debugInfoText(), KeyType::DIG, ClientActiveObject::directReportPunch(), ClientActiveObject::getPosition(), infostream, ClientActiveObject::infoText(), INTERACT_PLACE, INTERACT_START_DIGGING, isKeyDown(), m_game_ui, m_repeat_dig_time, GameRunData::nodig_delay_timer, GameRunData::object_hit_delay_timer, KeyType::PLACE, GameRunData::punching, runData, GameRunData::selected_object, GameUI::setInfoText(), GameRunData::time_from_last_punch, unescape_translate(), utf8_to_wide(), wasKeyDown(), and wasKeyPressed().
Referenced by processPlayerInteraction().
|
protected |
References fwgettext(), g_settings, Settings::getS16(), itos(), m_game_ui, Settings::set(), GameUI::showStatusText(), and sky.
Referenced by processKeyInput().
|
protected |
References EventManager::EventManager(), GameClientData::address, createItemDefManager(), createNodeDefManager(), createServer(), createShaderSource(), createTextureSource(), eventmgr, initSound(), itemdef_manager, m_item_visuals_manager, N_, nodedef_manager, quicktune, shader_src, showOverlayMessage(), and texture_src.
Referenced by startup().
|
protected |
References TouchControls::TouchControls(), ChatBackend::applySettings(), chat_backend, ChatBackend::clearRecentChat(), device, g_menumgr, g_touchcontrols, gui_chat_console, guienv, GameUI::init(), m_game_ui, shouldShowTouchControls(), and texture_src.
Referenced by createClient().
|
protected |
References createOpenALSoundManager(), eventmgr, g_sound_manager_singleton, infostream, nodedef_manager, SoundMaker::registerReceiver(), sound_manager, and soundmaker.
Referenced by init().
|
inlineprotected |
References input, and InputHandler::isKeyDown().
Referenced by getTogglableKeyState(), handlePointingAtNode(), handlePointingAtObject(), nodePlacement(), processKeyInput(), processPlayerInteraction(), and updatePlayerControl().
|
private |
References camera, CAMERA_MODE_FIRST, g_touchcontrols, Camera::getCameraMode(), and TouchControls::isShootlineAvailable().
Referenced by drawScene(), and processPlayerInteraction().
|
private |
References BS, ContentFeatures::buildable_to, CPT2_4DIR, CPT2_COLOR, CPT2_COLORED_4DIR, CPT2_COLORED_FACEDIR, CPT2_COLORED_WALLMOUNTED, CPT2_FACEDIR, CPT2_WALLMOUNTED, ContentFeatures::drawtype, errorstream, facedir_dirs, floatToInt(), g_settings, NodeDefManager::get(), Settings::getBool(), LocalPlayer::getCollisionbox(), MapNode::getFaceDir(), NodeDefManager::getId(), Map::getNode(), MapNode::getParam2(), LocalPlayer::getStandingNodePos(), SimpleMetadata::getString(), MapNode::getWallMountedDir(), ContentFeatures::groups, input, INTERACT_PLACE, isKeyDown(), InputHandler::isRandom(), m_game_formspec, SoundMaker::m_player_rightpunch_sound, ItemStack::metadata, MYMAX, mystoi(), ItemDefinition::name, NDT_SIGNLIKE, NDT_TORCHLIKE, ItemDefinition::node_placement_prediction, nodedef_manager, ContentFeatures::param_type_2, ItemDefinition::place_param2, ContentFeatures::rightclickable, MapNode::setParam2(), GameFormSpec::showNodeFormspec(), KeyType::SNEAK, ItemDefinition::sound_place, ItemDefinition::sound_place_failed, soundmaker, verbosestream, ContentFeatures::walkable, and ItemDefinition::wallmounted_rotate_vertical.
Referenced by handlePointingAtNode().
|
protected |
References gui_chat_console, porting::hasPhysicalKeyboardAndroid(), and porting::showTextInputDialog().
Referenced by processKeyInput().
|
private |
References paused_animated_nodes, pauseNodeAnimation(), and smgr.
Referenced by updatePauseState().
|
protected |
References CLIENTEVENT_MAX, clientEventHandler, FATAL_ERROR_IF, and ClientEventHandler::handler.
Referenced by run().
|
protected |
References g_touchcontrols, TouchControls::getHotbarSelection(), Player::getMaxHotbarItemcount(), InputHandler::getMouseWheel(), Player::getWieldIndex(), KeyType::HOTBAR_NEXT, KeyType::HOTBAR_PREV, input, m_enable_hotbar_mouse_wheel, m_invert_hotbar_mouse_wheel, MYMIN, KeyType::SLOT_1, and wasKeyDown().
Referenced by processUserInput().
|
protected |
References KeyType::AUTOFORWARD, KeyType::BACKWARD, camera, KeyType::CAMERA_MODE, 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(), KeyType::JUMP, GameRunData::jump_timer_up, m_game_formspec, m_game_ui, KeyType::MINIMAP, KeyType::MUTE, myround(), QuicktuneShortcutter::next(), KeyType::NOCLIP, openConsole(), 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(), GameFormSpec::showPauseMenu(), GameFormSpec::showPlayerInventory(), GameUI::showStatusText(), GameUI::showTranslatedStatusText(), 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(), Camera::toggleCameraMode(), GameUI::toggleChat(), toggleCinematic(), toggleDebug(), toggleFast(), toggleFog(), toggleFreeMove(), toggleFreeMoveAlt(), toggleFullViewRange(), GameUI::toggleHud(), toggleMinimap(), toggleNoClip(), togglePitchMove(), GameUI::toggleProfiler(), toggleUpdateCamera(), updateCameraMode(), utf8_to_wide(), wasKeyDown(), wasKeyPressed(), and KeyType::ZOOM.
Referenced by processUserInput().
|
protected |
References SoundSpec::SoundSpec(), TouchControls::applyContextControls(), BS, GameRunData::btn_down_for_dig, camera, CAMERA_MODE_ANY, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT, CameraMode_END, InputHandler::clearWasKeyPressed(), InputHandler::clearWasKeyReleased(), Player::control, KeyType::DIG, PlayerControl::dig, GameRunData::dig_instantly, GameRunData::dig_time, GameRunData::digging, GameRunData::digging_blocked, PointedThing::dump(), g_settings, g_touchcontrols, Settings::getBool(), Camera::getCameraMode(), ItemStack::getDefinition(), Camera::getDirection(), Camera::getHeadPosition(), TouchInteraction::getMode(), Camera::getOffset(), Camera::getPosition(), LocalPlayer::getPosition(), TouchControls::getShootline(), getToolRange(), Player::getWieldedItem(), handlePointingAtNode(), handlePointingAtNothing(), handlePointingAtObject(), hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, infostream, input, INTERACT_STOP_DIGGING, INTERACT_USE, intToFloat(), isKeyDown(), isTouchShootlineUsed(), itemdef_manager, ItemDefinition::liquids_pointable, GameUI::m_flags, m_game_ui, SoundMaker::m_player_leftpunch_sound, SoundMaker::m_player_leftpunch_sound2, PointedThing::node_undersurface, GameRunData::nodig_delay_timer, KeyType::PLACE, PlayerControl::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().
|
protected |
References IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), shader_src, and texture_src.
Referenced by run().
|
protected |
References TouchControls::TouchControls(), InputHandler::clear(), device, g_touchcontrols, gui_chat_console, guienv, TouchControls::hide(), infostream, input, GameRunData::jump_timer_down, GameRunData::jump_timer_up, m_cache_doubletap_jump, m_game_focused, m_game_formspec, GameRunData::new_playeritem, processItemSelection(), processKeyInput(), InputHandler::releaseAllKeys(), runData, shouldShowTouchControls(), TouchControls::show(), InputHandler::step(), TouchControls::step(), and texture_src.
Referenced by run().
|
protected |
References g_settings, Settings::get(), Settings::getBool(), Settings::getFloat(), LL_MAX, LL_NONE, m_cache_cam_smoothing, m_cache_doubletap_jump, m_cache_enable_fog, m_cache_enable_free_move, m_cache_enable_noclip, m_cache_mouse_sensitivity, m_cache_toggle_aux1_key, m_cache_toggle_sneak_key, m_chat_log_buf, 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, rangelim(), CaptureLogOutput::setLogLevel(), Logger::stringToLevel(), and warningstream.
Referenced by Game().
|
private |
References PausedNode::Track::fps, PausedNode::Track::id, and paused_animated_nodes.
Referenced by updatePauseState().
| void Game::run | ( | ) |
References FrameMarker::FrameMarker(), RenderingEngine::autosaveScreensizeAndCo(), CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, checkConnection(), GameUI::clearInfoText(), client_display_info, damp(), device, dynamic_info_send_timer, g_fontengine, g_gamecallback, g_profiler, g_settings, Settings::getBool(), Settings::getU16(), Profiler::graphPop(), GameFormSpec::handleCallbacks(), FontEngine::handleReload(), kill, FpsControl::limit(), m_cache_cam_smoothing, m_does_lost_focus_pause_game, GameUI::m_flags, m_game_formspec, m_game_ui, m_is_paused, m_rendering_engine, m_touch_simulate_aux1, processClientEvents(), processPlayerInteraction(), processQueues(), processUserInput(), FpsControl::reset(), RenderingEngine::run(), porting::setPlayingNowNotification(), GameFormSpec::showPauseMenu(), MainGameCallback::shutdown_requested, step(), updateCamera(), updateCameraDirection(), updateCameraOffset(), updateDebugState(), updateFrame(), updateInteractTimers(), updatePauseState(), updatePlayerControl(), updateProfilerGraphs(), updateProfilers(), updateSound(), updateStats(), and ZoneScoped.
Referenced by the_game().
|
staticprotected |
|
protected |
References device, g_settings, Settings::get(), RenderingEngine::getLastPointerType(), is_yes(), and Touch.
Referenced by initGui(), and processUserInput().
|
protected |
References RenderingEngine::draw_load_screen(), guienv, m_rendering_engine, texture_src, and wstrgettext().
Referenced by connectToServer(), createClient(), createServer(), init(), and shutdown().
| void Game::shutdown | ( | ) |
References ChatBackend::addMessage(), chat_backend, GameUI::clearText(), clouds, MainMenuManager::deleteFront(), device, g_menumgr, g_touchcontrols, gui_chat_console, TouchControls::hide(), m_game_formspec, m_game_ui, m_rendering_engine, m_shutdown_progress, MainMenuManager::menuCount(), N_, IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), FpsControl::reset(), GameFormSpec::reset(), RenderingEngine::run(), runInThread(), shader_src, showOverlayMessage(), sky, sleep_ms, sound_manager, soundmaker, and texture_src.
Referenced by the_game().
| bool Game::startup | ( | volatile std::sig_atomic_t * | kill, |
| InputHandler * | input, | ||
| RenderingEngine * | rendering_engine, | ||
| GameStartData & | game_params, | ||
| GameErrorData & | errordata, | ||
| ChatBackend * | chat_backend ) |
References chat_backend, Translations::clear(), createClient(), Game::Flags::debug_state, device, driver, errordata, g_client_translations, g_settings, RenderingEngine::get_raw_device(), RenderingEngine::get_scene_manager(), Settings::getBool(), hud, init(), GameFormSpec::init(), GameUI::initFlags(), RenderingEngine::initialize(), input, GameClientData::isSinglePlayer(), kill, m_first_loop_after_window_activation, m_flags, GameUI::m_flags, m_game_formspec, m_game_ui, m_rendering_engine, InputHandler::reloadKeybindings(), runData, simple_singleplayer_mode, smgr, and GameRunData::time_from_last_punch.
Referenced by the_game().
|
inlineprotected |
References device, g_settings, Settings::getFloat(), m_is_paused, simple_singleplayer_mode, and ZoneScoped.
Referenced by connectToServer(), getServerContent(), and run().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().
Referenced by processKeyInput().
|
protected |
References Hud::BLOCK_BOUNDS_CURRENT, Hud::BLOCK_BOUNDS_NEAR, Hud::BLOCK_BOUNDS_OFF, hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_game_ui, GameUI::showTranslatedStatusText(), and Hud::toggleBlockBounds().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().
Referenced by processKeyInput().
|
protected |
References Game::Flags::debug_state, draw_control, driver, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_flags, GameUI::m_flags, m_game_ui, MapDrawControl::show_wireframe, GameUI::showTranslatedStatusText(), and smgr.
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, m_touch_simulate_aux1, Settings::set(), and GameUI::showTranslatedStatusText().
Referenced by processKeyInput().
|
protected |
References g_settings, Settings::getBool(), m_game_ui, Settings::setBool(), GameUI::showTranslatedStatusText(), and sky.
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().
Referenced by processKeyInput(), and 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().
|
protected |
References draw_control, m_game_ui, MapDrawControl::range_all, GameUI::showTranslatedStatusText(), and sky.
Referenced by processKeyInput().
|
protected |
References g_settings, Settings::getBool(), Minimap::getModeDef(), Minimap::getModeIndex(), Hud::hasElementOfType(), hud, HUD_ELEM_MINIMAP, HUD_FLAG_MINIMAP_RADAR_VISIBLE, MinimapModeDef::label, GameUI::m_flags, m_game_ui, mapper, MINIMAP_TYPE_RADAR, Minimap::nextMode(), GameUI::showStatusText(), GameUI::showTranslatedStatusText(), Minimap::toggleMinimapShape(), MinimapModeDef::type, and utf8_to_wide().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, Settings::set(), and GameUI::showTranslatedStatusText().
Referenced by processKeyInput().
|
protected |
References Game::Flags::disable_camera_update, m_flags, m_game_ui, and GameUI::showTranslatedStatusText().
Referenced by processKeyInput().
|
protected |
References camera, Game::Flags::disable_camera_update, ToolCapabilities::full_punch_interval, Camera::getDirection(), Camera::getFovMax(), ClientEnvironment::getLocalPlayer(), Camera::getOffset(), Camera::getPosition(), ItemStack::getToolCapabilities(), Player::getWieldedItem(), itemdef_manager, LocalPlayer::light_color, m_flags, runData, Camera::step(), GameRunData::time_from_last_punch, and Camera::update().
Referenced by run().
|
protected |
References device, driver, g_touchcontrols, InputHandler::getMouseMovement(), input, InputHandler::isRandom(), m_first_loop_after_window_activation, InputHandler::setMousePos(), and updateCameraOrientation().
Referenced by run().
|
protected |
References Player::allowed_camera_mode, camera, CAMERA_MODE_ANY, CAMERA_MODE_FIRST, Camera::getCameraMode(), LocalPlayer::getCAO(), Camera::setCameraMode(), GenericCAO::setChildrenVisible(), and GenericCAO::updateMeshCulling().
Referenced by handleClientEvent_UpdateCamera(), and processKeyInput().
|
protected |
References camera, clouds, Game::Flags::disable_camera_update, RenderingEngine::get_shadow_renderer(), ClientEnvironment::getClientMap(), Camera::getDirection(), Camera::getFovMax(), ClientEnvironment::getLocalPlayer(), Camera::getOffset(), Camera::getPosition(), LocalPlayer::light_color, m_camera_offset_changed, m_flags, ClientMap::updateCamera(), ClientEnvironment::updateCameraOffset(), and Camera::updateOffset().
Referenced by run().
|
protected |
References camera, CAMERA_MODE_THIRD_FRONT, CameraOrientation::camera_pitch, KeyType::CAMERA_PITCH_DOWN, KeyType::CAMERA_PITCH_UP, CameraOrientation::camera_yaw, KeyType::CAMERA_YAW_LEFT, KeyType::CAMERA_YAW_RIGHT, driver, g_touchcontrols, InputHandler::getAxisValue(), Camera::getCameraMode(), InputHandler::getMouseMovement(), TouchControls::getPitchChange(), getSensitivityScaleFactor(), TouchControls::getYawChange(), input, InputHandler::isKeyDown(), m_cache_mouse_sensitivity, m_invert_mouse, rangelim(), and InputHandler::setMousePos().
Referenced by updateCameraDirection().
|
private |
References ChatBackend::addMessage(), ChatBackend::addUnparsedMessage(), chat_backend, ChatBackend::getRecentBuffer(), ChatBackend::getRecentChat(), LL_ERROR, LL_INFO, LL_TRACE, LL_VERBOSE, LL_WARNING, m_chat_log_buf, m_game_ui, GameUI::setChatText(), ChatBackend::step(), CaptureLogOutput::take(), GameUI::updateChatSize(), and utf8_to_wide().
Referenced by updateFrame().
|
protected |
References BS, camera, clouds, GameRunData::fog_range, Camera::getCameraNode(), Camera::getOffset(), runData, and sky.
Referenced by updateFrame().
|
protected |
References MapDrawControl::allow_noclip, Game::Flags::disable_camera_update, Hud::disableBlockBounds(), GameFormSpec::disableDebugView(), draw_control, hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_cache_enable_noclip, m_flags, GameUI::m_flags, m_game_formspec, m_game_ui, MapDrawControl::show_wireframe, and smgr.
Referenced by run().
|
protected |
References MapDrawControl::allow_noclip, Profiler::avg(), BS, camera, GameRunData::damage_flash, device, draw_control, drawScene(), floatToInt(), GameRunData::fog_range, FOG_RANGE_ALL, g_profiler, RenderingEngine::get_shadow_renderer(), Camera::getCameraMode(), Camera::getDirection(), LocalPlayer::getPitch(), LocalPlayer::getPosition(), Player::getWieldedItem(), Player::getWieldIndex(), LocalPlayer::getYaw(), gui_chat_console, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, m_cache_enable_free_move, m_camera_offset_changed, GameUI::m_flags, m_game_formspec, m_game_ui, m_is_paused, mapper, MYMIN, GameRunData::new_playeritem, GameRunData::pointed_old, MapDrawControl::range_all, runData, Minimap::setAngle(), Minimap::setPos(), sky, TimeTaker::stop(), GameRunData::time_of_day_smooth, GameRunData::touch_blocks_timer, GameFormSpec::update(), GameUI::update(), GameRunData::update_draw_list_last_cam_dir, GameRunData::update_draw_list_timer, updateChat(), updateClouds(), updateShadows(), MapDrawControl::wanted_range, Camera::wield(), and ZoneScoped.
Referenced by run().
|
inlineprotected |
References GameRunData::nodig_delay_timer, GameRunData::object_hit_delay_timer, runData, and GameRunData::time_from_last_punch.
Referenced by run().
|
protected |
References g_menumgr, m_is_paused, ISoundManager::pauseAll(), pauseAnimation(), MainMenuManager::pausesGame(), ISoundManager::resumeAll(), resumeAnimation(), simple_singleplayer_mode, and sound_manager.
Referenced by run().
|
protected |
References KeyType::AUX1, PlayerControl::aux1, KeyType::BACKWARD, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, PlayerSettings::continuous_forward, Player::control, KeyType::DIG, KeyType::FORWARD, g_touchcontrols, LocalPlayer::getAutojump(), getAxisValue(), LocalPlayer::getPlayerSettings(), getTogglableKeyState(), LocalPlayer::isDead(), isKeyDown(), KeyType::JUMP, KeyType::LEFT, m_cache_toggle_aux1_key, m_cache_toggle_sneak_key, m_touch_simulate_aux1, KeyType::PLACE, KeyType::RIGHT, PlayerControl::setMovementFromKeys(), KeyType::SNEAK, PlayerControl::sneak, and KeyType::ZOOM.
Referenced by run().
|
protected |
Returns the object or node the player is pointing at. Also updates the selected thing in the Hud.
| [in] | shootline | the shootline, starting from the camera position. This also gives the maximal distance of the search. |
| [in] | liquids_pointable | if false, liquids are ignored |
| [in] | pointabilities | item specific pointable overriding |
| [in] | look_for_object | if false, objects are ignored |
| [in] | camera_offset | offset of the camera |
| [out] | selected_object | the selected object or NULL if not found |
References BS, Environment::continueRaycast(), 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, 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::setSelectionRotationRadians(), and PointedThing::type.
Referenced by processPlayerInteraction().
|
inlineprotected |
References g_profiler, Profiler::graphPop(), and ProfilerGraph::put().
Referenced by run().
|
protected |
References Profiler::avg(), FpsControl::busy_time, Profiler::clear(), RunStats::drawtime, driver, g_profiler, g_settings, Settings::getFloat(), Profiler::graphAdd(), Profiler::graphSet(), infostream, m_game_ui, Profiler::print(), profiler_interval, FpsControl::sleep_time, IntervalLimiter::step(), and GameUI::updateProfiler().
Referenced by run().
|
protected |
References camera, RenderingEngine::get_shadow_renderer(), ShadowRenderer::getDirectionalLight(), getWickedTimeOfDay(), runData, DirectionalLight::setDirection(), ShadowRenderer::setShadowIntensity(), ShadowRenderer::setShadowTint(), ShadowRenderer::setTimeOfDay(), sky, GameRunData::time_of_day_smooth, and DirectionalLight::updateFrustum().
Referenced by updateFrame().
|
protected |
References BS, camera, device, NodeDefManager::get(), Camera::getCameraNode(), Camera::getDirection(), LocalPlayer::getFootstepNodePos(), Map::getNode(), Camera::getOffset(), LocalPlayer::getParent(), Player::getSpeed(), ClientActiveObject::getVelocity(), intToFloat(), LocalPlayer::makes_footstep_sound, nodedef_manager, ContentFeatures::sound_footstep, sound_manager, sound_volume_control(), soundmaker, SoundMaker::update(), and ISoundManager::updateListener().
Referenced by run().
|
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().
|
inlineprotected |
References input, and InputHandler::wasKeyDown().
Referenced by handlePointingAtObject(), processItemSelection(), processKeyInput(), and processPlayerInteraction().
|
inlineprotected |
References input, and InputHandler::wasKeyPressed().
Referenced by getTogglableKeyState(), handlePointingAtNode(), handlePointingAtObject(), processKeyInput(), and processPlayerInteraction().
|
inlineprotected |
References input, and InputHandler::wasKeyReleased().
Referenced by processPlayerInteraction().
|
private |
Referenced by ~Game(), createClient(), drawScene(), handleDigging(), handlePointingAtNode(), isTouchShootlineUsed(), processKeyInput(), processPlayerInteraction(), updateCamera(), updateCameraMode(), updateCameraOffset(), updateCameraOrientation(), updateClouds(), updateFrame(), updateShadows(), and updateSound().
|
private |
Referenced by initGui(), shutdown(), startup(), and updateChat().
|
private |
|
private |
Referenced by run().
|
staticprivate |
Referenced by processClientEvents().
|
private |
Referenced by createClient(), handleClientEvent_CloudParams(), shutdown(), updateCameraOffset(), and updateClouds().
| int Game::crack_animation_length |
Referenced by GameGlobalShaderUniformSetter::GameGlobalShaderUniformSetter(), createClient(), and handleDigging().
|
private |
|
private |
Referenced by ~Game(), connectToServer(), createClient(), handleClientEvent_SetSky(), toggleDebug(), toggleFullViewRange(), updateDebugState(), and updateFrame().
|
private |
Referenced by createClient(), drawScene(), startup(), toggleDebug(), updateCameraDirection(), updateCameraOrientation(), and updateProfilers().
|
private |
Referenced by run().
|
private |
Referenced by checkConnection(), connectToServer(), createClient(), createServer(), getServerContent(), and startup().
|
private |
Referenced by ~Game(), connectToServer(), init(), and initSound().
|
private |
Referenced by initGui(), openConsole(), processKeyInput(), processUserInput(), shutdown(), and updateFrame().
|
private |
Referenced by ~Game(), createClient(), processPlayerInteraction(), startup(), toggleBlockBounds(), toggleMinimap(), updateDebugState(), and updatePointedThing().
|
private |
Referenced by connectToServer(), createServer(), getAxisValue(), getServerContent(), isKeyDown(), nodePlacement(), processItemSelection(), processKeyInput(), processPlayerInteraction(), processUserInput(), startup(), updateCameraDirection(), updateCameraOrientation(), wasKeyDown(), wasKeyPressed(), and wasKeyReleased().
|
private |
Referenced by ~Game(), connectToServer(), handleDigging(), handlePointingAtNode(), init(), processPlayerInteraction(), and updateCamera().
|
private |
Referenced by readSettings(), and run().
|
private |
Referenced by processUserInput(), readSettings(), and toggleFreeMoveAlt().
|
private |
Referenced by fogEnabled(), and readSettings().
|
private |
Referenced by readSettings(), and updateFrame().
|
private |
Referenced by readSettings(), and updateDebugState().
|
private |
Referenced by readSettings(), and updateCameraOrientation().
|
private |
Referenced by readSettings(), and updatePlayerControl().
|
private |
Referenced by readSettings(), and updatePlayerControl().
|
private |
Referenced by updateCameraOffset(), and updateFrame().
|
private |
Referenced by Game(), readSettings(), and updateChat().
|
private |
Referenced by readSettings(), and run().
|
private |
Referenced by processItemSelection(), and readSettings().
|
private |
Referenced by startup(), and updateCameraDirection().
|
private |
Referenced by startup(), toggleDebug(), toggleUpdateCamera(), updateCamera(), updateCameraOffset(), and updateDebugState().
|
private |
Referenced by processUserInput().
|
private |
|
private |
Referenced by Game(), checkZoomEnabled(), decreaseViewRange(), drawScene(), handlePointingAtNode(), handlePointingAtObject(), increaseViewRange(), initGui(), processKeyInput(), processPlayerInteraction(), run(), shutdown(), startup(), toggleAutoforward(), toggleBlockBounds(), toggleCinematic(), toggleDebug(), toggleFast(), toggleFog(), toggleFreeMove(), toggleFullViewRange(), toggleMinimap(), toggleNoClip(), togglePitchMove(), toggleUpdateCamera(), updateChat(), updateDebugState(), updateFrame(), and updateProfilers().
|
private |
Referenced by handleClientEvent_HudAdd(), handleClientEvent_HudChange(), and handleClientEvent_HudRemove().
|
private |
Referenced by processItemSelection(), and readSettings().
|
private |
Referenced by readSettings(), and updateCameraOrientation().
|
private |
Referenced by run(), step(), updateFrame(), and updatePauseState().
|
private |
Referenced by connectToServer(), and init().
|
private |
Referenced by ~Game(), connectToServer(), createClient(), createServer(), drawScene(), getServerContent(), run(), showOverlayMessage(), shutdown(), and startup().
|
private |
Referenced by handleDigging(), handlePointingAtObject(), and readSettings().
|
private |
Referenced by handlePointingAtNode(), and readSettings().
|
private |
Referenced by createServer(), and shutdown().
|
private |
Referenced by run(), toggleFast(), and updatePlayerControl().
|
private |
Referenced by createClient(), toggleMinimap(), and updateFrame().
|
private |
Referenced by ~Game(), connectToServer(), handleDigging(), handlePointingAtNode(), init(), initSound(), nodePlacement(), and updateSound().
|
private |
Referenced by pauseAnimation(), and resumeAnimation().
|
private |
Referenced by updateProfilers().
|
private |
Referenced by ~Game(), init(), and processKeyInput().
|
private |
Referenced by drawScene(), handleClientEvent_PlayerDamage(), handleDigging(), handlePointingAtNode(), handlePointingAtObject(), processKeyInput(), processPlayerInteraction(), processUserInput(), startup(), toggleFreeMoveAlt(), updateCamera(), updateClouds(), updateFrame(), updateInteractTimers(), updatePointedThing(), and updateShadows().
|
private |
|
private |
Referenced by ~Game(), connectToServer(), createClient(), init(), processQueues(), and shutdown().
|
private |
Referenced by connectToServer(), createClient(), createServer(), startup(), step(), and updatePauseState().
|
private |
Referenced by createClient(), decreaseViewRange(), drawScene(), fogEnabled(), handleClientEvent_SetMoon(), handleClientEvent_SetSky(), handleClientEvent_SetStars(), handleClientEvent_SetSun(), increaseViewRange(), shutdown(), toggleFog(), toggleFullViewRange(), updateClouds(), updateFrame(), and updateShadows().
|
private |
Referenced by createClient(), pauseAnimation(), startup(), toggleDebug(), and updateDebugState().
|
private |
Referenced by ~Game(), connectToServer(), initSound(), shutdown(), updatePauseState(), and updateSound().
|
private |
Referenced by ~Game(), handleDigging(), handlePointingAtNode(), initSound(), nodePlacement(), processPlayerInteraction(), shutdown(), and updateSound().
|
private |