#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, const GameStartData &game_params, std::string &error_message, bool *reconnect, ChatBackend *chat_backend) |
| void | run () |
| void | shutdown () |
| Client * | getClient () |
Public Attributes | |
| int | crack_animation_length |
Protected Member Functions | |
| bool | init (const std::string &map_dir, const std::string &address, u16 port, const SubgameSpec &gamespec) |
| bool | initSound () |
| bool | createServer (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 () |
| 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 () |
| 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(), settingChangedCallback(), and settings.
Referenced by settingChangedCallback().
| Game::~Game | ( | ) |
References camera, clearTextureNameCache(), draw_control, eventmgr, g_settings, hud, itemdef_manager, m_rendering_engine, nodedef_manager, quicktune, shader_src, sound_manager, soundmaker, and texture_src.
|
inlineprotected |
References error_message, errorstream, fmtgettext(), and reconnect_requested.
Referenced by getServerContent(), and run().
|
protected |
References PlayerFovSpec::fov, Player::getFov(), LocalPlayer::getZoomFOV(), and m_game_ui.
Referenced by processKeyInput().
|
protected |
References GameStartData::address, GameStartData::allow_login_or_register, IPv6AddressBytes::bytes, Client, device, draw_control, FrameMarker::end(), error_message, errorstream, eventmgr, fmtgettext(), g_settings, GAME_CONNECTION_TIMEOUT, GAME_FALLBACK_TIMEOUT, Address::getPort(), infostream, input, Address::isAny(), Address::isIPv6(), Address::isValid(), itemdef_manager, LC_Init, FpsControl::limit(), m_item_visuals_manager, m_rendering_engine, N_, GameStartData::name, nodedef_manager, GameStartData::password, reconnect_requested, FpsControl::reset(), Address::Resolve(), Address::serializeString(), Address::setAddress(), Address::setPort(), shader_src, showOverlayMessage(), simple_singleplayer_mode, GameParams::socket_port, sound_manager, FrameMarker::started(), step(), texture_src, warningstream, and BaseException::what().
Referenced by createClient().
|
protected |
References clientMediaUpdateCacheCopy(), and infostream.
Referenced by createServer().
|
protected |
References camera, clouds, connectToServer(), crack_animation_length, device, draw_control, driver, error_message, errorstream, g_version_hash, getServerContent(), hud, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, initGui(), Player::inventory, m_rendering_engine, mapper, myrand(), N_, ShadowRenderer::preInit(), shader_src, showOverlayMessage(), simple_singleplayer_mode, sky, smgr, texture_src, and utf8_to_wide().
Referenced by startup().
|
protected |
References copyServerClientCache(), device, error_message, errorstream, fmtgettext(), g_settings, input, Address::isIPv6(), FpsControl::limit(), m_rendering_engine, m_shutdown_progress, N_, FpsControl::reset(), Address::Resolve(), runInThread(), Address::serializeString(), Server, Address::setAddress(), showOverlayMessage(), simple_singleplayer_mode, warningstream, and BaseException::what().
Referenced by init().
|
protected |
References fwgettext(), g_settings, itos(), m_game_ui, and sky.
Referenced by processKeyInput().
|
protected |
References BS, camera, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD_FRONT, ProfilerGraph::draw(), RunStats::drawtime, driver, FM_Mono, FOG_RANGE_ALL, fogEnabled(), g_fontengine, g_profiler, HUD_FLAG_CROSSHAIR_VISIBLE, HUD_FLAG_WIELDITEM_VISIBLE, Player::hud_flags, isTouchShootlineUsed(), m_game_ui, m_rendering_engine, PRECISION_MICRO, runData, sky, TimeTaker::stop(), and ZoneScoped.
Referenced by updateFrame().
|
protected |
References 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().
|
inline |
|
private |
|
protected |
References checkConnection(), device, FrameMarker::end(), error_message, errorstream, g_settings, guienv, infostream, input, LC_Init, FpsControl::limit(), m_rendering_engine, FpsControl::reset(), FrameMarker::started(), step(), texture_src, utf8_to_wide(), and wstrgettext().
Referenced by createClient().
|
protected |
References isKeyDown(), and wasKeyPressed().
Referenced by updatePlayerControl().
|
private |
|
private |
References m_game_formspec.
|
private |
|
private |
References Player::addHud(), HudElement::align, HudElement::dir, HudElement::item, m_hud_server_to_client, HudElement::name, HudElement::number, HudElement::offset, HudElement::pos, HudElement::scale, HudElement::size, HudElement::style, HudElement::text, HudElement::text2, HudElement::type, HudElement::world_pos, and HudElement::z_index.
|
private |
References CASE_SET, dir(), Player::getHud(), HUD_STAT_ALIGN, HUD_STAT_DIR, 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, ClientEvent::hudchange, HudElementStat_END, ClientEventHudChange::id, m_hud_server_to_client, and ClientEventHudChange::stat.
|
private |
References ClientEvent::hudrm, ClientEvent::id, m_hud_server_to_client, and Player::removeHud().
|
private |
References FATAL_ERROR.
|
private |
|
private |
References ClientEvent::amount, ClientEvent::effect, g_settings, LocalPlayer::getCAO(), GenericCAO::getProperties(), ObjectProperties::hp_max, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, MYMIN, MtEvent::PLAYER_DAMAGE, ClientEvent::player_damage, PLAYER_MAX_HP_DEFAULT, rangelim(), and runData.
|
private |
References CameraOrientation::camera_pitch, and CameraOrientation::camera_yaw.
|
private |
References ClientEvent::moon_params, MoonParams::scale, sky, MoonParams::texture, texture_src, MoonParams::tonemap, and MoonParams::visible.
|
private |
References SkyboxParams::bgcolor, SkyboxParams::body_orbit_tilt, SkyboxParams::clouds, draw_control, SkyboxParams::fog_color, SkyboxParams::fog_distance, SkyboxParams::fog_moon_tint, SkyboxParams::fog_start, SkyboxParams::fog_sun_tint, SkyboxParams::fog_tint_type, g_settings, infostream, rangelim(), ClientEvent::set_sky, sky, SkyboxParams::sky_color, texture_src, SkyboxParams::textures, and SkyboxParams::type.
|
private |
|
private |
|
private |
References ClientEvent::formname, ClientEvent::formspec, m_game_formspec, and ClientEvent::show_formspec.
|
private |
References m_game_formspec.
|
private |
References ClientEvent::formname, ClientEvent::formspec, m_game_formspec, and ClientEvent::show_formspec.
|
private |
|
protected |
References camera, crack_animation_length, DigParams::diggable, g_settings, getDigParams(), Map::getNode(), ItemStack::getToolCapabilities(), infostream, INTERACT_DIGGING_COMPLETED, INTERACT_START_DIGGING, itemdef_manager, m_repeat_dig_time, DigParams::main_group, ItemStack::name, nodedef_manager, runData, soundmaker, DigParams::time, and ItemStack::wear.
Referenced by handlePointingAtNode().
|
protected |
References camera, KeyType::DIG, ItemStack::getDefinition(), Map::getNode(), Map::getNodeMetadata(), SimpleMetadata::getString(), handleDigging(), infostream, isKeyDown(), itemdef_manager, m_game_ui, m_repeat_place_time, PointedThing::node_abovesurface, PointedThing::node_undersurface, nodedef_manager, nodePlacement(), KeyType::PLACE, runData, 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 KeyType::DIG, dir(), infostream, INTERACT_PLACE, INTERACT_START_DIGGING, isKeyDown(), m_game_ui, m_repeat_dig_time, object_hit_delay, KeyType::PLACE, runData, unescape_translate(), utf8_to_wide(), wasKeyDown(), and wasKeyPressed().
Referenced by processPlayerInteraction().
|
protected |
References fwgettext(), g_settings, itos(), m_game_ui, and sky.
Referenced by processKeyInput().
|
protected |
References 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 chat_backend, device, g_menumgr, g_touchcontrols, gui_chat_console, guienv, m_game_ui, shouldShowTouchControls(), and texture_src.
Referenced by createClient().
|
protected |
References createOpenALSoundManager(), eventmgr, g_sound_manager_singleton, infostream, nodedef_manager, sound_manager, and soundmaker.
Referenced by init().
|
inlineprotected |
References input.
Referenced by getTogglableKeyState(), handlePointingAtNode(), handlePointingAtObject(), nodePlacement(), processKeyInput(), processPlayerInteraction(), and updatePlayerControl().
|
private |
References camera, CAMERA_MODE_FIRST, and g_touchcontrols.
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, dir(), ContentFeatures::drawtype, errorstream, facedir_dirs, floatToInt(), g_settings, NodeDefManager::get(), MapNode::getFaceDir(), NodeDefManager::getId(), Map::getNode(), MapNode::getParam2(), LocalPlayer::getStandingNodePos(), SimpleMetadata::getString(), MapNode::getWallMountedDir(), ContentFeatures::groups, input, INTERACT_PLACE, isKeyDown(), itemgroup_get(), m_game_formspec, 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, MapNode::setParam2(), 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 dir(), g_touchcontrols, Player::getMaxHotbarItemcount(), 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, KeyType::CHAT, checkZoomEnabled(), KeyType::CINEMATIC, KeyType::CMD, KeyType::CMD_LOCAL, KeyType::CONSOLE, KeyType::DEC_VOLUME, KeyType::DECREASE_VIEWING_RANGE, decreaseViewRange(), KeyType::DROP, dropSelectedItem(), KeyType::FASTMOVE, KeyType::FREEMOVE, fwgettext(), g_settings, gui_chat_console, KeyType::INC_VOLUME, KeyType::INCREASE_VIEWING_RANGE, increaseViewRange(), input, KeyType::INVENTORY, isKeyDown(), KeyType::JUMP, m_game_formspec, m_game_ui, KeyType::MINIMAP, KeyType::MUTE, myround(), KeyType::NOCLIP, openConsole(), KeyType::PITCHMOVE, quicktune, KeyType::QUICKTUNE_DEC, KeyType::QUICKTUNE_INC, KeyType::QUICKTUNE_NEXT, KeyType::QUICKTUNE_PREV, KeyType::RANGESELECT, runData, KeyType::SCREENSHOT, 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(), updateCameraMode(), utf8_to_wide(), wasKeyDown(), wasKeyPressed(), and KeyType::ZOOM.
Referenced by processUserInput().
|
protected |
References BS, camera, CAMERA_MODE_ANY, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD, CAMERA_MODE_THIRD_FRONT, Player::control, KeyType::DIG, PlayerControl::dig, PointedThing::dump(), g_settings, g_touchcontrols, ItemStack::getDefinition(), TouchInteraction::getMode(), LocalPlayer::getPosition(), 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, m_game_ui, PointedThing::node_undersurface, KeyType::PLACE, PlayerControl::place, ItemDefinition::pointabilities, POINTEDTHING_NODE, POINTEDTHING_NOTHING, POINTEDTHING_OBJECT, runData, ItemDefinition::sound_use, ItemDefinition::sound_use_air, soundmaker, ItemDefinition::touch_interaction, PointedThing::type, updatePointedThing(), ItemDefinition::usable, wasKeyDown(), wasKeyPressed(), and wasKeyReleased().
Referenced by run().
|
protected |
References shader_src, and texture_src.
Referenced by run().
|
protected |
References device, g_touchcontrols, gui_chat_console, guienv, infostream, input, isMenuActive(), m_cache_doubletap_jump, m_game_focused, m_game_formspec, processItemSelection(), processKeyInput(), runData, shouldShowTouchControls(), and texture_src.
Referenced by run().
|
protected |
References g_settings, LL_MAX, LL_NONE, m_cache_cam_smoothing, m_cache_doubletap_jump, m_cache_enable_fog, m_cache_enable_free_move, m_cache_enable_joysticks, m_cache_enable_noclip, m_cache_joystick_frustum_sensitivity, 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(), Logger::stringToLevel(), and warningstream.
Referenced by Game().
|
private |
References paused_animated_nodes.
Referenced by updatePauseState().
| void Game::run | ( | ) |
References RenderingEngine::autosaveScreensizeAndCo(), CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, checkConnection(), client_display_info, damp(), device, dynamic_info_send_timer, FrameMarker::end(), g_fontengine, g_gamecallback, g_profiler, g_settings, isMenuActive(), kill, FpsControl::limit(), m_cache_cam_smoothing, m_does_lost_focus_pause_game, m_game_formspec, m_game_ui, m_is_paused, m_rendering_engine, m_touch_simulate_aux1, processClientEvents(), processPlayerInteraction(), processQueues(), processUserInput(), FpsControl::reset(), porting::setPlayingNowNotification(), FrameMarker::started(), 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, RenderingEngine::getLastPointerType(), is_yes(), and Touch.
Referenced by initGui(), and processUserInput().
|
protected |
References guienv, m_rendering_engine, texture_src, and wstrgettext().
Referenced by connectToServer(), createClient(), createServer(), init(), and shutdown().
| void Game::shutdown | ( | ) |
References chat_backend, clouds, device, g_menumgr, g_touchcontrols, gui_chat_console, m_game_formspec, m_game_ui, m_rendering_engine, m_shutdown_progress, N_, FpsControl::reset(), 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, | ||
| const GameStartData & | game_params, | ||
| std::string & | error_message, | ||
| bool * | reconnect, | ||
| ChatBackend * | chat_backend ) |
References GameStartData::address, chat_backend, createClient(), device, driver, error_message, g_client_translations, g_settings, GameParams::game_spec, hud, init(), input, GameStartData::isSinglePlayer(), kill, m_first_loop_after_window_activation, m_flags, m_game_formspec, m_game_ui, m_rendering_engine, WorldSpec::path, reconnect_requested, runData, simple_singleplayer_mode, smgr, GameParams::socket_port, and GameStartData::world_spec.
Referenced by the_game().
|
inlineprotected |
References device, g_settings, m_is_paused, simple_singleplayer_mode, and ZoneScoped.
Referenced by connectToServer(), getServerContent(), and run().
|
protected |
References bool_to_cstr(), g_settings, and m_game_ui.
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, and m_game_ui.
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, and m_game_ui.
Referenced by processKeyInput().
|
protected |
References bbox_debug_flag, draw_control, driver, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_flags, m_game_ui, and smgr.
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, m_game_ui, and m_touch_simulate_aux1.
Referenced by processKeyInput().
|
protected |
References g_settings, m_game_ui, and sky.
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, and m_game_ui.
Referenced by processKeyInput(), and toggleFreeMoveAlt().
|
protected |
References m_cache_doubletap_jump, runData, and toggleFreeMove().
Referenced by processKeyInput().
|
protected |
References draw_control, m_game_ui, and sky.
Referenced by processKeyInput().
|
protected |
References g_settings, hud, HUD_ELEM_MINIMAP, HUD_FLAG_MINIMAP_RADAR_VISIBLE, m_game_ui, mapper, MINIMAP_TYPE_RADAR, and utf8_to_wide().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, and m_game_ui.
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, and m_game_ui.
Referenced by processKeyInput().
|
protected |
References m_flags, and m_game_ui.
Referenced by processKeyInput().
|
protected |
References camera, ToolCapabilities::full_punch_interval, ClientEnvironment::getLocalPlayer(), ItemStack::getToolCapabilities(), Player::getWieldedItem(), itemdef_manager, LocalPlayer::light_color, m_flags, and runData.
Referenced by run().
|
protected |
References device, driver, g_touchcontrols, input, isMenuActive(), m_first_loop_after_window_activation, and updateCameraOrientation().
Referenced by run().
|
protected |
References Player::allowed_camera_mode, camera, CAMERA_MODE_ANY, CAMERA_MODE_FIRST, LocalPlayer::getCAO(), GenericCAO::setChildrenVisible(), and GenericCAO::updateMeshCulling().
Referenced by handleClientEvent_UpdateCamera(), and processKeyInput().
|
protected |
References camera, clouds, g_settings, RenderingEngine::get_shadow_renderer(), ClientEnvironment::getClientMap(), ClientEnvironment::getLocalPlayer(), LocalPlayer::light_color, m_camera_offset_changed, m_flags, ClientMap::updateCamera(), and ClientEnvironment::updateCameraOffset().
Referenced by run().
|
protected |
References camera, CAMERA_MODE_THIRD_FRONT, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, driver, g_touchcontrols, getSensitivityScaleFactor(), input, JA_FRUSTUM_HORIZONTAL, JA_FRUSTUM_VERTICAL, m_cache_enable_joysticks, m_cache_joystick_frustum_sensitivity, m_cache_mouse_sensitivity, m_invert_mouse, and rangelim().
Referenced by updateCameraDirection().
|
private |
References chat_backend, LL_ERROR, LL_INFO, LL_TRACE, LL_VERBOSE, LL_WARNING, m_chat_log_buf, m_game_ui, and utf8_to_wide().
Referenced by updateFrame().
|
protected |
|
protected |
References bbox_debug_flag, draw_control, hud, HUD_FLAG_BASIC_DEBUG, Player::hud_flags, m_cache_enable_noclip, m_flags, m_game_formspec, m_game_ui, and smgr.
Referenced by run().
|
protected |
References BS, camera, device, draw_control, drawScene(), floatToInt(), FOG_RANGE_ALL, g_profiler, RenderingEngine::get_shadow_renderer(), 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, m_game_formspec, m_game_ui, m_is_paused, mapper, MYMIN, runData, sky, TimeTaker::stop(), updateChat(), updateClouds(), updateShadows(), and ZoneScoped.
Referenced by run().
|
inlineprotected |
|
protected |
References g_menumgr, m_is_paused, pauseAnimation(), 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(), LocalPlayer::getPlayerSettings(), getTogglableKeyState(), input, LocalPlayer::isDead(), isKeyDown(), KeyType::JUMP, KeyType::LEFT, m_cache_toggle_aux1_key, m_cache_toggle_sneak_key, m_touch_simulate_aux1, PlayerControl::movement_direction, PlayerControl::movement_speed, 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(), dir(), final_color_blend(), floatToInt(), g_6dirs, g_settings, ClientEnvironment::getClientMap(), getInteriorLight(), MapNode::getNeighbors(), Map::getNode(), Map::getNodeDefManager(), GenericCAO::getProperties(), GenericCAO::getSceneNode(), MapNode::getSelectionBoxes(), hud, PointedThing::intersection_normal, intToFloat(), PointedThing::node_undersurface, PointedThing::object_id, p(), POINTEDTHING_NODE, POINTEDTHING_OBJECT, PointedThing::raw_intersection_normal, ObjectProperties::rotate_selectionbox, runData, and PointedThing::type.
Referenced by processPlayerInteraction().
|
inlineprotected |
References g_profiler, and ProfilerGraph::put().
Referenced by run().
|
protected |
References FpsControl::busy_time, RunStats::drawtime, driver, g_profiler, g_settings, infostream, m_game_ui, profiler_interval, and FpsControl::sleep_time.
Referenced by run().
|
protected |
References camera, RenderingEngine::get_shadow_renderer(), ShadowRenderer::getDirectionalLight(), getWickedTimeOfDay(), runData, DirectionalLight::setDirection(), ShadowRenderer::setShadowIntensity(), ShadowRenderer::setShadowTint(), ShadowRenderer::setTimeOfDay(), sky, and DirectionalLight::updateFrustum().
Referenced by updateFrame().
|
protected |
References BS, camera, device, LocalPlayer::getFootstepNodePos(), Map::getNode(), LocalPlayer::getParent(), Player::getSpeed(), ClientActiveObject::getVelocity(), intToFloat(), LocalPlayer::makes_footstep_sound, nodedef_manager, sound_manager, sound_volume_control(), and soundmaker.
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.
Referenced by handlePointingAtObject(), processItemSelection(), processKeyInput(), and processPlayerInteraction().
|
inlineprotected |
References input.
Referenced by getTogglableKeyState(), handlePointingAtNode(), handlePointingAtObject(), processKeyInput(), and processPlayerInteraction().
|
inlineprotected |
References input.
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(), getServerContent(), isKeyDown(), nodePlacement(), processItemSelection(), processKeyInput(), processPlayerInteraction(), processUserInput(), startup(), updateCameraDirection(), updateCameraOrientation(), updatePlayerControl(), 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 updateCameraOrientation().
|
private |
Referenced by readSettings(), and updateDebugState().
|
private |
Referenced by readSettings(), and updateCameraOrientation().
|
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 checkConnection(), connectToServer(), and startup().
|
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 |