(svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.

This commit is contained in:
rubidium
2007-07-09 19:38:12 +00:00
parent 0452fc482d
commit b876be0064
5 changed files with 121 additions and 112 deletions

View File

@@ -21,7 +21,7 @@ uint CountArticulatedParts(EngineID engine_type)
uint i;
for (i = 1; i < 10; i++) {
uint16 callback = GetVehicleCallback(CBID_TRAIN_ARTIC_ENGINE, i, 0, engine_type, NULL);
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, engine_type, NULL);
if (callback == CALLBACK_FAILED || callback == 0xFF) break;
}
@@ -36,7 +36,7 @@ void AddArticulatedParts(Vehicle **vl, VehicleType type)
if (!HASBIT(EngInfo(v->engine_type)->callbackmask, CBM_ARTIC_ENGINE)) return;
for (uint i = 1; i < 10; i++) {
uint16 callback = GetVehicleCallback(CBID_TRAIN_ARTIC_ENGINE, i, 0, v->engine_type, v);
uint16 callback = GetVehicleCallback(CBID_VEHICLE_ARTIC_ENGINE, i, 0, v->engine_type, v);
if (callback == CALLBACK_FAILED || callback == 0xFF) return;
/* Attempt to use pre-allocated vehicles until they run out. This can happen