Erwan
- attempt at fixing some crashes in shop (related to bad usage of the cache) - Fix typo reported with Qumulox
This commit is contained in:
@@ -40034,7 +40034,7 @@ toughness=2
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=Qumulox
|
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
|
text=Affinity for artifacts (This spell costs {1} less to cast for each artifact you control.) -- Flying
|
||||||
mana={6}{U}{U}
|
mana={6}{U}{U}
|
||||||
type=Creature
|
type=Creature
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ class GameStateShop: public GameState, public JGuiListener
|
|||||||
WSrcCards * srcCards;
|
WSrcCards * srcCards;
|
||||||
JTexture * altThumb[8];
|
JTexture * altThumb[8];
|
||||||
JQuad * mBack;
|
JQuad * mBack;
|
||||||
JQuad * mBg;
|
|
||||||
JTexture * mBgTex;
|
|
||||||
TaskList * taskList;
|
TaskList * taskList;
|
||||||
float mElapsed;
|
float mElapsed;
|
||||||
WGuiMenu * shopMenu;
|
WGuiMenu * shopMenu;
|
||||||
|
|||||||
@@ -31,8 +31,6 @@ GameStateShop::GameStateShop(GameApp* parent): GameState(parent) {
|
|||||||
altThumb[i] = NULL;
|
altThumb[i] = NULL;
|
||||||
mBack = NULL;
|
mBack = NULL;
|
||||||
boosterDisplay = NULL;
|
boosterDisplay = NULL;
|
||||||
mBg = NULL;
|
|
||||||
mBgTex = NULL;
|
|
||||||
taskList = NULL;
|
taskList = NULL;
|
||||||
srcCards = NULL;
|
srcCards = NULL;
|
||||||
shopMenu = NULL;
|
shopMenu = NULL;
|
||||||
@@ -114,12 +112,6 @@ void GameStateShop::Start(){
|
|||||||
|
|
||||||
|
|
||||||
mBack = resources.GetQuad("back");
|
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);
|
JRenderer::GetInstance()->EnableVSync(true);
|
||||||
|
|
||||||
@@ -359,9 +351,6 @@ void GameStateShop::End()
|
|||||||
{
|
{
|
||||||
save();
|
save();
|
||||||
JRenderer::GetInstance()->EnableVSync(false);
|
JRenderer::GetInstance()->EnableVSync(false);
|
||||||
resources.Release(mBgTex);
|
|
||||||
mBgTex = NULL;
|
|
||||||
mBg = NULL;
|
|
||||||
mElapsed = 0;
|
mElapsed = 0;
|
||||||
SAFE_DELETE(shopMenu);
|
SAFE_DELETE(shopMenu);
|
||||||
SAFE_DELETE(bigDisplay);
|
SAFE_DELETE(bigDisplay);
|
||||||
@@ -567,6 +556,7 @@ void GameStateShop::Render()
|
|||||||
if(mStage == STAGE_FADE_IN)
|
if(mStage == STAGE_FADE_IN)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
JQuad * mBg = resources.RetrieveTempQuad("shop.jpg",TEXTURE_SUB_5551);
|
||||||
if (mBg)
|
if (mBg)
|
||||||
r->RenderQuad(mBg,0,0);
|
r->RenderQuad(mBg,0,0);
|
||||||
|
|
||||||
|
|||||||
@@ -359,7 +359,7 @@ void TaskList::Start(){
|
|||||||
mElapsed = 0;
|
mElapsed = 0;
|
||||||
mState = TASKS_IN;
|
mState = TASKS_IN;
|
||||||
if(!mBgTex){
|
if(!mBgTex){
|
||||||
mBgTex = resources.RetrieveTexture("taskboard.png");
|
mBgTex = resources.RetrieveTexture("taskboard.png", RETRIEVE_LOCK);
|
||||||
float unitH = mBgTex->mHeight / 4;
|
float unitH = mBgTex->mHeight / 4;
|
||||||
float unitW = mBgTex->mWidth / 4;
|
float unitW = mBgTex->mWidth / 4;
|
||||||
if(unitH == 0 || unitW == 0) return;
|
if(unitH == 0 || unitW == 0) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user