- attempt at fixing some crashes in shop (related to bad usage of the cache)
- Fix typo reported with Qumulox
This commit is contained in:
wagic.the.homebrew@gmail.com
2010-10-03 07:36:01 +00:00
parent 33d8ad5e9b
commit c3c5d893d1
4 changed files with 3 additions and 15 deletions

View File

@@ -31,8 +31,6 @@ GameStateShop::GameStateShop(GameApp* parent): GameState(parent) {
altThumb[i] = NULL;
mBack = NULL;
boosterDisplay = NULL;
mBg = NULL;
mBgTex = NULL;
taskList = NULL;
srcCards = NULL;
shopMenu = NULL;
@@ -114,12 +112,6 @@ void GameStateShop::Start(){
mBack = resources.GetQuad("back");
resources.Unmiss("shop.jpg"); //Last resort.
mBgTex = resources.RetrieveTexture("shop.jpg", RETRIEVE_LOCK, TEXTURE_SUB_5551);
if(mBgTex)
mBg = resources.RetrieveQuad("shop.jpg");
else
mBg = NULL;
JRenderer::GetInstance()->EnableVSync(true);
@@ -359,9 +351,6 @@ void GameStateShop::End()
{
save();
JRenderer::GetInstance()->EnableVSync(false);
resources.Release(mBgTex);
mBgTex = NULL;
mBg = NULL;
mElapsed = 0;
SAFE_DELETE(shopMenu);
SAFE_DELETE(bigDisplay);
@@ -567,6 +556,7 @@ void GameStateShop::Render()
if(mStage == STAGE_FADE_IN)
return;
JQuad * mBg = resources.RetrieveTempQuad("shop.jpg",TEXTURE_SUB_5551);
if (mBg)
r->RenderQuad(mBg,0,0);