aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorOliver Kiehl2003-04-27 15:43:08 +0000
committerOliver Kiehl2003-04-27 15:43:08 +0000
commit8fdf6e92424f0a4a54b7c9944bdb5537774be3c5 (patch)
treef82f51dea33b14eb96fd2ea41525964154b4ba2d /sky
parent760924593c32771a3dc528bd594a8089224e04b4 (diff)
downloadscummvm-rg350-8fdf6e92424f0a4a54b7c9944bdb5537774be3c5.tar.gz
scummvm-rg350-8fdf6e92424f0a4a54b7c9944bdb5537774be3c5.tar.bz2
scummvm-rg350-8fdf6e92424f0a4a54b7c9944bdb5537774be3c5.zip
fixed cvs and modified autoroute parameters. removed initialisation from
SkyState since it is only needed by SkyLogic svn-id: r7156
Diffstat (limited to 'sky')
-rw-r--r--sky/autoroute.cpp7
-rw-r--r--sky/autoroute.h6
-rw-r--r--sky/sky.cpp1
-rw-r--r--sky/sky.h2
4 files changed, 8 insertions, 8 deletions
diff --git a/sky/autoroute.cpp b/sky/autoroute.cpp
index 2ce96dfb20..68c14ed713 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 SkyAutoRoute::autoRoute(Compact *cpt, uint16 *routeCalc) {
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
- uint16* routeCalc = _routeGrid + (ROUTE_GRID_SIZE >> 1) - 1;
+ routeCalc = _routeGrid + (ROUTE_GRID_SIZE >> 1) - 1;
uint8 stretch1, stretch2; // bl / bh
stretch1 = 0;
@@ -343,4 +343,5 @@ uint16 SkyAutoRoute::autoRoute(Compact *cpt) {
// saveRoute should now point to routeData
if (routeData > saveRoute) error("Autoroute: Internal pointer error! routeData overflow.");
return 1;
-} \ No newline at end of file
+}
+
diff --git a/sky/autoroute.h b/sky/autoroute.h
index 51ee842682..00e4baa230 100644
--- a/sky/autoroute.h
+++ b/sky/autoroute.h
@@ -24,6 +24,7 @@
#define __AutoRoute__
#include "stdafx.h"
+#include "sky/sky.h"
#include "struc.h"
#include "compact.h"
#include "grid.h"
@@ -35,11 +36,12 @@ class SkyAutoRoute {
public:
SkyAutoRoute(SkyGrid *pGrid);
~SkyAutoRoute(void);
- uint16 autoRoute(Compact *cpt);
+ uint16 autoRoute(Compact *cpt, uint16 *routeCalc);
private:
uint16 checkBlock(uint16 *blockPos);
SkyGrid *_grid;
uint16 *_routeGrid;
};
-#endif // __AutoRoute \ No newline at end of file
+#endif // __AutoRoute
+
diff --git a/sky/sky.cpp b/sky/sky.cpp
index 8958456111..d6e3719bd8 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -117,7 +117,6 @@ void SkyState::initialise(void) {
//initialiseRouter();
_skyText = getSkyText();
_grid = new SkyGrid(_skyDisk);
- _autoRoute = new SkyAutoRoute(_grid);
_skyLogic = new SkyLogic(_skyDisk, _grid);
}
diff --git a/sky/sky.h b/sky/sky.h
index c4668f4c4b..d4c8676fc8 100644
--- a/sky/sky.h
+++ b/sky/sky.h
@@ -33,7 +33,6 @@
#include "sky/struc.h"
#include "sky/skymusic.h"
#include "sky/grid.h"
-#include "sky/autoroute.h"
class SkyLogic;
class SkyGrid;
@@ -77,7 +76,6 @@ protected:
SkyGrid *_grid;
SkyLogic *_skyLogic;
SkyMusic *_music;
- SkyAutoRoute *_autoRoute;
byte *_workScreen;
byte *_backScreen;