(svn r16912) -Codechange: split waypoint.h in waypoint_base.h and waypoint_func.h

pull/155/head
rubidium 15 years ago
parent 43b040d2cf
commit 6435dc89fe

@ -1612,7 +1612,11 @@
> >
</File> </File>
<File <File
RelativePath=".\..\src\waypoint.h" RelativePath=".\..\src\waypoint_base.h"
>
</File>
<File
RelativePath=".\..\src\waypoint_func.h"
> >
</File> </File>
<File <File

@ -1609,7 +1609,11 @@
> >
</File> </File>
<File <File
RelativePath=".\..\src\waypoint.h" RelativePath=".\..\src\waypoint_base.h"
>
</File>
<File
RelativePath=".\..\src\waypoint_func.h"
> >
</File> </File>
<File <File

@ -331,7 +331,8 @@ vehiclelist.h
viewport_func.h viewport_func.h
viewport_type.h viewport_type.h
water.h water.h
waypoint.h waypoint_base.h
waypoint_func.h
waypoint_type.h waypoint_type.h
widget_type.h widget_type.h
win32.h win32.h

@ -3,7 +3,7 @@
/** @file ai_buoylist.cpp Implementation of AIBuoyList and friends. */ /** @file ai_buoylist.cpp Implementation of AIBuoyList and friends. */
#include "ai_buoylist.hpp" #include "ai_buoylist.hpp"
#include "../../waypoint.h" #include "../../waypoint_base.h"
AIBuoyList::AIBuoyList() AIBuoyList::AIBuoyList()
{ {

@ -11,7 +11,7 @@
#include "../../roadstop_base.h" #include "../../roadstop_base.h"
#include "../../depot_base.h" #include "../../depot_base.h"
#include "../../station_base.h" #include "../../station_base.h"
#include "../../waypoint.h" #include "../../waypoint_base.h"
/** /**
* Gets the order type given a tile * Gets the order type given a tile

@ -5,10 +5,10 @@
#include "ai_rail.hpp" #include "ai_rail.hpp"
#include "ai_map.hpp" #include "ai_map.hpp"
#include "ai_station.hpp" #include "ai_station.hpp"
#include "../../command_type.h"
#include "../../debug.h" #include "../../debug.h"
#include "../../station_base.h" #include "../../station_base.h"
#include "../../company_func.h" #include "../../company_func.h"
#include "../../waypoint.h"
#include "../../newgrf_generic.h" #include "../../newgrf_generic.h"
#include "../../newgrf_station.h" #include "../../newgrf_station.h"

@ -8,7 +8,7 @@
#include "../../string_func.h" #include "../../string_func.h"
#include "../../strings_func.h" #include "../../strings_func.h"
#include "../../company_func.h" #include "../../company_func.h"
#include "../../waypoint.h" #include "../../waypoint_base.h"
#include "../../core/alloc_func.hpp" #include "../../core/alloc_func.hpp"
#include "table/strings.h" #include "table/strings.h"

@ -7,7 +7,7 @@
#include "ai_waypoint.hpp" #include "ai_waypoint.hpp"
#include "../../company_func.h" #include "../../company_func.h"
#include "../../vehicle_base.h" #include "../../vehicle_base.h"
#include "../../waypoint.h" #include "../../waypoint_base.h"
AIWaypointList::AIWaypointList() AIWaypointList::AIWaypointList()
{ {

@ -8,6 +8,7 @@
#include "settings_type.h" #include "settings_type.h"
#include "company_func.h" #include "company_func.h"
#include "depot_func.h" #include "depot_func.h"
#include "slope_func.h"
/** /**
* Autoslope check for tiles with an entrance on an edge. * Autoslope check for tiles with an entrance on an edge.

@ -36,6 +36,7 @@
#include "subsidy_base.h" #include "subsidy_base.h"
#include "subsidy_func.h" #include "subsidy_func.h"
#include "station_base.h" #include "station_base.h"
#include "waypoint_base.h"
#include "economy_base.h" #include "economy_base.h"
#include "core/pool_func.hpp" #include "core/pool_func.hpp"

@ -7,7 +7,7 @@
#include "landscape.h" #include "landscape.h"
#include "debug.h" #include "debug.h"
#include "station_base.h" #include "station_base.h"
#include "waypoint.h" #include "waypoint_base.h"
#include "roadstop_base.h" #include "roadstop_base.h"
#include "newgrf_commons.h" #include "newgrf_commons.h"
#include "newgrf_station.h" #include "newgrf_station.h"

@ -24,6 +24,7 @@
#include "aircraft.h" #include "aircraft.h"
#include "roadveh.h" #include "roadveh.h"
#include "station_base.h" #include "station_base.h"
#include "waypoint_base.h"
#include "table/strings.h" #include "table/strings.h"

@ -10,6 +10,7 @@
#include "tile_type.h" #include "tile_type.h"
#include "group_type.h" #include "group_type.h"
#include "date_type.h" #include "date_type.h"
#include "company_type.h"
struct BackuppedOrders { struct BackuppedOrders {
BackuppedOrders() : order(NULL), name(NULL) { } BackuppedOrders() : order(NULL), name(NULL) { }

@ -25,6 +25,7 @@
#include "network/network.h" #include "network/network.h"
#include "settings_type.h" #include "settings_type.h"
#include "station_base.h" #include "station_base.h"
#include "waypoint_base.h"
#include "table/sprites.h" #include "table/sprites.h"
#include "table/strings.h" #include "table/strings.h"

@ -11,7 +11,6 @@
#include "command_func.h" #include "command_func.h"
#include "engine_base.h" #include "engine_base.h"
#include "depot_base.h" #include "depot_base.h"
#include "waypoint.h"
#include "yapf/yapf.h" #include "yapf/yapf.h"
#include "newgrf_engine.h" #include "newgrf_engine.h"
#include "newgrf_station.h" #include "newgrf_station.h"

@ -10,7 +10,7 @@
#include "viewport_func.h" #include "viewport_func.h"
#include "gfx_func.h" #include "gfx_func.h"
#include "command_func.h" #include "command_func.h"
#include "waypoint.h" #include "waypoint_func.h"
#include "newgrf_station.h" #include "newgrf_station.h"
#include "company_base.h" #include "company_base.h"
#include "strings_func.h" #include "strings_func.h"

@ -4,7 +4,7 @@
#include "../stdafx.h" #include "../stdafx.h"
#include "../station_base.h" #include "../station_base.h"
#include "../waypoint.h" #include "../waypoint_base.h"
#include "../roadstop_base.h" #include "../roadstop_base.h"
#include "../order_base.h" #include "../order_base.h"
#include "../vehicle_base.h" #include "../vehicle_base.h"

@ -3,7 +3,7 @@
/** @file waypoint_sl.cpp Code handling saving and loading of waypoints */ /** @file waypoint_sl.cpp Code handling saving and loading of waypoints */
#include "../stdafx.h" #include "../stdafx.h"
#include "../waypoint.h" #include "../waypoint_base.h"
#include "../newgrf_station.h" #include "../newgrf_station.h"
#include "../vehicle_base.h" #include "../vehicle_base.h"
#include "../town.h" #include "../town.h"

@ -20,7 +20,6 @@
#include "window_func.h" #include "window_func.h"
#include "string_func.h" #include "string_func.h"
#include "gfx_func.h" #include "gfx_func.h"
#include "waypoint.h"
#include "widgets/dropdown_type.h" #include "widgets/dropdown_type.h"
#include "widgets/dropdown_func.h" #include "widgets/dropdown_func.h"
#include "station_func.h" #include "station_func.h"

@ -33,7 +33,8 @@
#include "elrail_func.h" #include "elrail_func.h"
#include "station_base.h" #include "station_base.h"
#include "roadstop_base.h" #include "roadstop_base.h"
#include "waypoint.h" #include "waypoint_base.h"
#include "waypoint_func.h"
#include "table/strings.h" #include "table/strings.h"

@ -10,7 +10,7 @@
#include "station_base.h" #include "station_base.h"
#include "town.h" #include "town.h"
#include "screenshot.h" #include "screenshot.h"
#include "waypoint.h" #include "waypoint_base.h"
#include "industry.h" #include "industry.h"
#include "newgrf_text.h" #include "newgrf_text.h"
#include "music.h" #include "music.h"

@ -26,7 +26,6 @@
#include "landscape_type.h" #include "landscape_type.h"
#include "tilehighlight_func.h" #include "tilehighlight_func.h"
#include "settings_type.h" #include "settings_type.h"
#include "waypoint.h"
#include "table/sprites.h" #include "table/sprites.h"
#include "table/strings.h" #include "table/strings.h"
@ -639,13 +638,7 @@ static void ResetLandscapeConfirmationCallback(Window *w, bool confirmed)
FOR_ALL_BASE_STATIONS(st) { FOR_ALL_BASE_STATIONS(st) {
/* There can be buoys, remove them */ /* There can be buoys, remove them */
if (IsBuoyTile(st->xy)) DoCommand(st->xy, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR); if (IsBuoyTile(st->xy)) DoCommand(st->xy, 0, 0, DC_EXEC | DC_BANKRUPT, CMD_LANDSCAPE_CLEAR);
if (st->facilities == 0) delete st; if ((st->facilities & ~FACIL_WAYPOINT) == 0) delete st;
}
/* The same for waypoints */
Waypoint *wp;
FOR_ALL_WAYPOINTS(wp) {
delete wp;
} }
MarkWholeScreenDirty(); MarkWholeScreenDirty();

@ -27,7 +27,6 @@
#include "newgrf_townname.h" #include "newgrf_townname.h"
#include "newgrf_text.h" #include "newgrf_text.h"
#include "autoslope.h" #include "autoslope.h"
#include "waypoint.h"
#include "transparency.h" #include "transparency.h"
#include "tunnelbridge_map.h" #include "tunnelbridge_map.h"
#include "strings_func.h" #include "strings_func.h"

@ -17,6 +17,7 @@
#include "newgrf_engine.h" #include "newgrf_engine.h"
#include "newgrf_text.h" #include "newgrf_text.h"
#include "station_base.h" #include "station_base.h"
#include "waypoint_base.h"
#include "roadveh.h" #include "roadveh.h"
#include "train.h" #include "train.h"
#include "aircraft.h" #include "aircraft.h"

@ -10,7 +10,8 @@
#include "order_type.h" #include "order_type.h"
#include "station_type.h" #include "station_type.h"
#include "engine_type.h" #include "engine_type.h"
#include "waypoint.h" #include "waypoint_type.h"
#include "tile_type.h"
void DrawVehicleProfitButton(const Vehicle *v, int x, int y); void DrawVehicleProfitButton(const Vehicle *v, int x, int y);
void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent); void ShowVehicleRefitWindow(const Vehicle *v, VehicleOrderID order, Window *parent);

@ -23,6 +23,7 @@
#include "landscape.h" #include "landscape.h"
#include "viewport_func.h" #include "viewport_func.h"
#include "station_base.h" #include "station_base.h"
#include "waypoint_base.h"
#include "town.h" #include "town.h"
#include "signs_base.h" #include "signs_base.h"
#include "signs_func.h" #include "signs_func.h"
@ -36,6 +37,7 @@
#include "vehicle_func.h" #include "vehicle_func.h"
#include "company_func.h" #include "company_func.h"
#include "station_func.h" #include "station_func.h"
#include "waypoint_func.h"
#include "window_func.h" #include "window_func.h"
#include "tilehighlight_func.h" #include "tilehighlight_func.h"
#include "window_gui.h" #include "window_gui.h"

@ -5,13 +5,10 @@
#include "stdafx.h" #include "stdafx.h"
#include "strings_type.h" #include "strings_type.h"
#include "rail.h" #include "order_func.h"
#include "station_base.h"
#include "town.h"
#include "waypoint.h"
#include "window_func.h" #include "window_func.h"
#include "newgrf_station.h" #include "newgrf_station.h"
#include "order_func.h" #include "waypoint_base.h"
/** /**
* Draw a waypoint * Draw a waypoint

@ -1,18 +1,12 @@
/* $Id$ */ /* $Id$ */
/** @file waypoint.h Base of waypoints. */ /** @file waypoint_base.h Base of waypoints. */
#ifndef WAYPOINT_H #ifndef WAYPOINT_H
#define WAYPOINT_H #define WAYPOINT_H
#include "waypoint_type.h" #include "waypoint_type.h"
#include "rail_map.h"
#include "command_type.h"
#include "station_base.h" #include "station_base.h"
#include "town_type.h"
#include "viewport_type.h"
#include "date_type.h"
#include "core/pool_type.hpp"
struct Waypoint : SpecializedStation<Waypoint, true> { struct Waypoint : SpecializedStation<Waypoint, true> {
uint16 town_cn; ///< The Nth waypoint for this town (consecutive number) uint16 town_cn; ///< The Nth waypoint for this town (consecutive number)
@ -34,9 +28,4 @@ struct Waypoint : SpecializedStation<Waypoint, true> {
#define FOR_ALL_WAYPOINTS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Waypoint, var) #define FOR_ALL_WAYPOINTS(var) FOR_ALL_BASE_STATIONS_OF_TYPE(Waypoint, var)
CommandCost RemoveTrainWaypoint(TileIndex tile, DoCommandFlag flags, bool justremove);
void ShowWaypointWindow(const Waypoint *wp);
void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype);
void MakeDefaultWaypointName(Waypoint *wp);
#endif /* WAYPOINT_H */ #endif /* WAYPOINT_H */

@ -9,7 +9,7 @@
#include "economy_func.h" #include "economy_func.h"
#include "bridge_map.h" #include "bridge_map.h"
#include "town.h" #include "town.h"
#include "waypoint.h" #include "waypoint_base.h"
#include "yapf/yapf.h" #include "yapf/yapf.h"
#include "strings_func.h" #include "strings_func.h"
#include "gfx_func.h" #include "gfx_func.h"

@ -0,0 +1,17 @@
/* $Id$ */
/** @file waypoint_func.h Functions related to waypoints. */
#ifndef WAYPOINT_FUNC_H
#define WAYPOINT_FUNC_H
#include "rail_type.h"
#include "command_type.h"
#include "station_base.h"
CommandCost RemoveTrainWaypoint(TileIndex tile, DoCommandFlag flags, bool justremove);
void ShowWaypointWindow(const Waypoint *wp);
void DrawWaypointSprite(int x, int y, int stat_id, RailType railtype);
void MakeDefaultWaypointName(Waypoint *wp);
#endif /* WAYPOINT_FUNC_H */

@ -13,6 +13,7 @@
#include "command_func.h" #include "command_func.h"
#include "company_func.h" #include "company_func.h"
#include "window_func.h" #include "window_func.h"
#include "waypoint_base.h"
#include "table/strings.h" #include "table/strings.h"

@ -18,7 +18,7 @@
#include "../landscape.h" #include "../landscape.h"
#include "yapf.h" #include "yapf.h"
#include "../pathfind.h" #include "../pathfind.h"
#include "../waypoint.h" #include "../waypoint_base.h"
#include "../debug.h" #include "../debug.h"
#include "../settings_type.h" #include "../settings_type.h"
#include "../tunnelbridge.h" #include "../tunnelbridge.h"

Loading…
Cancel
Save