(svn r2046) -Codechange: moved all waypoint code to waypoint.c/waypoint.h

-Codechange: rewrote some functions while moving waypoint-stuff
-Add: added support for 64k waypoints
-Fix: made the waypoint struct a bit more logic (no bit-fucking)
This commit is contained in:
truelight
2005-03-24 17:03:37 +00:00
parent f86318407c
commit 83637d164e
20 changed files with 617 additions and 442 deletions

View File

@@ -13,6 +13,7 @@
#include "command.h"
#include "viewport.h"
#include "depot.h"
#include "waypoint.h"
static int OrderGetSel(Window *w)
{
@@ -219,7 +220,7 @@ static Order GetOrderCmdFromTile(Vehicle *v, uint tile)
&& (_map5[tile]&0xFE)==0xC4) {
order.type = OT_GOTO_WAYPOINT;
order.flags = 0;
order.station = GetWaypointByTile(tile);
order.station = GetWaypointByTile(tile)->index;
return order;
}
@@ -379,7 +380,7 @@ static void OrdersWndProc(Window *w, WindowEvent *e)
xy = GetDepot(ord->station)->xy;
break;
case OT_GOTO_WAYPOINT: /* goto waypoint order */
xy = _waypoints[ord->station].xy;
xy = GetWaypoint(ord->station)->xy;
}
if (xy)