Decompile 2 functions in Source/Contents/ActorNameRequests.cpp, Source/Contents/ActorNameCard.h, ...
Batch #1864 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_03504 CActorNameCardHolder::ProcessRequests: logic confirmed by peer review - fn_03419 CCommonObject::LoadCsv: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
9953d967a3
commit
5c0eb3d28b
4 changed files with 83 additions and 0 deletions
|
|
@ -4855,6 +4855,35 @@ bool CCommonObject::LoadCsv(const char* name, std::vector<std::string> (*transfo
|
|||
return true;
|
||||
}
|
||||
|
||||
// OFFSET: 0x005B7FE0
|
||||
// FUNCTION: fn_03419
|
||||
bool CCommonObject::LoadCsv(const char* name, std::function<std::vector<std::string>(std::vector<std::string>&)> transform,
|
||||
std::function<void(std::vector<const char*>&, std::any)> insert, std::any context) {
|
||||
CFile file;
|
||||
if (!this->OpenCsv(name, file)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
while (!file.IsEOF()) {
|
||||
std::vector<std::string> row = this->ReadCsvRow(file, ',');
|
||||
if (transform) {
|
||||
row = transform(row);
|
||||
}
|
||||
|
||||
if (insert) {
|
||||
std::vector<const char*> fields;
|
||||
fields.reserve(row.size());
|
||||
for (const std::string& field : row) {
|
||||
fields.push_back(field.c_str());
|
||||
}
|
||||
insert(fields, context);
|
||||
}
|
||||
}
|
||||
|
||||
file.Close();
|
||||
return true;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00B00360
|
||||
// FUNCTION: fn_18368
|
||||
int FillMessageBuckets(int* first, std::uintptr_t last, int* value) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue