1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-22 07:13:07 +01:00

Remove more redundant platform functions

This commit is contained in:
Ted John
2017-07-08 19:34:22 +01:00
parent 1394512df6
commit 5614e55f84
3 changed files with 2 additions and 34 deletions

View File

@@ -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();
}

View File

@@ -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

View File

@@ -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;