Complete matches in ceremony_and_credits (#280)

* Complete matches in ceremony_and_credits

* struct_D_802876D0 is the real CinematicCamera

* Replaced a bunch of Camera pointer args with
 CinematicCamera pointers instead. Only a couple functions use plain Camera pointers

* Moved some type definitions into the header file

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-12-05 04:34:17 -05:00
committed by GitHub
parent eeab33814d
commit 10ae9a7970
7 changed files with 579 additions and 1064 deletions
+1 -42
View File
@@ -50,50 +50,9 @@ typedef struct {
/* 0xB4 */ f32 unk_B4;
} Camera; /* size = 0xB8 */
typedef BAD_RETURN(s32) (*CameraEvent)(struct Camera *c);
typedef BAD_RETURN(s32) (*CameraEvent)(Camera *c);
typedef CameraEvent CutsceneShot;
// The camera used for cutscenes appears to
// use a slightly different struct.
// Or even no struct at all.
typedef struct {
/* 0x00 */ Vec3f pos;
/* 0x0C */ Vec3f lookAt;
// This is expected to be a normalized vector, indicates what direction is "up" for the camera
/* 0x18 */ f32 unk18;
/* 0x1C */ u8 cutscene; // ?
/* 0x20 */ f32 unk20[10]; // ???
// I think these are the "nautical angles" between pos and lookAt
// rot[0] = pitch, rot[1] = yaw, rot[2] = roll?
/* 0x24 */ Vec3s rot;
/* 0x2A */ s16 rotZ;
/* 0x2C */ s16 unk_2C;
/* 0x2E */ s16 unk_2E;
/* 0x30 */ Vec3f unk_30;
/* 0x3C */ Vec3f unk_3C;
/* 0x48 */ s32 unk_48;
/* 0x4C */ s32 unk_4C;
/* 0x50 */ s32 unk_50;
/* 0x54 */ UnkActorInner unk_54;
// When you hit a wall (or another driver) the camera's pos and lookAt bounce up and down. This is the velocity(?) of that bouncing
/* 0x94 */ f32 unk_94;
/* 0x98 */ s16 unk_98;
/* 0x9A */ s16 unk_9A;
// Timer for wall-hit bounce. Counts up instead of down
/* 0x9C */ s16 unk_9C;
/* 0x9E */ s16 pad_9E;
/* 0xA0 */ f32 unk_A0;
/* 0xA4 */ s32 unk_A4;
/* 0xA8 */ s32 unk_A8;
/* 0xAC */ s16 unk_AC;
// Id of the player the camera is following.
/* 0xAE */ s16 playerId;
// Seems related to camera movement during drifting
/* 0xB0 */ s16 unk_B0;
/* 0xB2 */ s16 unk_B2;
/* 0xB4 */ f32 unk_B4;
} CinematicCamera; /* size = 0xB8 */
void func_8001CA10(Camera*);
void func_8001CA24(Player*, f32);
void func_8001CA78(Player*, Camera*, Vec3f, f32*, f32*, f32*, s16, s8);
+429 -621
View File
File diff suppressed because it is too large Load Diff
+148 -46
View File
@@ -2,6 +2,73 @@
#define CEREMONY_AND_CREDITS_H
#include "common_structs.h"
#include "camera.h"
struct struct_80283431 {
Vec3f unk0;
Vec3s unkC;
};
struct struct_80283430 {
s8 unk0; // index
s8 unk1; // speed
u16 unk2; // point
s8 unk4;
s8 unk5;
Vec3s unk6;
};
struct credits_data_1FA0 {
Vec3f unk0;
s8 pad[0x10];
s8 unk1C;
s8 unk1D;
s16 unk1E;
f32 unk20;
s8 pad2[0x24];
s16 unk48[3];
s16 unk4E[2];
s16 un52;
s16 unk54[2];
s16 unk58;
s16 unk5A[2];
s16 unk5E;
s16 unk60;
s16 unk62;
f32 unk64;
f32 unk68;
s16 unk6C;
s16 unk6E;
};
// Cinematic camera? Camera rails?
// CutsceneVariable?
/**
* Struct used to store cutscene info, like the camera's target position/focus.
*
* See the sCutsceneVars[] array in camera.c for more details.
*/
struct CinematicCamera {
/* 0x00 */ Vec3f pos;
/* 0x0C */ Vec3f lookAt;
/* 0x18 */ f32 unk18;
/* 0x1C */ u8 cutscene;
/* 0x20 */ f32 unk20;
/* 0x24 */ Vec3f unk24;
/* 0x30 */ Vec3f unk30;
/* 0x3C */ Vec3f unk3C;
/* 0x48 */ Vec3s unk48;
/* 0x4E */ Vec3s unk4E;
/* 0x54 */ Vec3s unk54;
/* 0x5A */ Vec3s unk5A;
/* 0x60 */ s16 unk60;
/* 0x62 */ s16 unk62;
/* 0x64 */ f32 unk64;
/* 0x68 */ f32 unk68;
/* 0x6C */ s16 unk6C;
/* 0x6E */ s16 unk6E;
}; // size = 0x70
struct struct_80282C40 {
s8 unk0;
@@ -15,7 +82,7 @@ struct struct_80282C40 {
struct struct_80285D80 {
u8 unk0[6];
s16 unk6[3];
Vec3s unk6;
};
struct struct_80286A04 {
@@ -26,6 +93,19 @@ struct struct_80286A04 {
u16 unkC;
};
struct CutsceneSplinePoint {
s8 index;
u8 speed;
Vec3s point;
};
struct Cutscene {
/* 0x0 */ void (*shot)(struct CinematicCamera*);
/* 0x4 */ s16 duration;
/* 0x6 */ //s16 pad;
}; /* size = 0x8 */
/* Function Prototypes */
void vec3f_set_dupe(Vec3f, f32, f32, f32);
@@ -43,59 +123,80 @@ s32 func_80282200(s16*, s16, s16);
s32 set_transition_colour_fade_alpha_ending(f32*, f32, f32);
s32 func_80282364(s16*, s16, s16);
void reset_spline();
void func_80282434(Camera*);
void func_80282434(struct CinematicCamera*);
void func_80282454(Vec3f, Vec3f, f32*, s16*, s16*);
void func_80282504(Vec3f, Vec3f, f32, s16, s16);
void func_802825C8(Vec3f, Vec3f, Vec3f, Vec3s);
s32 func_80282D90(Camera*, struct struct_80286A04*, struct struct_80286A04*, s32);
void func_80282E58(Camera*, struct struct_80282C40*, s32);
void func_80282700(f32, Vec3f, f32*, f32[], f32[], f32[], f32[]);
s32 move_point_along_spline(Vec3f, f32*, struct struct_80283430[], s16*, f32*);
void func_80282BE4(struct struct_80283430*, s8, u8, s8, Vec3s, s32);
void func_80282C40(struct struct_80283430*, struct struct_80282C40*, s32);
s32 func_80282D90(struct CinematicCamera*, struct struct_80286A04*, struct struct_80286A04*, s32);
void func_80282E58(struct CinematicCamera*, struct struct_80282C40*, s32);
void func_80282EAC(s32, struct CinematicCamera*, s16, s16, s16);
void func_80282F00(s16*, s16);
void func_80282F44(s32, struct CinematicCamera*, Camera*);
void func_802830B4(struct CinematicCamera*, s16, s16, s16);
void func_80283100(struct CinematicCamera*, f32*);
void func_80283240(s16);
s32 cutscene_event(CameraEvent event, Camera*, s16, s16);
s32 cutscene_event(CameraEvent event, struct CinematicCamera*, s16, s16);
s32 func_80283330(s32);
s32 func_8028336C(struct CinematicCamera*, Camera*);
s32 func_80283428();
void func_80283968(Camera*);
void func_80283994(CinematicCamera*);
void func_802839B4(Camera*);
void func_802839CC(Camera*);
void func_802839E0(Camera*);
void func_80283A34(CinematicCamera*);
void func_80283A54(Camera*);
void func_80283A7C(CinematicCamera*);
void func_80283B6C(Camera*);
void func_80283BA4(Camera*);
void func_80283BF0(CinematicCamera*);
void func_80283C14(Camera*);
void func_80283C38(Camera*);
void func_80283C58(CinematicCamera*);
void func_80283C78(s32);
void func_80283CA8(CinematicCamera*);
void func_80283CD0(s32);
void play_sound_farewell(s32);
void func_80283D2C(CinematicCamera*);
void func_80283EA0(Camera*);
void func_80283ED0(Camera*);
void func_80283EF8(Camera*);
void func_80283F6C(Camera*);
void func_80283FCC(Camera*);
void func_80283FF4(Camera*);
void func_80284068(Camera*);
void func_802840C8(Camera*);
void func_80284154(Camera*);
void func_80284184(Camera*);
void func_802841E8(Camera*);
void func_8028422C(Camera*);
void func_802842A8(Camera*);
void func_802842D8(Camera*);
void func_80284418(Camera*);
void func_80284494(Camera*);
void func_802844FC(Camera*);
void func_8028454C(Camera*);
void func_802845EC(Camera*);
void func_8028461C(Camera*);
void func_80284648(Camera*);
void func_80283968(struct CinematicCamera*);
void func_80283994(struct CinematicCamera*);
void func_802839B4(struct CinematicCamera*);
void func_802839CC(struct CinematicCamera*);
void func_802839E0(struct CinematicCamera*);
void play_sound_welcome(struct CinematicCamera*);
void func_80283A34(struct CinematicCamera*);
void play_sound_congratulation(struct CinematicCamera*);
void play_sound_balloon_pop(struct CinematicCamera*);
void play_sound_fish(struct CinematicCamera*);
void play_sound_fish_2(struct CinematicCamera*);
void play_sound_shoot_trophy(struct CinematicCamera*);
void play_sound_podium(struct CinematicCamera*);
void play_sound_trophy(struct CinematicCamera*);
void func_80283A54(struct CinematicCamera*);
void func_80283A7C(struct CinematicCamera*);
void func_80283B6C(struct CinematicCamera*);
void func_80283BA4(struct CinematicCamera*);
void func_80283BF0(struct CinematicCamera*);
void func_80283C14(struct CinematicCamera*);
void func_80283C38(struct CinematicCamera*);
void func_80283C58(struct CinematicCamera*);
void func_80283C78(struct CinematicCamera*);
void func_80283CA8(struct CinematicCamera*);
void func_80283CD0(struct CinematicCamera*);
void play_sound_farewell(struct CinematicCamera*);
void func_80283D2C(struct CinematicCamera*);
void func_80283EA0(struct CinematicCamera*);
void func_80283ED0(struct CinematicCamera*);
void func_80283EF8(struct CinematicCamera*);
void func_80283F6C(struct CinematicCamera*);
void func_80283FCC(struct CinematicCamera*);
void func_80283FF4(struct CinematicCamera*);
void func_80284068(struct CinematicCamera*);
void func_802840C8(struct CinematicCamera*);
void func_80284154(struct CinematicCamera*);
void func_80284184(struct CinematicCamera*);
void func_802841E8(struct CinematicCamera*);
void func_8028422C(struct CinematicCamera*);
void func_802842A8(struct CinematicCamera*);
void func_802842D8(struct CinematicCamera*);
void func_80284308(struct CinematicCamera*);
void func_80284418(struct CinematicCamera*);
void func_80284494(struct CinematicCamera*);
void func_802844FC(struct CinematicCamera*);
void func_8028454C(struct CinematicCamera*);
void func_802845EC(struct CinematicCamera*);
void func_8028461C(struct CinematicCamera*);
void func_80284648(struct CinematicCamera*);
void func_802846AC();
void func_802846B4(Camera*);
void func_802846B4(struct CinematicCamera*);
void func_802846E4(struct CinematicCamera*);
void func_802847CC(struct CinematicCamera*);
void play_cutscene(struct CinematicCamera*);
void func_80284CC0();
/* This is where I'd put my static data, if I had any */
@@ -133,6 +234,7 @@ extern struct struct_80282C40 D_80285B90[];
extern struct struct_80282C40 D_80285BA8[];
extern struct struct_80282C40 D_80285C38[];
extern struct struct_80282C40 D_80285C74[];
extern struct Cutscene D_80285D10[];
extern s16 D_80285D14;
extern s32 D_802876D4;
extern s32 D_802876D8;
+1
View File
@@ -4,6 +4,7 @@
#include <PR/gu.h>
#include "main.h"
#include "variables.h"
#include "types.h"
#include "camera.h"
#include "memory.h"
-4
View File
@@ -18,16 +18,12 @@ extern f32 D_80150130[4];
extern s16 gCreditsCourseId;
extern u16 D_80150112;
extern s16 D_80164AF0;
extern u32 D_8018D120;
extern mk64_surface_map_ram (*D_8015F580)[];
extern u16 D_8015F588; // Number of entires in D_8015F580
extern u16 gIsInQuitToMenuTransition, gQuitToMenuTransitionCounter;
extern s32 D_802874A0;
extern u16 D_80164714, D_80164716, D_80164718;
extern u16 D_800DC5E4;
extern u32 gGamestate;
extern u32 D_802874FC;
extern u16 D_800DC518;