mirror of
https://codeberg.org/KeybadeBlox/JSRF-Decompilation.git
synced 2026-04-07 04:50:23 +03:00
Compile XDK code as C
It appears to be all C code (especially the non-C++ parts of the C runtime, of course), so we'll compile it as such.
This commit is contained in:
parent
149af27b9c
commit
d435282a8b
9 changed files with 48 additions and 23 deletions
70
decompile/src/XDK/Win32.h
Normal file
70
decompile/src/XDK/Win32.h
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
/* JSRF Decompilation: XDK/Win32.h
|
||||
Definitions normally provided by Windows headers.
|
||||
*/
|
||||
|
||||
#ifndef WIN32_H
|
||||
#define WIN32_H
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
// The famous Win32 typedefs
|
||||
typedef unsigned char UCHAR;
|
||||
typedef char CHAR;
|
||||
typedef unsigned short USHORT;
|
||||
typedef short SHORT;
|
||||
typedef unsigned int UINT;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG;
|
||||
typedef long LONG;
|
||||
typedef unsigned __int64 ULONGLONG;
|
||||
typedef __int64 LONGLONG;
|
||||
|
||||
typedef unsigned char BYTE;
|
||||
typedef unsigned short WORD;
|
||||
typedef unsigned long DWORD;
|
||||
|
||||
typedef void VOID;
|
||||
typedef void * LPVOID;
|
||||
typedef unsigned long SIZE_T;
|
||||
typedef float FLOAT;
|
||||
typedef int BOOL;
|
||||
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
|
||||
// 64-bit integer compatibility type
|
||||
union LARGE_INTEGER {
|
||||
struct {
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
} u;
|
||||
LONGLONG QuadPart;
|
||||
};
|
||||
|
||||
// Return codes
|
||||
typedef long HRESULT;
|
||||
|
||||
#define ERROR_SUCCESS 0L
|
||||
#define E_OUTOFMEMORY 0x8007000EL
|
||||
|
||||
// Standard Win32 functions
|
||||
VOID __stdcall Sleep(DWORD dwMilliseconds);
|
||||
|
||||
LPVOID __stdcall VirtualAlloc(
|
||||
LPVOID lpAddress,
|
||||
SIZE_T dwSize,
|
||||
DWORD flAllocationType,
|
||||
DWORD flProtect
|
||||
);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue