@@ -228,10 +228,11 @@ void GameApp::Create()
|
||||
LOG("--Loading various textures");
|
||||
// Load in this function only textures that are used frequently throughout the game. These textures will constantly stay in Ram, so be frugal
|
||||
WResourceManager::Instance()->RetrieveTexture("phasebar.png", RETRIEVE_MANAGE);
|
||||
WResourceManager::Instance()->RetrieveTexture("wood.png", RETRIEVE_MANAGE);
|
||||
WResourceManager::Instance()->RetrieveTexture("gold.png", RETRIEVE_MANAGE);
|
||||
WResourceManager::Instance()->RetrieveTexture("goldglow.png", RETRIEVE_MANAGE);
|
||||
//WResourceManager::Instance()->RetrieveTexture("wood.png", RETRIEVE_MANAGE);
|
||||
//WResourceManager::Instance()->RetrieveTexture("gold.png", RETRIEVE_MANAGE);
|
||||
//WResourceManager::Instance()->RetrieveTexture("goldglow.png", RETRIEVE_MANAGE);
|
||||
WResourceManager::Instance()->RetrieveTexture("backdrop.jpg", RETRIEVE_MANAGE);
|
||||
WResourceManager::Instance()->RetrieveTexture("backdropframe.png", RETRIEVE_MANAGE);
|
||||
WResourceManager::Instance()->RetrieveTexture("handback.png", RETRIEVE_MANAGE);
|
||||
WResourceManager::Instance()->RetrieveTexture("shadows.png", RETRIEVE_MANAGE);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include "Rules.h"
|
||||
|
||||
const std::string kBackdropFile = "backdrop.jpg";
|
||||
const std::string kBackdropFrameFile = "backdropframe.png";
|
||||
|
||||
GuiBackground::GuiBackground(GameObserver* observer)
|
||||
: GuiLayer(observer)
|
||||
@@ -20,6 +21,7 @@ void GuiBackground::Render()
|
||||
{
|
||||
JRenderer* renderer = JRenderer::GetInstance();
|
||||
JQuadPtr quad;
|
||||
JQuadPtr quadframe = WResourceManager::Instance()->RetrieveTempQuad(kBackdropFrameFile);
|
||||
if (observer && observer->mRules && observer->mRules->bg.size())
|
||||
{
|
||||
quad = WResourceManager::Instance()->RetrieveTempQuad(observer->mRules->bg);
|
||||
@@ -30,8 +32,10 @@ void GuiBackground::Render()
|
||||
}
|
||||
if (quad.get())
|
||||
{
|
||||
quad->mWidth = 480.f;
|
||||
quad->mHeight = 272.f;
|
||||
renderer->RenderQuad(quad.get(), 0, 0);
|
||||
renderer->RenderQuad(quad.get(), 0, 0, 0, SCREEN_WIDTH_F / quad->mWidth, SCREEN_HEIGHT_F / quad->mHeight);
|
||||
}
|
||||
if (quadframe.get())
|
||||
{
|
||||
renderer->RenderQuad(quadframe.get(), 0, 0, 0, SCREEN_WIDTH_F / quadframe->mWidth, SCREEN_HEIGHT_F / quadframe->mHeight);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,6 +95,7 @@ bool GuiPhaseBar::Leaving(JButton)
|
||||
void GuiPhaseBar::Render()
|
||||
{
|
||||
JQuadPtr quad = WResourceManager::Instance()->GetQuad("phasebar");
|
||||
JQuadPtr phaseinfo = WResourceManager::Instance()->RetrieveTempQuad("phaseinfo.png"); //new phaseinfo graphics
|
||||
//uncomment to draw a hideous line across hires screens.
|
||||
// JRenderer::GetInstance()->DrawLine(0, CENTER, SCREEN_WIDTH, CENTER, ARGB(255, 255, 255, 255));
|
||||
|
||||
@@ -148,6 +149,13 @@ void GuiPhaseBar::Render()
|
||||
string phaseNameToTranslate = observer->phaseRing->phaseName(displayedPhaseId%kPhases + 1);
|
||||
phaseNameToTranslate = _(phaseNameToTranslate);
|
||||
sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str());
|
||||
if(phaseinfo.get())
|
||||
{
|
||||
phaseinfo->SetHotSpot(phaseinfo->mWidth - 1.f,0);
|
||||
phaseinfo->mWidth = font->GetStringWidth(buf)+12.f;
|
||||
phaseinfo->mHeight = font->GetHeight()+5.f;
|
||||
JRenderer::GetInstance()->RenderQuad(phaseinfo.get(),SCREEN_WIDTH_F,0,0);
|
||||
}
|
||||
font->DrawString(buf, SCREEN_WIDTH - 5, 2, JGETEXT_RIGHT);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,12 +34,17 @@ SimplePopup::SimplePopup(int id, JGuiListener* listener, const int fontId, const
|
||||
void SimplePopup::Render()
|
||||
{
|
||||
mClosed = false;
|
||||
float modX = (SCREEN_WIDTH_F / 2)-5;
|
||||
JQuadPtr statsholder = WResourceManager::Instance()->RetrieveTempQuad("statsholder.png");//new graphics statsholder
|
||||
|
||||
JRenderer *r = JRenderer::GetInstance();
|
||||
string detailedInformation = getDetailedInformation(mDeckInformation->getFilename());
|
||||
|
||||
const float textHeight = mTextFont->GetHeight() * mMaxLines;
|
||||
r->FillRoundRect(mX, mY + 2, mWidth + 11, textHeight - 12, 2.0f, ARGB( 255, 0, 0, 0 ) );
|
||||
//const float textHeight = mTextFont->GetHeight() * mMaxLines;
|
||||
//r->FillRect(0,0,SCREEN_WIDTH_F,SCREEN_HEIGHT_F,ARGB(220,15,15,15));
|
||||
if(statsholder.get())
|
||||
r->RenderQuad(statsholder.get(),0,0,0,SCREEN_WIDTH_F/statsholder->mWidth,SCREEN_HEIGHT_F/statsholder->mHeight);
|
||||
r->FillRoundRect(mX+modX+3, mY + 7, 190.f, 148.f, 0, ARGB( 240, 15, 15, 15 ) );
|
||||
|
||||
// currently causes a crash on the PSP when drawing the corners.
|
||||
// TODO: clean up the image ot make it loook cleaner. Find solution to load gfx to not crash PSP
|
||||
@@ -47,7 +52,7 @@ void SimplePopup::Render()
|
||||
r->DrawRoundRect(mX, mY + 2, mWidth + 11, textHeight - 12, 2.0f, ARGB( 255, 125, 255, 0) );
|
||||
drawBoundingBox( mX-3, mY, mWidth + 3, textHeight );
|
||||
#endif
|
||||
mTextFont->DrawString(detailedInformation.c_str(), mX + 9 , mY + 10);
|
||||
mTextFont->DrawString(detailedInformation.c_str(), modX+mX + 9 , mY + 15);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user