Applied DATA_MAKE_NUM and MAKE_MESSID macros

This commit is contained in:
kabiskac 2024-08-09 01:37:36 +02:00
parent c1c506360c
commit a0ebc7588d
116 changed files with 38174 additions and 37156 deletions

View file

@ -1,42 +1,40 @@
#include "game/process.h"
#include "game/object.h"
#include "game/esprite.h"
#include "game/object.h"
#include "game/process.h"
#include "game/sprite.h"
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
typedef void (*ObjFuncs)(void);
typedef struct unkDominationData6 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s16 unk_08;
/* 0x0A */ s16 unk_0A;
/* 0x0C */ s16 unk_0C[8]; //what size is this??
/* 0x1C */ s32 unk_1C;
/* 0x20 */ f32 unk_20;
} unkDominationData6; //sizeof 0x24
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ s16 unk_08;
/* 0x0A */ s16 unk_0A;
/* 0x0C */ s16 unk_0C[8]; // what size is this??
/* 0x1C */ s32 unk_1C;
/* 0x20 */ f32 unk_20;
} unkDominationData6; // sizeof 0x24
//func signatures
// func signatures
void fn_1_61A0(void);
void fn_1_6218(void);
void fn_1_62A0(void);
void fn_1_5FE4(omObjData* arg0);
void fn_1_5FE4(omObjData *arg0);
void fn_1_5FB4(s32 arg0);
s16 fn_1_28D4(void);
//bss
Process* lbl_1_bss_398C;
omObjData* lbl_1_bss_3988;
// bss
Process *lbl_1_bss_398C;
omObjData *lbl_1_bss_3988;
//data
ObjFuncs lbl_1_data_360[] = {
fn_1_61A0,
fn_1_6218,
fn_1_62A0
};
// data
ObjFuncs lbl_1_data_360[] = { fn_1_61A0, fn_1_6218, fn_1_62A0 };
void fn_1_5C5C(Process* arg0, s16 arg1) {
unkDominationData6* temp_r31;
void fn_1_5C5C(Process *arg0, s16 arg1)
{
unkDominationData6 *temp_r31;
u32 i;
lbl_1_bss_398C = arg0;
@ -45,21 +43,21 @@ void fn_1_5C5C(Process* arg0, s16 arg1) {
temp_r31 = lbl_1_bss_3988->data;
temp_r31->unk_08 = arg1;
temp_r31->unk_0A = 0;
temp_r31->unk_0C[6] = espEntry(0x260025, 2, 0);
temp_r31->unk_0C[6] = espEntry(DATA_MAKE_NUM(DATADIR_M407, 0x25), 2, 0);
espTPLvlSet(temp_r31->unk_0C[6], 0.5f);
espPosSet(temp_r31->unk_0C[6], 508.0f, 64.0f);
temp_r31->unk_0C[7] = espEntry(0x260022, 1, 0);
temp_r31->unk_0C[7] = espEntry(DATA_MAKE_NUM(DATADIR_M407, 0x22), 1, 0);
espPosSet(temp_r31->unk_0C[7], 480.0f, 56.0f);
for (i = 0; i < 3; i++) {
temp_r31->unk_0C[i] = espEntry(0x26001F, 0, 0);
temp_r31->unk_0C[i] = espEntry(DATA_MAKE_NUM(DATADIR_M407, 0x1F), 0, 0);
espPosSet(temp_r31->unk_0C[i], i * 16 + 0x1F4, 56.0f);
espDispOff(temp_r31->unk_0C[i]);
}
for (i = 0; i < 3; i++) {
temp_r31->unk_0C[i+3] = espEntry(0x260020, 1, 0);
espPosSet(temp_r31->unk_0C[i+3], i * 16 + 0x1F4, 74.0f);
temp_r31->unk_0C[i + 3] = espEntry(DATA_MAKE_NUM(DATADIR_M407, 0x20), 1, 0);
espPosSet(temp_r31->unk_0C[i + 3], i * 16 + 0x1F4, 74.0f);
}
for (i = 0; i < 8; i++) {
@ -69,44 +67,49 @@ void fn_1_5C5C(Process* arg0, s16 arg1) {
fn_1_5FB4(0);
}
void fn_1_5ECC(void) {
void fn_1_5ECC(void)
{
s32 i;
unkDominationData6* temp_r30;
unkDominationData6 *temp_r30;
temp_r30 = lbl_1_bss_3988->data;
for (i = 0; i < 7; i++) {
espKill(temp_r30->unk_0C[i]);
}
HuMemDirectFree(lbl_1_bss_3988->data);
}
void fn_1_5F40(s32 arg0) {
void fn_1_5F40(s32 arg0)
{
switch (arg0) {
case 0:
fn_1_5FB4(1);
break;
case 1:
fn_1_5FB4(2);
break;
case 0:
fn_1_5FB4(1);
break;
case 1:
fn_1_5FB4(2);
break;
}
}
void fn_1_5F90(void) {
void fn_1_5F90(void)
{
fn_1_5FB4(0);
}
void fn_1_5FB4(s32 arg0) {
unkDominationData6* temp_r31;
void fn_1_5FB4(s32 arg0)
{
unkDominationData6 *temp_r31;
temp_r31 = lbl_1_bss_3988->data;
temp_r31->unk_00 = arg0;
temp_r31->unk_04 = 0;
}
void fn_1_5FE4(omObjData* arg0) {
void fn_1_5FE4(omObjData *arg0)
{
s16 temp_r31;
unkDominationData6* temp_r30;
unkDominationData6 *temp_r30;
temp_r30 = lbl_1_bss_3988->data;
lbl_1_data_360[temp_r30->unk_00]();
@ -114,19 +117,20 @@ void fn_1_5FE4(omObjData* arg0) {
espBankSet(temp_r30->unk_0C[0], temp_r31 / 100);
temp_r31 = (temp_r31 - ((temp_r31 / 100) * 100));
espBankSet(temp_r30->unk_0C[1], (temp_r31 / 10));
temp_r31 = (temp_r31 - ((temp_r31 / 10) * 10));
temp_r31 = (temp_r31 - ((temp_r31 / 10) * 10));
espBankSet(temp_r30->unk_0C[2], temp_r31);
temp_r31 = temp_r30->unk_0A;
espBankSet(temp_r30->unk_0C[3], (temp_r31 / 100));
temp_r31 = (temp_r31 - ((temp_r31 / 100) * 100));
espBankSet(temp_r30->unk_0C[4], (temp_r31 / 10));
espBankSet(temp_r30->unk_0C[4], (temp_r31 / 10));
temp_r31 = (temp_r31 - ((temp_r31 / 10) * 10));
espBankSet(temp_r30->unk_0C[5], temp_r31);
}
void fn_1_61A0(void) {
void fn_1_61A0(void)
{
s32 i;
unkDominationData6* temp_r31;
unkDominationData6 *temp_r31;
temp_r31 = lbl_1_bss_3988->data;
@ -138,9 +142,10 @@ void fn_1_61A0(void) {
}
}
void fn_1_6218(void) {
void fn_1_6218(void)
{
s16 i;
unkDominationData6* temp_r31;
unkDominationData6 *temp_r31;
temp_r31 = lbl_1_bss_3988->data;
@ -154,9 +159,10 @@ void fn_1_6218(void) {
temp_r31->unk_0A = fn_1_28D4();
}
void fn_1_62A0(void) {
void fn_1_62A0(void)
{
s32 i;
unkDominationData6* temp_r31;
unkDominationData6 *temp_r31;
temp_r31 = lbl_1_bss_3988->data;
@ -174,7 +180,8 @@ void fn_1_62A0(void) {
temp_r31->unk_20 = 1.2f;
temp_r31->unk_1C = 1;
}
} else {
}
else {
if ((temp_r31->unk_20 -= 0.04f) <= 1.0f) {
temp_r31->unk_20 = 1.0f;
temp_r31->unk_1C = 0;