Refactored the map system (read more)
The region's width, height and depth are all defined by preprocessor macros. The rest of the map system has been updated to match. The programs proper need to be updated as well. It would be a good idea to include the macros' values as part of the initial communication protocols, so that the clients don't connect to a server that is using the wrong sized regions.
This commit is contained in:
@@ -23,33 +23,19 @@
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
void DummyFormat::Load(Region** const ptr, int width, int height, int depth, int x, int y) {
|
||||
void DummyFormat::Load(Region** const ptr, int x, int y) {
|
||||
//EMPTY
|
||||
}
|
||||
|
||||
void DummyFormat::Save(Region* const ptr) {
|
||||
//EMPTY
|
||||
}
|
||||
/*
|
||||
void VerboseFormat::Load(Region** const ptr, int x, int y) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void VerboseFormat::Save(Region* const ptr) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void CompactFormat::Load(Region** const ptr, int x, int y) {
|
||||
//TODO
|
||||
}
|
||||
|
||||
void CompactFormat::Save(Region* const ptr) {
|
||||
//TODO
|
||||
}
|
||||
*/
|
||||
void LuaFormat::Load(Region** const ptr, int width, int height, int depth, int x, int y) {
|
||||
void LuaFormat::Load(Region** const ptr, int x, int y) {
|
||||
//something to load into
|
||||
(*ptr) = new Region(width, height, depth, x, y);
|
||||
if (!ptr) {
|
||||
(*ptr) = new Region(x, y);
|
||||
}
|
||||
|
||||
//API hook
|
||||
lua_getglobal(state, "Region");
|
||||
|
||||
Reference in New Issue
Block a user