This commit is contained in:
Kelebek1
2024-09-18 10:41:51 +01:00
parent b8b7020469
commit 5a9faab32d
6 changed files with 142 additions and 7 deletions

View File

@@ -104,7 +104,7 @@ typedef struct unk_D_86002F58_004_000 {
/* 0x064 */ char pad064[0x3C];
/* 0x0A0 */ s32 unk_0A0;
/* 0x0A4 */ char pad0A4[2];
/* 0x0A6 */ s8 unk_0A6;
/* 0x0A6 */ u8 unk_0A6;
/* 0x0A7 */ char pad0A7[5];
/* 0x0AC */ Vec3f unk_0AC;
/* 0x0B8 */ char pad0B8[0x24];

View File

@@ -1,9 +1,115 @@
#include "global.h"
#include "32D10.h"
#include "334D0.h"
#include "src/util.h"
#include "src/fragments/31/fragment31.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/32D10/func_80032110.s")
extern s16 D_800AF778[4];
extern s16 D_800AF780[4];
extern s16 D_800AF788[4];
extern s16 D_800AF790[4];
extern s16 D_800AF798[4];
extern s16 D_800AF7A0[4];
extern s16 D_800AF7AE;
extern s16 D_800AF7C0[];
#pragma GLOBAL_ASM("asm/us/nonmatchings/32D10/func_80032244.s")
void func_80032110(u8 arg0, s16 arg1) {
D_800AF778[arg0] = 0x167 - ((arg1 % 10) * 0x24);
D_800AF780[arg0] = 0x167 - (((arg1 / 10) % 10) * 0x24);
D_800AF788[arg0] = 0x167 - (((arg1 / 100) % 10) * 0x24);
}
void func_80032244(u8 arg0, s16 arg1) {
s16 tmp;
s16 tmp2;
D_800AF790[arg0] = 0x167 - ((arg1 % 10) * 0x24);
D_800AF798[arg0] = 0x167 - (((arg1 / 10) % 10) * 0x24);
D_800AF7A0[arg0] = 0x167 - (((arg1 / 100) % 10) * 0x24);
tmp2 = D_800AF790[arg0];
tmp = D_800AF778[arg0];
if (((tmp2 < 0x5A) && (tmp >= 0x10F)) || ((tmp < 0x5A) && (tmp2 >= 0x10F))) {
if (tmp < tmp2) {
D_800AF778[arg0] -= 6;
}
if (tmp2 < tmp) {
D_800AF778[arg0] += 6;
}
} else {
if (tmp < tmp2) {
D_800AF778[arg0] += 6;
}
if (tmp2 < tmp) {
D_800AF778[arg0] -= 6;
}
}
if (D_800AF778[arg0] < 0) {
D_800AF778[arg0] += 0x168;
}
if (D_800AF778[arg0] >= 0x168) {
D_800AF778[arg0] -= 0x168;
}
tmp2 = D_800AF798[arg0];
tmp = D_800AF780[arg0];
if (((tmp2 < 0x5A) && (tmp >= 0x10F)) || ((tmp < 0x5A) && (tmp2 >= 0x10F))) {
if (tmp < tmp2) {
D_800AF780[arg0] -= 6;
}
if (tmp2 < tmp) {
D_800AF780[arg0] += 6;
}
} else {
if (tmp < tmp2) {
D_800AF780[arg0] += 6;
}
if (tmp2 < tmp) {
D_800AF780[arg0] -= 6;
}
}
if (D_800AF780[arg0] < 0) {
D_800AF780[arg0] += 0x168;
}
if (D_800AF780[arg0] >= 0x168) {
D_800AF780[arg0] -= 0x168;
}
tmp2 = D_800AF7A0[arg0];
tmp = D_800AF788[arg0];
if (((tmp2 < 0x5A) && (tmp >= 0x10F)) || ((tmp < 0x5A) && (tmp2 >= 0x10F))) {
if (tmp < tmp2) {
D_800AF788[arg0] -= 6;
}
if (tmp2 < tmp) {
D_800AF788[arg0] += 6;
}
} else {
if (tmp < tmp2) {
D_800AF788[arg0] += 6;
}
if (tmp2 < tmp) {
D_800AF788[arg0] -= 6;
}
}
if (D_800AF788[arg0] < 0) {
D_800AF788[arg0] += 0x168;
}
if (D_800AF788[arg0] >= 0x168) {
D_800AF788[arg0] -= 0x168;
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/32D10/func_80032570.s")
@@ -13,7 +119,20 @@
#pragma GLOBAL_ASM("asm/us/nonmatchings/32D10/func_800325E0.s")
#pragma GLOBAL_ASM("asm/us/nonmatchings/32D10/func_8003260C.s")
void func_8003260C(unk_D_86002F58_004_000* arg0) {
void (*func)(void*);
s32 unk1A = arg0->unk_01A;
s32 idx = arg0->unk_0A6;
D_800AF7AE = 0;
if (unk1A < 0x98) {
D_800AF7C0[idx & 1] = 0;
func_80032A34(idx & 1);
func = Util_ConvertAddrToVirtAddr(func_810007A8);
func(arg0);
}
}
#pragma GLOBAL_ASM("asm/us/nonmatchings/32D10/func_80032670.s")

View File

@@ -3,7 +3,7 @@
#include "global.h"
void func_80032110(u8, s32);
void func_80032110(u8, s16);
void func_80032244(u8, s16);
void func_8003260C(unk_D_86002F58_004_000*);

View File

@@ -1,4 +1,4 @@
#include "global.h"
#include "334D0.h"
#pragma GLOBAL_ASM("asm/us/nonmatchings/334D0/func_800328D0.s")

8
src/334D0.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef _334D0_H_
#define _334D0_H_
#include "global.h"
void func_80032A34(s32);
#endif // _334D0_H_

View File

@@ -0,0 +1,8 @@
#ifndef _FRAGMENT31_H_
#define _FRAGMENT31_H_
#include "global.h"
void func_810007A8(unk_D_86002F58_004_000*);
#endif // _FRAGMENT31_H_