mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Remove unused globals
This commit is contained in:
@@ -1161,27 +1161,6 @@ void format_string_to_upper(utf8 *dest, rct_string_id format, void *args)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* rct2: 0x006E37F7
|
||||
* error (eax)
|
||||
* format (bx)
|
||||
*/
|
||||
void error_string_quit(int error, rct_string_id format)
|
||||
{
|
||||
RCT2_GLOBAL(0x14241A0, uint32) = error;
|
||||
RCT2_GLOBAL(0x9E2DA0, uint32) = 1;
|
||||
|
||||
char* error_string = RCT2_ADDRESS(0x1424080, char);
|
||||
*error_string = 0;
|
||||
|
||||
if (format != 0xFFFF){
|
||||
format_string(error_string, format, gCommonFormatArgs);
|
||||
}
|
||||
RCT2_GLOBAL(0x9E2D9C, uint32) = 1;
|
||||
rct2_exit();
|
||||
}
|
||||
|
||||
void generate_string_file()
|
||||
{
|
||||
FILE* f;
|
||||
|
||||
@@ -35,7 +35,6 @@ void format_string(char *dest, rct_string_id format, void *args);
|
||||
void format_string_raw(char *dest, char *src, void *args);
|
||||
void format_string_to_upper(char *dest, rct_string_id format, void *args);
|
||||
void generate_string_file();
|
||||
void error_string_quit(int error, rct_string_id format);
|
||||
utf8 *get_string_end(const utf8 *text);
|
||||
size_t get_string_size(const utf8 *text);
|
||||
int get_string_length(const utf8 *text);
|
||||
|
||||
@@ -599,8 +599,6 @@ static void platform_create_window()
|
||||
if (width == -1) width = 640;
|
||||
if (height == -1) height = 480;
|
||||
|
||||
RCT2_GLOBAL(0x009E2D8C, sint32) = 0;
|
||||
|
||||
// Create window in window first rather than fullscreen so we have the display the window is on first
|
||||
gWindow = SDL_CreateWindow(
|
||||
"OpenRCT2", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, width, height, SDL_WINDOW_RESIZABLE | SDL_WINDOW_OPENGL
|
||||
@@ -615,9 +613,6 @@ static void platform_create_window()
|
||||
SDL_SetWindowMinimumSize(gWindow, 720, 480);
|
||||
platform_init_window_icon();
|
||||
|
||||
// Set the update palette function pointer
|
||||
RCT2_GLOBAL(0x009E2BE4, update_palette_func) = platform_update_palette;
|
||||
|
||||
// Initialise the surface, palette and draw buffer
|
||||
platform_resize(width, height);
|
||||
|
||||
|
||||
@@ -4017,8 +4017,8 @@ void map_reorganise_elements()
|
||||
rct_map_element* new_map_elements = malloc(0x30000 * sizeof(rct_map_element));
|
||||
rct_map_element* new_elements_pointer = new_map_elements;
|
||||
|
||||
if (new_map_elements == NULL || new_map_elements == (rct_map_element*)-1){
|
||||
error_string_quit(4370, 0xFFFF);
|
||||
if (new_map_elements == NULL) {
|
||||
log_fatal("Unable to allocate memory for map elements.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user