- reworked the testsuite and the rules (storyflow) to use the same game deserialization code, moved that code to the players and zone classes

- removed every references to the gameobserver singleton. This object can now be instantiated several times as it's needed for minmax. To be able to do that, I mostly added a reference to a gameobserver from any targetable object (cards, players, spells) and abilities.
This commit is contained in:
Xawotihs
2011-10-01 13:30:30 +00:00
parent d6db0c4f63
commit 9adb9d625d
86 changed files with 1902 additions and 1961 deletions

View File

@@ -132,7 +132,7 @@ void CardGui::Render()
WFont * mFont = WResourceManager::Instance()->GetWFont(Fonts::MAIN_FONT);
JRenderer * renderer = JRenderer::GetInstance();
GameObserver * game = GameObserver::GetInstance();
GameObserver * game = card->getObserver();
TargetChooser * tc = NULL;
if (game)
@@ -496,9 +496,11 @@ void CardGui::AlternateRender(MTGCard * card, const Pos& pos)
}
for (int i = Constants::MTG_NB_COLORS - 2; i >= 1; --i)
{
for (int cost = manacost->getCost(i); cost > 0; --cost)
int cost;
for (cost = manacost->getCost(i); cost > 0; --cost)
{
renderer->RenderQuad(manaIcons[i].get(), x + (-12 * j + 75) * pos.actZ, pos.actY + (yOffset) * pos.actZ, 0, 0.4f
renderer->RenderQuad(manaIcons[i].get(), x + (-12 * j + 75) * pos.actZ, pos.actY + (yOffset) * pos.actZ, 0.0f, 0.4f
* pos.actZ, 0.4f * pos.actZ);
++j;
}
@@ -1030,4 +1032,4 @@ void SimpleCardEffectMask::doEffect(Pos * card)
void SimpleCardEffectMask::undoEffect(Pos * card)
{
card->mask = 0;
}
}