Decompile fn_18183 (CRes::AddRef)

Batch #125 by ragnarok-clanker: 1 byte-identical, 0 confirmed by peer review.

- fn_18183 CRes::AddRef: byte-identical

Merged automatically: every function is byte-identical to the original.
This commit is contained in:
ragnarok-clanker 2026-10-24 18:10:11 +00:00
commit 9822c2fdf5
2 changed files with 9 additions and 4 deletions

View file

@ -9,8 +9,8 @@
// OFFSET: 0x00AECDE0 // OFFSET: 0x00AECDE0
// FUNCTION: fn_18144 // FUNCTION: fn_18144
ResourceName::ResourceName() { ResourceName::ResourceName(const char* name) {
this->Assign(""); this->Assign(name);
} }
void ResourceName::Assign(const char* name) { void ResourceName::Assign(const char* name) {
myGPack::AssignNameKey(this->hash, this->text, name); myGPack::AssignNameKey(this->hash, this->text, name);
@ -21,7 +21,6 @@ void ResourceName::Assign(const char* name) {
CRes::CRes() : references(0) { CRes::CRes() : references(0) {
} }
// OFFSET: 0x007498B0 // OFFSET: 0x007498B0
// FUNCTION: fn_07851
CRes::~CRes() = default; CRes::~CRes() = default;
// OFFSET: 0x00745260 // OFFSET: 0x00745260
// FUNCTION: fn_07756 // FUNCTION: fn_07756
@ -48,6 +47,11 @@ void CRes::MissingFile(CRenderSystemBase* system, const char* name) {
std::sprintf(text, "ResourceError : Can't find file %s\n", name); std::sprintf(text, "ResourceError : Can't find file %s\n", name);
ShowErrorDialog(system, text, 0); ShowErrorDialog(system, text, 0);
} }
// FUNCTION: fn_18183
std::uint32_t CRes::AddRef() {
return ++this->references;
}
// OFFSET: 0x00AF0BE0 // OFFSET: 0x00AF0BE0
// FUNCTION: fn_18194 // FUNCTION: fn_18194
void CRes::Release() { void CRes::Release() {

View file

@ -12,7 +12,7 @@ class CRenderSystemBase;
struct ResourceName { struct ResourceName {
std::uint32_t hash; std::uint32_t hash;
char text[252]; char text[252];
ResourceName(); explicit ResourceName(const char* name = "");
void Assign(const char* name); void Assign(const char* name);
}; };
static_assert(sizeof(ResourceName) == 256); static_assert(sizeof(ResourceName) == 256);
@ -30,6 +30,7 @@ public:
virtual bool Load(const char* name) = 0; virtual bool Load(const char* name) = 0;
virtual void Unload(); virtual void Unload();
virtual void MissingFile(CRenderSystemBase* system, const char* name); virtual void MissingFile(CRenderSystemBase* system, const char* name);
std::uint32_t AddRef();
void Release(); void Release();
/* 0004 */ std::uint32_t references; /* 0004 */ std::uint32_t references;