Merge pull request #761 from kevlahnota/master
phaseinfo & backdropframe & backdrop
This commit is contained in:
@@ -18,6 +18,7 @@ public class DeckImporter
|
|||||||
String deck = "";
|
String deck = "";
|
||||||
String deckname = "";
|
String deckname = "";
|
||||||
String prefix = "#SB:";
|
String prefix = "#SB:";
|
||||||
|
int cardcount = 0;
|
||||||
if(f.exists() && !f.isDirectory())
|
if(f.exists() && !f.isDirectory())
|
||||||
{
|
{
|
||||||
deckname = f.getName();
|
deckname = f.getName();
|
||||||
@@ -36,7 +37,7 @@ public class DeckImporter
|
|||||||
{
|
{
|
||||||
String line = scanner.nextLine();
|
String line = scanner.nextLine();
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
if (!line.equals("")) // don't write out blank lines
|
if (!line.equals("") && cardcount < 61) // don't write out blank lines
|
||||||
{
|
{
|
||||||
String[] slines = line.split("\\s+");
|
String[] slines = line.split("\\s+");
|
||||||
String arranged = "";
|
String arranged = "";
|
||||||
@@ -56,6 +57,7 @@ public class DeckImporter
|
|||||||
{
|
{
|
||||||
deck += arranged + "(*) * " + slines[0] + "\n";
|
deck += arranged + "(*) * " + slines[0] + "\n";
|
||||||
}
|
}
|
||||||
|
cardcount += Integer.parseInt(slines[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -90,7 +92,7 @@ public class DeckImporter
|
|||||||
fop.write(contentInBytes);
|
fop.write(contentInBytes);
|
||||||
fop.flush();
|
fop.flush();
|
||||||
fop.close();
|
fop.close();
|
||||||
message = "Import Deck Success!\n\n"+deck;
|
message = "Import Deck Success!\n"+cardcount+" total cards in this deck\n\n"+deck;
|
||||||
}
|
}
|
||||||
catch (IOException e)
|
catch (IOException e)
|
||||||
{
|
{
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 143 KiB After Width: | Height: | Size: 151 KiB |
BIN
projects/mtg/bin/Res/graphics/backdropframe.png
Normal file
BIN
projects/mtg/bin/Res/graphics/backdropframe.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 233 KiB |
BIN
projects/mtg/bin/Res/graphics/phaseinfo.png
Normal file
BIN
projects/mtg/bin/Res/graphics/phaseinfo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
@@ -113237,7 +113237,7 @@ type=Sorcery
|
|||||||
[/card]
|
[/card]
|
||||||
[card]
|
[card]
|
||||||
name=To Arms!
|
name=To Arms!
|
||||||
auto=lord(creature|myBattlefield) untap
|
auto=all(creature|myBattlefield) untap
|
||||||
auto=draw:1
|
auto=draw:1
|
||||||
text=Untap all creatures you control. -- Draw a card.
|
text=Untap all creatures you control. -- Draw a card.
|
||||||
mana={1}{W}
|
mana={1}{W}
|
||||||
|
|||||||
@@ -10,7 +10,11 @@
|
|||||||
#include "JLogger.h"
|
#include "JLogger.h"
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#define HUGE_CACHE_LIMIT 28000000 // Size of the cache for Windows and Linux (in bytes) - old value is 20mb increased to 28mb
|
#ifdef PSP
|
||||||
|
#define HUGE_CACHE_LIMIT 28000000 // Size of the cache for PSP (in bytes) - old value is 20mb increased to 28mb
|
||||||
|
#else
|
||||||
|
#define HUGE_CACHE_LIMIT 60000000 // Size of the cache for Windows and Linux (in bytes) - old value is 20mb increased to 60mb
|
||||||
|
#endif
|
||||||
#define SAMPLES_CACHE_SIZE 1500000 // Size in bytes of the cached samples
|
#define SAMPLES_CACHE_SIZE 1500000 // Size in bytes of the cached samples
|
||||||
#define PSI_CACHE_SIZE 500000 // Size in bytes of the cached particles
|
#define PSI_CACHE_SIZE 500000 // Size in bytes of the cached particles
|
||||||
#define TEXTURES_CACHE_MINSIZE 2000000 // Minimum size of the cache on the PSP. The program should complain if the cache ever gets smaller than this
|
#define TEXTURES_CACHE_MINSIZE 2000000 // Minimum size of the cache on the PSP. The program should complain if the cache ever gets smaller than this
|
||||||
|
|||||||
@@ -228,10 +228,11 @@ void GameApp::Create()
|
|||||||
LOG("--Loading various textures");
|
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
|
// 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("phasebar.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("wood.png", RETRIEVE_MANAGE);
|
//WResourceManager::Instance()->RetrieveTexture("wood.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("gold.png", RETRIEVE_MANAGE);
|
//WResourceManager::Instance()->RetrieveTexture("gold.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("goldglow.png", RETRIEVE_MANAGE);
|
//WResourceManager::Instance()->RetrieveTexture("goldglow.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("backdrop.jpg", 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("handback.png", RETRIEVE_MANAGE);
|
||||||
WResourceManager::Instance()->RetrieveTexture("shadows.png", RETRIEVE_MANAGE);
|
WResourceManager::Instance()->RetrieveTexture("shadows.png", RETRIEVE_MANAGE);
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
#include "Rules.h"
|
#include "Rules.h"
|
||||||
|
|
||||||
const std::string kBackdropFile = "backdrop.jpg";
|
const std::string kBackdropFile = "backdrop.jpg";
|
||||||
|
const std::string kBackdropFrameFile = "backdropframe.png";
|
||||||
|
|
||||||
GuiBackground::GuiBackground(GameObserver* observer)
|
GuiBackground::GuiBackground(GameObserver* observer)
|
||||||
: GuiLayer(observer)
|
: GuiLayer(observer)
|
||||||
@@ -20,6 +21,7 @@ void GuiBackground::Render()
|
|||||||
{
|
{
|
||||||
JRenderer* renderer = JRenderer::GetInstance();
|
JRenderer* renderer = JRenderer::GetInstance();
|
||||||
JQuadPtr quad;
|
JQuadPtr quad;
|
||||||
|
JQuadPtr quadframe = WResourceManager::Instance()->RetrieveTempQuad(kBackdropFrameFile);
|
||||||
if (observer && observer->mRules && observer->mRules->bg.size())
|
if (observer && observer->mRules && observer->mRules->bg.size())
|
||||||
{
|
{
|
||||||
quad = WResourceManager::Instance()->RetrieveTempQuad(observer->mRules->bg);
|
quad = WResourceManager::Instance()->RetrieveTempQuad(observer->mRules->bg);
|
||||||
@@ -30,8 +32,10 @@ void GuiBackground::Render()
|
|||||||
}
|
}
|
||||||
if (quad.get())
|
if (quad.get())
|
||||||
{
|
{
|
||||||
quad->mWidth = 480.f;
|
renderer->RenderQuad(quad.get(), 0, 0, 0, SCREEN_WIDTH_F / quad->mWidth, SCREEN_HEIGHT_F / quad->mHeight);
|
||||||
quad->mHeight = 272.f;
|
}
|
||||||
renderer->RenderQuad(quad.get(), 0, 0);
|
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()
|
void GuiPhaseBar::Render()
|
||||||
{
|
{
|
||||||
JQuadPtr quad = WResourceManager::Instance()->GetQuad("phasebar");
|
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.
|
//uncomment to draw a hideous line across hires screens.
|
||||||
// JRenderer::GetInstance()->DrawLine(0, CENTER, SCREEN_WIDTH, CENTER, ARGB(255, 255, 255, 255));
|
// 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);
|
string phaseNameToTranslate = observer->phaseRing->phaseName(displayedPhaseId%kPhases + 1);
|
||||||
phaseNameToTranslate = _(phaseNameToTranslate);
|
phaseNameToTranslate = _(phaseNameToTranslate);
|
||||||
sprintf(buf, _("(%s%s) %s").c_str(), currentP.c_str(), interrupt.c_str(),phaseNameToTranslate.c_str());
|
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);
|
font->DrawString(buf, SCREEN_WIDTH - 5, 2, JGETEXT_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user