diff --git a/projects/mtg/include/GameOptions.h b/projects/mtg/include/GameOptions.h index 4c856702c..fae9276ed 100644 --- a/projects/mtg/include/GameOptions.h +++ b/projects/mtg/include/GameOptions.h @@ -31,6 +31,7 @@ struct Options { static const string ACTIVE_PROFILE; static const string ACTIVE_THEME; static const string ACTIVE_MODE; + static const string HANDMODE; }; struct Metrics { diff --git a/projects/mtg/include/WCachedResource.h b/projects/mtg/include/WCachedResource.h index 6cf3e7880..c89f7308f 100644 --- a/projects/mtg/include/WCachedResource.h +++ b/projects/mtg/include/WCachedResource.h @@ -2,6 +2,12 @@ #define _WCACHEDRESOURCE_H_ #include +#if defined WIN32 || defined LINUX +#define INVALID_MTEX ((GLuint) -1) +#else +#define INVALID_MTEX -1 +#endif + class WResource{ public: friend class WResourceManager; @@ -92,4 +98,4 @@ protected: JSample * sample; }; -#endif \ No newline at end of file +#endif diff --git a/projects/mtg/src/WCachedResource.cpp b/projects/mtg/src/WCachedResource.cpp index 8519fdfc4..d0f54aeb5 100644 --- a/projects/mtg/src/WCachedResource.cpp +++ b/projects/mtg/src/WCachedResource.cpp @@ -234,7 +234,7 @@ bool WCachedTexture::Attempt(string filename, int submode, int & error){ } //Failure of a different sort. - if(texture->mTexId == -1){ + if(texture->mTexId == INVALID_MTEX){ SAFE_DELETE(texture); error = CACHE_ERROR_BAD; return false; diff --git a/projects/mtg/src/WResourceManager.cpp b/projects/mtg/src/WResourceManager.cpp index f30cb9555..198bb30b9 100644 --- a/projects/mtg/src/WResourceManager.cpp +++ b/projects/mtg/src/WResourceManager.cpp @@ -417,7 +417,7 @@ JTexture* WResourceManager::GetTexture(int id){ for(it = textureWCache.managed.begin();it!= textureWCache.managed.end(); it++){ if(it->second){ jtex = it->second->Actual(); - if(jtex->mTexId == id) + if(id == (int) jtex->mTexId) return jtex; } } @@ -1391,4 +1391,4 @@ bool WCache::Release(cacheActual* actual){ //Released! cache.erase(it); return true; -} \ No newline at end of file +}