Decompile 2 functions in Source/Resource/ResourceMgr.cpp, Source/Resource/ResourceMgr.h
Batch #1385 by Yommy: 0 byte-identical, 2 confirmed by peer review. - fn_18209 ResourceMgr::Instance: logic confirmed by peer review - fn_18189 ResourceMgr::UnloadAll: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
9176a8bc81
commit
cdc3c895f1
2 changed files with 30 additions and 2 deletions
|
|
@ -20,10 +20,18 @@ bool ResourceNameLess::operator()(const ResourceName* left, const ResourceName*
|
|||
}
|
||||
|
||||
// INLINED
|
||||
ResourceMgr::ResourceMgr(ResourceFailures& failures) : m_failures(&failures) {
|
||||
ResourceMgr::ResourceMgr() : unknown_004C{} {
|
||||
InitializeCriticalSection(&this->m_lock);
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AF1620
|
||||
// FUNCTION: fn_18209
|
||||
ResourceMgr& ResourceMgr::Instance() {
|
||||
// GLOBAL: gl_24488
|
||||
static ResourceMgr g_resourceMgr;
|
||||
return g_resourceMgr;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AEE070
|
||||
// FUNCTION: fn_18169
|
||||
ResourceMgr::~ResourceMgr() {
|
||||
|
|
@ -186,6 +194,22 @@ void ResourceMgr::EraseTransient(CRes* resource) {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AF0680
|
||||
// FUNCTION: fn_18189
|
||||
void ResourceMgr::UnloadAll() {
|
||||
this->m_transient.clear();
|
||||
|
||||
for (std::size_t type = 0; type < this->m_resources.size(); ++type) {
|
||||
auto& resources = this->m_resources[type];
|
||||
for (auto entry = resources.begin(); entry != resources.end(); ++entry) {
|
||||
entry->second->Unload();
|
||||
delete entry->second;
|
||||
}
|
||||
|
||||
resources.clear();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00AF0A10
|
||||
// FUNCTION: fn_18192
|
||||
void ResourceMgr::ClearUnused(const char* extension) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue