* New interface.
* This breaks a lot of things. It is not feature-equivalent. It
  probably doesn't compile under windows and doesn't work on PSP.
* Damage is not resolved any more. This will have to be fixed.
* Blockers can't be ordered any more. This will have to be fixed.
* A lot of new art is included.
This commit is contained in:
jean.chalard
2009-08-22 05:59:43 +00:00
parent bf4262c0a0
commit 3349f974f1
101 changed files with 2424 additions and 2361 deletions
+61 -12
View File
@@ -24,6 +24,8 @@ int GameApp::HasMusic = 1;
JMusic * GameApp::music = NULL;
string GameApp::systemError = "";
JQuad* manaIcons[7] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL};
GameState::GameState(GameApp* parent): mParent(parent)
{
mEngine = JGE::GetInstance();
@@ -64,19 +66,15 @@ void GameApp::Create()
//Test for Music files presence
std::ifstream file(RESPATH"/sound/Track0.mp3");
if(file){
if (file)
file.close();
}else{
else
HasMusic = 0;
}
std::ifstream file2(RESPATH"/sound/Track1.mp3");
if(file2){
if (file2)
file2.close();
}else{
else
HasMusic = 0;
}
CommonRes->CreateTexture("graphics/menuicons.png");
//Creating thes quad in this specific order allows us to have them in the correct order to call them by integer id
@@ -87,6 +85,14 @@ void GameApp::Create()
CommonRes->CreateQuad("c_black", "graphics/menuicons.png", 2 + 2*36, 38, 32, 32);
CommonRes->CreateQuad("c_white", "graphics/menuicons.png", 2 + 4*36, 38, 32, 32);
CommonRes->CreateQuad("c_land", "graphics/menuicons.png", 2 + 5*36, 38, 32, 32);
manaIcons[Constants::MTG_COLOR_ARTIFACT] = GameApp::CommonRes->GetQuad("c_artifact");
manaIcons[Constants::MTG_COLOR_LAND] = GameApp::CommonRes->GetQuad("c_land");
manaIcons[Constants::MTG_COLOR_WHITE] = GameApp::CommonRes->GetQuad("c_white");
manaIcons[Constants::MTG_COLOR_RED] = GameApp::CommonRes->GetQuad("c_red");
manaIcons[Constants::MTG_COLOR_BLACK] = GameApp::CommonRes->GetQuad("c_black");
manaIcons[Constants::MTG_COLOR_BLUE] = GameApp::CommonRes->GetQuad("c_blue");
manaIcons[Constants::MTG_COLOR_GREEN] = GameApp::CommonRes->GetQuad("c_green");
for (int i = sizeof(manaIcons)/sizeof(manaIcons[0]) - 1; i >= 0; --i) manaIcons[i]->SetHotSpot(16,16);
CommonRes->CreateTexture("sets/back.jpg");
@@ -108,9 +114,54 @@ void GameApp::Create()
CommonRes->CreateTexture("graphics/phasebar.png");
CommonRes->CreateTexture("graphics/background.png");
CommonRes->CreateTexture("graphics/wood.png");
CommonRes->CreateTexture("graphics/gold.png");
CommonRes->CreateTexture("graphics/goldglow.png");
CommonRes->CreateTexture("graphics/back.jpg");
CommonRes->CreateTexture("graphics/phasebar.png");
CommonRes->CreateTexture("graphics/handback.png");
CommonRes->CreateTexture("sets/red.jpg");
CommonRes->CreateTexture("sets/white.jpg");
CommonRes->CreateTexture("sets/blue.jpg");
CommonRes->CreateTexture("sets/black.jpg");
CommonRes->CreateTexture("sets/green.jpg");
CommonRes->CreateQuad("red", "sets/red.jpg", 0, 0, 200, 285);
CommonRes->CreateQuad("white", "sets/white.jpg", 0, 0, 200, 285);
CommonRes->CreateQuad("blue", "sets/blue.jpg", 0, 0, 200, 285);
CommonRes->CreateQuad("black", "sets/black.jpg", 0, 0, 200, 285);
CommonRes->CreateQuad("green", "sets/green.jpg", 0, 0, 200, 285);
CommonRes->GetQuad("red")->SetHotSpot(100, 145);
CommonRes->GetQuad("white")->SetHotSpot(100, 145);
CommonRes->GetQuad("blue")->SetHotSpot(100, 145);
CommonRes->GetQuad("black")->SetHotSpot(100, 145);
CommonRes->GetQuad("green")->SetHotSpot(100, 145);
CommonRes->CreateTexture("sets/red_thumb.jpg");
CommonRes->CreateTexture("sets/white_thumb.jpg");
CommonRes->CreateTexture("sets/blue_thumb.jpg");
CommonRes->CreateTexture("sets/black_thumb.jpg");
CommonRes->CreateTexture("sets/green_thumb.jpg");
CommonRes->CreateQuad("red_thumb", "sets/red_thumb.jpg", 0, 0, 28, 40);
CommonRes->CreateQuad("white_thumb", "sets/white_thumb.jpg", 0, 0, 28, 40);
CommonRes->CreateQuad("blue_thumb", "sets/blue_thumb.jpg", 0, 0, 28, 40);
CommonRes->CreateQuad("black_thumb", "sets/black_thumb.jpg", 0, 0, 28, 40);
CommonRes->CreateQuad("green_thumb", "sets/green_thumb.jpg", 0, 0, 28, 40);
CommonRes->GetQuad("red_thumb")->SetHotSpot(14, 20);
CommonRes->GetQuad("white_thumb")->SetHotSpot(14, 20);
CommonRes->GetQuad("blue_thumb")->SetHotSpot(14, 20);
CommonRes->GetQuad("black_thumb")->SetHotSpot(14, 20);
CommonRes->GetQuad("green_thumb")->SetHotSpot(14, 20);
CommonRes->CreateTexture("graphics/BattleIcon.png");
CommonRes->CreateTexture("graphics/DefenderIcon.png");
CommonRes->CreateTexture("graphics/shadow.png");
CommonRes->CreateQuad("BattleIcon", "graphics/BattleIcon.png", 0, 0, 25, 25);
CommonRes->CreateQuad("DefenderIcon", "graphics/DefenderIcon.png", 0, 0, 24, 23);
CommonRes->CreateQuad("shadow", "graphics/shadow.png", 0, 0, 1, 1);
CommonRes->GetQuad("BattleIcon")->SetHotSpot(12, 12);
CommonRes->GetQuad("DefenderIcon")->SetHotSpot(12, 12);
CommonRes->GetQuad("shadow")->SetHotSpot(0.5, 0.5);
//CommonRes->CreateTexture("graphics/interrupt.png");
//CommonRes->CreateQuad("interrupt", "graphics/interrupt.png", 0, 0, 256, 128);
@@ -188,8 +239,6 @@ void GameApp::Destroy()
SAFE_DELETE(CommonRes);
GameOptions::Destroy(); //No delete ???
SAFE_DELETE(Subtypes::subtypesList);
SAFE_DELETE(MtgSets::SetsList);