Consolidated some loose strings into constant declarations in order to reduce allocation thrashing on temporary string constructs. I'm sure there are more, but "back_thumb", "back", and "backdrop.jpg" were the ones that showed up most in memory profiling.

This commit is contained in:
wrenczes@gmail.com
2011-04-21 22:48:22 +00:00
parent 8f51c1d1fe
commit aaa169f86c
7 changed files with 17 additions and 12 deletions
+2 -2
View File
@@ -164,12 +164,12 @@ void GameApp::Create()
LOG("--Loading back.jpg");
WResourceManager::Instance()->RetrieveTexture("back.jpg", RETRIEVE_MANAGE);
JQuadPtr jq = WResourceManager::Instance()->RetrieveQuad("back.jpg", 0, 0, 0, 0, "back", RETRIEVE_MANAGE);
JQuadPtr jq = WResourceManager::Instance()->RetrieveQuad("back.jpg", 0, 0, 0, 0, kGenericCardID, RETRIEVE_MANAGE);
if (jq.get())
jq->SetHotSpot(jq->mWidth / 2, jq->mHeight / 2);
WResourceManager::Instance()->RetrieveTexture("back_thumb.jpg", RETRIEVE_MANAGE);
WResourceManager::Instance()->RetrieveQuad("back_thumb.jpg", 0, 0, MTG_MINIIMAGE_WIDTH, MTG_MINIIMAGE_HEIGHT, "back_thumb", RETRIEVE_MANAGE);
WResourceManager::Instance()->RetrieveQuad("back_thumb.jpg", 0, 0, MTG_MINIIMAGE_WIDTH, MTG_MINIIMAGE_HEIGHT, kGenericCardThumbnailID, RETRIEVE_MANAGE);
LOG("--Loading particles.png");
WResourceManager::Instance()->RetrieveTexture("particles.png", RETRIEVE_MANAGE);