Fixed compilation problems on Window
This commit is contained in:
@@ -16,7 +16,7 @@ class Navigator: public CardSelectorBase
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Navigator(DuelLayers* inDuelLayers);
|
Navigator(GameObserver *observer, DuelLayers* inDuelLayers);
|
||||||
virtual ~Navigator();
|
virtual ~Navigator();
|
||||||
|
|
||||||
// Inherited functions from GuiLayer
|
// Inherited functions from GuiLayer
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ MTGGameZone::MTGGameZone() :
|
|||||||
|
|
||||||
MTGGameZone::~MTGGameZone()
|
MTGGameZone::~MTGGameZone()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < cards.size(); i++)
|
for (size_t i = 0; i < cards.size(); i++)
|
||||||
{
|
{
|
||||||
SAFE_DELETE( cards[i] );
|
SAFE_DELETE( cards[i] );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -382,8 +382,8 @@ CardZone* LandCardZone::EnterZone(JButton inDirection)
|
|||||||
/*
|
/*
|
||||||
** Constructor. All the navigation logic is initialized here, by pairing up each card zone with a set of neighbours.
|
** Constructor. All the navigation logic is initialized here, by pairing up each card zone with a set of neighbours.
|
||||||
*/
|
*/
|
||||||
Navigator::Navigator(DuelLayers* inDuelLayers) :
|
Navigator::Navigator(GameObserver *observer, DuelLayers* inDuelLayers) :
|
||||||
mDrawPosition(kDefaultCardPosition), mDuelLayers(inDuelLayers), mLimitorEnabled(false)
|
CardSelectorBase(observer), mDrawPosition(kDefaultCardPosition), mDuelLayers(inDuelLayers), mLimitorEnabled(false)
|
||||||
{
|
{
|
||||||
assert(mDuelLayers);
|
assert(mDuelLayers);
|
||||||
|
|
||||||
@@ -500,10 +500,10 @@ bool Navigator::CheckUserInput(JButton inKey)
|
|||||||
switch (inKey)
|
switch (inKey)
|
||||||
{
|
{
|
||||||
case JGE_BTN_SEC:
|
case JGE_BTN_SEC:
|
||||||
GameObserver::GetInstance()->cancelCurrentAction();
|
observer->cancelCurrentAction();
|
||||||
return true;
|
return true;
|
||||||
case JGE_BTN_OK:
|
case JGE_BTN_OK:
|
||||||
GameObserver::GetInstance()->ButtonPressed(GetCurrentCard());
|
observer->ButtonPressed(GetCurrentCard());
|
||||||
return true;
|
return true;
|
||||||
break;
|
break;
|
||||||
case JGE_BTN_LEFT:
|
case JGE_BTN_LEFT:
|
||||||
|
|||||||
@@ -291,7 +291,7 @@ MTGPlayerCards * TestSuite::buildDeck(Player* player, int playerId)
|
|||||||
|
|
||||||
for (int j = 0; j < 4; j++)
|
for (int j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
for (int k = 0; k < loadedPlayerZones[j]->cards.size(); k++)
|
for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++)
|
||||||
{
|
{
|
||||||
int cardid = loadedPlayerZones[j]->cards[k]->getId();
|
int cardid = loadedPlayerZones[j]->cards[k]->getId();
|
||||||
list[nbcards] = cardid;
|
list[nbcards] = cardid;
|
||||||
@@ -338,7 +338,7 @@ void TestSuite::initGame(GameObserver* g)
|
|||||||
for (int j = 0; j < 4; j++)
|
for (int j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
MTGGameZone * zone = playerZones[j];
|
MTGGameZone * zone = playerZones[j];
|
||||||
for (int k = 0; k < loadedPlayerZones[j]->cards.size(); k++)
|
for (size_t k = 0; k < loadedPlayerZones[j]->cards.size(); k++)
|
||||||
{
|
{
|
||||||
MTGCardInstance * card = Rules::getCardByMTGId(g, loadedPlayerZones[j]->cards[k]->getId());
|
MTGCardInstance * card = Rules::getCardByMTGId(g, loadedPlayerZones[j]->cards[k]->getId());
|
||||||
if (card && zone != p->game->library)
|
if (card && zone != p->game->library)
|
||||||
@@ -348,7 +348,7 @@ void TestSuite::initGame(GameObserver* g)
|
|||||||
MTGCardInstance * copy = p->game->putInZone(card, p->game->library, p->game->stack);
|
MTGCardInstance * copy = p->game->putInZone(card, p->game->library, p->game->stack);
|
||||||
Spell * spell = NEW Spell(g, copy);
|
Spell * spell = NEW Spell(g, copy);
|
||||||
spell->resolve();
|
spell->resolve();
|
||||||
if (!summoningSickness && p->game->inPlay->nb_cards > k) p->game->inPlay->cards[k]->summoningSickness = 0;
|
if (!summoningSickness && (size_t)p->game->inPlay->nb_cards > k) p->game->inPlay->cards[k]->summoningSickness = 0;
|
||||||
delete spell;
|
delete spell;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -457,7 +457,7 @@ int TestSuite::assertGame(GameObserver* g)
|
|||||||
Log(result);
|
Log(result);
|
||||||
error++;
|
error++;
|
||||||
}
|
}
|
||||||
for (int k = 0; k < endstateZones[j]->nb_cards; k++)
|
for (size_t k = 0; k < (size_t)endstateZones[j]->nb_cards; k++)
|
||||||
{
|
{
|
||||||
MTGCardInstance* cardToCheck = (k<endstateZones[j]->cards.size())?endstateZones[j]->cards[k]:0;
|
MTGCardInstance* cardToCheck = (k<endstateZones[j]->cards.size())?endstateZones[j]->cards[k]:0;
|
||||||
if(cardToCheck)
|
if(cardToCheck)
|
||||||
|
|||||||
Reference in New Issue
Block a user