fixed cvs and modified autoroute parameters. removed initialisation from

SkyState since it is only needed by SkyLogic

svn-id: r7156
This commit is contained in:
Oliver Kiehl 2003-04-27 15:43:08 +00:00
parent 760924593c
commit 8fdf6e9242
4 changed files with 8 additions and 8 deletions

View File

@ -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;
}
}

View File

@ -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
#endif // __AutoRoute

View File

@ -117,7 +117,6 @@ void SkyState::initialise(void) {
//initialiseRouter();
_skyText = getSkyText();
_grid = new SkyGrid(_skyDisk);
_autoRoute = new SkyAutoRoute(_grid);
_skyLogic = new SkyLogic(_skyDisk, _grid);
}

View File

@ -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;