diff options
| author | coco875 <59367621+coco875@users.noreply.github.com> | 2025-12-07 15:34:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-07 07:34:53 -0700 |
| commit | 02ad54ca72f5baf4614cb9b7c30f8dd780764d90 (patch) | |
| tree | bd2719a154830d4c538e0caf91eb845ddb45552d /src/engine/courses/YoshiValley.cpp | |
| parent | eec7d650482134352b7cde4801b979ce1ed2044e (diff) | |
Refactor yaml and remove segment (#531)
* move yaml (still need to fix header path)
* fix header
* change kart to karts and add migration
* fix include
* Update migration.py
* fix common_texture_debug_font extraction
* Update torch
* update torch and header
* unduplicate texture for tumble
* Update torch
* Update migration.py
* put the sort by default
* fix replace_segmented_textures_with_o2r_textures
* Update torch
* fix yamls
* add manual_segments in data of course
* comment out replace_segmented_textures_with_o2r_textures and segment 3
* remove segment 5
* (wip) remove segment 6
still plenty of thing to do
* more vtx
* more change
* Update torch
* small fix
* Update BansheeBoardwalk.cpp
* fix blockFort
* Delete test.yaml
* fix bowser castle and simplify track sections
* fix choco mountain
* clean banshee
* fix dk jungle
* fix double deck
* fix macos
* fix error
* fix macos ci
* Update torch
* Update torch
* fix frappe snowland
* fix kalimari desert
* fix koopa troopa beach
* fix luigi raceway
* fix mario raceway and simplify thing
* fix moo moo farm
* fix rainbow road
* Update torch
* Update torch
* hopefully fix windows error
* fix a small error
* fix royal raceway (and podium in theory)
* fix sherbet_land
* fix skyscraper
* fix toads turnpike
* fix wario stadium
* fix yoshi valley
* update torch
* more clang tidy rules
* REMOVE totally SEGMENT (sorry for the PR)
* remove unused field in course and props and unused packed asset
* fix kart texture
* fix particle
* fix track section and transparency
* try fix mode extra
* fix macos build and render
* fix collision in extra
* small change and try fix windows error
* a little of clean
* more cleanup
* forget header and more clean up
* Update Makefile
* fix credits
* fix kart texture offset
* remove LoadTextures and add Unload
* fix definitevely mirror mode
* add unload but it's not perfect
* revert a bad fix
* clean no longer used python script
* fix crash with player
* being able to load the same course twice
* add a comment on DrawWater
* fix render of transparent object
* better hack
* add a proper migration instruction
* fix number
* add basic modsmanager
* add meta/mods.toml
* Update EditorMath.h
* Update ModsManager.cpp
* basic modManager (maybe I should rename it ModLoader)
* use range on dependencies
* add information about mods.toml
* fix coment
* some rename around
* Delete beta-to-v1.md
* Update migrations.md
* Update textures-pack.md
* Update modding.md
* Update modding.md
* clean yamls_old
* move to mods in engine
* rename ModsManger to ModManager
* move init and unload at the top
* rename ModsMetadata to ModMetadata
* fix header
* Update ModManager.cpp
* put core mods at top
Diffstat (limited to 'src/engine/courses/YoshiValley.cpp')
| -rw-r--r-- | src/engine/courses/YoshiValley.cpp | 44 |
1 files changed, 12 insertions, 32 deletions
diff --git a/src/engine/courses/YoshiValley.cpp b/src/engine/courses/YoshiValley.cpp index 4576b53ca..c2506e568 100644 --- a/src/engine/courses/YoshiValley.cpp +++ b/src/engine/courses/YoshiValley.cpp @@ -10,8 +10,8 @@ #include "engine/objects/BombKart.h" #include "engine/objects/Hedgehog.h" #include "engine/objects/Flagpole.h" -#include "assets/yoshi_valley_data.h" -#include "assets/boo_frames.h" +#include "assets/models/tracks/yoshi_valley/yoshi_valley_data.h" +#include "assets/other/tracks/yoshi_valley/yoshi_valley_data.h" extern "C" { #include "main.h" @@ -27,40 +27,17 @@ extern "C" { #include "code_80005FD0.h" #include "spawn_players.h" #include "render_objects.h" - #include "assets/common_data.h" + #include "assets/models/common_data.h" #include "save.h" #include "replays.h" #include "actors.h" #include "collision.h" #include "memory.h" #include "course.h" - extern const char *d_course_yoshi_valley_dl_list[]; + extern const char *d_course_yoshi_valley_dl_list[124]; } -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; - Props.textures = yoshi_valley_textures; - Props.Minimap.Texture = minimap_yoshi_valley; Props.Minimap.Width = ResourceGetTexWidthByName(Props.Minimap.Texture); Props.Minimap.Height = ResourceGetTexHeightByName(Props.Minimap.Texture); @@ -128,14 +105,17 @@ YoshiValley::YoshiValley() { Props.Skybox.FloorBottomLeft = {0, 0, 0}; Props.Skybox.FloorTopLeft = {95, 40, 15}; Props.Sequence = MusicSeq::MUSIC_SEQ_YOSHI_VALLEY; - for (size_t i = 0; i < 124; i++) { - replace_segmented_textures_with_o2r_textures((Gfx*) d_course_yoshi_valley_dl_list[i], Props.textures); - } } void YoshiValley::Load() { Course::Load(); + if (gIsMirrorMode != 0) { + for (size_t i = 0; i < ARRAY_COUNT(d_course_yoshi_valley_dl_list); i++) { + InvertTriangleWindingByName(d_course_yoshi_valley_dl_list[i]); + } + } + Lights1 lights4 = gdSPDefLights1(100, 100, 100, 255, 254, 254, 0, 0, 120); set_track_light_direction(&lights4, -0x38F0, 0x1C70, 1); parse_course_displaylists((TrackSections*)LOAD_ASSET_RAW(d_course_yoshi_valley_addr)); @@ -143,8 +123,8 @@ void YoshiValley::Load() { Props.WaterLevel = gCourseMinY - 10.0f; } -void YoshiValley::LoadTextures() { - dma_textures(gTextureTrees2, 0x000003E8U, 0x00000800U); // 0x03009000 +void YoshiValley::UnLoad() { + RestoreTriangleWinding(); } void YoshiValley::BeginPlay() { |
