33 Commits
Author SHA1 Message Date
SatyandClaude Opus 5.5 27de58d41e Dissolve _Triage into the source tree
- move triage code to the folders of its binary neighbours (AreaList,
  movement packet types, CClientObjCreate, CWOWClientStatus, SHA1,
  Clamp, EmergencyMem, MippedImg, WowMouse, ...)
- merge HMAC template, OnGxRestartClearWorld and TIMESTAMPSTRUCT into
  their natural headers
- delete superseded duplicates and unk-only placeholders
- tools: drop Triage library, fix Streaming stub signatures, remove
  stubs now provided by BlizzardCore, MapViewer s_liquidTypeId

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-03 18:09:53 +02:00
SatyandClaude Opus 5.5 312ab9ac65 Port batch 1 missing functions and add missing luaL_error returns found by semdiff
Batch 1: weather templates, client console commands, loading screen paths,
glue script events, AddOns/AccountData/Battlenet getters, simple camera and
camera vehicle offsets, Warden module path, BLL loader, FFX effects, Grunt
and GruntLogin matrix/file handlers, CGlueMgr char customize/faction change/
kick reason.

semdiff: 251 Lua script functions called luaL_error without the return 0 that
12340 has after every call site (each confirmed per call site in the binary).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-03 05:48:17 +02:00
SatyandClaude Opus 5.5 393769ff36 Port single-missing-function modules
LeaveWorld handlers, game object type checks, corpse/dynamic object
virtuals, loot/voice/macro helpers, declined words, ProcessAgreement,
ObjectCreateStaticEx, FFX death/fog-seed/nether-blur passes, software
snow renderer, streaming decal, QuestCache copy, trajectory encoder and
deleting destructor tags. Fixes the missing CMapStaticEntity destructor
model release.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 14:39:43 +02:00
SatyandClaude Opus 5.5 74f50d713b M2Shared: allocate x64 .anim and vertex overflow buffers near m_data
M2Array stores a signed 32-bit self-relative offset. On x64 a separate
heap block can lie more than 2 GB from m_data, so relocated low-priority
.anim sequence data wrapped and crashed in ProcessEventCallbacks.

Add OsAllocNear/OsFreeNear (Win64): reserve a block within 1.5 GB of an
anchor. x64 now uses it for .anim buffers (load, cancel, destructor) and
for the skin vertex overflow, which again follows the Win32 structure
(m_flags |= 8, freed in ~CM2Shared). Texture combo arrays keep growing
m_data. All new code is under WOWDECOMP_ARCH_64.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 08:35:26 +02:00
SatyandClaude Opus 5.5 095603ff2b Client bring-up: login, realm list, world auth, character select
- Grunt login ported end to end (SRP6 challenge/proof, version checksum,
  realm list) and tested against a live server: authenticates, connects to
  the world server (auth session with proof-of-work, header crypt), receives
  the character list and shows character select
- Glue: realm list UI, character select (list, models, scripts), character
  create screen + name generator, delete/rename/decline, Enter World up to
  the loading screen; loading screen drawing and progress
- AccountData (times, update, upload/download), BannedAddOns, addon scan and
  addon info, client cache version, tutorial flags
- Shutdown path at login state: world/map/liquid/weather teardown, NetClient,
  ComSat, streaming stop; Logitech LCD no-device path in Ui/UILCD/Windows
- PCRE 5.0 vendored (core stock; chartables and the posix layer from 12340),
  ValidateName
- Fixes: TSGrowableArray::CalcChunkSize clamps to >= 8 (crash on char list),
  CWorldScene liquid renderer allocation, CMapFootprintTexture element ctor,
  pointer render states on x64, CFrustum/CWFrustum layout, M2 draw callback
  arguments, 37 class/struct forward-declaration mismatches
- IDB name sync (1217 names), verify aliases, harness large-element
  instantiation

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-28 02:39:56 +02:00
SatyandClaude Opus 5.5 2e418f9e08 Client bring-up: glue screen, EULA/TOS, shutdown chain, LCD, x64 fixes
- Stand-in client reaches the glue screens (intro movie, EULA/TOS accept,
  login screen) at 16:9; stand-ins are report-only on x64
- Ports on the startup/idle path: GlueScriptEvents/CharacterSelection/
  CharacterCreation/RealmList/AccountMsg/VideoOptions _Scripts, CGlueMgr
  (Initialize/Resume/Idle/Accept*/Shutdown), ClientServices, NetClient/
  WowConnection, DBCache + instances, WorldParam/World/Map/Liquid/Weather/
  shadow, InputControl, Scrn, ConsoleClient, SysMessage, LoadingScreen,
  SystemRegisterFunctions, CGameTime, Screen::GetAspectRatio
- Shutdown chain: BeginCloseGame, DestroyEngineCallback, DBCache save/
  destroy, SpellVisuals/Effect/World/Glue teardown
- Logitech LCD no-device path in Ui/UILCD/Windows (Windows-only dir);
  lgLcd is a stub library in ThirdParty/lgLcd
- CVar and console commands split into <Module>_CVar.cpp / _Console.cpp
- DivxDecoder.dll (Win32, original) and XvidDecoder.dll (x64, port with
  vendored xvidcore) both copied to the build folder
- Warden: Win32 faithful port, Win64 stub
- x64 fixes: lua_newstate gcusage/gctime init, pointer render states reset
  with nullptr, g_rndSeed defined
- 37 class/struct forward-declaration mismatches fixed (false stand-ins)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 21:47:34 +02:00
SatyandClaude Opus 5.5 6ee0c14d69 Verify remaining functions; SI2::ChaosModeUpdate; SE2::StopAllSounds arg
ChaosModeUpdate (0x4C74F0) reordered to the binary's switch case layout
and case 15 written as 8 statements; verified. SE2::StopAllSounds takes
the unused int every 12340 caller pushes. Approval stamps for the
functions unblocked by the IDB splits (Button/Checkbox IsA, Checkbox
dtor, CSimpleFrame::NotifyDelayedLoad, CGxDeviceD3d9Ex ctor,
CM2Cache dtor) and for the re-reviewed IsSequenceLoaded,
OsGuiMessageBox, TexturePickAlternateFilename, three FMOD ctors and
luaG_concaterror.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 15:51:40 +02:00
SatyandClaude Opus 5.5 34770ee7ab Frame: port Engine/Frame (waves 1-4), 1667 of 1669 functions
Core (CSimpleFrame + Lua, CSimpleTop/CFrameStrata/CSimpleRender/
CRenderBatch, CSimpleRegion/CBackdropGenerator/CScriptRegion), animation,
text (FontString/Font/Fontable), texture and model, buttons, EditBox,
MessageFrame/MessageScrollFrame, MovieFrame/ColorSelect/StatusBar,
Slider/ScrollFrame/HTML/HyperlinkedFrame, all Lua method tables and
RegisterScriptMethods. Layouts, vtables and sizes rebuilt from the
12340 ctors, vtables and allocator initializers; CScriptObject vtable
slots 5/6 fixed; CSimpleFontedFrame is a real secondary base. Lua error
paths return after luaL_error as in 12340 (209 sites; 5 fall through).
Binary quirks kept and documented in docs/.

Supporting additions: Event key/char/ime/focus/size event headers,
Scrn/Scrn.h (ScrnLayerCreate), DivxDecoder import declarations,
C2Vector/CRect helpers, CM2Light dtor, OsInputEnableSecureMode, stpl.h
instance addresses, FrameXML LoadXML_AnimGroup/Create_SimpleMovieFrame.
Engine->WoW includes where 12340 calls directly: CSimpleModelFFX,
StringToMouseButton, GetDeclinedWord, EmblemTextureUpdate.

Also drops stale VERIFY stamps found invalid by the harness recheck.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 15:32:18 +02:00
SatyandClaude Opus 5.5 03de438346 Os: OsNet TCP layer, command line, named events, file version info
The OsNet TCP layer (OsTcp.cpp, platform OsTcpConn.h; signed send-length
compares and 32-bit IoPump elapsed time per the binary),
CommandLineUTF8 (0x86BDB0), CreateNamedEventA (0x86B4F0) and
OsFileVersionInfo (0x872170), Win32 and Win64. Os links version.lib. The
test tools drop their IoPump stand-in. Anti-cheat (bot check, Warden
loader) is left out.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 03:04:04 +02:00
SatyandClaude Opus 5.5 720e730823 Engine no longer depends on WoW/Source
- MOUSEBUTTON/MOUSEMODE move to Engine/Source/Event/Types.h (WoW/Source/Console/Types.h
  removed; COLOR_T is in ConsoleBase/Types.h).
- CRange and CBoundingBox move to Tempest (CRange.h, CBoundingBox.h); World.h includes them.
- TEXTURECACHE moves to Gxu/GxuFontMiscClasses.h (its code is in the Gxu font range,
  0x6C8E70+); CACHEENTRY stays in WoW/Common/TextureCache.h.
- CGxDevice.h, CGxFont.h, M2Model.h, Event and Os drop their WoW includes.
Build clean on Win32/x64 (known Wow.exe link gaps only); verify unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 19:20:38 +02:00
SatyandClaude Opus 5.5 d339a940b4 ConsoleBase: port ConsoleVar.cpp and ConsoleCommand.cpp (52 definitions verified)
- CVar (struct per 12340 RTTI; value callback is __cdecl), its console commands,
  CVarArrayWrapper/CVarIntListWrapper; command table, help, parse, complete.
- Engine-side console interface in IConsole.h (ConsoleWrite/Printf/CommandExecute...),
  implemented by WoW's ConsoleClient later (tracked in open_items); COLOR_T/CATEGORY in
  ConsoleBase/Types.h.
- stpl.h: TSList::Prev, TSHashTable::Next/DeleteNode, HASHKEY_CONSTSTRI.
- 27 suspects reviewed against 12340 listings; fixes: read-only message prints the
  cvar name, int-list decode reads bytes unsigned.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 19:20:38 +02:00
SatyandClaude Opus 5.5 8f910aff10 Os: move FrameScript_FindTextSectionBounds/InvalidPtrCheck into System.cpp as OsFindTextSectionBounds/OsValidateFunctionPointer
Both sit between OsGetPhysicalMemory and IOsParseProcessorFrequency; their statics
(0xD415B8/BC) fill the gap in System.cpp's statics.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 17:18:10 +02:00
SatyandClaude Opus 5.5 fbde2def4e Texture T3: CTgaFile, TGA textures, MipBits cache, texture blobs
- Images/tga: packed TGAHeader/TGAFooter, all 23 CTgaFile methods
- TGA path: LoadTgaMips, LoadPredrawnMips, TextureGenerateMips,
  TextureCalcMipCount, UpdateTgaTexture, CreateTgaTexture, FullShrink
- MipBits cache: CMipBitsCache, TextureAllocMippedImg, TextureFreeMippedImg x2
- CTextureBlob module, UpdateBlobTexture, TextureCreateBlob, Load/UnloadBlob
- SFile::FileExistsEx, Os file constants, C4Pixel moved to BLPFile/Types.h
- GxTest --tga/--blob, BlpTest list

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 21:34:16 +02:00
SatyandClaude Opus 5.5 250c8817ee Os O6: W32 joystick (DirectInput 8)
Port the OsJoystick API, device enumeration, polling with dead zones,
hat emulation and joystick mouse mode. OsJoystickPoll becomes Mac's
OsPollJoysticks. Clamp (0x5C59F0) goes to _Triage. Os links dinput8
and dxguid.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 16:58:04 +02:00
SatyandClaude Opus 5.5 47a805dc6b Os O5a: live parts of OsTcp
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]>
2026-09-25 16:31:52 +02:00
SatyandClaude Opus 5.5 68f8dc745a Os O4b: OsVersionHash and OsURLDownload
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]>
2026-09-25 16:21:33 +02:00
SatyandClaude Opus 5.5 6c89f31539 Os O4a: Os*File layer over Blizzard::File
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]>
2026-09-25 16:01:44 +02:00
SatyandClaude Opus 5.5 63781abea8 Os O3: OsGui dialog framework remnant
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]>
2026-09-25 15:42:46 +02:00
SatyandClaude Opus 5.5 37e14d73ab Os O2: IME and clipboard
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]>
2026-09-25 15:16:12 +02:00
SatyandClaude Opus 5.5 2ba4294381 SHA-1 C API and OsSecureRandom
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 15:02:49 +02:00
SatyandClaude Opus 5.5 ca050459be Os pass 1: System, path and time helpers
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 14:53:30 +02:00
SatyandClaude Opus 5.5 f749997f95 Event observer TU and W32/OsCall.cpp
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 14:09:16 +02:00
SatyandClaude Opus 5.5 21cef061ce Event pass 2: Storm RW lock, instance id table, scheduler
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 04:52:29 +02:00
SatyandClaude Opus 5.5 a6920c183e Os time manager and Tools/GxTest
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]>
2026-09-25 03:03:19 +02:00
SatyandClaude Opus 5.5 6a0af5fac8 Os pass 2: rest of the input layer and Gui helpers
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]>
2026-09-25 02:47:38 +02:00
SatyandClaude Opus 5.5 0ec663b0e4 Os pass 1: OsWindowProc and input helpers
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]>
2026-09-25 02:33:43 +02:00
SatyandClaude Opus 5.5 d8745e6b09 D3D pass 3: device lifecycle, scene, present, draw
Device creation (DeviceCreate x2, ICreateD3d, DeviceSetFormat,
ICreateWindow, ISetPresentParms, ISetCaps, ICreateD3dDevice), frame
(ISceneBegin, ScenePresent, SceneClear, Draw, IStateSetD3DDefaults),
teardown and resource release, DeviceWM, texture recreation.
CGxDevice::WaitForFPSCap and AdjustWindowRectToWorkArea (Win32/Win64);
Os time snapshot, OsGetAsyncTimeMs, OsSleep, last-error string.
Vendors NVIDIA NVAPI (MIT) into ThirdParty/nvapi, linked into Gx on
Windows.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 01:54:41 +02:00
SatyandClaude Opus 5.5 4898dcc94a Gx pass 7: pools, shader hash table, CGxDevice ctor/dtor
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]>
2026-09-25 00:14:22 +02:00
SatyandClaude Opus 5.5 698a289577 Gx pass 6: render-state core, logging, window clamps
- CGxStateBom union, CGxPushedRenderState; typed render-state arrays in CGxDevice
- IRsDirty, IRsForceUpdate x2, IRsSync, IRsInit, RsSet, RsPush, RsPop
- MasterEnableSet, XformSetView, TexSetFlags, TexSetWrap, CGxTexFlags::operator!=
- GxRsSet (void*, int32_t, float), GxTexSetFlags, GxTexSetWrap
- CGxDevice::Log x4, LogOpen, LogClose; GxLog, GxLogOpen, GxLogClose, GxLogCrashInfo; g_gxApiNames
- ClampRectToWindow, ClampRect*ByAspect
- OsCreateDirectory (Os/Win32|Win64/Path.cpp)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 23:30:51 +02:00
SatyandClaude Opus 5.5 7e3e0919ee SFile pass 4: client SFile layer, Os path helpers, SetPaths
SFile2-Core.cpp: SFile::Initialize (0x421700), paths, OpenArchive,
OpenPathAsArchive (+ Mopaq SFileOpenArchiveView), CloseArchive,
SFileImpl, OpenEx, FindFile/OldFindFile + loose-file hash,
SFileReadFile/CloseFile/GetFileSize/OpenFile, SetFilePointer,
ReadFile/LoadFile/Unload, RebuildHash, QueueAsyncOpen.
Memory: placement operator new/delete, Allocate(4).
String::Equal/EqualI/Length. Os/Path helpers. Client SetPaths.
Mopaq SFileGetFileSize gains unused sizeHigh; SFileSetFilePointer.
MpqTest: --sfile mode.

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