Commit Graph
37 Commits
Author SHA1 Message Date
SatyandClaude Opus 5.5 d7aa20b79f Mopaq pass 3a/3b: file lookup and SFileOpenFileEx unit chain
3a: GetFileBlockEntry, FindFileInOneArchive, SearchHashTable,
ARCHIVEREC::GetBlockEntry/BuildBlockKeys, FindBlockEntry,
CheckFileExistsOnDisk, SFileFileExists, Digest<16> operators.
BLOCKENTRY m_fileTime/m_crc order fixed.

3b: IOMpqUnit family (archive/read-only/disk), IOChecksumUnit with
CRC and MD5 units, IOMpqReadUnit sector reader with worker pool,
Blizzard::Util::MD5, HashMap, signature table, IORangeUnit/IOAlignUnit
factories, ARCHIVEREC::SetMD5Check/SetBlockEntry, SFileOpenFileEx.
Folded-slot docs added.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 19:10:16 +02:00
SatyandClaude Opus 5.5 e8e62b2a47 Add LZMA SDK 4.57 decoder; port LzmaMemDecode
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]>
2026-09-24 18:29:53 +02:00
SatyandClaude Opus 5.5 d9105f017e BlizzardCore Mopaq pass 2c: SComp decompression
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]>
2026-09-24 18:20:10 +02:00
SatyandClaude Opus 5.5 e551dcd098 BlizzardCore Mopaq pass 2b: InitializeTables, new block table
ARCHIVEREC::InitializeTables (hash/block table read, decrypt,
decompress, 16->49 byte block expansion, hi-block table),
System_MPQEncrypt::Decrypt, ArchivePtr, InitEmptyTables,
BlockEntryTable ctor/SetLayout/PackEntry/GetMaxima/AddFlags,
BuildBlockTable, PackBlockTable, ConvertToNewHashTableFormat,
HeapArray<T>, Blizzard::Util::Digest<16>, Streaming ready/trial
flags. BLOCKENTRY::m_offset is signed. Memory::Allocate has its
offset. SComp::Decompress, ReadAdditionalAttributes and
FillNewHashTable declared only.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 18:07:55 +02:00
SatyandClaude Opus 5.5 26321d1529 BlizzardCore Mopaq pass 2a: archive open/close
ARCHIVEREC layout, NewZerofill<T>, SFileOpenArchive (path and IOUnit),
s_OpenArchive header scan, OpenDirectPathAsArchive,
ConvertRelativePathName, GetArchivePtr, RemoveInternalArchiveRef,
SFileCloseArchive, SFileSetBasePath, SFileEnableDirectAccess,
SFileGetLastError, IOUnit::Release, System_Mopaq::OpenDiskFile.
0x431800 is ~HashEntryTable. InitializeTables declared only (pass 2b).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 17:48:58 +02:00
SatyandClaude Opus 5.5 8b29a15809 BlizzardCore Mopaq pass 1: hashes, bit-packed tables, globals
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]>
2026-09-24 17:33:56 +02:00
SatyandClaude Opus 5.5 bc2329bc70 BlizzardCore iounit pass 2: IOAlignUnit block cache
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]>
2026-09-24 17:06:05 +02:00
SatyandClaude Opus 5.5 3706b1aa94 BlizzardCore iounit pass 1: IOUnit chain, file/range/lock units
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]>
2026-09-24 16:53:08 +02:00
SatyandClaude Opus 5.5 299af1e188 Add the Win32 platform files missing from 8035c4b
.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]>
2026-09-24 16:52:37 +02:00
SatyandClaude Opus 5.5 953240f57c BlizzardCore Log, SComp review, Win32/Win64 platform folders
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]>
2026-09-24 16:16:55 +02:00
SatyandClaude Opus 5.5 59473357fa BlizzardCore: System/File pass 3; statics at top of file
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]>
2026-09-24 15:19:19 +02:00
SatyandClaude Opus 5.5 14776aefad BlizzardCore: System/File pass 2 (Win32 natives)
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]>
2026-09-24 15:03:44 +02:00
SatyandClaude Opus 5.5 e074187e5d BlizzardCore: System/File pass 1 (API, stack core, error stack)
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]>
2026-09-24 07:57:30 +02:00
SatyandClaude Opus 5.5 4c69191df1 BlizzardCore: port System/Thread pools, RMutex, EventObject
ThreadWorker (ctor/dtor/Executive/Start), ThreadPoolRecord (ctor/dtor/
GetWorker), CreateFromPool, CreateDetachedFromPool, CreateDefaultPool,
ShutdownThreadSystem; RMutex and EventObject lock members.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 07:31:02 +02:00
SatyandClaude Opus 5.5 4430938b95 BlizzardCore: port Process, Hardware CPU features, Unicode, TempBuffer
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]>
2026-09-24 07:16:44 +02:00
SatyandClaude Opus 5.5 0754d671a1 BlizzardCore: port System/Thread core (TLS, registry, create/close)
TLS slots, thread registry (std::set + AllocSTL_raw), NewThread/Create/
ThreadStarter/Close, external TLS destructors, priority get/set, and the
ScopedMutex guard (dtor 0x42B3A0). Pools deferred (need CPU features).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 07:01:45 +02:00
SatyandClaude Opus 5.5 3fd7e80f6c BlizzardCore: System/Debug error stack and assert handler, Memory::Free
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]>
2026-09-24 06:34:15 +02:00
SatyandClaude Opus 5.5 5f0cce8ada BlizzardCore: System/Time and System/Lock (Win32)
Port the Win32 time base (QPC calibration, timestamps, FILETIME
conversion) and the atomic, mutex and event wrappers. All functions
verified against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 06:21:04 +02:00
SatyandClaude Opus 5.5 31652c1a03 BlizzardCore: System/String (String, Path); declarations in headers
Port the Blizzard::String and path helpers (Mac 4.0.1 names, internal
System_String helpers), move the Using hash table and statics into
Using.h, and record the declarations-in-headers rule. All functions
verified against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 06:09:38 +02:00
SatyandClaude Opus 5.5 b0c1183d75 BlizzardCore: System/Using and Blizzard::String::Copy
Port the Using init/shutdown registry (Mac 4.0.1 names) and the
String::Copy it depends on. All functions verified against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 05:58:31 +02:00
SatyandClaude Opus 5.5 a8e251eb85 Base: Base, CmdLine, ConvertUTF, Coordinate, Sort
Port the remaining Base block A pieces: global/context init, the
command-line option table, UTF-8/16 conversion (sgetu8/sputu8), the
coordinate/aspect helpers and the context qsort. All functions verified
against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 05:46:00 +02:00
SatyandClaude Opus 5.5 9ae1f95463 Storm: client operator new, delete, delete[] at their 12340 addresses
Add operator new and give operator delete/delete[] the binary's null
check. All three verified against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 05:26:27 +02:00
SatyandClaude Opus 5.5 195c975476 Base: CDataStore
Port CDataStore (0.5.3 layout and names, 11-slot 12340 vtable) into
Engine/Source/Base, remove its declaration from UIUtil/AddOns.h, and
document the three folded vtable stubs. All functions verified against
the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 05:20:21 +02:00
SatyandClaude Opus 5.5 9c87d11233 Base: CDynamicString
Port CDynamicString (Mac 4.0.1 names; Grow and field names are best
guesses) and allow best-guess names in CODING_RULES.md. All functions
verified against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 05:01:59 +02:00
SatyandClaude Opus 5.5 04a7d5136a Base: CDataRecycler, RefCount.cpp; move header function bodies to .cpp
Port CDataRecycler following the 12340 binary (Link takes two arguments).
Move every non-template function body out of the Base headers into their
.cpp files, give TRefCnt its own RefCount.cpp, and record the rule in
CODING_RULES.md.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 04:46:38 +02:00
SatyandClaude Opus 5.5 fc73a3920f Base: CDataAllocator
Port the fixed-size block allocator (0.5.3 layout, Mac 3-argument Clear,
destructor as inlined Clear). All functions verified against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 04:29:34 +02:00
SatyandClaude Opus 5.5 147177c448 Base: CBitArray; Storm: operator delete[]
Port CBitArray (Mac 4.0.1 names and field names from asserts) and add the
client operator delete[] that 12340 inlines everywhere.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 04:23:35 +02:00
SatyandClaude Opus 5.5 8f14dd9d01 Base: RCString, CStringMemory, CStringManager, TRefCnt
Port the 12340 string interning table (Mac 4.0.1 design) and TRefCnt in
RefCount.h. All functions verified against the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 04:17:30 +02:00
SatyandClaude Opus 5.5 56b7966778 Restructure BlizzardCore to the original tree
Drop the inner BlizzardCore/ level, replace namespace-named files with
the real file names (Packages/Mopaq, Streaming, iounit, System/*), move
SFile::CreateOverlapped/DestroyOverlapped into Mopaq/SFile.cpp, and
exempt source folders from the Visual Studio .gitignore rules.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 03:49:44 +02:00
SatyandClaude Opus 5.5 cccfd26213 Move Storm to Engine/Source/Storm; SFile.cpp to BlizzardCore
Storm moves under Engine/Source with its inner layout unchanged. All
includes use Engine/Source/Storm/..., Storm's include guards follow the
new path, and the top-level CMakeLists adds Engine/Source/Storm.
SFile.cpp (SFile::CreateOverlapped/DestroyOverlapped) moves to
Engine/Source/BlizzardCore.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 03:33:51 +02:00
SatyandClaude Opus 5.5 2e5f2331a5 Implement Engine/Source/Base FileCache
BaseFileDestroy; PrefetchNode/UncachableNode (constructor and destructor
inline); statics s_activeFiles, s_uncachableFiles, s_critSect. Empty
BaseFileInitialize, IBaseFileWaitForLoad, SFile::CreateOverlapped and
SFile::DestroyOverlapped (folded, docs/0x005EEB70.md, docs/0x00632050.md).
SOVERLAPPED in SFile2-Core.h.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 03:33:50 +02:00
SatyandClaude Opus 5.5 37591d61e2 Implement Engine/Source/Base Handle
HandleClose, HandleCreate, HandleDuplicate; HandleDereference inline;
empty HandleInitialize/HandleDestroy (folded). CHandleObject in
Base/Handle.h with its real layout (vtable, m_refcount at +4), which moves
TEXTBLOCK::m_string and FONTHASHOBJ's fields by 4. HOBJECT in Base/Types.h.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 03:14:22 +02:00
SatyandClaude Opus 5.5 f282eed856 Implement Engine/Source/Base Prop and Os/W32/Tls
Prop: PropInitialize, PropDestroy, PropSelectContext,
PropGetSelectedContext, PropGet, PropSet, PropCreateContext, s_tlsIndex.
Tls: OsTlsAlloc, OsTlsFree, OsTlsGetValue, OsTlsSetValue. PROPERTY enum
and HPROPCONTEXT in Base/Types.h (moved from Event/EvtContext.h).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 03:03:19 +02:00
SatyandClaude Opus 5.5 a19a5df43e Implement Engine/Source/Base Status
CStatus with its 12340 layout (vtable, entry list, highest severity):
GetGlobalStatusObj, Add (both), IsEmpty, GetErrorStr, GetErrorStrLen,
GetErrorStrAlloc, Prepend, ~CStatus; STATUSENTRY destructor and Clear
inline in Status.h. CTexture drops the gap that was the rest of CStatus.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 02:56:37 +02:00
SatyandClaude Opus 5.5 f61ee9376a Implement Storm main, StormRtl, SOption and SServer
Storm.cpp: StormAtExit, StormInitialize, StormDestroy, StormExit,
StormExitProcess. StormRtl.cpp: StormRtlDestroy, StormRtlInitialize.
SOption.cpp: StormSetOption with STORM_OPTION_* ids. W32/SServer.cpp:
SServerInitialize, SServerDestroy. Folded empty SStrDestroy,
SMemInitialize, SMemDestroy (docs/0x005EEB70.md, docs/0x008C8DE0.md).
SErr/SMem exit through StormExitProcess instead of the CRT _Exit.
SFile::Initialize/Destroy declared in SFile2-Core.h.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 02:41:25 +02:00
SatyandClaude Opus 5.5 ae952861ad Implement Storm classes
Storm template library (TSLink, TSList, TSExplicitList, arrays, TSHashTable,
hash keys) and W32 sync classes (SCritSect, SSyncObject, SEvent, SMutex,
SSemaphore, SThread::SetPriority), written from the binary. Adds storm.h
with the Storm API the templates call. Generated headers updated for the
new homes and the array element types recovered from the binary.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-23 18:54:56 +02:00
Saty 5137298335 Initial commit 2026-09-23 18:24:00 +02:00