mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
- gcc compile fixes
This commit is contained in:
parent
6ec3501909
commit
66f5b5e2d7
@ -265,7 +265,7 @@ 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 (creatureArtifact = stack->getArt(ArtifactPosition::CREATURE_SLOT))
|
||||
if ((creatureArtifact = stack->getArt(ArtifactPosition::CREATURE_SLOT)))
|
||||
blitAt(graphics->artDefs->ourImages[creatureArtifact->artType->id].bitmap, 466, 100, *bitmap);
|
||||
}
|
||||
}
|
||||
|
@ -943,7 +943,7 @@ int CArtifactInstance::firstBackpackSlot(const CArtifactSet *h) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool CArtifactInstance::canBePutAt(const ArtifactLocation &al, bool assumeDestRemoved /*= false*/) const
|
||||
bool CArtifactInstance::canBePutAt(const ArtifactLocation al, bool assumeDestRemoved /*= false*/) const
|
||||
{
|
||||
return canBePutAt(al.getHolderArtSet(), al.slot, assumeDestRemoved);
|
||||
}
|
||||
@ -965,7 +965,7 @@ bool CArtifactInstance::canBePutAt(const CArtifactSet *artSet, int slot, bool as
|
||||
return artSet->isPositionFree(slot, assumeDestRemoved);
|
||||
}
|
||||
|
||||
void CArtifactInstance::putAt(ArtifactLocation &al)
|
||||
void CArtifactInstance::putAt(ArtifactLocation al)
|
||||
{
|
||||
assert(canBePutAt(al));
|
||||
|
||||
@ -974,7 +974,7 @@ void CArtifactInstance::putAt(ArtifactLocation &al)
|
||||
al.getHolderNode()->attachTo(this);
|
||||
}
|
||||
|
||||
void CArtifactInstance::removeFrom(ArtifactLocation &al)
|
||||
void CArtifactInstance::removeFrom(ArtifactLocation al)
|
||||
{
|
||||
assert(al.getHolderArtSet()->getArt(al.slot) == this);
|
||||
al.getHolderArtSet()->eraseArtSlot(al.slot);
|
||||
@ -1018,7 +1018,7 @@ std::vector<const CArtifact *> CArtifactInstance::assemblyPossibilities(const CA
|
||||
return ret;
|
||||
}
|
||||
|
||||
void CArtifactInstance::move(ArtifactLocation &src, ArtifactLocation &dst)
|
||||
void CArtifactInstance::move(ArtifactLocation src, ArtifactLocation dst)
|
||||
{
|
||||
removeFrom(src);
|
||||
putAt(dst);
|
||||
@ -1131,7 +1131,7 @@ void CCombinedArtifactInstance::addAsConstituent(CArtifactInstance *art, int slo
|
||||
attachTo(art);
|
||||
}
|
||||
|
||||
void CCombinedArtifactInstance::putAt(ArtifactLocation &al)
|
||||
void CCombinedArtifactInstance::putAt(ArtifactLocation al)
|
||||
{
|
||||
if(al.slot >= GameConstants::BACKPACK_START)
|
||||
{
|
||||
@ -1169,7 +1169,7 @@ void CCombinedArtifactInstance::putAt(ArtifactLocation &al)
|
||||
}
|
||||
}
|
||||
|
||||
void CCombinedArtifactInstance::removeFrom(ArtifactLocation &al)
|
||||
void CCombinedArtifactInstance::removeFrom(ArtifactLocation al)
|
||||
{
|
||||
if(al.slot >= GameConstants::BACKPACK_START)
|
||||
{
|
||||
@ -1193,7 +1193,7 @@ void CCombinedArtifactInstance::removeFrom(ArtifactLocation &al)
|
||||
}
|
||||
}
|
||||
|
||||
CArtifactInstance * CCombinedArtifactInstance::figureMainConstituent(const ArtifactLocation &al)
|
||||
CArtifactInstance * CCombinedArtifactInstance::figureMainConstituent(const ArtifactLocation al)
|
||||
{
|
||||
CArtifactInstance *mainConstituent = NULL; //it'll be replaced with combined artifact, not a lock
|
||||
BOOST_FOREACH(ConstituentInfo &ci, constituentsInfo)
|
||||
@ -1383,4 +1383,4 @@ void CArtifactSet::artDeserializationFix(CBonusSystemNode *node)
|
||||
for(bmap<ui16, ArtSlotInfo>::iterator i = artifactsWorn.begin(); i != artifactsWorn.end(); i++)
|
||||
if(i->second.artifact && !i->second.locked)
|
||||
node->attachTo(i->second.artifact);
|
||||
}
|
||||
}
|
||||
|
@ -95,14 +95,14 @@ public:
|
||||
int getGivenSpellID() const; //to be used with scrolls (and similar arts), -1 if none
|
||||
|
||||
virtual bool canBePutAt(const CArtifactSet *artSet, int slot, bool assumeDestRemoved = false) const;
|
||||
bool canBePutAt(const ArtifactLocation &al, bool assumeDestRemoved = false) const; //forwards to the above one
|
||||
bool canBePutAt(const ArtifactLocation al, bool assumeDestRemoved = false) const; //forwards to the above one
|
||||
virtual bool canBeDisassembled() const;
|
||||
virtual void putAt(ArtifactLocation &al);
|
||||
virtual void removeFrom(ArtifactLocation &al);
|
||||
virtual void putAt(ArtifactLocation al);
|
||||
virtual void removeFrom(ArtifactLocation al);
|
||||
virtual bool isPart(const CArtifactInstance *supposedPart) const; //checks if this a part of this artifact: artifact instance is a part of itself, additionally truth is returned for consituents of combined arts
|
||||
|
||||
std::vector<const CArtifact *> assemblyPossibilities(const CArtifactSet *h) const;
|
||||
void move(ArtifactLocation &src, ArtifactLocation &dst);
|
||||
void move(ArtifactLocation src, ArtifactLocation dst);
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
@ -137,13 +137,13 @@ public:
|
||||
|
||||
bool canBePutAt(const CArtifactSet *artSet, int slot, bool assumeDestRemoved = false) const OVERRIDE;
|
||||
bool canBeDisassembled() const OVERRIDE;
|
||||
void putAt(ArtifactLocation &al) OVERRIDE;
|
||||
void removeFrom(ArtifactLocation &al) OVERRIDE;
|
||||
void putAt(ArtifactLocation al) OVERRIDE;
|
||||
void removeFrom(ArtifactLocation al) OVERRIDE;
|
||||
bool isPart(const CArtifactInstance *supposedPart) const OVERRIDE;
|
||||
|
||||
void createConstituents();
|
||||
void addAsConstituent(CArtifactInstance *art, int slot);
|
||||
CArtifactInstance *figureMainConstituent(const ArtifactLocation &al); //main constituent is replcaed with us (combined art), not lock
|
||||
CArtifactInstance *figureMainConstituent(const ArtifactLocation al); //main constituent is replcaed with us (combined art), not lock
|
||||
|
||||
CCombinedArtifactInstance();
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include <boost/type_traits/remove_pointer.hpp>
|
||||
#include <boost/type_traits/remove_const.hpp>
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
#include <boost/mpl/eval_if.hpp>
|
||||
#include <boost/mpl/equal_to.hpp>
|
||||
#include <boost/mpl/int.hpp>
|
||||
@ -19,6 +20,8 @@
|
||||
#include <boost/any.hpp>
|
||||
|
||||
#include "ConstTransitivePtr.h"
|
||||
#include "CCreatureSet.h" //for CStackInstance
|
||||
#include "CObjectHandler.h" //fo CArmedInstance
|
||||
|
||||
const ui32 version = 732;
|
||||
class CConnection;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <boost/variant.hpp>
|
||||
|
||||
#include "BattleAction.h"
|
||||
#include "HeroBonus.h"
|
||||
|
@ -812,7 +812,7 @@ CGameHandler::~CGameHandler(void)
|
||||
|
||||
void CGameHandler::init(StartInfo *si)
|
||||
{
|
||||
extern DLL_LINKAGE boost::rand48 ran;
|
||||
//extern DLL_LINKAGE boost::rand48 ran;
|
||||
if(!si->seedToBeUsed)
|
||||
si->seedToBeUsed = std::time(NULL);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user