Jeck - Minor fixes to cache: Splash.jpg releases properly, pspicons no longer use the same quad.
This commit is contained in:
@@ -102,8 +102,10 @@ void GameStateDeckViewer::Start()
|
|||||||
//Grab a texture in VRAM.
|
//Grab a texture in VRAM.
|
||||||
pspIconsTexture = resources.RetrieveTexture("iconspsp.png",RETRIEVE_VRAM);
|
pspIconsTexture = resources.RetrieveTexture("iconspsp.png",RETRIEVE_VRAM);
|
||||||
|
|
||||||
|
char buf[512];
|
||||||
for (int i=0; i < 8; i++){
|
for (int i=0; i < 8; i++){
|
||||||
pspIcons[i] = resources.RetrieveQuad("iconspsp.png", i*32, 0, 32, 32);
|
sprintf(buf,"iconspsp%d",i);
|
||||||
|
pspIcons[i] = resources.RetrieveQuad("iconspsp.png", i*32, 0, 32, 32,buf);
|
||||||
pspIcons[i]->SetHotSpot(16,16);
|
pspIcons[i]->SetHotSpot(16,16);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +158,7 @@ void GameStateDeckViewer::End()
|
|||||||
|
|
||||||
resources.Release(pspIconsTexture);
|
resources.Release(pspIconsTexture);
|
||||||
for (int i=0; i < 8; i++){
|
for (int i=0; i < 8; i++){
|
||||||
pspIcons[i] = NULL; //The quads these point to are released with the texture.
|
resources.Release(pspIcons[i]);
|
||||||
}
|
}
|
||||||
SAFE_DELETE(myCollection);
|
SAFE_DELETE(myCollection);
|
||||||
SAFE_DELETE(myDeck);
|
SAFE_DELETE(myDeck);
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ void GameStateMenu::Render()
|
|||||||
renderer->ClearScreen(ARGB(0,0,0,0));
|
renderer->ClearScreen(ARGB(0,0,0,0));
|
||||||
JLBFont * mFont = resources.GetJLBFont(Constants::MENU_FONT);
|
JLBFont * mFont = resources.GetJLBFont(Constants::MENU_FONT);
|
||||||
if ((currentState & MENU_STATE_MAJOR) == MENU_STATE_MAJOR_LOADING_CARDS){
|
if ((currentState & MENU_STATE_MAJOR) == MENU_STATE_MAJOR_LOADING_CARDS){
|
||||||
JQuad* splashQuad = resources.RetrieveQuad("splash.jpg");
|
JQuad* splashQuad = resources.RetrieveTempQuad("splash.jpg");
|
||||||
if (splashQuad){
|
if (splashQuad){
|
||||||
renderer->RenderQuad(splashQuad,0,0);
|
renderer->RenderQuad(splashQuad,0,0);
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
Reference in New Issue
Block a user