Skip to content

Commit

Permalink
libtrx/level/common: simplify animation reading
Browse files Browse the repository at this point in the history
This removes the separate checks for handling interpolation and frame
size on animations.
  • Loading branch information
lahm86 committed Jan 11, 2025
1 parent 1b5d587 commit b7eaf73
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/libtrx/game/level/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,8 @@ void Level_ReadAnims(
ANIM *const anim = Anim_GetAnim(base_idx + i);
anim->frame_ofs = VFile_ReadU32(file);
anim->frame_ptr = NULL; // filled later by the animation frame loader
#if TR_VERSION == 1
const int16_t interpolation = VFile_ReadS16(file);
ASSERT(interpolation <= 0xFF);
anim->interpolation = interpolation & 0xFF;
anim->frame_size = 0;
#else
anim->interpolation = VFile_ReadU8(file);
anim->frame_size = VFile_ReadU8(file);
#endif
anim->current_anim_state = VFile_ReadS16(file);
anim->velocity = VFile_ReadS32(file);
anim->acceleration = VFile_ReadS32(file);
Expand Down

0 comments on commit b7eaf73

Please sign in to comment.