Decompile fn_19565 (CNavigationManager::ReadTarget)
Batch #4946 by youko: 0 byte-identical, 1 confirmed by peer review. - fn_19565 CNavigationManager::ReadTarget: logic confirmed by peer review Peer-reviewed-by: Yommy, alisonrag, KWDev 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
abeb2ec98a
commit
dc275e1b3a
2 changed files with 29 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#include "Contents/NavigationManager.h"
|
||||
#include "Client/Session.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
#include "Utility/Text/FormatString.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
|
|
@ -404,6 +405,27 @@ NaviCell CNavigationManager::ParseCell(const char* text) {
|
|||
return cell;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B93BA0
|
||||
// FUNCTION: fn_19565
|
||||
NavigationTarget CNavigationManager::ReadTarget(const char* data, int size) {
|
||||
NavigationTarget target;
|
||||
target.type = *reinterpret_cast<const int*>(data);
|
||||
std::vector<char> buffer(size - 3, '\0');
|
||||
if (target.type == 1 || target.type == 0) {
|
||||
std::memcpy(buffer.data(), data + 4, size - 4);
|
||||
target.object = this->FindObject(buffer.data());
|
||||
if (target.object == nullptr) {
|
||||
return NavigationTarget(0, nullptr);
|
||||
}
|
||||
} else {
|
||||
target.object = this->ReadTargetObject(data + 4);
|
||||
}
|
||||
|
||||
return target;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B94170
|
||||
|
||||
// OFFSET: 0x00B94890
|
||||
// FUNCTION: fn_19568
|
||||
std::vector<char> CNavigationManager::WriteTarget(NavigationTarget target) {
|
||||
|
|
@ -556,6 +578,8 @@ void CNavigationManager::ClearNodes() {
|
|||
this->nodes.clear();
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B95B00
|
||||
|
||||
// OFFSET: 0x00B95DC0
|
||||
// FUNCTION: fn_19579
|
||||
int CNavigationManager::FindNodePath(unsigned int index) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue