Fix compile warnings in debug mode

This commit is contained in:
Pali Rohár 2010-07-14 09:25:03 +02:00
parent a3b29846fe
commit eb9822b382
4 changed files with 7 additions and 7 deletions

View file

@ -848,7 +848,7 @@ void AiUnitKilled(CUnit *unit)
force->Attacking = false;
if (!force->Defending && force->State > 0) {
DebugPrint("%d: Attack force #%lu was destroyed, giving up\n"
_C_ unit->Player->Index _C_ (force - &(unit->Player->Ai->Force[0])));
_C_ unit->Player->Index _C_ (long unsigned int)(force - &(unit->Player->Ai->Force[0])));
force->Reset(true);
}
}

View file

@ -119,7 +119,7 @@ struct AiForceAttackSender {
goalX(x), goalY(y), delta(0) {
DebugPrint("%d: Attacking with force #%lu\n" _C_ AiPlayer->Player->Index
_C_ (force - &(AiPlayer->Force[0])));
_C_ (long unsigned int)(force - &(AiPlayer->Force[0])));
force->Attacking = true;
force->State = AI_FORCE_STATE_ATTACKING;
force->Units.for_each(*this);
@ -711,7 +711,7 @@ void AiForce::Update(void)
Attacking = false;
if (!Defending && State > 0) {
DebugPrint("%d: Attack force #%lu was destroyed, giving up\n"
_C_ AiPlayer->Player->Index _C_ (this - &(AiPlayer->Force[0])));
_C_ AiPlayer->Player->Index _C_ (long unsigned int)(this - &(AiPlayer->Force[0])));
Reset(true);
}
return;
@ -728,7 +728,7 @@ void AiForce::Update(void)
if (Attacking == false) {
if (!Defending && State > 0) {
DebugPrint("%d: Attack force #%lu has lost all agresive units, giving up\n"
_C_ AiPlayer->Player->Index _C_ (this - &(AiPlayer->Force[0])));
_C_ AiPlayer->Player->Index _C_ (long unsigned int)(this - &(AiPlayer->Force[0])));
Reset(true);
}
return ;
@ -847,7 +847,7 @@ void AiForce::Update(void)
// No enemy found, give up
// FIXME: should the force go home or keep trying to attack?
DebugPrint("%d: Attack force #%lu can't find a target, giving up\n"
_C_ AiPlayer->Player->Index _C_ (this - &(AiPlayer->Force[0])));
_C_ AiPlayer->Player->Index _C_ (long unsigned int)(this - &(AiPlayer->Force[0])));
Attacking = false;
return;
}

View file

@ -516,7 +516,7 @@ int AiForce::PlanAttack(void)
CUnit *transporter;
DebugPrint("%d: Planning for force #%lu of player #%d\n"_C_ AiPlayer->Player->Index
_C_ (this - &(AiPlayer->Force[0])) _C_ AiPlayer->Player->Index);
_C_ (long unsigned int)(this - &(AiPlayer->Force[0])) _C_ AiPlayer->Player->Index);
watermatrix = CreateMatrix();

View file

@ -114,8 +114,8 @@ public:
std::string File; /// Filename
std::string HashFile; /// Filename used in hash
SDL_Surface *Surface; /// Surface
frame_pos_t *frame_map;
SDL_Surface *SurfaceFlip; /// Flipped surface
frame_pos_t *frame_map;
frame_pos_t *frameFlip_map;
void GenFramesMap();
int Width; /// Width of a frame