43 Commits
Author SHA1 Message Date
SatyandClaude Opus 5.5 eabc5d8997 Port the logic fixes from the msvc80 branch
Behaviour fixes found while byte-matching against 12340, without the
VS2005 code-shape rewrites:
- 272502f5 logic bugs (MapObjDef 0x80 flag, D3D texop, PostReenable, ...)
- 3002c17f case-sensitive KNOWNDANCES/DECLINEDWORD keys, DynamicObject
  GetTransportGUID, CShadowCache::Initialize
- OpenGl IStateSyncEnables fill/line, DsSet integer value tests
- FriendList tail padding, HandleSpellEventSound severity, selection
  index -1, negative spell id in HasPetSpell
- operator delete null checks, FMOD MemoryFile seek clamp, SErr
  HeapAlloc flags
- WOWCLIENT_CRASH_LOG option

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-15 15:18:17 +02:00
SatyandClaude Opus 5.5 62c5c4fa18 Fix ICC WMO colours and x64 shadow-query overflow
- Buffer.cpp: PNC2T2 Color0/Color1 are D3DCOLOR (type 0), not FLOAT3;
  unified-path WMOs (MOHD flag 0x2, e.g. Icecrown Citadel) were drawn
  blue/green/black (12340 init at 0x9CD010)
- CShadowQuery::AllocBuffers: size the group/matrix pointer arrays with
  sizeof; 0x2000 bytes only fits 0x800 entries with 4-byte pointers
- ShaderEffect: upload sun constants with explicit w (the values 12340
  reads from the neighbouring statics), independent of x64 layout

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 13:53:11 +02:00
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 46b5adf64f Port FriendList, Player_C, Unit_C and GameObject_C modules
- FriendList: remaining methods and 28 Lua scripts, FriendListModuleLoaded
- Player_C: remaining functions incl. click-to-move (ClickToMove, CTMFace,
  CTMClickTerrain, CTMAttackUnit, CTMInteractGO), dance, virtual items,
  sound and skill-rank overrides
- Unit_C: tracking (HandleTracking and helpers, SetTrackingTarget/Direction),
  selection circles, spell visual overrides, mirror image, flag-2 changes,
  scale update, missile trajectory (ComputeMissileTrajectory,
  SendFinalMissileTrajectoryUpdate, StartMissileTrajectoryTargeting) and
  CMissileCollision (Init, unit ranking, hit spheres)
- GameObject_C: IsLocked, UseObject, TypeBase CanUseNow/CheckRange/Use/
  CanChangeCursor, Ritual and MeetingStone types, virtual overrides,
  property helpers named from the binary's property table
- Dependencies: ProjectTex::Render2d, weapon trail chain (SWING,
  WTOBJECT::SetDrawTrail), GxSwizzleColor, CAaBox::Expand/Center,
  CVehicle_C::PlayBoneAnimOrFallback, RuneInfo/PetitionInfo/ClassTrainer/
  ComSat helpers, CalendarEventTables ctor
- DBCache: InvalidateIntKey, RetryItem, SetTemporary, ~DBCACHEHASH
- Template instances, deleting dtors and TSHashTable/WowClientDB instances
  recorded in their OFFSET lists

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-02 12:07:58 +02:00
SatyandClaude Opus 5.5 9ddddebc34 Port minimap, item moves, cursor, character info, names, nameplates, combat text
- Fix RsSet render-target upload check (indoor rendering corruption)
- Minimap tracking/hover, world map refresh
- Bag/bar item moves, swaps, equip, item sounds, spell on cursor
- Character info stats, titles, model preview
- Unit/player names (PLAYERNAMEDESC render, name strings, raid icons)
- Nameplates: CGNamePlateFrame, CGSimpleHealthBar, unit glue, SmartScreenRect overlap solver
- Floating combat text: WORLDTEXTSTRING, render batch, PlayerName text slots
- Fix unescaped raid-icon texture path in PlayerNameInitialize

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-01 07:00:36 +02:00
SatyandClaude Opus 5.5 18c46cb87e Client bring-up: in-world camera, input, movement, unit rendering
Ports verified against 12340 that take the x64 client from character
login to a playable world:

- Camera: SetView/ResetView, motion, free-look facing, tracking, bobs,
  liquid bump, world collision; camera Lua scripts
- Input: world frame key/mouse layers, default action, mouselook,
  turn/pitch player, TurnOrAction/CameraOrSelectOrMove scripts
- Movement: legal facing range, turn/pitch/raw facing events, transport
  status, move spline copy, unit update info, smooth facing, anim end
- Units: component and extended display init, model fade/scale,
  entity sort table, RenderEntitys, split-body culling
- Interiors: WMO group bounds, BSP segment link query, face linking,
  interior lighting
- Collision: CMap::QueryFacets closure with frustum queries and NDCClip
- UI: game UI mouse filters, client control state, faction standing
  packet, many *_Scripts.cpp Lua tables; name generator dictionary fix

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-29 23:04:53 +02:00
SatyandClaude Opus 5.5 4a571e727c World port: WMO water, fog, area updates, purge chain, detail doodads
- Barriers, shadow/portal queries, underwater selection, hit testing
- Interior water: PolyClipper, ClipGroupGeometry, liquid index fix
- Area updates, barrier updates, purge/free chain for areas, chunks,
  doodad and map object defs, detail doodad update list
- Water ripples, terrain pixel shader path, liquid shader toggles
- Detail doodads: creation per chunk, pools, batching, vertex/index
  fill, shader and fixed-function render state, RenderDetailDoodads
  (trailing occluder/debug draws still to port), CMapChunk::SelectLights
- DayNight moved to WoW/Source/WorldClient
- MapViewer: fog, WMO water, detail doodads; diagnostics removed

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-29 07:43:15 +02:00
SatyandClaude Opus 5.5 f6d07ea346 World port: liquids, map load chain, terrain rendering in MapViewer
Liquid system ported from 12340 (LiquidSystem module, chunk/WMO liquid, wave
manager, geometry factories); CMap load chain (Load, LoadWdt, low-detail WDL,
lights, CreateMapObjDef, PurgeMaps); CMapChunk create/batch/vertex/index code;
CMapRenderChunk; frustum stack and scene cull helpers. MapViewer renders
terrain through a viewer-only shortcut (ViewerWorld.cpp). Engine fix: int
render-state setters write the full pointer-sized slot (x64 texture crash).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-28 08:07:38 +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 472530e785 Client bring-up: WinMain to event loop, Engine/FFX port
Tool client (Tools/WowClient) with generated stand-ins now runs
InitializeGlobal completely: config, locale, MPQs, signature file,
hardware detect, D3D device, Storm log. Stops at InitializeEngineCallback.

- entry start 0x401000 (StormRtlInitialize before CRT), /ENTRY:start
- ConsoleDevice + ConsoleDetect module, GxDefaultApi
- SFile signature path (ClearAllFileFlags, SetFileSignature, HashMap insert)
- WowLogHeader + helpers, SMemIsValidPointer, ClntObjMgrIsValid
- ConsoleWrite line list, CGObject_C vtable declarations
- crash handler prints symbolized x64 stack
- Engine/FFX port (FFX agent), Pass headers moved out of _Triage

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 17:23:27 +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 c18774684b Gx: port remaining CGxDevice, D3d, D3d9Ex, OpenGl and draw-list code
474 definitions, 0 fail; only the CGxDeviceD3d9Ex ctor is unchecked
(IDB has it as a chunk of NewD3d9Ex). Adds the Gxu draw-list module,
GxScenePresent, GxDevDestroy, OpenGl VBO broker and GlExt (moved under
CGxDeviceOpenGL). Binary-backed fixes: GxTexCopy tests m_renderTarget,
TexStretch compares widths first, fullscreen style 0x87000000, pixel
format reject mask 0x50, DeviceOverride case 0 field, filter constant,
D3d9Ex window class name, four thiscall members. Draw-list enums moved
from WoW Ui/Types.h to Gx/Types.h. OpenGl linked on WIN32.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 03:11:20 +02:00
SatyandClaude Opus 5.5 4921b0d194 Tools: add M2Viewer, a spinning-M2 render test
Tools/M2Viewer opens a window, creates the D3D9 Gx device, loads an M2 from
bin/Win/Data through M2Cache/CM2Scene and spins it; Win32 and x64. Unported
engine functions it links but never reaches map to aborting stand-ins.

Engine pieces it needed: CGxDeviceD3d::XformSetProjection, CGxDevice::
XformSetViewport, GxXformSetViewport, CParticleEmitter2::Init and the
ParticleSystemManager projection statics. M2Scene.h now declares
s_localLighting/s_blendModes (they could not link), and the duplicate
particle emitter classes left in _Triage are removed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 00:57:44 +02:00
SatyandClaude Opus 5.5 7c7f474658 FrameXML: port XMLTree, FrameXML and LoadXML TUs
XMLTree.cpp (0x8145B0-0x814E40, XMLTree_GetRoot at 0x8BE770), FrameXML.cpp
(0x812530-0x8145A3) and LoadXML.cpp (0x814E40-0x816767, name guessed: no
__FILE__ string). LoadXML_AnimGroup and Create_SimpleMovieFrame stay
declared until their Frame classes exist.

XMLNode allocates from the CDataAllocator at 0xD3F718; CScriptRegion derives
from CScriptObject and CLayoutFrame (second vtable at +0x20); the attribute
array element is CXMLAttribute. Expat.h declares the expat API by hand until
expat is vendored.

Shared additions: Frame enums (FRAME_STRATA, ORIENTATION, SimpleAnim*,
ANCHORPOINT renamed FRAMEPOINT), Frame class vtable slots/constructors/
allocators and four shell classes, EGxBlend, MD5_CTX, one stpl.h instance.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 00:49:59 +02:00
SatyandClaude Opus 5.5 ee8a1c1bc6 ShaderEffect: port ShaderEffect, ShadowCache, manager and parser TUs
ShaderEffect.cpp (0x8728C0-0x873F50), ShadowCache.cpp (0x873F60-0x876370),
ShaderEffectManager.cpp (0x876370-0x876E30) and ShaderEffectParser.cpp
(0x876E30-0x8773F0).

Shared additions: GxRenderTargetSet, CGxDevice::DeviceGetRenderTarget,
C44Matrix::Identity, CWFrustum (m_sceneLink removed: 0xF4 stride),
M2LIGHTTYPE and the CM2Lighting::SetupGxLights declaration.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 00:16:27 +02:00
SatyandClaude Opus 5.5 860511ea4d Gxu: port the font and light TUs
GxuFontMain.cpp (0x6BCD60-0x6BF370), GxuFontUtil.cpp, GxuFontFont.cpp,
GxuFontFace.cpp, GxuFontString.cpp, GxuFontMiscClasses.cpp,
GxuFontTextureCache.cpp and IGxuFontGlyph.cpp, named after the 12340 and
Mac 13682 source file strings; CGxFont moves from Gx to Gxu.
GxuLight.cpp (0x6BB510-0x6BCD60): the light grid behind the GxuLight*
function-pointer table at 0xAD9834.

Gxu links FreeType 2.0.1. Shared additions: GxBufDestroy, GxFormatColor,
CGxVertexPC/PCT, CMath fint_n/fuint_pi/CeilToInt64, C3Vector::SquaredMag,
HASHKEY_DWORD and the template instances in stpl.h.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-27 00:15:42 +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 5f720dfc64 fmodex completion pass; CMake integration; vsnprintf fixes
- OFFSETs/reconstruction from 12340: System::getDriverName,
  setRecordDriver, getRecordDriverName; Sound/SoundI/Codec::readyForRelease
  (new, non-virtual); SoundI::getNumTags; OutputWASAPI::getDriverName;
  OutputWavWriter::getHandleCallback (folded with WASAPI's
  recordGetPositionCallback); LocalCriticalSection::enter; ASIO stopCallback.
- fmodex in the wowdecomp CMake build (Win32 + x64, NASM on Win32,
  WIN32_LEAN_AND_MEAN/NOMINMAX removed for SoundEngine, LoadOAL.cpp);
  x64 portability casts; libFLAC fseeko/ftello -> fseek/ftell on MSVC.
- CGxDevice::Log(va_list), SysMsgPrintf, SysMsgVPrintf: _vsnprintf as in
  12340 (were C99 vsnprintf; hidden by a harness overload-pairing bug).
- VERIFY stamps.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-26 09:08:31 +02:00
SatyandClaude Opus 5.5 5a2919f977 Texture T1: CTexture, create path, GxTex cache, atlas, BLP upload
Ports 37 Texture.cpp functions from TextureCreate to the filled D3D
texture (cache, solid textures, PumpBlpTextureAsync, TextureAllocGxTex/
FreeGxTex reuse buckets, atlas, TextureGetGxTex, TextureInitialize),
GxuUpdateSingleColorTexture, GxTexReusable(CGxTex*), CGxTexFlags==,
CBLPFile ctor/dtor. Fixes CStatus Add overload order (vtable slots).
GxTest --textures reads back D3D levels; all match 12340 (note 298).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 19:59:26 +02:00
SatyandClaude Opus 5.5 5fbacb0427 DXT decode: Blit_Dxt* converters, block decoders, colour tables
Ports the 7 DXT->ARGB entry points, Blit_Dxt/Blit_DxtUnaligned
templates, DxtDecodeBlock overloads, DxtMakeTable(Alpha)
specializations, alpha callbacks and DxtColorBlock::Tables.
BlpTest gains a synthetic `blit` mode; output matches 12340 under
emulation on x86 and x64 (note 297).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 19:07:25 +02:00
SatyandClaude Opus 5.5 eb52720935 BLP B1: CBLPFile core, mip helpers, CalcRowStride
Port CBLPFile open/source/lock/unlock/lock-chain and the palette
fast paths, the MippedImg helpers (_Triage) and CalcRowStride.
BLPHeader moves to BLPFile/Types.h with the palette/JPEG union.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-25 17:08:56 +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 89c3a2ac98 ICursorDraw, D3D buffers: first D3D9 window
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]>
2026-09-25 03:40:35 +02:00
SatyandClaude Opus 5.5 6328d9f7e9 D3D texture pass: texture create/upload and the Blit module
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]>
2026-09-25 03:21:02 +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 f5d141f559 D3D pass 4: CGxDeviceD3d::WindowProcD3d
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]>
2026-09-25 02:09:37 +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 639e369cb8 D3D pass 2: render states and state sync
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]>
2026-09-25 01:34:31 +02:00
SatyandClaude Opus 5.5 12840d5eb1 D3D pass 1: CGxDeviceD3d class, constructor, simple virtuals
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]>
2026-09-25 01:15:30 +02:00
SatyandClaude Opus 5.5 4c33d4c961 Gx: CGxDevice::DeviceOverride and PrimDrawElements
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]>
2026-09-25 00:49:29 +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 3e0d01aff0 Gx pass 5: textures, buffers, vertex format tables
- CGxTexFlags bitfields + 10-arg ctor with default args; CGxTex ctor/dtor, second TSLink at +0x48
- CiRect() zero-initializes (inline only)
- CGxDevice: TexCreate (returns 1), TexDestroy, ICursorCreate, CursorUnlock, BufDestroy, PrimVertexPtr;
  m_textures is a TSExplicitList
- CGxPool::UnlinkBuf (guessed name)
- Gx: GxTexCreate x3, GxTexUpdate(rect), GxPrimVertexPtr x2, GxPrimLockVertexPtrs
- Gx/Buffer.h/.cpp: Buffer::s_vertexBufDesc and the 14 per-format attribute tables

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 23:13:09 +02:00
SatyandClaude Opus 5.5 4ab6cba641 Gx pass 4: small CGxDevice members, shader constant shadows, texture helpers
- CGxDevice: window rects, caps flags, scissor, prim state, lights, clip planes, BufStream/BufSizeSet,
  Tex* helpers, ShaderConstantsClear/Set/Lock/Unlock, ICursorDestroy/ICursorUpdate, ClampRect*, DeviceGamma,
  DeviceScreenShot, XformPushAndSet
- Gx wrappers: GxBufStream, GxXformPush(xf, m), GxTexSetCannotUpdate/SetUserData/Parameters/SetDataFormat,
  GxTexUpdate, GxPrimIndexPtr, GxPrimLockIndexPtr
- CGxTex fields typed (EGxTexTarget, EGxTexFormat, GxTexUserFunc)

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 22:54:33 +02:00
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
SatyandClaude Opus 5.5 e287ae2e10 Gx pass 2: CGxDevice vtable (84 slots) and 34 base virtuals
- Full virtual interface in binary slot order; overloads verified at slots 9/10 and 15/16
- Folded empty base virtuals defined without OFFSET; guessed names for slots 24/25, 49/50, 61, 81-83
- Base virtuals: DeviceCreate x2, DeviceSetFormat, gamma, screenshot, render target, Prim*, Buf*, callbacks,
  NotifyOn*, ITexMarkAsUpdated, QueryCreate/Destroy, XformSetProjection, cursor getters
- g_theGxDevicePtr; GxWindowProc returns intptr_t; callbacks are __fastcall
- C2Vector() and CImVector() zero-initialize (inline only)
- Gx enums EGxBuffer/EGxOverride/EGxQueryParam/EGxTexCommand/EGxWM moved to Gx/Types.h

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 22:28:38 +02:00
SatyandClaude Opus 5.5 597201ec6a Gx pass 1: device-free leaves, C3Vector ctors, Gx enums into Gx/Types.h
- CGxFormat(), CGxMatrixStack() + Identity, CGxLight(), CGxApiLight::operator= (moved to CGxLight.h),
  CGxPool::Invalidate/Discard, CGxGammaRamp::Set
- Gx.h/Gx.cpp: GxApiSupported, GxVertexSize, GxVertexAttribOffset, GxCalcTexelStrideInBytes + tables
- C3Vector() zero-inits and C3Vector(x, y, z) exists (inline only); CAaBox/C3Ray/CFrustum/Intersect rely on it
- EGxApi/EGxTexFormat/EGxVertexBufferFormat moved to Engine/Source/Gx/Types.h
- struct/class forward declaration mismatches fixed in CGxDevice.h and CGxPool.h

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-09-24 22:05:14 +02:00
SatyandClaude Opus 5.5 a09c429bd3 Tempest pass 1: readable field names, class-named files, math classes
- 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]>
2026-09-24 20:46:51 +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 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