- renamed WResourceManager::autoResize() to ResetCacheLimits(), since the function doesn't actually resize anything. It's merely setting clamping limits on when we should purge the cache.

- fixed the debug framerate calculation / drawing code (consolidated duplicated functions & variables mDelta vs a win-only mDeltaTime, no reason to have two), repositioned it to draw on the bottom left (it was colliding with other debug text for the cache info).
 - for debug testing purposes, added a #define override to force the image cache to work with less memory (I've picked 8 megs, which is what the psp seems to use - the normal default on win/linux is 20 megs).
This commit is contained in:
wrenczes@gmail.com
2010-11-09 19:01:38 +00:00
parent c1f8e95a11
commit 3eeb8a6465
6 changed files with 39 additions and 44 deletions

View File

@@ -235,12 +235,12 @@ void GameApp::Destroy()
{
LOG("==Destroying GameApp==");
for (int i=GAME_STATE_MENU;i<=GAME_STATE_MAX-1;i++)
{
if (mGameStates[i]){
mGameStates[i]->Destroy();
SAFE_DELETE(mGameStates[i]);
}
{
if (mGameStates[i]){
mGameStates[i]->Destroy();
SAFE_DELETE(mGameStates[i]);
}
}
if (collection){
collection->destroyAllCards();
@@ -361,7 +361,7 @@ void GameApp::Render()
sprintf(buf, "avg:%.02f - %.02f fps",totalFPS/nbUpdates, fps);
if (mFont) {
mFont->SetColor(ARGB(255,255,255,255));
mFont->DrawString(buf,1,10);
mFont->DrawString(buf, 10, SCREEN_HEIGHT-15);
}
#endif