Name ScreenContext, Refactor Course class to Track (#583)
* Rename Screen Contexts * typedef ScreenContext struct * Fix Compile * Rename Course.cpp to Track.cpp * Refactor Course to Track * A few renames * General Cleanup * More Rename * More names * Move TrackSections struct to Track.h --------- Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
This commit is contained in:
parent
04ca19a975
commit
dbae0c3aca
|
|
@ -177,7 +177,7 @@ endif()
|
||||||
|
|
||||||
# Set game compilation version
|
# Set game compilation version
|
||||||
set(VERSION us)
|
set(VERSION us)
|
||||||
set(USE_NETWORKING ON)
|
set(USE_NETWORKING OFF)
|
||||||
set(SKIP_XCODE_VERSION_CHECK ON)
|
set(SKIP_XCODE_VERSION_CHECK ON)
|
||||||
|
|
||||||
# TODO: Sorry i broke this
|
# TODO: Sorry i broke this
|
||||||
|
|
@ -218,9 +218,8 @@ include_directories(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/buffers
|
${CMAKE_CURRENT_SOURCE_DIR}/src/buffers
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/audio
|
${CMAKE_CURRENT_SOURCE_DIR}/src/audio
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/debug
|
${CMAKE_CURRENT_SOURCE_DIR}/src/debug
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/networking
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/engine
|
${CMAKE_CURRENT_SOURCE_DIR}/src/engine
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/engine/courses
|
${CMAKE_CURRENT_SOURCE_DIR}/src/engine/tracks
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/engine/objects
|
${CMAKE_CURRENT_SOURCE_DIR}/src/engine/objects
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/engine/particles
|
${CMAKE_CURRENT_SOURCE_DIR}/src/engine/particles
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/enhancements
|
${CMAKE_CURRENT_SOURCE_DIR}/src/enhancements
|
||||||
|
|
@ -265,12 +264,10 @@ file(GLOB_RECURSE ALL_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
"assets/code/*.c"
|
"assets/code/*.c"
|
||||||
"courses/*.c"
|
"courses/*.c"
|
||||||
"courses/*.h"
|
"courses/*.h"
|
||||||
"src/networking/*.c"
|
|
||||||
"src/networking/*.h"
|
|
||||||
"src/engine/*.cpp"
|
"src/engine/*.cpp"
|
||||||
"src/engine/*.h"
|
"src/engine/*.h"
|
||||||
"src/engine/courses/*.c"
|
"src/engine/tracks/*.c"
|
||||||
"src/engine/courses/*.h"
|
"src/engine/tracks/*.h"
|
||||||
"src/engine/objects/*.cpp"
|
"src/engine/objects/*.cpp"
|
||||||
"src/engine/objects/*.h"
|
"src/engine/objects/*.h"
|
||||||
"src/engine/particles/*.cpp"
|
"src/engine/particles/*.cpp"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define ALL_COURSE_PACKED_H
|
#define ALL_COURSE_PACKED_H
|
||||||
|
|
||||||
/** WARNING!!!
|
/** WARNING!!!
|
||||||
* Each course #defines a token that looks like `d_course_<course_name_here>_packed_end`.
|
* Each track #defines a token that looks like `d_course_<course_name_here>_packed_end`.
|
||||||
* These macros only work if the the last Gfx array in each packed.inc.c file has its length hardcoded
|
* These macros only work if the the last Gfx array in each packed.inc.c file has its length hardcoded
|
||||||
* in the accompanying header file. If that array is resized or moved the #defines will become
|
* in the accompanying header file. If that array is resized or moved the #defines will become
|
||||||
* incorrect
|
* incorrect
|
||||||
|
|
|
||||||
|
|
@ -1,308 +0,0 @@
|
||||||
#include <libultraship.h>
|
|
||||||
#include <macros.h>
|
|
||||||
#include "courseTable.h"
|
|
||||||
#include "all_course_model.h"
|
|
||||||
#include "all_course_packed.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
struct CourseTable gCourseTable[] = { {
|
|
||||||
_course_mario_raceway_dl_mio0SegmentRomStart,
|
|
||||||
_course_mario_raceway_dl_mio0SegmentRomEnd,
|
|
||||||
_mario_raceway_vertexSegmentRomStart,
|
|
||||||
_mario_raceway_vertexSegmentRomEnd,
|
|
||||||
_course_mario_raceway_offsetsSegmentRomStart,
|
|
||||||
_course_mario_raceway_offsetsSegmentRomEnd,
|
|
||||||
d_course_mario_raceway_vertex,
|
|
||||||
d_course_mario_raceway_vertex_count,
|
|
||||||
d_course_mario_raceway_packed,
|
|
||||||
d_course_mario_raceway_packed_end,
|
|
||||||
mario_raceway_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_choco_mountain_dl_mio0SegmentRomStart,
|
|
||||||
_course_choco_mountain_dl_mio0SegmentRomEnd,
|
|
||||||
_choco_mountain_vertexSegmentRomStart,
|
|
||||||
_choco_mountain_vertexSegmentRomEnd,
|
|
||||||
_course_choco_mountain_offsetsSegmentRomStart,
|
|
||||||
_course_choco_mountain_offsetsSegmentRomEnd,
|
|
||||||
d_course_choco_mountain_vertex,
|
|
||||||
d_course_choco_mountain_vertex_count,
|
|
||||||
d_course_choco_mountain_packed,
|
|
||||||
d_course_choco_mountain_packed_end,
|
|
||||||
choco_mountain_textures,
|
|
||||||
1,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_bowsers_castle_dl_mio0SegmentRomStart,
|
|
||||||
_course_bowsers_castle_dl_mio0SegmentRomEnd,
|
|
||||||
_bowsers_castle_vertexSegmentRomStart,
|
|
||||||
_bowsers_castle_vertexSegmentRomEnd,
|
|
||||||
_course_bowsers_castle_offsetsSegmentRomStart,
|
|
||||||
_course_bowsers_castle_offsetsSegmentRomEnd,
|
|
||||||
d_course_bowsers_castle_vertex,
|
|
||||||
d_course_bowsers_castle_vertex_count,
|
|
||||||
d_course_bowsers_castle_packed,
|
|
||||||
d_course_bowsers_castle_packed_end,
|
|
||||||
bowsers_castle_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_banshee_boardwalk_dl_mio0SegmentRomStart,
|
|
||||||
_course_banshee_boardwalk_dl_mio0SegmentRomEnd,
|
|
||||||
_banshee_boardwalk_vertexSegmentRomStart,
|
|
||||||
_banshee_boardwalk_vertexSegmentRomEnd,
|
|
||||||
_course_banshee_boardwalk_offsetsSegmentRomStart,
|
|
||||||
_course_banshee_boardwalk_offsetsSegmentRomEnd,
|
|
||||||
d_course_banshee_boardwalk_vertex,
|
|
||||||
d_course_banshee_boardwalk_vertex_count,
|
|
||||||
d_course_banshee_boardwalk_packed,
|
|
||||||
d_course_banshee_boardwalk_packed_end,
|
|
||||||
banshee_boardwalk_textures,
|
|
||||||
1,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_yoshi_valley_dl_mio0SegmentRomStart,
|
|
||||||
_course_yoshi_valley_dl_mio0SegmentRomEnd,
|
|
||||||
_yoshi_valley_vertexSegmentRomStart,
|
|
||||||
_yoshi_valley_vertexSegmentRomEnd,
|
|
||||||
_course_yoshi_valley_offsetsSegmentRomStart,
|
|
||||||
_course_yoshi_valley_offsetsSegmentRomEnd,
|
|
||||||
d_course_yoshi_valley_vertex,
|
|
||||||
d_course_yoshi_valley_vertex_count,
|
|
||||||
d_course_yoshi_valley_packed,
|
|
||||||
d_course_yoshi_valley_packed_end,
|
|
||||||
yoshi_valley_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_frappe_snowland_dl_mio0SegmentRomStart,
|
|
||||||
_course_frappe_snowland_dl_mio0SegmentRomEnd,
|
|
||||||
_frappe_snowland_vertexSegmentRomStart,
|
|
||||||
_frappe_snowland_vertexSegmentRomEnd,
|
|
||||||
_course_frappe_snowland_offsetsSegmentRomStart,
|
|
||||||
_course_frappe_snowland_offsetsSegmentRomEnd,
|
|
||||||
d_course_frappe_snowland_vertex,
|
|
||||||
d_course_frappe_snowland_vertex_count,
|
|
||||||
d_course_frappe_snowland_packed,
|
|
||||||
d_course_frappe_snowland_packed_end,
|
|
||||||
frappe_snowland_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_koopa_troopa_beach_dl_mio0SegmentRomStart,
|
|
||||||
_course_koopa_troopa_beach_dl_mio0SegmentRomEnd,
|
|
||||||
_koopa_troopa_beach_vertexSegmentRomStart,
|
|
||||||
_koopa_troopa_beach_vertexSegmentRomEnd,
|
|
||||||
_course_koopa_troopa_beach_offsetsSegmentRomStart,
|
|
||||||
_course_koopa_troopa_beach_offsetsSegmentRomEnd,
|
|
||||||
d_course_koopa_troopa_beach_vertex,
|
|
||||||
d_course_koopa_troopa_beach_vertex_count,
|
|
||||||
d_course_koopa_troopa_beach_packed,
|
|
||||||
d_course_koopa_troopa_beach_packed_end,
|
|
||||||
koopa_troopa_beach_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_royal_raceway_dl_mio0SegmentRomStart,
|
|
||||||
_course_royal_raceway_dl_mio0SegmentRomEnd,
|
|
||||||
_royal_raceway_vertexSegmentRomStart,
|
|
||||||
_royal_raceway_vertexSegmentRomEnd,
|
|
||||||
_course_royal_raceway_offsetsSegmentRomStart,
|
|
||||||
_course_royal_raceway_offsetsSegmentRomEnd,
|
|
||||||
d_course_royal_raceway_vertex,
|
|
||||||
d_course_royal_raceway_vertex_count,
|
|
||||||
d_course_royal_raceway_packed,
|
|
||||||
d_course_royal_raceway_packed_end,
|
|
||||||
royal_raceway_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_luigi_raceway_dl_mio0SegmentRomStart,
|
|
||||||
_course_luigi_raceway_dl_mio0SegmentRomEnd,
|
|
||||||
_luigi_raceway_vertexSegmentRomStart,
|
|
||||||
_luigi_raceway_vertexSegmentRomEnd,
|
|
||||||
_course_luigi_raceway_offsetsSegmentRomStart,
|
|
||||||
_course_luigi_raceway_offsetsSegmentRomEnd,
|
|
||||||
d_course_luigi_raceway_vertex,
|
|
||||||
d_course_luigi_raceway_vertex_count,
|
|
||||||
d_course_luigi_raceway_packed,
|
|
||||||
d_course_luigi_raceway_packed_end,
|
|
||||||
luigi_raceway_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_moo_moo_farm_dl_mio0SegmentRomStart,
|
|
||||||
_course_moo_moo_farm_dl_mio0SegmentRomEnd,
|
|
||||||
_moo_moo_farm_vertexSegmentRomStart,
|
|
||||||
_moo_moo_farm_vertexSegmentRomEnd,
|
|
||||||
_course_moo_moo_farm_offsetsSegmentRomStart,
|
|
||||||
_course_moo_moo_farm_offsetsSegmentRomEnd,
|
|
||||||
d_course_moo_moo_farm_vertex,
|
|
||||||
d_course_moo_moo_farm_vertex_count,
|
|
||||||
d_course_moo_moo_farm_packed,
|
|
||||||
d_course_moo_moo_farm_packed_end,
|
|
||||||
moo_moo_farm_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_toads_turnpike_dl_mio0SegmentRomStart,
|
|
||||||
_course_toads_turnpike_dl_mio0SegmentRomEnd,
|
|
||||||
_toads_turnpike_vertexSegmentRomStart,
|
|
||||||
_toads_turnpike_vertexSegmentRomEnd,
|
|
||||||
_course_toads_turnpike_offsetsSegmentRomStart,
|
|
||||||
_course_toads_turnpike_offsetsSegmentRomEnd,
|
|
||||||
d_course_toads_turnpike_vertex,
|
|
||||||
d_course_toads_turnpike_vertex_count,
|
|
||||||
d_course_toads_turnpike_packed,
|
|
||||||
d_course_toads_turnpike_packed_end,
|
|
||||||
toads_turnpike_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_kalimari_desert_dl_mio0SegmentRomStart,
|
|
||||||
_course_kalimari_desert_dl_mio0SegmentRomEnd,
|
|
||||||
_kalimari_desert_vertexSegmentRomStart,
|
|
||||||
_kalimari_desert_vertexSegmentRomEnd,
|
|
||||||
_course_kalimari_desert_offsetsSegmentRomStart,
|
|
||||||
_course_kalimari_desert_offsetsSegmentRomEnd,
|
|
||||||
d_course_kalimari_desert_vertex,
|
|
||||||
d_course_kalimari_desert_vertex_count,
|
|
||||||
d_course_kalimari_desert_packed,
|
|
||||||
d_course_kalimari_desert_packed_end,
|
|
||||||
kalimari_desert_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_sherbet_land_dl_mio0SegmentRomStart,
|
|
||||||
_course_sherbet_land_dl_mio0SegmentRomEnd,
|
|
||||||
_sherbet_land_vertexSegmentRomStart,
|
|
||||||
_sherbet_land_vertexSegmentRomEnd,
|
|
||||||
_course_sherbet_land_offsetsSegmentRomStart,
|
|
||||||
_course_sherbet_land_offsetsSegmentRomEnd,
|
|
||||||
d_course_sherbet_land_vertex,
|
|
||||||
d_course_sherbet_land_vertex_count,
|
|
||||||
d_course_sherbet_land_packed,
|
|
||||||
d_course_sherbet_land_packed_end,
|
|
||||||
sherbet_land_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_rainbow_road_dl_mio0SegmentRomStart,
|
|
||||||
_course_rainbow_road_dl_mio0SegmentRomEnd,
|
|
||||||
_rainbow_road_vertexSegmentRomStart,
|
|
||||||
_rainbow_road_vertexSegmentRomEnd,
|
|
||||||
_course_rainbow_road_offsetsSegmentRomStart,
|
|
||||||
_course_rainbow_road_offsetsSegmentRomEnd,
|
|
||||||
d_course_rainbow_road_vertex,
|
|
||||||
d_course_rainbow_road_vertex_count,
|
|
||||||
d_course_rainbow_road_packed,
|
|
||||||
d_course_rainbow_road_packed_end,
|
|
||||||
rainbow_road_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_wario_stadium_dl_mio0SegmentRomStart,
|
|
||||||
_course_wario_stadium_dl_mio0SegmentRomEnd,
|
|
||||||
_wario_stadium_vertexSegmentRomStart,
|
|
||||||
_wario_stadium_vertexSegmentRomEnd,
|
|
||||||
_course_wario_stadium_offsetsSegmentRomStart,
|
|
||||||
_course_wario_stadium_offsetsSegmentRomEnd,
|
|
||||||
d_course_wario_stadium_vertex,
|
|
||||||
d_course_wario_stadium_vertex_count,
|
|
||||||
d_course_wario_stadium_packed,
|
|
||||||
d_course_wario_stadium_packed_end,
|
|
||||||
wario_stadium_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_block_fort_dl_mio0SegmentRomStart,
|
|
||||||
_course_block_fort_dl_mio0SegmentRomEnd,
|
|
||||||
_block_fort_vertexSegmentRomStart,
|
|
||||||
_block_fort_vertexSegmentRomEnd,
|
|
||||||
_course_block_fort_offsetsSegmentRomStart,
|
|
||||||
_course_block_fort_offsetsSegmentRomEnd,
|
|
||||||
d_course_block_fort_vertex,
|
|
||||||
d_course_block_fort_vertex_count,
|
|
||||||
d_course_block_fort_packed,
|
|
||||||
d_course_block_fort_packed_end,
|
|
||||||
block_fort_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_skyscraper_dl_mio0SegmentRomStart,
|
|
||||||
_course_skyscraper_dl_mio0SegmentRomEnd,
|
|
||||||
_skyscraper_vertexSegmentRomStart,
|
|
||||||
_skyscraper_vertexSegmentRomEnd,
|
|
||||||
_course_skyscraper_offsetsSegmentRomStart,
|
|
||||||
_course_skyscraper_offsetsSegmentRomEnd,
|
|
||||||
d_course_skyscraper_vertex,
|
|
||||||
d_course_skyscraper_vertex_count,
|
|
||||||
d_course_skyscraper_packed,
|
|
||||||
d_course_skyscraper_packed_end,
|
|
||||||
skyscraper_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_double_deck_dl_mio0SegmentRomStart,
|
|
||||||
_course_double_deck_dl_mio0SegmentRomEnd,
|
|
||||||
_double_deck_vertexSegmentRomStart,
|
|
||||||
_double_deck_vertexSegmentRomEnd,
|
|
||||||
_course_double_deck_offsetsSegmentRomStart,
|
|
||||||
_course_double_deck_offsetsSegmentRomEnd,
|
|
||||||
d_course_double_deck_vertex,
|
|
||||||
d_course_double_deck_vertex_count,
|
|
||||||
d_course_double_deck_packed,
|
|
||||||
d_course_double_deck_packed_end,
|
|
||||||
double_deck_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_dks_jungle_parkway_dl_mio0SegmentRomStart,
|
|
||||||
_course_dks_jungle_parkway_dl_mio0SegmentRomEnd,
|
|
||||||
_dks_jungle_parkway_vertexSegmentRomStart,
|
|
||||||
_dks_jungle_parkway_vertexSegmentRomEnd,
|
|
||||||
_course_dks_jungle_parkway_offsetsSegmentRomStart,
|
|
||||||
_course_dks_jungle_parkway_offsetsSegmentRomEnd,
|
|
||||||
d_course_dks_jungle_parkway_vertex,
|
|
||||||
d_course_dks_jungle_parkway_vertex_count,
|
|
||||||
d_course_dks_jungle_parkway_packed,
|
|
||||||
d_course_dks_jungle_parkway_packed_end,
|
|
||||||
dks_jungle_parkway_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
_course_big_donut_dl_mio0SegmentRomStart,
|
|
||||||
_course_big_donut_dl_mio0SegmentRomEnd,
|
|
||||||
_big_donut_vertexSegmentRomStart,
|
|
||||||
_big_donut_vertexSegmentRomEnd,
|
|
||||||
_course_big_donut_offsetsSegmentRomStart,
|
|
||||||
_course_big_donut_offsetsSegmentRomEnd,
|
|
||||||
d_course_big_donut_vertex,
|
|
||||||
d_course_big_donut_vertex_count,
|
|
||||||
d_course_big_donut_packed,
|
|
||||||
d_course_big_donut_packed_end,
|
|
||||||
big_donut_textures,
|
|
||||||
0,
|
|
||||||
0x0000,
|
|
||||||
} };
|
|
||||||
*/
|
|
||||||
|
|
@ -1,188 +0,0 @@
|
||||||
#ifndef COURSE_TABLE_H
|
|
||||||
#define COURSE_TABLE_H
|
|
||||||
|
|
||||||
#include <libultraship.h>
|
|
||||||
#include <macros.h>
|
|
||||||
#include <common_structs.h>
|
|
||||||
|
|
||||||
// dlRomStart, vertexRomStart, & vertexStart, are u8* because mio0 compressed.
|
|
||||||
struct CourseTable {
|
|
||||||
u8* dlRomStart; // 0x00 ROM start for segment 6 DL data
|
|
||||||
u8* dlRomEnd; // 0x04 ROM end for segment 6 DL data
|
|
||||||
u8* vertexRomStart; // 0x08 ROM start for segment 4 vertex data
|
|
||||||
u8* vertexRomEnd; // 0x0C ROM end for segment 7?
|
|
||||||
u8* offsetRomStart; // 0x10 ROM start for uncompressed segment 9 texture and DL addresses
|
|
||||||
u8* offsetRomEnd; // 0x14 ROM end for uncompressed segment 9 texture and DL addresses
|
|
||||||
CourseVtx* vertexStart; // 0x18 segmented address of vertex data
|
|
||||||
u32 vertexCount; // 0x1C number of vertices in vertex data
|
|
||||||
u8* packedStart; // 0x20 packed display list start address
|
|
||||||
u8* finalDisplaylistOffset; // 0x24
|
|
||||||
u32* textures; // 0x20 segmented address of textures table
|
|
||||||
u16 unknown1; // 0x2C
|
|
||||||
u16 padding; // 0x2E
|
|
||||||
};
|
|
||||||
|
|
||||||
extern struct CourseTable gCourseTable[];
|
|
||||||
|
|
||||||
//! @todo These should probably be ptr's instead of array's?
|
|
||||||
extern u8 _course_mario_raceway_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_mario_raceway_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _mario_raceway_vertexSegmentRomStart[];
|
|
||||||
extern u8 _mario_raceway_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_mario_raceway_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_mario_raceway_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_mario_raceway_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_choco_mountain_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_choco_mountain_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _choco_mountain_vertexSegmentRomStart[];
|
|
||||||
extern u8 _choco_mountain_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_choco_mountain_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_choco_mountain_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_choco_mountain_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_bowsers_castle_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_bowsers_castle_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _bowsers_castle_vertexSegmentRomStart[];
|
|
||||||
extern u8 _bowsers_castle_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_bowsers_castle_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_bowsers_castle_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_bowsers_castle_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_banshee_boardwalk_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_banshee_boardwalk_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _banshee_boardwalk_vertexSegmentRomStart[];
|
|
||||||
extern u8 _banshee_boardwalk_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_banshee_boardwalk_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_banshee_boardwalk_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_banshee_boardwalk_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_yoshi_valley_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_yoshi_valley_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _yoshi_valley_vertexSegmentRomStart[];
|
|
||||||
extern u8 _yoshi_valley_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_yoshi_valley_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_yoshi_valley_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_yoshi_valley_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_frappe_snowland_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_frappe_snowland_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _frappe_snowland_vertexSegmentRomStart[];
|
|
||||||
extern u8 _frappe_snowland_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_frappe_snowland_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_frappe_snowland_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_frappe_snowland_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_koopa_troopa_beach_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_koopa_troopa_beach_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _koopa_troopa_beach_vertexSegmentRomStart[];
|
|
||||||
extern u8 _koopa_troopa_beach_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_koopa_troopa_beach_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_koopa_troopa_beach_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_koopa_troopa_beach_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_royal_raceway_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_royal_raceway_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _royal_raceway_vertexSegmentRomStart[];
|
|
||||||
extern u8 _royal_raceway_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_royal_raceway_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_royal_raceway_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_royal_raceway_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_luigi_raceway_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_luigi_raceway_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _luigi_raceway_vertexSegmentRomStart[];
|
|
||||||
extern u8 _luigi_raceway_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_luigi_raceway_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_luigi_raceway_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_luigi_raceway_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_moo_moo_farm_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_moo_moo_farm_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _moo_moo_farm_vertexSegmentRomStart[];
|
|
||||||
extern u8 _moo_moo_farm_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_moo_moo_farm_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_moo_moo_farm_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_moo_moo_farm_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_toads_turnpike_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_toads_turnpike_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _toads_turnpike_vertexSegmentRomStart[];
|
|
||||||
extern u8 _toads_turnpike_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_toads_turnpike_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_toads_turnpike_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_toads_turnpike_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_kalimari_desert_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_kalimari_desert_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _kalimari_desert_vertexSegmentRomStart[];
|
|
||||||
extern u8 _kalimari_desert_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_kalimari_desert_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_kalimari_desert_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_kalimari_desert_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_sherbet_land_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_sherbet_land_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _sherbet_land_vertexSegmentRomStart[];
|
|
||||||
extern u8 _sherbet_land_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_sherbet_land_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_sherbet_land_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_sherbet_land_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_rainbow_road_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_rainbow_road_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _rainbow_road_vertexSegmentRomStart[];
|
|
||||||
extern u8 _rainbow_road_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_rainbow_road_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_rainbow_road_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_rainbow_road_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_wario_stadium_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_wario_stadium_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _wario_stadium_vertexSegmentRomStart[];
|
|
||||||
extern u8 _wario_stadium_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_wario_stadium_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_wario_stadium_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_wario_stadium_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_block_fort_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_block_fort_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _block_fort_vertexSegmentRomStart[];
|
|
||||||
extern u8 _block_fort_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_block_fort_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_block_fort_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_block_fort_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_skyscraper_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_skyscraper_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _skyscraper_vertexSegmentRomStart[];
|
|
||||||
extern u8 _skyscraper_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_skyscraper_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_skyscraper_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_skyscraper_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_double_deck_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_double_deck_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _double_deck_vertexSegmentRomStart[];
|
|
||||||
extern u8 _double_deck_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_double_deck_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_double_deck_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_double_deck_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_dks_jungle_parkway_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_dks_jungle_parkway_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _dks_jungle_parkway_vertexSegmentRomStart[];
|
|
||||||
extern u8 _dks_jungle_parkway_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_dks_jungle_parkway_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_dks_jungle_parkway_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_dks_jungle_parkway_packed[];
|
|
||||||
|
|
||||||
extern u8 _course_big_donut_dl_mio0SegmentRomStart[];
|
|
||||||
extern u8 _course_big_donut_dl_mio0SegmentRomEnd[];
|
|
||||||
extern u8 _big_donut_vertexSegmentRomStart[];
|
|
||||||
extern u8 _big_donut_vertexSegmentRomEnd[];
|
|
||||||
extern u8 _course_big_donut_offsetsSegmentRomStart[];
|
|
||||||
extern u8 _course_big_donut_offsetsSegmentRomEnd[];
|
|
||||||
extern u8 d_course_big_donut_packed[];
|
|
||||||
|
|
||||||
#endif // COURSE_TABLE_H
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include "waypoints.h"
|
#include "waypoints.h"
|
||||||
#include "course.h"
|
|
||||||
#include <libultra/gbi.h>
|
#include <libultra/gbi.h>
|
||||||
|
#include "src/engine/tracks/Track.h"
|
||||||
|
|
||||||
extern Gfx mario_Plane_001_mesh[];
|
extern Gfx mario_Plane_001_mesh[];
|
||||||
|
|
||||||
|
|
@ -11,7 +11,7 @@ Gfx test_course_data_dl[] = {
|
||||||
gsSPDisplayList(mario_Plane_001_mesh),
|
gsSPDisplayList(mario_Plane_001_mesh),
|
||||||
};
|
};
|
||||||
|
|
||||||
TrackPathPoint test_course_path[] = {
|
TrackPathPoint test_track_path[] = {
|
||||||
{ 0, 0, 0, 0 },
|
{ 0, 0, 0, 0 },
|
||||||
{ 0, 0, -100, 1 },
|
{ 0, 0, -100, 1 },
|
||||||
{ 0, 0, -200, 1 },
|
{ 0, 0, -200, 1 },
|
||||||
|
|
@ -68,7 +68,7 @@ TrackPathPoint test_course_path[] = {
|
||||||
{ -32768, -32768, -32768, 0 } // Terminator
|
{ -32768, -32768, -32768, 0 } // Terminator
|
||||||
};
|
};
|
||||||
|
|
||||||
TrackSections test_course_addr[] = {
|
TrackSections test_track_addr[] = {
|
||||||
{ mario_Plane_001_mesh, 255, 255, 0x0000 },
|
{ mario_Plane_001_mesh, 255, 255, 0x0000 },
|
||||||
{ 0x00000000, 0, 0, 0x00000 },
|
{ 0x00000000, 0, 0, 0x00000 },
|
||||||
};
|
};
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
@page actorsmenu Actors
|
@page actorsmenu Actors
|
||||||
|
|
||||||
Actors are dynamic game objects usually subject to game physics such as gravity, force, and collision. They might move around the map, spin, or interactive in some manner. Alternatively, static game objects cannot move and cannot be interacted with. They can use collision but not physics. A course model and Mario Raceway's Pipe are examples of static objects. Any of the items or player karts are examples of dynamic game objects; actors.
|
Actors are dynamic game objects usually subject to game physics such as gravity, force, and collision. They might move around the map, spin, or interactive in some manner. Alternatively, static game objects cannot move and cannot be interacted with. They can use collision but not physics. A track model and Mario Raceway's Pipe are examples of static objects. Any of the items or player karts are examples of dynamic game objects; actors.
|
||||||
|
|
||||||
mk64 contains two systems for implementing actors. They have been deemed as actors and objects, albeit an explicit or categorical difference between the two has yet to be determined. The running theory is that the systems were designed by different developers that were perhaps not communicating resulting in game objects being randomly distributed between the two.
|
mk64 contains two systems for implementing actors. They have been deemed as actors and objects, albeit an explicit or categorical difference between the two has yet to be determined. The running theory is that the systems were designed by different developers that were perhaps not communicating resulting in game objects being randomly distributed between the two.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
[TOC]
|
[TOC]
|
||||||
|
|
||||||
# Paradigm
|
# Paradigm
|
||||||
The developers wrote mk64 using a state-driven paradigm. Gamestate, gamemode, course, actors, structs, and more decide which branches code should follow. As an example, a condition can check the current course to load that courses resources or run logic based on that.
|
The developers wrote mk64 using a state-driven paradigm. Gamestate, gamemode, track, actors, structs, and more decide which branches code should follow. As an example, a condition can check the current track to load and then load that tracks resources or run logic based on that.
|
||||||
|
|
||||||
# Threading
|
# Threading
|
||||||
After boot, the game begins by setting up its four threads; [idle](@ref thread1_idle), [video](@ref thread3_video), [audio](@ref thread4_audio), and the [game loop](@ref thread5_game_loop).
|
After boot, the game begins by setting up its four threads; [idle](@ref thread1_idle), [video](@ref thread3_video), [audio](@ref thread4_audio), and the [game loop](@ref thread5_game_loop).
|
||||||
|
|
@ -94,13 +94,13 @@ Object related code resides in
|
||||||
|
|
||||||
Documentation of the specifics still in-progress. See [actors](actorsmenu.html) for more information.
|
Documentation of the specifics still in-progress. See [actors](actorsmenu.html) for more information.
|
||||||
|
|
||||||
## Courses
|
## Tracks
|
||||||
Course related code resides in
|
Track related code resides in
|
||||||
|file|desc|
|
|file|desc|
|
||||||
|---|---|
|
|---|---|
|
||||||
|[memory](@ref memory.c)| Loads and extracts course data|
|
|[memory](@ref memory.c)| Loads and extracts track data|
|
||||||
|[render_courses](@ref render_courses.c)|Renders course content|
|
|[render_courses](@ref render_courses.c)|Renders track content|
|
||||||
|[common_textures](@ref common_textures.c)|Content accessible to every course such as items and portraits|
|
|[common_textures](@ref common_textures.c)|Content accessible to every track such as items and portraits|
|
||||||
|
|
||||||
### Course Folder
|
### Course Folder
|
||||||
[course folder link][@ref courses]
|
[course folder link][@ref courses]
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ How courses work in mk64
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="pageheading">Courses</div>
|
<div class="pageheading">Courses</div>
|
||||||
<div class="pagedescription">
|
<div class="pagedescription">
|
||||||
<p>Some course related stuff</p>
|
<p>Some track related stuff</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ Example of correct texture format
|
||||||
|
|
||||||
**The Laws of SpaghettiKart**
|
**The Laws of SpaghettiKart**
|
||||||
* Track geography must be a plane, not a box
|
* Track geography must be a plane, not a box
|
||||||
* A flat course with a basic plane (square), needs to be turned into triangules and/or subdivided a few times, otherwise the collision generation will 'wig out', placing the racers incorrectly
|
* A flat track with a basic plane (square), needs to be turned into triangules and/or subdivided a few times, otherwise the collision generation will 'wig out', placing the racers incorrectly
|
||||||
* The starting line must face north
|
* The starting line must face north
|
||||||
* In Blender: Positive Green Y Axis
|
* In Blender: Positive Green Y Axis
|
||||||
* In game: Negative Z axis
|
* In game: Negative Z axis
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
## Battle Courses
|
## Battle Courses
|
||||||
|
|
||||||
|
|
||||||
| Battle Course Name | Audio Filename |
|
| Battle Track Name | Audio Filename |
|
||||||
| ------------------ | --------------- |
|
| ------------------ | --------------- |
|
||||||
| Big Donut | `battle_arenas` |
|
| Big Donut | `battle_arenas` |
|
||||||
| Block Fort | `block_fort` |
|
| Block Fort | `block_fort` |
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
Here is the table containing only the regular Mario Kart courses, from Banshee Boardwalk to Yoshi Valley:
|
Here is the table containing only the regular Mario Kart courses, from Banshee Boardwalk to Yoshi Valley:
|
||||||
|
|
||||||
| **Mario Kart 64 Course** | **Mario Kart DS** | **Mario Kart Wii** | **Mario Kart 7** | **Mario Kart 8 / Deluxe** | **Booster Course Pass** | **Mario Kart Tour** | **Mario Kart World** |
|
| **Mario Kart 64 Track** | **Mario Kart DS** | **Mario Kart Wii** | **Mario Kart 7** | **Mario Kart 8 / Deluxe** | **Booster Track Pass** | **Mario Kart Tour** | **Mario Kart World** |
|
||||||
| ------------------------ | ----------------- | ------------------ | ---------------- | ------------------------- | ----------------------- | ------------------- | -------------------- |
|
| ------------------------ | ----------------- | ------------------ | ---------------- | ------------------------- | ----------------------- | ------------------- | -------------------- |
|
||||||
| Banshee Boardwalk | ✓ | | | | | | |
|
| Banshee Boardwalk | ✓ | | | | | | |
|
||||||
| Bowser's Castle | | ✓ | | | | | |
|
| Bowser's Castle | | ✓ | | | | | |
|
||||||
|
|
@ -25,7 +25,7 @@ Here is the table containing only the regular Mario Kart courses, from Banshee B
|
||||||
|
|
||||||
## Battle Courses
|
## Battle Courses
|
||||||
|
|
||||||
| **Battle Course** | **Mario Kart DS** | **Mario Kart Wii** | **Mario Kart 7** | **Mario Kart 8 / Deluxe** | **Booster Course Pass** | **Mario Kart Tour** | **Mario Kart World** |
|
| **Battle Track** | **Mario Kart DS** | **Mario Kart Wii** | **Mario Kart 7** | **Mario Kart 8 / Deluxe** | **Booster Track Pass** | **Mario Kart Tour** | **Mario Kart World** |
|
||||||
| ----------------- | ----------------- | ------------------ | ---------------- | ------------------------- | ----------------------- | ------------------- | -------------------- |
|
| ----------------- | ----------------- | ------------------ | ---------------- | ------------------------- | ----------------------- | ------------------- | -------------------- |
|
||||||
| Big Donut | | | ✓ | | | | ✓ |
|
| Big Donut | | | ✓ | | | | ✓ |
|
||||||
| Block Fort | ✓ | | | | | | |
|
| Block Fort | ✓ | | | | | | |
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
\page boostramps Boost Ramps
|
\page boostramps Boost Ramps
|
||||||
# Boost Ramps
|
# Boost Ramps
|
||||||
|
|
||||||
Boost ramps use a surface-type and is part of the course geography.
|
Boost ramps use a surface-type and is part of the track geography.
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
@page paths Paths
|
@page paths Paths
|
||||||
The game uses multiple types of course paths
|
The game uses multiple types of track paths
|
||||||
|
|
||||||
# Course Paths
|
# Track Paths
|
||||||
Used by courses
|
Used by courses
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ typedef struct {
|
||||||
// Something related to time trial ghost data?
|
// Something related to time trial ghost data?
|
||||||
/* 0x00 */ s32 unk_00;
|
/* 0x00 */ s32 unk_00;
|
||||||
/* 0x04 */ u8 ghostDataSaved;
|
/* 0x04 */ u8 ghostDataSaved;
|
||||||
/* 0x05 */ s8 courseIndex;
|
/* 0x05 */ s8 trackIndex;
|
||||||
/* 0x06 */ u8 characterId;
|
/* 0x06 */ u8 characterId;
|
||||||
/* 0x07 */ u8 unk_07[0x3C];
|
/* 0x07 */ u8 unk_07[0x3C];
|
||||||
/* 0x43 */ u8 pad_43[0x7F - 0x43];
|
/* 0x43 */ u8 pad_43[0x7F - 0x43];
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
#ifndef COURSE_H
|
|
||||||
#define COURSE_H
|
|
||||||
|
|
||||||
#include <libultraship.h>
|
|
||||||
#include <libultra/gbi.h>
|
|
||||||
#include <macros.h>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @file Include for course gfx.inc.c.
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint64_t crc;
|
|
||||||
u8 surfaceType;
|
|
||||||
u8 sectionId;
|
|
||||||
u16 flags;
|
|
||||||
} TrackSections;
|
|
||||||
|
|
||||||
#endif // COURSE_H
|
|
||||||
|
|
@ -76,11 +76,11 @@
|
||||||
#define DEMO_MODE_INACTIVE 0
|
#define DEMO_MODE_INACTIVE 0
|
||||||
|
|
||||||
#ifdef VERSION_EU
|
#ifdef VERSION_EU
|
||||||
#define COURSE_TIMER_ITER 0.020041665999999999 // 1 / 50
|
#define TRACK_TIMER_ITER 0.020041665999999999 // 1 / 50
|
||||||
#define COURSE_TIMER_ITER_f 0.020041665999999999f // 1 / 50
|
#define TRACK_TIMER_ITER_f 0.020041665999999999f // 1 / 50
|
||||||
#else
|
#else
|
||||||
#define COURSE_TIMER_ITER 0.01666666 // 1 / 60
|
#define TRACK_TIMER_ITER 0.01666666 // 1 / 60
|
||||||
#define COURSE_TIMER_ITER_f 0.01666666f // 1 / 60
|
#define TRACK_TIMER_ITER_f 0.01666666f // 1 / 60
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define V_BlANK_TIMER_ITER 0.01666666
|
#define V_BlANK_TIMER_ITER 0.01666666
|
||||||
|
|
@ -182,7 +182,7 @@ enum { MUSHROOM_CUP, FLOWER_CUP, STAR_CUP, SPECIAL_CUP, BATTLE_CUP, NUM_CUPS };
|
||||||
/**
|
/**
|
||||||
* @brief Options for gCourseIndexInCup
|
* @brief Options for gCourseIndexInCup
|
||||||
*/
|
*/
|
||||||
enum { COURSE_ONE, COURSE_TWO, COURSE_THREE, COURSE_FOUR };
|
enum { TRACK_ONE, TRACK_TWO, TRACK_THREE, TRACK_FOUR };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Character IDs
|
* @brief Character IDs
|
||||||
|
|
@ -387,7 +387,7 @@ enum PLACE { FIRST_PLACE, SECOND_PLACE, THIRD_PLACE, FOURTH_PLACE };
|
||||||
#define UNKNOWN_EFFECT_0x10000 0x10000 //
|
#define UNKNOWN_EFFECT_0x10000 0x10000 //
|
||||||
#define BOOST_RAMP_ASPHALT_EFFECT 0x100000 // being boosted by a boost pad
|
#define BOOST_RAMP_ASPHALT_EFFECT 0x100000 // being boosted by a boost pad
|
||||||
#define UNKNOWN_EFFECT_0x200000 0x200000 //
|
#define UNKNOWN_EFFECT_0x200000 0x200000 //
|
||||||
#define REVERSE_EFFECT 0x400000 // being in reverse of the course
|
#define REVERSE_EFFECT 0x400000 // Player is facing the wrong direction
|
||||||
#define UNKNOWN_EFFECT_0x1000000 0x1000000 //
|
#define UNKNOWN_EFFECT_0x1000000 0x1000000 //
|
||||||
#define HIT_BY_ITEM_EFFECT 0x2000000 // being hit by an item
|
#define HIT_BY_ITEM_EFFECT 0x2000000 // being hit by an item
|
||||||
#define HIT_EFFECT 0x4000000 // hitting an object
|
#define HIT_EFFECT 0x4000000 // hitting an object
|
||||||
|
|
|
||||||
|
|
@ -32,31 +32,31 @@ extern "C" {
|
||||||
#define BORDER_HEIGHT 1
|
#define BORDER_HEIGHT 1
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0x00 */ COURSE_MARIO_RACEWAY = 0,
|
/* 0x00 */ TRACK_MARIO_RACEWAY = 0,
|
||||||
/* 0x01 */ COURSE_CHOCO_MOUNTAIN,
|
/* 0x01 */ TRACK_CHOCO_MOUNTAIN,
|
||||||
/* 0x02 */ COURSE_BOWSER_CASTLE,
|
/* 0x02 */ TRACK_BOWSER_CASTLE,
|
||||||
/* 0x03 */ COURSE_BANSHEE_BOARDWALK,
|
/* 0x03 */ TRACK_BANSHEE_BOARDWALK,
|
||||||
/* 0x04 */ COURSE_YOSHI_VALLEY,
|
/* 0x04 */ TRACK_YOSHI_VALLEY,
|
||||||
/* 0x05 */ COURSE_FRAPPE_SNOWLAND,
|
/* 0x05 */ TRACK_FRAPPE_SNOWLAND,
|
||||||
/* 0x06 */ COURSE_KOOPA_BEACH,
|
/* 0x06 */ TRACK_KOOPA_BEACH,
|
||||||
/* 0x07 */ COURSE_ROYAL_RACEWAY,
|
/* 0x07 */ TRACK_ROYAL_RACEWAY,
|
||||||
/* 0x08 */ COURSE_LUIGI_RACEWAY,
|
/* 0x08 */ TRACK_LUIGI_RACEWAY,
|
||||||
/* 0x09 */ COURSE_MOO_MOO_FARM,
|
/* 0x09 */ TRACK_MOO_MOO_FARM,
|
||||||
/* 0x0A */ COURSE_TOADS_TURNPIKE,
|
/* 0x0A */ TRACK_TOADS_TURNPIKE,
|
||||||
/* 0x0B */ COURSE_KALIMARI_DESERT,
|
/* 0x0B */ TRACK_KALIMARI_DESERT,
|
||||||
/* 0x0C */ COURSE_SHERBET_LAND,
|
/* 0x0C */ TRACK_SHERBET_LAND,
|
||||||
/* 0x0D */ COURSE_RAINBOW_ROAD,
|
/* 0x0D */ TRACK_RAINBOW_ROAD,
|
||||||
/* 0x0E */ COURSE_WARIO_STADIUM,
|
/* 0x0E */ TRACK_WARIO_STADIUM,
|
||||||
/* 0x0F */ COURSE_BLOCK_FORT,
|
/* 0x0F */ TRACK_BLOCK_FORT,
|
||||||
/* 0x10 */ COURSE_SKYSCRAPER,
|
/* 0x10 */ TRACK_SKYSCRAPER,
|
||||||
/* 0x11 */ COURSE_DOUBLE_DECK,
|
/* 0x11 */ TRACK_DOUBLE_DECK,
|
||||||
/* 0x12 */ COURSE_DK_JUNGLE,
|
/* 0x12 */ TRACK_DK_JUNGLE,
|
||||||
/* 0x13 */ COURSE_BIG_DONUT,
|
/* 0x13 */ TRACK_BIG_DONUT,
|
||||||
/* 0x14 */ COURSE_AWARD_CEREMONY,
|
/* 0x14 */ TRACK_AWARD_CEREMONY,
|
||||||
/* 0x15 */ NUM_COURSES
|
/* 0x15 */ NUM_TRACKS
|
||||||
} COURSES;
|
} TRACKS;
|
||||||
|
|
||||||
#define COURSE_NULL 0xFF
|
#define TRACK_NULL 0xFF
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
/* 0x00 */ TIME_TRIAL_DATA_LUIGI_RACEWAY,
|
/* 0x00 */ TIME_TRIAL_DATA_LUIGI_RACEWAY,
|
||||||
|
|
@ -86,19 +86,19 @@ enum SURFACE_TYPE {
|
||||||
/* 0x00 */ AIRBORNE,
|
/* 0x00 */ AIRBORNE,
|
||||||
/* 0x01 */ ASPHALT, // Luigi's Raceway, Toad's Turnpike, Koopa Troop beach shortcut tunnel, Mario Raceway, Royal
|
/* 0x01 */ ASPHALT, // Luigi's Raceway, Toad's Turnpike, Koopa Troop beach shortcut tunnel, Mario Raceway, Royal
|
||||||
// Raceway, Rainbow Road, Block Fort, Double Deck, Skyscraper
|
// 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
|
/* 0x02 */ DIRT, // Luigi's Raceway, Moo Moo Farm, Kalimiari Desert as road, Choco Mountain, Wario Stadium, DK
|
||||||
// Jungle on course, Yoshi Valley
|
// Jungle as road, Yoshi Valley
|
||||||
/* 0x03 */ SAND, // Koopa Troopa Beach light color, Royal Raceway
|
/* 0x03 */ SAND, // Koopa Troopa Beach light color, Royal Raceway
|
||||||
/* 0x04 */ STONE, // Royal Raceway castle entrance, Bowser's Castle
|
/* 0x04 */ STONE, // Royal Raceway castle entrance, Bowser's Castle
|
||||||
/* 0x05 */ SNOW, // Frappe Snowland on course, Sherber Land tunnel
|
/* 0x05 */ SNOW, // Frappe Snowland as road, Sherber Land tunnel
|
||||||
/* 0x06 */ BRIDGE, // Royal Raceway castle bridges (even the wooden one), Banshee's Boardwalk, Big Donut
|
/* 0x06 */ BRIDGE, // Royal Raceway castle bridges (even the wooden one), Banshee's Boardwalk, Big Donut
|
||||||
/* 0x07 */ SAND_OFFROAD, // Mario Raceway
|
/* 0x07 */ SAND_OFFROAD, // Mario Raceway
|
||||||
/* 0x08 */ GRASS, // Luigi's Raceway, Mario Raceway, Royal Raceway, Bowser's Castle, DK Jungle, Yoshi Valley
|
/* 0x08 */ GRASS, // Luigi's Raceway, Mario Raceway, Royal Raceway, Bowser's Castle, DK Jungle, Yoshi Valley
|
||||||
/* 0x09 */ ICE, // Sherbert Land
|
/* 0x09 */ ICE, // Sherbert Land
|
||||||
/* 0x0A */ WET_SAND, // Koop Troopa Beach dark color
|
/* 0x0A */ WET_SAND, // Koop Troopa Beach dark color
|
||||||
/* 0x0B */ SNOW_OFFROAD, // Frappe Snowland off course
|
/* 0x0B */ SNOW_OFFROAD, // Frappe Snowland off road
|
||||||
/* 0x0C */ CLIFF, // Koopa Troopa Beach, Choco Mountain
|
/* 0x0C */ CLIFF, // Koopa Troopa Beach, Choco Mountain
|
||||||
/* 0x0D */ DIRT_OFFROAD, // Kalimari Desert off course
|
/* 0x0D */ DIRT_OFFROAD, // Kalimari Desert off road
|
||||||
/* 0x0E */ TRAIN_TRACK, // Kalimari Desert
|
/* 0x0E */ TRAIN_TRACK, // Kalimari Desert
|
||||||
/* 0x0F */ CAVE, // DK Jungle cave
|
/* 0x0F */ CAVE, // DK Jungle cave
|
||||||
/* 0x10 */ ROPE_BRIDGE, // Bowser's Castle bridge 2, DK Jungle bridge
|
/* 0x10 */ ROPE_BRIDGE, // Bowser's Castle bridge 2, DK Jungle bridge
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ extern Collision D_8018C0B0[];
|
||||||
* First indexObjectList1 gets an unused index, then indexObjectList2, then indexObjectList3, then indexObjectList4, and
|
* First indexObjectList1 gets an unused index, then indexObjectList2, then indexObjectList3, then indexObjectList4, and
|
||||||
*then it loops.
|
*then it loops.
|
||||||
*
|
*
|
||||||
* The objects found at the indices in each list appears to be course dependent
|
* The objects found at the indices in each list appears to be track dependent
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#define NUM_YV_FLAG_POLES 4
|
#define NUM_YV_FLAG_POLES 4
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ typedef struct {
|
||||||
// The 6th record is the best 1-lap record
|
// The 6th record is the best 1-lap record
|
||||||
u8 records[6][3];
|
u8 records[6][3];
|
||||||
// It's unknown what these bytes are used for
|
// It's unknown what these bytes are used for
|
||||||
// Byte 1 might be an indicator that there is a ghost available for that course
|
// Byte 1 might be an indicator that there is a ghost available for that track
|
||||||
u8 unknownBytes[5];
|
u8 unknownBytes[5];
|
||||||
u8 checksum;
|
u8 checksum;
|
||||||
} CourseTimeTrialRecords; // size = 0x18
|
} CourseTimeTrialRecords; // size = 0x18
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ void render_actor_banana(Camera* camera, UNUSED Mat4 arg1, struct BananaActor* b
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((banana->pos[1] > gCourseMaxY + 800.0f)) {
|
if ((banana->pos[1] > gTrackMaxY + 800.0f)) {
|
||||||
actor_not_rendered(camera, (struct Actor*) banana);
|
actor_not_rendered(camera, (struct Actor*) banana);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (banana->pos[1] < (gCourseMinY - 800.0f)) {
|
if (banana->pos[1] < (gTrackMinY - 800.0f)) {
|
||||||
actor_not_rendered(camera, (struct Actor*) banana);
|
actor_not_rendered(camera, (struct Actor*) banana);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,9 +97,9 @@ void update_actor_banana(struct BananaActor* banana) {
|
||||||
banana->velocity[1] -= 0.15f;
|
banana->velocity[1] -= 0.15f;
|
||||||
}
|
}
|
||||||
banana->pos[1] += banana->velocity[1];
|
banana->pos[1] += banana->velocity[1];
|
||||||
if ((banana->pos[2] < (f32) gCourseMinZ) || ((f32) gCourseMaxZ < banana->pos[2]) ||
|
if ((banana->pos[2] < (f32) gTrackMinZ) || ((f32) gTrackMaxZ < banana->pos[2]) ||
|
||||||
(banana->pos[0] < (f32) gCourseMinX) || ((f32) gCourseMaxX < banana->pos[0]) ||
|
(banana->pos[0] < (f32) gTrackMinX) || ((f32) gTrackMaxX < banana->pos[0]) ||
|
||||||
(banana->pos[1] < (f32) gCourseMinY)) {
|
(banana->pos[1] < (f32) gTrackMinY)) {
|
||||||
destroy_destructable_actor((struct Actor*) banana);
|
destroy_destructable_actor((struct Actor*) banana);
|
||||||
} else {
|
} else {
|
||||||
check_bounding_collision(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1],
|
check_bounding_collision(&banana->unk30, banana->boundingBoxSize + 1.0f, banana->pos[0], banana->pos[1],
|
||||||
|
|
|
||||||
|
|
@ -238,8 +238,8 @@ void update_actor_red_blue_shell(struct ShellActor* shell) {
|
||||||
pad0 = shell->pos[2];
|
pad0 = shell->pos[2];
|
||||||
pad2 = shell->pos[1];
|
pad2 = shell->pos[1];
|
||||||
pad13 = shell->type;
|
pad13 = shell->type;
|
||||||
if ((pad0 < (f32) gCourseMinZ) || ((f32) gCourseMaxZ < pad0) || (pad1 < (f32) gCourseMinX) ||
|
if ((pad0 < (f32) gTrackMinZ) || ((f32) gTrackMaxZ < pad0) || (pad1 < (f32) gTrackMinX) ||
|
||||||
((f32) gCourseMaxX < pad1) || (pad2 < (f32) gCourseMinY)) {
|
((f32) gTrackMaxX < pad1) || (pad2 < (f32) gTrackMinY)) {
|
||||||
destroy_destructable_actor((struct Actor*) shell);
|
destroy_destructable_actor((struct Actor*) shell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,11 @@ void render_actor_fake_item_box(Camera* camera, struct FakeItemBox* fakeItemBox)
|
||||||
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (((f32) gCourseMaxY + 800.0f) < fakeItemBox->pos[1]) {
|
if (((f32) gTrackMaxY + 800.0f) < fakeItemBox->pos[1]) {
|
||||||
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fakeItemBox->pos[1] < ((f32) gCourseMinY - 800.0f)) {
|
if (fakeItemBox->pos[1] < ((f32) gTrackMinY - 800.0f)) {
|
||||||
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
actor_not_rendered(camera, (struct Actor*) fakeItemBox);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ void func_8029CF0C(struct ActorSpawnData* spawnData, struct FallingRock* rock) {
|
||||||
Vec3s sp24 = { 60, 120, 180 };
|
Vec3s sp24 = { 60, 120, 180 };
|
||||||
temp_v0 += rock->unk_06;
|
temp_v0 += rock->unk_06;
|
||||||
rock->respawnTimer = sp24[rock->unk_06]; // * 2
|
rock->respawnTimer = sp24[rock->unk_06]; // * 2
|
||||||
rock->pos[0] = (f32) temp_v0->pos[0] * gCourseDirection;
|
rock->pos[0] = (f32) temp_v0->pos[0] * gTrackDirection;
|
||||||
rock->pos[1] = (f32) temp_v0->pos[1] + 10.0f;
|
rock->pos[1] = (f32) temp_v0->pos[1] + 10.0f;
|
||||||
rock->pos[2] = (f32) temp_v0->pos[2];
|
rock->pos[2] = (f32) temp_v0->pos[2];
|
||||||
vec3f_set(rock->velocity, 0, 0, 0);
|
vec3f_set(rock->velocity, 0, 0, 0);
|
||||||
|
|
@ -33,7 +33,7 @@ void spawn_falling_rocks(struct ActorSpawnData* spawnData) {
|
||||||
s16 temp;
|
s16 temp;
|
||||||
|
|
||||||
while (temp_s0->pos[0] != -0x8000) {
|
while (temp_s0->pos[0] != -0x8000) {
|
||||||
startingPos[0] = temp_s0->pos[0] * gCourseDirection;
|
startingPos[0] = temp_s0->pos[0] * gTrackDirection;
|
||||||
startingPos[1] = temp_s0->pos[1] + 10.0f;
|
startingPos[1] = temp_s0->pos[1] + 10.0f;
|
||||||
startingPos[2] = temp_s0->pos[2];
|
startingPos[2] = temp_s0->pos[2];
|
||||||
vec3f_set(startingVelocity, 0, 0, 0);
|
vec3f_set(startingVelocity, 0, 0, 0);
|
||||||
|
|
|
||||||
|
|
@ -32,8 +32,8 @@ void update_actor_green_shell(struct ShellActor* shell) {
|
||||||
height = shell->pos[0];
|
height = shell->pos[0];
|
||||||
y = shell->pos[1];
|
y = shell->pos[1];
|
||||||
z = shell->pos[2];
|
z = shell->pos[2];
|
||||||
if ((z < gCourseMinZ) || (gCourseMaxZ < z) || (height < gCourseMinX) || (gCourseMaxX < height) ||
|
if ((z < gTrackMinZ) || (gTrackMaxZ < z) || (height < gTrackMinX) || (gTrackMaxX < height) ||
|
||||||
(y < gCourseMinY)) {
|
(y < gTrackMinY)) {
|
||||||
destroy_destructable_actor((struct Actor*) shell);
|
destroy_destructable_actor((struct Actor*) shell);
|
||||||
}
|
}
|
||||||
shell->rotVelocity += 0x71C;
|
shell->rotVelocity += 0x71C;
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ void render_actor_tree_luigi_raceway(Camera* camera, Mat4 arg1, struct Actor* ar
|
||||||
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import);
|
gDPLoadTLUT_pal256(gDisplayListHead++, common_tlut_trees_import);
|
||||||
// Why is a TLUT being used a DL here? That makes no sense
|
// Why is a TLUT being used a DL here? That makes no sense
|
||||||
// Based on the TLUT being loaded above, this ought to be be another
|
// Based on the TLUT being loaded above, this ought to be be another
|
||||||
// tree related DL, presumably one found in a course other than Moo Moo farm
|
// tree related DL, presumably one found in a track other than Moo Moo farm
|
||||||
// 0x0600FC70
|
// 0x0600FC70
|
||||||
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_FC70);
|
gSPDisplayList(gDisplayListHead++, d_course_luigi_raceway_dl_FC70);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3544,7 +3544,7 @@ void func_800CAEC4(u8 playerId, f32 arg1) {
|
||||||
D_800EA120[playerId] = arg1;
|
D_800EA120[playerId] = arg1;
|
||||||
//! @warning this used to be gCurrentCourseId + 0x19007020
|
//! @warning this used to be gCurrentCourseId + 0x19007020
|
||||||
// This may not be equivallent.
|
// This may not be equivallent.
|
||||||
play_sound(GetCourseIndex() + 0x19007020, &D_800E9F7C[playerId].pos, playerId, &D_800EA1D4,
|
play_sound(GetTrackIndex() + 0x19007020, &D_800E9F7C[playerId].pos, playerId, &D_800EA1D4,
|
||||||
&D_800EA120[playerId], (u8*) &D_800E9F7C[playerId].unk_14);
|
&D_800EA120[playerId], (u8*) &D_800E9F7C[playerId].unk_14);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -55,11 +55,11 @@ u16 D_800DC5E4 = 0;
|
||||||
//! @todo gPlayerWinningIndex (D_800DC5E8) accessed as word, D_800DC5EB as u8
|
//! @todo gPlayerWinningIndex (D_800DC5E8) accessed as word, D_800DC5EB as u8
|
||||||
s32 gPlayerWinningIndex = 0;
|
s32 gPlayerWinningIndex = 0;
|
||||||
|
|
||||||
ALIGNED16 struct UnkStruct_800DC5EC D_8015F480[4] = { 0 };
|
ALIGNED16 ScreenContext gScreenContexts[4] = { 0 };
|
||||||
struct UnkStruct_800DC5EC* D_800DC5EC = &D_8015F480[0];
|
ScreenContext* gScreenOneCtx = &gScreenContexts[0];
|
||||||
struct UnkStruct_800DC5EC* D_800DC5F0 = &D_8015F480[1];
|
ScreenContext* gScreenTwoCtx = &gScreenContexts[1];
|
||||||
struct UnkStruct_800DC5EC* D_800DC5F4 = &D_8015F480[2];
|
ScreenContext* gScreenThreeCtx = &gScreenContexts[2];
|
||||||
struct UnkStruct_800DC5EC* D_800DC5F8 = &D_8015F480[3];
|
ScreenContext* gScreenFourCtx = &gScreenContexts[3];
|
||||||
u16 gIsGamePaused = false; // true if the game is paused and false if the game is not paused
|
u16 gIsGamePaused = false; // true if the game is paused and false if the game is not paused
|
||||||
bool gIsEditorPaused = true;
|
bool gIsEditorPaused = true;
|
||||||
u8* pAppNmiBuffer = (u8*) &osAppNmiBuffer;
|
u8* pAppNmiBuffer = (u8*) &osAppNmiBuffer;
|
||||||
|
|
@ -67,7 +67,7 @@ u8* pAppNmiBuffer = (u8*) &osAppNmiBuffer;
|
||||||
s32 gIsMirrorMode = 0;
|
s32 gIsMirrorMode = 0;
|
||||||
void set_mirror_mode(s32 mirror) {
|
void set_mirror_mode(s32 mirror) {
|
||||||
if (gIsMirrorMode != mirror) {
|
if (gIsMirrorMode != mirror) {
|
||||||
UnLoadCourse();
|
UnLoadTrack();
|
||||||
}
|
}
|
||||||
gIsMirrorMode = mirror;
|
gIsMirrorMode = mirror;
|
||||||
}
|
}
|
||||||
|
|
@ -78,7 +78,7 @@ Lights1 D_800DC610[] = {
|
||||||
gdSPDefLights1(209, 209, 209, 255, 255, 255, 0, 0, 120),
|
gdSPDefLights1(209, 209, 209, 255, 255, 255, 0, 0, 120),
|
||||||
};
|
};
|
||||||
UNUSED s32 pad_800029B0 = 0x80000000;
|
UNUSED s32 pad_800029B0 = 0x80000000;
|
||||||
s16 gCreditsCourseId = COURSE_LUIGI_RACEWAY;
|
s16 gCreditsCourseId = TRACK_LUIGI_RACEWAY;
|
||||||
s16 gPlaceItemBoxes = 1;
|
s16 gPlaceItemBoxes = 1;
|
||||||
|
|
||||||
// Technically a pointer to an array, but declaring it so creates regalloc issues.
|
// Technically a pointer to an array, but declaring it so creates regalloc issues.
|
||||||
|
|
@ -95,14 +95,14 @@ s32 D_8015F5A4;
|
||||||
s32 code_800029B0_bss_pad[48];
|
s32 code_800029B0_bss_pad[48];
|
||||||
Vtx* vtxBuffer[32];
|
Vtx* vtxBuffer[32];
|
||||||
|
|
||||||
s16 gCourseMaxX;
|
s16 gTrackMaxX;
|
||||||
s16 gCourseMinX;
|
s16 gTrackMinX;
|
||||||
|
|
||||||
s16 gCourseMaxY; // s16 or u16?
|
s16 gTrackMaxY; // s16 or u16?
|
||||||
s16 gCourseMinY;
|
s16 gTrackMinY;
|
||||||
|
|
||||||
s16 gCourseMaxZ;
|
s16 gTrackMaxZ;
|
||||||
s16 gCourseMinZ;
|
s16 gTrackMinZ;
|
||||||
|
|
||||||
s16 D_8015F6F4;
|
s16 D_8015F6F4;
|
||||||
s16 D_8015F6F6;
|
s16 D_8015F6F6;
|
||||||
|
|
@ -131,7 +131,7 @@ Vec3f D_8015F758;
|
||||||
Vec3f D_8015F768;
|
Vec3f D_8015F768;
|
||||||
Vec3f D_8015F778;
|
Vec3f D_8015F778;
|
||||||
|
|
||||||
f32 gCourseDirection; // Extra mode, flips vertices.
|
f32 gTrackDirection; // Extra mode, flips vertices.
|
||||||
s32 gNumScreens; // Set to zero in single player mode
|
s32 gNumScreens; // Set to zero in single player mode
|
||||||
s32 D_8015F790[64]; // Unknown data, potentially not used.
|
s32 D_8015F790[64]; // Unknown data, potentially not used.
|
||||||
u16 D_8015F890;
|
u16 D_8015F890;
|
||||||
|
|
@ -201,15 +201,15 @@ void setup_race(void) {
|
||||||
set_mirror_mode(0);
|
set_mirror_mode(0);
|
||||||
}
|
}
|
||||||
if (gIsMirrorMode) {
|
if (gIsMirrorMode) {
|
||||||
gCourseDirection = -1.0f;
|
gTrackDirection = -1.0f;
|
||||||
} else {
|
} else {
|
||||||
gCourseDirection = 1.0f;
|
gTrackDirection = 1.0f;
|
||||||
}
|
}
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
gCurrentCourseId = gCupCourseOrder[gCupSelection][gCourseIndexInCup];
|
gCurrentCourseId = gCupCourseOrder[gCupSelection][gCourseIndexInCup];
|
||||||
// Skip for debug menu
|
// Skip for debug menu
|
||||||
if (gMenuSelection != START_MENU) {
|
if (gMenuSelection != START_MENU) {
|
||||||
SetCourseFromCup();
|
SetTrackFromCup();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gActiveScreenMode = gScreenModeSelection;
|
gActiveScreenMode = gScreenModeSelection;
|
||||||
|
|
@ -217,8 +217,7 @@ void setup_race(void) {
|
||||||
D_80150120 = 0;
|
D_80150120 = 0;
|
||||||
gCurrentlyLoadedCourseId = gCurrentCourseId;
|
gCurrentlyLoadedCourseId = gCurrentCourseId;
|
||||||
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
||||||
load_course(gCurrentCourseId);
|
load_track(gCurrentCourseId);
|
||||||
course_init();
|
|
||||||
gFreeMemoryCourseAnchor = gNextFreeMemoryAddress;
|
gFreeMemoryCourseAnchor = gNextFreeMemoryAddress;
|
||||||
} else {
|
} else {
|
||||||
gNextFreeMemoryAddress = gFreeMemoryCourseAnchor;
|
gNextFreeMemoryAddress = gFreeMemoryCourseAnchor;
|
||||||
|
|
@ -244,7 +243,7 @@ void setup_race(void) {
|
||||||
func_80091FA4();
|
func_80091FA4();
|
||||||
init_actors_and_load_textures();
|
init_actors_and_load_textures();
|
||||||
|
|
||||||
// Set finishline position. This is now done in files in src/engine/courses/*
|
// Set finishline position. This is now done in files in src/engine/tracks/*
|
||||||
// if (gModeSelection != BATTLE) {
|
// if (gModeSelection != BATTLE) {
|
||||||
// D_8015F8D0[1] = (f32) (gCurrentTrackPath->posY - 15);
|
// D_8015F8D0[1] = (f32) (gCurrentTrackPath->posY - 15);
|
||||||
// D_8015F8D0[2] = gCurrentTrackPath->posZ;
|
// D_8015F8D0[2] = gCurrentTrackPath->posZ;
|
||||||
|
|
@ -260,7 +259,7 @@ void setup_race(void) {
|
||||||
if (!gDemoMode) {
|
if (!gDemoMode) {
|
||||||
//! @warning this used to be gCurrentCourseId + 4
|
//! @warning this used to be gCurrentCourseId + 4
|
||||||
// Hopefully this is equivallent.
|
// Hopefully this is equivallent.
|
||||||
func_800CA008(gPlayerCountSelection1 - 1, GetCourseIndex() + 4);
|
func_800CA008(gPlayerCountSelection1 - 1, GetTrackIndex() + 4);
|
||||||
func_800CB2C4();
|
func_800CB2C4();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -289,17 +288,16 @@ void setup_editor(void) {
|
||||||
D_80150120 = 0;
|
D_80150120 = 0;
|
||||||
gCurrentlyLoadedCourseId = gCurrentCourseId;
|
gCurrentlyLoadedCourseId = gCurrentCourseId;
|
||||||
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
||||||
load_course(gCurrentCourseId);
|
load_track(gCurrentCourseId);
|
||||||
course_init();
|
|
||||||
gFreeMemoryCourseAnchor = gNextFreeMemoryAddress;
|
gFreeMemoryCourseAnchor = gNextFreeMemoryAddress;
|
||||||
} else {
|
} else {
|
||||||
gNextFreeMemoryAddress = gFreeMemoryCourseAnchor;
|
gNextFreeMemoryAddress = gFreeMemoryCourseAnchor;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gIsMirrorMode) {
|
if (gIsMirrorMode) {
|
||||||
gCourseDirection = -1.0f;
|
gTrackDirection = -1.0f;
|
||||||
} else {
|
} else {
|
||||||
gCourseDirection = 1.0f;
|
gTrackDirection = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Cow related
|
// Cow related
|
||||||
|
|
@ -326,41 +324,6 @@ void setup_editor(void) {
|
||||||
void func_80002DAC(void) {
|
void func_80002DAC(void) {
|
||||||
|
|
||||||
CM_SomeSounds();
|
CM_SomeSounds();
|
||||||
|
|
||||||
// switch (gCurrentCourseId) {
|
|
||||||
// case COURSE_MARIO_RACEWAY:
|
|
||||||
// // vec3f_set(D_8015F748, -223.0f, 94.0f, -155.0f);
|
|
||||||
// // func_800C9D80(D_8015F748, D_802B91C8, 0x5103700B);
|
|
||||||
// break;
|
|
||||||
// case COURSE_ROYAL_RACEWAY:
|
|
||||||
// vec3f_set(D_8015F748, 177.0f, 87.0f, -393.0f);
|
|
||||||
// func_800C9D80(D_8015F748, D_802B91C8, 0x5103700B);
|
|
||||||
// break;
|
|
||||||
// case COURSE_LUIGI_RACEWAY:
|
|
||||||
// vec3f_set(D_8015F748, 85.0f, 21.0f, -219.0f);
|
|
||||||
// func_800C9D80(D_8015F748, D_802B91C8, 0x5103700B);
|
|
||||||
// break;
|
|
||||||
// case COURSE_WARIO_STADIUM:
|
|
||||||
// vec3f_set(D_8015F748, 298.0f, 202.0f, -850.0f);
|
|
||||||
// func_800C9D80(D_8015F748, D_802B91C8, 0x5103700B);
|
|
||||||
// vec3f_set(D_8015F758, -1600.0f, 202.0f, -2430.0f);
|
|
||||||
// func_800C9D80(D_8015F758, D_802B91C8, 0x5103700B);
|
|
||||||
// vec3f_set(D_8015F768, -2708.0f, 202.0f, 1762.0f);
|
|
||||||
// func_800C9D80(D_8015F768, D_802B91C8, 0x5103700B);
|
|
||||||
// vec3f_set(D_8015F778, -775.0f, 202.0f, 1930.0f);
|
|
||||||
// func_800C9D80(D_8015F778, D_802B91C8, 0x5103700B);
|
|
||||||
// break;
|
|
||||||
// case COURSE_KOOPA_BEACH:
|
|
||||||
// vec3f_set(D_8015F738, 153.0f, 0.0f, 2319.0f);
|
|
||||||
// func_800C9D80(D_8015F738, D_802B91C8, 0x51028001);
|
|
||||||
// break;
|
|
||||||
// case COURSE_DK_JUNGLE:
|
|
||||||
// vec3f_set(D_8015F738, -790.0f, -255.0f, -447.0f);
|
|
||||||
// func_800C9D80(D_8015F738, D_802B91C8, 0x51028001);
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -385,7 +348,7 @@ void credits_spawn_actors(void) {
|
||||||
D_800DC5C8 = 0;
|
D_800DC5C8 = 0;
|
||||||
gNumActors = 0;
|
gNumActors = 0;
|
||||||
set_mirror_mode(0);
|
set_mirror_mode(0);
|
||||||
gCourseDirection = 1.0f;
|
gTrackDirection = 1.0f;
|
||||||
|
|
||||||
gPlayerCountSelection1 = 1;
|
gPlayerCountSelection1 = 1;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <actor_types.h>
|
#include <actor_types.h>
|
||||||
#include "camera.h"
|
#include "camera.h"
|
||||||
|
|
||||||
struct UnkStruct_800DC5EC {
|
typedef struct {
|
||||||
/* 0x00 */ struct Controller* controllers; // gControllers ptr 800F6910
|
/* 0x00 */ struct Controller* controllers; // gControllers ptr 800F6910
|
||||||
/* 0x04 */ Camera* camera; // The active camera
|
/* 0x04 */ Camera* camera; // The active camera
|
||||||
/* */ Camera* raceCamera;
|
/* */ Camera* raceCamera;
|
||||||
|
|
@ -28,7 +28,7 @@ struct UnkStruct_800DC5EC {
|
||||||
/* 0x38 */ s16 pathCounter;
|
/* 0x38 */ s16 pathCounter;
|
||||||
/* 0x3A */ s16 unk42;
|
/* 0x3A */ s16 unk42;
|
||||||
/* 0x3C */ s32 pad2;
|
/* 0x3C */ s32 pad2;
|
||||||
};
|
} ScreenContext;
|
||||||
|
|
||||||
/* Function Prototypes */
|
/* Function Prototypes */
|
||||||
|
|
||||||
|
|
@ -60,11 +60,11 @@ extern s32 D_800DC5E0;
|
||||||
extern u16 D_800DC5E4;
|
extern u16 D_800DC5E4;
|
||||||
extern s32 gPlayerWinningIndex;
|
extern s32 gPlayerWinningIndex;
|
||||||
|
|
||||||
extern struct UnkStruct_800DC5EC D_8015F480[4];
|
extern ScreenContext gScreenContexts[4];
|
||||||
extern struct UnkStruct_800DC5EC* D_800DC5EC;
|
extern ScreenContext* gScreenOneCtx;
|
||||||
extern struct UnkStruct_800DC5EC* D_800DC5F0;
|
extern ScreenContext* gScreenTwoCtx;
|
||||||
extern struct UnkStruct_800DC5EC* D_800DC5F4;
|
extern ScreenContext* gScreenThreeCtx;
|
||||||
extern struct UnkStruct_800DC5EC* D_800DC5F8;
|
extern ScreenContext* gScreenFourCtx;
|
||||||
extern u16 gIsGamePaused;
|
extern u16 gIsGamePaused;
|
||||||
extern bool gIsEditorPaused;
|
extern bool gIsEditorPaused;
|
||||||
extern u8* pAppNmiBuffer;
|
extern u8* pAppNmiBuffer;
|
||||||
|
|
@ -86,14 +86,14 @@ extern s32 D_8015F5A0;
|
||||||
extern s32 D_8015F5A4;
|
extern s32 D_8015F5A4;
|
||||||
|
|
||||||
extern Vtx* vtxBuffer[];
|
extern Vtx* vtxBuffer[];
|
||||||
extern s16 gCourseMaxX;
|
extern s16 gTrackMaxX;
|
||||||
extern s16 gCourseMinX;
|
extern s16 gTrackMinX;
|
||||||
|
|
||||||
extern s16 gCourseMaxY;
|
extern s16 gTrackMaxY;
|
||||||
extern s16 gCourseMinY;
|
extern s16 gTrackMinY;
|
||||||
|
|
||||||
extern s16 gCourseMaxZ;
|
extern s16 gTrackMaxZ;
|
||||||
extern s16 gCourseMinZ;
|
extern s16 gTrackMinZ;
|
||||||
extern s16 D_8015F6F4;
|
extern s16 D_8015F6F4;
|
||||||
extern s16 D_8015F6F6;
|
extern s16 D_8015F6F6;
|
||||||
extern u16 D_8015F6F8;
|
extern u16 D_8015F6F8;
|
||||||
|
|
@ -111,9 +111,9 @@ extern uintptr_t gNextFreeMemoryAddress;
|
||||||
extern uintptr_t gHeapEndPtr;
|
extern uintptr_t gHeapEndPtr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This repoints gNextFreeMemoryAddress to the point in the memory pool just after a course was loaded.
|
* This repoints gNextFreeMemoryAddress to the point in the memory pool just after a track was loaded.
|
||||||
* This allows players to retry or reset a course without reloading the whole course.
|
* This allows players to retry or reset a track without reloading the whole track.
|
||||||
* Memory allocated after course load is not zeroed or reset. But should get overwritten by future allocations.
|
* Memory allocated after track load is not zeroed or reset. But should get overwritten by future allocations.
|
||||||
*
|
*
|
||||||
* This is a relatively unsafe way to architect a memory pool as old memory could accidentally be used if future allocations do not zero or fully overwrite their free memory.
|
* This is a relatively unsafe way to architect a memory pool as old memory could accidentally be used if future allocations do not zero or fully overwrite their free memory.
|
||||||
*/
|
*/
|
||||||
|
|
@ -125,7 +125,7 @@ extern Vec3f D_8015F758;
|
||||||
extern Vec3f D_8015F768;
|
extern Vec3f D_8015F768;
|
||||||
extern Vec3f D_8015F778;
|
extern Vec3f D_8015F778;
|
||||||
|
|
||||||
extern f32 gCourseDirection;
|
extern f32 gTrackDirection;
|
||||||
extern s32 gNumScreens;
|
extern s32 gNumScreens;
|
||||||
|
|
||||||
extern s32 D_8015F790[];
|
extern s32 D_8015F790[];
|
||||||
|
|
|
||||||
|
|
@ -41,14 +41,14 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "port/Game.h"
|
#include "port/Game.h"
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
|
|
||||||
s32 unk_code_80005FD0_pad[24];
|
s32 unk_code_80005FD0_pad[24];
|
||||||
Collision D_80162E70;
|
Collision D_80162E70;
|
||||||
s16 D_80162EB0; // Possibly a float.
|
s16 D_80162EB0; // Possibly a float.
|
||||||
s16 D_80162EB2; // possibly [3]
|
s16 D_80162EB2; // possibly [3]
|
||||||
|
|
||||||
CPUBehaviour* gCoursesCPUBehaviour[NUM_COURSES - 1];
|
CPUBehaviour* gCoursesCPUBehaviour[NUM_TRACKS - 1];
|
||||||
|
|
||||||
// more padding?
|
// more padding?
|
||||||
s32 D_80162F08[2];
|
s32 D_80162F08[2];
|
||||||
|
|
@ -1443,7 +1443,7 @@ void update_cpu_path_completion(s32 playerId, Player* player) {
|
||||||
f32 func_80009258(UNUSED s32 playerId, f32 arg1, f32 arg2) {
|
f32 func_80009258(UNUSED s32 playerId, f32 arg1, f32 arg2) {
|
||||||
f32 temp_f2 = gPathStartZ - arg2;
|
f32 temp_f2 = gPathStartZ - arg2;
|
||||||
f32 temp_f12 = arg1 - gPathStartZ;
|
f32 temp_f12 = arg1 - gPathStartZ;
|
||||||
return gCourseTimer - ((COURSE_TIMER_ITER_f * temp_f2) / (temp_f2 + temp_f12));
|
return gCourseTimer - ((TRACK_TIMER_ITER_f * temp_f2) / (temp_f2 + temp_f12));
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_player_path_completion(s32 playerId, Player* player) {
|
void update_player_path_completion(s32 playerId, Player* player) {
|
||||||
|
|
@ -1635,10 +1635,10 @@ void update_player(s32 playerId) {
|
||||||
}
|
}
|
||||||
D_801633E0[playerId] = 0;
|
D_801633E0[playerId] = 0;
|
||||||
// clang-format off
|
// clang-format off
|
||||||
if (player->pos[0] < gCourseMinX) { D_801633E0[playerId] = 1; }
|
if (player->pos[0] < gTrackMinX) { D_801633E0[playerId] = 1; }
|
||||||
if (gCourseMaxX < player->pos[0]) { D_801633E0[playerId] = 2; }
|
if (gTrackMaxX < player->pos[0]) { D_801633E0[playerId] = 2; }
|
||||||
if (player->pos[2] < gCourseMinZ) { D_801633E0[playerId] = 3; }
|
if (player->pos[2] < gTrackMinZ) { D_801633E0[playerId] = 3; }
|
||||||
if (gCourseMaxZ < player->pos[2]) { D_801633E0[playerId] = 4; }
|
if (gTrackMaxZ < player->pos[2]) { D_801633E0[playerId] = 4; }
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
if (!(player->unk_0CA & 2) && !(player->unk_0CA & 8)) {
|
if (!(player->unk_0CA & 2) && !(player->unk_0CA & 8)) {
|
||||||
|
|
@ -1649,7 +1649,7 @@ void update_player(s32 playerId) {
|
||||||
// Collision is handled in the vehicles class now
|
// Collision is handled in the vehicles class now
|
||||||
|
|
||||||
// switch (gCurrentCourseId) { /* irregular */
|
// switch (gCurrentCourseId) { /* irregular */
|
||||||
// case COURSE_KALIMARI_DESERT:
|
// case TRACK_KALIMARI_DESERT:
|
||||||
CM_VehicleCollision(playerId, player);
|
CM_VehicleCollision(playerId, player);
|
||||||
// handle_trains_interactions(playerId, player);
|
// handle_trains_interactions(playerId, player);
|
||||||
if (playerId == 0) {
|
if (playerId == 0) {
|
||||||
|
|
@ -1657,10 +1657,10 @@ void update_player(s32 playerId) {
|
||||||
// func_80013054();
|
// func_80013054();
|
||||||
}
|
}
|
||||||
// break;
|
// break;
|
||||||
// case COURSE_DK_JUNGLE:
|
// case TRACK_DK_JUNGLE:
|
||||||
// handle_paddle_boats_interactions(player);
|
// handle_paddle_boats_interactions(player);
|
||||||
// break;
|
// break;
|
||||||
// case COURSE_TOADS_TURNPIKE:
|
// case TRACK_TOADS_TURNPIKE:
|
||||||
// handle_box_trucks_interactions(playerId, player);
|
// handle_box_trucks_interactions(playerId, player);
|
||||||
// handle_school_buses_interactions(playerId, player);
|
// handle_school_buses_interactions(playerId, player);
|
||||||
// handle_tanker_trucks_interactions(playerId, player);
|
// handle_tanker_trucks_interactions(playerId, player);
|
||||||
|
|
@ -1729,13 +1729,13 @@ void update_player(s32 playerId) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// switch (gCurrentCourseId) {
|
// switch (gCurrentCourseId) {
|
||||||
// case COURSE_YOSHI_VALLEY:
|
// case TRACK_YOSHI_VALLEY:
|
||||||
// case COURSE_AWARD_CEREMONY:
|
// case TRACK_AWARD_CEREMONY:
|
||||||
// gPlayerTrackPositionFactorInstruction[playerId].target = 0.0f;
|
// gPlayerTrackPositionFactorInstruction[playerId].target = 0.0f;
|
||||||
// break;
|
// break;
|
||||||
// default:
|
// default:
|
||||||
// break;
|
// break;
|
||||||
// case COURSE_TOADS_TURNPIKE:
|
// case TRACK_TOADS_TURNPIKE:
|
||||||
// update_player_track_position_factor_from_box_trucks(playerId);
|
// update_player_track_position_factor_from_box_trucks(playerId);
|
||||||
// update_player_track_position_factor_from_buses(playerId);
|
// update_player_track_position_factor_from_buses(playerId);
|
||||||
// update_player_track_position_factor_from_tanker_truck(playerId);
|
// update_player_track_position_factor_from_tanker_truck(playerId);
|
||||||
|
|
@ -3470,10 +3470,10 @@ void clear_path_point(TrackPathPoint* arg0, size_t size) {
|
||||||
bzero((void*) arg0, size * sizeof(TrackPathPoint));
|
bzero((void*) arg0, size * sizeof(TrackPathPoint));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Appears to allocate memory for each course.
|
// Appears to allocate memory for each track.
|
||||||
void init_course_path_point(void) {
|
void init_course_path_point(void) {
|
||||||
|
|
||||||
_struct_gCoursePathSizes_0x10* ptr = &CM_GetProps()->PathSizes;
|
TrackPathSizes* ptr = &CM_GetProps()->PathSizes;
|
||||||
s32 temp;
|
s32 temp;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
|
|
@ -3699,9 +3699,9 @@ void init_players(void) {
|
||||||
|
|
||||||
// @arg index from 0 to 3.
|
// @arg index from 0 to 3.
|
||||||
|
|
||||||
// Processes course path by index.
|
// Processes track path by index.
|
||||||
// @arg index from 0 to 3.
|
// @arg index from 0 to 3.
|
||||||
// Each course can have 1-4 course paths.
|
// Each track can have 1-4 paths.
|
||||||
void load_track_path(s32 pathIndex) {
|
void load_track_path(s32 pathIndex) {
|
||||||
|
|
||||||
TrackPathPoint* ptr;
|
TrackPathPoint* ptr;
|
||||||
|
|
@ -3718,7 +3718,7 @@ void load_track_path(s32 pathIndex) {
|
||||||
bInvalidPath = 1;
|
bInvalidPath = 1;
|
||||||
|
|
||||||
if (IsPodiumCeremony()) { // Only podium ceremony
|
if (IsPodiumCeremony()) { // Only podium ceremony
|
||||||
// Course path included in course_data which has already been loaded into memory.
|
// Track path included in course_data which has already been loaded into memory.
|
||||||
// This is how we get the addr to our path data.
|
// This is how we get the addr to our path data.
|
||||||
path = CM_GetProps()->PathTable2[pathIndex];
|
path = CM_GetProps()->PathTable2[pathIndex];
|
||||||
ptr = path;
|
ptr = path;
|
||||||
|
|
@ -3743,7 +3743,7 @@ void load_track_path(s32 pathIndex) {
|
||||||
} else { // ALL TRACKS
|
} else { // ALL TRACKS
|
||||||
TrackPathPoint* pathSrc = CM_GetProps()->PathTable2[pathIndex];
|
TrackPathPoint* pathSrc = CM_GetProps()->PathTable2[pathIndex];
|
||||||
if (pathSrc == NULL) {
|
if (pathSrc == NULL) {
|
||||||
printf("code_80005FD0.c: Path %d in Course::PathTable2, was NULL.\n Your track is missing a path\n",
|
printf("code_80005FD0.c: Path %d in Track::PathTable2, was NULL.\n Your track is missing a path\n",
|
||||||
pathIndex);
|
pathIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4212,7 +4212,7 @@ s32 generate_2d_path(TrackPathPoint* pathDest, TrackPathPoint* pathSrc, s32 numW
|
||||||
|
|
||||||
void copy_courses_cpu_behaviour(void) {
|
void copy_courses_cpu_behaviour(void) {
|
||||||
s32 i;
|
s32 i;
|
||||||
for (i = 0; i < NUM_COURSES - 1; i++) {
|
for (i = 0; i < NUM_TRACKS - 1; i++) {
|
||||||
gCoursesCPUBehaviour[i] = LOAD_ASSET(CM_GetProps()->AIBehaviour);
|
gCoursesCPUBehaviour[i] = LOAD_ASSET(CM_GetProps()->AIBehaviour);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5384,7 +5384,7 @@ void func_80014DE4(s32 cameraIndex) {
|
||||||
|
|
||||||
D_801646CC = 0;
|
D_801646CC = 0;
|
||||||
D_80164678[cameraIndex] = D_80164670[cameraIndex];
|
D_80164678[cameraIndex] = D_80164670[cameraIndex];
|
||||||
if ((gModeSelection != 1) && ((GetCupCursorPosition() == COURSE_ONE) || (gDemoMode == (u16) 1))) {
|
if ((gModeSelection != 1) && ((GetCupCursorPosition() == TRACK_ONE) || (gDemoMode == (u16) 1))) {
|
||||||
D_80164678[cameraIndex] = 0;
|
D_80164678[cameraIndex] = 0;
|
||||||
} else if ((D_80164678[cameraIndex] != 0) && (D_80164678[cameraIndex] != (s16) 1) &&
|
} else if ((D_80164678[cameraIndex] != 0) && (D_80164678[cameraIndex] != (s16) 1) &&
|
||||||
(D_80164678[cameraIndex] != 2) && (D_80164678[cameraIndex] != 3)) {
|
(D_80164678[cameraIndex] != 2) && (D_80164678[cameraIndex] != 3)) {
|
||||||
|
|
@ -5397,7 +5397,7 @@ void func_80014DE4(s32 cameraIndex) {
|
||||||
D_801646D0[cameraIndex].unk0 = 0;
|
D_801646D0[cameraIndex].unk0 = 0;
|
||||||
D_801646D0[cameraIndex].unk2 = 0;
|
D_801646D0[cameraIndex].unk2 = 0;
|
||||||
D_801646D0[cameraIndex].unk4 = 0;
|
D_801646D0[cameraIndex].unk4 = 0;
|
||||||
if ((gModeSelection == 1) && (gCourseMapInit == 0)) {
|
if ((gModeSelection == 1) && (gTrackMapInit == 0)) {
|
||||||
D_80164678[cameraIndex] = 0;
|
D_80164678[cameraIndex] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -6671,7 +6671,7 @@ void look_behind_toggle(s32 cameraIdx) {
|
||||||
static bool lookBehindActive[NUM_CAMERAS] = {0};
|
static bool lookBehindActive[NUM_CAMERAS] = {0};
|
||||||
bool pressed = gControllers[cameraIdx].button & L_CBUTTONS; // button held
|
bool pressed = gControllers[cameraIdx].button & L_CBUTTONS; // button held
|
||||||
Camera* camera = &cameras[cameraIdx];
|
Camera* camera = &cameras[cameraIdx];
|
||||||
struct UnkStruct_800DC5EC* screenCtx = NULL;
|
ScreenContext* screenCtx = NULL;
|
||||||
|
|
||||||
if (CVarGetInteger("gLookBehind", false) == false) {
|
if (CVarGetInteger("gLookBehind", false) == false) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -6682,7 +6682,7 @@ void look_behind_toggle(s32 cameraIdx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the screen context
|
// Get the screen context
|
||||||
screenCtx = &D_8015F480[cameras[cameraIdx].playerId];
|
screenCtx = &gScreenContexts[cameras[cameraIdx].playerId];
|
||||||
|
|
||||||
if (gRaceState == RACE_IN_PROGRESS) {
|
if (gRaceState == RACE_IN_PROGRESS) {
|
||||||
// Flip the camera
|
// Flip the camera
|
||||||
|
|
@ -7816,7 +7816,7 @@ void func_8001BE78(void) {
|
||||||
|
|
||||||
void func_8001C05C(void) {
|
void func_8001C05C(void) {
|
||||||
init_segment_racing();
|
init_segment_racing();
|
||||||
gCurrentCourseId = COURSE_AWARD_CEREMONY;
|
gCurrentCourseId = TRACK_AWARD_CEREMONY;
|
||||||
SelectPodiumCeremony();
|
SelectPodiumCeremony();
|
||||||
D_8016347C = 0;
|
D_8016347C = 0;
|
||||||
D_8016347E = 0;
|
D_8016347E = 0;
|
||||||
|
|
|
||||||
|
|
@ -233,30 +233,6 @@ void func_8003F46C(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
CM_SomeCollisionThing(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
CM_SomeCollisionThing(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||||
// switch (gCurrentCourseId) {
|
|
||||||
// case COURSE_MARIO_RACEWAY:
|
|
||||||
// //func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
||||||
// break;
|
|
||||||
// case COURSE_CHOCO_MOUNTAIN:
|
|
||||||
// case COURSE_KOOPA_BEACH:
|
|
||||||
// func_8003E37C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
||||||
// break;
|
|
||||||
// case COURSE_BOWSER_CASTLE:
|
|
||||||
// func_8003E6EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
||||||
// break;
|
|
||||||
// case COURSE_LUIGI_RACEWAY:
|
|
||||||
// func_8003E9EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
||||||
// break;
|
|
||||||
// case COURSE_WARIO_STADIUM:
|
|
||||||
// func_8003EE2C(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
||||||
// break;
|
|
||||||
// case COURSE_DK_JUNGLE:
|
|
||||||
// func_8003F138(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
if (player->effects & 0x10000) {
|
if (player->effects & 0x10000) {
|
||||||
player->unk_DAC = 0.5f;
|
player->unk_DAC = 0.5f;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -411,31 +411,31 @@ void func_80057C60(void) {
|
||||||
void func_80057CE4(void) {
|
void func_80057CE4(void) {
|
||||||
switch (D_8018D21C) {
|
switch (D_8018D21C) {
|
||||||
case 0:
|
case 0:
|
||||||
func_802A3730(D_800DC5EC);
|
func_802A3730(gScreenOneCtx);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
func_802A3730(D_800DC5EC);
|
func_802A3730(gScreenOneCtx);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
func_802A3730(D_800DC5F0);
|
func_802A3730(gScreenTwoCtx);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
func_802A3730(D_800DC5EC);
|
func_802A3730(gScreenOneCtx);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
func_802A3730(D_800DC5F0);
|
func_802A3730(gScreenTwoCtx);
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
func_802A3730(D_800DC5EC);
|
func_802A3730(gScreenOneCtx);
|
||||||
break;
|
break;
|
||||||
case 9:
|
case 9:
|
||||||
func_802A3730(D_800DC5F0);
|
func_802A3730(gScreenTwoCtx);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
func_802A3730(D_800DC5F4);
|
func_802A3730(gScreenThreeCtx);
|
||||||
break;
|
break;
|
||||||
case 11:
|
case 11:
|
||||||
func_802A3730(D_800DC5F8);
|
func_802A3730(gScreenFourCtx);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -489,7 +489,7 @@ void func_80057FC4(u32 arg0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void render_object(struct UnkStruct_800DC5EC* screen) {
|
void render_object(ScreenContext* screen) {
|
||||||
UNUSED Gfx* temp_v1;
|
UNUSED Gfx* temp_v1;
|
||||||
|
|
||||||
if (gHUDDisable != 0) {
|
if (gHUDDisable != 0) {
|
||||||
|
|
@ -539,7 +539,7 @@ void render_player_snow_effect(Camera* camera) {
|
||||||
void render_object_for_player(s32 cameraId) {
|
void render_object_for_player(s32 cameraId) {
|
||||||
CM_DrawObjects(cameraId);
|
CM_DrawObjects(cameraId);
|
||||||
CM_DrawParticles(cameraId);
|
CM_DrawParticles(cameraId);
|
||||||
CM_RenderCourseObjects(cameraId);
|
CM_DrawTrackObjects(cameraId);
|
||||||
CM_DrawEditor();
|
CM_DrawEditor();
|
||||||
|
|
||||||
render_object_smoke_particles(cameraId);
|
render_object_smoke_particles(cameraId);
|
||||||
|
|
@ -1177,7 +1177,7 @@ void func_80059D00(void) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
update_object();
|
tick_objects();
|
||||||
CM_TickObjects();
|
CM_TickObjects();
|
||||||
CM_TickParticles();
|
CM_TickParticles();
|
||||||
func_800744CC();
|
func_800744CC();
|
||||||
|
|
@ -1348,81 +1348,10 @@ void func_8005A71C(void) {
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_object(void) {
|
void tick_objects(void) {
|
||||||
|
|
||||||
CM_UpdateCourseObjects();
|
CM_TickTrackObjects();
|
||||||
|
|
||||||
// switch (gCurrentCourseId) {
|
|
||||||
// case COURSE_MARIO_RACEWAY:
|
|
||||||
// case COURSE_CHOCO_MOUNTAIN:
|
|
||||||
// break;
|
|
||||||
// case COURSE_BOWSER_CASTLE:
|
|
||||||
// func_80081208();
|
|
||||||
// update_flame_particle();
|
|
||||||
// break;
|
|
||||||
// case COURSE_BANSHEE_BOARDWALK:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// update_trash_bin();
|
|
||||||
// func_8007E4C4();
|
|
||||||
// if (gModeSelection != TIME_TRIALS) {
|
|
||||||
// update_bat();
|
|
||||||
// }
|
|
||||||
// wrapper_update_boos();
|
|
||||||
// update_cheep_cheep(0);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_YOSHI_VALLEY:
|
|
||||||
// func_80083080();
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// update_hedgehogs();
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_FRAPPE_SNOWLAND:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// update_snowmen();
|
|
||||||
// }
|
|
||||||
// update_snowflakes();
|
|
||||||
// break;
|
|
||||||
// case COURSE_KOOPA_BEACH:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// update_crabs();
|
|
||||||
// }
|
|
||||||
// if ((gPlayerCount == 1) || (gPlayerCount == 2) || (gGamestate == CREDITS_SEQUENCE)) {
|
|
||||||
// update_seagulls();
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_LUIGI_RACEWAY:
|
|
||||||
// if (D_80165898 != 0) {
|
|
||||||
// update_hot_air_balloon();
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_MOO_MOO_FARM:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// update_moles();
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_KALIMARI_DESERT:
|
|
||||||
// update_train_smoke();
|
|
||||||
// break;
|
|
||||||
// case COURSE_SHERBET_LAND:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// func_800842C8();
|
|
||||||
// }
|
|
||||||
// update_penguins();
|
|
||||||
// break;
|
|
||||||
// case COURSE_RAINBOW_ROAD:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// update_neon();
|
|
||||||
// update_chain_chomps();
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_DK_JUNGLE:
|
|
||||||
// update_ferries_smoke_particle();
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// if (D_80165730 != 0) {
|
|
||||||
// func_80074EE8(); // Grand prix balloons
|
|
||||||
//}
|
|
||||||
func_80076F2C();
|
func_80076F2C();
|
||||||
if (!IsFrappeSnowland()) {
|
if (!IsFrappeSnowland()) {
|
||||||
update_leaf();
|
update_leaf();
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ void func_80057CE4(void);
|
||||||
void func_80057DD0(void);
|
void func_80057DD0(void);
|
||||||
void func_80057FC4(u32);
|
void func_80057FC4(u32);
|
||||||
|
|
||||||
void render_object(struct UnkStruct_800DC5EC* screen);
|
void render_object(ScreenContext* screen);
|
||||||
void render_player_snow_effect(Camera* camera);
|
void render_player_snow_effect(Camera* camera);
|
||||||
void render_object_for_player(s32);
|
void render_object_for_player(s32);
|
||||||
void render_snowing_effect(s32);
|
void render_snowing_effect(s32);
|
||||||
|
|
@ -84,7 +84,7 @@ void func_8005A14C(s32);
|
||||||
void func_8005A380(void);
|
void func_8005A380(void);
|
||||||
void func_8005A3C0(void);
|
void func_8005A3C0(void);
|
||||||
void func_8005A71C(void);
|
void func_8005A71C(void);
|
||||||
void update_object(void);
|
void tick_objects(void);
|
||||||
void func_8005A99C(void);
|
void func_8005A99C(void);
|
||||||
void func_8005AA34(void);
|
void func_8005AA34(void);
|
||||||
void func_8005AA4C(void);
|
void func_8005AA4C(void);
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include "port/Game.h"
|
#include "port/Game.h"
|
||||||
#include "port/Engine.h"
|
#include "port/Engine.h"
|
||||||
|
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
|
|
||||||
void init_hud(void) {
|
void init_hud(void) {
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ void clear_object_list() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dma's mario kart 64 logo and course outline textures.
|
* Dma's mario kart 64 logo and track outline textures.
|
||||||
*/
|
*/
|
||||||
u8* dma_misc_textures(u8* devAddr, u8* baseAddress, u32 size, u32 offset) {
|
u8* dma_misc_textures(u8* devAddr, u8* baseAddress, u32 size, u32 offset) {
|
||||||
#ifdef TARGET_N64
|
#ifdef TARGET_N64
|
||||||
|
|
@ -168,8 +168,8 @@ void get_minimap_properties() {
|
||||||
// This is incredibly dumb. MinimapDimensions ought to be something more like
|
// This is incredibly dumb. MinimapDimensions ought to be something more like
|
||||||
// `u16 MinimapDimensions[][2]` but that doesn't match for some insane reason
|
// `u16 MinimapDimensions[][2]` but that doesn't match for some insane reason
|
||||||
|
|
||||||
gMinimapWidth = CM_GetProps()->Minimap.Width; // MinimapDimensions[courseId * 2];
|
gMinimapWidth = CM_GetProps()->Minimap.Width; // MinimapDimensions[trackId * 2];
|
||||||
gMinimapHeight = CM_GetProps()->Minimap.Height; // MinimapDimensions[courseId * 2 + 1];
|
gMinimapHeight = CM_GetProps()->Minimap.Height; // MinimapDimensions[trackId * 2 + 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8006EF60(void) {
|
void func_8006EF60(void) {
|
||||||
|
|
@ -243,8 +243,8 @@ void func_8006F824(s32 arg0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_8006F8CC(void) {
|
void func_8006F8CC(void) {
|
||||||
if (gCourseMapInit == 0) {
|
if (gTrackMapInit == 0) {
|
||||||
gCourseMapInit = 1;
|
gTrackMapInit = 1;
|
||||||
gHUDModes = 0;
|
gHUDModes = 0;
|
||||||
D_801657E6 = 0;
|
D_801657E6 = 0;
|
||||||
D_801657F0 = 0;
|
D_801657F0 = 0;
|
||||||
|
|
@ -618,55 +618,6 @@ void func_8007055C(void) {
|
||||||
s32 var_s4;
|
s32 var_s4;
|
||||||
|
|
||||||
CM_InitClouds();
|
CM_InitClouds();
|
||||||
|
|
||||||
switch (gCurrentCourseId) {
|
|
||||||
case COURSE_MARIO_RACEWAY:
|
|
||||||
// Uses Kalimari Desert's clouds for initialization?
|
|
||||||
// init_clouds(gKalimariDesertClouds);
|
|
||||||
break;
|
|
||||||
// case COURSE_YOSHI_VALLEY:
|
|
||||||
// init_clouds(gYoshiValleyMooMooFarmClouds);
|
|
||||||
// break;
|
|
||||||
// case COURSE_FRAPPE_SNOWLAND:
|
|
||||||
// if (gPlayerCount == 1) {
|
|
||||||
// var_s4 = 0x32;
|
|
||||||
// } else {
|
|
||||||
// var_s4 = 0x19;
|
|
||||||
// }
|
|
||||||
// for (var_s0 = 0; var_s0 < var_s4; var_s0++) {
|
|
||||||
// find_unused_obj_index(&D_8018CC80[D_8018D1F8 + var_s0]);
|
|
||||||
// }
|
|
||||||
// D_8018D1F8 += var_s0;
|
|
||||||
// D_8018D1F0 = var_s0;
|
|
||||||
// break;
|
|
||||||
// case COURSE_KOOPA_BEACH:
|
|
||||||
// init_clouds(gKoopaTroopaBeachClouds);
|
|
||||||
// break;
|
|
||||||
// case COURSE_ROYAL_RACEWAY:
|
|
||||||
// init_clouds(gRoyalRacewayClouds);
|
|
||||||
// break;
|
|
||||||
// case COURSE_LUIGI_RACEWAY:
|
|
||||||
// init_clouds(gLuigiRacewayClouds);
|
|
||||||
// break;
|
|
||||||
// case COURSE_MOO_MOO_FARM:
|
|
||||||
// init_clouds(gYoshiValleyMooMooFarmClouds);
|
|
||||||
// break;
|
|
||||||
// case COURSE_TOADS_TURNPIKE:
|
|
||||||
// init_stars(gToadsTurnpikeRainbowRoadStars);
|
|
||||||
// break;
|
|
||||||
// case COURSE_KALIMARI_DESERT:
|
|
||||||
// init_clouds(gKalimariDesertClouds);
|
|
||||||
// break;
|
|
||||||
// case COURSE_SHERBET_LAND:
|
|
||||||
// init_clouds(gSherbetLandClouds);
|
|
||||||
// break;
|
|
||||||
// case COURSE_RAINBOW_ROAD:
|
|
||||||
// init_stars(gToadsTurnpikeRainbowRoadStars);
|
|
||||||
// break;
|
|
||||||
// case COURSE_WARIO_STADIUM:
|
|
||||||
// init_stars(gWarioStadiumStars);
|
|
||||||
// break;
|
|
||||||
}
|
|
||||||
func_8008C23C();
|
func_8008C23C();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -688,260 +639,7 @@ void init_course_object(void) {
|
||||||
s32 objectId;
|
s32 objectId;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
CM_InitCourseObjects();
|
CM_InitTrackObjects();
|
||||||
|
|
||||||
// switch (gCurrentCourseId) {
|
|
||||||
// case COURSE_MARIO_RACEWAY:
|
|
||||||
// // if (gGamestate != 9) {
|
|
||||||
// // if (gModeSelection == GRAND_PRIX) {
|
|
||||||
// // func_80070714();
|
|
||||||
// // }
|
|
||||||
// // for (i = 0; i < D_80165738; i++) {
|
|
||||||
// // find_unused_obj_index(&gObjectParticle3[i]);
|
|
||||||
// // init_object(gObjectParticle3[i], 0);
|
|
||||||
// // }
|
|
||||||
// // }
|
|
||||||
// break;
|
|
||||||
// case COURSE_BOWSER_CASTLE:
|
|
||||||
// gNumActiveThwomps = NUM_THWOMPS_100CC_EXTRA;
|
|
||||||
// gThowmpSpawnList = gThwompSpawns100CCExtra;
|
|
||||||
// switch (gCCSelection) { /* switch 1; irregular */
|
|
||||||
// case CC_100: /* switch 1 */
|
|
||||||
// case CC_EXTRA: /* switch 1 */
|
|
||||||
// break;
|
|
||||||
// case CC_50: /* switch 1 */
|
|
||||||
// gNumActiveThwomps = NUM_THWOMPS_50CC;
|
|
||||||
// gThowmpSpawnList = gThomwpSpawns50CC;
|
|
||||||
// break;
|
|
||||||
// case CC_150: /* switch 1 */
|
|
||||||
// gNumActiveThwomps = NUM_THWOMPS_150CC;
|
|
||||||
// gThowmpSpawnList = gThomwpSpawns150CC;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < gNumActiveThwomps; i++) {
|
|
||||||
// objectId = indexObjectList1[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].origin_pos[0] = gThowmpSpawnList[i].startX * xOrientation;
|
|
||||||
// gObjectList[objectId].origin_pos[2] = gThowmpSpawnList[i].startZ;
|
|
||||||
// gObjectList[objectId].unk_0D5 = gThowmpSpawnList[i].unk_4;
|
|
||||||
// gObjectList[objectId].primAlpha = gThowmpSpawnList[i].unk_6;
|
|
||||||
// }
|
|
||||||
// // Handle the big statue's fire breath
|
|
||||||
// objectId = indexObjectList2[0];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].pos[0] = -68.0 * xOrientation;
|
|
||||||
// gObjectList[objectId].pos[1] = 80.0f;
|
|
||||||
// gObjectList[objectId].pos[2] = -1840.0f;
|
|
||||||
// // Handle the smaller statues' fire breath
|
|
||||||
// for (i = 0; i < NUM_FIRE_BREATHS; i++) {
|
|
||||||
// objectId = indexObjectList3[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].pos[0] = gFireBreathsSpawns[i][0] * xOrientation;
|
|
||||||
// gObjectList[objectId].pos[1] = gFireBreathsSpawns[i][1];
|
|
||||||
// gObjectList[objectId].pos[2] = gFireBreathsSpawns[i][2];
|
|
||||||
// gObjectList[objectId].direction_angle[1] = 0;
|
|
||||||
// if (i % 2U) {
|
|
||||||
// gObjectList[objectId].direction_angle[1] += 0x8000;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < 32; i++) {
|
|
||||||
// delete_object(&indexObjectList4[i]);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_BANSHEE_BOARDWALK:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// objectId = indexObjectList1[0];
|
|
||||||
// init_texture_object(objectId, d_course_banshee_boardwalk_bat_tlut, sBoardwalkTexList, 0x20U,
|
|
||||||
// (u16) 0x00000040);
|
|
||||||
// gObjectList[objectId].orientation[0] = 0;
|
|
||||||
// gObjectList[objectId].orientation[1] = 0;
|
|
||||||
// gObjectList[objectId].orientation[2] = 0x8000;
|
|
||||||
// init_object(indexObjectList1[1], 0);
|
|
||||||
// init_object(indexObjectList1[2], 0);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_YOSHI_VALLEY:
|
|
||||||
// for (i = 0; i < NUM_YV_FLAG_POLES; i++) {
|
|
||||||
// init_object(indexObjectList1[i], 0);
|
|
||||||
// }
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// for (i = 0; i < NUM_HEDGEHOGS; i++) {
|
|
||||||
// objectId = indexObjectList2[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].pos[0] = gObjectList[objectId].origin_pos[0] =
|
|
||||||
// gHedgehogSpawns[i].pos[0] * xOrientation;
|
|
||||||
// gObjectList[objectId].pos[1] = gObjectList[objectId].surfaceHeight =
|
|
||||||
// gHedgehogSpawns[i].pos[1] + 6.0;
|
|
||||||
// gObjectList[objectId].pos[2] = gObjectList[objectId].origin_pos[2] = gHedgehogSpawns[i].pos[2];
|
|
||||||
// gObjectList[objectId].unk_0D5 = gHedgehogSpawns[i].unk_06;
|
|
||||||
// gObjectList[objectId].unk_09C = gHedgehogPatrolPoints[i][0] * xOrientation;
|
|
||||||
// gObjectList[objectId].unk_09E = gHedgehogPatrolPoints[i][2];
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_FRAPPE_SNOWLAND:
|
|
||||||
// for (i = 0; i < NUM_SNOWFLAKES; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle1[i]);
|
|
||||||
// }
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// for (i = 0; i < NUM_SNOWMEN; i++) {
|
|
||||||
// objectId = indexObjectList2[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].origin_pos[0] = gSnowmanSpawns[i].pos[0] * xOrientation;
|
|
||||||
// gObjectList[objectId].origin_pos[1] = gSnowmanSpawns[i].pos[1] + 5.0 + 3.0;
|
|
||||||
// gObjectList[objectId].origin_pos[2] = gSnowmanSpawns[i].pos[2];
|
|
||||||
// objectId = indexObjectList1[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].origin_pos[0] = gSnowmanSpawns[i].pos[0] * xOrientation;
|
|
||||||
// gObjectList[objectId].origin_pos[1] = gSnowmanSpawns[i].pos[1] + 3.0;
|
|
||||||
// gObjectList[objectId].origin_pos[2] = gSnowmanSpawns[i].pos[2];
|
|
||||||
// gObjectList[objectId].unk_0D5 = gSnowmanSpawns[i].unk_6;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_KOOPA_BEACH:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// for (i = 0; i < NUM_CRABS; i++) {
|
|
||||||
// objectId = indexObjectList1[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].pos[0] = gObjectList[objectId].origin_pos[0] =
|
|
||||||
// gCrabSpawns[i].startX * xOrientation;
|
|
||||||
// gObjectList[objectId].unk_01C[0] = gCrabSpawns[i].patrolX * xOrientation;
|
|
||||||
|
|
||||||
// gObjectList[objectId].pos[2] = gObjectList[objectId].origin_pos[2] = gCrabSpawns[i].startZ;
|
|
||||||
// gObjectList[objectId].unk_01C[2] = gCrabSpawns[i].patrolZ;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < NUM_SEAGULLS; i++) {
|
|
||||||
// objectId = indexObjectList2[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// if (i < (NUM_SEAGULLS / 2)) {
|
|
||||||
// gObjectList[objectId].unk_0D5 = 0;
|
|
||||||
// } else {
|
|
||||||
// gObjectList[objectId].unk_0D5 = 1;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_ROYAL_RACEWAY:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// if (gModeSelection == GRAND_PRIX) {
|
|
||||||
// func_80070714();
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < D_80165738; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle3[i]);
|
|
||||||
// init_object(gObjectParticle3[i], 0);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_LUIGI_RACEWAY:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// if (gModeSelection == GRAND_PRIX) {
|
|
||||||
// func_80070714();
|
|
||||||
// }
|
|
||||||
// D_80165898 = 0;
|
|
||||||
// init_object(indexObjectList1[0], 0);
|
|
||||||
// for (i = 0; i < D_80165738; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle3[i]);
|
|
||||||
// init_object(gObjectParticle3[i], 0);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_MOO_MOO_FARM:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// if ((gPlayerCount == 1) || ((gPlayerCount == 2) && (gModeSelection == VERSUS))) {
|
|
||||||
// switch (gCCSelection) { /* switch 2; irregular */
|
|
||||||
// case CC_50: /* switch 2 */
|
|
||||||
// D_8018D1C8 = 4;
|
|
||||||
// D_8018D1D0 = 6;
|
|
||||||
// D_8018D1D8 = 6;
|
|
||||||
// break;
|
|
||||||
// case CC_100: /* switch 2 */
|
|
||||||
// D_8018D1C8 = 5;
|
|
||||||
// D_8018D1D0 = 8;
|
|
||||||
// D_8018D1D8 = 8;
|
|
||||||
// break;
|
|
||||||
// case CC_150: /* switch 2 */
|
|
||||||
// D_8018D1C8 = 5;
|
|
||||||
// D_8018D1D0 = 8;
|
|
||||||
// D_8018D1D8 = 10;
|
|
||||||
// break;
|
|
||||||
// case CC_EXTRA: /* switch 2 */
|
|
||||||
// D_8018D1C8 = 5;
|
|
||||||
// D_8018D1D0 = 8;
|
|
||||||
// D_8018D1D8 = 8;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// } else {
|
|
||||||
// D_8018D1C8 = 4;
|
|
||||||
// D_8018D1D0 = 6;
|
|
||||||
// D_8018D1D8 = 6;
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < NUM_GROUP1_MOLES; i++) {
|
|
||||||
// D_8018D198[i] = 0;
|
|
||||||
// find_unused_obj_index(&indexObjectList1[i]);
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < NUM_GROUP2_MOLES; i++) {
|
|
||||||
// D_8018D1A8[i] = 0;
|
|
||||||
// find_unused_obj_index(&indexObjectList1[i]);
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < NUM_GROUP3_MOLES; i++) {
|
|
||||||
// D_8018D1B8[i] = 0;
|
|
||||||
// find_unused_obj_index(&indexObjectList1[i]);
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < NUM_TOTAL_MOLES; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle1[i]);
|
|
||||||
// objectId = gObjectParticle1[i];
|
|
||||||
// init_object(objectId, 0);
|
|
||||||
// gObjectList[objectId].pos[0] = gMoleSpawns.asVec3sList[i][0] * xOrientation;
|
|
||||||
// gObjectList[objectId].pos[2] = gMoleSpawns.asVec3sList[i][2];
|
|
||||||
// func_800887C0(objectId);
|
|
||||||
// gObjectList[objectId].sizeScaling = 0.7f;
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < gObjectParticle2_SIZE; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle2[i]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_KALIMARI_DESERT:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// find_unused_obj_index(&D_8018CF10);
|
|
||||||
// init_object(D_8018CF10, 0);
|
|
||||||
// for (i = 0; i < 50; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle1[i]);
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < 5; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle2[i]);
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < 32; i++) {
|
|
||||||
// find_unused_obj_index(&gObjectParticle3[i]);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_SHERBET_LAND:
|
|
||||||
// for (i = 0; i < NUM_PENGUINS; i++) {
|
|
||||||
// init_object(indexObjectList1[i], 0);
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_RAINBOW_ROAD:
|
|
||||||
// if (gGamestate != CREDITS_SEQUENCE) {
|
|
||||||
// for (i = 0; i < NUM_NEON_SIGNS; i++) {
|
|
||||||
// init_object(indexObjectList1[i], 0);
|
|
||||||
// }
|
|
||||||
// for (i = 0; i < NUM_CHAIN_CHOMPS; i++) {
|
|
||||||
// init_object(indexObjectList2[i], 0);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_DK_JUNGLE:
|
|
||||||
// for (i = 0; i < NUM_TORCHES; i++) {
|
|
||||||
// init_smoke_particles(i);
|
|
||||||
// // wtf?
|
|
||||||
// if (D_8018CF10) {}
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_hud_one_player(void) {
|
void init_hud_one_player(void) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ typedef struct {
|
||||||
/* 0x06 */ u16 unk6;
|
/* 0x06 */ u16 unk6;
|
||||||
/* 0x08 */ u16 unk8;
|
/* 0x08 */ u16 unk8;
|
||||||
/* 0x0A */ char padA[6];
|
/* 0x0A */ char padA[6];
|
||||||
} _struct_gCoursePathSizes_0x10; // size 0x10
|
} TrackPathSizes; // size 0x10
|
||||||
|
|
||||||
extern TrackPathPoint nullPath;
|
extern TrackPathPoint nullPath;
|
||||||
extern s16 gAIDistances[];
|
extern s16 gAIDistances[];
|
||||||
|
|
|
||||||
|
|
@ -1562,7 +1562,7 @@ MenuTexture D_02001B04[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Mario Raceway
|
* @brief MenuTexture of Track Preview Mario Raceway
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture seg2_mario_raceway_preview_texture[2] = {
|
MenuTexture seg2_mario_raceway_preview_texture[2] = {
|
||||||
|
|
@ -1571,7 +1571,7 @@ MenuTexture seg2_mario_raceway_preview_texture[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Choco Mountain
|
* @brief MenuTexture of Track Preview Choco Mountain
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001B54[2] = {
|
MenuTexture D_02001B54[2] = {
|
||||||
|
|
@ -1580,7 +1580,7 @@ MenuTexture D_02001B54[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Bowser Castle
|
* @brief MenuTexture of Track Preview Bowser Castle
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001B7C[2] = {
|
MenuTexture D_02001B7C[2] = {
|
||||||
|
|
@ -1589,7 +1589,7 @@ MenuTexture D_02001B7C[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Banshee Boardwalk
|
* @brief MenuTexture of Track Preview Banshee Boardwalk
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001BA4[2] = {
|
MenuTexture D_02001BA4[2] = {
|
||||||
|
|
@ -1598,7 +1598,7 @@ MenuTexture D_02001BA4[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Yoshi Valley
|
* @brief MenuTexture of Track Preview Yoshi Valley
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001BCC[2] = {
|
MenuTexture D_02001BCC[2] = {
|
||||||
|
|
@ -1607,7 +1607,7 @@ MenuTexture D_02001BCC[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Frappe Snowland
|
* @brief MenuTexture of Track Preview Frappe Snowland
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001BF4[2] = {
|
MenuTexture D_02001BF4[2] = {
|
||||||
|
|
@ -1616,7 +1616,7 @@ MenuTexture D_02001BF4[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Koopa Troopa Beach
|
* @brief MenuTexture of Track Preview Koopa Troopa Beach
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001C1C[2] = {
|
MenuTexture D_02001C1C[2] = {
|
||||||
|
|
@ -1625,7 +1625,7 @@ MenuTexture D_02001C1C[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Royal Raceway
|
* @brief MenuTexture of Track Preview Royal Raceway
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001C44[2] = {
|
MenuTexture D_02001C44[2] = {
|
||||||
|
|
@ -1634,7 +1634,7 @@ MenuTexture D_02001C44[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Luigi Raceway
|
* @brief MenuTexture of Track Preview Luigi Raceway
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001C6C[2] = {
|
MenuTexture D_02001C6C[2] = {
|
||||||
|
|
@ -1643,7 +1643,7 @@ MenuTexture D_02001C6C[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Moo Moo Farm
|
* @brief MenuTexture of Track Preview Moo Moo Farm
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001C94[2] = {
|
MenuTexture D_02001C94[2] = {
|
||||||
|
|
@ -1652,7 +1652,7 @@ MenuTexture D_02001C94[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Toads Turnpike
|
* @brief MenuTexture of Track Preview Toads Turnpike
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001CBC[2] = {
|
MenuTexture D_02001CBC[2] = {
|
||||||
|
|
@ -1661,7 +1661,7 @@ MenuTexture D_02001CBC[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Kalimari Desert
|
* @brief MenuTexture of Track Preview Kalimari Desert
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001CE4[2] = {
|
MenuTexture D_02001CE4[2] = {
|
||||||
|
|
@ -1670,7 +1670,7 @@ MenuTexture D_02001CE4[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Sherbet Land
|
* @brief MenuTexture of Track Preview Sherbet Land
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001D0C[2] = {
|
MenuTexture D_02001D0C[2] = {
|
||||||
|
|
@ -1679,7 +1679,7 @@ MenuTexture D_02001D0C[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Rainbow Road
|
* @brief MenuTexture of Track Preview Rainbow Road
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001D34[2] = {
|
MenuTexture D_02001D34[2] = {
|
||||||
|
|
@ -1688,7 +1688,7 @@ MenuTexture D_02001D34[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Wario Stadium
|
* @brief MenuTexture of Track Preview Wario Stadium
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001D5C[2] = {
|
MenuTexture D_02001D5C[2] = {
|
||||||
|
|
@ -1697,7 +1697,7 @@ MenuTexture D_02001D5C[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Block Fort
|
* @brief MenuTexture of Track Preview Block Fort
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001D84[2] = {
|
MenuTexture D_02001D84[2] = {
|
||||||
|
|
@ -1706,7 +1706,7 @@ MenuTexture D_02001D84[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Skyscraper
|
* @brief MenuTexture of Track Preview Skyscraper
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001DAC[2] = {
|
MenuTexture D_02001DAC[2] = {
|
||||||
|
|
@ -1715,7 +1715,7 @@ MenuTexture D_02001DAC[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Double Deck
|
* @brief MenuTexture of Track Preview Double Deck
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001DD4[2] = {
|
MenuTexture D_02001DD4[2] = {
|
||||||
|
|
@ -1724,7 +1724,7 @@ MenuTexture D_02001DD4[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview DKs Jungle Parkway
|
* @brief MenuTexture of Track Preview DKs Jungle Parkway
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001DFC[2] = {
|
MenuTexture D_02001DFC[2] = {
|
||||||
|
|
@ -1733,7 +1733,7 @@ MenuTexture D_02001DFC[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTexture of Course Preview Big Donut
|
* @brief MenuTexture of Track Preview Big Donut
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture D_02001E24[2] = {
|
MenuTexture D_02001E24[2] = {
|
||||||
|
|
@ -4496,7 +4496,7 @@ MenuTexture seg2_special_cup_texture[2] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief MenuTextures for the course preview mario raceway
|
* @brief MenuTextures for the track preview mario raceway
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
MenuTexture seg2_mario_raceway_preview_small_texture[2] = {
|
MenuTexture seg2_mario_raceway_preview_small_texture[2] = {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,6 @@
|
||||||
|
|
||||||
#include <actor_types.h>
|
#include <actor_types.h>
|
||||||
#include <common_structs.h>
|
#include <common_structs.h>
|
||||||
#include <course.h>
|
|
||||||
#include <course_offsets.h>
|
#include <course_offsets.h>
|
||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
#include <defines.h>
|
#include <defines.h>
|
||||||
|
|
|
||||||
|
|
@ -1602,90 +1602,6 @@ void func_8008FF08(Player* player, s8 playerId) {
|
||||||
s16 waypoint;
|
s16 waypoint;
|
||||||
|
|
||||||
CM_Waypoints(player, playerId);
|
CM_Waypoints(player, playerId);
|
||||||
|
|
||||||
// switch (gCurrentCourseId) {
|
|
||||||
// case COURSE_BOWSER_CASTLE:
|
|
||||||
// waypoint = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if ((waypoint >= 0x235) && (waypoint < 0x247)) {
|
|
||||||
// player->nearestPathPointId = 0x214;
|
|
||||||
// } else if ((waypoint >= 0x267) && (waypoint < 0x277)) {
|
|
||||||
// player->nearestPathPointId = 0x25B;
|
|
||||||
// } else {
|
|
||||||
// player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if (player->nearestPathPointId < 0) {
|
|
||||||
// player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_BANSHEE_BOARDWALK:
|
|
||||||
// waypoint = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if ((waypoint >= 0x12C) && (waypoint < 0x13C)) {
|
|
||||||
// player->nearestPathPointId = 0x12CU;
|
|
||||||
// } else {
|
|
||||||
// player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if (player->nearestPathPointId < 0) {
|
|
||||||
// player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_YOSHI_VALLEY:
|
|
||||||
// case COURSE_RAINBOW_ROAD:
|
|
||||||
// player->nearestPathPointId = gCopyNearestWaypointByPlayerId[playerId];
|
|
||||||
// break;
|
|
||||||
// case COURSE_FRAPPE_SNOWLAND:
|
|
||||||
// waypoint = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// #ifdef VERSION_EU
|
|
||||||
// if (((waypoint >= 0xF0) && (waypoint < 0x11E)) || ((gCopyNearestWaypointByPlayerId[playerId] >= 0xF0)
|
|
||||||
// &&
|
|
||||||
// (gCopyNearestWaypointByPlayerId[playerId] <
|
|
||||||
// 0x11E)))
|
|
||||||
// #else
|
|
||||||
// if ((waypoint >= 0xF0) && (waypoint < 0x105))
|
|
||||||
// #endif
|
|
||||||
// {
|
|
||||||
// player->nearestPathPointId = 0xF0U;
|
|
||||||
// } else {
|
|
||||||
// player->nearestPathPointId = gCopyNearestWaypointByPlayerId[playerId];
|
|
||||||
// if (player->nearestPathPointId < 0) {
|
|
||||||
// player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_ROYAL_RACEWAY:
|
|
||||||
// waypoint = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if ((waypoint >= 0x258) && (waypoint < 0x2A4)) {
|
|
||||||
// player->nearestPathPointId = 0x258U;
|
|
||||||
// } else {
|
|
||||||
// player->nearestPathPointId = gCopyNearestWaypointByPlayerId[playerId];
|
|
||||||
// if (player->nearestPathPointId < 0) {
|
|
||||||
// player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_DK_JUNGLE:
|
|
||||||
// waypoint = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if ((waypoint >= 0xB9) && (waypoint < 0x119)) {
|
|
||||||
// player->nearestPathPointId = 0xB9U;
|
|
||||||
// } else {
|
|
||||||
// player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if (player->nearestPathPointId < 0) {
|
|
||||||
// player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// case COURSE_BLOCK_FORT:
|
|
||||||
// case COURSE_SKYSCRAPER:
|
|
||||||
// case COURSE_DOUBLE_DECK:
|
|
||||||
// case COURSE_BIG_DONUT:
|
|
||||||
// player->nearestPathPointId = 0U;
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// player->nearestPathPointId = gNearestPathPointByPlayerId[playerId];
|
|
||||||
// if (player->nearestPathPointId < 0) {
|
|
||||||
// player->nearestPathPointId = gPathCountByPathIndex[0] + player->nearestPathPointId;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
|
void func_80090178(Player* player, s8 playerId, Vec3f arg2, Vec3f arg3) {
|
||||||
|
|
|
||||||
|
|
@ -1488,7 +1488,7 @@ void func_802847CC(CinematicCamera* camera) {
|
||||||
|
|
||||||
if (gCutsceneShotTimer == sp2C) {
|
if (gCutsceneShotTimer == sp2C) {
|
||||||
if (D_80286A04[D_800DC5E4].unk0 != 2) {
|
if (D_80286A04[D_800DC5E4].unk0 != 2) {
|
||||||
func_80280268(D_80286A04[D_800DC5E4 + 1].courseId);
|
func_80280268(D_80286A04[D_800DC5E4 + 1].trackId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ struct struct_80285D80 {
|
||||||
|
|
||||||
struct struct_80286A04 {
|
struct struct_80286A04 {
|
||||||
u8 unk0;
|
u8 unk0;
|
||||||
u8 courseId;
|
u8 trackId;
|
||||||
struct struct_80285D80* unk4;
|
struct struct_80285D80* unk4;
|
||||||
struct struct_80285D80* unk8;
|
struct struct_80285D80* unk8;
|
||||||
u16 unkC;
|
u16 unkC;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
#include "main.h"
|
#include "main.h"
|
||||||
#include "render_player.h"
|
#include "render_player.h"
|
||||||
|
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
#include "engine/Matrix.h"
|
#include "engine/Matrix.h"
|
||||||
#include "port/Game.h"
|
#include "port/Game.h"
|
||||||
|
|
||||||
|
|
@ -65,14 +65,14 @@ void func_80280038(Camera* camera) {
|
||||||
gSPMatrix(gDisplayListHead++, camera->lookAtMatrix,
|
gSPMatrix(gDisplayListHead++, camera->lookAtMatrix,
|
||||||
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
G_MTX_NOPUSH | G_MTX_MUL | G_MTX_PROJECTION);
|
||||||
gCurrentCourseId = gCreditsCourseId;
|
gCurrentCourseId = gCreditsCourseId;
|
||||||
SetCourseById(gCreditsCourseId);
|
SetTrackById(gCreditsCourseId);
|
||||||
mtxf_identity(matrix);
|
mtxf_identity(matrix);
|
||||||
render_set_position(matrix, 0);
|
render_set_position(matrix, 0);
|
||||||
render_course(D_800DC5EC);
|
render_track(gScreenOneCtx);
|
||||||
render_course_actors(D_800DC5EC);
|
render_course_actors(gScreenOneCtx);
|
||||||
CM_DrawActors(camera);
|
CM_DrawActors(camera);
|
||||||
CM_DrawStaticMeshActors();
|
CM_DrawStaticMeshActors();
|
||||||
render_object(D_800DC5EC);
|
render_object(gScreenOneCtx);
|
||||||
render_player_snow_effect(camera);
|
render_player_snow_effect(camera);
|
||||||
ceremony_transition_sliding_borders();
|
ceremony_transition_sliding_borders();
|
||||||
func_80281C40();
|
func_80281C40();
|
||||||
|
|
@ -81,20 +81,20 @@ void func_80280038(Camera* camera) {
|
||||||
init_rdp();
|
init_rdp();
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80280268(s32 courseId) {
|
void func_80280268(s32 trackId) {
|
||||||
gIsInQuitToMenuTransition = 1;
|
gIsInQuitToMenuTransition = 1;
|
||||||
gQuitToMenuTransitionCounter = 5;
|
gQuitToMenuTransitionCounter = 5;
|
||||||
D_802874A0 = 1;
|
D_802874A0 = 1;
|
||||||
if ((courseId < 0) || ((courseId >= NUM_COURSES - 1))) {
|
if ((trackId < 0) || ((trackId >= NUM_TRACKS - 1))) {
|
||||||
courseId = 0;
|
trackId = 0;
|
||||||
}
|
}
|
||||||
gCreditsCourseId = courseId;
|
gCreditsCourseId = trackId;
|
||||||
}
|
}
|
||||||
|
|
||||||
void credits_loop(void) {
|
void credits_loop(void) {
|
||||||
Editor_ClearMatrix();
|
Editor_ClearMatrix();
|
||||||
CM_TickEditor();
|
CM_TickEditor();
|
||||||
Camera* camera = D_800DC5EC->camera;
|
Camera* camera = gScreenOneCtx->camera;
|
||||||
|
|
||||||
f32 temp_f12;
|
f32 temp_f12;
|
||||||
f32 temp;
|
f32 temp;
|
||||||
|
|
@ -141,34 +141,34 @@ void load_credits(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CM_AttachCamera(camera, PLAYER_ONE);
|
CM_AttachCamera(camera, PLAYER_ONE);
|
||||||
D_800DC5EC->camera = camera;
|
gScreenOneCtx->camera = camera;
|
||||||
camera->renderMode = RENDER_FULL_SCENE;
|
camera->renderMode = RENDER_FULL_SCENE;
|
||||||
camera->unk_B4 = 60.0f;
|
camera->unk_B4 = 60.0f;
|
||||||
gCameraFOV[0] = 60.0f;
|
gCameraFOV[0] = 60.0f;
|
||||||
|
|
||||||
|
|
||||||
gCurrentCourseId = gCreditsCourseId;
|
gCurrentCourseId = gCreditsCourseId;
|
||||||
SetCourseById(gCreditsCourseId);
|
SetTrackById(gCreditsCourseId);
|
||||||
D_800DC5B4 = 1;
|
D_800DC5B4 = 1;
|
||||||
func_802A4D18();
|
func_802A4D18();
|
||||||
set_screen();
|
set_screen();
|
||||||
D_800DC5EC->screenWidth = SCREEN_WIDTH;
|
gScreenOneCtx->screenWidth = SCREEN_WIDTH;
|
||||||
D_800DC5EC->screenHeight = SCREEN_HEIGHT;
|
gScreenOneCtx->screenHeight = SCREEN_HEIGHT;
|
||||||
D_800DC5EC->screenStartX = SCREEN_WIDTH / 2;
|
gScreenOneCtx->screenStartX = SCREEN_WIDTH / 2;
|
||||||
D_800DC5EC->screenStartY = SCREEN_HEIGHT / 2;
|
gScreenOneCtx->screenStartY = SCREEN_HEIGHT / 2;
|
||||||
gScreenModeSelection = SCREEN_MODE_1P;
|
gScreenModeSelection = SCREEN_MODE_1P;
|
||||||
gActiveScreenMode = SCREEN_MODE_1P;
|
gActiveScreenMode = SCREEN_MODE_1P;
|
||||||
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
||||||
load_course(gCurrentCourseId);
|
load_track(gCurrentCourseId);
|
||||||
gFreeMemoryCourseAnchor = gNextFreeMemoryAddress;
|
gFreeMemoryCourseAnchor = gNextFreeMemoryAddress;
|
||||||
|
|
||||||
gCourseMinX = -0x15A1;
|
gTrackMinX = -0x15A1;
|
||||||
gCourseMinY = -0x15A1;
|
gTrackMinY = -0x15A1;
|
||||||
gCourseMinZ = -0x15A1;
|
gTrackMinZ = -0x15A1;
|
||||||
|
|
||||||
gCourseMaxX = 0x15A1;
|
gTrackMaxX = 0x15A1;
|
||||||
gCourseMaxY = 0x15A1;
|
gTrackMaxY = 0x15A1;
|
||||||
gCourseMaxZ = 0x15A1;
|
gTrackMaxZ = 0x15A1;
|
||||||
D_8015F59C = 0;
|
D_8015F59C = 0;
|
||||||
D_8015F5A0 = 0;
|
D_8015F5A0 = 0;
|
||||||
D_8015F58C = 0;
|
D_8015F58C = 0;
|
||||||
|
|
@ -190,7 +190,7 @@ void load_credits(void) {
|
||||||
init_hud();
|
init_hud();
|
||||||
func_80093E60();
|
func_80093E60();
|
||||||
func_80092688();
|
func_80092688();
|
||||||
if (D_800DC5EC) {}
|
if (gScreenOneCtx) {}
|
||||||
D_801625F8 = ((uintptr_t) gHeapEndPtr - gNextFreeMemoryAddress);
|
D_801625F8 = ((uintptr_t) gHeapEndPtr - gNextFreeMemoryAddress);
|
||||||
D_801625FC = ((f32) D_801625F8 / 1000.0f);
|
D_801625FC = ((f32) D_801625F8 / 1000.0f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,7 +97,7 @@ void setup_podium_ceremony(void) {
|
||||||
|
|
||||||
clear_D_802874D8_actors();
|
clear_D_802874D8_actors();
|
||||||
|
|
||||||
gCurrentCourseId = COURSE_ROYAL_RACEWAY;
|
gCurrentCourseId = TRACK_ROYAL_RACEWAY;
|
||||||
SelectPodiumCeremony();
|
SelectPodiumCeremony();
|
||||||
D_800DC5B4 = (u16) 1;
|
D_800DC5B4 = (u16) 1;
|
||||||
set_mirror_mode(0);
|
set_mirror_mode(0);
|
||||||
|
|
@ -105,25 +105,25 @@ void setup_podium_ceremony(void) {
|
||||||
D_80287554 = 0;
|
D_80287554 = 0;
|
||||||
func_802A4D18();
|
func_802A4D18();
|
||||||
set_screen();
|
set_screen();
|
||||||
D_800DC5EC->screenWidth = SCREEN_WIDTH;
|
gScreenOneCtx->screenWidth = SCREEN_WIDTH;
|
||||||
D_800DC5EC->screenHeight = SCREEN_HEIGHT;
|
gScreenOneCtx->screenHeight = SCREEN_HEIGHT;
|
||||||
D_800DC5EC->screenStartX = SCREEN_WIDTH / 2;
|
gScreenOneCtx->screenStartX = SCREEN_WIDTH / 2;
|
||||||
D_800DC5EC->screenStartY = SCREEN_HEIGHT / 2;
|
gScreenOneCtx->screenStartY = SCREEN_HEIGHT / 2;
|
||||||
gScreenModeSelection = SCREEN_MODE_1P;
|
gScreenModeSelection = SCREEN_MODE_1P;
|
||||||
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
gNextFreeMemoryAddress = gFreeMemoryResetAnchor;
|
||||||
gActiveScreenMode = SCREEN_MODE_1P;
|
gActiveScreenMode = SCREEN_MODE_1P;
|
||||||
gModeSelection = GRAND_PRIX;
|
gModeSelection = GRAND_PRIX;
|
||||||
load_course(gCurrentCourseId);
|
load_track(gCurrentCourseId);
|
||||||
gFreeMemoryCourseAnchor = (s32) gNextFreeMemoryAddress;
|
gFreeMemoryCourseAnchor = (s32) gNextFreeMemoryAddress;
|
||||||
gWaterLevel = -2000.0f;
|
gWaterLevel = -2000.0f;
|
||||||
|
|
||||||
gCourseMinX = -0x15A1;
|
gTrackMinX = -0x15A1;
|
||||||
gCourseMinY = -0x15A1;
|
gTrackMinY = -0x15A1;
|
||||||
gCourseMinZ = -0x15A1;
|
gTrackMinZ = -0x15A1;
|
||||||
|
|
||||||
gCourseMaxX = 0x15A1;
|
gTrackMaxX = 0x15A1;
|
||||||
gCourseMaxY = 0x15A1;
|
gTrackMaxY = 0x15A1;
|
||||||
gCourseMaxZ = 0x15A1;
|
gTrackMaxZ = 0x15A1;
|
||||||
|
|
||||||
D_8015F59C = 0;
|
D_8015F59C = 0;
|
||||||
D_8015F5A0 = 0;
|
D_8015F5A0 = 0;
|
||||||
|
|
@ -156,8 +156,8 @@ void setup_podium_ceremony(void) {
|
||||||
func_802818BC();
|
func_802818BC();
|
||||||
CM_CleanCameras();
|
CM_CleanCameras();
|
||||||
spawn_players_and_cameras();
|
spawn_players_and_cameras();
|
||||||
D_800DC5EC->camera->renderMode = RENDER_FULL_SCENE;
|
gScreenOneCtx->camera->renderMode = RENDER_FULL_SCENE;
|
||||||
D_800DC5EC->camera->unk_B4 = 60.0f;
|
gScreenOneCtx->camera->unk_B4 = 60.0f;
|
||||||
gCameraFOV[0] = 60.0f;
|
gCameraFOV[0] = 60.0f;
|
||||||
load_kart_textures();
|
load_kart_textures();
|
||||||
init_hud();
|
init_hud();
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,4 @@ extern s32 D_00835BA0;
|
||||||
extern u8 defaultCharacterIds[];
|
extern u8 defaultCharacterIds[];
|
||||||
extern s8 gGPOverallRanks[8];
|
extern s8 gGPOverallRanks[8];
|
||||||
|
|
||||||
extern s32 _course_banshee_boardwalk_dl_mio0SegmentRomStart;
|
|
||||||
extern s32 _course_yoshi_valley_dl_mio0SegmentRomStart;
|
|
||||||
|
|
||||||
#endif // CODE_80281780_H
|
#endif // CODE_80281780_H
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
|
|
||||||
#include "engine/Matrix.h"
|
#include "engine/Matrix.h"
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
#include "port/Game.h"
|
#include "port/Game.h"
|
||||||
|
|
||||||
struct UnkStruct80287560 {
|
struct UnkStruct80287560 {
|
||||||
|
|
@ -55,7 +55,7 @@ extern Gfx D_80284F70[];
|
||||||
extern Gfx D_80284EE0[];
|
extern Gfx D_80284EE0[];
|
||||||
|
|
||||||
void func_80281D00(void) {
|
void func_80281D00(void) {
|
||||||
Camera* camera = D_800DC5EC->camera;
|
Camera* camera = gScreenOneCtx->camera;
|
||||||
UNUSED s32 pad[3];
|
UNUSED s32 pad[3];
|
||||||
u16 perspNorm;
|
u16 perspNorm;
|
||||||
Mat4 matrix;
|
Mat4 matrix;
|
||||||
|
|
@ -90,7 +90,7 @@ void func_80281D00(void) {
|
||||||
render_players(camera, PLAYER_ONE);
|
render_players(camera, PLAYER_ONE);
|
||||||
gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0));
|
gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0));
|
||||||
update_actors_loop();
|
update_actors_loop();
|
||||||
render_object(D_800DC5EC);
|
render_object(gScreenOneCtx);
|
||||||
func_80021B0C();
|
func_80021B0C();
|
||||||
gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0));
|
gSPDisplayList(gDisplayListHead++, VIRTUAL_TO_PHYSICAL2(&D_80284EE0));
|
||||||
func_80093F10();
|
func_80093F10();
|
||||||
|
|
|
||||||
|
|
@ -208,7 +208,7 @@ struct FRotator {
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For selecting a section of a course path
|
* For selecting a section of a track path
|
||||||
* Usage: IPathSpan(point1, point2) --> IPathSpan(40, 65)
|
* Usage: IPathSpan(point1, point2) --> IPathSpan(40, 65)
|
||||||
*/
|
*/
|
||||||
struct IPathSpan {
|
struct IPathSpan {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "Cup.h"
|
#include "Cup.h"
|
||||||
#include "courses/Course.h"
|
#include "tracks/Track.h"
|
||||||
|
|
||||||
Cup::Cup(std::string id, const char* name, std::vector<std::shared_ptr<Course>> courses) {
|
Cup::Cup(std::string id, const char* name, std::vector<std::shared_ptr<Track>> courses) {
|
||||||
Id = id;
|
Id = id;
|
||||||
Name = name;
|
Name = name;
|
||||||
Courses = courses;
|
Courses = courses;
|
||||||
|
|
@ -23,14 +23,14 @@ void Cup::Previous() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Cup::SetCourse(size_t position) {
|
void Cup::SetTrack(size_t position) {
|
||||||
if ((position < 0) || (position >= Courses.size())) {
|
if ((position < 0) || (position >= Courses.size())) {
|
||||||
throw std::invalid_argument("Invalid course index.");
|
throw std::invalid_argument("Invalid track index.");
|
||||||
}
|
}
|
||||||
CursorPosition = position;
|
CursorPosition = position;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Course> Cup::GetCourse() {
|
std::shared_ptr<Track> Cup::GetTrack() {
|
||||||
return Courses[CursorPosition];
|
return Courses[CursorPosition];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,25 +3,25 @@
|
||||||
// Base Cup class
|
// Base Cup class
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "courses/Course.h"
|
#include "tracks/Track.h"
|
||||||
|
|
||||||
class Course; // <-- Forward declare
|
class Track; // <-- Forward declare
|
||||||
|
|
||||||
class Cup {
|
class Cup {
|
||||||
public:
|
public:
|
||||||
std::string Id;
|
std::string Id;
|
||||||
const char* Name;
|
const char* Name;
|
||||||
u8 *Thumbnail;
|
u8 *Thumbnail;
|
||||||
size_t CursorPosition = 0; // Course index in cup
|
size_t CursorPosition = 0; // Track index in cup
|
||||||
std::vector<std::shared_ptr<Course>> Courses;
|
std::vector<std::shared_ptr<Track>> Courses;
|
||||||
|
|
||||||
explicit Cup(std::string id, const char* name, std::vector<std::shared_ptr<Course>> courses);
|
explicit Cup(std::string id, const char* name, std::vector<std::shared_ptr<Track>> courses);
|
||||||
|
|
||||||
virtual void ShuffleCourses();
|
virtual void ShuffleCourses();
|
||||||
|
|
||||||
virtual void Next();
|
virtual void Next();
|
||||||
virtual void Previous();
|
virtual void Previous();
|
||||||
virtual void SetCourse(size_t position);
|
virtual void SetTrack(size_t position);
|
||||||
virtual std::shared_ptr<Course> GetCourse();
|
virtual std::shared_ptr<Track> GetTrack();
|
||||||
virtual size_t GetSize();
|
virtual size_t GetSize();
|
||||||
};
|
};
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#ifndef GAME_API_H
|
#ifndef GAME_API_H
|
||||||
#define GAME_API_H
|
#define GAME_API_H
|
||||||
|
|
||||||
void* GetCourse(void);
|
void* GetTrack(void);
|
||||||
|
|
||||||
#endif // GAME_API_H
|
#endif // GAME_API_H
|
||||||
|
|
|
||||||
|
|
@ -52,15 +52,15 @@ extern "C" void add_triangle_to_collision_mesh(Vtx* vtx1, Vtx* vtx2, Vtx* vtx3,
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceManager::Load() {
|
void RaceManager::Load() {
|
||||||
if (WorldContext.GetCurrentCourse()) {
|
if (WorldContext.GetTrack()) {
|
||||||
mirroredVtxCache.clear();
|
mirroredVtxCache.clear();
|
||||||
WorldContext.GetCurrentCourse()->Load();
|
WorldContext.GetTrack()->Load();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceManager::UnLoad() {
|
void RaceManager::UnLoad() {
|
||||||
if (WorldContext.GetCurrentCourse()) {
|
if (WorldContext.GetTrack()) {
|
||||||
WorldContext.GetCurrentCourse()->UnLoad();
|
WorldContext.GetTrack()->UnLoad();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,14 +74,14 @@ void RaceManager::PreInit() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RaceManager::BeginPlay() {
|
void RaceManager::BeginPlay() {
|
||||||
auto course = WorldContext.GetCurrentCourse();
|
auto track = WorldContext.GetTrack();
|
||||||
|
|
||||||
if (course) {
|
if (track) {
|
||||||
// Do not spawn finishline in credits or battle mode. And if bSpawnFinishline.
|
// Do not spawn finishline in credits or battle mode. And if bSpawnFinishline.
|
||||||
if ((gGamestate != CREDITS_SEQUENCE) && (gModeSelection != BATTLE)) {
|
if ((gGamestate != CREDITS_SEQUENCE) && (gModeSelection != BATTLE)) {
|
||||||
if (course->bSpawnFinishline) {
|
if (track->bSpawnFinishline) {
|
||||||
if (course->FinishlineSpawnPoint.has_value()) {
|
if (track->FinishlineSpawnPoint.has_value()) {
|
||||||
AFinishline::Spawn(course->FinishlineSpawnPoint.value(), IRotator(0, 0, 0));
|
AFinishline::Spawn(track->FinishlineSpawnPoint.value(), IRotator(0, 0, 0));
|
||||||
} else {
|
} else {
|
||||||
AFinishline::Spawn();
|
AFinishline::Spawn();
|
||||||
}
|
}
|
||||||
|
|
@ -90,7 +90,7 @@ void RaceManager::BeginPlay() {
|
||||||
}
|
}
|
||||||
gEditor.AddLight("Sun", nullptr, D_800DC610[1].l->l.dir);
|
gEditor.AddLight("Sun", nullptr, D_800DC610[1].l->l.dir);
|
||||||
|
|
||||||
course->BeginPlay();
|
track->BeginPlay();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
#include "Cup.h"
|
#include "Cup.h"
|
||||||
#include "courses/Course.h"
|
#include "tracks/Track.h"
|
||||||
#include "objects/BombKart.h"
|
#include "objects/BombKart.h"
|
||||||
#include "TrainCrossing.h"
|
#include "TrainCrossing.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
@ -27,7 +27,7 @@ extern "C" {
|
||||||
#include "engine/cameras/TourCamera.h"
|
#include "engine/cameras/TourCamera.h"
|
||||||
#include "engine/cameras/LookBehindCamera.h"
|
#include "engine/cameras/LookBehindCamera.h"
|
||||||
|
|
||||||
std::shared_ptr<Course> CurrentCourse;
|
std::shared_ptr<Track> mTrack;
|
||||||
Cup* CurrentCup;
|
Cup* CurrentCup;
|
||||||
|
|
||||||
World::World() {
|
World::World() {
|
||||||
|
|
@ -38,27 +38,27 @@ World::~World() {
|
||||||
CleanWorld();
|
CleanWorld();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::shared_ptr<Course> World::AddCourse(std::shared_ptr<Course> course) {
|
std::shared_ptr<Track> World::AddTrack(std::shared_ptr<Track> track) {
|
||||||
gWorldInstance.Courses.push_back(course);
|
gWorldInstance.Tracks.push_back(track);
|
||||||
return course;
|
return track;
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::AddCup(Cup* cup) {
|
void World::AddCup(Cup* cup) {
|
||||||
Cups.push_back(cup);
|
Cups.push_back(cup);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::SetCurrentCourse(std::shared_ptr<Course> course) {
|
void World::SetCurrentTrack(std::shared_ptr<Track> track) {
|
||||||
if (CurrentCourse) {
|
if (mTrack) {
|
||||||
UnLoadCourse();
|
UnLoadTrack();
|
||||||
}
|
}
|
||||||
if (CurrentCourse == course) {
|
if (mTrack == track) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
CurrentCourse = std::move(course);
|
mTrack = std::move(track);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::SetCourseFromCup() {
|
void World::SetTrackFromCup() {
|
||||||
SetCurrentCourse(CurrentCup->GetCourse());
|
SetCurrentTrack(CurrentCup->GetTrack());
|
||||||
}
|
}
|
||||||
|
|
||||||
TrainCrossing* World::AddCrossing(Vec3f position, u32 waypointMin, u32 waypointMax, f32 approachRadius,
|
TrainCrossing* World::AddCrossing(Vec3f position, u32 waypointMin, u32 waypointMax, f32 approachRadius,
|
||||||
|
|
@ -114,39 +114,39 @@ void World::SetCurrentCup(Cup* cup) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::SetCourse(const char* name) {
|
void World::SetTrack(const char* name) {
|
||||||
//! @todo Use content dictionary instead
|
//! @todo Use content dictionary instead
|
||||||
for (size_t i = 0; i < Courses.size(); i++) {
|
for (size_t i = 0; i < Tracks.size(); i++) {
|
||||||
if (strcmp(Courses[i]->Props.Name, name) == 0) {
|
if (strcmp(Tracks[i]->Props.Name, name) == 0) {
|
||||||
SetCurrentCourse(Courses[i]);
|
SetCurrentTrack(Tracks[i]);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::runtime_error("SetCourse() Course name not found in Courses list");
|
std::runtime_error("[World] [SetTrack()] Track name not found in Track list");
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::NextCourse() {
|
void World::NextTrack() {
|
||||||
if (CourseIndex < Courses.size() - 1) {
|
if (TrackIndex < Tracks.size() - 1) {
|
||||||
CourseIndex++;
|
TrackIndex++;
|
||||||
} else {
|
} else {
|
||||||
CourseIndex = 0;
|
TrackIndex = 0;
|
||||||
}
|
}
|
||||||
gWorldInstance.SetCurrentCourse(Courses[CourseIndex]);
|
gWorldInstance.SetCurrentTrack(Tracks[TrackIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::PreviousCourse() {
|
void World::PreviousTrack() {
|
||||||
if (CourseIndex > 0) {
|
if (TrackIndex > 0) {
|
||||||
CourseIndex--;
|
TrackIndex--;
|
||||||
} else {
|
} else {
|
||||||
CourseIndex = Courses.size() - 1;
|
TrackIndex = Tracks.size() - 1;
|
||||||
}
|
}
|
||||||
gWorldInstance.SetCurrentCourse(Courses[CourseIndex]);
|
gWorldInstance.SetCurrentTrack(Tracks[TrackIndex]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void World::TickCameras() {
|
void World::TickCameras() {
|
||||||
|
|
||||||
for (size_t i = 0; i < 4; i++) {
|
for (size_t i = 0; i < 4; i++) {
|
||||||
struct UnkStruct_800DC5EC* screen = &D_8015F480[i];
|
ScreenContext* screen = &gScreenContexts[i];
|
||||||
if (NULL == screen->pendingCamera) { continue; }
|
if (NULL == screen->pendingCamera) { continue; }
|
||||||
if (screen->pendingCamera != screen->camera) {
|
if (screen->pendingCamera != screen->camera) {
|
||||||
screen->camera = screen->pendingCamera;
|
screen->camera = screen->pendingCamera;
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
|
|
||||||
#include "CoreMath.h"
|
#include "CoreMath.h"
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
#include "engine/cameras/GameCamera.h"
|
#include "engine/cameras/GameCamera.h"
|
||||||
#include "objects/Object.h"
|
#include "objects/Object.h"
|
||||||
#include "Cup.h"
|
#include "Cup.h"
|
||||||
|
|
@ -29,7 +29,7 @@ extern "C" {
|
||||||
class Cup; // <-- Forward declaration
|
class Cup; // <-- Forward declaration
|
||||||
class OObject;
|
class OObject;
|
||||||
class GameCamera;
|
class GameCamera;
|
||||||
class Course;
|
class Track;
|
||||||
class StaticMeshActor;
|
class StaticMeshActor;
|
||||||
class OBombKart;
|
class OBombKart;
|
||||||
class TrainCrossing;
|
class TrainCrossing;
|
||||||
|
|
@ -52,7 +52,7 @@ typedef struct Matrix {
|
||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<Course> CurrentCourse;
|
std::shared_ptr<Track> mTrack;
|
||||||
Cup* CurrentCup;
|
Cup* CurrentCup;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -62,7 +62,7 @@ public:
|
||||||
RaceManager& GetRaceManager() { return *RaceManagerInstance; }
|
RaceManager& GetRaceManager() { return *RaceManagerInstance; }
|
||||||
void SetRaceManager(std::unique_ptr<RaceManager> manager) { RaceManagerInstance = std::move(manager); }
|
void SetRaceManager(std::unique_ptr<RaceManager> manager) { RaceManagerInstance = std::move(manager); }
|
||||||
|
|
||||||
std::shared_ptr<Course> AddCourse(std::shared_ptr<Course> course);
|
std::shared_ptr<Track> AddTrack(std::shared_ptr<Track> track);
|
||||||
|
|
||||||
void TickCameras();
|
void TickCameras();
|
||||||
|
|
||||||
|
|
@ -100,32 +100,32 @@ public:
|
||||||
u32 GetCupIndex();
|
u32 GetCupIndex();
|
||||||
u32 NextCup();
|
u32 NextCup();
|
||||||
u32 PreviousCup();
|
u32 PreviousCup();
|
||||||
void SetCourseFromCup();
|
void SetTrackFromCup();
|
||||||
|
|
||||||
World* GetWorld(void);
|
World* GetWorld(void);
|
||||||
void CleanWorld(void);
|
void CleanWorld(void);
|
||||||
|
|
||||||
// getter/setter for current course
|
// getter/setter for current track
|
||||||
std::shared_ptr<Course> GetCurrentCourse() {
|
std::shared_ptr<Track> GetTrack() {
|
||||||
return CurrentCourse;
|
return mTrack;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetCurrentCourse(std::shared_ptr<Course> course);
|
void SetCurrentTrack(std::shared_ptr<Track> track);
|
||||||
|
|
||||||
// These are only for browsing through the course list
|
// These are only for browsing through the track list
|
||||||
void SetCourse(const char*);
|
void SetTrack(const char*);
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void SetCourseByType() {
|
void SetTrackByType() {
|
||||||
for (const auto& course : Courses) {
|
for (const auto& track : Tracks) {
|
||||||
if (dynamic_cast<T*>(course.get())) {
|
if (dynamic_cast<T*>(track.get())) {
|
||||||
SetCurrentCourse(course);
|
SetCurrentTrack(track);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("World::SetCourseByType() No course by the type found");
|
printf("World::SetTrackByType() No track by the type found");
|
||||||
}
|
}
|
||||||
void NextCourse(void);
|
void NextTrack(void);
|
||||||
void PreviousCourse(void);
|
void PreviousTrack(void);
|
||||||
|
|
||||||
Matrix Mtx;
|
Matrix Mtx;
|
||||||
|
|
||||||
|
|
@ -147,9 +147,9 @@ public:
|
||||||
TrainCrossing* AddCrossing(Vec3f position, u32 waypointMin, u32 waypointMax, f32 approachRadius, f32 exitRadius);
|
TrainCrossing* AddCrossing(Vec3f position, u32 waypointMin, u32 waypointMax, f32 approachRadius, f32 exitRadius);
|
||||||
std::vector<std::shared_ptr<TrainCrossing>> Crossings;
|
std::vector<std::shared_ptr<TrainCrossing>> Crossings;
|
||||||
|
|
||||||
// Holds all available courses
|
// Holds all available tracks
|
||||||
std::vector<std::shared_ptr<Course>> Courses;
|
std::vector<std::shared_ptr<Track>> Tracks;
|
||||||
size_t CourseIndex = 0; // For browsing courses.
|
size_t TrackIndex = 0; // For browsing tracks.
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<RaceManager> RaceManagerInstance;
|
std::unique_ptr<RaceManager> RaceManagerInstance;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ AFallingRock::AFallingRock(SpawnParams params) : AActor(params) {
|
||||||
|
|
||||||
FVector pos = params.Location.value_or(FVector(0, 0, 0));
|
FVector pos = params.Location.value_or(FVector(0, 0, 0));
|
||||||
TimerLength = params.Behaviour.value_or(80);
|
TimerLength = params.Behaviour.value_or(80);
|
||||||
Pos[0] = pos.x * gCourseDirection;
|
Pos[0] = pos.x * gTrackDirection;
|
||||||
Pos[1] = pos.y + 10.0f;
|
Pos[1] = pos.y + 10.0f;
|
||||||
Pos[2] = pos.z;
|
Pos[2] = pos.z;
|
||||||
State = _count;
|
State = _count;
|
||||||
|
|
@ -49,7 +49,7 @@ void AFallingRock::SetSpawnParams(SpawnParams& params) {
|
||||||
void AFallingRock::Reset() {
|
void AFallingRock::Reset() {
|
||||||
RespawnTimer = TimerLength;
|
RespawnTimer = TimerLength;
|
||||||
FVector pos = SpawnPos;
|
FVector pos = SpawnPos;
|
||||||
Pos[0] = (f32) pos.x * gCourseDirection;
|
Pos[0] = (f32) pos.x * gTrackDirection;
|
||||||
Pos[1] = (f32) pos.y + 10.0f;
|
Pos[1] = (f32) pos.y + 10.0f;
|
||||||
Pos[2] = (f32) pos.z;
|
Pos[2] = (f32) pos.z;
|
||||||
vec3f_set(Velocity, 0, 0, 0);
|
vec3f_set(Velocity, 0, 0, 0);
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ AMarioSign::AMarioSign(const SpawnParams& params) : AActor(params) {
|
||||||
Speed = params.Speed.value_or(182);
|
Speed = params.Speed.value_or(182);
|
||||||
|
|
||||||
FVector pos = params.Location.value_or(FVector(0, 0, 0));
|
FVector pos = params.Location.value_or(FVector(0, 0, 0));
|
||||||
Pos[0] = pos.x * gCourseDirection;
|
Pos[0] = pos.x * gTrackDirection;
|
||||||
Pos[1] = pos.y;
|
Pos[1] = pos.y;
|
||||||
Pos[2] = pos.z;
|
Pos[2] = pos.z;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ AWarioSign::AWarioSign(const SpawnParams& params) : AActor(params) {
|
||||||
Speed = params.Speed.value_or(182);
|
Speed = params.Speed.value_or(182);
|
||||||
|
|
||||||
FVector pos = params.Location.value_or(FVector(0, 0, 0));
|
FVector pos = params.Location.value_or(FVector(0, 0, 0));
|
||||||
Pos[0] = pos.x * gCourseDirection;
|
Pos[0] = pos.x * gTrackDirection;
|
||||||
Pos[1] = pos.y;
|
Pos[1] = pos.y;
|
||||||
Pos[2] = pos.z;
|
Pos[2] = pos.z;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,12 +45,12 @@ void TourCamera::Reset() {
|
||||||
void TourCamera::NextShot() {
|
void TourCamera::NextShot() {
|
||||||
TourCamera::Reset();
|
TourCamera::Reset();
|
||||||
bShotComplete = false;
|
bShotComplete = false;
|
||||||
_camera->pos[0] = gWorldInstance.GetCurrentCourse()->TourShots[ShotIndex].Pos.x;
|
_camera->pos[0] = gWorldInstance.GetTrack()->TourShots[ShotIndex].Pos.x;
|
||||||
_camera->pos[1] = gWorldInstance.GetCurrentCourse()->TourShots[ShotIndex].Pos.y;
|
_camera->pos[1] = gWorldInstance.GetTrack()->TourShots[ShotIndex].Pos.y;
|
||||||
_camera->pos[2] = gWorldInstance.GetCurrentCourse()->TourShots[ShotIndex].Pos.z;
|
_camera->pos[2] = gWorldInstance.GetTrack()->TourShots[ShotIndex].Pos.z;
|
||||||
_camera->lookAt[0] = gWorldInstance.GetCurrentCourse()->TourShots[ShotIndex].LookAt.x;
|
_camera->lookAt[0] = gWorldInstance.GetTrack()->TourShots[ShotIndex].LookAt.x;
|
||||||
_camera->lookAt[1] = gWorldInstance.GetCurrentCourse()->TourShots[ShotIndex].LookAt.y;
|
_camera->lookAt[1] = gWorldInstance.GetTrack()->TourShots[ShotIndex].LookAt.y;
|
||||||
_camera->lookAt[2] = gWorldInstance.GetCurrentCourse()->TourShots[ShotIndex].LookAt.z;
|
_camera->lookAt[2] = gWorldInstance.GetTrack()->TourShots[ShotIndex].LookAt.z;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TourCamera::Stop() {
|
void TourCamera::Stop() {
|
||||||
|
|
@ -58,7 +58,7 @@ void TourCamera::Stop() {
|
||||||
gTourComplete = true;
|
gTourComplete = true;
|
||||||
CM_ResetAudio();
|
CM_ResetAudio();
|
||||||
|
|
||||||
D_8015F480[0].pendingCamera = &cameras[0];
|
gScreenContexts[0].pendingCamera = &cameras[0];
|
||||||
bActive = false;
|
bActive = false;
|
||||||
bTourComplete = true;
|
bTourComplete = true;
|
||||||
|
|
||||||
|
|
@ -76,7 +76,7 @@ void TourCamera::Tick() {
|
||||||
if (
|
if (
|
||||||
(nullptr == _camera) ||
|
(nullptr == _camera) ||
|
||||||
(bTourComplete) ||
|
(bTourComplete) ||
|
||||||
(ShotIndex >= gWorldInstance.GetCurrentCourse()->TourShots.size())
|
(ShotIndex >= gWorldInstance.GetTrack()->TourShots.size())
|
||||||
) {
|
) {
|
||||||
Alpha += 5;
|
Alpha += 5;
|
||||||
if (Alpha == 255) {
|
if (Alpha == 255) {
|
||||||
|
|
@ -108,7 +108,7 @@ void TourCamera::Tick() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool done = TourCamera::MoveCameraAlongSpline(&extraArg, gWorldInstance.GetCurrentCourse()->TourShots[ShotIndex].Frames);
|
bool done = TourCamera::MoveCameraAlongSpline(&extraArg, gWorldInstance.GetTrack()->TourShots[ShotIndex].Frames);
|
||||||
|
|
||||||
// Advance to the next camera shot
|
// Advance to the next camera shot
|
||||||
if (done) {
|
if (done) {
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ namespace Editor {
|
||||||
/**
|
/**
|
||||||
* Save track properties, static mesh actors, actors, and tour camera
|
* Save track properties, static mesh actors, actors, and tour camera
|
||||||
*/
|
*/
|
||||||
data["Props"] = gWorldInstance.GetCurrentCourse()->Props.to_json();
|
data["Props"] = gWorldInstance.GetTrack()->Props.to_json();
|
||||||
|
|
||||||
nlohmann::json staticMesh;
|
nlohmann::json staticMesh;
|
||||||
SaveStaticMeshActors(staticMesh);
|
SaveStaticMeshActors(staticMesh);
|
||||||
|
|
@ -54,7 +54,7 @@ namespace Editor {
|
||||||
data["Actors"] = actors;
|
data["Actors"] = actors;
|
||||||
|
|
||||||
|
|
||||||
if (gWorldInstance.GetCurrentCourse()->TourShots.size() != 0) {
|
if (gWorldInstance.GetTrack()->TourShots.size() != 0) {
|
||||||
nlohmann::json tour;
|
nlohmann::json tour;
|
||||||
SaveTour(tour);
|
SaveTour(tour);
|
||||||
data["Tour"] = tour;
|
data["Tour"] = tour;
|
||||||
|
|
@ -85,10 +85,10 @@ namespace Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Do not use gWorldInstance.CurrentCourse during loading! The current track is not guaranteed! **/
|
/** Do not use gWorldInstance.CurrentCourse during loading! The current track is not guaranteed! **/
|
||||||
void LoadLevel(Course* course, std::string sceneFile) {
|
void LoadLevel(Track* track, std::string sceneFile) {
|
||||||
SceneFile = sceneFile;
|
SceneFile = sceneFile;
|
||||||
if ((nullptr == course) || (nullptr == course->RootArchive)) {
|
if ((nullptr == track) || (nullptr == track->RootArchive)) {
|
||||||
SPDLOG_INFO("[SceneManager] [LoadLevel] Failed to load scenefile, course or rootarchive were null");
|
SPDLOG_INFO("[SceneManager] [LoadLevel] Failed to load scenefile, track or rootarchive were null");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -97,7 +97,7 @@ namespace Editor {
|
||||||
* the init data needs to be manually populated
|
* the init data needs to be manually populated
|
||||||
*/
|
*/
|
||||||
auto initData = std::make_shared<Ship::ResourceInitData>();
|
auto initData = std::make_shared<Ship::ResourceInitData>();
|
||||||
initData->Parent = course->RootArchive;
|
initData->Parent = track->RootArchive;
|
||||||
initData->Format = RESOURCE_FORMAT_BINARY;
|
initData->Format = RESOURCE_FORMAT_BINARY;
|
||||||
initData->ByteOrder = Ship::Endianness::Little;
|
initData->ByteOrder = Ship::Endianness::Little;
|
||||||
initData->Type = static_cast<uint32_t>(Ship::ResourceType::Json);
|
initData->Type = static_cast<uint32_t>(Ship::ResourceType::Json);
|
||||||
|
|
@ -116,10 +116,10 @@ namespace Editor {
|
||||||
SPDLOG_INFO("[SceneManager] [LoadLevel] Loading track scenefile...");
|
SPDLOG_INFO("[SceneManager] [LoadLevel] Loading track scenefile...");
|
||||||
|
|
||||||
// Load the Props, and populate actors
|
// Load the Props, and populate actors
|
||||||
LoadProps(course, data);
|
LoadProps(track, data);
|
||||||
LoadActors(course, data);
|
LoadActors(track, data);
|
||||||
LoadStaticMeshActors(course, data);
|
LoadStaticMeshActors(track, data);
|
||||||
LoadTour(course, data);
|
LoadTour(track, data);
|
||||||
SPDLOG_INFO("[SceneManager] [LoadLevel] Scene File Loaded!");
|
SPDLOG_INFO("[SceneManager] [LoadLevel] Scene File Loaded!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -138,11 +138,11 @@ namespace Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called from ContentBrowser.cpp
|
// Called from ContentBrowser.cpp
|
||||||
void LoadMinimap(Course* course, std::string filePath) {
|
void LoadMinimap(Track* track, std::string filePath) {
|
||||||
SPDLOG_INFO(" Loading {} minimap...", filePath);
|
SPDLOG_INFO(" Loading {} minimap...", filePath);
|
||||||
if (nullptr == course->RootArchive) {
|
if (nullptr == track->RootArchive) {
|
||||||
SPDLOG_INFO("[SceneManager] [LoadMinimap] Root archive is nullptr");
|
SPDLOG_INFO("[SceneManager] [LoadMinimap] Root archive is nullptr");
|
||||||
SetDefaultMinimap(course);
|
SetDefaultMinimap(track);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -151,7 +151,7 @@ namespace Editor {
|
||||||
* the init data needs to be manually populated
|
* the init data needs to be manually populated
|
||||||
*/
|
*/
|
||||||
auto initData = std::make_shared<Ship::ResourceInitData>();
|
auto initData = std::make_shared<Ship::ResourceInitData>();
|
||||||
initData->Parent = course->RootArchive;
|
initData->Parent = track->RootArchive;
|
||||||
initData->Format = RESOURCE_FORMAT_BINARY;
|
initData->Format = RESOURCE_FORMAT_BINARY;
|
||||||
initData->ByteOrder = Ship::Endianness::Little;
|
initData->ByteOrder = Ship::Endianness::Little;
|
||||||
initData->Type = static_cast<uint32_t>(MK64::ResourceType::Minimap);
|
initData->Type = static_cast<uint32_t>(MK64::ResourceType::Minimap);
|
||||||
|
|
@ -163,19 +163,19 @@ namespace Editor {
|
||||||
if (ptr) {
|
if (ptr) {
|
||||||
SPDLOG_INFO(" Minimap Loaded!");
|
SPDLOG_INFO(" Minimap Loaded!");
|
||||||
MK64::MinimapTexture texture = ptr->Texture;
|
MK64::MinimapTexture texture = ptr->Texture;
|
||||||
course->Props.Minimap.Texture = (const char*)texture.Data;
|
track->Props.Minimap.Texture = (const char*)texture.Data;
|
||||||
course->Props.Minimap.Width = texture.Width;
|
track->Props.Minimap.Width = texture.Width;
|
||||||
course->Props.Minimap.Height = texture.Height;
|
track->Props.Minimap.Height = texture.Height;
|
||||||
} else { // Fallback
|
} else { // Fallback
|
||||||
SetDefaultMinimap(course);
|
SetDefaultMinimap(track);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sets the default minimap if none has been set
|
// Sets the default minimap if none has been set
|
||||||
void SetDefaultMinimap(Course* course) {
|
void SetDefaultMinimap(Track* track) {
|
||||||
course->Props.Minimap.Texture = minimap_mario_raceway;
|
track->Props.Minimap.Texture = minimap_mario_raceway;
|
||||||
course->Props.Minimap.Width = ResourceGetTexWidthByName(course->Props.Minimap.Texture);
|
track->Props.Minimap.Width = ResourceGetTexWidthByName(track->Props.Minimap.Texture);
|
||||||
course->Props.Minimap.Height = ResourceGetTexHeightByName(course->Props.Minimap.Texture);
|
track->Props.Minimap.Height = ResourceGetTexHeightByName(track->Props.Minimap.Texture);
|
||||||
SPDLOG_INFO(" No minimap found! Falling back to default minimap");
|
SPDLOG_INFO(" No minimap found! Falling back to default minimap");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,47 +253,47 @@ namespace Editor {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SaveTour(nlohmann::json& tour) {
|
void SaveTour(nlohmann::json& tour) {
|
||||||
tour["Enabled"] = gWorldInstance.GetCurrentCourse()->bTourEnabled;
|
tour["Enabled"] = gWorldInstance.GetTrack()->bTourEnabled;
|
||||||
|
|
||||||
// Camera shots
|
// Camera shots
|
||||||
tour["Shots"] = nlohmann::json::array();
|
tour["Shots"] = nlohmann::json::array();
|
||||||
for (const auto& shot : gWorldInstance.GetCurrentCourse()->TourShots) {
|
for (const auto& shot : gWorldInstance.GetTrack()->TourShots) {
|
||||||
tour["Shots"].push_back(ToJson(shot));
|
tour["Shots"].push_back(ToJson(shot));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadProps(Course* course, nlohmann::json& data) {
|
void LoadProps(Track* track, nlohmann::json& data) {
|
||||||
if (!data.contains("Props") || !data["Props"].is_object()) {
|
if (!data.contains("Props") || !data["Props"].is_object()) {
|
||||||
SPDLOG_INFO("Track is missing props data. Is the scene.json file corrupt?");
|
SPDLOG_INFO("Track is missing props data. Is the scene.json file corrupt?");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
course->Props.from_json(data["Props"]);
|
track->Props.from_json(data["Props"]);
|
||||||
} catch(const std::exception& e) {
|
} catch(const std::exception& e) {
|
||||||
std::cerr << " Error parsing track properties: " << e.what() << std::endl;
|
std::cerr << " Error parsing track properties: " << e.what() << std::endl;
|
||||||
std::cerr << " Is your scene.json file out of date?" << std::endl;
|
std::cerr << " Is your scene.json file out of date?" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadActors(Course* course, nlohmann::json& data) {
|
void LoadActors(Track* track, nlohmann::json& data) {
|
||||||
if (!data.contains("Actors") || !data["Actors"].is_object()) {
|
if (!data.contains("Actors") || !data["Actors"].is_object()) {
|
||||||
SPDLOG_INFO(" This track contains no actors");
|
SPDLOG_INFO(" This track contains no actors");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
course->SpawnList.clear(); // Clear existing actors, if any
|
track->SpawnList.clear(); // Clear existing actors, if any
|
||||||
|
|
||||||
for (const auto& actor : data["Actors"]) {
|
for (const auto& actor : data["Actors"]) {
|
||||||
SpawnParams params;
|
SpawnParams params;
|
||||||
params.from_json(actor); //<SpawnParams>();
|
params.from_json(actor); //<SpawnParams>();
|
||||||
if (!params.Name.empty()) {
|
if (!params.Name.empty()) {
|
||||||
course->SpawnList.push_back(params);
|
track->SpawnList.push_back(params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadStaticMeshActors(Course* course, nlohmann::json& data) {
|
void LoadStaticMeshActors(Track* track, nlohmann::json& data) {
|
||||||
if (!data.contains("StaticMeshActors") || !data["StaticMeshActors"].is_object()) {
|
if (!data.contains("StaticMeshActors") || !data["StaticMeshActors"].is_object()) {
|
||||||
SPDLOG_INFO(" This track contains no StaticMeshActors!");
|
SPDLOG_INFO(" This track contains no StaticMeshActors!");
|
||||||
return;
|
return;
|
||||||
|
|
@ -306,7 +306,7 @@ namespace Editor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadTour(Course* course, nlohmann::json& data) {
|
void LoadTour(Track* track, nlohmann::json& data) {
|
||||||
if (!data.contains("Tour") || !data["Tour"].is_object()) {
|
if (!data.contains("Tour") || !data["Tour"].is_object()) {
|
||||||
SPDLOG_INFO(" This track does not contain a camera tour");
|
SPDLOG_INFO(" This track does not contain a camera tour");
|
||||||
return;
|
return;
|
||||||
|
|
@ -316,17 +316,17 @@ namespace Editor {
|
||||||
|
|
||||||
// Enable flag
|
// Enable flag
|
||||||
if (tours.contains("Enabled")) {
|
if (tours.contains("Enabled")) {
|
||||||
course->bTourEnabled = tours["Enabled"].get<bool>();
|
track->bTourEnabled = tours["Enabled"].get<bool>();
|
||||||
} else {
|
} else {
|
||||||
course->bTourEnabled = false;
|
track->bTourEnabled = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Camera shots
|
// Camera shots
|
||||||
if (tours.contains("Shots") && tours["Shots"].is_array()) {
|
if (tours.contains("Shots") && tours["Shots"].is_array()) {
|
||||||
course->TourShots.clear();
|
track->TourShots.clear();
|
||||||
|
|
||||||
for (const auto& shotJson : tours["Shots"]) {
|
for (const auto& shotJson : tours["Shots"]) {
|
||||||
course->TourShots.push_back(FromJsonCameraShot(shotJson));
|
track->TourShots.push_back(FromJsonCameraShot(shotJson));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,26 +2,26 @@
|
||||||
|
|
||||||
#include <libultraship/libultraship.h>
|
#include <libultraship/libultraship.h>
|
||||||
#include "CoreMath.h"
|
#include "CoreMath.h"
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
#include <optional>
|
#include <optional>
|
||||||
#include <nlohmann/json.hpp>
|
#include <nlohmann/json.hpp>
|
||||||
|
|
||||||
namespace Editor {
|
namespace Editor {
|
||||||
void SaveLevel();
|
void SaveLevel();
|
||||||
void LoadLevel(Course* course, std::string sceneFile);
|
void LoadLevel(Track* track, std::string sceneFile);
|
||||||
void Load_AddStaticMeshActor(const nlohmann::json& actorJson);
|
void Load_AddStaticMeshActor(const nlohmann::json& actorJson);
|
||||||
void SetSceneFile(std::shared_ptr<Ship::Archive> archive, std::string sceneFile);
|
void SetSceneFile(std::shared_ptr<Ship::Archive> archive, std::string sceneFile);
|
||||||
void LoadMinimap(Course* course, std::string filePath);
|
void LoadMinimap(Track* track, std::string filePath);
|
||||||
void SetDefaultMinimap(Course* course);
|
void SetDefaultMinimap(Track* track);
|
||||||
|
|
||||||
void SaveActors(nlohmann::json& actorList);
|
void SaveActors(nlohmann::json& actorList);
|
||||||
void SaveStaticMeshActors(nlohmann::json& actorList);
|
void SaveStaticMeshActors(nlohmann::json& actorList);
|
||||||
void SaveTour(nlohmann::json& tour);
|
void SaveTour(nlohmann::json& tour);
|
||||||
|
|
||||||
void LoadProps(Course* course, nlohmann::json& data);
|
void LoadProps(Track* track, nlohmann::json& data);
|
||||||
void LoadActors(Course* course, nlohmann::json& data);
|
void LoadActors(Track* track, nlohmann::json& data);
|
||||||
void LoadStaticMeshActors(Course* course, nlohmann::json& data);
|
void LoadStaticMeshActors(Track* track, nlohmann::json& data);
|
||||||
void LoadTour(Course* course, nlohmann::json& data);
|
void LoadTour(Track* track, nlohmann::json& data);
|
||||||
|
|
||||||
void SpawnActors(std::vector<std::pair<std::string, SpawnParams>> spawnList);
|
void SpawnActors(std::vector<std::pair<std::string, SpawnParams>> spawnList);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@ extern "C" {
|
||||||
#include "code_80057C60.h"
|
#include "code_80057C60.h"
|
||||||
#include "code_80005FD0.h"
|
#include "code_80005FD0.h"
|
||||||
#include "external.h"
|
#include "external.h"
|
||||||
|
#include "course_offsets.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t OChainChomp::_count = 0;
|
size_t OChainChomp::_count = 0;
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ extern "C" {
|
||||||
* @arg end x and z patrol location
|
* @arg end x and z patrol location
|
||||||
*
|
*
|
||||||
* Crab patrols between start and end.
|
* Crab patrols between start and end.
|
||||||
* The game automatically places the actor on the course surface.
|
* The game automatically places the actor on the surface of the tracks geometry.
|
||||||
* Therefore, providing a Y height is unnecessary.
|
* Therefore, providing a Y height is unnecessary.
|
||||||
*
|
*
|
||||||
* Crab appears to have a maximum patrolling distance and will patrol between
|
* Crab appears to have a maximum patrolling distance and will patrol between
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ extern "C" {
|
||||||
#include "math_util_2.h"
|
#include "math_util_2.h"
|
||||||
#include "code_80086E70.h"
|
#include "code_80086E70.h"
|
||||||
#include "code_80057C60.h"
|
#include "code_80057C60.h"
|
||||||
|
#include "course_offsets.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t OFlagpole::_count = 0;
|
size_t OFlagpole::_count = 0;
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ extern "C" {
|
||||||
#include "waypoints.h"
|
#include "waypoints.h"
|
||||||
#include "common_structs.h"
|
#include "common_structs.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "course_offsets.h"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ extern "C" {
|
||||||
#include "some_data.h"
|
#include "some_data.h"
|
||||||
#include "ceremony_and_credits.h"
|
#include "ceremony_and_credits.h"
|
||||||
#include "assets/models/common_data.h"
|
#include "assets/models/common_data.h"
|
||||||
|
#include "course_offsets.h"
|
||||||
extern SplineData D_800E6034;
|
extern SplineData D_800E6034;
|
||||||
extern SplineData D_800E60F0;
|
extern SplineData D_800E60F0;
|
||||||
extern SplineData D_800E61B4;
|
extern SplineData D_800E61B4;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#include <libultra/gbi.h>
|
#include <libultra/gbi.h>
|
||||||
#include "Thwomp.h"
|
#include "Thwomp.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
#include "engine/World.h"
|
#include "engine/World.h"
|
||||||
|
|
||||||
#include "port/Game.h"
|
#include "port/Game.h"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,6 @@ extern "C" {
|
||||||
#include "actors.h"
|
#include "actors.h"
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *banshee_boardwalk_dls[100];
|
extern const char *banshee_boardwalk_dls[100];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -59,7 +58,7 @@ BansheeBoardwalk::BansheeBoardwalk() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "banshee boardwalk", sizeof(Props.Name));
|
Props.SetText(Props.Name, "banshee boardwalk", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "ghost", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "ghost", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "747m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "747m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D009058;
|
Props.AIBehaviour = D_0D009058;
|
||||||
Props.AIMaximumSeparation = 40.0f;
|
Props.AIMaximumSeparation = 40.0f;
|
||||||
|
|
@ -118,7 +117,7 @@ BansheeBoardwalk::BansheeBoardwalk() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BansheeBoardwalk::Load() {
|
void BansheeBoardwalk::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
|
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(banshee_boardwalk_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(banshee_boardwalk_dls); i++) {
|
||||||
|
|
@ -146,7 +145,7 @@ void BansheeBoardwalk::Load() {
|
||||||
D_801625EC = 0;
|
D_801625EC = 0;
|
||||||
D_801625F4 = 0;
|
D_801625F4 = 0;
|
||||||
D_801625F0 = 0;
|
D_801625F0 = 0;
|
||||||
parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_sections));
|
parse_track_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_banshee_boardwalk_track_sections));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
find_vtx_and_set_colours((Gfx*) d_course_banshee_boardwalk_packed_dl_878, 128, 0, 0, 0);
|
find_vtx_and_set_colours((Gfx*) d_course_banshee_boardwalk_packed_dl_878, 128, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
@ -191,14 +190,14 @@ void BansheeBoardwalk::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BansheeBoardwalk::InitCourseObjects() {
|
void BansheeBoardwalk::InitTrackObjects() {
|
||||||
size_t objectId = 0;
|
size_t objectId = 0;
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
init_object(indexObjectList1[2], 0);
|
init_object(indexObjectList1[2], 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BansheeBoardwalk::UpdateCourseObjects() {
|
void BansheeBoardwalk::TickTrackObjects() {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
func_8007E4C4();
|
func_8007E4C4();
|
||||||
if (gModeSelection != TIME_TRIALS) {
|
if (gModeSelection != TIME_TRIALS) {
|
||||||
|
|
@ -208,7 +207,7 @@ void BansheeBoardwalk::UpdateCourseObjects() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BansheeBoardwalk::RenderCourseObjects(s32 cameraId) {
|
void BansheeBoardwalk::DrawTrackObjects(s32 cameraId) {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
// render_object_bat(cameraId);
|
// render_object_bat(cameraId);
|
||||||
// render_object_boos(cameraId);
|
// render_object_boos(cameraId);
|
||||||
|
|
@ -248,7 +247,7 @@ void BansheeBoardwalk::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BansheeBoardwalk::Render(struct UnkStruct_800DC5EC* arg0) {
|
void BansheeBoardwalk::Draw(ScreenContext* arg0) {
|
||||||
Camera* camera = arg0->camera;
|
Camera* camera = arg0->camera;
|
||||||
Mat4 spCC;
|
Mat4 spCC;
|
||||||
UNUSED s32 pad[6];
|
UNUSED s32 pad[6];
|
||||||
|
|
@ -279,7 +278,7 @@ void BansheeBoardwalk::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
// d_course_banshee_boardwalk_packed_dl_69B0
|
// d_course_banshee_boardwalk_packed_dl_69B0
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_banshee_boardwalk_packed_dl_69B0);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_banshee_boardwalk_packed_dl_69B0);
|
||||||
|
|
||||||
render_course_segments(banshee_boardwalk_dls, arg0);
|
render_track_sections(banshee_boardwalk_dls, arg0);
|
||||||
|
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
|
|
@ -307,7 +306,7 @@ void BansheeBoardwalk::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BansheeBoardwalk::RenderCredits() {
|
void BansheeBoardwalk::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_banshee_boardwalk_dl_B308));
|
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_banshee_boardwalk_dl_B308));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -332,7 +331,7 @@ void BansheeBoardwalk::Waypoints(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BansheeBoardwalk::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
|
void BansheeBoardwalk::DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot,
|
||||||
uint16_t playerDirection) {
|
uint16_t playerDirection) {
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/banshee_boardwalk/banshee_boardwalk_vertices.h"
|
#include "assets/models/tracks/banshee_boardwalk/banshee_boardwalk_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture banshee_boardwalk_textures[];
|
extern const course_texture banshee_boardwalk_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class BansheeBoardwalk : public Course {
|
class BansheeBoardwalk : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~BansheeBoardwalk() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~BansheeBoardwalk() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -28,17 +29,17 @@ public:
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
//virtual void InitClouds() override;
|
//virtual void InitClouds() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void UpdateCourseObjects() override;
|
virtual void TickTrackObjects() override;
|
||||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
virtual void DrawTrackObjects(s32 cameraId) override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void ScrollingTextures() override;
|
virtual void ScrollingTextures() override;
|
||||||
virtual void Waypoints(Player*, int8_t) override;
|
virtual void Waypoints(Player*, int8_t) override;
|
||||||
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
virtual void DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
||||||
virtual void CreditsSpawnActors() override;
|
virtual void CreditsSpawnActors() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -47,7 +47,7 @@ BigDonut::BigDonut() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "big donut", sizeof(Props.Name));
|
Props.SetText(Props.Name, "big donut", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "doughnut", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "doughnut", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D008F18;
|
Props.AIBehaviour = D_0D008F18;
|
||||||
Props.AIMaximumSeparation = -1.0f;
|
Props.AIMaximumSeparation = -1.0f;
|
||||||
|
|
@ -103,7 +103,7 @@ BigDonut::BigDonut() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BigDonut::Load() {
|
void BigDonut::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
InvertTriangleWindingByName(d_course_big_donut_packed_dl_DE8);
|
InvertTriangleWindingByName(d_course_big_donut_packed_dl_DE8);
|
||||||
InvertTriangleWindingByName(d_course_big_donut_packed_dl_450);
|
InvertTriangleWindingByName(d_course_big_donut_packed_dl_450);
|
||||||
|
|
@ -142,7 +142,7 @@ void BigDonut::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BigDonut::Render(struct UnkStruct_800DC5EC* arg0) {
|
void BigDonut::Draw(ScreenContext* arg0) {
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||||
|
|
@ -165,7 +165,7 @@ void BigDonut::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_big_donut_packed_dl_230);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_big_donut_packed_dl_230);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BigDonut::RenderCredits() {
|
void BigDonut::DrawCredits() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BigDonut::Waypoints(Player* player, int8_t playerId) {
|
void BigDonut::Waypoints(Player* player, int8_t playerId) {
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/big_donut/big_donut_vertices.h"
|
#include "assets/models/tracks/big_donut/big_donut_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture big_donut_textures[];
|
extern const course_texture big_donut_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class BigDonut : public Course {
|
class BigDonut : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~BigDonut() = default;
|
virtual ~BigDonut() = default;
|
||||||
|
|
||||||
|
|
@ -24,8 +25,8 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -49,7 +49,7 @@ BlockFort::BlockFort() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "block fort", sizeof(Props.Name));
|
Props.SetText(Props.Name, "block fort", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "block", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "block", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D008F18;
|
Props.AIBehaviour = D_0D008F18;
|
||||||
Props.AIMaximumSeparation = -1.0f;
|
Props.AIMaximumSeparation = -1.0f;
|
||||||
|
|
@ -106,14 +106,14 @@ BlockFort::BlockFort() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlockFort::Load() {
|
void BlockFort::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
|
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
InvertTriangleWindingByName(d_course_block_fort_packed_dl_15C0);
|
InvertTriangleWindingByName(d_course_block_fort_packed_dl_15C0);
|
||||||
}
|
}
|
||||||
generate_collision_mesh_with_default_section_id((Gfx*) d_course_block_fort_packed_dl_15C0, 1);
|
generate_collision_mesh_with_default_section_id((Gfx*) d_course_block_fort_packed_dl_15C0, 1);
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
Props.WaterLevel = gTrackMinY - 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlockFort::UnLoad() {
|
void BlockFort::UnLoad() {
|
||||||
|
|
@ -133,7 +133,7 @@ void BlockFort::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BlockFort::Render(struct UnkStruct_800DC5EC* arg0) {
|
void BlockFort::Draw(ScreenContext* arg0) {
|
||||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/block_fort/block_fort_vertices.h"
|
#include "assets/models/tracks/block_fort/block_fort_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture block_fort_textures[];
|
extern const course_texture block_fort_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class BlockFort : public Course {
|
class BlockFort : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~BlockFort() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~BlockFort() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -27,6 +28,6 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void Waypoints(Player*, int8_t) override;
|
virtual void Waypoints(Player*, int8_t) override;
|
||||||
};
|
};
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include "BowsersCastle.h"
|
#include "BowsersCastle.h"
|
||||||
#include "align_asset_macro.h"
|
#include "align_asset_macro.h"
|
||||||
#include "engine/World.h"
|
#include "engine/World.h"
|
||||||
#include "engine/courses/Course.h"
|
#include "engine/tracks/Track.h"
|
||||||
#include "engine/actors/Finishline.h"
|
#include "engine/actors/Finishline.h"
|
||||||
#include "engine/objects/BombKart.h"
|
#include "engine/objects/BombKart.h"
|
||||||
#include "engine/objects/Thwomp.h"
|
#include "engine/objects/Thwomp.h"
|
||||||
|
|
@ -34,7 +34,6 @@ extern "C" {
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "code_8003DC40.h"
|
#include "code_8003DC40.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *bowsers_castle_dls[108];
|
extern const char *bowsers_castle_dls[108];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,7 +54,7 @@ BowsersCastle::BowsersCastle() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "bowser's castle", sizeof(Props.Name));
|
Props.SetText(Props.Name, "bowser's castle", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "castle", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "castle", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "777m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "777m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D008FB8;
|
Props.AIBehaviour = D_0D008FB8;
|
||||||
Props.AIMaximumSeparation = 35.0f;
|
Props.AIMaximumSeparation = 35.0f;
|
||||||
|
|
@ -115,7 +114,7 @@ BowsersCastle::BowsersCastle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void BowsersCastle::Load() {
|
void BowsersCastle::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(bowsers_castle_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(bowsers_castle_dls); i++) {
|
||||||
InvertTriangleWindingByName(bowsers_castle_dls[i]);
|
InvertTriangleWindingByName(bowsers_castle_dls[i]);
|
||||||
|
|
@ -127,7 +126,7 @@ void BowsersCastle::Load() {
|
||||||
InvertTriangleWindingByName(d_course_bowsers_castle_dl_9228);
|
InvertTriangleWindingByName(d_course_bowsers_castle_dl_9228);
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_bowsers_castle_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_bowsers_castle_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
find_vtx_and_set_colours((Gfx*) d_course_bowsers_castle_packed_dl_1350, 0x32, 0, 0, 0);
|
find_vtx_and_set_colours((Gfx*) d_course_bowsers_castle_packed_dl_1350, 0x32, 0, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
@ -192,7 +191,7 @@ void BowsersCastle::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BowsersCastle::InitCourseObjects() {
|
void BowsersCastle::InitTrackObjects() {
|
||||||
size_t objectId;
|
size_t objectId;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
|
||||||
|
|
@ -219,11 +218,11 @@ void BowsersCastle::InitCourseObjects() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BowsersCastle::UpdateCourseObjects() {
|
void BowsersCastle::TickTrackObjects() {
|
||||||
update_flame_particle();
|
update_flame_particle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BowsersCastle::RenderCourseObjects(s32 cameraId) {
|
void BowsersCastle::DrawTrackObjects(s32 cameraId) {
|
||||||
// render_object_thwomps(cameraId);
|
// render_object_thwomps(cameraId);
|
||||||
render_object_bowser_flame(cameraId);
|
render_object_bowser_flame(cameraId);
|
||||||
}
|
}
|
||||||
|
|
@ -261,7 +260,7 @@ void BowsersCastle::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BowsersCastle::Render(struct UnkStruct_800DC5EC* arg0) {
|
void BowsersCastle::Draw(ScreenContext* arg0) {
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
@ -280,7 +279,7 @@ void BowsersCastle::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
if (D_802B87BC > 255) {
|
if (D_802B87BC > 255) {
|
||||||
D_802B87BC = 0;
|
D_802B87BC = 0;
|
||||||
}
|
}
|
||||||
render_course_segments(bowsers_castle_dls, arg0);
|
render_track_sections(bowsers_castle_dls, arg0);
|
||||||
|
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
|
|
@ -288,7 +287,7 @@ void BowsersCastle::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_bowsers_castle_packed_dl_248);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_bowsers_castle_packed_dl_248);
|
||||||
}
|
}
|
||||||
|
|
||||||
void BowsersCastle::RenderCredits() {
|
void BowsersCastle::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_bowsers_castle_dl_9148));
|
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_bowsers_castle_dl_9148));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -310,7 +309,7 @@ void BowsersCastle::Waypoints(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void BowsersCastle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot,
|
void BowsersCastle::DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot,
|
||||||
uint16_t playerDirection) {
|
uint16_t playerDirection) {
|
||||||
if (gActiveScreenMode != SCREEN_MODE_1P) {
|
if (gActiveScreenMode != SCREEN_MODE_1P) {
|
||||||
return;
|
return;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/bowsers_castle/bowsers_castle_vertices.h"
|
#include "assets/models/tracks/bowsers_castle/bowsers_castle_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture bowsers_castle_textures[];
|
extern const course_texture bowsers_castle_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class BowsersCastle : public Course {
|
class BowsersCastle : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~BowsersCastle() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~BowsersCastle() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -29,17 +30,17 @@ public:
|
||||||
void SpawnStockThwomp();
|
void SpawnStockThwomp();
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
//virtual void InitClouds() override;
|
//virtual void InitClouds() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void UpdateCourseObjects() override;
|
virtual void TickTrackObjects() override;
|
||||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
virtual void DrawTrackObjects(s32 cameraId) override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||||
virtual void Waypoints(Player*, int8_t) override;
|
virtual void Waypoints(Player*, int8_t) override;
|
||||||
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection);
|
virtual void DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection);
|
||||||
virtual void CreditsSpawnActors() override;
|
virtual void CreditsSpawnActors() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -34,7 +34,6 @@ extern "C" {
|
||||||
#include "code_8003DC40.h"
|
#include "code_8003DC40.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "course_offsets.h"
|
#include "course_offsets.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *choco_mountain_dls[96];
|
extern const char *choco_mountain_dls[96];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,7 +53,7 @@ ChocoMountain::ChocoMountain() {
|
||||||
Id = "mk:choco_mountain";
|
Id = "mk:choco_mountain";
|
||||||
Props.SetText(Props.Name, "choco mountain", sizeof(Props.Name));
|
Props.SetText(Props.Name, "choco mountain", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "mountain", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "mountain", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "687m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "687m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D008F80;
|
Props.AIBehaviour = D_0D008F80;
|
||||||
Props.AIMaximumSeparation = 35.0f;
|
Props.AIMaximumSeparation = 35.0f;
|
||||||
|
|
@ -113,7 +112,7 @@ ChocoMountain::ChocoMountain() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChocoMountain::Load() {
|
void ChocoMountain::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(choco_mountain_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(choco_mountain_dls); i++) {
|
||||||
InvertTriangleWindingByName(choco_mountain_dls[i]);
|
InvertTriangleWindingByName(choco_mountain_dls[i]);
|
||||||
|
|
@ -153,7 +152,7 @@ void ChocoMountain::Load() {
|
||||||
nullify_displaylist((uintptr_t) LOAD_ASSET_RAW(d_course_choco_mountain_packed_dl_3C8));
|
nullify_displaylist((uintptr_t) LOAD_ASSET_RAW(d_course_choco_mountain_packed_dl_3C8));
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_choco_mountain_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_choco_mountain_addr));
|
||||||
func_802B5CAC(0x238E, 0x31C7, D_8015F590);
|
func_802B5CAC(0x238E, 0x31C7, D_8015F590);
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
}
|
}
|
||||||
|
|
@ -179,7 +178,7 @@ void ChocoMountain::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChocoMountain::InitCourseObjects() {
|
void ChocoMountain::InitTrackObjects() {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
func_80070714();
|
func_80070714();
|
||||||
|
|
@ -226,7 +225,7 @@ void ChocoMountain::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChocoMountain::Render(struct UnkStruct_800DC5EC* arg0) {
|
void ChocoMountain::Draw(ScreenContext* arg0) {
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
||||||
|
|
@ -256,7 +255,7 @@ void ChocoMountain::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_choco_mountain_packed_dl_5868);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_choco_mountain_packed_dl_5868);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
||||||
render_course_segments(choco_mountain_dls, arg0);
|
render_track_sections(choco_mountain_dls, arg0);
|
||||||
|
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
|
|
@ -273,7 +272,7 @@ void ChocoMountain::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChocoMountain::RenderCredits() {
|
void ChocoMountain::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_choco_mountain_dl_71B8));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_choco_mountain_dl_71B8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/choco_mountain/choco_mountain_vertices.h"
|
#include "assets/models/tracks/choco_mountain/choco_mountain_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture choco_mountain_textures[];
|
extern const course_texture choco_mountain_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChocoMountain : public Course {
|
class ChocoMountain : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~ChocoMountain() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~ChocoMountain() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -27,12 +28,12 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -36,7 +36,6 @@ extern "C" {
|
||||||
#include "code_8003DC40.h"
|
#include "code_8003DC40.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "sounds.h"
|
#include "sounds.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *d_course_dks_jungle_parkway_unknown_dl_list[105];
|
extern const char *d_course_dks_jungle_parkway_unknown_dl_list[105];
|
||||||
extern s16 currentScreenSection;
|
extern s16 currentScreenSection;
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +55,7 @@ DKJungle::DKJungle() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "d.k.'s jungle parkway", sizeof(Props.Name));
|
Props.SetText(Props.Name, "d.k.'s jungle parkway", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "jungle", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "jungle", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "893m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "893m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D0093C0;
|
Props.AIBehaviour = D_0D0093C0;
|
||||||
Props.AIMaximumSeparation = 40.0f;
|
Props.AIMaximumSeparation = 40.0f;
|
||||||
|
|
@ -115,7 +114,7 @@ DKJungle::DKJungle() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DKJungle::Load() {
|
void DKJungle::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(d_course_dks_jungle_parkway_unknown_dl_list); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(d_course_dks_jungle_parkway_unknown_dl_list); i++) {
|
||||||
InvertTriangleWindingByName(d_course_dks_jungle_parkway_unknown_dl_list[i]);
|
InvertTriangleWindingByName(d_course_dks_jungle_parkway_unknown_dl_list[i]);
|
||||||
|
|
@ -128,7 +127,7 @@ void DKJungle::Load() {
|
||||||
InvertTriangleWindingByName(d_course_dks_jungle_parkway_packed_dl_36A8);
|
InvertTriangleWindingByName(d_course_dks_jungle_parkway_packed_dl_36A8);
|
||||||
InvertTriangleWindingByName(d_course_dks_jungle_parkway_packed_dl_3F30);
|
InvertTriangleWindingByName(d_course_dks_jungle_parkway_packed_dl_3F30);
|
||||||
}
|
}
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_dks_jungle_parkway_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_dks_jungle_parkway_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
// d_course_dks_jungle_parkway_packed_dl_3FA8
|
// d_course_dks_jungle_parkway_packed_dl_3FA8
|
||||||
find_vtx_and_set_colours((Gfx*) d_course_dks_jungle_parkway_packed_dl_3FA8, 120, 255, 255, 255);
|
find_vtx_and_set_colours((Gfx*) d_course_dks_jungle_parkway_packed_dl_3FA8, 120, 255, 255, 255);
|
||||||
|
|
@ -194,7 +193,7 @@ void DKJungle::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DKJungle::InitCourseObjects() {
|
void DKJungle::InitTrackObjects() {
|
||||||
for (size_t i = 0; i < NUM_TORCHES; i++) {
|
for (size_t i = 0; i < NUM_TORCHES; i++) {
|
||||||
init_smoke_particles(i);
|
init_smoke_particles(i);
|
||||||
// wtf?
|
// wtf?
|
||||||
|
|
@ -202,11 +201,11 @@ void DKJungle::InitCourseObjects() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DKJungle::UpdateCourseObjects() {
|
void DKJungle::TickTrackObjects() {
|
||||||
update_ferries_smoke_particle();
|
update_ferries_smoke_particle();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DKJungle::RenderCourseObjects(s32 cameraId) {
|
void DKJungle::DrawTrackObjects(s32 cameraId) {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
render_object_paddle_boat_smoke_particles(cameraId);
|
render_object_paddle_boat_smoke_particles(cameraId);
|
||||||
}
|
}
|
||||||
|
|
@ -262,7 +261,7 @@ void DKJungle::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DKJungle::Render(struct UnkStruct_800DC5EC* arg0) {
|
void DKJungle::Draw(ScreenContext* arg0) {
|
||||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||||
set_track_light_direction(&D_800DC610[1], D_802B87D4, D_802B87D0, 1);
|
set_track_light_direction(&D_800DC610[1], D_802B87D4, D_802B87D0, 1);
|
||||||
|
|
||||||
|
|
@ -280,12 +279,12 @@ void DKJungle::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
render_course_segments(d_course_dks_jungle_parkway_unknown_dl_list, arg0);
|
render_track_sections(d_course_dks_jungle_parkway_unknown_dl_list, arg0);
|
||||||
|
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DKJungle::RenderCredits() {
|
void DKJungle::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_dks_jungle_parkway_dl_13C30));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_dks_jungle_parkway_dl_13C30));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -329,7 +328,7 @@ void DKJungle::ScrollingTextures() {
|
||||||
evaluate_collision_players_palm_trees();
|
evaluate_collision_players_palm_trees();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DKJungle::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
void DKJungle::DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/dks_jungle_parkway/dks_jungle_parkway_vertices.h"
|
#include "assets/models/tracks/dks_jungle_parkway/dks_jungle_parkway_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture dks_jungle_parkway_textures[];
|
extern const course_texture dks_jungle_parkway_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class DKJungle : public Course {
|
class DKJungle : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~DKJungle() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~DKJungle() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -29,18 +30,18 @@ public:
|
||||||
virtual f32 GetWaterLevel(FVector pos, Collision* collision) override;
|
virtual f32 GetWaterLevel(FVector pos, Collision* collision) override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
//virtual void InitClouds() override;
|
//virtual void InitClouds() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void UpdateCourseObjects() override;
|
virtual void TickTrackObjects() override;
|
||||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
virtual void DrawTrackObjects(s32 cameraId) override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||||
virtual void ScrollingTextures() override;
|
virtual void ScrollingTextures() override;
|
||||||
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
virtual void DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
||||||
virtual void CreditsSpawnActors() override;
|
virtual void CreditsSpawnActors() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -48,7 +48,7 @@ DoubleDeck::DoubleDeck() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "double deck", sizeof(Props.Name));
|
Props.SetText(Props.Name, "double deck", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "deck", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "deck", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D008F18;
|
Props.AIBehaviour = D_0D008F18;
|
||||||
|
|
@ -106,13 +106,13 @@ DoubleDeck::DoubleDeck() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoubleDeck::Load() {
|
void DoubleDeck::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
InvertTriangleWindingByName(d_course_double_deck_packed_dl_738);
|
InvertTriangleWindingByName(d_course_double_deck_packed_dl_738);
|
||||||
}
|
}
|
||||||
generate_collision_mesh_with_default_section_id((Gfx*) d_course_double_deck_packed_dl_738, 1);
|
generate_collision_mesh_with_default_section_id((Gfx*) d_course_double_deck_packed_dl_738, 1);
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
Props.WaterLevel = gTrackMinY - 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoubleDeck::UnLoad() {
|
void DoubleDeck::UnLoad() {
|
||||||
|
|
@ -132,7 +132,7 @@ void DoubleDeck::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoubleDeck::InitCourseObjects() {}
|
void DoubleDeck::InitTrackObjects() {}
|
||||||
|
|
||||||
void DoubleDeck::SomeSounds() {}
|
void DoubleDeck::SomeSounds() {}
|
||||||
|
|
||||||
|
|
@ -140,7 +140,7 @@ void DoubleDeck::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void DoubleDeck::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
void DoubleDeck::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void DoubleDeck::Render(struct UnkStruct_800DC5EC* arg0) {
|
void DoubleDeck::Draw(ScreenContext* arg0) {
|
||||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
|
|
@ -151,7 +151,7 @@ void DoubleDeck::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DoubleDeck::RenderCredits() {}
|
void DoubleDeck::DrawCredits() {}
|
||||||
|
|
||||||
void DoubleDeck::Waypoints(Player* player, int8_t playerId) {
|
void DoubleDeck::Waypoints(Player* player, int8_t playerId) {
|
||||||
player->nearestPathPointId = 0;
|
player->nearestPathPointId = 0;
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/double_deck/double_deck_vertices.h"
|
#include "assets/models/tracks/double_deck/double_deck_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture double_deck_textures[];
|
extern const course_texture double_deck_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class DoubleDeck : public Course {
|
class DoubleDeck : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~DoubleDeck() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~DoubleDeck() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -27,12 +28,12 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -35,7 +35,6 @@ extern "C" {
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "update_objects.h"
|
#include "update_objects.h"
|
||||||
#include "course_offsets.h"
|
#include "course_offsets.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *d_course_frappe_snowland_dl_list[68];
|
extern const char *d_course_frappe_snowland_dl_list[68];
|
||||||
extern s8 gPlayerCount;
|
extern s8 gPlayerCount;
|
||||||
}
|
}
|
||||||
|
|
@ -56,7 +55,7 @@ FrappeSnowland::FrappeSnowland() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "frappe snowland", sizeof(Props.Name));
|
Props.SetText(Props.Name, "frappe snowland", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "snow", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "snow", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "734m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "734m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D0090F8;
|
Props.AIBehaviour = D_0D0090F8;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -115,7 +114,7 @@ FrappeSnowland::FrappeSnowland() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrappeSnowland::Load() {
|
void FrappeSnowland::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
|
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(d_course_frappe_snowland_dl_list); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(d_course_frappe_snowland_dl_list); i++) {
|
||||||
|
|
@ -124,7 +123,7 @@ void FrappeSnowland::Load() {
|
||||||
|
|
||||||
InvertTriangleWindingByName(d_course_frappe_snowland_packed_dl_65E0);
|
InvertTriangleWindingByName(d_course_frappe_snowland_packed_dl_65E0);
|
||||||
}
|
}
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_frappe_snowland_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_frappe_snowland_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -185,11 +184,11 @@ void FrappeSnowland::InitClouds() {
|
||||||
D_8018D230 = 0; // This must be turned off or mayhem ensues
|
D_8018D230 = 0; // This must be turned off or mayhem ensues
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrappeSnowland::UpdateClouds(s32 sp1C, Camera* camera) {
|
void FrappeSnowland::TickClouds(s32 sp1C, Camera* camera) {
|
||||||
func_80078170(sp1C, camera);
|
func_80078170(sp1C, camera);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrappeSnowland::InitCourseObjects() {
|
void FrappeSnowland::InitTrackObjects() {
|
||||||
size_t objectId;
|
size_t objectId;
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < NUM_SNOWFLAKES; i++) {
|
for (i = 0; i < NUM_SNOWFLAKES; i++) {
|
||||||
|
|
@ -197,11 +196,11 @@ void FrappeSnowland::InitCourseObjects() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrappeSnowland::UpdateCourseObjects() {
|
void FrappeSnowland::TickTrackObjects() {
|
||||||
update_snowflakes();
|
update_snowflakes();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrappeSnowland::Render(struct UnkStruct_800DC5EC* arg0) {
|
void FrappeSnowland::Draw(ScreenContext* arg0) {
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
@ -215,10 +214,10 @@ void FrappeSnowland::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
|
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
render_course_segments(d_course_frappe_snowland_dl_list, arg0);
|
render_track_sections(d_course_frappe_snowland_dl_list, arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrappeSnowland::RenderCredits() {
|
void FrappeSnowland::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_frappe_snowland_dl_76A0));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_frappe_snowland_dl_76A0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/frappe_snowland/frappe_snowland_vertices.h"
|
#include "assets/models/tracks/frappe_snowland/frappe_snowland_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture frappe_snowland_textures[];
|
extern const course_texture frappe_snowland_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class FrappeSnowland : public Course {
|
class FrappeSnowland : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~FrappeSnowland() = default;
|
virtual ~FrappeSnowland() = default;
|
||||||
|
|
||||||
|
|
@ -25,10 +26,10 @@ public:
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitClouds() override;
|
virtual void InitClouds() override;
|
||||||
virtual void UpdateClouds(s32 sp1C, Camera* camera) override;
|
virtual void TickClouds(s32 sp1C, Camera* camera) override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void UpdateCourseObjects() override;
|
virtual void TickTrackObjects() override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||||
};
|
};
|
||||||
|
|
@ -51,7 +51,6 @@ extern "C" {
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "courses/harbour/track.h"
|
#include "courses/harbour/track.h"
|
||||||
#include "course.h"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TrackPathPoint harbour_path[] = {
|
TrackPathPoint harbour_path[] = {
|
||||||
|
|
@ -530,7 +529,7 @@ Harbour::Harbour() {
|
||||||
Id = "mk:harbour";
|
Id = "mk:harbour";
|
||||||
Props.SetText(Props.Name, "Harbour", sizeof(Props.Name));
|
Props.SetText(Props.Name, "Harbour", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "harbour", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "harbour", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "99m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "99m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D008F28;
|
Props.AIBehaviour = D_0D008F28;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -596,7 +595,7 @@ TrackSections harbour_surfaces[] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
void Harbour::Load() {
|
void Harbour::Load() {
|
||||||
Course::Load(road_map_001_mesh_vtx_0, NULL);
|
Track::Load(road_map_001_mesh_vtx_0, NULL);
|
||||||
|
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
InvertTriangleWinding(ground_map_mesh);
|
InvertTriangleWinding(ground_map_mesh);
|
||||||
|
|
@ -622,9 +621,9 @@ void Harbour::Load() {
|
||||||
generate_collision_mesh_with_defaults(bush_map_004_mesh);
|
generate_collision_mesh_with_defaults(bush_map_004_mesh);
|
||||||
generate_collision_mesh_with_defaults(statue_map_005_mesh);
|
generate_collision_mesh_with_defaults(statue_map_005_mesh);
|
||||||
|
|
||||||
parse_course_displaylists((TrackSections*)harbour_surfaces);
|
parse_track_displaylists((TrackSections*)harbour_surfaces);
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
Props.WaterLevel = gTrackMinY - 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Harbour::UnLoad() {
|
void Harbour::UnLoad() {
|
||||||
|
|
@ -717,7 +716,7 @@ void Harbour::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Harbour::Render(struct UnkStruct_800DC5EC* arg0) {
|
void Harbour::Draw(ScreenContext* arg0) {
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/mario_raceway/mario_raceway_vertices.h"
|
#include "assets/models/tracks/mario_raceway/mario_raceway_vertices.h"
|
||||||
|
|
@ -12,10 +12,9 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
extern const course_texture test_course_textures[];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class Harbour : public Course {
|
class Harbour : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~Harbour() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~Harbour() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -29,6 +28,6 @@ public:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual bool IsMod() override;
|
virtual bool IsMod() override;
|
||||||
};
|
};
|
||||||
|
|
@ -33,7 +33,6 @@ extern "C" {
|
||||||
#include "actors.h"
|
#include "actors.h"
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *kalimari_desert_dls[80];
|
extern const char *kalimari_desert_dls[80];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -52,7 +51,7 @@ KalimariDesert::KalimariDesert() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "kalimari desert", sizeof(Props.Name));
|
Props.SetText(Props.Name, "kalimari desert", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "desert", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "desert", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "753m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "753m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D009260;
|
Props.AIBehaviour = D_0D009260;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -110,7 +109,7 @@ KalimariDesert::KalimariDesert() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void KalimariDesert::Load() {
|
void KalimariDesert::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
|
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(kalimari_desert_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(kalimari_desert_dls); i++) {
|
||||||
|
|
@ -125,9 +124,9 @@ void KalimariDesert::Load() {
|
||||||
InvertTriangleWindingByName(d_course_kalimari_desert_packed_dl_270);
|
InvertTriangleWindingByName(d_course_kalimari_desert_packed_dl_270);
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_kalimari_desert_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_kalimari_desert_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
Props.WaterLevel = gTrackMinY - 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KalimariDesert::UnLoad() {
|
void KalimariDesert::UnLoad() {
|
||||||
|
|
@ -151,25 +150,25 @@ void KalimariDesert::BeginPlay() {
|
||||||
uintptr_t* crossing2 = (uintptr_t*) gWorldInstance.AddCrossing(crossingPos2, 176, 182, 900.0f, 650.0f);
|
uintptr_t* crossing2 = (uintptr_t*) gWorldInstance.AddCrossing(crossingPos2, 176, 182, 900.0f, 650.0f);
|
||||||
|
|
||||||
vec3f_set(position, -1680.0f, 2.0f, 35.0f);
|
vec3f_set(position, -1680.0f, 2.0f, 35.0f);
|
||||||
position[0] *= gCourseDirection;
|
position[0] *= gTrackDirection;
|
||||||
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
||||||
ACTOR_RAILROAD_CROSSING));
|
ACTOR_RAILROAD_CROSSING));
|
||||||
rrxing->crossingTrigger = crossing2;
|
rrxing->crossingTrigger = crossing2;
|
||||||
vec3f_set(position, -1600.0f, 2.0f, 35.0f);
|
vec3f_set(position, -1600.0f, 2.0f, 35.0f);
|
||||||
position[0] *= gCourseDirection;
|
position[0] *= gTrackDirection;
|
||||||
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
||||||
ACTOR_RAILROAD_CROSSING));
|
ACTOR_RAILROAD_CROSSING));
|
||||||
rrxing->crossingTrigger = crossing2;
|
rrxing->crossingTrigger = crossing2;
|
||||||
|
|
||||||
// Original game forgot to put gCourseDirection to face the crossing the right direction in extra mode
|
// Original game forgot to put gTrackDirection to face the crossing the right direction in extra mode
|
||||||
vec3s_set(rotation, 0, -0x2000 * gCourseDirection, 0);
|
vec3s_set(rotation, 0, -0x2000 * gTrackDirection, 0);
|
||||||
vec3f_set(position, -2459.0f, 2.0f, 2263.0f);
|
vec3f_set(position, -2459.0f, 2.0f, 2263.0f);
|
||||||
position[0] *= gCourseDirection;
|
position[0] *= gTrackDirection;
|
||||||
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
||||||
ACTOR_RAILROAD_CROSSING));
|
ACTOR_RAILROAD_CROSSING));
|
||||||
rrxing->crossingTrigger = crossing1;
|
rrxing->crossingTrigger = crossing1;
|
||||||
vec3f_set(position, -2467.0f, 2.0f, 2375.0f);
|
vec3f_set(position, -2467.0f, 2.0f, 2375.0f);
|
||||||
position[0] *= gCourseDirection;
|
position[0] *= gTrackDirection;
|
||||||
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
rrxing = (struct RailroadCrossing*) GET_ACTOR(add_actor_to_empty_slot(position, rotation, velocity,
|
||||||
ACTOR_RAILROAD_CROSSING));
|
ACTOR_RAILROAD_CROSSING));
|
||||||
rrxing->crossingTrigger = crossing1;
|
rrxing->crossingTrigger = crossing1;
|
||||||
|
|
@ -218,7 +217,7 @@ void KalimariDesert::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KalimariDesert::InitCourseObjects() {
|
void KalimariDesert::InitTrackObjects() {
|
||||||
size_t i;
|
size_t i;
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
find_unused_obj_index(&D_8018CF10);
|
find_unused_obj_index(&D_8018CF10);
|
||||||
|
|
@ -241,7 +240,7 @@ void KalimariDesert::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void KalimariDesert::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
void KalimariDesert::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void KalimariDesert::Render(struct UnkStruct_800DC5EC* arg0) {
|
void KalimariDesert::Draw(ScreenContext* arg0) {
|
||||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||||
|
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
|
|
@ -257,7 +256,7 @@ void KalimariDesert::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
|
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
render_course_segments(kalimari_desert_dls, arg0);
|
render_track_sections(kalimari_desert_dls, arg0);
|
||||||
// d_course_kalimari_desert_packed_dl_1ED8
|
// d_course_kalimari_desert_packed_dl_1ED8
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_kalimari_desert_packed_dl_1ED8);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_kalimari_desert_packed_dl_1ED8);
|
||||||
// d_course_kalimari_desert_packed_dl_1B18
|
// d_course_kalimari_desert_packed_dl_1B18
|
||||||
|
|
@ -274,7 +273,7 @@ void KalimariDesert::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KalimariDesert::RenderCredits() {
|
void KalimariDesert::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_kalimari_desert_dl_22E00));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_kalimari_desert_dl_22E00));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "CoreMath.h"
|
#include "CoreMath.h"
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
#include "engine/vehicles/Train.h"
|
#include "engine/vehicles/Train.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
@ -14,10 +14,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture kalimari_desert_textures[];
|
extern const course_texture kalimari_desert_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class KalimariDesert : public Course {
|
class KalimariDesert : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~KalimariDesert() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~KalimariDesert() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -29,12 +30,12 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
@ -34,7 +34,6 @@ extern "C" {
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "code_8003DC40.h"
|
#include "code_8003DC40.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *d_course_koopa_troopa_beach_dl_list1[148];
|
extern const char *d_course_koopa_troopa_beach_dl_list1[148];
|
||||||
extern const char *koopa_troopa_beach_dls2[148];
|
extern const char *koopa_troopa_beach_dls2[148];
|
||||||
extern s8 gPlayerCount;
|
extern s8 gPlayerCount;
|
||||||
|
|
@ -56,7 +55,7 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
|
||||||
Id = "mk:koopa_beach";
|
Id = "mk:koopa_beach";
|
||||||
Props.SetText(Props.Name, "koopa troopa beach", sizeof(Props.Name));
|
Props.SetText(Props.Name, "koopa troopa beach", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "beach", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "beach", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "691m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "691m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D009158;
|
Props.AIBehaviour = D_0D009158;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -118,7 +117,7 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void KoopaTroopaBeach::Load() {
|
void KoopaTroopaBeach::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(d_course_koopa_troopa_beach_dl_list1); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(d_course_koopa_troopa_beach_dl_list1); i++) {
|
||||||
InvertTriangleWindingByName(d_course_koopa_troopa_beach_dl_list1[i]);
|
InvertTriangleWindingByName(d_course_koopa_troopa_beach_dl_list1[i]);
|
||||||
|
|
@ -131,7 +130,7 @@ void KoopaTroopaBeach::Load() {
|
||||||
InvertTriangleWindingByName(d_course_koopa_troopa_beach_packed_dl_2C0);
|
InvertTriangleWindingByName(d_course_koopa_troopa_beach_packed_dl_2C0);
|
||||||
InvertTriangleWindingByName(d_course_koopa_troopa_beach_packed_dl_9E70);
|
InvertTriangleWindingByName(d_course_koopa_troopa_beach_packed_dl_9E70);
|
||||||
}
|
}
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
find_vtx_and_set_colours((Gfx*) d_course_koopa_troopa_beach_packed_dl_ADE0, 150, 255, 255, 255);
|
find_vtx_and_set_colours((Gfx*) d_course_koopa_troopa_beach_packed_dl_ADE0, 150, 255, 255, 255);
|
||||||
find_vtx_and_set_colours((Gfx*) d_course_koopa_troopa_beach_packed_dl_A540, 150, 255, 255, 255);
|
find_vtx_and_set_colours((Gfx*) d_course_koopa_troopa_beach_packed_dl_A540, 150, 255, 255, 255);
|
||||||
|
|
@ -144,7 +143,7 @@ void KoopaTroopaBeach::UnLoad() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void KoopaTroopaBeach::BeginPlay() {
|
void KoopaTroopaBeach::BeginPlay() {
|
||||||
init_actor_hot_air_balloon_item_box(328.0f * gCourseDirection, 70.0f, 2541.0f);
|
init_actor_hot_air_balloon_item_box(328.0f * gTrackDirection, 70.0f, 2541.0f);
|
||||||
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_item_box_spawns));
|
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_item_box_spawns));
|
||||||
spawn_palm_trees((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_tree_spawn));
|
spawn_palm_trees((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_koopa_troopa_beach_tree_spawn));
|
||||||
|
|
||||||
|
|
@ -186,10 +185,10 @@ void KoopaTroopaBeach::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KoopaTroopaBeach::InitCourseObjects() {
|
void KoopaTroopaBeach::InitTrackObjects() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void KoopaTroopaBeach::UpdateCourseObjects() {
|
void KoopaTroopaBeach::TickTrackObjects() {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
//update_crabs();
|
//update_crabs();
|
||||||
}
|
}
|
||||||
|
|
@ -198,7 +197,7 @@ void KoopaTroopaBeach::UpdateCourseObjects() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void KoopaTroopaBeach::RenderCourseObjects(s32 cameraId) {
|
void KoopaTroopaBeach::DrawTrackObjects(s32 cameraId) {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
//render_object_crabs(cameraId);
|
//render_object_crabs(cameraId);
|
||||||
}
|
}
|
||||||
|
|
@ -221,7 +220,7 @@ void KoopaTroopaBeach::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void KoopaTroopaBeach::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
void KoopaTroopaBeach::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void KoopaTroopaBeach::Render(struct UnkStruct_800DC5EC* arg0) {
|
void KoopaTroopaBeach::Draw(ScreenContext* arg0) {
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
@ -237,7 +236,7 @@ void KoopaTroopaBeach::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
// d_course_koopa_troopa_beach_packed_dl_9688
|
// d_course_koopa_troopa_beach_packed_dl_9688
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_koopa_troopa_beach_packed_dl_9688);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_koopa_troopa_beach_packed_dl_9688);
|
||||||
render_course_segments((const char**)d_course_koopa_troopa_beach_dl_list1, arg0);
|
render_track_sections((const char**)d_course_koopa_troopa_beach_dl_list1, arg0);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
|
|
@ -247,7 +246,7 @@ void KoopaTroopaBeach::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KoopaTroopaBeach::RenderCredits() {
|
void KoopaTroopaBeach::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_koopa_troopa_beach_dl_18D68));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_koopa_troopa_beach_dl_18D68));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -291,7 +290,7 @@ void KoopaTroopaBeach::ScrollingTextures() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void KoopaTroopaBeach::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
void KoopaTroopaBeach::DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
||||||
Vec3f vector;
|
Vec3f vector;
|
||||||
|
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
|
|
@ -322,7 +321,7 @@ void KoopaTroopaBeach::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pat
|
||||||
gDPSetBlendMask(gDisplayListHead++, 0xFF);
|
gDPSetBlendMask(gDisplayListHead++, 0xFF);
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
render_course_segments((const char**)koopa_troopa_beach_dls2, screen);
|
render_track_sections((const char**)koopa_troopa_beach_dls2, screen);
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 1, 1, G_OFF);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 1, 1, G_OFF);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "../CoreMath.h"
|
#include "../CoreMath.h"
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
#include "World.h"
|
#include "World.h"
|
||||||
|
|
||||||
|
|
@ -15,10 +15,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture koopa_troopa_beach_textures[];
|
extern const course_texture koopa_troopa_beach_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class KoopaTroopaBeach : public Course {
|
class KoopaTroopaBeach : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~KoopaTroopaBeach() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~KoopaTroopaBeach() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -30,16 +31,16 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void UpdateCourseObjects() override;
|
virtual void TickTrackObjects() override;
|
||||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
virtual void DrawTrackObjects(s32 cameraId) override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||||
virtual void ScrollingTextures() override;
|
virtual void ScrollingTextures() override;
|
||||||
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
virtual void DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -38,7 +38,6 @@ extern "C" {
|
||||||
#include "courses/staff_ghost_data.h"
|
#include "courses/staff_ghost_data.h"
|
||||||
#include "framebuffer_effects.h"
|
#include "framebuffer_effects.h"
|
||||||
#include "skybox_and_splitscreen.h"
|
#include "skybox_and_splitscreen.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char* luigi_raceway_dls[120];
|
extern const char* luigi_raceway_dls[120];
|
||||||
extern s16 currentScreenSection;
|
extern s16 currentScreenSection;
|
||||||
}
|
}
|
||||||
|
|
@ -59,7 +58,7 @@ LuigiRaceway::LuigiRaceway() {
|
||||||
Id = "mk:luigi_raceway";
|
Id = "mk:luigi_raceway";
|
||||||
Props.SetText(Props.Name, "luigi raceway", sizeof(Props.Name));
|
Props.SetText(Props.Name, "luigi raceway", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "l circuit", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "l circuit", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "717m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "717m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D0091E8;
|
Props.AIBehaviour = D_0D0091E8;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -117,7 +116,7 @@ LuigiRaceway::LuigiRaceway() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuigiRaceway::Load() {
|
void LuigiRaceway::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(luigi_raceway_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(luigi_raceway_dls); i++) {
|
||||||
InvertTriangleWindingByName(luigi_raceway_dls[i]);
|
InvertTriangleWindingByName(luigi_raceway_dls[i]);
|
||||||
|
|
@ -126,9 +125,9 @@ void LuigiRaceway::Load() {
|
||||||
InvertTriangleWindingByName(d_course_luigi_raceway_packed_dl_E0);
|
InvertTriangleWindingByName(d_course_luigi_raceway_packed_dl_E0);
|
||||||
InvertTriangleWindingByName(d_course_luigi_raceway_packed_dl_68);
|
InvertTriangleWindingByName(d_course_luigi_raceway_packed_dl_68);
|
||||||
}
|
}
|
||||||
parse_course_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_luigi_raceway_addr));
|
parse_track_displaylists((TrackSections*) LOAD_ASSET_RAW(d_course_luigi_raceway_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
Props.WaterLevel = gTrackMinY - 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuigiRaceway::UnLoad() {
|
void LuigiRaceway::UnLoad() {
|
||||||
|
|
@ -157,7 +156,7 @@ void LuigiRaceway::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuigiRaceway::InitCourseObjects() {
|
void LuigiRaceway::InitTrackObjects() {
|
||||||
size_t i;
|
size_t i;
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
|
|
@ -249,7 +248,7 @@ void LuigiRaceway::CopyJumbotron(s32 ulx, s32 uly, s16 portionToDraw, u16* sourc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuigiRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
void LuigiRaceway::Draw(ScreenContext* arg0) {
|
||||||
UNUSED s32 pad;
|
UNUSED s32 pad;
|
||||||
u16 sp22 = (u16) arg0->pathCounter;
|
u16 sp22 = (u16) arg0->pathCounter;
|
||||||
s16 prevFrame;
|
s16 prevFrame;
|
||||||
|
|
@ -278,7 +277,7 @@ void LuigiRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
|
|
||||||
render_course_segments(luigi_raceway_dls, arg0);
|
render_track_sections(luigi_raceway_dls, arg0);
|
||||||
|
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
|
|
@ -314,7 +313,7 @@ void LuigiRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuigiRaceway::RenderCredits() {
|
void LuigiRaceway::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_luigi_raceway_dl_FD40));
|
gSPDisplayList(gDisplayListHead++, (Gfx*) (d_course_luigi_raceway_dl_FD40));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/luigi_raceway/luigi_raceway_vertices.h"
|
#include "assets/models/tracks/luigi_raceway/luigi_raceway_vertices.h"
|
||||||
|
|
@ -15,7 +15,7 @@ extern "C" {
|
||||||
extern const course_texture luigi_raceway_textures[];
|
extern const course_texture luigi_raceway_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class LuigiRaceway : public Course {
|
class LuigiRaceway : public Track {
|
||||||
void CopyJumbotron(s32 ulx, s32 uly, s16 portionToDraw, u16* source);
|
void CopyJumbotron(s32 ulx, s32 uly, s16 portionToDraw, u16* source);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -29,13 +29,13 @@ class LuigiRaceway : public Course {
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void SetStaffGhost() override;
|
virtual void SetStaffGhost() override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
|
virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
|
||||||
f32* arg7) override;
|
f32* arg7) override;
|
||||||
};
|
};
|
||||||
|
|
@ -34,7 +34,6 @@ extern "C" {
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "courses/staff_ghost_data.h"
|
#include "courses/staff_ghost_data.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *mario_raceway_dls[68];
|
extern const char *mario_raceway_dls[68];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -54,7 +53,7 @@ MarioRaceway::MarioRaceway() {
|
||||||
Id = "mk:mario_raceway";
|
Id = "mk:mario_raceway";
|
||||||
Props.SetText(Props.Name, "mario raceway", sizeof(Props.Name));
|
Props.SetText(Props.Name, "mario raceway", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "m circuit", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "m circuit", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "567m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "567m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D008F28;
|
Props.AIBehaviour = D_0D008F28;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -113,7 +112,7 @@ MarioRaceway::MarioRaceway() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MarioRaceway::Load() {
|
void MarioRaceway::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
|
|
||||||
// Invert winding in mirror mode before generating collision meshes
|
// Invert winding in mirror mode before generating collision meshes
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
|
|
@ -150,9 +149,9 @@ void MarioRaceway::Load() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_mario_raceway_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_mario_raceway_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
Props.WaterLevel = gTrackMinY - 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MarioRaceway::UnLoad() {
|
void MarioRaceway::UnLoad() {
|
||||||
|
|
@ -187,7 +186,7 @@ void MarioRaceway::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MarioRaceway::InitCourseObjects() {
|
void MarioRaceway::InitTrackObjects() {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
func_80070714();
|
func_80070714();
|
||||||
|
|
@ -257,7 +256,7 @@ void render_mario_raceway_pipe(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MarioRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
void MarioRaceway::Draw(ScreenContext* arg0) {
|
||||||
u16 sp22 = arg0->pathCounter;
|
u16 sp22 = arg0->pathCounter;
|
||||||
u16 temp_t0 = arg0->playerDirection;
|
u16 temp_t0 = arg0->playerDirection;
|
||||||
|
|
||||||
|
|
@ -351,7 +350,7 @@ void MarioRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_3508);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_3508);
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_3240);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_3240);
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_14A0);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_14A0);
|
||||||
render_course_segments(mario_raceway_dls, arg0);
|
render_track_sections(mario_raceway_dls, arg0);
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_TEX_EDGE, G_RM_AA_ZB_TEX_EDGE2);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
|
|
@ -362,7 +361,7 @@ void MarioRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_160);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_mario_raceway_packed_dl_160);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MarioRaceway::RenderCredits() {
|
void MarioRaceway::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_mario_raceway_dl_9348));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_mario_raceway_dl_9348));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/mario_raceway/mario_raceway_vertices.h"
|
#include "assets/models/tracks/mario_raceway/mario_raceway_vertices.h"
|
||||||
|
|
@ -12,9 +12,10 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
class MarioRaceway : public Course {
|
class MarioRaceway : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~MarioRaceway() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~MarioRaceway() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -26,13 +27,13 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void SetStaffGhost() override;
|
virtual void SetStaffGhost() override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void CreditsSpawnActors() override;
|
virtual void CreditsSpawnActors() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -33,7 +33,6 @@ extern "C" {
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "code_80086E70.h"
|
#include "code_80086E70.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *moo_moo_farm_dls[92];
|
extern const char *moo_moo_farm_dls[92];
|
||||||
extern s16 currentScreenSection;
|
extern s16 currentScreenSection;
|
||||||
extern s8 gPlayerCount;
|
extern s8 gPlayerCount;
|
||||||
|
|
@ -54,7 +53,7 @@ MooMooFarm::MooMooFarm() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "moo moo farm", sizeof(Props.Name));
|
Props.SetText(Props.Name, "moo moo farm", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "farm", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "farm", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "527m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "527m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D009210;
|
Props.AIBehaviour = D_0D009210;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -112,7 +111,7 @@ MooMooFarm::MooMooFarm() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void MooMooFarm::Load() {
|
void MooMooFarm::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(moo_moo_farm_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(moo_moo_farm_dls); i++) {
|
||||||
InvertTriangleWindingByName(moo_moo_farm_dls[i]);
|
InvertTriangleWindingByName(moo_moo_farm_dls[i]);
|
||||||
|
|
@ -124,9 +123,9 @@ void MooMooFarm::Load() {
|
||||||
InvertTriangleWindingByName(d_course_moo_moo_farm_dl_14060);
|
InvertTriangleWindingByName(d_course_moo_moo_farm_dl_14060);
|
||||||
InvertTriangleWindingByName(d_course_moo_moo_farm_packed_dl_10C0);
|
InvertTriangleWindingByName(d_course_moo_moo_farm_packed_dl_10C0);
|
||||||
}
|
}
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_moo_moo_farm_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_moo_moo_farm_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
Props.WaterLevel = gTrackMinY - 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MooMooFarm::UnLoad() {
|
void MooMooFarm::UnLoad() {
|
||||||
|
|
@ -260,7 +259,7 @@ void MooMooFarm::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MooMooFarm::Render(struct UnkStruct_800DC5EC* arg0) {
|
void MooMooFarm::Draw(ScreenContext* arg0) {
|
||||||
s16 temp_s0 = arg0->pathCounter;
|
s16 temp_s0 = arg0->pathCounter;
|
||||||
s16 temp_s1 = arg0->playerDirection;
|
s16 temp_s1 = arg0->playerDirection;
|
||||||
|
|
||||||
|
|
@ -276,7 +275,7 @@ void MooMooFarm::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_packed_dl_5640);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_packed_dl_5640);
|
||||||
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
gSPFogPosition(gDisplayListHead++, D_802B87B0, D_802B87B4);
|
||||||
|
|
||||||
render_course_segments(moo_moo_farm_dls, arg0);
|
render_track_sections(moo_moo_farm_dls, arg0);
|
||||||
|
|
||||||
if ((temp_s0 < 14) && (temp_s0 > 10)) {
|
if ((temp_s0 < 14) && (temp_s0 > 10)) {
|
||||||
if ((temp_s1 == 2) || (temp_s1 == 3) || (temp_s1 == 1)) {
|
if ((temp_s1 == 2) || (temp_s1 == 3) || (temp_s1 == 1)) {
|
||||||
|
|
@ -333,7 +332,7 @@ void MooMooFarm::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_packed_dl_10C0);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_moo_moo_farm_packed_dl_10C0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MooMooFarm::RenderCredits() {
|
void MooMooFarm::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_moo_moo_farm_dl_14088));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_moo_moo_farm_dl_14088));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
#include "engine/objects/Mole.h"
|
#include "engine/objects/Mole.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
@ -13,12 +13,13 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture moo_moo_farm_textures[];
|
extern const course_texture moo_moo_farm_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class OMole;
|
class OMole;
|
||||||
|
|
||||||
class MooMooFarm : public Course {
|
class MooMooFarm : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~MooMooFarm() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~MooMooFarm() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -32,8 +33,8 @@ public:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void CreditsSpawnActors() override;
|
virtual void CreditsSpawnActors() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -38,7 +38,6 @@ extern "C" {
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "courses/staff_ghost_data.h"
|
#include "courses/staff_ghost_data.h"
|
||||||
#include "podium_ceremony_actors.h"
|
#include "podium_ceremony_actors.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *royal_raceway_dls[];
|
extern const char *royal_raceway_dls[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -55,7 +54,7 @@ PodiumCeremony::PodiumCeremony() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "royal raceway", sizeof(Props.Name));
|
Props.SetText(Props.Name, "royal raceway", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "p circuit", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "p circuit", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "1025m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "1025m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D009188;
|
Props.AIBehaviour = D_0D009188;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -112,9 +111,9 @@ PodiumCeremony::PodiumCeremony() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PodiumCeremony::Load() {
|
void PodiumCeremony::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
|
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_royal_raceway_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_royal_raceway_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -163,7 +162,7 @@ void PodiumCeremony::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PodiumCeremony::InitCourseObjects() {
|
void PodiumCeremony::InitTrackObjects() {
|
||||||
size_t i;
|
size_t i;
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
|
|
@ -205,7 +204,7 @@ void PodiumCeremony::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void PodiumCeremony::Render(struct UnkStruct_800DC5EC* arg0) {
|
void PodiumCeremony::Draw(ScreenContext* arg0) {
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
@ -222,7 +221,7 @@ void PodiumCeremony::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
// d_course_royal_raceway_packed_dl_A648
|
// d_course_royal_raceway_packed_dl_A648
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_A648);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_A648);
|
||||||
|
|
||||||
render_course_segments(royal_raceway_dls, arg0);
|
render_track_sections(royal_raceway_dls, arg0);
|
||||||
|
|
||||||
// d_course_royal_raceway_packed_dl_11A8
|
// d_course_royal_raceway_packed_dl_11A8
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_11A8);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_11A8);
|
||||||
|
|
@ -234,7 +233,7 @@ void PodiumCeremony::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PodiumCeremony::RenderCredits() {
|
void PodiumCeremony::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_royal_raceway_dl_D8E8));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_royal_raceway_dl_D8E8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "CoreMath.h"
|
#include "CoreMath.h"
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/royal_raceway/royal_raceway_vertices.h"
|
#include "assets/models/tracks/royal_raceway/royal_raceway_vertices.h"
|
||||||
|
|
@ -13,10 +13,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture royal_raceway_textures[];
|
extern const course_texture royal_raceway_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class PodiumCeremony : public Course {
|
class PodiumCeremony : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~PodiumCeremony() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~PodiumCeremony() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -29,11 +30,11 @@ public:
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
//virtual void InitClouds() override;
|
//virtual void InitClouds() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -31,7 +31,6 @@ extern "C" {
|
||||||
#include "actors.h"
|
#include "actors.h"
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *rainbow_road_dls[48];
|
extern const char *rainbow_road_dls[48];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -50,7 +49,7 @@ RainbowRoad::RainbowRoad() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "rainbow road", sizeof(Props.Name));
|
Props.SetText(Props.Name, "rainbow road", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "rainbow", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "rainbow", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "2000m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "2000m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D0092C8;
|
Props.AIBehaviour = D_0D0092C8;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -109,14 +108,14 @@ RainbowRoad::RainbowRoad() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RainbowRoad::Load() {
|
void RainbowRoad::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(rainbow_road_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(rainbow_road_dls); i++) {
|
||||||
InvertTriangleWindingByName(rainbow_road_dls[i]);
|
InvertTriangleWindingByName(rainbow_road_dls[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
D_800DC5C8 = 1;
|
D_800DC5C8 = 1;
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_rainbow_road_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_rainbow_road_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
// d_course_rainbow_road_packed_dl_2068
|
// d_course_rainbow_road_packed_dl_2068
|
||||||
find_vtx_and_set_colours((Gfx*) d_course_rainbow_road_packed_dl_2068, 150, 255, 255, 255);
|
find_vtx_and_set_colours((Gfx*) d_course_rainbow_road_packed_dl_2068, 150, 255, 255, 255);
|
||||||
|
|
@ -158,11 +157,11 @@ void RainbowRoad::InitClouds() {
|
||||||
init_stars(this->Props.Clouds);
|
init_stars(this->Props.Clouds);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RainbowRoad::UpdateClouds(s32 sp1C, Camera* camera) {
|
void RainbowRoad::TickClouds(s32 sp1C, Camera* camera) {
|
||||||
update_stars(sp1C, camera, this->Props.CloudList);
|
update_stars(sp1C, camera, this->Props.CloudList);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RainbowRoad::InitCourseObjects() {
|
void RainbowRoad::InitTrackObjects() {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < NUM_NEON_SIGNS; i++) {
|
for (i = 0; i < NUM_NEON_SIGNS; i++) {
|
||||||
|
|
@ -171,14 +170,14 @@ void RainbowRoad::InitCourseObjects() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RainbowRoad::UpdateCourseObjects() {
|
void RainbowRoad::TickTrackObjects() {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
update_neon();
|
update_neon();
|
||||||
//update_chain_chomps();
|
//update_chain_chomps();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RainbowRoad::RenderCourseObjects(s32 cameraId) {
|
void RainbowRoad::DrawTrackObjects(s32 cameraId) {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
render_object_neon(cameraId);
|
render_object_neon(cameraId);
|
||||||
//render_object_chain_chomps(cameraId);
|
//render_object_chain_chomps(cameraId);
|
||||||
|
|
@ -192,7 +191,7 @@ void RainbowRoad::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void RainbowRoad::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
void RainbowRoad::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||||
|
|
||||||
void RainbowRoad::Render(struct UnkStruct_800DC5EC* arg0) {
|
void RainbowRoad::Draw(ScreenContext* arg0) {
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
@ -200,7 +199,7 @@ void RainbowRoad::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RainbowRoad::RenderCredits() {
|
void RainbowRoad::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_rainbow_road_dl_16220));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_rainbow_road_dl_16220));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -208,11 +207,11 @@ void RainbowRoad::Waypoints(Player* player, int8_t playerId) {
|
||||||
player->nearestPathPointId = gCopyNearestWaypointByPlayerId[playerId];
|
player->nearestPathPointId = gCopyNearestWaypointByPlayerId[playerId];
|
||||||
}
|
}
|
||||||
|
|
||||||
void RainbowRoad::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
void RainbowRoad::DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
||||||
|
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPClearGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
render_course_segments(rainbow_road_dls, screen);
|
render_track_sections(rainbow_road_dls, screen);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/rainbow_road/rainbow_road_vertices.h"
|
#include "assets/models/tracks/rainbow_road/rainbow_road_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture rainbow_road_textures[];
|
extern const course_texture rainbow_road_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class RainbowRoad : public Course {
|
class RainbowRoad : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~RainbowRoad() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~RainbowRoad() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -28,17 +29,17 @@ public:
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitClouds() override;
|
virtual void InitClouds() override;
|
||||||
virtual void UpdateClouds(s32, Camera*) override;
|
virtual void TickClouds(s32, Camera*) override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void UpdateCourseObjects() override;
|
virtual void TickTrackObjects() override;
|
||||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
virtual void DrawTrackObjects(s32 cameraId) override;
|
||||||
virtual void SomeSounds() override;
|
virtual void SomeSounds() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||||
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
virtual void DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
||||||
virtual void CreditsSpawnActors() override;
|
virtual void CreditsSpawnActors() override;
|
||||||
virtual void Destroy() override;
|
virtual void Destroy() override;
|
||||||
};
|
};
|
||||||
|
|
@ -32,7 +32,6 @@ extern "C" {
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "courses/staff_ghost_data.h"
|
#include "courses/staff_ghost_data.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *royal_raceway_dls[132];
|
extern const char *royal_raceway_dls[132];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -51,7 +50,7 @@ RoyalRaceway::RoyalRaceway() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "royal raceway", sizeof(Props.Name));
|
Props.SetText(Props.Name, "royal raceway", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "p circuit", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "p circuit", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "1025m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "1025m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.AIBehaviour = D_0D009188;
|
Props.AIBehaviour = D_0D009188;
|
||||||
Props.AIMaximumSeparation = 50.0f;
|
Props.AIMaximumSeparation = 50.0f;
|
||||||
|
|
@ -111,7 +110,7 @@ RoyalRaceway::RoyalRaceway() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoyalRaceway::Load() {
|
void RoyalRaceway::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(royal_raceway_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(royal_raceway_dls); i++) {
|
||||||
InvertTriangleWindingByName(royal_raceway_dls[i]);
|
InvertTriangleWindingByName(royal_raceway_dls[i]);
|
||||||
|
|
@ -121,7 +120,7 @@ void RoyalRaceway::Load() {
|
||||||
InvertTriangleWindingByName(d_course_royal_raceway_packed_dl_11A8);
|
InvertTriangleWindingByName(d_course_royal_raceway_packed_dl_11A8);
|
||||||
InvertTriangleWindingByName(d_course_royal_raceway_packed_dl_8A0);
|
InvertTriangleWindingByName(d_course_royal_raceway_packed_dl_8A0);
|
||||||
}
|
}
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_royal_raceway_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_royal_raceway_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -148,7 +147,7 @@ void RoyalRaceway::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoyalRaceway::InitCourseObjects() {
|
void RoyalRaceway::InitTrackObjects() {
|
||||||
size_t i;
|
size_t i;
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
if (gModeSelection == GRAND_PRIX) {
|
if (gModeSelection == GRAND_PRIX) {
|
||||||
|
|
@ -200,7 +199,7 @@ void RoyalRaceway::SetStaffGhost() {
|
||||||
D_80162DE4 = 6;
|
D_80162DE4 = 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoyalRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
void RoyalRaceway::Draw(ScreenContext* arg0) {
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
|
|
@ -217,7 +216,7 @@ void RoyalRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
// d_course_royal_raceway_packed_dl_A648
|
// d_course_royal_raceway_packed_dl_A648
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_A648);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_A648);
|
||||||
|
|
||||||
render_course_segments(royal_raceway_dls, arg0);
|
render_track_sections(royal_raceway_dls, arg0);
|
||||||
|
|
||||||
// d_course_royal_raceway_packed_dl_11A8
|
// d_course_royal_raceway_packed_dl_11A8
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_11A8);
|
gSPDisplayList(gDisplayListHead++, (Gfx*) d_course_royal_raceway_packed_dl_11A8);
|
||||||
|
|
@ -229,7 +228,7 @@ void RoyalRaceway::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
gSPSetGeometryMode(gDisplayListHead++, G_CULL_BACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RoyalRaceway::RenderCredits() {
|
void RoyalRaceway::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_royal_raceway_dl_D8E8));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_royal_raceway_dl_D8E8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
#include "Course.h"
|
#include "Track.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include "assets/models/tracks/royal_raceway/royal_raceway_vertices.h"
|
#include "assets/models/tracks/royal_raceway/royal_raceway_vertices.h"
|
||||||
|
|
@ -12,10 +12,11 @@ extern "C" {
|
||||||
#include "data/some_data.h"
|
#include "data/some_data.h"
|
||||||
#include "objects.h"
|
#include "objects.h"
|
||||||
#include "path_spawn_metadata.h"
|
#include "path_spawn_metadata.h"
|
||||||
|
#include "code_800029B0.h"
|
||||||
extern const course_texture royal_raceway_textures[];
|
extern const course_texture royal_raceway_textures[];
|
||||||
}
|
}
|
||||||
|
|
||||||
class RoyalRaceway : public Course {
|
class RoyalRaceway : public Track {
|
||||||
public:
|
public:
|
||||||
virtual ~RoyalRaceway() = default; // Virtual destructor for proper cleanup in derived classes
|
virtual ~RoyalRaceway() = default; // Virtual destructor for proper cleanup in derived classes
|
||||||
|
|
||||||
|
|
@ -27,12 +28,12 @@ public:
|
||||||
virtual void Load() override;
|
virtual void Load() override;
|
||||||
virtual void UnLoad() override;
|
virtual void UnLoad() override;
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void InitCourseObjects() override;
|
virtual void InitTrackObjects() override;
|
||||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||||
virtual void SetStaffGhost() override;
|
virtual void SetStaffGhost() override;
|
||||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
virtual void Draw(ScreenContext*) override;
|
||||||
virtual void RenderCredits() override;
|
virtual void DrawCredits() override;
|
||||||
virtual void ScrollingTextures() override;
|
virtual void ScrollingTextures() override;
|
||||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||||
};
|
};
|
||||||
|
|
@ -32,7 +32,6 @@ extern "C" {
|
||||||
#include "actors.h"
|
#include "actors.h"
|
||||||
#include "collision.h"
|
#include "collision.h"
|
||||||
#include "memory.h"
|
#include "memory.h"
|
||||||
#include "course.h"
|
|
||||||
extern const char *sherbet_land_dls[72];
|
extern const char *sherbet_land_dls[72];
|
||||||
extern const char *sherbet_land_dls_2[72];
|
extern const char *sherbet_land_dls_2[72];
|
||||||
}
|
}
|
||||||
|
|
@ -53,7 +52,7 @@ SherbetLand::SherbetLand() {
|
||||||
|
|
||||||
Props.SetText(Props.Name, "sherbet land", sizeof(Props.Name));
|
Props.SetText(Props.Name, "sherbet land", sizeof(Props.Name));
|
||||||
Props.SetText(Props.DebugName, "sherbet", sizeof(Props.DebugName));
|
Props.SetText(Props.DebugName, "sherbet", sizeof(Props.DebugName));
|
||||||
Props.SetText(Props.CourseLength, "756m", sizeof(Props.CourseLength));
|
Props.SetText(Props.TrackLength, "756m", sizeof(Props.TrackLength));
|
||||||
|
|
||||||
Props.LakituTowType = (s32)OLakitu::LakituTowType::ICE;
|
Props.LakituTowType = (s32)OLakitu::LakituTowType::ICE;
|
||||||
|
|
||||||
|
|
@ -115,7 +114,7 @@ SherbetLand::SherbetLand() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void SherbetLand::Load() {
|
void SherbetLand::Load() {
|
||||||
Course::Load();
|
Track::Load();
|
||||||
if (gIsMirrorMode != 0) {
|
if (gIsMirrorMode != 0) {
|
||||||
for (size_t i = 0; i < ARRAY_COUNT(sherbet_land_dls); i++) {
|
for (size_t i = 0; i < ARRAY_COUNT(sherbet_land_dls); i++) {
|
||||||
InvertTriangleWindingByName(sherbet_land_dls[i]);
|
InvertTriangleWindingByName(sherbet_land_dls[i]);
|
||||||
|
|
@ -124,7 +123,7 @@ void SherbetLand::Load() {
|
||||||
InvertTriangleWindingByName(sherbet_land_dls_2[i]);
|
InvertTriangleWindingByName(sherbet_land_dls_2[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_sherbet_land_addr));
|
parse_track_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_sherbet_land_addr));
|
||||||
func_80295C6C();
|
func_80295C6C();
|
||||||
// d_course_sherbet_land_packed_dl_1EB8
|
// d_course_sherbet_land_packed_dl_1EB8
|
||||||
find_vtx_and_set_colours((Gfx*) d_course_sherbet_land_packed_dl_1EB8, 180, 255, 255, 255);
|
find_vtx_and_set_colours((Gfx*) d_course_sherbet_land_packed_dl_1EB8, 180, 255, 255, 255);
|
||||||
|
|
@ -138,7 +137,7 @@ void SherbetLand::UnLoad() {
|
||||||
|
|
||||||
f32 SherbetLand::GetWaterLevel(FVector pos, Collision* collision) {
|
f32 SherbetLand::GetWaterLevel(FVector pos, Collision* collision) {
|
||||||
if ((get_surface_type(collision->meshIndexZX) & 0xFF) == SNOW) {
|
if ((get_surface_type(collision->meshIndexZX) & 0xFF) == SNOW) {
|
||||||
return (f32) (gCourseMinY - 0xA);
|
return (f32) (gTrackMinY - 0xA);
|
||||||
}
|
}
|
||||||
return Props.WaterLevel;
|
return Props.WaterLevel;
|
||||||
}
|
}
|
||||||
|
|
@ -188,32 +187,32 @@ void SherbetLand::BeginPlay() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SherbetLand::UpdateCourseObjects() {
|
void SherbetLand::TickTrackObjects() {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
func_800842C8();
|
func_800842C8();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SherbetLand::RenderCourseObjects(s32 cameraId) {
|
void SherbetLand::DrawTrackObjects(s32 cameraId) {
|
||||||
if (gGamestate != CREDITS_SEQUENCE) {
|
if (gGamestate != CREDITS_SEQUENCE) {
|
||||||
func_80052E30(cameraId);
|
func_80052E30(cameraId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SherbetLand::Render(struct UnkStruct_800DC5EC* arg0) {
|
void SherbetLand::Draw(ScreenContext* arg0) {
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
||||||
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(gDisplayListHead++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
render_course_segments(sherbet_land_dls, arg0);
|
render_track_sections(sherbet_land_dls, arg0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SherbetLand::RenderCredits() {
|
void SherbetLand::DrawCredits() {
|
||||||
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_sherbet_land_dl_9AE8));
|
gSPDisplayList(gDisplayListHead++, (Gfx*)(d_course_sherbet_land_dl_9AE8));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SherbetLand::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
void SherbetLand::DrawWater(ScreenContext* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) {
|
||||||
gDPPipeSync(gDisplayListHead++);
|
gDPPipeSync(gDisplayListHead++);
|
||||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||||
|
|
@ -221,7 +220,7 @@ void SherbetLand::DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCoun
|
||||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP);
|
gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP);
|
||||||
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
|
gDPSetTexturePersp(gDisplayListHead++, G_TP_PERSP);
|
||||||
render_course_segments(sherbet_land_dls_2, screen);
|
render_track_sections(sherbet_land_dls_2, screen);
|
||||||
|
|
||||||
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
gDPSetAlphaCompare(gDisplayListHead++, G_AC_NONE);
|
||||||
if ((func_80290C20(screen->camera) == 1) && (get_water_level(screen->player) < screen->player->pos[1])) {
|
if ((func_80290C20(screen->camera) == 1) && (get_water_level(screen->player) < screen->player->pos[1])) {
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue