mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-07-10 07:07:17 -04:00
Refactor minimap
This commit is contained in:
@@ -35,3 +35,5 @@
|
||||
#include "objects/Trophy.h"
|
||||
#include "objects/Snowman.h"
|
||||
#include "objects/Podium.h"
|
||||
#include "objects/GrandPrixBalloons.h"
|
||||
|
||||
|
||||
@@ -99,17 +99,17 @@ struct FVector2D {
|
||||
|
||||
// Sets integer X Z coordinates
|
||||
typedef struct IVector2D {
|
||||
int32_t X, Z;
|
||||
int32_t X, Y;
|
||||
|
||||
#ifdef __cplusplus
|
||||
IVector2D() : X(0), Z(0) {} // Default constructor
|
||||
IVector2D() : X(0), Y(0) {} // Default constructor
|
||||
|
||||
IVector2D(int32_t x, int32_t z) : X(x), Z(z) {} // Constructor to initialize with values
|
||||
IVector2D(int32_t x, int32_t y) : X(x), Y(y) {} // Constructor to initialize with values
|
||||
|
||||
|
||||
IVector2D& operator=(const IVector2D& other) {
|
||||
X = other.X;
|
||||
Z = other.Z;
|
||||
Y = other.Y;
|
||||
return *this;
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
@@ -70,8 +70,16 @@ BansheeBoardwalk::BansheeBoardwalk() {
|
||||
this->gfx = d_course_banshee_boardwalk_packed_dls;
|
||||
this->gfxSize = 3689;
|
||||
Props.textures = banshee_boardwalk_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineBansheeBoardwalk;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineBansheeBoardwalk;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 262;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 55;
|
||||
Props.Minimap.PlayerY = 39;
|
||||
Props.Minimap.PlayerScaleFactor = 0.016f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.Id = "mk:banshee_boardwalk";
|
||||
|
||||
@@ -121,8 +129,6 @@ BansheeBoardwalk::BansheeBoardwalk() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {0, 0, 0};
|
||||
Props.Skybox.BottomRight = {0, 0, 0};
|
||||
@@ -190,15 +196,6 @@ void BansheeBoardwalk::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void BansheeBoardwalk::MinimapSettings() {
|
||||
D_80165880 = dma_textures((const char*)gTextureGhosts, 0x4CC2, 0xD980);
|
||||
D_8018D2A0 = 0.016f;
|
||||
D_8018D2C0[0] = 0x0106;
|
||||
D_8018D2E0 = 55;
|
||||
D_8018D2E8 = 39;
|
||||
}
|
||||
|
||||
void BansheeBoardwalk::InitCourseObjects() {
|
||||
size_t objectId = 0;
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
@@ -256,12 +253,6 @@ void BansheeBoardwalk::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void BansheeBoardwalk::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void BansheeBoardwalk::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
Camera* camera = arg0->camera;
|
||||
Mat4 spCC;
|
||||
|
||||
@@ -28,14 +28,12 @@ public:
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void ScrollingTextures() override;
|
||||
|
||||
@@ -43,8 +43,16 @@ BigDonut::BigDonut() {
|
||||
this->gfx = d_course_big_donut_packed_dls;
|
||||
this->gfxSize = 528;
|
||||
Props.textures = big_donut_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineBigDonut;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineBigDonut;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 257;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 32;
|
||||
Props.Minimap.PlayerY = 31;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0257f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "big donut", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "doughnut", sizeof(Props.DebugName));
|
||||
@@ -89,8 +97,6 @@ BigDonut::BigDonut() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {0, 0, 0};
|
||||
Props.Skybox.BottomRight = {0, 0, 0};
|
||||
@@ -121,9 +127,6 @@ void BigDonut::Load() {
|
||||
func_80295C6C();
|
||||
}
|
||||
|
||||
void BigDonut::LoadTextures() {
|
||||
}
|
||||
|
||||
void BigDonut::BeginPlay() {
|
||||
spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_big_donut_item_box_spawns));
|
||||
|
||||
@@ -140,27 +143,6 @@ void BigDonut::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void BigDonut::MinimapSettings() {
|
||||
D_8018D2A0 = 0.0257f;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 31;
|
||||
}
|
||||
|
||||
void BigDonut::InitCourseObjects() {}
|
||||
|
||||
void BigDonut::SomeSounds() {}
|
||||
|
||||
void BigDonut::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void BigDonut::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void BigDonut::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void BigDonut::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
|
||||
@@ -17,23 +17,12 @@ extern "C" {
|
||||
|
||||
class BigDonut : public Course {
|
||||
public:
|
||||
virtual ~BigDonut() = default; // Virtual destructor for proper cleanup in derived classes
|
||||
virtual ~BigDonut() = default;
|
||||
|
||||
// Constructor
|
||||
explicit BigDonut();
|
||||
|
||||
// virtual void Load(const char* courseVtx,
|
||||
// course_texture* textures, const char* displaylists, size_t dlSize);
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||
|
||||
@@ -45,8 +45,16 @@ BlockFort::BlockFort() {
|
||||
this->gfx = d_course_block_fort_packed_dls;
|
||||
this->gfxSize = 699;
|
||||
Props.textures = block_fort_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineBlockFort;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineBlockFort;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 257;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 32;
|
||||
Props.Minimap.PlayerY = 32;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0335f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "block fort", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "block", sizeof(Props.DebugName));
|
||||
@@ -94,8 +102,6 @@ BlockFort::BlockFort() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {128, 184, 248};
|
||||
Props.Skybox.BottomRight = {216, 232, 248};
|
||||
@@ -116,9 +122,6 @@ void BlockFort::Load() {
|
||||
Props.WaterLevel = gCourseMinY - 10.0f;
|
||||
}
|
||||
|
||||
void BlockFort::LoadTextures() {
|
||||
}
|
||||
|
||||
void BlockFort::BeginPlay() {
|
||||
spawn_all_item_boxes((ActorSpawnData*)LOAD_ASSET_RAW(d_course_block_fort_item_box_spawns));
|
||||
|
||||
@@ -135,27 +138,6 @@ void BlockFort::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void BlockFort::MinimapSettings() {
|
||||
D_8018D2A0 = 0.0335f;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 32;
|
||||
}
|
||||
|
||||
void BlockFort::InitCourseObjects() {}
|
||||
|
||||
void BlockFort::SomeSounds() {}
|
||||
|
||||
void BlockFort::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void BlockFort::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void BlockFort::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void BlockFort::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
@@ -165,10 +147,6 @@ void BlockFort::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPDisplayList(gDisplayListHead++, (segmented_gfx_to_virtual((void*)0x070015C0)));
|
||||
}
|
||||
|
||||
void BlockFort::RenderCredits() {}
|
||||
|
||||
void BlockFort::Waypoints(Player* player, int8_t playerId) {
|
||||
player->nearestWaypointId = 0;
|
||||
}
|
||||
|
||||
void BlockFort::Destroy() { }
|
||||
|
||||
@@ -25,17 +25,7 @@ public:
|
||||
// virtual void Load(const char* courseVtx,
|
||||
// course_texture* textures, const char* displaylists, size_t dlSize);
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Waypoints(Player*, int8_t) override;
|
||||
virtual void Destroy() override;
|
||||
};
|
||||
|
||||
@@ -72,8 +72,16 @@ BowsersCastle::BowsersCastle() {
|
||||
this->gfx = d_course_bowsers_castle_packed_dls;
|
||||
this->gfxSize = 4900;
|
||||
Props.textures = bowsers_castle_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineBowsersCastle;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineBowsersCastle;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 265;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 12;
|
||||
Props.Minimap.PlayerY = 48;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0174f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.Id = "mk:bowsers_castle";
|
||||
|
||||
@@ -123,8 +131,6 @@ BowsersCastle::BowsersCastle() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {48, 8, 120};
|
||||
Props.Skybox.BottomRight = {0, 0, 0};
|
||||
@@ -152,6 +158,23 @@ void BowsersCastle::LoadTextures() {
|
||||
dma_textures(gTextureShrub, 0x000003FFU, 0x00000800U);
|
||||
}
|
||||
|
||||
// Required for the 2 thwomps that go far
|
||||
void BowsersCastle::SpawnStockThwomp() {
|
||||
s32 objectId = indexObjectList1[0];
|
||||
init_object(objectId, 0);
|
||||
gObjectList[objectId].origin_pos[0] = 0x04b0 * xOrientation;
|
||||
gObjectList[objectId].origin_pos[2] = 0xf5ba;
|
||||
gObjectList[objectId].unk_0D5 = 3;
|
||||
gObjectList[objectId].primAlpha = 0;
|
||||
|
||||
objectId = indexObjectList1[1];
|
||||
init_object(objectId, 0);
|
||||
gObjectList[objectId].origin_pos[0] = 0x04b0 * xOrientation;
|
||||
gObjectList[objectId].origin_pos[2] = 0xf592;
|
||||
gObjectList[objectId].unk_0D5 = 3;
|
||||
gObjectList[objectId].primAlpha = 1;
|
||||
}
|
||||
|
||||
void BowsersCastle::BeginPlay() {
|
||||
spawn_foliage((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_bowsers_castle_tree_spawn));
|
||||
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_bowsers_castle_item_box_spawns));
|
||||
@@ -163,6 +186,7 @@ void BowsersCastle::BeginPlay() {
|
||||
gWorldInstance.AddObject(new OThwomp(0x044c, 0xf92a, 0xC000, 1.0f, 1, 1));
|
||||
gWorldInstance.AddObject(new OThwomp(0x02bc, 0xf95c, 0xC000, 1.0f, 2, 0));
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf8f8, 0xC000, 1.0f, 2, 1));
|
||||
BowsersCastle::SpawnStockThwomp();
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf5ba, 0xC000, 1.0f, 3, 0));
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf592, 0xC000, 1.0f, 3, 1));
|
||||
gWorldInstance.AddObject(new OThwomp(0x091a, 0xf5bf, 0xC000, 1.0f, 4, 0));
|
||||
@@ -174,6 +198,7 @@ void BowsersCastle::BeginPlay() {
|
||||
case CC_50:
|
||||
gWorldInstance.AddObject(new OThwomp(0x3B6, 0xF92A, 0xC000, 1.0f, 1, 0));
|
||||
gWorldInstance.AddObject(new OThwomp(0x0352, 0xf95c, 0xC000, 1.0f, 2, 0));
|
||||
BowsersCastle::SpawnStockThwomp();
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf5ba, 0xC000, 1.0f, 3, 0));
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf592, 0xC000, 1.0f, 3, 1));
|
||||
gWorldInstance.AddObject(new OThwomp(0x091a, 0xf5b0, 0xC000, 1.0f, 4, 0));
|
||||
@@ -186,6 +211,7 @@ void BowsersCastle::BeginPlay() {
|
||||
gWorldInstance.AddObject(new OThwomp(0x044c, 0xf92a, 0xC000, 1.0f, 1, 1));
|
||||
gWorldInstance.AddObject(new OThwomp(0x02bc, 0xf95c, 0xC000, 1.0f, 2, 0));
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf8f8, 0xC000, 1.0f, 2, 1));
|
||||
BowsersCastle::SpawnStockThwomp();
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf5ba, 0xC000, 1.0f, 3, 0));
|
||||
gWorldInstance.AddObject(new OThwomp(0x04b0, 0xf592, 0xC000, 1.0f, 3, 1));
|
||||
gWorldInstance.AddObject(new OThwomp(0x091a, 0xf5c9, 0xC000, 1.0f, 4, 0));
|
||||
@@ -210,14 +236,6 @@ void BowsersCastle::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void BowsersCastle::MinimapSettings() {
|
||||
D_8018D2C0[0] = 265;
|
||||
D_8018D2A0 = 0.0174f;
|
||||
D_8018D2E0 = 12;
|
||||
D_8018D2E8 = 48;
|
||||
}
|
||||
|
||||
void BowsersCastle::InitCourseObjects() {
|
||||
size_t objectId;
|
||||
size_t i;
|
||||
@@ -287,12 +305,6 @@ void BowsersCastle::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void BowsersCastle::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void BowsersCastle::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
|
||||
@@ -26,16 +26,15 @@ public:
|
||||
// course_texture* textures, const char* displaylists, size_t dlSize);
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
void SpawnStockThwomp();
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||
|
||||
@@ -64,8 +64,16 @@ ChocoMountain::ChocoMountain() {
|
||||
this->gfx = d_course_choco_mountain_packed_dls;
|
||||
this->gfxSize = 2910;
|
||||
Props.textures = choco_mountain_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineChocoMountain;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineChocoMountain;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 265;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 19;
|
||||
Props.Minimap.PlayerY = 37;
|
||||
Props.Minimap.PlayerScaleFactor = 0.022f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = -16.0;
|
||||
|
||||
Props.Id = "mk:choco_mountain";
|
||||
Props.SetText(Props.Name, "choco mountain", sizeof(Props.Name));
|
||||
@@ -114,8 +122,6 @@ ChocoMountain::ChocoMountain() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = -16.0;
|
||||
|
||||
Props.Skybox.TopRight = {255, 255, 255};
|
||||
Props.Skybox.BottomRight = {255, 255, 255};
|
||||
@@ -182,14 +188,6 @@ void ChocoMountain::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void ChocoMountain::MinimapSettings() {
|
||||
D_8018D2A0 = 0.022f;
|
||||
D_8018D2C0[0] = 265;
|
||||
D_8018D2E0 = 19;
|
||||
D_8018D2E8 = 37;
|
||||
}
|
||||
|
||||
void ChocoMountain::InitCourseObjects() {
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
@@ -237,12 +235,6 @@ void ChocoMountain::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void ChocoMountain::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void ChocoMountain::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
|
||||
@@ -27,12 +27,10 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||
|
||||
@@ -33,8 +33,18 @@ Course::Course() {
|
||||
// Props.Cup = FLOWER_CUP;
|
||||
// Props.CupIndex = 3;
|
||||
Props.Id = "";
|
||||
Props.MinimapTexture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 257;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 0;
|
||||
Props.Minimap.PlayerY = 0;
|
||||
Props.Minimap.PlayerScaleFactor = 0.22f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
Props.Minimap.Colour = {255, 255, 255};
|
||||
Props.WaterLevel = -10.0f;
|
||||
|
||||
Props.LakituTowType = (s32) OLakitu::LakituTowType::NORMAL;
|
||||
Props.AIBehaviour = D_0D008F28;
|
||||
@@ -80,8 +90,6 @@ Course::Course() {
|
||||
|
||||
Props.Clouds = NULL;
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
Props.Sequence = MusicSeq::MUSIC_SEQ_UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -290,9 +298,6 @@ void Course::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f ar
|
||||
func_8003E048(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
|
||||
void Course::MinimapSettings() {
|
||||
}
|
||||
|
||||
void Course::InitCourseObjects() {
|
||||
}
|
||||
|
||||
@@ -315,13 +320,6 @@ void Course::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
void Course::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void Course::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY,
|
||||
(u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void Course::SetStaffGhost() {
|
||||
D_80162DD6 = 1;
|
||||
D_80162DF4 = 1;
|
||||
|
||||
+36
-12
@@ -48,15 +48,27 @@ struct WaterVolume {
|
||||
float MaxZ;
|
||||
};
|
||||
|
||||
typedef struct MinimapProps {
|
||||
const char* Texture;
|
||||
int16_t Width;
|
||||
int16_t Height;
|
||||
IVector2D Pos[2]; // Minimap position for players 1 and 2. 3/4 player mode is hard-coded to the center.
|
||||
int32_t PlayerX; // The offset to place the player markers
|
||||
int32_t PlayerY;
|
||||
float PlayerScaleFactor; // Scale factor of the player markers
|
||||
float FinishlineX; // The offset to place the finishline texture on the minimap
|
||||
float FinishlineY;
|
||||
RGB8 Colour; // Colour of the visible pixels (the track path)
|
||||
} MinimapProps;
|
||||
|
||||
typedef struct Properties {
|
||||
const char* Id;
|
||||
char Name[128];
|
||||
char DebugName[128];
|
||||
char CourseLength[128];
|
||||
const char* AIBehaviour;
|
||||
const char* MinimapTexture;
|
||||
int32_t LakituTowType;
|
||||
IVector2D MinimapDimensions;
|
||||
MinimapProps Minimap;
|
||||
const char* AIBehaviour;
|
||||
float AIMaximumSeparation;
|
||||
float AIMinimumSeparation;
|
||||
float NearPersp;
|
||||
@@ -70,10 +82,9 @@ typedef struct Properties {
|
||||
Vec4f D_0D009808;
|
||||
TrackWaypoint* PathTable[4];
|
||||
TrackWaypoint* PathTable2[4];
|
||||
uint8_t* CloudTexture;
|
||||
CloudData *Clouds;
|
||||
CloudData *CloudList;
|
||||
float MinimapFinishlineX;
|
||||
float MinimapFinishlineY;
|
||||
SkyboxColours Skybox;
|
||||
const course_texture *textures;
|
||||
enum MusicSeq Sequence;
|
||||
@@ -114,8 +125,14 @@ typedef struct Properties {
|
||||
//j["Clouds"] = Clouds ? nlohmann::json{{"x", Clouds->x, "y", Clouds->y, "z", Clouds->z}} : nullptr;
|
||||
//j["CloudList"] = CloudList ? nlohmann::json{{"x", CloudList->x, "y", CloudList->y, "z", CloudList->z}} : nullptr;
|
||||
|
||||
j["MinimapFinishlineX"] = MinimapFinishlineX;
|
||||
j["MinimapFinishlineY"] = MinimapFinishlineY;
|
||||
j["MinimapPosition"] = {Minimap.Pos[0].X, Minimap.Pos[0].Y};
|
||||
j["MinimapPosition2P"] = {Minimap.Pos[1].X, Minimap.Pos[1].Y};
|
||||
j["MinimapPlayerX"] = Minimap.PlayerX;
|
||||
j["MinimapPlayerY"] = Minimap.PlayerY;
|
||||
j["MinimapPlayerScaleFactor"] = Minimap.PlayerScaleFactor;
|
||||
j["MinimapFinishlineX"] = Minimap.FinishlineX;
|
||||
j["MinimapFinishlineY"] = Minimap.FinishlineY;
|
||||
j["MinimapColour"] = {static_cast<int>(Minimap.Colour.r), static_cast<int>(Minimap.Colour.g), static_cast<int>(Minimap.Colour.b)};
|
||||
// SkyboxColors - assuming SkyboxColors can be serialized similarly
|
||||
// j["Skybox"] = Skybox; // Implement your serialization logic here
|
||||
j["Sequence"] = static_cast<int>(Sequence);
|
||||
@@ -186,9 +203,18 @@ typedef struct Properties {
|
||||
|
||||
//Clouds = nullptr; // Deserialize if data is present
|
||||
//CloudList = nullptr; // Deserialize if data is present
|
||||
|
||||
MinimapFinishlineX = j.at("MinimapFinishlineX").get<float>();
|
||||
MinimapFinishlineY = j.at("MinimapFinishlineY").get<float>();
|
||||
Minimap.Pos[0].X = j.at("MinimapPosition")[0].get<int32_t>();
|
||||
Minimap.Pos[0].Y = j.at("MinimapPosition")[1].get<int32_t>();
|
||||
Minimap.Pos[1].X = j.at("MinimapPosition2P")[0].get<int32_t>();
|
||||
Minimap.Pos[1].Y = j.at("MinimapPosition2P")[1].get<int32_t>();
|
||||
Minimap.PlayerX = j.at("MinimapPlayerX").get<int32_t>();
|
||||
Minimap.PlayerY = j.at("MinimapPlayerY").get<int32_t>();
|
||||
Minimap.PlayerScaleFactor = j.at("MinimapPlayerScaleFactor").get<float>();
|
||||
Minimap.FinishlineX = j.at("MinimapFinishlineX").get<float>();
|
||||
Minimap.FinishlineY = j.at("MinimapFinishlineY").get<float>();
|
||||
Minimap.Colour.r = j.at("MinimapColour")[0].get<uint8_t>();
|
||||
Minimap.Colour.g = j.at("MinimapColour")[1].get<uint8_t>();
|
||||
Minimap.Colour.b = j.at("MinimapColour")[2].get<uint8_t>();
|
||||
//textures = nullptr; // Deserialize textures if present
|
||||
Sequence = static_cast<MusicSeq>(j.at("Sequence").get<int>());
|
||||
WaterLevel = j.at("WaterLevel").get<float>();
|
||||
@@ -253,7 +279,6 @@ public:
|
||||
virtual void InitClouds();
|
||||
virtual void UpdateClouds(s32, Camera*);
|
||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7);
|
||||
virtual void MinimapSettings();
|
||||
virtual void InitCourseObjects();
|
||||
virtual void UpdateCourseObjects();
|
||||
virtual void RenderCourseObjects(s32 cameraId);
|
||||
@@ -261,7 +286,6 @@ public:
|
||||
virtual void CreditsSpawnActors();
|
||||
virtual void WhatDoesThisDo(Player*, int8_t);
|
||||
virtual void WhatDoesThisDoAI(Player*, int8_t);
|
||||
virtual void MinimapFinishlinePosition();
|
||||
virtual void SetStaffGhost();
|
||||
virtual void Render(struct UnkStruct_800DC5EC*);
|
||||
virtual void RenderCredits();
|
||||
|
||||
@@ -73,8 +73,16 @@ DKJungle::DKJungle() {
|
||||
this->gfx = d_course_dks_jungle_parkway_packed_dls;
|
||||
this->gfxSize = 4997;
|
||||
Props.textures = dks_jungle_parkway_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineDksJungleParkway;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineDksJungleParkway;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 255;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 29;
|
||||
Props.Minimap.PlayerY = 47;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0155f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "d.k.'s jungle parkway", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "jungle", sizeof(Props.DebugName));
|
||||
@@ -122,8 +130,6 @@ DKJungle::DKJungle() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {255, 174, 0};
|
||||
Props.Skybox.BottomRight = {255, 229, 124};
|
||||
@@ -211,14 +217,6 @@ void DKJungle::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void DKJungle::MinimapSettings() {
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0[0] = 255;
|
||||
D_8018D2E0 = 29;
|
||||
D_8018D2E8 = 47;
|
||||
}
|
||||
|
||||
void DKJungle::InitCourseObjects() {
|
||||
for (size_t i = 0; i < NUM_TORCHES; i++) {
|
||||
init_smoke_particles(i);
|
||||
@@ -287,12 +285,6 @@ void DKJungle::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void DKJungle::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void DKJungle::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||
set_track_light_direction(&D_800DC610[1], D_802B87D4, D_802B87D0, 1);
|
||||
|
||||
@@ -29,14 +29,12 @@ public:
|
||||
virtual f32 GetWaterLevel(FVector pos, Collision* collision) override;
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||
|
||||
@@ -43,8 +43,16 @@ DoubleDeck::DoubleDeck() {
|
||||
this->gfx = d_course_double_deck_packed_dls;
|
||||
this->gfxSize = 699;
|
||||
Props.textures = double_deck_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineDoubleDeck;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineDoubleDeck;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 257;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 32;
|
||||
Props.Minimap.PlayerY = 32;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0285f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "double deck", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "deck", sizeof(Props.DebugName));
|
||||
@@ -93,8 +101,6 @@ DoubleDeck::DoubleDeck() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {113, 70, 255};
|
||||
Props.Skybox.BottomRight = {255, 184, 99};
|
||||
@@ -134,13 +140,6 @@ void DoubleDeck::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void DoubleDeck::MinimapSettings() {
|
||||
D_8018D2A0 = 0.0285f;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 32;
|
||||
}
|
||||
|
||||
void DoubleDeck::InitCourseObjects() {}
|
||||
|
||||
void DoubleDeck::SomeSounds() {}
|
||||
@@ -149,12 +148,6 @@ void DoubleDeck::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void DoubleDeck::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void DoubleDeck::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void DoubleDeck::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
@@ -27,13 +27,10 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||
|
||||
@@ -52,8 +52,17 @@ FrappeSnowland::FrappeSnowland() {
|
||||
this->gfx = d_course_frappe_snowland_packed_dls;
|
||||
this->gfxSize = 4140;
|
||||
Props.textures = frappe_snowland_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineFrappeSnowland;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineFrappeSnowland;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 262;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 36;
|
||||
Props.Minimap.PlayerY = 40;
|
||||
Props.Minimap.PlayerScaleFactor = 0.016f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
Props.Minimap.Colour = {72, 100, 255};
|
||||
|
||||
Props.SetText(Props.Name, "frappe snowland", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "snow", sizeof(Props.DebugName));
|
||||
@@ -101,8 +110,6 @@ FrappeSnowland::FrappeSnowland() {
|
||||
|
||||
Props.Clouds = NULL; // not used for frappe
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {28, 11, 90};
|
||||
Props.Skybox.BottomRight = {0, 99, 164};
|
||||
@@ -188,17 +195,6 @@ void FrappeSnowland::UpdateClouds(s32 sp1C, Camera* camera) {
|
||||
func_80078170(sp1C, camera);
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void FrappeSnowland::MinimapSettings() {
|
||||
D_8018D2C0[0] = 262;
|
||||
D_8018D2A0 = 0.016f;
|
||||
D_8018D2E0 = 36;
|
||||
D_8018D2E8 = 40;
|
||||
D_8018D300 = 72;
|
||||
D_8018D308 = 100;
|
||||
D_8018D310 = 255;
|
||||
}
|
||||
|
||||
void FrappeSnowland::InitCourseObjects() {
|
||||
size_t objectId;
|
||||
size_t i;
|
||||
@@ -211,22 +207,6 @@ void FrappeSnowland::UpdateCourseObjects() {
|
||||
update_snowflakes();
|
||||
}
|
||||
|
||||
void FrappeSnowland::RenderCourseObjects(s32 cameraId) {
|
||||
}
|
||||
|
||||
void FrappeSnowland::SomeSounds() {
|
||||
}
|
||||
|
||||
void FrappeSnowland::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void FrappeSnowland::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void FrappeSnowland::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void FrappeSnowland::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
@@ -260,7 +240,3 @@ void FrappeSnowland::Waypoints(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FrappeSnowland::ScrollingTextures() {}
|
||||
|
||||
void FrappeSnowland::Destroy() {}
|
||||
|
||||
@@ -17,29 +17,18 @@ extern "C" {
|
||||
|
||||
class FrappeSnowland : public Course {
|
||||
public:
|
||||
virtual ~FrappeSnowland() = default; // Virtual destructor for proper cleanup in derived classes
|
||||
virtual ~FrappeSnowland() = default;
|
||||
|
||||
// Constructor
|
||||
explicit FrappeSnowland();
|
||||
|
||||
// virtual void Load(const char* courseVtx,
|
||||
// course_texture* textures, const char* displaylists, size_t dlSize);
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void InitClouds() override;
|
||||
virtual void UpdateClouds(s32 sp1C, Camera* camera) override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void ScrollingTextures() override;
|
||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||
virtual void Destroy() override;
|
||||
};
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "engine/objects/HotAirBalloon.h"
|
||||
#include "engine/objects/Crab.h"
|
||||
#include "engine/objects/Boos.h"
|
||||
#include "engine/objects/GrandPrixBalloons.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
@@ -518,8 +519,14 @@ TrackWaypoint harbour_path[] = {
|
||||
Harbour::Harbour() {
|
||||
this->gfxSize = 100;
|
||||
this->textures = NULL;
|
||||
Props.MinimapTexture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 260;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 6;
|
||||
Props.Minimap.PlayerY = 28;
|
||||
Props.Minimap.PlayerScaleFactor = 0.022f;
|
||||
|
||||
Props.Id = "mk:harbour";
|
||||
Props.SetText(Props.Name, "Harbour", sizeof(Props.Name));
|
||||
@@ -566,10 +573,11 @@ Harbour::Harbour() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust5);
|
||||
Props.Clouds = gKalimariDesertClouds;
|
||||
Props.CloudList = gLuigiRacewayClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {120, 140, 188};
|
||||
Props.Skybox.BottomRight = {216, 232, 248};
|
||||
@@ -746,34 +754,11 @@ void Harbour::BeginPlay() {
|
||||
// add_actor_to_empty_slot(itemPos, rot, vel, ACTOR_ITEM_BOX);
|
||||
// }
|
||||
// }
|
||||
gWorldInstance.AddActor(new AShip(FVector(-1694, -111, 1451), AShip::Skin::GHOSTSHIP));
|
||||
gWorldInstance.AddActor(new AShip(FVector(2811, -83, 966), AShip::Skin::SHIP2));
|
||||
gWorldInstance.AddActor(new AShip(FVector(1526, -36, -2228), AShip::Skin::SHIP3));
|
||||
|
||||
|
||||
gWorldInstance.AddActor(new ASpaghettiShip(FVector(582, -70, -650)));
|
||||
//gWorldInstance.AddActor(new ASpaghettiShip(FVector(2811, -83, 966 )));
|
||||
gWorldInstance.AddActor(new AStarship(FVector(1019, 160, 1987)));
|
||||
|
||||
//gWorldInstance.AddActor(new AShip(FVector(-1694, -111, 1451), AShip::Skin::GHOSTSHIP));
|
||||
//gWorldInstance.AddActor(new AShip(FVector(2811, -83, 966), AShip::Skin::SHIP2));
|
||||
//gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(16, -106, -34)));
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void Harbour::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust5, 0x443, 0x1000));
|
||||
D_8018D2A0 = 0.022f;
|
||||
D_8018D2E0 = 6;
|
||||
D_8018D2E8 = 28;
|
||||
D_8018D2C0[0] = 260;
|
||||
D_8018D2D8[0] = 170;
|
||||
D_80165718 = 0;
|
||||
D_80165720 = 5;
|
||||
D_80165728 = -240;
|
||||
}
|
||||
|
||||
void Harbour::InitCourseObjects() {}
|
||||
|
||||
void Harbour::SomeSounds() {}
|
||||
|
||||
void Harbour::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x19B) &&
|
||||
((s16) gNearestWaypointByPlayerId[playerId] < 0x1B9)) {
|
||||
@@ -804,12 +789,6 @@ void Harbour::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void Harbour::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void Harbour::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
@@ -832,11 +811,6 @@ void Harbour::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPDisplayList(gDisplayListHead++, moon_moon_mesh);
|
||||
}
|
||||
|
||||
void Harbour::RenderCredits() {
|
||||
}
|
||||
|
||||
void Harbour::Destroy() { }
|
||||
|
||||
bool Harbour::IsMod() {
|
||||
return true;
|
||||
}
|
||||
@@ -27,14 +27,8 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Destroy() override;
|
||||
virtual bool IsMod() override;
|
||||
};
|
||||
|
||||
@@ -57,8 +57,16 @@ KalimariDesert::KalimariDesert() {
|
||||
this->gfx = d_course_kalimari_desert_packed_dls;
|
||||
this->gfxSize = 5328;
|
||||
Props.textures = kalimari_desert_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineKalimariDesert;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineKalimariDesert;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 263;
|
||||
Props.Minimap.Pos[0].Y = 165;
|
||||
Props.Minimap.PlayerX = 55;
|
||||
Props.Minimap.PlayerY = 27;
|
||||
Props.Minimap.PlayerScaleFactor = 0.015f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 4.0;
|
||||
|
||||
Props.SetText(Props.Name, "kalimari desert", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "desert", sizeof(Props.DebugName));
|
||||
@@ -104,10 +112,9 @@ KalimariDesert::KalimariDesert() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust5);
|
||||
Props.Clouds = gKalimariDesertClouds;
|
||||
Props.CloudList = gKalimariDesertClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 4.0;
|
||||
|
||||
Props.Skybox.TopRight = {195, 231, 255};
|
||||
Props.Skybox.BottomRight = {255, 192, 0};
|
||||
@@ -216,16 +223,6 @@ void KalimariDesert::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void KalimariDesert::MinimapSettings() {
|
||||
D_8018D2C0[0] = 263;
|
||||
D_8018D2D8[0] = 165;
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust5, 0x443, 0x1000));
|
||||
D_8018D2A0 = 0.015f;
|
||||
D_8018D2E0 = 55;
|
||||
D_8018D2E8 = 27;
|
||||
}
|
||||
|
||||
void KalimariDesert::InitCourseObjects() {
|
||||
size_t i;
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
@@ -249,12 +246,6 @@ void KalimariDesert::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void KalimariDesert::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void KalimariDesert::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void KalimariDesert::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||
|
||||
|
||||
@@ -29,12 +29,10 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Destroy() override;
|
||||
|
||||
@@ -62,8 +62,16 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
|
||||
this->gfx = d_course_koopa_troopa_beach_packed_dls;
|
||||
this->gfxSize = 5720;
|
||||
Props.textures = koopa_troopa_beach_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineKoopaTroopaBeach;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineKoopaTroopaBeach;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 268;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 40;
|
||||
Props.Minimap.PlayerY = 21;
|
||||
Props.Minimap.PlayerScaleFactor = 0.014f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.Id = "mk:koopa_beach";
|
||||
Props.SetText(Props.Name, "koopa troopa beach", sizeof(Props.Name));
|
||||
@@ -110,10 +118,9 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust3);
|
||||
Props.Clouds = gKoopaTroopaBeachClouds;
|
||||
Props.CloudList = gKoopaTroopaBeachClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {48, 152, 120};
|
||||
Props.Skybox.BottomRight = {216, 232, 248};
|
||||
@@ -189,15 +196,6 @@ void KoopaTroopaBeach::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void KoopaTroopaBeach::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust3, 0x3C8U, 0x1000));
|
||||
D_8018D2A0 = 0.014f;
|
||||
D_8018D2C0[0] = 268;
|
||||
D_8018D2E0 = 40;
|
||||
D_8018D2E8 = 21;
|
||||
}
|
||||
|
||||
void KoopaTroopaBeach::InitCourseObjects() {
|
||||
}
|
||||
|
||||
@@ -233,12 +231,6 @@ void KoopaTroopaBeach::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void KoopaTroopaBeach::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void KoopaTroopaBeach::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void KoopaTroopaBeach::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
@@ -30,14 +30,12 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void SomeCollisionThing(Player *player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7) override;
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "assets/luigi_raceway_data.h"
|
||||
#include "engine/objects/HotAirBalloon.h"
|
||||
#include "engine/actors/Finishline.h"
|
||||
#include "engine/objects/GrandPrixBalloons.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
@@ -88,8 +89,16 @@ LuigiRaceway::LuigiRaceway() {
|
||||
this->gfx = d_course_luigi_raceway_packed_dls;
|
||||
this->gfxSize = 6377;
|
||||
Props.textures = luigi_raceway_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineLuigiRaceway;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineLuigiRaceway;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 271;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 45;
|
||||
Props.Minimap.PlayerY = 60;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0155f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.Id = "mk:luigi_raceway";
|
||||
Props.SetText(Props.Name, "luigi raceway", sizeof(Props.Name));
|
||||
@@ -136,10 +145,9 @@ LuigiRaceway::LuigiRaceway() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*)LOAD_ASSET_RAW(gTextureExhaust2);
|
||||
Props.Clouds = gLuigiRacewayClouds;
|
||||
Props.CloudList = gLuigiRacewayClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = { 128, 184, 248 };
|
||||
Props.Skybox.BottomRight = { 216, 232, 248 };
|
||||
@@ -173,6 +181,7 @@ void LuigiRaceway::BeginPlay() {
|
||||
gWorldInstance.AddObject(new OHotAirBalloon(FVector(-1250.0f, 0.0f, 1110.0f)));
|
||||
} else { // Normal gameplay
|
||||
gWorldInstance.AddObject(new OHotAirBalloon(FVector(-176.0, 0.0f, -2323.0f)));
|
||||
gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(-140, -44, -215)));
|
||||
}
|
||||
|
||||
if (gModeSelection == VERSUS) {
|
||||
@@ -188,38 +197,15 @@ void LuigiRaceway::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void LuigiRaceway::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t(*)[1024]>(dma_textures(gTextureExhaust2, 0x4F4U, 0xC00));
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0[0] = 271;
|
||||
D_8018D2E0 = 45;
|
||||
D_8018D2E8 = 60;
|
||||
D_80165718 = -140;
|
||||
D_80165720 = -44;
|
||||
D_80165728 = -215;
|
||||
}
|
||||
|
||||
void LuigiRaceway::InitCourseObjects() {
|
||||
size_t i;
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void LuigiRaceway::UpdateCourseObjects() {
|
||||
}
|
||||
|
||||
void LuigiRaceway::RenderCourseObjects(s32 cameraId) {
|
||||
}
|
||||
|
||||
void LuigiRaceway::SomeSounds() {
|
||||
vec3f_set(D_8015F748, 85.0f, 21.0f, -219.0f);
|
||||
func_800C9D80(D_8015F748, D_802B91C8, 0x5103700B);
|
||||
@@ -253,13 +239,6 @@ void LuigiRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void LuigiRaceway::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY,
|
||||
(u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void LuigiRaceway::SetStaffGhost() {
|
||||
u32 temp_v0 = func_800B4E24(0) & 0xfffff;
|
||||
if (temp_v0 <= 11200) {
|
||||
@@ -449,6 +428,3 @@ void LuigiRaceway::SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Ve
|
||||
f32* arg6, f32* arg7) {
|
||||
func_8003E9EC(player, arg1, arg2, arg3, arg4, arg5, arg6, arg7);
|
||||
}
|
||||
|
||||
void LuigiRaceway::Destroy() {
|
||||
}
|
||||
|
||||
@@ -29,18 +29,13 @@ class LuigiRaceway : public Course {
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void SetStaffGhost() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() 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;
|
||||
};
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "engine/actors/Finishline.h"
|
||||
#include "engine/objects/Object.h"
|
||||
#include "engine/objects/BombKart.h"
|
||||
#include "engine/objects/GrandPrixBalloons.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
@@ -73,9 +74,18 @@ MarioRaceway::MarioRaceway() {
|
||||
this->vtx = d_course_mario_raceway_vertex;
|
||||
this->gfx = d_course_mario_raceway_packed_dls;
|
||||
this->gfxSize = 3367;
|
||||
|
||||
Props.textures = mario_raceway_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 260;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 6;
|
||||
Props.Minimap.PlayerY = 28;
|
||||
Props.Minimap.PlayerScaleFactor = 0.022f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = -2.0;
|
||||
|
||||
Props.Id = "mk:mario_raceway";
|
||||
Props.SetText(Props.Name, "mario raceway", sizeof(Props.Name));
|
||||
@@ -123,10 +133,9 @@ MarioRaceway::MarioRaceway() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (uint8_t*) LOAD_ASSET_RAW(gTextureExhaust5);
|
||||
Props.Clouds = gKalimariDesertClouds;
|
||||
Props.CloudList = gLuigiRacewayClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = -2.0;
|
||||
|
||||
Props.Skybox.TopRight = {0, 184, 248};
|
||||
Props.Skybox.BottomRight = {216, 232, 248};
|
||||
@@ -201,19 +210,10 @@ void MarioRaceway::BeginPlay() {
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f));
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void MarioRaceway::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust5, 0x443, 0x1000));
|
||||
D_8018D2A0 = 0.022f;
|
||||
D_8018D2E0 = 6;
|
||||
D_8018D2E8 = 28;
|
||||
D_8018D2C0[0] = 260;
|
||||
D_8018D2D8[0] = 170;
|
||||
D_80165718 = 0;
|
||||
D_80165720 = 5;
|
||||
D_80165728 = -240;
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(0, 5, -240)));
|
||||
}
|
||||
}
|
||||
|
||||
void MarioRaceway::InitCourseObjects() {
|
||||
@@ -221,10 +221,6 @@ void MarioRaceway::InitCourseObjects() {
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
func_80070714();
|
||||
}
|
||||
for (size_t i = 0; i < D_80165738; i++) {
|
||||
find_unused_obj_index(&gObjectParticle3[i]);
|
||||
init_object(gObjectParticle3[i], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -263,12 +259,6 @@ void MarioRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void MarioRaceway::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void MarioRaceway::SetStaffGhost() {
|
||||
u32 temp_v0 = func_800B4E24(0) & 0xfffff;
|
||||
if (temp_v0 <= 9000) {
|
||||
|
||||
@@ -27,12 +27,10 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void SetStaffGhost() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
|
||||
@@ -75,8 +75,16 @@ MooMooFarm::MooMooFarm() {
|
||||
this->gfx = d_course_moo_moo_farm_packed_dls;
|
||||
this->gfxSize = 3304;
|
||||
Props.textures = moo_moo_farm_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineMooMooFarm;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineMooMooFarm;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 271;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 18;
|
||||
Props.Minimap.PlayerY = 36;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0155f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "moo moo farm", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "farm", sizeof(Props.DebugName));
|
||||
@@ -122,10 +130,9 @@ MooMooFarm::MooMooFarm() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust0);
|
||||
Props.Clouds = gYoshiValleyMooMooFarmClouds;
|
||||
Props.CloudList = gYoshiValleyMooMooFarmClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {0, 18, 255};
|
||||
Props.Skybox.BottomRight = {197, 211, 255};
|
||||
@@ -324,15 +331,6 @@ void MooMooFarm::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void MooMooFarm::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust0, 0x479, 0xC00));
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0[0] = 271;
|
||||
D_8018D2E0 = 18;
|
||||
D_8018D2E8 = 36;
|
||||
}
|
||||
|
||||
void MooMooFarm::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x145) &&
|
||||
((s16) gNearestWaypointByPlayerId[playerId] < 0x18B)) {
|
||||
@@ -363,12 +361,6 @@ void MooMooFarm::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void MooMooFarm::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void MooMooFarm::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
s16 temp_s0 = arg0->pathCounter;
|
||||
s16 temp_s1 = arg0->playerDirection;
|
||||
|
||||
@@ -30,10 +30,8 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void CreditsSpawnActors() override;
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "engine/objects/Podium.h"
|
||||
#include "engine/objects/CheepCheep.h"
|
||||
#include "engine/particles/StarEmitter.h"
|
||||
#include "engine/objects/GrandPrixBalloons.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
@@ -91,7 +92,15 @@ PodiumCeremony::PodiumCeremony() {
|
||||
this->gfx = d_course_royal_raceway_packed_dls;
|
||||
this->gfxSize = 5670;
|
||||
Props.textures = podium_ceremony_textures;
|
||||
Props.MinimapDimensions = IVector2D(0, 0);
|
||||
Props.Minimap.Width = 0;
|
||||
Props.Minimap.Height = 0;
|
||||
Props.Minimap.Pos[0].X = 262;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 37;
|
||||
Props.Minimap.PlayerY = 50;
|
||||
Props.Minimap.PlayerScaleFactor = 0.014f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "royal raceway", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "p circuit", sizeof(Props.DebugName));
|
||||
@@ -134,10 +143,9 @@ PodiumCeremony::PodiumCeremony() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust4);
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {238, 144, 255};
|
||||
Props.Skybox.BottomRight = {255, 224, 240};
|
||||
@@ -199,18 +207,10 @@ void PodiumCeremony::BeginPlay() {
|
||||
gWorldInstance.AddObject(new OBombKart(kart, &D_80164550[3][100], 100, 0, 1.0f));
|
||||
gWorldInstance.AddObject(new OBombKart(kart, &D_80164550[3][120], 120, 0, 1.0f));
|
||||
gWorldInstance.AddObject(new OBombKart(kart, &D_80164550[3][140], 140, 0, 1.0f));
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void PodiumCeremony::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust4, 0x3F8, 0x1000));
|
||||
D_8018D2C0[0] = 262;
|
||||
D_8018D2A0 = 0.014f;
|
||||
D_8018D2E0 = 37;
|
||||
D_8018D2E8 = 50;
|
||||
D_80165718 = -64;
|
||||
D_80165720 = 5;
|
||||
D_80165728 = -330;
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(-64, 5, -330)));
|
||||
}
|
||||
}
|
||||
|
||||
void PodiumCeremony::InitCourseObjects() {
|
||||
@@ -219,10 +219,6 @@ void PodiumCeremony::InitCourseObjects() {
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
func_80070714();
|
||||
}
|
||||
for (i = 0; i < D_80165738; i++) {
|
||||
find_unused_obj_index(&gObjectParticle3[i]);
|
||||
init_object(gObjectParticle3[i], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,12 +255,6 @@ void PodiumCeremony::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void PodiumCeremony::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void PodiumCeremony::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
|
||||
@@ -29,12 +29,10 @@ public:
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Destroy() override;
|
||||
|
||||
@@ -49,8 +49,16 @@ RainbowRoad::RainbowRoad() {
|
||||
this->gfx = d_course_rainbow_road_packed_dls;
|
||||
this->gfxSize = 5670;
|
||||
Props.textures = rainbow_road_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineRainbowRoad;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineRainbowRoad;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 261;
|
||||
Props.Minimap.Pos[0].Y = 166;
|
||||
Props.Minimap.PlayerX = 39;
|
||||
Props.Minimap.PlayerY = 55;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0103f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "rainbow road", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "rainbow", sizeof(Props.DebugName));
|
||||
@@ -98,8 +106,6 @@ RainbowRoad::RainbowRoad() {
|
||||
|
||||
Props.Clouds = gToadsTurnpikeRainbowRoadStars;
|
||||
Props.CloudList = gToadsTurnpikeRainbowRoadStars;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {0, 0, 0};
|
||||
Props.Skybox.BottomRight = {0, 0, 0};
|
||||
@@ -169,15 +175,6 @@ void RainbowRoad::UpdateClouds(s32 sp1C, Camera* camera) {
|
||||
update_stars(sp1C, camera, this->Props.CloudList);
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void RainbowRoad::MinimapSettings() {
|
||||
D_8018D2A0 = 0.0103f;
|
||||
D_8018D2C0[0] = 261;
|
||||
D_8018D2D8[0] = 166;
|
||||
D_8018D2E0 = 39;
|
||||
D_8018D2E8 = 55;
|
||||
}
|
||||
|
||||
void RainbowRoad::InitCourseObjects() {
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
size_t i;
|
||||
@@ -208,12 +205,6 @@ void RainbowRoad::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void RainbowRoad::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void RainbowRoad::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void RainbowRoad::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
|
||||
@@ -29,14 +29,12 @@ public:
|
||||
virtual void BeginPlay() override;
|
||||
virtual void InitClouds() override;
|
||||
virtual void UpdateClouds(s32, Camera*) override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "engine/actors/Finishline.h"
|
||||
#include "engine/objects/BombKart.h"
|
||||
#include "assets/royal_raceway_data.h"
|
||||
#include "engine/objects/GrandPrixBalloons.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
@@ -86,8 +87,16 @@ RoyalRaceway::RoyalRaceway() {
|
||||
this->gfx = d_course_royal_raceway_packed_dls;
|
||||
this->gfxSize = 5670;
|
||||
Props.textures = royal_raceway_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineRoyalRaceway;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineRoyalRaceway;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 262;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 37;
|
||||
Props.Minimap.PlayerY = 50;
|
||||
Props.Minimap.PlayerScaleFactor = 0.014f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "royal raceway", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "p circuit", sizeof(Props.DebugName));
|
||||
@@ -133,10 +142,9 @@ RoyalRaceway::RoyalRaceway() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust4);
|
||||
Props.Clouds = gRoyalRacewayClouds;
|
||||
Props.CloudList = gRoyalRacewayClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {238, 144, 255};
|
||||
Props.Skybox.BottomRight = {255, 224, 240};
|
||||
@@ -188,18 +196,9 @@ void RoyalRaceway::BeginPlay() {
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f));
|
||||
gWorldInstance.AddObject(new OBombKart(pos, &D_80164550[0][0], 0, 0, 0.8333333f));
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void RoyalRaceway::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust4, 0x3F8, 0x1000));
|
||||
D_8018D2C0[0] = 262;
|
||||
D_8018D2A0 = 0.014f;
|
||||
D_8018D2E0 = 37;
|
||||
D_8018D2E8 = 50;
|
||||
D_80165718 = -64;
|
||||
D_80165720 = 5;
|
||||
D_80165728 = -330;
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(-64, 5, -330)));
|
||||
}
|
||||
}
|
||||
|
||||
void RoyalRaceway::InitCourseObjects() {
|
||||
@@ -208,16 +207,9 @@ void RoyalRaceway::InitCourseObjects() {
|
||||
if (gModeSelection == GRAND_PRIX) {
|
||||
func_80070714();
|
||||
}
|
||||
for (i = 0; i < D_80165738; i++) {
|
||||
find_unused_obj_index(&gObjectParticle3[i]);
|
||||
init_object(gObjectParticle3[i], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RoyalRaceway::SomeSounds() {
|
||||
}
|
||||
|
||||
void RoyalRaceway::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x180) &&
|
||||
((s16) gNearestWaypointByPlayerId[playerId] < 0x1E1)) {
|
||||
@@ -248,12 +240,6 @@ void RoyalRaceway::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void RoyalRaceway::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void RoyalRaceway::SetStaffGhost() {
|
||||
u32 temp_v0 = func_800B4E24(0) & 0xfffff;
|
||||
if (temp_v0 <= 16000) {
|
||||
@@ -322,5 +308,3 @@ void RoyalRaceway::ScrollingTextures() {
|
||||
// d_course_royal_raceway_packed_dl_A648
|
||||
find_and_set_tile_size((uintptr_t) segmented_gfx_to_virtual((void*)0x0700A648), 0, D_802B87BC);
|
||||
}
|
||||
|
||||
void RoyalRaceway::Destroy() { }
|
||||
|
||||
@@ -27,16 +27,12 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void SetStaffGhost() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void ScrollingTextures() override;
|
||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||
virtual void Destroy() override;
|
||||
};
|
||||
|
||||
@@ -49,8 +49,17 @@ SherbetLand::SherbetLand() {
|
||||
this->gfx = d_course_sherbet_land_packed_dls;
|
||||
this->gfxSize = 1803;
|
||||
Props.textures = sherbet_land_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineSherbetLand;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineSherbetLand;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 262;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 52;
|
||||
Props.Minimap.PlayerY = 33;
|
||||
Props.Minimap.PlayerScaleFactor = 0.015f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
Props.Minimap.Colour = {72, 100, 255};
|
||||
|
||||
Props.SetText(Props.Name, "sherbet land", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "sherbet", sizeof(Props.DebugName));
|
||||
@@ -98,10 +107,9 @@ SherbetLand::SherbetLand() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust1);
|
||||
Props.Clouds = gSherbetLandClouds;
|
||||
Props.CloudList = gSherbetLandClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {128, 184, 248};
|
||||
Props.Skybox.BottomRight = {216, 232, 248};
|
||||
@@ -134,9 +142,6 @@ f32 SherbetLand::GetWaterLevel(FVector pos, Collision* collision) {
|
||||
return Props.WaterLevel;
|
||||
}
|
||||
|
||||
void SherbetLand::LoadTextures() {
|
||||
}
|
||||
|
||||
void SherbetLand::BeginPlay() {
|
||||
spawn_all_item_boxes((struct ActorSpawnData*)LOAD_ASSET_RAW(d_course_sherbet_land_item_box_spawns));
|
||||
|
||||
@@ -212,21 +217,6 @@ void SherbetLand::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void SherbetLand::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust1, 0x485, 0xC00));
|
||||
D_8018D2A0 = 0.015f;
|
||||
D_8018D2C0[0] = 262;
|
||||
D_8018D2E0 = 52;
|
||||
D_8018D2E8 = 33;
|
||||
D_8018D300 = 72;
|
||||
D_8018D308 = 100;
|
||||
D_8018D310 = 255;
|
||||
}
|
||||
|
||||
void SherbetLand::InitCourseObjects() {
|
||||
}
|
||||
|
||||
void SherbetLand::UpdateCourseObjects() {
|
||||
if (gGamestate != CREDITS_SEQUENCE) {
|
||||
func_800842C8();
|
||||
@@ -239,19 +229,6 @@ void SherbetLand::RenderCourseObjects(s32 cameraId) {
|
||||
}
|
||||
}
|
||||
|
||||
void SherbetLand::SomeSounds() {
|
||||
}
|
||||
|
||||
void SherbetLand::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void SherbetLand::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void SherbetLand::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void SherbetLand::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
@@ -297,5 +274,3 @@ void SherbetLand::CreditsSpawnActors() {
|
||||
// d_course_sherbet_land_packed_dl_2308
|
||||
find_vtx_and_set_colours(segmented_gfx_to_virtual((void*)0x07002308), -0x6A, 0xFF, 0xFF, 0xFF);
|
||||
}
|
||||
|
||||
void SherbetLand::Destroy() { }
|
||||
|
||||
@@ -26,19 +26,11 @@ public:
|
||||
// course_texture* textures, const char* displaylists, size_t dlSize);
|
||||
virtual void Load() override;
|
||||
virtual f32 GetWaterLevel(FVector pos, Collision* collision) override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void DrawWater(struct UnkStruct_800DC5EC* screen, uint16_t pathCounter, uint16_t cameraRot, uint16_t playerDirection) override;
|
||||
virtual void CreditsSpawnActors() override;
|
||||
virtual void Destroy() override;
|
||||
};
|
||||
|
||||
@@ -64,8 +64,16 @@ Skyscraper::Skyscraper() {
|
||||
this->gfx = d_course_skyscraper_packed_dls;
|
||||
this->gfxSize = 548;
|
||||
Props.textures = skyscraper_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineSkyscraper;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineSkyscraper;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 257;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 32;
|
||||
Props.Minimap.PlayerY = 32;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0445f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "skyscraper", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "skyscraper", sizeof(Props.DebugName));
|
||||
@@ -113,8 +121,6 @@ Skyscraper::Skyscraper() {
|
||||
|
||||
Props.Clouds = NULL; // no clouds
|
||||
Props.CloudList = NULL;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {0, 0, 0};
|
||||
Props.Skybox.BottomRight = {0, 0, 0};
|
||||
@@ -158,13 +164,6 @@ void Skyscraper::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void Skyscraper::MinimapSettings() {
|
||||
D_8018D2A0 = 0.0445f;
|
||||
D_8018D2E0 = 32;
|
||||
D_8018D2E8 = 32;
|
||||
}
|
||||
|
||||
void Skyscraper::InitCourseObjects() {}
|
||||
|
||||
void Skyscraper::SomeSounds() {}
|
||||
@@ -173,12 +172,6 @@ void Skyscraper::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void Skyscraper::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void Skyscraper::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void Skyscraper::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
@@ -28,12 +28,10 @@ public:
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
//virtual void InitClouds() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Waypoints(Player* player, int8_t playerId) override;
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "engine/objects/HotAirBalloon.h"
|
||||
#include "engine/objects/Crab.h"
|
||||
#include "engine/objects/Boos.h"
|
||||
#include "engine/objects/GrandPrixBalloons.h"
|
||||
|
||||
extern "C" {
|
||||
#include "main.h"
|
||||
@@ -60,8 +61,17 @@ extern "C" {
|
||||
TestCourse::TestCourse() {
|
||||
this->gfxSize = 100;
|
||||
this->textures = NULL;
|
||||
Props.MinimapTexture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineMarioRaceway;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 260;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 6;
|
||||
Props.Minimap.PlayerY = 28;
|
||||
Props.Minimap.PlayerScaleFactor = 0.022f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
Props.Minimap.Colour = {255, 255, 255};
|
||||
|
||||
Props.Id = "mk:test_course";
|
||||
|
||||
@@ -109,10 +119,9 @@ TestCourse::TestCourse() {
|
||||
Props.PathTable2[2] = NULL;
|
||||
Props.PathTable2[3] = NULL;
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust5);
|
||||
Props.Clouds = gKalimariDesertClouds;
|
||||
Props.CloudList = gLuigiRacewayClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {120, 140, 188};
|
||||
Props.Skybox.BottomRight = {216, 232, 248};
|
||||
@@ -287,25 +296,9 @@ void TestCourse::BeginPlay() {
|
||||
|
||||
gWorldInstance.AddActor(new AShip(FVector(0, 0, 0), AShip::Skin::SHIP3));
|
||||
|
||||
gWorldInstance.AddObject(new OGrandPrixBalloons(FVector(0, 0, 0)));
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void TestCourse::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust5, 0x443, 0x1000));
|
||||
D_8018D2A0 = 0.022f;
|
||||
D_8018D2E0 = 6;
|
||||
D_8018D2E8 = 28;
|
||||
D_8018D2C0[0] = 260;
|
||||
D_8018D2D8[0] = 170;
|
||||
D_80165718 = 0;
|
||||
D_80165720 = 5;
|
||||
D_80165728 = -240;
|
||||
}
|
||||
|
||||
void TestCourse::InitCourseObjects() {}
|
||||
|
||||
void TestCourse::SomeSounds() {}
|
||||
|
||||
void TestCourse::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
if (((s16) gNearestWaypointByPlayerId[playerId] >= 0x19B) &&
|
||||
((s16) gNearestWaypointByPlayerId[playerId] < 0x1B9)) {
|
||||
@@ -336,12 +329,6 @@ void TestCourse::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void TestCourse::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void TestCourse::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPSetGeometryMode(gDisplayListHead++, G_SHADING_SMOOTH);
|
||||
gSPClearGeometryMode(gDisplayListHead++, G_LIGHTING);
|
||||
@@ -357,11 +344,6 @@ void TestCourse::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gSPDisplayList(gDisplayListHead++, mario_Plane_001_mesh);
|
||||
}
|
||||
|
||||
void TestCourse::RenderCredits() {
|
||||
}
|
||||
|
||||
void TestCourse::Destroy() { }
|
||||
|
||||
bool TestCourse::IsMod() {
|
||||
return true;
|
||||
}
|
||||
@@ -27,14 +27,8 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Destroy() override;
|
||||
virtual bool IsMod() override;
|
||||
};
|
||||
|
||||
@@ -70,8 +70,16 @@ ToadsTurnpike::ToadsTurnpike() {
|
||||
this->gfx = d_course_toads_turnpike_packed_dls;
|
||||
this->gfxSize = 3427;
|
||||
Props.textures = toads_turnpike_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineToadsTurnpike;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineToadsTurnpike;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 252;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 57;
|
||||
Props.Minimap.PlayerY = 44;
|
||||
Props.Minimap.PlayerScaleFactor = 0.013f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "toad's turnpike", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "highway", sizeof(Props.DebugName));
|
||||
@@ -127,9 +135,6 @@ ToadsTurnpike::ToadsTurnpike() {
|
||||
|
||||
this->FinishlineSpawnPoint = finish;
|
||||
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {0, 2, 94};
|
||||
Props.Skybox.BottomRight = {209, 65, 23};
|
||||
Props.Skybox.BottomLeft = {209, 65, 23};
|
||||
@@ -216,14 +221,6 @@ void ToadsTurnpike::UpdateClouds(s32 sp1C, Camera* camera) {
|
||||
update_stars(sp1C, camera, this->Props.CloudList);
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void ToadsTurnpike::MinimapSettings() {
|
||||
D_8018D2A0 = 0.013f;
|
||||
D_8018D2C0[0] = 252;
|
||||
D_8018D2E0 = 57;
|
||||
D_8018D2E8 = 44;
|
||||
}
|
||||
|
||||
void ToadsTurnpike::SomeSounds() {}
|
||||
|
||||
void ToadsTurnpike::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
@@ -254,12 +251,6 @@ void ToadsTurnpike::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void ToadsTurnpike::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void ToadsTurnpike::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
set_track_light_direction(D_800DC610, D_802B87D4, 0, 1);
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
@@ -29,11 +29,9 @@ public:
|
||||
virtual void BeginPlay() override;
|
||||
virtual void InitClouds() override;
|
||||
virtual void UpdateClouds(s32, Camera*) override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void Destroy() override;
|
||||
|
||||
@@ -66,8 +66,16 @@ WarioStadium::WarioStadium() {
|
||||
this->gfx = d_course_wario_stadium_packed_dls;
|
||||
this->gfxSize = 5272;
|
||||
Props.textures = wario_stadium_textures;
|
||||
Props.MinimapTexture = gTextureCourseOutlineWarioStadium;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineWarioStadium;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Pos[0].X = 262;
|
||||
Props.Minimap.Pos[0].Y = 170;
|
||||
Props.Minimap.PlayerX = 53;
|
||||
Props.Minimap.PlayerY = 35;
|
||||
Props.Minimap.PlayerScaleFactor = 0.0155f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "wario stadium", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "stadium", sizeof(Props.DebugName));
|
||||
@@ -123,9 +131,6 @@ WarioStadium::WarioStadium() {
|
||||
|
||||
this->FinishlineSpawnPoint = finish;
|
||||
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = { 20, 30, 56 };
|
||||
Props.Skybox.BottomRight = { 40, 60, 110 };
|
||||
Props.Skybox.BottomLeft = { 40, 60, 110 };
|
||||
@@ -200,14 +205,6 @@ void WarioStadium::UpdateClouds(s32 sp1C, Camera* camera) {
|
||||
update_stars(sp1C, camera, this->Props.CloudList);
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void WarioStadium::MinimapSettings() {
|
||||
D_8018D2A0 = 0.0155f;
|
||||
D_8018D2C0[0] = 0x0106;
|
||||
D_8018D2E0 = 53;
|
||||
D_8018D2E8 = 35;
|
||||
}
|
||||
|
||||
void WarioStadium::InitCourseObjects() {
|
||||
}
|
||||
|
||||
@@ -228,13 +225,6 @@ void WarioStadium::WhatDoesThisDo(Player* player, int8_t playerId) {
|
||||
void WarioStadium::WhatDoesThisDoAI(Player* player, int8_t playerId) {
|
||||
}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void WarioStadium::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY,
|
||||
(u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void WarioStadium::Jumbotron() {
|
||||
gSPTexture(gDisplayListHead++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
|
||||
gDPTileSync(gDisplayListHead++);
|
||||
|
||||
@@ -31,12 +31,10 @@ class WarioStadium : public Course {
|
||||
virtual void BeginPlay() override;
|
||||
virtual void InitClouds() override;
|
||||
virtual void UpdateClouds(s32, Camera*) override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void SomeCollisionThing(Player* player, Vec3f arg1, Vec3f arg2, Vec3f arg3, f32* arg4, f32* arg5, f32* arg6,
|
||||
|
||||
@@ -61,8 +61,14 @@ YoshiValley::YoshiValley() {
|
||||
this->gfxSize = 4140;
|
||||
Props.textures = yoshi_valley_textures;
|
||||
|
||||
Props.MinimapTexture = gTextureCourseOutlineYoshiValley;
|
||||
Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(Props.MinimapTexture), ResourceGetTexHeightByName(Props.MinimapTexture));
|
||||
Props.Minimap.Texture = gTextureCourseOutlineYoshiValley;
|
||||
Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture);
|
||||
Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture);
|
||||
Props.Minimap.PlayerX = 61;
|
||||
Props.Minimap.PlayerY = 38;
|
||||
Props.Minimap.PlayerScaleFactor = 0.018f;
|
||||
Props.Minimap.FinishlineX = 0;
|
||||
Props.Minimap.FinishlineY = 0;
|
||||
|
||||
Props.SetText(Props.Name, "yoshi valley", sizeof(Props.Name));
|
||||
Props.SetText(Props.DebugName, "maze", sizeof(Props.DebugName));
|
||||
@@ -108,10 +114,9 @@ YoshiValley::YoshiValley() {
|
||||
Props.PathTable2[2] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_3);
|
||||
Props.PathTable2[3] = (TrackWaypoint*)LOAD_ASSET_RAW(d_course_yoshi_valley_track_waypoints_4);
|
||||
|
||||
Props.CloudTexture = (u8*) LOAD_ASSET_RAW(gTextureExhaust0);
|
||||
Props.Clouds = gYoshiValleyMooMooFarmClouds;
|
||||
Props.CloudList = gYoshiValleyMooMooFarmClouds;
|
||||
Props.MinimapFinishlineX = 0;
|
||||
Props.MinimapFinishlineY = 0;
|
||||
|
||||
Props.Skybox.TopRight = {113, 70, 255};
|
||||
Props.Skybox.BottomRight = {255, 184, 99};
|
||||
@@ -195,14 +200,6 @@ void YoshiValley::BeginPlay() {
|
||||
}
|
||||
}
|
||||
|
||||
// Likely sets minimap boundaries
|
||||
void YoshiValley::MinimapSettings() {
|
||||
D_8018D220 = reinterpret_cast<uint8_t (*)[1024]>(dma_textures(gTextureExhaust0, 0x479, 0xC00));
|
||||
D_8018D2A0 = 0.018f;
|
||||
D_8018D2E0 = 61;
|
||||
D_8018D2E8 = 38;
|
||||
}
|
||||
|
||||
void YoshiValley::InitCourseObjects() {
|
||||
}
|
||||
|
||||
@@ -219,12 +216,6 @@ void YoshiValley::WhatDoesThisDo(Player* player, int8_t playerId) {}
|
||||
|
||||
void YoshiValley::WhatDoesThisDoAI(Player* player, int8_t playerId) {}
|
||||
|
||||
// Positions the finishline on the minimap
|
||||
void YoshiValley::MinimapFinishlinePosition() {
|
||||
//! todo: Place hard-coded values here.
|
||||
draw_hud_2d_texture_8x8(this->Props.MinimapFinishlineX, this->Props.MinimapFinishlineY, (u8*) common_texture_minimap_finish_line);
|
||||
}
|
||||
|
||||
void YoshiValley::Render(struct UnkStruct_800DC5EC* arg0) {
|
||||
gDPPipeSync(gDisplayListHead++);
|
||||
gDPSetCombineMode(gDisplayListHead++, G_CC_MODULATEI, G_CC_MODULATEI);
|
||||
|
||||
@@ -27,14 +27,12 @@ public:
|
||||
virtual void Load() override;
|
||||
virtual void LoadTextures() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void MinimapSettings() override;
|
||||
virtual void InitCourseObjects() override;
|
||||
virtual void UpdateCourseObjects() override;
|
||||
virtual void RenderCourseObjects(s32 cameraId) override;
|
||||
virtual void SomeSounds() override;
|
||||
virtual void WhatDoesThisDo(Player* player, int8_t playerId) override;
|
||||
virtual void WhatDoesThisDoAI(Player* player, int8_t playerId) override;
|
||||
virtual void MinimapFinishlinePosition() override;
|
||||
virtual void Render(struct UnkStruct_800DC5EC*) override;
|
||||
virtual void RenderCredits() override;
|
||||
virtual void ScrollingTextures() override;
|
||||
|
||||
@@ -47,15 +47,19 @@ namespace Editor {
|
||||
// }
|
||||
// data["Objects"] = objects;
|
||||
|
||||
auto dat = data.dump();
|
||||
std::vector<uint8_t> stringify;
|
||||
stringify.assign(dat.begin(), dat.end());
|
||||
try {
|
||||
auto dat = data.dump();
|
||||
std::vector<uint8_t> stringify;
|
||||
stringify.assign(dat.begin(), dat.end());
|
||||
|
||||
bool wrote = GameEngine::Instance->context->GetResourceManager()->GetArchiveManager()->WriteFile(CurrentArchive, SceneFile, stringify);
|
||||
if (wrote) {
|
||||
printf("Successfully wrote scene file!\n Wrote: %s\n", SceneFile.c_str());
|
||||
} else {
|
||||
printf("Failed to write scene file!\n");
|
||||
bool wrote = GameEngine::Instance->context->GetResourceManager()->GetArchiveManager()->WriteFile(CurrentArchive, SceneFile, stringify);
|
||||
if (wrote) {
|
||||
printf("Successfully wrote scene file!\n Wrote: %s\n", SceneFile.c_str());
|
||||
} else {
|
||||
printf("Failed to write scene file!\n");
|
||||
}
|
||||
} catch (const nlohmann::json::exception& e) {
|
||||
printf("SceneManager::SaveLevel():\n JSON error during dump: %s\n", e.what());
|
||||
}
|
||||
} else {
|
||||
printf("Could not save scene file, SceneFile or CurrentArchive not set\n");
|
||||
@@ -63,8 +67,6 @@ namespace Editor {
|
||||
}
|
||||
|
||||
void LoadLevel(std::shared_ptr<Ship::Archive> archive, Course* course, std::string sceneFile) {
|
||||
nlohmann::json data;
|
||||
|
||||
SceneFile = sceneFile;
|
||||
|
||||
if (archive) {
|
||||
@@ -78,7 +80,7 @@ namespace Editor {
|
||||
nlohmann::json data = std::static_pointer_cast<Ship::Json>(
|
||||
GameEngine::Instance->context->GetResourceManager()->LoadResource(sceneFile, true, initData))->Data;
|
||||
|
||||
if (data == nullptr) {
|
||||
if (data.is_null() || data.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -134,13 +136,15 @@ namespace Editor {
|
||||
GameEngine::Instance->context->GetResourceManager()->LoadResource(filePath, true, initData));
|
||||
|
||||
if (ptr) {
|
||||
MK64::MinimapTexture texture = ptr->Texture;
|
||||
printf("LOADED MINIMAP!\n");
|
||||
course->Props.MinimapTexture = (const char*)texture.Data;
|
||||
course->Props.MinimapDimensions = IVector2D(texture.Width, texture.Height);
|
||||
} else {
|
||||
course->Props.MinimapTexture = gTextureCourseOutlineMarioRaceway;
|
||||
course->Props.MinimapDimensions = IVector2D(ResourceGetTexWidthByName(course->Props.MinimapTexture), ResourceGetTexHeightByName(course->Props.MinimapTexture));
|
||||
MK64::MinimapTexture texture = ptr->Texture;
|
||||
course->Props.Minimap.Texture = (const char*)texture.Data;
|
||||
course->Props.Minimap.Width = texture.Width;
|
||||
course->Props.Minimap.Height = texture.Height;
|
||||
} else { // Fallback
|
||||
course->Props.Minimap.Texture = gTextureCourseOutlineMarioRaceway;
|
||||
course->Props.Minimap.Width = ResourceGetTexWidthByName(course->Props.Minimap.Texture);
|
||||
course->Props.Minimap.Height = ResourceGetTexHeightByName(course->Props.Minimap.Texture);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
#include "GrandPrixBalloons.h"
|
||||
|
||||
#include "port/Game.h"
|
||||
#include "assets/other_textures.h"
|
||||
#include "assets/common_data.h"
|
||||
|
||||
extern "C" {
|
||||
#include "update_objects.h"
|
||||
#include "render_objects.h"
|
||||
#include "code_80057C60.h"
|
||||
#include "code_80086E70.h"
|
||||
#include "math_util.h"
|
||||
#include "math_util_2.h"
|
||||
#include "menus.h"
|
||||
}
|
||||
|
||||
size_t OGrandPrixBalloons::_count = 0;
|
||||
|
||||
OGrandPrixBalloons::OGrandPrixBalloons(const FVector& pos) {
|
||||
Pos = pos;
|
||||
|
||||
// D_80165730 = 1;
|
||||
if (gPlayerCount == 1) {
|
||||
D_80165738 = 0x64;
|
||||
D_80165740 = 0x3C;
|
||||
D_80165748 = 0x1E;
|
||||
} else {
|
||||
D_80165738 = 0x32;
|
||||
D_80165740 = 0x1E;
|
||||
D_80165748 = 0xA;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < D_80165738; i++) {
|
||||
find_unused_obj_index(&gObjectParticle3[i]);
|
||||
init_object(gObjectParticle3[i], 0);
|
||||
}
|
||||
}
|
||||
|
||||
void OGrandPrixBalloons::Tick() {
|
||||
s32 someIndex;
|
||||
s32 objectIndex;
|
||||
s32 someCount;
|
||||
Object* object;
|
||||
|
||||
if (!D_80165730) {
|
||||
return;
|
||||
}
|
||||
someCount = 0;
|
||||
for (someIndex = 0; someIndex < D_80165738; someIndex++) {
|
||||
objectIndex = gObjectParticle3[someIndex];
|
||||
if (objectIndex != DELETED_OBJECT_ID) {
|
||||
object = &gObjectList[objectIndex];
|
||||
if (object->state != 0) {
|
||||
OGrandPrixBalloons::func_80074E28(objectIndex);
|
||||
OGrandPrixBalloons::func_80074D94(objectIndex);
|
||||
if (object->state == 0) {
|
||||
delete_object_wrapper(&gObjectParticle3[someIndex]);
|
||||
}
|
||||
someCount += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (someCount == 0) {
|
||||
D_80165730 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void OGrandPrixBalloons::Draw(s32 cameraId) {
|
||||
s32 var_s1;
|
||||
s32 objectIndex;
|
||||
if (!D_80165730) {
|
||||
return;
|
||||
}
|
||||
|
||||
gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007E98);
|
||||
gDPLoadTLUT_pal256(gDisplayListHead++, gTLUTOnomatopoeia);
|
||||
func_8004B614(0, 0, 0, 0, 0, 0, 0);
|
||||
gDPSetAlphaCompare(gDisplayListHead++, G_AC_THRESHOLD);
|
||||
gDPSetRenderMode(gDisplayListHead++,
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL |
|
||||
GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA),
|
||||
AA_EN | Z_CMP | Z_UPD | IM_RD | CVG_DST_WRAP | ZMODE_XLU | FORCE_BL |
|
||||
GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_1MA));
|
||||
D_80183E80[0] = 0;
|
||||
D_80183E80[1] = 0x8000;
|
||||
rsp_load_texture((uint8_t*)gTextureBalloon1, 64, 32);
|
||||
for (var_s1 = 0; var_s1 < D_80165738; var_s1++) {
|
||||
objectIndex = gObjectParticle3[var_s1];
|
||||
if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 2)) {
|
||||
OGrandPrixBalloons::func_80053D74(objectIndex, cameraId, 0);
|
||||
}
|
||||
}
|
||||
rsp_load_texture((uint8_t*)gTextureBalloon2, 64, 32);
|
||||
for (var_s1 = 0; var_s1 < D_80165738; var_s1++) {
|
||||
objectIndex = gObjectParticle3[var_s1];
|
||||
if ((objectIndex != NULL_OBJECT_ID) && (gObjectList[objectIndex].state >= 2)) {
|
||||
OGrandPrixBalloons::func_80053D74(objectIndex, cameraId, 4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void OGrandPrixBalloons::func_80053D74(s32 objectIndex, UNUSED s32 arg1, s32 vertexIndex) {
|
||||
Object* object;
|
||||
|
||||
Vtx* vtx = (Vtx*) LOAD_ASSET_RAW(common_vtx_hedgehog);
|
||||
|
||||
if (gMatrixHudCount <= MTX_HUD_POOL_SIZE_MAX) {
|
||||
object = &gObjectList[objectIndex];
|
||||
D_80183E80[2] = (s16) (object->unk_084[6] + 0x8000);
|
||||
rsp_set_matrix_transformation(object->pos, (u16*) D_80183E80, object->sizeScaling);
|
||||
set_color_render((s32) object->unk_084[0], (s32) object->unk_084[1], (s32) object->unk_084[2],
|
||||
(s32) object->unk_084[3], (s32) object->unk_084[4], (s32) object->unk_084[5],
|
||||
(s32) object->primAlpha);
|
||||
gSPVertex(gDisplayListHead++, (uintptr_t)&vtx[vertexIndex], 4, 0);
|
||||
gSPDisplayList(gDisplayListHead++, (Gfx*)common_rectangle_display);
|
||||
}
|
||||
}
|
||||
|
||||
void OGrandPrixBalloons::func_80074924(s32 objectIndex) {
|
||||
s32 sp2C = 0;
|
||||
s32 sp28;
|
||||
s32 sp24;
|
||||
s32 sp20 = 0;
|
||||
s32 temp_a0;
|
||||
Object* object;
|
||||
|
||||
object = &gObjectList[objectIndex];
|
||||
object->sizeScaling = 0.15f;
|
||||
|
||||
if (GetCourse() == GetMarioRaceway()) {
|
||||
sp2C = random_int(0x00C8U);
|
||||
sp28 = random_int(D_80165748);
|
||||
sp24 = random_int(0x0096U);
|
||||
sp20 = random_int(0x2000U);
|
||||
object->origin_pos[0] = (f32) ((((f64) Pos.x + 100.0) - (f64) sp2C) * (f64) xOrientation);
|
||||
object->origin_pos[1] = (f32) (Pos.y + sp28);
|
||||
object->origin_pos[2] = (f32) (((f64) Pos.z + 200.0) - (f64) sp24);
|
||||
} else if (GetCourse() == GetRoyalRaceway()) {
|
||||
sp2C = random_int(0x0168U);
|
||||
sp28 = random_int(D_80165748);
|
||||
sp24 = random_int(0x00B4U);
|
||||
sp20 = random_int(0x2000U);
|
||||
object->origin_pos[0] = (f32) ((((f64) Pos.x + 180.0) - (f64) sp2C) * (f64) xOrientation);
|
||||
object->origin_pos[1] = (f32) (Pos.y + sp28);
|
||||
object->origin_pos[2] = (f32) (((f64) Pos.z + 200.0) - (f64) sp24);
|
||||
} else if (GetCourse() == GetLuigiRaceway()) {
|
||||
sp2C = random_int(0x012CU);
|
||||
sp28 = random_int(D_80165748);
|
||||
sp24 = random_int(0x0096U);
|
||||
sp20 = random_int(0x2000U);
|
||||
object->origin_pos[0] = (f32) ((((f64) Pos.x + 150.0) - (f64) sp2C) * (f64) xOrientation);
|
||||
object->origin_pos[1] = (f32) (Pos.y + sp28);
|
||||
object->origin_pos[2] = (f32) (((f64) Pos.z + 200.0) - (f64) sp24);
|
||||
}
|
||||
|
||||
set_obj_origin_offset(objectIndex, 0, 0, 0);
|
||||
if (gPlayerCount == 1) {
|
||||
object->velocity[1] = (f32) (((f64) (f32) (sp2C % 4) * 0.25) + 0.8);
|
||||
} else {
|
||||
object->velocity[1] = (f32) (((f64) (f32) (sp2C % 3) * 0.2) + 0.4);
|
||||
}
|
||||
temp_a0 = sp2C % 8;
|
||||
object->unk_084[0] = D_800E6F30[temp_a0][0];
|
||||
object->unk_084[1] = D_800E6F30[temp_a0][1];
|
||||
object->unk_084[2] = D_800E6F30[temp_a0][2];
|
||||
object->unk_084[3] = D_800E6F48[temp_a0][0];
|
||||
object->unk_084[4] = D_800E6F48[temp_a0][1];
|
||||
object->unk_084[5] = D_800E6F48[temp_a0][2];
|
||||
object->unk_084[6] = sp20 - 0x1000;
|
||||
if (sp2C & 1) {
|
||||
object->unk_084[7] = (sp20 / 32) + 0x100;
|
||||
} else {
|
||||
object->unk_084[7] = -0x100 - (sp20 / 32);
|
||||
}
|
||||
object->primAlpha = 0x00E6;
|
||||
object_next_state(objectIndex);
|
||||
}
|
||||
|
||||
void OGrandPrixBalloons::func_80074D94(s32 objectIndex) {
|
||||
if (gObjectList[objectIndex].unk_0AE == 1) {
|
||||
if ((D_80165740 <= gObjectList[objectIndex].offset[1]) &&
|
||||
(s16_step_down_towards(&gObjectList[objectIndex].primAlpha, 0, 8) != 0)) {
|
||||
func_80086F60(objectIndex);
|
||||
}
|
||||
object_add_velocity_offset_y(objectIndex);
|
||||
}
|
||||
object_calculate_new_pos_offset(objectIndex);
|
||||
}
|
||||
|
||||
void OGrandPrixBalloons::func_80074E28(s32 objectIndex) {
|
||||
switch (gObjectList[objectIndex].state) {
|
||||
case 1:
|
||||
OGrandPrixBalloons::func_80074924(objectIndex);
|
||||
break;
|
||||
case 2:
|
||||
if (set_and_run_timer_object(objectIndex, 1) != false) {
|
||||
func_80086E70(objectIndex);
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
break;
|
||||
case 3:
|
||||
OGrandPrixBalloons::func_80041480(&gObjectList[objectIndex].unk_084[6], -0x1000, 0x1000, &gObjectList[objectIndex].unk_084[7]);
|
||||
if (gObjectList[objectIndex].unk_0AE == 0) {
|
||||
func_80072428(objectIndex);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void OGrandPrixBalloons::func_80041480(s16* arg0, s16 arg1, s16 arg2, s16* arg3) {
|
||||
*arg0 += *arg3;
|
||||
if (*arg3 >= 0) {
|
||||
if (*arg0 >= arg2) {
|
||||
*arg0 = arg2;
|
||||
*arg3 = -*arg3;
|
||||
}
|
||||
} else if (arg1 >= *arg0) {
|
||||
*arg0 = arg1;
|
||||
*arg3 = -*arg3;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
#pragma once
|
||||
|
||||
#include <libultraship.h>
|
||||
#include <vector>
|
||||
|
||||
#include "engine/World.h"
|
||||
#include "engine/objects/Object.h"
|
||||
|
||||
extern "C" {
|
||||
#include "macros.h"
|
||||
#include "main.h"
|
||||
#include "vehicles.h"
|
||||
#include "waypoints.h"
|
||||
#include "common_structs.h"
|
||||
#include "objects.h"
|
||||
#include "camera.h"
|
||||
#include "some_data.h"
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Grand Prix Balloons OObject
|
||||
*/
|
||||
class OGrandPrixBalloons : public OObject {
|
||||
public:
|
||||
|
||||
explicit OGrandPrixBalloons(const FVector& pos);
|
||||
|
||||
~OGrandPrixBalloons() {
|
||||
_count--;
|
||||
}
|
||||
|
||||
static size_t GetCount() {
|
||||
return _count;
|
||||
}
|
||||
|
||||
virtual void Tick() override;
|
||||
virtual void Draw(s32 cameraId) override;
|
||||
void func_80053D74(s32 objectIndex, UNUSED s32 arg1, s32 vertexIndex);
|
||||
|
||||
void func_80074924(s32 objectIndex);
|
||||
void func_80074D94(s32 objectIndex);
|
||||
void func_80074E28(s32 objectIndex);
|
||||
void func_80041480(s16* arg0, s16 arg1, s16 arg2, s16* arg3); // Some weird math function
|
||||
|
||||
private:
|
||||
static size_t _count;
|
||||
s32 _idx;
|
||||
FVector Pos;
|
||||
};
|
||||
Reference in New Issue
Block a user