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

Moving stack system to pointers, part #1

This commit is contained in:
Michał W. Urbańczyk
2010-11-22 00:34:46 +00:00
parent 9250cc8adf
commit 32ce20af15
19 changed files with 457 additions and 293 deletions

View File

@ -3748,10 +3748,10 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
int bestPower = 0;
for(TSlots::const_iterator it = owner->army1.Slots().begin(); it!=owner->army1.Slots().end(); ++it)
{
if( it->second.type->AIValue > bestPower)
if( it->second->type->AIValue > bestPower)
{
bestPower = it->second.type->AIValue;
bestMonsterID = it->second.type->idNumber;
bestPower = it->second->type->AIValue;
bestMonsterID = it->second->type->idNumber;
}
}
SDL_BlitSurface(graphics->bigImgs[bestMonsterID], NULL, background, &genRect(64, 58, 21, 38));
@ -3770,10 +3770,10 @@ CBattleResultWindow::CBattleResultWindow(const BattleResult &br, const SDL_Rect
int bestPower = 0;
for(TSlots::const_iterator it = owner->army2.Slots().begin(); it!=owner->army2.Slots().end(); ++it)
{
if( it->second.type->AIValue > bestPower)
if( it->second->type->AIValue > bestPower)
{
bestPower = it->second.type->AIValue;
bestMonsterID = it->second.type->idNumber;
bestPower = it->second->type->AIValue;
bestMonsterID = it->second->type->idNumber;
}
}
SDL_BlitSurface(graphics->bigImgs[bestMonsterID], NULL, background, &genRect(64, 58, 392, 38));