Better handling of func_global_asm_806119A0

This commit is contained in:
Donkey Kong 2024-03-04 19:12:58 +10:30
parent 47839793cf
commit f4533f4aaf
17 changed files with 76 additions and 96 deletions

View File

@ -23,6 +23,7 @@ u64 func_dk64_boot_80005918(u64, u64);
u64 func_dk64_boot_80007688(f32);
f32 func_dk64_boot_8000773C(s64);
u32 func_global_asm_806119A0(void);
f32 func_global_asm_80611BB4(f32, f32);
void func_global_asm_806DF5A0(s16 *arg0, s16 arg1, s16 arg2, s16 arg3);

View File

@ -677,7 +677,6 @@ void func_bonus_80029E54(Actor *arg0) {
#pragma GLOBAL_ASM("asm/nonmatchings/bonus/code_2690/func_bonus_8002A398.s")
s32 func_global_asm_806119A0();
extern s16 D_bonus_8002D900;
typedef struct {

View File

@ -37,7 +37,7 @@ typedef struct Critter {
u8 unk2C[0x30-0x2C];
f32 unk30;
f32 unk34; // Used
f32 unk38; // Used
volatile f32 unk38; // Used
f32 unk3C; // Used
u8 unk40; // Used
u8 unk41;
@ -63,7 +63,7 @@ typedef struct CritterController {
u8 unk1;
u8 unk2; // Also a count?
u8 unk3;
s32 unk4;
void *unk4;
Critter *critter;
} CritterController;
@ -142,7 +142,6 @@ void func_critter_80026E0C(s32);
void func_global_asm_8060956C(f32, f32, f32, s32, u8, f32, u8, u8);
void func_global_asm_80611690(void*);
u32 func_global_asm_806119A0();
void func_global_asm_80718BF4(void);
void func_critter_80024000(Critter *arg0, u8 *arg1, f32 arg2) {
@ -507,9 +506,9 @@ void func_critter_80025DB8(CritterStruct6 *arg0, CritterStruct6 *arg1, u8 arg2,
sp2C = arg0->unk14;
var_f0 += arg0->unk10;
} else {
sp2C = (func_global_asm_806119A0() & 0xFFF) * 0.00024414062f * arg0->unk8;
sp2C = ((u32)func_global_asm_806119A0() & 0xFFF) * 0.00024414062f * arg0->unk8;
}
temp_f2 = ((func_global_asm_806119A0(arg0, arg1) & 0xFFF) * 0.00024414062f * var_f0) - (0.5 * var_f0);
temp_f2 = (((u32)func_global_asm_806119A0() & 0xFFF) * 0.00024414062f * var_f0) - (0.5 * var_f0);
if (arg4 != 0) {
var_v0 = &arg1->unk18;
var_v1 = &arg1->unk1C;
@ -588,7 +587,7 @@ CritterStruct0 *func_critter_80026298(CritterStruct1 *arg0, u8 arg1) {
void func_critter_800262C0(Critter *arg0, CritterController *arg1) {
u8 var_a1;
var_a1 = (func_global_asm_806119A0() % (arg1->unk1 - 1));
var_a1 = ((u32)func_global_asm_806119A0() % (arg1->unk1 - 1));
if (var_a1 >= arg0->unk50[0]) {
var_a1++;
}
@ -915,10 +914,10 @@ void func_critter_8002708C(CritterController *arg0) {
void func_critter_80027118(CritterController *arg0) {
s32 pad[3];
void (*sp50)(CritterController *);
u32 temp_hi;
void *temp_hi;
s32 i;
s32 var_s3;
u8 arraySize;
s32 arraySize;
Critter *critter;
arraySize = arg0->unk2;
@ -950,19 +949,19 @@ void func_critter_80027118(CritterController *arg0) {
var_s3 = 1;
}
for (i = 0; i < arg0->unk2; i++) {
func_critter_80025F8C(arg0->unk4, critter, 1);
func_critter_80025F8C(arg0->unk4, &critter[0], 1);
if (!gameIsInDKTVMode()) {
func_critter_80025F3C(arg0->unk4, critter, 1, 1);
func_critter_80025F3C(arg0->unk4, &critter[0], 1, 1);
}
temp_hi = arg0->unk4;
critter->unk58 = temp_hi;
critter->unk1E2 = var_s3;
critter->unk54 = temp_hi;
critter->unk40 = 0xFF;
critter->unk0 = func_global_asm_806119A0() & 0xFFF;
critter->unk42 = func_global_asm_806119A0() & 0xFFF;
critter->unk38 = 2 * (1.0f - ((func_global_asm_806119A0() % 1000U) / 4000.0f));
critter++;
critter[i].unk58 = temp_hi;
critter[i].unk54 = temp_hi;
critter[i].unk1E2 = var_s3;
critter[i].unk40 = 0xFF;
critter[i].unk0 = func_global_asm_806119A0() & 0xFFF;
critter[i].unk42 = func_global_asm_806119A0() & 0xFFF;
critter[i].unk38 = (1 - ((func_global_asm_806119A0() % 1000U) / 4000.0f));
critter[i - 1].unk38 = 2 * critter[0].unk38;
if (var_s3 == 1) {
var_s3 = 2;
}

View File

@ -8,7 +8,7 @@
/*
void guAlignF(float mf[4][4], float a, float x, float y, float z)
{
static float dtor = 3.1415926f / 180.0f; // TODO: Need .rodata, .data, .bss defined? I don't really understand
static float dtor = 3.1415926f / 180.0f; // TODO: Need .data defined
float s, c, h, hinv;
guNormalize(&x, &y, &z);

View File

@ -104,7 +104,6 @@ extern s16 D_global_asm_807FDB3E;
extern s16 D_global_asm_807FDB40;
extern s16 D_global_asm_807FDB42;
u32 func_global_asm_806119A0();
Struct80717D84 *func_global_asm_80714D08(void*, f32, f32, f32, f32, s32, s32, s32, u8);
void func_global_asm_80714A9C(void);
void func_global_asm_80718380(Struct80717D84 *arg0, s8 *arg1);
@ -427,7 +426,6 @@ void func_global_asm_807158C0(void) {
extern s32 D_80000310;
extern void *D_global_asm_807FDB04;
extern void *D_global_asm_807FDB08;
OSTime func_global_asm_806119A0(void);
void func_global_asm_80715908(void *arg0) {
? sp3F;
@ -521,8 +519,8 @@ void func_global_asm_80716FB4(Struct80717D84 *arg0, s32 arg1) {
if (arg0->unk384 == NULL) {
arg0->unk384 = malloc(sizeof(Struct80717D84_unk384_80716FB4));
arg0->unk384->unk0 = (func_global_asm_806119A0() % 36000) / 100;
arg0->unk384->unk4 = (func_global_asm_806119A0() % 400) / 100;
arg0->unk384->unk0 = (func_global_asm_806119A0() % 36000U) / 100;
arg0->unk384->unk4 = (func_global_asm_806119A0() % 400U) / 100;
}
var_v1 = arg0->unk384;
var_v1->unk0 += var_v1->unk4;
@ -879,7 +877,7 @@ void func_global_asm_80718380(Struct80717D84 *arg0, s8 *arg1) {
if (arg0->unk384 == NULL) {
arg0->unk384 = malloc(sizeof(Struct80717D84_unk384_80718380));
*((f32*)arg0->unk384) = (func_global_asm_806119A0() % 36000) / 100;
*((f32*)arg0->unk384) = (func_global_asm_806119A0() % 36000U) / 100;
}
guScaleF(&sp70[0], arg0->unk360, arg0->unk364, 0.0f);
guRotateF(&sp30[0], 90.0f, 1.0f, 0.0f, 0.0f);
@ -919,7 +917,7 @@ void func_global_asm_807184F4(Struct80717D84 *arg0, s32 arg1) {
if (arg0->unk384 == NULL) {
arg0->unk384 = malloc(8);
arg0->unk384_f32->unk0 = 0.0f;
arg0->unk384_f32->unk4 = (func_global_asm_806119A0() % 400) / 100;
arg0->unk384_f32->unk4 = (func_global_asm_806119A0() % 400U) / 100;
}
guScaleF(&sp70[0], arg0->unk360, arg0->unk364, 0.0f);
guRotateF(&sp30[0], arg0->unk384->unk0, 0.0f, 0.0f, 1.0f);
@ -1236,8 +1234,8 @@ void func_global_asm_8071A1E4(Struct80717D84 *arg0, s32 arg1) {
var_v0 = arg0->unk384;
if (var_v0 == NULL) {
sp48 = -(func_global_asm_806119A0() / 10000) % 30;
sp46 = (func_global_asm_806119A0() / 10000) % 180;
sp48 = -(func_global_asm_806119A0() / 10000U) % 30;
sp46 = (func_global_asm_806119A0() / 10000U) % 180;
guRotateF(&sp8C[0], sp48, 0.0f, 1.0f, 0.0f);
// TODO: Regalloc here, arg0->unk35C is using v0 instead of t5
sp4B = arg0->unk35C >> 0x10;
@ -1369,7 +1367,7 @@ void func_global_asm_8071AF30(Struct80717D84 *arg0, s8 *arg1) {
if (temp_s1->object_properties_bitfield & 4) {
if (arg0->unk384 == NULL) {
arg0->unk384 = malloc(0x40);
sp34 = (func_global_asm_806119A0() % 36000) / 100;
sp34 = (func_global_asm_806119A0() % 36000U) / 100;
guScaleF(&sp78[0], arg0->unk360, arg0->unk364, 0.0f);
guRotateF(&sp38[0], sp34, 0.0f, 0.0f, 1.0f);
guMtxCatF(&sp78[0], &sp38[0], &sp78[0]);
@ -1566,8 +1564,8 @@ void func_global_asm_8071BB14(Struct80717D84 *arg0, s32 arg1) {
var_v1 = arg0->unk384;
if (var_v1 == NULL) {
arg0->unk384 = malloc(sizeof(Struct80717D84_unk384_8071BB14));
arg0->unk384->unk0 = ((func_global_asm_806119A0() % 36000) / 100);
arg0->unk384->unk4 = (func_global_asm_806119A0() % 10000) / D_global_asm_8075E9A0;
arg0->unk384->unk0 = ((func_global_asm_806119A0() % 36000U) / 100);
arg0->unk384->unk4 = (func_global_asm_806119A0() % 10000U) / D_global_asm_8075E9A0;
var_v1 = arg0->unk384;
}
arg0->unk344 = arg0->unk344 + (var_v1->unk4 + 1.0);
@ -1595,7 +1593,7 @@ void func_global_asm_8071BC80(Struct80717D84 *arg0, s32 arg1) {
var_v0 = arg0->unk384;
if (var_v0 == NULL) {
arg0->unk384 = malloc(sizeof(Struct80717D84_unk384_8071BC80));
guRotateF(&sp90[0], -(f32)((func_global_asm_806119A0() % 36000) / 1000), 1.0f, 0.0f, 0.0f);
guRotateF(&sp90[0], -(f32)((func_global_asm_806119A0() % 36000U) / 1000), 1.0f, 0.0f, 0.0f);
guRotateF(&sp50[0], (arg0->unk35C * 0x168) / 4096, 0.0f, 1.0f, 0.0f);
guMtxCatF(&sp90[0], &sp50[0], &sp90[0]);
guMtxXFMF(&sp90[0], 0.0f, 0.0f, 10.0f, &sp48, &sp44, &sp40);
@ -1760,10 +1758,10 @@ void func_global_asm_8071C620(Struct80717D84 *arg0, s32 arg1) {
var_v0 = arg0->unk384;
if (var_v0 == NULL) {
arg0->unk384 = malloc(0xC);
guRotateF(&sp90[0], (func_global_asm_806119A0() % 36000) / 100, 1.0f, 0.0f, 0.0f);
guRotateF(&sp50[0], (func_global_asm_806119A0() % 36000) / 100, 0.0f, 0.0f, 1.0f);
guRotateF(&sp90[0], (func_global_asm_806119A0() % 36000U) / 100, 1.0f, 0.0f, 0.0f);
guRotateF(&sp50[0], (func_global_asm_806119A0() % 36000U) / 100, 0.0f, 0.0f, 1.0f);
guMtxCatF(&sp90[0], &sp50[0], &sp90[0]);
guRotateF(&sp90[0], (func_global_asm_806119A0() % 36000) / 100, 0.0f, 1.0f, 0.0f);
guRotateF(&sp90[0], (func_global_asm_806119A0() % 36000U) / 100, 0.0f, 1.0f, 0.0f);
guMtxCatF(&sp90[0], &sp50[0], &sp90[0]);
guMtxXFMF(&sp90[0], 0.0f, 0.0f, 0.5f, &sp4C, &sp48, &sp44);
arg0->unk384_f32->unk0 = sp4C;
@ -1978,7 +1976,7 @@ void func_global_asm_8071D784(Struct80717D84 *arg0, s8 *arg1) {
if (arg0->unk384 == NULL) {
arg0->unk384 = malloc(0xC);
guRotateF(&sp90[0], -(f32)((func_global_asm_806119A0() % 36000) / 1000), 1.0f, 0.0f, 0.0f);
guRotateF(&sp90[0], -(f32)((func_global_asm_806119A0() % 36000U) / 1000), 1.0f, 0.0f, 0.0f);
guRotateF(&sp50[0], (arg0->unk35C * 0x168) / 4096, 0.0f, 1.0f, 0.0f);
guMtxCatF(&sp90[0], &sp50[0], &sp90[0]);
guMtxXFMF(&sp90[0], 0.0f, 0.0f, D_global_asm_80755678, &sp48, &sp44, &sp40);

View File

@ -868,7 +868,6 @@ void func_global_asm_80642844(s16 arg0, s16 arg1, Struct80642844 *arg2, s32 arg3
}
}
u32 func_global_asm_806119A0();
extern s32 D_global_asm_8071FC58;
void func_global_asm_80642940(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
@ -878,9 +877,9 @@ void func_global_asm_80642940(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
s32 i;
for (i = 0; i < 1; i++) {
var_f6 = (((func_global_asm_806119A0() / 10000) % 200) / 10.0) - 10.0;
var_f4 = (((func_global_asm_806119A0() / 10000) % 200) / 10.0) - 7.0;
var_f18 = (((func_global_asm_806119A0() / 10000) % 200) / 10.0) - 10.0;
var_f6 = (((func_global_asm_806119A0() / 10000U) % 200) / 10.0) - 10.0;
var_f4 = (((func_global_asm_806119A0() / 10000U) % 200) / 10.0) - 7.0;
var_f18 = (((func_global_asm_806119A0() / 10000U) % 200) / 10.0) - 10.0;
func_global_asm_807149B8(1);
func_global_asm_807149FC(2);
func_global_asm_80714950(0x64);
@ -921,7 +920,7 @@ void func_global_asm_80642C78(s32 arg0, s16 arg1, s32 arg2, s32 arg3) {
func_global_asm_806335B0(arg1, 1, i, &sp6C, &sp68, &sp64);
func_global_asm_807149B8(1);
func_global_asm_80714998(2);
func_global_asm_80714950(-0x14 - ((func_global_asm_806119A0() / 10000) % 50));
func_global_asm_80714950(-0x14 - ((func_global_asm_806119A0() / 10000U) % 50));
func_global_asm_807149C8(0xE1, 0x87, 0x38, 0xFF);
func_global_asm_8071498C(&func_global_asm_80717D4C);
func_global_asm_80714CC0(&D_global_asm_8071FF18, 0.5f, sp6C, sp68 + 2.0f, sp64);
@ -951,8 +950,8 @@ void func_global_asm_80642E34(s32 **arg0, s16 arg1, s16 arg2, s32 arg3) {
var_f0 = 1.0f;
}
func_global_asm_806335B0(arg1, 1, 1, &sp5C, &sp58, &sp54);
sp48 = ((func_global_asm_806119A0() / 10000) % 200) + 0x37;
func_global_asm_8065A708(sp5C, sp58, sp54, 0.0f, 0.0f, 0.0f, var_f0 * 200.0, 0, 0, sp48, ((func_global_asm_806119A0() / 10000) % 80) + 0xAF);
sp48 = ((func_global_asm_806119A0() / 10000U) % 200) + 0x37;
func_global_asm_8065A708(sp5C, sp58, sp54, 0.0f, 0.0f, 0.0f, var_f0 * 200.0, 0, 0, sp48, ((func_global_asm_806119A0() / 10000U) % 80) + 0xAF);
if (++(*var_v1) == 0x14) {
*var_v1 = 0;
}
@ -983,9 +982,9 @@ void func_global_asm_80642FC4(void **arg0, s32 arg1, s32 arg2, s32 arg3) {
var_v1 = malloc(0x10);
*arg0 = var_v1;
var_v1->unk0 = 7.0f;
var_v1->unk4 = ((func_global_asm_806119A0() / 10000) % 1548) + 0x5DC;
var_v1->unk8 = (((func_global_asm_806119A0() / 10000) % 100) / 40.0) + 2.5;
D_global_asm_807F6234 = (((func_global_asm_806119A0() / 10000) % 100) / D_global_asm_80758938) + D_global_asm_80758940;
var_v1->unk4 = ((func_global_asm_806119A0() / 10000U) % 1548) + 0x5DC;
var_v1->unk8 = (((func_global_asm_806119A0() / 10000U) % 100) / 40.0) + 2.5;
D_global_asm_807F6234 = (((func_global_asm_806119A0() / 10000U) % 100) / D_global_asm_80758938) + D_global_asm_80758940;
}
var_v1 = *arg0;
sp2C = D_global_asm_807F6220;
@ -1009,7 +1008,7 @@ void func_global_asm_80643274(s32 arg0, s16 arg1, s16 arg2, s16 arg3) {
s32 sp24;
if ((object_timer % (u32)arg3) == 0) {
sp24 = ((func_global_asm_806119A0() / 10000) % arg2) + 1;
sp24 = ((func_global_asm_806119A0() / 10000U) % arg2) + 1;
func_global_asm_807149C8(0xFF, 0xFF, 0xFF, 0x64);
func_global_asm_80714950(-0x78);
func_global_asm_8071498C(&func_global_asm_80717D4C);
@ -1024,7 +1023,7 @@ void func_global_asm_80643354(s32 arg0, u32 arg1, u32 arg2) {
Struct807F5FD4_unk0 *temp_v0;
if ((object_timer % arg2) == 0) {
sp24 = (func_global_asm_806119A0() / 10000) % arg1;
sp24 = (func_global_asm_806119A0() / 10000U) % arg1;
func_global_asm_807149C8(0xFF, 0xFF, 0xFF, 0x64);
func_global_asm_80714950(-0x78);
func_global_asm_8071498C(&func_global_asm_80717D4C);
@ -1154,7 +1153,7 @@ void func_global_asm_806438B8(s32 arg0, s16 arg1, s16 arg2, s16 arg3) {
func_global_asm_8071498C(&func_global_asm_8071A8B0);
func_global_asm_80714CC0(&D_global_asm_8071FE08, 1.5f, sp60, sp5C, sp58);
for (i = 0; i < 7; i++) {
temp_s0 = (s32)(func_global_asm_806119A0() / 10000) % 3;
temp_s0 = (s32)(func_global_asm_806119A0() / 10000U) % 3;
func_global_asm_807149B8(1);
func_global_asm_807149FC(0xA);
func_global_asm_8071498C(&func_global_asm_8071910C);
@ -1342,16 +1341,16 @@ typedef struct {
void func_global_asm_80644EC8(s32 arg0, s32 arg1, s16 arg2, s16 arg3) {
u32 sp2C;
if (((func_global_asm_806119A0() / 10000) % arg2) == 0) {
sp2C = (func_global_asm_806119A0() / 10000) % arg3;
if (((func_global_asm_806119A0() / 10000U) % arg2) == 0) {
sp2C = (func_global_asm_806119A0() / 10000U) % arg3;
func_global_asm_80714998(2);
func_global_asm_80714950(0x10064);
func_global_asm_8071498C(&func_global_asm_8071AADC);
func_global_asm_807149C8(0xFF, 0xFF, 0xFF, 0xFF);
func_global_asm_80714CC0(&D_global_asm_80720A7C, 1.2f, D_global_asm_807F5FD4->unk0[0][sp2C].unk0, D_global_asm_807F5FD4->unk0[0][sp2C].unk4, D_global_asm_807F5FD4->unk0[0][sp2C].unk8);
}
if (((func_global_asm_806119A0() / 10000) % arg2) == 0) {
sp2C = (func_global_asm_806119A0() / 10000) % arg3;
if (((func_global_asm_806119A0() / 10000U) % arg2) == 0) {
sp2C = (func_global_asm_806119A0() / 10000U) % arg3;
func_global_asm_80714998(2);
func_global_asm_80714950(0x10064);
func_global_asm_8071498C(&func_global_asm_8071AADC);
@ -1369,8 +1368,8 @@ void func_global_asm_806450C0(s32 arg0, s32 arg1, s16 arg2, s16 arg3) {
u32 temp_hi;
f32 sp30;
if (((func_global_asm_806119A0() / 10000) % 10) == 0) {
temp_hi = (func_global_asm_806119A0() / 10000) % arg3;
if (((func_global_asm_806119A0() / 10000U) % 10) == 0) {
temp_hi = (func_global_asm_806119A0() / 10000U) % arg3;
sp30 = D_global_asm_807F5FD4->unk0[arg2][temp_hi].unk4;
if (func_global_asm_80667110(D_global_asm_807F5FD4->unk0[arg2][temp_hi].unk0, D_global_asm_807F5FD4->unk0[arg2][temp_hi].unk8, &sp30) != 0) {
func_global_asm_80714950(sp30 + 2.0);
@ -1727,10 +1726,10 @@ void func_global_asm_80647218(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
f32 rand4;
for (i = 0; i < 6; i++) {
rand1 = (f32)((func_global_asm_806119A0() / 1000) % 20) - 10.0;
rand2 = (f32)((func_global_asm_806119A0() / 1000) % 20) - 10.0;
rand3 = (f32)((func_global_asm_806119A0() / 1000) % 20) - 10.0;
rand4 = (f32)((f32)(((func_global_asm_806119A0() / 1000) % 50) - 25.0) / 50.0);
rand1 = (f32)((func_global_asm_806119A0() / 1000U) % 20) - 10.0;
rand2 = (f32)((func_global_asm_806119A0() / 1000U) % 20) - 10.0;
rand3 = (f32)((func_global_asm_806119A0() / 1000U) % 20) - 10.0;
rand4 = (f32)((f32)(((func_global_asm_806119A0() / 1000U) % 50) - 25.0) / 50.0);
func_global_asm_80714950(-0xAA);
func_global_asm_8071498C(func_global_asm_80717D4C);
func_global_asm_807149B8(1);
@ -1794,7 +1793,7 @@ void func_global_asm_80647834(s32 arg0, s16 arg1, s32 arg2, s32 arg3) {
func_global_asm_8071498C(func_global_asm_8071910C);
func_global_asm_80714998(2);
func_global_asm_80714950(4);
temp = ((func_global_asm_806119A0() / 1000) % 80);
temp = ((func_global_asm_806119A0() / 1000U) % 80);
func_global_asm_80714CC0(&D_global_asm_80720EA4, 1.0f, D_global_asm_807F621C, D_global_asm_807F6220 + temp, D_global_asm_807F6224);
}
for (i = 1; i != 6; i++) {
@ -1909,11 +1908,11 @@ void func_global_asm_80647D7C(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
f32 randomY;
s32 i;
if (!((func_global_asm_806119A0() / 10000) & 1)) {
if (!((func_global_asm_806119A0() / 10000U) & 1)) {
for (i = 0; i < 0xC; i++) {
randomX = (f32)((func_global_asm_806119A0() / 10000) % 200) * 0.25 - 2.0;
randomY = (f32)((func_global_asm_806119A0() / 10000) % 200) * 0.25 - 2.0;
randomZ = (f32)((func_global_asm_806119A0() / 10000) % 200) * 0.25 - 2.0;
randomX = (f32)((func_global_asm_806119A0() / 10000U) % 200) * 0.25 - 2.0;
randomY = (f32)((func_global_asm_806119A0() / 10000U) % 200) * 0.25 - 2.0;
randomZ = (f32)((func_global_asm_806119A0() / 10000U) % 200) * 0.25 - 2.0;
func_global_asm_807149B8(1);
func_global_asm_80714950(1);
func_global_asm_807149FC(-1);
@ -1932,7 +1931,6 @@ void func_global_asm_80647D7C(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
// doable
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_42630/func_global_asm_80648000.s")
u32 func_global_asm_806119A0();
extern f64 D_global_asm_80758A10;
extern f64 D_global_asm_80758A18;
extern f32 D_global_asm_807F621C;
@ -1958,7 +1956,7 @@ void func_global_asm_80648000(OM2_unk7C *arg0, s16 arg1, s32 arg2, s32 arg3) {
}
}
if (arg0->unk9A & 1) {
if (((func_global_asm_806119A0() / 10000) % 20) == 0) {
if (((func_global_asm_806119A0() / 10000U) % 20) == 0) {
temp_s0 = arg0->unk0;
sp48 = ((rand() >> 0xF) % 100) / 100.0;
guMtxXFMF(temp_s0, (sp48 * 100.0) + -50.0, 0.0f, ((((rand() >> 0xF) % 100) / 100.0) * D_global_asm_80758A10) + D_global_asm_80758A18, &sp40, &sp3C, &sp38);

View File

@ -358,9 +358,6 @@ extern s32 D_global_asm_8071FE88; // TODO: Datatype
extern s32 D_global_asm_8071FEAC; // TODO: Datatype
extern f64 D_global_asm_80759550;
u32 func_global_asm_806119A0(void);
// TODO: Pretty close
void func_global_asm_8067DCC0(void) {
f32 temp_f20;
s32 temp_s0;
@ -374,7 +371,7 @@ void func_global_asm_8067DCC0(void) {
func_global_asm_80714CC0(&D_global_asm_8071FE08, temp_f20 * 0.75, current_actor_pointer->x_position, current_actor_pointer->y_position, current_actor_pointer->z_position);
func_global_asm_80608528(current_actor_pointer, 0x23, 0xFF, 0x7F, 1);
for (i = 0; i < 7; i++) {
temp_s0 = (s32)(func_global_asm_806119A0() / 10000) % 3;
temp_s0 = (s32)(func_global_asm_806119A0() / 10000U) % 3;
func_global_asm_807149B8(1);
func_global_asm_807149FC(0xA);
func_global_asm_8071498C(&func_global_asm_8071910C);

View File

@ -23,8 +23,6 @@ extern s32 D_global_asm_8072139C;
void func_global_asm_80718BF4(void);
u32 func_global_asm_806119A0();
extern s32 D_global_asm_8074E880[];
extern u8 D_global_asm_80750AD0;
@ -188,12 +186,12 @@ void func_global_asm_80684D98(u8 arg0) {
f32 randomY;
s32 i;
if (((func_global_asm_806119A0() / 10000) % arg0) == 0) {
if (((func_global_asm_806119A0() / 10000U) % arg0) == 0) {
if (D_global_asm_80750AD0 == 0) {
for (i = 0; i < 4; i++) {
randomX = (f32)((func_global_asm_806119A0() / 10000) % 200) / 10.0 - 5.0;
randomY = (f32)((func_global_asm_806119A0() / 10000) % 200) / 10.0 - 5.0;
randomZ = (f32)((func_global_asm_806119A0() / 10000) % 200) / 10.0 - 5.0;
randomX = (f32)((func_global_asm_806119A0() / 10000U) % 200) / 10.0 - 5.0;
randomY = (f32)((func_global_asm_806119A0() / 10000U) % 200) / 10.0 - 5.0;
randomZ = (f32)((func_global_asm_806119A0() / 10000U) % 200) / 10.0 - 5.0;
func_global_asm_807149B8(1);
func_global_asm_80714950(1);
func_global_asm_807149FC(-1);

View File

@ -29,7 +29,6 @@ extern f32 D_global_asm_807FC7B8;
extern u8 D_global_asm_807FBB85;
u32 func_global_asm_806119A0();
void func_global_asm_8061EF4C(Actor*, s32, s32, f32, f32, f32, f32, f32);
void func_global_asm_8061F2B8(f32, f32, f32, f32, f32, f32, f32, f32, f32, f32 *, f32 *, f32 *);
s32 func_global_asm_8070033C(f32, f32, f32, f32, f32, f32, f32, s32, s32, s32);
@ -232,7 +231,7 @@ void func_global_asm_80690190(Struct80690190 *arg0, s32 arg1) {
temp_a1 = D_global_asm_80770628[current_actor_pointer->unk70];
if (current_actor_pointer->y_position < (current_actor_pointer->unkAC + 4.0f)) {
if (D_global_asm_80770BC0[temp_a1] == 0.0f) {
D_global_asm_80770B68[temp_a1] = (((func_global_asm_806119A0() / 4294967295.0) * 0.05) + 0.975) * (0.2 + (current_actor_pointer->unkB8 / 300.0));
D_global_asm_80770B68[temp_a1] = ((((u32)func_global_asm_806119A0() / 4294967295.0) * 0.05) + 0.975) * (0.2 + (current_actor_pointer->unkB8 / 300.0));
D_global_asm_80770BC0[temp_a1] = 1.0f;
}
} else {
@ -435,9 +434,9 @@ void func_global_asm_806915B0(void) {
max = 6;
}
for (i = 0; i < max; i++) {
randomX = ((((func_global_asm_806119A0()) / 10000) % 200) / 5.0) - 20.0;
randomY = ((((func_global_asm_806119A0()) / 10000) % 200) / 5.0) - 20.0;
randomZ = ((((func_global_asm_806119A0()) / 10000) % 200) / 5.0) - 20.0;
randomX = ((((func_global_asm_806119A0()) / 10000U) % 200) / 5.0) - 20.0;
randomY = ((((func_global_asm_806119A0()) / 10000U) % 200) / 5.0) - 20.0;
randomZ = ((((func_global_asm_806119A0()) / 10000U) % 200) / 5.0) - 20.0;
func_global_asm_807149B8(1);
func_global_asm_807149C8(0x8C, 0x8C, 0x8C, 0x64);
func_global_asm_80714950(i * -0x14);

View File

@ -602,8 +602,6 @@ void func_global_asm_806B52DC(void) {
extern f64 D_global_asm_8075B718;
s16 func_global_asm_806119A0(void);
typedef struct {
f32 unk0;
f32 unk4;

View File

@ -161,7 +161,6 @@ u8 func_global_asm_806CDD24(Actor *arg0, f32 arg1, f32 arg2, s32 arg3);
s32 func_global_asm_806CE174(Actor *arg0, f32 arg1, f32 arg2, s32 arg3);
s16 func_global_asm_806CE4E4(Actor*, f32, f32, s32);
void func_global_asm_806DF494(s16*, s16, s16);
u32 func_global_asm_806119A0(void);
void func_global_asm_806D0468(Actor *arg0, u8 arg1);
void func_global_asm_806CD8EC(void);
void func_global_asm_806CD424(s16, f32, f32); // TODO: Is this signature correct?
@ -1530,7 +1529,7 @@ void func_global_asm_806CF580(void) {
if (((current_actor_pointer->control_state == 0x4F) || (current_actor_pointer->control_state == 0x7F))
&& (D_global_asm_80750AD0 == 0)
&& ((extra_player_info_pointer->unkD0 + 9) < (u32)object_timer)
&& (((func_global_asm_806119A0() % 2500) / 200) == 0)) {
&& (((func_global_asm_806119A0() % 2500U) / 200) == 0)) {
func_global_asm_8071498C(&func_global_asm_80718BF4);
func_global_asm_807149B8(1);
func_global_asm_807149FC(-1);

View File

@ -190,7 +190,6 @@ u8 func_global_asm_806CDD24(Actor *arg0, f32 arg1, f32 arg2, s32 arg3);
u8 func_global_asm_806CE174(Actor *arg0, f32 arg1, f32 arg2, s32 arg3);
s16 func_global_asm_806CE4E4(Actor*, f32, f32, s32);
void func_global_asm_806DF494(s16*, s16, s16);
u32 func_global_asm_806119A0(void);
void func_global_asm_806CD8EC(void);
void func_global_asm_806CD424(s16, f32, f32); // TODO: Is this signature correct?
void func_global_asm_806CC638(f32 arg0);
@ -1407,25 +1406,25 @@ void func_global_asm_806D6B00(void) {
func_global_asm_806CC948();
extra_player_info_pointer->unk30 = D_global_asm_80753548[D_global_asm_807FD584];
if (current_actor_pointer->unkB8 > 20.0f) {
if ((func_global_asm_806119A0() % 3) == 0) { // RNG
if ((func_global_asm_806119A0() % 3U) == 0) { // RNG
func_global_asm_8071498C(&func_global_asm_8071B2EC);
func_global_asm_80714998(2);
func_global_asm_807149B8(1);
func_global_asm_80714C08(&D_global_asm_8071FF18, 0.2f, current_actor_pointer, 2, 0);
}
if ((func_global_asm_806119A0() % 3) == 0) { // RNG
if ((func_global_asm_806119A0() % 3U) == 0) { // RNG
func_global_asm_8071498C(&func_global_asm_8071B2EC);
func_global_asm_80714998(2);
func_global_asm_807149B8(1);
func_global_asm_80714C08(&D_global_asm_8071FF18, 0.2f, current_actor_pointer, 3, 0);
}
if ((func_global_asm_806119A0() % 3) == 0) { // RNG
if ((func_global_asm_806119A0() % 3U) == 0) { // RNG
func_global_asm_8071498C(&func_global_asm_8071B2EC);
func_global_asm_80714998(2);
func_global_asm_807149B8(1);
func_global_asm_80714C08(&D_global_asm_8071FF18, 0.2f, current_actor_pointer, 9, 0);
}
if ((func_global_asm_806119A0() % 3) == 0) { // RNG
if ((func_global_asm_806119A0() % 3U) == 0) { // RNG
func_global_asm_8071498C(&func_global_asm_8071B2EC);
func_global_asm_80714998(2);
func_global_asm_807149B8(1);

View File

@ -1391,7 +1391,6 @@ void func_menu_80030258(Gfx *dl, Actor *arg1) {
// Jumptable, 508 bytes of code
#pragma GLOBAL_ASM("asm/nonmatchings/menu/code_3E10/func_menu_80030894.s")
s32 func_global_asm_806119A0();
extern f32 D_menu_80033E0C;
extern f32 D_menu_80033E10;
extern f32 D_menu_80033E14;

View File

@ -13,7 +13,6 @@ extern f32 D_global_asm_807502F8;
extern s16 D_global_asm_80750338;
s32 func_global_asm_8070E750(s32, s32, s32);
u8 func_global_asm_806119A0(void);
void func_global_asm_8065A660(f32, f32);
void func_minecart_8002430C(u8 arg0, s32 arg1, s16 arg2, u8 arg3);

View File

@ -173,7 +173,6 @@ void func_minecart_80027E04(void) {
#pragma GLOBAL_ASM("asm/nonmatchings/minecart/code_25F0/func_minecart_80027EE8.s")
u32 func_global_asm_806119A0();
typedef struct MinecartStruct1 {
u8 pad0[0x3A];
u8 unk3A;

View File

@ -79,7 +79,6 @@ extern f32 D_global_asm_80770BC0[];
extern u16 D_global_asm_80750AC4;
u32 func_global_asm_806119A0(void);
void func_race_8002D338(Actor *arg0, RaceStruct0 *arg1);
extern void func_race_8002CFF0(void);
@ -478,7 +477,7 @@ void func_race_80026D2C(f32 arg0) {
}
if (D_global_asm_80770BC0[temp] == 0.0f) {
D_global_asm_80770B68[temp] = (((func_global_asm_806119A0() / D_race_8002FE40) * D_race_8002FE48) + D_race_8002FE50) * (D_race_8002FE58 + (arg0 / 15.0));
D_global_asm_80770B68[temp] = ((((u32)func_global_asm_806119A0() / D_race_8002FE40) * D_race_8002FE48) + D_race_8002FE50) * (D_race_8002FE58 + (arg0 / 15.0));
D_global_asm_80770BC0[temp] = 3.0f;
}
}

View File

@ -1,7 +1,6 @@
#include <ultra64.h>
#include "functions.h"
s32 func_global_asm_806119A0(void);
f32 func_global_asm_80665E48(f32, f32, f32, f32);
s32 func_global_asm_8072177C(void *, s16, s16, s16, s32, s32, s32, s32, s32);