mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-21 09:26:26 +00:00
fix mistake I did earlier
svn-id: r7160
This commit is contained in:
parent
b22f6c31f6
commit
648add8aa8
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user