mirror of
https://github.com/OpenRCT2/OpenRCT2.git
synced 2025-01-22 18:31:59 -05:00
GCC fixes
This commit is contained in:
parent
d19727afc7
commit
edbd55a8bd
9 changed files with 20 additions and 18 deletions
|
@ -64,7 +64,7 @@ sint32 gDropdownDefaultIndex;
|
|||
|
||||
bool dropdown_is_checked(sint32 index)
|
||||
{
|
||||
if (index < 0 || index >= Util::CountOf(_dropdownItemsDisabled))
|
||||
if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ bool dropdown_is_checked(sint32 index)
|
|||
|
||||
bool dropdown_is_disabled(sint32 index)
|
||||
{
|
||||
if (index < 0 || index >= Util::CountOf(_dropdownItemsDisabled))
|
||||
if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ bool dropdown_is_disabled(sint32 index)
|
|||
|
||||
void dropdown_set_checked(sint32 index, bool value)
|
||||
{
|
||||
if (index < 0 || index >= Util::CountOf(_dropdownItemsDisabled))
|
||||
if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ void dropdown_set_checked(sint32 index, bool value)
|
|||
|
||||
void dropdown_set_disabled(sint32 index, bool value)
|
||||
{
|
||||
if (index < 0 || index >= Util::CountOf(_dropdownItemsDisabled))
|
||||
if (index < 0 || index >= (sint32)Util::CountOf(_dropdownItemsDisabled))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -666,7 +666,7 @@ static void window_editor_inventions_list_scrollmousedown(rct_window *w, sint32
|
|||
if (researchItem == NULL)
|
||||
return;
|
||||
|
||||
if (researchItem->entryIndex < (uint32)RESEARCHED_ITEMS_END_2 && research_item_is_always_researched(researchItem))
|
||||
if (researchItem->entryIndex < RESEARCHED_ITEMS_END_2 && research_item_is_always_researched(researchItem))
|
||||
return;
|
||||
|
||||
window_invalidate(w);
|
||||
|
@ -721,7 +721,7 @@ static void window_editor_inventions_list_cursor(rct_window *w, rct_widgetindex
|
|||
if (researchItem == NULL)
|
||||
return;
|
||||
|
||||
if (researchItem->entryIndex < (uint32)RESEARCHED_ITEMS_END_2 && research_item_is_always_researched(researchItem)) {
|
||||
if (researchItem->entryIndex < RESEARCHED_ITEMS_END_2 && research_item_is_always_researched(researchItem)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -1478,7 +1478,7 @@ static void window_editor_object_selection_set_pressed_tab(rct_window *w)
|
|||
static void window_editor_object_selection_select_default_objects()
|
||||
{
|
||||
if (_numSelectedObjectsForType[0] == 0) {
|
||||
for (sint32 i = 0; i < Util::CountOf(DefaultSelectedObjects); i++) {
|
||||
for (sint32 i = 0; i < (sint32)Util::CountOf(DefaultSelectedObjects); i++) {
|
||||
window_editor_object_selection_select_object(0, 7, &DefaultSelectedObjects[i]);
|
||||
}
|
||||
}
|
||||
|
@ -1492,7 +1492,7 @@ static void window_editor_object_selection_select_required_objects()
|
|||
{
|
||||
sint32 i;
|
||||
|
||||
for (i = 0; i < Util::CountOf(RequiredSelectedObjects); i++)
|
||||
for (i = 0; i < (sint32)Util::CountOf(RequiredSelectedObjects); i++)
|
||||
window_editor_object_selection_select_object(0, 0xF, &RequiredSelectedObjects[i]);
|
||||
}
|
||||
|
||||
|
|
|
@ -303,7 +303,7 @@ static void window_new_ride_populate_list()
|
|||
ride_list_item *nextListItem = _windowNewRideListItems;
|
||||
|
||||
// For each ride type in the view order list
|
||||
for (sint32 i = 0; i < Util::CountOf(RideTypeViewOrder); i++) {
|
||||
for (sint32 i = 0; i < (sint32)Util::CountOf(RideTypeViewOrder); i++) {
|
||||
uint8 rideType = RideTypeViewOrder[i];
|
||||
if (rideType == RIDE_TYPE_NULL)
|
||||
continue;
|
||||
|
@ -820,7 +820,8 @@ static void window_new_ride_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
window_new_ride_draw_tab_images(dpi, w);
|
||||
|
||||
if (_windowNewRideCurrentTab != WINDOW_NEW_RIDE_PAGE_RESEARCH) {
|
||||
ride_list_item item = { .ride_type_and_entry = static_cast<uint16>(w->new_ride.highlighted_ride_id)};
|
||||
ride_list_item item;
|
||||
item.ride_type_and_entry = static_cast<uint16>(w->new_ride.highlighted_ride_id);
|
||||
if (item.type != RIDE_TYPE_NULL || item.entry_index != 255)
|
||||
window_new_ride_paint_ride_information(w, dpi, item, w->x + 3, w->y + w->height - 52, w->width - 6);
|
||||
} else {
|
||||
|
@ -994,7 +995,8 @@ static void window_new_ride_paint_ride_information(rct_window *w, rct_drawpixeli
|
|||
*/
|
||||
static void window_new_ride_select(rct_window *w)
|
||||
{
|
||||
ride_list_item item = { .ride_type_and_entry = static_cast<uint16>(w->new_ride.selected_ride_id)};
|
||||
ride_list_item item;
|
||||
item.ride_type_and_entry = static_cast<uint16>(w->new_ride.selected_ride_id);
|
||||
if (item.type == RIDE_TYPE_NULL)
|
||||
return;
|
||||
|
||||
|
|
|
@ -1565,7 +1565,7 @@ static void window_park_objective_paint(rct_window *w, rct_drawpixelinfo *dpi)
|
|||
|
||||
// Objective outcome
|
||||
if (gScenarioCompletedCompanyValue != MONEY32_UNDEFINED) {
|
||||
if (gScenarioCompletedCompanyValue == 0x80000001) {
|
||||
if ((uint32)gScenarioCompletedCompanyValue == 0x80000001) {
|
||||
// Objective failed
|
||||
gfx_draw_string_left_wrapped(dpi, NULL, x, y, 222, STR_OBJECTIVE_FAILED, COLOUR_BLACK);
|
||||
} else {
|
||||
|
|
|
@ -3747,7 +3747,7 @@ static void window_ride_maintenance_mousedown(rct_window *w, rct_widgetindex wid
|
|||
gDropdownItemsFormat[0] = STR_DROPDOWN_MENU_LABEL;
|
||||
gDropdownItemsArgs[0] = STR_DEBUG_FIX_RIDE;
|
||||
for (sint32 i = 0; i < 8; i++) {
|
||||
assert(j < Util::CountOf(ride_type->ride_type));
|
||||
assert(j < (sint32)Util::CountOf(ride_type->ride_type));
|
||||
if (RideAvailableBreakdowns[ride_type->ride_type[j]] & (uint8)(1 << i)) {
|
||||
if (i == BREAKDOWN_BRAKES_FAILURE && (ride->mode == RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED || ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED)) {
|
||||
if (ride->num_vehicles != 1)
|
||||
|
@ -3869,7 +3869,7 @@ static void window_ride_maintenance_dropdown(rct_window *w, rct_widgetindex widg
|
|||
sint32 i;
|
||||
sint32 num_items = 1;
|
||||
for (i = 0; i < 8; i++) {
|
||||
assert(j < Util::CountOf(ride_type->ride_type));
|
||||
assert(j < (sint32)Util::CountOf(ride_type->ride_type));
|
||||
if (RideAvailableBreakdowns[ride_type->ride_type[j]] & (uint8)(1 << i)) {
|
||||
if (i == BREAKDOWN_BRAKES_FAILURE && (ride->mode == RIDE_MODE_CONTINUOUS_CIRCUIT_BLOCK_SECTIONED || ride->mode == RIDE_MODE_POWERED_LAUNCH_BLOCK_SECTIONED)) {
|
||||
if (ride->num_vehicles != 1)
|
||||
|
@ -4233,7 +4233,7 @@ static void window_ride_colour_mousedown(rct_window *w, rct_widgetindex widgetIn
|
|||
break;
|
||||
case WIDX_ENTRANCE_STYLE_DROPDOWN:
|
||||
checkedIndex = -1;
|
||||
for (i = 0; i < Util::CountOf(window_ride_entrance_style_list); i++) {
|
||||
for (i = 0; i < (sint32)Util::CountOf(window_ride_entrance_style_list); i++) {
|
||||
gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL;
|
||||
gDropdownItemsArgs[i] = RideEntranceDefinitions[window_ride_entrance_style_list[i]].string_id;
|
||||
|
||||
|
|
|
@ -2517,7 +2517,7 @@ static bool sub_6CA2DF_get_track_element(uint8 *trackElement) {
|
|||
}
|
||||
|
||||
if (curve <= 8) {
|
||||
for (sint32 i = 0; i < Util::CountOf(gTrackDescriptors); i++) {
|
||||
for (sint32 i = 0; i < (sint32)Util::CountOf(gTrackDescriptors); i++) {
|
||||
track_descriptor trackDescriptor = gTrackDescriptors[i];
|
||||
if (trackDescriptor.track_curve != curve) continue;
|
||||
if (trackDescriptor.starts_diagonal != startsDiagonal) continue;
|
||||
|
|
|
@ -93,7 +93,7 @@ static sint32 _viewportNumber = 1;
|
|||
/**
|
||||
* Creates a custom viewport window.
|
||||
*/
|
||||
void _window_viewport_open()
|
||||
static void _window_viewport_open()
|
||||
{
|
||||
rct_window *w = window_create_auto_pos(
|
||||
INITIAL_WIDTH, INITIAL_HEIGHT,
|
||||
|
|
|
@ -89,7 +89,7 @@ static rct_window_event_list window_water_events = {
|
|||
*
|
||||
* rct2: 0x006E6A40
|
||||
*/
|
||||
void _window_water_open()
|
||||
static void _window_water_open()
|
||||
{
|
||||
rct_window* window;
|
||||
|
||||
|
|
Loading…
Reference in a new issue