From b43ff24c3e7e86534b9cb9bbec5cf4e9c88b8556 Mon Sep 17 00:00:00 2001 From: Ted John Date: Wed, 14 Sep 2016 23:37:01 +0100 Subject: [PATCH] Use non _t versions of int for consistency --- src/interface/viewport.c | 26 +++++++++++++------------- src/paint/map_element/banner.c | 2 +- src/rct2.h | 4 ++-- src/windows/footpath.c | 2 +- src/windows/ride_construction.c | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/interface/viewport.c b/src/interface/viewport.c index be55559c5b..00b5f2c248 100644 --- a/src/interface/viewport.c +++ b/src/interface/viewport.c @@ -1373,14 +1373,14 @@ static void sub_68862C() */ void get_map_coordinates_from_pos(int screenX, int screenY, int flags, sint16 *x, sint16 *y, int *interactionType, rct_map_element **mapElement, rct_viewport **viewport) { - RCT2_GLOBAL(0x9AC154, uint16_t) = flags & 0xFFFF; - RCT2_GLOBAL(0x9AC148, uint8_t) = 0; + RCT2_GLOBAL(0x9AC154, uint16) = flags & 0xFFFF; + RCT2_GLOBAL(0x9AC148, uint8) = 0; rct_window* window = window_find_from_point(screenX, screenY); if (window != NULL && window->viewport != NULL) { rct_viewport* myviewport = window->viewport; - RCT2_GLOBAL(0x9AC138 + 4, int16_t) = screenX; - RCT2_GLOBAL(0x9AC138 + 6, int16_t) = screenY; + RCT2_GLOBAL(0x9AC138 + 4, sint16) = screenX; + RCT2_GLOBAL(0x9AC138 + 6, sint16) = screenY; screenX -= (int)myviewport->x; screenY -= (int)myviewport->y; if (screenX >= 0 && screenX < (int)myviewport->width && screenY >= 0 && screenY < (int)myviewport->height) @@ -1389,16 +1389,16 @@ void get_map_coordinates_from_pos(int screenX, int screenY, int flags, sint16 *x screenY <<= myviewport->zoom; screenX += (int)myviewport->view_x; screenY += (int)myviewport->view_y; - RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_ZOOM, uint16_t) = myviewport->zoom; + RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_ZOOM, uint16) = myviewport->zoom; screenX &= (0xFFFF << myviewport->zoom) & 0xFFFF; screenY &= (0xFFFF << myviewport->zoom) & 0xFFFF; - RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_X, int16_t) = screenX; - RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_Y, int16_t) = screenY; + RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_X, sint16) = screenX; + RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_Y, sint16) = screenY; rct_drawpixelinfo* dpi = RCT2_ADDRESS(RCT2_ADDRESS_VIEWPORT_DPI, rct_drawpixelinfo); - dpi->y = RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_Y, int16_t); + dpi->y = RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_Y, sint16); dpi->height = 1; - dpi->zoom_level = RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_ZOOM, uint16_t); - dpi->x = RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_X, int16_t); + dpi->zoom_level = RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_ZOOM, uint16); + dpi->x = RCT2_GLOBAL(RCT2_ADDRESS_VIEWPORT_PAINT_X, sint16); dpi->width = 1; g_ps_EE7880 = RCT2_ADDRESS(0xF1A4CC, paint_struct); unk_140E9A8 = dpi; @@ -1409,9 +1409,9 @@ void get_map_coordinates_from_pos(int screenX, int screenY, int flags, sint16 *x } if (viewport != NULL) *viewport = myviewport; } - if (interactionType != NULL) *interactionType = RCT2_GLOBAL(0x9AC148, uint8_t); - if (x != NULL) *x = RCT2_GLOBAL(0x9AC14C, int16_t); - if (y != NULL) *y = RCT2_GLOBAL(0x9AC14E, int16_t); + if (interactionType != NULL) *interactionType = RCT2_GLOBAL(0x9AC148, uint8); + if (x != NULL) *x = RCT2_GLOBAL(0x9AC14C, sint16); + if (y != NULL) *y = RCT2_GLOBAL(0x9AC14E, sint16); if (mapElement != NULL) *mapElement = _interaction_element; } diff --git a/src/paint/map_element/banner.c b/src/paint/map_element/banner.c index bed3c6af6f..6bd569a213 100644 --- a/src/paint/map_element/banner.c +++ b/src/paint/map_element/banner.c @@ -79,7 +79,7 @@ void banner_paint(uint8 direction, int height, rct_map_element* map_element) scrollingMode += direction; set_format_arg(0, uint32, 0); - set_format_arg(4, uint32_t, 0); + set_format_arg(4, uint32, 0); rct_string_id string_id = STR_NO_ENTRY; if (!(gBanners[map_element->properties.banner.index].flags & BANNER_FLAG_NO_ENTRY)) diff --git a/src/rct2.h b/src/rct2.h index 0aaaf00781..e8c60dc381 100644 --- a/src/rct2.h +++ b/src/rct2.h @@ -121,8 +121,8 @@ typedef uint8 colour_t; #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #define RCT2_ENDIANESS __ORDER_LITTLE_ENDIAN__ -#define LOBYTE(w) ((uint8_t)(w)) -#define HIBYTE(w) ((uint8_t)(((uint16_t)(w)>>8)&0xFF)) +#define LOBYTE(w) ((uint8)(w)) +#define HIBYTE(w) ((uint8)(((uint16)(w)>>8)&0xFF)) #endif // __BYTE_ORDER__ #ifndef RCT2_ENDIANESS diff --git a/src/windows/footpath.c b/src/windows/footpath.c index 71495e3a48..f92e5fad92 100644 --- a/src/windows/footpath.c +++ b/src/windows/footpath.c @@ -851,7 +851,7 @@ static void window_footpath_start_bridge_at_point(int screenX, int screenY) if (map_element_get_type(mapElement) == MAP_ELEMENT_TYPE_SURFACE) { // If we start the path on a slope, the arrow is slightly raised, so we // expect the path to be slightly raised as well. - uint8_t slope = mapElement->properties.surface.slope; + uint8 slope = mapElement->properties.surface.slope; z = mapElement->base_height; if (slope & 0x10) { // Steep diagonal slope diff --git a/src/windows/ride_construction.c b/src/windows/ride_construction.c index 35f632c235..d833395271 100644 --- a/src/windows/ride_construction.c +++ b/src/windows/ride_construction.c @@ -2280,7 +2280,7 @@ static void window_ride_construction_draw_track_piece( dpi->x += x - width / 2; dpi->y += y - height / 2 - 16; unk_140E9A8 = dpi; - uint32_t d = unknown << 16; + uint32 d = unknown << 16; d |= rideIndex; d |= trackType << 8;