1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-19 04:53:12 +01:00

Rename sprite list vehicle to train to reflect true use

This was found during the rct1 vehicle import branch. When importing it would load all vehicles into this list only to find that each car was treated as a seperate train.
This commit is contained in:
duncanspumpkin
2017-01-07 16:59:46 +00:00
parent 1a2227289a
commit ac5b0b0cf5
6 changed files with 7 additions and 7 deletions

View File

@@ -35,7 +35,7 @@ rct_vehicle *cable_lift_segment_create(int rideIndex, int x, int y, int z, int d
current->ride = rideIndex;
current->ride_subtype = 0xFF;
if (head) {
move_sprite_to_list((rct_sprite*)current, SPRITE_LIST_VEHICLE * 2);
move_sprite_to_list((rct_sprite*)current, SPRITE_LIST_TRAIN * 2);
ride->cable_lift = current->sprite_index;
}
current->is_child = head ? 0 : 1;

View File

@@ -4676,7 +4676,7 @@ static void vehicle_create_trains(int rideIndex, int x, int y, int z, rct_map_el
lastTrain = train;
// Add train to ride vehicle list
move_sprite_to_list((rct_sprite*)train.head, SPRITE_LIST_VEHICLE * 2);
move_sprite_to_list((rct_sprite*)train.head, SPRITE_LIST_TRAIN * 2);
for (int i = 0; i < 32; i++) {
if (ride->vehicles[i] == SPRITE_INDEX_NULL) {
ride->vehicles[i] = train.head->sprite_index;

View File

@@ -802,7 +802,7 @@ void vehicle_sounds_update()
}
}
gVehicleSoundParamsListEnd = &gVehicleSoundParamsList[0];
for (uint16 i = gSpriteListHead[SPRITE_LIST_VEHICLE]; i != SPRITE_INDEX_NULL; i = get_sprite(i)->vehicle.next) {
for (uint16 i = gSpriteListHead[SPRITE_LIST_TRAIN]; i != SPRITE_INDEX_NULL; i = get_sprite(i)->vehicle.next) {
vehicle_update_sound_params(&get_sprite(i)->vehicle);
}
for(int i = 0; i < countof(gVehicleSoundList); i++){
@@ -1051,7 +1051,7 @@ void vehicle_update_all()
return;
sprite_index = gSpriteListHead[SPRITE_LIST_VEHICLE];
sprite_index = gSpriteListHead[SPRITE_LIST_TRAIN];
while (sprite_index != SPRITE_INDEX_NULL) {
vehicle = &(get_sprite(sprite_index)->vehicle);
sprite_index = vehicle->next;

View File

@@ -1104,7 +1104,7 @@ static void window_map_paint_train_overlay(rct_drawpixelinfo *dpi)
sint16 left, top, right, bottom;
for (train_index = gSpriteListHead[SPRITE_LIST_VEHICLE]; train_index != SPRITE_INDEX_NULL; train_index = train->next) {
for (train_index = gSpriteListHead[SPRITE_LIST_TRAIN]; train_index != SPRITE_INDEX_NULL; train_index = train->next) {
train = GET_VEHICLE(train_index);
for (vehicle_index = train_index; vehicle_index != SPRITE_INDEX_NULL; vehicle_index = vehicle->next_vehicle_on_train) {
vehicle = GET_VEHICLE(vehicle_index);

View File

@@ -695,7 +695,7 @@ void litter_remove_at(int x, int y, int z)
static bool sprite_should_tween(rct_sprite *sprite)
{
switch (sprite->unknown.linked_list_type_offset >> 1) {
case SPRITE_LIST_VEHICLE:
case SPRITE_LIST_TRAIN:
case SPRITE_LIST_PEEP:
case SPRITE_LIST_UNKNOWN:
return true;

View File

@@ -36,7 +36,7 @@ enum SPRITE_IDENTIFIER {
enum SPRITE_LIST {
SPRITE_LIST_NULL,
SPRITE_LIST_VEHICLE,
SPRITE_LIST_TRAIN,
SPRITE_LIST_PEEP,
SPRITE_LIST_MISC,
SPRITE_LIST_LITTER,