diff --git a/src/addresses.h b/src/addresses.h index 23849c5885..fc74d9fe9f 100644 --- a/src/addresses.h +++ b/src/addresses.h @@ -158,7 +158,6 @@ #define RCT2_ADDRESS_MOUSE_WRITE_INDEX 0x009E2DE4 #define RCT2_ADDRESS_MOUSE_READ_INDEX 0x009E2DE8 -#define RCT2_ADDRESS_HFONT 0x009E2DEC #define RCT2_ADDRESS_PROGRESSBAR_HWND 0x009E2DF8 #define RCT2_ADDRESS_G1_ELEMENTS 0x009EBD28 @@ -282,8 +281,6 @@ #define RCT2_ADDRESS_HCURSOR_HAND_CLOSED 0x01423600 #define RCT2_ADDRESS_HCURSOR_END 0x01423600 -#define RCT2_ADDRESS_HINSTANCE 0x01423A08 - #define RCT2_ADDRESS_WINDOW_MAP_SELECTED_TAB 0x014209E4 #define RCT2_ADDRESS_GAME_VERSION_NUMBER 0x0013587BC @@ -418,6 +415,7 @@ #define RCT2_ADDRESS_TEXTINPUT_WINDOWCLASS 0x009DEB8C #define RCT2_ADDRESS_CMDLINE 0x009E2D98 +#define RCT2_ADDRESS_HFONT 0x009E2DEC #define RCT2_ADDRESS_LAND_RAISE_COST 0x009E2E1C #define RCT2_ADDRESS_LAND_LOWER_COST 0x009E2E20 #define RCT2_ADDRESS_SELECTED_TERRAIN_EDGE 0x009E2E24 @@ -627,6 +625,8 @@ // This is also the end of RCT2_ADDRESS_VIEWPORT_LIST. #define RCT2_ADDRESS_ACTIVE_VIEWPORT_PTR_ARRAY 0x01423570 +#define RCT2_ADDRESS_HINSTANCE 0x01423A08 + #define RCT2_ADDRESS_PALETTE 0x01424680 #endif diff --git a/src/platform/windows.c b/src/platform/windows.c index 9af2caecc5..7ab773e0e7 100644 --- a/src/platform/windows.c +++ b/src/platform/windows.c @@ -118,8 +118,6 @@ __declspec(dllexport) int StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInsta _dllModule = GetModuleHandleA(OPENRCT2_DLL_MODULE_NAME); } - RCT2_GLOBAL(RCT2_ADDRESS_HINSTANCE, HINSTANCE) = hInstance; - // argv = CommandLineToArgvA(lpCmdLine, &argc); argv = (char**)windows_get_command_line_args(&argc); runGame = cmdline_run((const char **)argv, argc); @@ -775,7 +773,6 @@ utf8 *platform_open_directory_browser(utf8 *title) int windows_get_registry_install_info(rct2_install_info *installInfo, char *source, char *font, uint8 charset) { char subkeyInfogrames[MAX_PATH], subkeyFishTechGroup[MAX_PATH], keyName[100]; - LOGFONTA lf; HKEY hKey; DWORD type, size; @@ -784,14 +781,6 @@ int windows_get_registry_install_info(rct2_install_info *installInfo, char *sour strcpy(subkeyFishTechGroup, "Software\\Fish Technology Group\\"); strcat(subkeyFishTechGroup, source); - memset(&lf, 0, sizeof(lf)); - lf.lfCharSet = charset; - lf.lfHeight = 12; - lf.lfWeight = 400; - strcpy(lf.lfFaceName, font); - - RCT2_GLOBAL(RCT2_ADDRESS_HFONT, HFONT) = CreateFontIndirectA(&lf); - if (RegOpenKeyA(HKEY_LOCAL_MACHINE, subkeyInfogrames, &hKey) != ERROR_SUCCESS) return 0;