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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user