- 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

@@ -40034,7 +40034,7 @@ toughness=2
[/card]
[card]
name=Qumulox
abilities=affinityartifact,flying
abilities=affinityartifacts,flying
text=Affinity for artifacts (This spell costs {1} less to cast for each artifact you control.) -- Flying
mana={6}{U}{U}
type=Creature

View File

@@ -56,8 +56,6 @@ class GameStateShop: public GameState, public JGuiListener
WSrcCards * srcCards;
JTexture * altThumb[8];
JQuad * mBack;
JQuad * mBg;
JTexture * mBgTex;
TaskList * taskList;
float mElapsed;
WGuiMenu * shopMenu;

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);

View File

@@ -359,7 +359,7 @@ void TaskList::Start(){
mElapsed = 0;
mState = TASKS_IN;
if(!mBgTex){
mBgTex = resources.RetrieveTexture("taskboard.png");
mBgTex = resources.RetrieveTexture("taskboard.png", RETRIEVE_LOCK);
float unitH = mBgTex->mHeight / 4;
float unitW = mBgTex->mWidth / 4;
if(unitH == 0 || unitW == 0) return;