From 83feb9f2e85ed575c6b971730bcaf81a9c1f354e Mon Sep 17 00:00:00 2001
From: Joris <Joris.dauphin@gmail.com>
Date: Mon, 1 Nov 2010 17:00:08 +0100
Subject: [PATCH] Fix debug build from previous commit.

---
 src/action/action_attack.cpp   |  6 +++---
 src/action/action_resource.cpp |  2 +-
 src/ai/ai.cpp                  | 14 +++++++-------
 src/stratagus/groups.cpp       |  2 +-
 src/stratagus/missile.cpp      |  2 +-
 5 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/src/action/action_attack.cpp b/src/action/action_attack.cpp
index 972f68c95..ba6a05d95 100644
--- a/src/action/action_attack.cpp
+++ b/src/action/action_attack.cpp
@@ -204,7 +204,7 @@ static void MoveToTarget(CUnit *unit)
 		unit->CurrentAction() == UnitActionAttackGround);
 	Assert(unit->CanMove());
 	Assert(unit->CurrentOrder()->HasGoal()
-		 || (unit->CurrentOrder()->X != -1 && unit->CurrentOrder()->Y != -1));
+		 || (unit->CurrentOrder()->goalPos.x != -1 && unit->CurrentOrder()->goalPos.y != -1));
 
 	int err = DoActionMove(unit);
 
@@ -296,7 +296,7 @@ static void AttackTarget(CUnit *unit)
 
 	Assert(unit);
 	Assert(unit->CurrentOrder()->HasGoal() ||
-		(unit->CurrentOrder()->X != -1 && unit->CurrentOrder()->Y != -1));
+		(unit->CurrentOrder()->goalPos.x != -1 && unit->CurrentOrder()->goalPos.y != -1));
 
 	AnimateActionAttack(unit);
 	if (unit->Anim.Unbreakable) {
@@ -419,7 +419,7 @@ void HandleActionAttack(CUnit *unit)
 	Assert(unit->CurrentAction() == UnitActionAttackGround ||
 		unit->CurrentAction() == UnitActionAttack);
 	Assert(unit->CurrentOrder()->HasGoal() ||
-		 (unit->CurrentOrder()->X != -1 && unit->CurrentOrder()->Y != -1));
+		 (unit->CurrentOrder()->goalPos.x != -1 && unit->CurrentOrder()->goalPos.y != -1));
 
 	if (unit->Wait) {
 		unit->Wait--;
diff --git a/src/action/action_resource.cpp b/src/action/action_resource.cpp
index 23b123f87..8fb3e6f5e 100644
--- a/src/action/action_resource.cpp
+++ b/src/action/action_resource.cpp
@@ -766,7 +766,7 @@ static int WaitInDepot(CUnit *unit)
 			DebugPrint("%d: Worker %d report: [%d,%d] Resource gone near [%d,%d] in range %d. Sit and play dumb.\n"
 				_C_ unit->Player->Index _C_ unit->Slot
 				_C_ unit->tilePos.x _C_ unit->tilePos.y
-				_C_ x _C_ y _C_ range);
+				_C_ pos.x _C_ pos.y _C_ range);
 			if(depot)
 				DropOutOnSide(unit,
 					LookingW, depot->Type->TileWidth, depot->Type->TileHeight);
diff --git a/src/ai/ai.cpp b/src/ai/ai.cpp
index 6537e0f00..2753f4715 100644
--- a/src/ai/ai.cpp
+++ b/src/ai/ai.cpp
@@ -748,7 +748,7 @@ void AiHelpMe(const CUnit *attacker, CUnit *defender)
 
 	DebugPrint("%d: %d(%s) attacked at %d,%d\n" _C_
 		defender->Player->Index _C_ UnitNumber(defender) _C_
-		defender->Type->Ident.c_str() _C_ defender->X _C_ defender->Y);
+		defender->Type->Ident.c_str() _C_ defender->tilePos.x _C_ defender->tilePos.y);
 
 	//
 	//  Don't send help to scouts (zeppelin,eye of vision).
@@ -890,10 +890,10 @@ void AiWorkComplete(CUnit *unit, CUnit *what)
 	if (unit) {
 		DebugPrint("%d: %d(%s) build %s at %d,%d completed\n" _C_
 			what->Player->Index _C_ UnitNumber(unit) _C_ unit->Type->Ident.c_str() _C_
-			what->Type->Ident.c_str() _C_ unit->X _C_ unit->Y);
+			what->Type->Ident.c_str() _C_ unit->tilePos.x _C_ unit->tilePos.y);
 	} else {
 		DebugPrint("%d: building %s at %d,%d completed\n" _C_
-			what->Player->Index _C_ what->Type->Ident.c_str() _C_ what->X _C_ what->Y);
+			what->Player->Index _C_ what->Type->Ident.c_str() _C_ what->tilePos.x _C_ what->tilePos.y);
 	}
 
 	Assert(what->Player->Type != PlayerPerson);
@@ -910,7 +910,7 @@ void AiCanNotBuild(CUnit *unit, const CUnitType *what)
 {
 	DebugPrint("%d: %d(%s) Can't build %s at %d,%d\n" _C_
 		unit->Player->Index _C_ UnitNumber(unit) _C_ unit->Type->Ident.c_str() _C_
-		what->Ident.c_str() _C_ unit->X _C_ unit->Y);
+		what->Ident.c_str() _C_ unit->tilePos.x _C_ unit->tilePos.y);
 
 	Assert(unit->Player->Type != PlayerPerson);
 	AiReduceMadeInBuilt(unit->Player->Ai, what);
@@ -1087,7 +1087,7 @@ void AiTrainingComplete(CUnit *unit, CUnit *what)
 {
 	DebugPrint("%d: %d(%s) training %s at %d,%d completed\n" _C_
 		unit->Player->Index _C_ UnitNumber(unit) _C_ unit->Type->Ident.c_str() _C_
-		what->Type->Ident.c_str() _C_ unit->X _C_ unit->Y);
+		what->Type->Ident.c_str() _C_ unit->tilePos.x _C_ unit->tilePos.y);
 
 	Assert(unit->Player->Type != PlayerPerson);
 
@@ -1108,7 +1108,7 @@ void AiUpgradeToComplete(CUnit *unit, const CUnitType *what)
 {
 	DebugPrint("%d: %d(%s) upgrade-to %s at %d,%d completed\n" _C_
 		unit->Player->Index _C_ UnitNumber(unit) _C_ unit->Type->Ident.c_str() _C_
-		what->Ident.c_str() _C_ unit->X _C_ unit->Y);
+		what->Ident.c_str() _C_ unit->tilePos.x _C_ unit->tilePos.y);
 
 	Assert(unit->Player->Type != PlayerPerson);
 }
@@ -1123,7 +1123,7 @@ void AiResearchComplete(CUnit *unit, const CUpgrade *what)
 {
 	DebugPrint("%d: %d(%s) research %s at %d,%d completed\n" _C_
 		unit->Player->Index _C_ UnitNumber(unit) _C_ unit->Type->Ident.c_str() _C_
-		what->Ident.c_str() _C_ unit->X _C_ unit->Y);
+		what->Ident.c_str() _C_ unit->tilePos.x _C_ unit->tilePos.y);
 
 	Assert(unit->Player->Type != PlayerPerson);
 
diff --git a/src/stratagus/groups.cpp b/src/stratagus/groups.cpp
index 14d113b78..b2582914d 100644
--- a/src/stratagus/groups.cpp
+++ b/src/stratagus/groups.cpp
@@ -277,7 +277,7 @@ void GroupHelpMe(CUnit *attacker, CUnit *defender)
 
 	DebugPrint("%d: GroupHelpMe %d(%s) attacked at %d,%d\n" _C_
 		defender->Player->Index _C_ UnitNumber(defender) _C_
-		defender->Type->Ident.c_str() _C_ defender->X _C_ defender->Y);
+		defender->Type->Ident.c_str() _C_ defender->tilePos.x _C_ defender->tilePos.y);
 
 	//
 	//  Don't send help to scouts (zeppelin,eye of vision).
diff --git a/src/stratagus/missile.cpp b/src/stratagus/missile.cpp
index e53ccc63a..be79961b3 100644
--- a/src/stratagus/missile.cpp
+++ b/src/stratagus/missile.cpp
@@ -1689,7 +1689,7 @@ void MissileWhirlwind::Action()
 		this->source = this->position;
 		this->State = 0;
 		DebugPrint("Whirlwind new direction: %d, %d, TTL: %d\n" _C_
-			this->DX _C_ this->DY _C_ this->TTL);
+			this->destination.x _C_ this->destination.y _C_ this->TTL);
 	}
 }