mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 03:23:15 +01:00
Implemented LoadCursor function.
This commit is contained in:
@@ -300,6 +300,38 @@
|
||||
#define RCT2_ADDRESS_VIEWPORT_LIST 0x014234BC
|
||||
#define RCT2_ADDRESS_NEW_VIEWPORT_PTR 0x01423570
|
||||
|
||||
#define RCT2_ADDRESS_HCURSOR_START 0x01423598
|
||||
#define RCT2_ADDRESS_HCURSOR_ARROW 0x01423598
|
||||
#define RCT2_ADDRESS_HCURSOR_BLANK 0x0142359C
|
||||
#define RCT2_ADDRESS_HCURSOR_UP_ARROW 0x014235A0
|
||||
#define RCT2_ADDRESS_HCURSOR_UP_DOWN_ARROW 0x014235A4
|
||||
#define RCT2_ADDRESS_HCURSOR_HAND_POINT 0x014235A8
|
||||
#define RCT2_ADDRESS_HCURSOR_ZZZ 0x014235AC
|
||||
#define RCT2_ADDRESS_HCURSOR_DIAGONAL_ARROWS 0x014235B0
|
||||
#define RCT2_ADDRESS_HCURSOR_PICKER 0x014235B4
|
||||
#define RCT2_ADDRESS_HCURSOR_TREE_DOWN 0x014235B8
|
||||
#define RCT2_ADDRESS_HCURSOR_FOUNTAIN_DOWN 0x014235BC
|
||||
#define RCT2_ADDRESS_HCURSOR_STATUE_DOWN 0x014235C0
|
||||
#define RCT2_ADDRESS_HCURSOR_BENCH_DOWN 0x014235C4
|
||||
#define RCT2_ADDRESS_HCURSOR_CROSS_HAIR 0x014235C8
|
||||
#define RCT2_ADDRESS_HCURSOR_BIN_DOWN 0x014235CC
|
||||
#define RCT2_ADDRESS_HCURSOR_LAMPPOST_DOWN 0x014235D0
|
||||
#define RCT2_ADDRESS_HCURSOR_FENCE_DOWN 0x014235D4
|
||||
#define RCT2_ADDRESS_HCURSOR_FLOWER_DOWN 0x014235D8
|
||||
#define RCT2_ADDRESS_HCURSOR_PATH_DOWN 0x014235DC
|
||||
#define RCT2_ADDRESS_HCURSOR_DIG_DOWN 0x014235E0
|
||||
#define RCT2_ADDRESS_HCURSOR_WATER_DOWN 0x014235E4
|
||||
#define RCT2_ADDRESS_HCURSOR_HOUSE_DOWN 0x014235E8
|
||||
#define RCT2_ADDRESS_HCURSOR_VOLCANO_DOWN 0x014235EC
|
||||
#define RCT2_ADDRESS_HCURSOR_WALK_DOWN 0x014235F0
|
||||
#define RCT2_ADDRESS_HCURSOR_PAINT_DOWN 0x014235F4
|
||||
#define RCT2_ADDRESS_HCURSOR_ENTRANCE_DOWN 0x014235F8
|
||||
#define RCT2_ADDRESS_HCURSOR_HAND_OPEN 0x014235FC
|
||||
#define RCT2_ADDRESS_HCURSOR_HAND_CLOSED 0x01423600
|
||||
#define RCT2_ADDRESS_HCURSOR_END 0x01423600
|
||||
|
||||
#define RCT2_ADDRESS_HINSTANCE 0x01423A08
|
||||
|
||||
#define RCT2_ADDRESS_WINDOW_GUEST_LIST_SELECTED_FILTER 0x00F1EE06
|
||||
#define RCT2_ADDRESS_WINDOW_GUEST_LIST_SELECTED_TAB 0x00F1EE12
|
||||
#define RCT2_ADDRESS_WINDOW_GUEST_LIST_SELECTED_VIEW 0x00F1EE13
|
||||
|
||||
@@ -59,6 +59,43 @@ void osinterface_init()
|
||||
// RCT2_CALLPROC(0x00404584); // dinput_init()
|
||||
}
|
||||
|
||||
/**
|
||||
*rct2: 0x0068352C
|
||||
*/
|
||||
static void osinterface_load_cursors(){
|
||||
RCT2_GLOBAL(0x14241BC, uint32) = 2;
|
||||
HINSTANCE hInst = RCT2_GLOBAL(RCT2_ADDRESS_HINSTANCE, HINSTANCE);
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_ARROW, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x74));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_BLANK, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0xA1));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_UP_ARROW, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x6D));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_UP_DOWN_ARROW, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x6E));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_HAND_POINT, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x70));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_ZZZ, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x78));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_DIAGONAL_ARROWS, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x77));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_PICKER, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x7C));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_TREE_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x83));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_FOUNTAIN_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x7F));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_STATUE_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x80));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_BENCH_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x81));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_CROSS_HAIR, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x82));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_BIN_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x84));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_LAMPPOST_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x85));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_FENCE_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x8A));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_FLOWER_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x89));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_PATH_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x8B));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_DIG_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x8D));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_WATER_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x8E));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_HOUSE_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x8F));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_VOLCANO_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x90));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_WALK_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x91));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_PAINT_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x9E));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_ENTRANCE_DOWN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0x9F));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_HAND_OPEN, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0xA6));
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_HAND_CLOSED, HCURSOR) = LoadCursor(hInst, MAKEINTRESOURCE(0xA5));
|
||||
SetCursor(RCT2_GLOBAL(RCT2_ADDRESS_HCURSOR_ARROW, HCURSOR));
|
||||
RCT2_GLOBAL(0x14241BC, uint32) = 0;
|
||||
}
|
||||
|
||||
static void osinterface_create_window()
|
||||
{
|
||||
SDL_SysWMinfo wmInfo;
|
||||
@@ -72,7 +109,7 @@ static void osinterface_create_window()
|
||||
|
||||
// stuff
|
||||
{
|
||||
RCT2_CALLPROC_EBPSAFE(0x0068352C);
|
||||
osinterface_load_cursors();
|
||||
RCT2_CALLPROC_EBPSAFE(0x0068371D);
|
||||
|
||||
width = RCT2_GLOBAL(RCT2_ADDRESS_CONFIG_RESOLUTION_WIDTH, sint16);
|
||||
|
||||
@@ -76,7 +76,7 @@ __declspec(dllexport) int StartOpenRCT(HINSTANCE hInstance, HINSTANCE hPrevInsta
|
||||
print_launch_information();
|
||||
|
||||
// Begin RCT2
|
||||
RCT2_GLOBAL(0x01423A08, HINSTANCE) = hInstance;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_HINSTANCE, HINSTANCE) = hInstance;
|
||||
RCT2_GLOBAL(RCT2_ADDRESS_CMDLINE, LPSTR) = lpCmdLine;
|
||||
get_system_info();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user