26 uint8 default_selection;
41 event(), count(0), station_size(0), ai_callback(ai_callback)
45 uint32
GetVariable(byte variable, uint32 parameter,
bool *available)
const;
79 typedef std::list<GenericCallback> GenericCallbackList;
81 static GenericCallbackList _gcl[GSF_END];
89 for (uint8 feature = 0; feature <
lengthof(_gcl); feature++) {
90 _gcl[feature].clear();
104 grfmsg(5,
"AddGenericCallback: Unsupported feature 0x%02X", feature);
120 case 0x80:
return this->cargo_type;
122 case 0x82:
return this->default_selection;
125 case 0x85:
return this->distance;
126 case 0x86:
return this->event;
127 case 0x87:
return this->count;
128 case 0x88:
return this->station_size;
134 DEBUG(grf, 1,
"Unhandled generic feature variable 0x%02X", variable);
174 for (GenericCallbackList::const_iterator it = _gcl[feature].begin(); it != _gcl[feature].end(); ++it) {
175 object.grffile = it->file;
176 object.root_spritegroup = it->group;
178 object.callback_param1 = it->file->grf_version >= 8 ? param1_grfv8 : param1_grfv7;
179 uint16 result =
object.ResolveCallback();
183 if (file != NULL) *file = it->file;
225 object.generic_scope.cargo_type = cargo_type;
226 object.generic_scope.default_selection = default_selection;
227 object.generic_scope.src_industry = src_industry;
228 object.generic_scope.dst_industry = dst_industry;
229 object.generic_scope.distance = distance;
230 object.generic_scope.event = event;
231 object.generic_scope.count = count;
232 object.generic_scope.station_size = station_size;