mirror of
https://github.com/Mallos31/Quest.git
synced 2024-11-23 21:29:49 +00:00
make a good backup before rodata extraction
This commit is contained in:
parent
91722e72eb
commit
1a89ddc8d2
17
src/1D160.c
17
src/1D160.c
@ -51,14 +51,29 @@ typedef struct {
|
||||
UnknownMonsterData2 unk6C;
|
||||
}unkEnemy;
|
||||
|
||||
typedef struct {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
}unkEncounterSomething;
|
||||
|
||||
typedef struct {
|
||||
void* unk0;
|
||||
void* unk4;
|
||||
unkEncounterSomething* unk8;
|
||||
s32 unkC; //encounter rate?
|
||||
}unkEncounterData;
|
||||
|
||||
extern unkEnemy* D_8007C9B8[];
|
||||
extern u16 D_8008C59A;
|
||||
extern s32 gNextSubmap;
|
||||
extern u16 gAllowBattles;
|
||||
extern void* D_8008C560;
|
||||
extern void* D_8008C564;
|
||||
extern unkEncounterData* D_8008C564;
|
||||
extern f32 D_8008C574;
|
||||
extern s16 D_8008C578;
|
||||
extern f32 max_encounter_distance_sqr; //.rodata
|
||||
extern f32 min_encounter_distance_sqr; //.rodata
|
||||
|
||||
|
||||
//#pragma GLOBAL_ASM("asm/nonmatchings/1D160/func_8001C560.s")
|
||||
void func_8001C560(void) {
|
||||
|
73
src/328F0.c
73
src/328F0.c
@ -17,10 +17,14 @@ typedef struct {
|
||||
u8 unk2;
|
||||
}unk31cf0s;
|
||||
|
||||
typedef struct {
|
||||
char unk0[0x8];
|
||||
}unk6f3c0s;
|
||||
|
||||
extern unk32218s D_8006CC88;
|
||||
extern unk32218s D_8006E288;
|
||||
extern unk32218s D_8006E298;
|
||||
extern u8 D_80092D0E;
|
||||
extern u8 gPakMenuScrollAmt;
|
||||
extern u16 D_80092D1A;
|
||||
extern s32 D_80092D1C;
|
||||
extern s32 D_80092D20; //Probably a struct/array
|
||||
@ -31,9 +35,16 @@ extern s32 D_8006E4B4;
|
||||
extern OSMesgQueue* D_80092D28;
|
||||
extern void* D_80092D2C;
|
||||
extern void* D_8006E4B8[];
|
||||
extern u8* D_8006E4C0[]; //alphabet texture
|
||||
extern s32 D_80092CC0;
|
||||
|
||||
|
||||
//these two MAY use some sort of struct, but that is currently unknown. Matches as-is.
|
||||
extern s32 D_8006F3C0[];
|
||||
extern u16* D_8006F3F8;
|
||||
|
||||
void func_80031CF0(u16 arg0, s8* arg1);
|
||||
|
||||
void func_80031DD4(s32 arg0);
|
||||
void func_80031F1C(s16 arg0, s16 arg1);
|
||||
void func_80031F74(u8 *arg0);
|
||||
|
||||
@ -48,7 +59,51 @@ void func_80031CF0(u16 arg0, s8* arg1) {
|
||||
arg1[2] = (arg0 % 10) + 16;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80031DD4.s")
|
||||
//#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80031DD4.s")
|
||||
void func_80031DD4(s32 arg0)
|
||||
{
|
||||
u8 temp_t7;
|
||||
u16 *var_a0;
|
||||
s32 i;
|
||||
s32 var_v0;
|
||||
u32* var_a1;
|
||||
|
||||
if (arg0 == 1) {
|
||||
D_80092D30 += 6;
|
||||
return;
|
||||
}
|
||||
|
||||
if (arg0 == 0xA) {
|
||||
D_80092D36 += 0xD;
|
||||
func_80031F1C(D_80092D34, D_80092D36);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((arg0 < 0xF) || (D_80092CC0 < arg0)) {
|
||||
arg0 = 0x3B;
|
||||
}
|
||||
|
||||
arg0 -= 0xF;
|
||||
var_a0 = (u16*)D_80092D30;
|
||||
i = 0;
|
||||
var_a1 = (((((arg0) & 0xF8) * 0xC) / 2) * 8)
|
||||
+ ((((arg0) & 7) * 8) / 2) + (s32)D_8006E4C0;
|
||||
|
||||
for (i = 0; i < 0xC; i++) {
|
||||
for(var_v0 = 28; var_v0 >= 0; var_v0 -= 4, var_a0++) {
|
||||
temp_t7 = ((*var_a1) >> var_v0) % 0x10;
|
||||
if (temp_t7 != 0) {
|
||||
*var_a0 = D_8006F3F8[temp_t7];
|
||||
}
|
||||
}
|
||||
|
||||
var_a0 += 0x138;
|
||||
var_a1 += 0x8;
|
||||
}
|
||||
|
||||
D_80092D30 += 0x12;
|
||||
}
|
||||
|
||||
|
||||
//#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80031F1C.s")
|
||||
void func_80031F1C(s16 arg0, s16 arg1) {
|
||||
@ -66,7 +121,12 @@ void func_80031F74(u8* arg0) {
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80031FBC.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80032020.s")
|
||||
|
||||
//#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80032020.s")
|
||||
|
||||
void func_80032020(s32 arg0) {
|
||||
D_8006F3F8 = &D_8006F3C0[arg0 * 2];
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80032040.s")
|
||||
|
||||
@ -105,6 +165,7 @@ void func_8003228C(void)
|
||||
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_8003232C.s")
|
||||
|
||||
|
||||
//#pragma GLOBAL_ASM("asm/nonmatchings/328F0/func_80032560.s")
|
||||
void func_80032560(u16 arg0) {
|
||||
unk31cf0s sp1C;
|
||||
@ -126,11 +187,11 @@ void func_8003265C(void) {
|
||||
|
||||
func_80032218(&D_8006CC88, 0xF0);
|
||||
func_80032560(D_80092D1A);
|
||||
temp_v0 = D_80092D0E;
|
||||
temp_v0 = gPakMenuScrollAmt;
|
||||
if (temp_v0 != 0) {
|
||||
func_80032218(&D_8006E288, 1);
|
||||
}
|
||||
temp_v0 = D_80092D0E;
|
||||
temp_v0 = gPakMenuScrollAmt;
|
||||
if ((s32) temp_v0 < 0xA) {
|
||||
func_80032218(&D_8006E298, 1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user