Began bringing the client into line with the server's changes

Several parts of the client already built correctly.

Updated LobbyMenu, it not builds.
This commit is contained in:
Kayne Ruse
2014-06-10 02:42:07 +10:00
parent a07e7418a6
commit ee79231de0
7 changed files with 72 additions and 51 deletions
+20
View File
@@ -64,6 +64,11 @@ Region* RegionPager::FindRegion(int x, int y) {
}
Region* RegionPager::LoadRegion(int x, int y) {
//only work if using lua
if (!luaState) {
throw(std::runtime_error("RegionPager::luaState is null"));
}
//load the region if possible
//snap the coords
@@ -97,6 +102,11 @@ Region* RegionPager::LoadRegion(int x, int y) {
}
Region* RegionPager::SaveRegion(int x, int y) {
//only work if using lua
if (!luaState) {
throw(std::runtime_error("RegionPager::luaState is null"));
}
//snap the coords
x = snapToBase(REGION_WIDTH, x);
y = snapToBase(REGION_HEIGHT, y);
@@ -118,6 +128,11 @@ Region* RegionPager::SaveRegion(int x, int y) {
}
Region* RegionPager::CreateRegion(int x, int y) {
//only work if using lua
if (!luaState) {
throw(std::runtime_error("RegionPager::luaState is null"));
}
//snap the coords
x = snapToBase(REGION_WIDTH, x);
y = snapToBase(REGION_HEIGHT, y);
@@ -143,6 +158,11 @@ Region* RegionPager::CreateRegion(int x, int y) {
}
void RegionPager::UnloadRegion(int x, int y) {
//only work if using lua
if (!luaState) {
throw(std::runtime_error("RegionPager::luaState is null"));
}
//snap the coords
x = snapToBase(REGION_WIDTH, x);
y = snapToBase(REGION_HEIGHT, y);