Classes | |
struct | Flags |
Public Member Functions | |
Game () | |
~Game () | |
bool | startup (bool *kill, InputHandler *input, const GameStartData &game_params, std::string &error_message, bool *reconnect, ChatBackend *chat_backend) |
void | run () |
void | shutdown () |
Protected Member Functions | |
void | extendedResourceCleanup () |
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) |
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 | 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 | 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 | step (f32 *dtime) |
void | processClientEvents (CameraOrientation *cam) |
void | updateCamera (u32 busy_time, f32 dtime) |
void | updateSound (f32 dtime) |
void | processPlayerInteraction (f32 dtime, bool show_hud, bool show_debug) |
PointedThing | updatePointedThing (const core::line3d< f32 > &shootline, bool liquids_pointable, 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 | limitFps (FpsControl *fps_timings, f32 *dtime) |
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) |
Static Private Attributes | |
static const ClientEventHandler | clientEventHandler [CLIENTEVENT_MAX] |
Game::Game | ( | ) |
References g_settings, readSettings(), Settings::registerChangedCallback(), and settingChangedCallback().
Game::~Game | ( | ) |
References camera, client, Settings::deregisterChangedCallback(), draw_control, eventmgr, extendedResourceCleanup(), g_settings, hud, itemdef_manager, nodedef_manager, quicktune, server, settingChangedCallback(), shader_src, sound, sound_is_dummy, soundmaker, and texture_src.
|
inlineprotected |
References error_message, errorstream, 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, IPv6AddressBytes::bytes, InputHandler::cancelPressed(), InputHandler::clear(), Client, draw_control, RenderingEngine::draw_menu_scene(), error_message, errorstream, eventmgr, g_menumgr, g_settings, RenderingEngine::get_timer_time(), Settings::getBool(), guienv, infostream, input, Address::isIPv6(), GameStartData::isSinglePlayer(), Address::isZero(), itemdef_manager, FpsControl::last_time, LC_Init, limitFps(), m_game_ui, N_, GameStartData::name, nodedef_manager, GameStartData::password, Address::print(), reconnect_requested, registration_confirmation_shown, Address::Resolve(), RenderingEngine::run(), Address::serializeString(), Address::setAddress(), shader_src, showOverlayMessage(), simple_singleplayer_mode, GameParams::socket_port, sound, texture_src, and BaseException::what().
Referenced by createClient().
|
protected |
References IWritableShaderSource::addShaderConstantSetterFactory(), camera, clouds, connectToServer(), crack_animation_length, device, draw_control, driver, error_message, errorstream, GameRunData::fog_range, Game::Flags::force_fog_off, g_touchscreengui, g_version_hash, getServerContent(), IWritableTextureSource::getTexture(), guienv, TouchScreenGUI::hide(), hud, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, TouchScreenGUI::init(), initGui(), Player::inventory, m_cache_enable_clouds, m_flags, mapper, N_, PROJECT_NAME_C, runData, shader_src, showOverlayMessage(), sky, skybox, smgr, Camera::successfullyCreated(), texture_src, and utf8_to_wide().
Referenced by startup().
|
protected |
References error_message, errorstream, g_settings, Settings::get(), Settings::getBool(), infostream, Address::isIPv6(), N_, Address::Resolve(), Address::serializeString(), Server, Address::setAddress(), showOverlayMessage(), simple_singleplayer_mode, and BaseException::what().
Referenced by init().
|
protected |
References g_settings, Settings::getS16(), itos(), m_game_ui, Settings::set(), and wgettext().
Referenced by processKeyInput().
|
protected |
References IDropAction::count, MoveAction::from_i, MoveAction::from_inv, MoveAction::from_list, and InventoryLocation::setCurrentPlayer().
Referenced by processKeyInput().
|
protected |
References clearTextureNameCache(), driver, RenderingEngine::get_mesh_cache(), and infostream.
Referenced by ~Game().
|
protected |
References InputHandler::cancelPressed(), checkConnection(), InputHandler::clear(), RenderingEngine::draw_load_screen(), error_message, errorstream, g_settings, RenderingEngine::get_timer_time(), Settings::getBool(), guienv, infostream, input, FpsControl::last_time, LC_Init, limitFps(), RenderingEngine::run(), texture_src, USE_CURL, utf8_to_wide(), and wgettext().
Referenced by createClient().
|
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(), and texture_src.
Referenced by run().
|
private |
References ClientEvent::cloud_params, clouds, Clouds::setColorAmbient(), Clouds::setColorBright(), Clouds::setDensity(), Clouds::setHeight(), Clouds::setSpeed(), and Clouds::setThickness().
|
private |
References GameRunData::damage_flash, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, runData, and showDeathFormspec().
|
private |
|
private |
References Player::addHud(), HudElement::align, HudElement::dir, ClientEvent::hudadd, HudElement::item, HudElement::name, HudElement::number, HudElement::offset, HudElement::pos, HudElement::scale, HudElement::size, HudElement::text, HudElement::text2, HudElement::type, HudElement::world_pos, and HudElement::z_index.
|
private |
References HudElement::align, HudElement::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_TEXT, HUD_STAT_TEXT2, HUD_STAT_WORLD_POS, HUD_STAT_Z_INDEX, ClientEvent::hudchange, HudElement::item, HudElement::name, HudElement::number, HudElement::offset, HudElement::pos, HudElement::scale, HudElement::size, HudElement::text, HudElement::text2, HudElement::world_pos, and HudElement::z_index.
|
private |
|
private |
References FATAL_ERROR.
|
private |
References ClientEvent::override_day_night_ratio.
|
private |
|
private |
References CameraOrientation::camera_pitch, and CameraOrientation::camera_yaw.
|
private |
References ClientEvent::moon_params, MoonParams::scale, Sky::setMoonScale(), Sky::setMoonTexture(), Sky::setMoonVisible(), sky, MoonParams::texture, texture_src, MoonParams::tonemap, and MoonParams::visible.
|
private |
References Sky::addTextureToSkybox(), SkyboxParams::bgcolor, Sky::clearSkyboxTextures(), SkyboxParams::clouds, SkyboxParams::fog_moon_tint, SkyboxParams::fog_sun_tint, SkyboxParams::fog_tint_type, infostream, ClientEvent::set_sky, Sky::setCloudsEnabled(), Sky::setFallbackBgColor(), Sky::setHorizonTint(), Sky::setSkyColors(), Sky::setVisible(), sky, SkyboxParams::sky_color, skybox, texture_src, SkyboxParams::textures, and SkyboxParams::type.
|
private |
References StarParams::count, StarParams::scale, Sky::setStarColor(), Sky::setStarCount(), Sky::setStarScale(), Sky::setStarsVisible(), sky, ClientEvent::star_params, StarParams::starcolor, and StarParams::visible.
|
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.
|
private |
References GUIFormSpecMenu::create(), input, InputHandler::joystick, m_game_ui, ClientEvent::show_formspec, and sound.
|
private |
References GUIFormSpecMenu::create(), input, InputHandler::joystick, m_game_ui, ClientEvent::show_formspec, and sound.
|
protected |
References GameRunData::btn_down_for_dig, camera, crack_animation_length, GameRunData::dig_index, GameRunData::dig_instantly, GameRunData::dig_time, GameRunData::dig_time_complete, GameRunData::digging, GameRunData::digging_blocked, SimpleSoundSpec::exists(), g_settings, SimpleSoundSpec::gain, NodeDefManager::get(), Settings::getBool(), getDigParams(), Map::getNode(), ItemStack::getToolCapabilities(), ContentFeatures::groups, infostream, INTERACT_DIGGING_COMPLETED, INTERACT_START_DIGGING, itemdef_manager, m_cache_enable_particles, SoundMaker::m_player_leftpunch_sound, SimpleSoundSpec::name, ContentFeatures::node_dig_prediction, nodedef_manager, GameRunData::nodig_delay_timer, params, runData, Camera::setDigging(), ContentFeatures::sound_dig, and soundmaker.
Referenced by handlePointingAtNode().
|
protected |
References camera, KeyType::DIG, GameRunData::digging_blocked, NodeDefManager::get(), ItemStack::getDefinition(), Map::getNode(), Map::getNodeMetadata(), Metadata::getString(), handleDigging(), infostream, isKeyDown(), itemdef_manager, m_game_ui, SoundMaker::m_player_rightpunch_sound, m_repeat_place_time, TileDef::name, ContentFeatures::name, PointedThing::node_abovesurface, PointedThing::node_undersurface, nodedef_manager, nodePlacement(), GameRunData::nodig_delay_timer, KeyType::PLACE, GameRunData::repeat_place_timer, runData, Camera::setDigging(), soundmaker, ContentFeatures::tiledef, 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, 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().
|
protected |
References g_settings, Settings::getS16(), itos(), m_game_ui, Settings::set(), and wgettext().
Referenced by processKeyInput().
|
protected |
References createItemDefManager(), createNodeDefManager(), createShaderSource(), createSingleplayerServer(), createTextureSource(), eventmgr, initSound(), itemdef_manager, N_, nodedef_manager, quicktune, shader_src, showOverlayMessage(), and texture_src.
Referenced by startup().
|
protected |
References ChatBackend::applySettings(), chat_backend, ChatBackend::clearRecentChat(), g_menumgr, g_touchscreengui, gui_chat_console, guienv, m_game_ui, and TouchScreenGUI::show().
Referenced by createClient().
|
protected |
References createOpenALSoundManager(), dummySoundManager, eventmgr, g_settings, g_sound_manager_singleton, Settings::getBool(), infostream, nodedef_manager, SoundMaker::registerReceiver(), sound, sound_is_dummy, soundfetcher, and soundmaker.
Referenced by init().
|
inlineprotected |
References input, and InputHandler::isKeyDown().
Referenced by handlePointingAtNode(), handlePointingAtObject(), nodePlacement(), processKeyInput(), processPlayerInteraction(), and updatePlayerControl().
|
inlineprotected |
References FpsControl::busy_time, device, g_menumgr, g_settings, Settings::getFloat(), FpsControl::last_time, MainMenuManager::pausesGame(), and FpsControl::sleep_time.
Referenced by connectToServer(), getServerContent(), and run().
|
private |
References BS, ContentFeatures::buildable_to, CPT2_COLOR, CPT2_COLORED_FACEDIR, CPT2_COLORED_WALLMOUNTED, CPT2_FACEDIR, CPT2_WALLMOUNTED, GUIFormSpecMenu::create(), dir(), errorstream, floatToInt(), g_settings, NodeDefManager::get(), Settings::getBool(), NodeDefManager::getId(), Map::getNode(), LocalPlayer::getStandingNodePos(), Metadata::getString(), ContentFeatures::groups, infostream, input, INTERACT_PLACE, isKeyDown(), InputHandler::isRandom(), InputHandler::joystick, m_game_ui, SoundMaker::m_player_rightpunch_sound, ItemStack::metadata, MYMAX, mystoi(), ItemDefinition::name, ItemDefinition::node_placement_prediction, nodedef_manager, p(), ContentFeatures::param_type_2, ContentFeatures::rightclickable, InventoryLocation::setNodeMeta(), KeyType::SNEAK, sound, ItemDefinition::sound_place, ItemDefinition::sound_place_failed, soundmaker, verbosestream, and ContentFeatures::walkable.
Referenced by handlePointingAtNode().
|
protected |
References gui_chat_console, GUIChatConsole::isOpenInhibited(), GUIChatConsole::openConsole(), GUIChatConsole::replaceAndAddToHistory(), GUIChatConsole::setCloseOnEnter(), and porting::showInputDialog().
Referenced by processKeyInput().
|
protected |
References GUIFormSpecMenu::create(), LocalPlayer::getCAO(), PlayerInventoryFormSource::getForm(), Client::getInventory(), infostream, input, InputHandler::joystick, PlayerInventoryFormSource::m_client, m_game_ui, InventoryLocation::setCurrentPlayer(), and sound.
Referenced by processKeyInput().
|
protected |
References CLIENTEVENT_MAX, clientEventHandler, FATAL_ERROR_IF, and ClientEventHandler::handler.
Referenced by run().
|
protected |
References dir(), InputHandler::getMouseWheel(), Player::getWieldIndex(), KeyType::HOTBAR_NEXT, KeyType::HOTBAR_PREV, Player::hud_hotbar_itemcount, input, MYMIN, PLAYER_INVENTORY_SIZE, KeyType::SLOT_1, and wasKeyDown().
Referenced by processUserInput().
|
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, 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, 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, rangelim, KeyType::RANGESELECT, GameRunData::reset_jump_timer, runData, KeyType::SCREENSHOT, Settings::setBool(), Settings::setFloat(), showPauseMenu(), KeyType::SNEAK, KeyType::TOGGLE_CHAT, KeyType::TOGGLE_DEBUG, KeyType::TOGGLE_FOG, KeyType::TOGGLE_HUD, KeyType::TOGGLE_PROFILER, KeyType::TOGGLE_UPDATE_CAMERA, toggleAutoforward(), toggleCinematic(), toggleDebug(), toggleFast(), toggleFog(), toggleFreeMove(), toggleFreeMoveAlt(), toggleFullViewRange(), toggleMinimap(), toggleNoClip(), togglePitchMove(), toggleUpdateCamera(), utf8_to_wide(), wasKeyDown(), wgettext(), and KeyType::ZOOM.
Referenced by processUserInput().
|
protected |
References 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(), Camera::getOffset(), Camera::getPosition(), LocalPlayer::getPosition(), TouchScreenGUI::getShootline(), getToolRange(), Player::getWieldedItem(), handlePointingAtNode(), handlePointingAtNothing(), handlePointingAtObject(), hud, infostream, input, INTERACT_STOP_DIGGING, INTERACT_USE, intToFloat(), isKeyDown(), itemdef_manager, InputHandler::joystick, ItemDefinition::liquids_pointable, SoundMaker::m_player_leftpunch_sound, SimpleSoundSpec::name, PointedThing::node_undersurface, GameRunData::nodig_delay_timer, KeyType::PLACE, GameRunData::pointed_old, POINTEDTHING_NODE, POINTEDTHING_OBJECT, GameRunData::punching, GameRunData::repeat_place_timer, runData, Camera::setDigging(), soundmaker, PointedThing::type, updatePointedThing(), Hud::updateSelectionMesh(), ItemDefinition::usable, wasKeyDown(), wasKeyPressed(), and wasKeyReleased().
Referenced by run().
|
protected |
References itemdef_manager, IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), IWritableItemDefManager::processQueue(), shader_src, and texture_src.
Referenced by run().
|
protected |
References InputHandler::clear(), GUIChatConsole::closeConsoleAtOnce(), device, g_touchscreengui, gui_chat_console, guienv, TouchScreenGUI::hide(), input, isMenuActive(), GUIChatConsole::isOpen(), GameRunData::jump_timer, m_cache_doubletap_jump, m_game_ui, GameRunData::new_playeritem, processItemSelection(), processKeyInput(), runData, InputHandler::step(), and TouchScreenGUI::step().
Referenced by run().
|
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_fog_start, m_cache_joystick_frustum_sensitivity, m_cache_mouse_sensitivity, m_does_lost_focus_pause_game, m_repeat_place_time, and rangelim.
Referenced by Game().
void Game::run | ( | ) |
References FpsControl::busy_time, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, checkConnection(), device, g_gamecallback, g_profiler, g_settings, RenderingEngine::get_timer_time(), RenderingEngine::get_video_driver(), Settings::getBool(), Settings::getFloat(), Settings::getU16(), Profiler::graphGet(), handleCallbacks(), hud, isMenuActive(), kill, FpsControl::last_time, limitFps(), m_cache_cam_smoothing, m_does_lost_focus_pause_game, m_game_ui, processClientEvents(), processPlayerInteraction(), processQueues(), processUserInput(), Hud::resizeHotbar(), RenderingEngine::run(), set_light_table(), Settings::setU16(), showPauseMenu(), MainGameCallback::shutdown_requested, step(), updateCamera(), updateCameraDirection(), updateFrame(), updateInteractTimers(), updatePlayerControl(), updateProfilerGraphs(), updateProfilers(), updateSound(), and updateStats().
Referenced by the_game().
|
staticprotected |
|
private |
References GUIFormSpecMenu::create(), input, InputHandler::joystick, m_game_ui, SIZE_TAG, and sound.
Referenced by handleClientEvent_Deathscreen().
|
protected |
References RenderingEngine::draw_load_screen(), guienv, texture_src, and wgettext().
Referenced by connectToServer(), createClient(), createSingleplayerServer(), init(), and shutdown().
|
private |
References GUIFormSpecMenu::create(), g_settings, Settings::get(), GET_KEY_NAME, Settings::getBool(), Address::getPort(), input, InputHandler::joystick, m_game_ui, porting::mt_snprintf(), PROJECT_NAME_C, simple_singleplayer_mode, SIZE_TAG, sound, str_formspec_escape(), strgettext(), and VERSION_STRING.
Referenced by processKeyInput(), and run().
void Game::shutdown | ( | ) |
References ChatBackend::addMessage(), chat_backend, LogOutputBuffer::clear(), clouds, MainMenuManager::deletingMenu(), driver, RenderingEngine::finalize(), g_menumgr, g_settings, g_touchscreengui, Settings::get(), gui_chat_console, TouchScreenGUI::hide(), m_chat_log_buf, m_game_ui, MainMenuManager::m_stack, MainMenuManager::menuCount(), N_, IWritableShaderSource::processQueue(), IWritableTextureSource::processQueue(), shader_src, showOverlayMessage(), sky, sleep_ms, and texture_src.
Referenced by the_game().
bool Game::startup | ( | bool * | kill, |
InputHandler * | input, | ||
const GameStartData & | game_params, | ||
std::string & | error_message, | ||
bool * | reconnect, | ||
ChatBackend * | chat_backend | ||
) |
References GameStartData::address, chat_backend, Translations::clear(), createClient(), device, driver, error_message, g_client_translations, g_settings, GameParams::game_spec, RenderingEngine::get_raw_device(), RenderingEngine::get_scene_manager(), Settings::getBool(), hud, init(), RenderingEngine::initialize(), input, GameStartData::isSinglePlayer(), InputHandler::keycache, kill, m_first_loop_after_window_activation, m_game_ui, m_invert_mouse, WorldSpec::path, KeyCache::populate(), reconnect_requested, runData, simple_singleplayer_mode, smgr, GameParams::socket_port, GameRunData::time_from_last_punch, and GameStartData::world_spec.
Referenced by the_game().
|
inlineprotected |
References g_menumgr, MainMenuManager::pausesGame(), and simple_singleplayer_mode.
Referenced by run().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().
Referenced by processKeyInput().
|
protected |
References draw_control, m_game_ui, and MapDrawControl::show_wireframe.
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().
Referenced by processKeyInput().
|
protected |
References g_settings, Settings::getBool(), m_game_ui, and Settings::setBool().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().
Referenced by processKeyInput(), and toggleFreeMoveAlt().
|
protected |
References GameRunData::jump_timer, m_cache_doubletap_jump, GameRunData::reset_jump_timer, runData, and toggleFreeMove().
Referenced by processKeyInput().
|
protected |
References draw_control, m_game_ui, and MapDrawControl::range_all.
Referenced by processKeyInput().
|
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_OFF, MINIMAP_TYPE_RADAR, Minimap::nextMode(), Minimap::toggleMinimapShape(), MinimapModeDef::type, and utf8_to_wide().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().
Referenced by processKeyInput().
|
protected |
References bool_to_cstr(), g_settings, Settings::getBool(), m_game_ui, and Settings::set().
Referenced by processKeyInput().
|
protected |
References Game::Flags::disable_camera_update, m_flags, and m_game_ui.
Referenced by processKeyInput().
|
protected |
References camera, KeyType::CAMERA_MODE, CAMERA_MODE_FIRST, clouds, Game::Flags::disable_camera_update, ToolCapabilities::full_punch_interval, Camera::getCameraMode(), LocalPlayer::getCAO(), Camera::getDirection(), Camera::getFovMax(), Camera::getOffset(), Camera::getPosition(), ItemStack::getToolCapabilities(), Player::getWieldedItem(), itemdef_manager, m_camera_offset_changed, m_flags, MYMIN, runData, GenericCAO::setChildrenVisible(), Camera::step(), GameRunData::time_from_last_punch, Camera::toggleCameraMode(), Camera::update(), Clouds::updateCameraOffset(), GenericCAO::updateMeshCulling(), and wasKeyDown().
Referenced by run().
|
protected |
References device, driver, input, isMenuActive(), InputHandler::isRandom(), m_first_loop_after_window_activation, InputHandler::setMousePos(), and updateCameraOrientation().
Referenced by run().
|
protected |
References camera, CAMERA_MODE_THIRD_FRONT, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, driver, g_touchscreengui, JoystickController::getAxisWithoutDead(), Camera::getCameraMode(), InputHandler::getMousePos(), TouchScreenGUI::getPitch(), 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().
|
private |
References ChatBackend::addMessage(), ChatBackend::addUnparsedMessage(), chat_backend, LogOutputBuffer::empty(), LogOutputBuffer::get(), ChatBuffer::getLineCount(), ChatBackend::getRecentBuffer(), ChatBackend::getRecentChat(), m_chat_log_buf, m_game_ui, ChatBackend::step(), and utf8_to_wide().
Referenced by updateFrame().
|
protected |
References Profiler::avg(), BS, camera, CAMERA_MODE_FIRST, CAMERA_MODE_THIRD_FRONT, clouds, GameRunData::damage_flash, decode_light_f(), ProfilerGraph::draw(), draw_control, RenderingEngine::draw_scene(), RunStats::drawtime, driver, floatToInt(), GameRunData::fog_range, g_fontengine, g_profiler, g_settings, Sky::getBgColor(), Settings::getBool(), Sky::getBrightness(), Camera::getCameraMode(), Camera::getCameraNode(), Sky::getCloudColor(), Sky::getCloudsVisible(), Clouds::getColor(), Camera::getDirection(), FontEngine::getFont(), Camera::getOffset(), LocalPlayer::getPitch(), LocalPlayer::getPosition(), Sky::getSkyColor(), Metadata::getString(), Player::getWieldedItem(), Player::getWieldIndex(), LocalPlayer::getYaw(), Profiler::graphAdd(), gui_chat_console, guiroot, HUD_FLAG_CROSSHAIR_VISIBLE, HUD_FLAG_WIELDITEM_VISIBLE, Player::hud_flags, LocalPlayer::hurt_tilt_strength, LocalPlayer::hurt_tilt_timer, infostream, Clouds::isCameraInsideCloud(), isMenuActive(), m_cache_enable_fog, m_cache_enable_free_move, m_cache_enable_noclip, m_cache_fog_start, m_camera_offset_changed, m_game_ui, m_reset_HW_buffer_counter, mapper, MYMIN, GameRunData::new_playeritem, InventoryLocation::NODEMETA, Sky::overrideColors(), GameRunData::pointed_old, MapDrawControl::range_all, runData, Minimap::setAngle(), Sky::setInClouds(), Minimap::setPos(), sky, Clouds::step(), TimeTaker::stop(), GameRunData::time_of_day_smooth, Clouds::update(), Sky::update(), GameRunData::update_draw_list_last_cam_dir, GameRunData::update_draw_list_timer, updateChat(), MapDrawControl::wanted_range, and Camera::wield().
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 PlayerControl::aux1, KeyType::BACKWARD, CameraOrientation::camera_pitch, CameraOrientation::camera_yaw, PlayerSettings::continuous_forward, KeyType::DIG, KeyType::FORWARD, LocalPlayer::getAutojump(), JoystickController::getAxisWithoutDead(), Player::getPlayerSettings(), input, LocalPlayer::isDead(), isKeyDown(), InputHandler::isKeyDown(), JA_FORWARD_MOVE, JA_SIDEWARD_MOVE, InputHandler::joystick, KeyType::JUMP, PlayerControl::jump, Player::keyPressed, KeyType::LEFT, KeyType::PLACE, KeyType::RIGHT, KeyType::SNEAK, KeyType::SPECIAL1, PlayerControl::up, 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] | 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(), ClientActiveObject::doShowSelectionBox(), final_color_blend(), floatToInt(), g_6dirs, g_settings, Settings::getBool(), ClientEnvironment::getClientMap(), getInteriorLight(), MapNode::getNeighbors(), Map::getNode(), Map::getNodeDefManager(), ClientActiveObject::getPosition(), ClientActiveObject::getSelectionBox(), Hud::getSelectionBoxes(), MapNode::getSelectionBoxes(), Hud::getSelectionPos(), porting::getTimeMs(), hud, PointedThing::intersection_normal, intToFloat(), PointedThing::node_undersurface, PointedThing::object_id, p(), POINTEDTHING_NODE, POINTEDTHING_OBJECT, Hud::pointing_at_object, runData, GameRunData::selected_object, Hud::setSelectedFaceNormal(), Hud::setSelectionMeshColor(), Hud::setSelectionPos(), and PointedThing::type.
Referenced by processPlayerInteraction().
|
inlineprotected |
References g_profiler, Profiler::graphGet(), and ProfilerGraph::put().
Referenced by run().
|
protected |
References FpsControl::busy_time, Profiler::clear(), RunStats::drawtime, g_profiler, g_settings, Settings::getFloat(), Profiler::graphAdd(), infostream, m_game_ui, Profiler::print(), profiler_interval, FpsControl::sleep_time, and IntervalLimiter::step().
Referenced by run().
|
protected |
References BS, camera, g_settings, NodeDefManager::get(), Settings::getBool(), Camera::getCameraNode(), Camera::getDirection(), Settings::getFloat(), LocalPlayer::getFootstepNodePos(), Map::getNode(), Camera::getOffset(), intToFloat(), SoundMaker::m_player_step_sound, SoundMaker::makes_footstep_sound, LocalPlayer::makes_footstep_sound, nodedef_manager, rangelim, Settings::setFloat(), ISoundManager::setListenerGain(), sound, ContentFeatures::sound_footstep, soundmaker, SoundMaker::step(), and ISoundManager::updateListener().
Referenced by run().
|
protected |
References Jitter::avg, FpsControl::busy_time, RunStats::busy_time_jitter, Jitter::counter, RunStats::dtime_jitter, 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(), processPlayerInteraction(), and updateCamera().
|
inlineprotected |
References input, and InputHandler::wasKeyPressed().
Referenced by handlePointingAtNode(), handlePointingAtObject(), and processPlayerInteraction().
|
inlineprotected |
References input, and InputHandler::wasKeyReleased().
Referenced by processPlayerInteraction().
|
private |
|
private |
Referenced by initGui(), shutdown(), startup(), and updateChat().
|
staticprivate |
Referenced by processClientEvents().
|
private |
Referenced by createClient(), handleClientEvent_CloudParams(), shutdown(), updateCamera(), and updateFrame().
|
private |
Referenced by createClient(), and handleDigging().
|
private |
Referenced by createClient(), limitFps(), processUserInput(), run(), startup(), and updateCameraDirection().
|
private |
Referenced by ~Game(), connectToServer(), createClient(), toggleDebug(), toggleFullViewRange(), and updateFrame().
|
private |
Referenced by createClient(), extendedResourceCleanup(), shutdown(), startup(), updateCameraDirection(), updateCameraOrientation(), and updateFrame().
|
private |
Referenced by checkConnection(), connectToServer(), createClient(), createSingleplayerServer(), 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(), run(), startup(), toggleMinimap(), and updatePointedThing().
|
private |
Referenced by connectToServer(), getServerContent(), handleCallbacks(), handleClientEvent_ShowFormSpec(), handleClientEvent_ShowLocalFormSpec(), isKeyDown(), nodePlacement(), openInventory(), processItemSelection(), processKeyInput(), processPlayerInteraction(), processUserInput(), showDeathFormspec(), showPauseMenu(), startup(), updateCameraDirection(), updateCameraOrientation(), updatePlayerControl(), wasKeyDown(), wasKeyPressed(), and wasKeyReleased().
|
private |
Referenced by ~Game(), connectToServer(), handleDigging(), handlePointingAtNode(), init(), processPlayerInteraction(), processQueues(), and updateCamera().
|
private |
Referenced by readSettings(), and run().
|
private |
Referenced by processUserInput(), readSettings(), and toggleFreeMoveAlt().
|
private |
Referenced by createClient(), and readSettings().
|
private |
Referenced by readSettings(), and updateFrame().
|
private |
Referenced by readSettings(), and updateFrame().
|
private |
Referenced by readSettings(), and updateCameraOrientation().
|
private |
Referenced by readSettings(), and updateFrame().
|
private |
Referenced by handleDigging(), and readSettings().
|
private |
Referenced by readSettings(), and updateFrame().
|
private |
Referenced by readSettings(), and updateCameraOrientation().
|
private |
Referenced by readSettings(), and updateCameraOrientation().
|
private |
Referenced by updateCamera(), and updateFrame().
|
private |
Referenced by shutdown(), and updateChat().
|
private |
Referenced by readSettings(), and run().
|
private |
Referenced by startup(), and updateCameraDirection().
|
private |
Referenced by createClient(), toggleUpdateCamera(), and updateCamera().
|
private |
Referenced by checkZoomEnabled(), connectToServer(), decreaseViewRange(), handleClientEvent_ShowFormSpec(), handleClientEvent_ShowLocalFormSpec(), handlePointingAtNode(), handlePointingAtObject(), increaseViewRange(), initGui(), nodePlacement(), openInventory(), processKeyInput(), processUserInput(), run(), showDeathFormspec(), showPauseMenu(), shutdown(), startup(), toggleAutoforward(), toggleCinematic(), toggleDebug(), toggleFast(), toggleFog(), toggleFreeMove(), toggleFullViewRange(), toggleMinimap(), toggleNoClip(), togglePitchMove(), toggleUpdateCamera(), updateChat(), updateFrame(), and updateProfilers().
|
private |
Referenced by startup(), and updateCameraOrientation().
|
private |
Referenced by handlePointingAtNode(), and readSettings().
|
private |
Referenced by updateFrame().
|
private |
Referenced by createClient(), toggleMinimap(), and updateFrame().
|
private |
Referenced by ~Game(), connectToServer(), handleDigging(), handlePointingAtNode(), init(), initSound(), nodePlacement(), and updateSound().
|
private |
Referenced by updateProfilers().
|
private |
Referenced by ~Game(), init(), and processKeyInput().
|
private |
Referenced by checkConnection(), connectToServer(), and startup().
|
private |
Referenced by connectToServer().
|
private |
Referenced by createClient(), handleClientEvent_Deathscreen(), handleClientEvent_PlayerDamage(), handleDigging(), handlePointingAtNode(), handlePointingAtObject(), processKeyInput(), processPlayerInteraction(), processUserInput(), startup(), toggleFreeMoveAlt(), updateCamera(), updateFrame(), updateInteractTimers(), and updatePointedThing().
|
private |
Referenced by ~Game(), connectToServer(), createClient(), init(), processQueues(), and shutdown().
|
private |
Referenced by connectToServer(), createSingleplayerServer(), showPauseMenu(), startup(), and step().
|
private |
|
private |
Referenced by createClient(), and handleClientEvent_SetSky().
|
private |
Referenced by createClient(), and startup().
|
private |
|
private |
Referenced by ~Game(), and initSound().
|
private |
Referenced by initSound().
|
private |
Referenced by ~Game(), handleDigging(), handlePointingAtNode(), initSound(), nodePlacement(), processPlayerInteraction(), and updateSound().
|
private |