aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorOliver Kiehl2003-04-27 16:36:24 +0000
committerOliver Kiehl2003-04-27 16:36:24 +0000
commit648add8aa88566fa1d8a2d616c7177f562aef8d8 (patch)
treee314d21c6b1ed6162589e9b01adc4bde19b77ea4 /sky
parentb22f6c31f6823c1fc73d81c86f06db3323eee82e (diff)
downloadscummvm-rg350-648add8aa88566fa1d8a2d616c7177f562aef8d8.tar.gz
scummvm-rg350-648add8aa88566fa1d8a2d616c7177f562aef8d8.tar.bz2
scummvm-rg350-648add8aa88566fa1d8a2d616c7177f562aef8d8.zip
fix mistake I did earlier
svn-id: r7160
Diffstat (limited to 'sky')
-rw-r--r--sky/autoroute.cpp5
-rw-r--r--sky/autoroute.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/sky/autoroute.cpp b/sky/autoroute.cpp
index cc62df7d78..5a3196995f 100644
--- a/sky/autoroute.cpp
+++ b/sky/autoroute.cpp
@@ -52,14 +52,14 @@ uint16 SkyAutoRoute::checkBlock(uint16 *blockPos) {
return retVal;
}
-uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 *routeCalc) {
+uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 **pSaveRoute) {
if (!cpt->extCompact)
error("SkyAutoRoute::autoRoute: fatal error. cpt->extCompact == NULL!\n");
uint16* routeData = (uint16*)cpt->extCompact->animScratch;
uint8* screenGrid = _grid->giveGrid(cpt->screen) - 4;
// ^^ this is actually a pointer to the last dword of the grid
- routeCalc = _routeGrid + (ROUTE_GRID_SIZE >> 1) - 1;
+ uint16 *routeCalc = _routeGrid + (ROUTE_GRID_SIZE >> 1) - 1;
uint8 stretch1, stretch2; // bl / bh
stretch1 = 0;
@@ -342,6 +342,7 @@ uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 *routeCalc) {
// I wonder why initY isn't checked
// saveRoute should now point to routeData
if (routeData > saveRoute) error("Autoroute: Internal pointer error! routeData overflow.");
+ *pSaveRoute = saveRoute;
return 1;
}
diff --git a/sky/autoroute.h b/sky/autoroute.h
index 00e4baa230..8663b6af97 100644
--- a/sky/autoroute.h
+++ b/sky/autoroute.h
@@ -36,7 +36,7 @@ class SkyAutoRoute {
public:
SkyAutoRoute(SkyGrid *pGrid);
~SkyAutoRoute(void);
- uint16 autoRoute(Compact *cpt, uint16 *routeCalc);
+ uint16 autoRoute(Compact *cpt, uint16 **pSaveRoute);
private:
uint16 checkBlock(uint16 *blockPos);
SkyGrid *_grid;