diff --git a/projects/mtg/include/DeckMenu.h b/projects/mtg/include/DeckMenu.h index 39eac3ea0..9ffee462d 100644 --- a/projects/mtg/include/DeckMenu.h +++ b/projects/mtg/include/DeckMenu.h @@ -22,7 +22,6 @@ class DeckMenu:public JGuiController{ int fontId; std::string title; - int displaytitle; int maxItems, startId; float selectionT, selectionY; float timeOpen; diff --git a/projects/mtg/src/DeckMenu.cpp b/projects/mtg/src/DeckMenu.cpp index bbcfb969d..95c699d9b 100644 --- a/projects/mtg/src/DeckMenu.cpp +++ b/projects/mtg/src/DeckMenu.cpp @@ -94,7 +94,7 @@ JQuad* DeckMenu::getBackground() ostringstream bgFilename; bgFilename << backgroundName << ".png"; resources.RetrieveTexture( bgFilename.str(), RETRIEVE_MANAGE ); - return resources.RetrieveQuad(bgFilename.str(), 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, backgroundName ); + return resources.RetrieveQuad(bgFilename.str(), 0, 0, SCREEN_WIDTH_F, SCREEN_HEIGHT_F, backgroundName, RETRIEVE_MANAGE ); } diff --git a/projects/mtg/src/GuiCombat.cpp b/projects/mtg/src/GuiCombat.cpp index 7f0ce332b..116229899 100644 --- a/projects/mtg/src/GuiCombat.cpp +++ b/projects/mtg/src/GuiCombat.cpp @@ -203,7 +203,8 @@ bool GuiCombat::CheckUserInput(JButton key) case ATK : { DamagerDamaged* old = active; - active = closest(attackers, NULL, static_cast(active)); activeAtk = static_cast(active); + active = closest(attackers, NULL, static_cast(active)); + activeAtk = static_cast(active); if (old != active) { if (old) old->zoom = kZoom_none; if (active) active->zoom = kZoom_level1; } } break; @@ -235,7 +236,10 @@ bool GuiCombat::CheckUserInput(JButton key) if (active == oldActive) { active = activeAtk = NULL; cursor_pos = OK; } else { - if (old != active) { if (old) old->zoom = kZoom_none; if (active) active->zoom = kZoom_level1; } + if (old != active) { + if (old) old->zoom = kZoom_none; + if (active) active->zoom = kZoom_level1; + } activeAtk = static_cast(active); } } diff --git a/projects/mtg/src/MTGAbility.cpp b/projects/mtg/src/MTGAbility.cpp index 3db8405c1..53514e7eb 100644 --- a/projects/mtg/src/MTGAbility.cpp +++ b/projects/mtg/src/MTGAbility.cpp @@ -1540,10 +1540,8 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG } //Gain/loose simple Ability - DebugTrace(" start gain/lose simple ability " ); for (int j = 0; j < Constants::NB_BASIC_ABILITIES; j++){ found = s.find(Constants::MTGBasicAbilities[j]); - DebugTrace( "basic ability search at index " << Constants::MTGBasicAbilities[j] ); if (found == 0 || found == 1){ int modifier = 1; if (found > 0 && s[found-1] == '-') modifier = 0; @@ -1557,7 +1555,6 @@ MTGAbility * AbilityFactory::parseMagicLine(string s, int id, Spell * spell, MTG } } - DebugTrace(" end gain/lose simple ability " ); //Untapper (Ley Druid...) found = s.find("untap"); if (found != string::npos){ diff --git a/projects/mtg/src/WDataSrc.cpp b/projects/mtg/src/WDataSrc.cpp index eba91a8b2..11f8375df 100644 --- a/projects/mtg/src/WDataSrc.cpp +++ b/projects/mtg/src/WDataSrc.cpp @@ -499,7 +499,7 @@ int WSrcDeck::totalPrice(){ return total; } //WSrcDeckViewer -WSrcDeckViewer::WSrcDeckViewer(WSrcCards * _active, WSrcCards * _inactive): WSrcCards(0.2) { +WSrcDeckViewer::WSrcDeckViewer(WSrcCards * _active, WSrcCards * _inactive): WSrcCards(0.2f) { active = _active; inactive = _inactive; }