From 5fa756fef46ef9e63235d89d467561d48a751c85 Mon Sep 17 00:00:00 2001 From: Ted John Date: Wed, 7 Sep 2016 21:15:19 +0100 Subject: [PATCH] Copy RCT2 peep fields to RCT1, most are the same --- src/rct1.h | 141 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 140 insertions(+), 1 deletion(-) diff --git a/src/rct1.h b/src/rct1.h index 3f341d5c3a..1db48c4d53 100644 --- a/src/rct1.h +++ b/src/rct1.h @@ -211,7 +211,146 @@ typedef struct rct1_peep { sint16 x; // 0x0E sint16 y; // 0x10 sint16 z; // 0x12 - uint8 pad_14[0xEC]; + // Width from center of sprite to edge + uint8 sprite_width; // 0x14 + // Height from center of sprite to top + uint8 sprite_height_positive; // 0x15 + sint16 sprite_left; // 0x16 + sint16 sprite_top; // 0x18 + sint16 sprite_right; // 0x1A + sint16 sprite_bottom; // 0x1C + uint8 sprite_direction; // 0x1E + uint8 pad_1F[3]; + rct_string_id name_string_idx; // 0x22 + uint16 next_x; // 0x24 + uint16 next_y; // 0x26 + uint8 next_z; // 0x28 + uint8 next_var_29; // 0x29 + uint8 outside_of_park; // 0x2A + uint8 state; // 0x2B + uint8 sub_state; // 0x2C + uint8 sprite_type; // 0x2D + uint8 type; // 0x2E + union{ + uint8 staff_type; // 0x2F + uint8 no_of_rides; // 0x2F + }; + uint8 tshirt_colour; // 0x30 + uint8 trousers_colour; // 0x31 + uint16 destination_x; // 0x32 Location that the peep is trying to get to + uint16 destination_y; // 0x34 + uint8 destination_tolerence; // 0x36 How close to destination before next action/state 0 = exact + uint8 var_37; + uint8 energy; // 0x38 + uint8 energy_growth_rate; // 0x39 + uint8 happiness; // 0x3A + uint8 happiness_growth_rate; // 0x3B + uint8 nausea; // 0x3C + uint8 nausea_growth_rate; // 0x3D + uint8 hunger; // 0x3E + uint8 thirst; // 0x3F + uint8 bathroom; // 0x40 + uint8 var_41; + uint8 var_42; + uint8 intensity; // 0x43 The max intensity is stored in the first 4 bits, and the min intensity in the second 4 bits + uint8 nausea_tolerance; // 0x44 + uint8 window_invalidate_flags; // 0x45 + money16 paid_on_drink; // 0x46 + uint8 ride_types_been_on[16]; // 0x48 + uint32 item_extra_flags; // 0x58 + uint8 photo2_ride_ref; // 0x5C + uint8 photo3_ride_ref; // 0x5D + uint8 photo4_ride_ref; // 0x5E + uint8 pad_5F[0x09]; // 0x5F + uint8 current_ride; // 0x68 + uint8 current_ride_station; // 0x69 + uint8 current_train; // 0x6A + union{ + struct{ + uint8 current_car; // 0x6B + uint8 current_seat; // 0x6C + }; + uint16 time_to_sitdown; //0x6B + struct{ + uint8 time_to_stand; //0x6B + uint8 standing_flags; //0x6C + }; + }; + // Normally 0, 1 for carrying sliding board on spiral slide ride, 2 for carrying lawn mower + uint8 special_sprite; // 0x6D + uint8 action_sprite_type; // 0x6E + // Seems to be used like a local variable, as it's always set before calling sub_693BAB, which reads this again + uint8 next_action_sprite_type; // 0x6F + uint8 action_sprite_image_offset; // 0x70 + uint8 action; // 0x71 + uint8 action_frame; // 0x72 + uint8 var_73; + union { + uint16 var_74; // time getting to ride to fix + uint16 next_in_queue; // 0x74 + }; + uint8 var_76; + uint8 pad_77; + union{ + uint8 maze_last_edge; // 0x78 + uint8 direction; //Direction ? + }; + uint8 var_79; + uint16 time_in_queue; // 0x7A + uint8 rides_been_on[32]; // 0x7C + // 255 bit bitmap of every ride the peep has been on see + // window_peep_rides_update for how to use. + uint32 id; // 0x9C + money32 cash_in_pocket; // 0xA0 + money32 cash_spent; // 0xA4 + sint32 time_in_park; // 0xA8 + sint8 var_AC; // 0xAC + uint8 previous_ride; // 0xAD + uint16 previous_ride_time_out; // 0xAE + rct_peep_thought thoughts[PEEP_MAX_THOUGHTS]; // 0xB0 + uint8 pad_C4; + union { + uint8 staff_id; // 0xC5 + uint8 guest_heading_to_ride_id; // 0xC5 + }; + union { + uint8 staff_orders; // 0xC6 + uint8 peep_is_lost_countdown; // 0xC6 + }; + uint8 photo1_ride_ref; // 0xC7 + uint32 peep_flags; // 0xC8 + rct_xyzd8 pathfind_goal; // 0xCC + rct_xyzd8 pathfind_history[4]; // 0xD0 + uint8 no_action_frame_no; // 0xE0 + // 0x3F Litter Count split into lots of 3 with time, 0xC0 Time since last recalc + uint8 litter_count; // 0xE1 + union{ + uint8 time_on_ride; // 0xE2 + uint8 var_E2; // 0xE2 + }; + // 0x3F Sick Count split into lots of 3 with time, 0xC0 Time since last recalc + uint8 disgusting_count; // 0xE3 + money16 paid_to_enter; // 0xE4 + money16 paid_on_rides; // 0xE6 + money16 paid_on_food; // 0xE8 + money16 paid_on_souvenirs; // 0xEA + uint8 no_of_food; // 0xEC + uint8 no_of_drinks; // 0xED + uint8 no_of_souvenirs; // 0xEE + uint8 var_EF; + uint8 voucher_type; // 0xF0 + uint8 voucher_arguments; // 0xF1 ride_id or string_offset_id + uint8 var_F2; + uint8 var_F3; + uint8 var_F4; + uint8 days_in_queue; // 0xF5 + uint8 balloon_colour; // 0xF6 + uint8 umbrella_colour; // 0xF7 + uint8 hat_colour; // 0xF8 + uint8 favourite_ride; // 0xF9 + uint8 favourite_ride_rating; // 0xFA + uint8 pad_FB; + uint32 item_standard_flags; // 0xFC } rct1_peep; assert_struct_size(rct1_peep, 0x100);