aboutsummaryrefslogtreecommitdiff
path: root/sword2/router.h
diff options
context:
space:
mode:
authorOliver Kiehl2003-09-13 20:42:08 +0000
committerOliver Kiehl2003-09-13 20:42:08 +0000
commit52ff6acc1fa224b3027d5e6268e37e681fdf2031 (patch)
treebdafcbd9413ff43b0204ff3595d0580c2d244cad /sword2/router.h
parent7eb758f69722a5c201c99c9f9c384494dd2e4cf0 (diff)
downloadscummvm-rg350-52ff6acc1fa224b3027d5e6268e37e681fdf2031.tar.gz
scummvm-rg350-52ff6acc1fa224b3027d5e6268e37e681fdf2031.tar.bz2
scummvm-rg350-52ff6acc1fa224b3027d5e6268e37e681fdf2031.zip
and another endian fix
svn-id: r10241
Diffstat (limited to 'sword2/router.h')
-rw-r--r--sword2/router.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/sword2/router.h b/sword2/router.h
index 447bdc9d33..364b884a61 100644
--- a/sword2/router.h
+++ b/sword2/router.h
@@ -24,6 +24,9 @@
#include "memory.h"
#include "object.h"
+#if !defined(__GNUC__)
+ #pragma START_PACK_STRUCTS
+#endif
typedef struct _walkData
{
@@ -32,9 +35,35 @@ typedef struct _walkData
int16 y;
uint8 step;
uint8 dir;
-} _walkData;
+} GCC_PACK _walkData;
+typedef struct
+{
+ int16 x1;
+ int16 y1;
+ int16 x2;
+ int16 y2;
+ int16 xmin;
+ int16 ymin;
+ int16 xmax;
+ int16 ymax;
+ int16 dx; // x2 - x1
+ int16 dy; // y2 - y1
+ int32 co; // co = (y1 *dx)- (x1*dy) from an equation for a line y*dx = x*dy + co
+} GCC_PACK _barData;
+typedef struct
+{
+ int16 x;
+ int16 y;
+ int16 level;
+ int16 prev;
+ int16 dist;
+} GCC_PACK _nodeData;
+
+#if !defined(__GNUC__)
+ #pragma END_PACK_STRUCTS
+#endif
int32 RouteFinder(Object_mega *ob_mega, Object_walkdata *ob_walkdata, int32 x, int32 y, int32 dir);