diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index 48d4ddda6..91fe49ee4 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -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 } diff --git a/src/code_80091750.c b/src/code_80091750.c index 266f7e43e..48e353058 100644 --- a/src/code_80091750.c +++ b/src/code_80091750.c @@ -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); diff --git a/src/engine/courses/TestCourse.cpp b/src/engine/courses/TestCourse.cpp index 6b9907a12..b636600ec 100644 --- a/src/engine/courses/TestCourse.cpp +++ b/src/engine/courses/TestCourse.cpp @@ -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"; diff --git a/src/render_objects.c b/src/render_objects.c index 70a8613ad..e7062e767 100644 --- a/src/render_objects.c +++ b/src/render_objects.c @@ -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); }