Decompile 4F7F0.c

This commit is contained in:
Diamond Lewis 2023-07-29 18:34:24 -05:00
parent 882263f174
commit ab2f14008b
6 changed files with 46 additions and 3 deletions

View File

@ -389,7 +389,10 @@ def search_map_file(fn_name):
rom = int(tokens[5], 0)
ram_to_rom = rom - ram
if line.endswith(" " + fn_name):
ram = int(line.split()[0], 0)
try:
ram = int(line.split()[0], 0)
except:
ram = int(line.split()[1], 0)
if cur_objfile is not None and ram_to_rom is not None:
cands.append((cur_objfile, ram + ram_to_rom))
last_line = line

View File

@ -186,6 +186,7 @@ extern u16 leoLba_to_phys(u32 lba);
extern s32 __leoActive;
extern s32 __leoResetCalled;
extern s32 __leoQueuesCreated;
extern s32 currentCommand;
extern u32 LEO_country_code;
extern u32 LEOasic_bm_ctl_shadow;
extern u32 LEOasic_seq_ctl_shadow;

View File

@ -112,7 +112,7 @@ segments:
- [0x4BDC0, asm]
- [0x4CBC0, asm]
- [0x4F410, asm]
- [0x4F7F0, asm]
- [0x4F7F0, c]
- [0x4F870, asm]
- [0x4FDB0, asm]
- [0x4FE60, asm]

39
src/4F7F0.c Normal file
View File

@ -0,0 +1,39 @@
#include "common.h"
struct UnkArray4 {
u32 unk0;
u32 unk4;
u16 unk8;
u16 unkA;
f32 unkC;
u32 unk10;
u32 unk14;
u32 unk18;
u32 unk1C;
};
struct UnkStructUnk8 {
char filler[0x88];
u32 unk88;
};
struct UnkStruct8004EBF0 {
char filler[0x8];
struct UnkStructUnk8* unk8;
};
void func_80047500(void*, u8, void*, void*);
struct UnkArray4* func_800495F8();
struct UnkArray4* D_80078584;
void func_8004EBF0(struct UnkStruct8004EBF0* arg0, f32 arg1) {
struct UnkArray4 *temp_v0;
if (arg0->unk8 != NULL) {
temp_v0 = func_800495F8();
if (temp_v0 != NULL) {
temp_v0->unk4 = (s32) (D_80078584->unk1C + arg0->unk8->unk88);
temp_v0->unk8 = 7;
temp_v0->unkC = arg1;
temp_v0->unk0 = 0;
func_80047500(arg0->unk8, 3, temp_v0, arg0);
}
}
}

View File

@ -1,5 +1,6 @@
#include "ultra64.h"
#include "ultra64/controller.h"
#include "controller.h"
extern s32 D_800697E0;
extern u8 D_800A82B0[32];

View File

@ -1,7 +1,6 @@
#include <ultra64.h>
#include "libleo/internal.h"
extern s32 currentCommand;
extern u32 asic_cur_status; // static?
extern u32 unit_atten; // static?