* Added new options parameter. "SaveDetailedDeckInfo". This will force the system to save all

deck files in long format.  This is not configurable from the game.  It must be set manually
     inside options.txt.
     ie.  saveDetailedDeckInfo=1

* added extra debug information (line number inside text file) when card parser fails to recognize a line.
    - modified return value from "processConfLine()" to return 0 only when a true error occurs and print out
         "MTGDeck: Bad Line:
         [<line no>]: <line with error>"
    - processConfLine will now return 1 for lines starting with "#".  Previously it returned 0 which is incorrect
         as comments should not be considered as errors.

* removed DeckMetaDataList class from code.  This was duplicating the DeckMetaData storage in DeckManager
* new feature for deck selection screens.
   - player decks will now have an indication of what mana color it consists of.
   - Ai decks will show symbols once the player has played against the AI deck at least once.
   -- This is made possible with a new meta data inside each deck file.
        MANA:<string representing color switches - 0/1 >
This commit is contained in:
techdragon.nguyen@gmail.com
2011-01-31 10:04:18 +00:00
parent 2973158a62
commit 8af5870d48
13 changed files with 174 additions and 76 deletions

View File

@@ -220,7 +220,8 @@ void DeckMenu::Render()
string text = wordWrap(currentMenuItem->desc, descWidth, mainFont->mFontID );
mainFont->DrawString(text.c_str(), descX, descY);
mFont->SetColor(ARGB(255,255,255,255));
// fill in the statistical portion
if (currentMenuItem->meta)
{
@@ -247,8 +248,28 @@ void DeckMenu::Render()
mScroller->Render();
RenderBackground();
renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE);
// display the deck mana colors if known
// We only want to display the mana symbols on the game screens and not the Deck Editor screens.
// Need a better way to determine when to display the mana symbols. Perhaps make it a property setting.
bool displayDeckMana = backgroundName.find("DeckMenuBackdrop") != string::npos;
float manaIconX = 300;
float manaIconY = 75;
if (mSelectedDeck &&displayDeckMana)
{
string deckManaColors = mSelectedDeck->getColorIndex();
if ( deckManaColors.compare("") != 0 )
for( int colorIdx = Constants::MTG_COLOR_ARTIFACT; colorIdx < 5; ++colorIdx )
{
if ( (deckManaColors.at(colorIdx) == '1') != 0)
{
renderer->RenderQuad(manaIcons[colorIdx], manaIconX, manaIconY);
manaIconX += 30;
}
}
}
renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE);
stars->Render();
renderer->SetTexBlend(BLEND_SRC_ALPHA, BLEND_ONE_MINUS_SRC_ALPHA);