Setup Track Properties 1

This commit is contained in:
MegaMech
2025-03-14 12:52:21 -06:00
parent 3ab8fe0d71
commit 3b343e3676
33 changed files with 167 additions and 131 deletions
+9 -1
View File
@@ -384,4 +384,12 @@ enum DIRECTION {
#define FACING_X_AXIS 0x8000
#define FACING_Z_AXIS 0x2000
#endif // DEFINES_H
#endif // DEFINES_H
/**
*
* Laps
*
*/
#define MIN_LAPS 0
#define MAX_LAPS 3
+34 -33
View File
@@ -1166,33 +1166,33 @@ void func_80008424(s32 playerId, f32 arg1, Player* player) {
#ifdef NON_MATCHING
// generated by m2c commit 05102b12b75400ad2be8bd0872404237b36e1702 on Feb-20-2024
// static ? D_800DCAF4; /* unable to generate initializer: unknown type */
// static ? D_800DCB34; /* unable to generate initializer: unknown type */
// static ? gAIDistances; /* unable to generate initializer: unknown type */
// static ? gMarioRacewayAIDistances; /* unable to generate initializer: unknown type */
// static ? *D_800DCBB4[0x15] = {
// &D_800DCB34,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &D_800DCAF4,
// &gMarioRacewayAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// &gAIDistances,
// };
s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
s32 func_800088D8(s32 playerId, s16 lapNum, s16 currRank) {
Player* player;
f32 interp;
s16 rank;
@@ -1212,10 +1212,10 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
if (gModeSelection == 1) {
return true;
}
if (arg1 < 0) {
if (lapNum < MIN_LAPS) {
return true;
} else if (arg1 >= 4) {
arg1 = 3;
} else if (lapNum > MAX_LAPS) {
lapNum = MAX_LAPS;
}
if (D_80163330[playerId] == 1) {
return true;
@@ -1224,9 +1224,9 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
if (player->type & 0x4000) {
return true;
}
arg1_times_8 = arg1 * 8;
temp_a3 = &CM_GetProps()->SomePtr[arg1_times_8];
if (arg2 == 0) {
arg1_times_8 = lapNum * 8;
temp_a3 = &CM_GetProps()->AIDistance[arg1_times_8];
if (currRank == 0) {
if (gDemoMode == 1) {
temp_a2 = D_80164450[playerId] - D_80164450[D_80164378[7]];
if (temp_a2 < 0) {
@@ -1269,17 +1269,17 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
}
var_v0 = 0;
for (i = 0; i < 2; i++) {
if (gGPCurrentRaceRankByPlayerId[D_80163344[i]] < arg2) {
if (gGPCurrentRaceRankByPlayerId[D_80163344[i]] < currRank) {
var_v0++;
}
}
var_a0_4 = 0;
for (i = 0; i < gPlayerCount; i++) {
if (gGPCurrentRaceRankByPlayerId[i] < arg2) {
if (gGPCurrentRaceRankByPlayerId[i] < currRank) {
var_a0_4++;
}
}
var_t1 = (arg2 - var_v0) - var_a0_4;
var_t1 = (currRank - var_v0) - var_a0_4;
if (var_v0 > 0 || var_a0_4 > 0) {
var_t1++;
}
@@ -1287,6 +1287,7 @@ s32 func_800088D8(s32 playerId, s16 arg1, s16 arg2) {
if (var_t1 < 0 || var_t1 >= 8) {
return false;
}
printf("T1 %d\n", var_t1);
if (arg1_times_8 < 24) {
temp_a3 = &temp_a3[var_t1];
interp = gLapCompletionPercentByPlayerId[playerId];
+18 -11
View File
@@ -14,23 +14,30 @@
TrackWaypoint nullPath = { 0x8000, 0x0000, 0x0000, 0x0000 };
// I think the types for D_800DCAF4, D_800DCB34, and D_800DCBB4 are all
// I think the types for gAIDistances, gMarioRacewayAIDistances, and D_800DCBB4 are all
// wrong in some way based on their usage in func_800088D8
// But I cannot be bothered to figure it out
// Used as a ptr in D_800DCBB4
s16 D_800DCAF4[] = {
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023, 0x001e, 0x0019, 0x0032,
0x004b, 0x0064, 0x007d, 0x0096, 0x00af, 0x0028, 0x001e, 0x003c, 0x005a, 0x0078, 0x0096,
0x00b4, 0x00d2, 0x0032, 0x0028, 0x0050, 0x0078, 0x00a0, 0x00c8, 0x00f0, 0x0118,
s16 gAIDistances[] = {
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023,
0x001e, 0x0019, 0x0032, 0x004b, 0x0064, 0x007d, 0x0096, 0x00af,
0x0028, 0x001e, 0x003c, 0x005a, 0x0078, 0x0096, 0x00b4, 0x00d2,
0x0032, 0x0028, 0x0050, 0x0078, 0x00a0, 0x00c8, 0x00f0, 0x0118,
};
// Used as a ptr in D_800DCBB4
s16 D_800DCB34[] = {
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023, 0x001e, 0x0019, 0x002d, 0x0041, 0x005a,
0x0073, 0x008c, 0x00a5, 0x0028, 0x0003, 0x0006, 0x0010, 0x002e, 0x0031, 0x003b, 0x0059, 0x0032, 0x001e,
0x003c, 0x003f, 0x0049, 0x004e, 0x006c, 0x008a, 0x000a, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e,
0x0023, 0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x000a, 0x0005, 0x0005, 0x0005,
0x0005, 0x0005, 0x0005, 0x0005, 0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
s16 gMarioRacewayAIDistances[] = {
0x0014, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023,
0x001e, 0x0019, 0x002d, 0x0041, 0x005a, 0x0073, 0x008c, 0x00a5,
0x0028, 0x0003, 0x0006, 0x0010, 0x002e, 0x0031, 0x003b, 0x0059,
0x0032, 0x001e, 0x003c, 0x003f, 0x0049, 0x004e, 0x006c, 0x008a,
};
s16 some_data[] = { // Not sure what this is for
0x000a, 0x0005, 0x000a, 0x000f, 0x0014, 0x0019, 0x001e, 0x0023,
0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
0x000a, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005, 0x0005,
};
s32 D_800DDB20 = 0x00000000;
+2 -2
View File
@@ -16,8 +16,8 @@ typedef struct {
} _struct_gCoursePathSizes_0x10; // size 0x10
extern TrackWaypoint nullPath;
extern s16 D_800DCAF4[];
extern s16 D_800DCB34[];
extern s16 gAIDistances[];
extern s16 gMarioRacewayAIDistances[];
extern s32 D_800DDB20;
extern s32 D_800DDB24;
-1
View File
@@ -79,7 +79,6 @@ BansheeBoardwalk::BansheeBoardwalk() {
Props.AIBehaviour = D_0D009058;
Props.AIMaximumSeparation = 40.0f;
Props.AIMinimumSeparation = 0.4f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 2.0f;
-1
View File
@@ -52,7 +52,6 @@ BigDonut::BigDonut() {
Props.AIBehaviour = D_0D008F18;
Props.AIMaximumSeparation = -1.0f;
Props.AIMinimumSeparation = 0.5f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 40;
Props.PathSizes = {1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0};
-1
View File
@@ -55,7 +55,6 @@ BlockFort::BlockFort() {
Props.AIBehaviour = D_0D008F18;
Props.AIMaximumSeparation = -1.0f;
Props.AIMinimumSeparation = 0.1f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 2.0f;
-1
View File
@@ -81,7 +81,6 @@ BowsersCastle::BowsersCastle() {
Props.AIBehaviour = D_0D008FB8;
Props.AIMaximumSeparation = 35.0f;
Props.AIMinimumSeparation = 0.2f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 2.0f;
+1 -2
View File
@@ -73,7 +73,6 @@ ChocoMountain::ChocoMountain() {
Props.AIBehaviour = D_0D008F80;
Props.AIMaximumSeparation = 35.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 2.0f;
@@ -114,7 +113,7 @@ ChocoMountain::ChocoMountain() {
Props.Clouds = NULL; // no clouds
Props.CloudList = NULL;
Props.MinimapFinishlineX = 0;
Props.MinimapFinishlineY = 0;
Props.MinimapFinishlineY = -16.0;
Props.Skybox.TopRight = {255, 255, 255};
Props.Skybox.BottomRight = {255, 255, 255};
+1 -1
View File
@@ -32,7 +32,7 @@ Course::Course() {
Props.AIBehaviour = D_0D008F28;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCB34;
Props.AIDistance = gMarioRacewayAIDistances;
Props.AISteeringSensitivity = 48;
Props.NearPersp = 3.0f;
+3 -3
View File
@@ -47,7 +47,7 @@ typedef struct Properties {
float AIMinimumSeparation;
float NearPersp;
float FarPersp;
int16_t *SomePtr;
int16_t* AIDistance;
uint32_t AISteeringSensitivity;
_struct_gCoursePathSizes_0x10 PathSizes;
Vec4f D_0D009418;
@@ -58,8 +58,8 @@ typedef struct Properties {
TrackWaypoint* PathTable2[4];
CloudData *Clouds;
CloudData *CloudList;
int32_t MinimapFinishlineX;
int32_t MinimapFinishlineY;
float MinimapFinishlineX;
float MinimapFinishlineY;
SkyboxColours Skybox;
const course_texture *textures;
enum MusicSeq Sequence;
-1
View File
@@ -80,7 +80,6 @@ DKJungle::DKJungle() {
Props.AIBehaviour = D_0D0093C0;
Props.AIMaximumSeparation = 40.0f;
Props.AIMinimumSeparation = 0.1f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 9.0f;
-1
View File
@@ -52,7 +52,6 @@ DoubleDeck::DoubleDeck() {
Props.AIBehaviour = D_0D008F18;
Props.AIMaximumSeparation = -1.0f;
Props.AIMinimumSeparation = 0.5f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 2.0f;
-1
View File
@@ -60,7 +60,6 @@ FrappeSnowland::FrappeSnowland() {
Props.AIBehaviour = D_0D0090F8;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 9.0f;
-1
View File
@@ -534,7 +534,6 @@ Harbour::Harbour() {
Props.AIBehaviour = D_0D008F28;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCB34;
Props.AISteeringSensitivity = 48;
Props.NearPersp = 9.0f;
+1 -2
View File
@@ -65,7 +65,6 @@ KalimariDesert::KalimariDesert() {
Props.AIBehaviour = D_0D009260;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 10.0f;
@@ -106,7 +105,7 @@ KalimariDesert::KalimariDesert() {
Props.Clouds = gKalimariDesertClouds;
Props.CloudList = gKalimariDesertClouds;
Props.MinimapFinishlineX = 0;
Props.MinimapFinishlineY = 0;
Props.MinimapFinishlineY = 4.0;
Props.Skybox.TopRight = {195, 231, 255};
Props.Skybox.BottomRight = {255, 192, 0};
-1
View File
@@ -71,7 +71,6 @@ KoopaTroopaBeach::KoopaTroopaBeach() {
Props.AIBehaviour = D_0D009158;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.5f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 1.0f;
-1
View File
@@ -97,7 +97,6 @@ LuigiRaceway::LuigiRaceway() {
Props.AIBehaviour = D_0D0091E8;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.7f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 48;
Props.NearPersp = 9.0f;
+2 -2
View File
@@ -84,7 +84,7 @@ MarioRaceway::MarioRaceway() {
Props.AIBehaviour = D_0D008F28;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCB34;
Props.AIDistance = gMarioRacewayAIDistances;
Props.AISteeringSensitivity = 48;
Props.NearPersp = 9.0f;
@@ -125,7 +125,7 @@ MarioRaceway::MarioRaceway() {
Props.Clouds = gKalimariDesertClouds;
Props.CloudList = gLuigiRacewayClouds;
Props.MinimapFinishlineX = 0;
Props.MinimapFinishlineY = 0;
Props.MinimapFinishlineY = -2.0;
Props.Skybox.TopRight = {0, 184, 248};
Props.Skybox.BottomRight = {216, 232, 248};
-1
View File
@@ -83,7 +83,6 @@ MooMooFarm::MooMooFarm() {
Props.AIBehaviour = D_0D009210;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.5f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 48;
Props.NearPersp = 9.0f;
-1
View File
@@ -98,7 +98,6 @@ PodiumCeremony::PodiumCeremony() {
Props.AIBehaviour = D_0D009188;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.4f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.PathSizes = {500, 500, 500, 500, 1, 0, 0, 0, 0, 0, 0};
-1
View File
@@ -57,7 +57,6 @@ RainbowRoad::RainbowRoad() {
Props.AIBehaviour = D_0D0092C8;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.4f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 38;
Props.NearPersp = 2.0f;
-1
View File
@@ -94,7 +94,6 @@ RoyalRaceway::RoyalRaceway() {
Props.AIBehaviour = D_0D009188;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.4f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 9.0f;
-1
View File
@@ -60,7 +60,6 @@ SherbetLand::SherbetLand() {
Props.AIBehaviour = D_0D009280;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 9.0f;
-1
View File
@@ -73,7 +73,6 @@ Skyscraper::Skyscraper() {
Props.AIBehaviour = D_0D008F18;
Props.AIMaximumSeparation = -1.0f;
Props.AIMinimumSeparation = 0.5f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 2.0f;
-1
View File
@@ -76,7 +76,6 @@ TestCourse::TestCourse() {
Props.AIBehaviour = D_0D008F28;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.3f;
Props.SomePtr = D_800DCB34;
Props.AISteeringSensitivity = 48;
Props.NearPersp = 9.0f;
-1
View File
@@ -78,7 +78,6 @@ ToadsTurnpike::ToadsTurnpike() {
Props.AIBehaviour = D_0D009238;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.5f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 40;
Props.NearPersp = 9.0f;
-1
View File
@@ -74,7 +74,6 @@ WarioStadium::WarioStadium() {
Props.AIBehaviour = D_0D009310;
Props.AIMaximumSeparation = 50.0f;
Props.AIMinimumSeparation = 0.6f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 10.0f;
-1
View File
@@ -69,7 +69,6 @@ YoshiValley::YoshiValley() {
Props.AIBehaviour = D_0D0090B8;
Props.AIMaximumSeparation = 35.0f;
Props.AIMinimumSeparation = 0.0f;
Props.SomePtr = D_800DCAF4;
Props.AISteeringSensitivity = 53;
Props.NearPersp = 9.0f;
+1 -1
View File
@@ -337,5 +337,5 @@ void SetDirectionFromRotator(s16 rotator[3], s8 direction[3]) {
direction[1] = static_cast<s8>(y * 127.0f);
direction[2] = static_cast<s8>(z * 127.0f);
printf("Light dir %d %d %d (from rot 0x%X 0x%X 0x%X)\n", direction[0], direction[1], direction[2], rotator[0], rotator[1], rotator[2]);
//printf("Light dir %d %d %d (from rot 0x%X 0x%X 0x%X)\n", direction[0], direction[1], direction[2], rotator[0], rotator[1], rotator[2]);
}
+31
View File
@@ -48,10 +48,25 @@ namespace Editor {
// Draw buttons
ToolButton(ICON_FA_ARROWS, 0);
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("Translate");
ImGui::EndTooltip();
}
ImGui::SameLine();
ToolButton(ICON_FA_REPEAT, 1);
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("Rotate");
ImGui::EndTooltip();
}
ImGui::SameLine();
ToolButton(ICON_FA_EXPAND, 2);
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("Scale");
ImGui::EndTooltip();
}
ImGui::SameLine();
@@ -64,6 +79,11 @@ namespace Editor {
CVarSetInteger("gEditorSnapToGround", toggleGroundSnap);
}
ImGui::PopStyleColor();
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("Snap object to surface");
ImGui::EndTooltip();
}
ImGui::SameLine();
@@ -75,6 +95,12 @@ namespace Editor {
CVarSetInteger("gEditorBoundary", toggleBoundary);
}
ImGui::PopStyleColor();
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("Stops translated objects from leaving the track area.");
ImGui::Text("This helps prevent moving objects really far away off the level.");
ImGui::EndTooltip();
}
ImGui::SameLine();
@@ -90,6 +116,11 @@ namespace Editor {
}
ImGui::PopStyleColor();
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("Toggle player 1's AI or human player state.");
ImGui::EndTooltip();
}
ImGui::SameLine();
+61 -46
View File
@@ -18,6 +18,7 @@ extern "C" {
#include "sounds.h"
#include "external.h"
#include "render_courses.h"
#include "render_objects.h"
}
namespace Editor {
@@ -36,38 +37,57 @@ namespace Editor {
ImGui::InputText("Name", nameBuffer, IM_ARRAYSIZE(nameBuffer));
ImGui::InputText("Debug Name", debugNameBuffer, IM_ARRAYSIZE(debugNameBuffer));
ImGui::InputText("Course Length", lengthBuffer, IM_ARRAYSIZE(lengthBuffer));
ImGui::Separator();
static float aiMaxSeparation = 50.0f;
static float aiMinSeparation = 0.3f;
static int aiSteeringSensitivity = 48;
ImGui::InputFloat("AI Max Separation", &gWorldInstance.CurrentCourse->Props.AIMaximumSeparation);
ImGui::InputFloat("AI Min Separation", &gWorldInstance.CurrentCourse->Props.AIMinimumSeparation);
ImGui::InputInt("AI Steering Sensitivity", (int*)&gWorldInstance.CurrentCourse->Props.AISteeringSensitivity);
ImGui::Separator();
ImGui::InputFloat("Minimap Finishline X Offset", &gWorldInstance.CurrentCourse->Props.MinimapFinishlineX);
ImGui::InputFloat("Minimap Finishline Y Offset", &gWorldInstance.CurrentCourse->Props.MinimapFinishlineY);
ImGui::InputInt("Minimap Finishline X Offset", (int*)&gWorldInstance.CurrentCourse->Props.MinimapFinishlineX);
ImGui::InputInt("Minimap Finishline Y Offset", (int*)&gWorldInstance.CurrentCourse->Props.MinimapFinishlineY);
ImGui::Separator();
static float nearPersp = 9.0f;
static float farPersp = 4500.0f;
ImGui::InputFloat("Near Perspective", &gWorldInstance.CurrentCourse->Props.NearPersp);
ImGui::InputFloat("Far Perspective", &gWorldInstance.CurrentCourse->Props.FarPersp);
ImGui::Separator();
static float d_0D009418[4] = { 4.1666665f, 5.5833334f, 6.1666665f, 6.75f };
for (int i = 0; i < 4; i++) {
ImGui::InputFloat(fmt::format("D_0D009418[{}]", i).c_str(), &d_0D009418[i]);
if (ImGui::CollapsingHeader("Camera")) {
ImGui::InputFloat("Near Perspective", &gWorldInstance.CurrentCourse->Props.NearPersp);
ImGui::InputFloat("Far Perspective", &gWorldInstance.CurrentCourse->Props.FarPersp);
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::Text("Controls the far clipping distance for perspective rendering.");
ImGui::Text("Disable culling enhancement needs to be off to see a difference.");
ImGui::EndTooltip();
}
}
if (ImGui::CollapsingHeader("Environment")) {
TrackPropertiesWindow::DrawLight();
}
if (ImGui::CollapsingHeader("AI")) {
ImGui::InputFloat("AI Max Separation", &gWorldInstance.CurrentCourse->Props.AIMaximumSeparation);
ImGui::InputFloat("AI Min Separation", &gWorldInstance.CurrentCourse->Props.AIMinimumSeparation);
ImGui::InputInt("AI Steering Sensitivity", (int*)&gWorldInstance.CurrentCourse->Props.AISteeringSensitivity);
}
if (ImGui::CollapsingHeader("Random Junk")) {
for (size_t i = 0; i < 4; i++) {
ImGui::InputFloat(fmt::format("D_0D009418[{}]", i).c_str(), &gWorldInstance.CurrentCourse->Props.D_0D009418[i]);
}
ImGui::Separator();
for (size_t i = 0; i < 4; i++) {
ImGui::InputFloat(fmt::format("D_0D009418[{}]", i).c_str(), &gWorldInstance.CurrentCourse->Props.D_0D009568[i]);
}
ImGui::Separator();
for (size_t i = 0; i < 4; i++) {
ImGui::InputFloat(fmt::format("D_0D009418[{}]", i).c_str(), &gWorldInstance.CurrentCourse->Props.D_0D0096B8[i]);
}
ImGui::Separator();
for (size_t i = 0; i < 4; i++) {
ImGui::InputFloat(fmt::format("D_0D009418[{}]", i).c_str(), &gWorldInstance.CurrentCourse->Props.D_0D009808[i]);
}
}
ImGui::Separator();
// Convert and pass to ImGui ColorEdit3
float topRight[3], bottomRight[3], bottomLeft[3], topLeft[3];
@@ -83,15 +103,16 @@ namespace Editor {
RGB8ToFloat((u8*)&gWorldInstance.CurrentCourse->Props.Skybox.FloorBottomLeft, floorBottomLeft);
RGB8ToFloat((u8*)&gWorldInstance.CurrentCourse->Props.Skybox.FloorTopLeft, floorTopLeft);
// Use these float arrays with ImGui::ColorEdit3
ImGui::ColorEdit3("Skybox Top Right", topRight);
ImGui::ColorEdit3("Skybox Bottom Right", bottomRight);
ImGui::ColorEdit3("Skybox Bottom Left", bottomLeft);
ImGui::ColorEdit3("Skybox Top Left", topLeft);
ImGui::ColorEdit3("Skybox Floor Top Right", floorTopRight);
ImGui::ColorEdit3("Skybox Floor Bottom Right", floorBottomRight);
ImGui::ColorEdit3("Skybox Floor Bottom Left", floorBottomLeft);
ImGui::ColorEdit3("Skybox Floor Top Left", floorTopLeft);
if (ImGui::CollapsingHeader("Skybox")) {
ImGui::ColorEdit3("Skybox Top Right", topRight);
ImGui::ColorEdit3("Skybox Bottom Right", bottomRight);
ImGui::ColorEdit3("Skybox Bottom Left", bottomLeft);
ImGui::ColorEdit3("Skybox Top Left", topLeft);
ImGui::ColorEdit3("Skybox Floor Top Right", floorTopRight);
ImGui::ColorEdit3("Skybox Floor Bottom Right", floorBottomRight);
ImGui::ColorEdit3("Skybox Floor Bottom Left", floorBottomLeft);
ImGui::ColorEdit3("Skybox Floor Top Left", floorTopLeft);
}
// Convert the modified float values back to RGB8 (0-255)
FloatToRGB8(topRight, (u8*)&gWorldInstance.CurrentCourse->Props.Skybox.TopRight);
@@ -102,14 +123,8 @@ namespace Editor {
FloatToRGB8(floorBottomRight, (u8*)&gWorldInstance.CurrentCourse->Props.Skybox.FloorBottomRight);
FloatToRGB8(floorBottomLeft, (u8*)&gWorldInstance.CurrentCourse->Props.Skybox.FloorBottomLeft);
FloatToRGB8(floorTopLeft, (u8*)&gWorldInstance.CurrentCourse->Props.Skybox.FloorTopLeft);
ImGui::Separator();
TrackPropertiesWindow::DrawMusic();
ImGui::Separator();
TrackPropertiesWindow::DrawLight();
}
void TrackPropertiesWindow::DrawMusic() {
+3 -7
View File
@@ -2740,13 +2740,9 @@ void set_minimap_finishline_position(s32 arg0) {
// minimap center pos - minimap left edge + offset
var_f2 = (center - (gMinimapWidth / 2)) + D_8018D2E0;
var_f0 = (D_8018D2D8[arg0] - (gMinimapHeight / 2)) + D_8018D2E8;
if (GetCourse() == GetMarioRaceway()) {
var_f0 = var_f0 - 2.0;
} else if (GetCourse() == GetChocoMountain()) {
var_f0 = var_f0 - 16.0;
} else if (GetCourse() == GetKalimariDesert()) {
var_f0 = var_f0 + 4.0;
}
var_f2 += CM_GetProps()->MinimapFinishlineX;
var_f0 += CM_GetProps()->MinimapFinishlineY;
//! @todo Get course minimap props from course.
CM_MinimapFinishlinePosition();