mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-17 01:32:21 +02:00
- gcc compile fixes
This commit is contained in:
@ -265,7 +265,7 @@ void CCreatureWindow::init(const CStackInstance *Stack, const CBonusSystemNode *
|
|||||||
if (heroOwner)
|
if (heroOwner)
|
||||||
passArtToHero = new CAdventureMapButton(std::string(), std::string(), boost::bind (&CCreatureWindow::scrollArt, this, 0), 437, 148, "OVBUTN1.DEF", SDLK_HOME);
|
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);
|
blitAt(graphics->artDefs->ourImages[creatureArtifact->artType->id].bitmap, 466, 100, *bitmap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -943,7 +943,7 @@ int CArtifactInstance::firstBackpackSlot(const CArtifactSet *h) const
|
|||||||
return -1;
|
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);
|
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);
|
return artSet->isPositionFree(slot, assumeDestRemoved);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CArtifactInstance::putAt(ArtifactLocation &al)
|
void CArtifactInstance::putAt(ArtifactLocation al)
|
||||||
{
|
{
|
||||||
assert(canBePutAt(al));
|
assert(canBePutAt(al));
|
||||||
|
|
||||||
@ -974,7 +974,7 @@ void CArtifactInstance::putAt(ArtifactLocation &al)
|
|||||||
al.getHolderNode()->attachTo(this);
|
al.getHolderNode()->attachTo(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CArtifactInstance::removeFrom(ArtifactLocation &al)
|
void CArtifactInstance::removeFrom(ArtifactLocation al)
|
||||||
{
|
{
|
||||||
assert(al.getHolderArtSet()->getArt(al.slot) == this);
|
assert(al.getHolderArtSet()->getArt(al.slot) == this);
|
||||||
al.getHolderArtSet()->eraseArtSlot(al.slot);
|
al.getHolderArtSet()->eraseArtSlot(al.slot);
|
||||||
@ -1018,7 +1018,7 @@ std::vector<const CArtifact *> CArtifactInstance::assemblyPossibilities(const CA
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CArtifactInstance::move(ArtifactLocation &src, ArtifactLocation &dst)
|
void CArtifactInstance::move(ArtifactLocation src, ArtifactLocation dst)
|
||||||
{
|
{
|
||||||
removeFrom(src);
|
removeFrom(src);
|
||||||
putAt(dst);
|
putAt(dst);
|
||||||
@ -1131,7 +1131,7 @@ void CCombinedArtifactInstance::addAsConstituent(CArtifactInstance *art, int slo
|
|||||||
attachTo(art);
|
attachTo(art);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CCombinedArtifactInstance::putAt(ArtifactLocation &al)
|
void CCombinedArtifactInstance::putAt(ArtifactLocation al)
|
||||||
{
|
{
|
||||||
if(al.slot >= GameConstants::BACKPACK_START)
|
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)
|
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
|
CArtifactInstance *mainConstituent = NULL; //it'll be replaced with combined artifact, not a lock
|
||||||
BOOST_FOREACH(ConstituentInfo &ci, constituentsInfo)
|
BOOST_FOREACH(ConstituentInfo &ci, constituentsInfo)
|
||||||
|
@ -95,14 +95,14 @@ public:
|
|||||||
int getGivenSpellID() const; //to be used with scrolls (and similar arts), -1 if none
|
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;
|
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 bool canBeDisassembled() const;
|
||||||
virtual void putAt(ArtifactLocation &al);
|
virtual void putAt(ArtifactLocation al);
|
||||||
virtual void removeFrom(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
|
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;
|
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)
|
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 canBePutAt(const CArtifactSet *artSet, int slot, bool assumeDestRemoved = false) const OVERRIDE;
|
||||||
bool canBeDisassembled() const OVERRIDE;
|
bool canBeDisassembled() const OVERRIDE;
|
||||||
void putAt(ArtifactLocation &al) OVERRIDE;
|
void putAt(ArtifactLocation al) OVERRIDE;
|
||||||
void removeFrom(ArtifactLocation &al) OVERRIDE;
|
void removeFrom(ArtifactLocation al) OVERRIDE;
|
||||||
bool isPart(const CArtifactInstance *supposedPart) const OVERRIDE;
|
bool isPart(const CArtifactInstance *supposedPart) const OVERRIDE;
|
||||||
|
|
||||||
void createConstituents();
|
void createConstituents();
|
||||||
void addAsConstituent(CArtifactInstance *art, int slot);
|
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();
|
CCombinedArtifactInstance();
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
#include <boost/type_traits/remove_pointer.hpp>
|
#include <boost/type_traits/remove_pointer.hpp>
|
||||||
#include <boost/type_traits/remove_const.hpp>
|
#include <boost/type_traits/remove_const.hpp>
|
||||||
|
|
||||||
|
#include <boost/variant.hpp>
|
||||||
#include <boost/mpl/eval_if.hpp>
|
#include <boost/mpl/eval_if.hpp>
|
||||||
#include <boost/mpl/equal_to.hpp>
|
#include <boost/mpl/equal_to.hpp>
|
||||||
#include <boost/mpl/int.hpp>
|
#include <boost/mpl/int.hpp>
|
||||||
@ -19,6 +20,8 @@
|
|||||||
#include <boost/any.hpp>
|
#include <boost/any.hpp>
|
||||||
|
|
||||||
#include "ConstTransitivePtr.h"
|
#include "ConstTransitivePtr.h"
|
||||||
|
#include "CCreatureSet.h" //for CStackInstance
|
||||||
|
#include "CObjectHandler.h" //fo CArmedInstance
|
||||||
|
|
||||||
const ui32 version = 732;
|
const ui32 version = 732;
|
||||||
class CConnection;
|
class CConnection;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <boost/variant.hpp>
|
||||||
|
|
||||||
#include "BattleAction.h"
|
#include "BattleAction.h"
|
||||||
#include "HeroBonus.h"
|
#include "HeroBonus.h"
|
||||||
|
@ -812,7 +812,7 @@ CGameHandler::~CGameHandler(void)
|
|||||||
|
|
||||||
void CGameHandler::init(StartInfo *si)
|
void CGameHandler::init(StartInfo *si)
|
||||||
{
|
{
|
||||||
extern DLL_LINKAGE boost::rand48 ran;
|
//extern DLL_LINKAGE boost::rand48 ran;
|
||||||
if(!si->seedToBeUsed)
|
if(!si->seedToBeUsed)
|
||||||
si->seedToBeUsed = std::time(NULL);
|
si->seedToBeUsed = std::time(NULL);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user