From 19135c9ee83643ea863d5725c22319e502938cac Mon Sep 17 00:00:00 2001 From: MegaMech <7255464+MegaMech@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:41:58 -0700 Subject: [PATCH] load course dl textures from otr and move objects --- CMakeLists.txt | 4 +- courses/all_course_offsets.h | 21 --- courses/banshee_boardwalk/course_offsets.c | 26 --- courses/big_donut/course_offsets.c | 6 +- courses/block_fort/course_offsets.c | 7 - courses/bowsers_castle/course_offsets.c | 32 ---- courses/choco_mountain/course_offsets.c | 24 --- courses/dks_jungle_parkway/course_offsets.c | 28 --- courses/double_deck/course_offsets.c | 6 - courses/frappe_snowland/course_offsets.c | 8 - courses/kalimari_desert/course_offsets.c | 16 -- courses/koopa_troopa_beach/course_offsets.c | 20 -- courses/luigi_raceway/course_offsets.c | 44 ----- courses/mario_raceway/course_offsets.c | 34 ---- courses/moo_moo_farm/course_offsets.c | 32 ---- courses/rainbow_road/course_offsets.c | 9 - courses/royal_raceway/course_offsets.c | 47 ----- courses/sherbet_land/course_offsets.c | 9 - courses/skyscraper/course_offsets.c | 29 --- courses/toads_turnpike/course_offsets.c | 23 --- courses/wario_stadium/course_offsets.c | 24 --- courses/yoshi_valley/course_offsets.c | 18 -- src/actors/kiwano_fruit/render.inc.c | 18 +- src/engine/Engine.h | 2 + src/engine/GameObject.cpp | 28 +-- src/engine/GameObject.h | 36 ++-- src/engine/World.cpp | 41 ++-- src/engine/World.h | 13 +- src/engine/courses/BansheeBoardwalk.cpp | 32 +++- src/engine/courses/BigDonut.cpp | 11 +- src/engine/courses/BlockFort.cpp | 13 +- src/engine/courses/BowsersCastle.cpp | 37 +++- src/engine/courses/ChocoMountain.cpp | 30 ++- src/engine/courses/Course.cpp | 10 +- src/engine/courses/Course.h | 1 + src/engine/courses/DKJungle.cpp | 33 +++- src/engine/courses/DoubleDeck.cpp | 11 +- src/engine/courses/FrappeSnowland.cpp | 14 +- src/engine/courses/KalimariDesert.cpp | 21 ++- src/engine/courses/KoopaTroopaBeach.cpp | 25 ++- src/engine/courses/LuigiRaceway.cpp | 49 ++++- src/engine/courses/MarioRaceway.cpp | 39 +++- src/engine/courses/MooMooFarm.cpp | 37 +++- src/engine/courses/PodiumCeremony.cpp | 52 +++++- src/engine/courses/RainbowRoad.cpp | 15 +- src/engine/courses/RoyalRaceway.cpp | 52 +++++- src/engine/courses/SherbetLand.cpp | 15 +- src/engine/courses/Skyscraper.cpp | 32 +++- src/engine/courses/TestCourse.cpp | 3 +- src/engine/courses/ToadsTurnpike.cpp | 28 ++- src/engine/courses/WarioStadium.cpp | 29 ++- src/engine/courses/YoshiValley.cpp | 24 ++- .../{vehicles => objects}/OBombKart.cpp | 2 +- src/engine/{vehicles => objects}/OBombKart.h | 2 +- src/engine/{vehicles => objects}/OPenguin.cpp | 2 +- src/engine/{vehicles => objects}/OPenguin.h | 2 +- src/engine/{vehicles => objects}/OThwomp.cpp | 2 +- src/engine/{vehicles => objects}/OThwomp.h | 0 src/port/Game.cpp | 2 +- src/racing/memory.c | 176 +++--------------- 60 files changed, 654 insertions(+), 752 deletions(-) delete mode 100644 courses/skyscraper/course_offsets.c rename src/engine/{vehicles => objects}/OBombKart.cpp (99%) rename src/engine/{vehicles => objects}/OBombKart.h (97%) rename src/engine/{vehicles => objects}/OPenguin.cpp (99%) rename src/engine/{vehicles => objects}/OPenguin.h (97%) rename src/engine/{vehicles => objects}/OThwomp.cpp (99%) rename src/engine/{vehicles => objects}/OThwomp.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index d83379ac0..3cc7f64b9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -96,9 +96,9 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/src/networking ${CMAKE_CURRENT_SOURCE_DIR}/src/engine ${CMAKE_CURRENT_SOURCE_DIR}/src/engine/courses + ${CMAKE_CURRENT_SOURCE_DIR}/src/engine/objects ${CMAKE_CURRENT_SOURCE_DIR}/src/enhancements ${CMAKE_CURRENT_SOURCE_DIR}/src/enhancements/freecam - ${CMAKE_CURRENT_SOURCE_DIR}/src/engine ) # Collect source files to build the executable @@ -142,6 +142,8 @@ file(GLOB_RECURSE ALL_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/engine/*.h" "src/engine/courses/*.c" "src/engine/courses/*.h" + "src/engine/objects/*.cpp" + "src/engine/objects/*.h" "src/enhancements/*.c" "src/enhancements/*.h" "src/enhancements/freecam/*.c" diff --git a/courses/all_course_offsets.h b/courses/all_course_offsets.h index 3deb7e79a..a94f34483 100644 --- a/courses/all_course_offsets.h +++ b/courses/all_course_offsets.h @@ -34,25 +34,4 @@ extern Gfx* sherbet_land_dls_2[]; extern Gfx* wario_stadium_dls[]; #endif -extern const course_texture banshee_boardwalk_textures[]; -extern const course_texture big_donut_textures[]; -extern const course_texture block_fort_textures[]; -extern const course_texture bowsers_castle_textures[]; -extern const course_texture choco_mountain_textures[]; -extern const course_texture double_deck_textures[]; -extern const course_texture frappe_snowland_textures[]; -extern const course_texture kalimari_desert_textures[]; -extern const course_texture koopa_troopa_beach_textures[]; -extern const course_texture luigi_raceway_textures[]; -extern const course_texture mario_raceway_textures[]; -extern const course_texture moo_moo_farm_textures[]; -extern const course_texture rainbow_road_textures[]; -extern const course_texture royal_raceway_textures[]; -extern const course_texture sherbet_land_textures[]; -extern const course_texture skyscraper_textures[]; -extern const course_texture toads_turnpike_textures[]; -extern const course_texture wario_stadium_textures[]; -extern const course_texture yoshi_valley_textures[]; -extern const course_texture dks_jungle_parkway_textures[]; - #endif diff --git a/courses/banshee_boardwalk/course_offsets.c b/courses/banshee_boardwalk/course_offsets.c index 3ddce786a..3ccec5dd7 100644 --- a/courses/banshee_boardwalk/course_offsets.c +++ b/courses/banshee_boardwalk/course_offsets.c @@ -9,32 +9,6 @@ #include #include -const course_texture banshee_boardwalk_textures[] = { - { gTexture6447C4, 0x0106, 0x0800, 0x0 }, - { gTexture676FB0, 0x0525, 0x0800, 0x0 }, - { gTexture643B3C, 0x0798, 0x0800, 0x0 }, - { gTexture64BB60, 0x0169, 0x0800, 0x0 }, - { gTexture64BCCC, 0x0450, 0x0800, 0x0 }, - { gTexture64FBF4, 0x0274, 0x0800, 0x0 }, - { gTexture651B20, 0x041D, 0x0800, 0x0 }, - { gTexture66262C, 0x02F7, 0x0800, 0x0 }, - { gTexture668728, 0x01F5, 0x0800, 0x0 }, - { gTexture66A3DC, 0x07C5, 0x0800, 0x0 }, - { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, - { gTexture66CD64, 0x02C0, 0x0800, 0x0 }, - { gTexture66D698, 0x0370, 0x0800, 0x0 }, - { gTexture66E608, 0x05E8, 0x0800, 0x0 }, - { gTexture67B388, 0x03D2, 0x0800, 0x0 }, - { gTextureSignWelcome0, 0x0A2E, 0x1000, 0x0 }, - { gTextureSignWelcome1, 0x0A0A, 0x1000, 0x0 }, - { gTextureSignWoodenBack0, 0x06EF, 0x1000, 0x0 }, - { gTextureSignWoodenBack1, 0x06D1, 0x1000, 0x0 }, - { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, - { gTexture68D940, 0x057D, 0x0800, 0x0 }, - { gTexture685AC0, 0x07CC, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* banshee_boardwalk_dls[] = { d_course_banshee_boardwalk_dl_A0, d_course_banshee_boardwalk_dl_210, d_course_banshee_boardwalk_dl_160, d_course_banshee_boardwalk_dl_270, d_course_banshee_boardwalk_dl_358, d_course_banshee_boardwalk_dl_4F0, diff --git a/courses/big_donut/course_offsets.c b/courses/big_donut/course_offsets.c index e17299856..6ff63f913 100644 --- a/courses/big_donut/course_offsets.c +++ b/courses/big_donut/course_offsets.c @@ -1,8 +1,4 @@ #include #include "course_offsets.h" -const course_texture big_donut_textures[] = { - { gTexture66ABA4, 0x0312, 0x0800, 0x0 }, { gTexture6747C4, 0x0145, 0x0800, 0x0 }, - { gTexture67490C, 0x021C, 0x0800, 0x0 }, { gTexture64BA50, 0x0110, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; + diff --git a/courses/block_fort/course_offsets.c b/courses/block_fort/course_offsets.c index facb98715..03416690a 100644 --- a/courses/block_fort/course_offsets.c +++ b/courses/block_fort/course_offsets.c @@ -1,10 +1,3 @@ #include #include "course_offsets.h" #include - -const course_texture block_fort_textures[] = { - { gTexture64286C, 0x010A, 0x0800, 0x0 }, { gTextureGrayCheckerboard, 0x010C, 0x0800, 0x0 }, - { gTextureGrayCobblestone, 0x010C, 0x0800, 0x0 }, { gTexture64275C, 0x0110, 0x0800, 0x0 }, - { gTexture642978, 0x010D, 0x0800, 0x0 }, { gTexture6747C4, 0x0145, 0x0800, 0x0 }, - { gTexture6442D4, 0x0138, 0x0800, 0x0 }, { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; diff --git a/courses/bowsers_castle/course_offsets.c b/courses/bowsers_castle/course_offsets.c index 1ca988f68..1565c754c 100644 --- a/courses/bowsers_castle/course_offsets.c +++ b/courses/bowsers_castle/course_offsets.c @@ -2,38 +2,6 @@ #include "course_offsets.h" #include -const course_texture bowsers_castle_textures[] = { - { gTexture64313C, 0x01B8, 0x0800, 0x0 }, - { gTexture6528DC, 0x0278, 0x0800, 0x0 }, - { gTexture66ED38, 0x010E, 0x0800, 0x0 }, - { gTexture676C6C, 0x0110, 0x0800, 0x0 }, - { gTexture676EA8, 0x0108, 0x0800, 0x0 }, - { gTexture679D34, 0x0106, 0x0800, 0x0 }, - { gTextureGrass6, 0x023B, 0x0800, 0x0 }, - { gTexture6522E0, 0x05FC, 0x0800, 0x0 }, - { gTexture651F40, 0x039F, 0x0800, 0x0 }, - { gTextureRoofTile, 0x0129, 0x0800, 0x0 }, - { gTextureSignBowser0, 0x07D0, 0x1000, 0x0 }, - { gTextureSignBowser1, 0x064D, 0x1000, 0x0 }, - { gTexture66ABA4, 0x0312, 0x0800, 0x0 }, - { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, - { gTexture6733CC, 0x020E, 0x0800, 0x0 }, - { gTexture673118, 0x02B1, 0x0800, 0x0 }, - { gTexture673FF8, 0x035B, 0x0800, 0x0 }, - { gTexture674B28, 0x0230, 0x0800, 0x0 }, - { gTextureSignGreenArrow, 0x025B, 0x1000, 0x0 }, - { gTexture68D834, 0x010A, 0x0800, 0x0 }, - { gTexture676D7C, 0x012C, 0x0800, 0x0 }, - { gTexture67ADF0, 0x0595, 0x0800, 0x0 }, - { gTexture67EFEC, 0x016F, 0x0800, 0x0 }, - { gTexture653DB0, 0x06AE, 0x0800, 0x0 }, - { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, - { gTexture673990, 0x02D8, 0x0800, 0x0 }, - { gTexture67A370, 0x05AA, 0x0800, 0x0 }, - { gTexture67A91C, 0x04D1, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* bowsers_castle_dls[] = { d_course_bowsers_castle_dl_0, d_course_bowsers_castle_dl_230, d_course_bowsers_castle_dl_110, d_course_bowsers_castle_dl_398, d_course_bowsers_castle_dl_428, d_course_bowsers_castle_dl_640, diff --git a/courses/choco_mountain/course_offsets.c b/courses/choco_mountain/course_offsets.c index 198d346a9..99babf668 100644 --- a/courses/choco_mountain/course_offsets.c +++ b/courses/choco_mountain/course_offsets.c @@ -2,30 +2,6 @@ #include "course_offsets.h" #include -const course_texture choco_mountain_textures[] = { - { gTexture64619C, 0x0124, 0x0800, 0x0 }, - { gTexture64647C, 0x0829, 0x1000, 0x0 }, - { gTexture647F4C, 0x05BC, 0x1000, 0x0 }, - { gTexture64FBF4, 0x0274, 0x0800, 0x0 }, - { gTexture653DB0, 0x06AE, 0x0800, 0x0 }, - { gTexture652B54, 0x0606, 0x0800, 0x0 }, - { gTexture65315C, 0x04A9, 0x0800, 0x0 }, - { gTexture6684F8, 0x010D, 0x0800, 0x0 }, - { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, - { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, - { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, - { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, - { gTexture6774D8, 0x0113, 0x0800, 0x0 }, - { gTextureSignFallingRocks, 0x012C, 0x0800, 0x0 }, - { gTextureSignBackside, 0x011E, 0x0800, 0x0 }, - { gTexture679C04, 0x012F, 0x0800, 0x0 }, - { gTexture67B864, 0x014C, 0x0800, 0x0 }, - { gTexture67DC20, 0x03EF, 0x0800, 0x0 }, - { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, - { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* choco_mountain_dls[] = { d_course_choco_mountain_dl_0, d_course_choco_mountain_dl_150, d_course_choco_mountain_dl_B0, d_course_choco_mountain_dl_208, d_course_choco_mountain_dl_2A8, d_course_choco_mountain_dl_410, diff --git a/courses/dks_jungle_parkway/course_offsets.c b/courses/dks_jungle_parkway/course_offsets.c index 347fe7277..587df1c59 100644 --- a/courses/dks_jungle_parkway/course_offsets.c +++ b/courses/dks_jungle_parkway/course_offsets.c @@ -2,34 +2,6 @@ #include "course_offsets.h" #include -const course_texture dks_jungle_parkway_textures[] = { - { gTexture648508, 0x01FE, 0x1000, 0x0 }, - { gTexture6684F8, 0x010D, 0x0800, 0x0 }, - { gTextureWoodBridgeSlats, 0x0DAB, 0x1000, 0x0 }, - { gTexture654460, 0x0B12, 0x1000, 0x0 }, - { gTexture654F74, 0x0A24, 0x1000, 0x0 }, - { gTexture655998, 0x059F, 0x0800, 0x0 }, - { gTexture655F38, 0x0BB9, 0x1000, 0x0 }, - { gTexture656AF4, 0x0AD3, 0x1000, 0x0 }, - { gTexture6575C8, 0x0DA7, 0x1000, 0x0 }, - { gTexture658370, 0x0DBA, 0x1000, 0x0 }, - { gTexture65912C, 0x0DBC, 0x1000, 0x0 }, - { gTexture659EE8, 0x0EF5, 0x1000, 0x0 }, - { gTexture65ADE0, 0x0D5A, 0x1000, 0x0 }, - { gTexture65BB3C, 0x0D9E, 0x1000, 0x0 }, - { gTexture65C8DC, 0x0CF5, 0x1000, 0x0 }, - { gTexture65D5D4, 0x0D18, 0x1000, 0x0 }, - { gTexture65E2EC, 0x02B0, 0x0800, 0x0 }, - { gTexture65EAEC, 0x034A, 0x0800, 0x0 }, - { gTexture65E59C, 0x054F, 0x1000, 0x0 }, - { gTexture65EE38, 0x0CDE, 0x1000, 0x0 }, - { gTexture65FB18, 0x03EE, 0x0800, 0x0 }, - { gTextureSignPinkArrow, 0x0198, 0x0800, 0x0 }, - { gTextureWaves0, 0x04D0, 0x0800, 0x0 }, - { gTexture683844, 0x0655, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* d_course_dks_jungle_parkway_unknown_dl_list[] = { d_course_dks_jungle_parkway_dl_20, d_course_dks_jungle_parkway_dl_210, d_course_dks_jungle_parkway_dl_180, d_course_dks_jungle_parkway_dl_310, d_course_dks_jungle_parkway_dl_400, d_course_dks_jungle_parkway_dl_628, diff --git a/courses/double_deck/course_offsets.c b/courses/double_deck/course_offsets.c index 66f70ded3..9a8b4abc6 100644 --- a/courses/double_deck/course_offsets.c +++ b/courses/double_deck/course_offsets.c @@ -1,8 +1,2 @@ #include #include "course_offsets.h" - -const course_texture double_deck_textures[] = { - { gTextureGrayCobblestone, 0x010C, 0x0800, 0x0 }, - { gTexture642978, 0x010D, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; diff --git a/courses/frappe_snowland/course_offsets.c b/courses/frappe_snowland/course_offsets.c index 76f5b4458..f832eb03e 100644 --- a/courses/frappe_snowland/course_offsets.c +++ b/courses/frappe_snowland/course_offsets.c @@ -2,14 +2,6 @@ #include "course_offsets.h" #include -const course_texture frappe_snowland_textures[] = { - { gTexture6684F8, 0x010D, 0x0800, 0x0 }, { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, - { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, { gTexture675434, 0x0245, 0x0800, 0x0 }, - { gTexture677F04, 0x0213, 0x0800, 0x0 }, { gTexture678118, 0x0314, 0x0800, 0x0 }, - { gTexture679258, 0x04E3, 0x1000, 0x0 }, { gTexture67973C, 0x04C6, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* d_course_frappe_snowland_dl_list[] = { d_course_frappe_snowland_dl_0, d_course_frappe_snowland_dl_1B8, d_course_frappe_snowland_dl_C8, d_course_frappe_snowland_dl_298, d_course_frappe_snowland_dl_398, d_course_frappe_snowland_dl_540, diff --git a/courses/kalimari_desert/course_offsets.c b/courses/kalimari_desert/course_offsets.c index 78642e55b..2f7f876bd 100644 --- a/courses/kalimari_desert/course_offsets.c +++ b/courses/kalimari_desert/course_offsets.c @@ -2,22 +2,6 @@ #include "course_offsets.h" #include -const course_texture kalimari_desert_textures[] = { - { gTexture6684F8, 0x010D, 0x0800, 0x0 }, { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, - { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, - { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, - { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, { gTexture67490C, 0x021C, 0x0800, 0x0 }, - { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, - { gTexture646CA8, 0x073A, 0x1000, 0x0 }, { gTexture6473E4, 0x05AD, 0x1000, 0x0 }, - { gTexture647994, 0x05B5, 0x1000, 0x0 }, { gTexture668920, 0x03D9, 0x0800, 0x0 }, - { gTextureRailroadTrack, 0x0B5B, 0x1000, 0x0 }, { gTextureRailroadCrossingTrack, 0x0208, 0x1000, 0x0 }, - { gTexture67291C, 0x059C, 0x0800, 0x0 }, { gTextureFenceBarbedWire, 0x021E, 0x1000, 0x0 }, - { gTexture67D304, 0x091C, 0x1000, 0x0 }, { gTexture67E010, 0x0415, 0x0800, 0x0 }, - { gTexture67EEAC, 0x0140, 0x0800, 0x0 }, { gTextureSignShellShot0, 0x038C, 0x1000, 0x0 }, - { gTextureSignShellShot1, 0x0247, 0x1000, 0x0 }, { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, - { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* kalimari_desert_dls[] = { d_course_kalimari_desert_dl_0, d_course_kalimari_desert_dl_258, d_course_kalimari_desert_dl_100, d_course_kalimari_desert_dl_310, d_course_kalimari_desert_dl_4A0, d_course_kalimari_desert_dl_778, diff --git a/courses/koopa_troopa_beach/course_offsets.c b/courses/koopa_troopa_beach/course_offsets.c index 13a187933..50ab4c90c 100644 --- a/courses/koopa_troopa_beach/course_offsets.c +++ b/courses/koopa_troopa_beach/course_offsets.c @@ -3,26 +3,6 @@ #include #include "animation.h" -const course_texture koopa_troopa_beach_textures[] = { - { gTexture643B3C, 0x0798, 0x0800, 0x0 }, - { gTexture66A3DC, 0x07C5, 0x0800, 0x0 }, - { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, - { gTexture66DD38, 0x0330, 0x1000, 0x0 }, - { gTexture643430, 0x0604, 0x0800, 0x0 }, - { gTexture660D8C, 0x0126, 0x0800, 0x0 }, - { gTexture6609D0, 0x03BB, 0x1000, 0x0 }, - { gTextureGrass12, 0x0874, 0x0800, 0x0 }, - { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, - { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, - { gTexture67BEE8, 0x02D0, 0x0800, 0x0 }, - { gTextureSandFinish, 0x022E, 0x0800, 0x0 }, - { gTextureWheelSteamEngine, 0x020F, 0x0800, 0x0 }, - { gTexture669570, 0x0E6B, 0x1000, 0x0 }, - { gTextureWaves1, 0x05C4, 0x0800, 0x0 }, - { gTextureWaves2, 0x0488, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - Gfx* d_course_koopa_troopa_beach_dl_list1[] = { d_course_koopa_troopa_beach_dl_90, d_course_koopa_troopa_beach_dl_278, d_course_koopa_troopa_beach_dl_188, d_course_koopa_troopa_beach_dl_3C0, d_course_koopa_troopa_beach_dl_4B0, d_course_koopa_troopa_beach_dl_6E0, diff --git a/courses/luigi_raceway/course_offsets.c b/courses/luigi_raceway/course_offsets.c index 38abdbd7e..b740bcccd 100644 --- a/courses/luigi_raceway/course_offsets.c +++ b/courses/luigi_raceway/course_offsets.c @@ -2,50 +2,6 @@ #include "course_offsets.h" #include -const course_texture luigi_raceway_textures[] = { - { gTextureSignShellShot0, 0x038C, 0x1000, 0x0 }, - { gTextureSignShellShot1, 0x0247, 0x1000, 0x0 }, - { gTextureCheckerboardYellowBlue, 0x013A, 0x0800, 0x0 }, - { gTexture64619C, 0x0124, 0x0800, 0x0 }, - { gTextureCheckerboardBlueGreen, 0x0139, 0x0800, 0x0 }, - { gTextureGrass3, 0x0372, 0x0800, 0x0 }, - { gTextureFlagRed, 0x019E, 0x0800, 0x0 }, - { gTexture65100C, 0x0120, 0x0800, 0x0 }, - { gTexture65112C, 0x0150, 0x0800, 0x0 }, - { gTexture653608, 0x07A7, 0x0800, 0x0 }, - { gTextureGrass11, 0x01F8, 0x0800, 0x0 }, - { gTextureSignLuigiFace0, 0x05C9, 0x1000, 0x0 }, - { gTextureSignLuigiFace1, 0x065F, 0x1000, 0x0 }, - { gTexture66C7A8, 0x0149, 0x0800, 0x0 }, - { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, - { gTexture671A88, 0x012D, 0x0800, 0x0 }, - { gTexture6735DC, 0x03B1, 0x0800, 0x0 }, - { gTexture673C68, 0x038D, 0x0800, 0x0 }, - { gTexture6747C4, 0x0145, 0x0800, 0x0 }, - { gTextureRoad1, 0x02D2, 0x1000, 0x0 }, - { gTextureRoad2, 0x02AE, 0x1000, 0x0 }, - { gTextureRoadFinish1, 0x026B, 0x1000, 0x0 }, - { gTexture67BBD8, 0x0310, 0x0800, 0x0 }, - { gTexture68272C, 0x01F9, 0x1000, 0x0 }, - { gTexture682928, 0x01F9, 0x1000, 0x0 }, - { gTexture682B24, 0x01F9, 0x1000, 0x0 }, - { gTexture682D20, 0x01F9, 0x1000, 0x0 }, - { gTexture682F1C, 0x01F9, 0x1000, 0x0 }, - { gTexture683118, 0x01F9, 0x1000, 0x0 }, - { gTextureSignBlue64, 0x0567, 0x1000, 0x0 }, - { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, - { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, - { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, - { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, - { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, - { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, - { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, - { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, - { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, - { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* luigi_raceway_dls[] = { d_course_luigi_raceway_dl_0, d_course_luigi_raceway_dl_328, d_course_luigi_raceway_dl_1A8, d_course_luigi_raceway_dl_480, d_course_luigi_raceway_dl_6E0, d_course_luigi_raceway_dl_9F8, diff --git a/courses/mario_raceway/course_offsets.c b/courses/mario_raceway/course_offsets.c index 2a2526ad8..cc81a4dc9 100644 --- a/courses/mario_raceway/course_offsets.c +++ b/courses/mario_raceway/course_offsets.c @@ -2,40 +2,6 @@ #include "course_offsets.h" #include -const course_texture mario_raceway_textures[] = { - { gTextureCheckerboardYellowPink, 0x0149, 0x0800, 0x0 }, - { gTexture64619C, 0x0124, 0x0800, 0x0 }, - { gTextureGrass1, 0x0125, 0x0800, 0x0 }, - { gTexture64BB60, 0x0169, 0x0800, 0x0 }, - { gTextureGrass7, 0x05DE, 0x0800, 0x0 }, - { gTextureGrass5, 0x023F, 0x0800, 0x0 }, - { gTextureFlagRed, 0x019E, 0x0800, 0x0 }, - { gTexture663F90, 0x0122, 0x0800, 0x0 }, - { gTexture6642A4, 0x0162, 0x0800, 0x0 }, - { gTexture6640B4, 0x01EF, 0x0800, 0x0 }, - { gTextureGrass10, 0x01F8, 0x0800, 0x0 }, - { gTexture6684F8, 0x010D, 0x0800, 0x0 }, - { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, - { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, - { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, - { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, - { gTexture66C8F4, 0x01A1, 0x0800, 0x0 }, - { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, - { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, - { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, - { gTexture674354, 0x046F, 0x0800, 0x0 }, - { gTextureRoad0, 0x0300, 0x1000, 0x0 }, - { gTextureRoadFinish0, 0x0338, 0x1000, 0x0 }, - { gTexture67B9B0, 0x0225, 0x0800, 0x0 }, - { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, - { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, - { gTextureSignShellShot0, 0x038C, 0x1000, 0x0 }, - { gTextureSignShellShot1, 0x0247, 0x1000, 0x0 }, - { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, - { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - #ifndef TARGET_N64 const char* mario_raceway_dls[] = { #else diff --git a/courses/moo_moo_farm/course_offsets.c b/courses/moo_moo_farm/course_offsets.c index b5c43fc3e..32f40dfda 100644 --- a/courses/moo_moo_farm/course_offsets.c +++ b/courses/moo_moo_farm/course_offsets.c @@ -2,38 +2,6 @@ #include "course_offsets.h" #include -const course_texture moo_moo_farm_textures[] = { - { gTextureWoodDoor0, 0x0294, 0x1000, 0x0 }, - { gTextureGrass2, 0x0415, 0x0800, 0x0 }, - { gTexture64AF50, 0x0140, 0x0800, 0x0 }, - { gTexture64B090, 0x0365, 0x0800, 0x0 }, - { gTexture64B54C, 0x038C, 0x0800, 0x0 }, - { gTexture64B3F8, 0x0153, 0x0800, 0x0 }, - { gTextureSignNintendo0, 0x0541, 0x1000, 0x0 }, - { gTextureSignNintendo1, 0x0512, 0x1000, 0x0 }, - { gTexture6684F8, 0x010D, 0x0800, 0x0 }, - { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, - { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, - { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, - { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, - { gTexture674D58, 0x030C, 0x1000, 0x0 }, - { gTexture675064, 0x01BB, 0x0800, 0x0 }, - { gTexture675220, 0x0212, 0x0800, 0x0 }, - { gTexture6775EC, 0x0233, 0x1000, 0x0 }, - { gTexture683314, 0x02DC, 0x1000, 0x0 }, - { gTexture68CDA0, 0x0110, 0x0800, 0x0 }, - { gTexture6442D4, 0x0138, 0x0800, 0x0 }, - { gTexture64440C, 0x029D, 0x1000, 0x0 }, - { gTexture6446AC, 0x0116, 0x0800, 0x0 }, - { gTextureMooMooFarmSignLeft, 0x0A66, 0x1000, 0x0 }, - { gTextureMooMooFarmSignRight, 0x0A64, 0x1000, 0x0 }, - { gTexture64ACAC, 0x02A3, 0x0800, 0x0 }, - { gTexture66D698, 0x0370, 0x0800, 0x0 }, - { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, - { gTextureWheelSteamEngineReal, 0x022F, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* moo_moo_farm_dls[] = { d_course_moo_moo_farm_dl_88, d_course_moo_moo_farm_dl_598, d_course_moo_moo_farm_dl_338, d_course_moo_moo_farm_dl_8A0, d_course_moo_moo_farm_dl_B00, d_course_moo_moo_farm_dl_FE0, diff --git a/courses/rainbow_road/course_offsets.c b/courses/rainbow_road/course_offsets.c index f7a6d8da5..579c5fef1 100644 --- a/courses/rainbow_road/course_offsets.c +++ b/courses/rainbow_road/course_offsets.c @@ -2,15 +2,6 @@ #include "course_offsets.h" #include -const course_texture rainbow_road_textures[] = { - { gTextureStarOutline, 0x037A, 0x0800, 0x0 }, - { gTexture67A1B8, 0x01B7, 0x0800, 0x0 }, - { gTextureCheckerboardBlackWhite, 0x0107, 0x0800, 0x0 }, - { gTexture662A34, 0x0106, 0x0800, 0x0 }, - { gTextureRainbow, 0x025D, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - Gfx* rainbow_road_dls[] = { d_course_rainbow_road_dl_D8, d_course_rainbow_road_dl_210, d_course_rainbow_road_dl_178, d_course_rainbow_road_dl_288, d_course_rainbow_road_dl_338, d_course_rainbow_road_dl_4A0, diff --git a/courses/royal_raceway/course_offsets.c b/courses/royal_raceway/course_offsets.c index 94f362ffd..108ee5825 100644 --- a/courses/royal_raceway/course_offsets.c +++ b/courses/royal_raceway/course_offsets.c @@ -2,53 +2,6 @@ #include "course_offsets.h" #include -const course_texture royal_raceway_textures[] = { - { gTexture64619C, 0x0124, 0x0800, 0x0 }, - { gTexture645134, 0x052C, 0x0800, 0x0 }, - { gTextureWoodDoor1, 0x0903, 0x1000, 0x0 }, - { gTexture64BB60, 0x0169, 0x0800, 0x0 }, - { gTextureGrass3, 0x0372, 0x0800, 0x0 }, - { gTexture64F9E8, 0x020B, 0x1000, 0x0 }, - { gTextureFlagRed, 0x019E, 0x0800, 0x0 }, - { gTextureCrownJewelBlue, 0x0301, 0x0800, 0x0 }, - { gTextureCrown, 0x0106, 0x0800, 0x0 }, - { gTextureCrownJewelPink, 0x0313, 0x0800, 0x0 }, - { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, - { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, - { gTexture6684F8, 0x010D, 0x0800, 0x0 }, - { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, - { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, - { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, - { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, - { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, - { gTextureCheckerboardPink, 0x0157, 0x0800, 0x0 }, - { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, - { gTextureRoad0, 0x0300, 0x1000, 0x0 }, - { gTextureRoadFinish0, 0x0338, 0x1000, 0x0 }, - { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, - { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, - { gTextureCastleBricks, 0x0B33, 0x1000, 0x0 }, - { gTextureCastleBridge, 0x0428, 0x0800, 0x0 }, - { gTextureGrass8, 0x02CB, 0x0800, 0x0 }, - { gTextureGrass9, 0x0421, 0x0800, 0x0 }, - { gTexture6646B8, 0x0298, 0x1000, 0x0 }, - { gTexture664408, 0x02AE, 0x1000, 0x0 }, - { gTextureBricksRed, 0x0C55, 0x1000, 0x0 }, - { gTexture665C0C, 0x059D, 0x0800, 0x0 }, - { gTexture6661AC, 0x01F7, 0x0800, 0x0 }, - { gTexture6663A4, 0x05F6, 0x0800, 0x0 }, - { gTexture667BAC, 0x067A, 0x0800, 0x0 }, - { gTextureFlagRed2, 0x0186, 0x0800, 0x0 }, - { gTexture66DB60, 0x01D6, 0x0800, 0x0 }, - { gTextureStainglassPeach0, 0x0ED1, 0x1000, 0x0 }, - { gTextureStainglassPeach1, 0x0DA9, 0x1000, 0x0 }, - { gTextureFencePostWooden, 0x083D, 0x1000, 0x0 }, - { gTexture648508, 0x01FE, 0x1000, 0x0 }, - { gTexture6449D4, 0x075D, 0x0800, 0x0 }, - { gTexture67FE0C, 0x02DE, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* royal_raceway_dls[] = { d_course_royal_raceway_dl_0, d_course_royal_raceway_dl_360, d_course_royal_raceway_dl_258, d_course_royal_raceway_dl_470, d_course_royal_raceway_dl_6D0, d_course_royal_raceway_dl_A48, diff --git a/courses/sherbet_land/course_offsets.c b/courses/sherbet_land/course_offsets.c index b597ee828..b81dba828 100644 --- a/courses/sherbet_land/course_offsets.c +++ b/courses/sherbet_land/course_offsets.c @@ -3,15 +3,6 @@ #include #include "animation.h" -const course_texture sherbet_land_textures[] = { - { gTexture643B3C, 0x0798, 0x0800, 0x0 }, { gTexture66D024, 0x04EA, 0x0800, 0x0 }, - { gTexture678118, 0x0314, 0x0800, 0x0 }, { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, - { gTexture678CC8, 0x058E, 0x0800, 0x0 }, { gTexture67842C, 0x050E, 0x0800, 0x0 }, - { gTexture67893C, 0x038B, 0x0800, 0x0 }, { gTexture651984, 0x019C, 0x0800, 0x0 }, - { gTexture651428, 0x055B, 0x0800, 0x0 }, { gTexture662924, 0x0110, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* sherbet_land_dls[] = { d_course_sherbet_land_dl_0, d_course_sherbet_land_dl_158, d_course_sherbet_land_dl_C0, d_course_sherbet_land_dl_1A8, d_course_sherbet_land_dl_280, d_course_sherbet_land_dl_3B8, diff --git a/courses/skyscraper/course_offsets.c b/courses/skyscraper/course_offsets.c deleted file mode 100644 index c0c12aa88..000000000 --- a/courses/skyscraper/course_offsets.c +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include "course_offsets.h" - -const course_texture skyscraper_textures[] = { - { gTexture6457D8, 0x0160, 0x0800, 0x0 }, - { gTexture6462C0, 0x01B9, 0x0800, 0x0 }, - { gTexture6864E8, 0x0807, 0x1000, 0x0 }, - { gTexture686CF0, 0x08B7, 0x1000, 0x0 }, - { gTexture6875A8, 0x093F, 0x1000, 0x0 }, - { gTexture687EE8, 0x0883, 0x1000, 0x0 }, - { gTexture68876C, 0x0AC2, 0x1000, 0x0 }, - { gTexture689230, 0x09CE, 0x1000, 0x0 }, - { gTexture689C00, 0x0884, 0x1000, 0x0 }, - { gTexture68A484, 0x07D6, 0x1000, 0x0 }, - { gTexture68AC5C, 0x0A47, 0x1000, 0x0 }, - { gTexture68B6A4, 0x07C5, 0x1000, 0x0 }, - { gTexture68BE6C, 0x04A1, 0x1000, 0x0 }, - { gTexture68C310, 0x030D, 0x1000, 0x0 }, - { gTexture64B8D8, 0x0177, 0x0800, 0x0 }, - { gTexture645660, 0x0176, 0x0800, 0x0 }, - { gTextureNumberYellowBlue1, 0x01AE, 0x0800, 0x0 }, - { gTextureNumberYellowBlue2, 0x01C6, 0x0800, 0x0 }, - { gTextureNumberYellowBlue3, 0x01CC, 0x0800, 0x0 }, - { gTextureNumberYellowBlue4, 0x01E4, 0x0800, 0x0 }, - { gTexture668608, 0x0120, 0x0800, 0x0 }, - { gTexture67B75C, 0x0108, 0x0800, 0x0 }, - { gTexture6835F0, 0x0252, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; diff --git a/courses/toads_turnpike/course_offsets.c b/courses/toads_turnpike/course_offsets.c index b702ab56e..885d06bed 100644 --- a/courses/toads_turnpike/course_offsets.c +++ b/courses/toads_turnpike/course_offsets.c @@ -3,29 +3,6 @@ #include "course_offsets.h" #include -const course_texture toads_turnpike_textures[] = { - { gTexture645134, 0x052C, 0x0800, 0x0 }, - { gTexture64FE68, 0x0258, 0x1000, 0x0 }, - { gTexture6607C0, 0x0105, 0x0800, 0x0 }, - { gTexture6608C8, 0x0106, 0x0800, 0x0 }, - { gTextureGrass11, 0x01F8, 0x0800, 0x0 }, - { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, - { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, - { gTexture671A88, 0x012D, 0x0800, 0x0 }, - { gTextureRoad2, 0x02AE, 0x1000, 0x0 }, - { gTextureRoad3, 0x0286, 0x1000, 0x0 }, - { gTextureRoad4, 0x0282, 0x1000, 0x0 }, - { gTextureRoadFinish0, 0x0338, 0x1000, 0x0 }, - { gTextureSignToadYellow, 0x0723, 0x1000, 0x0 }, - { gTextureSignToadGreen, 0x071F, 0x1000, 0x0 }, - { gTextureSignMergingLanes, 0x0118, 0x0800, 0x0 }, - { gTexture65127C, 0x01AB, 0x0800, 0x0 }, - { gTextureRoad5, 0x02B9, 0x1000, 0x0 }, - { gTextureSignToadRed, 0x0610, 0x1000, 0x0 }, - { gTexture668228, 0x0130, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - Gfx* d_course_toads_turnpike_dl_list[] = { d_course_toads_turnpike_dl_80, d_course_toads_turnpike_dl_1F8, d_course_toads_turnpike_dl_158, d_course_toads_turnpike_dl_2D0, d_course_toads_turnpike_dl_380, d_course_toads_turnpike_dl_4E8, diff --git a/courses/wario_stadium/course_offsets.c b/courses/wario_stadium/course_offsets.c index 137d468cf..3111bcba9 100644 --- a/courses/wario_stadium/course_offsets.c +++ b/courses/wario_stadium/course_offsets.c @@ -2,30 +2,6 @@ #include "course_offsets.h" #include -const course_texture wario_stadium_textures[] = { - { gTexture67F15C, 0x02F1, 0x0800, 0x0 }, - { gTexture67F450, 0x0194, 0x0800, 0x0 }, - { gTextureSignWarioFace, 0x0825, 0x1000, 0x0 }, - { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, - { gTextureCheckerboardBlackWhite, 0x0107, 0x0800, 0x0 }, - { gTexture64C11C, 0x0695, 0x0800, 0x0 }, - { gTexture64C7B4, 0x046C, 0x0800, 0x0 }, - { gTexture668228, 0x0130, 0x0800, 0x0 }, - { gTexture668358, 0x01A0, 0x0800, 0x0 }, - { gTexture66AEB8, 0x0201, 0x0800, 0x0 }, - { gTexture677A40, 0x0275, 0x0800, 0x0 }, - { gTexture67E428, 0x0A81, 0x1000, 0x0 }, - { gTexture643A34, 0x0106, 0x0800, 0x0 }, - { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, - { gTexture68272C, 0x01F9, 0x1000, 0x0 }, - { gTexture682928, 0x01F9, 0x1000, 0x0 }, - { gTexture682B24, 0x01F9, 0x1000, 0x0 }, - { gTexture682D20, 0x01F9, 0x1000, 0x0 }, - { gTexture682F1C, 0x01F9, 0x1000, 0x0 }, - { gTexture683118, 0x01F9, 0x1000, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - const Gfx* wario_stadium_dls[] = { d_course_wario_stadium_dl_0, d_course_wario_stadium_dl_158, d_course_wario_stadium_dl_B8, d_course_wario_stadium_dl_1B8, d_course_wario_stadium_dl_2A0, d_course_wario_stadium_dl_440, diff --git a/courses/yoshi_valley/course_offsets.c b/courses/yoshi_valley/course_offsets.c index 7518ece5d..b6b229ad3 100644 --- a/courses/yoshi_valley/course_offsets.c +++ b/courses/yoshi_valley/course_offsets.c @@ -20,24 +20,6 @@ extern u8 gTextureSignWoodRedArrow[]; extern u8 gTexture68DEC0[]; #endif -const course_texture yoshi_valley_textures[] = { - { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, - { gTextureWoodBridgeSlats, 0x0DAB, 0x1000, 0x0 }, - { gTexture65E2EC, 0x02B0, 0x0800, 0x0 }, - { gTexture6846DC, 0x04EA, 0x0800, 0x0 }, - { gTextureFenceRope, 0x0540, 0x0800, 0x0 }, - { gTexture685108, 0x04D4, 0x0800, 0x0 }, - { gTexture64CC20, 0x0EC3, 0x1000, 0x0 }, - { gTextureGrass4, 0x05C3, 0x0800, 0x0 }, - { gTexture6775EC, 0x0233, 0x1000, 0x0 }, - { gTexture68E2D0, 0x087F, 0x0800, 0x0 }, - { gTextureCheckerboardBlackWhite, 0x0107, 0x0800, 0x0 }, - { gTexture643B3C, 0x0798, 0x0800, 0x0 }, - { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, - { gTexture68DEC0, 0x0410, 0x0800, 0x0 }, - { 0x00000000, 0x0000, 0x0000, 0x0 }, -}; - Gfx* d_course_yoshi_valley_dl_list[] = { d_course_yoshi_valley_dl_40, d_course_yoshi_valley_dl_3F0, d_course_yoshi_valley_dl_290, d_course_yoshi_valley_dl_4E8, d_course_yoshi_valley_dl_7A0, d_course_yoshi_valley_dl_BC0, diff --git a/src/actors/kiwano_fruit/render.inc.c b/src/actors/kiwano_fruit/render.inc.c index 137eda99e..0ecfacf29 100644 --- a/src/actors/kiwano_fruit/render.inc.c +++ b/src/actors/kiwano_fruit/render.inc.c @@ -1,6 +1,7 @@ #include #include #include +#include "assets/other_textures.h" // #include /** @@ -28,7 +29,22 @@ void render_actor_kiwano_fruit(UNUSED Camera* camera, Mat4 arg1, struct Actor* a return; } - addr = segmented_texture_to_virtual((actor->rot[0] << 0xA) + 0x03009000); + // Animate actor by creating an index from rot[0]. Divide by texture size to get whole number 0-2. + // All three animated textures need to be the same size for this to work. + size_t idx = (actor->rot[0] << 0xA) / ResourceGetTexSizeByName(gTextureDksJungleParkwayKiwanoFruit1); + switch(idx) { + case 0: + addr = gTextureDksJungleParkwayKiwanoFruit1; + break; + case 1: + addr = gTextureDksJungleParkwayKiwanoFruit2; + break; + case 2: + addr = gTextureDksJungleParkwayKiwanoFruit3; + break; + } + + //addr = segmented_texture_to_virtual((actor->rot[0] << 0xA) + 0x03009000); gDPLoadTextureBlock(gDisplayListHead++, VIRTUAL_TO_PHYSICAL(addr), G_IM_FMT_CI, G_IM_SIZ_8b, 32, 32, 0, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); diff --git a/src/engine/Engine.h b/src/engine/Engine.h index 5af480c23..c25afa79c 100644 --- a/src/engine/Engine.h +++ b/src/engine/Engine.h @@ -7,6 +7,7 @@ #include "path_spawn_metadata.h" #include "waypoints.h" #include "sounds.h" +#include "course_offsets.h" typedef struct { RGB8 TopRight; @@ -45,6 +46,7 @@ typedef struct { s32 MinimapFinishlineX; s32 MinimapFinishlineY; SkyboxColours Skybox; + const course_texture *textures; enum MusicSeq Sequence; } CProperties; diff --git a/src/engine/GameObject.cpp b/src/engine/GameObject.cpp index eb2127fcc..fc7c03344 100644 --- a/src/engine/GameObject.cpp +++ b/src/engine/GameObject.cpp @@ -1,20 +1,20 @@ -#include "GameObject.h" -#include +// #include +// #include "GameObject.h" -#include "World.h" +// #include "World.h" -extern "C" { - #include "camera.h" -} +// extern "C" { +// #include "camera.h" +// } - //GameActor() +// //GameActor() -GameObject::GameObject() {} +// GameObject::GameObject() {} - // Virtual functions to be overridden by derived classes -void GameObject::Tick() { } -void GameObject::Draw(Camera* camera) { } -void GameObject::Collision() {} -void GameObject::Expire() { } -void GameObject::Destroy() { } +// // Virtual functions to be overridden by derived classes +// void GameObject::Tick() { } +// void GameObject::Draw(Camera* camera) { } +// void GameObject::Collision() {} +// void GameObject::Expire() { } +// void GameObject::Destroy() { } diff --git a/src/engine/GameObject.h b/src/engine/GameObject.h index 19d5301cd..b6ac8c559 100644 --- a/src/engine/GameObject.h +++ b/src/engine/GameObject.h @@ -1,24 +1,24 @@ -#pragma once +// #pragma once -#include +// #include -extern "C" { - #include "camera.h" - #include "objects.h" -} +// extern "C" { +// #include "camera.h" +// #include "objects.h" +// } -class GameObject { -public: - uint8_t uuid[16]; - Object o; +// class GameObject { +// public: +// uint8_t uuid[16]; +// Object o; - virtual ~GameObject() = default; +// virtual ~GameObject() = default; - explicit GameObject(); +// explicit GameObject(); - virtual void Tick(); - virtual void Draw(Camera* camera); - virtual void Collision(); - virtual void Expire(); - virtual void Destroy(); -}; +// virtual void Tick(); +// virtual void Draw(Camera* camera); +// virtual void Collision(); +// virtual void Expire(); +// virtual void Destroy(); +// }; diff --git a/src/engine/World.cpp b/src/engine/World.cpp index b8371b2c8..ecaad485d 100644 --- a/src/engine/World.cpp +++ b/src/engine/World.cpp @@ -9,10 +9,11 @@ #include "vehicles/Bus.h" #include "vehicles/TankerTruck.h" #include "vehicles/Car.h" -#include "vehicles/OBombKart.h" +#include "objects/OBombKart.h" +#include "objects/OPenguin.h" #include "TrainCrossing.h" #include - +//#include "objects/GameObject.h" extern "C" { #include "camera.h" @@ -184,11 +185,11 @@ void World::PreviousCourse() { gWorldInstance.CurrentCourse = Courses[CourseIndex]; } -Object* World::AddObject(std::unique_ptr object) { - GameObject* rawPtr = object.get(); - GameObjects.push_back(std::move(object)); - return &rawPtr->o; -} +// Object* World::AddObject(std::unique_ptr object) { +// GameObject* rawPtr = object.get(); +// GameObjects.push_back(std::move(object)); +// return &rawPtr->o; +// } AActor* World::AddActor(AActor* actor) { Actors.push_back(actor); @@ -240,22 +241,22 @@ void RemoveExpiredActors() { } void World::TickObjects() { - for (const auto& object : this->GameObjects) { - object->Tick(); - } + //for (const auto& object : this->GameObjects) { + // object->Tick(); + //} } void World::DrawObjects(Camera *camera) { - for (const auto& object : this->GameObjects) { - object->Draw(camera); - } + //for (const auto& object : this->GameObjects) { + // object->Draw(camera); + //} } void World::ExpiredObjects() { - this->GameObjects.erase( - std::remove_if(this->GameObjects.begin(), this->GameObjects.end(), - [](const std::unique_ptr& object) { return object->uuid == 0; }), // Example condition - this->GameObjects.end()); + //this->GameObjects.erase( + // std::remove_if(this->GameObjects.begin(), this->GameObjects.end(), + // [](const std::unique_ptr& object) { return object->uuid == 0; }), // Example condition + // this->GameObjects.end()); } void World::DestroyObjects() { @@ -263,9 +264,9 @@ void World::DestroyObjects() { } Object* World::GetObjectByIndex(size_t index) { - if (index < this->GameObjects.size()) { + //if (index < this->GameObjects.size()) { // Assuming GameActor::a is accessible, use reinterpret_cast if needed - return reinterpret_cast(&this->GameObjects[index]->o); - } + // return reinterpret_cast(&this->GameObjects[index]->o); + //} return nullptr; // Or handle the error as needed } diff --git a/src/engine/World.h b/src/engine/World.h index b6801a668..0df9e7278 100644 --- a/src/engine/World.h +++ b/src/engine/World.h @@ -1,16 +1,16 @@ #pragma once #include -#include "GameObject.h" +//#include "objects/GameObject.h" #include "Cup.h" #include "vehicles/Vehicle.h" #include "vehicles/Train.h" #include "vehicles/Car.h" -#include "vehicles/OBombKart.h" +#include "objects/OBombKart.h" #include "vehicles/Train.h" #include "TrainCrossing.h" -#include "vehicles/OThwomp.h" -#include "vehicles/OPenguin.h" +#include "objects/OThwomp.h" +#include "objects/OPenguin.h" #include #include "Actor.h" @@ -20,6 +20,7 @@ extern "C" { #include "engine/Engine.h" }; +//class GameObject; class Cup; // <-- Forward declaration class Course; class AVehicle; @@ -92,7 +93,7 @@ public: AActor* ConvertActorToAActor(Actor* actor); Actor* ConvertAActorToActor(AActor* actor); - Object* AddObject(std::unique_ptr object); +// Object* AddObject(std::unique_ptr object); CProperties* GetCourseProps(); void TickObjects(); @@ -128,7 +129,7 @@ public: size_t CupIndex = 1; std::vector Actors; - std::vector> GameObjects; +// std::vector> GameObjects; /** Actors */ void AddBoat(f32 speed, uint32_t waypoint); diff --git a/src/engine/courses/BansheeBoardwalk.cpp b/src/engine/courses/BansheeBoardwalk.cpp index f1dc8287c..04ed6caf0 100644 --- a/src/engine/courses/BansheeBoardwalk.cpp +++ b/src/engine/courses/BansheeBoardwalk.cpp @@ -4,10 +4,9 @@ #include #include "BansheeBoardwalk.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/banshee_boardwalk_data.h" #include "assets/boo_frames.h" @@ -31,14 +30,41 @@ extern "C" { #include "actors.h" #include "collision.h" #include "memory.h" + #include "course_offsets.h" extern const char *banshee_boardwalk_dls[]; } +const course_texture banshee_boardwalk_textures[] = { + { gTexture6447C4, 0x0106, 0x0800, 0x0 }, + { gTexture676FB0, 0x0525, 0x0800, 0x0 }, + { gTexture643B3C, 0x0798, 0x0800, 0x0 }, + { gTexture64BB60, 0x0169, 0x0800, 0x0 }, + { gTexture64BCCC, 0x0450, 0x0800, 0x0 }, + { gTexture64FBF4, 0x0274, 0x0800, 0x0 }, + { gTexture651B20, 0x041D, 0x0800, 0x0 }, + { gTexture66262C, 0x02F7, 0x0800, 0x0 }, + { gTexture668728, 0x01F5, 0x0800, 0x0 }, + { gTexture66A3DC, 0x07C5, 0x0800, 0x0 }, + { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, + { gTexture66CD64, 0x02C0, 0x0800, 0x0 }, + { gTexture66D698, 0x0370, 0x0800, 0x0 }, + { gTexture66E608, 0x05E8, 0x0800, 0x0 }, + { gTexture67B388, 0x03D2, 0x0800, 0x0 }, + { gTextureSignWelcome0, 0x0A2E, 0x1000, 0x0 }, + { gTextureSignWelcome1, 0x0A0A, 0x1000, 0x0 }, + { gTextureSignWoodenBack0, 0x06EF, 0x1000, 0x0 }, + { gTextureSignWoodenBack1, 0x06D1, 0x1000, 0x0 }, + { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, + { gTexture68D940, 0x057D, 0x0800, 0x0 }, + { gTexture685AC0, 0x07CC, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + BansheeBoardwalk::BansheeBoardwalk() { this->vtx = d_course_banshee_boardwalk_vertex; this->gfx = d_course_banshee_boardwalk_packed_dls; this->gfxSize = 3689; - this->textures = banshee_boardwalk_textures; + Props.textures = banshee_boardwalk_textures; Props.MinimapTexture = gTextureCourseOutlineBansheeBoardwalk; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/BigDonut.cpp b/src/engine/courses/BigDonut.cpp index 56ff61a66..d4597fe7b 100644 --- a/src/engine/courses/BigDonut.cpp +++ b/src/engine/courses/BigDonut.cpp @@ -4,9 +4,8 @@ #include #include "BigDonut.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/big_donut_data.h" extern "C" { @@ -33,11 +32,17 @@ extern "C" { extern s16 currentScreenSection; } +const course_texture big_donut_textures[] = { + { gTexture66ABA4, 0x0312, 0x0800, 0x0 }, { gTexture6747C4, 0x0145, 0x0800, 0x0 }, + { gTexture67490C, 0x021C, 0x0800, 0x0 }, { gTexture64BA50, 0x0110, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + BigDonut::BigDonut() { this->vtx = d_course_big_donut_vertex; this->gfx = d_course_big_donut_packed_dls; this->gfxSize = 528; - this->textures = big_donut_textures; + Props.textures = big_donut_textures; Props.MinimapTexture = gTextureCourseOutlineBigDonut; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/BlockFort.cpp b/src/engine/courses/BlockFort.cpp index a61e26280..6178dcc5c 100644 --- a/src/engine/courses/BlockFort.cpp +++ b/src/engine/courses/BlockFort.cpp @@ -4,9 +4,8 @@ #include #include "BlockFort.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/block_fort_data.h" extern "C" { @@ -29,15 +28,23 @@ extern "C" { #include "actors.h" #include "collision.h" #include "memory.h" + #include "course_offsets.h" extern const char *block_fort_dls[]; extern s16 currentScreenSection; } +const course_texture block_fort_textures[] = { + { gTexture64286C, 0x010A, 0x0800, 0x0 }, { gTextureGrayCheckerboard, 0x010C, 0x0800, 0x0 }, + { gTextureGrayCobblestone, 0x010C, 0x0800, 0x0 }, { gTexture64275C, 0x0110, 0x0800, 0x0 }, + { gTexture642978, 0x010D, 0x0800, 0x0 }, { gTexture6747C4, 0x0145, 0x0800, 0x0 }, + { gTexture6442D4, 0x0138, 0x0800, 0x0 }, { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + BlockFort::BlockFort() { this->vtx = d_course_block_fort_vertex; this->gfx = d_course_block_fort_packed_dls; this->gfxSize = 699; - this->textures = block_fort_textures; + Props.textures = block_fort_textures; Props.MinimapTexture = gTextureCourseOutlineBlockFort; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/BowsersCastle.cpp b/src/engine/courses/BowsersCastle.cpp index 9098c62e9..9e9c85d61 100644 --- a/src/engine/courses/BowsersCastle.cpp +++ b/src/engine/courses/BowsersCastle.cpp @@ -4,10 +4,9 @@ #include #include "BowsersCastle.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "bowsers_castle_data.h" extern "C" { @@ -34,11 +33,43 @@ extern "C" { extern const char *bowsers_castle_dls[]; } +const course_texture bowsers_castle_textures[] = { + { gTexture64313C, 0x01B8, 0x0800, 0x0 }, + { gTexture6528DC, 0x0278, 0x0800, 0x0 }, + { gTexture66ED38, 0x010E, 0x0800, 0x0 }, + { gTexture676C6C, 0x0110, 0x0800, 0x0 }, + { gTexture676EA8, 0x0108, 0x0800, 0x0 }, + { gTexture679D34, 0x0106, 0x0800, 0x0 }, + { gTextureGrass6, 0x023B, 0x0800, 0x0 }, + { gTexture6522E0, 0x05FC, 0x0800, 0x0 }, + { gTexture651F40, 0x039F, 0x0800, 0x0 }, + { gTextureRoofTile, 0x0129, 0x0800, 0x0 }, + { gTextureSignBowser0, 0x07D0, 0x1000, 0x0 }, + { gTextureSignBowser1, 0x064D, 0x1000, 0x0 }, + { gTexture66ABA4, 0x0312, 0x0800, 0x0 }, + { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, + { gTexture6733CC, 0x020E, 0x0800, 0x0 }, + { gTexture673118, 0x02B1, 0x0800, 0x0 }, + { gTexture673FF8, 0x035B, 0x0800, 0x0 }, + { gTexture674B28, 0x0230, 0x0800, 0x0 }, + { gTextureSignGreenArrow, 0x025B, 0x1000, 0x0 }, + { gTexture68D834, 0x010A, 0x0800, 0x0 }, + { gTexture676D7C, 0x012C, 0x0800, 0x0 }, + { gTexture67ADF0, 0x0595, 0x0800, 0x0 }, + { gTexture67EFEC, 0x016F, 0x0800, 0x0 }, + { gTexture653DB0, 0x06AE, 0x0800, 0x0 }, + { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, + { gTexture673990, 0x02D8, 0x0800, 0x0 }, + { gTexture67A370, 0x05AA, 0x0800, 0x0 }, + { gTexture67A91C, 0x04D1, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + BowsersCastle::BowsersCastle() { this->vtx = d_course_bowsers_castle_vertex; this->gfx = d_course_bowsers_castle_packed_dls; this->gfxSize = 4900; - this->textures = bowsers_castle_textures; + Props.textures = bowsers_castle_textures; Props.MinimapTexture = gTextureCourseOutlineBowsersCastle; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/ChocoMountain.cpp b/src/engine/courses/ChocoMountain.cpp index 71e147f2d..b497b2431 100644 --- a/src/engine/courses/ChocoMountain.cpp +++ b/src/engine/courses/ChocoMountain.cpp @@ -4,9 +4,8 @@ #include #include "ChocoMountain.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "choco_mountain_data.h" #include "engine/actors/AFinishline.h" @@ -31,14 +30,39 @@ extern "C" { #include "collision.h" #include "code_8003DC40.h" #include "memory.h" + #include "course_offsets.h" extern const char *choco_mountain_dls[]; } +const course_texture choco_mountain_textures[] = { + { gTexture64619C, 0x0124, 0x0800, 0x0 }, + { gTexture64647C, 0x0829, 0x1000, 0x0 }, + { gTexture647F4C, 0x05BC, 0x1000, 0x0 }, + { gTexture64FBF4, 0x0274, 0x0800, 0x0 }, + { gTexture653DB0, 0x06AE, 0x0800, 0x0 }, + { gTexture652B54, 0x0606, 0x0800, 0x0 }, + { gTexture65315C, 0x04A9, 0x0800, 0x0 }, + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, + { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, + { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, + { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, + { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, + { gTexture6774D8, 0x0113, 0x0800, 0x0 }, + { gTextureSignFallingRocks, 0x012C, 0x0800, 0x0 }, + { gTextureSignBackside, 0x011E, 0x0800, 0x0 }, + { gTexture679C04, 0x012F, 0x0800, 0x0 }, + { gTexture67B864, 0x014C, 0x0800, 0x0 }, + { gTexture67DC20, 0x03EF, 0x0800, 0x0 }, + { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, + { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + ChocoMountain::ChocoMountain() { this->vtx = d_course_choco_mountain_vertex; this->gfx = d_course_choco_mountain_packed_dls; this->gfxSize = 2910; - this->textures = choco_mountain_textures; + Props.textures = choco_mountain_textures; Props.MinimapTexture = gTextureCourseOutlineChocoMountain; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/Course.cpp b/src/engine/courses/Course.cpp index 022ee016e..26c549367 100644 --- a/src/engine/courses/Course.cpp +++ b/src/engine/courses/Course.cpp @@ -94,7 +94,7 @@ void Course::Load() { func_802A86A8(reinterpret_cast(LOAD_ASSET_RAW(this->vtx)), vtx, vtxSize / sizeof(Vtx)); // Load and allocate memory for course textures - const course_texture* asset = this->textures; + const course_texture* asset = this->Props.textures; u8* freeMemory = NULL; u8* texture = NULL; size_t size = 0; @@ -103,12 +103,14 @@ void Course::Load() { size = ResourceGetTexSizeByName(asset->addr); freeMemory = (u8*) allocate_memory(size); - texture = reinterpret_cast(LOAD_ASSET_RAW(asset->addr)); + texture = (u8*)(asset->addr); + printf("TEXTURE: 0x%llX\n",texture); if (texture) { - if (asset == &textures[0]) { + if (asset == &this->Props.textures[0]) { gSegmentTable[5] = reinterpret_cast(&freeMemory[0]); } - memcpy(freeMemory, texture, size); + strcpy(reinterpret_cast(freeMemory), asset->addr); + //memcpy(freeMemory, texture, size); texSegSize += size; // printf("Texture Addr: 0x%llX, size 0x%X\n", &freeMemory[0], size); } diff --git a/src/engine/courses/Course.h b/src/engine/courses/Course.h index e711dd510..72dd52639 100644 --- a/src/engine/courses/Course.h +++ b/src/engine/courses/Course.h @@ -75,6 +75,7 @@ public: int32_t MinimapFinishlineX; int32_t MinimapFinishlineY; SkyboxColours Skybox; + const course_texture *textures; MusicSeq Sequence; } Properties; diff --git a/src/engine/courses/DKJungle.cpp b/src/engine/courses/DKJungle.cpp index 479c23b02..ccf2af4b9 100644 --- a/src/engine/courses/DKJungle.cpp +++ b/src/engine/courses/DKJungle.cpp @@ -4,10 +4,9 @@ #include #include "DKJungle.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/dks_jungle_parkway_data.h" #include "engine/vehicles/Utils.h" @@ -38,11 +37,39 @@ extern "C" { extern s16 currentScreenSection; } +const course_texture dks_jungle_parkway_textures[] = { + { gTexture648508, 0x01FE, 0x1000, 0x0 }, + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, + { gTextureWoodBridgeSlats, 0x0DAB, 0x1000, 0x0 }, + { gTexture654460, 0x0B12, 0x1000, 0x0 }, + { gTexture654F74, 0x0A24, 0x1000, 0x0 }, + { gTexture655998, 0x059F, 0x0800, 0x0 }, + { gTexture655F38, 0x0BB9, 0x1000, 0x0 }, + { gTexture656AF4, 0x0AD3, 0x1000, 0x0 }, + { gTexture6575C8, 0x0DA7, 0x1000, 0x0 }, + { gTexture658370, 0x0DBA, 0x1000, 0x0 }, + { gTexture65912C, 0x0DBC, 0x1000, 0x0 }, + { gTexture659EE8, 0x0EF5, 0x1000, 0x0 }, + { gTexture65ADE0, 0x0D5A, 0x1000, 0x0 }, + { gTexture65BB3C, 0x0D9E, 0x1000, 0x0 }, + { gTexture65C8DC, 0x0CF5, 0x1000, 0x0 }, + { gTexture65D5D4, 0x0D18, 0x1000, 0x0 }, + { gTexture65E2EC, 0x02B0, 0x0800, 0x0 }, + { gTexture65EAEC, 0x034A, 0x0800, 0x0 }, + { gTexture65E59C, 0x054F, 0x1000, 0x0 }, + { gTexture65EE38, 0x0CDE, 0x1000, 0x0 }, + { gTexture65FB18, 0x03EE, 0x0800, 0x0 }, + { gTextureSignPinkArrow, 0x0198, 0x0800, 0x0 }, + { gTextureWaves0, 0x04D0, 0x0800, 0x0 }, + { gTexture683844, 0x0655, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + DKJungle::DKJungle() { this->vtx = d_course_dks_jungle_parkway_vertex; this->gfx = d_course_dks_jungle_parkway_packed_dls; this->gfxSize = 4997; - this->textures = dks_jungle_parkway_textures; + Props.textures = dks_jungle_parkway_textures; Props.MinimapTexture = gTextureCourseOutlineDksJungleParkway; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/DoubleDeck.cpp b/src/engine/courses/DoubleDeck.cpp index 74fb7e714..37064a059 100644 --- a/src/engine/courses/DoubleDeck.cpp +++ b/src/engine/courses/DoubleDeck.cpp @@ -4,9 +4,8 @@ #include #include "DoubleDeck.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/double_deck_data.h" extern "C" { @@ -33,11 +32,17 @@ extern "C" { extern s16 currentScreenSection; } +const course_texture double_deck_textures[] = { + { gTextureGrayCobblestone, 0x010C, 0x0800, 0x0 }, + { gTexture642978, 0x010D, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + DoubleDeck::DoubleDeck() { this->vtx = d_course_double_deck_vertex; this->gfx = d_course_double_deck_packed_dls; this->gfxSize = 699; - this->textures = double_deck_textures; + Props.textures = double_deck_textures; Props.MinimapTexture = gTextureCourseOutlineDoubleDeck; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/FrappeSnowland.cpp b/src/engine/courses/FrappeSnowland.cpp index a0e698152..23fa73460 100644 --- a/src/engine/courses/FrappeSnowland.cpp +++ b/src/engine/courses/FrappeSnowland.cpp @@ -4,10 +4,9 @@ #include #include "FrappeSnowland.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/frappe_snowland_data.h" #include "assets/boo_frames.h" @@ -32,15 +31,24 @@ extern "C" { #include "collision.h" #include "memory.h" #include "update_objects.h" + #include "course_offsets.h" extern const char *d_course_frappe_snowland_dl_list[]; extern s8 gPlayerCount; } +const course_texture frappe_snowland_textures[] = { + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, + { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, { gTexture675434, 0x0245, 0x0800, 0x0 }, + { gTexture677F04, 0x0213, 0x0800, 0x0 }, { gTexture678118, 0x0314, 0x0800, 0x0 }, + { gTexture679258, 0x04E3, 0x1000, 0x0 }, { gTexture67973C, 0x04C6, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + FrappeSnowland::FrappeSnowland() { this->vtx = d_course_frappe_snowland_vertex; this->gfx = d_course_frappe_snowland_packed_dls; this->gfxSize = 4140; - this->textures = frappe_snowland_textures; + Props.textures = frappe_snowland_textures; Props.MinimapTexture = gTextureCourseOutlineFrappeSnowland; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/KalimariDesert.cpp b/src/engine/courses/KalimariDesert.cpp index 2562ab8f8..405abbce4 100644 --- a/src/engine/courses/KalimariDesert.cpp +++ b/src/engine/courses/KalimariDesert.cpp @@ -4,10 +4,9 @@ #include #include "KalimariDesert.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "kalimari_desert_data.h" #include "engine/vehicles/Utils.h" @@ -36,11 +35,27 @@ extern "C" { extern const char *kalimari_desert_dls[]; } +const course_texture kalimari_desert_textures[] = { + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, + { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, + { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, + { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, { gTexture67490C, 0x021C, 0x0800, 0x0 }, + { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, + { gTexture646CA8, 0x073A, 0x1000, 0x0 }, { gTexture6473E4, 0x05AD, 0x1000, 0x0 }, + { gTexture647994, 0x05B5, 0x1000, 0x0 }, { gTexture668920, 0x03D9, 0x0800, 0x0 }, + { gTextureRailroadTrack, 0x0B5B, 0x1000, 0x0 }, { gTextureRailroadCrossingTrack, 0x0208, 0x1000, 0x0 }, + { gTexture67291C, 0x059C, 0x0800, 0x0 }, { gTextureFenceBarbedWire, 0x021E, 0x1000, 0x0 }, + { gTexture67D304, 0x091C, 0x1000, 0x0 }, { gTexture67E010, 0x0415, 0x0800, 0x0 }, + { gTexture67EEAC, 0x0140, 0x0800, 0x0 }, { gTextureSignShellShot0, 0x038C, 0x1000, 0x0 }, + { gTextureSignShellShot1, 0x0247, 0x1000, 0x0 }, { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, + { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + KalimariDesert::KalimariDesert() { this->vtx = d_course_kalimari_desert_vertex; this->gfx = d_course_kalimari_desert_packed_dls; this->gfxSize = 5328; - this->textures = kalimari_desert_textures; + Props.textures = kalimari_desert_textures; Props.MinimapTexture = gTextureCourseOutlineKalimariDesert; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 96; diff --git a/src/engine/courses/KoopaTroopaBeach.cpp b/src/engine/courses/KoopaTroopaBeach.cpp index 48f8c8b77..7fe30085b 100644 --- a/src/engine/courses/KoopaTroopaBeach.cpp +++ b/src/engine/courses/KoopaTroopaBeach.cpp @@ -4,10 +4,9 @@ #include #include "KoopaTroopaBeach.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/koopa_troopa_beach_data.h" extern "C" { @@ -35,11 +34,31 @@ extern "C" { extern s8 gPlayerCount; } +const course_texture koopa_troopa_beach_textures[] = { + { gTexture643B3C, 0x0798, 0x0800, 0x0 }, + { gTexture66A3DC, 0x07C5, 0x0800, 0x0 }, + { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, + { gTexture66DD38, 0x0330, 0x1000, 0x0 }, + { gTexture643430, 0x0604, 0x0800, 0x0 }, + { gTexture660D8C, 0x0126, 0x0800, 0x0 }, + { gTexture6609D0, 0x03BB, 0x1000, 0x0 }, + { gTextureGrass12, 0x0874, 0x0800, 0x0 }, + { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, + { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, + { gTexture67BEE8, 0x02D0, 0x0800, 0x0 }, + { gTextureSandFinish, 0x022E, 0x0800, 0x0 }, + { gTextureWheelSteamEngine, 0x020F, 0x0800, 0x0 }, + { gTexture669570, 0x0E6B, 0x1000, 0x0 }, + { gTextureWaves1, 0x05C4, 0x0800, 0x0 }, + { gTextureWaves2, 0x0488, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + KoopaTroopaBeach::KoopaTroopaBeach() { this->vtx = d_course_koopa_troopa_beach_vertex; this->gfx = d_course_koopa_troopa_beach_packed_dls; this->gfxSize = 5720; - this->textures = koopa_troopa_beach_textures; + Props.textures = koopa_troopa_beach_textures; Props.MinimapTexture = gTextureCourseOutlineKoopaTroopaBeach; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/LuigiRaceway.cpp b/src/engine/courses/LuigiRaceway.cpp index f98ceab21..65506cd99 100644 --- a/src/engine/courses/LuigiRaceway.cpp +++ b/src/engine/courses/LuigiRaceway.cpp @@ -4,9 +4,8 @@ #include #include "LuigiRaceway.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/luigi_raceway_data.h" #include "engine/actors/AFinishline.h" @@ -38,11 +37,55 @@ extern "C" { extern s16 currentScreenSection; } +const course_texture luigi_raceway_textures[] = { + { gTextureSignShellShot0, 0x038C, 0x1000, 0x0 }, + { gTextureSignShellShot1, 0x0247, 0x1000, 0x0 }, + { gTextureCheckerboardYellowBlue, 0x013A, 0x0800, 0x0 }, + { gTexture64619C, 0x0124, 0x0800, 0x0 }, + { gTextureCheckerboardBlueGreen, 0x0139, 0x0800, 0x0 }, + { gTextureGrass3, 0x0372, 0x0800, 0x0 }, + { gTextureFlagRed, 0x019E, 0x0800, 0x0 }, + { gTexture65100C, 0x0120, 0x0800, 0x0 }, + { gTexture65112C, 0x0150, 0x0800, 0x0 }, + { gTexture653608, 0x07A7, 0x0800, 0x0 }, + { gTextureGrass11, 0x01F8, 0x0800, 0x0 }, + { gTextureSignLuigiFace0, 0x05C9, 0x1000, 0x0 }, + { gTextureSignLuigiFace1, 0x065F, 0x1000, 0x0 }, + { gTexture66C7A8, 0x0149, 0x0800, 0x0 }, + { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, + { gTexture671A88, 0x012D, 0x0800, 0x0 }, + { gTexture6735DC, 0x03B1, 0x0800, 0x0 }, + { gTexture673C68, 0x038D, 0x0800, 0x0 }, + { gTexture6747C4, 0x0145, 0x0800, 0x0 }, + { gTextureRoad1, 0x02D2, 0x1000, 0x0 }, + { gTextureRoad2, 0x02AE, 0x1000, 0x0 }, + { gTextureRoadFinish1, 0x026B, 0x1000, 0x0 }, + { gTexture67BBD8, 0x0310, 0x0800, 0x0 }, + { gTexture68272C, 0x01F9, 0x1000, 0x0 }, + { gTexture682928, 0x01F9, 0x1000, 0x0 }, + { gTexture682B24, 0x01F9, 0x1000, 0x0 }, + { gTexture682D20, 0x01F9, 0x1000, 0x0 }, + { gTexture682F1C, 0x01F9, 0x1000, 0x0 }, + { gTexture683118, 0x01F9, 0x1000, 0x0 }, + { gTextureSignBlue64, 0x0567, 0x1000, 0x0 }, + { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, + { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, + { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, + { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, + { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, + { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, + { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, + { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, + { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, + { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + LuigiRaceway::LuigiRaceway() { this->vtx = d_course_luigi_raceway_vertex; this->gfx = d_course_luigi_raceway_packed_dls; this->gfxSize = 6377; - this->textures = luigi_raceway_textures; + Props.textures = luigi_raceway_textures; Props.MinimapTexture = gTextureCourseOutlineLuigiRaceway; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 96; diff --git a/src/engine/courses/MarioRaceway.cpp b/src/engine/courses/MarioRaceway.cpp index bde10370d..f16caeeaf 100644 --- a/src/engine/courses/MarioRaceway.cpp +++ b/src/engine/courses/MarioRaceway.cpp @@ -4,10 +4,9 @@ #include #include "MarioRaceway.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" extern "C" { #include "main.h" @@ -34,11 +33,45 @@ extern "C" { extern const char *mario_raceway_dls[]; } +const course_texture mario_raceway_textures[] = { + { gTextureCheckerboardYellowPink, 0x0149, 0x0800, 0x0 }, + { gTexture64619C, 0x0124, 0x0800, 0x0 }, + { gTextureGrass1, 0x0125, 0x0800, 0x0 }, + { gTexture64BB60, 0x0169, 0x0800, 0x0 }, + { gTextureGrass7, 0x05DE, 0x0800, 0x0 }, + { gTextureGrass5, 0x023F, 0x0800, 0x0 }, + { gTextureFlagRed, 0x019E, 0x0800, 0x0 }, + { gTexture663F90, 0x0122, 0x0800, 0x0 }, + { gTexture6642A4, 0x0162, 0x0800, 0x0 }, + { gTexture6640B4, 0x01EF, 0x0800, 0x0 }, + { gTextureGrass10, 0x01F8, 0x0800, 0x0 }, + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, + { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, + { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, + { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, + { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, + { gTexture66C8F4, 0x01A1, 0x0800, 0x0 }, + { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, + { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, + { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, + { gTexture674354, 0x046F, 0x0800, 0x0 }, + { gTextureRoad0, 0x0300, 0x1000, 0x0 }, + { gTextureRoadFinish0, 0x0338, 0x1000, 0x0 }, + { gTexture67B9B0, 0x0225, 0x0800, 0x0 }, + { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, + { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, + { gTextureSignShellShot0, 0x038C, 0x1000, 0x0 }, + { gTextureSignShellShot1, 0x0247, 0x1000, 0x0 }, + { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, + { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + MarioRaceway::MarioRaceway() { this->vtx = d_course_mario_raceway_vertex; this->gfx = d_course_mario_raceway_packed_dls; this->gfxSize = 3367; - this->textures = mario_raceway_textures; + Props.textures = mario_raceway_textures; Props.MinimapTexture = gTextureCourseOutlineMarioRaceway; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/MooMooFarm.cpp b/src/engine/courses/MooMooFarm.cpp index d1b401342..1c7854c6c 100644 --- a/src/engine/courses/MooMooFarm.cpp +++ b/src/engine/courses/MooMooFarm.cpp @@ -4,10 +4,9 @@ #include #include "MooMooFarm.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/moo_moo_farm_data.h" extern "C" { @@ -36,11 +35,43 @@ extern "C" { extern s8 gPlayerCount; } +const course_texture moo_moo_farm_textures[] = { + { gTextureWoodDoor0, 0x0294, 0x1000, 0x0 }, + { gTextureGrass2, 0x0415, 0x0800, 0x0 }, + { gTexture64AF50, 0x0140, 0x0800, 0x0 }, + { gTexture64B090, 0x0365, 0x0800, 0x0 }, + { gTexture64B54C, 0x038C, 0x0800, 0x0 }, + { gTexture64B3F8, 0x0153, 0x0800, 0x0 }, + { gTextureSignNintendo0, 0x0541, 0x1000, 0x0 }, + { gTextureSignNintendo1, 0x0512, 0x1000, 0x0 }, + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, + { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, + { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, + { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, + { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, + { gTexture674D58, 0x030C, 0x1000, 0x0 }, + { gTexture675064, 0x01BB, 0x0800, 0x0 }, + { gTexture675220, 0x0212, 0x0800, 0x0 }, + { gTexture6775EC, 0x0233, 0x1000, 0x0 }, + { gTexture683314, 0x02DC, 0x1000, 0x0 }, + { gTexture68CDA0, 0x0110, 0x0800, 0x0 }, + { gTexture6442D4, 0x0138, 0x0800, 0x0 }, + { gTexture64440C, 0x029D, 0x1000, 0x0 }, + { gTexture6446AC, 0x0116, 0x0800, 0x0 }, + { gTextureMooMooFarmSignLeft, 0x0A66, 0x1000, 0x0 }, + { gTextureMooMooFarmSignRight, 0x0A64, 0x1000, 0x0 }, + { gTexture64ACAC, 0x02A3, 0x0800, 0x0 }, + { gTexture66D698, 0x0370, 0x0800, 0x0 }, + { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, + { gTextureWheelSteamEngineReal, 0x022F, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + MooMooFarm::MooMooFarm() { this->vtx = d_course_moo_moo_farm_vertex; this->gfx = d_course_moo_moo_farm_packed_dls; this->gfxSize = 3304; - this->textures = moo_moo_farm_textures; + Props.textures = moo_moo_farm_textures; Props.MinimapTexture = gTextureCourseOutlineMooMooFarm; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/PodiumCeremony.cpp b/src/engine/courses/PodiumCeremony.cpp index 86bf403b3..e2e5a1262 100644 --- a/src/engine/courses/PodiumCeremony.cpp +++ b/src/engine/courses/PodiumCeremony.cpp @@ -4,9 +4,8 @@ #include #include "PodiumCeremony.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/royal_raceway_data.h" #include "assets/ceremony_data.h" @@ -34,11 +33,58 @@ extern "C" { extern const char *royal_raceway_dls[]; } +const course_texture podium_ceremony_textures[] = { + { gTexture64619C, 0x0124, 0x0800, 0x0 }, + { gTexture645134, 0x052C, 0x0800, 0x0 }, + { gTextureWoodDoor1, 0x0903, 0x1000, 0x0 }, + { gTexture64BB60, 0x0169, 0x0800, 0x0 }, + { gTextureGrass3, 0x0372, 0x0800, 0x0 }, + { gTexture64F9E8, 0x020B, 0x1000, 0x0 }, + { gTextureFlagRed, 0x019E, 0x0800, 0x0 }, + { gTextureCrownJewelBlue, 0x0301, 0x0800, 0x0 }, + { gTextureCrown, 0x0106, 0x0800, 0x0 }, + { gTextureCrownJewelPink, 0x0313, 0x0800, 0x0 }, + { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, + { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, + { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, + { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, + { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, + { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, + { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, + { gTextureCheckerboardPink, 0x0157, 0x0800, 0x0 }, + { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, + { gTextureRoad0, 0x0300, 0x1000, 0x0 }, + { gTextureRoadFinish0, 0x0338, 0x1000, 0x0 }, + { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, + { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, + { gTextureCastleBricks, 0x0B33, 0x1000, 0x0 }, + { gTextureCastleBridge, 0x0428, 0x0800, 0x0 }, + { gTextureGrass8, 0x02CB, 0x0800, 0x0 }, + { gTextureGrass9, 0x0421, 0x0800, 0x0 }, + { gTexture6646B8, 0x0298, 0x1000, 0x0 }, + { gTexture664408, 0x02AE, 0x1000, 0x0 }, + { gTextureBricksRed, 0x0C55, 0x1000, 0x0 }, + { gTexture665C0C, 0x059D, 0x0800, 0x0 }, + { gTexture6661AC, 0x01F7, 0x0800, 0x0 }, + { gTexture6663A4, 0x05F6, 0x0800, 0x0 }, + { gTexture667BAC, 0x067A, 0x0800, 0x0 }, + { gTextureFlagRed2, 0x0186, 0x0800, 0x0 }, + { gTexture66DB60, 0x01D6, 0x0800, 0x0 }, + { gTextureStainglassPeach0, 0x0ED1, 0x1000, 0x0 }, + { gTextureStainglassPeach1, 0x0DA9, 0x1000, 0x0 }, + { gTextureFencePostWooden, 0x083D, 0x1000, 0x0 }, + { gTexture648508, 0x01FE, 0x1000, 0x0 }, + { gTexture6449D4, 0x075D, 0x0800, 0x0 }, + { gTexture67FE0C, 0x02DE, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + PodiumCeremony::PodiumCeremony() { this->vtx = d_course_royal_raceway_vertex; this->gfx = d_course_royal_raceway_packed_dls; this->gfxSize = 5670; - this->textures = royal_raceway_textures; + Props.textures = podium_ceremony_textures; Props.D_800E5548[0] = 0; Props.D_800E5548[1] = 0; diff --git a/src/engine/courses/RainbowRoad.cpp b/src/engine/courses/RainbowRoad.cpp index b8e9865c6..e13b3229b 100644 --- a/src/engine/courses/RainbowRoad.cpp +++ b/src/engine/courses/RainbowRoad.cpp @@ -4,10 +4,9 @@ #include #include "RainbowRoad.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/rainbow_road_data.h" extern "C" { @@ -33,11 +32,21 @@ extern "C" { extern const char *rainbow_road_dls[]; } +const course_texture rainbow_road_textures[] = { + { gTextureStarOutline, 0x037A, 0x0800, 0x0 }, + { gTexture67A1B8, 0x01B7, 0x0800, 0x0 }, + { gTextureCheckerboardBlackWhite, 0x0107, 0x0800, 0x0 }, + { gTexture662A34, 0x0106, 0x0800, 0x0 }, + { gTextureRainbow, 0x025D, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + + RainbowRoad::RainbowRoad() { this->vtx = d_course_rainbow_road_vertex; this->gfx = d_course_rainbow_road_packed_dls; this->gfxSize = 5670; - this->textures = rainbow_road_textures; + Props.textures = rainbow_road_textures; Props.MinimapTexture = gTextureCourseOutlineRainbowRoad; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 96; diff --git a/src/engine/courses/RoyalRaceway.cpp b/src/engine/courses/RoyalRaceway.cpp index c2f6b3c62..8fe5eec32 100644 --- a/src/engine/courses/RoyalRaceway.cpp +++ b/src/engine/courses/RoyalRaceway.cpp @@ -4,10 +4,9 @@ #include #include "RoyalRaceway.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/royal_raceway_data.h" extern "C" { @@ -34,11 +33,58 @@ extern "C" { extern const char *royal_raceway_dls[]; } +const course_texture royal_raceway_textures[] = { + { gTexture64619C, 0x0124, 0x0800, 0x0 }, + { gTexture645134, 0x052C, 0x0800, 0x0 }, + { gTextureWoodDoor1, 0x0903, 0x1000, 0x0 }, + { gTexture64BB60, 0x0169, 0x0800, 0x0 }, + { gTextureGrass3, 0x0372, 0x0800, 0x0 }, + { gTexture64F9E8, 0x020B, 0x1000, 0x0 }, + { gTextureFlagRed, 0x019E, 0x0800, 0x0 }, + { gTextureCrownJewelBlue, 0x0301, 0x0800, 0x0 }, + { gTextureCrown, 0x0106, 0x0800, 0x0 }, + { gTextureCrownJewelPink, 0x0313, 0x0800, 0x0 }, + { gTextureSignKoopaAir0, 0x0360, 0x1000, 0x0 }, + { gTextureSignKoopaAir1, 0x0304, 0x1000, 0x0 }, + { gTexture6684F8, 0x010D, 0x0800, 0x0 }, + { gTextureSignLuigis0, 0x0287, 0x1000, 0x0 }, + { gTextureSignLuigis1, 0x02AF, 0x1000, 0x0 }, + { gTextureSignMarioStar0, 0x02D2, 0x1000, 0x0 }, + { gTextureSignMarioStar1, 0x02B1, 0x1000, 0x0 }, + { gTexture66CA98, 0x02C9, 0x0800, 0x0 }, + { gTextureCheckerboardPink, 0x0157, 0x0800, 0x0 }, + { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, + { gTextureRoad0, 0x0300, 0x1000, 0x0 }, + { gTextureRoadFinish0, 0x0338, 0x1000, 0x0 }, + { gTextureSignYoshi, 0x04DF, 0x1000, 0x0 }, + { gTextureCheckerboardBlueGray, 0x04A1, 0x1000, 0x0 }, + { gTextureCastleBricks, 0x0B33, 0x1000, 0x0 }, + { gTextureCastleBridge, 0x0428, 0x0800, 0x0 }, + { gTextureGrass8, 0x02CB, 0x0800, 0x0 }, + { gTextureGrass9, 0x0421, 0x0800, 0x0 }, + { gTexture6646B8, 0x0298, 0x1000, 0x0 }, + { gTexture664408, 0x02AE, 0x1000, 0x0 }, + { gTextureBricksRed, 0x0C55, 0x1000, 0x0 }, + { gTexture665C0C, 0x059D, 0x0800, 0x0 }, + { gTexture6661AC, 0x01F7, 0x0800, 0x0 }, + { gTexture6663A4, 0x05F6, 0x0800, 0x0 }, + { gTexture667BAC, 0x067A, 0x0800, 0x0 }, + { gTextureFlagRed2, 0x0186, 0x0800, 0x0 }, + { gTexture66DB60, 0x01D6, 0x0800, 0x0 }, + { gTextureStainglassPeach0, 0x0ED1, 0x1000, 0x0 }, + { gTextureStainglassPeach1, 0x0DA9, 0x1000, 0x0 }, + { gTextureFencePostWooden, 0x083D, 0x1000, 0x0 }, + { gTexture648508, 0x01FE, 0x1000, 0x0 }, + { gTexture6449D4, 0x075D, 0x0800, 0x0 }, + { gTexture67FE0C, 0x02DE, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + RoyalRaceway::RoyalRaceway() { this->vtx = d_course_royal_raceway_vertex; this->gfx = d_course_royal_raceway_packed_dls; this->gfxSize = 5670; - this->textures = royal_raceway_textures; + Props.textures = royal_raceway_textures; Props.MinimapTexture = gTextureCourseOutlineRoyalRaceway; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/SherbetLand.cpp b/src/engine/courses/SherbetLand.cpp index be3cc7043..df2be3f2d 100644 --- a/src/engine/courses/SherbetLand.cpp +++ b/src/engine/courses/SherbetLand.cpp @@ -4,11 +4,11 @@ #include #include "SherbetLand.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/sherbet_land_data.h" +#include "engine/objects/OPenguin.h" extern "C" { #include "main.h" @@ -34,11 +34,20 @@ extern "C" { extern const char *sherbet_land_dls_2[]; } +const course_texture sherbet_land_textures[] = { + { gTexture643B3C, 0x0798, 0x0800, 0x0 }, { gTexture66D024, 0x04EA, 0x0800, 0x0 }, + { gTexture678118, 0x0314, 0x0800, 0x0 }, { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, + { gTexture678CC8, 0x058E, 0x0800, 0x0 }, { gTexture67842C, 0x050E, 0x0800, 0x0 }, + { gTexture67893C, 0x038B, 0x0800, 0x0 }, { gTexture651984, 0x019C, 0x0800, 0x0 }, + { gTexture651428, 0x055B, 0x0800, 0x0 }, { gTexture662924, 0x0110, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + SherbetLand::SherbetLand() { this->vtx = d_course_sherbet_land_vertex; this->gfx = d_course_sherbet_land_packed_dls; this->gfxSize = 1803; - this->textures = sherbet_land_textures; + Props.textures = sherbet_land_textures; Props.MinimapTexture = gTextureCourseOutlineSherbetLand; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/Skyscraper.cpp b/src/engine/courses/Skyscraper.cpp index 7af4fd53f..b95c15899 100644 --- a/src/engine/courses/Skyscraper.cpp +++ b/src/engine/courses/Skyscraper.cpp @@ -4,9 +4,8 @@ #include #include "Skyscraper.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/skyscraper_data.h" extern "C" { @@ -33,11 +32,38 @@ extern "C" { extern s16 currentScreenSection; } +const course_texture skyscraper_textures[] = { + { gTexture6457D8, 0x0160, 0x0800, 0x0 }, + { gTexture6462C0, 0x01B9, 0x0800, 0x0 }, + { gTexture6864E8, 0x0807, 0x1000, 0x0 }, + { gTexture686CF0, 0x08B7, 0x1000, 0x0 }, + { gTexture6875A8, 0x093F, 0x1000, 0x0 }, + { gTexture687EE8, 0x0883, 0x1000, 0x0 }, + { gTexture68876C, 0x0AC2, 0x1000, 0x0 }, + { gTexture689230, 0x09CE, 0x1000, 0x0 }, + { gTexture689C00, 0x0884, 0x1000, 0x0 }, + { gTexture68A484, 0x07D6, 0x1000, 0x0 }, + { gTexture68AC5C, 0x0A47, 0x1000, 0x0 }, + { gTexture68B6A4, 0x07C5, 0x1000, 0x0 }, + { gTexture68BE6C, 0x04A1, 0x1000, 0x0 }, + { gTexture68C310, 0x030D, 0x1000, 0x0 }, + { gTexture64B8D8, 0x0177, 0x0800, 0x0 }, + { gTexture645660, 0x0176, 0x0800, 0x0 }, + { gTextureNumberYellowBlue1, 0x01AE, 0x0800, 0x0 }, + { gTextureNumberYellowBlue2, 0x01C6, 0x0800, 0x0 }, + { gTextureNumberYellowBlue3, 0x01CC, 0x0800, 0x0 }, + { gTextureNumberYellowBlue4, 0x01E4, 0x0800, 0x0 }, + { gTexture668608, 0x0120, 0x0800, 0x0 }, + { gTexture67B75C, 0x0108, 0x0800, 0x0 }, + { gTexture6835F0, 0x0252, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + Skyscraper::Skyscraper() { this->vtx = d_course_skyscraper_vertex; this->gfx = d_course_skyscraper_packed_dls; this->gfxSize = 548; - this->textures = skyscraper_textures; + Props.textures = skyscraper_textures; Props.MinimapTexture = gTextureCourseOutlineSkyscraper; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/TestCourse.cpp b/src/engine/courses/TestCourse.cpp index 742dc6735..6b9907a12 100644 --- a/src/engine/courses/TestCourse.cpp +++ b/src/engine/courses/TestCourse.cpp @@ -4,10 +4,9 @@ #include #include "TestCourse.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/mario_raceway_data.h" #include "assets/bowsers_castle_data.h" #include "assets/bowsers_castle_displaylists.h" diff --git a/src/engine/courses/ToadsTurnpike.cpp b/src/engine/courses/ToadsTurnpike.cpp index 7a19a54dc..cbac2d4e5 100644 --- a/src/engine/courses/ToadsTurnpike.cpp +++ b/src/engine/courses/ToadsTurnpike.cpp @@ -4,9 +4,8 @@ #include #include "ToadsTurnpike.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/toads_turnpike_data.h" #include "engine/actors/AFinishline.h" @@ -38,11 +37,34 @@ extern "C" { extern s8 gPlayerCount; } +const course_texture toads_turnpike_textures[] = { + { gTexture645134, 0x052C, 0x0800, 0x0 }, + { gTexture64FE68, 0x0258, 0x1000, 0x0 }, + { gTexture6607C0, 0x0105, 0x0800, 0x0 }, + { gTexture6608C8, 0x0106, 0x0800, 0x0 }, + { gTextureGrass11, 0x01F8, 0x0800, 0x0 }, + { gTextureSignNintendoRed0, 0x02A6, 0x1000, 0x0 }, + { gTextureSignNintendoRed1, 0x02F7, 0x1000, 0x0 }, + { gTexture671A88, 0x012D, 0x0800, 0x0 }, + { gTextureRoad2, 0x02AE, 0x1000, 0x0 }, + { gTextureRoad3, 0x0286, 0x1000, 0x0 }, + { gTextureRoad4, 0x0282, 0x1000, 0x0 }, + { gTextureRoadFinish0, 0x0338, 0x1000, 0x0 }, + { gTextureSignToadYellow, 0x0723, 0x1000, 0x0 }, + { gTextureSignToadGreen, 0x071F, 0x1000, 0x0 }, + { gTextureSignMergingLanes, 0x0118, 0x0800, 0x0 }, + { gTexture65127C, 0x01AB, 0x0800, 0x0 }, + { gTextureRoad5, 0x02B9, 0x1000, 0x0 }, + { gTextureSignToadRed, 0x0610, 0x1000, 0x0 }, + { gTexture668228, 0x0130, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + ToadsTurnpike::ToadsTurnpike() { this->vtx = d_course_toads_turnpike_vertex; this->gfx = d_course_toads_turnpike_packed_dls; this->gfxSize = 3427; - this->textures = toads_turnpike_textures; + Props.textures = toads_turnpike_textures; Props.MinimapTexture = gTextureCourseOutlineToadsTurnpike; Props.D_800E5548[0] = 128; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/WarioStadium.cpp b/src/engine/courses/WarioStadium.cpp index 62c75143a..78bdf3079 100644 --- a/src/engine/courses/WarioStadium.cpp +++ b/src/engine/courses/WarioStadium.cpp @@ -4,9 +4,8 @@ #include #include "WarioStadium.h" -#include "GameObject.h" #include "World.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/wario_stadium_data.h" #include "engine/actors/AWarioSign.h" #include "engine/actors/AFinishline.h" @@ -37,11 +36,35 @@ extern "C" { extern s16 currentScreenSection; } +const course_texture wario_stadium_textures[] = { + { gTexture67F15C, 0x02F1, 0x0800, 0x0 }, + { gTexture67F450, 0x0194, 0x0800, 0x0 }, + { gTextureSignWarioFace, 0x0825, 0x1000, 0x0 }, + { gTexture670AC8, 0x0FBF, 0x1000, 0x0 }, + { gTextureCheckerboardBlackWhite, 0x0107, 0x0800, 0x0 }, + { gTexture64C11C, 0x0695, 0x0800, 0x0 }, + { gTexture64C7B4, 0x046C, 0x0800, 0x0 }, + { gTexture668228, 0x0130, 0x0800, 0x0 }, + { gTexture668358, 0x01A0, 0x0800, 0x0 }, + { gTexture66AEB8, 0x0201, 0x0800, 0x0 }, + { gTexture677A40, 0x0275, 0x0800, 0x0 }, + { gTexture67E428, 0x0A81, 0x1000, 0x0 }, + { gTexture643A34, 0x0106, 0x0800, 0x0 }, + { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, + { gTexture68272C, 0x01F9, 0x1000, 0x0 }, + { gTexture682928, 0x01F9, 0x1000, 0x0 }, + { gTexture682B24, 0x01F9, 0x1000, 0x0 }, + { gTexture682D20, 0x01F9, 0x1000, 0x0 }, + { gTexture682F1C, 0x01F9, 0x1000, 0x0 }, + { gTexture683118, 0x01F9, 0x1000, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + WarioStadium::WarioStadium() { this->vtx = d_course_wario_stadium_vertex; this->gfx = d_course_wario_stadium_packed_dls; this->gfxSize = 5272; - this->textures = wario_stadium_textures; + Props.textures = wario_stadium_textures; Props.MinimapTexture = gTextureCourseOutlineWarioStadium; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/courses/YoshiValley.cpp b/src/engine/courses/YoshiValley.cpp index b372ec626..1d7bb0d6a 100644 --- a/src/engine/courses/YoshiValley.cpp +++ b/src/engine/courses/YoshiValley.cpp @@ -4,10 +4,9 @@ #include #include "YoshiValley.h" -#include "GameObject.h" #include "World.h" #include "engine/actors/AFinishline.h" -#include "engine/vehicles/OBombKart.h" +#include "engine/objects/OBombKart.h" #include "assets/yoshi_valley_data.h" #include "assets/boo_frames.h" @@ -34,11 +33,30 @@ extern "C" { extern const char *d_course_yoshi_valley_dl_list[]; } +const course_texture yoshi_valley_textures[] = { + { gTexture66EBF0, 0x0146, 0x0800, 0x0 }, + { gTextureWoodBridgeSlats, 0x0DAB, 0x1000, 0x0 }, + { gTexture65E2EC, 0x02B0, 0x0800, 0x0 }, + { gTexture6846DC, 0x04EA, 0x0800, 0x0 }, + { gTextureFenceRope, 0x0540, 0x0800, 0x0 }, + { gTexture685108, 0x04D4, 0x0800, 0x0 }, + { gTexture64CC20, 0x0EC3, 0x1000, 0x0 }, + { gTextureGrass4, 0x05C3, 0x0800, 0x0 }, + { gTexture6775EC, 0x0233, 0x1000, 0x0 }, + { gTexture68E2D0, 0x087F, 0x0800, 0x0 }, + { gTextureCheckerboardBlackWhite, 0x0107, 0x0800, 0x0 }, + { gTexture643B3C, 0x0798, 0x0800, 0x0 }, + { gTextureSignWoodRedArrow, 0x04E1, 0x1000, 0x0 }, + { gTexture68DEC0, 0x0410, 0x0800, 0x0 }, + { 0x00000000, 0x0000, 0x0000, 0x0 }, +}; + YoshiValley::YoshiValley() { this->vtx = d_course_yoshi_valley_vertex; this->gfx = d_course_yoshi_valley_packed_dls; this->gfxSize = 4140; - this->textures = yoshi_valley_textures; + Props.textures = yoshi_valley_textures; + Props.MinimapTexture = gTextureCourseOutlineYoshiValley; Props.D_800E5548[0] = 64; Props.D_800E5548[1] = 64; diff --git a/src/engine/vehicles/OBombKart.cpp b/src/engine/objects/OBombKart.cpp similarity index 99% rename from src/engine/vehicles/OBombKart.cpp rename to src/engine/objects/OBombKart.cpp index a73a89f84..e51340b8f 100644 --- a/src/engine/vehicles/OBombKart.cpp +++ b/src/engine/objects/OBombKart.cpp @@ -1,5 +1,5 @@ #include -#include "engine/vehicles/OBombKart.h" +#include "OBombKart.h" #include #include "port/Game.h" diff --git a/src/engine/vehicles/OBombKart.h b/src/engine/objects/OBombKart.h similarity index 97% rename from src/engine/vehicles/OBombKart.h rename to src/engine/objects/OBombKart.h index 8a331776c..4500e41c2 100644 --- a/src/engine/vehicles/OBombKart.h +++ b/src/engine/objects/OBombKart.h @@ -1,7 +1,7 @@ #pragma once #include -#include "Vehicle.h" +#include "src/engine/vehicles/Vehicle.h" #include #include "engine/Matrix.h" diff --git a/src/engine/vehicles/OPenguin.cpp b/src/engine/objects/OPenguin.cpp similarity index 99% rename from src/engine/vehicles/OPenguin.cpp rename to src/engine/objects/OPenguin.cpp index e8d97116a..f43a76ffc 100644 --- a/src/engine/vehicles/OPenguin.cpp +++ b/src/engine/objects/OPenguin.cpp @@ -1,6 +1,6 @@ #include #include -#include "engine/vehicles/OPenguin.h" +#include "OPenguin.h" #include #include "port/Game.h" diff --git a/src/engine/vehicles/OPenguin.h b/src/engine/objects/OPenguin.h similarity index 97% rename from src/engine/vehicles/OPenguin.h rename to src/engine/objects/OPenguin.h index 007baf551..111f629ba 100644 --- a/src/engine/vehicles/OPenguin.h +++ b/src/engine/objects/OPenguin.h @@ -2,7 +2,6 @@ #include #include -#include "engine/vehicles/OPenguin.h" extern "C" { #include "macros.h" @@ -11,6 +10,7 @@ extern "C" { #include "waypoints.h" #include "common_structs.h" #include "objects.h" +#include "course_offsets.h" } //! @todo Make shadow size bigger if thwomp is scaled up diff --git a/src/engine/vehicles/OThwomp.cpp b/src/engine/objects/OThwomp.cpp similarity index 99% rename from src/engine/vehicles/OThwomp.cpp rename to src/engine/objects/OThwomp.cpp index 5cca30623..e2700f015 100644 --- a/src/engine/vehicles/OThwomp.cpp +++ b/src/engine/objects/OThwomp.cpp @@ -1,6 +1,6 @@ #include #include -#include "engine/vehicles/OThwomp.h" +#include "OThwomp.h" #include #include "port/Game.h" diff --git a/src/engine/vehicles/OThwomp.h b/src/engine/objects/OThwomp.h similarity index 100% rename from src/engine/vehicles/OThwomp.h rename to src/engine/objects/OThwomp.h diff --git a/src/port/Game.cpp b/src/port/Game.cpp index 0b5e8a32f..f6918a2a4 100644 --- a/src/port/Game.cpp +++ b/src/port/Game.cpp @@ -31,7 +31,7 @@ #include "engine/courses/PodiumCeremony.h" #include "engine/TrainCrossing.h" -#include "engine/vehicles/OBombKart.h" +#include "src/engine/objects/OBombKart.h" #include "Smoke.h" diff --git a/src/racing/memory.c b/src/racing/memory.c index 2bf09b7f5..11e8d217c 100644 --- a/src/racing/memory.c +++ b/src/racing/memory.c @@ -821,6 +821,24 @@ void unpack_tile_sync(Gfx* gfx, u8* args, s8 opcode) { sGfxSeekPosition++; } +uintptr_t get_texture(size_t offset) { + course_texture *textures = CourseManager_GetProps()->textures; + size_t totalOffset = 0; + + while (textures->addr) { + if (totalOffset == offset) { + printf("FOUND TEXTURE: 0x%s\n", (textures->addr)); + return (textures->addr); + } + totalOffset += textures->data_size; + textures++; + } + + printf("memory.c: get_texture()\nTEXTURE NOT FOUND DURING DISPLAYLIST EXTRACT\n"); + printf("offset: 0x%X\n", offset); + return NULL; +} + void unpack_tile_load_sync(Gfx* gfx, u8* args, s8 opcode) { UNUSED uintptr_t var; Gfx tileSync[] = { gsDPTileSync() }; @@ -877,7 +895,7 @@ void unpack_tile_load_sync(Gfx* gfx, u8* args, s8 opcode) { var = args[sPackedSeekPosition]; // Generates a texture address. offset = args[sPackedSeekPosition++] << 11; - addr = SEGMENT_ADDR(0x05, offset); + sPackedSeekPosition++; arg = args[sPackedSeekPosition++]; siz = G_IM_SIZ_16b; @@ -885,10 +903,9 @@ void unpack_tile_load_sync(Gfx* gfx, u8* args, s8 opcode) { tile = (arg & 0xF0) >> 4; // Generate gfx - - lo = ((uintptr_t) (uint8_t) G_SETTIMG << 24) | (fmt << 21) | (siz << 19); + lo = ((uintptr_t) (uint8_t) G_SETTIMG_OTR_FILEPATH << 24) | (fmt << 21) | (siz << 19); gfx[sGfxSeekPosition].words.w0 = lo; - gfx[sGfxSeekPosition].words.w1 = segment5_to_virtual(offset); + gfx[sGfxSeekPosition].words.w1 = get_texture(offset); sGfxSeekPosition++; gfx[sGfxSeekPosition].words.w0 = tileSync->words.w0; @@ -1470,157 +1487,6 @@ Gfx* testaaa; * @brief Loads & DMAs course data. Vtx, textures, displaylists, etc. * @param courseId */ - -typedef struct { - char* data; - char* vtx; - size_t vtxSize; - course_texture* textures; - char* displaylists; - size_t dlSize; -} NewCourseTable; - -NewCourseTable gNewCourseTable[] = { { // mario_raceway - .data = d_course_mario_raceway_dl_0, - .vtx = d_course_mario_raceway_vertex, - .vtxSize = 5757, - .textures = mario_raceway_textures, - .displaylists = d_course_mario_raceway_packed_dls, - .dlSize = 3367 }, - { // choco_mountain - .data = d_course_choco_mountain_dl_0, - .vtx = d_course_choco_mountain_vertex, - .vtxSize = 5560, - .textures = choco_mountain_textures, - .displaylists = d_course_choco_mountain_packed_dls, - .dlSize = 2910 }, - { // bowser_castle - .data = d_course_bowsers_castle_dl_0, - .vtx = d_course_bowsers_castle_vertex, - .vtxSize = 9527, - .textures = bowsers_castle_textures, - .displaylists = d_course_bowsers_castle_packed_dls, - .dlSize = 4900 }, - { // banshee_boardwalk - .data = d_course_banshee_boardwalk_dl_0, - .vtx = d_course_banshee_boardwalk_vertex, - .vtxSize = 4945, - .textures = banshee_boardwalk_textures, - .displaylists = d_course_banshee_boardwalk_packed_dls, - .dlSize = 3689 }, - { // maze - .data = d_course_yoshi_valley_dl_0, - .vtx = d_course_yoshi_valley_vertex, - .vtxSize = 3720, - .textures = yoshi_valley_textures, - .displaylists = d_course_yoshi_valley_packed_dls, - .dlSize = 4140 }, - { // snow - .data = d_course_frappe_snowland_dl_0, - .vtx = d_course_frappe_snowland_vertex, - .vtxSize = 5529, - .textures = frappe_snowland_textures, - .displaylists = d_course_frappe_snowland_packed_dls, - .dlSize = 3274 }, - { // koopa_troopa_beach - .data = d_course_koopa_troopa_beach_dl_0, - .vtx = d_course_koopa_troopa_beach_vertex, - .vtxSize = 9376, - .textures = koopa_troopa_beach_textures, - .displaylists = d_course_koopa_troopa_beach_packed_dls, - .dlSize = 5720 }, - { // royal_raceway - .data = d_course_royal_raceway_dl_0, - .vtx = d_course_royal_raceway_vertex, - .vtxSize = 8306, - .textures = royal_raceway_textures, - .displaylists = d_course_royal_raceway_packed_dls, - .dlSize = 5670 }, - { // luigi_raceway - .data = d_course_luigi_raceway_dl_0, - .vtx = d_course_luigi_raceway_vertex, - .vtxSize = 5936, - .textures = luigi_raceway_textures, - .displaylists = d_course_luigi_raceway_packed_dls, - .dlSize = 6377 }, - { // moo_moo_farm - .data = d_course_moo_moo_farm_dl_0, - .vtx = d_course_moo_moo_farm_vertex, - .vtxSize = 7972, - .textures = moo_moo_farm_textures, - .displaylists = d_course_moo_moo_farm_packed_dls, - .dlSize = 3304 }, - { // highway - .data = d_course_toads_turnpike_dl_0, - .vtx = d_course_toads_turnpike_vertex, - .vtxSize = 6359, - .textures = toads_turnpike_textures, - .displaylists = d_course_toads_turnpike_packed_dls, - .dlSize = 3427 }, - { // kalimari_desert - .data = d_course_kalimari_desert_dl_0, - .vtx = d_course_kalimari_desert_vertex, - .vtxSize = 6393, - .textures = kalimari_desert_textures, - .displaylists = d_course_kalimari_desert_packed_dls, - .dlSize = 5328 }, - { // sherbet - .data = d_course_sherbet_land_dl_0, - .vtx = d_course_sherbet_land_vertex, - .vtxSize = 2678, - .textures = sherbet_land_textures, - .displaylists = d_course_sherbet_land_packed_dls, - .dlSize = 1803 }, - { // rainbow - .data = d_course_rainbow_road_dl_0, - .vtx = d_course_rainbow_road_vertex, - .vtxSize = 3111, - .textures = rainbow_road_textures, - .displaylists = d_course_rainbow_road_packed_dls, - .dlSize = 1057 }, - { // wario - .data = d_course_wario_stadium_dl_0, - .vtx = d_course_wario_stadium_vertex, - .vtxSize = 6067, - .textures = wario_stadium_textures, - .displaylists = d_course_wario_stadium_packed_dls, - .dlSize = 5272 }, - { // block fort - .data = d_course_block_fort_dl, - .vtx = d_course_block_fort_vertex, - .vtxSize = 1088, - .textures = block_fort_textures, - .displaylists = d_course_block_fort_packed_dls, - .dlSize = 699 }, - { // skyscraper - .data = d_course_skyscraper_dl, - .vtx = d_course_skyscraper_vertex, - .vtxSize = 1086, - .textures = skyscraper_textures, - .displaylists = d_course_skyscraper_packed_dls, - .dlSize = 548 }, - { // double decker - .data = d_course_double_deck_dl, - .vtx = d_course_double_deck_vertex, - .vtxSize = 555, - .textures = double_deck_textures, - .displaylists = d_course_double_deck_packed_dls, - .dlSize = 234 }, - { // dk jungle - .data = d_course_dks_jungle_parkway_dl_0, - .vtx = d_course_dks_jungle_parkway_vertex, - .vtxSize = 5679, - .textures = dks_jungle_parkway_textures, - .displaylists = d_course_dks_jungle_parkway_packed_dls, - .dlSize = 4997 }, - { // big donut - .data = d_course_big_donut_dl, - .vtx = d_course_big_donut_vertex, - .vtxSize = 1165, - .textures = big_donut_textures, - .displaylists = d_course_big_donut_packed_dls, - .dlSize = 528 } }; - u8* load_lakitu_tlut_x64(const char** textureList, size_t length) { // Calculate lakitu texture size to allocate size_t size = 0;