forked from rosebudai/OpenRCT2-Web
Fixed typos and warnings after rebase
This commit is contained in:
1 parent
2bf1b4cd2f
commit
b80b71cf81
10 files changed
+25
-23
No files matched your search
@@ -17,6 +17,8 @@
|
||||
#ifndef _CMDLINE_SPRITE_H_
|
||||
#define _CMDLINE_SPRITE_H_
|
||||
|
||||
#include "common.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -272,7 +272,7 @@ void scenery_multiple_paint(uint8 direction, uint16 height, rct_map_element *map
|
||||
utf8 fitStr[32];
|
||||
const utf8 *fitStrPtr = fitStr;
|
||||
safe_strcpy(fitStr, scenery_multiple_sign_fit_text(signString, text, true), sizeof(fitStr));
|
||||
sint32 height = scenery_multiple_sign_text_height(fitStr, text);
|
||||
sint32 height2 = scenery_multiple_sign_text_height(fitStr, text);
|
||||
uint32 codepoint;
|
||||
while ((codepoint = utf8_get_next(fitStrPtr, &fitStrPtr)) != 0) {
|
||||
utf8 str[5] = {0};
|
||||
|
||||
@@ -1263,7 +1263,7 @@ private:
|
||||
Memory::Set(_researchRideTypeUsed, 0, sizeof(_researchRideTypeUsed));
|
||||
|
||||
// The first six scenery groups are always available
|
||||
for (size_t i = 0; i < 6; i++)
|
||||
for (uint8 i = 0; i < 6; i++)
|
||||
{
|
||||
research_insert_scenery_group_entry(i, true);
|
||||
}
|
||||
|
||||
@@ -209,7 +209,7 @@ static sint32 ride_get_new_breakdown_problem(rct_ride *ride);
|
||||
static void ride_inspection_update(rct_ride *ride);
|
||||
static void ride_mechanic_status_update(sint32 rideIndex, sint32 mechanicStatus);
|
||||
static void ride_music_update(sint32 rideIndex);
|
||||
static void ride_shop_connected(rct_ride* ride, insint32t ride_idx);
|
||||
static void ride_shop_connected(rct_ride* ride, sint32 ride_idx);
|
||||
static void ride_spiral_slide_update(rct_ride *ride);
|
||||
static void ride_update(sint32 rideIndex);
|
||||
static void ride_update_vehicle_colours(sint32 rideIndex);
|
||||
|
||||
@@ -175,8 +175,8 @@ bool readentirefile(const utf8 *path, void **outBuffer, size_t *outLength)
|
||||
sint32 bitscanforward(sint32 source)
|
||||
{
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400) // Visual Studio 2005
|
||||
sint32 i;
|
||||
uint8 success = _BitScanForward((uint32 *)&i, (uint32)source);
|
||||
DWORD i;
|
||||
uint8 success = _BitScanForward(&i, (uint32)source);
|
||||
return success != 0 ? i : -1;
|
||||
#elif defined(__GNUC__)
|
||||
sint32 success = __builtin_ffs(source);
|
||||
|
||||
@@ -126,14 +126,14 @@ static rct_window_event_list window_dropdown_events = {
|
||||
* @param num_items (bx)
|
||||
* @param colour (al)
|
||||
*/
|
||||
void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 num_items)
|
||||
void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, size_t num_items)
|
||||
{
|
||||
sint32 i, string_width, max_string_width;
|
||||
sint32 string_width, max_string_width;
|
||||
char buffer[256];
|
||||
|
||||
// Calculate the longest string width
|
||||
max_string_width = 0;
|
||||
for (i = 0; i < num_items; i++) {
|
||||
for (size_t i = 0; i < num_items; i++) {
|
||||
format_string(buffer, 256, gDropdownItemsFormat[i], (void*)(&gDropdownItemsArgs[i]));
|
||||
gCurrentFontSpriteBase = FONT_SPRITE_BASE_MEDIUM;
|
||||
string_width = gfx_get_string_width(buffer);
|
||||
@@ -154,7 +154,7 @@ void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour,
|
||||
* @param num_items (bx)
|
||||
* @param colour (al)
|
||||
*/
|
||||
void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 num_items, sint32 width)
|
||||
void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, size_t num_items, sint32 width)
|
||||
{
|
||||
rct_window* w;
|
||||
|
||||
@@ -170,8 +170,8 @@ void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, u
|
||||
_dropdown_item_height = flags & 0x3F;
|
||||
|
||||
// Set the widgets
|
||||
gDropdownNumItems = num_items;
|
||||
_dropdown_num_rows = num_items;
|
||||
gDropdownNumItems = (sint32)num_items;
|
||||
_dropdown_num_rows = (sint32)num_items;
|
||||
|
||||
width = _dropdown_item_width * _dropdown_num_columns + 3;
|
||||
sint32 height = _dropdown_item_height * _dropdown_num_rows + 3;
|
||||
@@ -180,8 +180,8 @@ void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, u
|
||||
if (y + height > gScreenHeight)
|
||||
y = max(0, gScreenHeight - height);
|
||||
|
||||
window_dropdown_widgets[WIDX_BACKGROUND].bottom = _dropdown_item_height * num_items + 3;
|
||||
window_dropdown_widgets[WIDX_BACKGROUND].right = _dropdown_item_width + 3;
|
||||
window_dropdown_widgets[WIDX_BACKGROUND].bottom = (sint16)(_dropdown_item_height * num_items + 3);
|
||||
window_dropdown_widgets[WIDX_BACKGROUND].right = (sint16)(_dropdown_item_width + 3);
|
||||
|
||||
// Create the window
|
||||
w = window_create(
|
||||
|
||||
@@ -44,8 +44,8 @@ bool dropdown_is_disabled(sint32 index);
|
||||
void dropdown_set_checked(sint32 index, bool value);
|
||||
void dropdown_set_disabled(sint32 index, bool value);
|
||||
|
||||
void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 num_items);
|
||||
void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 num_items, sint32 width);
|
||||
void window_dropdown_show_text(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, size_t num_items);
|
||||
void window_dropdown_show_text_custom_width(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, size_t num_items, sint32 width);
|
||||
void window_dropdown_show_image(sint32 x, sint32 y, sint32 extray, uint8 colour, uint8 flags, sint32 numItems, sint32 itemWidth, sint32 itemHeight, sint32 numColumns);
|
||||
void window_dropdown_close();
|
||||
sint32 dropdown_index_from_point(sint32 x, sint32 y, rct_window* w);
|
||||
|
||||
@@ -855,7 +855,7 @@ static void window_options_mouseup(rct_window *w, sint32 widgetIndex)
|
||||
*/
|
||||
static void window_options_mousedown(sint32 widgetIndex, rct_window*w, rct_widget* widget)
|
||||
{
|
||||
sint32 num_items;
|
||||
uint32 num_items;
|
||||
|
||||
widget = &w->widgets[widgetIndex - 1];
|
||||
|
||||
@@ -973,7 +973,7 @@ static void window_options_mousedown(sint32 widgetIndex, rct_window*w, rct_widge
|
||||
break;
|
||||
case WIDX_CURRENCY_DROPDOWN:
|
||||
num_items = CURRENCY_END + 1; // All the currencies plus the separator
|
||||
sint32 num_ordinary_currencies = CURRENCY_END - 1; // All the currencies except custom currency
|
||||
size_t num_ordinary_currencies = CURRENCY_END - 1; // All the currencies except custom currency
|
||||
|
||||
for (size_t i = 0; i < num_ordinary_currencies; i++) {
|
||||
gDropdownItemsFormat[i] = STR_DROPDOWN_MENU_LABEL;
|
||||
@@ -1041,7 +1041,7 @@ static void window_options_mousedown(sint32 widgetIndex, rct_window*w, rct_widge
|
||||
audio_populate_devices();
|
||||
|
||||
// populate the list with the sound devices
|
||||
for (size_t i = 0; i < gAudioDeviceCount; i++) {
|
||||
for (size_t i = 0; (sint32)i < gAudioDeviceCount; i++) {
|
||||
gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM;
|
||||
gDropdownItemsArgs[i] = (uintptr_t)gAudioDevices[i].name;
|
||||
}
|
||||
@@ -1068,9 +1068,9 @@ static void window_options_mousedown(sint32 widgetIndex, rct_window*w, rct_widge
|
||||
case WINDOW_OPTIONS_PAGE_CONTROLS_AND_INTERFACE:
|
||||
switch (widgetIndex) {
|
||||
case WIDX_THEMES_DROPDOWN:
|
||||
num_items = (sint32)theme_manager_get_num_available_themes();
|
||||
num_items = (uint32)theme_manager_get_num_available_themes();
|
||||
|
||||
for (sint32 i = 0; i < num_items; i++) {
|
||||
for (size_t i = 0; i < num_items; i++) {
|
||||
gDropdownItemsFormat[i] = STR_OPTIONS_DROPDOWN_ITEM;
|
||||
gDropdownItemsArgs[i] = (uintptr_t)theme_manager_get_available_theme_name(i);
|
||||
}
|
||||
|
||||
@@ -1485,8 +1485,8 @@ static void window_tile_inspector_update_selected_tile(rct_window *w, sint32 x,
|
||||
windowTileInspectorToolMouseX = x;
|
||||
windowTileInspectorToolMouseY = y;
|
||||
|
||||
sint32 mapX = x;
|
||||
sint32 mapY = y;
|
||||
sint16 mapX = x;
|
||||
sint16 mapY = y;
|
||||
sint32 direction;
|
||||
screen_pos_to_map_pos(&mapX, &mapY, &direction);
|
||||
if (mapX == MAP_LOCATION_NULL) {
|
||||
|
||||
@@ -85,7 +85,7 @@ bool fence_in_the_way(sint32 x, sint32 y, sint32 z0, sint32 z1, sint32 direction
|
||||
void footpath_chain_ride_queue(sint32 rideIndex, sint32 entranceIndex, sint32 x, sint32 y, rct_map_element *mapElement, sint32 direction);
|
||||
void footpath_update_path_wide_flags(sint32 x, sint32 y);
|
||||
|
||||
sint32 footpath_is_connected_to_map_edge(sint32 x, sint32 y, insint32t z, sint32 direction, sint32 flags);
|
||||
sint32 footpath_is_connected_to_map_edge(sint32 x, sint32 y, sint32 z, sint32 direction, sint32 flags);
|
||||
bool footpath_element_is_sloped(rct_map_element *mapElement);
|
||||
uint8 footpath_element_get_slope_direction(rct_map_element *mapElement);
|
||||
bool footpath_element_is_queue(rct_map_element *mapElement);
|
||||
|
||||
Reference in new issue
Block a user