1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Name peep variables for current train and car

This commit is contained in:
ZedThree
2014-05-01 09:18:29 +02:00
parent f236c077bf
commit 1255d24be6
3 changed files with 8 additions and 6 deletions

View File

@@ -214,9 +214,11 @@ void news_item_get_subject_location(int type, int subject, int *x, int *y, int *
break;
}
sprite_2 = &(RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite)[ride->var_086[sprite->peep.var_6A]]);
for (i = 0; i < sprite->peep.var_6B; i++)
sprite_2 = &(RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite)[*((uint16*)&sprite_2->pad_00[0x3E])]);
// Find the train peep is on
sprite_2 = &(RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite)[ride->train_car_map[sprite->peep.current_train]]);
// Find the car peep is on
for (i = 0; i < sprite->peep.current_car; i++)
sprite_2 = &(RCT2_ADDRESS(RCT2_ADDRESS_SPRITE_LIST, rct_sprite)[*((uint16*)&sprite_2->pad_00[0x3e])]);
*x = sprite_2->unknown.x;
*y = sprite_2->unknown.y;
*z = sprite_2->unknown.z;

View File

@@ -72,8 +72,8 @@ typedef struct {
uint8 happiness; // 0x3A
uint8 pad_03B[0x2D];
uint8 current_ride; // 0x68
uint8 var_6A;
uint8 var_6B;
uint8 current_train; // 0x6A
uint8 current_car; // 0x6B
uint8 pad_6C[0x30];
uint32 id; // 0x9C
uint8 pad_A0[0x10];

View File

@@ -38,7 +38,7 @@ typedef struct {
uint8 pad_052[0x18];
uint16 var_06A[4]; // probably entrance map coordinates
uint8 pad_072[0x14];
uint16 var_086[1];
uint16 train_car_map[1]; // 0x86 Points to the first car in the train
uint8 pad_088[0x68];
sint16 excitement; // 0x0F0
sint16 intensity; // 0x0F2