mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Compile fixes for gcc.
This commit is contained in:
parent
1d765e8f29
commit
2bc0efe71f
@ -39,8 +39,8 @@ DLL_EXPORT void loadToIt(std::string &dest, std::string &src, int &iter, int mod
|
||||
extern CLodHandler * bitmaph;
|
||||
extern boost::rand48 ran;
|
||||
std::map <ui8, std::set <ui8> > CGKeys::playerKeyMap;
|
||||
std::map <si32, std::vector<CGMagi>> CGMagi::eyelist;
|
||||
std::map <ui32, std::vector <BankConfig>> banksInfo; //[index][preset], TODO: load it
|
||||
std::map <si32, std::vector<CGMagi> > CGMagi::eyelist;
|
||||
std::map <ui32, std::vector <BankConfig> > banksInfo; //[index][preset], TODO: load it
|
||||
|
||||
struct BankConfig
|
||||
{
|
||||
@ -48,10 +48,10 @@ struct BankConfig
|
||||
//std::string name;
|
||||
ui8 chance;
|
||||
ui8 upgradeChance;
|
||||
std::vector< std::pair <ui16, ui32>> guards;
|
||||
std::vector< std::pair <ui16, ui32> > guards;
|
||||
ui32 combatValue;
|
||||
std::map<ui8, si32> resources;
|
||||
std::vector< std::pair <ui16, ui32>> creatures;
|
||||
std::vector< std::pair <ui16, ui32> > creatures;
|
||||
std::map<ui8, ui16> artifacts;
|
||||
ui32 value;
|
||||
ui32 rewardDifficulty; //?
|
||||
@ -3582,7 +3582,7 @@ void CBank::fightGuards (const CGHeroInstance * h, ui32 accept) const
|
||||
break;
|
||||
case 4:
|
||||
{
|
||||
std::vector< std::pair <ui16, ui32>>::const_iterator it;
|
||||
std::vector< std::pair <ui16, ui32> >::const_iterator it;
|
||||
for (it = bc->guards.begin(); it != bc->guards.end(); it++)
|
||||
ourArmy.setCreature (ourArmy.slots.size() + 1, it->first, it->second );
|
||||
}
|
||||
@ -3644,7 +3644,7 @@ void CBank::endBattle (const BattleResult *result)
|
||||
cb->giveHeroArtifact (*it, cb->getSelectedHero() ,-2);
|
||||
}
|
||||
CCreatureSet ourArmy;
|
||||
for (std::vector< std::pair <ui16, ui32>>::iterator it = bc->creatures.begin(); it != bc->creatures.end(); it++)
|
||||
for (std::vector< std::pair <ui16, ui32> >::iterator it = bc->creatures.begin(); it != bc->creatures.end(); it++)
|
||||
{
|
||||
int slot = ourArmy.getSlotFor (it->second);
|
||||
ourArmy.slots[slot] = *it; //assuming we're not going to add multiple stacks of same creature
|
||||
@ -3965,4 +3965,4 @@ void CGShipyard::onHeroVisit( const CGHeroInstance * h ) const
|
||||
ow.window = OpenWindow::SHIPYARD_WINDOW;
|
||||
cb->sendAndApply(&ow);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -896,7 +896,7 @@ public:
|
||||
class DLL_EXPORT CGMagi : public CGObjectInstance
|
||||
{
|
||||
public:
|
||||
static std::map <si32, std::vector<CGMagi>> eyelist; //[subID][id], supports multiple sets as in H5
|
||||
static std::map <si32, std::vector<CGMagi> > eyelist; //[subID][id], supports multiple sets as in H5
|
||||
|
||||
void initObj();
|
||||
void onHeroVisit(const CGHeroInstance * h) const;
|
||||
|
2
int3.h
2
int3.h
@ -18,7 +18,7 @@ class CCreature;
|
||||
class CCreatureSet //seven combined creatures
|
||||
{
|
||||
public:
|
||||
std::map<si32, std::pair<ui32,si32>> slots; //slots[slot_id]=> pair(creature_id,creature_quantity)
|
||||
std::map<si32, std::pair<ui32,si32> > slots; //slots[slot_id]=> pair(creature_id,creature_quantity)
|
||||
bool formation; //false - wide, true - tight
|
||||
bool setCreature (si32 slot, ui32 type, si32 quantity) //slots 1 to 7
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user