1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-23 15:52:55 +01:00

Merge pull request #250 from anyc/testing

fix errors and warnings with mingw
This commit is contained in:
Ted John
2014-07-30 23:21:42 +01:00
6 changed files with 13 additions and 12 deletions

View File

@@ -137,7 +137,7 @@ void process_mouse_over(int x, int y)
}
ebx = ebx & 0xFFFFFF00;
edi = cursorId;
esi = subWindow;
esi = (int) subWindow;
RCT2_CALLFUNC_X(subWindow->event_handlers[WE_UNKNOWN_0E], &eax, &ebx, &ecx, &edx, &esi, &edi, &ebp);
cursorId = edi;
if ((ebx & 0xFF) != 0)
@@ -2093,7 +2093,7 @@ int game_do_command(int eax, int ebx, int ecx, int edx, int esi, int edi, int eb
*
* rct2: 0x00667C15
*/
static void game_pause_toggle()
void game_pause_toggle()
{
char input_bl;

View File

@@ -1414,7 +1414,7 @@ int gfx_get_string_width(char* buffer)
current_font_sprite_base = RCT2_ADDRESS(RCT2_ADDRESS_CURRENT_FONT_SPRITE_BASE, uint16);
width = 0;
for (uint8* curr_char = (uint8*)buffer; *curr_char != (uint8)NULL; curr_char++) {
for (uint8* curr_char = (uint8*)buffer; *curr_char != (uint8)0; curr_char++) {
if (*curr_char >= 0x20) {
width += RCT2_ADDRESS(RCT2_ADDRESS_FONT_CHAR_WIDTH, uint8)[*current_font_sprite_base + (*curr_char - 0x20)];
@@ -1501,7 +1501,7 @@ int gfx_clip_string(char* buffer, int width)
clipped_width = 0;
last_char = buffer;
for (unsigned char* curr_char = buffer; *curr_char != (uint8)NULL; curr_char++) {
for (unsigned char* curr_char = buffer; *curr_char != (uint8)0; curr_char++) {
if (*curr_char < 0x20) {
switch (*curr_char) {
case FORMAT_MOVE_X:
@@ -1554,7 +1554,8 @@ int gfx_clip_string(char* buffer, int width)
clipped_width += RCT2_ADDRESS(RCT2_ADDRESS_FONT_CHAR_WIDTH, uint8)[current_font_sprite_base + (*curr_char - 0x20)];
if ((int)clipped_width > width) {
*((uint32*)last_char) = '...';
// *((uint32*)last_char) = '...';
strcpy(last_char-3, "...");
clipped_width = width;
return clipped_width;
}
@@ -1593,7 +1594,7 @@ int gfx_wrap_string(char* buffer, int width, int* num_lines, int* font_height)
// Width of line up to current word
unsigned int curr_width;
for (unsigned char* curr_char = buffer; *curr_char != (uint8)NULL; curr_char++) {
for (unsigned char* curr_char = buffer; *curr_char != (uint8)0; curr_char++) {
// Remember start of current word and line width up to this word
if (*curr_char == ' ') {

View File

@@ -550,7 +550,7 @@ void park_update()
park_generate_new_guests();
}
static uint8 calculate_guest_initial_happiness(uint8 percentage) {
uint8 calculate_guest_initial_happiness(uint8 percentage) {
if (percentage < 15) {
// There is a minimum of 15% happiness
percentage = 15;

View File

@@ -57,6 +57,6 @@ void generate_new_guest();
void park_update();
void park_update_histories();
uint8 calculate_guest_initial_happiness();
uint8 calculate_guest_initial_happiness(uint8 percentage);
#endif

View File

@@ -1230,7 +1230,7 @@ void format_currency(char **dest, int value)
}
// Currency symbol
char *symbol = &(g_currency_specs[gGeneral_config.currency_format].symbol);
const char *symbol = g_currency_specs[gGeneral_config.currency_format].symbol;
// Prefix
if (g_currency_specs[gGeneral_config.currency_format].prefix) {
strcpy(*dest, symbol);
@@ -1259,7 +1259,7 @@ void format_currency_2dp(char **dest, int value)
}
// Currency symbol
char *symbol = &(g_currency_specs[gGeneral_config.currency_format].symbol);
const char *symbol = g_currency_specs[gGeneral_config.currency_format].symbol;
// Prefix
if (g_currency_specs[gGeneral_config.currency_format].prefix) {
strcpy(*dest, symbol);

View File

@@ -805,7 +805,7 @@ static int window_guest_list_is_peep_in_filter(rct_peep* peep)
temp = _window_guest_list_selected_view;
_window_guest_list_selected_view = _window_guest_list_selected_filter;
int argument1, argument2;
uint32 argument1, argument2;
get_arguments_from_peep(peep, &argument1, &argument2);
_window_guest_list_selected_view = temp;
@@ -1068,7 +1068,7 @@ static void window_guest_list_find_groups()
if (peep2->var_2A != 0 || !(peep2->var_0C & (1 << 8)))
continue;
int argument1, argument2;
uint32 argument1, argument2;
// Get and check if in same group
get_arguments_from_peep(peep2, &argument1, &argument2);
if (argument1 != _window_guest_list_groups_argument_1[groupIndex] || argument2 != _window_guest_list_groups_argument_2[groupIndex] )