diff options
| author | Anghelo Carvajal <angheloalf95@gmail.com> | 2021-10-05 13:55:55 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-05 12:55:55 -0400 |
| commit | 4994e732406ffa2942f9c9ea6ff14c424cd0b896 (patch) | |
| tree | 0b40b20db17139c58f5c205643940494c20cbc43 /ZAPD/ZRoom/Commands/SetMesh.cpp | |
| parent | 17fca1e0cdda5476c4158940ca405b7eb250ec72 (diff) | |
ZResource cleanup (#178)
* Add some general use methods to ZResource
* change zarray
* adapt ztexture
* Clean up ZCollision, ZPath, ZScalar and ZVector
* cleanup background
* cleanup zmtx
* Clean up skeleton and limb
* mark GetSourceTypeName as abstract
* Remove redundant ExtractFromXML
* Reorder stuff to minimize changes in github
* remove extra ZDisplayList constructor
* Remove using namespace tinyxml2;
* run formatter
* Add some brief descriptions, and remove some methods
* Remove trivials GetSourceOutputCode and a bit of cleanup
* Add more descriptions to methods
* Fix blob build
* improve descriptions a bit
* Run formatter
* Now builds
* Add attributes and fix some warnings
* format
* fix merge issues
* fix merge issues and some clang warnings
* format
* Run formatter
* Fix merge issues
* Format
* add SEGMENTED_NULL
* Fix merge issues
* Run format
* dumb fix
* whoops
* format
* whoops
Diffstat (limited to 'ZAPD/ZRoom/Commands/SetMesh.cpp')
| -rw-r--r-- | ZAPD/ZRoom/Commands/SetMesh.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/ZAPD/ZRoom/Commands/SetMesh.cpp b/ZAPD/ZRoom/Commands/SetMesh.cpp index 024f054..a546996 100644 --- a/ZAPD/ZRoom/Commands/SetMesh.cpp +++ b/ZAPD/ZRoom/Commands/SetMesh.cpp @@ -156,7 +156,9 @@ ZDisplayList* PolygonDlist::MakeDlist(segptr_t ptr, [[maybe_unused]] const std:: int32_t dlistLength = ZDisplayList::GetDListLength( parent->GetRawData(), dlistAddress, Globals::Instance->game == ZGame::OOT_SW97 ? DListType::F3DEX : DListType::F3DZEX); - ZDisplayList* dlist = new ZDisplayList(dlistAddress, dlistLength, parent); + ZDisplayList* dlist = new ZDisplayList(parent); + dlist->ExtractFromBinary(dlistAddress, dlistLength); + dlist->SetName(dlist->GetDefaultName(prefix)); GenDListDeclarations(zRoom, parent, dlist); return dlist; @@ -304,7 +306,13 @@ ZBackground* BgImage::MakeBackground(segptr_t ptr, const std::string& prefix) uint32_t backAddress = Seg2Filespace(ptr, parent->baseAddress); - ZBackground* background = new ZBackground(prefix, backAddress, parent); + ZBackground* background = new ZBackground(parent); + background->ExtractFromFile(backAddress); + + std::string defaultName = background->GetDefaultName(prefix); + background->SetName(defaultName); + background->SetOutName(defaultName); + background->DeclareVar(prefix, ""); parent->resources.push_back(background); |
