Match the rest of actors.h (#254)

* Matched rest of actors and more

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-09-08 19:19:53 -04:00
committed by GitHub
parent df9ad2d23b
commit 2c57c81f3a
60 changed files with 2658 additions and 10700 deletions
+1288 -2294
View File
File diff suppressed because it is too large Load Diff
+179 -109
View File
@@ -4,11 +4,12 @@
#include "types.h"
#include "actor_types.h"
void func_80296D10(struct Actor *, f32 *, s16 *, f32 *, s32);
void func_80296A50(struct ShellActor*);
void func_80296D10(struct Actor*, f32*, s16*, f32*, s16);
void func_80297230(Camera*, struct Actor*);
void func_802972B8(Camera*, struct Actor*);
void func_80297340(Camera*);
void func_80297524(intptr_t, s32, s32);
void func_80297524(uintptr_t, s32, s32);
void func_802976D8(Vec3s);
void func_802976EC(UnkActorInner*, Vec3s);
void func_80297760(struct Actor*, Vec3f);
@@ -70,18 +71,21 @@ void place_palm_trees(struct ActorSpawnData*);
void func_8029CF0C(struct ActorSpawnData*, struct FallingRock*);
void place_falling_rocks(struct ActorSpawnData*);
void update_obj_falling_rocks(struct FallingRock*);
void place_segment_06(struct ActorSpawnData*);
void place_all_item_boxes(struct ActorSpawnData*);
void init_kiwano_fruit();
void destroy_all_actors();
void func_8029DB44();
void func_8029E7DC(struct Actor*);
void destroy_actor(struct Actor*);
s16 func_8029E890(f32 *, s16 *, f32 *, s16);
s16 func_8029E890(f32*, s16*, f32*, s16);
s16 func_8029EC88(Vec3f, Vec3s, Vec3f, s16);
s16 func_8029ED38(Vec3f, s16);
s32 func_8029EEB8(Player*, Vec3f, f32, f32, f32);
s32 func_8029F1F8(Player*, struct Actor*);
s32 func_8029F2FC(Player*, struct PiranhaPlant*);
s32 func_8029F408(Player*, struct YoshiValleyEgg*);
s32 func_8029F69C(Player*, struct Actor*);
s32 func_8029FB80(Player*, struct Actor*);
s32 func_8029FCA4(struct Actor*, struct Actor*);
void func_8029FDC8(struct Actor*);
@@ -95,8 +99,8 @@ void update_obj_fake_item_box(struct FakeItemBox*);
void func_802A14BC(f32, f32, f32);
void update_obj_item_box_hot_air_balloon(struct ItemBox*);
void update_obj_item_box(struct ItemBox*);
void func_802A171C(Camera*, struct Actor*);
void func_802A1EA0(Camera*, struct Actor*);
void func_802A171C(Camera*, struct FakeItemBox*);
void func_802A1EA0(Camera*, struct ItemBox*);
void func_802A269C(Camera*, struct Actor*);
void func_802A27A0(Camera*, Mat4, struct YoshiValleyEgg*, u16);
void func_802A29BC(Camera*, Mat4, struct Actor*);
@@ -113,6 +117,8 @@ extern void func_800C90F4(u8, uintptr_t);
extern void func_800C99E0(Vec3f, s32);
extern void func_800C9D80(Vec3f, Vec3f, u32);
extern Vec3f D_802B91C8;
extern s32 D_802BA050;
extern s32 D_802BA054;
extern s32 D_802BA058;
@@ -120,10 +126,13 @@ extern struct Actor *D_802BA05C;
extern s8 D_802BA060[512]; // tlut 256
extern u16 D_802BA260;
extern s32 gPlayerCountSelection1;
extern struct Actor gActorList[];
extern Player gPlayers[];
extern u16 gNumActors;
extern u16 gNumPermanentActors;
extern u16 D_8015F6FE; // Shell count? But why does actor type 2 (some kind of shrub?) increase it and not blue shells?
extern u16 D_802BA260; // Box Truck sub-type?
extern Player *gPlayerOne;
extern struct Controller gControllers[];
@@ -141,82 +150,53 @@ extern f32 D_80150130[];
extern u16 D_801637B8[];
extern Lights1 D_800DC610[];
extern u16 D_80150112;
extern u16 D_8015F700;
extern u16 D_8015F702;
extern f32 D_8015F704;
extern Vec3f D_8015F708;
extern f32 D_8015F8E4;
extern f32 gCourseDirection;
extern uintptr_t gSegmentTable[];
extern s16 gPlaceItemBoxes;
extern f32 D_802B95F8;
extern f32 D_802B9624;
extern f32 D_802B9628;
extern f32 D_802B964C;
extern f32 D_802B9658;
extern f32 D_802B965C;
extern f32 D_802B9660;
extern f32 D_802B9664;
extern f32 D_802B9668;
extern f32 D_802B966C;
extern f32 D_802B9670;
extern f32 D_802B9674;
extern f32 D_802B9678;
extern f32 D_802B967C;
extern f32 D_802B9680;
extern f32 D_802B9684;
extern f32 D_802B9688;
extern f32 D_802B968C;
extern f32 D_802B9690;
extern f32 D_802B9694;
extern f32 D_802B9698;
extern f32 D_802B969C;
extern f32 D_802B96A0;
extern f32 D_802B96A4;
extern f32 D_802B96A8;
extern f32 D_802B96AC;
extern f32 D_802B96B0;
extern f32 D_802B96B4;
extern f32 D_802B96B4;
extern f32 D_802B96DC;
extern f32 D_802B96E0;
extern f32 D_802B96E4;
extern f32 D_802B96E8;
extern f32 D_802B96EC;
extern f32 D_802B96F0;
extern f32 D_802B96F4;
extern f32 D_802B96F8;
extern f32 D_802B96FC;
extern f32 D_802B9700;
extern f32 D_802B9704;
extern f32 D_802B9708;
extern f32 D_802B970C;
extern f32 D_802B9710;
extern f32 D_802B9714;
extern f32 D_802B9718;
extern f32 D_802B971C;
extern f32 D_802B9720;// = 9e6.0f;
extern f32 D_802B9724;// = 122500.0f;
extern f32 D_802B9728;// = 640000.0f;
extern f32 D_802B972C;// = 1440000.0f;
extern f32 D_802B9730;
extern f32 D_802B9734;
extern f32 D_802B9738;
extern f32 D_802B973C;
extern f32 D_802B9740;
extern f32 D_802B9744;
extern f32 D_802B9748;
extern f32 D_802B974C;
extern f32 D_802B9750; // static = 4000000.0f;
extern f32 D_802B9754; // static = 250000.0f;
extern f32 D_802B98AC;
extern f32 D_802B98B0;
extern f32 D_802B99CC;
extern f32 D_802B99D0;
extern f32 D_802B99D4;
extern f32 D_802B99D8;
extern f32 D_802B99DC;
extern f32 D_802B9A28;
extern f32 D_802B9A2C;
extern struct ActorSpawnData D_06000028[];
extern struct ActorSpawnData D_06000038[];
extern struct ActorSpawnData D_06000058[];
extern struct ActorSpawnData D_06000080[];
extern struct ActorSpawnData D_06007230[];
extern struct ActorSpawnData D_06007250[];
extern struct ActorSpawnData D_06007718[];
extern struct ActorSpawnData D_06007810[];
extern struct ActorSpawnData D_06009290[];
extern struct ActorSpawnData D_06009370[];
extern struct ActorSpawnData D_06009498[];
extern struct ActorSpawnData D_06009518[];
extern struct ActorSpawnData D_06009570[];
extern struct ActorSpawnData D_06009B80[];
extern struct ActorSpawnData D_0600B3D0[];
extern struct ActorSpawnData D_0600CB40[];
extern struct ActorSpawnData D_0600D9F0[];
extern struct ActorSpawnData D_0600DA78[];
extern struct ActorSpawnData D_0600DB80[];
extern struct ActorSpawnData D_0600FDE8[];
extern struct ActorSpawnData D_0600FE80[];
extern struct ActorSpawnData D_06013EC0[];
extern struct ActorSpawnData D_06014200[];
extern struct ActorSpawnData D_06014330[];
extern struct ActorSpawnData D_060143E0[];
extern struct ActorSpawnData D_06016338[];
extern struct ActorSpawnData D_060180A0[];
extern struct ActorSpawnData D_06018110[];
extern struct ActorSpawnData D_06018E78[];
extern struct ActorSpawnData D_06018F70[];
extern struct ActorSpawnData D_06022E88[];
extern struct ActorSpawnData D_06022F08[];
extern struct ActorSpawnData D_06023AE0[];
extern f64 D_802B9610;
extern struct UnkActorSpawnData D_06013F78[];
extern Gfx D_06006A68[];
extern Gfx D_06006F88[];
@@ -254,7 +234,7 @@ extern Gfx D_06022D70[];
extern Gfx D_06022DB8[];
extern Gfx D_06022DB8[];
extern Gfx D_0D004C68[];
extern s8 D_0D004C68[];
extern Gfx D_0D005338[];
extern Gfx D_0D005368[];
extern Gfx D_0D007B20[];
@@ -287,44 +267,134 @@ extern s32 D_801625F4;
extern s32 D_80162DF8;
extern s32 D_802BA058;
extern s8 D_06006990[];
extern s8 D_06009330[];
extern s8 D_0600CA60[];
extern s8 D_0600D850[];
extern s8 D_0600E058[];
extern s8 D_0600E730[];
extern s8 D_0600FC28[];
extern s8 D_06010AE8[];
extern s8 D_06010C10[];
extern s8 D_06010D38[];
extern s8 D_06013C00[];
extern s8 D_06013CA0[];
extern s8 D_06013D20[];
extern s8 D_06013DA0[];
extern s8 D_06013E20[];
extern s8 D_06013F78[];
extern s8 D_06016D70[];
extern s8 D_06017FA8[];
extern s8 D_060185F8[];
extern s8 D_060186B8[];
extern s8 D_06018948[];
extern s8 D_06018A08[];
extern s8 D_06018C98[];
extern s8 D_06018D58[];
extern s8 D_06023858[];
extern s8 D_060238A0[];
extern s8 D_060238E8[];
extern Gfx D_06006990[];
extern Gfx D_06009330[];
extern Gfx D_0600CA60[];
extern Gfx D_0600D850[];
extern Gfx D_0600E058[];
extern Gfx D_0600E730[];
extern Gfx D_0600FC28[];
extern Gfx D_06010AE8[];
extern Gfx D_06010C10[];
extern Gfx D_06010CC0[];
extern Gfx D_06010D38[];
extern Gfx D_06011DC8[];
extern Gfx D_06012EF0[];
extern Gfx D_060138D0[];
extern Gfx D_06013C00[];
extern Gfx D_06013CA0[];
extern Gfx D_06013D20[];
extern Gfx D_06013DA0[];
extern Gfx D_06013E20[];
extern Gfx D_06016D70[];
extern Gfx D_06017FA8[];
extern Gfx D_060185F8[];
extern Gfx D_060186B8[];
extern Gfx D_06018948[];
extern Gfx D_06018A08[];
extern Gfx D_06018C98[];
extern Gfx D_06018D58[];
extern Gfx D_06023858[];
extern Gfx D_060238A0[];
extern Gfx D_060238E8[];
extern Gfx D_0D001750[];
extern Gfx D_0D001780[];
extern Gfx D_0D001798[];
extern Gfx D_0D0017B0[];
extern Gfx D_0D0017C8[];
extern Gfx D_0D0017E0[];
extern Gfx D_0D0017F8[];
extern Gfx D_0D001810[];
extern Gfx D_0D001828[];
extern Gfx D_0D001B90[];
extern Gfx D_0D001BD8[];
extern Gfx D_0D001C20[];
extern Gfx D_0D001C88[];
extern Gfx D_0D002EE8[];
extern Gfx D_0D002F80[];
extern Gfx D_0D003008[];
extern Gfx D_0D003090[];
extern Gfx D_0D0030F8[];
extern Gfx D_0D003128[];
extern Gfx D_0D003158[];
extern Gfx D_0D003188[];
extern Gfx D_0D0031B8[];
extern Gfx D_0D0031E8[];
extern Gfx D_0D004B48[];
extern Gfx D_0D004BD8[];
extern s8 D_0D001B90[];
extern s8 D_0D001BD8[];
extern s8 D_0D001C20[];
extern s8 D_0D001C88[];
extern s8 D_0D004B48[];
extern s8 D_0D004BD8[];
extern s8 D_0D004E38[];
extern s8 D_0D004E68[];
extern s8 D_0F04CBE0[];
extern s8 D_0F04CE30[];
extern s8 D_0F04D080[];
extern s8 D_0F04D2D8[];
extern s8 D_0F04D538[];
extern s8 D_0F04D790[];
extern s8 D_0F04D9FC[];
extern s8 D_0F04DC5C[];
extern s8 D_0F04DEB0[];
extern s8 D_0F04E0DC[];
extern s8 D_0F04E314[];
extern s8 D_0F04E554[];
extern s8 D_0F04E798[];
extern s8 D_0F04E9F0[];
extern s8 D_0F04EC4C[];
extern s8 D_0F04EE88[];
extern s8 D_0F04F45C[];
extern s8 D_0F04F7A4[];
extern s8 D_0F04FB3C[];
extern s8 D_0F04FE28[];
extern s8 D_0F050118[];
extern s8 D_0F050468[];
extern s8 D_0F050678[];
extern s8 D_0F050D50[];
extern s8 D_0F0513CC[];
extern s8 D_0F051820[];
extern s8 D_0F051C54[];
extern s8 D_0F051FD8[];
extern s8 D_0F05232C[];
extern s8 D_0F0526B8[];
extern s8 D_0F052A20[];
extern s8 D_0F052D3C[];
extern s8 D_0F05300C[];
extern s8 D_0F0532F8[];
extern s8 D_0F05363C[];
extern s8 D_0F053950[];
extern s8 D_0F053C34[];
extern s8 D_0F053F74[];
extern s8 D_0F054270[];
extern s8 D_0F054518[];
extern s8 D_0F05488C[];
extern s8 D_0F054C3C[];
extern s8 D_0F054ECC[];
extern s8 D_0F0551C8[];
extern s8 D_0F0554CC[];
extern s8 D_0F055880[];
extern s8 D_0F055BA0[];
extern s8 D_0F055F10[];
extern s8 D_0F0561AC[];
extern s8 D_0F056408[];
extern s8 D_0F05662C[];
extern s8 D_0F05688C[];
extern s8 D_0F056AD0[];
extern s8 D_0F056CF0[];
extern s8 D_0F056EC8[];
extern s8 D_0F057084[];
extern s8 D_0F057288[];
extern s8 D_0F057590[];
extern s8 D_0F057EB4[];
extern s8 D_0F0581E4[];
extern s8 D_0F058550[];
extern s8 gTexture671A88[];
extern s8 gTexture6774D8[];
extern s8 gTextureShrub[];
extern s8 D_800DC628[];
extern s8 D_800DC630[];
extern u16 D_800DC5FC;
extern s8 D_802B8864[];
extern u16 D_800DC5BC;
+22 -22
View File
@@ -16,10 +16,10 @@ void func_802B0210(UnkActorInner *arg0, UnkActorInner *arg1) {
arg1->unk36 = arg0->unk36;
arg1->unk38 = arg0->unk38;
arg1->unk3A = arg0->unk3A;
arg1->unk3C = arg0->unk3C;
arg1->unk40 = arg0->unk40;
arg1->unk3C[0] = arg0->unk3C[0];
arg1->unk3C[1] = arg0->unk3C[1];
arg1->unk3C[2] = arg0->unk3C[2];
arg1->unk44 = arg0->unk44;
vec3f_copy(arg1->unk48, arg0->unk48);
vec3f_copy(arg1->unk54, arg0->unk54);
vec3f_copy(arg1->unk60, arg0->unk60);
@@ -755,13 +755,13 @@ void update_obj_banana(struct BananaActor *banana) {
} else {
func_802ADDC8(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1], banana->pos[2]);
banana->unk30.unk34 = 1;
if ((banana->unk30.unk34 != 0) && (banana->unk30.unk44 < 0.0f)) {
if ((banana->unk30.unk34 != 0) && (banana->unk30.unk3C[2] < 0.0f)) {
someOtherVelocity[0] = -banana->unk30.unk60[0];
someOtherVelocity[1] = -banana->unk30.unk60[1];
someOtherVelocity[2] = -banana->unk30.unk60[2];
banana->pos[0] += someOtherVelocity[0] * banana->unk30.unk44;
banana->pos[1] += someOtherVelocity[1] * banana->unk30.unk44;
banana->pos[2] += someOtherVelocity[2] * banana->unk30.unk44;
banana->pos[0] += someOtherVelocity[0] * banana->unk30.unk3C[2];
banana->pos[1] += someOtherVelocity[1] * banana->unk30.unk3C[2];
banana->pos[2] += someOtherVelocity[2] * banana->unk30.unk3C[2];
banana->flags &= ~0x1000;
banana->state = 4;
}
@@ -1233,7 +1233,7 @@ void update_obj_green_shell(struct ShellActor *shell) {
shell->pos[2] += shell->velocity[2];
func_802AD950(&shell->unk30, 4.0f, shell->pos[0], shell->pos[1], shell->pos[2], somePos2[0], somePos2[1], somePos2[2]);
func_802B4E30((struct Actor *) shell);
if ((shell->unk30.unk3C < 0.0f) || (shell->unk30.unk40 < 0.0f)) {
if ((shell->unk30.unk3C[0] < 0.0f) || (shell->unk30.unk3C[1] < 0.0f)) {
func_802AC098(&shell->unk30, shell->velocity);
func_800C98B8(shell->pos, shell->velocity, 0x19008054U);
shell->flags |= 0x80;
@@ -1450,11 +1450,11 @@ s16 func_802B3FD0(Player *owner, struct ShellActor *shell) {
}
void func_802B4104(struct ShellActor *shell) {
if ((shell->unk30.unk3C < 0.0f) && ((shell->unk30.unk48[1] < 0.25f) || (shell->unk30.unk48[1] > -0.25f))) {
if ((shell->unk30.unk3C[0] < 0.0f) && ((shell->unk30.unk48[1] < 0.25f) || (shell->unk30.unk48[1] > -0.25f))) {
func_8029FDC8((struct Actor *) shell);
func_800C98B8(shell->pos, shell->velocity, 0x19008054U);
shell->flags |= 0x80;
} else if ((shell->unk30.unk40 < 0.0f) && ((shell->unk30.unk54[1] < 0.25f) || (shell->unk30.unk54[1] < -0.25f))) {
} else if ((shell->unk30.unk3C[1] < 0.0f) && ((shell->unk30.unk54[1] < 0.25f) || (shell->unk30.unk54[1] < -0.25f))) {
func_8029FDC8((struct Actor *) shell);
func_800C98B8(shell->pos, shell->velocity, 0x19008054U);
shell->flags |= 0x80;
@@ -1735,19 +1735,19 @@ void update_obj_red_blue_shell(struct ShellActor *shell) {
}
void func_802B4E30(struct Actor *arg0) {
if ((arg0->unk30.unk44 < 0.0f) && (arg0->unk30.unk34 == 1)) {
arg0->pos[0] -= (arg0->unk30.unk60[0] * arg0->unk30.unk44);
arg0->pos[1] -= (arg0->unk30.unk60[1] * arg0->unk30.unk44);
arg0->pos[2] -= (arg0->unk30.unk60[2] * arg0->unk30.unk44);
if ((arg0->unk30.unk3C[2] < 0.0f) && (arg0->unk30.unk34 == 1)) {
arg0->pos[0] -= (arg0->unk30.unk60[0] * arg0->unk30.unk3C[2]);
arg0->pos[1] -= (arg0->unk30.unk60[1] * arg0->unk30.unk3C[2]);
arg0->pos[2] -= (arg0->unk30.unk60[2] * arg0->unk30.unk3C[2]);
}
if ((arg0->unk30.unk3C < 0.0f) && (arg0->unk30.unk30 == 1)) {
arg0->pos[0] -= (arg0->unk30.unk48[0] * arg0->unk30.unk3C);
arg0->pos[1] -= (arg0->unk30.unk48[1] * arg0->unk30.unk3C);
arg0->pos[2] -= (arg0->unk30.unk48[2] * arg0->unk30.unk3C);
if ((arg0->unk30.unk3C[0] < 0.0f) && (arg0->unk30.unk30 == 1)) {
arg0->pos[0] -= (arg0->unk30.unk48[0] * arg0->unk30.unk3C[0]);
arg0->pos[1] -= (arg0->unk30.unk48[1] * arg0->unk30.unk3C[0]);
arg0->pos[2] -= (arg0->unk30.unk48[2] * arg0->unk30.unk3C[0]);
}
if ((arg0->unk30.unk40 < 0.0f) && (arg0->unk30.unk32 == 1)) {
arg0->pos[0] -= (arg0->unk30.unk54[0] * arg0->unk30.unk40);
arg0->pos[1] -= (arg0->unk30.unk54[1] * arg0->unk30.unk40);
arg0->pos[2] -= (arg0->unk30.unk54[2] * arg0->unk30.unk40);
if ((arg0->unk30.unk3C[1] < 0.0f) && (arg0->unk30.unk32 == 1)) {
arg0->pos[0] -= (arg0->unk30.unk54[0] * arg0->unk30.unk3C[1]);
arg0->pos[1] -= (arg0->unk30.unk54[1] * arg0->unk30.unk3C[1]);
arg0->pos[2] -= (arg0->unk30.unk54[2] * arg0->unk30.unk3C[1]);
}
}
+41 -41
View File
@@ -15,7 +15,7 @@ extern u16 D_800DC5A8;
extern struct Controller *gControllerOne[];
extern s32 D_800DC510;
extern s16 D_8015F6FE;
extern u16 D_8015F6FE;
extern s16 D_800DC5B8;
extern u16 D_80152308;
extern s32 D_802BA038;
@@ -37,25 +37,25 @@ extern u32 gPrevLoadedAddress;
extern s32 D_80150120;
extern f32 D_8015F738, D_8015F748, D_8015F758, D_8015F768, D_8015F778;
extern u32 *D_802B91C8;
extern Vec3f D_802B91C8;
// gfx?
extern u32 *D_0F04FE28;
extern u32 *D_0F050118;
extern u32 *D_0F051C54;
extern u32 *D_0F051FD8;
extern u32 *D_0F05232C;
extern u32 *D_0F0526B8;
extern u32 *D_0F052A20;
extern u32 *D_0F052D3C;
extern u32 *D_0F05300C;
extern u32 *D_0F0532F8;
extern u32 *D_0F05363C;
extern u32 *D_0F053950;
extern u32 *D_0F04F45C;
extern s8 D_0F04F45C[];
extern s8 D_0F04FE28[];
extern s8 D_0F050118[];
extern s8 D_0F051C54[];
extern s8 D_0F051FD8[];
extern s8 D_0F05232C[];
extern s8 D_0F0526B8[];
extern s8 D_0F052A20[];
extern s8 D_0F052D3C[];
extern s8 D_0F05300C[];
extern s8 D_0F0532F8[];
extern s8 D_0F05363C[];
extern s8 D_0F053950[];
extern u32 *D_06009570;
extern u32 *D_06014330;
extern struct ActorSpawnData D_06009570[];
extern struct ActorSpawnData D_06014330[];
extern f32 gCourseDirection;
@@ -177,33 +177,33 @@ void func_80002DAC(void) {
switch (gCurrentCourseId) {
case COURSE_MARIO_RACEWAY:
vec3f_set(&D_8015F748, -223.0f, 94.0f, -155.0f);
func_800C9D80(&D_8015F748, &D_802B91C8, 0x5103700B);
func_800C9D80(&D_8015F748, D_802B91C8, 0x5103700B);
break;
case COURSE_ROYAL_RACEWAY:
vec3f_set(&D_8015F748, 177.0f, 87.0f, -393.0f);
func_800C9D80(&D_8015F748, &D_802B91C8, 0x5103700B);
func_800C9D80(&D_8015F748, D_802B91C8, 0x5103700B);
break;
case COURSE_LUIGI_RACEWAY:
vec3f_set(&D_8015F748, 85.0f, 21.0f, -219.0f);
func_800C9D80(&D_8015F748, &D_802B91C8, 0x5103700B);
func_800C9D80(&D_8015F748, D_802B91C8, 0x5103700B);
break;
case COURSE_WARIO_STADIUM:
vec3f_set(&D_8015F748, 298.0f, 202.0f, -850.0f);
func_800C9D80(&D_8015F748, &D_802B91C8, 0x5103700B);
func_800C9D80(&D_8015F748, D_802B91C8, 0x5103700B);
vec3f_set(&D_8015F758, -1600.0f, 202.0f, -2430.0f);
func_800C9D80(&D_8015F758, &D_802B91C8, 0x5103700B);
func_800C9D80(&D_8015F758, D_802B91C8, 0x5103700B);
vec3f_set(&D_8015F768, -2708.0f, 202.0f, 1762.0f);
func_800C9D80(&D_8015F768, &D_802B91C8, 0x5103700B);
func_800C9D80(&D_8015F768, D_802B91C8, 0x5103700B);
vec3f_set(&D_8015F778, -775.0f, 202.0f, 1930.0f);
func_800C9D80(&D_8015F778, &D_802B91C8, 0x5103700B);
func_800C9D80(&D_8015F778, D_802B91C8, 0x5103700B);
break;
case COURSE_KOOPA_BEACH:
vec3f_set(&D_8015F738, 153.0f, 0.0f, 2319.0f);
func_800C9D80(&D_8015F738, &D_802B91C8, 0x51028001);
func_800C9D80(&D_8015F738, D_802B91C8, 0x51028001);
break;
case COURSE_DK_JUNGLE:
vec3f_set(&D_8015F738, -790.0f, -255.0f, -447.0f);
func_800C9D80(&D_8015F738, &D_802B91C8, 0x51028001);
func_800C9D80(&D_8015F738, D_802B91C8, 0x51028001);
break;
default:
break;
@@ -236,8 +236,8 @@ void func_80003040(void) {
destroy_all_actors();
switch (gCurrentCourseId) {
case COURSE_MARIO_RACEWAY:
func_802A84F4(&D_0F04F45C, 0x35B, 0x800);
place_segment_06(&D_06009570);
func_802A84F4(D_0F04F45C, 0x35B, 0x800);
place_segment_06(D_06009570);
break;
case COURSE_BOWSER_CASTLE:
func_802AF8BC(0x7001350, 0x32, 0, 0, 0);
@@ -251,19 +251,19 @@ void func_80003040(void) {
func_8029EC88(position, rotation, velocity, ACTOR_YOSHI_VALLEY_EGG);
break;
case COURSE_MOO_MOO_FARM:
func_802A84F4(&D_0F04FE28, 0x3E8, 0x800);
func_802A84F4(&D_0F050118, 0x3E8, 0x800);
func_802A84F4(&D_0F051C54, 0x400, 0x800);
func_802A84F4(&D_0F051FD8, 0x400, 0x800);
func_802A84F4(&D_0F05232C, 0x400, 0x800);
func_802A84F4(&D_0F0526B8, 0x400, 0x800);
func_802A84F4(&D_0F052A20, 0x400, 0x800);
func_802A84F4(&D_0F052D3C, 0x400, 0x800);
func_802A84F4(&D_0F05300C, 0x400, 0x800);
func_802A84F4(&D_0F0532F8, 0x400, 0x800);
func_802A84F4(&D_0F05363C, 0x400, 0x800);
func_802A84F4(&D_0F053950, 0x400, 0x800);
place_segment_06(&D_06014330);
func_802A84F4(D_0F04FE28, 0x3E8, 0x800);
func_802A84F4(D_0F050118, 0x3E8, 0x800);
func_802A84F4(D_0F051C54, 0x400, 0x800);
func_802A84F4(D_0F051FD8, 0x400, 0x800);
func_802A84F4(D_0F05232C, 0x400, 0x800);
func_802A84F4(D_0F0526B8, 0x400, 0x800);
func_802A84F4(D_0F052A20, 0x400, 0x800);
func_802A84F4(D_0F052D3C, 0x400, 0x800);
func_802A84F4(D_0F05300C, 0x400, 0x800);
func_802A84F4(D_0F0532F8, 0x400, 0x800);
func_802A84F4(D_0F05363C, 0x400, 0x800);
func_802A84F4(D_0F053950, 0x400, 0x800);
place_segment_06(D_06014330);
break;
case COURSE_SHERBET_LAND:
func_802AF8BC(0x7001EB8, -0x4C, 0xFF, 0xFF, 0xFF);
+96 -147
View File
@@ -2109,17 +2109,6 @@ block_25:
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000929C.s")
#endif
void func_8000DF8C(s32); // extern
void func_8000EF20(); // extern
void func_80012AC0(); // extern
void func_800133C4(); // extern
void func_8001487C(); // extern
void func_800149D0(); // extern
void func_80014B24(); // extern
void func_80014C78(); // extern
extern s32 D_8016337C;
extern s32 gModeSelection;
void func_800097E0(void) {
s32 i;
s32 j;
@@ -2261,31 +2250,22 @@ GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_800099EC.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit bece1d6db17040749f77dbbd090363cc6fb926f9
// ? func_80008424(s32, ?32, Player *); /* extern */
// ? func_8000929C(s32, Player *); /* extern */
// ? func_800099EC(s32, Player *); /* extern */
// ? func_8000B140(s32); /* extern */
// s32 func_8000B7E4(s32, u16); /* extern */
// ? func_8000BBD8(s32, ?32, s16, f32 *); /* extern */
// ? func_8000D3B8(s32); /* extern */
// ? func_8000D438(s32, u16); /* extern */
// ? func_80011E38(s32); /* extern */
// ? func_80012DC0(s32, Player *); /* extern */
// ? func_80013054(); /* extern */
// ? func_800131DC(s32); /* extern */
// ? func_80013854(Player *); /* extern */
// ? func_800148C4(s32, Player *); /* extern */
// ? func_8001490C(s32, u16 *, f32 *, u16 *); /* extern */
// ? func_80014A18(s32, Player *); /* extern */
// ? func_80014A60(s32); /* extern */
// ? func_80014B6C(s32, Player *); /* extern */
// ? func_80014BB4(s32); /* extern */
// ? func_80014CC0(s32, Player *); /* extern */
// ? func_80014D08(s32); /* extern */
// ? func_8001AC10(s32); /* extern */
// ? func_8003680C(Player *, s16, Player *, s16, Player *); /* extern */
// ? set_places(); /* extern */
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
? func_80008424(s32, ?32, Player *); /* extern */
? func_8000929C(s32, Player *); /* extern */
? func_800099EC(s32, Player *); /* extern */
? func_8000B140(s32); /* extern */
? func_8000BBD8(s32, ?32, s16, f32 *); /* extern */
? func_8000D3B8(s32); /* extern */
? func_8000D438(s32, u16); /* extern */
? func_80011E38(s32); /* extern */
? func_80012DC0(s32, Player *); /* extern */
? func_80013054(); /* extern */
? func_800131DC(s32); /* extern */
? func_80013854(Player *); /* extern */
? func_8001AC10(s32); /* extern */
? func_8003680C(Player *, s16, Player *, s16, Player *); /* extern */
? set_places(); /* extern */
extern ? D_0D009418;
extern ? D_0D009568;
extern ? D_0D0096B8;
@@ -2327,13 +2307,35 @@ extern ? D_801634F8;
extern ? D_801634FC;
extern ? D_80163504;
extern u16 D_801646CC;
extern s8 D_8018EDF3;
static s16 D_800DCA20[0]; /* unable to generate initializer */
static ?32 D_800ECFB4 = 0x41055555; /* const */
static ?32 D_800ECFC8 = 0x40555555; /* const */
f32 D_800DCA4C[0x15] = {
50.0f,
35.0f,
35.0f,
40.0f,
35.0f,
50.0f,
50.0f,
50.0f,
50.0f,
50.0f,
50.0f,
50.0f,
50.0f,
50.0f,
50.0f,
-1.0f,
-1.0f,
-1.0f,
40.0f,
-1.0f,
40.0f,
};
s16 gCurrentCourseId; /* unable to generate initializer */
void func_80009B60(s32 arg0) {
void func_80009B60(s32 playerId) {
s16 sp94;
Player *sp40;
?32 *sp3C;
@@ -2410,23 +2412,23 @@ void func_80009B60(s32 arg0) {
void *temp_v1_3;
void *temp_v1_6;
temp_a3 = arg0 * 4;
temp_a3 = playerId * 4;
temp_v0 = temp_a3 + &D_80163100;
if ((s32) D_800DCA4C[gCurrentCourseId] >= 0) {
*temp_v0 += 1;
if (arg0 == 0) {
if (playerId == 0) {
temp_t6 = D_80163378 + 1;
D_80163378 = temp_t6;
if ((temp_t6 & 1) != 0) {
if (temp_t6 & 1) {
D_80163488 += 1;
}
}
temp_v1 = &gPlayers[arg0];
temp_a2 = arg0 * 2;
if ((temp_v1->unk_000 & 0x8000) == 0) {
D_80164450[arg0] = -0x00000014;
gCourseCompletionPercentByPlayerId[arg0] = -1000.0f;
gLapCompletionPercentByPlayerId[arg0] = -1000.0f;
temp_v1 = &gPlayers[playerId];
temp_a2 = playerId * 2;
if (!(temp_v1->unk_000 & 0x8000)) {
D_80164450[playerId] = -0x00000014;
gCourseCompletionPercentByPlayerId[playerId] = -1000.0f;
gLapCompletionPercentByPlayerId[playerId] = -1000.0f;
return;
}
temp_v0_2 = temp_a2 + &D_801633E0;
@@ -2444,8 +2446,8 @@ void func_80009B60(s32 arg0) {
*temp_v0_2 = 4;
}
temp_v0_3 = temp_v1->unk_0CA;
if (((temp_v0_3 & 2) == 0) && ((temp_v0_3 & 8) == 0)) {
temp_a0 = gPathIndexByPlayerId[arg0];
if (!(temp_v0_3 & 2) && !(temp_v0_3 & 8)) {
temp_a0 = gPathIndexByPlayerId[playerId];
sp40 = temp_v1;
sp34 = temp_a2;
sp38 = temp_a3;
@@ -2454,8 +2456,8 @@ void func_80009B60(s32 arg0) {
temp_v0_4 = gCurrentCourseId;
switch (temp_v0_4) { /* irregular */
case 11:
func_80012DC0(arg0, sp40);
if (arg0 == 0) {
func_80012DC0(playerId, sp40);
if (playerId == 0) {
func_80013054();
}
break;
@@ -2463,30 +2465,30 @@ void func_80009B60(s32 arg0) {
func_80013854(sp40);
break;
case 10:
func_800148C4(arg0, sp40);
func_80014A18(arg0, sp40);
func_80014B6C(arg0, sp40);
func_80014CC0(arg0, sp40);
func_800148C4(playerId, sp40);
func_80014A18(playerId, sp40);
func_80014B6C(playerId, sp40);
func_80014CC0(playerId, sp40);
break;
}
if ((sp40->unk_000 & 0x800) != 0) {
if (sp40->unk_000 & 0x800) {
sp40->unk_0BC &= 0xFFBFFFFF;
sp40->unk_044 &= 0xFFFE;
}
func_8000929C(arg0, sp40);
if ((gCurrentCourseId != 0x0014) && ((*(&D_80163240 + sp34) == 1) || (arg0 == 0))) {
func_8000929C(playerId, sp40);
if ((gCurrentCourseId != 0x0014) && ((*(&D_80163240 + sp34) == 1) || (playerId == 0))) {
set_places();
}
if ((sp40->unk_000 & 0x1000) != 0) {
if (sp40->unk_000 & 0x1000) {
if ((D_801630E2 == 1) && (gCurrentCourseId != 0x0014)) {
func_80011E38(arg0);
func_80011E38(playerId);
}
temp_t5 = arg0 & 1;
temp_t5 = playerId & 1;
sp30 = temp_t5;
if ((D_80163378 & 1) != temp_t5) {
func_8001AC10(arg0);
func_8001AC10(playerId);
}
func_800099EC(arg0, sp40);
func_800099EC(playerId, sp40);
temp_v0_5 = gModeSelection;
D_80162FD0 = 0;
switch (temp_v0_5) { /* switch 1; irregular */
@@ -2499,19 +2501,19 @@ void func_80009B60(s32 arg0) {
}
temp_a1 = sp34 + &D_801631E0;
*temp_a1 = 0;
if (((sp40->unk_0BC & 0x1000) != 0) && (gCurrentCourseId != 0x0014)) {
if ((sp40->unk_0BC & 0x1000) && (gCurrentCourseId != 0x0014)) {
*temp_a1 = 1;
}
temp_v0_6 = gCurrentCourseId;
if ((D_801646CC == 1) || ((sp40->unk_000 & 0x800) != 0) || (temp_v0_6 == 0x0014)) {
if ((D_801646CC == 1) || (sp40->unk_000 & 0x800) || (temp_v0_6 == 0x0014)) {
if (temp_v0_6 != 0x000A) {
*(&D_801634FC + (arg0 * 0x10)) = 0.0f;
*(&D_801634FC + (playerId * 0x10)) = 0.0f;
}
*(&D_80163504 + (arg0 * 0x10)) = 0.0f;
*(&D_80163504 + (playerId * 0x10)) = 0.0f;
}
temp_v0_7 = D_80163448;
if (temp_v0_7 > 0) {
temp_v1_2 = (arg0 * 0x10) + &D_801634F8;
temp_v1_2 = (playerId * 0x10) + &D_801634F8;
temp_v1_2->unk4 = 0.0f;
temp_v1_2->unkC = 0.0f;
}
@@ -2541,23 +2543,23 @@ void func_80009B60(s32 arg0) {
}
} else {
sp2C = temp_a1;
func_8001490C(arg0, temp_a1, temp_a2_2, temp_a3_2);
func_80014A60(arg0);
func_80014BB4(arg0);
func_80014D08(arg0);
func_8001490C(playerId);
func_80014A60(playerId);
func_80014BB4(playerId);
func_80014D08(playerId);
var_a0 = *temp_a1;
}
} else {
var_a0 = *temp_a1;
block_63:
*(&D_801634FC + (arg0 * 0x10)) = 0.0f;
*(&D_801634FC + (playerId * 0x10)) = 0.0f;
}
if (var_a0 == 1) {
*(&D_801630E8 + sp34) = 0;
sp40->unk_0BC &= ~0x10;
if ((D_80163378 & 1) != sp30) {
func_8003680C(sp40, 0);
func_80008424(arg0, *(&D_80163210 + sp38), sp40);
func_80008424(playerId, *(&D_80163210 + sp38), sp40);
return;
}
temp_v0_9 = D_8018EDF3;
@@ -2565,7 +2567,7 @@ block_63:
var_t0 = sp38 + &D_80163210;
*var_t0 = 0x41055555;
} else if (D_80162FD0 == (s16) 1U) {
temp_v1_3 = (arg0 * 0x10) + &D_801634F8;
temp_v1_3 = (playerId * 0x10) + &D_801634F8;
sp30 = temp_v1_3;
var_t0 = sp38 + &D_80163210;
*var_t0 = *segmented_to_virtual_dupe_2((gCurrentCourseId * 0x10) + (gCCSelection * 4) + &D_0D0096B8);
@@ -2578,32 +2580,32 @@ block_63:
*var_t0 = *segmented_to_virtual_dupe_2((gCurrentCourseId * 0x10) + (gCCSelection * 4) + &D_0D009568);
}
sp3C = var_t0;
func_800131DC(arg0);
func_8000D3B8(arg0);
func_8000D438(arg0, D_801630E0);
func_800131DC(playerId);
func_8000D3B8(playerId);
func_8000D438(playerId, D_801630E0);
temp_v0_10 = sp40->unk_0BC;
temp_f0 = D_80162FA0.unk0 - sp40->pos[0];
var_t0_2 = var_t0;
temp_f2 = D_80162FA0.unk8 - sp40->pos[2];
if (((temp_v0_10 & 0x80) == 0) && ((temp_v0_10 & 0x40) == 0) && ((temp_v0_10 & 0x800) == 0)) {
if (!(temp_v0_10 & 0x80) && !(temp_v0_10 & 0x40) && !(temp_v0_10 & 0x800)) {
if (((temp_f0 * temp_f0) + (temp_f2 * temp_f2)) > 6400.0f) {
if (D_80163448 == 0) {
sp3C = var_t0_2;
func_8000B140(arg0);
func_8000B140(playerId);
if (*(&D_80162FF8 + sp34) > 0) {
sp3C = var_t0_2;
func_8000BBD8(((s32) ((D_801630E0 + 5) & 0xFFFF) % (s32) D_80164430) & 0xFFFF, *(&D_80163090 + sp38), D_8016344A, &D_80162FA0);
}
}
sp3C = var_t0_2;
sp40->unk_02C[1] = -func_802B5224(sp40->pos, &D_80162FA0);
sp40->unk_02E = -func_802B5224(sp40->pos, &D_80162FA0);
} else {
sp40->unk_02C[1] = (s16) D_80164590[D_80163448][(s32) (D_801630E0 + 4) % (s32) D_80164430];
sp40->unk_02E = (s16) D_80164590[D_80163448][(s32) (D_801630E0 + 4) % (s32) D_80164430];
}
}
sp3C = var_t0_2;
func_8003680C(sp40, 0, sp40);
func_80008424(arg0, *var_t0_2, sp40);
func_80008424(playerId, *var_t0_2, sp40);
return;
}
temp_t8 = sp34 + &D_801630E8;
@@ -2656,20 +2658,20 @@ block_63:
}
if ((D_80163378 & 1) != sp30) {
func_8003680C(sp40, *(&D_80163050 + sp34));
func_80008424(arg0, *(&D_80163210 + sp38), sp40);
func_80008424(playerId, *(&D_80163210 + sp38), sp40);
return;
}
sp1C = sp40->pos;
temp_v1_5 = sp38 + &D_801630B8;
*temp_v1_5 = func_8000B7E4(arg0, (u16) D_80162FCE);
*temp_v1_5 = func_8000B7E4(playerId, (u16) D_80162FCE);
sp28 = temp_v1_5;
func_8000D438(arg0, (u16) D_80162FCE);
func_8000D438(playerId, (u16) D_80162FCE);
temp_v0_13 = gCurrentCourseId;
if (temp_v0_13 != 0x0014) {
temp_a1_2 = *(D_80164450 + sp38);
if (temp_a1_2 < 0xB) {
temp_a0_2 = D_801630E0;
temp_v1_6 = (arg0 * 0x10) + &D_801634F8;
temp_v1_6 = (playerId * 0x10) + &D_801634F8;
if ((temp_a1_2 > 0) && (temp_v0_13 == 0x000A)) {
sp30 = temp_v1_6;
func_8000BBD8(((s32) ((temp_a0_2 + 0x14) & 0xFFFF) % (s32) D_80164430) & 0xFFFF, 0, 0);
@@ -2687,7 +2689,7 @@ block_63:
}
if (D_80163448 == 0) {
sp3C = sp34 + &D_80162FF8;
func_8000B140(arg0);
func_8000B140(playerId);
if (*sp3C > 0) {
func_8000BBD8(((s32) ((D_801630E0 + 5) & 0xFFFF) % (s32) D_80164430) & 0xFFFF, *(&D_80163090 + sp38), D_8016344A);
}
@@ -2716,7 +2718,7 @@ block_63:
sp20 = temp_t0_2;
*temp_v1_7 = D_80162FA0.unk8;
temp_f2_2 = 1.5f * 182.0f;
temp_v1_8 = -func_802B5224(sp1C, &D_80162FA0) - sp40->unk_02C[1];
temp_v1_8 = -func_802B5224(sp1C, &D_80162FA0) - sp40->unk_02E;
temp_f10 = (s32) temp_f2_2;
var_a2 = temp_v1_8;
temp_f6 = (s32) (-1.5f * 182.0f);
@@ -2753,7 +2755,7 @@ block_63:
sp40->unk_0BC &= ~0x10;
}
temp_v0_18 = sp40->unk_0BC;
if ((temp_v0_18 & 2) != 0) {
if (temp_v0_18 & 2) {
temp_v0_19 = (s16) *sp2C;
var_a1_2 = -0x0035;
if (temp_v0_19 != -1) {
@@ -2767,7 +2769,7 @@ block_63:
} else {
var_v0_2 = sp34 + &D_80163050;
}
} else if ((temp_v0_18 & 0x1000000C) != 0) {
} else if (temp_v0_18 & 0x1000000C) {
var_a1_2 = 0;
var_v0_2 = sp34 + &D_80163050;
} else {
@@ -2779,7 +2781,7 @@ block_63:
sp20 = temp_t0_2;
func_8003680C((bitwise Player *) 182.0f, (s16) sp40, (Player *) var_a1_2, var_a2, sp40);
*var_v0_2 = var_a1_2;
if (((bitwise s32) *sp28 == 1) || (temp_v0_20 = (s16) *sp2C, (temp_v0_20 == 1)) || (temp_v0_20 == -1) || ((sp40->unk_0BC & 0x1000000C) != 0)) {
if (((bitwise s32) *sp28 == 1) || (temp_v0_20 = (s16) *sp2C, (temp_v0_20 == 1)) || (temp_v0_20 == -1) || (sp40->unk_0BC & 0x1000000C)) {
sp20 = temp_t0_2;
var_v1_3 = sp38 + &D_80163028;
*var_v1_3 = *segmented_to_virtual_dupe_2((gCurrentCourseId * 0x10) + (gCCSelection * 4) + &D_0D009418);
@@ -2804,8 +2806,8 @@ block_63:
D_8016320C = *var_v1_3;
sp40->unk_0BC &= 0xFFDFFFFF;
*(&D_80163210 + sp38) = D_8016320C;
func_800131DC(arg0);
func_80008424(arg0, D_8016320C, sp40);
func_800131DC(playerId);
func_80008424(playerId, D_8016320C, sp40);
}
}
}
@@ -3043,9 +3045,6 @@ s32 func_8000B7E4(s32 arg0, u16 wayPointIndex) {
return 0;
}
extern f32 D_800ECFD8;// = 1.1f;
extern f32 D_800ECFDC;// = -1.1f;
s32 func_8000B820(s32 playerIndex) {
f32 value = D_80163068[playerIndex];
// Check if value between 1.1 and -1.1
@@ -4453,19 +4452,6 @@ void func_8000DF8C(s32 arg0) {
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000DF8C.s")
#endif
struct unk_41F8 {
s32 unk0;
s32 unk4;
s32 unk8;
u16 unkC;
u16 unkE;
s16 unk10;
s32 unk14;
s32 unk18;
};
extern struct unk_41F8 D_801641F8[];
s32 func_8000ED14(s32, s16);
s32 func_8000ED14(s32 arg0, s16 arg1) {
s32 i;
s32 a2 = 0;
@@ -4487,8 +4473,6 @@ s32 func_8000ED14(s32 arg0, s16 arg1) {
return 0;
}
extern struct Actor gActorList[ACTOR_LIST_SIZE];
s32 func_8000ED80(s32 arg0) {
struct Actor *actor = &gActorList[arg0];
if (actor->type != 8) {
@@ -4615,15 +4599,6 @@ block_14:
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8000EF20.s")
#endif
extern s16 D_80164670;
extern s16 D_80164672;
extern s16 D_80164674;
extern s16 D_80164676;
extern s16 D_80164678;
extern s16 D_8016467A;
extern s16 D_8016467C;
extern s16 D_8016467E;
void func_8000F0E0(void) {
D_80164670 = 0;
D_80164678 = 0;
@@ -6066,11 +6041,6 @@ void func_80011A5C(void) {
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80011A5C.s")
#endif
extern s16 D_801632B8[];
extern s16 D_801632D0[];
extern s16 D_801632E8[];
void func_80011AB8(s32 index) {
D_801632B8[index] = 0;
D_801632D0[index] = 0;
@@ -9850,8 +9820,6 @@ block_8:
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001933C.s")
#endif
extern s16 D_80164678;
void func_8001968C(void) {
D_80164678 = 3;
}
@@ -10154,8 +10122,6 @@ void func_80019D2C(void *arg0, void *arg1, s32 arg2) {
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_80019D2C.s")
#endif
extern s16 D_801646CC;
void func_80019DE4(void) {
D_801646CC = 1;
}
@@ -10759,15 +10725,6 @@ void func_8001ABE0(s32 arg0, s32 arg1) {
}
struct struct_801642D8 {
/* 0x0 */ u16 unk0;
/* 0x2 */ s16 ffff;
/* 0x4 */ s16 timer; // confirm?
/* 0x6 */ s16 laps; // confirm?
/* 0x8 */ s32 blank;
/* 0xC */ s32 unkC;
};
void func_8001ABEC(struct struct_801642D8 *arg0) {
if ((arg0->ffff < 0) || (arg0->ffff >= 100)) {
arg0->unk0 = 0;
@@ -11453,8 +11410,6 @@ loop_8:
GLOBAL_ASM("asm/non_matchings/code_80005FD0/func_8001C14C.s")
#endif
extern u16 D_80163E2A;
void func_8001C3C4(s32 arg0) {
if (gCurrentCourseId == COURSE_AWARD_CEREMONY) {
if (D_80163E2A >= 16) {
@@ -11467,12 +11422,6 @@ void func_8001C3C4(s32 arg0) {
}
}
extern Gfx D_0D0076F8[];
extern struct Controller *gControllerThree;
extern Gfx *gDisplayListHead;
extern s32 D_800DDB20;
UNUSED void func_8001C42C(void) {
if (D_800DDB20 == 0) {
if ((gControllerThree->buttonPressed & 0x20) != 0) {
+66 -1
View File
@@ -5,7 +5,25 @@
#include "vehicles.h"
#include "waypoints.h"
// TODO: This header is missing some function prototypes
struct struct_801642D8 {
/* 0x0 */ u16 unk0;
/* 0x2 */ s16 ffff;
/* 0x4 */ s16 timer; // confirm?
/* 0x6 */ s16 laps; // confirm?
/* 0x8 */ s32 blank;
/* 0xC */ s32 unkC;
};
struct unk_41F8 {
s32 unk0;
s32 unk4;
s32 unk8;
u16 unkC;
u16 unkE;
s16 unk10;
s32 unk14;
s32 unk18;
};
/* Function Prototypes */
@@ -20,6 +38,7 @@ s32 func_80008E58(s32, s32);
void func_80008F38(s32);
void func_80009000(s32);
void func_800090F0(s32, Player*);
void func_800097E0();
void func_80009B60(s32);
s32 func_8000B7E4(s32, u16);
s32 func_8000B820(s32);
@@ -39,8 +58,17 @@ s16 func_8000D33C(f32, f32, f32, s16, s32);
s16 func_8000D6D0(Vec3f, s16*, f32, f32, s32, s32);
s16 func_8000D940(Vec3f, s16*, f32, f32, s32);
s16 func_8000DBAC(Vec3f, s16*, f32);
s32 func_8000ED14(s32, s16);
s32 func_8000ED80(s32);
s32 func_8000EDC8(s32);
void func_8000DF8C(s32);
s32 func_8000EE10(s32);
void func_8000EE58(s32);
void func_8000EEDC();
void func_8000EF20();
void func_8000F0E0();
void func_8000F124();
void func_8000F2BC(struct TrackWayPoint*, s32);
void func_80010218(s32);
f32 func_80010480(s32, u16);
void func_800107C4(s32);
@@ -49,13 +77,18 @@ void func_80010DBC(s32);
f32 func_80010F40(f32, f32, f32, s32);
f32 func_80010FA0(f32, f32, f32, s32);
s32 process_path_data(struct TrackWayPoint*, struct TrackWayPoint*);
void func_80011AB8(s32);
void func_80011AE4(s32);
void func_80012220(VehicleStuff*);
void func_800122D8();
void func_80012A48(TrainCarStuff*, s16);
f32 func_80013C74(s16, s16);
void func_80013D20(VehicleStuff*);
void func_80013F7C(s32, Player*, VehicleStuff*, f32, f32, s32, u32);
f32 func_800145A8(s16, f32, s16);
void func_800146B8(s32, s32, VehicleStuff*);
void func_80012AC0();
void func_800133C4();
void func_8001487C();
void func_800148C4(s32, Player*);
void func_8001490C(s32);
@@ -69,9 +102,17 @@ void func_80014C78();
void func_80014CC0(s32, Player*);
void func_80014D08(s32);
void func_80014D30(s32, s32);
void func_8001530C();
void func_8001968C();
void func_8001C05C();
void func_80019DE4();
void func_8001A0A4(s32, s32, s32, s32, s32);
void func_8001A0DC(s16*, Camera*, Player*, s8, s32);
s32 func_8001A310(s32, s32);
void func_8001ABE0(s32, s32);
void func_8001ABEC(struct struct_801642D8*);
void func_8001C3C4(s32);
void func_8001C42C();
/* This is where I'd put my static data, if I had any */
// 0 or 1, only 1 when when in extra (mirror) mode
@@ -85,4 +126,28 @@ extern f32 D_800DCA4C[];
// See bss_80005FD0.s
extern UnkActorInner D_80162E70;
extern s32 D_8016337C;
extern s32 gModeSelection;
extern f32 D_800ECFD8;// = 1.1f;
extern f32 D_800ECFDC;// = -1.1f;
extern struct unk_41F8 D_801641F8[];
extern s16 D_80164670;
extern s16 D_80164672;
extern s16 D_80164674;
extern s16 D_80164676;
extern s16 D_80164678;
extern s16 D_8016467A;
extern s16 D_8016467C;
extern s16 D_8016467E;
extern s16 D_801632B8[];
extern s16 D_801632D0[];
extern s16 D_801632E8[];
extern s16 D_801646CC;
extern u16 D_80163E2A;
extern Gfx D_0D0076F8[];
extern struct Controller *gControllerThree;
extern Gfx *gDisplayListHead;
extern s32 D_800DDB20;
#endif
+2 -2
View File
@@ -1162,7 +1162,7 @@ void func_800231D8(Player *player, s8 arg1) {
if (((gNearestWaypointByPlayerId[arg1] >= 0x15) && (gNearestWaypointByPlayerId[arg1] < 0x2A))
|| ((gNearestWaypointByPlayerId[arg1] >= 0x14D) && (gNearestWaypointByPlayerId[arg1] < 0x15C))
|| ((gNearestWaypointByPlayerId[arg1] >= 0x1D1) && (gNearestWaypointByPlayerId[arg1] < 0x1E4))
|| (player->unk_110.unk44 >= 500.0f)) {
|| (player->unk_110.unk3C[2] >= 500.0f)) {
func_80022F14(player, arg1, 0x340000, 0.3f);
func_80023038(player, arg1, 0x4040, 0.3f);
D_80164B80[arg1] = 0;
@@ -1356,7 +1356,7 @@ void func_80023C84(Player *player, s8 arg1, s8 arg2) {
|| ((player->unk_0BC & 0x10000) == 0x10000)
|| ((player->unk_0BC & 8) == 8)) {
var_f2 = (f32) (1.0 - ((f64) player->unk_110.unk44 * 0.02));
var_f2 = (f32) (1.0 - ((f64) player->unk_110.unk3C[2] * 0.02));
if (var_f2 < 0.0f) {var_f2 = 0.0f;}
if (var_f2 > 1.0f) {var_f2 = 1.0f;}
spB4[0] = player->unk_110.unk60[0];
+15 -15
View File
@@ -1435,7 +1435,7 @@ void func_8002AB70(Player *player) {
move_f32_towards(&player->unk_DAC, 1.0f, 0.07f);
}
} else {
if (player->unk_110.unk44 >= 50.0f) {
if (player->unk_110.unk3C[2] >= 50.0f) {
player->unk_DAC = 2.0f;
}
move_f32_towards(&player->unk_100, gKartGravityTable[player->characterId], 0.02f);
@@ -2137,7 +2137,7 @@ void func_8002C17C(Player *player, s8 playerId) {
case 4:
temp_v0_2 = playerId * 2;
temp_v1 = temp_v0_2 + &D_80165330;
if ((player->unk_110.unk44 >= 600.0f) && (*temp_v1 == 0)) {
if ((player->unk_110.unk3C[2] >= 600.0f) && (*temp_v1 == 0)) {
*temp_v1 = 1;
*(&D_80165320 + temp_v0_2) = gNearestWaypointByPlayerId[playerId];
*(&D_80165310 + temp_v0_2) = gPathIndexByPlayerId[playerId];
@@ -2204,7 +2204,7 @@ void func_8002C17C(Player *player, s8 playerId) {
case 13:
temp_v0_8 = playerId * 2;
temp_v1_5 = temp_v0_8 + &D_80165330;
if ((player->unk_110.unk44 >= 600.0f) && (*temp_v1_5 == 0)) {
if ((player->unk_110.unk3C[2] >= 600.0f) && (*temp_v1_5 == 0)) {
*temp_v1_5 = 1;
*(&D_80165320 + temp_v0_8) = gNearestWaypointByPlayerId[playerId];
*(&D_80165310 + temp_v0_8) = gPathIndexByPlayerId[playerId];
@@ -2286,10 +2286,10 @@ void func_8002C4F8(Player *player, s8 arg1) {
if ((temp_v0_2 == 6) || (temp_v0_2 == 0x0010) || (temp_v0_2 == 0x000D)) {
player->unk_0DE &= 0xFFF3;
}
if ((player->boundingBoxSize < (*var_a2 - player->pos[1])) && (player->unk_110.unk44 >= 600.0f)) {
if ((player->boundingBoxSize < (*var_a2 - player->pos[1])) && (player->unk_110.unk3C[2] >= 600.0f)) {
player->unk_0CA |= 1;
}
if (player->unk_110.unk44 >= 600.0f) {
if (player->unk_110.unk3C[2] >= 600.0f) {
player->unk_0CA |= 0x100;
} else if ((player->unk_0BC & 8) != 8) {
player->unk_0CA &= 0xFEFF;
@@ -2880,7 +2880,7 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) {
}
player->unk_0BC |= 8;
player->unk_0C2 += 1;
spA8 = player->unk_110.unk44;
spA8 = player->unk_110.unk3C[2];
if (spA8 <= 0.0f) {
temp_v0_7 = player->unk_0C2;
temp_t4_2 = player->unk_0BC & ~2;
@@ -2937,7 +2937,7 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) {
player->unk_0C2 = 0;
player->kartHopVelocity = (f32) player->unk_0C2;
}
spA8 = player->unk_110.unk44;
spA8 = player->unk_110.unk3C[2];
if (spA8 <= 0.0f) {
func_8003F46C(player, &sp8C, &sp98, &sp178, &spA8, &spFC, &spF8, &spF4);
}
@@ -3026,7 +3026,7 @@ void func_8002D268(Player *player, Camera *camera, s8 arg2, s8 arg3) {
player->unk_034[2] *= temp_f0_9;
}
}
if (player->unk_110.unk44 >= 500.0f) {
if (player->unk_110.unk3C[2] >= 500.0f) {
player->unk_078 = (s16) ((s16) player->unk_078 / 2);
}
func_8002C4F8(player, arg3);
@@ -3216,7 +3216,7 @@ void func_8002E594(Player *player, Camera *camera, s8 arg2, s8 arg3) {
player->unk_058 = 0.0f;
player->unk_060 = 0.0f;
player->unk_05C = 1.0f;
sp74 = player->unk_110.unk44;
sp74 = player->unk_110.unk3C[2];
if (sp74 <= 0.0f) {
temp_t1 = player->unk_0BC & ~2;
temp_t5 = temp_t1 & ~8;
@@ -3287,7 +3287,7 @@ block_63:
}
player->kartHopVelocity = (f32) player->unk_0C2;
}
sp74 = player->unk_110.unk44;
sp74 = player->unk_110.unk3C[2];
if (sp74 <= 0.0f) {
func_8003F46C(player, &sp48, &sp54, &spE0, &sp74, &spD0, &spCC, &spC8);
}
@@ -3595,7 +3595,7 @@ void func_8002F730(Player *player, Camera *camera, s8 arg2, s8 arg3) {
player->unk_05C = 1.0f;
func_802B6540(sp4C, 0.0f, 1.0f, 0.0f, (s32) player->unk_02E);
player->unk_0BC &= ~8;
sp78 = player->unk_110.unk44;
sp78 = player->unk_110.unk3C[2];
if (sp78 <= 0.0f) {
func_8003F46C(player, &sp5C, &sp68, &spE8, &sp78, &spCC, &spC8, &spC4);
}
@@ -6461,7 +6461,7 @@ void func_80037CFC(Player *player, struct Controller *controller, u8 arg2) {
temp_v0_2 = player->unk_0BC;
if ((temp_v0_2 & 8) != 8) {
func_80033AE0(player, controller, (s8) arg2);
} else if (((temp_v0_2 & 2) == 2) && (player->unk_110.unk44 <= 5.0f)) {
} else if (((temp_v0_2 & 2) == 2) && (player->unk_110.unk3C[2] <= 5.0f)) {
func_80033AE0(player, controller, (s8) arg2);
}
temp_t4 = player->unk_0BC & ~1;
@@ -6950,7 +6950,7 @@ void func_80038C6C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
func_802B6540(sp50, 0.0f, 1.0f, 0.0f, (s32) player->unk_02E);
player->unk_0BC |= 8;
player->unk_0C2 += 1;
sp98 = player->unk_110.unk44;
sp98 = player->unk_110.unk3C[2];
if (sp98 <= 0.0f) {
player->unk_0C2 = 0;
temp_t6 = player->unk_0BC & ~2;
@@ -6958,7 +6958,7 @@ void func_80038C6C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
player->unk_0BC = temp_t6 & ~8;
player->kartHopVelocity = (f32) player->unk_0C2;
}
sp98 = player->unk_110.unk44;
sp98 = player->unk_110.unk3C[2];
if (sp98 <= 0.0f) {
func_8003F46C(player, &sp7C, &sp88, &sp108, &sp98, &spEC, &spE8, &spE4);
}
@@ -7018,7 +7018,7 @@ void func_80038C6C(Player *player, Camera *camera, s8 arg2, s8 arg3) {
player->unk_034[2] *= temp_f0_4;
}
}
if (player->unk_110.unk44 >= 500.0f) {
if (player->unk_110.unk3C[2] >= 500.0f) {
player->unk_078 = (s16) ((s16) player->unk_078 / 2);
}
func_8002C4F8(player, arg3);
+43 -43
View File
@@ -59,9 +59,9 @@ UNUSED void func_8003DE4C(Player *player, Vec3f arg1) {
}
void func_8003E048(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
*arg5 += arg1[0] * player->unk_110.unk44 * 1;
*arg6 += arg1[1] * player->unk_110.unk44 * 0.1;
*arg7 += arg1[2] * player->unk_110.unk44 * 1;
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.1;
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
func_8002A5F4(arg1, *arg4, arg2, 1, 2);
if (player->unk_110.unk60[1] <= 0.8829f) {
arg3[0] = ((player->unk_206 / 182) * 0xB4);
@@ -85,9 +85,9 @@ void func_8003E048(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
}
void func_8003E37C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
*arg5 += arg1[0] * player->unk_110.unk44 * 1;
*arg6 += arg1[1] * player->unk_110.unk44 * 0.2;
*arg7 += arg1[2] * player->unk_110.unk44 * 1;
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.2;
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
func_8002A5F4(arg1, *arg4, arg2, 0.5f, 2);
if ((player->unk_110.unk60[1] <= 0.7318f) || (player->unk_0F8 == 0x000C)) {
arg3[0] = ((player->unk_206 / 182) * 0xB4);
@@ -113,9 +113,9 @@ void func_8003E37C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
}
void func_8003E6EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
*arg5 += arg1[0] * player->unk_110.unk44 * 1;
*arg6 += arg1[1] * player->unk_110.unk44 * 0.1;
*arg7 += arg1[2] * player->unk_110.unk44 * 1;
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.1;
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
func_8002A5F4(arg1, *arg4, arg2, 0.5f, 2);
if (player->unk_110.unk60[1] <= 0.8829f) {
arg3[0] = ((player->unk_206 / 182) * 0xB4);
@@ -134,9 +134,9 @@ void func_8003E6EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
}
void func_8003E9EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
*arg5 += arg1[0] * player->unk_110.unk44 * 1;
*arg6 += arg1[1] * player->unk_110.unk44 * 0.1;
*arg7 += arg1[2] * player->unk_110.unk44 * 1;
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.1;
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
func_8002A5F4(arg1, *arg4, arg2, 1.2f, 2);
if (player->unk_110.unk60[1] <= 0.8357f) {
arg3[0] = ((player->unk_206 / 182) * 0x78);
@@ -165,9 +165,9 @@ void func_8003E9EC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
}
void func_8003EE2C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
*arg5 += arg1[0] * player->unk_110.unk44 * 1;
*arg6 += arg1[1] * player->unk_110.unk44 * 0.1;
*arg7 += arg1[2] * player->unk_110.unk44 * 1;
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.1;
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
func_8002A5F4(arg1, *arg4, arg2, 0.5f, 2);
if (player->unk_110.unk60[1] <= 0.8357f) {
arg3[0] = ((player->unk_206 / 182) * 0x78);
@@ -186,9 +186,9 @@ void func_8003EE2C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
}
void func_8003F138(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4, f32 *arg5, f32 *arg6, f32 *arg7) {
*arg5 += arg1[0] * player->unk_110.unk44 * 1;
*arg6 += arg1[1] * player->unk_110.unk44 * 0.1;
*arg7 += arg1[2] * player->unk_110.unk44 * 1;
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 0.1;
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
func_8002A5F4(arg1, *arg4, arg2, 0.5f, 2);
if (player->unk_0F8 == 8) {
player->unk_044 &= ~1;
@@ -217,9 +217,9 @@ void func_8003F46C(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
arg1[1] = -player->unk_110.unk60[1];
arg1[2] = -player->unk_110.unk60[2];
if ((player->unk_110.unk60[1] < 0.0f) && ((player->unk_0CA & 2) == 0)) {
*arg5 += arg1[0] * player->unk_110.unk44 * 1;
*arg6 += arg1[1] * player->unk_110.unk44 * 1;
*arg7 += arg1[2] * player->unk_110.unk44 * 1;
*arg5 += arg1[0] * player->unk_110.unk3C[2] * 1;
*arg6 += arg1[1] * player->unk_110.unk3C[2] * 1;
*arg7 += arg1[2] * player->unk_110.unk3C[2] * 1;
func_8002A5F4(arg1, *arg4, arg2, 1.2f, 0.0f);
player->kartHopJerk = 0.0f;
player->kartHopAcceleration = 0.0f;
@@ -265,39 +265,39 @@ void func_8003F734(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
arg1[1] = -player->unk_110.unk48[1];
arg1[2] = -player->unk_110.unk48[2];
if (player->unk_110.unk48[1] == 0) {
*arg4 += arg1[0] * player->unk_110.unk3C * 1;
*arg5 += arg1[1] * player->unk_110.unk3C * 0.1;
*arg6 += arg1[2] * player->unk_110.unk3C * 1;
*arg4 += arg1[0] * player->unk_110.unk3C[0] * 1;
*arg5 += arg1[1] * player->unk_110.unk3C[0] * 0.1;
*arg6 += arg1[2] * player->unk_110.unk3C[0] * 1;
if ((player->unk_0C4 < 0) && (((player->unk_094 / 18.0f) * 216.0f) < 10.0f)) {
func_8002A5F4(arg1, *arg3, arg2, 2.5f, 0);
} else {
func_8002A5F4(arg1, *arg3, arg2, 0.5f, 0);
}
} else if (player->unk_110.unk48[1] <= 0.5) {
*arg4 += arg1[0] * player->unk_110.unk3C * 1;
*arg5 += arg1[1] * player->unk_110.unk3C * 0.1;
*arg6 += arg1[2] * player->unk_110.unk3C * 1;
*arg4 += arg1[0] * player->unk_110.unk3C[0] * 1;
*arg5 += arg1[1] * player->unk_110.unk3C[0] * 0.1;
*arg6 += arg1[2] * player->unk_110.unk3C[0] * 1;
func_8002A5F4(arg1, *arg3, arg2, 1, 0);
if (((player->unk_0BC << 0xF) >= 0) && ((player->unk_0BC & 8) == 0)) {
arg2[1] *= -1e-05;
}
} else {
*arg4 += arg1[0] * player->unk_110.unk3C * 1;
temp_f0_2 = arg1[1] * player->unk_110.unk3C;
*arg4 += arg1[0] * player->unk_110.unk3C[0] * 1;
temp_f0_2 = player->unk_110.unk3C[0] * arg1[1];
if (temp_f0_2 < 0) {
*arg5 += temp_f0_2 * 0.1;
} else {
*arg5 += temp_f0_2 * 0;
}
*arg6 += arg1[2] * player->unk_110.unk3C * 1;
*arg6 += arg1[2] * player->unk_110.unk3C[0] * 1;
func_8002A5F4(arg1, *arg3, arg2, 1.2f, 0);
if (((player->unk_0BC << 0xF) >= 0) && ((player->unk_0BC & 8) == 0)) {
arg2[1] *= -1e-05;
}
}
player->unk_0BC &= ~0x10;
temp_f12 = arg1[0] * player->unk_110.unk3C;
temp_f14 = arg1[2] * player->unk_110.unk3C;
temp_f12 = player->unk_110.unk3C[0] * arg1[0];
temp_f14 = player->unk_110.unk3C[0] * arg1[2];
if (((temp_f12 >= 0) && (temp_f14 >= 0)) || ((temp_f12 < 0) && (temp_f14 >= 0))) {
temp_f0_2 = player->boundingBoxSize / 2;
player->unk_218 = *arg4 - temp_f12 - temp_f0_2;
@@ -319,39 +319,39 @@ void func_8003FBAC(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32 *arg4
arg1[1] = -player->unk_110.unk54[1];
arg1[2] = -player->unk_110.unk54[2];
if (player->unk_110.unk54[1] == 0) {
*arg4 += arg1[0] * player->unk_110.unk40 * 1;
*arg5 += arg1[1] * player->unk_110.unk40 * 0.1;
*arg6 += arg1[2] * player->unk_110.unk40 * 1;
*arg4 += arg1[0] * player->unk_110.unk3C[1] * 1;
*arg5 += arg1[1] * player->unk_110.unk3C[1] * 0.1;
*arg6 += arg1[2] * player->unk_110.unk3C[1] * 1;
if ((player->unk_0C4 < 0) && (((player->unk_094 / 18.0f) * 216.0f) < 10.0f)) {
func_8002A5F4(arg1, *arg3, arg2, 1.5f, 0);
} else {
func_8002A5F4(arg1, *arg3, arg2, 0.5f, 0);
}
} else if (player->unk_110.unk54[1] <= 0.5) {
*arg4 += arg1[0] * player->unk_110.unk40 * 1;
*arg5 += arg1[1] * player->unk_110.unk40 * 0.1;
*arg6 += arg1[2] * player->unk_110.unk40 * 1;
*arg4 += arg1[0] * player->unk_110.unk3C[1] * 1;
*arg5 += arg1[1] * player->unk_110.unk3C[1] * 0.1;
*arg6 += arg1[2] * player->unk_110.unk3C[1] * 1;
func_8002A5F4(arg1, *arg3, arg2, 1, 0);
if (((player->unk_0BC << 0xF) >= 0) && ((player->unk_0BC & 8) == 0)) {
arg2[1] *= -1e-05;
}
} else {
*arg4 += arg1[0] * player->unk_110.unk40 * 1;
temp_f0_2 = arg1[1] * player->unk_110.unk40;
*arg4 += arg1[0] * player->unk_110.unk3C[1] * 1;
temp_f0_2 = player->unk_110.unk3C[1] * arg1[1];
if (temp_f0_2 < 0) {
*arg5 += temp_f0_2 * 0.1;
} else {
*arg5 += temp_f0_2 * 0;
}
*arg6 += arg1[2] * player->unk_110.unk40 * 1;
*arg6 += arg1[2] * player->unk_110.unk3C[1] * 1;
func_8002A5F4(arg1, *arg3, arg2, 1.2f, 0);
if (((player->unk_0BC << 0xF) >= 0) && ((player->unk_0BC & 8) == 0)) {
arg2[1] *= -1e-05;
}
}
player->unk_0BC &= ~0x10;
temp_f12 = arg1[0] * player->unk_110.unk40;
temp_f14 = arg1[2] * player->unk_110.unk40;
temp_f12 = player->unk_110.unk3C[1] * arg1[0];
temp_f14 = player->unk_110.unk3C[1] * arg1[2];
if (((temp_f12 >= 0) && (temp_f14 >= 0)) || ((temp_f12 >= 0) && (temp_f14 < 0))) {
temp_f0_2 = player->boundingBoxSize / 2;
player->unk_218 = *arg4 - temp_f12 - temp_f0_2;
+22
View File
@@ -264,6 +264,7 @@ void func_8004FC78(s16, s16, s8);
void func_80050320();
void func_800514BC();
void func_80051638(s32);
void func_800517C8();
void func_80051EBC();
void func_80051EF8();
@@ -271,20 +272,41 @@ void func_80051F9C();
void func_80052044();
void func_80052080();
void func_8005217C(s32);
void func_800524B4(s32);
void func_800527D8(s32);
void func_80052590(s32);
void func_80052C60();
void func_80052E30(s32);
void func_8005327C(s32);
void func_800532A4(s32);
void func_80053870(s32);
void func_80053E6C(s32);
void func_800541BC(s32);
void func_80054414(s32);
void func_80054664(s32);
void func_80054938(s32);
void func_80054BE8(s32);
void func_800550A4(s32);
void func_80055228(s32);
void func_80055380(s32);
void func_80055528(s32);
void func_8005568C(s32);
void func_800557AC();
void func_8005592C(s32);
void func_80055C38(s32);
void func_80055E68(s32);
void func_80055F48(s32);
void func_80056160(s32);
void func_80056188(s32);
void func_800569F4(s32);
void func_80056A40(s32, s32);
void func_80056A94(s32);
void func_80056AC0(s32);
void func_80057330();
void func_80057338();
+1 -83
View File
@@ -13,7 +13,7 @@
#include "code_80071F00.h"
#include "code_80086E70.h"
#include "code_8008C1D0.h"
//#include "skybox_and_splitscreen.h" <- TODO: create this header file
#include "skybox_and_splitscreen.h"
// UI Code?
void func_80057C60(void) {
@@ -54,8 +54,6 @@ void func_80057CE4(void) {
}
}
extern s8 D_801657B2;
void func_80057DD0(void) {
if (D_801657B2 != 0) {
func_8004C024(0xF, 0xB, 0x122, 0, 0xFF, 0, 0xFF);
@@ -73,9 +71,6 @@ void func_80057DD0(void) {
}
}
extern u8 D_0D0076F8;
extern s8 D_801657C8;
extern s8 D_801657B0;
void func_80057FC4(u32 arg0) {
UNUSED Gfx *temp_v1;
@@ -110,8 +105,6 @@ void func_80057FC4(u32 arg0) {
}
extern s32 D_8018D22C;
void func_80058090(u32 arg0) {
UNUSED Gfx *temp_v1;
@@ -166,9 +159,6 @@ void func_80058090(u32 arg0) {
}
}
void func_8005217C(s32);
extern s32 gGamestate;
extern u16 D_800DC51C;
void func_800581C8(void) {
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
@@ -297,33 +287,6 @@ void func_8005884C(void) {
func_80058B58(3);
}
void func_80051638(s32);
void func_800524B4(s32);
void func_80052590(s32);
void func_800527D8(s32);
void func_80052E30(s32);
void func_8005327C(s32);
void func_80053870(s32);
void func_80053E6C(s32);
void func_800541BC(s32);
void func_80054414(s32);
void func_80054664(s32);
void func_80054938(s32);
void func_800550A4(s32);
void func_80055228(s32);
void func_80055380(s32);
void func_80055528(s32);
void func_8005568C(s32);
void func_8005592C(s32);
void func_80055C38(s32);
void func_80055E68(s32);
void func_80056188(s32);
void func_80056AC0(s32);
extern s16 D_80165730;
extern s8 D_8018EDF3;
extern s8 D_80165898;
void func_800588F4(s32 arg0) {
switch (gCurrentCourseId) {
@@ -422,8 +385,6 @@ void func_800588F4(s32 arg0) {
}
}
extern u16 D_8015F894;
void func_80058B58() {
switch(gCurrentCourseId) {
case 5:
@@ -441,8 +402,6 @@ void func_80058B58() {
}
}
extern u8 D_0D0076F8;
void func_80058BF4(void) {
gSPDisplayList(gDisplayListHead++, &D_0D0076F8);
}
@@ -582,19 +541,12 @@ void func_80058DB4(u32 arg0) {
}
}
extern s8 D_801657B0;
void func_80058F48(void) {
if (D_801657B0 == 0) {
func_80041EF4();
}
}
extern s8 D_801657D8;
extern s8 D_801657E4;
extern s8 D_801657E6;
extern s32 D_8018D188;
void func_80058F78(void) {
if (D_801657B0 == 0) {
func_80041EF4();
@@ -616,8 +568,6 @@ void func_80059024(void) {
}
extern s32 D_8018D2AC;
void func_8005902C(void) {
if (D_8018D2AC != 0) {
@@ -641,8 +591,6 @@ void func_8005902C(void) {
}
}
extern s32 D_8018D2A4;
void func_800590D4(void) {
if (D_8018D2A4 != 0) {
if (gModeSelection != 3) {
@@ -673,14 +621,6 @@ void func_800590D4(void) {
}
}
extern u16 D_800DC5B8;
extern s8 D_801657E8;
extern s8 D_801657F0;
extern s8 D_80165800;
extern s8 D_80165801;
extern s32 D_8018D188;
extern s32 D_8018D2BC;
void func_800591B4(void) {
if ((D_801657B0 == 0) && (D_800DC5B8 != 0)) {
@@ -775,9 +715,6 @@ void func_800593F8(void) {
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_800593F8.s")
#endif
extern s8 D_80165800;
extern s32 D_8018D188;
void func_80059488(s32 arg0) {
if ((gModeSelection != BATTLE) && (*(&D_80165800 + arg0) == 0) && (D_8018D188 != 0)) {
func_8004FA78(arg0);
@@ -790,8 +727,6 @@ void func_800594F0(void) {
}
extern s8 D_801657B0;
void func_800594F8(void) {
if (D_801657B0 == 0) {
func_80059488(0);
@@ -848,8 +783,6 @@ void func_80059560(s32 playerId) {
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80059560.s")
#endif
extern s8 D_801657B0;
void func_800596A8(void) {
if (D_801657B0 == 0) {
func_80041EF4();
@@ -867,8 +800,6 @@ void func_80059710(void) {
}
extern s8 D_801657B0;
void func_80059718(void) {
if (D_801657B0 == 0) {
func_80041EF4();
@@ -876,16 +807,12 @@ void func_80059718(void) {
}
}
extern s8 D_801657B0;
void func_80059750(void) {
if (D_801657B0 == 0) {
func_80041EF4();
}
}
extern s8 D_801657B0;
void func_80059780(void) {
if (D_801657B0 == 0) {
func_80041EF4();
@@ -893,16 +820,12 @@ void func_80059780(void) {
}
}
extern s8 D_801657B0;
void func_800597B8(void) {
if (D_801657B0 == 0) {
func_80041EF4();
}
}
extern s8 D_801657B0;
void func_800597E8(void) {
if (D_801657B0 == 0) {
func_80041EF4();
@@ -931,8 +854,6 @@ void func_80059820(s32 playerId) {
GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80059820.s")
#endif
extern u8 D_801658FF;
extern struct Controller *gControllerOne;
void func_800598D4(s32 arg0) {
struct Controller *controller = &gControllerOne[arg0];
@@ -947,8 +868,6 @@ void func_800598D4(s32 arg0) {
}
}
extern s32 D_8018D214;
void func_8005994C(void) {
D_8018D214 = 1;
}
@@ -2507,7 +2426,6 @@ void func_8005C64C(s32 arg0) {
void func_8005C654(s32 *arg0) {
*arg0 = 0;
}
extern s32 D_8018D2C8[];
void func_8005C65C(s32 arg0) {
D_8018D2C8[arg0] = 1;
+44 -2
View File
@@ -76,6 +76,8 @@ void func_8005B914();
void func_8005C360(f32);
void func_8005C64C(s32);
void func_8005C654(s32*);
void func_8005C65C(s32);
void func_8005C6B4(s8, s16*, s16*, s16*);
void func_8005C728();
void func_8005CB60(s32, s32);
@@ -84,6 +86,25 @@ void func_8005D0FC(s32);
void func_8005D18C();
void func_8005D1F4(s32);
void func_8005D6C0(Player*);
void func_8005D794(Player*, UnkPlayerStruct258*, f32, f32, f32, s8, s8);
void func_8005D7D8(UnkPlayerStruct258*, s8, f32);
void func_8005D800(UnkPlayerStruct258*, s32, s16);
void func_8005D82C(UnkPlayerStruct258*, s32, s16);
void func_8005D898(Player*, s16, s8, s8);
void func_8005DAD0();
void func_8005DAD8(UnkPlayerStruct258*, s16, s16, s16);
void func_80060F50(Player*, s16, s8, s8);
void func_80061094(Player*, s16, s8, s8);
void func_80061130(Player*, s16, s8, s8);
void func_800621BC(Player*, s16, s32, s8);
void func_80062484(Player*, UnkPlayerStruct258*, s32);
void func_800628C0(Player*, s8, s8, s8);
void func_80062914(Player*, s8, s8, s8);
void func_80062968(Player*, s8, s8, s8);
void func_800629BC(Player*, s8, s8, s8);
void func_80062A18(Player*, s8, s8, s8);
void func_80062AA8(Player*, s8, s8, s8);
void func_80062B18(f32*, f32*, f32*, f32, f32, f32, u16, u16);
void func_80062F98(Player*, s16, s8, s8);
@@ -96,6 +117,7 @@ void func_800639DC(Player*, s16, s8, s8);
void func_80063BD4(Player*, s16, s8, s8);
void func_80063D58(Player*, s16, s8, s8);
void func_80064184(Player*, s16, s8, s8);
void func_800643A8(Player*, s16, s8, s8);
void func_800647C8(Player*, s16, s8, s8);
void func_800648E4(Player*, s16, s8, s8);
@@ -153,10 +175,30 @@ void func_8006E848(Player*, s8, s8);
void func_8006E8C4(Player*, s8, s8);
void func_8006E940(Player*, s8, s8);
// skybox_and_splitscreen
void func_802A3730(struct UnkStruct_800DC5EC*);
extern s8 D_801657B2;
extern s8 D_801657C8;
extern s32 D_8018D22C;
extern s32 gGamestate;
extern u16 D_800DC51C;
extern s16 D_80165730;
extern s8 D_8018EDF3;
extern s8 D_80165898;
extern u16 D_8015F894;
extern Gfx D_0D0076F8[];
extern s8 D_801657E4;
extern s8 D_801657E6;
extern s32 D_8018D2AC;
extern u16 D_800DC5B8;
extern s8 D_801657F0;
extern s8 D_80165800;
extern s8 D_80165801;
extern s8 D_801657B0;
extern u8 D_801658FF;
extern struct Controller *gControllerOne;
extern s32 D_8018D214;
extern s32 D_8018D2C8[];
extern u16 gPlayerBalloonStatus[8][3]; // D_8018D5F0
extern s16 gPlayerBalloonCount[]; // D_8018D8C0
+125 -134
View File
@@ -389,233 +389,224 @@ GLOBAL_ASM("asm/non_matchings/code_8006E9C0/func_8006EF60.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
? func_8006EEE8(s16); /* extern */
s32 func_802A84F4(? *, ?, ?, s16); /* extern */
extern ? D_0F0D0E50;
extern ? gTextureExhaust0;
extern ? gTextureExhaust1;
extern ? gTextureExhaust2;
extern ? gTextureExhaust3;
extern ? gTextureExhaust4;
extern ? gTextureExhaust5;
extern s32 D_801655C8;
extern s16 D_80165718;
extern s16 D_80165720;
extern s16 D_80165728;
extern s32 D_80165880;
extern f32 D_8018D01C;
extern s32 D_8018D220;
extern f32 D_8018D2A0;
extern s16 D_8018D2B0;
extern s16 D_8018D2C0;
extern s16 D_8018D2D8;
extern s16 D_8018D2E0;
extern s16 D_8018D2E8;
extern s16 D_8018D300;
extern s16 D_8018D308;
extern s16 D_8018D310;
extern s16 D_8018D318;
static ? gTextureExhaust0; /* unable to generate initializer */
static ? gTextureExhaust1; /* unable to generate initializer */
static ? gTextureExhaust2; /* unable to generate initializer */
static ? gTextureExhaust3; /* unable to generate initializer */
static ? gTextureExhaust4; /* unable to generate initializer */
static ? gTextureExhaust5; /* unable to generate initializer */
s16 gCurrentCourseId; /* unable to generate initializer */
void func_8006F008(void) {
s16 temp_a0;
s16 var_t9;
s8 temp_v0;
u32 phi_a0;
s16 phi_t9;
s16 *phi_v1;
s16 *phi_t0;
D_801655C8 = 0;
D_8018D01C = 1.0f;
if (gIsMirrorMode != 0) {
D_8018D01C = -1.0f;
}
D_8018D2C0 = 0x101;
D_8018D2D8 = 0xAA;
D_8018D300 = 0xFF;
D_8018D308 = 0xFF;
D_8018D2C0.unk0 = 0x0101;
D_8018D2D8.unk0 = 0x00AA;
D_8018D300 = 0x00FF;
D_8018D308 = 0x00FF;
temp_a0 = gCurrentCourseId;
D_8018D310 = 0xFF;
D_8018D318 = 0xFF;
phi_a0 = temp_a0;
D_8018D310 = 0x00FF;
D_8018D318 = 0x00FF;
if (temp_a0 < 0x14) {
func_8006EEE8(temp_a0);
phi_a0 = gCurrentCourseId;
}
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
switch (phi_a0) {
switch ((u32) gCurrentCourseId) {
case 0:
D_8018D220 = func_802A84F4(&gTextureExhaust5, 0x443, 0x1000, 0xFF);
D_8018D220 = func_802A84F4((s32) &gTextureExhaust5, 0x00000443U, 0x00001000U);
D_8018D2A0 = 0.022f;
D_8018D2E0 = 6;
D_8018D2E8 = 0x1C;
D_8018D2C0 = 0x104;
D_8018D2D8 = 0xAA;
D_8018D2E8 = 0x001C;
D_8018D2C0.unk0 = 0x0104;
D_8018D2D8.unk0 = 0x00AA;
D_80165718 = 0;
D_80165720 = 5;
D_80165728 = -0xF0;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_80165728 = -0x00F0;
break;
case 1:
D_8018D2A0 = 0.022f;
D_8018D2C0 = 0x109;
D_8018D2E0 = 0x13;
phi_t9 = 0x25;
D_8018D2C0.unk0 = 0x0109;
D_8018D2E0 = 0x0013;
var_t9 = 0x0025;
block_26:
D_8018D2E8 = phi_t9;
D_8018D2E8 = var_t9;
break;
case 2:
D_8018D2C0 = 0x109;
D_8018D2C0.unk0 = 0x0109;
D_8018D2A0 = 0.0174f;
D_8018D2E0 = 0xC;
D_8018D2E8 = 0x30;
D_8018D2E0 = 0x000C;
D_8018D2E8 = 0x0030;
break;
case 3:
D_80165880 = func_802A84F4(&D_0F0D0E50, 0x4CC2, 0xD980, 0xFF);
D_80165880 = func_802A84F4((s32) &D_0F0D0E50, 0x00004CC2U, 0x0000D980U);
D_8018D2A0 = 0.016f;
D_8018D2C0 = 0x106;
D_8018D2E0 = 0x37;
D_8018D2E8 = 0x27;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_8018D2C0.unk0 = 0x0106;
D_8018D2E0 = 0x0037;
D_8018D2E8 = 0x0027;
break;
case 4:
D_8018D220 = func_802A84F4(&gTextureExhaust0, 0x479, 0xC00, 0xFF);
D_8018D220 = func_802A84F4((s32) &gTextureExhaust0, 0x00000479U, 0x00000C00U);
D_8018D2A0 = 0.018f;
D_8018D2E0 = 0x3D;
D_8018D2E8 = 0x26;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_8018D2E0 = 0x003D;
D_8018D2E8 = 0x0026;
break;
case 5:
D_8018D2C0 = 0x106;
D_8018D2C0.unk0 = 0x0106;
D_8018D2A0 = 0.016f;
D_8018D2E0 = 0x24;
D_8018D2E8 = 0x28;
D_8018D300 = 0x48;
D_8018D308 = 0x64;
D_8018D310 = 0xFF;
D_8018D2E0 = 0x0024;
D_8018D2E8 = 0x0028;
D_8018D300 = 0x0048;
D_8018D308 = 0x0064;
D_8018D310 = 0x00FF;
break;
case 6:
D_8018D220 = func_802A84F4(&gTextureExhaust3, 0x3C8, 0x1000, 0xFF);
D_8018D220 = func_802A84F4((s32) &gTextureExhaust3, 0x000003C8U, 0x00001000U);
D_8018D2A0 = 0.014f;
D_8018D2C0 = 0x10C;
D_8018D2E0 = 0x28;
D_8018D2E8 = 0x15;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_8018D2C0.unk0 = 0x010C;
D_8018D2E0 = 0x0028;
D_8018D2E8 = 0x0015;
break;
case 7:
D_8018D220 = func_802A84F4(&gTextureExhaust4, 0x3F8, 0x1000, 0xFF);
D_8018D2C0 = 0x106;
D_8018D220 = func_802A84F4((s32) &gTextureExhaust4, 0x000003F8U, 0x00001000U);
D_8018D2C0.unk0 = 0x0106;
D_8018D2A0 = 0.014f;
D_8018D2E0 = 0x25;
D_8018D2E8 = 0x32;
D_80165718 = -0x40;
D_8018D2E0 = 0x0025;
D_8018D2E8 = 0x0032;
D_80165718 = -0x0040;
D_80165720 = 5;
D_80165728 = -0x14A;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_80165728 = -0x014A;
break;
case 8:
D_8018D220 = func_802A84F4(&gTextureExhaust2, 0x4F4, 0xC00, 0xFF);
D_8018D220 = func_802A84F4((s32) &gTextureExhaust2, 0x000004F4U, 0x00000C00U);
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0x10F;
D_8018D2E0 = 0x2D;
D_8018D2E8 = 0x3C;
D_80165718 = -0x8C;
D_80165720 = -0x2C;
D_80165728 = -0xD7;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_8018D2C0.unk0 = 0x010F;
D_8018D2E0 = 0x002D;
D_8018D2E8 = 0x003C;
D_80165718 = -0x008C;
D_80165720 = -0x002C;
D_80165728 = -0x00D7;
break;
case 9:
D_8018D220 = func_802A84F4(&gTextureExhaust0, 0x479, 0xC00, 0xFF);
D_8018D220 = func_802A84F4((s32) &gTextureExhaust0, 0x00000479U, 0x00000C00U);
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0x10F;
D_8018D2E0 = 0x12;
D_8018D2E8 = 0x24;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_8018D2C0.unk0 = 0x010F;
D_8018D2E0 = 0x0012;
D_8018D2E8 = 0x0024;
break;
case 10:
D_8018D2A0 = 0.013f;
D_8018D2C0 = 0xFC;
D_8018D2E0 = 0x39;
D_8018D2E8 = 0x2C;
D_8018D2C0.unk0 = 0x00FC;
D_8018D2E0 = 0x0039;
D_8018D2E8 = 0x002C;
break;
case 11:
D_8018D2C0 = 0x107;
D_8018D2D8 = 0xA5;
D_8018D220 = func_802A84F4(&gTextureExhaust5, 0x443, 0x1000, 0xFF);
D_8018D2C0.unk0 = 0x0107;
D_8018D2D8.unk0 = 0x00A5;
D_8018D220 = func_802A84F4((s32) &gTextureExhaust5, 0x00000443U, 0x00001000U);
D_8018D2A0 = 0.015f;
D_8018D2E0 = 0x37;
D_8018D2E8 = 0x1B;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_8018D2E0 = 0x0037;
D_8018D2E8 = 0x001B;
break;
case 12:
D_8018D220 = func_802A84F4(&gTextureExhaust1, 0x485, 0xC00, 0xFF);
D_8018D220 = func_802A84F4((s32) &gTextureExhaust1, 0x00000485U, 0x00000C00U);
D_8018D2A0 = 0.015f;
D_8018D2C0 = 0x106;
D_8018D2E0 = 0x34;
D_8018D2E8 = 0x21;
D_8018D300 = 0x48;
D_8018D308 = 0x64;
D_8018D310 = 0xFF;
phi_v1 = &D_8018D2C0;
phi_t0 = &D_8018D2D8;
D_8018D2C0.unk0 = 0x0106;
D_8018D2E0 = 0x0034;
D_8018D2E8 = 0x0021;
D_8018D300 = 0x0048;
D_8018D308 = 0x0064;
D_8018D310 = 0x00FF;
break;
case 13:
D_8018D2A0 = 0.0103f;
D_8018D2C0 = 0x105;
D_8018D2D8 = 0xA6;
D_8018D2E0 = 0x27;
D_8018D2E8 = 0x37;
D_8018D2C0.unk0 = 0x0105;
D_8018D2D8.unk0 = 0x00A6;
D_8018D2E0 = 0x0027;
D_8018D2E8 = 0x0037;
break;
case 14:
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0x106;
D_8018D2E0 = 0x35;
D_8018D2E8 = 0x23;
D_8018D2C0.unk0 = 0x0106;
D_8018D2E0 = 0x0035;
D_8018D2E8 = 0x0023;
break;
case 15:
D_8018D2A0 = 0.0335f;
D_8018D2E0 = 0x20;
D_8018D2E8 = 0x20;
D_8018D2E0 = 0x0020;
D_8018D2E8 = 0x0020;
break;
case 16:
D_8018D2A0 = 0.0445f;
D_8018D2E0 = 0x20;
D_8018D2E8 = 0x20;
D_8018D2E0 = 0x0020;
D_8018D2E8 = 0x0020;
break;
case 17:
D_8018D2A0 = 0.0285f;
D_8018D2E0 = 0x20;
D_8018D2E8 = 0x20;
D_8018D2E0 = 0x0020;
D_8018D2E8 = 0x0020;
break;
case 18:
D_8018D2A0 = 0.0155f;
D_8018D2C0 = 0xFF;
D_8018D2E0 = 0x1D;
D_8018D2E8 = 0x2F;
D_8018D2C0.unk0 = 0x00FF;
D_8018D2E0 = 0x001D;
D_8018D2E8 = 0x002F;
break;
case 19:
D_8018D2A0 = 0.0257f;
D_8018D2E0 = 0x20;
phi_t9 = 0x1F;
D_8018D2E0 = 0x0020;
var_t9 = 0x001F;
goto block_26;
}
if (gIsMirrorMode != 0) {
D_8018D2E0 = D_8018D2B0 - D_8018D2E0;
}
temp_v0 = D_8018EDF3;
if (temp_v0 == FOUR_PLAYERS_SELECTED) {
phi_v1->unk0 = 0xA0;
phi_t0->unk0 = 0x78;
if (temp_v0 == 4) {
D_8018D2C0.unk0 = 0x00A0;
D_8018D2D8.unk0 = 0x0078;
return;
}
if (temp_v0 == THREE_PLAYERS_SELECTED) {
phi_v1->unk0 = 0xEB;
phi_t0->unk0 = 0xAF;
if (temp_v0 == 3) {
D_8018D2C0.unk0 = 0x00EB;
D_8018D2D8.unk0 = 0x00AF;
return;
}
if (temp_v0 == TWO_PLAYERS_SELECTED) {
if (gCurrentCourseId != 0xA) {
phi_v1->unk2 = 0x109;
phi_v1->unk0 = phi_v1->unk2;
if (temp_v0 == 2) {
if (gCurrentCourseId != 0x000A) {
D_8018D2C0.unk2 = 0x0109;
D_8018D2C0.unk0 = D_8018D2C0.unk2;
} else {
phi_v1->unk2 = 0xFF;
phi_v1->unk0 = phi_v1->unk2;
D_8018D2C0.unk2 = 0x00FF;
D_8018D2C0.unk0 = D_8018D2C0.unk2;
}
phi_t0->unk0 = 0x41;
phi_t0->unk2 = 0xB4;
D_8018D2D8.unk0 = 0x0041;
D_8018D2D8.unk2 = 0x00B4;
}
}
#else
+7 -12
View File
@@ -421,18 +421,14 @@ void func_800729D0(s32 arg0, s32 arg1) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8005AB20(); // extern
? func_80072488(s32); // extern
? func_8028EDA8(); // extern
extern ? D_8018CA70;
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s32 D_8018D2A4;
extern s32 D_8018D2BC;
s16 gCurrentCourseId; /* unable to generate initializer */
void func_800729EC(s32 arg0) {
s8 temp_v1;
u32 temp_v0;
? *phi_v0;
struct_8018CA70_entry *var_v0;
func_8028EDA8();
func_80072488(arg0);
@@ -440,13 +436,12 @@ void func_800729EC(s32 arg0) {
D_8018D2A4 = 1;
if (gCurrentCourseId != 4) {
temp_v1 = D_8018EDF3;
phi_v0 = &D_8018CA70;
var_v0 = D_8018CA70;
if (temp_v1 > 0) {
do {
temp_v0 = phi_v0 + 0x84;
temp_v0->unk-3 = 1;
phi_v0 = temp_v0;
} while (temp_v0 < ((temp_v1 * 0x84) + &D_8018CA70));
var_v0 += 0x84;
var_v0->unk-3 = 1;
} while ((u32) var_v0 < (u32) &D_8018CA70[temp_v1]);
}
}
func_8005AB20();
+3 -1
View File
@@ -127,6 +127,7 @@ void func_80076ED8(s32);
void func_800773D8(s32, s32);
void func_80077428(s32);
void func_80077640();
void func_80077AB0(Vec3f, s32);
void func_80077B14(s32);
void func_80077B3C(s32);
void func_80077BCC(s32);
@@ -143,6 +144,7 @@ void func_8007A884();
void func_8007A910(s32);
void func_8007A948(s32);
void func_8007AA44(s32);
void func_8007ABFC(s32, s32);
u8 gen_random_item(s16, s16);
u8 func_8007AF40(s32, s16);
u8 func_8007AF78(s32, s16);
@@ -186,7 +188,7 @@ void func_80086604();
void func_80086D80();
// audio/external.c
void func_800C9D80(Vec3f, f32*, s32);
void func_800C9D80(Vec3f, Vec3f, u32);
void func_800C9EF4(Vec3f, s32);
s32 osPiStartDma(OSIoMesg *mb, s32 priority, s32 direction, uintptr_t devAddr, void *vAddr, size_t nbytes, OSMesgQueue *mq);
+8 -10
View File
@@ -447,26 +447,24 @@ void func_80088150(s32 arg0) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 atan2s(f32, f32); // extern
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern ? D_80165760;
extern ? D_80165780;
extern ? D_80165C18;
void func_80088178(s32 arg0, s32 arg1) {
void func_80088178(s32 objectIndex, s32 arg1) {
s16 temp_a1;
struct_80165C18_entry *temp_v1;
u16 temp_a0;
void *temp_v1;
temp_v1 = (arg0 * 0xE0) + &D_80165C18;
temp_a0 = temp_v1->unkC0;
temp_a1 = atan2s(D_80165760.unk2 - D_80165760.unk0, D_80165780.unk2 - D_80165780.unk0) - temp_a0;
temp_v1 = &D_80165C18[objectIndex];
temp_a0 = temp_v1->unk_0C0;
temp_a1 = atan2s((f32) (D_80165760.unk2 - D_80165760.unk0), (f32) (D_80165780.unk2 - D_80165780.unk0)) - temp_a0;
if (temp_a1 > 0) {
temp_v1->unkC0 = temp_a0 + (arg1 << 8);
temp_v1->unk_0C0 = temp_a0 + (arg1 << 8);
return;
}
if (temp_a1 < 0) {
temp_v1->unkC0 = temp_a0 - (arg1 << 8);
temp_v1->unk_0C0 = temp_a0 - (arg1 << 8);
}
}
#else
+246 -296
View File
@@ -430,92 +430,74 @@ void func_8008CDC0(Player* player, s8 arg1) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_8008C73C(void *, s8, s16, s16); /* extern */
? func_800C90F4(u8, s32, s16, s16); /* extern */
void func_8008CEB0(void *arg0, s8 arg1) {
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
void func_8008CEB0(Player *player, s8 arg1) {
f32 sp2C;
s16 sp2A;
s16 sp28;
s16 sp26;
f32 temp_f0;
f32 temp_f0_2;
s16 temp_a3;
s16 temp_a3_2;
s16 temp_lo;
s16 temp_v1;
f32 var_f0;
s16 temp_a2;
s16 var_a2;
s16 var_a3;
s16 var_v1;
s32 temp_f16;
s32 temp_v0;
s32 temp_v0_2;
s16 phi_a2;
s16 phi_a3;
s32 phi_a2_2;
s16 phi_a2_3;
f32 phi_f0;
s16 phi_v1;
temp_v1 = arg0->unkB4 + 1;
temp_f0 = arg0->unkB8;
temp_a3 = arg0->unkAC;
temp_f16 = (temp_v1 * temp_f0) - (0.2 * (temp_v1 * temp_v1));
phi_a2 = temp_f16;
phi_a3 = temp_a3;
phi_f0 = temp_f0;
phi_v1 = temp_v1;
if ((temp_v1 != 0) && (temp_f16 < 0)) {
temp_v0 = arg0->unkBC;
temp_a3_2 = temp_a3 * -1;
temp_f0_2 = temp_f0 * 0.8;
phi_a3 = temp_a3_2;
phi_f0 = temp_f0_2;
phi_v1 = 0;
var_v1 = player->unk_0B4 + 1;
var_f0 = player->unk_0B8;
var_a3 = player->unk_0AC;
temp_f16 = (s32) ((f64) ((f32) var_v1 * var_f0) - (0.2 * (f64) (var_v1 * var_v1)));
temp_a2 = (s16) temp_f16;
if ((var_v1 != 0) && ((s16) temp_f16 < 0)) {
temp_v0 = player->unk_0BC;
var_v1 = 0;
var_a3 *= -1;
var_f0 = (f32) ((f64) var_f0 * 0.8);
if ((temp_v0 & 1) == 1) {
arg0->unkBC = temp_v0 | 0x40000;
player->unk_0BC = temp_v0 | 0x40000;
}
if (temp_f0_2 <= 1.0f) {
temp_v0_2 = arg0->unkBC & ~0x800;
arg0->unkBC = temp_v0_2;
if (var_f0 <= 1.0f) {
temp_v0_2 = player->unk_0BC & ~0x800;
player->unk_0BC = temp_v0_2;
if ((temp_v0_2 & 0x40000) != 0x40000) {
sp2A = 0;
sp26 = temp_f16;
sp28 = temp_a3_2;
sp2C = temp_f0_2;
func_8008C73C(arg0, arg1, temp_f16, temp_a3_2);
sp26 = temp_a2;
sp28 = var_a3;
sp2C = var_f0;
func_8008C73C(player, arg1);
var_v1 = 0;
goto block_9;
}
arg0->unkB6 = arg0->unkB6 | 0x20;
arg0->unkBC = temp_v0_2 & 0xFFFBFFFF;
if ((arg0->unk0 & 0x4000) == 0x4000) {
sp2C = temp_f0_2;
sp28 = temp_a3_2;
sp26 = temp_f16;
player->unk_0B6 |= 0x20;
player->unk_0BC = temp_v0_2 & 0xFFFBFFFF;
if ((player->unk_000 & 0x4000) == 0x4000) {
sp2C = var_f0;
sp28 = var_a3;
sp26 = temp_a2;
sp2A = 0;
func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008008, temp_f16, temp_a3_2);
func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008008);
var_v1 = 0;
block_9:
phi_a2 = temp_f16;
phi_a3 = temp_a3 * -1;
phi_f0 = sp2C;
phi_v1 = 0;
var_f0 = sp2C;
}
}
}
temp_lo = phi_a2 * phi_a3;
phi_a2_2 = temp_lo;
if ((temp_lo <= 0) && (phi_a3 == 1)) {
phi_a2_2 = 0;
var_a2 = temp_a2 * var_a3;
if ((var_a2 <= 0) && (var_a3 == 1)) {
var_a2 = 0;
}
phi_a2_3 = phi_a2_2;
if ((phi_a2_2 >= 0) && (phi_a3 == -1)) {
phi_a2_3 = 0;
if ((var_a2 >= 0) && (var_a3 == -1)) {
var_a2 = 0;
}
arg0->unk78 = arg0->unk78 + (phi_a2_3 * 0x12);
arg0->unkB8 = phi_f0;
arg0->unkB4 = phi_v1;
arg0->unkAC = phi_a3;
if ((arg0->unkBC & 8) != 0) {
func_8008C73C(arg0, arg1, phi_a2_3, phi_a3);
arg0->unkBC = arg0->unkBC & ~0x800;
player->unk_078 += var_a2 * 0x12;
player->unk_0B8 = var_f0;
player->unk_0B4 = var_v1;
player->unk_0AC = var_a3;
if (player->unk_0BC & 8) {
func_8008C73C(player, arg1);
player->unk_0BC &= ~0x800;
}
}
#else
@@ -538,92 +520,74 @@ void func_8008D0FC(Player *player, s8 arg1) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_8008C73C(void *, s8, s16, s16); /* extern */
? func_800C90F4(u8, s32, s16, s16); /* extern */
void func_8008D170(void *arg0, s8 arg1) {
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
void func_8008D170(Player *player, s8 arg1) {
f32 sp2C;
s16 sp2A;
s16 sp28;
s16 sp26;
f32 temp_f0;
f32 temp_f0_2;
s16 temp_a3;
s16 temp_a3_2;
s16 temp_lo;
s16 temp_v1;
f32 var_f0;
s16 temp_a2;
s16 var_a2;
s16 var_a3;
s16 var_v1;
s32 temp_f16;
s32 temp_v0;
s32 temp_v0_2;
s16 phi_a2;
s16 phi_a3;
s32 phi_a2_2;
s16 phi_a2_3;
f32 phi_f0;
s16 phi_v1;
temp_v1 = arg0->unkB4 + 1;
temp_f0 = arg0->unkB8;
temp_a3 = arg0->unkAC;
temp_f16 = (temp_v1 * temp_f0) - (0.1 * (temp_v1 * temp_v1));
phi_a2 = temp_f16;
phi_a3 = temp_a3;
phi_f0 = temp_f0;
phi_v1 = temp_v1;
if ((temp_v1 != 0) && (temp_f16 < 0)) {
temp_v0 = arg0->unkBC;
temp_a3_2 = temp_a3 * -1;
temp_f0_2 = temp_f0 * 0.9;
phi_a3 = temp_a3_2;
phi_f0 = temp_f0_2;
phi_v1 = 0;
if (((temp_v0 & 1) == 1) || ((arg0->unk44 & 0x20) == 0)) {
arg0->unkBC = temp_v0 | 0x40000;
var_v1 = player->unk_0B4 + 1;
var_f0 = player->unk_0B8;
var_a3 = player->unk_0AC;
temp_f16 = (s32) ((f64) ((f32) var_v1 * var_f0) - (0.1 * (f64) (var_v1 * var_v1)));
temp_a2 = (s16) temp_f16;
if ((var_v1 != 0) && ((s16) temp_f16 < 0)) {
temp_v0 = player->unk_0BC;
var_v1 = 0;
var_a3 *= -1;
var_f0 = (f32) ((f64) var_f0 * 0.9);
if (((temp_v0 & 1) == 1) || !(player->unk_044 & 0x20)) {
player->unk_0BC = temp_v0 | 0x40000;
}
if (temp_f0_2 <= 1.3) {
temp_v0_2 = arg0->unkBC;
arg0->unk44 = arg0->unk44 & 0xBFFF;
if ((f64) var_f0 <= 1.3) {
temp_v0_2 = player->unk_0BC;
player->unk_044 &= 0xBFFF;
if ((temp_v0_2 & 0x40000) != 0x40000) {
sp2A = 0;
sp26 = temp_f16;
sp28 = temp_a3_2;
sp2C = temp_f0_2;
func_8008C73C(arg0, arg1, temp_f16, temp_a3_2);
sp26 = temp_a2;
sp28 = var_a3;
sp2C = var_f0;
func_8008C73C(player, arg1);
var_v1 = 0;
goto block_10;
}
arg0->unkB6 = arg0->unkB6 | 0x20;
arg0->unkBC = temp_v0_2 & 0xFFFBFFFF;
if ((arg0->unk0 & 0x4000) == 0x4000) {
sp2C = temp_f0_2;
sp28 = temp_a3_2;
sp26 = temp_f16;
player->unk_0B6 |= 0x20;
player->unk_0BC = temp_v0_2 & 0xFFFBFFFF;
if ((player->unk_000 & 0x4000) == 0x4000) {
sp2C = var_f0;
sp28 = var_a3;
sp26 = temp_a2;
sp2A = 0;
func_800C90F4(arg1, (arg0->unk254 * 0x10) + 0x29008008, temp_f16, temp_a3_2);
func_800C90F4((u8) arg1, (player->characterId * 0x10) + 0x29008008);
var_v1 = 0;
block_10:
phi_a2 = temp_f16;
phi_a3 = temp_a3 * -1;
phi_f0 = sp2C;
phi_v1 = 0;
var_f0 = sp2C;
}
}
}
temp_lo = phi_a2 * phi_a3;
phi_a2_2 = temp_lo;
if ((temp_lo <= 0) && (phi_a3 == 1)) {
phi_a2_2 = 0;
var_a2 = temp_a2 * var_a3;
if ((var_a2 <= 0) && (var_a3 == 1)) {
var_a2 = 0;
}
phi_a2_3 = phi_a2_2;
if ((phi_a2_2 >= 0) && (phi_a3 == -1)) {
phi_a2_3 = 0;
if ((var_a2 >= 0) && (var_a3 == -1)) {
var_a2 = 0;
}
arg0->unk78 = arg0->unk78 + (phi_a2_3 * 0x14);
arg0->unkB8 = phi_f0;
arg0->unkB4 = phi_v1;
arg0->unkAC = phi_a3;
if ((arg0->unkBC & 8) != 0) {
func_8008C73C(arg0, arg1, phi_a2_3, phi_a3);
arg0->unk44 = arg0->unk44 & 0xBFFF;
player->unk_078 += var_a2 * 0x14;
player->unk_0B8 = var_f0;
player->unk_0B4 = var_v1;
player->unk_0AC = var_a3;
if (player->unk_0BC & 8) {
func_8008C73C(player, arg1);
player->unk_044 &= 0xBFFF;
}
}
#else
@@ -850,7 +814,7 @@ void func_8008DC08(Player* player, s8 arg1) {
player->unk_0C0 = 0;
player->unk_08C = 0.0f;
player->unk_09C = 0.0f;
if ((player->unk_110.unk44 >= 600.0f) || ((player->unk_0BC & 0x1000) != 0)) { D_8018D990[arg1] = 3; } // placed block on same line to match
if ((player->unk_110.unk3C[2] >= 600.0f) || ((player->unk_0BC & 0x1000) != 0)) { D_8018D990[arg1] = 3; } // placed block on same line to match
switch (D_8018D990[arg1]) {
case 0:
@@ -916,7 +880,7 @@ void func_8008DC08(Player* player, s8 arg1) {
player->unk_238 = 0;
}
if (player->unk_110.unk44 >= 600.0f) {
if (player->unk_110.unk3C[2] >= 600.0f) {
D_8018D990[arg1] = 3;
}
@@ -1740,74 +1704,74 @@ void func_8008FF08(Player *player, s8 arg1) {
switch (gCurrentCourseId) {
case COURSE_BOWSER_CASTLE:
if ((((s16)gNearestWaypointByPlayerId[arg1Copy]) >= 0x235) && (((s16)gNearestWaypointByPlayerId[arg1Copy]) < 0x247)) {
player->unk_220 = 0x214U;
player->nearestWaypointId = 0x214U;
break;
}
if ((((s16)gNearestWaypointByPlayerId[arg1Copy]) >= 0x267) && (((s16)gNearestWaypointByPlayerId[arg1Copy]) < 0x277)) {
player->unk_220 = 0x25BU;
player->nearestWaypointId = 0x25BU;
break;
}
player->unk_220 = gNearestWaypointByPlayerId[arg1Copy];
if (player->unk_220 < 0) {
player->unk_220 = gWaypointCountByPathIndex + player->unk_220;
player->nearestWaypointId = gNearestWaypointByPlayerId[arg1Copy];
if (player->nearestWaypointId < 0) {
player->nearestWaypointId = gWaypointCountByPathIndex + player->nearestWaypointId;
break;
}
break;
case COURSE_BANSHEE_BOARDWALK:
if ((((s16)gNearestWaypointByPlayerId[arg1Copy]) >= 0x12C) && (((s16)gNearestWaypointByPlayerId[arg1Copy]) < 0x13C)) {
player->unk_220 = 0x12CU;
player->nearestWaypointId = 0x12CU;
break;
}
player->unk_220 = gNearestWaypointByPlayerId[arg1Copy];
if (player->unk_220 < 0) {
player->unk_220 = gWaypointCountByPathIndex + player->unk_220;
player->nearestWaypointId = gNearestWaypointByPlayerId[arg1Copy];
if (player->nearestWaypointId < 0) {
player->nearestWaypointId = gWaypointCountByPathIndex + player->nearestWaypointId;
break;
}
break;
case COURSE_YOSHI_VALLEY:
case COURSE_RAINBOW_ROAD:
player->unk_220 = D_80165320[arg1Copy];
player->nearestWaypointId = D_80165320[arg1Copy];
break;
case COURSE_FRAPPE_SNOWLAND:
if ((((s16)gNearestWaypointByPlayerId[arg1Copy]) >= 0xF0) && (((s16)gNearestWaypointByPlayerId[arg1Copy]) < 0x105)) {
player->unk_220 = 0xF0U;
player->nearestWaypointId = 0xF0U;
break;
}
player->unk_220 = D_80165320[arg1Copy];
if (player->unk_220 < 0) {
player->unk_220 = gWaypointCountByPathIndex + player->unk_220;
player->nearestWaypointId = D_80165320[arg1Copy];
if (player->nearestWaypointId < 0) {
player->nearestWaypointId = gWaypointCountByPathIndex + player->nearestWaypointId;
break;
}
break;
case COURSE_ROYAL_RACEWAY:
if ((((s16)gNearestWaypointByPlayerId[arg1Copy]) >= 0x258) && (((s16)gNearestWaypointByPlayerId[arg1Copy]) < 0x2A4)) {
player->unk_220 = 0x258U;
player->nearestWaypointId = 0x258U;
break;
}
player->unk_220 = D_80165320[arg1Copy];
if (player->unk_220 < 0) {
player->unk_220 = gWaypointCountByPathIndex + player->unk_220;
player->nearestWaypointId = D_80165320[arg1Copy];
if (player->nearestWaypointId < 0) {
player->nearestWaypointId = gWaypointCountByPathIndex + player->nearestWaypointId;
break;
}
break;
case COURSE_DK_JUNGLE:
if ((((s16)gNearestWaypointByPlayerId[arg1Copy]) >= 0xB9) && (((s16)gNearestWaypointByPlayerId[arg1Copy]) < 0x119)) {
player->unk_220 = 0xB9U;
player->nearestWaypointId = 0xB9U;
break;
}
player->unk_220 = gNearestWaypointByPlayerId[arg1Copy];
if (player->unk_220 < 0) {
player->unk_220 = gWaypointCountByPathIndex + player->unk_220;
player->nearestWaypointId = gNearestWaypointByPlayerId[arg1Copy];
if (player->nearestWaypointId < 0) {
player->nearestWaypointId = gWaypointCountByPathIndex + player->nearestWaypointId;
break;
}
@@ -1816,12 +1780,12 @@ void func_8008FF08(Player *player, s8 arg1) {
case COURSE_SKYSCRAPER:
case COURSE_DOUBLE_DECK:
case COURSE_BIG_DONUT:
player->unk_220 = 0U;
player->nearestWaypointId = 0U;
break;
default:
player->unk_220 = gNearestWaypointByPlayerId[arg1Copy];
if (player->unk_220 < 0) {
player->unk_220 = gWaypointCountByPathIndex + player->unk_220;
player->nearestWaypointId = gNearestWaypointByPlayerId[arg1Copy];
if (player->nearestWaypointId < 0) {
player->nearestWaypointId = gWaypointCountByPathIndex + player->nearestWaypointId;
break;
}
break;
@@ -1832,37 +1796,27 @@ GLOBAL_ASM("asm/non_matchings/code_8008C1D0/func_8008FF08.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
extern s32 D_80164550;
extern u16 gWaypointCountByPathIndex;
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern ? D_80165310;
static s16 gCurrentCourseId; /* type too large by 2; unable to generate initializer */
static ? D_800E6F6C; /* unable to generate initializer; const */
static ? D_800E6F7C; /* unable to generate initializer; const */
static ? D_800E6F8C; /* unable to generate initializer; const */
static ? D_800E6F9C; /* unable to generate initializer; const */
static ? D_800E6FAC; /* unable to generate initializer; const */
static ? D_800E6FBC; /* unable to generate initializer; const */
static ? D_800E6FCC; /* unable to generate initializer; const */
static ? D_800E6FDC; /* unable to generate initializer; const */
static ? D_800E6FEC; /* unable to generate initializer; const */
static ? D_800E6FFC; /* unable to generate initializer; const */
static ? D_800E700C; /* unable to generate initializer; const */
static ? D_800E701C; /* unable to generate initializer; const */
static ? D_800E702C; /* unable to generate initializer; const */
static ? D_800E703C; /* unable to generate initializer; const */
static ? D_800E704C; /* unable to generate initializer; const */
static ? D_800E705C; /* unable to generate initializer; const */
static ? D_800E6F6C; /* unable to generate initializer */
static ? D_800E6F7C; /* unable to generate initializer */
static ? D_800E6F8C; /* unable to generate initializer */
static ? D_800E6F9C; /* unable to generate initializer */
static ? D_800E6FAC; /* unable to generate initializer */
static ? D_800E6FBC; /* unable to generate initializer */
static ? D_800E6FCC; /* unable to generate initializer */
static ? D_800E6FDC; /* unable to generate initializer */
static ? D_800E6FEC; /* unable to generate initializer */
static ? D_800E6FFC; /* unable to generate initializer */
static ? D_800E700C; /* unable to generate initializer */
static ? D_800E701C; /* unable to generate initializer */
static ? D_800E702C; /* unable to generate initializer */
static ? D_800E703C; /* unable to generate initializer */
static ? D_800E704C; /* unable to generate initializer */
static ? D_800E705C; /* unable to generate initializer */
s16 gCurrentCourseId; /* unable to generate initializer */
void func_80090178(void *arg0, s8 arg1, void *arg2, void *arg3) {
? spF8;
? spE8;
? spD8;
? spC8;
? spB8;
? spA8;
? sp98;
? sp88;
void func_80090178(Player *player, s8 arg1, f32 *arg2, f32 *arg3) {
? sp78;
? sp68;
? sp58;
@@ -1871,144 +1825,140 @@ void func_80090178(void *arg0, s8 arg1, void *arg2, void *arg3) {
? sp28;
? sp18;
? sp8;
f32 var_f10;
s16 temp_t9;
s32 temp_a0;
s32 temp_a0_2;
s32 temp_a0_3;
s32 temp_a0_4;
struct TrackWayPoint *temp_v1;
struct TrackWayPoint *temp_v1_2;
struct TrackWayPoint *temp_v1_3;
struct TrackWayPoint *temp_v1_4;
u16 *temp_t0;
u16 temp_t1;
void *temp_v1;
void *temp_v1_2;
void *temp_v1_3;
void *temp_v1_4;
f32 phi_f10;
spF8.unk0 = D_800E6F6C.unk0;
spF8.unk4 = D_800E6F6C.unk4;
spF8.unk8 = D_800E6F6C.unk8;
spF8.unkC = D_800E6F6C.unkC;
spE8.unk0 = D_800E6F7C.unk0;
spE8.unk4 = D_800E6F7C.unk4;
spE8.unk8 = D_800E6F7C.unk8;
spE8.unkC = D_800E6F7C.unkC;
spD8.unk0 = D_800E6F8C.unk0;
spD8.unk4 = D_800E6F8C.unk4;
spD8.unk8 = D_800E6F8C.unk8;
spD8.unkC = D_800E6F8C.unkC;
spC8.unk0 = D_800E6F9C.unk0;
spC8.unk4 = D_800E6F9C.unk4;
spC8.unk8 = D_800E6F9C.unk8;
spC8.unkC = D_800E6F9C.unkC;
spB8.unk0 = D_800E6FAC.unk0;
spB8.unk4 = D_800E6FAC.unk4;
spB8.unk8 = D_800E6FAC.unk8;
spB8.unkC = D_800E6FAC.unkC;
spA8.unk0 = D_800E6FBC.unk0;
spA8.unk4 = D_800E6FBC.unk4;
spA8.unk8 = D_800E6FBC.unk8;
spA8.unkC = D_800E6FBC.unkC;
sp98.unk0 = D_800E6FCC.unk0;
sp98.unk4 = D_800E6FCC.unk4;
sp98.unk8 = D_800E6FCC.unk8;
sp98.unkC = D_800E6FCC.unkC;
sp88.unk0 = D_800E6FDC.unk0;
sp88.unk4 = D_800E6FDC.unk4;
sp88.unk8 = D_800E6FDC.unk8;
sp88.unkC = D_800E6FDC.unkC;
sp78.unk4 = D_800E6FEC.unk4;
sp78.unk0 = D_800E6FEC.unk0;
sp78.unk8 = D_800E6FEC.unk8;
sp78.unkC = D_800E6FEC.unkC;
sp68.unk0 = D_800E6FFC.unk0;
sp68.unk4 = D_800E6FFC.unk4;
sp68.unkC = D_800E6FFC.unkC;
sp68.unk8 = D_800E6FFC.unk8;
sp58.unk0 = D_800E700C.unk0;
sp58.unk4 = D_800E700C.unk4;
sp58.unkC = D_800E700C.unkC;
sp58.unk8 = D_800E700C.unk8;
sp48.unk0 = D_800E701C.unk0;
sp48.unk4 = D_800E701C.unk4;
sp48.unkC = D_800E701C.unkC;
sp48.unk8 = D_800E701C.unk8;
sp38.unk0 = D_800E702C.unk0;
sp38.unk4 = D_800E702C.unk4;
sp38.unkC = D_800E702C.unkC;
sp38.unk8 = D_800E702C.unk8;
sp28.unk0 = D_800E703C.unk0;
sp28.unk4 = D_800E703C.unk4;
sp28.unkC = D_800E703C.unkC;
sp28.unk8 = D_800E703C.unk8;
sp18.unk0 = D_800E704C.unk0;
sp18.unk4 = D_800E704C.unk4;
sp18.unkC = D_800E704C.unkC;
sp18.unk8 = D_800E704C.unk8;
sp8.unk0 = D_800E705C.unk0;
sp8.unk4 = D_800E705C.unk4;
sp8.unkC = D_800E705C.unkC;
sp8.unk8 = D_800E705C.unk8;
spF8[0].unk0 = D_800E6F6C.unk0;
spF8[0].unk4 = (s32) D_800E6F6C.unk4;
spF8[0].unk8 = (s32) D_800E6F6C.unk8;
spF8[0].unkC = (s32) D_800E6F6C.unkC;
spE8[0].unk0 = D_800E6F7C.unk0;
spE8[0].unk4 = (s32) D_800E6F7C.unk4;
spE8[0].unk8 = (s32) D_800E6F7C.unk8;
spE8[0].unkC = (s32) D_800E6F7C.unkC;
spD8[0].unk0 = D_800E6F8C.unk0;
spD8[0].unk4 = (s32) D_800E6F8C.unk4;
spD8[0].unk8 = (s32) D_800E6F8C.unk8;
spD8[0].unkC = (s32) D_800E6F8C.unkC;
spC8[0].unk0 = D_800E6F9C.unk0;
spC8[0].unk4 = (s32) D_800E6F9C.unk4;
spC8[0].unk8 = (s32) D_800E6F9C.unk8;
spC8[0].unkC = (s32) D_800E6F9C.unkC;
spB8[0].unk0 = D_800E6FAC.unk0;
spB8[0].unk4 = (s32) D_800E6FAC.unk4;
spB8[0].unk8 = (s32) D_800E6FAC.unk8;
spB8[0].unkC = (s32) D_800E6FAC.unkC;
spA8[0].unk0 = D_800E6FBC.unk0;
spA8[0].unk4 = (s32) D_800E6FBC.unk4;
spA8[0].unk8 = (s32) D_800E6FBC.unk8;
spA8[0].unkC = (s32) D_800E6FBC.unkC;
sp98[0].unk0 = D_800E6FCC.unk0;
sp98[0].unk4 = (s32) D_800E6FCC.unk4;
sp98[0].unk8 = (s32) D_800E6FCC.unk8;
sp98[0].unkC = (s32) D_800E6FCC.unkC;
sp88[0].unk0 = D_800E6FDC.unk0;
sp88[0].unk4 = (s32) D_800E6FDC.unk4;
sp88[0].unk8 = (s32) D_800E6FDC.unk8;
sp88[0].unkC = (s32) D_800E6FDC.unkC;
sp78.unk4 = (s32) D_800E6FEC.unk4;
sp78.unk0 = (s32) D_800E6FEC.unk0;
sp78.unk8 = (s32) D_800E6FEC.unk8;
sp78.unkC = (s32) D_800E6FEC.unkC;
sp68.unk0 = (s32) D_800E6FFC.unk0;
sp68.unk4 = (s32) D_800E6FFC.unk4;
sp68.unkC = (s32) D_800E6FFC.unkC;
sp68.unk8 = (s32) D_800E6FFC.unk8;
sp58.unk0 = (s32) D_800E700C.unk0;
sp58.unk4 = (s32) D_800E700C.unk4;
sp58.unkC = (s32) D_800E700C.unkC;
sp58.unk8 = (s32) D_800E700C.unk8;
sp48.unk0 = (s32) D_800E701C.unk0;
sp48.unk4 = (s32) D_800E701C.unk4;
sp48.unkC = (s32) D_800E701C.unkC;
sp48.unk8 = (s32) D_800E701C.unk8;
sp38.unk0 = (s32) D_800E702C.unk0;
sp38.unk4 = (s32) D_800E702C.unk4;
sp38.unkC = (s32) D_800E702C.unkC;
sp38.unk8 = (s32) D_800E702C.unk8;
sp28.unk0 = (s32) D_800E703C.unk0;
sp28.unk4 = (s32) D_800E703C.unk4;
sp28.unkC = (s32) D_800E703C.unkC;
sp28.unk8 = (s32) D_800E703C.unk8;
sp18.unk0 = (s32) D_800E704C.unk0;
sp18.unk4 = (s32) D_800E704C.unk4;
sp18.unkC = (s32) D_800E704C.unkC;
sp18.unk8 = (s32) D_800E704C.unk8;
sp8.unk0 = (s32) D_800E705C.unk0;
sp8.unk4 = (s32) D_800E705C.unk4;
sp8.unkC = (s32) D_800E705C.unkC;
sp8.unk8 = (s32) D_800E705C.unk8;
temp_t9 = gCurrentCourseId;
switch (temp_t9) {
case 4:
temp_t0 = (arg1 * 2) + &D_80165310;
temp_v1 = (&D_80164550)[*temp_t0] + (arg0->unk220 * 8);
arg2->unk0 = temp_v1->unk0;
arg2->unk4 = temp_v1->unk2;
arg2->unk8 = temp_v1->unk4;
temp_v1 = &D_80164550[*temp_t0][(u16) player->nearestWaypointId];
arg2->unk0 = (f32) temp_v1->wayPointX;
arg2->unk4 = (f32) temp_v1->wayPointY;
arg2->unk8 = (f32) temp_v1->wayPointZ;
temp_t1 = *temp_t0;
temp_v1_2 = (((arg0->unk220 + 5) % ((&gWaypointCountByPathIndex)[temp_t1] + 1)) * 8) + (&D_80164550)[temp_t1];
arg3->unk0 = temp_v1_2->unk0;
arg3->unk4 = temp_v1_2->unk2;
arg3->unk8 = temp_v1_2->unk4;
temp_v1_2 = &D_80164550[temp_t1][(s32) (player->nearestWaypointId + 5) % (s32) (gWaypointCountByPathIndex[temp_t1] + 1)];
arg3->unk0 = (f32) temp_v1_2->wayPointX;
arg3->unk4 = (f32) temp_v1_2->wayPointY;
arg3->unk8 = (f32) temp_v1_2->wayPointZ;
return;
case 15:
temp_a0 = arg1 * 4;
arg2->unk4 = 0.0f;
arg2->unk0 = *(&spF8 + temp_a0);
arg2->unk8 = *(&spE8 + temp_a0);
arg2->unk0 = (&spF8[0])[arg1];
arg2->unk8 = (f32) (&spE8[0])[arg1];
arg3->unk4 = 0.0f;
arg3->unk0 = *(&spD8 + temp_a0);
phi_f10 = *(&spC8 + temp_a0);
arg3->unk0 = (&spD8[0])[arg1];
var_f10 = (&spC8[0])[arg1];
block_8:
arg3->unk8 = phi_f10;
arg3->unk8 = var_f10;
return;
case 16:
temp_a0_2 = arg1 * 4;
arg2->unk4 = 480.0f;
arg2->unk0 = *(&spB8 + temp_a0_2);
arg2->unk8 = *(&spA8 + temp_a0_2);
arg2->unk0 = (&spB8[0])[arg1];
arg2->unk8 = (f32) (&spA8[0])[arg1];
arg3->unk4 = 480.0f;
arg3->unk0 = *(&sp98 + temp_a0_2);
arg3->unk8 = *(&sp88 + temp_a0_2);
arg3->unk0 = (&sp98[0])[arg1];
arg3->unk8 = (f32) (&sp88[0])[arg1];
return;
case 17:
temp_a0_3 = arg1 * 4;
temp_a0 = arg1 * 4;
arg2->unk4 = 0.0f;
arg2->unk0 = (sp + temp_a0_3)->unk78;
arg2->unk8 = (sp + temp_a0_3)->unk68;
arg2->unk0 = (sp + temp_a0)->unk78;
arg2->unk8 = (f32) (sp + temp_a0)->unk68;
arg3->unk4 = 0.0f;
arg3->unk0 = (sp + temp_a0_3)->unk58;
arg3->unk8 = (sp + temp_a0_3)->unk48;
arg3->unk0 = (sp + temp_a0)->unk58;
arg3->unk8 = (f32) (sp + temp_a0)->unk48;
return;
case 19:
temp_a0_4 = arg1 * 4;
temp_a0_2 = arg1 * 4;
arg2->unk4 = 200.0f;
arg2->unk0 = (sp + temp_a0_4)->unk38;
arg2->unk8 = (sp + temp_a0_4)->unk28;
arg2->unk0 = (sp + temp_a0_2)->unk38;
arg2->unk8 = (f32) (sp + temp_a0_2)->unk28;
arg3->unk4 = 200.0f;
arg3->unk0 = (sp + temp_a0_4)->unk18;
phi_f10 = (sp + temp_a0_4)->unk8;
arg3->unk0 = (sp + temp_a0_2)->unk18;
var_f10 = (sp + temp_a0_2)->unk8;
goto block_8;
default:
temp_v1_3 = D_80164550 + (arg0->unk220 * 8);
arg2->unk0 = temp_v1_3->unk0;
arg2->unk4 = temp_v1_3->unk2;
arg2->unk8 = temp_v1_3->unk4;
temp_v1_4 = (((arg0->unk220 + 5) % (gWaypointCountByPathIndex + 1)) * 8) + D_80164550;
arg3->unk0 = temp_v1_4->unk0;
arg3->unk4 = temp_v1_4->unk2;
phi_f10 = temp_v1_4->unk4;
temp_v1_3 = &(*D_80164550)[(u16) player->nearestWaypointId];
arg2->unk0 = (f32) temp_v1_3->wayPointX;
arg2->unk4 = (f32) temp_v1_3->wayPointY;
arg2->unk8 = (f32) temp_v1_3->wayPointZ;
temp_v1_4 = &(*D_80164550)[(s32) (player->nearestWaypointId + 5) % (s32) (*gWaypointCountByPathIndex + 1)];
arg3->unk0 = (f32) temp_v1_4->wayPointX;
arg3->unk4 = (f32) temp_v1_4->wayPointY;
var_f10 = (f32) temp_v1_4->wayPointZ;
goto block_8;
}
}
+41 -69
View File
@@ -514,87 +514,59 @@ s32 func_800B557C(void) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
s32 func_800B4874(s32, void *, void *); // extern
s8 func_800B578C(s32, void *, void *); // extern
s8 func_800B5888(s32); // extern
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern u8 D_800F2E60;
extern ? D_8018EB90;
extern OSMesgQueue gSIEventMesgQueue;
void func_800B559C(s32 arg0, void *arg1, void *arg2) {
s32 temp_s1;
s32 temp_s1_2;
void func_800B559C(s32 course) {
CourseTimeTrialRecords *temp_a2;
OnlyBestTimeTrialRecords *temp_s2_2;
s32 temp_s6;
s32 temp_v0;
s32 temp_v0_2;
u8 *temp_s2_2;
void *temp_a0;
void *temp_a1;
void *temp_a1_2;
void *temp_a2;
void *temp_s2;
s32 var_s1;
s32 var_v0;
s32 var_v0_2;
u8 *temp_a0;
u8 *temp_s2;
u8 *var_a0;
u8 temp_t3;
u8 temp_t9;
void *temp_v1;
void *temp_v1_2;
s32 phi_s1;
void *phi_a1;
void *phi_a2;
u8 *phi_a0;
s32 phi_v0;
s32 phi_v0_2;
void *phi_a1_2;
void *phi_a2_2;
void *phi_a1_3;
temp_s6 = arg0 / 8;
temp_s1 = temp_s6 * 8;
phi_s1 = temp_s1;
phi_a1 = arg1;
phi_a2 = arg2;
phi_a1_2 = arg1;
phi_a2_2 = arg2;
if (temp_s1 < (temp_s1 + 8)) {
temp_s2 = (temp_s6 * 0x38) + 0x188 + &D_8018EB90;
temp_s6 = course / 8;
var_s1 = temp_s6 * 8;
if (var_s1 < (var_s1 + 8)) {
temp_s2 = &D_8018EB90.allCourseTimeTrialRecords.cupRecords[0].courseRecords[0].records[0][(temp_s6 * 0x38) + 0x188];
do {
temp_a2 = &D_8018EB90 + ((phi_s1 / 4) * 0x60) + ((phi_s1 % 4) * 0x18);
phi_a2 = temp_a2;
phi_a0 = &D_800F2E60;
phi_v0 = 0;
phi_v0_2 = 0;
phi_a2_2 = temp_a2;
if (temp_a2->unk17 != func_800B4874(phi_s1, phi_a1, phi_a2)) {
temp_a1 = temp_s2 + ((phi_s1 % 8) * 3);
phi_a1_3 = temp_a1;
var_a0 = &D_800F2E60;
temp_a2 = &D_8018EB90.allCourseTimeTrialRecords.cupRecords[var_s1 / 4].courseRecords[var_s1 % 4];
var_v0 = 0;
if (temp_a2->unknownBytes[5] != func_800B4874(var_s1)) {
do {
temp_v1 = temp_a1 + phi_v0;
temp_v0 = phi_v0 + 1;
temp_v1->unk0 = *phi_a0;
temp_v1->unk18 = *phi_a0;
phi_a0 += 1;
phi_v0 = temp_v0;
} while (temp_v0 != 3);
temp_v1 = temp_s2 + ((var_s1 % 8) * 3) + var_v0;
var_v0 += 1;
temp_v1->unk0 = (u8) *var_a0;
temp_t9 = *var_a0;
var_a0 += 1;
temp_v1->unk18 = temp_t9;
} while (var_v0 != 3);
} else {
temp_a1_2 = temp_s2 + ((phi_s1 % 8) * 3);
phi_a1_3 = temp_a1_2;
var_v0_2 = 0;
do {
temp_a0 = temp_a2 + phi_v0_2;
temp_v1_2 = temp_a1_2 + phi_v0_2;
temp_v0_2 = phi_v0_2 + 1;
temp_v1_2->unk0 = temp_a0->unk0;
temp_v1_2->unk18 = temp_a0->unkF;
phi_v0_2 = temp_v0_2;
} while (temp_v0_2 != 3);
temp_a0 = &temp_a2->records[0][var_v0_2];
temp_t3 = temp_a0->unk0;
temp_v1_2 = temp_s2 + ((var_s1 % 8) * 3) + var_v0_2;
var_v0_2 += 1;
temp_v1_2->unk0 = temp_t3;
temp_v1_2->unk18 = (u8) temp_a0->unkF;
} while (var_v0_2 != 3);
}
temp_s1_2 = phi_s1 + 1;
phi_s1 = temp_s1_2;
phi_a1 = phi_a1_3;
phi_a1_2 = phi_a1_3;
} while (temp_s1_2 < ((temp_s6 * 8) + 8));
var_s1 += 1;
} while (var_s1 < ((temp_s6 * 8) + 8));
}
temp_s2_2 = &D_8018EB90 + (temp_s6 * 0x38) + 0x188;
temp_s2_2->unk36 = func_800B578C(temp_s6, phi_a1_2, phi_a2_2);
temp_s2_2->unk37 = func_800B5888(temp_s6);
osEepromLongWrite(&gSIEventMesgQueue, ((temp_s2_2 - &D_8018EB90) >> 3) & 0xFF, temp_s2_2, 0x38);
temp_s2_2 = &D_8018EB90.onlyBestTimeTrialRecords[temp_s6];
temp_s2_2->unknownBytes[6] = func_800B578C(temp_s6);
temp_s2_2->unknownBytes[7] = func_800B5888(temp_s6);
osEepromLongWrite(&gSIEventMesgQueue, ((u32) (temp_s2_2 - &D_8018EB90) >> 3) & 0xFF, temp_s2_2->bestThreelaps[0], 0x00000038);
}
#else
GLOBAL_ASM("asm/non_matchings/menus/func_800B559C.s")
+30 -39
View File
@@ -368,78 +368,69 @@ void func_8028100C(s32 arg0, s32 arg1, s32 arg2) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void *func_80280734(? *); // extern
s16 func_8028076C(); // extern
f32 func_8028080C(); // extern
f32 func_80280850(?); // extern
extern ? D_80284E64;
extern f32 D_80286B80;
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
static struct UnkStruct_80280658 D_80284E64; /* type too large by 0x40; unable to generate initializer */
static f32 D_80286B80 = 3000.0f;
void func_8028101C(s32 arg0, s32 arg1, s32 arg2) {
f32 sp64;
f32 sp60;
f32 sp5C;
s32 temp_s1;
void *temp_s0;
s32 phi_s1;
s32 var_s1;
struct UnkStruct_80280658 *temp_s0;
sp5C = arg2;
sp60 = arg1;
sp64 = arg0;
phi_s1 = 0;
var_s1 = 0;
sp5C = (f32) arg2;
sp60 = (f32) arg1;
sp64 = (f32) arg0;
do {
temp_s0 = func_80280734(&D_80284E64);
temp_s0->unk10 = func_80280850(0x43480000) + sp64;
temp_s0->unk14 = func_80280850(0x43BE0000) + sp60;
temp_s0->unk18 = func_80280850(0x44160000) + sp5C;
temp_s0->unk2C = func_8028080C() * 7.0f;
temp_s0->unk10 = func_80280850(200.0f) + sp64;
temp_s0->unk14 = func_80280850(380.0f) + sp60;
temp_s0->unk18 = func_80280850(600.0f) + sp5C;
temp_s0->unk2C = (s16) (s32) (func_8028080C() * 7.0f);
temp_s0->unk30 = func_8028076C();
temp_s0->unk32 = func_80280850(0x43C80000) + 900.0f;
temp_s1 = phi_s1 + 1;
temp_s0->unk34 = func_80280850(0x44FA0000) + D_80286B80;
phi_s1 = temp_s1;
} while (temp_s1 != 0x64);
temp_s0->unk32 = (s16) (s32) (func_80280850(400.0f) + 900.0f);
var_s1 += 1;
temp_s0->unk34 = (s16) (s32) (func_80280850(2000.0f) + D_80286B80);
} while (var_s1 != 0x64);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80280650/func_8028101C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
void *func_80280734(? *); // extern
f32 func_8028080C(); // extern
f32 func_80280850(f32); // extern
extern ? D_80284E50;
extern ? D_80284E70;
extern f32 D_80286B84;
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern s16 D_802874BE;
extern s16 D_802874C6;
extern s16 D_802874C8;
extern s32 D_80287540;
static s32 D_80284E50[4] = { 0x007F2040, 0x0040207F, 0x00207F20, 0x007F7F20 };
static struct UnkStruct_80280658 D_80284E70; /* type too large by 0x40; unable to generate initializer */
static f32 D_80286B84 = 1.1f;
void func_8028118C(s32 arg0, s32 arg1, s32 arg2) {
f32 temp_f0;
f32 temp_f2;
s32 temp_v0;
s32 temp_v1;
void *temp_s0;
struct UnkStruct_80280658 *temp_s0;
if (((D_802874BE + 0xD) * func_8028080C()) < 1.0f) {
if (((f32) (D_802874BE + 0xD) * func_8028080C()) < 1.0f) {
temp_s0 = func_80280734(&D_80284E70);
temp_s0->unk10 = func_80280850(0.0f) + arg0;
temp_s0->unk14 = func_80280850(D_802874C6 + 0x64) + arg1;
temp_f0 = func_80280850(D_802874C8 + 0x2BC);
temp_s0->unk10 = func_80280850(0.0f) + (f32) arg0;
temp_s0->unk14 = func_80280850((f32) (D_802874C6 + 0x64)) + (f32) arg1;
temp_f0 = func_80280850((f32) (D_802874C8 + 0x2BC));
temp_v1 = D_80287540;
temp_f2 = D_80286B84;
temp_v0 = temp_v1 & 3;
temp_s0->unk48 = temp_v0;
temp_s0->unk18 = temp_f0 + arg2;
temp_s0->unk3C = 0xFF;
temp_s0->unk40 = -0x11;
temp_s0->unk18 = temp_f0 + (f32) arg2;
temp_s0->unk3C = 0x000000FF;
temp_s0->unk40 = -0x00000011;
temp_s0->unk34 = temp_f2;
temp_s0->unk38 = temp_f2;
temp_s0->unk30 = *(&D_80284E50 + (temp_v0 * 4));
temp_s0->unk30 = D_80284E50[temp_v0];
D_80287540 = temp_v1 + 1;
}
}
+12 -12
View File
@@ -177,10 +177,10 @@ void mtxf_identity(Mat4 mtx) {
}
}
void func_802B5450(Mat4 arg0, Mat4 arg1, Mat4 arg2) {
arg1[3][0] = arg0[3][0] + arg2[0][0];
arg1[3][1] = arg0[3][1] + arg2[0][1];
arg1[3][2] = arg0[3][2] + arg2[0][2];
void func_802B5450(Mat4 arg0, Mat4 arg1, Vec3f arg2) {
arg1[3][0] = arg0[3][0] + arg2[0];
arg1[3][1] = arg0[3][1] + arg2[1];
arg1[3][2] = arg0[3][2] + arg2[2];
arg1[3][3] = arg0[3][3];
arg1[0][0] = arg0[0][0];
arg1[0][1] = arg0[0][1];
@@ -196,10 +196,10 @@ void func_802B5450(Mat4 arg0, Mat4 arg1, Mat4 arg2) {
arg1[2][3] = arg0[2][3];
}
UNUSED void func_802B54EC(Mat4 arg0, Mat4 arg1, Mat4 arg2) {
arg1[3][0] = arg0[3][0] + arg2[0][0];
arg1[3][1] = arg0[3][1] + arg2[0][1];
arg1[3][2] = arg0[3][2] + arg2[0][2];
UNUSED void func_802B54EC(Mat4 arg0, Mat4 arg1, Vec3f arg2) {
arg1[3][0] = arg0[3][0] + arg2[0];
arg1[3][1] = arg0[3][1] + arg2[1];
arg1[3][2] = arg0[3][2] + arg2[2];
}
void mtxf_translate(Mat4 dest, Vec3f b) {
@@ -343,8 +343,8 @@ void func_802B5AAC(Mat4 arg0, s16 arg1) {
}
#ifdef MIPS_TO_C
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
void func_802B5B14(f32 *arg0, s16 *arg1) {
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
void func_802B5B14(Vec3f arg0, Vec3s arg1) {
f32 sp70;
f32 sp6C;
f32 sp68;
@@ -836,8 +836,8 @@ GLOBAL_ASM("asm/non_matchings/math_util/func_802B68F8.s")
#endif
#ifdef MIPS_TO_C
//generated by m2c commit 3b40ab93768f52ac241c5ae84ef58ef6bc4cb1de
void func_802B6A84(Mat4 arg0, s32 arg1, f32 arg2, f32 arg3, f32 arg4) {
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
void func_802B6A84(Mat4 arg0, s16 arg1, f32 arg2, f32 arg3, f32 arg4) {
f32 sp54;
s32 sp34; /* compiler-managed */
f32 sp30;
+2 -2
View File
@@ -26,8 +26,8 @@ void vec3s_copy(Vec3s, Vec3s);
void *sm64_vec3f_set(Vec3f, f32, f32, f32);
void func_802B5398(s32*, s32*, s32);
void mtxf_identity(Mat4);
void func_802B5450(Mat4, Mat4, Mat4);
void func_802B54EC(Mat4, Mat4, Mat4);
void func_802B5450(Mat4, Mat4, Vec3f);
void func_802B54EC(Mat4, Mat4, Vec3f);
void mtxf_translate(Mat4, Vec3f);
void func_802B5564(Mat4, u16*, f32, f32, f32, f32, f32);
void func_802B59DC(Mat4, s16);
+345 -462
View File
@@ -10,6 +10,8 @@
#include "main.h"
#include "memory.h"
#include "variables.h"
#include "common_structs.h"
#include "math_util.h"
#include <actor_types.h>
//#include "segment_symbols.h"
@@ -383,50 +385,45 @@ u32 MIO0_0F(s32 arg0, u32 arg1, u32 arg2) {
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 06ada559d7a32fdab49fa2d619cdfa027615bcda
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
extern f32 D_800DC608;
extern s16 *gHeapEndPtr;
void func_802A86A8(mk64_Vtx *arg0, u32 arg1) {
Vtx *temp_v1;
Vtx *temp_v1_2;
mk64_Vtx *temp_v0;
f32 temp_f6;
mk64_Vtx *var_v0;
s16 *var_v1;
s8 temp_a0;
s8 temp_a3;
u32 temp_a2;
mk64_Vtx *phi_v0;
Vtx *phi_v1;
u32 phi_a2;
u32 var_a2;
temp_v1 = gHeapEndPtr - (((arg1 * 0x10) + 0xF) & ~0xF);
gHeapEndPtr = temp_v1;
phi_v0 = arg0;
phi_a2 = 0U;
var_v1 = gHeapEndPtr - (((arg1 * 0x10) + 0xF) & ~0xF);
var_v0 = arg0;
gHeapEndPtr = var_v1;
var_a2 = 0;
if (arg1 != 0) {
phi_v1 = temp_v1;
do {
if (gIsMirrorMode != 0) {
phi_v1->v.ob[0] = (s16) -(s32) phi_v0->ob[0];
*var_v1 = -var_v0->ob[0];
} else {
phi_v1->v.ob[0] = phi_v0->ob[0];
*var_v1 = var_v0->ob[0];
}
temp_a2 = phi_a2 + 1;
temp_v1_2 = phi_v1 + 0x10;
temp_v0 = phi_v0 + 0xE;
temp_v1_2->unk-E = (s16) (s32) ((f32) phi_v0->ob[1] * D_800DC608);
temp_a0 = temp_v0->unk-4;
temp_a3 = temp_v0->unk-3;
temp_v1_2->unk-C = (s16) temp_v0->unk-A;
temp_v1_2->unk-8 = (s16) temp_v0->unk-8;
temp_v1_2->unk-4 = (s8) (temp_a0 & 0xFC);
temp_v1_2->unk-3 = (s8) (temp_a3 & 0xFC);
temp_v1_2->unk-6 = (s16) temp_v0->unk-6;
temp_v1_2->unk-2 = (s8) temp_v0->unk-2;
temp_v1_2->unk-A = (s16) (s8) ((temp_a0 & 3) | ((temp_a3 * 4) & 0xC));
temp_v1_2->unk-1 = 0xFF;
phi_v0 = temp_v0;
phi_v1 = temp_v1_2;
phi_a2 = temp_a2;
} while (temp_a2 < arg1);
var_a2 += 1;
var_v1 += 0x10;
temp_f6 = (f32) var_v0->ob[1];
var_v0 += 0xE;
var_v1->unk-E = (s16) (s32) (temp_f6 * D_800DC608);
temp_a0 = var_v0->unk-4;
temp_a3 = var_v0->unk-3;
var_v1->unk-C = (s16) var_v0->unk-A;
var_v1->unk-8 = (s16) var_v0->unk-8;
var_v1->unk-4 = (s8) (temp_a0 & 0xFC);
var_v1->unk-3 = (s8) (temp_a3 & 0xFC);
var_v1->unk-6 = (s16) var_v0->unk-6;
var_v1->unk-2 = (s8) var_v0->unk-2;
var_v1->unk-A = (s16) (s8) ((temp_a0 & 3) | ((temp_a3 * 4) & 0xC));
var_v1->unk-1 = 0xFF;
} while (var_a2 < arg1);
}
}
#else
@@ -1027,404 +1024,298 @@ GLOBAL_ASM("asm/non_matchings/memory/func_802A99A4.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit bd0364fa19633bd6201f8007e2d0a7ed87825909
? func_802A884C(s32, s32, s8, s32 *); /* extern */
? func_802A8940(s32, s32, s8, s32 *); /* extern */
? func_802A89C0(s32, s32, s8, s32 *); /* extern */
? func_802A8A04(s32, s32, s8, s32 *); /* extern */
? func_802A8A70(s32, s32, s8, s32 *); /* extern */
? func_802A8ADC(s32, s32, s8, s32 *); /* extern */
? func_802A8B48(s32, s32, s32, s32 *); /* extern */
? func_802A8BB4(s32, s32, s32, s32 *); /* extern */
? func_802A8C20(s32, s32, s32, s32 *); /* extern */
? func_802A8C8C(s32, s32, s32, s32 *); /* extern */
? func_802A8CF8(s32, s32, s32, s32 *); /* extern */
? func_802A8D64(s32, s32, s32, s32 *); /* extern */
? func_802A8DD0(s32, s32, s32, s32 *); /* extern */
? func_802A8E3C(s32, s32, s32, s32 *); /* extern */
? func_802A8EA8(s32, s32, s32, s32 *); /* extern */
? func_802A8F14(s32, s32, s32, s32 *); /* extern */
? func_802A8F80(s32, s32, s8, s32 *); /* extern */
? func_802A91E4(s32, s32, s8, s32 *); /* extern */
? func_802A94D8(s32, s32, s8, s32 *); /* extern */
? func_802A9544(s32, s32, s8, s32 *); /* extern */
? func_802A95B0(s32, s32, s8, s32 *); /* extern */
? func_802A9674(s32, s32, s8, s32 *); /* extern */
? func_802A9714(s32, s32, s8, s32 *); /* extern */
? func_802A980C(s32, s32, s8, s32 *); /* extern */
? func_802A99A4(s32, s32, s8, s32 *); /* extern */
? set_segment_base_addr(?, s32); /* extern */
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
? func_802A8F80(Gfx *, u8, s8, s32 *); /* extern */
? func_802A91E4(Gfx *, u8, s8, s32 *); /* extern */
? func_802A95B0(Gfx *, u8, s8, s32 *); /* extern */
? func_802A9674(Gfx *, u8, s8, s32 *); /* extern */
? func_802A9714(Gfx *, u8, s8, s32 *); /* extern */
? func_802A980C(Gfx *, u8, s8, s32 *); /* extern */
? func_802A99A4(Gfx *, u8, s8, s32 *); /* extern */
extern s32 D_802BA270;
extern s32 D_802BA274;
extern Gfx *gHeapEndPtr;
void display_list_unpack(u32 arg0, s32 arg1, s32 arg2) {
s32 sp2C;
s32 temp_s0;
s32 temp_s1;
void display_list_unpack(u32 arg0, s32 arg1, u8 arg2) {
Gfx *sp2C;
Gfx *temp_s1;
s32 temp_v1;
u8 temp_a0;
s32 *phi_a3;
u8 temp_s0;
temp_s0 = VIRTUAL_TO_PHYSICAL2(gSegmentTable[SEGMENT_NUMBER2(arg0)] + SEGMENT_OFFSET(arg0));
temp_s0 = gSegmentTable[arg0 >> 0x18] + (arg0 & 0xFFFFFF) + 0x80000000;
temp_s1 = gHeapEndPtr - (((arg1 + 0xF) & ~0xF) + 8);
gHeapEndPtr = temp_s1;
D_802BA270 = 0;
sp2C = temp_s1;
D_802BA274 = 0;
phi_a3 = &D_802BA274;
case 0x31:
case 0x32:
loop_1:
temp_v1 = *phi_a3;
temp_v1 = D_802BA274;
temp_a0 = *(temp_v1 + temp_s0);
*phi_a3 = temp_v1 + 1;
if (temp_a0 != 0xFF) {
switch (temp_a0) {
case 0x0:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x1:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x2:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x3:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x4:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x5:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x6:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x7:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x8:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x9:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0xA:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0xB:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0xC:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0xD:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0xE:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0xF:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x10:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x11:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x12:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x13:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x14:
func_802A884C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x15:
func_802A8B48(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x16:
func_802A8BB4(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x17:
func_802A8C20(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x2E:
func_802A8C8C(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x53:
func_802A8CF8(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x18:
func_802A8D64(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x19:
func_802A8DD0(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x2F:
func_802A8E3C(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x54:
func_802A8EA8(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x55:
func_802A8F14(temp_s1, temp_s0, arg2, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x1A:
func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x2C:
func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x1B:
func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x1C:
func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x1D:
func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x1E:
func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x1F:
func_802A8F80(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x20:
func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x21:
func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x22:
func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x23:
func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x24:
func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x25:
func_802A91E4(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x26:
func_802A94D8(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x27:
func_802A9544(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x28:
func_802A95B0(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x33:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x34:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x35:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x36:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x37:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x38:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x39:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x3A:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x3B:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x3C:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x3D:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x3E:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x3F:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x40:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x41:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x42:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x43:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x44:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x45:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x46:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x47:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x48:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x49:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x4A:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x4B:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x4C:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x4D:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x4E:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x4F:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x50:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x51:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x52:
func_802A9674(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x29:
func_802A9714(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x58:
func_802A980C(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x30:
func_802A99A4(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x2D:
func_802A8ADC(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x2A:
func_802A89C0(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x56:
func_802A8A04(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x57:
func_802A8A70(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
case 0x2B:
func_802A8940(temp_s1, temp_s0, temp_a0, phi_a3);
phi_a3 = &D_802BA274;
break;
}
D_802BA274 = temp_v1 + 1;
switch (temp_a0) { /* irregular */
case 0x0:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x1:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x2:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x3:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x4:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x5:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x6:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x7:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x8:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x9:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0xA:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0xB:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0xC:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0xD:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0xE:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0xF:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x10:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x11:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x12:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x13:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x14:
func_802A884C(temp_s1, temp_s0, (s8) temp_a0);
goto loop_1;
case 0x15:
func_802A8B48(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x16:
func_802A8BB4(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x17:
func_802A8C20(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x2E:
func_802A8C8C(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x53:
func_802A8CF8(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x18:
func_802A8D64(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x19:
func_802A8DD0(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x2F:
func_802A8E3C(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x54:
func_802A8EA8(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x55:
func_802A8F14(temp_s1, temp_s0, arg2);
goto loop_1;
case 0x1A:
func_802A8F80(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x2C:
func_802A8F80(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x1B:
func_802A8F80(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x1C:
func_802A8F80(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x1D:
func_802A8F80(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x1E:
func_802A8F80(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x1F:
func_802A8F80(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x20:
func_802A91E4(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x21:
func_802A91E4(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x22:
func_802A91E4(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x23:
func_802A91E4(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x24:
func_802A91E4(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x25:
func_802A91E4(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x26:
func_802A94D8(temp_s1, temp_s0, (u8) (s8) temp_a0);
goto loop_1;
case 0x27:
func_802A9544(temp_s1, temp_s0, (u8) (s8) temp_a0);
goto loop_1;
case 0x28:
func_802A95B0(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x33:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x34:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x35:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x36:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x37:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x38:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x39:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x3A:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x3B:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x3C:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x3D:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x3E:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x3F:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x40:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x41:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x42:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x43:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x44:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x45:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x46:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x47:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x48:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x49:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x4A:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x4B:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x4C:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x4D:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x4E:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x4F:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x50:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x51:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x52:
func_802A9674(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x29:
func_802A9714(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x58:
func_802A980C(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x30:
func_802A99A4(temp_s1, temp_s0, (s8) temp_a0, &D_802BA274);
goto loop_1;
case 0x2D:
func_802A8ADC(temp_s1, temp_s0, (u8) (s8) temp_a0);
goto loop_1;
case 0x2A:
func_802A89C0(temp_s1, temp_s0, (u8) (s8) temp_a0);
goto loop_1;
case 0x56:
func_802A8A04(temp_s1, temp_s0, (u8) (s8) temp_a0);
goto loop_1;
case 0x57:
func_802A8A70(temp_s1, temp_s0, (u8) (s8) temp_a0);
goto loop_1;
case 0x2B:
func_802A8940(temp_s1, (u8 *) temp_s0, (u8) (s8) temp_a0);
goto loop_1;
}
set_segment_base_addr(7, sp2C);
@@ -1503,15 +1394,16 @@ GLOBAL_ASM("asm/non_matchings/memory/func_802AA88C.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? display_list_unpack(u32 *, u32 *, s32); // extern
s32 func_802A7D70(u32 *, u32 *, u32 *); // extern
s32 func_802A82E4(u32 *, u32 *); // extern
? func_802A87A8(mk64_Vtx *, u32); // extern
? func_802AA7C8(u32 *); // extern
//generated by m2c commit 8267401fa4ef7a38942dcca43353cc1bcc6efabc
? display_list_unpack(u32 *, u32 *, s32); /* extern */
? func_802A87A8(mk64_Vtx *, u32); /* extern */
? func_802AA7C8(u32 *); /* extern */
void *func_802AA88C(u32 *, u32 *); /* extern */
extern s32 gGamestate;
extern s32 gHeapEndPtr;
extern s32 gPrevLoadedAddress;
void load_course(s32 arg0) {
s32 load_course(s32 arg0) {
s32 sp4C;
u32 *sp48;
u32 *sp44;
@@ -1524,41 +1416,40 @@ void load_course(s32 arg0) {
u32 *sp20;
s32 sp1C;
s32 sp18;
s32 temp_v0_2;
s32 temp_v0;
s32 temp_v1;
struct courseTable *temp_v0;
u32 *temp_a2;
struct courseTable *temp_v0_2;
temp_v0 = &gCourseTable[arg0];
temp_v0_2 = &gCourseTable[arg0];
temp_v1 = gGamestate;
temp_a2 = temp_v0->offsetRomStart;
sp48 = temp_v0->dlRomStart;
sp44 = temp_v0->dlRomEnd;
sp40 = temp_v0->vertexRomStart;
sp3C = temp_v0->vertexRomEnd;
sp30 = temp_v0->textures;
sp2C = temp_v0->vertexStart;
sp28 = temp_v0->packedStart;
sp24 = temp_v0->vertexCount;
sp20 = temp_v0->finalDL;
sp1C = temp_v0->unknown1;
sp48 = temp_v0_2->dlRomStart;
sp44 = temp_v0_2->dlRomEnd;
sp40 = temp_v0_2->vertexRomStart;
sp3C = temp_v0_2->vertexRomEnd;
sp30 = temp_v0_2->textures;
sp2C = temp_v0_2->vertexStart;
sp28 = temp_v0_2->packedStart;
sp24 = temp_v0_2->vertexCount;
sp20 = temp_v0_2->finalDL;
sp1C = (s32) temp_v0_2->unknown1;
if ((temp_v1 == 5) || (temp_v1 == 9)) {
gHeapEndPtr = 0x80280000;
} else {
gHeapEndPtr = 0x8028DF00;
}
set_segment_base_addr(9, func_802A7D70(temp_a2, temp_v0->offsetRomEnd, temp_a2));
set_segment_base_addr(9, func_802A7D70((s32) temp_v0_2->offsetRomStart, (s32) temp_v0_2->offsetRomEnd));
if (gGamestate != ENDING_SEQUENCE) {
set_segment_base_addr(6, func_802AA88C(sp48, sp44));
}
sp18 = gPrevLoadedAddress;
temp_v0_2 = func_802A82E4(sp40, sp3C);
sp4C = temp_v0_2;
set_segment_base_addr(0xF, temp_v0_2);
temp_v0 = func_802A82E4((u8 *) sp40, (u8 *) sp3C);
sp4C = temp_v0;
set_segment_base_addr(0x0000000F, (void *) temp_v0);
func_802A87A8(sp2C, sp24);
display_list_unpack(sp28, sp20, sp1C);
func_802AA7C8(sp30);
gPrevLoadedAddress = sp18;
return temp_v0;
}
#else
GLOBAL_ASM("asm/non_matchings/memory/load_course.s")
@@ -1575,28 +1466,20 @@ void func_802AAA70(uintptr_t addr) {
macro->words.w1 = G_SPNOOP;
}
#ifdef MIPS_TO_C
//generated by m2c commit 685418adfeb3794409e47b45ac5cab60b17d23fd
void func_802AAAAC(UnkActorInner *arg0) {
f32 *temp_a0;
arg0->unk36 = 0x1388;
arg0->unk38 = 0x1388;
arg0->unk3A = 0x1388;
arg0->unk30 = 0;
arg0->unk32 = 0;
arg0->unk34 = 0;
temp_a0 = arg0->unk48;
temp_a0->unk-C = 0.0f;
temp_a0->unk-8 = 0.0f;
temp_a0->unk-4 = 0.0f;
vec3f_set(temp_a0, 0.0f, 0.0f, 1.0f);
arg0->unk3C[0] = 0;
arg0->unk3C[1] = 0;
arg0->unk3C[2] = 0;
vec3f_set(arg0->unk48, 0.0f, 0.0f, 1.0f);
vec3f_set(arg0->unk54, 1.0f, 0.0f, 0.0f);
vec3f_set(arg0->unk60, 0.0f, 1.0f, 0.0f);
}
#else
GLOBAL_ASM("asm/non_matchings/memory/func_802AAAAC.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
@@ -2356,12 +2239,12 @@ GLOBAL_ASM("asm/non_matchings/memory/process_shell_collision.s")
#endif
void func_802AC098(UnkActorInner *arg0, f32 *velocity) {
if (arg0->unk3C < 0.0f) {
process_shell_collision(arg0->unk48, arg0->unk3C, velocity, 2.0f);
if (arg0->unk3C[0] < 0.0f) {
process_shell_collision(arg0->unk48, arg0->unk3C[0], velocity, 2.0f);
}
if (arg0->unk40 < 0.0f) {
process_shell_collision(arg0->unk54, arg0->unk40, velocity, 2.0f);
if (arg0->unk3C[1] < 0.0f) {
process_shell_collision(arg0->unk54, arg0->unk3C[1], velocity, 2.0f);
}
}
+1
View File
@@ -97,6 +97,7 @@ f32 func_802ABE30(f32, f32, f32, u16);
f32 func_802ABEAC(UnkActorInner*, Vec3f);
void process_shell_collision(Vec3f, f32, Vec3f, f32);
void func_802AC098(UnkActorInner*, f32*);
void func_802AC114(Vec3f, f32, Vec3f, f32);
void func_802AD950(UnkActorInner*, f32, f32, f32, f32, f32, f32, f32);
void func_802ADDC8(UnkActorInner*, f32, f32, f32, f32);
f32 func_802AE1C0(f32, f32, f32);
+3
View File
@@ -87,6 +87,9 @@ extern f32 D_80150148;
extern u16 D_8015F894;
s32 D_802B91C0[2] = { 13, 13 };
Vec3f D_802B91C8 = { 0.0f, 0.0f, 0.0f };
u16 D_802BA030;
u16 D_802BA032;
+2 -2
View File
@@ -13,10 +13,10 @@ s32 func_80290C20(Camera *camera) {
if (camera->unk_54.unk34 == 0) {
return 1;
}
if ((camera->unk_54.unk30 == 1) && (camera->unk_54.unk3C < 3.0f)) {
if ((camera->unk_54.unk30 == 1) && (camera->unk_54.unk3C[0] < 3.0f)) {
return 1;
}
if ((camera->unk_54.unk32 == 1) && (camera->unk_54.unk40 < 3.0f)) {
if ((camera->unk_54.unk32 == 1) && (camera->unk_54.unk3C[1] < 3.0f)) {
return 1;
}
return 0;
+2 -2
View File
@@ -118,8 +118,8 @@ extern Gfx D_sherbet_land_06000000[];
extern u16 D_800DC518;
extern u16 D_8015F58A;
extern s16 D_8015F700;
extern s16 D_8015F702;
extern u16 D_8015F700;
extern u16 D_8015F702;
extern f32 D_8015F8E8;
extern f32 D_8015F8E4;
+4 -4
View File
@@ -131,7 +131,7 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4,
player->unk_10C = 0;
player->unk_200 = 0;
player->unk_204 = 0;
player->unk_220 = 0;
player->nearestWaypointId = 0;
player->unk_228 = 0;
player->unk_22A = 0;
player->unk_234 = 0;
@@ -276,9 +276,9 @@ void spawn_player(Player *player, s8 playerIndex, f32 arg2, f32 arg3, f32 arg4,
player->boundingBoxCorners[ BACK_LEFT_TYRE].cornerGroundY = 0.0f;
player->boundingBoxCorners[ BACK_RIGHT_TYRE].cornerGroundY = 0.0f;
player->unk_110.unk3C = 0.0f;
player->unk_110.unk40 = 0.0f;
player->unk_110.unk44 = 0.0f;
player->unk_110.unk3C[0] = 0.0f;
player->unk_110.unk3C[1] = 0.0f;
player->unk_110.unk3C[2] = 0.0f;
player->unk_110.unk48[0] = 0.0f;
player->unk_110.unk48[1] = 0.0f;
player->unk_110.unk48[2] = 0.0f;