From 8fdf6e92424f0a4a54b7c9944bdb5537774be3c5 Mon Sep 17 00:00:00 2001 From: Oliver Kiehl Date: Sun, 27 Apr 2003 15:43:08 +0000 Subject: fixed cvs and modified autoroute parameters. removed initialisation from SkyState since it is only needed by SkyLogic svn-id: r7156 --- sky/autoroute.cpp | 7 ++++--- sky/autoroute.h | 6 ++++-- sky/sky.cpp | 1 - sky/sky.h | 2 -- 4 files changed, 8 insertions(+), 8 deletions(-) (limited to 'sky') 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; -- cgit v1.2.3