Jeck - Please review: this makes minor changes to a lot of files, and major changes to the WCache flatten() function.

* Removed all calls to Release(JQuad*).
* Updated flatten(). Prior flatten was buggy beyond belief.
* Done some extensive testing, but if this causes more trouble than it fixes, we'll have to revert. It's too close to release time.
This commit is contained in:
wagic.jeck
2009-10-27 02:46:39 +00:00
parent 538248d979
commit fb7f48f26b
17 changed files with 114 additions and 121 deletions

View File

@@ -84,18 +84,6 @@ WCachedTexture::~WCachedTexture(){
JTexture * WCachedTexture::Actual(){
return texture;
}
bool WCachedTexture::isLocked(){
if(locks != WRES_UNLOCKED)
return true;
for(vector<WTrackedQuad*>::iterator it=trackedQuads.begin();it!=trackedQuads.end();it++){
if((*it)->isLocked())
return true;
}
return false;
}
bool WCachedTexture::ReleaseQuad(JQuad* quad){
if(quad == NULL)
return false;
@@ -273,8 +261,8 @@ bool WCachedTexture::Attempt(string filename, int submode, int & error){
if(submode & TEXTURE_SUB_5551)
format = GU_PSM_5551;
if(!realname.size()){
error = CACHE_ERROR_404;
if(!realname.size()){ //realname should not be empty, even if file 404s.
error = CACHE_ERROR_BAD;
return false;
}
@@ -344,7 +332,6 @@ bool WCachedSample::Attempt(string filename, int submode, int & error){
error = CACHE_ERROR_404;
else
error = CACHE_ERROR_BAD;
return false;
}