mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix small offset bugs. Label ride offsets
This commit is contained in:
parent
2468fb5ddf
commit
43550e2a7b
|
@ -412,13 +412,13 @@ static int award_is_deserved_most_disappointing(int awardType, int activeAwardTy
|
|||
disappointingRides = 0;
|
||||
|
||||
FOR_ALL_RIDES(i, ride) {
|
||||
if (ride->excitement == 0xFFFF || ride->var_158 == 0xFF)
|
||||
if (ride->excitement == 0xFFFF || ride->popularity == 0xFF)
|
||||
continue;
|
||||
|
||||
countedRides++;
|
||||
|
||||
// Satification maybe?
|
||||
if (ride->var_158 <= 6)
|
||||
// Unpopular
|
||||
if (ride->popularity <= 6)
|
||||
disappointingRides++;
|
||||
}
|
||||
|
||||
|
|
|
@ -1336,6 +1336,15 @@ static void peep_update_buying(rct_peep* peep)
|
|||
if (peep->sub_state == 1){
|
||||
//69138F
|
||||
}
|
||||
|
||||
if (peep->current_ride != peep->var_AD){
|
||||
rct_ride_type* ride_type = gRideTypeList[ride->subtype];
|
||||
if (ride_type->shop_item_secondary != 0xFF){
|
||||
money16 price = ride->price_secondary;
|
||||
|
||||
RCT2_CALLPROC_X(0x0069AF1E, ride_type->shop_item_secondary | (peep->current_ride << 8), 0, price, 0, (int)peep, 0, 0);
|
||||
}
|
||||
}
|
||||
//6912E9
|
||||
}
|
||||
/* rct2: 0x0069030A */
|
||||
|
|
|
@ -434,7 +434,7 @@ typedef struct {
|
|||
money32 cash_spent; // 0xA4
|
||||
sint32 time_in_park; // 0xA8
|
||||
uint8 var_AC; // 0xAC
|
||||
uint8 var_AD; // creation/hire time?
|
||||
uint8 var_AD; // 0xAD
|
||||
uint16 var_AE;
|
||||
rct_peep_thought thoughts[PEEP_MAX_THOUGHTS]; // 0xB0
|
||||
uint8 var_C4; // 0xC4
|
||||
|
|
|
@ -204,7 +204,7 @@ void game_command_hire_new_staff_member(int* eax, int* ebx, int* ecx, int* edx,
|
|||
sprite_move( newPeep->x, newPeep->y, newPeep->z, (rct_sprite*)newPeep);
|
||||
invalidate_sprite((rct_sprite*)newPeep);
|
||||
|
||||
newPeep->var_AD = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint8);
|
||||
newPeep->time_in_park = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_MONTH_YEAR, uint16);
|
||||
newPeep->var_CC = 0xFFFFFFFF;
|
||||
|
||||
uint8 colour = RCT2_ADDRESS(RCT2_ADDRESS_HANDYMAN_COLOUR, uint8)[staff_type > 2 ? 2 : staff_type];
|
||||
|
|
|
@ -173,14 +173,16 @@ typedef struct {
|
|||
};
|
||||
uint16 reliability; // 0x146
|
||||
uint16 var_148;
|
||||
uint16 var_14A;
|
||||
uint8 pad_14C;
|
||||
uint8 satisfaction; // 0x14A
|
||||
uint8 satisfaction_time_out; // 0x14B
|
||||
uint8 satisfaction_next; // 0x14C
|
||||
uint8 var_14D;
|
||||
uint8 pad_14E[0x02];
|
||||
uint32 total_customers; // 0x150
|
||||
money32 total_profit; // 0x154
|
||||
uint16 var_158;
|
||||
uint8 pad_15A;
|
||||
uint8 popularity; // 0x158
|
||||
uint8 popularity_time_out; // 0x159 Updated every purchase and also by time
|
||||
uint8 popularity_next; // 0x15A When timeout reached this will be the next popularity
|
||||
uint8 num_riders; // 0x15B
|
||||
uint8 music_tune_id; // 0x15C
|
||||
uint8 var_15D;
|
||||
|
|
|
@ -5725,7 +5725,7 @@ static void window_ride_customer_paint()
|
|||
y += 10;
|
||||
|
||||
// Popularity
|
||||
popularity = ride->var_158 & 0xFF;
|
||||
popularity = ride->popularity;
|
||||
if (popularity == 255) {
|
||||
stringId = STR_POPULARITY_UNKNOWN;
|
||||
} else {
|
||||
|
@ -5736,7 +5736,7 @@ static void window_ride_customer_paint()
|
|||
y += 10;
|
||||
|
||||
// Satisfaction
|
||||
satisfaction = ride->var_14A & 0xFF;
|
||||
satisfaction = ride->satisfaction;
|
||||
if (satisfaction == 255) {
|
||||
stringId = STR_SATISFACTION_UNKNOWN;
|
||||
} else {
|
||||
|
|
|
@ -471,16 +471,16 @@ static void window_ride_list_scrollpaint()
|
|||
break;
|
||||
case INFORMATION_TYPE_POPULARITY:
|
||||
formatSecondary = STR_POPULARITY_UNKNOWN_LABEL;
|
||||
if ((ride->var_158 & 0xFF) != 255) {
|
||||
if (ride->popularity != 255) {
|
||||
formatSecondary = STR_POPULARITY_LABEL;
|
||||
RCT2_GLOBAL(0x013CE952 + 2, uint16) = (ride->var_158 & 0xFF) * 4;
|
||||
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->popularity * 4;
|
||||
}
|
||||
break;
|
||||
case INFORMATION_TYPE_SATISFACTION:
|
||||
formatSecondary = STR_SATISFACTION_UNKNOWN_LABEL;
|
||||
if ((ride->var_14A & 0xFF) != 255) {
|
||||
if (ride->satisfaction != 255) {
|
||||
formatSecondary = STR_SATISFACTION_LABEL;
|
||||
RCT2_GLOBAL(0x013CE952 + 2, uint16) = (ride->var_14A & 0xFF) * 5;
|
||||
RCT2_GLOBAL(0x013CE952 + 2, uint16) = ride->satisfaction * 5;
|
||||
}
|
||||
break;
|
||||
case INFORMATION_TYPE_PROFIT:
|
||||
|
@ -616,7 +616,7 @@ static void window_ride_list_refresh_list(rct_window *w)
|
|||
case INFORMATION_TYPE_POPULARITY:
|
||||
while (--current_list_position >= 0) {
|
||||
otherRide = &g_ride_list[w->list_item_positions[current_list_position]];
|
||||
if ((ride->var_158 & 0xFF) * 4 <= (otherRide->var_158 & 0xFF) * 4)
|
||||
if (ride->popularity * 4 <= otherRide->popularity * 4)
|
||||
break;
|
||||
|
||||
window_bubble_list_item(w, current_list_position);
|
||||
|
@ -625,7 +625,7 @@ static void window_ride_list_refresh_list(rct_window *w)
|
|||
case INFORMATION_TYPE_SATISFACTION:
|
||||
while (--current_list_position >= 0) {
|
||||
otherRide = &g_ride_list[w->list_item_positions[current_list_position]];
|
||||
if ((ride->var_14A & 0xFF) * 5 <= (otherRide->var_14A & 0xFF) * 5)
|
||||
if (ride->satisfaction * 5 <= otherRide->satisfaction * 5)
|
||||
break;
|
||||
|
||||
window_bubble_list_item(w, current_list_position);
|
||||
|
|
Loading…
Reference in New Issue