#enable_mesh_cache = true
# Enables caching of facedir rotated meshes
+#enable_minimap = true
+# Enables minimap
+#minimap_shape_round = true
+# true - round shape, false - square
+#minimap_double_scan_height = true
+# true = 256, false = 128
+# useable to make minimap smoother on slower machines
+
# The time in seconds it takes between repeated
# right clicks when holding the right mouse button.
#repeat_rightclick_time = 0.25
settings->setDefault("enable_minimap", "true");
settings->setDefault("minimap_shape_round", "true");
+ settings->setDefault("minimap_double_scan_height", "true");
settings->setDefault("curl_timeout", "5000");
settings->setDefault("curl_parallel_limit", "8");
return NULL;
}
+MinimapUpdateThread::~MinimapUpdateThread()
+{
+ for (std::map<v3s16, MinimapMapblock *>::iterator
+ it = m_blocks_cache.begin();
+ it != m_blocks_cache.end(); it++) {
+ delete it->second;
+ }
+}
+
MinimapPixel *MinimapUpdateThread::getMinimapPixel (v3s16 pos, s16 height, s16 &pixel_height)
{
pixel_height = height - MAP_BLOCKSIZE;
this->shdrsrc = client->getShaderSource();
m_enable_shaders = g_settings->getBool("enable_shaders");
+ m_enable_shaders = g_settings->getBool("enable_shaders");
+ if (g_settings->getBool("minimap_double_scan_height")) {
+ m_surface_mode_scan_height = 256;
+ } else {
+ m_surface_mode_scan_height = 128;
+ }
data = new MinimapData;
data->mode = MINIMAP_MODE_OFF;
data->radar = false;
{
m_minimap_update_thread->Stop();
m_minimap_update_thread->Wait();
-
- for (std::map<v3s16, MinimapMapblock *>::iterator
- it = m_minimap_update_thread->m_blocks_cache.begin();
- it != m_minimap_update_thread->m_blocks_cache.end(); it++){
- delete it->second;
- }
-
m_meshbuffer->drop();
data->minimap_mask_round->drop();
data->minimap_mask_square->drop();
{
static const u16 modeDefs[7 * 3] = {
0, 0, 0,
- 0, 256, 256,
- 0, 256, 128,
- 0, 256, 64,
+ 0, m_surface_mode_scan_height, 256,
+ 0, m_surface_mode_scan_height, 128,
+ 0, m_surface_mode_scan_height, 64,
1, 32, 128,
1, 32, 64,
1, 32, 32};
this->driver = device->getVideoDriver();
this->tsrc = client->getTextureSource();
}
+ ~MinimapUpdateThread();
void getMap (v3s16 pos, s16 size, s16 height, bool radar);
MinimapPixel *getMinimapPixel (v3s16 pos, s16 height, s16 &pixel_height);
s16 getAirCount (v3s16 pos, s16 height);
video::ITexture *minimap_texture;
scene::SMeshBuffer *m_meshbuffer;
bool m_enable_shaders;
+ u16 m_surface_mode_scan_height;
JMutex m_mutex;
public:
bool enable_bumpmapping = g_settings->getBool("enable_bumpmapping");
bool enable_parallax_occlusion = g_settings->getBool("enable_parallax_occlusion");
bool enable_mesh_cache = g_settings->getBool("enable_mesh_cache");
+ bool enable_minimap = g_settings->getBool("enable_minimap");
bool use_normal_texture = enable_shaders &&
(enable_bumpmapping || enable_parallax_occlusion);
ContentFeatures *f = &m_content_features[i];
// minimap pixel color - the average color of a texture
- if (f->tiledef[0].name != "")
+ if (enable_minimap && f->tiledef[0].name != "")
f->minimap_color = tsrc->getTextureAverageColor(f->tiledef[0].name);
// Figure out the actual tiles to use