Mario Kart 64
Loading...
Searching...
No Matches
spline.h
Go to the documentation of this file.
1#ifndef SPLINE_H
2#define SPLINE_H
3
4#include <common_structs.h>
5
6/*
7These are some very good videos about splines/Bezier curves in general
8
9The Beauty of Bezier Curves
10https://www.youtube.com/watch?v=aVwxzDHniEw
11
12The Continuity of Splines
13https://www.youtube.com/watch?v=jvPPXbo87ds
14*/
15
16/*
17This stuff is all about the b-splines used objects like Lakitu and the Boos on Banshee Boardwalk
18For splines used during the award ceremony and credits, see src/ending/ceremony_and_credits.h
19*/
20
21typedef struct {
22 /* 0x0 */ Vec3s pos;
23 // Don't really know what to call this member.
24 // It somehow controls the speed of travel along a segment of the spline but I don't really get how it works
25 /* 0x6 */ s16 velocity;
26} SplineControlPoint; // size = 0x8
27
28// WARNING!!!
29// You really, really shouldn't use this type for actual spline data. This is intended as a generic SplineData
30// type. I would use a union, but that would cause significant ugliness elsewhere in the codebase
31typedef struct {
32 // This name is a little misleading
33 // The control point arrays have more control points in them than this number indicates. Not sure why though.
35 // This has to be an array for this to work, so just make it size 1
36 SplineControlPoint controlPoints[];
38
39// All other SplineDataXX types are for use as data only. The size of the array in them matters a lot.
40// But object structs should never have members with these types, just use the plain SplineData type
41
42// Ghosts in BansheeBoardwalk x 2
43// Seagulls in KoopaTroopaBeach x 2
44// Penguins in Sherbet Land x 1
45// length of 23
46
47// Ghosts in BansheeBoardwalk x 2
48// Seagulls in KoopaTroopaBeach x 1
49// length of 24
50
51// Ghosts in BansheeBoardwalk x 1
52// Seagulls in KoopaTroopaBeach x 1
53// Penguins in Sherbet Land x 1
54// length of 25
55
56// Data of this type is unreferenced or only referenced in an unused function
57// lenght of 4
58
59// Lakitu Countdown
60// length of 15
61
62// Lakitu Checkered Flag
63// length of 21
64
65// length of 13
66
67// Lakitu Second/Final Lap
68// length of 12
69
70// Lakitu Reverse
71// length of 8
72
73#endif
s16 Vec3s[3]
Definition common_structs.h:11
Definition spline.h:21
s16 velocity
Definition spline.h:25
Vec3s pos
Definition spline.h:22
Definition spline.h:31
s16 numControlPoints
Definition spline.h:34
signed short int s16
Definition ultratypes.h:13