Jeck - Extremely minor speedup for cache access in GameStateDeckViewer, minor fix to WResourceManager::cleanup().

This commit is contained in:
wagic.jeck
2009-09-11 08:17:05 +00:00
parent 421d2655ee
commit 9d203619aa
3 changed files with 12 additions and 8 deletions

View File

@@ -543,13 +543,18 @@ void GameStateDeckViewer::renderCard(int id, float rotation){
int alpha = (int) (255 * (scale + 1.0 - max_scale));
if (!card) return;
JQuad * quad = backQuad;
JQuad * quad = NULL;
int showName = 1;
if (resources.RetrieveCard(card,CACHE_CARD,RETRIEVE_EXISTING) || last_user_activity > (abs(2-id) + 1)* NO_USER_ACTIVITY_SHOWCARD_DELAY){
quad = resources.RetrieveCard(card);
showName = 0;
}
int showName = 0;
quad = resources.RetrieveCard(card,CACHE_CARD,RETRIEVE_EXISTING);
if (!quad){
if(last_user_activity > (abs(2-id) + 1)* NO_USER_ACTIVITY_SHOWCARD_DELAY)
quad = resources.RetrieveCard(card);
else{
quad = backQuad;
showName = 1;
}
}
if (quad){