1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Use non _t versions of int for consistency

This commit is contained in:
Ted John
2016-09-14 23:37:01 +01:00
parent aa3dd894ee
commit b43ff24c3e
5 changed files with 18 additions and 18 deletions

View File

@@ -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;
}

View File

@@ -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))

View File

@@ -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

View File

@@ -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

View File

@@ -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;