Skip to content

Commit

Permalink
Made local functions static in present dll
Browse files Browse the repository at this point in the history
Added missing includes in present.h
  • Loading branch information
dbalatoni13 committed Aug 2, 2024
1 parent 07a5260 commit ead1617
Show file tree
Hide file tree
Showing 7 changed files with 114 additions and 104 deletions.
72 changes: 36 additions & 36 deletions config/GMPE01_00/rels/present/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,70 +2,70 @@ _prolog = .text:0x00000000; // type:function size:0x54 scope:global
_epilog = .text:0x00000054; // type:function size:0x4C scope:global
ObjectSetup = .text:0x000000A0; // type:function size:0xA4
fn_1_144 = .text:0x00000144; // type:function size:0x110
fn_1_254 = .text:0x00000254; // type:function size:0xE0
fn_1_254 = .text:0x00000254; // type:function size:0xE0 scope:local
fn_1_334 = .text:0x00000334; // type:function size:0x128
fn_1_45C = .text:0x0000045C; // type:function size:0xF4
fn_1_45C = .text:0x0000045C; // type:function size:0xF4 scope:local
fn_1_550 = .text:0x00000550; // type:function size:0x34
fn_1_584 = .text:0x00000584; // type:function size:0x34
fn_1_5B8 = .text:0x000005B8; // type:function size:0x34
fn_1_5EC = .text:0x000005EC; // type:function size:0xC8
fn_1_5EC = .text:0x000005EC; // type:function size:0xC8 scope:local
fn_1_6B4 = .text:0x000006B4; // type:function size:0x23C
fn_1_8F0 = .text:0x000008F0; // type:function size:0x30
fn_1_920 = .text:0x00000920; // type:function size:0x84
fn_1_9A4 = .text:0x000009A4; // type:function size:0x84
fn_1_A28 = .text:0x00000A28; // type:function size:0x84
fn_1_AAC = .text:0x00000AAC; // type:function size:0x30
fn_1_ADC = .text:0x00000ADC; // type:function size:0x30
fn_1_B0C = .text:0x00000B0C; // type:function size:0x30
fn_1_B3C = .text:0x00000B3C; // type:function size:0x30
fn_1_A28 = .text:0x00000A28; // type:function size:0x84 scope:local
fn_1_AAC = .text:0x00000AAC; // type:function size:0x30 scope:local
fn_1_ADC = .text:0x00000ADC; // type:function size:0x30 scope:local
fn_1_B0C = .text:0x00000B0C; // type:function size:0x30 scope:local
fn_1_B3C = .text:0x00000B3C; // type:function size:0x30 scope:local
fn_1_B6C = .text:0x00000B6C; // type:function size:0x8C
fn_1_BF8 = .text:0x00000BF8; // type:function size:0x28
fn_1_C20 = .text:0x00000C20; // type:function size:0x578
fn_1_1198 = .text:0x00001198; // type:function size:0x200
fn_1_1398 = .text:0x00001398; // type:function size:0xC0
fn_1_C20 = .text:0x00000C20; // type:function size:0x578 scope:local
fn_1_1198 = .text:0x00001198; // type:function size:0x200 scope:local
fn_1_1398 = .text:0x00001398; // type:function size:0xC0 scope:local
fn_1_1458 = .text:0x00001458; // type:function size:0x32C
fn_1_1784 = .text:0x00001784; // type:function size:0x88
fn_1_180C = .text:0x0000180C; // type:function size:0x44
fn_1_1850 = .text:0x00001850; // type:function size:0x1C
fn_1_186C = .text:0x0000186C; // type:function size:0xBC
fn_1_1928 = .text:0x00001928; // type:function size:0x680
fn_1_1FA8 = .text:0x00001FA8; // type:function size:0x140
fn_1_20E8 = .text:0x000020E8; // type:function size:0x5A4
fn_1_268C = .text:0x0000268C; // type:function size:0x7C
fn_1_2708 = .text:0x00002708; // type:function size:0x6C
fn_1_2774 = .text:0x00002774; // type:function size:0x17C
fn_1_28F0 = .text:0x000028F0; // type:function size:0x34
fn_1_2924 = .text:0x00002924; // type:function size:0x260
fn_1_2B84 = .text:0x00002B84; // type:function size:0x48
fn_1_2BCC = .text:0x00002BCC; // type:function size:0x90
fn_1_2C5C = .text:0x00002C5C; // type:function size:0x738
fn_1_3394 = .text:0x00003394; // type:function size:0x18
fn_1_33AC = .text:0x000033AC; // type:function size:0x590
fn_1_393C = .text:0x0000393C; // type:function size:0x6C
fn_1_1928 = .text:0x00001928; // type:function size:0x680 scope:local
fn_1_1FA8 = .text:0x00001FA8; // type:function size:0x140 scope:local
fn_1_20E8 = .text:0x000020E8; // type:function size:0x5A4 scope:local
fn_1_268C = .text:0x0000268C; // type:function size:0x7C scope:local
fn_1_2708 = .text:0x00002708; // type:function size:0x6C scope:local
fn_1_2774 = .text:0x00002774; // type:function size:0x17C scope:local
fn_1_28F0 = .text:0x000028F0; // type:function size:0x34 scope:local
fn_1_2924 = .text:0x00002924; // type:function size:0x260 scope:local
fn_1_2B84 = .text:0x00002B84; // type:function size:0x48 scope:local
fn_1_2BCC = .text:0x00002BCC; // type:function size:0x90 scope:local
fn_1_2C5C = .text:0x00002C5C; // type:function size:0x738 scope:local
fn_1_3394 = .text:0x00003394; // type:function size:0x18 scope:local
fn_1_33AC = .text:0x000033AC; // type:function size:0x590 scope:local
fn_1_393C = .text:0x0000393C; // type:function size:0x6C scope:local
fn_1_39A8 = .text:0x000039A8; // type:function size:0x170
fn_1_3B18 = .text:0x00003B18; // type:function size:0x74
fn_1_3B8C = .text:0x00003B8C; // type:function size:0x22C
fn_1_3DB8 = .text:0x00003DB8; // type:function size:0xEC
fn_1_3B8C = .text:0x00003B8C; // type:function size:0x22C scope:local
fn_1_3DB8 = .text:0x00003DB8; // type:function size:0xEC scope:local
fn_1_3EA4 = .text:0x00003EA4; // type:function size:0x19C
fn_1_4040 = .text:0x00004040; // type:function size:0x40
fn_1_4080 = .text:0x00004080; // type:function size:0x18
fn_1_4098 = .text:0x00004098; // type:function size:0x18
fn_1_40B0 = .text:0x000040B0; // type:function size:0x54
fn_1_4104 = .text:0x00004104; // type:function size:0x40
fn_1_4144 = .text:0x00004144; // type:function size:0x40
fn_1_4184 = .text:0x00004184; // type:function size:0xC
fn_1_4190 = .text:0x00004190; // type:function size:0xC
fn_1_4144 = .text:0x00004144; // type:function size:0x40 scope:local
fn_1_4184 = .text:0x00004184; // type:function size:0xC scope:local
fn_1_4190 = .text:0x00004190; // type:function size:0xC scope:local
fn_1_419C = .text:0x0000419C; // type:function size:0x20
fn_1_41BC = .text:0x000041BC; // type:function size:0x24
fn_1_41E0 = .text:0x000041E0; // type:function size:0x114
fn_1_41BC = .text:0x000041BC; // type:function size:0x24 scope:local
fn_1_41E0 = .text:0x000041E0; // type:function size:0x114 scope:local
fn_1_42F4 = .text:0x000042F4; // type:function size:0x240
fn_1_4534 = .text:0x00004534; // type:function size:0x8C
fn_1_45C0 = .text:0x000045C0; // type:function size:0x44
fn_1_4604 = .text:0x00004604; // type:function size:0x1C
fn_1_4620 = .text:0x00004620; // type:function size:0x260
fn_1_4880 = .text:0x00004880; // type:function size:0x184
fn_1_4A04 = .text:0x00004A04; // type:function size:0x2E8
fn_1_4CEC = .text:0x00004CEC; // type:function size:0x104
fn_1_4620 = .text:0x00004620; // type:function size:0x260 scope:local
fn_1_4880 = .text:0x00004880; // type:function size:0x184 scope:local
fn_1_4A04 = .text:0x00004A04; // type:function size:0x2E8 scope:local
fn_1_4CEC = .text:0x00004CEC; // type:function size:0x104 scope:local
_ctors = .ctors:0x00000000; // type:label scope:global data:4byte
_dtors = .dtors:0x00000000; // type:label scope:global data:4byte
__fakeHalf = .rodata:0x00000000; // type:object size:0x4 data:float
Expand Down
12 changes: 12 additions & 0 deletions include/REL/present.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,31 @@ extern Process *lbl_1_bss_4;

void fn_1_144(s16 arg0, s32 arg1, s32 arg2);
void fn_1_334(s16 arg0, s32 arg1, float arg8, s32 arg2);
s32 fn_1_550(u16 arg0);
s32 fn_1_584(u16 arg0);
s32 fn_1_5B8(u16 arg0);
omObjData *fn_1_6B4();
void fn_1_8F0(omObjData *object);
void fn_1_920(omObjData *object, float arg8, float arg9, float argA, s32 arg1);
void fn_1_9A4(omObjData *object, float arg8, float arg9, float argA, s32 arg1);
s32 fn_1_B6C(omObjData *object);
void fn_1_BF8(omObjData *object);
omObjData *fn_1_1458(void);
void fn_1_1784(omObjData *object);
void fn_1_180C(omObjData *object, s32 arg1);
s32 fn_1_1850(omObjData *object);
void fn_1_186C(omObjData *object, s32 arg1);
void fn_1_3B18(omObjData *object);
omObjData *fn_1_39A8(void);
UnkWindowDataStruct *fn_1_3EA4(s32 arg0);
void fn_1_4040(UnkWindowDataStruct *arg0);
void fn_1_4080(UnkWindowDataStruct *windowData);
void fn_1_4098(UnkWindowDataStruct *windowData);
void fn_1_40B0(UnkWindowDataStruct *windowData, u32 mess);
void fn_1_4104(UnkWindowDataStruct *windowData, u32 mess, s16 index);
void fn_1_419C(UnkWindowDataStruct *windowData);
omObjData *fn_1_42F4(void);
void fn_1_4534(omObjData *object);
void fn_1_45C0(omObjData *arg0, s32 arg1);
s32 fn_1_4604(omObjData *object);

Expand Down
18 changes: 9 additions & 9 deletions src/REL/present/camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ typedef struct UnkPresentCameraStruct {
/* 0x98 */ float unk_98;
} UnkPresentCameraStruct; /* size = 0x9C */

void fn_1_C20(omObjData *object);
static void fn_1_C20(omObjData *object);

omObjData *fn_1_6B4(void)
{
Expand Down Expand Up @@ -97,7 +97,7 @@ void fn_1_9A4(omObjData *object, float arg8, float arg9, float argA, s32 arg1)
var_r31->unk_90 = 1.0f / arg1;
}

void fn_1_A28(omObjData *object, s32 arg1, float arg8, float arg9, float argA)
static void fn_1_A28(omObjData *object, s32 arg1, float arg8, float arg9, float argA)
{
UnkPresentCameraStruct *var_r31 = object->data;

Expand All @@ -112,23 +112,23 @@ void fn_1_A28(omObjData *object, s32 arg1, float arg8, float arg9, float argA)
var_r31->unk_98 = 1.0f / arg1;
}

float fn_1_AAC(omObjData *object)
static float fn_1_AAC(omObjData *object)
{
UnkPresentCameraStruct *var_r31 = object->data;

float var_f31 = var_r31->unk_24;
return var_f31;
}

float fn_1_ADC(omObjData *object)
static float fn_1_ADC(omObjData *object)
{
UnkPresentCameraStruct *var_r31 = object->data;

float var_f31 = var_r31->unk_28;
return var_f31;
}

void fn_1_B0C(omObjData *object, float *arg1, float *arg2, float *arg3)
static void fn_1_B0C(omObjData *object, float *arg1, float *arg2, float *arg3)
{
UnkPresentCameraStruct *var_r31 = object->data;

Expand All @@ -137,7 +137,7 @@ void fn_1_B0C(omObjData *object, float *arg1, float *arg2, float *arg3)
*arg3 = var_r31->pos.z;
}

void fn_1_B3C(omObjData *object, float *arg1, float *arg2, float *arg3)
static void fn_1_B3C(omObjData *object, float *arg1, float *arg2, float *arg3)
{
UnkPresentCameraStruct *var_r31 = object->data;

Expand Down Expand Up @@ -167,7 +167,7 @@ void fn_1_BF8(omObjData *object)
fn_1_C20(object);
}

void fn_1_C20(omObjData *object)
static void fn_1_C20(omObjData *object)
{
float var_f31;
float var_f30;
Expand Down Expand Up @@ -223,7 +223,7 @@ void fn_1_C20(omObjData *object)
var_r31->target.y, var_r31->target.z);
}

void fn_1_1198(omObjData *object)
static void fn_1_1198(omObjData *object)
{
if (HuPadBtn[0] & PAD_BUTTON_B) {
UnkPresentCameraStruct *var_r31 = object->data;
Expand All @@ -237,7 +237,7 @@ void fn_1_1198(omObjData *object)
}
}

void fn_1_1398(omObjData *object)
static void fn_1_1398(omObjData *object)
{
UnkPresentCameraStruct *var_r31 = object->data;
print8(32, 64, 1.5f, "AT : x=%.2f y=%.2f z=%.2f", var_r31->target.x, var_r31->target.y, var_r31->target.z);
Expand Down
16 changes: 8 additions & 8 deletions src/REL/present/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ typedef struct UnkPresentStruct5 {
/* 0x54 */ s32 unk_54;
} UnkPresentStruct5; /* size = 0x58 */

void fn_1_4620(omObjData *object);
void fn_1_4880(omObjData *object);
static void fn_1_4620(omObjData *object);
static void fn_1_4880(omObjData *object);
static void fn_1_4A04(omObjData *object);
static float fn_1_4CEC(float arg8, float arg9, float argA);

omObjFunc lbl_1_data_1A0[] = { NULL, fn_1_4620, fn_1_4880 };

static const s32 lbl_1_rodata_BD8[] = { 0x006E0089, 0x006E008A, 0x006E008B };

void fn_1_4A04(omObjData *object);
float fn_1_4CEC(float arg8, float arg9, float argA);

omObjData *fn_1_42F4(void)
{
Expand Down Expand Up @@ -105,7 +105,7 @@ s32 fn_1_4604(omObjData *object)
return var_r31->unk_00;
}

void fn_1_4620(omObjData *object)
static void fn_1_4620(omObjData *object)
{
float var_f31;
UnkPresentStruct5 *var_r31 = object->data;
Expand Down Expand Up @@ -150,7 +150,7 @@ void fn_1_4620(omObjData *object)
fn_1_4A04(object);
}

void fn_1_4880(omObjData *object)
static void fn_1_4880(omObjData *object)
{
float var_f31;

Expand Down Expand Up @@ -181,7 +181,7 @@ void fn_1_4880(omObjData *object)
(void)object;
}

void fn_1_4A04(omObjData *object)
static void fn_1_4A04(omObjData *object)
{
UnkPresentStruct5 *var_r31 = object->data;
s16 var_r29 = 0;
Expand Down Expand Up @@ -214,7 +214,7 @@ void fn_1_4A04(omObjData *object)
omSetRot(object, var_r31->unk_20, var_r31->unk_24, var_r31->unk_28);
}

float fn_1_4CEC(float arg8, float arg9, float argA)
static float fn_1_4CEC(float arg8, float arg9, float argA)
{
float var_f30;

Expand Down
18 changes: 9 additions & 9 deletions src/REL/present/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ omObjData *lbl_1_bss_8;
Process *lbl_1_bss_4;
omObjData *lbl_1_bss_0;

void fn_1_254(void);
void fn_1_45C(void);
void fn_1_5EC(omObjData *object);
static void fn_1_254(void);
static void fn_1_45C(void);
static void fn_1_5EC(omObjData *object);

void ObjectSetup(void)
{
Expand Down Expand Up @@ -64,7 +64,7 @@ void fn_1_144(s16 arg0, s32 arg1, s32 arg2)
var_r30->user_data = var_r31;
}

void fn_1_254(void)
static void fn_1_254(void)
{
UnkPresentStruct6 *var_r31 = HuPrcCurrentGet()->user_data;

Expand Down Expand Up @@ -114,7 +114,7 @@ void fn_1_334(s16 arg0, s32 arg1, float arg8, s32 arg2)
var_r30->user_data = var_r31;
}

void fn_1_45C(void)
static void fn_1_45C(void)
{
UnkPresentStruct6Weird *var_r31 = HuPrcCurrentGet()->user_data;

Expand All @@ -141,25 +141,25 @@ void fn_1_45C(void)
HuPrcEnd();
}

u32 fn_1_550(u16 arg0)
s32 fn_1_550(u16 arg0)
{
u32 var_r31 = HuPadBtnDown[0] & arg0;
return var_r31 != 0;
}

u32 fn_1_584(u16 arg0)
s32 fn_1_584(u16 arg0)
{
u32 var_r31 = HuPadDStkRep[0] & arg0;
return var_r31 != 0;
}

u32 fn_1_5B8(u16 arg0)
s32 fn_1_5B8(u16 arg0)
{
u32 var_r31 = HuPadDStk[0] & arg0;
return var_r31 != 0;
}

void fn_1_5EC(omObjData *object)
static void fn_1_5EC(omObjData *object)
{
switch (object->unk10) {
case 0:
Expand Down
Loading

0 comments on commit ead1617

Please sign in to comment.