Rename some files and Match spawn_players.c (#226)

* name some code files

* Match spawn_players func

* random decomp

* name more files
This commit is contained in:
MegaMech
2022-06-17 04:05:27 -06:00
committed by GitHub
parent fd3e8e0e15
commit 22ca23f32c
79 changed files with 2525 additions and 5148 deletions
+24 -24
View File
@@ -8,8 +8,8 @@
#include <PR/gbi.h>
#include "math_util.h"
#include "memory.h"
#include "code_802B0210.h"
#include "code_80296A50.h"
#include "actors_extended.h"
#include "actors.h"
s32 D_802BA050;
s32 D_802BA054;
@@ -169,7 +169,7 @@ loop_34:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80296A50.s")
GLOBAL_ASM("asm/non_matchings/actors/func_80296A50.s")
#endif
#ifdef MIPS_TO_C
@@ -359,7 +359,7 @@ void func_80296D10(struct Actor *actor, Vec3f startingPos, Vec3s startingRot, Ve
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80296D10.s")
GLOBAL_ASM("asm/non_matchings/actors/func_80296D10.s")
#endif
void func_80297230(Camera *arg0, struct Actor *arg1) {
@@ -454,7 +454,7 @@ if (temp_t4 < 0x7FF) {
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, 0, 0);
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80297524.s")
GLOBAL_ASM("asm/non_matchings/actors/func_80297524.s")
#endif
void func_802976D8(Vec3s arg0) {
@@ -580,7 +580,7 @@ void func_80297A50(Camera *camera, Mat4 arg1, struct Actor *arg2) {
}
}
#endif
GLOBAL_ASM("asm/non_matchings/code_actors/func_80297A50.s")
GLOBAL_ASM("asm/non_matchings/actors/func_80297A50.s")
void update_obj_yoshi_valley_egg(struct YoshiValleyEgg *egg) {
egg->pathRot += 0x5B;
@@ -729,7 +729,7 @@ block_17:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/update_obj_kiwano_fruit.s")
GLOBAL_ASM("asm/non_matchings/actors/update_obj_kiwano_fruit.s")
#endif
void update_obj_paddle_wheel(struct PaddleWheelBoat *boat) {
@@ -1057,7 +1057,7 @@ block_17:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802986B4.s")
GLOBAL_ASM("asm/non_matchings/actors/func_802986B4.s")
#endif
//static f32 D_802B964C = 0.8f;
@@ -1087,7 +1087,7 @@ void func_80298AC0(Player *player) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80298AC0.s")
GLOBAL_ASM("asm/non_matchings/actors/func_80298AC0.s")
#endif
void func_80298C94(void) {
@@ -1254,7 +1254,7 @@ block_29:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_80298D7C.s")
GLOBAL_ASM("asm/non_matchings/actors/func_80298D7C.s")
#endif
void func_80299144(Camera *camera, Mat4 arg1, struct Actor *arg2) {
@@ -1738,7 +1738,7 @@ void func_8029AC18(Camera *camera, Mat4 arg1, struct Actor *arg2) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029AC18.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029AC18.s")
#endif
void func_8029AE1C(Camera *arg0, struct PaddleWheelBoat *boat, Mat4 arg2, u16 arg3) {
@@ -2435,7 +2435,7 @@ void update_obj_falling_rocks(struct FallingRock *rock) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/update_obj_falling_rocks.s")
GLOBAL_ASM("asm/non_matchings/actors/update_obj_falling_rocks.s")
#endif
#ifdef MIPS_TO_C
@@ -2536,7 +2536,7 @@ void place_segment_06(u32 arg0) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/place_segment_06.s")
GLOBAL_ASM("asm/non_matchings/actors/place_segment_06.s")
#endif
void place_all_item_boxes(struct ActorSpawnData *spawnData) {
@@ -2776,7 +2776,7 @@ void func_8029DB44(void) {
gNumPermanentActors = gNumActors;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029DB44.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029DB44.s")
#endif
#ifdef MIPS_TO_C
@@ -2956,7 +2956,7 @@ void func_8029E158(void) {
func_800122D8();
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E158.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029E158.s")
#endif
void func_8029E7DC(struct Actor *actor) {
@@ -3153,7 +3153,7 @@ block_50:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029E890.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029E890.s")
#endif
s16 func_8029EC88(Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType) {
@@ -3206,7 +3206,7 @@ void func_8029ED98(Player *player, u32 arg1) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029ED98.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029ED98.s")
#endif
#ifdef MIPS_TO_C
@@ -3320,7 +3320,7 @@ block_25:
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029EEB8.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029EEB8.s")
#endif
#ifdef NEEDS_RODATA
@@ -3343,7 +3343,7 @@ s32 func_8029F1F8(Player *player, struct Actor *marioRacewaySign) {
return 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029F1F8.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029F1F8.s")
#endif
s32 func_8029F2FC(Player *player, struct PiranhaPlant *plant) {
@@ -3575,7 +3575,7 @@ block_36:
return 1;
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029F69C.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029F69C.s")
#endif
s32 func_8029FB80(Player *arg0, struct Actor *arg1) {
@@ -3795,7 +3795,7 @@ void func_8029FDC8(struct Actor *actor) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_8029FDC8.s")
GLOBAL_ASM("asm/non_matchings/actors/func_8029FDC8.s")
#endif
void func_802A00E8(struct Actor *arg0, struct Actor *arg1) {
@@ -4125,7 +4125,7 @@ block_89:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802A0450.s")
GLOBAL_ASM("asm/non_matchings/actors/func_802A0450.s")
#endif
void func_802A0D54(void) {
@@ -4652,7 +4652,7 @@ void func_802A171C(Camera *camera, struct Actor *actor) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802A171C.s")
GLOBAL_ASM("asm/non_matchings/actors/func_802A171C.s")
#endif
#ifdef MIPS_TO_C
@@ -4976,7 +4976,7 @@ block_42:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_actors/func_802A1EA0.s")
GLOBAL_ASM("asm/non_matchings/actors/func_802A1EA0.s")
#endif
void func_802A269C(Camera *arg0, struct Actor *arg1) {
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef CODE_80296A50_H
#define CODE_80296A50_H
#ifndef ACTORS_H
#define ACTORS_H
#include "types.h"
#include "actor_types.h"
@@ -319,4 +319,4 @@ extern u16 D_800DC5BC;
extern Vec3f D_8015F8D0;
#endif
#endif // ACTORS_H
@@ -5,8 +5,8 @@
#include "math_util.h"
#include "memory.h"
#include "code_80091750.h"
#include "code_80296A50.h"
#include "code_802B0210.h"
#include "actors.h"
#include "actors_extended.h"
void func_802B0210(UnkActorInner *arg0, UnkActorInner *arg1) {
arg1->unk30 = arg0->unk30;
@@ -1,5 +1,5 @@
#ifndef CODE_802B0210_H
#define CODE_802B0210_H
#ifndef ACTORS_EXTENDED_H
#define ACTORS_EXTENDED_H
#include "common_structs.h"
#include "actor_types.h"
@@ -87,4 +87,4 @@ extern u16 D_80164430;
extern u16 D_80164438[];
extern s16 gPlayerPositionLUT[];
#endif
#endif // ACTORS_EXTENDED_H
+13 -13
View File
@@ -221,7 +221,7 @@ block_7:
func_802B7F7C(&cameras[cameraId], &cameras[cameraId].unk, &cameras[cameraId].rotX, &cameras[cameraId]);
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001C4D0.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001C4D0.s")
#endif
void func_8001CA10(Camera *camera) {
@@ -312,7 +312,7 @@ void func_8001CA78(s32 arg0, void *arg1, void *arg2, f32 *arg3, f32 *arg4, f32 *
*arg5 = ((temp_f16 - temp_f12) * 1.0f) + temp_f12;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001CA78.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001CA78.s")
#endif
#ifdef MIPS_TO_C
@@ -555,7 +555,7 @@ void func_8001CCEC(void *arg0, void *arg1, void *arg2, f32 *arg3, f32 *arg4, f32
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001CCEC.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001CCEC.s")
#endif
#ifdef MIPS_TO_C
@@ -621,7 +621,7 @@ void func_8001D53C(void *arg0, void *arg1, void *arg2, f32 *arg3, f32 *arg4, f32
*(&D_80164AA0 + sp38) = 0.0f;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001D53C.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001D53C.s")
#endif
#ifdef MIPS_TO_C
@@ -663,7 +663,7 @@ void func_8001D794(void *arg0, void *arg1, void *arg2, f32 *arg3, f32 *arg4, f32
*arg5 = (((sp68 + arg0->unk1C) - temp_f12) * 1.0f) + temp_f12;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001D794.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001D794.s")
#endif
#ifdef MIPS_TO_C
@@ -884,7 +884,7 @@ void func_8001D944(void *arg0, void *arg1, void *arg2, f32 *arg3, f32 *arg4, f32
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001D944.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001D944.s")
#endif
#ifdef MIPS_TO_C
@@ -965,7 +965,7 @@ void func_8001E0C4(void *arg0, void *arg1, s8 arg2) {
arg0->unk28 = 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001E0C4.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001E0C4.s")
#endif
#ifdef MIPS_TO_C
@@ -1073,7 +1073,7 @@ block_26:
arg0->unk28 = 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001E45C.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001E45C.s")
#endif
#ifdef MIPS_TO_C
@@ -1113,7 +1113,7 @@ void func_8001E8E8(void *arg0, void *arg1, s8 arg2) {
arg0->unk28 = 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001E8E8.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001E8E8.s")
#endif
#ifdef MIPS_TO_C
@@ -1221,7 +1221,7 @@ block_26:
arg0->unk28 = 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001EA0C.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001EA0C.s")
#endif
#ifdef MIPS_TO_C
@@ -1376,7 +1376,7 @@ void func_8001EE98(void *arg0, s32 arg1, s8 arg2) {
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001EE98.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001EE98.s")
#endif
#ifdef MIPS_TO_C
@@ -1563,7 +1563,7 @@ block_66:
cameras[playerId].unk30 = phi_f2;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001F394.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001F394.s")
#endif
#ifdef MIPS_TO_C
@@ -1607,5 +1607,5 @@ loop_3:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001C4D0/func_8001F87C.s")
GLOBAL_ASM("asm/non_matchings/camera/func_8001F87C.s")
#endif
@@ -29,6 +29,7 @@ extern f32 D_80150130[];
// rodata
extern const f32 D_80286B90, D_80286B94, D_80286B98, D_80286B9C, D_80286BA0;
// GP Ending sequence camera settings?
void func_802816B8(void) {
cameras[0].pos[0] = D_80286B90;
cameras[0].pos[1] = 19.0f;
+5 -22
View File
@@ -753,16 +753,10 @@ void func_800215DC(void) {
D_800DDB58[0] = 0;
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_80020000(Player *, s32, ?, ?); // extern
? func_80020BF4(Player **, ?, ?); // extern
? func_80021244(Player *, ?, ?); // extern
? func_8006E6BC(Player *, ?, ?); // extern
extern s32 D_800DDB58;
void func_8006E6BC(Player*, s8, s8); // extern
void func_8002186C(void) {
D_800DDB58 = 0;
D_800DDB58[0] = 0;
func_80020000(gPlayerOneCopy, camera3, 0, 2);
func_80020000(gPlayerTwo, camera3, 1, 2);
func_80020000(gPlayerThree, camera3, 2, 2);
@@ -771,19 +765,16 @@ void func_8002186C(void) {
func_80021244(gPlayerTwo, 1, 2);
func_80021244(gPlayerThree, 2, 2);
func_80021244(gPlayerFour, 3, 2);
if (D_800DDB58 != 0) {
func_80020BF4(&gPlayerOneCopy, 0, 2);
if (D_800DDB58[0] != 0) {
func_80020BF4();
} else {
func_8006E6BC(gPlayerOneCopy, 0, 2);
func_8006E6BC(gPlayerTwo, 1, 2);
func_8006E6BC(gPlayerThree, 2, 2);
func_8006E6BC(gPlayerFour, 3, 2);
}
D_800DDB58 = 0;
D_800DDB58[0] = 0;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001F980/func_8002186C.s")
#endif
void func_800219BC(void) {
*D_800DDB58 = 0;
@@ -1052,18 +1043,10 @@ void move_u16_towards(u16 *startingValue, s16 targetValue, f32 somePercent) {
*startingValue -= ((*startingValue - targetValue) * somePercent);
}
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8002276C(); // extern
? func_8006E058(); // extern
void func_80022744(void) {
func_8006E058();
func_8002276C();
}
#else
GLOBAL_ASM("asm/non_matchings/code_8001F980/func_80022744.s")
#endif
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
+31 -29
View File
@@ -6,7 +6,7 @@
#include <config.h>
#include <defines.h>
#include "code_80057C60.h"
#include "code_80040E50.h"
#include "math_util_2.h"
#include "math_util.h"
// UI Code?
@@ -8688,16 +8688,15 @@ GLOBAL_ASM("asm/non_matchings/code_80057C60/func_80068DA0.s")
#ifdef MIPS_TO_C
//generated by mips_to_c commit 3c3b0cede1a99430bfd3edf8d385802b94f91307
? func_8004B35C(?, ?, ?, s16); // extern
? func_800652D4(f32 *, s16 *, f32, s8); // extern
extern ? D_0D008D58;
extern ? D_0D008DA0;
extern ? D_800E87C0;
void func_8004B35C(s32, s32, s32, s32); // extern
void func_800652D4(s32, s32, s32, s32); // extern
extern Gfx D_0D008D58[];
extern Gfx D_0D008DA0[];
extern Gfx D_800E87C0[];
extern s16 D_80164AF0;
extern s32 D_8018D488;
extern void *gDisplayListHead;
void func_800691B8(void *arg0, ? arg1, s16 arg2, s8 arg3) {
void func_800691B8(Player *arg0, s8 arg1, s16 arg2, s8 arg3) {
f32 sp64;
f32 sp60;
f32 sp5C;
@@ -8705,33 +8704,35 @@ void func_800691B8(void *arg0, ? arg1, s16 arg2, s8 arg3) {
s16 sp56;
s16 sp54;
s16 sp52;
void *sp30;
void *sp2C;
void *temp_v0;
void *temp_v0_10;
void *temp_v0_11;
void *temp_v0_12;
void *temp_v0_13;
void *temp_v0_2;
void *temp_v0_3;
void *temp_v0_4;
void *temp_v0_5;
void *temp_v0_6;
void *temp_v0_7;
void *temp_v0_8;
void *temp_v0_9;
temp_v0 = arg0 + (arg2 * 0x48);
void *temp_v0 = arg0; //->unk_000 + (arg2 * 0x48);
if (temp_v0->unkAE4 == 1) {
sp52 = temp_v0->unkB06;
sp5C = temp_v0->unkAC8;
sp60 = temp_v0->unkACC;
sp52 = temp_v0->unk_B06;
sp5C = temp_v0->unk_AC8;
sp60 = temp_v0->unk_ACC;
sp54 = 0;
sp64 = temp_v0->unkAD0;
sp56 = (arg0 + (arg3 * 2))->unk48;
temp_v0->unkB02 = temp_v0->unkB02 + 0x1C71;
sp58 = temp_v0->unkB02;
func_800652D4(&sp5C, &sp54, arg0->unk224 * 0.5, arg3);
gSPDisplayList(gDisplayListHead++, 0x0D008D58);
gDPSetTextureLUT(gDisplayListHead++, G_TT_NONE);
gDPSetTextureImage(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 1, 0x8018D488);
gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_16b, 0, 0x0000, G_TX_RENDERTILE, 8, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, 8, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
gDPLoadSync(gDisplayListHead++);
gDPLoadBlock(gDisplayListHead++, G_TX_LOADTILE, 0, 0, 511, 512);
gDPPipeSync(gDisplayListHead++);
gDPSetTile(gDisplayListHead++, G_IM_FMT_IA, G_IM_SIZ_8b, 4, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOLOD);
gDPSetTileSize(gDisplayListHead++, G_TX_RENDERTILE, 0, 0, qu102(31), qu102(31));
func_8004B35C(0xFF, 0xFF, 0, sp52);
gDPSetRenderMode(gDisplayListHead++, G_RM_ZB_CLD_SURF, G_RM_ZB_CLD_SURF2);
gSPVertex(gDisplayListHead++, 0x800E87C0, 4, 0);
gSPDisplayList(gDisplayListHead++, 0x0D008DA0);
/*
temp_v0_2 = gDisplayListHead;
gDisplayListHead = temp_v0_2 + 8;
temp_v0_2->unk0 = 0x6000000;
@@ -8783,7 +8784,8 @@ void func_800691B8(void *arg0, ? arg1, s16 arg2, s8 arg3) {
gDisplayListHead = temp_v0_13 + 8;
temp_v0_13->unk0 = 0x6000000;
temp_v0_13->unk4 = &D_0D008DA0;
D_80164AF0 = D_80164AF0 + 1;
*/
D_80164AF0++;
}
}
#else
+1 -1
View File
@@ -2,7 +2,7 @@
#include <macros.h>
#include <defines.h>
#include <functions.h>
#include "code_80040E50.h"
#include "math_util_2.h"
#include "code_80071F00.h"
s32 find_unused_obj_index(s32* arg0) {
+1 -1
View File
@@ -9,7 +9,7 @@ extern Mtx D_0D008E98;
extern Gfx* gDisplayListHead;
// rsp init
void gfx_func_80040D00(void) {
UNUSED void gfx_func_80040D00(void) {
D_800E43A8 = 0;
gDPSetCombineMode(gDisplayListHead++, G_CC_SHADE, G_CC_SHADE);
-7
View File
@@ -1116,13 +1116,6 @@ void thread5_game_logic(s32 arg0) {
read_controllers();
func_800C5CB8();
//set_segment_base_addr(0x8, SEG_NETWORK);
//osInvalICache(SEG_NETWORK, 0x90);
//osInvalDCache(SEG_NETWORK+0x90, 0xFF);
//osPiStartDma(&gDmaIoMesg, 0, 0, &_networkSegmentRomStart, SEG_NETWORK, 0xFF, &gDmaMesgQueue);
//osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, 1);
while(1) {
func_800CB2C4();
if (D_800DC524 != D_800DC50C) {
+1 -1
View File
@@ -1,7 +1,7 @@
#include <ultra64.h>
#include <macros.h>
#include <common_structs.h>
#include "code_80040E50.h"
#include "math_util_2.h"
#include "main.h"
#include "variables.h"
#include "math_util.h"
+3 -3
View File
@@ -1,5 +1,5 @@
#ifndef CODE_80040E50_H
#define CODE_80040E50_H
#ifndef MATH_UTIL_2_H
#define MATH_UTIL_2_H
#include "types.h"
#include "common_structs.h"
@@ -90,4 +90,4 @@ extern s32 D_8018D120;
// This is also used in 80071F00
extern struct_80165C18_entry D_80165C18[];
#endif
#endif // MATH_UTIL_2_H
+3 -3
View File
@@ -901,7 +901,7 @@ void func_8028F588(void) {
D_800DC5EC->screenHeight = phi_v0_8;
}
#else
GLOBAL_ASM("asm/non_matchings/code_8028DF00/func_8028F588.s")
GLOBAL_ASM("asm/non_matchings/race_logic/func_8028F588.s")
#endif
void func_8028F8BC(void) {
@@ -1018,7 +1018,7 @@ block_20:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8028DF00/func_8028F970.s")
GLOBAL_ASM("asm/non_matchings/race_logic/func_8028F970.s")
#endif
void func_8028FBD4(void) {
@@ -1401,7 +1401,7 @@ block_8:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_8028DF00/func_802903D8.s")
GLOBAL_ASM("asm/non_matchings/race_logic/func_802903D8.s")
#endif
void func_802909F0(void) {
+3 -3
View File
@@ -221,7 +221,7 @@ block_60:
temp_v1_3->unk4 = *(sp24 + ((((phi_a0 * 4) + phi_a3_2) - 4) * 4));
}
#else
GLOBAL_ASM("asm/non_matchings/code_80290C20/load_surface_map.s")
GLOBAL_ASM("asm/non_matchings/render_courses/load_surface_map.s")
#endif
void func_80291198(void) {
@@ -1059,7 +1059,7 @@ block_82:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_80290C20/func_8029122C.s")
GLOBAL_ASM("asm/non_matchings/render_courses/func_8029122C.s")
#endif
void func_80291198();
@@ -1537,7 +1537,7 @@ void render_moo_moo_farm(struct UnkStruct_800DC5EC *arg0) {
gSPDisplayList(gDisplayListHead++, 0x070010C0);
}
#else
GLOBAL_ASM("asm/non_matchings/code_80290C20/render_moo_moo_farm.s")
GLOBAL_ASM("asm/non_matchings/render_courses/render_moo_moo_farm.s")
#endif
extern s32 D_801625EC;
@@ -577,7 +577,7 @@ void func_802A4A0C(Vtx *arg0, struct UnkStruct_800DC5EC *arg1, s32 arg2, s32 arg
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_802A3730/func_802A4A0C.s")
GLOBAL_ASM("asm/non_matchings/skybox/func_802A4A0C.s")
#endif
/*
@@ -751,7 +751,7 @@ void func_802A4D18(void) {
}
#else
GLOBAL_ASM("asm/non_matchings/code_802A3730/func_802A4D18.s")
GLOBAL_ASM("asm/non_matchings/skybox/func_802A4D18.s")
#endif
//extern f32 D_80150134;
@@ -1572,7 +1572,7 @@ block_7:
}
}
#else
GLOBAL_ASM("asm/non_matchings/code_802A3730/func_802A7658.s")
GLOBAL_ASM("asm/non_matchings/skybox/func_802A7658.s")
#endif
extern s32 D_800DC5DC;
+133 -182
View File
@@ -389,42 +389,42 @@ void func_80039AE4(void) {
}
}
typedef struct {
s32 unk00[8];
} temp_80039DA4; // to be removed when data is compilable
extern temp_80039DA4 D_800E4360;
extern temp_80039DA4 D_800E4380;
//typedef struct {
// s32 unk00[8];
//} temp_80039DA4; // to be removed when data is compilable
//extern temp_80039DA4 D_800E4360;
//extern temp_80039DA4 D_800E4380;
void func_80039DA4(void) {
s32 i;
// Put back in when data is compilable
/*
s32 sp2C[] = {
0x00000007, 0x00000006, 0x00000005, 0x00000004,
0x00000003, 0x00000002, 0x00000001, 0x00000000,
7, 6, 5, 4,
3, 2, 1, 0,
};
s32 spC[] = {
0x00000000, 0x00000001, 0x00000002, 0x00000003,
0x00000004, 0x00000005, 0x00000006, 0x00000007,
0, 1, 2, 3,
4, 5, 6, 7,
};
*/
temp_80039DA4 sp2C = D_800E4360;
temp_80039DA4 spC = D_800E4380;
if (((gCupCourseSelection == CUP_COURSE_ONE) && (D_8016556E == 0)) ||
(D_800DC51C == 1) ||
(gDebugMenuSelection == DEBUG_MENU_EXITED)) {
for (i = 0; i < 8; i++) {
D_80165270[i] = sp2C.unk00[i];
D_80165270[i] = sp2C[i];
}
} else {
for (i = 0; i < 8; i++) {
D_80165270[i] = spC.unk00[gPlayerPositions[i]];
D_80165270[i] = spC[gPlayerPositions[i]];
}
}
}
UNUSED f32 D_800E43A0 = 1.0f;
UNUSED s16 D_800E43A4 = 1;
UNUSED s16 D_800E43A8 = 0;
void func_80039F44(f32 *arg0, f32 *arg1, f32 arg2) {
func_80039DA4();
if (((gCupCourseSelection == CUP_COURSE_ONE) && (D_8016556E == 0)) ||
@@ -676,48 +676,29 @@ void spawn_players_4p_battle(f32 *arg0, f32 *arg1, f32 arg2) {
func_80039AE4();
}
/* Remove when rodata works */
extern f32 D_800EDE20;
extern f32 D_800EDE24;
extern f32 D_800EDE28;
extern f32 D_800EDE2C;
extern f32 D_800EDE30;
extern f32 D_800EDE34;
extern f32 D_800EDE38;
extern f32 D_800EDE3C;
extern f32 D_800EDE40;
extern f32 D_800EDE44;
extern f32 D_800EDE48;
extern f32 D_800EDE4C;
extern f32 D_800EDE50;
extern f32 D_800EDE54;
extern f32 D_800EDE58;
extern f32 D_800EDE5C;
void func_8003BE30(void) {
spawn_player(gPlayerOne, 0, -2770.774f, -345.187f, D_800EDE20, 0.0f, gCharacterIdByGPOverallRank[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerTwo, 1, -3691.506f, -6.822f, D_800EDE24, D_800EDE28, gCharacterIdByGPOverallRank[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerThree, 2, -3475.028f, -998.485f, D_800EDE2C, D_800EDE30, gCharacterIdByGPOverallRank[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerOne, 0, -2770.774f, -345.187f, -34.6f, 0.0f, gCharacterIdByGPOverallRank[0], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerTwo, 1, -3691.506f, -6.822f, -6.95f, 36400.0f, gCharacterIdByGPOverallRank[1], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerThree, 2, -3475.028f, -998.485f, -8.059f, 45500.0f, gCharacterIdByGPOverallRank[2], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
if (D_802874D8.unk_1D >= 3) {
spawn_player(gPlayerFour, 3, -3025.772f, 110.039f, D_800EDE34, D_800EDE38, D_802874D8.unk_1E, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerFour, 3, -3025.772f, 110.039f, -23.224f, 28210.0f, D_802874D8.unk_1E, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
} else {
spawn_player(gPlayerFour, 3, -3025.772f, 110.039f, D_800EDE3C, D_800EDE40, gCharacterIdByGPOverallRank[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerFour, 3, -3025.772f, 110.039f, -23.224f, 28210.0f, gCharacterIdByGPOverallRank[3], PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
}
spawn_player(gPlayerFive, 4, -2770.774f, -345.187f, D_800EDE44, 0.0f, 0, 0x7000);
spawn_player(gPlayerSix, 5, -3691.506f, -6.822f, D_800EDE48, D_800EDE4C, 0, 0x7000);
spawn_player(gPlayerSeven, 6, -3475.028f, -998.485f, D_800EDE50, D_800EDE54, 0, 0x7000);
spawn_player(gPlayerEight, 7, -3025.772f, 110.039f, D_800EDE58, D_800EDE5C, 0, 0x7000);
spawn_player(gPlayerFive, 4, -2770.774f, -345.187f, -34.6f, 0.0f, 0, 0x7000);
spawn_player(gPlayerSix, 5, -3691.506f, -6.822f, -6.95f, 36400.0f, 0, 0x7000);
spawn_player(gPlayerSeven, 6, -3475.028f, -998.485f, -8.059f, 45500.0f, 0, 0x7000);
spawn_player(gPlayerEight, 7, -3025.772f, 110.039f, -23.224f, 28210.0f, 0, 0x7000);
D_80164A28 = 0;
func_80039AE4();
}
#ifdef NON_MATCHING
void func_8003C0F0(void) {
s16 sp5E;
s16 sp5C;
s16 sp5A;
s32 temp;
s32 pad[4];
switch (gCurrentCourseId) {
case COURSE_MARIO_RACEWAY:
case COURSE_CHOCO_MOUNTAIN:
@@ -736,9 +717,9 @@ void func_8003C0F0(void) {
case COURSE_WARIO_STADIUM:
case COURSE_DK_JUNGLE:
func_8000F2DC();
sp5E = (f32)D_80164550[0];
sp5C = (f32)D_80164550[2];
sp5A = (f32)D_80164550[1];
sp5E = (f32) D_80164550[0];
sp5C = (f32) D_80164550[2];
sp5A = (f32) D_80164550[1];
if (gCurrentCourseId == COURSE_TOADS_TURNPIKE) {
sp5E = 0;
}
@@ -772,9 +753,9 @@ void func_8003C0F0(void) {
switch (gActiveScreenMode) {
case 0:
switch (gModeSelection) {
case GRAND_PRIX:
D_80165210[0] = D_80165210[2] = D_80165210[4] = D_80165210[6] = sp5E + 0x14;
D_80165210[1] = D_80165210[3] = D_80165210[5] = D_80165210[7] = sp5E - 0x14;
case 0:
D_80165210[0] = (D_80165210[2] = (D_80165210[4] = (D_80165210[6] = sp5E + 0x14)));
D_80165210[1] = (D_80165210[3] = (D_80165210[5] = (D_80165210[7] = sp5E - 0x14)));
D_80165230[0] = sp5C + 0x1E;
D_80165230[1] = sp5C + 0x32;
D_80165230[2] = sp5C + 0x46;
@@ -784,11 +765,11 @@ void func_8003C0F0(void) {
D_80165230[6] = sp5C + 0x96;
D_80165230[7] = sp5C + 0xAA;
func_80039F44(D_80165210, D_80165230, sp5A);
break;
break;
case TIME_TRIALS:
D_80165210[0] = D_80165210[2] = D_80165210[4] = D_80165210[6] = sp5E;
D_80165210[1] = D_80165210[3] = D_80165210[5] = D_80165210[7] = sp5E;
case 1:
D_80165210[0] = (D_80165210[2] = (D_80165210[4] = (D_80165210[6] = sp5E)));
D_80165210[1] = (D_80165210[3] = (D_80165210[5] = (D_80165210[7] = sp5E)));
D_80165230[0] = sp5C + 0x1E;
D_80165230[1] = sp5C + 0x1E;
D_80165230[2] = sp5C + 0x1E;
@@ -798,16 +779,16 @@ void func_8003C0F0(void) {
D_80165230[6] = sp5C + 0x1E;
D_80165230[7] = sp5C + 0x1E;
func_8003A59C(D_80165210, D_80165230, sp5A);
break;
break;
}
break;
case 1:
case 2:
switch (gModeSelection) {
case GRAND_PRIX:
D_80165210[0] = D_80165210[2] = D_80165210[4] = D_80165210[6] = sp5E + 0x14;
D_80165210[1] = D_80165210[3] = D_80165210[5] = D_80165210[7] = sp5E - 0x14;
case 0:
D_80165210[0] = (D_80165210[2] = (D_80165210[4] = (D_80165210[6] = sp5E + 0x14)));
D_80165210[1] = (D_80165210[3] = (D_80165210[5] = (D_80165210[7] = sp5E - 0x14)));
D_80165230[0] = sp5C + 0x1E;
D_80165230[1] = sp5C + 0x32;
D_80165230[2] = sp5C + 0x46;
@@ -819,9 +800,9 @@ void func_8003C0F0(void) {
func_8003A9F0(D_80165210, D_80165230, sp5A);
break;
case VERSUS:
D_80165210[0] = D_80165210[2] = D_80165210[4] = D_80165210[6] = sp5E + 0xA;
D_80165210[1] = D_80165210[3] = D_80165210[5] = D_80165210[7] = sp5E - 0xA;
case 2:
D_80165210[0] = (D_80165210[2] = (D_80165210[4] = (D_80165210[6] = sp5E + 0xA)));
D_80165210[1] = (D_80165210[3] = (D_80165210[5] = (D_80165210[7] = sp5E - 0xA)));
D_80165230[0] = sp5C + 0x1E;
D_80165230[1] = sp5C + 0x1E;
D_80165230[2] = sp5C + 0x1E;
@@ -837,12 +818,15 @@ void func_8003C0F0(void) {
case 3:
switch (gModeSelection) {
case VERSUS:
case 2:
D_80165210[0] = sp5E + 0x1E;
D_80165210[2] = D_80165210[4] = D_80165210[6] = sp5E - 0xA;
D_80165210[3] = D_80165210[5] = D_80165210[7] = sp5E - 0x1E;
D_80165210[6] = sp5E - 0xA;
D_80165210[1] = sp5E + 0xA;
D_80165210[7] = sp5E - 0x1E;
D_80165210[4] = sp5E - 0xA;
D_80165210[2] = sp5E - 0xA;
D_80165210[5] = sp5E - 0x1E;
D_80165210[3] = sp5E - 0x1E;
D_80165230[0] = sp5C + 0x1E;
D_80165230[1] = sp5C + 0x1E;
D_80165230[2] = sp5C + 0x1E;
@@ -853,7 +837,8 @@ void func_8003C0F0(void) {
D_80165230[7] = sp5C + 0x1E;
if (gPlayerCountSelection1 == 4) {
func_8003B870(D_80165210, D_80165230, sp5A);
} else {
}
else {
func_8003B318(D_80165210, D_80165230, sp5A);
}
break;
@@ -867,29 +852,22 @@ void func_8003C0F0(void) {
case 1:
case 2:
temp = 5;
if (1){
if (1){};
};
if (1);
D_80165210[0] = 0;
D_80165210[1] = 0;
D_80165230[0] = -200.0f;
D_80165230[1] = 200.0f;
D_80165230[1] = -200.0f;
D_80165230[0] = 200.0f;
spawn_players_2p_battle(D_80165210, D_80165230, temp);
break;
case 3:
temp = 5;
if (1){
if (1){};
};
D_80165210[2] = -200.0f;
D_80165230[1] = -200.0f;
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165230[2] = 0.0f;
D_80165230[3] = 0.0f;
D_80165210[3] = 200.0f;
D_80165230[0] = 200.0f;
if (gPlayerCountSelection1 == 4) {
@@ -906,9 +884,7 @@ void func_8003C0F0(void) {
case 1:
case 2:
temp = 0x1E0;
if (1){
if (1){};
};
if (1);
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165230[1] = -400.0f;
@@ -918,9 +894,6 @@ void func_8003C0F0(void) {
case 3:
temp = 0x1E0;
if (1){
if (1){};
};
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165210[2] = -400.0f;
@@ -940,38 +913,33 @@ void func_8003C0F0(void) {
case COURSE_DOUBLE_DECK:
switch (gActiveScreenMode) {
case 1:
case 2:
temp = 0x37;
if (1){
if (1){};
};
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165230[1] = -160.0f;
D_80165230[0] = 160.0f;
spawn_players_2p_battle(D_80165210, D_80165230, temp);
break;
case 1:
case 2:
temp = 0x37;
if (1);
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165230[1] = -160.0f;
D_80165230[0] = 160.0f;
spawn_players_2p_battle(D_80165210, D_80165230, temp);
break;
case 3:
temp = 0x37;
if (1){
if (1){};
};
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165210[2] = -160.0f;
D_80165210[3] = 160.0f;
D_80165230[0] = 160.0f;
D_80165230[1] = -160.0f;
D_80165230[2] = 0.0f;
D_80165230[3] = 0.0f;
if (gPlayerCountSelection1 == 4) {
spawn_players_4p_battle(D_80165210, D_80165230, temp);
} else {
spawn_players_3p_battle(D_80165210, D_80165230, temp);
}
break;
case 3:
temp = 0x37;
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165210[2] = -160.0f;
D_80165210[3] = 160.0f;
D_80165230[0] = 160.0f;
D_80165230[1] = -160.0f;
D_80165230[2] = 0.0f;
D_80165230[3] = 0.0f;
if (gPlayerCountSelection1 == 4) {
spawn_players_4p_battle(D_80165210, D_80165230, temp);
} else {
spawn_players_3p_battle(D_80165210, D_80165230, temp);
}
break;
}
break;
@@ -980,9 +948,7 @@ void func_8003C0F0(void) {
case 1:
case 2:
temp = 0xC8;
if (1){
if (1){};
};
if (1);
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165230[1] = -575.0f;
@@ -992,9 +958,6 @@ void func_8003C0F0(void) {
case 3:
temp = 0xC8;
if (1){
if (1){};
};
D_80165210[0] = 0.0f;
D_80165210[1] = 0.0f;
D_80165210[2] = -575.0f;
@@ -1013,8 +976,8 @@ void func_8003C0F0(void) {
break;
default:
D_80165210[0] = D_80165210[2] = D_80165210[4] = D_80165210[6] = 20.0f;
D_80165210[1] = D_80165210[3] = D_80165210[5] = D_80165210[7] = -20.0f;
D_80165210[0] = (D_80165210[2] = (D_80165210[4] = (D_80165210[6] = 20.0f)));
D_80165210[1] = (D_80165210[3] = (D_80165210[5] = (D_80165210[7] = -20.0f)));
D_80165230[0] = 30.0f;
D_80165230[1] = 50.0f;
D_80165230[2] = 70.0f;
@@ -1023,26 +986,22 @@ void func_8003C0F0(void) {
D_80165230[5] = 130.0f;
D_80165230[6] = 150.0f;
D_80165230[7] = 170.0f;
spawn_player(gPlayerOneCopy, 0, D_80165210[0], D_80165230[0], sp5A, 32768.0f, gCharacterSelections[0], PLAYER_EXISTS | PLAYER_START_SEQUENCE | PLAYER_HUMAN);
spawn_player(gPlayerTwo, 1, D_80165210[1], D_80165230[1], sp5A, 32768.0f, 1, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerThree, 2, D_80165210[2], D_80165230[2], sp5A, 32768.0f, 2, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerFour, 3, D_80165210[3], D_80165230[3], sp5A, 32768.0f, 3, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerFive, 4, D_80165210[4], D_80165230[4], sp5A, 32768.0f, 4, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerSix, 5, D_80165210[5], D_80165230[5], sp5A, 32768.0f, 5, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerSeven, 6, D_80165210[6], D_80165230[6], sp5A, 32768.0f, 6, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerEight, 7, D_80165210[7], D_80165230[7], sp5A, 32768.0f, 7, PLAYER_EXISTS | PLAYER_CPU | PLAYER_START_SEQUENCE);
spawn_player(gPlayerOneCopy, 0, D_80165210[0], D_80165230[0], sp5A, 32768.0f, gCharacterSelections[0], ((1 << 15) | (1 << 13)) | (1 << 14));
spawn_player(gPlayerTwo, 1, D_80165210[1], D_80165230[1], sp5A, 32768.0f, 1, ((1 << 15) | (1 << 12)) | (1 << 13));
spawn_player(gPlayerThree, 2, D_80165210[2], D_80165230[2], sp5A, 32768.0f, 2, ((1 << 15) | (1 << 12)) | (1 << 13));
spawn_player(gPlayerFour, 3, D_80165210[3], D_80165230[3], sp5A, 32768.0f, 3, ((1 << 15) | (1 << 12)) | (1 << 13));
spawn_player(gPlayerFive, 4, D_80165210[4], D_80165230[4], sp5A, 32768.0f, 4, ((1 << 15) | (1 << 12)) | (1 << 13));
spawn_player(gPlayerSix, 5, D_80165210[5], D_80165230[5], sp5A, 32768.0f, 5, ((1 << 15) | (1 << 12)) | (1 << 13));
spawn_player(gPlayerSeven, 6, D_80165210[6], D_80165230[6], sp5A, 32768.0f, 6, ((1 << 15) | (1 << 12)) | (1 << 13));
spawn_player(gPlayerEight, 7, D_80165210[7], D_80165230[7], sp5A, 32768.0f, 7, ((1 << 15) | (1 << 12)) | (1 << 13));
D_80164A28 = 0;
break;
}
if (gModeSelection != BATTLE) {
if (gModeSelection != 3) {
func_8000F628();
}
}
#else
void func_8003C0F0(void);
GLOBAL_ASM("asm/non_matchings//code_800393C0/func_8003C0F0.s")
#endif
void func_8003CD78(void) {
func_8003BE30();
@@ -1076,15 +1035,12 @@ void func_8003CD98(Player *player, struct Camera *camera, s8 arg2, s8 arg3) {
}
}
#ifdef NON_MATCHING
// issues with 1C, func_8001C4D0 seems to want it as an s32, but spawn_player saves it as a float
// it's z pos so it should be a float, m2c detects the arg as f32 in func_8001C4D0
// pointer loading/increments are wrong
void func_8003D080(void) {
Player* ptr;
s32 pad;
Player* ptr = &gPlayers[0];
func_8005D290();
if (D_800DC50C == ENDING_SEQUENCE) {
if (D_800DC50C == 5) {
func_8003CD78();
} else {
func_8003C0F0();
@@ -1093,20 +1049,20 @@ void func_8003D080(void) {
switch (gActiveScreenMode) {
case 0:
switch (gModeSelection) {
case GRAND_PRIX:
if (gCurrentCourseId == COURSE_TOADS_TURNPIKE) {
func_8001C4D0(0.0f, gPlayerOne->unk_0A8, D_8016524C, gPlayerOne->unk_0BC, 8, 0);
case 0:
if (gCurrentCourseId == 10) {
func_8001C4D0(0.0f, ptr->pos[1], D_8016524C, ptr->unk_02E, 8, 0);
} else {
func_8001C4D0((D_80165210[6] + D_80165210[7]) / 2, gPlayerOne->unk_0A8, D_8016524C, gPlayerOne->unk_0BC, 8, 0);
func_8001C4D0((D_80165210[7] + D_80165210[6]) / 2, ptr->pos[1], D_8016524C, ptr->unk_02E, 8, 0);
}
break;
case TIME_TRIALS:
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, D_8016524C, gPlayerOne->unk_0BC, 1, 0);
case 1:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0);
break;
default:
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 10, 0);
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 10, 0);
break;
}
break;
@@ -1114,42 +1070,45 @@ void func_8003D080(void) {
case 1:
case 2:
switch (gModeSelection) {
case GRAND_PRIX:
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 1, 0);
func_8001C4D0(gPlayerTwo->pos[0], gPlayerTwo->pos[1], gPlayerTwo->pos[2], gPlayerTwo->unk_02E, 1, 1);
case 0:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 1);
break;
case BATTLE:
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 9, 0);
func_8001C4D0(gPlayerTwo->pos[0], gPlayerTwo->pos[1], gPlayerTwo->pos[2], gPlayerTwo->unk_02E, 9, 1);
case 3:
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 1);
break;
default:
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 1, 0);
func_8001C4D0(gPlayerTwo->pos[0], gPlayerTwo->pos[1], gPlayerTwo->pos[2], gPlayerTwo->unk_02E, 1, 1);
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 1);
break;
}
break;
case 3:
if (gModeSelection == BATTLE) {
ptr = &gPlayerThree;
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 9, 0);
func_8001C4D0(gPlayerTwo->pos[0], gPlayerTwo->pos[1], gPlayerTwo->pos[2], gPlayerTwo->unk_02E, 9, 1);
if (gModeSelection == 3) {
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 1);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 2);
ptr++;
if (gPlayerCountSelection1 == 4) {
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 9, 3);
}
} else {
ptr = &gPlayerThree;
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 1, 0);
func_8001C4D0(gPlayerTwo->pos[0], gPlayerTwo->pos[1], gPlayerTwo->pos[2], gPlayerTwo->unk_02E, 1, 1);
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 1);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 2);
ptr++;
if (gPlayerCountSelection1 == 4) {
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 1, 3);
}
}
@@ -1158,19 +1117,20 @@ void func_8003D080(void) {
} else {
switch (gActiveScreenMode) {
case 0:
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 3, 0);
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 0);
break;
case 1:
case 2:
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 3, 0);
func_8001C4D0(gPlayerTwo->pos[0], gPlayerTwo->pos[1], gPlayerTwo->pos[2], gPlayerTwo->unk_02E, 3, 1);
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 1);
break;
case 3:
ptr = &gPlayerThree;
func_8001C4D0(gPlayerOne->unk_0A4, gPlayerOne->unk_0A8, gPlayerOne->unk_0AC, gPlayerOne->unk_0BC, 3, 0);
func_8001C4D0(gPlayerTwo->pos[0], gPlayerTwo->pos[1], gPlayerTwo->pos[2], gPlayerTwo->unk_02E, 3, 1);
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 0);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 1);
ptr++;
func_8001C4D0(ptr->pos[0], ptr->pos[1], ptr->pos[2], ptr->unk_02E, 3, 2);
ptr++;
@@ -1181,7 +1141,7 @@ void func_8003D080(void) {
switch (gActiveScreenMode) {
case 0:
func_8003CD98(gPlayerTwo, camera1, 0, 0); // sic
func_8003CD98(gPlayerOneCopy, camera1, 0, 0); // sic
func_8003CD98(gPlayerTwo, camera1, 1, 0);
func_8003CD98(gPlayerThree, camera1, 2, 0);
func_8003CD98(gPlayerFour, camera1, 3, 0);
@@ -1231,14 +1191,7 @@ void func_8003D080(void) {
break;
}
}
#else
GLOBAL_ASM("asm/non_matchings//code_800393C0/func_8003D080.s")
#endif
// #ifdef NON_MATCHING
// TODO: verify this claim because just changing the prototype makes it match
// if 1C is typed as s32 it matches, but spawn_player saves it as a float
// it's z pos so it should be a float, m2c detects it as f32 in func_8001C4D0
void func_8003DB5C(void) {
Player *player = gPlayerOne;
s32 i;
@@ -1251,6 +1204,4 @@ void func_8003DB5C(void) {
func_80027A20(player, i, 1, 1);
}
}
// #else
// GLOBAL_ASM("asm/non_matchings/code_800393C0/func_8003DB5C.s")
// #endif