[Scummvm-cvs-logs] SF.net SVN: scummvm: [30661] scummvm/trunk/engines/saga
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Jan 27 17:52:51 CET 2008
Revision: 30661
http://scummvm.svn.sourceforge.net/scummvm/?rev=30661&view=rev
Author: thebluegr
Date: 2008-01-27 08:52:50 -0800 (Sun, 27 Jan 2008)
Log Message:
-----------
Possible fix for the errors under older versions of GCC (e.g. under BeOS)
Modified Paths:
--------------
scummvm/trunk/engines/saga/actor.h
scummvm/trunk/engines/saga/actor_path.cpp
Modified: scummvm/trunk/engines/saga/actor.h
===================================================================
--- scummvm/trunk/engines/saga/actor.h 2008-01-27 16:11:19 UTC (rev 30660)
+++ scummvm/trunk/engines/saga/actor.h 2008-01-27 16:52:50 UTC (rev 30661)
@@ -181,7 +181,8 @@
struct PathDirectionData {
int8 direction;
- Point coord;
+ int x;
+ int y;
};
struct ActorFrameRange {
Modified: scummvm/trunk/engines/saga/actor_path.cpp
===================================================================
--- scummvm/trunk/engines/saga/actor_path.cpp 2008-01-27 16:11:19 UTC (rev 30660)
+++ scummvm/trunk/engines/saga/actor_path.cpp 2008-01-27 16:52:50 UTC (rev 30661)
@@ -31,14 +31,14 @@
namespace Saga {
static const PathDirectionData pathDirectionLUT[8][3] = {
- { { 0, Point( 0, -1) }, { 7, Point(-1, -1) }, { 4, Point( 1, -1) } },
- { { 1, Point( 1, 0) }, { 4, Point( 1, -1) }, { 5, Point( 1, 1) } },
- { { 2, Point( 0, 1) }, { 5, Point( 1, 1) }, { 6, Point(-1, 1) } },
- { { 3, Point(-1, 0) }, { 6, Point(-1, 1) }, { 7, Point(-1, -1) } },
- { { 0, Point( 0, -1) }, { 1, Point( 1, 0) }, { 4, Point( 1, -1) } },
- { { 1, Point( 1, 0) }, { 2, Point( 0, 1) }, { 5, Point( 1, 1) } },
- { { 2, Point( 0, 1) }, { 3, Point(-1, 0) }, { 6, Point(-1, 1) } },
- { { 3, Point(-1, 0) }, { 0, Point( 0, -1) }, { 7, Point(-1, -1) } }
+ { { 0, 0, -1 }, { 7, -1, -1 }, { 4, 1, -1 } },
+ { { 1, 1, 0 }, { 4, 1, -1 }, { 5, 1, 1 } },
+ { { 2, 0, 1 }, { 5, 1, 1 }, { 6, -1, 1 } },
+ { { 3, -1, 0 }, { 6, -1, 1 }, { 7, -1, -1 } },
+ { { 0, 0, -1 }, { 1, 1, 0 }, { 4, 1, -1 } },
+ { { 1, 1, 0 }, { 2, 0, 1 }, { 5, 1, 1 } },
+ { { 2, 0, 1 }, { 3, -1, 0 }, { 6, -1, 1 } },
+ { { 3, -1, 0 }, { 0, 0, -1 }, { 7, -1, -1 } }
};
static const int pathDirectionLUT2[8][2] = {
@@ -242,7 +242,8 @@
for (startDirection = 0; startDirection < 4; startDirection++) {
newPathDirection = addPathDirectionListData();
- newPathDirection->coord = fromPoint;
+ newPathDirection->x = fromPoint.x;
+ newPathDirection->y = fromPoint.y;
newPathDirection->direction = startDirection;
}
@@ -260,9 +261,9 @@
pathDirection = &_pathDirectionList[i];
for (directionCount = 0; directionCount < 3; directionCount++) {
samplePathDirection = &pathDirectionLUT[pathDirection->direction][directionCount];
- nextPoint = pathDirection->coord;
- nextPoint.x += samplePathDirection->coord.x;
- nextPoint.y += samplePathDirection->coord.y;
+ nextPoint = Point(pathDirection->x, pathDirection->y);
+ nextPoint.x += samplePathDirection->x;
+ nextPoint.y += samplePathDirection->y;
if (!validPathCellPoint(nextPoint)) {
continue;
@@ -278,7 +279,8 @@
addDebugPoint(nextPoint, samplePathDirection->direction + 96);
#endif
newPathDirection = addPathDirectionListData();
- newPathDirection->coord = nextPoint;
+ newPathDirection->x = nextPoint.x;
+ newPathDirection->y = nextPoint.y;
newPathDirection->direction = samplePathDirection->direction;
++pointCounter;
if (nextPoint == toPoint) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list