26 uint8 default_selection;
36 uint32
GetVariable(byte variable, uint32 parameter,
bool *available)
const;
70 typedef std::list<GenericCallback> GenericCallbackList;
72 static GenericCallbackList _gcl[GSF_END];
80 for (uint8 feature = 0; feature <
lengthof(_gcl); feature++) {
81 _gcl[feature].clear();
95 grfmsg(5,
"AddGenericCallback: Unsupported feature 0x%02X", feature);
111 case 0x80:
return this->cargo_type;
113 case 0x82:
return this->default_selection;
116 case 0x85:
return this->distance;
117 case 0x86:
return this->event;
118 case 0x87:
return this->count;
119 case 0x88:
return this->station_size;
125 DEBUG(grf, 1,
"Unhandled generic feature variable 0x%02X", variable);
155 this->cargo_type = 0;
156 this->default_selection = 0;
162 this->station_size = 0;
183 for (GenericCallbackList::const_iterator it = _gcl[feature].begin(); it != _gcl[feature].end(); ++it) {
184 object.grffile = it->file;
185 object.root_spritegroup = it->group;
187 object.callback_param1 = it->file->grf_version >= 8 ? param1_grfv8 : param1_grfv7;
188 uint16 result =
object.ResolveCallback();
192 if (file != NULL) *file = it->file;
234 object.generic_scope.cargo_type = cargo_type;
235 object.generic_scope.default_selection = default_selection;
236 object.generic_scope.src_industry = src_industry;
237 object.generic_scope.dst_industry = dst_industry;
238 object.generic_scope.distance = distance;
239 object.generic_scope.event = event;
240 object.generic_scope.count = count;
241 object.generic_scope.station_size = station_size;