mirror of
https://gitlab.com/dk64_decomp/dk64.git
synced 2024-11-30 10:40:23 +00:00
Cleanup
This commit is contained in:
parent
7cf60bed93
commit
be8fdfe7da
@ -62,7 +62,6 @@ void func_global_asm_80665564(Actor *arg0, f32 arg1);
|
||||
s16 func_global_asm_80665DE0(f32, f32, f32, f32);
|
||||
|
||||
void func_global_asm_8067DF44(f32, f32, f32, f32, u8, u8);
|
||||
// s32 spawnActor(Actors, s32); // spawnActorWrapper()
|
||||
void func_global_asm_807149C8(u8 arg0, u8 arg1, u8 arg2, u8 arg3);
|
||||
f32 func_global_asm_80665E94(f32, f32, f32, f32, f32, f32, s16);
|
||||
|
||||
@ -1840,7 +1839,7 @@ void func_global_asm_8072F09C(Actor *arg0);
|
||||
void func_global_asm_8072F120(void);
|
||||
void func_global_asm_8062D26C(Actor*);
|
||||
void func_global_asm_807233B4(Actor*);
|
||||
s32 spawnActor(Actors arg0, s32 arg1);
|
||||
s32 spawnActor(Actors actorIndex, s32 modelIndex);
|
||||
void func_global_asm_806790F4(u8);
|
||||
void func_global_asm_80678CC8(Actor *arg0);
|
||||
s32 func_global_asm_80679010(Actor *arg0, Actor *arg1);
|
||||
@ -2333,8 +2332,10 @@ Gfx *func_global_asm_805FCFD8(Gfx *dl);
|
||||
Gfx *func_global_asm_805FD030(Gfx *dl);
|
||||
Gfx *func_global_asm_8068E7B4(Gfx *dl, f32 arg1, f32 arg2, s32 seconds);
|
||||
void func_global_asm_806F0C18(Actor*);
|
||||
void func_global_asm_8061C6A8(Actor *, Actor *, s32, s32, s32, s32, s32, s32, s32, s32, f32);
|
||||
|
||||
// TODO: Where is the best place to put this so it's available everywhere and doesn't conflict with internal libultra/gu stuff?
|
||||
#define ABS(d) (((d) > 0) ? (d) : -(d))
|
||||
#define TWO_PI 6.28318548202514648
|
||||
|
||||
#endif
|
||||
|
@ -39,7 +39,7 @@ const u32 D_bonus_8002DCA8[] = {
|
||||
const f32 D_bonus_8002DCB4 = 0.3f;
|
||||
const f32 D_bonus_8002DCB8 = 0.09f;
|
||||
const f32 D_bonus_8002DCE4 = 0.09f;
|
||||
const f64 D_bonus_8002DD00 = 6.28318548202514648;
|
||||
const f64 D_bonus_8002DD00 = 6.28318548202514648; // TWO_PI
|
||||
const f64 D_bonus_8002DD08 = 90.0;
|
||||
const f64 D_bonus_8002DD10 = 0.3;
|
||||
*/
|
||||
@ -68,7 +68,7 @@ Gfx *func_bonus_800252A0(Gfx *dl, Actor *arg1) {
|
||||
|
||||
Actor* func_bonus_800253E4(s32 arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
BaaD2 *tmp;
|
||||
if (spawnActor(ACTOR_BANDIT_SLOT, arg0)) { // Spawn actor 219 (slot, BBB I guess?)
|
||||
if (spawnActor(ACTOR_BANDIT_SLOT, arg0)) {
|
||||
tmp = last_spawned_actor->BaaD2;
|
||||
last_spawned_actor->x_position = arg1;
|
||||
last_spawned_actor->y_position = arg2;
|
||||
|
@ -68,7 +68,7 @@ void func_bonus_800271B4(s16 arg0, s16 arg1, s16 arg2, u8 arg3, Struct800271B4 *
|
||||
AAD_bonus_800271B4 *temp_v1;
|
||||
|
||||
var_a3 = arg4->unk28 < ((rand() >> 0xF) % 100) ? 1 : 0;
|
||||
if (spawnActor(ACTOR_MINIGAME_KREMLING, var_a3 ? 0x32 : 0x33) != 0) {
|
||||
if (spawnActor(ACTOR_MINIGAME_KREMLING, var_a3 ? 0x32 : 0x33)) {
|
||||
temp_v1 = last_spawned_actor->additional_actor_data;
|
||||
func_global_asm_80614EBC(last_spawned_actor, var_a3 ? 0x211 : 0x20F);
|
||||
func_global_asm_80614D00(last_spawned_actor, arg4->unk2C, 0);
|
||||
@ -476,7 +476,7 @@ void func_bonus_80028648(ARG0_80028648 *arg0) {
|
||||
Struct807F5FD4_unk0 *temp;
|
||||
|
||||
for (i = 1; i < 7; i++) {
|
||||
if (spawnActor(ACTOR_SNAKE, 0x15) != 0) {
|
||||
if (spawnActor(ACTOR_SNAKE, 0x15)) {
|
||||
snakeAAD = last_spawned_actor->additional_actor_data;
|
||||
snakeAAD->unk0 = current_actor_pointer;
|
||||
snakeAAD->unk11 = (((rand() >> 0xF) % 32767) % ((arg0->unk1C - arg0->unk1B) + 1)) + arg0->unk1B;
|
||||
@ -488,7 +488,7 @@ void func_bonus_80028648(ARG0_80028648 *arg0) {
|
||||
last_spawned_actor->object_properties_bitfield |= 0x1000;
|
||||
last_spawned_actor->y_rotation = 0x800;
|
||||
arg0->unk0[i - 1] = last_spawned_actor;
|
||||
if (spawnActor(ACTOR_TURTLE, 0x16) != 0) {
|
||||
if (spawnActor(ACTOR_TURTLE, 0x16)) {
|
||||
turtleAAD = last_spawned_actor->additional_actor_data;
|
||||
turtleAAD->unk0 = last_spawned_actor;
|
||||
turtleAAD->unk6 = i - 1;
|
||||
@ -640,7 +640,7 @@ void func_bonus_80029E54(Actor *arg0) {
|
||||
var_s2 = &D_bonus_8002D8C8;
|
||||
var_s1 = 1;
|
||||
do {
|
||||
if (spawnActor(ACTOR_MINIGAME_KRAZYKONGKLAMOUR_KONG, var_s2[var_s1]) != 0) {
|
||||
if (spawnActor(ACTOR_MINIGAME_KRAZYKONGKLAMOUR_KONG, var_s2[var_s1])) {
|
||||
temp_t7 = var_s1 - 1;
|
||||
aaD = current_actor_pointer->additional_actor_data;
|
||||
a17C = current_actor_pointer->unk17C;
|
||||
|
@ -119,7 +119,7 @@ extern u8 D_global_asm_807FBD70;
|
||||
|
||||
void func_boss_8002DC60(void) {
|
||||
BossActor178 *sp1C = current_actor_pointer->unk178;
|
||||
spawnActor(ACTOR_BOSS_KROOL_LIGHT, 0xE3); // Spawn actor 221 "light piece" (lanky phase)
|
||||
spawnActor(ACTOR_BOSS_KROOL_LIGHT, 0xE3);
|
||||
last_spawned_actor->object_properties_bitfield |= 0x400;
|
||||
last_spawned_actor->unk11C = current_actor_pointer;
|
||||
sp1C->unk0 = last_spawned_actor;
|
||||
@ -303,14 +303,14 @@ void func_boss_8002FDF8(Actor* arg0, u8 arg1) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_boss_8002FEC0(Actor* arg0[], u8 arg1, s32 arg2) {
|
||||
spawnActor(ACTOR_BOSS_KROOL_TOE, arg2); // Spawn actor 229 (K. Rool's toe)
|
||||
void func_boss_8002FEC0(Actor* toes[], u8 toeIndex, s32 modelIndex) {
|
||||
spawnActor(ACTOR_BOSS_KROOL_TOE, modelIndex);
|
||||
func_global_asm_8067B238(last_spawned_actor, current_actor_pointer, current_actor_pointer->animation_state->scale_y);
|
||||
last_spawned_actor->object_properties_bitfield |= 0x1400;
|
||||
last_spawned_actor->unk11C = current_actor_pointer;
|
||||
last_spawned_actor->noclip_byte = current_actor_pointer->noclip_byte;
|
||||
last_spawned_actor->object_properties_bitfield = current_actor_pointer->object_properties_bitfield;
|
||||
arg0[arg1] = last_spawned_actor;
|
||||
toes[toeIndex] = last_spawned_actor;
|
||||
}
|
||||
|
||||
// Jumptable
|
||||
|
@ -3426,7 +3426,7 @@ void func_global_asm_8064F028(s32 arg0, s32 arg1, s16 arg2, s32 arg3) {
|
||||
func_global_asm_807149B8(1);
|
||||
func_global_asm_80714998(2);
|
||||
func_global_asm_80714CC0(&D_global_asm_80721530, 0, D_global_asm_807F621C, D_global_asm_807F6220 + D_global_asm_80758BD8, D_global_asm_807F6224);
|
||||
spawnActor(ACTOR_WRINKLY, 0x53); // Spawn actor: Wrinkly
|
||||
spawnActor(ACTOR_WRINKLY, 0x53);
|
||||
last_spawned_actor->x_position = D_global_asm_807F621C;
|
||||
last_spawned_actor->y_position = D_global_asm_807F6220;
|
||||
last_spawned_actor->z_position = D_global_asm_807F6224;
|
||||
|
@ -109,14 +109,14 @@ typedef struct {
|
||||
} KongMirrorAAD;
|
||||
|
||||
void func_global_asm_80663A0C(Actor *arg0, GlobalASMStruct84 *arg1) {
|
||||
KongMirrorAAD *temp_v1;
|
||||
KongMirrorAAD *aaD;
|
||||
|
||||
spawnActor(ACTOR_REFLECTION_MUSEUM, func_global_asm_80613448(arg0)); // Spawn actor: Kong Mirror (Creepy Castle Museum)
|
||||
spawnActor(ACTOR_REFLECTION_MUSEUM, func_global_asm_80613448(arg0));
|
||||
last_spawned_actor->unk11C = arg0;
|
||||
temp_v1 = last_spawned_actor->additional_actor_data;
|
||||
temp_v1->unkE = arg1->unkE;
|
||||
temp_v1->unkC = arg1->unkC;
|
||||
temp_v1->unkF = arg1->unkF;
|
||||
aaD = last_spawned_actor->additional_actor_data;
|
||||
aaD->unkE = arg1->unkE;
|
||||
aaD->unkC = arg1->unkC;
|
||||
aaD->unkF = arg1->unkF;
|
||||
arg0->unk156++;
|
||||
}
|
||||
|
||||
|
@ -28,6 +28,12 @@ void func_global_asm_8067B01C(void);
|
||||
void func_global_asm_8067B100(Actor *player);
|
||||
s16 func_global_asm_8067AF74(Actor*);
|
||||
s32 func_global_asm_806782E8(Actor *arg0);
|
||||
s32 func_global_asm_8067B3F4(s32 arg0);
|
||||
void func_global_asm_80679178(Actor *arg0);
|
||||
void func_global_asm_80678E6C(Actor *arg0);
|
||||
void func_global_asm_80678E14(Actor *arg0);
|
||||
void func_global_asm_806790F4(u8);
|
||||
void func_global_asm_8067A1DC(Actor *arg0);
|
||||
|
||||
void func_global_asm_806783BC();
|
||||
void func_global_asm_806136B4();
|
||||
@ -135,7 +141,7 @@ s32 func_global_asm_80677ED0(Struct80677ED0 *arg0) {
|
||||
|
||||
if (func_global_asm_80678050(arg0->unk0)) {
|
||||
master_type = D_global_asm_8074D8D4[arg0->unk0];
|
||||
if(D_global_asm_8074DA30[master_type](&arg0->unk4)) {
|
||||
if (D_global_asm_8074DA30[master_type](&arg0->unk4)) {
|
||||
last_spawned_actor->x_position = arg0->unkC;
|
||||
last_spawned_actor->y_position = arg0->unk10;
|
||||
last_spawned_actor->z_position = arg0->unk14;
|
||||
@ -151,12 +157,12 @@ s32 func_global_asm_80677ED0(Struct80677ED0 *arg0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
s32 spawnActor(Actors arg0, s32 arg1) {
|
||||
s32 spawnActor(Actors actorIndex, s32 modelIndex) {
|
||||
s32 master_type;
|
||||
|
||||
if (func_global_asm_80678050(arg0)) {
|
||||
master_type = D_global_asm_8074D8D4[arg0];
|
||||
if (D_global_asm_8074DA30[master_type](&arg1)) {
|
||||
if (func_global_asm_80678050(actorIndex)) {
|
||||
master_type = D_global_asm_8074D8D4[actorIndex];
|
||||
if (D_global_asm_8074DA30[master_type](&modelIndex)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@ -529,12 +535,6 @@ void func_global_asm_80678BBC(Actor *arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_global_asm_8067B3F4(s32 arg0);
|
||||
void func_global_asm_80679178(Actor *arg0);
|
||||
void func_global_asm_80678E6C(Actor *arg0);
|
||||
void func_global_asm_80678E14(Actor *arg0);
|
||||
void func_global_asm_806790F4(u8);
|
||||
|
||||
void func_global_asm_80678CC8(Actor *arg0) {
|
||||
u32 temp_v0;
|
||||
u32 temp_v0_2;
|
||||
|
@ -772,10 +772,10 @@ typedef struct {
|
||||
|
||||
void func_global_asm_80682E38(Struct80682E38_arg0 *arg0) {
|
||||
s32 var_a2;
|
||||
s16 var_a1;
|
||||
Actors var_s0;
|
||||
s16 modelIndex;
|
||||
Actors actorIndex;
|
||||
s32 i;
|
||||
AAD_global_asm_80682E38 *temp_s0;
|
||||
AAD_global_asm_80682E38 *aaD;
|
||||
|
||||
spawnActor(ACTOR_SPOTLIGHT, 0xA8);
|
||||
arg0->unk1C = last_spawned_actor;
|
||||
@ -784,26 +784,26 @@ void func_global_asm_80682E38(Struct80682E38_arg0 *arg0) {
|
||||
last_spawned_actor->z_position = (func_global_asm_80612790(current_actor_pointer->y_rotation) * 35.0f) + current_actor_pointer->z_position;
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (isFlagSet(func_global_asm_805FF018(current_actor_pointer->unk58, i), FLAG_TYPE_PERMANENT) != FALSE) {
|
||||
var_s0 = ACTOR_TAGBARREL_KONG;
|
||||
var_a1 = D_global_asm_8074E814[i].unk0;
|
||||
actorIndex = ACTOR_TAGBARREL_KONG;
|
||||
modelIndex = D_global_asm_8074E814[i].unk0;
|
||||
} else {
|
||||
var_s0 = ACTOR_TAGBARREL_LOCKED;
|
||||
var_a1 = 0xD2;
|
||||
actorIndex = ACTOR_TAGBARREL_LOCKED;
|
||||
modelIndex = 0xD2;
|
||||
}
|
||||
spawnActor(var_s0, var_a1);
|
||||
spawnActor(actorIndex, modelIndex);
|
||||
arg0->unk8[i] = last_spawned_actor;
|
||||
last_spawned_actor->y_rotation = current_actor_pointer->y_rotation;
|
||||
last_spawned_actor->object_properties_bitfield |= 0x40000000;
|
||||
if (var_s0 == 0x13C) {
|
||||
temp_s0 = last_spawned_actor->additional_actor_data;
|
||||
temp_s0->unk0 = D_global_asm_8074E814[i].unk2;
|
||||
func_global_asm_806F09F0(last_spawned_actor, temp_s0->unk0);
|
||||
if (actorIndex == ACTOR_TAGBARREL_KONG) {
|
||||
aaD = last_spawned_actor->additional_actor_data;
|
||||
aaD->unk0 = D_global_asm_8074E814[i].unk2;
|
||||
func_global_asm_806F09F0(last_spawned_actor, aaD->unk0);
|
||||
if (i == arg0->unk6) {
|
||||
var_a2 = 0x8B;
|
||||
} else {
|
||||
var_a2 = 0x8A;
|
||||
}
|
||||
func_global_asm_80682DF4(last_spawned_actor, temp_s0, var_a2);
|
||||
func_global_asm_80682DF4(last_spawned_actor, aaD, var_a2);
|
||||
} else {
|
||||
RaceAdditionalActorData2 *RaaD2 = last_spawned_actor->RaaD2;
|
||||
RaaD2->unk0 = i;
|
||||
|
@ -71,30 +71,30 @@ void func_global_asm_806845B8(u8 arg0, u8 arg1) {
|
||||
|
||||
// spawnShockwave(xPosition, yPosition, zPosition, xzScale, yScale, parentActor, arg6)
|
||||
void func_global_asm_806846B4(f32 xPosition, f32 yPosition, f32 zPosition, f32 xzScale, f32 yScale, Actor *arg5, u8 arg6) {
|
||||
s32 phi_a1;
|
||||
s32 modelIndex;
|
||||
|
||||
phi_a1 = 0xAD;
|
||||
modelIndex = 0xAD;
|
||||
if (arg5) {
|
||||
switch (arg5->unk58) {
|
||||
case ACTOR_TINY:
|
||||
case ACTOR_KASPLAT_TINY:
|
||||
phi_a1 = 0xD1;
|
||||
modelIndex = 0xD1;
|
||||
break;
|
||||
case ACTOR_LANKY:
|
||||
case ACTOR_KASPLAT_LANKY:
|
||||
phi_a1 = 0xD0;
|
||||
modelIndex = 0xD0;
|
||||
break;
|
||||
case ACTOR_CHUNKY:
|
||||
case ACTOR_KASPLAT_CHUNKY:
|
||||
phi_a1 = 0xCF;
|
||||
modelIndex = 0xCF;
|
||||
break;
|
||||
case ACTOR_DIDDY:
|
||||
case ACTOR_KASPLAT_DIDDY:
|
||||
phi_a1 = 0xAE;
|
||||
modelIndex = 0xAE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
spawnActor(ACTOR_SHOCKWAVE, phi_a1); // Spawn actor: Shockwave
|
||||
spawnActor(ACTOR_SHOCKWAVE, modelIndex);
|
||||
last_spawned_actor->unk11C = arg5;
|
||||
last_spawned_actor->animation_state->scale_x = xzScale;
|
||||
last_spawned_actor->animation_state->scale_z = xzScale;
|
||||
@ -601,7 +601,7 @@ void func_global_asm_80686E40(f32 arg0, f32 arg1, f32 arg2, s32 arg3) {
|
||||
}
|
||||
|
||||
void func_global_asm_80686F90(u8 arg0, s16 arg1, s16 arg2) {
|
||||
spawnActor(ACTOR_BOSS_DOGADON_LIGHTBEAM, 0xC0); // Spawn actor: Light beam (boss fights)
|
||||
spawnActor(ACTOR_BOSS_DOGADON_LIGHTBEAM, 0xC0);
|
||||
if (arg0) {
|
||||
func_global_asm_80671C0C(current_actor_pointer, arg0, &last_spawned_actor->x_position, &last_spawned_actor->y_position, &last_spawned_actor->z_position);
|
||||
} else {
|
||||
@ -685,7 +685,7 @@ void func_global_asm_80687400(void) {
|
||||
}
|
||||
|
||||
void func_global_asm_80687474(Actor *arg0, f32 arg1) {
|
||||
spawnActor(ACTOR_SHOCKWAVE_MAD_JACK, 0x5D); // Spawn actor: Shockwave (Mad Jack)
|
||||
spawnActor(ACTOR_SHOCKWAVE_MAD_JACK, 0x5D);
|
||||
last_spawned_actor->object_properties_bitfield |= 0x400;
|
||||
func_global_asm_80614EBC(last_spawned_actor, 0x334);
|
||||
func_global_asm_8067B238(last_spawned_actor, arg0, arg0->animation_state->scale_y * arg1);
|
||||
|
@ -30,7 +30,6 @@ extern f32 D_global_asm_807FC7B8;
|
||||
extern u8 D_global_asm_807FBB85;
|
||||
|
||||
u32 func_global_asm_806119A0();
|
||||
s32 func_global_asm_8061C6A8(Actor *, Actor *, s32, s32, s32, s32, s32, s32, s32, s32, f32);
|
||||
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);
|
||||
@ -198,9 +197,9 @@ void func_global_asm_80690058(Actor *arg0, s32 arg1) {
|
||||
func_global_asm_80611690(arg0->animation_state->unk1C);
|
||||
}
|
||||
|
||||
void func_global_asm_80690094(Actor *arg0, Actor *arg1) {
|
||||
void func_global_asm_80690094(Actor *arg0, Actor *player) {
|
||||
u8 sp37 = 0;
|
||||
PlayerAdditionalActorData *PaaD = arg1->PaaD;
|
||||
PlayerAdditionalActorData *PaaD = player->PaaD;
|
||||
|
||||
func_global_asm_806EB0C0(0x4C, arg0, PaaD->unk1A4);
|
||||
if (current_map == MAP_GALLEON_PUFFTOSS) {
|
||||
@ -211,7 +210,7 @@ void func_global_asm_80690094(Actor *arg0, Actor *arg1) {
|
||||
func_global_asm_80688370(arg0, 0, 1.0f);
|
||||
func_global_asm_8068842C(arg0, 0, -1);
|
||||
func_global_asm_80690058(arg0, 2);
|
||||
func_global_asm_8067B238(arg0, arg1, 0.15f);
|
||||
func_global_asm_8067B238(arg0, player, 0.15f);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@ -233,7 +232,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.974999999999999978) * (0.2 + (current_actor_pointer->unkB8 / 300.0));
|
||||
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_80770BC0[temp_a1] = 1.0f;
|
||||
}
|
||||
} else {
|
||||
@ -260,19 +259,19 @@ void func_global_asm_80690470(Actor *arg0) {
|
||||
PlayerAdditionalActorData *PaaD;
|
||||
RaceAdditionalActorData *RaaD;
|
||||
s32 pad;
|
||||
Actor *sp18;
|
||||
Actor *propeller;
|
||||
|
||||
PaaD = arg0->PaaD;
|
||||
spawnActor(ACTOR_PROPELLER, 0xDA);
|
||||
sp18 = last_spawned_actor;
|
||||
RaaD = sp18->RaaD;
|
||||
propeller = last_spawned_actor;
|
||||
RaaD = propeller->RaaD;
|
||||
RaaD->unk28 = PaaD->unk1A4;
|
||||
func_global_asm_80690094(sp18, arg0);
|
||||
func_global_asm_80690094(propeller, arg0);
|
||||
RaaD->unk35 = 0;
|
||||
RaaD->unk27 = 0;
|
||||
RaaD->unk0 = arg0->y_rotation;
|
||||
PaaD->vehicle_actor_pointer = sp18;
|
||||
sp18->object_properties_bitfield &= 0xFFFDFFFF;
|
||||
PaaD->vehicle_actor_pointer = propeller;
|
||||
propeller->object_properties_bitfield &= 0xFFFDFFFF;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@ -325,7 +324,7 @@ void func_global_asm_80690500(void) {
|
||||
if (func_global_asm_8061CB50() == 0 || (func_global_asm_8061CB50() != 0 && player_pointer->unk6A & 0x100)) {
|
||||
func_global_asm_80671C0C(current_actor_pointer, 1, &sp44, &sp40, &sp3C);
|
||||
func_global_asm_8065A708(sp44, sp40, sp3C, 0.0f, 0.0f, 0.0f, 300.0f, 0, 0xFF, 0xFF, 0xFF);
|
||||
if (isFlagSet(0x6B, 2) == 0) {
|
||||
if (isFlagSet(0x6B, FLAG_TYPE_TEMPORARY) == 0) {
|
||||
if (func_global_asm_8061CB50() != 0) {
|
||||
if (player_pointer->unk6A & 0x100) {
|
||||
func_global_asm_80671C0C(current_actor_pointer, 2, &sp44, &sp40, &sp3C);
|
||||
@ -363,7 +362,7 @@ void func_global_asm_8069084C(s16 arg0, s16 arg1, f32 arg2, s16 arg3, f32 arg4,
|
||||
s32 temp2;
|
||||
f32 sp28[6];
|
||||
|
||||
sp28[0] = (arg3 / 4095.0) * 6.28318548202514648;
|
||||
sp28[0] = (arg3 / 4095.0) * TWO_PI;
|
||||
sp28[1] = arg4;
|
||||
sp28[2] = arg5;
|
||||
sp28[3] = arg2;
|
||||
@ -456,10 +455,10 @@ void func_global_asm_806915B0(void) {
|
||||
|
||||
void func_global_asm_80661520(f32, f32, f32, f32, f32, f32);
|
||||
|
||||
void func_global_asm_80691830(s16 arg0, f32 arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9) {
|
||||
spawnActor(ACTOR_BOSS_SHOCKWAVE, arg0); // Spawn actor: Shockwave (boss)
|
||||
void func_global_asm_80691830(s16 modelIndex, f32 arg1, u8 arg2, u8 arg3, u8 arg4, u8 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9) {
|
||||
spawnActor(ACTOR_BOSS_SHOCKWAVE, modelIndex);
|
||||
func_global_asm_8067B238(last_spawned_actor, current_actor_pointer, arg1);
|
||||
last_spawned_actor->unkF0 = arg0;
|
||||
last_spawned_actor->unkF0 = modelIndex;
|
||||
last_spawned_actor->unk16A = arg2;
|
||||
last_spawned_actor->unk16B = arg3;
|
||||
last_spawned_actor->unk16C = arg4;
|
||||
|
@ -187,7 +187,7 @@ u8 func_global_asm_806FDB8C(s16, s32, s32, f32, f32, f32);
|
||||
void func_global_asm_8069D0F8(u8 arg0, s16 arg1, s16 arg2, void *arg3, u16 arg4, u16 arg5, u8 arg6, u8 arg7) {
|
||||
GlobalASMStruct_8069D0F8 *temp_s0;
|
||||
|
||||
if (spawnActor(ACTOR_TEXT_OVERLAY, 0) != 0) {
|
||||
if (spawnActor(ACTOR_TEXT_OVERLAY, 0)) {
|
||||
temp_s0 = last_spawned_actor->additional_actor_data;
|
||||
if (arg0 & 0x80) {
|
||||
temp_s0->unkA = func_global_asm_806FDB8C(arg0 & 0xff7f, arg3, 2, 160.0f, arg2, 0.0f);
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "functions.h"
|
||||
|
||||
|
||||
extern s32 D_global_asm_80720BE8;
|
||||
|
||||
extern f32 D_global_asm_80750394;
|
||||
@ -31,16 +30,16 @@ extern f64 D_global_asm_8075A540;
|
||||
extern s32 D_global_asm_807FBB68;
|
||||
extern u8 D_global_asm_807FBD70;
|
||||
|
||||
GlobalASMStruct60 *func_global_asm_80688584(Actor*, s32);
|
||||
extern s32 D_global_asm_80744478;
|
||||
extern u8 D_global_asm_80750AD4;
|
||||
|
||||
GlobalASMStruct60 *func_global_asm_80688584(Actor*, s32);
|
||||
void func_global_asm_8069FA40(void);
|
||||
void func_global_asm_806A5DF0(s16 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s16 arg5, s16 arg6, Actor *arg7);
|
||||
|
||||
// Jumptable
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_A2F10/func_global_asm_8069E210.s")
|
||||
|
||||
void func_global_asm_806A5DF0(s16 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4, s16 arg5, s16 arg6, Actor *arg7);
|
||||
|
||||
void func_global_asm_8069E490(u16 arg0, s16 arg1) {
|
||||
func_global_asm_806A5DF0(arg0, current_actor_pointer->x_position, current_actor_pointer->y_position, current_actor_pointer->z_position, 0, 0, arg1, current_actor_pointer);
|
||||
}
|
||||
@ -315,7 +314,7 @@ void func_global_asm_8069F020(void) {
|
||||
if (current_actor_pointer->animation_state->unk0->unk4 > 9.0f) {
|
||||
block_34:
|
||||
current_actor_pointer->control_state = 2;
|
||||
if ((current_actor_pointer->unk15F != 0) && (spawnActor(ACTOR_BOSS_SHOCKWAVE, current_actor_pointer->unkF0) != 0)) {
|
||||
if ((current_actor_pointer->unk15F != 0) && (spawnActor(ACTOR_BOSS_SHOCKWAVE, current_actor_pointer->unkF0))) {
|
||||
if (current_actor_pointer->animation_state->unk0->unk4 > 9.0f) {
|
||||
func_global_asm_80613C48(last_spawned_actor, 0x4F9, 0.0f, 0.0f);
|
||||
func_global_asm_80614D00(last_spawned_actor, current_actor_pointer->animation_state->unk48, 0);
|
||||
|
@ -13,7 +13,7 @@ typedef struct {
|
||||
} AAD_global_asm_806A2A10;
|
||||
|
||||
void func_global_asm_806A2A10(s16 arg0, s16 arg1, u8 arg2) {
|
||||
spawnActor(ACTOR_TIMER_CONTROLLER, 0); // spawnActorWrapper(ACTOR_TIMER_CONTROLLER)
|
||||
spawnActor(ACTOR_TIMER_CONTROLLER, 0);
|
||||
if ((arg0 & 0x8000) != 0) {
|
||||
last_spawned_actor->unk15F = 0xB;
|
||||
arg2--;
|
||||
|
@ -664,7 +664,7 @@ void func_global_asm_806AC048(s32 arg0, s32 arg1) {
|
||||
#pragma GLOBAL_ASM("asm/nonmatchings/global_asm/code_ACDC0/func_global_asm_806ACA88.s")
|
||||
|
||||
void func_global_asm_806ACC00(u8 arg0) {
|
||||
spawnActor(ACTOR_TRY_AGAIN_DIALOG, 0); // Spawn actor: Try Again Dialog
|
||||
spawnActor(ACTOR_TRY_AGAIN_DIALOG, 0);
|
||||
last_spawned_actor->unk15F = arg0;
|
||||
last_spawned_actor->unk64 |= 2;
|
||||
global_properties_bitfield |= 0x40001;
|
||||
|
@ -160,7 +160,7 @@ void func_global_asm_806AD84C(void) {
|
||||
}
|
||||
|
||||
void func_global_asm_806AD9AC(void) {
|
||||
spawnActor(ACTOR_SILK, 0xC0); // Spawn actor: Spider Silk String (miniboss)
|
||||
spawnActor(ACTOR_SILK, 0xC0);
|
||||
last_spawned_actor->unk11C = current_actor_pointer;
|
||||
last_spawned_actor->draw_distance = 2000;
|
||||
}
|
||||
|
@ -56,12 +56,12 @@ void func_global_asm_806ADFE0(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_global_asm_806AE2B0(s32 arg0, s16 arg1, s16 arg2, s16 arg3) {
|
||||
void func_global_asm_806AE2B0(s32 modelIndex, s16 arg1, s16 arg2, s16 arg3) {
|
||||
f32 sp2C;
|
||||
f32 sp28;
|
||||
f32 sp24;
|
||||
|
||||
if (spawnActor(ACTOR_KROSSBONES_HEAD, arg0)) { // Spawn actor: Unknown 237
|
||||
if (spawnActor(ACTOR_KROSSBONES_HEAD, modelIndex)) {
|
||||
func_global_asm_80671C0C(current_actor_pointer, arg2, &sp2C, &sp28, &sp24);
|
||||
last_spawned_actor->floor = current_actor_pointer->floor;
|
||||
last_spawned_actor->y_rotation = current_actor_pointer->y_rotation + arg1;
|
||||
|
@ -102,22 +102,23 @@ void func_global_asm_806B6958(void) {
|
||||
}
|
||||
|
||||
void func_global_asm_806B6C88(s16 arg0, s16 arg1) {
|
||||
if (spawnActor(ACTOR_KLAPTRAP_SKELETON, 0x24)) { // Spawn actor: Klaptrap (Skeleton)
|
||||
if (spawnActor(ACTOR_KLAPTRAP_SKELETON, 0x24)) {
|
||||
last_spawned_actor->control_state = 0x23;
|
||||
func_global_asm_80614EBC(last_spawned_actor, 0x237);
|
||||
last_spawned_actor->y_rotation = arg1;
|
||||
last_spawned_actor->unkEE = last_spawned_actor->y_rotation;
|
||||
func_global_asm_8067B238(last_spawned_actor,
|
||||
current_actor_pointer,
|
||||
current_actor_pointer->animation_state->scale_y);
|
||||
func_global_asm_8067B238(
|
||||
last_spawned_actor,
|
||||
current_actor_pointer,
|
||||
current_actor_pointer->animation_state->scale_y
|
||||
);
|
||||
last_spawned_actor->floor = current_actor_pointer->floor;
|
||||
last_spawned_actor->y_acceleration = D_global_asm_807502E8;
|
||||
last_spawned_actor->terminal_velocity = D_global_asm_807502E0;
|
||||
last_spawned_actor->unkB8 = 0.0f;
|
||||
func_global_asm_8072B324(current_actor_pointer, arg0 * 1.25);
|
||||
// TODO: Which aaD type are they actually expecting here?
|
||||
memcpy(last_spawned_actor->PaaD,
|
||||
current_actor_pointer->PaaD,
|
||||
memcpy(last_spawned_actor->additional_actor_data,
|
||||
current_actor_pointer->additional_actor_data,
|
||||
0x3C);
|
||||
}
|
||||
}
|
||||
|
@ -72,13 +72,13 @@ s32 func_global_asm_806C7B34(void) {
|
||||
return D_global_asm_8075C410[current_character_index[0]].unk0;
|
||||
}
|
||||
|
||||
void func_global_asm_806C7B50(u32 arg0, u8 arg1, Actor *arg2) {
|
||||
void func_global_asm_806C7B50(Actors actorIndex, u8 arg1, Actor *player) {
|
||||
AppleAAD *temp_v0;
|
||||
|
||||
spawnActor(arg0, 0x82); // Spawn actor: Apple (Fungi)
|
||||
func_global_asm_8067B238(last_spawned_actor, arg2, 0.15f);
|
||||
spawnActor(actorIndex, 0x82);
|
||||
func_global_asm_8067B238(last_spawned_actor, player, 0.15f);
|
||||
temp_v0 = last_spawned_actor->PaaD;
|
||||
temp_v0->unk4 = arg2;
|
||||
temp_v0->unk4 = player;
|
||||
temp_v0->unk8 = arg1;
|
||||
}
|
||||
|
||||
@ -316,7 +316,7 @@ void func_global_asm_806C8984(void) {
|
||||
extra_player_info_pointer->vehicle_actor_pointer = last_spawned_actor;
|
||||
break;
|
||||
case MAP_JAPES_MINECART:
|
||||
func_global_asm_806C7B50(0x1D, 0, current_player);
|
||||
func_global_asm_806C7B50(ACTOR_MINECART, 0, current_player);
|
||||
break;
|
||||
case MAP_BATTY_BARREL_BANDIT_EASY:
|
||||
case MAP_BATTY_BARREL_BANDIT_EASY_2:
|
||||
@ -360,7 +360,6 @@ void func_global_asm_806C8984(void) {
|
||||
break;
|
||||
case MAP_GALLEON_PUFFTOSS:
|
||||
func_global_asm_80690470(current_player);
|
||||
// fallthrough
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -281,7 +281,6 @@ extern f32 D_global_asm_807FD888;
|
||||
|
||||
extern void func_global_asm_8068E474(void);
|
||||
void func_global_asm_8061C2F0(Actor *, f32, f32, f32, f32, f32, f32, s32);
|
||||
void func_global_asm_8061C6A8(Actor *, Actor *, s32, s32, s32, s32, s32, s32, s32, s32, f32);
|
||||
|
||||
void func_global_asm_8062217C(Actor*, u8);
|
||||
|
||||
@ -2565,7 +2564,7 @@ void func_global_asm_806D2AA0(s16 arg0) {
|
||||
current_actor_pointer->control_state_progress = 0;
|
||||
}
|
||||
if (current_actor_pointer->control_state_progress == 2) {
|
||||
spawnActor(ACTOR_PICTURE, 0x8D); // Spawn fairy picture actor (202)
|
||||
spawnActor(ACTOR_PICTURE, 0x8D);
|
||||
extra_player_info_pointer->vehicle_actor_pointer = last_spawned_actor;
|
||||
last_spawned_actor->PaaD->unk0 = extra_player_info_pointer;
|
||||
extra_player_info_pointer->unk1F0 |= 0x8000;
|
||||
@ -5213,7 +5212,7 @@ void func_global_asm_806DECD4(void) {
|
||||
}
|
||||
|
||||
void func_global_asm_806DED44(void) {
|
||||
BoulderAAD *temp_s0_3;
|
||||
BoulderAAD *aaD;
|
||||
s8 phi_a1;
|
||||
s32 i;
|
||||
|
||||
@ -5232,7 +5231,7 @@ void func_global_asm_806DED44(void) {
|
||||
break;
|
||||
case 1:
|
||||
global_properties_bitfield &= 0xFFFEFFCF;
|
||||
spawnActor(ACTOR_FAIRY_REFILL, 0x3D); // Spawn fairy (refill) actor 321
|
||||
spawnActor(ACTOR_FAIRY_REFILL, 0x3D);
|
||||
func_global_asm_8067B238(last_spawned_actor,
|
||||
current_actor_pointer,
|
||||
current_actor_pointer->animation_state->scale_y * 2);
|
||||
@ -5241,23 +5240,23 @@ void func_global_asm_806DED44(void) {
|
||||
last_spawned_actor->y_rotation &= 0xFFF;
|
||||
last_spawned_actor->unk11C = current_actor_pointer;
|
||||
func_global_asm_80614EBC(last_spawned_actor, 0x2B7);
|
||||
temp_s0_3 = last_spawned_actor->additional_data_pointer;
|
||||
temp_s0_3->unk10 = current_actor_pointer;
|
||||
temp_s0_3->unk18 = current_actor_pointer->unk12C;
|
||||
if (temp_s0_3->unk18 == -1) {
|
||||
temp_s0_3->unk18 = 0;
|
||||
aaD = last_spawned_actor->additional_data_pointer;
|
||||
aaD->unk10 = current_actor_pointer;
|
||||
aaD->unk18 = current_actor_pointer->unk12C;
|
||||
if (aaD->unk18 == -1) {
|
||||
aaD->unk18 = 0;
|
||||
}
|
||||
temp_s0_3->unk16 = current_actor_pointer->z_rotation;
|
||||
temp_s0_3->unk14 = current_actor_pointer->x_rotation;
|
||||
func_global_asm_80659620(temp_s0_3, &temp_s0_3->unk4, &temp_s0_3->unk8, temp_s0_3->unk18);
|
||||
func_global_asm_80659670(1.0f, 1.0f, 1.0f, temp_s0_3->unk18);
|
||||
spawnActor(ACTOR_SPOTLIGHT, 0xA8); // Spawn spotlight actor 310
|
||||
aaD->unk16 = current_actor_pointer->z_rotation;
|
||||
aaD->unk14 = current_actor_pointer->x_rotation;
|
||||
func_global_asm_80659620(aaD, &aaD->unk4, &aaD->unk8, aaD->unk18);
|
||||
func_global_asm_80659670(1.0f, 1.0f, 1.0f, aaD->unk18);
|
||||
spawnActor(ACTOR_SPOTLIGHT, 0xA8);
|
||||
func_global_asm_8067B238(last_spawned_actor,
|
||||
current_actor_pointer,
|
||||
current_actor_pointer->animation_state->scale_x);
|
||||
last_spawned_actor->object_properties_bitfield |= 0x40000000;
|
||||
temp_s0_3->unkC = last_spawned_actor;
|
||||
temp_s0_3->unk1E = func_global_asm_806F8EB4() == 20; // Have all fairies been photographed?
|
||||
aaD->unkC = last_spawned_actor;
|
||||
aaD->unk1E = func_global_asm_806F8EB4() == 20; // Have all fairies been photographed?
|
||||
current_actor_pointer->control_state_progress = 2;
|
||||
break;
|
||||
case 2:
|
||||
|
@ -1109,9 +1109,9 @@ void func_global_asm_806EFA3C(void) {
|
||||
|
||||
sp24 = D_global_asm_8075D380;
|
||||
scale = current_player->animation_state->scale_x;
|
||||
spawnActor(ACTOR_POTION, 0xB9); // Spawn potion actor 320
|
||||
spawnActor(ACTOR_POTION, 0xB9);
|
||||
if (current_player->unk58 == ACTOR_DK) {
|
||||
scale = scale * 1.25;
|
||||
scale *= 1.25;
|
||||
}
|
||||
func_global_asm_8067B238(last_spawned_actor, current_player, scale);
|
||||
func_global_asm_80614EBC(last_spawned_actor, sp24.unk0[current_character_index[extra_player_info_pointer->unk1A4]]);
|
||||
@ -1132,10 +1132,12 @@ void func_global_asm_806EFB4C(void) {
|
||||
if (current_player->unkFC) {
|
||||
current_player->y_rotation = func_global_asm_80672A70(current_player->unkF4, current_player->unkF6);
|
||||
} else {
|
||||
current_player->y_rotation = func_global_asm_80665DE0(character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position);
|
||||
current_player->y_rotation = func_global_asm_80665DE0(
|
||||
character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position
|
||||
);
|
||||
}
|
||||
func_global_asm_80627948(current_player, 0x15, 0x1F, 5);
|
||||
}
|
||||
@ -1149,10 +1151,12 @@ void func_global_asm_806EFC38(void) {
|
||||
current_player->control_state = 0x71;
|
||||
current_player->control_state_progress = 0;
|
||||
}
|
||||
current_player->y_rotation = func_global_asm_80665DE0(character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position);
|
||||
current_player->y_rotation = func_global_asm_80665DE0(
|
||||
character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position
|
||||
);
|
||||
if (current_map == MAP_JAPES_ARMY_DILLO) {
|
||||
playCutscene(current_player, 2, 1);
|
||||
current_player->control_state_progress = 0xFF;
|
||||
@ -1169,10 +1173,12 @@ void func_global_asm_806EFD50(void) {
|
||||
func_global_asm_80614E78(current_player, 0x5B);
|
||||
current_player->control_state = 0x72;
|
||||
current_player->control_state_progress = 0;
|
||||
current_player->y_rotation = func_global_asm_80665DE0(character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position);
|
||||
current_player->y_rotation = func_global_asm_80665DE0(
|
||||
character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position
|
||||
);
|
||||
playCutscene(current_player, 0x15, 5);
|
||||
}
|
||||
|
||||
@ -1194,10 +1200,12 @@ void func_global_asm_806EFDFC(void) {
|
||||
current_player->control_state_progress = 0;
|
||||
vehicle = extra_player_info_pointer->vehicle_actor_pointer;
|
||||
if (!vehicle || vehicle->unk58 != ACTOR_MINECART_BONUS) {
|
||||
current_player->y_rotation = func_global_asm_80665DE0(character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position);
|
||||
current_player->y_rotation = func_global_asm_80665DE0(
|
||||
character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position
|
||||
);
|
||||
}
|
||||
current_player->y_velocity = 0.0f;
|
||||
extra_player_info_pointer->unk23C = 0x5A;
|
||||
@ -1222,10 +1230,12 @@ void func_global_asm_806EFF34(void) {
|
||||
current_player->control_state_progress = 0;
|
||||
vehicle = extra_player_info_pointer->vehicle_actor_pointer;
|
||||
if (!vehicle || vehicle->unk58 != ACTOR_MINECART_BONUS) {
|
||||
current_player->y_rotation = func_global_asm_80665DE0(character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position);
|
||||
current_player->y_rotation = func_global_asm_80665DE0(
|
||||
character_change_array[cc_player_index].look_at_eye_x,
|
||||
character_change_array[cc_player_index].look_at_eye_z,
|
||||
current_player->x_position,
|
||||
current_player->z_position
|
||||
);
|
||||
}
|
||||
current_player->y_velocity = 0.0f;
|
||||
extra_player_info_pointer->unk23C = 0x5A;
|
||||
@ -1289,7 +1299,7 @@ void func_global_asm_806F027C(void) {
|
||||
current_player->control_state = 0x7C;
|
||||
current_player->control_state_progress = 0;
|
||||
func_global_asm_80614EBC(current_player, 0x13);
|
||||
spawnActor(ACTOR_TRAP_BUBBLE, 0xC5); // Spawn trap bubble (spider miniboss) actor 279
|
||||
spawnActor(ACTOR_TRAP_BUBBLE, 0xC5);
|
||||
last_spawned_actor->unk11C = current_player;
|
||||
func_global_asm_806C8D20(current_player);
|
||||
}
|
||||
@ -1300,7 +1310,7 @@ void func_global_asm_806F0344(void) {
|
||||
current_player->control_state = 0x7D;
|
||||
current_player->control_state_progress = 0;
|
||||
current_player->object_properties_bitfield &= ~4;
|
||||
spawnActor(ACTOR_MINIGAME_BOTHER_KLAPTRAP, 0x21); // Spawn actor (beaver bother?)
|
||||
spawnActor(ACTOR_MINIGAME_BOTHER_KLAPTRAP, 0x21);
|
||||
func_global_asm_80614EBC(last_spawned_actor, 0x232);
|
||||
last_spawned_actor->unk11C = current_player;
|
||||
}
|
||||
|
@ -91,7 +91,6 @@ void func_minecart_80024254(Struct80024254_arg0 *arg0) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_global_asm_8061C6A8(Actor *, Actor *, s32, s32, s32, s32, s32, s32, s32, s32, f32);
|
||||
void func_global_asm_8072177C(Actor *, s16, s16, s16, s32, s32, s32, s32, s32);
|
||||
void func_minecart_800253C0(void *, s16, u8);
|
||||
extern s16 D_global_asm_80750AC4;
|
||||
|
@ -261,7 +261,7 @@ typedef struct {
|
||||
Actor *unk34;
|
||||
} Actor17C_race_80025E9C;
|
||||
|
||||
void func_race_8002BBD0(Actor *arg0, s32 arg1);
|
||||
void func_race_8002BBD0(Actor *arg0, s32 numRacers);
|
||||
void func_race_8002BC2C(Actor *arg0, s32 arg1, Actor *arg2, void *arg3);
|
||||
|
||||
/*
|
||||
|
@ -79,7 +79,7 @@ typedef struct {
|
||||
} A17C_initializeCastleCarRace;
|
||||
|
||||
void func_race_800283D4(f32 arg0);
|
||||
void func_race_8002BBD0(Actor *arg0, s32 arg1);
|
||||
void func_race_8002BBD0(Actor *arg0, s32 numRacers);
|
||||
void func_race_8002BC2C(Actor *arg0, s32 arg1, Actor *arg2, void *arg3);
|
||||
void func_race_8002BCB0(Actor *arg0, s32 arg1, s32 *arg2, s32 *arg3);
|
||||
f32 func_race_8002D2C0(void *arg0);
|
||||
@ -89,8 +89,6 @@ void func_race_8002DE78(void *, s32, void *, s32);
|
||||
s32 func_race_8002E8EC(void *arg0, void *arg1, s32 arg2);
|
||||
void initializeSealRace(void);
|
||||
|
||||
void func_global_asm_8061C6A8(Actor *, Actor *, s32, s32, s32, s32, s32, s32, s32, s32, f32);
|
||||
|
||||
void func_global_asm_80690190(void *arg0, s32 arg1);
|
||||
void func_global_asm_8068F72C(s32, s32, s32, s32);
|
||||
void func_global_asm_8068FF40(s32, s32, s32);
|
||||
@ -113,15 +111,15 @@ void func_race_800292D0(Actor *arg0) {
|
||||
A17C_initializeCastleCarRace *temp_a2;
|
||||
s32 var_s1;
|
||||
s32 playerIndex;
|
||||
s32 var_s5;
|
||||
s32 numRacers;
|
||||
|
||||
var_s5 = cc_number_of_players;
|
||||
numRacers = cc_number_of_players;
|
||||
var_s1 = 0;
|
||||
aaD = arg0->additional_actor_data;
|
||||
if (var_s5 == 1) {
|
||||
var_s5++;
|
||||
if (numRacers == 1) {
|
||||
numRacers++;
|
||||
}
|
||||
func_race_8002BBD0(arg0, var_s5);
|
||||
func_race_8002BBD0(arg0, numRacers);
|
||||
for (playerIndex = 0; playerIndex < cc_number_of_players; playerIndex++) {
|
||||
spawnActor(ACTOR_UNKNOWN_307, 0x9F);
|
||||
sp54 = last_spawned_actor;
|
||||
@ -142,7 +140,7 @@ void func_race_800292D0(Actor *arg0) {
|
||||
} else {
|
||||
aaD->unk25 = 0;
|
||||
}
|
||||
for (playerIndex = 0; playerIndex < var_s5; playerIndex++) {
|
||||
for (playerIndex = 0; playerIndex < numRacers; playerIndex++) {
|
||||
func_race_8002BCB0(arg0, playerIndex, &sp54, &sp58);
|
||||
sp58->unk36 = playerIndex;
|
||||
sp58->unk30 = arg0;
|
||||
@ -282,15 +280,15 @@ void initializeCastleCarRace(Actor *arg0) {
|
||||
A17C_initializeCastleCarRace *temp_a2;
|
||||
s32 var_s1;
|
||||
s32 playerIndex;
|
||||
s32 var_s5;
|
||||
s32 numRacers;
|
||||
|
||||
var_s5 = cc_number_of_players;
|
||||
numRacers = cc_number_of_players;
|
||||
var_s1 = 0;
|
||||
aaD = arg0->additional_actor_data;
|
||||
if (var_s5 == 1) {
|
||||
var_s5++;
|
||||
if (numRacers == 1) {
|
||||
numRacers++;
|
||||
}
|
||||
func_race_8002BBD0(arg0, var_s5);
|
||||
func_race_8002BBD0(arg0, numRacers);
|
||||
for (playerIndex = 0; playerIndex < cc_number_of_players; playerIndex++) {
|
||||
spawnActor(ACTOR_CAR_CASTLE_PLAYER, 0x95);
|
||||
sp54 = last_spawned_actor;
|
||||
@ -311,7 +309,7 @@ void initializeCastleCarRace(Actor *arg0) {
|
||||
} else {
|
||||
aaD->unk25 = 0;
|
||||
}
|
||||
for (playerIndex = 0; playerIndex < var_s5; playerIndex++) {
|
||||
for (playerIndex = 0; playerIndex < numRacers; playerIndex++) {
|
||||
func_race_8002BCB0(arg0, playerIndex, &sp54, &sp58);
|
||||
sp58->unk36 = playerIndex;
|
||||
sp58->unk30 = arg0;
|
||||
|
@ -13,15 +13,15 @@ D_race_80030110 .double 0.15
|
||||
void func_race_8002E2C8(Actor *arg0);
|
||||
void func_race_80025E9C(Actor *);
|
||||
|
||||
void func_race_8002BBD0(Actor *arg0, s32 arg1) {
|
||||
void func_race_8002BBD0(Actor *arg0, s32 numRacers) {
|
||||
RaceAdditionalActorData *sp1C;
|
||||
RaaD_unk20 *temp_v0;
|
||||
|
||||
sp1C = arg0->RaaD;
|
||||
temp_v0 = malloc(arg1 * sizeof(RaaD_unk20));
|
||||
temp_v0 = malloc(numRacers * sizeof(RaaD_unk20));
|
||||
sp1C->unk20 = temp_v0;
|
||||
func_global_asm_80611690(temp_v0);
|
||||
sp1C->unk1E = arg1;
|
||||
sp1C->unk1E = numRacers;
|
||||
sp1C->unk1C = -1;
|
||||
arg0->control_state = 0;
|
||||
}
|
||||
@ -260,7 +260,7 @@ void func_race_8002CFF0(void) {
|
||||
TempAAD *temp_v0;
|
||||
Actor *temp_a0;
|
||||
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0); // Spawn actor 306
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0);
|
||||
temp_a0 = last_spawned_actor;
|
||||
func_race_80025E9C(temp_a0);
|
||||
func_race_8002BCD4(temp_a0);
|
||||
@ -276,7 +276,7 @@ void func_race_8002CFF0(void) {
|
||||
void castleCarRaceSetup(void) {
|
||||
RaceAdditionalActorData2 *RaaD;
|
||||
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0); // Spawn actor 306
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0);
|
||||
RaaD = last_spawned_actor->RaaD2;
|
||||
initializeCastleCarRace(last_spawned_actor);
|
||||
RaaD->unk0 = 0xE;
|
||||
@ -286,7 +286,7 @@ void castleCarRaceSetup(void) {
|
||||
void initializeSealRace(void) {
|
||||
RaceAdditionalActorData2 *RaaD;
|
||||
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0); // Spawn actor 306
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0);
|
||||
RaaD = last_spawned_actor->RaaD2;
|
||||
func_race_800292D0(last_spawned_actor);
|
||||
RaaD->unk0 = 0xE;
|
||||
@ -296,7 +296,7 @@ void initializeSealRace(void) {
|
||||
void func_race_8002D0FC(void) {
|
||||
RaceAdditionalActorData2 *RaaD;
|
||||
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0); // Spawn actor 306
|
||||
spawnActor(ACTOR_UNKNOWN_306, 0);
|
||||
RaaD = last_spawned_actor->RaaD2;
|
||||
func_race_8002E2C8(last_spawned_actor);
|
||||
RaaD->unk0 = 2;
|
||||
@ -720,15 +720,15 @@ void func_race_8002E2C8(Actor *arg0) {
|
||||
Actor17C *temp_a2;
|
||||
s32 var_s1;
|
||||
s32 i;
|
||||
s32 var_s4;
|
||||
s32 numRacers;
|
||||
|
||||
var_s4 = cc_number_of_players;
|
||||
numRacers = cc_number_of_players;
|
||||
var_s1 = 0;
|
||||
sp5C = arg0->additional_actor_data;
|
||||
if (var_s4 == 1) {
|
||||
var_s4++;
|
||||
if (numRacers == 1) {
|
||||
numRacers++;
|
||||
}
|
||||
func_race_8002BBD0(arg0, var_s4);
|
||||
func_race_8002BBD0(arg0, numRacers);
|
||||
if (cc_number_of_players == 1) {
|
||||
sp54 = func_global_asm_807271F4(1, 0, 0, 0, 0, 0, 0);
|
||||
sp58 = sp54->unk178;
|
||||
@ -750,7 +750,7 @@ void func_race_8002E2C8(Actor *arg0) {
|
||||
var_s1 += 1;
|
||||
sp58->unk28 = i;
|
||||
}
|
||||
for (i = 0; i < var_s4; i++) {
|
||||
for (i = 0; i < numRacers; i++) {
|
||||
func_race_8002BCB0(arg0, i, &sp54, &sp58);
|
||||
sp58->unk36 = i;
|
||||
sp58->unk30 = arg0;
|
||||
@ -888,7 +888,7 @@ void func_race_8002E644(A17C_race_8002B964 *arg0) {
|
||||
sp50 = ((temp_f2_2 - sp50) * sp40) + temp_f2_2;
|
||||
actor->unkB8 = sqrtf((sp54 * sp54) + (sp50 * sp50));
|
||||
|
||||
actor->unkEE = (func_global_asm_80611BB4(sp54, sp50) * 4096.0) / 6.28318548202514648;
|
||||
actor->unkEE = (func_global_asm_80611BB4(sp54, sp50) * 4096.0) / TWO_PI;
|
||||
actor->unkEE += sp46;
|
||||
actor->unkEE &= 0xFFF;
|
||||
|
||||
|
@ -191,10 +191,10 @@ void func_race_8002ED04(f32 arg0, s32 arg1, u8 arg2) {
|
||||
switch (arg1) {
|
||||
case 1:
|
||||
if (arg2) {
|
||||
spawnActor(ACTOR_RACE_CHECKPOINT_0, 0xB0); // Spawn checkpoint (actor 311)
|
||||
spawnActor(ACTOR_RACE_CHECKPOINT_0, 0xB0);
|
||||
func_global_asm_80614EBC(last_spawned_actor, 0x2A9);
|
||||
} else {
|
||||
spawnActor(ACTOR_RACE_CHECKPOINT_0, 0xB1); // Spawn checkpoint (actor 311)
|
||||
spawnActor(ACTOR_RACE_CHECKPOINT_0, 0xB1);
|
||||
func_global_asm_80614EBC(last_spawned_actor, 0x2AA);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user