diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2024-10-15 13:09:43 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-15 13:09:43 -0600 |
| commit | a0862b6a159373f2e1554e489ecb5bb08d89654e (patch) | |
| tree | b5c33fc7f65b438ee74898dd9ed7ba25b0fa108a /src/code_8006E9C0.c | |
| parent | 58d56fcba848e8545052c1d85ef27d0b02841538 (diff) | |
[modding] Implement Vehicles & Fix Animations (#109)
* Train works
* Fix minimap
* Fix highway
* Fix
* Refactor train and boat
* Update
* Implement Trucks
* Fix tanker
* Finish implementing vehicles
* Fix animations
* Fix spawn players
* Fix spawn players
* Fix loading custom data
---------
Co-authored-by: MegaMech <7255464+MegaMech@users.noreply.github.com>
Diffstat (limited to 'src/code_8006E9C0.c')
| -rw-r--r-- | src/code_8006E9C0.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/code_8006E9C0.c b/src/code_8006E9C0.c index c3b0c2322..3a31a3ef2 100644 --- a/src/code_8006E9C0.c +++ b/src/code_8006E9C0.c @@ -29,6 +29,9 @@ #include <assets/boo_frames.h> #include "port/Game.h" +#include "engine/Engine.h" +#include "engine/courses/Course.h" + void init_hud(void) { reset_object_variable(); @@ -159,11 +162,12 @@ void init_item_window(s32 objectIndex) { } void func_8006EEE8(s32 courseId) { - D_8018D240 = (uintptr_t) dma_textures(gCourseOutlineTextures[courseId], D_800E5520[courseId], D_800E5520[courseId]); + D_8018D240 = (uintptr_t) dma_textures(CourseManager_GetProps()->MinimapTexture, D_800E5520[courseId], + ResourceGetTexSizeByName(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 = D_800E5548[courseId * 2]; - D_8018D2B8 = D_800E5548[courseId * 2 + 1]; + D_8018D2B0 = CourseManager_GetProps()->D_800E5548[0]; // D_800E5548[courseId * 2]; + D_8018D2B8 = CourseManager_GetProps()->D_800E5548[1]; // D_800E5548[courseId * 2 + 1]; } void func_8006EF60(void) { @@ -175,7 +179,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(gCourseOutlineTextures[i], wut, D_800E5520[i], D_800E5520[i]); wut += D_800E5520[i]; } + 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]; } // clang-format on } |
