Skip to content

Commit

Permalink
build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Yanis002 committed Sep 16, 2024
1 parent 7726187 commit 881b596
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 21 deletions.
10 changes: 5 additions & 5 deletions config/oot-j/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4275,7 +4275,7 @@ __destroy_arr = .text:0x80152C54; // type:function size:0x78
__ptmf_cmpr = .text:0x80152CCC; // type:function size:0x3C
__ptmf_scall = .text:0x80152D08; // type:function size:0x28
__cvt_fp2unsigned = .text:0x80152D30; // type:function size:0x5C
__save_fpr = .text:0x80152D8C; // type:function size:0x4C scope:local
__save_fpr = .text:0x80152D8C; // type:function size:0x4C scope:global
_savefpr_14 = .text:0x80152D8C; // type:label scope:global
_savefpr_15 = .text:0x80152D90; // type:label scope:global
_savefpr_16 = .text:0x80152D94; // type:label scope:global
Expand All @@ -4294,7 +4294,7 @@ _savefpr_28 = .text:0x80152DC4; // type:label scope:global
_savefpr_29 = .text:0x80152DC8; // type:label scope:global
_savefpr_30 = .text:0x80152DCC; // type:label scope:global
_savefpr_31 = .text:0x80152DD0; // type:label scope:global
__restore_fpr = .text:0x80152DD8; // type:function size:0x4C scope:local
__restore_fpr = .text:0x80152DD8; // type:function size:0x4C scope:global
_restfpr_14 = .text:0x80152DD8; // type:label scope:global
_restfpr_15 = .text:0x80152DDC; // type:label scope:global
_restfpr_16 = .text:0x80152DE0; // type:label scope:global
Expand All @@ -4313,7 +4313,7 @@ _restfpr_28 = .text:0x80152E10; // type:label scope:global
_restfpr_29 = .text:0x80152E14; // type:label scope:global
_restfpr_30 = .text:0x80152E18; // type:label scope:global
_restfpr_31 = .text:0x80152E1C; // type:label scope:global
__save_gpr = .text:0x80152E24; // type:function size:0x4C scope:local
__save_gpr = .text:0x80152E24; // type:function size:0x4C scope:global
_savegpr_14 = .text:0x80152E24; // type:label scope:global
_savegpr_15 = .text:0x80152E28; // type:label scope:global
_savegpr_16 = .text:0x80152E2C; // type:label scope:global
Expand All @@ -4332,7 +4332,7 @@ _savegpr_28 = .text:0x80152E5C; // type:label scope:global
_savegpr_29 = .text:0x80152E60; // type:label scope:global
_savegpr_30 = .text:0x80152E64; // type:label scope:global
_savegpr_31 = .text:0x80152E68; // type:label scope:global
__restore_gpr = .text:0x80152E70; // type:function size:0x4C scope:local
__restore_gpr = .text:0x80152E70; // type:function size:0x4C scope:global
_restgpr_14 = .text:0x80152E70; // type:label scope:global
_restgpr_15 = .text:0x80152E74; // type:label scope:global
_restgpr_16 = .text:0x80152E78; // type:label scope:global
Expand Down Expand Up @@ -6701,7 +6701,7 @@ lbl_801C7CC0 = .bss:0x801C7CC0; // type:object size:0x20
lbl_801C7CE0 = .bss:0x801C7CE0; // type:object size:0x20
lbl_801C7D00 = .bss:0x801C7D00; // type:object size:0x28
lbl_801C7D28 = .bss:0x801C7D28; // type:object size:0x90 data:4byte
lbl_801C7DB8 = .bss:0x801C7DB8; // type:object size:0x10
gControllerAllocator = .bss:0x801C7DB8; // type:object size:0x10
lbl_801C7DC8 = .bss:0x801C7DC8; // type:object size:0x550 data:4byte
gControllerThread = .bss:0x801C8318; // type:object size:0x328
sBannerBuffer = .bss:0x801C8640; // type:object size:0x1000
Expand Down
7 changes: 0 additions & 7 deletions include/emulator/controller.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@ typedef enum ControllerStickAxis {
AXIS_MAX = 2
} ControllerStickAxis;

typedef struct lbl_801C7DB8_Struct {
/* 0x00 */ void* unk_00;
/* 0x04 */ u32 unk_04;
/* 0x08 */ u32 unk_08;
/* 0x0C */ u32 unk_0C;
} lbl_801C7DB8_Struct; // size = 0x10

typedef struct ControllerThread {
/* 0x000 */ OSThread thread;
/* 0x318 */ u8 unk_318[0xA];
Expand Down
4 changes: 2 additions & 2 deletions include/revolution/mem/mem_allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ typedef void (*MEMAllocatorFreeFunc)(struct MEMAllocator* allocator, void* block
typedef struct MEMAllocatorFuncs {
/* 0x0 */ MEMAllocatorAllocFunc allocFunc;
/* 0x4 */ MEMAllocatorFreeFunc freeFunc;
} MEMAllocatorFuncs;
} MEMAllocatorFuncs; // size = 0x8

typedef struct MEMAllocator {
/* 0x0 */ const MEMAllocatorFuncs* funcs;
/* 0x4 */ struct MEMiHeapHead* heap;
/* 0x8 */ u32 heapParam1;
/* 0xC */ u32 heapParam2;
} MEMAllocator;
} MEMAllocator; // size = 0x10

void* MEMAllocFromAllocator(MEMAllocator* allocator, u32 size);
void MEMFreeToAllocator(MEMAllocator* allocator, void* block);
Expand Down
14 changes: 7 additions & 7 deletions src/emulator/controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,24 +31,24 @@ _XL_OBJECTTYPE gClassController = {
(EventFunc)controllerEvent,
};

lbl_801C7DB8_Struct lbl_801C7DB8;
MEMAllocator gControllerAllocator;
ControllerThread gControllerThread;

static void* sControllerHeap;
static VIRetraceCallback sControllerVICallback;

bool fn_80061FB0(Controller* pController) {
bool bSuccess = fn_800B163C(&lbl_801C7DB8, pController->unk_00);
void* fn_80061FB0(u32 nSize) {
void* pBuffer = MEMAllocFromAllocator(&gControllerAllocator, nSize);

if (!bSuccess) {
if (pBuffer == NULL) {
xlExit();
}

return bSuccess;
return pBuffer;
}

bool fn_80061FF8(Controller* pController) {
fn_800B164C(&lbl_801C7DB8, pController->unk_00);
MEMFreeToAllocator(&gControllerAllocator, pController->unk_00);
return true;
}

Expand Down Expand Up @@ -115,7 +115,7 @@ bool fn_800620A8(Controller* pController) {
return false;
}

MEMInitAllocatorForExpHeap(&lbl_801C7DB8, MEMCreateExpHeapEx(sp8, 0x20000, 0), 4);
MEMInitAllocatorForExpHeap(&gControllerAllocator, MEMCreateExpHeapEx(sp8, 0x20000, 0), 4);
fn_800BE994(fn_80061FB0, fn_80061FF8);
WPADInit();

Expand Down

0 comments on commit 881b596

Please sign in to comment.