mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 13:33:02 +01:00
fix several warnings
This commit is contained in:
@@ -337,7 +337,7 @@ void sub_6E7FF3(rct_window *window, rct_viewport *viewport, int x, int y)
|
||||
viewport->x >= window->x + window->width ||
|
||||
viewport->y + viewport->height <= window->y ||
|
||||
viewport->y >= window->y + window->height)
|
||||
return sub_6E7FF3(window + 1, viewport, x, y);
|
||||
sub_6E7FF3(window + 1, viewport, x, y);
|
||||
|
||||
// save viewport
|
||||
rct_viewport view_copy;
|
||||
@@ -2908,7 +2908,7 @@ void screen_get_map_xy_side_with_z(sint16 screenX, sint16 screenY, sint16 z, sin
|
||||
*
|
||||
* @returns rotation in range 0-3 (inclusive)
|
||||
*/
|
||||
uint32 get_current_rotation()
|
||||
uint8 get_current_rotation()
|
||||
{
|
||||
uint32 rotation = RCT2_GLOBAL(RCT2_ADDRESS_CURRENT_ROTATION, uint32);
|
||||
uint32 rotation_masked = rotation & 3;
|
||||
@@ -2917,5 +2917,5 @@ uint32 get_current_rotation()
|
||||
log_error("Found wrong rotation %d! Will return %d instead.", rotation, rotation_masked);
|
||||
}
|
||||
#endif // DEBUG_LEVEL_1
|
||||
return rotation_masked;
|
||||
return (uint8)rotation_masked;
|
||||
}
|
||||
|
||||
@@ -144,6 +144,6 @@ void screen_get_map_xy_quadrant_with_z(sint16 screenX, sint16 screenY, sint16 z,
|
||||
void screen_get_map_xy_side(sint16 screenX, sint16 screenY, sint16 *mapX, sint16 *mapY, uint8 *side);
|
||||
void screen_get_map_xy_side_with_z(sint16 screenX, sint16 screenY, sint16 z, sint16 *mapX, sint16 *mapY, uint8 *side);
|
||||
|
||||
uint32 get_current_rotation();
|
||||
uint8 get_current_rotation();
|
||||
|
||||
#endif
|
||||
|
||||
@@ -408,7 +408,7 @@ static size_t encode_chunk_repeat(const uint8 *src_buffer, uint8 *dst_buffer, si
|
||||
*dst_buffer++ = src_buffer[0];
|
||||
outLength += 2;
|
||||
|
||||
// Itereate through remainder of the source buffer
|
||||
// Iterate through remainder of the source buffer
|
||||
for (i = 1; i < length; ) {
|
||||
searchIndex = max(0, i - 32);
|
||||
searchEnd = i - 1;
|
||||
@@ -440,7 +440,7 @@ static size_t encode_chunk_repeat(const uint8 *src_buffer, uint8 *dst_buffer, si
|
||||
outLength += 2;
|
||||
i++;
|
||||
} else {
|
||||
*dst_buffer++ = (bestRepeatCount - 1) | ((32 - (i - bestRepeatIndex)) << 3);
|
||||
*dst_buffer++ = (uint8)((bestRepeatCount - 1) | ((32 - (i - bestRepeatIndex)) << 3));
|
||||
outLength++;
|
||||
i += bestRepeatCount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user