Decompile 3 functions in Source/Client/Input/Language.cpp
Batch #13146 by cremane: 0 byte-identical, 3 confirmed by peer review. - fn_17766 CLanguageBase::MoveBack: logic confirmed by peer review - fn_17787 CLanguageBase::MoveForward: logic confirmed by peer review - fn_17792 CLanguageBase::KeyDown: logic confirmed by peer review (already on main) Peer-reviewed-by: gordaoprogramas, codeplay, StrawberrysherbetIX Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes).
This commit is contained in:
parent
029b8d552e
commit
96f65b0e58
1 changed files with 11 additions and 9 deletions
|
|
@ -182,11 +182,13 @@ void CLanguageBase::Paste() {
|
|||
// OFFSET: 0x00ACD6B0
|
||||
// FUNCTION: fn_17766
|
||||
void CLanguageBase::MoveBack() {
|
||||
if (this->cursor < 0) {
|
||||
this->cursor = 0;
|
||||
} else if (this->cursor != 0) {
|
||||
const char* begin = this->text.c_str();
|
||||
this->cursor = static_cast<int>(CharPrevExA(static_cast<WORD>(this->codePage), begin, begin + this->cursor, 0) - begin);
|
||||
if (this->cursor != 0) {
|
||||
if (this->cursor < 0) {
|
||||
this->cursor = 0;
|
||||
} else {
|
||||
const char* begin = this->text.c_str();
|
||||
this->cursor = static_cast<int>(CharPrevExA(static_cast<WORD>(this->codePage), begin, begin + this->cursor, 0) - begin);
|
||||
}
|
||||
}
|
||||
}
|
||||
// OFFSET: 0x00ACE440
|
||||
|
|
@ -213,12 +215,12 @@ void CLanguageBase::MoveForward() {
|
|||
if (position == length) {
|
||||
return;
|
||||
}
|
||||
if (position < length) {
|
||||
const char* begin = this->text.c_str();
|
||||
this->cursor = static_cast<int>(CharNextExA(static_cast<WORD>(this->codePage), begin + position, 0) - begin);
|
||||
if (position > length) {
|
||||
this->cursor = static_cast<int>(length);
|
||||
return;
|
||||
}
|
||||
this->cursor = static_cast<int>(length);
|
||||
const char* begin = this->text.c_str();
|
||||
this->cursor = static_cast<int>(CharNextExA(static_cast<WORD>(this->codePage), begin + position, 0) - begin);
|
||||
}
|
||||
// OFFSET: 0x00ACE5E0
|
||||
// FUNCTION: fn_17789
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue