diff --git a/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java b/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java index 0f89f985e..55bfe3dd6 100644 --- a/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java +++ b/projects/mtg/Android/src/net/wagic/utils/DeckImporter.java @@ -18,6 +18,7 @@ public class DeckImporter String deck = ""; String deckname = ""; String prefix = "#SB:"; + int cardcount = 0; if(f.exists() && !f.isDirectory()) { deckname = f.getName(); @@ -36,7 +37,7 @@ public class DeckImporter { String line = scanner.nextLine(); 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 arranged = ""; @@ -56,6 +57,7 @@ public class DeckImporter { deck += arranged + "(*) * " + slines[0] + "\n"; } + cardcount += Integer.parseInt(slines[0]); } } } @@ -90,7 +92,7 @@ public class DeckImporter fop.write(contentInBytes); fop.flush(); 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) { diff --git a/projects/mtg/bin/Res/graphics/backdrop.jpg b/projects/mtg/bin/Res/graphics/backdrop.jpg index 93d22e9a7..08aa69ee9 100644 Binary files a/projects/mtg/bin/Res/graphics/backdrop.jpg and b/projects/mtg/bin/Res/graphics/backdrop.jpg differ diff --git a/projects/mtg/bin/Res/graphics/backdropframe.png b/projects/mtg/bin/Res/graphics/backdropframe.png new file mode 100644 index 000000000..3ba1ac971 Binary files /dev/null and b/projects/mtg/bin/Res/graphics/backdropframe.png differ diff --git a/projects/mtg/bin/Res/graphics/phaseinfo.png b/projects/mtg/bin/Res/graphics/phaseinfo.png new file mode 100644 index 000000000..d8cad010d Binary files /dev/null and b/projects/mtg/bin/Res/graphics/phaseinfo.png differ diff --git a/projects/mtg/bin/Res/sets/primitives/mtg.txt b/projects/mtg/bin/Res/sets/primitives/mtg.txt index dce17eaad..ad24a4935 100644 --- a/projects/mtg/bin/Res/sets/primitives/mtg.txt +++ b/projects/mtg/bin/Res/sets/primitives/mtg.txt @@ -113237,7 +113237,7 @@ type=Sorcery [/card] [card] name=To Arms! -auto=lord(creature|myBattlefield) untap +auto=all(creature|myBattlefield) untap auto=draw:1 text=Untap all creatures you control. -- Draw a card. mana={1}{W} diff --git a/projects/mtg/include/WResourceManagerImpl.h b/projects/mtg/include/WResourceManagerImpl.h index 426e479db..e0da84de0 100644 --- a/projects/mtg/include/WResourceManagerImpl.h +++ b/projects/mtg/include/WResourceManagerImpl.h @@ -10,7 +10,11 @@ #include "JLogger.h" #include -#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 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 diff --git a/projects/mtg/src/GameApp.cpp b/projects/mtg/src/GameApp.cpp index 60fcfd31a..86d06fdc6 100644 --- a/projects/mtg/src/GameApp.cpp +++ b/projects/mtg/src/GameApp.cpp @@ -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); diff --git a/projects/mtg/src/GuiBackground.cpp b/projects/mtg/src/GuiBackground.cpp index fba1877d6..280c8b4f9 100644 --- a/projects/mtg/src/GuiBackground.cpp +++ b/projects/mtg/src/GuiBackground.cpp @@ -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); } } diff --git a/projects/mtg/src/GuiPhaseBar.cpp b/projects/mtg/src/GuiPhaseBar.cpp index 7d774f44a..0de7a7de2 100644 --- a/projects/mtg/src/GuiPhaseBar.cpp +++ b/projects/mtg/src/GuiPhaseBar.cpp @@ -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); }