(svn r20772) -Codechange: use packed VehicleListIdentifiers as window numbers

This commit is contained in:
rubidium
2010-09-08 21:37:13 +00:00
parent 881c6c679f
commit f5128695c5
11 changed files with 129 additions and 79 deletions

View File

@@ -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;