Looking for the bug

This commit is contained in:
Kayne Ruse
2015-04-27 01:33:57 +10:00
parent 2a1ee4acbf
commit 878d502b8b
10 changed files with 28 additions and 98 deletions
-13
View File
@@ -25,8 +25,6 @@
#include <cstring>
#include <stdexcept>
#include <iostream>
int snapToBase(int base, int x) {
return floor((double)x / base) * base;
}
@@ -41,17 +39,6 @@ Region::Region(int argX, int argY): x(argX), y(argY) {
Region::Region(Region const& rhs): x(rhs.x), y(rhs.y) {
memcpy(tiles, rhs.tiles, REGION_WIDTH*REGION_HEIGHT*REGION_DEPTH*sizeof(type_t));
solid = rhs.solid;
//debugging
std::cout << "Copied: (" << x << ", " << y << "): " << int(***tiles) << ", " << int(***rhs.tiles) << std::endl;
}
Region::Region(Region&& rhs): x(rhs.x), y(rhs.y) {
memcpy(tiles, rhs.tiles, REGION_WIDTH*REGION_HEIGHT*REGION_DEPTH*sizeof(type_t));
solid = rhs.solid;
//debugging
std::cout << "Moved: (" << x << ", " << y << "): " << int(***tiles) << ", " << int(***rhs.tiles) << std::endl;
}
Region::type_t Region::SetTile(int x, int y, int z, type_t v) {