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
commit7c2448ecea6ec47f9df4928ad3f42668936835ee (patch)
treef4ed902f473744cc8497d09b3f372d3da1524f4f /engine.c
parent1de8e294d892a70edbd1f4f3d3a6a141711f6648 (diff)
downloadopenttd-7c2448ecea6ec47f9df4928ad3f42668936835ee.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);