summaryrefslogtreecommitdiff
path: root/src/vehiclelist.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-09-08 21:37:13 +0000
committerrubidium <rubidium@openttd.org>2010-09-08 21:37:13 +0000
commitf5128695c54ad634e1ac45ae4271c1db5ed15fad (patch)
tree7fe3411110d924b4c2d879f3c32ceb5a0ddd4f00 /src/vehiclelist.h
parent881c6c679ff2606111cb890847147556142c3451 (diff)
downloadopenttd-f5128695c54ad634e1ac45ae4271c1db5ed15fad.tar.xz
(svn r20772) -Codechange: use packed VehicleListIdentifiers as window numbers
Diffstat (limited to 'src/vehiclelist.h')
-rw-r--r--src/vehiclelist.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vehiclelist.h b/src/vehiclelist.h
index 5c13f326b..af984f451 100644
--- a/src/vehiclelist.h
+++ b/src/vehiclelist.h
@@ -34,6 +34,9 @@ struct VehicleListIdentifier {
CompanyID company; ///< The company associated with this list.
uint32 index; ///< A vehicle list type specific index.
+ uint32 Pack();
+ bool Unpack(uint32 data);
+
/**
* Create a simple vehicle list.
* @param type List type.
@@ -43,6 +46,11 @@ struct VehicleListIdentifier {
*/
VehicleListIdentifier(VehicleListType type, VehicleType vtype, CompanyID company, uint index = 0) :
type(type), vtype(vtype), company(company), index(index) {}
+
+ VehicleListIdentifier(uint32 data);
+
+ /** Simple empty constructor. In this case you must set everything! */
+ VehicleListIdentifier() {}
};
typedef SmallVector<const Vehicle *, 32> VehicleList;