#include <minimap.h>
 Collaboration diagram for Minimap:Public Member Functions | |
| Minimap (Client *client) | |
| ~Minimap () | |
| void | addBlock (v3s16 pos, MinimapMapblock *data) | 
| v3f | getYawVec () | 
| void | setPos (v3s16 pos) | 
| v3s16 | getPos () const | 
| void | setAngle (f32 angle) | 
| f32 | getAngle () const | 
| void | toggleMinimapShape () | 
| void | setMinimapShape (MinimapShape shape) | 
| MinimapShape | getMinimapShape () | 
| void | clearModes () | 
| void | addMode (MinimapModeDef mode) | 
| void | addMode (MinimapType type, u16 size=0, const std::string &label="", const std::string &texture="", u16 scale=1) | 
| void | setModeIndex (size_t index) | 
| size_t | getModeIndex () const | 
| size_t | getMaxModeIndex () const | 
| void | nextMode () | 
| MinimapModeDef | getModeDef () const | 
| video::IImage * | getMinimapMask () | 
| video::ITexture * | getMinimapTexture () | 
| void | blitMinimapPixelsToImageRadar (video::IImage *map_image) | 
| void | blitMinimapPixelsToImageSurface (video::IImage *map_image, video::IImage *heightmap_image) | 
| irr_ptr< scene::SMeshBuffer > | createMinimapMeshBuffer () | 
| MinimapMarker * | addMarker (scene::ISceneNode *parent_node) | 
| void | removeMarker (MinimapMarker **marker) | 
| void | updateActiveMarkers () | 
| void | drawMinimap (core::rect< s32 > rect) | 
Public Attributes | |
| video::IVideoDriver * | driver | 
| Client * | client | 
| std::unique_ptr< MinimapData > | data | 
Private Attributes | |
| ITextureSource * | m_tsrc | 
| IShaderSource * | m_shdrsrc | 
| const NodeDefManager * | m_ndef | 
| std::unique_ptr< MinimapUpdateThread > | m_minimap_update_thread | 
| irr_ptr< scene::SMeshBuffer > | m_meshbuffer | 
| std::vector< MinimapModeDef > | m_modes | 
| size_t | m_current_mode_index | 
| u16 | m_surface_mode_scan_height | 
| f32 | m_angle | 
| std::mutex | m_mutex | 
| std::list< std::unique_ptr< MinimapMarker > > | m_markers | 
| std::list< v2f > | m_active_markers | 
| Minimap::Minimap | ( | Client * | client | ) | 
References addMode(), client, createMinimapMeshBuffer(), data, MinimapUpdateThread::data, driver, g_settings, RenderingEngine::get_video_driver(), Settings::getBool(), Client::getNodeDefManager(), Client::getShaderSource(), Client::getTextureSource(), m_angle, m_current_mode_index, m_meshbuffer, m_minimap_update_thread, m_ndef, m_shdrsrc, m_surface_mode_scan_height, m_tsrc, MinimapData::map_invalidated, MinimapData::minimap_shape_round, MINIMAP_TYPE_OFF, MINIMAP_TYPE_RADAR, MINIMAP_TYPE_SURFACE, setModeIndex(), and Thread::start().
 Here is the call graph for this function:| Minimap::~Minimap | ( | ) | 
References data, driver, MinimapData::heightmap_texture, m_markers, m_meshbuffer, m_minimap_update_thread, MinimapData::minimap_mask_round, MinimapData::minimap_mask_square, UpdateThread::stop(), MinimapData::texture, and Thread::wait().
 Here is the call graph for this function:| void Minimap::addBlock | ( | v3s16 | pos, | 
| MinimapMapblock * | data ) | 
References data, MinimapUpdateThread::enqueueBlock(), and m_minimap_update_thread.
Referenced by Client::step().
 Here is the call graph for this function:
 Here is the caller graph for this function:| MinimapMarker * Minimap::addMarker | ( | scene::ISceneNode * | parent_node | ) | 
References m_markers.
Referenced by GenericCAO::updateMarker().
 Here is the caller graph for this function:| void Minimap::addMode | ( | MinimapModeDef | mode | ) | 
References MinimapModeDef::label, m_modes, MinimapModeDef::map_size, MINIMAP_TYPE_OFF, MINIMAP_TYPE_RADAR, MINIMAP_TYPE_SURFACE, MINIMAP_TYPE_TEXTURE, porting::mt_snprintf(), MinimapModeDef::scale, MinimapModeDef::texture, and MinimapModeDef::type.
Referenced by Minimap(), addMode(), and Client::handleCommand_MinimapModes().
 Here is the call graph for this function:
 Here is the caller graph for this function:| void Minimap::addMode | ( | MinimapType | type, | 
| u16 | size = 0, | ||
| const std::string & | label = "", | ||
| const std::string & | texture = "", | ||
| u16 | scale = 1 ) | 
References addMode(), MinimapModeDef::label, m_surface_mode_scan_height, MinimapModeDef::map_size, MINIMAP_TYPE_RADAR, MINIMAP_TYPE_SURFACE, MinimapModeDef::scale, MinimapModeDef::scan_height, MinimapModeDef::texture, and MinimapModeDef::type.
 Here is the call graph for this function:| void Minimap::blitMinimapPixelsToImageRadar | ( | video::IImage * | map_image | ) | 
References MinimapPixel::air_count, data, MinimapModeDef::map_size, MinimapData::minimap_scan, MinimapData::mode, x, and z.
Referenced by getMinimapTexture().
 Here is the caller graph for this function:| void Minimap::blitMinimapPixelsToImageSurface | ( | video::IImage * | map_image, | 
| video::IImage * | heightmap_image ) | 
References TileDef::color, data, NodeDefManager::get(), MapNode::getColor(), TileDef::has_color, MinimapPixel::height, m_ndef, MinimapModeDef::map_size, MinimapData::minimap_scan, MinimapData::mode, MinimapPixel::n, ContentFeatures::tiledef, x, and z.
Referenced by getMinimapTexture().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  inline | 
References m_modes.
Referenced by Client::handleCommand_MinimapModes().
 Here is the caller graph for this function:| irr_ptr< scene::SMeshBuffer > Minimap::createMinimapMeshBuffer | ( | ) | 
| void Minimap::drawMinimap | ( | core::rect< s32 > | rect | ) | 
References data, driver, getMinimapTexture(), IShaderSource::getShaderInfo(), IShaderSource::getShaderRaw(), ITextureSource::getTexture(), MinimapData::heightmap_texture, m_active_markers, m_angle, m_meshbuffer, m_shdrsrc, m_tsrc, ShaderInfo::material, MinimapData::minimap_overlay_round, MinimapData::minimap_overlay_square, MinimapData::minimap_shape_round, MINIMAP_TYPE_OFF, MINIMAP_TYPE_SURFACE, MinimapData::mode, MinimapData::object_marker_red, MinimapData::player_marker, MinimapData::textures_initialised, MinimapModeDef::type, and updateActiveMarkers().
 Here is the call graph for this function:
      
  | 
  inline | 
References m_angle.
Referenced by LuaMinimap::l_get_angle().
 Here is the caller graph for this function:
      
  | 
  inline | 
References m_modes.
Referenced by LuaMinimap::l_set_mode(), and LuaMinimap::l_show().
 Here is the caller graph for this function:| video::IImage * Minimap::getMinimapMask | ( | ) | 
References data, driver, ITextureSource::getTexture(), m_tsrc, MinimapData::minimap_mask_round, MinimapData::minimap_mask_square, MINIMAP_MAX_SX, MINIMAP_MAX_SY, and MinimapData::minimap_shape_round.
Referenced by getMinimapTexture(), and updateActiveMarkers().
 Here is the call graph for this function:
 Here is the caller graph for this function:| MinimapShape Minimap::getMinimapShape | ( | ) | 
References data, MINIMAP_SHAPE_ROUND, MinimapData::minimap_shape_round, and MINIMAP_SHAPE_SQUARE.
Referenced by LuaMinimap::l_get_shape().
 Here is the caller graph for this function:| video::ITexture * Minimap::getMinimapTexture | ( | ) | 
References blitMinimapPixelsToImageRadar(), blitMinimapPixelsToImageSurface(), data, driver, getMinimapMask(), ITextureSource::getTexture(), MinimapData::heightmap_texture, m_tsrc, MinimapData::map_invalidated, MinimapModeDef::map_size, MINIMAP_MAX_SX, MINIMAP_MAX_SY, MINIMAP_TYPE_OFF, MINIMAP_TYPE_RADAR, MINIMAP_TYPE_SURFACE, MINIMAP_TYPE_TEXTURE, MinimapData::mode, MinimapData::pos, MinimapModeDef::scale, MinimapData::texture, MinimapModeDef::texture, MinimapModeDef::type, x, and y.
Referenced by drawMinimap().
 Here is the call graph for this function:
 Here is the caller graph for this function:
      
  | 
  inline | 
References data, and MinimapData::mode.
Referenced by Client::handleCommand_HudSetFlags(), and Game::toggleMinimap().
 Here is the caller graph for this function:
      
  | 
  inline | 
References m_current_mode_index.
Referenced by Client::handleCommand_HudSetFlags(), LuaMinimap::l_get_mode(), LuaMinimap::l_hide(), LuaMinimap::l_show(), and Game::toggleMinimap().
 Here is the caller graph for this function:
      
  | 
  inline | 
References data, and MinimapData::pos.
Referenced by LuaMinimap::l_get_pos().
 Here is the caller graph for this function:| v3f Minimap::getYawVec | ( | ) | 
References data, m_angle, and MinimapData::minimap_shape_round.
Referenced by GameGlobalShaderConstantSetter::onSetConstants().
 Here is the caller graph for this function:| void Minimap::nextMode | ( | ) | 
References m_current_mode_index, m_modes, and setModeIndex().
Referenced by Client::handleCommand_HudSetFlags(), and Game::toggleMinimap().
 Here is the call graph for this function:
 Here is the caller graph for this function:| void Minimap::removeMarker | ( | MinimapMarker ** | marker | ) | 
References m_markers.
Referenced by GenericCAO::removeFromScene(), and GenericCAO::updateMarker().
 Here is the caller graph for this function:| void Minimap::setAngle | ( | f32 | angle | ) | 
References m_angle.
Referenced by LuaMinimap::l_set_angle(), and Game::updateFrame().
 Here is the caller graph for this function:| void Minimap::setMinimapShape | ( | MinimapShape | shape | ) | 
References data, UpdateThread::deferUpdate(), g_settings, m_minimap_update_thread, m_mutex, MINIMAP_SHAPE_ROUND, MinimapData::minimap_shape_round, MINIMAP_SHAPE_SQUARE, and Settings::setBool().
Referenced by LuaMinimap::l_set_shape().
 Here is the call graph for this function:
 Here is the caller graph for this function:| void Minimap::setModeIndex | ( | size_t | index | ) | 
References data, UpdateThread::deferUpdate(), m_current_mode_index, m_minimap_update_thread, m_modes, m_mutex, MinimapData::map_invalidated, MINIMAP_TYPE_OFF, and MinimapData::mode.
Referenced by Minimap(), Client::handleCommand_MinimapModes(), LuaMinimap::l_hide(), LuaMinimap::l_set_mode(), LuaMinimap::l_show(), and nextMode().
 Here is the call graph for this function:
 Here is the caller graph for this function:| void Minimap::setPos | ( | v3s16 | pos | ) | 
References data, UpdateThread::deferUpdate(), m_minimap_update_thread, m_mutex, MinimapData::old_pos, and MinimapData::pos.
Referenced by LuaMinimap::l_set_pos(), and Game::updateFrame().
 Here is the call graph for this function:
 Here is the caller graph for this function:| void Minimap::toggleMinimapShape | ( | ) | 
References data, UpdateThread::deferUpdate(), g_settings, m_minimap_update_thread, m_mutex, MinimapData::minimap_shape_round, and Settings::setBool().
Referenced by Game::toggleMinimap().
 Here is the call graph for this function:
 Here is the caller graph for this function:| void Minimap::updateActiveMarkers | ( | ) | 
References BS, data, floatToInt(), getMinimapMask(), intToFloat(), m_active_markers, m_markers, MinimapModeDef::map_size, MINIMAP_MAX_SX, MINIMAP_MAX_SY, MinimapData::mode, MinimapData::pos, and MinimapModeDef::scan_height.
Referenced by drawMinimap().
 Here is the call graph for this function:
 Here is the caller graph for this function:| std::unique_ptr<MinimapData> Minimap::data | 
Referenced by Minimap(), ~Minimap(), addBlock(), blitMinimapPixelsToImageRadar(), blitMinimapPixelsToImageSurface(), drawMinimap(), getMinimapMask(), getMinimapShape(), getMinimapTexture(), getModeDef(), getPos(), getYawVec(), setMinimapShape(), setModeIndex(), setPos(), toggleMinimapShape(), and updateActiveMarkers().
| video::IVideoDriver* Minimap::driver | 
Referenced by Minimap(), ~Minimap(), drawMinimap(), getMinimapMask(), and getMinimapTexture().
      
  | 
  private | 
Referenced by drawMinimap(), and updateActiveMarkers().
      
  | 
  private | 
Referenced by Minimap(), drawMinimap(), getAngle(), getYawVec(), and setAngle().
      
  | 
  private | 
Referenced by Minimap(), getModeIndex(), nextMode(), and setModeIndex().
      
  | 
  private | 
Referenced by ~Minimap(), addMarker(), removeMarker(), and updateActiveMarkers().
      
  | 
  private | 
Referenced by Minimap(), ~Minimap(), and drawMinimap().
      
  | 
  private | 
Referenced by Minimap(), ~Minimap(), addBlock(), setMinimapShape(), setModeIndex(), setPos(), and toggleMinimapShape().
      
  | 
  private | 
Referenced by addMode(), clearModes(), getMaxModeIndex(), nextMode(), and setModeIndex().
      
  | 
  private | 
Referenced by setMinimapShape(), setModeIndex(), setPos(), and toggleMinimapShape().
      
  | 
  private | 
Referenced by Minimap(), and blitMinimapPixelsToImageSurface().
      
  | 
  private | 
Referenced by Minimap(), and drawMinimap().
      
  | 
  private | 
Referenced by Minimap(), drawMinimap(), getMinimapMask(), and getMinimapTexture().