Reconstruct readable C++ and organize cohesive source subsystems

Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.

Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
ragnarok-clanker 2026-10-25 07:42:41 +00:00
commit a47d20f8be
890 changed files with 11796 additions and 16664 deletions

View file

@ -13,9 +13,11 @@ std::string MakeResourcePath(std::string filename) {
}
std::size_t duplicate;
while ((duplicate = path.find("//")) != std::string::npos) {
path.replace(duplicate, 2, "/", 1);
}
return path;
}
@ -29,8 +31,7 @@ bool ResourceExists(const char* filename, int looseOnly) {
// OFFSET: 0x00AE9EE0
// FUNCTION: fn_18113
void* ReadLooseResource(const char* filename, std::uint32_t* size) {
HANDLE file =
CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
HANDLE file = CreateFileA(filename, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr);
if (file == INVALID_HANDLE_VALUE) {
return nullptr;
}
@ -50,6 +51,5 @@ void* ReadLooseResource(const char* filename, std::uint32_t* size) {
ReadFile(file, data, *size, &read, nullptr);
CloseHandle(file);
// The original's non-.ebm post-read hook is an established empty routine.
return data;
}