System/Log (16 functions) and Thread::WaitForever. Storm SComp review: ImaAdpcmCompress size compares are signed as in 12340. AllocSTL_raw and CCritSect members marked INLINED; SSyncObject ctor out of the header. Platform layout: Windows API code lives in <dir>/Win32/ (whole file in #if WOWDECOMP_ARCH_32) with full copies in <dir>/Win64/ (ARCH_64); no _M_X64 blocks inside files. Former W32/ and *_Win32.cpp files moved, their headers are generic now. Win32 API calls moved out of generic File/Log/Thread/Unicode/SCmd files; Storm SErr/SLog/SReg/SMsg moved whole. CODING_RULES section 7, PORTING_64BIT "Platform folders". Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
#include <cstdint>
|
|
#include "Engine/Source/Base/Prop.h"
|
|
#include "Engine/Source/Os/Tls.h"
|
|
#include "Engine/Source/Storm/H/storm.h"
|
|
|
|
// STATIC: 0x00B41668
|
|
static uint32_t s_tlsIndex;
|
|
|
|
// VERIFY: b6429b9b auto
|
|
// OFFSET: 0x0047CBC0
|
|
void PropInitialize() {
|
|
s_tlsIndex = OsTlsAlloc();
|
|
OsTlsSetValue(s_tlsIndex, nullptr);
|
|
}
|
|
|
|
// VERIFY: 0c6ddc99 auto
|
|
// OFFSET: 0x0047CBE0
|
|
void PropDestroy() {
|
|
OsTlsFree(s_tlsIndex);
|
|
}
|
|
|
|
// VERIFY: c381afef auto
|
|
// OFFSET: 0x0047CBF0
|
|
void PropSelectContext(HPROPCONTEXT context) {
|
|
OsTlsSetValue(s_tlsIndex, context);
|
|
}
|
|
|
|
// VERIFY: 2ccb0493 auto
|
|
// OFFSET: 0x0047CC10
|
|
HPROPCONTEXT PropGetSelectedContext() {
|
|
return static_cast<HPROPCONTEXT>(OsTlsGetValue(s_tlsIndex));
|
|
}
|
|
|
|
// VERIFY: 503ebd21 auto
|
|
// OFFSET: 0x0047CC20
|
|
void* PropGet(PROPERTY id) {
|
|
void** context = static_cast<void**>(OsTlsGetValue(s_tlsIndex));
|
|
return context ? context[id] : nullptr;
|
|
}
|
|
|
|
// VERIFY: 07673705 auto
|
|
// OFFSET: 0x0047CC50
|
|
void PropSet(PROPERTY id, void* value) {
|
|
void** context = static_cast<void**>(OsTlsGetValue(s_tlsIndex));
|
|
|
|
if (context) {
|
|
context[id] = value;
|
|
}
|
|
}
|
|
|
|
// VERIFY: d39268e3 manual
|
|
// OFFSET: 0x0047CC70
|
|
HPROPCONTEXT PropCreateContext() {
|
|
return static_cast<HPROPCONTEXT>(SMemAlloc(PROPERTIES * sizeof(void*), __FILE__, __LINE__, SMEM_FLAG_ZEROMEMORY));
|
|
}
|