[Scummvm-cvs-logs] CVS: scummvm/bs2 router.cpp,1.18,1.19
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Wed Oct 1 03:02:02 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky autoroute.cpp,1.19,1.20 compact.cpp,1.21,1.22 disk.cpp,1.47,1.48 grid.cpp,1.11,1.12 intro.cpp,1.38,1.39 logic.cpp,1.135,1.136 mouse.cpp,1.24,1.25 screen.cpp,1.49,1.50 screen.h,1.14,1.15 sound.cpp,1.37,1.38 text.cpp,1.54,1.55
- Next message: [Scummvm-cvs-logs] CVS: scummex image.cpp,1.22,1.23 resource.cpp,1.26,1.27 wxwindows.cpp,1.34,1.35 wxwindows.h,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv766
Modified Files:
router.cpp
Log Message:
whitespace changes
Index: router.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/router.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- router.cpp 30 Sep 2003 14:37:42 -0000 1.18
+++ router.cpp 1 Oct 2003 10:00:35 -0000 1.19
@@ -427,7 +427,7 @@
// routeFlag = 0;
}
- FloatRouteMem(); // float the _walkData array again
+ FloatRouteMem(); // float the _walkData array again
return routeFlag; // send back null route
}
@@ -435,7 +435,7 @@
int32 GetRoute(void) {
/*********************************************************************
* GetRoute.C extract a path from walk grid
- * 12 october 94
+ * 12 october 94
*
* GetRoute currently works by scanning grid data and coming up with
* a ROUTE as a series of way points(nodes).
@@ -522,7 +522,7 @@
// This is because I was unable to derive a function to relate number
// of steps taken between two points to the shrunken step size
- int32 p;
+ int32 p;
int32 dirS;
int32 dirD;
int32 dS;
@@ -544,8 +544,8 @@
int32 lastDir;
int32 nextDirS;
int32 nextDirD;
- int32 tempturns[4];
- int32 turns[4];
+ int32 tempturns[4];
+ int32 turns[4];
int32 turntable[NO_DIRECTIONS] = { 0, 1, 3, 5, 7, 5, 3, 1 };
// route.X route.Y and route.Dir start at far end
@@ -560,7 +560,7 @@
// for each section of the route
- do {
+ do {
dirS = route[p].dirS;
dirD = route[p].dirD;
nextDirS = route[p+1].dirS;
@@ -697,7 +697,7 @@
* No longer checks the data it only creates the smoothPath array JPS
*********************************************************************/
- static int32 k;
+ static int32 k;
int32 x;
int32 y;
int32 x2;
@@ -947,7 +947,7 @@
debug(5, "firstSlowOutFrame = %d", firstSlowOutFrame);
debug(5, "********************************");
- walk_pc = ob_mega->walk_pc;
+ walk_pc = ob_mega->walk_pc;
// lock the _walkData array (NB. AFTER loading walkgrid & walkdata!)
walkAnim = LockRouteMem();
@@ -1989,11 +1989,11 @@
int32 dly;
int32 dirX;
int32 dirY;
- int32 step1;
- int32 step2;
- int32 step3;
- int32 steps;
- int32 options;
+ int32 step1;
+ int32 step2;
+ int32 step3;
+ int32 steps;
+ int32 options;
steps = 0;
options = 0;
@@ -2180,7 +2180,7 @@
int32 dirx;
int32 diry;
int32 co;
- int32 slope;
+ int32 slope;
int32 i;
int32 xc;
int32 yc;
@@ -2188,22 +2188,22 @@
int32 ymin;
int32 xmax;
int32 ymax;
- int32 linesCrossed = 1;
+ int32 linesCrossed = 1;
if (x1 > x2) {
- xmin = x2;
+ xmin = x2;
xmax = x1;
} else {
- xmin = x1;
- xmax = x2;
+ xmin = x1;
+ xmax = x2;
}
if (y1 > y2) {
- ymin = y2;
+ ymin = y2;
ymax = y1;
} else {
- ymin = y1;
- ymax = y2;
+ ymin = y1;
+ ymax = y2;
}
// line set to go one step in chosen direction
@@ -2214,7 +2214,7 @@
co = (y1 * dirx)- (x1 * diry); // new line equation
- i = 0;
+ i = 0;
do {
// skip if not on module
@@ -2234,7 +2234,7 @@
xc = ((bars[i].co * dirx) - (co * bars[i].dx)) / slope;
// skip if not on module
- if (xc >= xmin - 1 && xc <= xmax + 1) {
+ if (xc >= xmin - 1 && xc <= xmax + 1) {
// skip if not on line
if (xc >= bars[i].xmin - 1 && xc <= bars[i].xmax + 1) {
yc = ((bars[i].co * diry) - (co * bars[i].dy)) / slope;
@@ -2263,38 +2263,38 @@
int32 xc;
int32 xmin;
int32 xmax;
- int32 linesCrossed = 1;
+ int32 linesCrossed = 1;
if (x1 > x2) {
- xmin = x2;
+ xmin = x2;
xmax = x1;
} else {
- xmin = x1;
- xmax = x2;
+ xmin = x1;
+ xmax = x2;
}
// line set to go one step in chosen direction
// so ignore if it hits anything
- i = 0;
+ i = 0;
do {
- // skip if not on module
+ // skip if not on module
if (xmax >= bars[i].xmin && xmin <= bars[i].xmax) {
- // skip if not on module
+ // skip if not on module
if (y >= bars[i].ymin && y <= bars[i].ymax) {
// okay its a valid line calculate an intercept
// wow but all this arithmatic we must have
// loads of time
if (bars[i].dy == 0)
- linesCrossed = 0;
+ linesCrossed = 0;
else {
ldy = y - bars[i].y1;
xc = bars[i].x1 + (bars[i].dx * ldy) / bars[i].dy;
// skip if not on module
- if (xc >= xmin - 1 && xc <= xmax + 1)
- linesCrossed = 0;
+ if (xc >= xmin - 1 && xc <= xmax + 1)
+ linesCrossed = 0;
}
}
}
@@ -2310,20 +2310,20 @@
int32 yc;
int32 ymin;
int32 ymax;
- int32 linesCrossed = 1;
+ int32 linesCrossed = 1;
if (y1 > y2) {
- ymin = y2;
+ ymin = y2;
ymax = y1;
} else {
- ymin = y1;
- ymax = y2;
+ ymin = y1;
+ ymax = y2;
}
// line set to go one step in chosen direction
// so ignore if it hits anything
- i = 0;
+ i = 0;
do {
if (x >= bars[i].xmin && x <= bars[i].xmax) {
@@ -2364,17 +2364,17 @@
int32 xmax;
int32 ymin;
int32 ymax;
- int32 onLine = 0;
+ int32 onLine = 0;
- xmin = x - 1;
+ xmin = x - 1;
xmax = x + 1;
- ymin = y - 1;
+ ymin = y - 1;
ymax = y + 1;
// check if point +- 1 is on the line
//so ignore if it hits anything
- i = 0;
+ i = 0;
do {
// overlapping line
@@ -2428,7 +2428,7 @@
uint16 firstFrameOfDirection;
uint16 walkFrameNo;
uint32 frameCounter = 0; // starts at frame 0 of mega set (16sep96 JEL)
-
+
nWalkFrames = ob_walkdata->nWalkFrames;
usingStandingTurnFrames = ob_walkdata->usingStandingTurnFrames;
usingWalkingTurnFrames = ob_walkdata->usingWalkingTurnFrames;
@@ -2459,8 +2459,8 @@
}
}
- diagonalx = modX[3];
- diagonaly = modY[3];
+ diagonalx = modX[3];
+ diagonaly = modY[3];
// interpret the walk data
@@ -2550,7 +2550,7 @@
int32 prevy;
int32 last;
int32 point;
- int32 p;
+ int32 p;
int32 dirx;
int32 diry;
int32 dir;
@@ -2680,8 +2680,8 @@
for (i = 1; i < nnodes; i++) {
node[i].level = 0;
- node[i].prev = 0;
- node[i].dist = 9999;
+ node[i].prev = 0;
+ node[i].dist = 9999;
}
// target position goes into final node
@@ -2694,7 +2694,7 @@
void PlotWalkGrid(void) {
int32 j;
-
+
// get walk grid file + extra grid into 'bars' & 'node' arrays
LoadWalkGrid();
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/sky autoroute.cpp,1.19,1.20 compact.cpp,1.21,1.22 disk.cpp,1.47,1.48 grid.cpp,1.11,1.12 intro.cpp,1.38,1.39 logic.cpp,1.135,1.136 mouse.cpp,1.24,1.25 screen.cpp,1.49,1.50 screen.h,1.14,1.15 sound.cpp,1.37,1.38 text.cpp,1.54,1.55
- Next message: [Scummvm-cvs-logs] CVS: scummex image.cpp,1.22,1.23 resource.cpp,1.26,1.27 wxwindows.cpp,1.34,1.35 wxwindows.h,1.16,1.17
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list