mirror of
https://github.com/vcmi/vcmi.git
synced 2025-05-13 22:06:58 +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 CLodHandler * bitmaph;
|
||||||
extern boost::rand48 ran;
|
extern boost::rand48 ran;
|
||||||
std::map <ui8, std::set <ui8> > CGKeys::playerKeyMap;
|
std::map <ui8, std::set <ui8> > CGKeys::playerKeyMap;
|
||||||
std::map <si32, std::vector<CGMagi>> CGMagi::eyelist;
|
std::map <si32, std::vector<CGMagi> > CGMagi::eyelist;
|
||||||
std::map <ui32, std::vector <BankConfig>> banksInfo; //[index][preset], TODO: load it
|
std::map <ui32, std::vector <BankConfig> > banksInfo; //[index][preset], TODO: load it
|
||||||
|
|
||||||
struct BankConfig
|
struct BankConfig
|
||||||
{
|
{
|
||||||
@ -48,10 +48,10 @@ struct BankConfig
|
|||||||
//std::string name;
|
//std::string name;
|
||||||
ui8 chance;
|
ui8 chance;
|
||||||
ui8 upgradeChance;
|
ui8 upgradeChance;
|
||||||
std::vector< std::pair <ui16, ui32>> guards;
|
std::vector< std::pair <ui16, ui32> > guards;
|
||||||
ui32 combatValue;
|
ui32 combatValue;
|
||||||
std::map<ui8, si32> resources;
|
std::map<ui8, si32> resources;
|
||||||
std::vector< std::pair <ui16, ui32>> creatures;
|
std::vector< std::pair <ui16, ui32> > creatures;
|
||||||
std::map<ui8, ui16> artifacts;
|
std::map<ui8, ui16> artifacts;
|
||||||
ui32 value;
|
ui32 value;
|
||||||
ui32 rewardDifficulty; //?
|
ui32 rewardDifficulty; //?
|
||||||
@ -3582,7 +3582,7 @@ void CBank::fightGuards (const CGHeroInstance * h, ui32 accept) const
|
|||||||
break;
|
break;
|
||||||
case 4:
|
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++)
|
for (it = bc->guards.begin(); it != bc->guards.end(); it++)
|
||||||
ourArmy.setCreature (ourArmy.slots.size() + 1, it->first, it->second );
|
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);
|
cb->giveHeroArtifact (*it, cb->getSelectedHero() ,-2);
|
||||||
}
|
}
|
||||||
CCreatureSet ourArmy;
|
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);
|
int slot = ourArmy.getSlotFor (it->second);
|
||||||
ourArmy.slots[slot] = *it; //assuming we're not going to add multiple stacks of same creature
|
ourArmy.slots[slot] = *it; //assuming we're not going to add multiple stacks of same creature
|
||||||
|
@ -896,7 +896,7 @@ public:
|
|||||||
class DLL_EXPORT CGMagi : public CGObjectInstance
|
class DLL_EXPORT CGMagi : public CGObjectInstance
|
||||||
{
|
{
|
||||||
public:
|
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 initObj();
|
||||||
void onHeroVisit(const CGHeroInstance * h) const;
|
void onHeroVisit(const CGHeroInstance * h) const;
|
||||||
|
2
int3.h
2
int3.h
@ -18,7 +18,7 @@ class CCreature;
|
|||||||
class CCreatureSet //seven combined creatures
|
class CCreatureSet //seven combined creatures
|
||||||
{
|
{
|
||||||
public:
|
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 formation; //false - wide, true - tight
|
||||||
bool setCreature (si32 slot, ui32 type, si32 quantity) //slots 1 to 7
|
bool setCreature (si32 slot, ui32 type, si32 quantity) //slots 1 to 7
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user