summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcoco875 <59367621+coco875@users.noreply.github.com>2024-08-23 02:20:13 +0200
committerGitHub <noreply@github.com>2024-08-22 18:20:13 -0600
commite135178097f416bc54e36058e10d9b1c013929fd (patch)
tree0903c79b59ed716497e55618631d5e76611fe032 /include
parent3781ce2830a143df855003b65fe069d2e26215d9 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/bomb_kart.h2
-rw-r--r--include/common_structs.h2
-rw-r--r--include/course_offsets.h66
-rw-r--r--include/decode.h2
-rw-r--r--include/defines.h17
-rw-r--r--include/objects.h2
-rw-r--r--include/save_data.h2
-rw-r--r--include/spline.h2
-rw-r--r--include/vehicles.h2
-rw-r--r--include/waypoints.h2
10 files changed, 54 insertions, 45 deletions
diff --git a/include/bomb_kart.h b/include/bomb_kart.h
index 6f8bea8ca..528183949 100644
--- a/include/bomb_kart.h
+++ b/include/bomb_kart.h
@@ -1,7 +1,7 @@
#ifndef BOMB_KART_H
#define BOMB_KART_H
-#include "common_structs.h"
+#include <common_structs.h>
#include <mk64.h>
#define NUM_BOMB_KARTS_MAX 7
diff --git a/include/common_structs.h b/include/common_structs.h
index 76bd7ea83..b0abfcb91 100644
--- a/include/common_structs.h
+++ b/include/common_structs.h
@@ -203,7 +203,7 @@ typedef struct {
//bit 3: 1 = player tumbles upon contact (may fall right through)
/* 0x02 */ u16 surfaceType;
- // For AABB bounding-box style collision. Box collision is cheaper than checking each vtx.
+ // For AABB bounding-box style collision. Box style collision is cheaper than checking each vtx.
/* 0x04 */ s16 minX; // Minimum x coordinate
s16 minY; // Minimum y coordinate
s16 minZ; // Minimum z coordinate
diff --git a/include/course_offsets.h b/include/course_offsets.h
index b84888a63..72f046c75 100644
--- a/include/course_offsets.h
+++ b/include/course_offsets.h
@@ -5,7 +5,7 @@
#include <libultra/types.h>
#include <libultra/gbi.h>
#include <assets/other_textures.h>
-#include "code_80004740.h"
+#include "animation.h"
typedef struct
{
@@ -17,21 +17,21 @@ typedef struct
extern uintptr_t d_course_sherbet_land_unk_data1[];
extern s16 d_course_sherbet_land_unk_data2[];
-extern animation_type_3_triplet d_course_sherbet_land_unk_data3[];
-extern animation_type_2 d_course_sherbet_land_unk_data4;
+extern AnimationLimbVector d_course_sherbet_land_unk_data3[];
+extern Animation d_course_sherbet_land_unk_data4;
extern s16 d_course_sherbet_land_unk_data5[];
-extern animation_type_3_triplet d_course_sherbet_land_unk_data6[];
-extern animation_type_2 d_course_sherbet_land_unk_data7;
+extern AnimationLimbVector d_course_sherbet_land_unk_data6[];
+extern Animation d_course_sherbet_land_unk_data7;
extern s16 d_course_sherbet_land_unk_data8[];
-extern animation_type_3_triplet d_course_sherbet_land_unk_data9[];
-extern animation_type_2 d_course_sherbet_land_unk_data10;
-extern animation_type_2 *d_course_sherbet_land_unk_data11[];
+extern AnimationLimbVector d_course_sherbet_land_unk_data9[];
+extern Animation d_course_sherbet_land_unk_data10;
+extern Animation *d_course_sherbet_land_unk_data11[];
extern u32 d_course_sherbet_land_unk_data12[];
extern s16 d_rainbow_road_chomp_jaw_animation[];
-extern animation_type_3_triplet d_rainbow_road_unk1[];
-extern animation_type_2 d_rainbow_road_unk2;
-extern animation_type_2 *d_rainbow_road_unk3[];
+extern AnimationLimbVector d_rainbow_road_unk1[];
+extern Animation d_rainbow_road_unk2;
+extern Animation *d_rainbow_road_unk3[];
extern uintptr_t d_rainbow_road_unk4[];
extern u32 d_rainbow_road_unk5[];
@@ -39,51 +39,51 @@ extern Gfx *koopa_troopa_beach_dls1[];
extern Gfx *koopa_troopa_beach_dls2[];
extern u32 d_course_koopa_troopa_beach_unk_data1[];
extern s16 d_course_koopa_troopa_beach_unk_data2[];
-extern animation_type_3_triplet d_course_koopa_troopa_beach_unk_data3[];
-extern animation_type_2 d_course_koopa_troopa_beach_unk_data4;
+extern AnimationLimbVector d_course_koopa_troopa_beach_unk_data3[];
+extern Animation d_course_koopa_troopa_beach_unk_data4;
extern uintptr_t d_course_koopa_troopa_beach_unk4[];
-extern animation_type_2 *d_course_koopa_troopa_beach_unk_data5[];
+extern Animation *d_course_koopa_troopa_beach_unk_data5[];
extern u32 d_course_koopa_troopa_beach_unk_data6[];
extern s16 d_course_yoshi_valley_unk1[];
-extern animation_type_3_triplet d_course_yoshi_valley_unk2[];
-extern animation_type_2 d_course_yoshi_valley_unk3;
-extern animation_type_2 *d_course_yoshi_valley_unk4[];
+extern AnimationLimbVector d_course_yoshi_valley_unk2[];
+extern Animation d_course_yoshi_valley_unk3;
+extern Animation *d_course_yoshi_valley_unk4[];
extern uintptr_t d_course_yoshi_valley_unk5[];
extern u32 d_course_yoshi_valley_unk6[];
extern uintptr_t d_course_sherbet_land_unk_data1[];
extern s16 d_course_sherbet_land_unk_data2[];
-extern animation_type_3_triplet d_course_sherbet_land_unk_data3[];
-extern animation_type_2 d_course_sherbet_land_unk_data4;
+extern AnimationLimbVector d_course_sherbet_land_unk_data3[];
+extern Animation d_course_sherbet_land_unk_data4;
extern s16 d_course_sherbet_land_unk_data5[];
-extern animation_type_3_triplet d_course_sherbet_land_unk_data6[];
-extern animation_type_2 d_course_sherbet_land_unk_data7;
+extern AnimationLimbVector d_course_sherbet_land_unk_data6[];
+extern Animation d_course_sherbet_land_unk_data7;
extern s16 d_course_sherbet_land_unk_data8[];
-extern animation_type_3_triplet d_course_sherbet_land_unk_data9[];
-extern animation_type_2 d_course_sherbet_land_unk_data10;
-extern animation_type_2 *d_course_sherbet_land_unk_data11[];
+extern AnimationLimbVector d_course_sherbet_land_unk_data9[];
+extern Animation d_course_sherbet_land_unk_data10;
+extern Animation *d_course_sherbet_land_unk_data11[];
extern u32 d_course_sherbet_land_unk_data12[];
extern s16 d_rainbow_road_chomp_jaw_animation[];
-extern animation_type_3_triplet d_rainbow_road_unk1[];
-extern animation_type_2 d_rainbow_road_unk2;
-extern animation_type_2 *d_rainbow_road_unk3[];
+extern AnimationLimbVector d_rainbow_road_unk1[];
+extern Animation d_rainbow_road_unk2;
+extern Animation *d_rainbow_road_unk3[];
extern u32 d_rainbow_road_unk5[];
extern Gfx *koopa_troopa_beach_dls1[];
extern Gfx *koopa_troopa_beach_dls2[];
extern u32 d_course_koopa_troopa_beach_unk_data1[];
extern s16 d_course_koopa_troopa_beach_unk_data2[];
-extern animation_type_3_triplet d_course_koopa_troopa_beach_unk_data3[];
-extern animation_type_2 d_course_koopa_troopa_beach_unk_data4;
-extern animation_type_2 *d_course_koopa_troopa_beach_unk_data5[];
+extern AnimationLimbVector d_course_koopa_troopa_beach_unk_data3[];
+extern Animation d_course_koopa_troopa_beach_unk_data4;
+extern Animation *d_course_koopa_troopa_beach_unk_data5[];
extern u32 d_course_koopa_troopa_beach_unk_data6[];
extern s16 d_course_yoshi_valley_unk1[];
-extern animation_type_3_triplet d_course_yoshi_valley_unk2[];
-extern animation_type_2 d_course_yoshi_valley_unk3;
-extern animation_type_2 *d_course_yoshi_valley_unk4[];
+extern AnimationLimbVector d_course_yoshi_valley_unk2[];
+extern Animation d_course_yoshi_valley_unk3;
+extern Animation *d_course_yoshi_valley_unk4[];
extern u32 d_course_yoshi_valley_unk6[];
#endif // COURSE_OFFSETS_H
diff --git a/include/decode.h b/include/decode.h
index d8d644f26..f37cbedcd 100644
--- a/include/decode.h
+++ b/include/decode.h
@@ -1,7 +1,7 @@
#ifndef _FUNCTIONS_H_
#define _FUNCTIONS_H_
-#include "common_structs.h"
+#include <common_structs.h>
// Unused mio0decode function.
void func_80040030(u8* arg0, u8* arg1);
diff --git a/include/defines.h b/include/defines.h
index 3a07955be..e18d6ac9c 100644
--- a/include/defines.h
+++ b/include/defines.h
@@ -76,8 +76,10 @@
#ifdef VERSION_EU
#define COURSE_TIMER_ITER 0.020041665999999999 // 1 / 50
+#define COURSE_TIMER_ITER_f 0.020041665999999999f // 1 / 50
#else
#define COURSE_TIMER_ITER 0.01666666 // 1 / 60
+#define COURSE_TIMER_ITER_f 0.01666666f // 1 / 60
#endif
#define V_BlANK_TIMER_ITER 0.01666666
@@ -109,10 +111,17 @@
#define FOUR_PLAYERS_SELECTED 4
#define SELECTED_PLAYER_DEFINES_TOTAL 5
-#define PLAYER_ONE 0
-#define PLAYER_TWO 1
-#define PLAYER_THREE 2
-#define PLAYER_FOUR 3
+enum PlayerId {
+ PLAYER_NONE = -1,
+ PLAYER_ONE = 0,
+ PLAYER_TWO = 1,
+ PLAYER_THREE = 2,
+ PLAYER_FOUR = 3,
+ PLAYER_FIVE = 4,
+ PLAYER_SIX = 5,
+ PLAYER_SEVEN = 6,
+ PLAYER_EIGHT = 7
+};
#define NUM_PLAYERS 8
diff --git a/include/objects.h b/include/objects.h
index 6a0a9b1ae..ec0f4ac4a 100644
--- a/include/objects.h
+++ b/include/objects.h
@@ -2,7 +2,7 @@
#define OBJECTS_H
#include "spline.h"
-#include "common_structs.h"
+#include <common_structs.h>
#define OBJECT_LIST_SIZE 0x226
#define SOME_OBJECT_INDEX_LIST_SIZE 32
diff --git a/include/save_data.h b/include/save_data.h
index 78495bba5..38d82c287 100644
--- a/include/save_data.h
+++ b/include/save_data.h
@@ -1,7 +1,7 @@
#ifndef SAVE_DATA_H
#define SAVE_DATA_H
-#include "common_structs.h"
+#include <common_structs.h>
typedef struct {
// 6 little endian 3-byte records.
diff --git a/include/spline.h b/include/spline.h
index 525faa6fa..a7f4d0c3b 100644
--- a/include/spline.h
+++ b/include/spline.h
@@ -1,7 +1,7 @@
#ifndef SPLINE_H
#define SPLINE_H
-#include "common_structs.h"
+#include <common_structs.h>
/*
These are some very good videos about splines/Bezier curves in general
diff --git a/include/vehicles.h b/include/vehicles.h
index 17e80587e..87f0f2a39 100644
--- a/include/vehicles.h
+++ b/include/vehicles.h
@@ -1,7 +1,7 @@
#ifndef VEHICLES_H
#define VEHICLES_H
-#include "common_structs.h"
+#include <common_structs.h>
#define NUM_1P_PASSENGER_CARS 4
#define NUM_2P_PASSENGER_CARS 1
diff --git a/include/waypoints.h b/include/waypoints.h
index bc5ef3237..9fc38dbd6 100644
--- a/include/waypoints.h
+++ b/include/waypoints.h
@@ -1,7 +1,7 @@
#ifndef WAYPOINTS_H
#define WAYPOINTS_H
-#include "common_structs.h"
+#include <common_structs.h>
typedef struct {
/* 0x00 */ s16 posX;