Mario Kart 64
|
#include <ultra64.h>
#include <macros.h>
#include <segments.h>
#include <common_structs.h>
#include "math_util.h"
#include "ceremony_and_credits.h"
#include "code_800029B0.h"
#include "code_80280000.h"
#include "objects.h"
#include "main.h"
#include "camera.h"
#include "audio/external.h"
#include <sounds.h>
#include "podium_ceremony_actors.h"
#include "code_80091750.h"
#include "code_80057C60.h"
#include "defines.h"
Data Structures | |
struct | struct_80286A10 |
struct | struct_80284AE8 |
Macros | |
#define | CUTSCENE(id, cutscene) |
Implements cinematic camera for ceremony and credits scenes. Camera moves via splines.
#define CUTSCENE | ( | id, | |
cutscene ) |
void animation_apears_sliding_borders | ( | UNUSED CinematicCamera * | camera | ) |
void animation_disapears_sliding_borders | ( | UNUSED CinematicCamera * | camera | ) |
void apply_distance_angle_y_and_angle_y_to_xz | ( | Vec3f | vec1, |
Vec3f | vec2, | ||
f32 | coef, | ||
s16 | angleYToXZ, | ||
s16 | angleY ) |
void calculate_distance_angle_y_and_angle_y_to_xz | ( | Vec3f | vec1, |
Vec3f | vec2, | ||
f32 * | distance, | ||
s16 * | angleYToXZ, | ||
s16 * | angleY ) |
void ceremony_transition_sliding_borders | ( | void | ) |
Scene transition
Sliding black borders that open horizontally to display scene. Used at the beginning of award ceremony and throughout credits.
s32 cinematic_stub | ( | void | ) |
void copy_player_three_in_camera | ( | CinematicCamera * | camera | ) |
void copy_player_two_in_camera | ( | CinematicCamera * | camera | ) |
s32 cutscene_event | ( | CameraEvent | event, |
CinematicCamera * | camera, | ||
s16 | start, | ||
s16 | end ) |
Call the event while start
<= gCutsceneShotTimer <= end
If end
is -1, call for the rest of the shot.
void evaluate_cubic_spline | ( | f32 | arg0, |
Vec3f | point, | ||
f32 * | arg2, | ||
f32 | controlPoints1[], | ||
f32 | controlPoints2[], | ||
f32 | controlPoints3[], | ||
f32 | controlPoints4[] ) |
Target f32 at given rate. Used for targeting playerTwo and playerThree. Also targets the trophy.
void func_80282040 | ( | void | ) |
void func_80282048 | ( | void | ) |
void func_80282BE4 | ( | struct struct_80283430 * | arg0, |
s8 | arg1, | ||
u8 | arg2, | ||
s8 | arg3, | ||
Vec3s | arg4, | ||
s32 | arg5 ) |
void func_80282C40 | ( | struct struct_80283430 * | arg0, |
struct struct_80282C40 * | arg1, | ||
s32 | arg2 ) |
void func_80282E58 | ( | CinematicCamera * | camera, |
struct struct_80282C40 * | arg1, | ||
s32 | arg2 ) |
void func_80282EAC | ( | s32 | arg0, |
CinematicCamera * | arg1, | ||
s16 | arg2, | ||
s16 | arg3, | ||
s16 | arg4 ) |
void func_80282F44 | ( | s32 | arg0, |
CinematicCamera * | arg1, | ||
Camera * | camera ) |
void func_802830B4 | ( | CinematicCamera * | arg0, |
s16 | arg1, | ||
s16 | arg2, | ||
s16 | arg3 ) |
void func_80283100 | ( | CinematicCamera * | arg0, |
f32 * | arg1 ) |
void func_80283240 | ( | s16 | arg0 | ) |
s32 func_8028336C | ( | UNUSED CinematicCamera * | arg0, |
UNUSED Camera * | camera ) |
void func_80283B6C | ( | UNUSED CinematicCamera * | camera | ) |
void func_80283BA4 | ( | UNUSED CinematicCamera * | camera | ) |
void func_80283BF0 | ( | UNUSED CinematicCamera * | camera | ) |
void func_80283C14 | ( | UNUSED CinematicCamera * | camera | ) |
void func_80283C78 | ( | UNUSED CinematicCamera * | arg0 | ) |
void func_80283CA8 | ( | UNUSED CinematicCamera * | camera | ) |
void func_80283CD0 | ( | UNUSED CinematicCamera * | camera | ) |
void func_80283D2C | ( | CinematicCamera * | camera | ) |
void func_80283EA0 | ( | CinematicCamera * | camera | ) |
void func_80283F6C | ( | CinematicCamera * | camera | ) |
void func_80284068 | ( | CinematicCamera * | camera | ) |
void func_802840C8 | ( | CinematicCamera * | camera | ) |
void func_80284154 | ( | CinematicCamera * | camera | ) |
void func_80284184 | ( | CinematicCamera * | camera | ) |
void func_802841E8 | ( | CinematicCamera * | camera | ) |
void func_8028422C | ( | CinematicCamera * | camera | ) |
void func_802842A8 | ( | CinematicCamera * | camera | ) |
void func_802842D8 | ( | CinematicCamera * | camera | ) |
void func_80284308 | ( | CinematicCamera * | camera | ) |
void func_80284418 | ( | CinematicCamera * | camera | ) |
void func_80284494 | ( | CinematicCamera * | camera | ) |
void func_802844FC | ( | CinematicCamera * | camera | ) |
void func_8028454C | ( | CinematicCamera * | camera | ) |
void func_802845EC | ( | CinematicCamera * | camera | ) |
void func_8028461C | ( | CinematicCamera * | camera | ) |
void func_80284648 | ( | CinematicCamera * | camera | ) |
UNUSED void func_802846AC | ( | void | ) |
void func_802846B4 | ( | CinematicCamera * | camera | ) |
void func_802846E4 | ( | CinematicCamera * | camera | ) |
void func_802847CC | ( | CinematicCamera * | camera | ) |
void init_cinematic_camera | ( | void | ) |
void lerp_player_three_in_camera | ( | CinematicCamera * | camera | ) |
void lerp_player_two_in_camera | ( | CinematicCamera * | camera | ) |
s32 move_cinematic_camera_along_spline | ( | CinematicCamera * | camera, |
struct struct_80286A04 * | arg1, | ||
struct struct_80286A04 * | arg2, | ||
s32 | arg3 ) |
s32 move_point_along_spline | ( | Vec3f | point, |
f32 * | arg1, | ||
struct struct_80283430 | spline[], | ||
s16 * | splineSegment, | ||
f32 * | progress ) |
Computes the point that is progress
percent of the way through segment splineSegment
of spline
, and stores the result in p
. progress
and splineSegment
are updated if progress
becomes >= 1.0.
When neither of the next two points' speeds == 0, the number of frames is between 1 and 255. Otherwise it's infinite.
To calculate the number of frames it will take to progress through a spline segment: If the next two speeds are the same and nonzero, it's 1.0 / firstSpeed.
s1 and s2 are short hand for first/secondSpeed. The progress at any frame n is defined by a recurrency relation: p(n+1) = (s2 - s1 + 1) * p(n) + s1 Which can be written as p(n) = (s2 * ((s2 - s1 + 1)^(n) - 1)) / (s2 - s1)
Solving for the number of frames: n = log(((s2 - s1) / s1) + 1) / log(s2 - s1 + 1)
progress
reaches 1.0 or greater, and the 4th CutsceneSplinePoint in the current segment away from spline[splineSegment] has an index of -1. void play_cutscene | ( | CinematicCamera * | camera | ) |
Play the current cutscene until either gCutsceneShotTimer reaches the max time, or c->cutscene is set to 0
void play_sound_balloon_pop | ( | UNUSED CinematicCamera * | camera | ) |
Played in ceremony opening with balloons.
void play_sound_congratulation | ( | UNUSED CinematicCamera * | camera | ) |
Played after receiving trophy.
void play_sound_farewell | ( | UNUSED CinematicCamera * | arg0 | ) |
End of credits farewell. "Hey, you're very good. See you next time!"
void play_sound_fish | ( | UNUSED CinematicCamera * | camera | ) |
void play_sound_fish_2 | ( | UNUSED CinematicCamera * | camera | ) |
void play_sound_podium | ( | UNUSED CinematicCamera * | camera | ) |
void play_sound_shoot_trophy | ( | UNUSED CinematicCamera * | camera | ) |
void play_sound_trophy | ( | UNUSED CinematicCamera * | camera | ) |
Played in background nearly the entire ceremony Begins again or plays louder once the trophy appears.
void play_sound_welcome | ( | UNUSED CinematicCamera * | camera | ) |
Played at beginning of credits.
void reset_spline | ( | void | ) |
void reset_spline_wrap | ( | UNUSED CinematicCamera * | arg0 | ) |
void vec3f_clear | ( | Vec3f | arg0 | ) |
void vec3s_clear | ( | Vec3s | arg0 | ) |
void wrap_func_80092C80 | ( | UNUSED CinematicCamera * | camera | ) |
void wrap_func_800CA0CC | ( | UNUSED CinematicCamera * | camera | ) |
void wrap_func_800CB134 | ( | UNUSED CinematicCamera * | camera | ) |
void wrap_func_800CB14C | ( | UNUSED CinematicCamera * | camera | ) |
void wrap_func_80280FFC | ( | UNUSED CinematicCamera * | camera | ) |
void wrap_func_8028100C | ( | UNUSED CinematicCamera * | camera | ) |
f32 D_802856B0 = 98.0f |
f32 D_802856B4 = 12.0f |
f32 D_802856BC = 52.0f |
s32 D_802856C4 = 0 |
s32 D_802856C8[3] = { 0 } |
struct struct_80282C40 D_802856DC[] |
Camera rail spline animation.
struct struct_80282C40 D_80285718[] |
spline animation
struct struct_80282C40 D_80285754[] |
spline animation
struct struct_80282C40 D_80285784[] |
spline animation
struct struct_80282C40 D_802857B4[] |
spline animation
struct struct_80282C40 D_802857CC[] |
spline animation
struct struct_80282C40 D_802857F0[] |
spline animation
struct struct_80282C40 D_80285850[] |
spline animation
struct struct_80282C40 D_802858B0[] |
spline animation
struct struct_80282C40 D_802858C8[] |
spline animation
struct struct_80282C40 D_802858E0[] |
spline animation
struct struct_80282C40 D_802858F8[] |
spline animation
struct struct_80282C40 D_80285910[] |
spline animation
struct struct_80282C40 D_80285928[] |
spline animation
struct struct_80282C40 D_80285940[] |
struct struct_80282C40 D_80285A10[] |
struct struct_80282C40 D_80285A4C[] |
struct struct_80282C40 D_80285A88[] |
struct struct_80282C40 D_80285AB8[] |
struct struct_80282C40 D_80285AE8[] |
struct struct_80282C40 D_80285B00[] |
struct struct_80282C40 D_80285B18[] |
struct struct_80282C40 D_80285B54[] |
struct struct_80282C40 D_80285B90[] |
struct struct_80282C40 D_80285BA8[] |
struct struct_80282C40 D_80285C38[] |
struct struct_80282C40 D_80285C74[] |
struct struct_80282C40 D_80285CB0[] |
struct struct_80282C40 D_80285CE0[] |
struct Cutscene D_80285D58[] |
struct struct_80285D80 D_80285D80[] |
struct struct_80286A04 D_80286A04[] |
u16 D_80286B34[] |
struct Cutscene D_80286B5C[] |
s32 D_802876D4 |
s32 D_802876D8 |
s32 D_802876DC |
CinematicCamera D_802876E0 |
struct struct_80283431 D_80287750[10] |
struct struct_80283430 D_80287818[32] |
struct struct_80283430 D_80287998[32] |
s16 D_80287B1E |
s8 D_80287B20 |
struct Cutscene gCutScene[] |
s16 gCutsceneShotTimer |
f32 gOrderedSizeSlidingBorders = 52.0f |
f32 gSizeSlidingBorders = 0.0f |
s16 sCutsceneShot |
s16 sCutsceneSplineSegment |
f32 sCutsceneSplineSegmentProgress |