mirror of https://github.com/n64decomp/mk64.git
Header cleanup and some renames (#616)
* Place macros for addr conversions * dl renames * fixes * changes ok * Delete types.h * move enums
This commit is contained in:
parent
4df6473147
commit
7a10ba89f6
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_banshee_boardwalk_vertex[] = {
|
||||
{{-1384, 12, -187}, { 2303, -256}, {MACRO_COLOR_FLAG(0x7c, 0x7c, 0x7c, 0), 0x00}},
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include <PR/gbi.h>
|
||||
#include <actor_types.h>
|
||||
#include <course.h>
|
||||
#include <types.h>
|
||||
|
||||
#include "course_displaylists.inc.h"
|
||||
#include "course_textures.linkonly.h"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_big_donut_vertex[] = {
|
||||
{{ 609, 270, 794}, { 1024, 1024}, {MACRO_COLOR_FLAG(0x48, 0x48, 0xfc, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_block_fort_vertex[] = {
|
||||
{{ 85, 0, 476}, { 0, 0}, {MACRO_COLOR_FLAG(0xb8, 0xb0, 0xcc, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_bowsers_castle_vertex[] = {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_choco_mountain_vertex[] = {
|
||||
{{ 1364, 0, 796}, { 3158, 1024}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 0), 0x00}},
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "types.h"
|
||||
#include "courseTable.h"
|
||||
#include "all_course_model.h"
|
||||
#include "all_course_packed.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "types.h"
|
||||
|
||||
// dlRomStart, vertexRomStart, & vertexStart, are u8* because mio0 compressed.
|
||||
struct CourseTable {
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
#define MACRO_COLOR_FLAG(r, g, b, flag) (r&~0x3) | (flag & 0x3), (g&~0x3) | ((flag>>2) & 0x3), b
|
|
@ -5403,7 +5403,7 @@ Gfx d_course_dks_jungle_parkway_dl_E048[] =
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx d_course_dks_jungle_parkway_dl_E058[] =
|
||||
Gfx d_course_dks_jungle_parkway_railings_dl[] =
|
||||
{
|
||||
gsSPDisplayList(d_course_dks_jungle_parkway_dl_E048),
|
||||
gsSPEndDisplayList(),
|
||||
|
@ -5664,7 +5664,7 @@ Gfx d_course_dks_jungle_parkway_dl_E700[] =
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx d_course_dks_jungle_parkway_dl_E730[] =
|
||||
Gfx d_course_dks_jungle_parkway_boat_dl[] =
|
||||
{
|
||||
gsSPDisplayList(d_course_dks_jungle_parkway_dl_E700),
|
||||
gsSPEndDisplayList(),
|
||||
|
@ -5802,7 +5802,7 @@ Gfx d_course_dks_jungle_parkway_dl_FC18[] =
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
Gfx d_course_dks_jungle_parkway_dl_FC28[] =
|
||||
Gfx d_course_dks_jungle_parkway_paddle_wheel_dl[] =
|
||||
{
|
||||
gsSPDisplayList(d_course_dks_jungle_parkway_dl_FC18),
|
||||
gsSPEndDisplayList(),
|
||||
|
|
|
@ -142,7 +142,7 @@ extern Gfx d_course_dks_jungle_parkway_dl_DE48[];
|
|||
extern Gfx d_course_dks_jungle_parkway_dl_DF30[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E030[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E048[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E058[];
|
||||
extern Gfx d_course_dks_jungle_parkway_railings_dl[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E068[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E150[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E238[];
|
||||
|
@ -156,7 +156,7 @@ extern Gfx d_course_dks_jungle_parkway_dl_E628[];
|
|||
extern Gfx d_course_dks_jungle_parkway_dl_E688[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E6E8[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E700[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_E730[];
|
||||
extern Gfx d_course_dks_jungle_parkway_boat_dl[];
|
||||
extern Vtx d_course_dks_jungle_parkway_paddle_boat_paddle_model1[];
|
||||
extern Vtx d_course_dks_jungle_parkway_paddle_boat_paddle_model2[];
|
||||
extern Vtx d_course_dks_jungle_parkway_paddle_boat_paddle_model3[];
|
||||
|
@ -165,7 +165,7 @@ extern u8 d_course_dks_jungle_parkway_boat_paddle2[];
|
|||
extern Gfx d_course_dks_jungle_parkway_dl_FAE0[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_FC08[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_FC18[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_FC28[];
|
||||
extern Gfx d_course_dks_jungle_parkway_paddle_wheel_dl[];
|
||||
extern Gfx d_course_dks_jungle_parkway_dl_FC38[];
|
||||
extern Vtx d_course_dks_jungle_parkway_tree_model[];
|
||||
extern u8 d_course_dks_jungle_parkway_tree2_top[];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_dks_jungle_parkway_vertex[] = {
|
||||
{{-1842, 199, -812}, { 1024, 0}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_double_deck_vertex[] = {
|
||||
{{ 577, 60, 100}, { -317, 1024}, {MACRO_COLOR_FLAG(0x7c, 0x7c, 0x7c, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_frappe_snowland_vertex[] = {
|
||||
{{-1518, 50, 1102}, { 4095, 0}, {MACRO_COLOR_FLAG(0xb4, 0xc8, 0xfc, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_kalimari_desert_vertex[] = {
|
||||
{{ -702, 48, -1930}, { 2048, 0}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 4), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_koopa_troopa_beach_vertex[] = {
|
||||
{{ -370, 11, -1114}, { -2686, 0}, {MACRO_COLOR_FLAG(0x98, 0x98, 0x98, 4), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_luigi_raceway_vertex[] = {
|
||||
{{ 175, 107, -448}, { 0, 74}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 4), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_mario_raceway_vertex[] = {
|
||||
{{ 2583, 31, -586}, { 8985, 1023}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_moo_moo_farm_vertex[] = {
|
||||
{{ 114, 44, -2058}, { 819, -204}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_rainbow_road_vertex[] = {
|
||||
{{-1418, 657, -847}, { -27, -34}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0x00, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_royal_raceway_vertex[] = {
|
||||
{{ -409, 105, -1495}, { 12288, 1024}, {MACRO_COLOR_FLAG(0xc0, 0xc0, 0xc0, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_sherbet_land_vertex[] = {
|
||||
{{ -1834, -60, 1192}, { 4096, 0}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 4), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_skyscraper_vertex[] = {
|
||||
{{ -54, 485, 320}, { -4060, 0}, {MACRO_COLOR_FLAG(0xfc, 0xfc, 0xfc, 0), 0x00}},
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "types.h"
|
||||
#include "common_structs.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_toads_turnpike_vertex[] = {
|
||||
{{-2064, 50, -3157}, { 2048, 479}, {MACRO_COLOR_FLAG(0x7c, 0x7c, 0xc0, 0), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_wario_stadium_vertex[] = {
|
||||
{{-3350, 362, -650}, { 3107, 1023}, {MACRO_COLOR_FLAG(0xcc, 0xcc, 0xcc, 4), 0x00}},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "types.h"
|
||||
#include "courses/course_macro.h"
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
|
||||
CourseVtx d_course_yoshi_valley_vertex[] = {
|
||||
{{-1627, -100, -730}, { -1858, 2252}, {MACRO_COLOR_FLAG(0x88, 0x88, 0x88, 0), 0x00}},
|
||||
|
|
|
@ -82,8 +82,7 @@ index 0000000..5569838
|
|||
+#include <ultra64.h>
|
||||
+#include <PR/os.h>
|
||||
+#include <macros.h>
|
||||
+#include <types.h>
|
||||
+#include <defines.h>
|
||||
++#include <defines.h>
|
||||
+#include <camera.h>
|
||||
+#include "main.h"
|
||||
+#include <libc/math.h>
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define BOMB_KART_H
|
||||
|
||||
#include "common_structs.h"
|
||||
#include <mk64.h>
|
||||
|
||||
#define NUM_BOMB_KARTS_MAX 7
|
||||
#define NUM_BOMB_KARTS_VERSUS 7
|
||||
|
|
|
@ -21,82 +21,6 @@ typedef struct
|
|||
f32 x, y, z;
|
||||
} Vec3fs;
|
||||
|
||||
#define COURSE_NULL 0xFF
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ COURSE_MARIO_RACEWAY = 0,
|
||||
/* 0x01 */ COURSE_CHOCO_MOUNTAIN,
|
||||
/* 0x02 */ COURSE_BOWSER_CASTLE,
|
||||
/* 0x03 */ COURSE_BANSHEE_BOARDWALK,
|
||||
/* 0x04 */ COURSE_YOSHI_VALLEY,
|
||||
/* 0x05 */ COURSE_FRAPPE_SNOWLAND,
|
||||
/* 0x06 */ COURSE_KOOPA_BEACH,
|
||||
/* 0x07 */ COURSE_ROYAL_RACEWAY,
|
||||
/* 0x08 */ COURSE_LUIGI_RACEWAY,
|
||||
/* 0x09 */ COURSE_MOO_MOO_FARM,
|
||||
/* 0x0A */ COURSE_TOADS_TURNPIKE,
|
||||
/* 0x0B */ COURSE_KALAMARI_DESERT,
|
||||
/* 0x0C */ COURSE_SHERBET_LAND,
|
||||
/* 0x0D */ COURSE_RAINBOW_ROAD,
|
||||
/* 0x0E */ COURSE_WARIO_STADIUM,
|
||||
/* 0x0F */ COURSE_BLOCK_FORT,
|
||||
/* 0x10 */ COURSE_SKYSCRAPER,
|
||||
/* 0x11 */ COURSE_DOUBLE_DECK,
|
||||
/* 0x12 */ COURSE_DK_JUNGLE,
|
||||
/* 0x13 */ COURSE_BIG_DONUT,
|
||||
/* 0x14 */ COURSE_AWARD_CEREMONY,
|
||||
/* 0x15 */ NUM_COURSES
|
||||
} COURSES;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ TIME_TRIAL_DATA_LUIGI_RACEWAY,
|
||||
/* 0x01 */ TIME_TRIAL_DATA_MOO_MOO_FARM,
|
||||
/* 0x02 */ TIME_TRIAL_DATA_KOOPA_BEACH,
|
||||
/* 0x03 */ TIME_TRIAL_DATA_KALAMARI_DESERT,
|
||||
/* 0x04 */ TIME_TRIAL_DATA_TOADS_TURNPIKE,
|
||||
/* 0x05 */ TIME_TRIAL_DATA_FRAPPE_SNOWLAND,
|
||||
/* 0x06 */ TIME_TRIAL_DATA_CHOCO_MOUNTAIN,
|
||||
/* 0x07 */ TIME_TRIAL_DATA_MARIO_RACEWAY,
|
||||
/* 0x08 */ TIME_TRIAL_DATA_WARIO_STADIUM,
|
||||
/* 0x09 */ TIME_TRIAL_DATA_SHERBET_LAND,
|
||||
/* 0x0A */ TIME_TRIAL_DATA_ROYAL_RACEWAY,
|
||||
/* 0x0B */ TIME_TRIAL_DATA_BOWSER_CASTLE,
|
||||
/* 0x0C */ TIME_TRIAL_DATA_DK_JUNGLE,
|
||||
/* 0x0D */ TIME_TRIAL_DATA_YOSHI_VALLEY,
|
||||
/* 0x0E */ TIME_TRIAL_DATA_BANSHEE_BOARDWALK,
|
||||
/* 0x0F */ TIME_TRIAL_DATA_RAINBOW_ROAD,
|
||||
/* 0x10 */ NUM_TIME_TRIAL_DATA
|
||||
} TIME_TRIAL_DATA_INDEX;
|
||||
|
||||
/**
|
||||
* @brief The different types of surface in the game.
|
||||
*/
|
||||
enum SURFACE_TYPE {
|
||||
/* -0x1 */ SURFACE_DEFAULT = -1,
|
||||
/* 0x00 */ AIRBORNE,
|
||||
/* 0x01 */ ASPHALT, // Luigi's Raceway, Toad's Turnpike, Koopa Troop beach shortcut tunnel, Mario Raceway, Royal Raceway, Rainbow Road, Block Fort, Double Deck, Skyscraper
|
||||
/* 0x02 */ DIRT, // Luigi's Raceway, Moo Moo Farm, Kalimiari Desert on course, Choco Mountain, Wario Stadium, DK Jungle on course, Yoshi Valley
|
||||
/* 0x03 */ SAND, // Koopa Troopa Beach light color, Royal Raceway
|
||||
/* 0x04 */ STONE, // Royal Raceway castle entrance, Bowser's Castle
|
||||
/* 0x05 */ SNOW, // Frappe Snowland on course, Sherber Land tunnel
|
||||
/* 0x06 */ BRIDGE, // Royal Raceway castle bridges (even the wooden one), Banshee's Boardwalk, Big Donut
|
||||
/* 0x07 */ SAND_OFFROAD, // Mario Raceway
|
||||
/* 0x08 */ GRASS, // Luigi's Raceway, Mario Raceway, Royal Raceway, Bowser's Castle, DK Jungle, Yoshi Valley
|
||||
/* 0x09 */ ICE, // Sherbert Land
|
||||
/* 0x0A */ WET_SAND, // Koop Troopa Beach dark color
|
||||
/* 0x0B */ SNOW_OFFROAD, // Frappe Snowland off course
|
||||
/* 0x0C */ CLIFF, // Koopa Troopa Beach, Choco Mountain
|
||||
/* 0x0D */ DIRT_OFFROAD, // Kalimari Desert off course
|
||||
/* 0x0E */ TRAIN_TRACK, // Kalimari Desert
|
||||
/* 0x0F */ CAVE, // DK Jungle cave
|
||||
/* 0x10 */ ROPE_BRIDGE, // Bowser's Castle bridge 2, DK Jungle bridge
|
||||
/* 0x11 */ WOOD_BRIDGE, // Frappe Snowland bridge, Bowser's Castle bridge 1,3, Yoshi Valley bridge 2
|
||||
/* 0xFC */ BOOST_RAMP_WOOD = 0xFC, // DK Jungle
|
||||
/* 0xFD */ OUT_OF_BOUNDS, // DK Jungle river island
|
||||
/* 0xFE */ BOOST_RAMP_ASPHALT, // Royal Raceway
|
||||
/* 0xFF */ RAMP // Koopa Troopa beach
|
||||
};
|
||||
|
||||
// This was added as a silly idea:
|
||||
// In the data to use "A, B, Z, R" instead of hex numbers.
|
||||
typedef enum {
|
||||
|
@ -106,6 +30,103 @@ typedef enum {
|
|||
R = 0x10
|
||||
} GhostController;
|
||||
|
||||
|
||||
/*** types.h ***/
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 waypointStart;
|
||||
/* 0x2 */ s16 waypointEnd;
|
||||
/* 0x4 */ s32 type;
|
||||
} KartAIBehaviour; // size = 0x8
|
||||
|
||||
enum SpTaskState {
|
||||
SPTASK_STATE_NOT_STARTED,
|
||||
SPTASK_STATE_RUNNING,
|
||||
SPTASK_STATE_INTERRUPTED,
|
||||
SPTASK_STATE_FINISHED,
|
||||
SPTASK_STATE_FINISHED_DP
|
||||
};
|
||||
|
||||
struct SPTask
|
||||
{
|
||||
/*0x00*/ OSTask task;
|
||||
/*0x40*/ OSMesgQueue *msgqueue;
|
||||
/*0x44*/ OSMesg msg;
|
||||
/*0x48*/ enum SpTaskState state;
|
||||
}; // size = 0x4C, align = 0x8
|
||||
|
||||
struct VblankHandler
|
||||
{
|
||||
OSMesgQueue *queue;
|
||||
OSMesg msg;
|
||||
};
|
||||
|
||||
struct D_80150158 {
|
||||
s16 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
};
|
||||
|
||||
struct Controller {
|
||||
s16 rawStickX;
|
||||
s16 rawStickY;
|
||||
u16 button; // HeldButton
|
||||
u16 buttonPressed; // OnTriggered
|
||||
u16 buttonDepressed; // OffTriggered
|
||||
u16 stickDirection;
|
||||
u16 stickPressed; // OffTriggered
|
||||
u16 stickDepressed; // OnTriggered
|
||||
};
|
||||
|
||||
// Camera path struct? Or something like that. For GP race won scene?
|
||||
struct UnkStruct_80287500 {
|
||||
Vec3f unk0; // xyz coordinates?
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
f32 unk14; // rotation?
|
||||
s32 unk18;
|
||||
s32 unk1C;
|
||||
f32 unk20;
|
||||
f32 unk24;
|
||||
f32 unk28;
|
||||
f32 unk2C;
|
||||
f32 unk30;
|
||||
f32 unk34;
|
||||
s32 unk38;
|
||||
};
|
||||
|
||||
struct UnkStruct_800DDB40 {
|
||||
u32 unk0;
|
||||
u32 unk4;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
u32 unk20;
|
||||
u16 unk24;
|
||||
u16 unk26;
|
||||
};
|
||||
|
||||
struct UnkStruct_802B53C8 {
|
||||
f32 unk0;
|
||||
f32 unk4;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
};
|
||||
// end math util structs
|
||||
|
||||
struct UnkStruct_800DDB68 {
|
||||
s32 *D_800ED600; s32 *D_800ED608; s32 *D_800ED610; s32 *D_800ED618;
|
||||
s32 *D_800ED620; s32 *D_800ED628; s32 *D_800ED630; s32 *D_800ED638;
|
||||
};
|
||||
/*** Types.h end ***/
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct {
|
||||
u8 button;
|
||||
s8 frameDuration;
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
/**
|
||||
* @file config.h
|
||||
* A catch-all file for configuring various bugfixes and other settings in MK64
|
||||
*/
|
||||
|
||||
// Screen Size Defines
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
#define STACKSIZE 0x2000
|
||||
|
||||
// Border Height Define for NTSC Versions
|
||||
#define BORDER_HEIGHT 1
|
||||
|
||||
#endif
|
|
@ -1,10 +1,98 @@
|
|||
#ifndef MK64_H
|
||||
#define MK64_H
|
||||
|
||||
// Global header for Mario Kart 64
|
||||
/**
|
||||
* @file mk64.h
|
||||
* Global header for mk64
|
||||
*/
|
||||
|
||||
#include <types.h>
|
||||
#include "config.h"
|
||||
/*=======================
|
||||
Configuration
|
||||
=======================*/
|
||||
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
#define STACKSIZE 0x2000
|
||||
|
||||
// Border Height Define for NTSC Versions
|
||||
#define BORDER_HEIGHT 1
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ COURSE_MARIO_RACEWAY = 0,
|
||||
/* 0x01 */ COURSE_CHOCO_MOUNTAIN,
|
||||
/* 0x02 */ COURSE_BOWSER_CASTLE,
|
||||
/* 0x03 */ COURSE_BANSHEE_BOARDWALK,
|
||||
/* 0x04 */ COURSE_YOSHI_VALLEY,
|
||||
/* 0x05 */ COURSE_FRAPPE_SNOWLAND,
|
||||
/* 0x06 */ COURSE_KOOPA_BEACH,
|
||||
/* 0x07 */ COURSE_ROYAL_RACEWAY,
|
||||
/* 0x08 */ COURSE_LUIGI_RACEWAY,
|
||||
/* 0x09 */ COURSE_MOO_MOO_FARM,
|
||||
/* 0x0A */ COURSE_TOADS_TURNPIKE,
|
||||
/* 0x0B */ COURSE_KALAMARI_DESERT,
|
||||
/* 0x0C */ COURSE_SHERBET_LAND,
|
||||
/* 0x0D */ COURSE_RAINBOW_ROAD,
|
||||
/* 0x0E */ COURSE_WARIO_STADIUM,
|
||||
/* 0x0F */ COURSE_BLOCK_FORT,
|
||||
/* 0x10 */ COURSE_SKYSCRAPER,
|
||||
/* 0x11 */ COURSE_DOUBLE_DECK,
|
||||
/* 0x12 */ COURSE_DK_JUNGLE,
|
||||
/* 0x13 */ COURSE_BIG_DONUT,
|
||||
/* 0x14 */ COURSE_AWARD_CEREMONY,
|
||||
/* 0x15 */ NUM_COURSES
|
||||
} COURSES;
|
||||
|
||||
#define COURSE_NULL 0xFF
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ TIME_TRIAL_DATA_LUIGI_RACEWAY,
|
||||
/* 0x01 */ TIME_TRIAL_DATA_MOO_MOO_FARM,
|
||||
/* 0x02 */ TIME_TRIAL_DATA_KOOPA_BEACH,
|
||||
/* 0x03 */ TIME_TRIAL_DATA_KALAMARI_DESERT,
|
||||
/* 0x04 */ TIME_TRIAL_DATA_TOADS_TURNPIKE,
|
||||
/* 0x05 */ TIME_TRIAL_DATA_FRAPPE_SNOWLAND,
|
||||
/* 0x06 */ TIME_TRIAL_DATA_CHOCO_MOUNTAIN,
|
||||
/* 0x07 */ TIME_TRIAL_DATA_MARIO_RACEWAY,
|
||||
/* 0x08 */ TIME_TRIAL_DATA_WARIO_STADIUM,
|
||||
/* 0x09 */ TIME_TRIAL_DATA_SHERBET_LAND,
|
||||
/* 0x0A */ TIME_TRIAL_DATA_ROYAL_RACEWAY,
|
||||
/* 0x0B */ TIME_TRIAL_DATA_BOWSER_CASTLE,
|
||||
/* 0x0C */ TIME_TRIAL_DATA_DK_JUNGLE,
|
||||
/* 0x0D */ TIME_TRIAL_DATA_YOSHI_VALLEY,
|
||||
/* 0x0E */ TIME_TRIAL_DATA_BANSHEE_BOARDWALK,
|
||||
/* 0x0F */ TIME_TRIAL_DATA_RAINBOW_ROAD,
|
||||
/* 0x10 */ NUM_TIME_TRIAL_DATA
|
||||
} TIME_TRIAL_DATA_INDEX;
|
||||
|
||||
/**
|
||||
* @brief The different types of surface in the game.
|
||||
*/
|
||||
enum SURFACE_TYPE {
|
||||
/* -0x1 */ SURFACE_DEFAULT = -1,
|
||||
/* 0x00 */ AIRBORNE,
|
||||
/* 0x01 */ ASPHALT, // Luigi's Raceway, Toad's Turnpike, Koopa Troop beach shortcut tunnel, Mario Raceway, Royal Raceway, Rainbow Road, Block Fort, Double Deck, Skyscraper
|
||||
/* 0x02 */ DIRT, // Luigi's Raceway, Moo Moo Farm, Kalimiari Desert on course, Choco Mountain, Wario Stadium, DK Jungle on course, Yoshi Valley
|
||||
/* 0x03 */ SAND, // Koopa Troopa Beach light color, Royal Raceway
|
||||
/* 0x04 */ STONE, // Royal Raceway castle entrance, Bowser's Castle
|
||||
/* 0x05 */ SNOW, // Frappe Snowland on course, Sherber Land tunnel
|
||||
/* 0x06 */ BRIDGE, // Royal Raceway castle bridges (even the wooden one), Banshee's Boardwalk, Big Donut
|
||||
/* 0x07 */ SAND_OFFROAD, // Mario Raceway
|
||||
/* 0x08 */ GRASS, // Luigi's Raceway, Mario Raceway, Royal Raceway, Bowser's Castle, DK Jungle, Yoshi Valley
|
||||
/* 0x09 */ ICE, // Sherbert Land
|
||||
/* 0x0A */ WET_SAND, // Koop Troopa Beach dark color
|
||||
/* 0x0B */ SNOW_OFFROAD, // Frappe Snowland off course
|
||||
/* 0x0C */ CLIFF, // Koopa Troopa Beach, Choco Mountain
|
||||
/* 0x0D */ DIRT_OFFROAD, // Kalimari Desert off course
|
||||
/* 0x0E */ TRAIN_TRACK, // Kalimari Desert
|
||||
/* 0x0F */ CAVE, // DK Jungle cave
|
||||
/* 0x10 */ ROPE_BRIDGE, // Bowser's Castle bridge 2, DK Jungle bridge
|
||||
/* 0x11 */ WOOD_BRIDGE, // Frappe Snowland bridge, Bowser's Castle bridge 1,3, Yoshi Valley bridge 2
|
||||
/* 0xFC */ BOOST_RAMP_WOOD = 0xFC, // DK Jungle
|
||||
/* 0xFD */ OUT_OF_BOUNDS, // DK Jungle river island
|
||||
/* 0xFE */ BOOST_RAMP_ASPHALT, // Royal Raceway
|
||||
/* 0xFF */ RAMP // Koopa Troopa beach
|
||||
};
|
||||
|
||||
#define GFX_GET_OPCODE(var) ((s32)((var) & 0xFF000000))
|
||||
|
||||
|
@ -26,4 +114,6 @@
|
|||
#define SET_HIGH_S16_OF_32(var, x) ((((s16 *)&(var))[0]) = (x))
|
||||
#endif
|
||||
|
||||
#define MACRO_COLOR_FLAG(r, g, b, flag) (r&~0x3) | (flag & 0x3), (g&~0x3) | ((flag>>2) & 0x3), b
|
||||
|
||||
#endif // MK64_H
|
||||
|
|
118
include/types.h
118
include/types.h
|
@ -1,118 +0,0 @@
|
|||
#ifndef TYPES_H
|
||||
#define TYPES_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <common_structs.h>
|
||||
#include "camera.h"
|
||||
|
||||
typedef struct {
|
||||
/* 0x0 */ s16 waypointStart;
|
||||
/* 0x2 */ s16 waypointEnd;
|
||||
/* 0x4 */ s32 type;
|
||||
} KartAIBehaviour; // size = 0x8
|
||||
|
||||
enum SpTaskState {
|
||||
SPTASK_STATE_NOT_STARTED,
|
||||
SPTASK_STATE_RUNNING,
|
||||
SPTASK_STATE_INTERRUPTED,
|
||||
SPTASK_STATE_FINISHED,
|
||||
SPTASK_STATE_FINISHED_DP
|
||||
};
|
||||
|
||||
struct SPTask
|
||||
{
|
||||
/*0x00*/ OSTask task;
|
||||
/*0x40*/ OSMesgQueue *msgqueue;
|
||||
/*0x44*/ OSMesg msg;
|
||||
/*0x48*/ enum SpTaskState state;
|
||||
}; // size = 0x4C, align = 0x8
|
||||
|
||||
struct VblankHandler
|
||||
{
|
||||
OSMesgQueue *queue;
|
||||
OSMesg msg;
|
||||
};
|
||||
|
||||
struct D_80150158 {
|
||||
s16 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
s32 unkC;
|
||||
};
|
||||
|
||||
struct Controller {
|
||||
s16 rawStickX;
|
||||
s16 rawStickY;
|
||||
u16 button; // HeldButton
|
||||
u16 buttonPressed; // OnTriggered
|
||||
u16 buttonDepressed; // OffTriggered
|
||||
u16 stickDirection;
|
||||
u16 stickPressed; // OffTriggered
|
||||
u16 stickDepressed; // OnTriggered
|
||||
};
|
||||
|
||||
struct UnkStruct_800DC5EC {
|
||||
/* 0x00 */ struct Controller *controllers; // gControllers ptr 800F6910
|
||||
/* 0x04 */ Camera *camera; // Player camera ptr
|
||||
/* 0x08 */ Player *player; // Player ptr 800F6990
|
||||
/* 0x0C */ s32 *unkC; // unk struct?
|
||||
/* 0x10 */ Vp viewport;
|
||||
/* 0x20 */ s32 pad[2];
|
||||
/* 0x28 */ s16 cameraHeight;
|
||||
/* 0x2A */ s16 unk;
|
||||
/* 0x2C */ s16 screenWidth;
|
||||
/* 0x2E */ s16 screenHeight;
|
||||
/* 0x30 */ s16 screenStartX;
|
||||
/* 0x32 */ s16 screenStartY;
|
||||
/* 0x34 */ s16 unk3C;
|
||||
/* 0x36 */ s16 playerDirection;
|
||||
/* 0x38 */ s16 pathCounter;
|
||||
/* 0x3A */ s16 unk42;
|
||||
/* 0x3C */ s32 pad2;
|
||||
}; // size = 0x40
|
||||
|
||||
// Camera path struct? Or something like that. For GP race won scene?
|
||||
struct UnkStruct_80287500 {
|
||||
Vec3f unk0; // xyz coordinates?
|
||||
f32 unkC;
|
||||
f32 unk10;
|
||||
f32 unk14; // rotation?
|
||||
s32 unk18;
|
||||
s32 unk1C;
|
||||
f32 unk20;
|
||||
f32 unk24;
|
||||
f32 unk28;
|
||||
f32 unk2C;
|
||||
f32 unk30;
|
||||
f32 unk34;
|
||||
s32 unk38;
|
||||
};
|
||||
|
||||
struct UnkStruct_800DDB40 {
|
||||
u32 unk0;
|
||||
u32 unk4;
|
||||
u32 unk8;
|
||||
u32 unkC;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
u32 unk20;
|
||||
u16 unk24;
|
||||
u16 unk26;
|
||||
};
|
||||
|
||||
struct UnkStruct_802B53C8 {
|
||||
f32 unk0;
|
||||
f32 unk4;
|
||||
f32 unk8;
|
||||
f32 unkC;
|
||||
};
|
||||
// end math util structs
|
||||
|
||||
struct UnkStruct_800DDB68 {
|
||||
s32 *D_800ED600; s32 *D_800ED608; s32 *D_800ED610; s32 *D_800ED618;
|
||||
s32 *D_800ED620; s32 *D_800ED628; s32 *D_800ED630; s32 *D_800ED638;
|
||||
};
|
||||
|
||||
#endif /* TYPES_H */
|
|
@ -1,6 +1,5 @@
|
|||
#include <actors.h>
|
||||
#include <main.h>
|
||||
#include <types.h>
|
||||
#include <code_800029B0.h>
|
||||
#include <defines.h>
|
||||
#include "collision.h"
|
||||
|
|
|
@ -37,8 +37,8 @@ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED
|
|||
if (render_set_position(spE0, 1) != 0) {
|
||||
|
||||
// Render the boat
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E730);
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_E058);
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_boat_dl);
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_railings_dl);
|
||||
|
||||
mtxf_rotate_x(spE0, boat->wheelRot);
|
||||
vec3f_set(sp120, 0, 16.0f, -255.0f);
|
||||
|
@ -47,7 +47,7 @@ void render_actor_paddle_boat(Camera *arg0, struct PaddleWheelBoat *boat, UNUSED
|
|||
if (render_set_position(sp60, 3) != 0) {
|
||||
// Render the paddle wheel
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_dl_FC28);
|
||||
gSPDisplayList(gDisplayListHead++, &d_course_dks_jungle_parkway_paddle_wheel_dl);
|
||||
gSPPopMatrix(gDisplayListHead++, G_MTX_MODELVIEW);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <defines.h>
|
||||
#include "camera.h"
|
||||
#include "math_util_2.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <ultra64.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#define SEQUENCE_PLAYERS 4
|
||||
#define SEQUENCE_CHANNELS 48
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define BUFFERS_H
|
||||
|
||||
#include <PR/ultratypes.h>
|
||||
#include "config.h"
|
||||
#include <mk64.h>
|
||||
#include "common_structs.h"
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "config.h"
|
||||
#include <mk64.h>
|
||||
#include "buffers.h"
|
||||
|
||||
ALIGNED8 union_D_802BFB80 D_802BFB80;
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
#ifndef RANDOM_H
|
||||
#define RANDOM_H
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
extern u16 gRandomSeed16;
|
||||
extern u8 randomSeedPadding[];
|
||||
|
||||
#endif // RANDOM_H
|
|
@ -3,6 +3,7 @@
|
|||
#include <common_structs.h>
|
||||
#include <defines.h>
|
||||
#include <libc/math.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "camera.h"
|
||||
#include "code_800029B0.h"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "code_800029B0.h"
|
||||
#include "types.h"
|
||||
#include "memory.h"
|
||||
#include "waypoints.h"
|
||||
#include "actors.h"
|
||||
|
|
|
@ -3,8 +3,29 @@
|
|||
|
||||
#include <macros.h>
|
||||
#include <ultra64.h>
|
||||
#include <types.h>
|
||||
#include <actor_types.h>
|
||||
#include "camera.h"
|
||||
|
||||
struct UnkStruct_800DC5EC {
|
||||
/* 0x00 */ struct Controller *controllers; // gControllers ptr 800F6910
|
||||
/* 0x04 */ Camera *camera; // Player camera ptr
|
||||
/* 0x08 */ Player *player; // Player ptr 800F6990
|
||||
/* 0x0C */ s32 *unkC; // unk struct?
|
||||
/* 0x10 */ Vp viewport;
|
||||
/* 0x20 */ s32 pad[2];
|
||||
/* 0x28 */ s16 cameraHeight;
|
||||
/* 0x2A */ s16 unk;
|
||||
/* 0x2C */ s16 screenWidth;
|
||||
/* 0x2E */ s16 screenHeight;
|
||||
/* 0x30 */ s16 screenStartX;
|
||||
/* 0x32 */ s16 screenStartY;
|
||||
/* 0x34 */ s16 unk3C;
|
||||
/* 0x36 */ s16 playerDirection;
|
||||
/* 0x38 */ s16 pathCounter;
|
||||
/* 0x3A */ s16 unk42;
|
||||
/* 0x3C */ s32 pad2;
|
||||
}; // size = 0x40
|
||||
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <mk64.h>
|
||||
#include "math_util.h"
|
||||
#include "code_80004740.h"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include "math_util.h"
|
||||
#include "common_structs.h"
|
||||
#include "player_controller.h"
|
||||
|
|
|
@ -6,13 +6,14 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "camera.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "main.h"
|
||||
#include "actors.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "racing/memory.h"
|
||||
#include <config.h>
|
||||
#include <defines.h>
|
||||
#include "math_util.h"
|
||||
#include "math_util_2.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <macros.h>
|
||||
#include <memory.h>
|
||||
#include <defines.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "code_800029B0.h"
|
||||
#include "code_80005FD0.h"
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <common_structs.h>
|
||||
#include <types.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "code_80086E70.h"
|
||||
#include "camera.h"
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
#ifndef CODE_80091440_H
|
||||
#define CODE_80091440_H
|
||||
|
||||
#include "ultra64.h"
|
||||
|
||||
void func_80091440(s8);
|
||||
void func_800914A0(void);
|
||||
void func_800914E0(void);
|
||||
|
||||
#endif // CODE_80091440_H
|
|
@ -1,9 +1,9 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <defines.h>
|
||||
#include <segments.h>
|
||||
#include <PR/ultratypes.h>
|
||||
#include <config.h>
|
||||
#include <sounds.h>
|
||||
#include "code_800029B0.h"
|
||||
#include "code_80091750.h"
|
||||
|
@ -7415,7 +7415,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) {
|
|||
s32 var_s1;
|
||||
char spA8[3];
|
||||
s32 var_s2;
|
||||
s32 temp_v0;
|
||||
UNUSED s32 temp_v0;
|
||||
UNUSED s32 stackPadding9;
|
||||
char sp98[3];
|
||||
struct_8018EE10_entry *var_v1;
|
||||
|
@ -7427,7 +7427,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) {
|
|||
case 0x17: /* switch 1 */
|
||||
case 0x18: /* switch 1 */
|
||||
for (stackPadding0 = 0; stackPadding0 < 4; stackPadding0++) {
|
||||
func_80092224(D_8018EDEC - 0x15, stackPadding0, 3);
|
||||
set_text_color_rainbow_if_selected(D_8018EDEC - 0x15, stackPadding0, 3);
|
||||
func_80093324(0x00000032, 0x55 + (0x23 * stackPadding0), D_800E7868[stackPadding0], 0, 0.9f, 1.0f);
|
||||
if (stackPadding0 == (D_8018EDEC - 0x15)) {
|
||||
spE0.column = 0x0032;
|
||||
|
@ -7444,7 +7444,7 @@ void func_800A1FB0(struct_8018D9E0_entry *arg0) {
|
|||
func_80093324(0x00000028, 0x55 + (0x14 * stackPadding0), D_800E7878[stackPadding0], 0, 1.0f, 1.0f);
|
||||
}
|
||||
for (stackPadding0 = 0; stackPadding0 < 2; stackPadding0++) {
|
||||
func_80092224(D_8018EDEC - 0x1E, stackPadding0, 1);
|
||||
set_text_color_rainbow_if_selected(D_8018EDEC - 0x1E, stackPadding0, 1);
|
||||
func_80093324(0x00000084, 0x96 + (0x19 * stackPadding0), D_800E7840[stackPadding0], 0, 1.0f, 1.0f);
|
||||
if (stackPadding0 == (D_8018EDEC - 0x1E)) {
|
||||
spE0.column = 0x0084;
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#define CODE_800AF9B0_H
|
||||
|
||||
#include "common_structs.h"
|
||||
#include <types.h>
|
||||
|
||||
/* Function Prototypes */
|
||||
void func_800AF9B0(void);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <config.h>
|
||||
#include <mk64.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
#ifndef CRASH_SCREEN_H
|
||||
#define CRASH_SCREEN_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
|
||||
extern u16 *pFramebuffer;
|
||||
|
||||
void crash_screen_set_framebuffer(u16*);
|
||||
|
||||
#endif // CRASH_SCREEN_H
|
|
@ -1,5 +1,4 @@
|
|||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <PR/ultratypes.h>
|
||||
#include <PR/gbi.h>
|
||||
#include "data_segment2.h"
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
|
||||
#include <actor_types.h>
|
||||
#include <common_structs.h>
|
||||
#include <config.h>
|
||||
#include <course.h>
|
||||
#include <course_offsets.h>
|
||||
#include <debug.h>
|
||||
|
@ -64,7 +63,6 @@
|
|||
#include <segments.h>
|
||||
#include <sounds.h>
|
||||
#include "buffers/trig_tables.h"
|
||||
#include <types.h>
|
||||
#include <ultra64.h>
|
||||
#include <vehicles.h>
|
||||
#include <waypoints.h>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <config.h>
|
||||
#include <mk64.h>
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include "../crash_screen.h"
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#ifndef CRASH_SCREEN_ENHANCEMENT_H
|
||||
#define CRASH_SCREEN_ENHANCEMENT_H
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
|
||||
|
@ -35,3 +38,5 @@ void crash_screen_draw(OSThread* thread);
|
|||
// }
|
||||
// gGlobalTimer++;
|
||||
// }
|
||||
|
||||
#endif // CRASH_SCREEN_ENHANCEMENT_H
|
|
@ -1,7 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <decode.h>
|
||||
#include <mk64.h>
|
||||
#include <defines.h>
|
||||
#include <sounds.h>
|
||||
#include "code_800029B0.h"
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <segments.h>
|
||||
#include <common_structs.h>
|
||||
#include "math_util.h"
|
||||
|
|
|
@ -3,18 +3,17 @@
|
|||
#include <defines.h>
|
||||
#include <debug.h>
|
||||
#include <PR/gu.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include <main.h>
|
||||
#include <segments.h>
|
||||
#include <code_800029B0.h>
|
||||
#include <types.h>
|
||||
#include "camera.h"
|
||||
#include "memory.h"
|
||||
#include "math_util.h"
|
||||
#include "code_80280000.h"
|
||||
#include "code_80281780.h"
|
||||
#include "skybox_and_splitscreen.h"
|
||||
#include <config.h>
|
||||
#include "code_80091750.h"
|
||||
#include "code_8006E9C0.h"
|
||||
#include "code_800029B0.h"
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <config.h>
|
||||
#include <segments.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "code_80281780.h"
|
||||
#include "types.h"
|
||||
#include "memory.h"
|
||||
#include "camera.h"
|
||||
#include "camera_junk.h"
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#include <types.h>
|
||||
#include <ultra64.h>
|
||||
#include <PR/gbi.h>
|
||||
|
||||
#include "courses/royal_raceway/course_displaylists.inc.h"
|
||||
|
||||
// Init RDP - RSP (Ceremony)
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include <macros.h>
|
||||
#include <PR/gu.h>
|
||||
#include <mk64.h>
|
||||
#include <types.h>
|
||||
#include <debug.h>
|
||||
#include <common_structs.h>
|
||||
#include "main.h"
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "types.h"
|
||||
#include "PR/gu.h"
|
||||
#include "main.h"
|
||||
#include "config.h"
|
||||
#include <mk64.h>
|
||||
|
||||
extern s16 D_800E43A8;
|
||||
extern Mtx D_0D008E98;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#include <PR/ucode.h>
|
||||
#include <macros.h>
|
||||
#include <decode.h>
|
||||
#include <types.h>
|
||||
#include <config.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "profiler.h"
|
||||
#include "main.h"
|
||||
#include "racing/memory.h"
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
// Message IDs
|
||||
#define MESG_SP_COMPLETE 100
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "render_player.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "defines.h"
|
||||
#include "camera.h"
|
||||
|
||||
#pragma intrinsic (sqrtf)
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef MATH_UTIL_2_H
|
||||
#define MATH_UTIL_2_H
|
||||
|
||||
#include "types.h"
|
||||
#include "common_structs.h"
|
||||
#include "camera.h"
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <common_structs.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "menus.h"
|
||||
#include "main.h"
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "PR/os.h"
|
||||
#include "common_structs.h"
|
||||
#include <types.h>
|
||||
#include <defines.h>
|
||||
|
||||
// D_8018EDEC is position on options screen?
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _ULTRA64_CONTROLLER_INTERNAL_H_
|
||||
#define _ULTRA64_CONTROLLER_INTERNAL_H_
|
||||
|
||||
#include <types.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include "types.h"
|
||||
#include "profiler.h"
|
||||
#include "config.h"
|
||||
#include <mk64.h>
|
||||
#include "main.h"
|
||||
|
||||
struct ProfilerFrameData gProfilerFrameData[2];
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef PROFILER_H
|
||||
#define PROFILER_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
extern u64 osClockRate;
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <PR/os.h>
|
||||
#include <mk64.h>
|
||||
#include <sounds.h>
|
||||
#include <common_structs.h>
|
||||
#include <actor_types.h>
|
||||
#include <defines.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <types.h>
|
||||
|
||||
#include "code_800029B0.h"
|
||||
#include "main.h"
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
#ifndef ACTORS_H
|
||||
#define ACTORS_H
|
||||
|
||||
#include "types.h"
|
||||
#include "actor_types.h"
|
||||
#include "code_800029B0.h"
|
||||
#include "camera.h"
|
||||
|
||||
#define END_OF_SPAWN_DATA -0x8000
|
||||
|
||||
|
|
|
@ -421,8 +421,10 @@ void func_802B5D30(s16 arg0, s16 arg1, s32 arg2) {
|
|||
func_802B5D64(0x9000000, arg0, arg1, arg2);
|
||||
}
|
||||
|
||||
void func_802B5D64(uintptr_t arg0, s16 arg1, s16 arg2, s32 arg3) {
|
||||
UNUSED s32 pad[3];
|
||||
void func_802B5D64(uintptr_t addr, s16 arg1, s16 arg2, s32 arg3) {
|
||||
u32 segment = SEGMENT_NUMBER2(addr);
|
||||
u32 offset = SEGMENT_OFFSET(addr);
|
||||
UNUSED s32 pad;
|
||||
f32 sp48;
|
||||
f32 sp44;
|
||||
f32 sp40;
|
||||
|
@ -432,7 +434,7 @@ void func_802B5D64(uintptr_t arg0, s16 arg1, s16 arg2, s32 arg3) {
|
|||
s8 sp2C[3];
|
||||
Lights1 *var_s0;
|
||||
|
||||
var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[arg0 >> 0x18] + (arg0 & 0xFFFFFF));
|
||||
var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
|
||||
sp48 = sins(arg2);
|
||||
sp44 = coss(arg2);
|
||||
sp40 = sins(arg1);
|
||||
|
@ -1151,15 +1153,17 @@ f32 is_within_render_distance(Vec3f cameraPos, Vec3f objectPos, u16 orientationY
|
|||
|
||||
// No idea if arg1 is actually a Mat4 or not, but since this function is unused
|
||||
// its impossible to know with certainty either way, very close of func_802B5D64
|
||||
UNUSED void func_802B8414(uintptr_t arg0, Mat4 arg1, s16 arg2, s16 arg3, s32 arg4) {
|
||||
UNUSED s32 pad[3];
|
||||
UNUSED void func_802B8414(uintptr_t addr, Mat4 arg1, s16 arg2, s16 arg3, s32 arg4) {
|
||||
u32 segment = SEGMENT_NUMBER2(addr);
|
||||
u32 offset = SEGMENT_OFFSET(addr);
|
||||
UNUSED s32 pad;
|
||||
Vec3f sp40;
|
||||
s8 sp3C[3];
|
||||
s32 var_v0;
|
||||
UNUSED s32 pad2[3];
|
||||
Lights1 *var_s0;
|
||||
|
||||
var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[arg0 >> 0x18] + (arg0 & 0xFFFFFF));
|
||||
var_s0 = (Lights1 *) VIRTUAL_TO_PHYSICAL2(gSegmentTable[segment] + offset);
|
||||
sins(arg3);
|
||||
coss(arg3);
|
||||
sins(arg2);
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include <PR/ultratypes.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
//#define sins(x) gSineTable[(u16) (x) >> 4]
|
||||
//#define coss(x) gCosineTable[(u16) (x) >> 4]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <PR/ultratypes.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <common_structs.h>
|
||||
#include <segments.h>
|
||||
#include <decode.h>
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef MEMORY_H
|
||||
#define MEMORY_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
struct MainPoolBlock {
|
||||
struct MainPoolBlock *prev;
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
#include <config.h>
|
||||
#include <defines.h>
|
||||
#include <sounds.h>
|
||||
#include "camera.h"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
#include <defines.h>
|
||||
#include <types.h>
|
||||
#include <course.h>
|
||||
|
||||
#include "render_courses.h"
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#ifndef RENDER_COURSES_H
|
||||
#define RENDER_COURSES_H
|
||||
|
||||
#include "code_800029B0.h"
|
||||
|
||||
void func_8029122C(struct UnkStruct_800DC5EC*, s32);
|
||||
s32 func_80290C20(Camera*);
|
||||
void parse_course_displaylists(uintptr_t);
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <types.h>
|
||||
#include <config.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "skybox_and_splitscreen.h"
|
||||
#include "code_800029B0.h"
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define SKYBOX_AND_SPLITSCREEN_H
|
||||
|
||||
#include <PR/gbi.h>
|
||||
#include "code_800029B0.h"
|
||||
|
||||
#define G_CLEAR_ALL_MODES 0xFFFFFFFF
|
||||
|
||||
|
|
|
@ -4,12 +4,13 @@
|
|||
**/
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <mk64.h>
|
||||
#include <PR/gbi.h>
|
||||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <common_structs.h>
|
||||
#include <actor_types.h>
|
||||
#include <config.h>
|
||||
#include "camera.h"
|
||||
#include "memory.h"
|
||||
#include "math_util.h"
|
||||
#include "math_util_2.h"
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
#include <defines.h>
|
||||
#include <types.h>
|
||||
#include "code_800029B0.h"
|
||||
#include "camera.h"
|
||||
#include "math_util.h"
|
||||
#include "math_util_2.h"
|
||||
#include "main.h"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#ifndef CODE_8001F980_H
|
||||
#define CODE_8001F980_H
|
||||
|
||||
#include "types.h"
|
||||
#include "common_structs.h"
|
||||
#include <common_structs.h>
|
||||
#include "buffers.h"
|
||||
#include "camera.h"
|
||||
|
||||
#define SOME_TEXTURE_POINTER_MATH 0x800
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "PR/os.h"
|
||||
#include "common_structs.h"
|
||||
#include <types.h>
|
||||
|
||||
/* define symbols */
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <defines.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "spawn_players.h"
|
||||
#include "code_800029B0.h"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include <ultra64.h>
|
||||
#include <macros.h>
|
||||
#include <types.h>
|
||||
#include <mk64.h>
|
||||
#include <common_structs.h>
|
||||
#include <defines.h>
|
||||
#include <decode.h>
|
||||
|
@ -12,6 +12,7 @@
|
|||
#include "code_8006E9C0.h"
|
||||
#include "code_80091750.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "kart_dma.h"
|
||||
|
||||
extern s32 mio0encode(s32 input, s32, s32);
|
||||
extern s32 func_80040174(void *, s32, s32);
|
||||
|
@ -61,8 +62,6 @@ s32 D_80162E00;
|
|||
u32 *D_800DC710 = (u32 *) &D_802BFB80.arraySize8[0][2][3];
|
||||
u32 *D_800DC714 = (u32 *) &D_802BFB80.arraySize8[1][1][3];
|
||||
|
||||
extern u8 _kart_texturesSegmentRomStart;
|
||||
|
||||
extern s32 gLapCountByPlayerId[];
|
||||
|
||||
extern StaffGhost *d_mario_raceway_staff_ghost;
|
||||
|
@ -72,7 +71,7 @@ extern StaffGhost *d_luigi_raceway_staff_ghost;
|
|||
void func_80004EF0(void) {
|
||||
D_80162DA4 = (u32 *) &D_802BFB80.arraySize8[0][2][3];
|
||||
osInvalDCache(&D_80162DA4[0], 0x4000);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, (uintptr_t) ((D_80162DC4 & 0xFFFFFF) + &_kart_texturesSegmentRomStart), D_80162DA4, 0x4000, &gDmaMesgQueue);
|
||||
osPiStartDma(&gDmaIoMesg, 0, 0, (uintptr_t) &_kart_texturesSegmentRomStart[SEGMENT_OFFSET(D_80162DC4)], D_80162DA4, 0x4000, &gDmaMesgQueue);
|
||||
osRecvMesg(&gDmaMesgQueue, &gMainReceivedMesg, OS_MESG_BLOCK);
|
||||
D_80162D9C = (*D_80162DA4 & 0xFF0000);
|
||||
D_80162DA0 = 0;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "PR/os.h"
|
||||
#include "common_structs.h"
|
||||
#include <types.h>
|
||||
|
||||
void func_80005B18(void);
|
||||
void func_80004EF0(void);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include <macros.h>
|
||||
#include <defines.h>
|
||||
#include <decode.h>
|
||||
#include <mk64.h>
|
||||
|
||||
#include "update_objects.h"
|
||||
#include "main.h"
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
code:
|
||||
- '#include <assets/ceremony_data.h>'
|
||||
header:
|
||||
- '#include <types.h>'
|
||||
- '#include <ultra64.h>'
|
||||
- '#include <common_structs.h>'
|
||||
- '#include <waypoints.h>'
|
||||
|
||||
silver_trophy_dl:
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
offset: 0x128520
|
||||
header:
|
||||
code:
|
||||
- '#include <types.h>'
|
||||
- '#include <ultra64.h>'
|
||||
- '#include <common_structs.h>'
|
||||
- '#include <PR/gbi.h>'
|
||||
- '#include "courses/royal_raceway/course_displaylists.inc.h"'
|
||||
D_80284EE0:
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
- '#include <assets/common_data.h>'
|
||||
header:
|
||||
- '#include <PR/gbi.h>'
|
||||
- '#include <types.h>'
|
||||
- '#include <ultra64.h>'
|
||||
- '#include <common_structs.h>'
|
||||
tables:
|
||||
common_grand_prix_human_item_curve:
|
||||
range: [0x8150, 0x840C]
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
header:
|
||||
code:
|
||||
- '#include <macros.h>'
|
||||
- '#include <types.h>'
|
||||
- '#include <ultra64.h>'
|
||||
- '#include <common_structs.h>'
|
||||
- '#include <PR/ultratypes.h>'
|
||||
- '#include <PR/gbi.h>'
|
||||
- '#include "data_segment2.h"'
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
code:
|
||||
- '#include <assets/startup_logo.h>'
|
||||
header:
|
||||
- '#include "types.h"'
|
||||
- '#include <ultra64.h>'
|
||||
- '#include <common_structs.h>'
|
||||
|
||||
dl1:
|
||||
symbol: startup_logo_dl
|
||||
|
|
Loading…
Reference in New Issue