Files
wowdecomp/Engine/Source/Base/Handle.cpp
T
SatyandClaude Opus 5.5 f047b71145 Gx pass 3: Gx* wrappers, small CGxDevice members, portable Storm error constants
- Gx wrappers: GxXform*, GxBuf*, GxDraw, GxDrawLockedElements, GxSceneClear, GxTexDestroy/Copy/Reusable,
  GxQueryCreate/Destroy, max FPS, GxGetBlitFormat, GxHasContext, GxIsWindowVisible, GxMasterEnable
- CGxDevice: DeviceApi, CapsHasContext, CapsIsWindowVisible, MasterEnable, DeviceClearScreenShot, XformPush
- CGxTexParms, EGxXform, BlitFormat
- STORM_ERROR_SUCCESS/NOT_ENOUGH_MEMORY/INVALID_PARAMETER replace Win32 ERROR_* in general files;
  windows.h removed from them

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 22:45:13 +02:00

61 lines
1.1 KiB
C++

#include <cstdint>
#include "Engine/Source/Base/Handle.h"
#include "Engine/Source/Storm/H/storm.h"
// INLINED
CHandleObject::CHandleObject() {
this->m_refcount = 0;
}
// INLINED
CHandleObject::~CHandleObject() {
}
// INLINED
const char* CHandleObject::GetObjectName() {
return nullptr;
}
// VERIFY: 436d38d9 manual
// OFFSET: 0x0047BF30
void HandleClose(HOBJECT handle) {
CHandleObject* object = HandleDereference(handle);
if (object->m_refcount-- == 1) {
delete object;
}
}
// VERIFY: 96ec39c1 auto
// OFFSET: 0x0047BF50
HOBJECT HandleCreate(CHandleObject* ptr, const char* handleName) {
if (!ptr) {
SErrSetLastError(STORM_ERROR_INVALID_PARAMETER);
return nullptr;
}
ptr->m_refcount++;
return reinterpret_cast<HOBJECT>(ptr);
}
// INLINED
CHandleObject* HandleDereference(HOBJECT handle) {
return reinterpret_cast<CHandleObject*>(handle);
}
// VERIFY: 1d1aba75 manual
// OFFSET: 0x0047BF70
HOBJECT HandleDuplicate(HOBJECT handle) {
if (handle) {
HandleDereference(handle)->m_refcount++;
}
return handle;
}
void HandleDestroy() {
}
void HandleInitialize() {
}