Changeset 1163 for Daodan/src/Oni
- Timestamp:
- Oct 24, 2021, 4:50:48 AM (3 years ago)
- Location:
- Daodan/src/Oni
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
Daodan/src/Oni/GameState.h
r1161 r1163 1353 1353 int field_FC; 1354 1354 int field_100; 1355 char field_104;1355 char SlowMotion; 1356 1356 char gap_105[3]; 1357 int SlowMotion ;1357 int SlowMotionTimer; 1358 1358 char gap_10c[4]; 1359 1359 int field_110; … … 1362 1362 char field_138; 1363 1363 char gap_139[7]; 1364 int field_140;1364 int LastSixtieths; 1365 1365 int GameTime; 1366 int field_148;1366 int TargetGameTime; 1367 1367 int field_14C; 1368 1368 OniLevel* Level; -
Daodan/src/Oni/Oni.h
r1017 r1163 9 9 #define ONICALL __fastcall 10 10 11 typedef struct { 12 short x; 13 short y; 14 } IMtPoint; 11 15 16 // The following headers were written when Daodan used -fpack-struct, and 17 // should be rewritten 18 #pragma pack(push, 1) 12 19 #include "stdtypes.h" 13 20 #include "BFW_Motoko_Draw.h" … … 17 24 #include "GL.h" 18 25 #include "OBJt.h" 26 #pragma pack(pop) 27 28 #include "Input.h" 19 29 20 30 #define DDmAssert(expr) assert(expr); … … 34 44 } UUtRect; 35 45 36 typedef struct {37 uint32_t input;38 float analog;39 } LItDeviceInput;40 41 46 #include "Symbols_Var.h" 42 47 #include "Symbols_Func.h" -
Daodan/src/Oni/Symbols_Func.h
r1017 r1163 57 57 58 58 DefFunc(void, ONrGameState_Timer_Start, ONICALL, (char* function, int time), 0x004FD370); 59 DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, ( const void* inInput), 0x004f6200);59 DefFunc(void, ONrGameState_HandleUtilityInput, ONICALL, (GameInput *input), 0x004f6200); 60 60 DefFunc(uint8_t, ONrDebugKey_WentDown, ONICALL, (uint32_t inKey), 0x005050d0); 61 61 … … 177 177 DefFunc(void, LIrActionBuffer_Add, ONICALL, (void* unknown, LItDeviceInput* input), 0x00403b30); 178 178 179 // Called during the game loop to run the Windows message loop 180 DefFunc(UUtBool, LIiPlatform_InputEvent_GetEvent, ONICALL, (void), 0x004036d0); 181 182 // Called by the game loop to get the latest input frames 183 DefFunc(void, LIrActionBuffer_Get, ONICALL, (short* count, LItActionBuffer **buffers), 0x00403be0); 184 185 // Gets the mouse position 186 DefFunc(void, LIrPlatform_InputEvent_GetMouse, ONICALL, (int active, LItInputEvent *info), 0x00402ca0); 187 188 // Checks if a keyboard key is pressed 189 DefFunc(UUtBool, LIrPlatform_TestKey, ONICALL, (int key, int active), 0x00403930); 190 191 // Translates a key name (from key_config.txt) to a key code 192 DefFunc(int, LIrTranslate_InputName, ONICALL, (char *name), 0x00403a90); 193 194 // Updates TargetGameTime in the game state 195 DefFunc(void, ONrGameState_UpdateServerTime, ONICALL, (GameState *game_state), 0x004fbeb0); 196 197 // Basically stricmp, but it only ever does ASCII case folding 198 DefFunc(int, UUrString_Compare_NoCase, ONICALL, (const char *str1, const char *str2), 0x004266d0); 199 200 // A safe strcpy which lets you specify the size of the target buffer and always 201 // NUL-terminates. Kind of like strlcpy. Just don't call it with dest_size = 0. 202 DefFunc(void, UUrString_Copy, ONICALL, (char *dest, const char *src, size_t dest_size), 0x004265f0); 179 203 180 204 #undef DefFunc -
Daodan/src/Oni/Symbols_Var.h
r994 r1163 84 84 //#define OBJgFlag_DrawNameDistance (*((void*)0x005ec634)) 85 85 86 // Oni's platform input system stores the window HWND in this global 87 #define LIgPlatform_HWND (*((HWND *)0x0055cae8)) 88 89 // Is Oni's input system active? True in gameplay and false in menus. 90 // LIrPlatform_Mode_Set gets called when this changes. 91 #define LIgMode_Internal (*((UUtBool *)0x0055fd40)) 92 93 // List of bindings from Oni's internal key codes to LItActionDescriptions 94 #define LIgBindingArray ((LItBinding *)0x0055fa20) 95 96 // Is "Invert Mouse" checked in the Options menu? If so, platform specific input 97 // code should invert the cursor's Y offset when building LItActionBuffers. 98 #define LIgMode_InvertMouse (*((UUtBool *)0x0052ecf4)) 99 100 // This is a map from DirectInput scan codes to Oni's internal key codes, the 101 // latter of which mostly match ASCII for a US keyboard layout. DirectInput scan 102 // codes are mostly the same as the PS2 make codes that Windows uses in other 103 // APIs except that extended keys are represented by bit 0x80 being set. 104 #define LIgPlatform_ScanCodeToChar ((uint8_t *)0x005292b8) 105 106 // Script variable to enable/disable centering the cursor in the window when 107 // processing input. On by default. 108 #define LIgCenterCursor (*((int *)0x0052d88d)) 109 110 // List of bindable input actions 111 #define LIgActionDescriptions ((LItActionDescription*)0x0052db18) 112 86 113 #endif
Note:
See TracChangeset
for help on using the changeset viewer.