StashVars (#679)

* beginnings

* more

* done

* cleanup

* remove sublist.txt
This commit is contained in:
Ethan Roseman 2022-04-08 14:25:49 -04:00 committed by GitHub
parent 29acf47328
commit 4555d9fab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
264 changed files with 445 additions and 4845 deletions

View File

@ -49,6 +49,7 @@
#define sfx_adjust_env_sound_pos dead_sfx_adjust_env_sound_pos
#define fx_star_spirits_energy dead_fx_star_spirits_energy
#define heap_malloc dead_heap_malloc
#define heap_free dead_heap_free
#define general_heap_malloc dead_general_heap_malloc
#define update_lerp dead_update_lerp
#define create_shadow_type dead_create_shadow_type

View File

@ -657,7 +657,7 @@ typedef struct EffectInstanceDataThing {
char unk_4C[0x24];
s32 unk_70;
s32 unk_74;
} EffectInstanceDataThing;
} EffectInstanceDataThing; // TODO remove / convert to appropriate effect data struct
typedef struct EffectInstanceData {
/* 0x00 */ EffectInstanceDataThing* unk_00;

View File

@ -341,8 +341,7 @@ ApiStatus func_80241AE0_EA23E0(Evt* script, s32 isInitialCall) {
#include "world/common/AwaitPlayerNearNpc.inc.c"
// StashVars.inc.c
INCLUDE_ASM(s32, "EA0C10", func_8024267C_EA2F7C);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -36,7 +36,7 @@ ApiStatus func_802413FC_EA9EDC(Evt* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "EA8AE0", func_8024140C_EA9EEC);
INCLUDE_ASM(s32, "EA8AE0", func_80241468_EA9F48);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -12,7 +12,7 @@ extern s32 D_802442D0[];
extern u32 D_80244494;
extern s32 D_800B8DEC;
INCLUDE_ASM(s32, "EB1170", func_80240310_EB1170);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -9,7 +9,7 @@ const char* ascii_EC7170 = "flo_09";
const char* ascii_EC7178 = "flo_22";
const char* ascii_EC7180 = "flo_18\0";
INCLUDE_ASM(s32, "EC2240", func_80240040_EC2240);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -5,6 +5,6 @@
#include "common/foliage.inc.c"
INCLUDE_ASM(s32, "EC7590", func_8024061C_EC77CC);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
#define NAMESPACE ED42A0
INCLUDE_ASM(s32, "ED42A0", func_80240080_ED42A0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -6,7 +6,7 @@
#define NAMESPACE EDC020
extern s32 D_802429E0[];
//extern s32** D_802417EC_EDD7CC = NULL;
//extern s32** EDC020_varTable = NULL;
/*
extern s32 D_80241850_EDD830 = {
@ -20,27 +20,7 @@ extern s32 D_80241850_EDD834 = {
#include "common/foliage.inc.c"
#ifdef NON_MATCHING // TODO(data)
ApiStatus func_8024027C_EDC25C(Evt* script, s32 isInitialCall) {
s32 i;
if (D_802417EC_EDD7CC == NULL) {
D_802417EC_EDD7CC = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
D_802417EC_EDD7CC[i] = script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = D_802417EC_EDD7CC[i];
}
heap_free(D_802417EC_EDD7CC);
D_802417EC_EDD7CC = NULL;
}
return ApiStatus_DONE2;
}
#else
INCLUDE_ASM(s32, "EDC020", func_8024027C_EDC25C);
#endif
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -219,6 +219,7 @@ ApiStatus N(func_8024113C_BDFECC)(Evt* script, s32 isInitialCall) {
return ApiStatus_BLOCK;
}
static s32** N(varTable) = NULL;
#include "world/common/StashVars.inc.c"
EvtScript N(80241C6C) = {

View File

@ -85,6 +85,7 @@ EvtScript N(main) = {
EVT_END
};
static s32** N(varTable) = NULL;
#include "world/common/StashVars.inc.c"
EvtScript N(80240624) = {

View File

@ -130,6 +130,7 @@ static s32 N(pad_868)[] = {
0x00000000, 0x00000000,
};
static s32** N(varTable) = NULL;
#include "world/common/StashVars.inc.c"
EvtScript N(80240874) = {

View File

@ -651,7 +651,7 @@ static s32 N(pad_36D8)[] = {
0x00000000, 0x00000000,
};
s32** N(D_802436E0_C59620) = NULL; // StashVars.inc.c data
s32** N(varTable) = NULL; // StashVars.inc.c data
EvtScript N(802436E4) = {
EVT_SET_GROUP(0)

View File

@ -1,23 +1,6 @@
#include "dgb_18.h"
// TODO: StashVars.inc.c
ApiStatus N(func_80240FB0_C56EF0)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_802436E0_C59620) == NULL) {
N(D_802436E0_C59620) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_802436E0_C59620)[i] = script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = N(D_802436E0_C59620)[i];
}
heap_free(N(D_802436E0_C59620));
N(D_802436E0_C59620) = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -9,7 +9,7 @@
ApiStatus N(UnkFunc1)(Evt* script, s32 isInitialCall);
ApiStatus N(UnkNpcAIMainFunc)(Evt* script, s32 isInitialCall);
extern s32** N(D_802436E0_C59620);
extern s32** N(varTable);
extern NpcGroupList N(npcGroupList_802436B4);
extern EvtScript N(main);

View File

@ -59,25 +59,14 @@ typedef struct {
void N(func_802430C8_95E2C8)(Unk_Struct_1* ptr, s32 arg1);
typedef struct {
/* 0x00 */ s32 flags;
/* 0x04 */ s32 effectIndex;
/* 0x08 */ s32 instanceCounter;
/* 0x0C */ EffectInstanceDataThing* unk_0C;
/* 0x10 */ void (*update)(EffectInstance* effectInst);
/* 0x14 */ void (*renderWorld)(EffectInstance* effectInst);
/* 0x18 */ void (*unk_18)(EffectInstance* effectInst);
/* 0x1C */ void* unk_1C;
} N(temp);
static s32 N(D_8024DFC0);
static s8 N(pad_D_8024DFC4)[0x4];
static s32 N(pad_D_8024DFC8)[4];
static s32 N(D_8024DFD8);
static s8 N(pad_D_8024DFDC)[0x4];
static N(temp)* N(D_8024DFE0);
static N(temp)* N(D_8024DFE4);
static N(temp)* N(D_8024DFE8);
static EffectInstance* N(D_8024DFE0);
static EffectInstance* N(D_8024DFE4);
static EffectInstance* N(D_8024DFE8);
static s8 N(pad_D_8024DFEC)[0x4];
static s32 N(D_8024DFF0)[112];
static s8 N(pad_D_8024E1B0)[0x4]; // Probably part of the above
@ -550,7 +539,8 @@ NpcSettings N(npcSettings_8024518C) = {
.level = 99,
};
s32** N(D_802451B8_9603B8) = NULL;
s32** N(varTable) = NULL;
EvtScript N(802451BC) = {
EVT_CALL(ShowGotItem, EVT_VAR(0), 1, 0)
@ -2339,7 +2329,9 @@ N(shopPrice) N(shopPriceList_8024B550)[] = {
{},
};
s32** N(D_8024B5B0_9667B0) = NULL;
#define NAMESPACE dro_01_dup
s32** N(varTable) = NULL;
#define NAMESPACE dro_01
EvtScript N(8024B5B4) = {
EVT_CALL(ShowGotItem, EVT_VAR(0), 1, 0)
@ -2966,23 +2958,7 @@ EvtScript N(makeEntities) = {
#include "world/common/UnkNpcAIMainFunc.inc.c"
ApiStatus N(func_80241470_95C670)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_802451B8_9603B8) == NULL) {
N(D_802451B8_9603B8) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_802451B8_9603B8)[i] = (s32*) script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = (s32) N(D_802451B8_9603B8)[i];
}
heap_free(N(D_802451B8_9603B8));
N(D_802451B8_9603B8) = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"
@ -3020,7 +2996,7 @@ ApiStatus N(func_80241BE0_95CDE0)(Evt* script, s32 isInitialCall) {
N(D_8024DFE8) = fx_quizmo_assistant(0, evt_get_variable(script, EVT_ARRAY(1)), evt_get_variable(script, EVT_ARRAY(2)),
evt_get_variable(script, EVT_ARRAY(3)), 1.0f, 0);
effectPtr = N(D_8024DFE0)->unk_0C;
effectPtr = N(D_8024DFE0)->data;
effectPtr->unk_18 = 0;
effectPtr->unk_20 = 0;
effectPtr->unk_24.s = 0;
@ -3028,7 +3004,7 @@ ApiStatus N(func_80241BE0_95CDE0)(Evt* script, s32 isInitialCall) {
effectPtr->unk_1C = 0;
}
effectPtr = N(D_8024DFE0)->unk_0C;
effectPtr = N(D_8024DFE0)->data;
effectPtr->unk_20 += 10;
effectPtr->unk_28 += 10;
@ -3051,7 +3027,7 @@ ApiStatus N(func_80241DF8_95CFF8)(Evt* script, s32 isInitialCall) {
N(D_8024DFE8)->flags |= 0x10;
}
effectPtr = N(D_8024DFE0)->unk_0C;
effectPtr = N(D_8024DFE0)->data;
effectPtr->unk_18 -= 10;
effectPtr->unk_20 -= 10;
effectPtr->unk_24.s -= 10;
@ -3069,13 +3045,13 @@ ApiStatus N(func_80241DF8_95CFF8)(Evt* script, s32 isInitialCall) {
}
ApiStatus N(func_80241EAC_95D0AC)(Evt* script, s32 isInitialCall) {
N(D_8024DFE0)->unk_0C->unk_34 = evt_get_variable(script, *script->ptrReadPos);
((EffectInstanceDataThing*)N(D_8024DFE0)->data)->unk_34 = evt_get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2;
}
ApiStatus N(func_80241EE0_95D0E0)(Evt* script, s32 isInitialCall) {
s32 var = evt_get_variable(script, *script->ptrReadPos);
EffectInstanceDataThing* effectPtr = N(D_8024DFE0)->unk_0C;
EffectInstanceDataThing* effectPtr = N(D_8024DFE0)->data;
switch (var) {
case 0:
@ -3096,17 +3072,17 @@ ApiStatus N(func_80241EE0_95D0E0)(Evt* script, s32 isInitialCall) {
}
ApiStatus N(func_80241F60_95D160)(Evt* script, s32 isInitialCall) {
N(D_8024DFE8)->unk_0C->unk_1C = 0;
((EffectInstanceDataThing*)N(D_8024DFE8)->data)->unk_1C = 0;
return ApiStatus_DONE2;
}
ApiStatus N(func_80241F78_95D178)(Evt* script, s32 isInitialCall) {
N(D_8024DFE8)->unk_0C->unk_1C = 1;
((EffectInstanceDataThing*)N(D_8024DFE8)->data)->unk_1C = 1;
return ApiStatus_DONE2;
}
ApiStatus N(func_80241F94_95D194)(Evt* script, s32 isInitialCall) {
N(D_8024DFE8)->unk_0C->unk_1C = 2;
((EffectInstanceDataThing*)N(D_8024DFE8)->data)->unk_1C = 2;
return ApiStatus_DONE2;
}

View File

@ -1,22 +1,8 @@
#include "dro_01.h"
ApiStatus N(func_80243460_95E660)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_8024B5B0_9667B0) == NULL) {
N(D_8024B5B0_9667B0) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_8024B5B0_9667B0)[i] = (s32*) script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = (s32) N(D_8024B5B0_9667B0)[i];
}
heap_free(N(D_8024B5B0_9667B0));
N(D_8024B5B0_9667B0) = NULL;
}
return ApiStatus_DONE2;
}
#define NAMESPACE dro_01_dup
#include "world/common/StashVars.inc.c"
#define NAMESPACE dro_01
#define NAMESPACE dro_01_dup
#include "world/common/GetItemName.inc.c"

View File

@ -73,7 +73,7 @@ ApiStatus N(dup_GetEntryPos)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_SetPlayerStatusAnimFlags100000)(Evt* script, s32 isInitialCall);
ApiStatus N(dup_SomeXYZFunc2)(Evt* script, s32 isInitialCall);
extern s32** N(D_8024B5B0_9667B0);
extern s32** N(varTable);
extern N(shopInventory) N(shopInventory_8024B4FC)[];
extern N(shopPrice) N(shopPriceList_8024B550)[];

View File

@ -467,7 +467,7 @@ static s32 N(pad_4DD4)[] = {
0x00000000, 0x00000000, 0x00000000,
};
s32** N(D_80244DE0_96DFA0) = NULL;
s32** N(varTable) = NULL;
EvtScript N(80244DE4) = {
EVT_CALL(ShowGotItem, EVT_VAR(0), 1, 0)
@ -3065,23 +3065,7 @@ NpcGroupList N(npcGroupList_8024EEF4) = {
{},
};
ApiStatus N(func_80240300_9694C0)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_80244DE0_96DFA0) == NULL) {
N(D_80244DE0_96DFA0) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_80244DE0_96DFA0)[i] = (s32*) script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = (s32) N(D_80244DE0_96DFA0)[i];
}
heap_free(N(D_80244DE0_96DFA0));
N(D_80244DE0_96DFA0) = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -183,7 +183,7 @@ NpcSettings N(npcSettings_80240EDC) = {
.level = 99,
};
s32** N(D_80240F08_CA81A8) = NULL;
s32** N(varTable) = NULL;
EvtScript N(80240F0C) = {
EVT_CALL(ShowGotItem, EVT_VAR(0), 1, 0)
@ -1091,23 +1091,7 @@ NpcGroupList N(npcGroupList_8024442C) = {
{},
};
ApiStatus N(func_80240040_CA72E0)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_80240F08_CA81A8) == NULL) {
N(D_80240F08_CA81A8) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_80240F08_CA81A8)[i] = script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = N(D_80240F08_CA81A8)[i];
}
heap_free(N(D_80240F08_CA81A8));
N(D_80240F08_CA81A8) = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -226,7 +226,7 @@ NpcSettings N(npcSettings_80241220) = {
#include "common/foliage.inc.c"
s32** N(D_80241BB0_CADDA0) = NULL;
s32** N(varTable) = NULL;
EvtScript N(80241BB4) = {
EVT_CALL(ShowGotItem, EVT_VAR(0), 1, 0)
@ -512,23 +512,7 @@ NpcGroupList N(npcGroupList_80242B0C) = {
{},
};
ApiStatus N(func_8024061C_CAC80C)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_80241BB0_CADDA0) == NULL) {
N(D_80241BB0_CADDA0) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_80241BB0_CADDA0)[i] = (s32*) script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = (s32) N(D_80241BB0_CADDA0)[i];
}
heap_free(N(D_80241BB0_CADDA0));
N(D_80241BB0_CADDA0) = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -164,7 +164,7 @@ static s32 N(pad_1CA8)[] = {
0x00000000, 0x00000000,
};
s32** N(D_80241CB0_CBAEB0) = NULL;
s32** N(varTable) = NULL;
EvtScript N(80241CB4) = SCRIPT({
ShowGotItem(EVT_VAR(0), 1, 0);
@ -805,23 +805,7 @@ static s32 N(pad_4084)[] = {
0x00000000, 0x00000000, 0x00000000,
};
ApiStatus N(func_80240080_CB9280)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_80241CB0_CBAEB0) == NULL) {
N(D_80241CB0_CBAEB0) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_80241CB0_CBAEB0)[i] = (s32*) script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = (s32) N(D_80241CB0_CBAEB0)[i];
}
heap_free(N(D_80241CB0_CBAEB0));
N(D_80241CB0_CBAEB0) = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -13,7 +13,7 @@ s32 N(func_80240000_CB9200)(void);
ApiStatus N(func_80240040_CB9240)(Evt* script, s32 isInitialCall);
extern s32 N(D_80244070_CBD270);
extern s32** N(D_80241CB0_CBAEB0);
extern s32** N(varTable);
extern NpcGroupList N(npcGroupList_80244054);
extern EvtScript N(802427EC);
extern EvtScript N(80242AE8);

View File

@ -7,7 +7,7 @@ enum {
NPC_ROSIE1,
};
static N(D_802429E0)[112];
static s32 N(D_802429E0)[112];
EntryList N(entryList) = {
{ 280.0f, 0.0f, 0.0f, 270.0f },
@ -167,7 +167,7 @@ NpcSettings N(npcSettings_80240E5C) = {
#include "common/foliage.inc.c"
s32** N(D_802417EC_CC261C) = NULL;
s32** N(varTable) = NULL;
EvtScript N(802417F0) = {
EVT_CALL(ShowGotItem, EVT_VAR(0), 1, 0)
@ -474,23 +474,7 @@ NpcGroupList N(npcGroupList_802429B8) = {
{},
};
ApiStatus N(func_8024027C_CC10AC)(Evt* script, s32 isInitialCall) {
s32 i;
if (N(D_802417EC_CC261C) == NULL) {
N(D_802417EC_CC261C) = heap_malloc(16 * sizeof(s32));
for (i = 0; i < 16; i++) {
N(D_802417EC_CC261C)[i] = script->varTable[i];
}
} else {
for (i = 0; i < 16; i++) {
script->varTable[i] = N(D_802417EC_CC261C)[i];
}
heap_free(N(D_802417EC_CC261C));
N(D_802417EC_CC261C) = NULL;
}
return ApiStatus_DONE2;
}
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"
@ -524,7 +508,7 @@ ApiStatus N(func_80240614_CC1444)(Evt* script, s32 isInitialCall) {
ApiStatus N(func_8024064C_CC147C)(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
s32* ptr = evt_get_variable(script, *args);
s32* ptr = (s32*)evt_get_variable(script, *args);
s32 i;
if (ptr != NULL) {

View File

@ -1,6 +1,6 @@
#include "hos_00.h"
INCLUDE_ASM(s32, "world/area_hos/hos_00/A0C4E0", func_802407F0_A0C4E0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -44,7 +44,7 @@
#include "world/common/UnkFunc36.inc.c"
INCLUDE_ASM(s32, "world/area_hos/hos_03/A1BDB0", func_802424A4_A1D5A4);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "hos_06.h"
INCLUDE_ASM(s32, "world/area_hos/hos_06/A397F0", func_80240310_A397F0);
#include "world/common/StashVars.inc.c"
#define NAMESPACE dup2_hos_06
#include "world/common/GetItemName.inc.c"

View File

@ -10,7 +10,9 @@ INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80240FD0_A3A4B0);
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_80241008_A3A4E8);
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3A230", func_802410A4_A3A584);
#define NAMESPACE dup_hos_06
#include "world/common/StashVars.inc.c"
#define NAMESPACE hos_06
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,8 @@
#include "hos_06.h"
INCLUDE_ASM(s32, "world/area_hos/hos_06/A3B4B0", func_80241FD0_A3B4B0);
#define NAMESPACE dup2_hos_06
#include "world/common/StashVars.inc.c"
#define NAMESPACE hos_06
#define NAMESPACE dup_hos_06
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "isk_08";
static char* N(exit_str_1) = "";
INCLUDE_ASM(s32, "world/area_isk/isk_09/9864E0", func_80240000_9864E0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "iwa_10";
static char* N(exit_str_1) = "iwa_01";
INCLUDE_ASM(s32, "world/area_iwa/iwa_00/90CC40", func_80240000_90CC40);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -35,6 +35,6 @@ INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240984_9166F4);
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240C90_916A00);
INCLUDE_ASM(s32, "world/area_iwa/iwa_02/915D70", func_80240FE0_916D50);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "iwa_01";
static char* N(exit_str_1) = "";
INCLUDE_ASM(s32, "world/area_iwa/iwa_03/918BB0", func_80240000_918BB0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,5 +1,5 @@
#include "iwa_10.h"
INCLUDE_ASM(s32, "world/area_iwa/iwa_10/91E5B0", func_80240040_91E5B0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -7,7 +7,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_8024030C_B2084C);
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_80240340_B20880);
INCLUDE_ASM(s32, "world/area_jan/jan_00/B20540", func_802403F4_B20934);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -36,7 +36,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241540_B2D9B0);
INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241578_B2D9E8);
INCLUDE_ASM(s32, "world/area_jan/jan_02/B2C8A0", func_80241614_B2DA84);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -81,7 +81,7 @@ INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241A64_B36634);
INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241B00_B366D0);
INCLUDE_ASM(s32, "world/area_jan/jan_03/B34BD0", func_80241B9C_B3676C);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "jan_04.h"
INCLUDE_ASM(s32, "world/area_jan/jan_04/B44AC0", func_80240350_B44AC0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -29,7 +29,7 @@ static char* N(exit_str_3) = "";
#include "world/common/UnkNpcAIMainFunc.inc.c"
INCLUDE_ASM(s32, "world/area_jan/jan_22/B84180", func_80240E90_B85010);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "kkj_11";
static char* N(exit_str_1) = "";
INCLUDE_ASM(s32, "world/area_kkj/kkj_17/AF1C60", func_80240000_AF1C60);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "kkj_10";
static char* N(exit_str_1) = "";
INCLUDE_ASM(s32, "world/area_kkj/kkj_20/AFDB40", func_80240000_AFDB40);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -23,7 +23,7 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802402E0_8B0350);
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240370_8B03E0);
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80240390_8B0400);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -6,7 +6,7 @@
#include "world/common/CheckPartnerFlags1000.inc.c"
#define NAMESPACE kmr_04
INCLUDE_ASM(s32, "world/area_kmr/kmr_04/8CA960", func_802402C8_8CABC8);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "kmr_11";
static char* N(exit_str_1) = "mac_00";
INCLUDE_ASM(s32, "world/area_kmr/kmr_10/8D84D0", func_80240000_8D84D0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "kmr_20.h"
INCLUDE_ASM(s32, "world/area_kmr/kmr_20/8ED440", func_80241620_8ED440);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "kpa_14.h"
INCLUDE_ASM(s32, "world/area_kpa/kpa_14/A57830", func_80240380_A57830);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "kpa_15.h"
INCLUDE_ASM(s32, "world/area_kpa/kpa_15/A596A0", func_80240310_A596A0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -31,7 +31,7 @@
#include "world/common/UnkNpcAIMainFunc10.inc.c"
INCLUDE_ASM(s32, "world/area_kzn/kzn_02/C5AC20", func_80241FCC_C5C70C);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -42,7 +42,7 @@
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024234C_C6305C);
INCLUDE_ASM(s32, "world/area_kzn/kzn_03/C61020", func_8024259C_C632AC);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "kzn_08.h"
INCLUDE_ASM(s32, "world/area_kzn/kzn_08/C71C10", func_80240790_C71C10);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -43,7 +43,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_80242774_C79454);
#include "world/common/AwaitPlayerNearNpc.inc.c"
INCLUDE_ASM(s32, "world/area_kzn/kzn_09/C77D00", func_802432AC_C79F8C);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -43,7 +43,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_80241A64_C87514);
#include "world/common/AwaitPlayerNearNpc.inc.c"
INCLUDE_ASM(s32, "world/area_kzn/kzn_17/C85DC0", func_8024259C_C8804C);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -24,7 +24,7 @@ INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_802413FC_C8EFAC);
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_8024140C_C8EFBC);
INCLUDE_ASM(s32, "world/area_kzn/kzn_19/C8DBB0", func_80241468_C8F018);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "kzn_20.h"
INCLUDE_ASM(s32, "world/area_kzn/kzn_20/C96240", func_80240310_C96240);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#define UNK_ALPHA_FUNC_NPC 6
INCLUDE_ASM(s32, "world/area_mac/mac_00/7EB340", func_80240630_7EB340);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -26,7 +26,9 @@
static char* N(exit_str_0) = "mac_01";
INCLUDE_ASM(s32, "world/area_mac/mac_00/7ED280", func_80243400_7EE110);
#define NAMESPACE dup_mac_00
#include "world/common/StashVars.inc.c"
#define NAMESPACE mac_00
#define NAMESPACE dup_mac_00
#include "world/common/GetItemName.inc.c"

View File

@ -47,7 +47,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80241C14_802494);
static char* N(exit_str_0) = "flo_00";
static char* N(exit_str_1) = "kmr_22";
INCLUDE_ASM(s32, "world/area_mac/mac_01/8017D0", func_80241F10_802790);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -26,7 +26,7 @@
#include "world/common/UnkNpcAIMainFunc.inc.c"
INCLUDE_ASM(s32, "world/area_mac/mac_02/823BF0", func_802417C0_824A80);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -4,7 +4,7 @@
#include "common/UnkFloatFunc.inc.c"
INCLUDE_ASM(s32, "world/area_mac/mac_03/831B20", func_802404B0_831CB0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#define UNK_ALPHA_FUNC_NPC 20
INCLUDE_ASM(s32, "world/area_mac/mac_04/843030", func_80240460_843030);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -35,7 +35,7 @@ INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024047C_8525EC);
#include "world/common/UnkNpcAIMainFunc.inc.c"
INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_80241320_853490);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -16,6 +16,6 @@
#include "world/common/UnkNpcAIMainFunc2.inc.c"
INCLUDE_ASM(s32, "world/area_mim/mim_04/B9DB60", func_80241014_B9E974);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -45,7 +45,7 @@ static char* N(exit_str_1) = "nok_02";
#include "world/common/UnkFunc36.inc.c"
INCLUDE_ASM(s32, "world/area_nok/nok_01/9C53E0", func_80240D68_9C6148);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -17,7 +17,7 @@ static char* N(exit_str_3) = "";
#include "world/common/SomeXYZFunc2.inc.c"
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7020", func_802402E0_9D7300);
#include "world/common/StashVars.inc.c"
#define NAMESPACE dup_nok_02
#include "world/common/GetItemName.inc.c"

View File

@ -1,3 +1,3 @@
#include "nok_02.h"
#include "common/ItemEntityJumpToPos.inc.c"okItemEntityJumpToPos
#include "common/ItemEntityJumpToPos.inc.c"

View File

@ -29,7 +29,9 @@
static char* N(exit_str_0) = "nok_02";
static char* N(exit_str_1) = "obk_09";
INCLUDE_ASM(s32, "world/area_nok/nok_02/9D7AA0", func_80241910_9D8930);
#define NAMESPACE dup_nok_02
#include "world/common/StashVars.inc.c"
#define NAMESPACE nok_02
#include "world/common/GetItemName.inc.c"

View File

@ -18,7 +18,9 @@ INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243C78_9DAC98);
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243D14_9DAD34);
INCLUDE_ASM(s32, "world/area_nok/nok_02/9DA8F0", func_80243DB0_9DADD0);
#define NAMESPACE dup2_nok_02
#include "world/common/StashVars.inc.c"
#define NAMESPACE nok_02
#define NAMESPACE dup2_nok_02
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "obk_01.h"
INCLUDE_ASM(s32, "world/area_obk/obk_01/BBD980", func_802407E0_BBD980);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "obk_03.h"
INCLUDE_ASM(s32, "world/area_obk/obk_03/BC43F0", func_80240170_BC43F0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -20,7 +20,7 @@ INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240624_BC8484);
INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240910_BC8770);
INCLUDE_ASM(s32, "world/area_obk/obk_04/BC7EB0", func_80240940_BC87A0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "obk_01";
static char* N(exit_str_1) = "";
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEBF0", func_80240000_BCEBF0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "omo_03";
static char* N(exit_str_1) = "";
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAD400", func_80240000_DAD400);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "omo_06.h"
INCLUDE_ASM(s32, "world/area_omo/omo_06/DB8180", func_80240870_DB8180);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
static char* N(exit_str_2) = "omo_07";
INCLUDE_ASM(s32, "world/area_omo/omo_07/DC01D0", func_80242F20_DC01D0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "omo_09.h"
INCLUDE_ASM(s32, "world/area_omo/omo_09/DCD3F0", func_80240720_DCD3F0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "omo_13.h"
INCLUDE_ASM(s32, "world/area_omo/omo_13/DE36C0", func_80241230_DE36C0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "osr_01.h"
INCLUDE_ASM(s32, "world/area_osr/osr_01/AB0350", func_80240360_AB0350);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#include "world/common/reflection.inc.c"
INCLUDE_ASM(s32, "world/area_pra/pra_05/D55BD0", func_80240F20_D56AD0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#include "world/common/reflection.inc.c"
INCLUDE_ASM(s32, "world/area_pra/pra_11/D61520", func_80240F20_D62420);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_12/D62D10", func_80240000_D62D10);
#include "world/common/reflection.inc.c"
INCLUDE_ASM(s32, "world/area_pra/pra_12/D62D10", func_80240F50_D63C60);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#include "world/common/reflection.inc.c"
INCLUDE_ASM(s32, "world/area_pra/pra_14/D67D20", func_80240F20_D68C20);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_27/D799F0", func_80240000_D799F0);
#include "world/common/reflection.inc.c"
INCLUDE_ASM(s32, "world/area_pra/pra_27/D799F0", func_80240F50_D7A940);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -4,7 +4,7 @@ INCLUDE_ASM(s32, "world/area_pra/pra_28/D7B2A0", func_80240000_D7B2A0);
#include "world/common/reflection.inc.c"
INCLUDE_ASM(s32, "world/area_pra/pra_28/D7B2A0", func_80240F50_D7C1F0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "pra_35.h"
INCLUDE_ASM(s32, "world/area_pra/pra_35/D8FBA0", func_80242950_D8FBA0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -14,7 +14,7 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_802405C8_CF8138);
INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240664_CF81D4);
INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80240700_CF8270);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"
@ -68,7 +68,9 @@ INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241A54_CF95C4);
INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241B20_CF9690);
INCLUDE_ASM(s32, "world/area_sam/sam_01/CF7E80", func_80241C90_CF9800);
#define NAMESPACE dup_sam_01
#include "world/common/StashVars.inc.c"
#define NAMESPACE sam_01
#define NAMESPACE dup_sam_01
#include "world/common/GetItemName.inc.c"

View File

@ -22,7 +22,7 @@
#include "world/common/UnkFunc36.inc.c"
INCLUDE_ASM(s32, "world/area_sam/sam_02/D05F60", func_80240B2C_D0625C);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -22,7 +22,7 @@
#include "world/common/UnkNpcAIMainFunc9.inc.c"
INCLUDE_ASM(s32, "world/area_sam/sam_06/D203E0", func_80241A48_D218D8);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -3,7 +3,7 @@
static char* N(exit_str_0) = "sam_08";
static char* N(exit_str_1) = "sam_10";
INCLUDE_ASM(s32, "world/area_sam/sam_09/D362F0", func_80240000_D362F0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -5,7 +5,7 @@ static char* N(exit_str_1) = "pra_01";
static char* N(exit_str_2) = "sam_12";
static char* N(exit_str_3) = "";
INCLUDE_ASM(s32, "world/area_sam/sam_10/D37800", func_80240000_D37800);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#define UNK_ALPHA_FUNC_NPC 17
INCLUDE_ASM(s32, "world/area_sam/sam_11/D3ADA0", func_802407D0_D3ADA0);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -10,7 +10,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_80240970_92AC20);
INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_802409A8_92AC58);
INCLUDE_ASM(s32, "world/area_sbk/sbk_02/92A9A0", func_80240A44_92ACF4);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -35,7 +35,7 @@ INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80240000_93F5B0);
#include "world/common/UnkNpcAIMainFunc4.inc.c"
INCLUDE_ASM(s32, "world/area_sbk/sbk_30/93F5B0", func_80240DDC_94038C);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "sbk_34.h"
INCLUDE_ASM(s32, "world/area_sbk/sbk_34/945F10", func_80240040_945F10);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "tik_02.h"
INCLUDE_ASM(s32, "world/area_tik/tik_02/86CA50", func_80240310_86CA50);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#include "world/common/UnkPosFunc2.inc.c"
INCLUDE_ASM(s32, "world/area_tik/tik_05/8750D0", func_80240680_875440);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#include "world/common/UnkPosFunc2.inc.c"
INCLUDE_ASM(s32, "world/area_tik/tik_12/8891C0", func_80240960_889530);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -2,7 +2,7 @@
#include "world/common/UnkPosFunc2.inc.c"
INCLUDE_ASM(s32, "world/area_tik/tik_15/890190", func_80240960_890500);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,6 +1,6 @@
#include "trd_00.h"
INCLUDE_ASM(s32, "world/area_trd/trd_00/999F80", func_80240310_999F80);
#include "world/common/StashVars.inc.c"
#include "world/common/GetItemName.inc.c"

View File

@ -1,23 +1,26 @@
#include "common.h"
#include "npc.h"
// remove this and uncomment other when all data from all maps that use this are migrated to C
extern s32** N(varTable);
ApiStatus N(StashVars)(Evt* script, s32 isInitialCall) {
static s32** varTable = NULL;
//static s32** varTable = NULL;
s32 i;
if (varTable == NULL) {
varTable = heap_malloc(sizeof(script->varTable));
if (N(varTable) == NULL) {
N(varTable) = heap_malloc(sizeof(script->varTable));
for (i = 0; i < ARRAY_COUNT(script->varTable); i++) {
varTable[i] = (s32*) script->varTable[i];
N(varTable)[i] = (s32*) script->varTable[i];
}
} else {
for (i = 0; i < ARRAY_COUNT(script->varTable); i++) {
script->varTable[i] = (s32) varTable[i];
script->varTable[i] = (s32) N(varTable)[i];
}
heap_free(varTable);
varTable = NULL;
heap_free(N(varTable));
N(varTable) = NULL;
}
return ApiStatus_DONE2;

View File

@ -4,6 +4,7 @@ import argparse
import os
import re
from pathlib import Path
from unicodedata import name
script_dir = os.path.dirname(os.path.realpath(__file__))
root_dir = script_dir + "/../"
@ -42,6 +43,9 @@ for root, dirs, files in os.walk(src_dir):
with open(f_path, "w", newline="\n") as f:
f.write(f_text)
# # Rename symbols in from_funcs to namespace equivalents
# for root, dirs, files in os.walk
for root, dirs, files in os.walk(asm_dir):
for f_name in files:
if f_name.endswith(".s"):
@ -50,8 +54,19 @@ for root, dirs, files in os.walk(asm_dir):
f_text_orig = f.read()
f_text = f_text_orig
if Path(f_path).parent.parent.name == "nonmatchings":
namespace = Path(f_path).parent.name
else:
namespace = Path(f_path).parent.parent.name
# TODO refactor into new func
if f_name[:-2] in from_funcs:
syms = list(set(re.findall(r"D_[0-9A-F]{8}_[0-9A-F]{6}", f_text)))
print(f"{syms[0]} {namespace}_varTable")
for func in from_funcs:
f_text = f_text.replace(func, Path(f_path).parent.parent.name + "_" + func_name)
f_text = f_text.replace(func, namespace + "_" + func_name)
if f_text != f_text_orig:
with open(f_path, "w", newline="\n") as f:
f.write(f_text)

Some files were not shown because too many files have changed in this diff Show More