Skip to content

Commit

Permalink
Like this you idiot
Browse files Browse the repository at this point in the history
  • Loading branch information
Lilaa3 committed Apr 25, 2024
1 parent e01cecd commit 3aecda0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions fast64_internal/sm64/animation/classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ class SM64_AnimPair:
# For compressing
offset: int = 0

def clean_frames(self): # TODO: How the fuck do you write this
def clean_frames(self):
if len(self.values) <= 1:
return

last_value = self.values[-1]

i = 0
for i, value in enumerate(reversed(self.values)):
if value != last_value:
break
self.values = self.values[: len(self.values) - (i - 1)]
self.values = self.values[: (-i if i > 1 else len(self.values))]
pass

def get_frame(self, frame: int):
return self.values[frame] if frame < len(self.values) else self.values[-1]
Expand Down Expand Up @@ -616,7 +615,6 @@ def index_sub_seq_in_seq(sub_seq: list[int], seq: list[int]):
i = seq.index(sub_seq[0], i + 1)
if sub_seq == seq[i:sub_length]:
return i
return -1

value_table = SM64_ShortArray(values_name if values_name else anims_data[0].values_reference, True)

Expand Down
2 changes: 1 addition & 1 deletion fast64_internal/sm64/animation/properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ def update_version_0(self, scene: Scene):
self.binary_level = scene.get("levelAnimExport", self.binary_level)

self.version = 1
print(f"Upgraded global SM64 settings to version 1")
print("Upgraded global SM64 settings to version 1")

@staticmethod
def upgrade_changed_props():
Expand Down

0 comments on commit 3aecda0

Please sign in to comment.