Decompile fn_17790 (TextInputBuffer::RetreatCursor)

Batch #1343 by ragnarok-clanker: 0 byte-identical, 1 confirmed by peer review.

- fn_17790 TextInputBuffer::RetreatCursor: logic confirmed by peer review

Peer-reviewed-by: eAthena
Reviewed-by: ragnarok-clanker
This commit is contained in:
ragnarok-clanker 2026-10-28 11:01:42 +00:00
commit 241c913563

View file

@ -210,6 +210,23 @@ void TextInputBuffer::MoveForward(unsigned codePage) {
// OFFSET: 0x00ACE5E0
// OFFSET: 0x00ACE620
// FUNCTION: fn_17790
void TextInputBuffer::RetreatCursor(int delta) {
if (this->cursor == 0) {
return;
}
if (this->cursor < 0) {
this->cursor = 0;
} else {
int prev = this->cursor - delta;
if (prev >= 0) {
this->cursor = prev;
}
}
if ((static_cast<unsigned short>(GetKeyState(VK_SHIFT)) >> 8) == 0) {
this->anchor = this->cursor;
}
}
// OFFSET: 0x00ACE660
// FUNCTION: fn_17791