Jeck - Signed/unsigned fix in resource manager, options save fix.
This commit is contained in:
@@ -2,6 +2,12 @@
|
|||||||
#define _WCACHEDRESOURCE_H_
|
#define _WCACHEDRESOURCE_H_
|
||||||
#include <hge/hgeparticle.h>
|
#include <hge/hgeparticle.h>
|
||||||
|
|
||||||
|
#if defined WIN32 || defined LINUX
|
||||||
|
#define INVALID_MTEX ((GLuint) -1)
|
||||||
|
#else
|
||||||
|
#define INVALID_MTEX -1
|
||||||
|
#endif
|
||||||
|
|
||||||
class WResource{
|
class WResource{
|
||||||
public:
|
public:
|
||||||
friend class WResourceManager;
|
friend class WResourceManager;
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ enum ENUM_RETRIEVE_STYLE{
|
|||||||
RETRIEVE_VRAM, //Retrieve it, and use vram if have to we create it. Must still remove it.
|
RETRIEVE_VRAM, //Retrieve it, and use vram if have to we create it. Must still remove it.
|
||||||
RETRIEVE_MANAGE, //Makes resource permanent.
|
RETRIEVE_MANAGE, //Makes resource permanent.
|
||||||
RETRIEVE_THUMB, //Retrieve it as a thumbnail.
|
RETRIEVE_THUMB, //Retrieve it as a thumbnail.
|
||||||
CACHE_THUMB = RETRIEVE_THUMB, //Backwords compatibility.
|
CACHE_THUMB = RETRIEVE_THUMB, //Backwards compatibility.
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ENUM_CACHE_SUBTYPE{
|
enum ENUM_CACHE_SUBTYPE{
|
||||||
|
|||||||
@@ -526,7 +526,6 @@ void OptionsList::save(){
|
|||||||
for (int i = 0; i < nbitems; i++){
|
for (int i = 0; i < nbitems; i++){
|
||||||
listItems[i]->setData();
|
listItems[i]->setData();
|
||||||
}
|
}
|
||||||
::options.save();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsList::Update(float dt){
|
void OptionsList::Update(float dt){
|
||||||
@@ -652,6 +651,8 @@ void OptionsMenu::save(){
|
|||||||
for(int x=0;x<MAX_OPTION_TABS;x++)
|
for(int x=0;x<MAX_OPTION_TABS;x++)
|
||||||
if(tabs[x] != NULL)
|
if(tabs[x] != NULL)
|
||||||
tabs[x]->save();
|
tabs[x]->save();
|
||||||
|
|
||||||
|
::options.save();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool OptionsMenu::isTab(string name){
|
bool OptionsMenu::isTab(string name){
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ bool WCachedTexture::Attempt(string filename, int submode, int & error){
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Failure of a different sort.
|
//Failure of a different sort.
|
||||||
if(texture->mTexId == -1){
|
if(texture->mTexId == INVALID_MTEX){
|
||||||
SAFE_DELETE(texture);
|
SAFE_DELETE(texture);
|
||||||
error = CACHE_ERROR_BAD;
|
error = CACHE_ERROR_BAD;
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ JTexture* WResourceManager::GetTexture(int id){
|
|||||||
for(it = textureWCache.managed.begin();it!= textureWCache.managed.end(); it++){
|
for(it = textureWCache.managed.begin();it!= textureWCache.managed.end(); it++){
|
||||||
if(it->second){
|
if(it->second){
|
||||||
jtex = it->second->Actual();
|
jtex = it->second->Actual();
|
||||||
if(jtex->mTexId == id)
|
if(id == (int) jtex->mTexId)
|
||||||
return jtex;
|
return jtex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user