Compare commits

...

2 Commits

Author SHA1 Message Date
Guus Waals 3e469475c9 Redo some autos 2024-10-01 02:36:30 +08:00
Guus Waals 46d9e3fda0 WIP 2024-10-01 01:07:16 +08:00
84 changed files with 4137 additions and 1244 deletions

View File

@ -55,8 +55,9 @@ typedef float GLD_tdxValue;
#define GLD_C_CLEAR_NOTHING 0
#define GLD_C_CLEAR_BACKBUF 1
#define GLD_C_CLEAR_ZBUF 2
/* Structures for Viewports */
typedef unsigned long DWORD;
typedef struct GLD_tdstViewportAttributes_
{
DWORD dwInitialHeight; /* Initial height of viewport in pixels */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043e310
// Erm_fn_ClearLastError
extern "C" void Erm_fn_ClearLastError(ulong ulChannelId) {
// TODO: Implement this function
throw GHStubException("Function not implemented: Erm_fn_ClearLastError");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043e690
// FUN_0043e690
extern "C" undefined FUN_0043e690(undefined4 param_1, undefined4 param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0043e690");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043f7e0
// FUN_0043f7e0
extern "C" void FUN_0043f7e0(byte moduleId, byte param_2, uint param_3) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0043f7e0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043f830
// FUN_0043f830
extern "C" undefined FUN_0043f830(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0043f830");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00445580
// FUN_00445580
extern "C" undefined FUN_00445580(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00445580");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00445880
// FUN_00445880
extern "C" undefined FUN_00445880(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00445880");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00445db0
// FUN_00445db0
extern "C" undefined FUN_00445db0(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00445db0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00445f20
// FUN_00445f20
extern "C" undefined FUN_00445f20(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00445f20");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004464b0
// FUN_004464b0
extern "C" undefined FUN_004464b0(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_004464b0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046ecc0
// FUN_0046ecc0
extern "C" undefined FUN_0046ecc0(undefined2 param_1, undefined2 param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0046ecc0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046ed70
// FUN_0046ed70
extern "C" undefined4 FUN_0046ed70(char * param_1, short * param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0046ed70");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046eea0
// FUN_0046eea0
extern "C" undefined FUN_0046eea0(undefined4 param_1, undefined4 param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0046eea0");
}

View File

@ -8,7 +8,7 @@
// 0046f060
// FUN_0046f060
extern "C" undefined FUN_0046f060(short param_1, undefined4 * param_2) {
extern "C" BOOL FUN_0046f060(short param_1, undefined4 * param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0046f060");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046f0b0
// FUN_0046f0b0
extern "C" undefined4 FUN_0046f0b0(short param_1, undefined4 * param_2, short * param_3) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0046f0b0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046f640
// FUN_0046f640
extern "C" undefined FUN_0046f640(undefined param_1, short param_2, undefined4 * param_3) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0046f640");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00470650
// FUN_00470650
extern "C" undefined FUN_00470650(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00470650");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00470b50
// FUN_00470b50
extern "C" undefined FUN_00470b50(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00470b50");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00471110
// FUN_00471110
extern "C" undefined FUN_00471110(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00471110");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004711d0
// FUN_004711d0
extern "C" undefined FUN_004711d0(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_004711d0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004859f0
// FUN_004859f0
extern "C" undefined FUN_004859f0(undefined1 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_004859f0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0049b410
// FUN_0049b410
extern "C" undefined FUN_0049b410(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0049b410");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0049b460
// FUN_0049b460
extern "C" undefined FUN_0049b460(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0049b460");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0049b8c0
// FUN_0049b8c0
extern "C" undefined FUN_0049b8c0(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0049b8c0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004b9b10
// FUN_004b9b10
extern "C" undefined FUN_004b9b10(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_004b9b10");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004fa4a0
// FUN_004fa4a0
extern "C" undefined FUN_004fa4a0(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_004fa4a0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004fa610
// FUN_004fa610
extern "C" undefined FUN_004fa610(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_004fa610");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055a900
// FUN_0055a900
extern "C" undefined * FUN_0055a900(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055a900");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055a910
// FUN_0055a910
extern "C" undefined FUN_0055a910(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055a910");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055aa10
// FUN_0055aa10
extern "C" undefined FUN_0055aa10(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055aa10");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055aa60
// FUN_0055aa60
extern "C" undefined FUN_0055aa60(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055aa60");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055aa80
// FUN_0055aa80
extern "C" undefined FUN_0055aa80(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055aa80");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055aab0
// FUN_0055aab0
extern "C" undefined FUN_0055aab0(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055aab0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055d4b0
// FUN_0055d4b0
extern "C" undefined FUN_0055d4b0(undefined4 param_1, undefined4 param_2, undefined4 param_3) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055d4b0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055d500
// FUN_0055d500
extern "C" undefined FUN_0055d500(undefined4 param_1, undefined4 param_2, undefined4 param_3) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0055d500");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0058f6a0
// FUN_0058f6a0
extern "C" undefined FUN_0058f6a0(undefined2 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0058f6a0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0058fca0
// FUN_0058fca0
extern "C" undefined FUN_0058fca0(undefined2 param_1, undefined4 param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0058fca0");
}

View File

@ -7,8 +7,8 @@
#include <stdexcept>
// 0047c340
// FUN_0047c340
extern "C" undefined FUN_0047c340(undefined4 param_1, undefined4 param_2, r3_astruct_2 * param_3) {
// GLI_xAdjustCameraToViewport
extern "C" void GLI_xAdjustCameraToViewport(GLD_tdstDeviceAttributes_ * p_stDev, GLD_tdstViewportAttributes * p_stVpt, GLI_tdstCamera * camera) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0047c340");
throw GHStubException("Function not implemented: GLI_xAdjustCameraToViewport");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004110b0
// SND_fn_bAddDataDirectory
extern "C" bool SND_fn_bAddDataDirectory(char * path) {
// TODO: Implement this function
throw GHStubException("Function not implemented: SND_fn_bAddDataDirectory");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0058f570
// TMR_fn_wCreateTimer
extern "C" undefined TMR_fn_wCreateTimer(short wTimerType) {
// TODO: Implement this function
throw GHStubException("Function not implemented: TMR_fn_wCreateTimer");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0058f9f0
// TMR_fn_wReadTimer
extern "C" short TMR_fn_wReadTimer(short timerHandle, tdstTimerCount * param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: TMR_fn_wReadTimer");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0058fb90
// TMR_fn_wResetTimer
extern "C" undefined TMR_fn_wResetTimer(undefined2 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: TMR_fn_wResetTimer");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00445560
// checkMask_5d29c4
extern "C" bool checkMask_5d29c4(uint mask) {
// TODO: Implement this function
throw GHStubException("Function not implemented: checkMask_5d29c4");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046ee70
// findFreeStructInArray
extern "C" undefined findFreeStructInArray(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: findFreeStructInArray");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055d750
// fn_p_stExtendedFopenForCNTinAVI
extern "C" undefined fn_p_stExtendedFopenForCNTinAVI(undefined4 param_1, undefined4 outSomething) {
// TODO: Implement this function
throw GHStubException("Function not implemented: fn_p_stExtendedFopenForCNTinAVI");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043ea60
// fn_p_vDynAlloc
extern "C" undefined fn_p_vDynAlloc(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: fn_p_vDynAlloc");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043ec30
// fn_p_vStaAlloc
extern "C" void * fn_p_vStaAlloc(ulong ulSize, uchar ucChannel) {
// TODO: Implement this function
throw GHStubException("Function not implemented: fn_p_vStaAlloc");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00485bd0
// get_one
extern "C" undefined4 get_one(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: get_one");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0049b660
// m7_lock_unlock_noop
extern "C" bool m7_lock_unlock_noop(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: m7_lock_unlock_noop");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043f750
// mmgGetThreadGroupModule
extern "C" byte mmgGetThreadGroupModule(ulong threadId, uchar groupId) {
// TODO: Implement this function
throw GHStubException("Function not implemented: mmgGetThreadGroupModule");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055d3b0
// r3_allocFileWrapper
extern "C" FIL_tdstConcatFile * r3_allocFileWrapper(int numUnk0, int numUnk1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_allocFileWrapper");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00447860
// r3_beginLoadLevel
extern "C" void r3_beginLoadLevel(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_beginLoadLevel");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055db00
// r3_closeFileWrapper
extern "C" void r3_closeFileWrapper(FIL_tdstConcatFile * * param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_closeFileWrapper");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00470660
// r3_config_setTexturesCompressed
extern "C" undefined r3_config_setTexturesCompressed(undefined1 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_config_setTexturesCompressed");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00470630
// r3_config_setTnl
extern "C" undefined r3_config_setTnl(undefined1 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_config_setTnl");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00470640
// r3_config_setTrilinearFiltering
extern "C" undefined r3_config_setTrilinearFiltering(undefined1 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_config_setTrilinearFiltering");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004012d0
// r3_get_gli_height0
extern "C" int r3_get_gli_height0(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_get_gli_height0");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004012c0
// r3_get_gli_width0
extern "C" int r3_get_gli_width0(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_get_gli_width0");
}

View File

@ -6,9 +6,9 @@
#include <gh_global.h>
#include <stdexcept>
// 00443730
// FUN_00443730
extern "C" undefined FUN_00443730(void) {
// 0046fed0
// r3_gfxFrame?
extern "C" undefined r3_gfxFrame?(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_00443730");
throw GHStubException("Function not implemented: r3_gfxFrame?");
}

View File

@ -6,9 +6,9 @@
#include <gh_global.h>
#include <stdexcept>
// 0043e660
// FUN_0043e660
extern "C" undefined FUN_0043e660(void) {
// 00401000
// r3_initAllModules
extern "C" undefined r3_initAllModules(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_0043e660");
throw GHStubException("Function not implemented: r3_initAllModules");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00401220
// r3_initEngine
extern "C" undefined r3_initEngine(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_initEngine");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00402450
// r3_load_splash_bitmap
extern "C" void r3_load_splash_bitmap(HWND unused) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_load_splash_bitmap");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046ebf0
// r3_module6_init
extern "C" uint r3_module6_init(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_module6_init");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055a9e0
// r3_set_videos_path
extern "C" undefined r3_set_videos_path(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_set_videos_path");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004012a0
// r3_set_window_wh
extern "C" void r3_set_window_wh(undefined4 param_1, undefined4 param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_set_window_wh");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004022f0
// r3_setupWindow1
extern "C" undefined r3_setupWindow1(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_setupWindow1");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00447890
// r3_unlockLoadLevelMutex
extern "C" void r3_unlockLoadLevelMutex(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_unlockLoadLevelMutex");
}

View File

@ -7,8 +7,8 @@
#include <stdexcept>
// 004013a0
// FUN_004013a0
extern "C" undefined FUN_004013a0(void) {
// r3_windowUnlockCursor
extern "C" undefined r3_windowUnlockCursor(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: FUN_004013a0");
throw GHStubException("Function not implemented: r3_windowUnlockCursor");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0046f200
// r3_wndGetFreeInnerIdx
extern "C" undefined r3_wndGetFreeInnerIdx(short wndHandle, undefined4 param_2) {
// TODO: Implement this function
throw GHStubException("Function not implemented: r3_wndGetFreeInnerIdx");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055a8a0
// set_DLL_string
extern "C" undefined set_DLL_string(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: set_DLL_string");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0043e620
// set_unk
extern "C" void set_unk(HWND wnd) {
// TODO: Implement this function
throw GHStubException("Function not implemented: set_unk");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 0055aa30
// set_world_levels_path
extern "C" undefined set_world_levels_path(undefined4 param_1) {
// TODO: Implement this function
throw GHStubException("Function not implemented: set_world_levels_path");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 004477d0
// spawnThread
extern "C" undefined spawnThread(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: spawnThread");
}

View File

@ -1,14 +0,0 @@
// AUTO-GENERATED FILE!!!!
// This function has yet to be decompiled using 'Dump Current Function' in ghidra
// with possible manualy fixes
#include <r3/binders/auto.h>
#include <gh_global.h>
#include <stdexcept>
// 00444e80
// thunk_FUN_00441e10
extern "C" undefined thunk_FUN_00441e10(void) {
// TODO: Implement this function
throw GHStubException("Function not implemented: thunk_FUN_00441e10");
}

File diff suppressed because it is too large Load Diff

View File

@ -1,117 +0,0 @@
00598348 || DAT_00598348 || / || undefined
00598350 || DAT_00598350 || / || undefined
00598b7c || DAT_00598b7c || / || undefined
005990bc || DAT_005990bc || / || undefined
005a9ed4 || DAT_005a9ed4 || / || undefined
005aa028 || FLOAT_005aa028 || / || float
005aa02c || FLOAT_005aa02c || / || float
005b6830 || s_windowTitle || / || char[12]
005b683c || s_percents || / || char[4]
005b68f0 || lpAppName_005b68f0 || / || char[8]
005b690c || s_UbiSoft_Ubi_ini || / || TerminatedCString
005b9f64 || DAT_005b9f64 || / || undefined2
005ba354 || s_percent_s_path_2 || / || string
005bad00 || DAT_005bad00 || / || undefined2
005bd29c || g_errMod0 || / || byte
005bd454 || DAT_005bd454 || / || undefined4
005bd460 || s_\jc\z%d:%s_005bd460 || / || string
005bd58c || g_errModMmg || / || byte
005bd5f4 || DAT_005bd5f4 || / || char
005bd630 || s_Video_AutoAdjustQuality_005bd630 || / || string
005bd648 || s_Video_BPP_005bd648 || / || string
005bd654 || s_Video_RealQuality_005bd654 || / || string
005bd668 || s_Rayman_Arena_005bd668 || / || string
005bd678 || s_Video_WantedQuality_005bd678 || / || string
005bd9d0 || s_%s%s\World\Sound_005bd9d0 || / || string
005bd9e4 || s_BIN_005bd9e4 || / || char[4]
005bdc9c || DAT_005bdc9c || / || char
005bdfd0 || s_-level:_005bdfd0 || / || string
005bdfd8 || s_R3_DVD_005bdfd8 || / || string
005be290 || s_Tex32_2.cnt_005be290 || / || string
005be29c || s_Tex32_1.cnt_005be29c || / || string
005be2a8 || s_Tex16_1.cnt_005be2a8 || / || string
005be2b4 || s_Tex16_2.cnt_005be2b4 || / || string
005be2c0 || s_TexturesQuality_005be2c0 || / || string
005be2dc || s_VignettesFile_005be2dc || / || string
005be980 || s_Please_insert_the_CD_005be980 || / || string
005bf5fc || g_errMod6 || / || byte
005bf600 || g_needToInitMod6 || / || dword
005bf608 || s_V5.9.0_-_August_11th_1997_005bf608 || / || string
005bf690 || DAT_005bf690 || / || char
005bf6d8 || s__08X__04X__04X__02X_02X__02X_02X_005bf6d8 || / || string
005c069c || g_errMod7 || / || byte
005c1400 || g_errMod17 || / || byte
005c51f4 || g_errMod10 || / || byte
005cb16c || g_errMod12 || / || char
005cf964 || g_gameHWND1 || /windef.h || HWND
005cf96c || lpDefault_005cf96c || / || long
005d2660 || g_currentBinkMovie || /auto_structs || windowCreationParams
005d28b6 || r3_main_data_005d28b6 || / || r3_main_data
005d29c4 || DWORD_005d29c4 || / || dword
005e6b28 || DAT_005e6b28 || / || undefined4
005e6b2c || DAT_005e6b2c || / || undefined
005e6b30 || DAT_005e6b30 || / || undefined4
005e6b34 || DAT_005e6b34 || / || undefined4
005e6c34 || g_lastFrameTime || / || int
005e6c38 || DAT_005e6c38 || / || undefined
005e6c3c || g_currentFrameTime || / || undefined4
005e6c40 || DAT_005e6c40 || / || undefined4
005e6c44 || DAT_005e6c44 || / || undefined
005e6c46 || DAT_005e6c46 || / || short
005e6c48 || DAT_005e6c48 || / || int
005e6c54 || g_textureConcatFile || /auto_structs || FIL_tdstConcatFile *
005f5e24 || g_startOfGfxStruct || /auto_structs || r3_astruct_2
0063bec4 || g_m7_criticalSectionInitialized || / || char
00754eb0 || g_fileWrapper1 || /auto_structs || FIL_tdstConcatFile *
0077d0a4 || INT_0077d0a4 || / || int
0077d0a8 || g_runMaximized || / || int
0077d0b0 || g_engineShouldRun || /WinDef.h || WPARAM
0077d0b4 || g_engineRunning || / || int
0077d0b8 || g_windowCloseRequested || / || undefined4
0077d0bc || g_drawSemaphore || /winnt.h || HANDLE
0077d1c0 || g_windowTitle || / || char[256]
0077d4c4 || g_gameHWND || /windef.h || HWND
00781660 || g_gameDataPath || / || char[64]
00781868 || g_savegamePath || / || undefined1
0078196c || DAT_0078196c || / || undefined
00781a70 || s_world_levels || / || undefined
00781b74 || DAT_00781b74 || / || undefined
00781e80 || DAT_00781e80 || / || undefined
00781f84 || DAT_00781f84 || / || undefined
00782394 || s_MoviePath || / || undefined
007825c0 || s_quitting1 || / || char[64]
00782600 || s_wndStrQuiting || / || char[56]
00782640 || g_stErmTheLastErrorInfo || / || tdstLastErrorInfo[3]
0078f6a0 || g_a_p_stMmgModuleBlocksInfo || /mmg.h || tdstBlockInfoPriv *[255]
0078faa0 || g_MmgCriticalSection || / || undefined
0078fac0 || g_a_ucBlocksNbInModule || / || char[255]
0078fbc0 || g_stGeneralChannelInfo || /mmg.h || tdstGeneralChannelsInfo_
0078fbc8 || g_d_stCurrentModeInfo || /mmg.h || tdstCurrentModeInfo *
007a0cd8 || DAT_007a0cd8 || / || undefined1
007a2c14 || g_windowClearColor || / || undefined4
007a2e00 || g_bink_videoBpp || / || byte
007a2e02 || g_bink_wantedVideoQuality || / || byte
007a2e03 || g_bink_realVideoQuality || / || byte
007a2e04 || g_bink_autoAdjustQuality || / || byte
007d7d8c || g_haveCmdlineLevel || / || undefined
007d7dc0 || g_r3_engine || /engine.h || GAM_tdstEngineStructure
007d9aa0 || lpReturnedString_007d9aa0 || / || undefined
007d9ce0 || g_texturesFilenameBuf || / || undefined
007eb200 || g_unkModuleIdByte || / || dword
007eba24 || g_engine? || / || int
007edb18 || gfx_device || /d3d8.h || IDirect3DDevice8 *
007edd40 || g_GLI_fullscreen || / || undefined
007edd44 || g_GLI_width0 || / || int
007edd48 || g_GLI_height0 || / || int
007edd4c || g_GLI_bitdepth0 || / || int
007edd50 || g_GLI_fullscreen1 || / || undefined1
007edd54 || g_GLI_width1 || / || int
007edd58 || g_GLI_height1 || / || int
007edd5c || g_GLI_bitdepth1 || / || int
007edd60 || g_GLI_adapter || / || undefined4
007edd70 || g_GLI_identifier || /guiddef.h || GUID
007edd80 || g_GLI_mode_float || / || float
007edda0 || g_windowTab || / || windowInstance *[16]
007edde0 || g_m7_init_struct || / || m7_init_struct
007eddf9 || m7_mmgBlockInitialized || / || undefined
007ede20 || g_mod7CriticalSection || / || undefined

View File

@ -11,7 +11,6 @@ dde.h
ddeml.h
dlgs.h
excpt.h
file.h
float.h
guiddef.h
imm.h
@ -50,14 +49,12 @@ rpcnterr.h
servprov.h
shellapi.h
snddef.h
sound.h
stdarg.h
stdint.h
stdio.h
stdlib.h
string.h
time.h
timer.h
tvout.h
unknwn.h
urlmon.h

View File

@ -15,6 +15,8 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RebuildFunctionDatabase extends GhidraScript {
// Will rebuild all functions
public boolean rebuildAllGlobals = true;
FunctionDatabase functionDB;
@Override
@ -23,12 +25,12 @@ public class RebuildFunctionDatabase extends GhidraScript {
functionDB = new FunctionDatabase(this);
scanDirectory(RecompileConfig.INSTANCE.dirDecompAuto);
scanDirectory(RecompileConfig.INSTANCE.dirDecompFix);
scanDirectory(RecompileConfig.INSTANCE.dirDecompStub);
scanDirectory(RecompileConfig.INSTANCE.dirDecompAuto, FunctionDatabase.Type.Auto);
scanDirectory(RecompileConfig.INSTANCE.dirDecompFix, FunctionDatabase.Type.Fix);
scanDirectory(RecompileConfig.INSTANCE.dirDecompStub, FunctionDatabase.Type.Stub);
println("Applying default filters...");
functionDB.applyDefaultFilters();
functionDB.applyDefaultFilters(rebuildAllGlobals);
println("Saving function database...");
functionDB.save();
@ -43,17 +45,17 @@ public class RebuildFunctionDatabase extends GhidraScript {
// }
}
private void scanDirectory(File directory) throws Exception {
private void scanDirectory(File directory, FunctionDatabase.Type type) throws Exception {
File[] files = directory.listFiles((dir, name) -> name.endsWith(".cxx"));
if (files == null)
return;
for (File file : files) {
scanFile(file);
scanFile(file, type);
}
}
private void scanFile(File file) throws Exception {
private void scanFile(File file, FunctionDatabase.Type type) throws Exception {
println("Scanning " + file);
try (BufferedReader reader = new BufferedReader(new FileReader(file))) {
String line;
@ -104,10 +106,12 @@ public class RebuildFunctionDatabase extends GhidraScript {
entry.address = functionAddress;
entry.name = functionName;
entry.file = file;
entry.type = type;
entry.dependencies = dependencies;
functionDB.entries.add(entry);
} else {
throw new Exception("Failed to parse function at " + file.getName());
// throw new Exception("Failed to parse function at " + file.getName());
println("Failed to parse function at " + file.getName());
}
}
}

View File

@ -517,7 +517,7 @@ public class DataTypeWriter {
this.writer.write(EOL);
this.writer.write(EOL);
} else {
this.writer.write("typedef enum " + enumName + "_ {");
this.writer.write("enum " + enumName + " {");
String description = enumm.getDescription();
if (description != null && description.length() != 0) {
var10000 = this.writer;
@ -549,7 +549,7 @@ public class DataTypeWriter {
this.writer.write(EOL);
}
this.writer.write("} " + enumName + ";");
this.writer.write("};");
this.writer.write(EOL);
this.writer.write(EOL);
}

View File

@ -13,6 +13,12 @@ import ghidra.program.model.address.Address;
import ghidra.program.model.listing.Function;
public class FunctionDatabase {
public enum Type {
Auto,
Fix,
Stub
}
public class Dependency implements java.io.Serializable {
private static final long serialVersionUID = 1L;
public Address address;
@ -42,12 +48,14 @@ public class FunctionDatabase {
public Address address;
public String name;
public File file;
public Type type;
public List<Dependency> dependencies = new ArrayList<>();
private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
out.writeObject(address != null ? address.toString() : null);
out.writeObject(name);
out.writeObject(file != null ? file.toString() : null);
out.writeObject(type);
out.writeObject(dependencies);
}
@ -61,6 +69,7 @@ public class FunctionDatabase {
if (fileString != null) {
file = new File(fileString);
}
type = (Type) in.readObject();
dependencies = (List<Dependency>) in.readObject();
}
}
@ -100,10 +109,14 @@ public class FunctionDatabase {
entries.add(entry);
}
public void applyDefaultFilters() throws Exception {
public void applyDefaultFilters(boolean rebuildAllGlobals) throws Exception {
GlobalDumper globalDumper = new GlobalDumper(script);
FunctionDumper dumper = new FunctionDumper(script, globalDumper);
if (rebuildAllGlobals) {
globalDumper.removeGlobalManifest();
}
boolean madeAnyChanges = false;
// Create a hash map to store symbol names
@ -113,8 +126,8 @@ public class FunctionDatabase {
Function function = script.getFunctionAt(entry.address);
if (function != null) {
String dirComponent = entry.file.getParent().toString();
boolean isAuto = dirComponent.startsWith(RecompileConfig.INSTANCE.dirDecompAuto.toString());
boolean isFix = dirComponent.startsWith(RecompileConfig.INSTANCE.dirDecompFix.toString());
boolean isAuto = entry.type == Type.Auto;
boolean isFix = entry.type == Type.Fix;
// Get the actual symbol name and store it in the hash map
String symbolName = function.getName();
symbolNames.put(entry.address, symbolName);
@ -142,6 +155,10 @@ public class FunctionDatabase {
boolean pendingDelete = false;
boolean pendingRegenerate = false;
if (rebuildAllGlobals) {
pendingRegenerate = true;
}
// Remove CRT and other blacklisted functions
if (function == null || !dumper.isValidFunction(function)) {
// Remove the file
@ -183,11 +200,13 @@ public class FunctionDatabase {
for (Dependency dependency : entry.dependencies) {
Function depFunction = script.getFunctionAt(dependency.address);
if (depFunction == null) {
script.println("Dependency not found: " + dependency.name + " at " + dependency.address + " in " + entry.file);
script.println(
"Dependency not found: " + dependency.name + " at " + dependency.address + " in " + entry.file);
pendingRegenerate = true;
} else if (!dumper.isValidFunction(depFunction) || !depFunction.getName().equals(dependency.name)) {
script
.println("Invalid dependency: " + dependency.name + " at " + dependency.address + " in " + entry.file + " should be " + dependency.name);
.println("Invalid dependency: " + dependency.name + " at " + dependency.address + " in " + entry.file
+ " should be " + dependency.name);
pendingRegenerate = true;
}
}
@ -202,7 +221,7 @@ public class FunctionDatabase {
entry.file.delete();
madeAnyChanges = true;
}
} else if (pendingRegenerate) {
} else if (pendingRegenerate && entry.type != Type.Stub) {
if (!dryMode) {
functionsToRegenerate.add(function);
madeAnyChanges = true;

View File

@ -56,6 +56,12 @@ public class GlobalDumper {
manifestFile = new File(RecompileConfig.INSTANCE.outputDir, "globals.txt");
}
public void removeGlobalManifest() {
if (manifestFile.exists()) {
manifestFile.delete();
}
}
public boolean loadGlobalManifest() throws Exception {
// Globals are stored in the format of
// <address> || <name> || <type>
@ -101,7 +107,12 @@ public class GlobalDumper {
return true;
}
public void addGlobal(Address addr, HighSymbol sym) {
public void addGlobal(Address addr, HighSymbol sym) throws Exception {
if (addr.compareTo(RecompileConfig.INSTANCE.staticMemoryBlockStart) < 0
|| addr.compareTo(RecompileConfig.INSTANCE.staticMemoryBlockEnd) > 0) {
throw new Exception("Global address out of range: " + addr);
}
DataType dt = sym.getDataType();
// if(symb.get
if (sym.getDataType().getName() == "undefined") {
@ -117,7 +128,8 @@ public class GlobalDumper {
script.println("WARNING: Missing type for global: " + sym.getName() + " at " + addr);
return;
}
// script.println("Global: " + addr + " - " + sym.getName() + " - " + dt.getDisplayName());
// script.println("Global: " + addr + " - " + sym.getName() + " - " +
// dt.getDisplayName());
globalAddrs.put(addr, new GlobalRec(addr, sym.getName(), dt));
}
@ -238,8 +250,11 @@ public class GlobalDumper {
throw new Exception("Failed to delete backup file: " + backupFile + ", globals will not be saved!");
}
}
if (!manifestFile.renameTo(backupFile))
throw new Exception("Failed to rename manifest file: " + manifestFile + ", globals will not be saved!");
if (manifestFile.exists()) {
if (!manifestFile.renameTo(backupFile))
throw new Exception("Failed to rename manifest file: " + manifestFile + ", globals will not be saved!");
}
try (PrintWriter writer = new PrintWriter(manifestFile)) {
script.println("Saving global manifest to " + manifestFile);

View File

@ -80,7 +80,7 @@ public class TypeDumper {
if (catPath.getPathElements().length > 0 && categoryPathBlacklist.contains(catPath.getPathElements()[0]))
continue;
script.println("Type: " + dt.getDisplayName() + " - CatPath: " + dt.getCategoryPath());
// script.println("Type: " + dt.getDisplayName() + " - CatPath: " + dt.getCategoryPath());
// if (dt.getName().equals("ImageBaseOffset32"))
// throw new Exception("Found: " + dt.getDisplayName() + " - " + catPath.getPathElements()[0] + " - " + dt.getClass().getSimpleName());