From 2ae08c6f6f020538990fcc8d9e88375a1d21f707 Mon Sep 17 00:00:00 2001 From: Lol Bozo Date: Sun, 4 Aug 2024 21:37:24 -0400 Subject: [PATCH] Binary Input Stream Match Matched CBinaryInputStream::Align --- src/P2/bis.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/P2/bis.c b/src/P2/bis.c index 37d8f332..a7047186 100644 --- a/src/P2/bis.c +++ b/src/P2/bis.c @@ -69,7 +69,12 @@ INCLUDE_ASM(const s32, "P2/bis", Decompress__18CBinaryInputStream); INCLUDE_ASM(const s32, "P2/bis", Read__18CBinaryInputStreamiPv); -INCLUDE_ASM(const s32, "P2/bis", Align__18CBinaryInputStreami); +void CBinaryInputStream::Align(int n) +{ + int iVar1 = ((int)m_pb + (n - 1)) & -n; + m_cb -= (iVar1 - (int)m_pb); + m_pb = (byte*)iVar1; +} uchar CBinaryInputStream::U8Read() {