Comment tweaks, build tweaks, bugfixes

I've also disabled the "screen trick". It was ugly as hell.
This commit is contained in:
2015-08-24 14:32:54 +10:00
parent 188a6805bf
commit ffe5c80117
18 changed files with 22 additions and 105 deletions
+1 -2
View File
@@ -223,8 +223,7 @@ std::list<BoundingBox> World::GenerateCollisionGrid(Entity* ptr, int tileWidth,
//inner loop
wallBounds.y = snapToBase((double)wallBounds.h, ptr->GetOrigin().y);
while(wallBounds.y < (ptr->GetOrigin() + ptr->GetBounds()).y + ptr->GetBounds().h) {
//BUG: #45 this is the culprit; it's pulling regions into existance
//check to see if this tile is solid
//check to see if this tile is solid (non-existant tiles are always false)
if (regionPager.GetSolid(wallBounds.x / wallBounds.w, wallBounds.y / wallBounds.h)) {
//push onto the box set
boxList.push_front(wallBounds);
+1 -2
View File
@@ -29,7 +29,7 @@
//static functions
//-------------------------
//TODO: proper checksum
//TODO: (3) proper checksum
static int regionChecksum(Region* const region) {
int sum = 0;
for(int i = 0; i < REGION_WIDTH; i++) {
@@ -104,7 +104,6 @@ void World::UpdateMap() {
}
else if (regionChecksum(region) == 0) {
//checksum failed
//BUG: #45 Regions occasionally lose their tile data; this patches the issue, but does not resolve it
regionPager.UnloadIf([region](Region const& ref) -> bool {
//remove the erroneous region
return region == &ref;