1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

Redid stack artifacts. Broken save compatibility. Added serializer support for boost::variant and sending CStackInstace* over network by implicitly passing IDs. Moved seeds and checksum to StartInfo. Various minor changes.

This commit is contained in:
Michał W. Urbańczyk
2012-04-14 02:20:22 +00:00
parent d55d48b978
commit 722ec55384
31 changed files with 529 additions and 640 deletions

View File

@ -121,6 +121,7 @@ CCreatureWindow::CCreatureWindow(const CStackInstance &st, int Type, boost::func
void CCreatureWindow::init(const CStackInstance *Stack, const CBonusSystemNode *StackNode, const CGHeroInstance *HeroOwner)
{
creatureArtifact = NULL; //may be set later
stack = Stack;
c = stack->type;
if(!StackNode)
@ -264,11 +265,9 @@ void CCreatureWindow::init(const CStackInstance *Stack, const CBonusSystemNode *
if (heroOwner)
passArtToHero = new CAdventureMapButton(std::string(), std::string(), boost::bind (&CCreatureWindow::scrollArt, this, 0), 437, 148, "OVBUTN1.DEF", SDLK_HOME);
}
if (const CArtifactInstance * art = stack->getArt(GameConstants::CREATURE_ART))
blitAt(graphics->artDefs->ourImages[art->id].bitmap, 466, 161, *bitmap);
if (creatureArtifact = stack->getArt(ArtifactPosition::CREATURE_SLOT))
blitAt(graphics->artDefs->ourImages[creatureArtifact->artType->id].bitmap, 466, 100, *bitmap);
}
else
creatureArtifact = NULL;
}
if (battleStack) //only during battle
@ -398,7 +397,7 @@ void CCreatureWindow::sliderMoved(int newpos)
void CCreatureWindow::scrollArt(int dir)
{
//TODO: get next artifact
creatureArtifact = const_cast<CArtifactInstance*>(stack->getArt(GameConstants::CREATURE_ART));
creatureArtifact = stack->getArt(ArtifactPosition::CREATURE_SLOT);
}
void CCreatureWindow::passArtifactToHero()