mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 08:12:53 +01:00
Move register definition to TestPaint
This commit is contained in:
@@ -210,69 +210,4 @@ using rct_string_id = uint16_t;
|
||||
# define FASTCALL
|
||||
#endif // PLATFORM_X86
|
||||
|
||||
/**
|
||||
* x86 register structure, only used for easy interop to RCT2 code.
|
||||
*/
|
||||
#pragma pack(push, 1)
|
||||
struct registers
|
||||
{
|
||||
union
|
||||
{
|
||||
int32_t eax;
|
||||
int16_t ax;
|
||||
struct
|
||||
{
|
||||
char al;
|
||||
char ah;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t ebx;
|
||||
int16_t bx;
|
||||
struct
|
||||
{
|
||||
char bl;
|
||||
char bh;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t ecx;
|
||||
int16_t cx;
|
||||
struct
|
||||
{
|
||||
char cl;
|
||||
char ch;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t edx;
|
||||
int16_t dx;
|
||||
struct
|
||||
{
|
||||
char dl;
|
||||
char dh;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t esi;
|
||||
int16_t si;
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t edi;
|
||||
int16_t di;
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t ebp;
|
||||
int16_t bp;
|
||||
};
|
||||
};
|
||||
assert_struct_size(registers, 7 * 4);
|
||||
#pragma pack(pop)
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,6 +24,71 @@ enum
|
||||
X86_FLAG_SIGN = 1 << 7,
|
||||
};
|
||||
|
||||
/**
|
||||
* x86 register structure, only used for easy interop to RCT2 code.
|
||||
*/
|
||||
# pragma pack(push, 1)
|
||||
struct registers
|
||||
{
|
||||
union
|
||||
{
|
||||
int32_t eax;
|
||||
int16_t ax;
|
||||
struct
|
||||
{
|
||||
char al;
|
||||
char ah;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t ebx;
|
||||
int16_t bx;
|
||||
struct
|
||||
{
|
||||
char bl;
|
||||
char bh;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t ecx;
|
||||
int16_t cx;
|
||||
struct
|
||||
{
|
||||
char cl;
|
||||
char ch;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t edx;
|
||||
int16_t dx;
|
||||
struct
|
||||
{
|
||||
char dl;
|
||||
char dh;
|
||||
};
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t esi;
|
||||
int16_t si;
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t edi;
|
||||
int16_t di;
|
||||
};
|
||||
union
|
||||
{
|
||||
int32_t ebp;
|
||||
int16_t bp;
|
||||
};
|
||||
};
|
||||
assert_struct_size(registers, 7 * 4);
|
||||
# pragma pack(pop)
|
||||
|
||||
using hook_function = uint8_t (*)(registers* regs);
|
||||
|
||||
void addhook(uintptr_t address, hook_function function);
|
||||
|
||||
Reference in New Issue
Block a user