gets used\r
- That is >500 vertices\r
\r
-TODO: Better dungeons\r
-TODO: Cliffs, arcs\r
-\r
TODO: Startup and configuration menu\r
\r
TODO: There are some lighting-related todos and fixmes in\r
TODO: Get rid of GotSplitPacketException\r
\r
TODO: Check what goes wrong with caching map to disk (Kray)\r
+ - Nothing?\r
\r
Block object server side:\r
- A "near blocks" buffer, in which some nearby blocks are stored.\r
TODO: Draw big amounts of torches better (that is, throw them in the\r
same meshbuffer (can the meshcollector class be used?))\r
\r
-TODO: Check if the usage of Client::isFetchingBlocks() in\r
- updateViewingRange() actually does something\r
- NOTE: It isn't used anymore after the rewrite.\r
-\r
TODO: Make an option to the server to disable building and digging near\r
the starting position\r
\r
\r
TODO: When player dies, throw items on map\r
\r
+TODO: Use porting::path_userdata for configuration file\r
+\r
TODO: Optimize day/night mesh updating somehow\r
- create copies of all textures for all lighting values and only\r
change texture for material?\r
meshbuffers? It should go quite fast.\r
\r
TODO: Map generator version 2\r
+ - Create surface areas based on central points; a given point's\r
+ area type is given by the nearest central point\r
+ - Separate points for heightmap, caves, plants and minerals?\r
+ - Flat land, mountains, forest, jungle\r
+ - Cliffs, arcs\r
+\r
+TODO: Add gui option to remove map\r
\r
Doing now:\r
======================================================================\r
*/\r
#define FIELD_OF_VIEW_TEST 0\r
\r
-#ifdef UNITTEST_DISABLE\r
+#ifdef NDEBUG\r
#ifdef _WIN32\r
#pragma message ("Disabling unit tests")\r
#else\r
#include "guiTextInputMenu.h"\r
#include "materials.h"\r
#include "guiMessageMenu.h"\r
+#include "filesys.h"\r
+#include "config.h"\r
\r
IrrlichtWrapper *g_irrlicht;\r
\r
debug_stacks_init();\r
\r
DSTACK(__FUNCTION_NAME);\r
- \r
+\r
+ porting::initializePaths();\r
+ // Create user data directory\r
+ fs::CreateDir(porting::path_userdata);\r
+\r
initializeMaterialProperties();\r
\r
BEGIN_DEBUG_EXCEPTION_HANDLER\r
\r
+ // Print startup message\r
+ dstream<<DTIME<<"minetest-c55"\r
+ " with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST\r
+ <<", "<<BUILD_INFO\r
+ <<std::endl;\r
+ \r
try\r
{\r
\r
allowed_options.insert("random-input", ValueSpec(VALUETYPE_FLAG));\r
allowed_options.insert("disable-unittests", ValueSpec(VALUETYPE_FLAG));\r
allowed_options.insert("enable-unittests", ValueSpec(VALUETYPE_FLAG));\r
+ allowed_options.insert("map-dir", ValueSpec(VALUETYPE_STRING));\r
\r
Settings cmd_args;\r
\r
// Initialize default settings\r
set_default_settings();\r
\r
- // Print startup message\r
- dstream<<DTIME<<"minetest-c55"\r
- " with SER_FMT_VER_HIGHEST="<<(int)SER_FMT_VER_HIGHEST\r
- <<", ENABLE_TESTS="<<ENABLE_TESTS\r
- <<std::endl;\r
- \r
// Set locale. This is for forcing '.' as the decimal point.\r
std::locale::global(std::locale("C"));\r
// This enables printing all characters in bitmap font\r
}\r
else\r
{\r
- const char *filenames[2] =\r
- {\r
- "../minetest.conf",\r
- "../../minetest.conf"\r
- };\r
+ core::array<std::string> filenames;\r
+ filenames.push_back(porting::path_userdata + "/minetest.conf");\r
+#ifdef RUN_IN_PLACE\r
+ filenames.push_back(porting::path_userdata + "/../minetest.conf");\r
+#endif\r
\r
- for(u32 i=0; i<2; i++)\r
+ for(u32 i=0; i<filenames.size(); i++)\r
{\r
- bool r = g_settings.readConfigFile(filenames[i]);\r
+ bool r = g_settings.readConfigFile(filenames[i].c_str());\r
if(r)\r
{\r
configpath = filenames[i];\r
std::cout<<"-> "<<port<<std::endl;\r
}\r
\r
+ //Map directory\r
+ std::string map_dir = porting::path_userdata+"/map";\r
+ if(cmd_args.exists("map-dir"))\r
+ map_dir = cmd_args.get("map-dir");\r
+ else if(g_settings.exists("map-dir"))\r
+ map_dir = g_settings.get("map-dir");\r
+ \r
if(cmd_args.getFlag("server"))\r
{\r
DSTACK("Dedicated server branch");\r
std::cout<<"========================"<<std::endl;\r
std::cout<<std::endl;\r
\r
- Server server("../map", hm_params, map_params);\r
+ Server server(map_dir, hm_params, map_params);\r
server.start(port);\r
\r
for(;;)\r
\r
guienv = device->getGUIEnvironment();\r
gui::IGUISkin* skin = guienv->getSkin();\r
- gui::IGUIFont* font = guienv->getFont("../data/fontlucida.png");\r
+ gui::IGUIFont* font = guienv->getFont(porting::getDataPath("fontlucida.png").c_str());\r
if(font)\r
skin->setFont(font);\r
\r
Preload some textures\r
*/\r
\r
+ init_content_inventory_texture_paths();\r
+ init_tile_texture_paths();\r
tile_materials_preload(g_irrlicht);\r
\r
/*\r
*/\r
SharedPtr<Server> server;\r
if(hosting){\r
- server = new Server("../map", hm_params, map_params);\r
+ server = new Server(map_dir, hm_params, map_params);\r
server->start(port);\r
}\r
\r
*/\r
/*scene::ISceneNode* skybox;\r
skybox = smgr->addSkyBoxSceneNode(\r
- driver->getTexture("../data/skybox2.png"),\r
- driver->getTexture("../data/skybox3.png"),\r
- driver->getTexture("../data/skybox1.png"),\r
- driver->getTexture("../data/skybox1.png"),\r
- driver->getTexture("../data/skybox1.png"),\r
- driver->getTexture("../data/skybox1.png"));*/\r
+ driver->getTexture(porting::getDataPath("skybox2.png").c_str()),\r
+ driver->getTexture(porting::getDataPath("skybox3.png").c_str()),\r
+ driver->getTexture(porting::getDataPath("skybox1.png").c_str()),\r
+ driver->getTexture(porting::getDataPath("skybox1.png").c_str()),\r
+ driver->getTexture(porting::getDataPath("skybox1.png").c_str()),\r
+ driver->getTexture(porting::getDataPath("skybox1.png").c_str()));*/\r
\r
/*\r
Create the camera node\r