mirror of
https://github.com/zeldaret/oot.git
synced 2025-06-08 09:31:52 +00:00
[assets] Better automatic names for subdata of Anim and Col data (#2543)
* better auto names for anim subdata * better auto names for col subdata
This commit is contained in:
parent
ecb9b64354
commit
68ea3bcc00
2 changed files with 35 additions and 7 deletions
|
@ -138,7 +138,11 @@ class AnimationResource(CDataResource):
|
||||||
lambda file, offset: AnimationFrameDataResource(
|
lambda file, offset: AnimationFrameDataResource(
|
||||||
file,
|
file,
|
||||||
offset,
|
offset,
|
||||||
f"{self.name}_{frameData_address:08X}_FrameData",
|
(
|
||||||
|
f"{self.name.removesuffix('Anim')}FrameData"
|
||||||
|
if self.name.endswith("Anim")
|
||||||
|
else f"{self.name}_{frameData_address:08X}_FrameData"
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -151,7 +155,11 @@ class AnimationResource(CDataResource):
|
||||||
lambda file, offset: AnimationJointIndicesResource(
|
lambda file, offset: AnimationJointIndicesResource(
|
||||||
file,
|
file,
|
||||||
offset,
|
offset,
|
||||||
f"{self.name}_{jointIndices_address:08X}_JointIndices",
|
(
|
||||||
|
f"{self.name.removesuffix('Anim')}JointIndices"
|
||||||
|
if self.name.endswith("Anim")
|
||||||
|
else f"{self.name}_{jointIndices_address:08X}_JointIndices"
|
||||||
|
),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -517,7 +517,11 @@ class CollisionResource(CDataResource):
|
||||||
CollisionVtxListResource(
|
CollisionVtxListResource(
|
||||||
file,
|
file,
|
||||||
offset,
|
offset,
|
||||||
f"{resource.name}_{address:08X}_VtxList",
|
(
|
||||||
|
f"{resource.name.removesuffix('Col')}VtxList"
|
||||||
|
if resource.name.endswith("Col")
|
||||||
|
else f"{resource.name}_{address:08X}_VtxList"
|
||||||
|
),
|
||||||
resource.cdata_unpacked["numVertices"],
|
resource.cdata_unpacked["numVertices"],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -562,7 +566,11 @@ class CollisionResource(CDataResource):
|
||||||
CollisionPolyListResource(
|
CollisionPolyListResource(
|
||||||
file,
|
file,
|
||||||
offset,
|
offset,
|
||||||
f"{resource.name}_{address:08X}_PolyList",
|
(
|
||||||
|
f"{resource.name.removesuffix('Col')}PolyList"
|
||||||
|
if resource.name.endswith("Col")
|
||||||
|
else f"{resource.name}_{address:08X}_PolyList"
|
||||||
|
),
|
||||||
resource.cdata_unpacked["numPolygons"],
|
resource.cdata_unpacked["numPolygons"],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -615,7 +623,11 @@ class CollisionResource(CDataResource):
|
||||||
CollisionWaterBoxesResource(
|
CollisionWaterBoxesResource(
|
||||||
file,
|
file,
|
||||||
offset,
|
offset,
|
||||||
f"{resource.name}_{address:08X}_WaterBoxes",
|
(
|
||||||
|
f"{resource.name.removesuffix('Col')}WaterBoxes"
|
||||||
|
if resource.name.endswith("Col")
|
||||||
|
else f"{resource.name}_{address:08X}_WaterBoxes"
|
||||||
|
),
|
||||||
length,
|
length,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -728,7 +740,11 @@ class CollisionResource(CDataResource):
|
||||||
CollisionSurfaceTypeListResource(
|
CollisionSurfaceTypeListResource(
|
||||||
file,
|
file,
|
||||||
offset,
|
offset,
|
||||||
f"{self.name}_{surfaceTypeList_address:08X}_SurfaceTypes",
|
(
|
||||||
|
f"{self.name.removesuffix('Col')}SurfaceTypes"
|
||||||
|
if self.name.endswith("Col")
|
||||||
|
else f"{self.name}_{surfaceTypeList_address:08X}_SurfaceTypes"
|
||||||
|
),
|
||||||
length_surfaceTypeList, # TODO change CollisionSurfaceTypeListResource to a CDataArrayResource (same with more resources)
|
length_surfaceTypeList, # TODO change CollisionSurfaceTypeListResource to a CDataArrayResource (same with more resources)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -760,7 +776,11 @@ class CollisionResource(CDataResource):
|
||||||
CollisionBgCamListResource(
|
CollisionBgCamListResource(
|
||||||
file,
|
file,
|
||||||
offset,
|
offset,
|
||||||
f"{self.name}_{bgCamList_address:08X}_BgCamList",
|
(
|
||||||
|
f"{self.name.removesuffix('Col')}BgCamList"
|
||||||
|
if self.name.endswith("Col")
|
||||||
|
else f"{self.name}_{bgCamList_address:08X}_BgCamList"
|
||||||
|
),
|
||||||
length_bgCamList,
|
length_bgCamList,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
Loading…
Add table
Reference in a new issue