1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-31 00:07:39 +02:00

Compile fix + minor changes.

This commit is contained in:
DjWarmonger
2010-08-17 15:16:08 +00:00
parent 9c60629bcf
commit 084a0148c7
6 changed files with 12 additions and 14 deletions

View File

@@ -32,7 +32,6 @@
#include "../hch/CVideoHandler.h"
#include "../hch/CLodHandler.h"
#include "../hch/CDefHandler.h"
#include "../hch/CAmbarCendamo.h"
#include "../hch/CGeneralTextHandler.h"
#include "Graphics.h"
#include "Client.h"

View File

@@ -13,6 +13,7 @@
#include "GUIClasses.h"
#include "AdventureMapButton.h"
#include "CConfigHandler.h"
#include "CBitmapHandler.h"
/*
* CMessage.cpp, part of VCMI engine

View File

@@ -874,7 +874,8 @@ void SComponent::init(Etype Type, int Subtype, int Val)
subtitle = CGI->spellh->spells[Subtype].name;
break;
case creature:
subtitle = boost::lexical_cast<std::string>(Val) + " " + CGI->creh->creatures[Subtype]->*(Val != 1 ? &CCreature::namePl : &CCreature::nameSing);
if (Val) //no need to display 0 value
subtitle = boost::lexical_cast<std::string>(Val) + " " + CGI->creh->creatures[Subtype]->*(Val != 1 ? &CCreature::namePl : &CCreature::nameSing);
break;
case experience:
description = CGI->generaltexth->allTexts[241];

View File

@@ -236,7 +236,7 @@ public:
shiftPos;//1st slot of the second row, set shiftPoint for effect
bool ignoreEvent, update, active, splitting, pb,
smallIcons, //true - 32x32 imgs, false - 58x64
removableUnits,//player can remove units from up
removableUnits,//player can remove units from up
twoRows,//slots will be placed in 2 rows
ourUp,ourDown;//player owns up or down army

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="9.00"
Name="VCMI_client"
ProjectGUID="{8355EBA8-65C2-44A4-BC2D-78053E1BF2D6}"
RootNamespace="VCMI_client"
@@ -381,10 +381,6 @@
RelativePath=".\GUIClasses.cpp"
>
</File>
<File
RelativePath="..\mapHandler.cpp"
>
</File>
<File
RelativePath=".\NetPacksClient.cpp"
>

View File

@@ -4625,6 +4625,7 @@ void CGBonusingObject::onHeroVisit( const CGHeroInstance * h ) const
i->second.setType(11);
}
cb->giveCreatures(h->id, h, creatures); //suboptimal again, but creature sets are screwed in general
iw.components.push_back(Component(Component::CREATURE,11,0,1));
}
else
messageID = 137;
@@ -5538,9 +5539,10 @@ void CBank::initialize() const
{
for (ui8 n = 0; n < bc->artifacts[i]; n++) //new function using proper randomization algorithm
{
cb->setObjProperty (id, 18 + i, ran()); //synchronic
cb->setObjProperty (id, 18 + i, ran()); //synchronic artifacts
}
}
cb->setObjProperty (id, 17, ran()); //get army
}
void CBank::setPropertyDer (ui8 what, ui32 val)
/// random values are passed as arguments and processed identically on all clients
@@ -5727,7 +5729,6 @@ void CBank::fightGuards (const CGHeroInstance * h, ui32 accept) const
{
if (accept)
{
cb->setObjProperty (id, 17, ran()); //get army
cb->startBattleI (h, this, boost::bind (&CBank::endBattle, this, h, _1), true);
}
}
@@ -5856,10 +5857,10 @@ void CBank::endBattle (const CGHeroInstance *h, const BattleResult *result) cons
cb->showInfoDialog(&iw);
cb->giveCreatures (id, h, ourArmy);
}
cb->setObjProperty (id, 15, 0); //bc = NULL
//cb->setObjProperty (id, 15, 0); //bc = NULL
}
else //in case of defeat
initialize();
//else //in case of defeat
// initialize();
}
void CGPyramid::initObj()
@@ -5900,7 +5901,7 @@ void CGPyramid::onHeroVisit (const CGHeroInstance * h) const
{
BlockingDialog bd (true, false);
bd.player = h->getOwner();
bd.soundID = soundBase::DANGER;
bd.soundID = soundBase::MYSTERY;
bd.text << VLC->generaltexth->advobtxt[105];
cb->showBlockingDialog (&bd, boost::bind (&CBank::fightGuards, this, h, _1));
}