1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-03 18:07:53 +01:00

Fixes for a couple of warnings

This commit is contained in:
Timmy Weerwag
2015-04-12 23:26:15 +02:00
parent 308337806e
commit 930a9d61dd
17 changed files with 51 additions and 47 deletions

View File

@@ -475,7 +475,7 @@ void viewport_update_position(rct_window *window)
if (window->viewport_target_sprite != -1){
rct_sprite* sprite = &g_sprite_list[window->viewport_target_sprite];
int height = map_element_height(0xFFFF & sprite->unknown.x, 0xFFFF & sprite->unknown.y) & 0xFFFF - 16;
int height = (map_element_height(0xFFFF & sprite->unknown.x, 0xFFFF & sprite->unknown.y) & 0xFFFF) - 16;
int underground = sprite->unknown.z < height;
viewport_set_underground_flag(underground, window, viewport);

View File

@@ -41,23 +41,23 @@ rct_window* g_window_list = RCT2_ADDRESS(RCT2_ADDRESS_WINDOW_LIST, rct_window);
// converted from uint16 values at 0x009A41EC - 0x009A4230
// these are percentage coordinates of the viewport to center to, if a window is obscuring a location, the next is tried
float window_scroll_locations[][2] = {
0.5f, 0.5f,
0.75f, 0.5f,
0.25f, 0.5f,
0.5f, 0.75f,
0.5f, 0.25f,
0.75f, 0.75f,
0.75f, 0.25f,
0.25f, 0.75f,
0.25f, 0.25f,
0.125f, 0.5f,
0.875f, 0.5f,
0.5f, 0.125f,
0.5f, 0.875f,
0.875f, 0.125f,
0.875f, 0.875f,
0.125f, 0.875f,
0.125f, 0.125f,
{0.5f, 0.5f},
{0.75f, 0.5f},
{0.25f, 0.5f},
{0.5f, 0.75f},
{0.5f, 0.25f},
{0.75f, 0.75f},
{0.75f, 0.25f},
{0.25f, 0.75f},
{0.25f, 0.25f},
{0.125f, 0.5f},
{0.875f, 0.5f},
{0.5f, 0.125f},
{0.5f, 0.875f},
{0.875f, 0.125f},
{0.875f, 0.875f},
{0.125f, 0.875f},
{0.125f, 0.125f},
};
static void window_all_wheel_input();