From 9319bee91fe1f937d4abab14ee4f9352e4680c49 Mon Sep 17 00:00:00 2001 From: Marijn van der Werf Date: Sat, 20 Aug 2016 23:12:52 +0200 Subject: [PATCH] Use already integrated data --- src/drawing/sprite.c | 2 +- src/peep/peep.c | 9 +++++---- src/ride/track.c | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/drawing/sprite.c b/src/drawing/sprite.c index d1af931368..4d7427af4c 100644 --- a/src/drawing/sprite.c +++ b/src/drawing/sprite.c @@ -413,7 +413,7 @@ void FASTCALL gfx_draw_sprite_software(rct_drawpixelinfo *dpi, int image_id, int //Trousers int trouser_type = (image_id >> 24) & 0x1f; - uint32 trouser_offset = palette_to_g1_offset[trouser_type]; //RCT2_ADDRESS(0x97FCBC, uint32)[trouser_type]; + uint32 trouser_offset = palette_to_g1_offset[trouser_type]; rct_g1_element trouser_palette = g1Elements[trouser_offset]; memcpy(palette_pointer + 0xCA, trouser_palette.offset + 0xF3, 12); } diff --git a/src/peep/peep.c b/src/peep/peep.c index 93a81529ba..df84bc6cc8 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -5992,8 +5992,8 @@ static int peep_update_patrolling_find_bin(rct_peep* peep){ peep_window_state_update(peep); peep->sub_state = 0; - peep->destination_x = (peep->x & 0xFFE0) + RCT2_ADDRESS(0x992A4C, uint16)[chosen_position * 2]; - peep->destination_y = (peep->y & 0xFFE0) + RCT2_ADDRESS(0x992A4E, uint16)[chosen_position * 2]; + peep->destination_x = (peep->x & 0xFFE0) + _992A4C[chosen_position].x; + peep->destination_y = (peep->y & 0xFFE0) + _992A4C[chosen_position].y; peep->destination_tolerence = 3; return 1; } @@ -6022,8 +6022,9 @@ static int peep_update_patrolling_find_grass(rct_peep* peep){ peep->state = PEEP_STATE_MOWING; peep_window_state_update(peep); peep->var_37 = 0; - peep->destination_x = peep->next_x + RCT2_ADDRESS(0x9929CA, uint16)[0 * 2]; - peep->destination_y = peep->next_y + RCT2_ADDRESS(0x9929CA, uint16)[0 * 2]; + // Original code used .y for both x and y. Changed to .x to make more sense (both x and y are 28) + peep->destination_x = peep->next_x + _9929C8[0].x; + peep->destination_y = peep->next_y + _9929C8[0].y; peep->destination_tolerence = 3; return 1; } diff --git a/src/ride/track.c b/src/ride/track.c index aa6babdf63..7971555e43 100644 --- a/src/ride/track.c +++ b/src/ride/track.c @@ -1939,7 +1939,7 @@ static money32 set_maze_track(uint16 x, uint8 flags, uint8 direction, uint16 y, rct_map_element *tmp_mapElement = map_get_track_element_at_of_type_from_ride(nextElementX, nextElementY, baseHeight, TRACK_ELEM_MAZE, rideIndex); if (tmp_mapElement != NULL) { - uint8 edx11 = RCT2_GLOBAL(0x993CFC + segmentBit, uint8); + uint8 edx11 = byte_993CFC[segmentBit]; tmp_mapElement->properties.track.maze_entry |= 1 << (edx11); }