(svn r2450) * Codechange: Replaced all uses of the arrays in tile.h with calls to the associated wrapper functions.

* Codechange: Made npf.c use some map array accessing wrappers instead of direct access.
* Codechange/Fix: Named every enum in tile.h. Fixes a nasty bug on MSVC where arrays would be initialised with zeroes (tnx Asterix_)
* Removed magic numbers from tables in tile.c.
* Added some explicit casts in tile.h.
This commit is contained in:
matthijs
2005-06-17 00:22:46 +00:00
parent 948d9f518f
commit a63a84ef5d
7 changed files with 146 additions and 127 deletions

View File

@@ -3,6 +3,7 @@
#include "pool.h"
#include "order.h"
#include "rail.h"
enum {
VEH_Train = 0x10,
@@ -340,7 +341,7 @@ typedef struct GetNewVehiclePosResult {
* For other vehicles types, or vehicles with no clear trackdir (such as those
* in depots), returns 0xFF.
*/
byte GetVehicleTrackdir(const Vehicle* v);
Trackdir GetVehicleTrackdir(const Vehicle* v);
/* returns true if staying in the same tile */
bool GetNewVehiclePos(Vehicle *v, GetNewVehiclePosResult *gp);