[Fix] Switched to case insensitive check for collision layer name.

This commit is contained in:
Tamir Atias 2012-04-17 20:58:20 +03:00
parent 054e4f0c08
commit d7e4575041

View File

@ -8,6 +8,12 @@
#include "../System/Debug.h"
#include "../TMXParser/Tmx.h"
#ifdef _WIN32
#ifndef strcasecmp
#define strcasecmp stricmp
#endif
#endif
Level::Level() {
_width = 0;
_height = 0;
@ -74,7 +80,7 @@ bool Level::Load(const std::string& filename) {
for(int i = 0; i < map.GetNumLayers(); i++) {
const Tmx::Layer* tmxLayer = map.GetLayer(i);
if(!strcmp(tmxLayer->GetName().c_str(), "collision")) {
if(!strcasecmp(tmxLayer->GetName().c_str(), "collision")) {
for(int x = 0; x < _width; x++) {
for(int y = 0; y < _height; y++) {
Tmx::MapTile tile = tmxLayer->GetTile(x, y);