mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-25 16:32:04 +00:00
format
This commit is contained in:
parent
26c9e8688e
commit
d2624056d9
3 changed files with 3 additions and 8 deletions
|
@ -24,8 +24,7 @@ class CData(abc.ABC):
|
||||||
# Unpack
|
# Unpack
|
||||||
|
|
||||||
@abc.abstractmethod
|
@abc.abstractmethod
|
||||||
def unpack_from(self, data: memoryview, offset: int = 0) -> Any:
|
def unpack_from(self, data: memoryview, offset: int = 0) -> Any: ...
|
||||||
...
|
|
||||||
|
|
||||||
|
|
||||||
class CData_Value(CData):
|
class CData_Value(CData):
|
||||||
|
@ -121,7 +120,6 @@ class CData_Struct(CData):
|
||||||
|
|
||||||
|
|
||||||
def try_stuff():
|
def try_stuff():
|
||||||
|
|
||||||
"""
|
"""
|
||||||
struct {
|
struct {
|
||||||
s8 fun;
|
s8 fun;
|
||||||
|
|
|
@ -20,7 +20,7 @@ from ..extase.cdata_resources import (
|
||||||
|
|
||||||
|
|
||||||
class AnimationFrameDataResource(CDataResource, can_size_be_unknown=True):
|
class AnimationFrameDataResource(CDataResource, can_size_be_unknown=True):
|
||||||
def write_binang(resource, memory_context, v, wctx:CDataExtWriteContext):
|
def write_binang(resource, memory_context, v, wctx: CDataExtWriteContext):
|
||||||
wctx.f.write(wctx.line_prefix)
|
wctx.f.write(wctx.line_prefix)
|
||||||
wctx.f.write(f" 0x{v:04X}" if v >= 0 else "-0x" + f"{v:04X}".removeprefix("-"))
|
wctx.f.write(f" 0x{v:04X}" if v >= 0 else "-0x" + f"{v:04X}".removeprefix("-"))
|
||||||
return True
|
return True
|
||||||
|
|
|
@ -175,10 +175,7 @@ class LegacyAnimationResource(CDataResource):
|
||||||
resource_jointKey.file,
|
resource_jointKey.file,
|
||||||
)
|
)
|
||||||
|
|
||||||
if (
|
if resource_frameData.range_start < resource_jointKey.range_start:
|
||||||
resource_frameData.range_start
|
|
||||||
< resource_jointKey.range_start
|
|
||||||
):
|
|
||||||
resource_frameData.length = (
|
resource_frameData.length = (
|
||||||
resource_jointKey.range_start - resource_frameData.range_start
|
resource_jointKey.range_start - resource_frameData.range_start
|
||||||
) // animation_resources.AnimationFrameDataResource.elem_cdata_ext.size
|
) // animation_resources.AnimationFrameDataResource.elem_cdata_ext.size
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue