diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 9e031a2ca0..2223f71929 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -124,7 +124,6 @@ namespace OpenRCT2 EVP_MD_CTX_destroy(gHashCTX); #endif // DISABLE_NETWORK rct2_interop_dispose(); - platform_free(); Instance = nullptr; } @@ -464,7 +463,7 @@ namespace OpenRCT2 Update(); if (!_isWindowMinimised && !gOpenRCT2Headless) { - platform_draw(); + drawing_engine_draw(); } } @@ -511,7 +510,7 @@ namespace OpenRCT2 const float alpha = (float)_accumulator / UPDATE_TIME_MS; sprite_position_tween_all(alpha); - platform_draw(); + drawing_engine_draw(); sprite_position_tween_restore(); } diff --git a/src/openrct2/platform/platform.h b/src/openrct2/platform/platform.h index 6eb40a6a0e..8bb0611111 100644 --- a/src/openrct2/platform/platform.h +++ b/src/openrct2/platform/platform.h @@ -80,10 +80,6 @@ typedef struct file_dialog_desc { } file_dialog_desc; // Platform shared definitions -void platform_init(); -void platform_draw(); -void platform_draw_require_end(); -void platform_free(); void platform_update_palette(const uint8 *colours, sint32 start_index, sint32 num_colours); void platform_toggle_windowed_mode(); void platform_refresh_video(bool recreate_window); @@ -108,7 +104,6 @@ void platform_enumerate_files_end(sint32 handle); sint32 platform_enumerate_directories_begin(const utf8 *directory); bool platform_enumerate_directories_next(sint32 handle, utf8 *path); void platform_enumerate_directories_end(sint32 handle); -void platform_init_window_icon(); bool platform_place_string_on_clipboard(utf8* target); // Returns the bitmask of the GetLogicalDrives function for windows, 0 for other systems diff --git a/src/openrct2/platform/shared.c b/src/openrct2/platform/shared.c index bbfa235a71..88e589a3c4 100644 --- a/src/openrct2/platform/shared.c +++ b/src/openrct2/platform/shared.c @@ -58,13 +58,6 @@ typedef void(*update_palette_func)(const uint8*, sint32, sint32); rct_palette_entry gPalette[256]; -void platform_draw() -{ - if (!gOpenRCT2Headless) { - drawing_engine_draw(); - } -} - static uint8 soft_light(uint8 a, uint8 b) { float fa = a / 255.0f; @@ -125,25 +118,6 @@ void platform_update_palette(const uint8* colours, sint32 start_index, sint32 nu } } -void platform_init() -{ - // gKeysPressed = malloc(sizeof(uint8) * 256); - // memset(gKeysPressed, 0, sizeof(uint8) * 256); - - // Set the highest palette entry to white. - // This fixes a bug with the TT:rainbow road due to the - // image not using the correct white palette entry. - gPalette[255].alpha = 0; - gPalette[255].red = 255; - gPalette[255].green = 255; - gPalette[255].blue = 255; -} - -void platform_free() -{ - // free(gKeysPressed); -} - void platform_toggle_windowed_mode() { sint32 targetMode = gConfigGeneral.fullscreen_mode == 0 ? 2 : 0;