summaryrefslogtreecommitdiff
path: root/engine.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2004-12-05 12:43:04 +0000
committertron <tron@openttd.org>2004-12-05 12:43:04 +0000
commitb8e83ca03fb8d652b8160419d9f1d07384f6f3e5 (patch)
treef4ed902f473744cc8497d09b3f372d3da1524f4f /engine.c
parenta39770f23adf7d6e3c312deaf662900486123a5d (diff)
downloadopenttd-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/engine.c b/engine.c
index d04688724..c18444109 100644
--- a/engine.c
+++ b/engine.c
@@ -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);