\r
SUGG: Precalculate lighting translation table at runtime (at startup)\r
- This is not doable because it is currently hand-made and not\r
- based on some mathematical function. Now it is not.\r
+ based on some mathematical function.\r
+ - Note: This has been changing lately\r
\r
SUGG: A version number to blocks, which increments when the block is\r
modified (node add/remove, water update, lighting update)\r
\r
SUGG: Meshes of blocks could be split into 6 meshes facing into\r
different directions and then only those drawn that need to be\r
- - Also an 1-dimensional tile map would be nice probably\r
\r
SUGG: Calculate lighting per vertex to get a lighting effect like in\r
bartwe's game\r
* not done\r
\r
=== Stuff to do before release\r
-* Save the new mapgen stuff\r
- - map/meta.txt, which should contain only plain text, something like this:\r
- seed = 7ff1bafcd7118800\r
- chunksize = 8\r
- - map/chunks.dat: chunk positions and flags in binary format\r
* Make server find the spawning place from the real map data, not from\r
the heightmap\r
- But the changing borders of chunk have to be avoided, because\r
* Check the fixmes in the list above\r
\r
=== Making it more portable\r
-* MinGW: Switch away from swprintf; mingw has a bad version of it.\r
- Use snprintf + narrow_to_wide or (w)ostringstream\r
* Some MSVC: std::sto* are defined without a namespace and collide\r
with the ones in utility.h\r
+* On Kray's machine, the new find_library(XXF86VM_LIBRARY, Xxf86vm)\r
+ line doesn't find the library.\r
\r
=== Stuff to do after release\r
* Make an "environment metafile" to store at least time of day\r
{\r
m_images[i]->setImage(NULL);\r
\r
- wchar_t t[10];\r
if(m_selection == j)\r
- swprintf(t, 10, L"<-");\r
+ m_texts[i]->setText(L"<-");\r
else\r
- swprintf(t, 10, L"");\r
- m_texts[i]->setText(t);\r
+ m_texts[i]->setText(L"");\r
\r
// The next ifs will segfault with a NULL pointer\r
continue;\r
\r
m_images[i]->setImage(item->getImage());\r
\r
- wchar_t t[10];\r
+ std::ostringstream os;\r
+ os<<item->getText();\r
+ if(m_selection == j)\r
+ os<<" <-";\r
+ m_texts[i]->setText(narrow_to_wide(os.str()).c_str());\r
+\r
+ /*wchar_t t[10];\r
if(m_selection == j)\r
swprintf(t, 10, SWPRINTF_CHARSTRING L" <-", item->getText().c_str());\r
else\r
swprintf(t, 10, SWPRINTF_CHARSTRING, item->getText().c_str());\r
- m_texts[i]->setText(t);\r
+ m_texts[i]->setText(t);*/\r
}\r
}\r
\r
//TimeTaker guiupdatetimer("Gui updating");\r
\r
{\r
- wchar_t temptext[150];\r
-\r
static float drawtime_avg = 0;\r
drawtime_avg = drawtime_avg * 0.95 + (float)drawtime*0.05;\r
static float beginscenetime_avg = 0;\r
static float endscenetime_avg = 0;\r
endscenetime_avg = endscenetime_avg * 0.95 + (float)endscenetime*0.05;\r
\r
- swprintf(temptext, 150, L"Minetest-c55 ("\r
- L"F: item=%i"\r
- L", R: range_all=%i"\r
- L")"\r
- L" drawtime=%.0f, beginscenetime=%.0f, scenetime=%.0f, endscenetime=%.0f",\r
+ char temptext[300];\r
+ snprintf(temptext, 300, "Minetest-c55 ("\r
+ "F: item=%i"\r
+ ", R: range_all=%i"\r
+ ")"\r
+ " drawtime=%.0f, beginscenetime=%.0f"\r
+ ", scenetime=%.0f, endscenetime=%.0f",\r
g_selected_item,\r
draw_control.range_all,\r
drawtime_avg,\r
endscenetime_avg\r
);\r
\r
- guitext->setText(temptext);\r
+ guitext->setText(narrow_to_wide(temptext).c_str());\r
}\r
\r
{\r
- wchar_t temptext[150];\r
- swprintf(temptext, 150,\r
- L"(% .1f, % .1f, % .1f)"\r
- L" (% .3f < btime_jitter < % .3f"\r
- L", dtime_jitter = % .1f %%"\r
- L", v_range = %.1f)",\r
+ char temptext[300];\r
+ snprintf(temptext, 300,\r
+ "(% .1f, % .1f, % .1f)"\r
+ " (% .3f < btime_jitter < % .3f"\r
+ ", dtime_jitter = % .1f %%"\r
+ ", v_range = %.1f)",\r
player_position.X/BS,\r
player_position.Y/BS,\r
player_position.Z/BS,\r
draw_control.wanted_range\r
);\r
\r
- guitext2->setText(temptext);\r
+ guitext2->setText(narrow_to_wide(temptext).c_str());\r
}\r
\r
{\r