Port OsNetPump (TCPNET::Pump inlined), TCPNET::LogWrite and the
OsNetAddr helpers. The TCPNET connection layer is dead in 12340;
IoPump stays declared only. Os links ws2_32.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port the relocation-neutral PE image hash behind IOsVersionChecksum and
the async WinINet downloader. Os links wininet; storm.h gains the
scalar new/delete(size, file, line).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port the 21-function Os file API (OsCreateFile, OsReadFile, OsFileList,
...). OsCreateDirectory and OsSetCurrentDirectory move here from Path.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port OsGuiProcessMessage and the COsDialog/COsControl methods it
reaches, with 0.5.3 PDB names and layouts. Drop the GxTest stub.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port W32/OsIME.cpp (11 functions) and OsClipboard (5 functions).
Os links imm32 on Windows.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
CGxDevice/CGxDeviceD3d::ICursorDraw, GxUpdateAlphaRef, CGxShader::Valid,
D3D BufLock/BufUnlock/BufData with IBufLock/IBufUnlock and CreatePoolAPI,
EmergencyMem::Lock/Unlock. GxTest defaults to its exe folder for data and
now runs the clear/present loop on both architectures.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ITexWHDStartEnd, ITexCreate, ITexUpload, ITexMarkAsUpdated, TexDestroy,
Blit dispatcher with InitBlit and the plain converters,
CImVector::InterpColor. GxTest opens the game archives and now reaches
the first ScenePresent.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
OsTimeManager ctor/Calibrate, create/destroy, OsTimeStartup/Shutdown,
async clock getters, OsGetNumberOfProcessors. GxTest creates the D3D
device and runs a clear/present loop; stops at the unported texture path.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
OsInputGet event pump, OsQueueGet, input init/destroy, mouse speed/mode/
position, key and mouse-button state, OsGetDefaultWindowRect,
OsGuiSetWindowTitle/SetGxWindow/MessageBox. Name the 0x313/0x403 messages
in OsWindowProc.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
OsWindowProc 0x86A210 with its helpers (queue, key/button conversion,
capture, self-drawn caption drag/resize, code-page tables), OsGuiGetWindow
and OsGuiIsModifierKeyDown. GxWindowProc is cdecl, not stdcall.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The D3D window procedure: device pointer in GWLP_USERDATA, size/
activate/focus/display-change/destroy to DeviceWM, paint, hardware
cursor, screensaver/monitor-power suppression, WM_SIZING clamps, and
forwarding to m_windowProc. Fixes DeviceWM's resize-type compare
(translated 1/2, not SIZE_MAXHIDE).
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
IRsSendToHw, DsSet with the 182-entry EDeviceState cache, stage setters
(texture, color/alpha op, tex coord/gen), material, IStateSync and its
light/material/xform/enable/clip/scissor/vertex-pointer syncs, vertex
declaration cache, shader binding and constant flush. File contents of
CGxD3dDevice.cpp and CGxDeviceD3d.cpp swapped (factory vs members).
CGxApiLight flags are 16-bit; s_shadowConstants and
s_pointScaleAttenuation (C3Vector) become CGxDevice class statics.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Gx/CGxDeviceD3d becomes a Windows-only directory with real D3D types and
one set of sources for x86 and x64 (rule 7 exception). The class moves
into CGxDeviceD3d.h with all 59 overridden slots declared. Ports the
constructor (0x68FD50), CreateCGxDeviceD3d, d3d9.dll load/unload, VB/IB
and pool virtuals, queries, shader create/destroy, hardware cursor,
gamma, window size/focus, stereo accessors and DeviceEvictResources.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Both base virtuals were declared since the vtable pass but never got a
body; their dependencies (Log, the GxPrimLock wrappers) were already
ported.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The flags literal 0 is an int, which made new (0, __FILE__, __LINE__)
resolve to the CRT debug operator new(size_t, int, const char*, int)
instead of the Blizzard operator new(size_t, uint32_t, const char*,
int32_t). Pass 0u.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port BufCreate, PoolCreate/PoolDestroy, DeviceCreatePools,
DeviceCreateStreamBufs, IShaderLoad, ShaderCreate, ShaderDestroy,
CGxShader::Load/dtor, CGxPool dtor, CGxDevice ctor/dtor and
OsGetProcessorFeatures. CGxBuf gets its own header/source.
CGxPool/CGxBuf/CGxAppRenderState/CGxPushedRenderState become structs
(RTTI .?AU). HASHKEY_STRI derives from HASHKEY_STR. m_shaderList is
TSHashTable<CGxShader, HASHKEY_STRI>[6]; list offsets via offsetof.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
- Field names from the 12340 type library (x/y/z/w, a0..d3, minY/minX/maxY/maxX, b/t, c/r, n/d, origin/dir)
- Files renamed to match their class; CRay -> C3Ray; C3Segment, CRect, CiRect, C2iVector, C3iVector split out
- MouseEventData, CharacterInfo, M2Bounds moved out of Tempest headers
- 107 functions: C2/C3/C4Vector, C33/C34/C44Matrix, C4Quaternion, C4Plane, CAaBox, CAaSphere, C3Ray, CRect, CiRect, CImVector, NTempest
- 0x4C1C40 is cdecl (q, out): ported as static C44Matrix::FromQuaternion (guessed)
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
SFileOpenFileEx (4 args), SFileReadFile, SFileLoadFile, SFileGetFileSize,
SFileCloseFile, SFileGetArchiveName, ReadAdditionalAttributes with the
block CRC/filetime/MD5 setters, FillNewHashTable with ListfileParser,
IncreaseHashBits, Streaming::MakePartFileName, Storage::BuildVariantFileName.
MPQHEADER packed to 4 (was 48 bytes, shifting ARCHIVEREC by 8).
blast included as extern "C"; BlizzardCore links blast and zlib.
Tools/MpqTest: console test that opens an MPQ and loads a file.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
ThirdParty/lzma (LzmaDecode.c/.h, LzmaTypes.h, unmodified) as target
lzma, linked by BlizzardCore. Blizzard's LzmaMemDecode wrapper
(0x463FD0) ported in Mopaq/SComp.cpp. THIRD_PARTY.md lists it.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
System_SComp::Decompress and DecompressBlock, zlib (scratch-arena
allocators, inflate), PKWARE via blast, Storm's bzip2, LZMA wrapper
(alloc_wrap/free_wrap; LzmaMemDecode declared, decoder not yet linked),
RLE-zero, TempBuffer::Resize, LocalObject<ZlibAllocBuffer>.
LocalObject<T>::New is new T again; SFile flag is RawReadInfo.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
System_MPQEncrypt::Hash with its crypt/char tables, Blizzard::Util
hashlittle2/Hash32I, System_SFile BitPacked/HashEntryTable/
BlockEntryTable/BLOCKENTRY, System_MPQGlobals via
Blizzard::Lock::ConstructOnce, Blizzard::Process::Sleep.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
IOAlignUnit (12340's cache_read/cache_write are its Read/Write): MRU
block cache with GetCachedBlock/CleanCache/CleanCacheEntry, direct
whole-block transfers, sorted write-back, SetFileSize truncation.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
IOUnit base (pass-through slots), IORangeUnit, IOLockUnit (ScopedMutex
per slot), IOFileUnit on Blizzard::File with the native
CreateFileA read path (Win32/Win64), IOUnbufferedFileUnit (sector
aligned bounce buffer), IOUnitContainer bump allocator.
System_SFile::s_retryNativeRead; LocalObject<T>::New zero-initializes
(new T()) as in 12340. Streaming::CheckFileRange declared only.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
.gitignore ignored every Win32/ folder (Visual Studio build output
pattern), so files created in the new source Win32/ folders were left
out of the platform-folder commit while the code they took was removed
from the generic files. Source Win32/ folders are now un-ignored.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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]>
PassThrough, stream_read, the (unused) throttle layer, and
RemoveDirectoryAndContents with its callback and state. Streaming::
IsStreamedFile declared only. Statics moved to the top of File.cpp,
SErr.cpp and SComp.cpp (SComp compress helpers declared in SComp.h).
CODING_RULES: statics at the top, file-local static helpers below them.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
All 28 Win32 verbs of s_basestack in Filestack_Win32.cpp, overlapped vs
locked positioned I/O, attribute/flag conversion, LoadFile, SetLastError,
Unicode::ConvertUTF8to16 and the ToNative path converter, two debug
print helpers. FileInfo::m_regularFile is a bool.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Blizzard::File API (Open/Close/Read/Write/Exists/GetFileInfo/...),
the stacked filesystem core (file_init, HoistAll, Shutdown, static
stacks, null verbs), the thread-local error stack via LocalObject<T>.
FileFunc and ProcessDirCallback are cdecl in 12340.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
GetProcessPath/GetProcessDirectory, FromNativeName, Unicode::ConvertUTF16to8,
CPUID-based processor features with run-once init, and the TempBuffer<T,N>
stack/heap buffer (dtor 0x42ED70). AddErrorToStack now uses TempBuffer.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Port the ErrorStack functions, SetAssertHandler/CanonicalStr and the
two Blizzard::Memory::Free overloads (Mac 4.0.1 names). DefaultCallback
is declared only, pending File/Process. All ported functions verified
against the binary.
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>