* Change the name of debug.h into config.h and use the new RESPATH define.
This commit is contained in:
jean.chalard
2008-12-25 16:28:03 +00:00
parent 161da1d3cb
commit 3e9ff2b580
61 changed files with 191 additions and 178 deletions

View File

@@ -1,4 +1,4 @@
#include "../include/debug.h"
#include "../include/config.h"
#include "../include/TexturesCache.h"
TexturesCache::TexturesCache(){
@@ -27,8 +27,7 @@ int TexturesCache::isInCache(MTGCard * card, int type){
}
int TexturesCache::getCacheById(int id, int type){
int i;
for (i=0; i<nb_textures;i++){
for (int i=0; i<nb_textures;i++){
if (cache[i]->type == type && cache[i]->getId() == id){
return i;
}
@@ -68,7 +67,7 @@ int TexturesCache::cleanup(){
JQuad * TexturesCache::getQuad(MTGCard * card, int type){
int cache_id = getCacheById(card->getId(), type);
if (cache_id == -1){
fprintf(stderr, "not found %d\n", card->getId());
fprintf(stderr, "not found %d %i\n", card->getId(), type);
//Not found in the cache, we have to load the file and put it in the cache
if (cleanup()){
cache_id = nb_textures;