Files
SpaghettiKart/include/spline.h
T
coco875 e135178097 Update from decomp (#34)
* Update menus.c (#634)

* Update common_data.yml (#635)

* Renames for screenId and other changes (#636)

* screenId renames

* Rename surface map to collision mesh (#637)

* Rename some stack vars (#638)

* Fix syntax error (#639)

* Rename some stack vars

* Update collision.c

* Collision Documentation (#640)

* Collision related renames

* update doxygen (#649)

* change bool (#644)

* Update (#642)

* Delete trig_tables_bss.c (#650)

* fix typo audio (#656)

* fix typo src actor (#657)

* fix typo include (#658)

* fix course (#659)

* fix typo debug (#660)


* fix typo data (#661)

* Update common_structs.h

* replace number with const (#665)

* fix typo buffers (#655)

* fix typo buffers

* tweak ld file

* rename to sMemoryPool

* add a warning

---------

* fix typo src (#654)

* fix typo src

* fix non matcing

* Update code_80091750.c

---------

* fix typo racing (#653)

* fix typo racing

* get it match

* replace G_LINE3D to G_QUAD

---------

* fix typo src (#652)

* fix ending typo (#651)

* Action more info when it doesn't match and fix first diff (#662)

* Update linux-compile.yml

* fix first-diff

* Update first-diff.py

---------

* document texture of kart (#663)

* document texture of kart

* change screenPlayerId to screenId

* some documentation around object

* Revert "some documentation around object"

This reverts commit cbb39078e036bf2a417bed67359e910213acab28.

* more rename

---------

* Make evaluate_collision_players_palm_tree better (#667)

This matches just the same as before,	but using those two casts instead of
shifts seems more likely to be accurate to the original source code

Signed-off-by: Gabriel Ravier <gabravier@gmail.com>

* add fedora instruciton (#666)

* start documenting animation (#668)

* start documenting animation

* Update course_data.c

* change comment

* fix error of compilation

* fix error of compilation

* Update animation.c
2024-08-22 18:20:13 -06:00

75 lines
2.1 KiB
C

#ifndef SPLINE_H
#define SPLINE_H
#include <common_structs.h>
/*
These are some very good videos about splines/Bezier curves in general
The Beauty of Bezier Curves
https://www.youtube.com/watch?v=aVwxzDHniEw
The Continuity of Splines
https://www.youtube.com/watch?v=jvPPXbo87ds
*/
/*
This stuff is all about the b-splines used objects like Lakitu and the Boos on Banshee Boardwalk
For splines used during the award ceremony and credits, see src/ending/ceremony_and_credits.h
*/
typedef struct {
/* 0x0 */ Vec3s pos;
// Don't really know what to call this member.
// It somehow controls the speed of travel along a segment of the spline but I don't really get how it works
/* 0x6 */ s16 velocity;
} SplineControlPoint; // size = 0x8
// WARNING!!!
// You really, really shouldn't use this type for actual spline data. This is intended as a generic SplineData
// type. I would use a union, but that would cause significant ugliness elsewhere in the codebase
typedef struct {
// This name is a little misleading
// The control point arrays have more control points in them than this number indicates. Not sure why though.
s16 numControlPoints;
// This has to be an array for this to work, so just make it size 1
SplineControlPoint controlPoints[];
} SplineData;
// All other SplineDataXX types are for use as data only. The size of the array in them matters a lot.
// But object structs should never have members with these types, just use the plain SplineData type
// Ghosts in BansheeBoardwalk x 2
// Seagulls in KoopaTroopaBeach x 2
// Penguins in Sherbet Land x 1
// length of 23
// Ghosts in BansheeBoardwalk x 2
// Seagulls in KoopaTroopaBeach x 1
// length of 24
// Ghosts in BansheeBoardwalk x 1
// Seagulls in KoopaTroopaBeach x 1
// Penguins in Sherbet Land x 1
// length of 25
// Data of this type is unreferenced or only referenced in an unused function
// lenght of 4
// Lakitu Countdown
// length of 15
// Lakitu Checkered Flag
// length of 21
// length of 13
// Lakitu Second/Final Lap
// length of 12
// Lakitu Reverse
// length of 8
#endif