Files
SpaghettiKart/include/waypoints.h
coco875 a1f0d32d66 Update decomp clang (#67)
* 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)

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* Update (#642)

* Delete trig_tables_bss.c (#650)

* fix typo audio (#656)

* fix typo src actor (#657)

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>

* fix typo include (#658)

* fix course (#659)

* fix typo debug (#660)

* fix typo data (#661)

* 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

* update libultra asm (#648)

* update libultra asm

* fix gcc __osThreadTail

---------

* Document Vehicles (#641)

* start doc collision

* fix merge

* finish rename fonction related to vehicle

* document around waypoint of vehicle

* make some modification

* make some change and rename one

* copy_ to oldPos

* doc smoke ferry and train

* some rename

* fix some renaming

* precise index

* rename a funciton

* simplify waypoint_vehicles

* change some name

* change some name

* rename move_to_point_direction

* fix some conflict

* Update code_80005FD0.c

* Update code_80005FD0.h

---------

* Label a save info loop (#645)

* save info

* more gcc progress

* fix a value and do a rename (#669)

* update clang and add action (#664)

* update clang and add action

* try clang on course folder only

* forget two file

* Update course_displaylists.inc.c

* forget few other file

* Update course_vertices.inc.c

* format all code while get it match

* second pass

* format other dir

* disable clang format on bad ido code

* fix some tabulation

* revert format on tool dir

* Update clang-format.yml

* ignore gbi.h

* add some read me instruction

* fix error

* format and fixing error

* Update README.md

---------

* Update linkonly_generator.py (#670)

* format more file

* update

* fix compilation issue

* remove course_metadata folder

* re add course metadata folder

* fix banshee bordwalk crash

* fix windows eurk

* Update CMakeLists.txt

---------
2024-08-27 17:47:39 -06:00

91 lines
3.2 KiB
C

#ifndef WAYPOINTS_H
#define WAYPOINTS_H
#include <common_structs.h>
typedef struct {
/* 0x00 */ s16 posX;
/* 0x02 */ s16 posY;
/* 0x04 */ s16 posZ;
/* 0x06 */ u16 trackSectionId;
} TrackWaypoint; // size = 0x08
/**
* These are per-path arrays that contain some information relating to waypoints
* The arrays in D_80164550 contain X/Y/Z and track segment information
* The arrays in D_80164560 and D_80164570 track some other X/Y/Z, but the track segment is always 0 (so,
*untracked/unused) Its unclear how these arrays relate to each other
**/
extern TrackWaypoint* D_80164550[];
extern TrackWaypoint* D_80164560[];
extern TrackWaypoint* D_80164570[];
/**
* Don't know what exactly these are, but like D_80164550, D_80164560, and D_80164570
* they track something about the waypoints on a per-path basis
**/
// Waypoint types?
extern s16* D_80164580[];
// Based on func_80010DBC this may be angles between waypoints
// D_80164590[i] = atan2(waypoint_i, waypoint_i+1)?
extern s16* D_80164590[];
// No idea. Adjacency list?
extern s16* D_801645A0[];
/**
* Certain parts of the waypoint logic will copy some path/player specific data to a temporary variable.
* For example: D_80164490 is always a value from D_80164550. Depending on which path
* a given player is on, the specific value may change
**/
// Shadows values from gNearestWaypointByPlayerId
extern s16 sSomeNearestWaypoint;
// Shadows values from gPathIndexByPlayerId
extern s32 D_80163448;
// Shadows values from D_80164560
extern TrackWaypoint* D_801631D0;
// Shadows values from D_80164570
extern TrackWaypoint* D_801631D4;
// Shadows values from D_80164580
extern s16* D_801631D8;
// Shadows values from D_80164590
extern s16* D_801631DC;
// Shadowd values from gWaypointCountByPathIndex
extern u16 D_80164430;
// Shadows values from D_80164550
extern TrackWaypoint* D_80164490;
// Shadows values from D_801645A0
extern s16* D_801645E0;
extern u16 gNearestWaypointByPlayerId[]; // D_80164438
// Total waypoints passed by playerId?
extern s32 D_80164450[];
extern u16 gPathIndexByPlayerId[]; // D_801645B0
extern u16 gWaypointCountByPathIndex[]; // D_801645C8
// These values are only used when the camera is in "cinematic" mode
extern s16 gNearestWaypointByCameraId[]; // D_80164668
/**
* Stuff that may not be directly related to waypoints, but are only referenced in code_80005FD0.
* So they are at least waypoint adjacent.
**/
// Tracks something on a per-player basis, no idea what though
extern f32 D_80163068[];
// Track segment by playerId, although it curiously does NOT track values for human players
// So, in 2 Player Grand Prix, the first 2 entries are always 0
extern u16 D_80163318[];
// Seems to be a per-path overcount of the waypoint count
extern s32 D_80163368[];
// Seemingly the Z position of the 1st waypoint in the 0th path?
extern f32 D_8016344C;
// These seem to track whether a player has entered or exited the "unknown" zone in yoshi's valley
// See func_80009000 and func_800090F0
// Is 1 when a player is in the "unknown" zone in yoshi's valley
extern s16 D_80163490[];
// Is 1 when a player leaves the "unknown" zone in yoshi's valley
extern s16 D_801634A8[];
// Tracks whether a given player is in the "unknown" zone of yoshi's valley
extern s16 D_801644F8[];
#endif