Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/MapReader.cpp
Show All 23 Lines | |||||
#include "graphics/Entity.h" | #include "graphics/Entity.h" | ||||
#include "graphics/GameView.h" | #include "graphics/GameView.h" | ||||
#include "graphics/MapGenerator.h" | #include "graphics/MapGenerator.h" | ||||
#include "graphics/Patch.h" | #include "graphics/Patch.h" | ||||
#include "graphics/Terrain.h" | #include "graphics/Terrain.h" | ||||
#include "graphics/TerrainTextureEntry.h" | #include "graphics/TerrainTextureEntry.h" | ||||
#include "graphics/TerrainTextureManager.h" | #include "graphics/TerrainTextureManager.h" | ||||
#include "lib/timer.h" | #include "lib/timer.h" | ||||
#include "lib/external_libraries/libsdl.h" | |||||
#include "maths/MathUtil.h" | #include "maths/MathUtil.h" | ||||
#include "ps/CLogger.h" | #include "ps/CLogger.h" | ||||
#include "ps/Loader.h" | #include "ps/Loader.h" | ||||
#include "ps/LoaderThunks.h" | #include "ps/LoaderThunks.h" | ||||
#include "ps/World.h" | #include "ps/World.h" | ||||
#include "ps/XML/Xeromyces.h" | #include "ps/XML/Xeromyces.h" | ||||
#include "renderer/PostprocManager.h" | #include "renderer/PostprocManager.h" | ||||
#include "renderer/SkyManager.h" | #include "renderer/SkyManager.h" | ||||
▲ Show 20 Lines • Show All 1,267 Lines • ▼ Show 20 Lines | if (data.isUndefined()) | ||||
// RMS failed - return to main menu | // RMS failed - return to main menu | ||||
throw PSERROR_Game_World_MapLoadFailed("Error generating random map.\nCheck application log for details."); | throw PSERROR_Game_World_MapLoadFailed("Error generating random map.\nCheck application log for details."); | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
m_MapData.init(rq.cx, data); | m_MapData.init(rq.cx, data); | ||||
} | } | ||||
} | } | ||||
else | |||||
{ | |||||
// Still working | |||||
// Sleep for a while, slowing down the rendering thread | |||||
// to allow more CPU for the map generator thread | |||||
SDL_Delay(100); | |||||
} | |||||
// return progress | // return progress | ||||
return progress; | return progress; | ||||
}; | }; | ||||
int CMapReader::ParseTerrain() | int CMapReader::ParseTerrain() | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 277 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator