From b38c92f38c84b822f3f05eae4a62083170f723fd Mon Sep 17 00:00:00 2001 From: coah <100182500+coah80@users.noreply.github.com> Date: Thu, 1 Oct 2026 10:37:20 +0000 Subject: [PATCH] iplAddress 91/101, tiZiString 26/29 (worker 5e1635f3) --- README.md | 4 ++-- src/keyboard/tiZiString.cpp | 11 ++++------- src/scene/address/iplAddress.cpp | 11 ++++++++--- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 0c82c076..a1314b11 100644 --- a/README.md +++ b/README.md @@ -53,9 +53,9 @@ Progress | Decompiled | Matched | Linked | Data | |:---:|:---:|:---:|:---:| -| 99.32% | 86.90% | 60.61% | 91.12% | +| 99.32% | 86.91% | 60.61% | 91.12% | -units 911/1027 complete, functions 12183/12563 matched. +units 911/1027 complete, functions 12185/12563 matched. decompiled = code with a C/C++ implementation (objdiff fuzzy), matched = byte-exact code, linked = code actually linked into the DOL, data = byte-exact data diff --git a/src/keyboard/tiZiString.cpp b/src/keyboard/tiZiString.cpp index 0ae78579..66af9b44 100644 --- a/src/keyboard/tiZiString.cpp +++ b/src/keyboard/tiZiString.cpp @@ -557,10 +557,11 @@ void WithZi::setCurrentWord(const wchar_t* word) { LatestWord[1] = 0; return; } - mbContextChanged = 1; wchar_t* currentWord; + const wchar_t* source; u32 length; s32 copied; + mbContextChanged = 1; length = 0; currentWord = reinterpret_cast(LatestWord); for (; *currentWord != 0 && *currentWord != 0x20; @@ -571,14 +572,10 @@ void WithZi::setCurrentWord(const wchar_t* word) { } } copied = 0; - const wchar_t* source = word; - u32 destinationOffset = length; + source = word; for (; *source != 0 && length < 0x3f;) { - wchar_t character = word[copied]; - ++length; + LatestWord[length++] = word[copied++]; ++source; - ++copied; - LatestWord[destinationOffset++] = character; } LatestWord[length] = 0; mCurrentWordLength = copied; diff --git a/src/scene/address/iplAddress.cpp b/src/scene/address/iplAddress.cpp index 3969220a..2f4781ba 100644 --- a/src/scene/address/iplAddress.cpp +++ b/src/scene/address/iplAddress.cpp @@ -536,11 +536,16 @@ namespace ipl { } } + static inline nw4r::math::_VEC2 negativeOffset(const nw4r::math::_VEC2& value) { + f32 negativeY = -value.y; + f32 negativeX = -value.x; + nw4r::math::_VEC2 result = {negativeX, negativeY}; + return result; + } + void Address::stt_cover_backward() { if (!mpLayout->getAnim(4)->isPlaying()) { - math::VEC2 offset; - offset.x = -sPageOffset.x; - offset.y = -sPageOffset.y; + math::VEC2 offset = negativeOffset(sPageOffset); add_translate(mpLayout->FindPaneByName("N_note_base"), offset); mbCover = true; mNextPageNum++; -- 2.49.1