summaryrefslogtreecommitdiff
path: root/ZAPD/ZLimb.h
AgeCommit message (Collapse)Author
2023-10-18Merge branch 'JackMaster' into mergeJackOntoSquashbriaguya
Conflicts: ZAPD/Declaration.h ZAPD/Globals.cpp ZAPD/Globals.h ZAPD/Main.cpp ZAPD/OtherStructs/SkinLimbStructs.cpp ZAPD/OtherStructs/SkinLimbStructs.h ZAPD/ZAnimation.cpp ZAPD/ZCollision.cpp ZAPD/ZCollision.h ZAPD/ZDisplayList.cpp ZAPD/ZFile.cpp ZAPD/ZLimb.cpp ZAPD/ZLimb.h ZAPD/ZPath.cpp ZAPD/ZResource.h ZAPD/ZRoom/Commands/SetCsCamera.cpp ZAPD/ZRoom/Commands/SetCutsceneEntryList.cpp ZAPD/ZRoom/Commands/SetCutscenes.cpp ZAPD/ZRoom/Commands/SetCutscenes.h ZAPD/ZRoom/Commands/SetEntranceList.cpp ZAPD/ZRoom/Commands/SetLightingSettings.cpp ZAPD/ZRoom/Commands/SetMesh.cpp ZAPD/ZRoom/Commands/SetMinimapList.cpp ZAPD/ZTexture.cpp ZAPDUtils/Makefile ZAPDUtils/Utils/BitConverter.h ZAPDUtils/Utils/Directory.h ZAPDUtils/Utils/File.h ZAPDUtils/Utils/Path.h ZAPDUtils/Utils/StringHelper.h ZAPDUtils/ZAPDUtils.vcxproj
2023-10-17update to latest version used by SoHbriaguya
2023-10-16Update old names to newer ones (#305)JackMasterYanis42
* JointKey -> LegacyJointKey * CamData -> BgCamInfo * TransformData -> CurveInterpKnot * TransformUpdateIndex -> CurveAnimationHeader * SkelCurveLimbList -> CurveSkeletonHeader * LightSettings -> EnvLightSettings * EntranceEntry -> Spawn * PolygonDlist -> RoomShapeDListsEntry * PolygonType0 -> RoomShapeNormal, MeshHeader1Single -> RoomShapeImageSingle * BgImage -> RoomShapeImageMultiBgEntry * MeshHeader1Multi -> RoomShapeImageMulti PolygonDlist2 -> RoomShapeCullableEntry * PolygonType2 -> RoomShapeCullable * SCENE_CMD_MESH -> SCENE_CMD_ROOM_SHAPE * implement enum parsing + use NaviQuestHintFileId * Struct_800A57C0 -> SkinVertex * Struct_800A598C_2 -> SkinTransformation * Struct_800A5E28 -> SkinAnimatedLimbData * Struct_800A598C -> SkinLimbModif * fix MM issues * LinkAnimationHeader -> PlayerAnimationHeader (MM) * CsCameraEntry -> ActorCsCamInfo (MM) * remaining scene commands (MM) * format * removed useless comment * name skinlimb members * format * fixed indentation
2022-01-20Automatic limbs enum generation (#221)Anghelo Carvajal
* proof of concept * SetLimbIndex * LIMB_DONE * use proper enum name in limbs * fix naming * add ifdefs * fix me being dumb * format * Add EnumPrefix * EnumName * Remove autogenerator stuff * Add warnings * format * Use HANDLE_WARNING_RESOURCE for warning * object_box special case * whoops * Remove overloaded bitconverter methods and use boundary-checker .at method when possible * Fix warning * Fix warning * format * Hopefully fix every warning now * docs * Review * typo * Update jenkinsfile for MM * format * Force functionpreamble printing in development mode * Use ARRAY_COUNT on SkeletonHeaders * Simplify endif in header guards * fix limbs using the wrong enum value * use hex in enum comments
2021-10-16`ExternalFile`: Expose other XML's declarations during extraction (#151)Anghelo Carvajal
* proof of concept * fix header include paths * GetDeclarationAlignment and others * this should fix this * minor * DeclareVar in ExtractFromXML * fix vtx intersections * Fix segmented vtxs * --version * zcollision changes * Use GetSegmentedPtrName a lot more * memory related stuff * minor style fixes and use the actual symbol for zlinkanimation instead of the hex address * Simplify lots of GetSourceOutputCode * ZSkeleton cleanup and other changes * Elevate unknown types in skeleton to errors * ZAnimation cleanup * Add ExternalFile to config * delete some code * Remove unused code * fix conflicts * format * remove redundant constructors * minor fixes * fix vtx warnings * extract every vtx as standalone files * format * uups * Bugfix: don't create extra blank files * Fix some Vtx warnings and remove "defaulting to normal" in skeleton error * Refactor ZLimb * Make each limb to look up in every file for dlists * Use GetSegmentedArrayIndexedName in VTX references in dlists * simplify simple condition * search by type * run format * Revert "search by type" This reverts commit a049bdfc94c4ab04613b354f466dee836a20508a. * Add range checks * uups * Always set rangeEnd * special case zsymbol * Revert "Revert "search by type"" This reverts commit 3f6e77c780bd30dc7000614304021a0940168316. * symbol fix and IsOffsetInFileRange * Bugfix and minor checks * run format * Don't extract data from external files * Fix extraction of overly big tluts * Minor changes * More minor fixes * Fix clang warnings * Remove unused parameter * Fix merge issues * Fix ZLimbTable::DeclareVar * Fix limbs not naming properly their DLists * Remove segment number check * Fix merge problems * Run formatter * Maybe fix? * path * empty commit * Fix a typo * Fix merge issues * Fix null ptr dereferencing * Fix merge issues and some clang warnings * Format * Fix not-matching * Format * Fix merge issues * Fix exporter * Last fixes I hope * Fix merge issues * format * fix * fix * I'm dumb * format * static fix * Whoops * fix asan * Fix? * fix * reduce artificial changes * reduce artificial changes 2 * reorder more stuff * format * fix borken thing * Remove redundant stuff in zfile * fix * Format * Fix conflict issues * format * cleanup header includes * format * Add error checks in for ExternalXMLFolder * format
2021-10-05ZResource cleanup (#178)Anghelo Carvajal
* 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
2021-09-13ZRoom cleaning 3 (#140)Anghelo Carvajal
* Remove redundant scene member * altheaders clean * it is broken and I don't know why * fix VTXs * Fix the stuff I broke in SetRoomList * Add RoomAltHeader and SceneAltHeader * fix syotes again and set the size of each ZRoomCommand * Add SCENE_CMD_UNK_09 todo * Nuke HintSystem * run format * Remove `canHaveInner` from ZRoom since the HintSystem doesn't exists anymore * Remove sourceOutput member from ZResource * Update docs * run format * Add non 64-bits aligned textures warning * remove unused json library * Update SCENE_CMD_UNK_09 * Fix merge issues * run format * Clean up actorlist output * Fix merge conflicts * format * Fix actorlist extraction * Unify AltHeader * fix merge conflicts * Run formatter * minor style changes * fix using wrong symbols for extracted vtxs from overlays * format * fix makefile stuff * fix merge issue
2021-06-23Add support to `LegacyLimb`s and `LegacyAnimation`, making `object_human` ↵Anghelo Carvajal
extractable (#152) * proof of concept * Add hex type to ZScalar * minor fixes * BetaAnimation proof of concept * FrameData and JointKey * Fix warnings * Rename betalimb to legacylimb and move with the rest of limbs * Rename BetaAnimation to LegacyAnimation * Add verboseunaccounted * Add limb table * Use ZLimbTable in ZSkeleton * run format * Update docs * AnimationHeader2 -> LegacyAnimationHeader
2021-06-04Optimize RAM usage and performance by removing redundant `rawData` (#148)Anghelo Carvajal
* Remove rawData from ZResource * Remove dlistRawData and some leftovers extra params * Run format * Unused variable warning
2021-05-26A few Limbs, Skel and CurveAnimation fixes (#144)Anghelo Carvajal
* Detect if a limb is pointing to the middle of a dlist * Fix limbs names being ignored in some cases * Check if pointing past the object's size * Remove unnecesary pointers * Don't try to extract the skel offset declared in a CurveAnimation * Final cleanup * Use GetDeclarationRanged * Always set the rangeEnd to the filesize by default * Revert "Always set the rangeEnd to the filesize by default" This reverts commit f5c135c39a1df3f545c97c0a0becf7808115e06f.
2021-05-08Add const to most functions that need it and remove all "using namespace ↵louist103
std" (#132) * started on basic type errors * Done. For now * remove libgfxd binary * const * no more namespace std * revert alloca * re add a few missing consts
2021-05-06Refactor: Removed `relPath` since it is no longer used. (#136)Nicholas Estelami
* Refactor: Removed relPath since it is no longer used. * Removed remaining references Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com>
2021-04-28Use OutputFormatter for every C and H file, to improve the generated output ↵Anghelo Carvajal
(#122) * Small changes in collision * Use outputformatter to write C files * Outputformatter for .h files * Use more fs::path * Use gfxd_udata_set and gfxd_udata_get instead of an instance * Fix merge issues and warnings * run format
2021-04-24Fix most -Wall warnings (#115)louist103
* started on basic type errors * Done. For now * remove libgfxd binary * Most warnings fixed * Fix conflicts and new warnings * Makefile * Sig * Clang format * destructor * Add a bunch of destructors * clear the scalars vector after freeing the elements * PR fixes (Anghelo Alf) * Fix most clang -Wall warnings
2021-04-13Refactoring and various features added (#108)Nicholas Estelami
* ZAPD prints out git hash * Refactor: ZResource constructor sets parent always. ZOverlay also no longer a ZResource, since it did not make much sense. * Organized ZResource a bit * A number of bug fixes, cleanup, and feature improvements. * Prepping for legacy dlist disasm * Fixed some merging issues. Fixed compilation issues with MSVC. Added in proper support for legacy display list disassembler. Refactored parts of ZFile. * Merge with upstream * Finished ZFile refactor, and other tidying. * Fixed up merge issues * Minor cleanup * Got rid of libgfxd_win.a * Fixed matching issue * Fixed up a few bugs * Fixed issue with exceptions * Fixed up merge issues with ZPrerender, along with cleaning up some code * Additional cleanup * Fixed merge issues with ZMtx and fixed a bug with ZDisplayList * Fixes based on PR feedback * run clang-format (#7) Signed-off-by: angie <angheloalf95@gmail.com> * Fixed merge issues with Roz's PR * Misc fixes * Fixed MM bug, removed redundant file. * Removed some commented out code Co-authored-by: Jack Walker <7463599+Jack-Walker@users.noreply.github.com> Co-authored-by: Anghelo Carvajal <anghelo.carvajal.14@sansano.usm.cl>
2021-03-20Add a clang-format config and reformat all source files (#63)Léo Lam
* build: Add genbuildinfo as a dependency for ZAPD object files * Add a clang-format config and reformat all source files The existing code style is mostly preserved; this just makes formatting more consistent and prevents lines from getting too long. * Fix missing includes
2021-03-19Add support to `SkelCurve` and its animation type (#98)Anghelo Carvajal
* Type="Curve" Signed-off-by: angie <angheloalf95@gmail.com> * Starting to extract CurveLimbs Signed-off-by: angie <angheloalf95@gmail.com> * Fix a few oversights Signed-off-by: angie <angheloalf95@gmail.com> * Reading the TransformUpdateIndex Signed-off-by: angie <angheloalf95@gmail.com> * Export the body of the ZCurveAnimation Signed-off-by: angie <angheloalf95@gmail.com> * Add TransformData Signed-off-by: angie <angheloalf95@gmail.com> * Extracting one element of the arrays Signed-off-by: angie <angheloalf95@gmail.com> * Extract the whole refIndexArr Signed-off-by: Angie <angheloalf95@gmail.com> * fix a typo Signed-off-by: Angie <angheloalf95@gmail.com> * Extract the whole transformData array Signed-off-by: Angie <angheloalf95@gmail.com> * Extract copyValues array Signed-off-by: Angie <angheloalf95@gmail.com>
2021-03-12Add horses support (#89)Anghelo Carvajal
* Factor common code as a function Signed-off-by: angie <angheloalf95@gmail.com> * Add some missing methods and change limbs from structs to classes Signed-off-by: angie <angheloalf95@gmail.com> * ZSkeleton::GetRawDataSize Signed-off-by: angie <angheloalf95@gmail.com> * add segAddress and fileAddress in ZLimbStandard Signed-off-by: angie <angheloalf95@gmail.com> * Move code to ZLimbStandard::GetSourceOutputCode Signed-off-by: angie <angheloalf95@gmail.com> * Move code to ZLimbLOD::GetSourceOutputCode and a few fixes Signed-off-by: angie <angheloalf95@gmail.com> * Add missing & and reestructure the code a bit. Signed-off-by: angie <angheloalf95@gmail.com> * Fix merge issues Signed-off-by: angie <angheloalf95@gmail.com> * Move stuff from FromRawData to constructors Signed-off-by: angie <angheloalf95@gmail.com> * Merge both Limb classes and refactor Signed-off-by: angie <angheloalf95@gmail.com> * Initial SkinLimb support Signed-off-by: angie <angheloalf95@gmail.com> * Extract SkinLimb type 11 dlist Signed-off-by: Angie <angheloalf95@gmail.com> * Extracting the first struct of SkinLimb Signed-off-by: Angie <angheloalf95@gmail.com> * Exporting the dlist of SkinLimb breaks stuff Signed-off-by: Angie <angheloalf95@gmail.com> * Add another struct of skinlimb Signed-off-by: Angie <angheloalf95@gmail.com> * Parse Struct_800A598C_2 Signed-off-by: Angie <angheloalf95@gmail.com> * Parse Struct_800A57C0 Signed-off-by: Angie <angheloalf95@gmail.com> * Extract sublimbs as array Signed-off-by: Angie <angheloalf95@gmail.com> * Export the full array of Struct_800A5E28 Signed-off-by: Angie <angheloalf95@gmail.com> * A few stylistic changes Signed-off-by: angie <angheloalf95@gmail.com> * a bit of cleanup Signed-off-by: angie <angheloalf95@gmail.com> * ZSkeleton::ParseXML Signed-off-by: angie <angheloalf95@gmail.com> * ZSkeleton::ParseRawData() Signed-off-by: Angie <angheloalf95@gmail.com> * Move the code around a bit Signed-off-by: Angie <angheloalf95@gmail.com> * Remove ZSkeletonType::Skin Signed-off-by: Angie <angheloalf95@gmail.com> * class Struct_800A57C0 Signed-off-by: Angie <angheloalf95@gmail.com> * class Struct_800A598C_2 Signed-off-by: Angie <angheloalf95@gmail.com> * class Struct_800A598C and class Struct_800A5E28 Signed-off-by: angie <angheloalf95@gmail.com> * MakeInternalDeclarations Signed-off-by: angie <angheloalf95@gmail.com> * Move limbs to ZLimb Signed-off-by: Angie <angheloalf95@gmail.com> * A bit of cleanup Signed-off-by: angie <angheloalf95@gmail.com> * Works, but something is wrong... Signed-off-by: angie <angheloalf95@gmail.com> * Final cleanup Signed-off-by: angie <angheloalf95@gmail.com> * I hope this is the final cleanup Signed-off-by: angie <angheloalf95@gmail.com>