#include "serialization.h"
#include "util/serialize.h"
#include "config.h"
-#include "cmake_config_githash.h"
#include "util/directiontables.h"
#include "util/pointedthing.h"
#include "version.h"
+#include "drawscene.h"
+
+extern gui::IGUIEnvironment* guienv;
/*
QueuedMeshUpdate
// Write length
size_t messagesize = message.size();
- assert(messagesize <= 0xFFFF);
- writeU16(buf, (u16) (messagesize & 0xFF));
+ if (messagesize > 0xFFFF) {
+ messagesize = 0xFFFF;
+ }
+ writeU16(buf, (u16) messagesize);
os.write((char*)buf, 2);
// Write string
return 1.0; // downloader only exists when not yet done
}
-void draw_load_screen(const std::wstring &text,
- IrrlichtDevice* device, gui::IGUIFont* font,
- float dtime=0 ,int percent=0, bool clouds=true);
-
void Client::afterContentReceived(IrrlichtDevice *device, gui::IGUIFont* font)
{
infostream<<"Client::afterContentReceived() started"<<std::endl;
infostream<<"- Updating node aliases"<<std::endl;
m_nodedef->updateAliases(m_itemdef);
- // Update node textures
+ // Update node textures and assign shaders to each tile
infostream<<"- Updating node textures"<<std::endl;
- m_nodedef->updateTextures(m_tsrc);
+ m_nodedef->updateTextures(m_tsrc, m_shsrc);
// Preload item textures and meshes if configured to
if(g_settings->getBool("preload_item_visuals"))
{
verbosestream<<"Updating item textures and meshes"<<std::endl;
wchar_t* text = wgettext("Item textures...");
- draw_load_screen(text,device,font,0,0);
+ draw_load_screen(text, device, guienv, font, 0, 0);
std::set<std::string> names = m_itemdef->getAll();
size_t size = names.size();
size_t count = 0;
count++;
percent = count*100/size;
if (count%50 == 0) // only update every 50 item
- draw_load_screen(text,device,font,0,percent);
+ draw_load_screen(text, device, guienv, font, 0, percent);
}
delete[] text;
}