Fix minimap on custom courses

This commit is contained in:
MegaMech
2024-12-06 07:18:21 -07:00
parent 19135c9ee8
commit e0e1d60181
4 changed files with 6 additions and 4 deletions
+2 -3
View File
@@ -162,8 +162,7 @@ void init_item_window(s32 objectIndex) {
}
void func_8006EEE8(s32 courseId) {
D_8018D240 = (uintptr_t) dma_textures(CourseManager_GetProps()->MinimapTexture, D_800E5520[courseId],
ResourceGetTexSizeByName(CourseManager_GetProps()->MinimapTexture));
D_8018D240 = (uintptr_t) CourseManager_GetProps()->MinimapTexture;
// This is incredibly dumb. D_800E5548 ought to be something more like
// `u16 D_800E5548[][2]` but that doesn't match for some insane reason
D_8018D2B0 = CourseManager_GetProps()->D_800E5548[0]; // D_800E5548[courseId * 2];
@@ -179,7 +178,7 @@ void func_8006EF60(void) {
wut = D_8018D9B4 + 0xFFFF0000;
// clang-format off
// God forgive me for my sins...
huh = 0x14; if (0) {} for (i = 0; i < huh; i++) { D_8018D248[i] = func_8006ED94(CourseManager_GetProps()->MinimapTexture, wut, ResourceGetTexSizeByName(CourseManager_GetProps()->MinimapTexture), D_800E5520[i]); wut += D_800E5520[i]; }
huh = 0x14; if (0) {} for (i = 0; i < huh; i++) { D_8018D248[i] = CourseManager_GetProps()->MinimapTexture; wut += ResourceGetTexSizeByName(CourseManager_GetProps()->MinimapTexture); }
// clang-format on
}
+1
View File
@@ -6818,6 +6818,7 @@ void func_800A1924(struct_8018D9E0_entry* arg0) {
gDisplayListHead = draw_flash_select_case_slow(gDisplayListHead, 0x57, 0x84, 0x96, 0x95);
gDisplayListHead = func_8009BA74(gDisplayListHead, D_02004A0C, 0x57, 0x84);
}
//! @bug todo: This function will not work in custom courses.
func_8004EF9C(gCupCourseOrder[gTimeTrialDataCourseIndex / 4][gTimeTrialDataCourseIndex % 4]);
do {
gDPSetTextureFilter(gDisplayListHead++, G_TF_BILERP);
+2
View File
@@ -51,6 +51,8 @@ TestCourse::TestCourse() {
this->gfxSize = 100;
this->textures = NULL;
Props.MinimapTexture = gTextureCourseOutlineMarioRaceway;
Props.D_800E5548[0] = 64;
Props.D_800E5548[1] = 64;
Props.Id = "mk:test_course";
Props.Name = "Test Course";
+1 -1
View File
@@ -2587,7 +2587,7 @@ void func_8004EF9C(s32 arg0) {
temp_v0 = CourseManager_GetProps()->D_800E5548[0]; // D_800E5548[arg0 * 2];
temp_t0 = CourseManager_GetProps()->D_800E5548[1]; // D_800E5548[arg0 * 2 + 1];
func_8004D37C(0x00000104, 0x0000003C, D_8018D248[arg0], 0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF, temp_v0,
func_8004D37C(0x00000104, 0x0000003C, CourseManager_GetProps()->MinimapTexture, 0x000000FF, 0x000000FF, 0x000000FF, 0x000000FF, temp_v0,
temp_t0, temp_v0, temp_t0);
}