diff options
author | tron <tron@openttd.org> | 2004-12-05 12:43:04 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2004-12-05 12:43:04 +0000 |
commit | b8e83ca03fb8d652b8160419d9f1d07384f6f3e5 (patch) | |
tree | f4ed902f473744cc8497d09b3f372d3da1524f4f /engine.c | |
parent | a39770f23adf7d6e3c312deaf662900486123a5d (diff) | |
download | openttd-b8e83ca03fb8d652b8160419d9f1d07384f6f3e5.tar.xz |
(svn r955) Replace uint16 for orders with struct Order
This adds no functionality, but is a stepping stone for future improvement (like 16bit order indices) and is easier to read.
This changes preserves binary compatibility wrt savegames.
Diffstat (limited to 'engine.c')
-rw-r--r-- | engine.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -314,14 +314,14 @@ ResolveVehicleSpriteGroup(struct SpriteGroup *spritegroup, struct Vehicle *veh, // TTDPatch runs on little-endian arch; // Variable is 0x80 + offset in TTD's vehicle structure switch (dsg->variable - 0x80) { -#define veh_prop(id_, value_) case id_: value = value_; break +#define veh_prop(id_, value_) case (id_): value = (value_); break veh_prop(0x00, veh->type); veh_prop(0x01, veh->subtype); veh_prop(0x04, veh->index); veh_prop(0x05, veh->index & 0xFF); /* XXX? Is THIS right? */ - veh_prop(0x0A, veh->next_order_param << 8 | veh->next_order); - veh_prop(0x0B, veh->next_order); + veh_prop(0x0A, PackOrder(&veh->current_order)); + veh_prop(0x0B, PackOrder(&veh->current_order) & 0xff); veh_prop(0x0C, veh->num_orders); veh_prop(0x0D, veh->cur_order_index); veh_prop(0x10, veh->load_unload_time_rem); |