Commit Graph

59 Commits

Author SHA1 Message Date
MarcelineVQ 23e44cd2a4 Move log path update from core addon to logsessions addon
The combat/chat log path global updates are logsessions-specific and
don't belong in the core addon. Created a dedicated LogSessions addon
with its own TOC, embedded file entries, and conditional loading.
2026-03-07 10:58:24 -08:00
MarcelineVQ 0f59db18e8 Fix marker position snapping to terrain chunk grid
UpdateWorldPosition (called during entity creation) snaps X/Y to the
terrain chunk grid, causing markers to appear offset from the requested
position. After creation, re-apply the exact position via
SetUnitPositionAndOrientation (0x698e20) to override the grid snap.
2026-03-07 10:42:01 -08:00
MarcelineVQ 97844cce8c Update M2 marker assets and DLL_README documentation
Update Raid_UI_FX M2 models. Add bigcursor Lua API docs
(SetCursorScale/GetCursorScale), clean up module control API wording.
2026-03-07 10:28:25 -08:00
MarcelineVQ 0e6d479667 Fix marker placement when cursor is over a unit or game object
UpdateHitTest returns hit type 2 (object) when the cursor is over a
unit/game object, with the intersection point landing at the camera
position rather than the object. Detect object hits via the hit type
field and resolve the object's actual world position from its GUID
stored in the HitTestResult.
2026-03-07 09:03:32 -08:00
MarcelineVQ e1aa765d33 Update RELEASING.md: require full module list in release notes 2026-03-06 14:54:37 -08:00
MarcelineVQ 2aaa089c76 Add module control API, bigcursor with fractional scaling, shared mutex
Module control API:
- Three cdecl exports: WeirdUtils_IsModuleActive, WeirdUtils_DisableModule, WeirdUtils_DisableAll
- C header include/weirdutils_api.h for runtime DLL discovery
- All modules gain pub module_name, isActive(), shared mutex via src/mutex.zig
- build.zig refactored to module_list array of ModuleDesc

Bigcursor:
- D3D9 vtable hooks on SetCursorProperties/ShowCursor
- Scale2x/Scale3x pixel-art upscalers in pure Zig (replaces 12K-line hqx C)
- Bilinear resampler for fractional scales (1.0-4.0, default 1.2)
- Win32 cursor via CreateIconIndirect bypasses D3D9 32x32 limit
- FNV-1a hash cache for ~16 cursor bitmaps
- Lua API: SetCursorScale(n) / GetCursorScale()
- CVar cursorScale for Config.wtf persistence (tenths)

Other:
- Add dpslog module stub
- Docs and README updates
2026-03-06 13:27:35 -08:00
MarcelineVQ 0783f3b0dd Remove redundant full variant from all-variants build
weirdutils.dll already serves this purpose.
2026-03-05 11:21:41 -08:00
MarcelineVQ 00749d5745 Add bigcursor module stub, rename combatlog to logsessions, bump session timer to 60min
- New bigcursor module skeleton with build integration and mutex
- Rename combatlog module to logsessions (directory, files, build options,
  imports, console prefixes, mutex name, DLL variant, docs)
- Increase log session continuation threshold from 30 to 60 minutes
- Update DLL_README log sessions section
2026-03-04 15:14:04 -08:00
MarcelineVQ 1bbf334958 Add GetCombatLogPath/GetChatLogPath Lua functions, update log path globals
Register Lua functions to expose current log paths. At PLAYER_LOGIN,
overwrite COMBATLOGENABLED/CHATLOGENABLED globals with actual redirected
paths (English locale only). Update DLL_README with Lua API and logging
enable instructions.
2026-03-04 14:39:58 -08:00
MarcelineVQ 0c76c99734 Update DLL_README for per-character log dirs, drop PID from filenames 2026-03-04 14:06:08 -08:00
MarcelineVQ ddd4c9681d Add session markers for chat and raw combat logs
Write CHAT_SESSION and COMBATLOG_SESSION markers on first write to each
log type. Raw combat log handle address captured dynamically from
SuperWoW's InitializeLogBuffer call.
2026-03-04 14:01:29 -08:00
MarcelineVQ 5768c50868 Hook HandleCharacterSelection to set up log paths before world loading
Read character name from select screen data and realm from CVar when
the player clicks Enter World, before InitializeLogBuffer fires.
Removes GUID/name-cache fallback — no more early passthrough to wrong paths.
2026-03-04 13:55:24 -08:00
MarcelineVQ 97307aa79f Per-character log directories with session continuation and chat log redirect
Organize combat/raw/chat logs into Logs\<realm>\<char>\ directories.
Lazy path setup on first InitializeLogBuffer call resolves character
and realm names, creates directory tree, and reuses files modified
within 30 minutes for session continuation. Chat log added to the
redirection system. Session marker now includes realm name.

Paths not yet redirected before login — needs earlier hook point.
2026-03-04 13:39:41 -08:00
MarcelineVQ 12db928365 Hook InitializeLogBuffer to redirect combat log paths from any caller
SuperWoWhook.dll calls InitializeLogBuffer directly with hardcoded
"Logs\WoWCombatLog.txt", bypassing the path pointer table. Hook
InitializeLogBuffer itself to intercept the path argument and
substitute our timestamped filename, regardless of caller. Also
redirects WoWRawCombatLog.txt to a matching timestamped file.

TODO: session marker (COMBATLOG_SESSION) needs to be written as the
first line in each log file -- currently it appears after SuperWoW's
initial writes (COMBATANT_INFO, ZONE_INFO) because the write hook
fires too late.

TODO: consolidate small/empty WoWCombatLog_*.txt files on startup.
2026-03-04 08:44:40 -08:00
MarcelineVQ f139480590 Remove SD message and consolidate sync timer into single frame
SD was unnecessary since the 5s fallback timer already clears sync
state. Also disabled debug logging in the addon.
2026-03-04 08:44:21 -08:00
MarcelineVQ 38e5872591 Unify marker sync protocol: remove SetMarkerDefSync, use SF/SD messages
SetMarkerDefSync checked canSetMarkers() on the local player, which
blocked non-leaders from receiving sync data. Now SF messages use the
same SetMarkerDef (senderHasPermission) check as P messages.

Protocol change: sync responder sends SF: for each marker then SD to
signal completion. Requester enters sync mode with a 5s fallback timer,
locks to first SF sender, and exits on SD. Non-syncing clients ignore
SF/SD. Consolidated login delay and sync timeout into one timer frame.
2026-03-03 18:52:28 -08:00
MarcelineVQ 11851c4ece Hook WriteFormattedLogMessage to inject session marker before first combat log write
Instead of hooking EnableChatLogging or SignalEvent (which fire too late
or before the log file is open), hook WriteFormattedLogMessage directly.
On the first write to the combat log, prepend COMBATLOG_SESSION with the
player name resolved via the name cache. This guarantees the session
marker is the very first line in the file.

Also add World_HandleLogoutCleanup (0x491180) hook to reset per-session
state on real logout/disconnect (not /reload), and move remove_on_shutdown
cleanup from shutdownDetour to logoutDetour.
2026-03-03 17:38:25 -08:00
MarcelineVQ 049f6cd851 Use name cache for combatlog player name, remove SignalEvent probe
Switch from GetObjectPtr→GetUnitName (object manager, not populated
at LoggingCombat time) to RetrieveNPCDataFromCache (name cache,
available early). Remove the SignalEvent probe hook that was only
for discovery.
2026-03-03 15:13:14 -08:00
MarcelineVQ 11030e0566 Fix WriteFormattedLogMessage: stdcall with va_list, not cdecl variadic
Ghidra disasm confirms RET 0xC (callee cleans 3 args). Third arg is a
va_list pointer, not the variadic args directly. For %s, vsprintf reads
*(char**)va_list -- previous code passed &name_buf causing vsprintf to
interpret "Munj" (0x6A6E754D) as a char* and crash at strlen.

Fix: pass &name_ptr (pointer to the char*) and remove caller stack
cleanup. Added detailed research to RESEARCH.md.
2026-03-03 14:53:32 -08:00
MarcelineVQ aa6ea3c558 Fix combatlog player name resolution: stdcall ABI for GetObjectPtr
The old code called GetObjectByGUID (0x464870) as __fastcall with the
GUID in ECX/EDX, but the function is actually __stdcall with the u64
GUID on the stack. This ABI mismatch caused a crash.

Switched to perfboost's two-step approach with correct conventions:
  1. GetObjectPtr (0x464870) — __stdcall(u64 guid) → object ptr
  2. CGUnit_C::GetUnitName (0x609210) — __thiscall(ECX=unit, 0) → char*

Also added ESI/EDI/EBX clobber barrier in the EnableChatLogging detour
and copy name to stack buffer before log write.
2026-03-03 14:22:56 -08:00
MarcelineVQ 4af033d01d Rename dataassets→customassets, Markers→WorldMarkers, prefix all mutexes
- dataassets module renamed to customassets everywhere (build flag,
  source, DLL variant name, docs)
- Markers addon renamed to WorldMarkers (addon path, .toc, .lua,
  Bindings.xml header, Lua globals, debug log prefix, mutex name)
- All 9 module mutexes now use WeirdUtils_ prefix to avoid
  collisions with other DLLs in the same process
2026-03-03 10:26:17 -08:00
MarcelineVQ c00ea75d59 Rename looseassets module to dataassets 2026-03-02 23:55:26 -08:00
MarcelineVQ c04680788d Fix release-mode crashes: inline asm register clobbers and fastcall ABI
Root cause: hook.fastcall used "r" constraints + explicit MOV to set
ECX/EDX. LLVM can allocate "r" inputs to clobbered registers, causing
cross-assignment (ecx_in→EDX, edx_in→ECX) or function address stomping
when func lands in ECX/EDX. Debug works by luck (trivial regalloc);
Release optimizes aggressively and hits the conflicts.

Fix: explicit "{ecx}", "{edx}", "{eax}" register constraints in zhook
fastcall — compiler places values directly, no MOV needed, no ambiguity.

Also fix 9 inline asm blocks across main.zig, interact.zig,
screenshot.zig, markers.zig missing ECX/EDX clobbers after CALL
instructions. Without clobbers the optimizer assumes registers retain
input values after the call — stale reuse in release builds.

Other changes in this commit:
- Rename markers→worldmarkers (build flag, DLL, Lua table)
- Rename assetfix→looseassets
- lua.zig: add .never_tail to pushcclosure, pcall, openlib, pushnumber
- Move internal marker functions into WorldMarkers Lua table via openlib
- Remove unused GetCurrentAreaId function
- Fix cleanup_file_handle_hook.original() → .callOriginal()
2026-03-02 23:38:04 -08:00
MarcelineVQ b69c3a55a1 Move permission checks DLL-side: canSetMarkers, senderHasPermission, senderInGroup
Replace Lua-side permission checks with direct memory reads in the DLL.
All marker mutation functions now verify sender identity against the
raid roster / party leader GUID without touching Lua state.

- Add getPlayerGUID (0x468550), getNameFromGUID (name cache at 0xc0e228)
- Add canSetMarkers: checks local player is leader/officer via roster
- Add senderHasPermission: verifies sender name against roster ranks
- Add senderInGroup: weaker check for sync relay (any rank)
- WorldMarker/ClearWorldMarker return 1/nil for addon feedback
- SetMarkerDef/ClearMarkerDef take sender name param, verify DLL-side
- SetMarkerDefSync: dual check (local=leader + sender in group)
- CanSetMarkers() Lua function for addon broadcast decisions
- Remove Lua-side canSetMarkers/senderHasPermission from Markers.lua
- Add offsets: LEADER_GUID, RAID_ROSTER_ARRAY, RAID_MEMBER_COUNT, etc.
2026-03-02 21:46:42 -08:00
MarcelineVQ 0c2b038e45 Add DLL-side permission gate and return values for WorldMarker/ClearWorldMarker
- WorldMarker/ClearWorldMarker now return 1 on success, nil on permission denied
- LuaCFn calling convention fixed to x86_fastcall (matches WoW Lua C functions)
- ClearWorldMarker handles nil arg (clear all) via lua_type check
- Addon wraps DLL functions: shows deny message on nil return, broadcasts on success
- Permission denial feedback with cooldown (5s) and max 3 messages per login
- Removed redundant canSetMarkers() Lua-side check from broadcast path
2026-03-02 20:59:55 -08:00
MarcelineVQ 3c15c8650a Extract shared lua.zig and add DLL-side marker permission check
Move Lua C API wrappers from main.zig's lua struct into src/lua.zig
so both main.zig and markers.zig import from the same source. Remove
duplicate lapi struct from markers.zig.

Add DLL-side permission gating on WorldMarker/ClearWorldMarker: calls
WoW's IsPartyLeader (0x4e9130) and IsRaidOfficer (0x4bb910) C
functions directly. Requires party leader, raid leader, or raid
assist to place or clear markers. SetMarkerDef/ClearMarkerDef remain
ungated (addon validates sender before calling).
2026-03-02 12:59:38 -08:00
MarcelineVQ db1243d136 Add marker persistence, respawn, group sync, and fix pushnumber ABI
Marker definitions (position + area ID) now persist across zone
transitions. Entities are destroyed on map change but respawned
automatically when the player approaches within 200y. Definitions
are cleared on logout/exit via onShutdown hook.

Group sync via addon messages (WMark prefix, colon-delimited protocol)
with permission checks (raid leader/assist, party leader). Includes
sync request/response for late joiners and roster change broadcasting.

Fix lua_pushnumber calling convention: function is __thiscall (ECX=L,
f64 on stack, ret 8), not __fastcall. The patched inreg fastcall was
placing the f64's low dword in EDX, corrupting values.

Other fixes:
- Remove Bindings.xml from .toc files (explicit binding loader needed)
- Remove remove_on_shutdown for markers (was killing hooks on logout)
- Remove diagnostic entity check code (culling behavior understood)
- New Lua APIs: SetMarkerDef, ClearMarkerDef, GetMarkerDef
- Rename binding labels to marker colors
2026-03-02 11:45:26 -08:00
MarcelineVQ bf718b66db Harden group sync: SF dedup, roster debounce, area ID filter
- SF first-responder lock: after sending SR/LSR, only accept SF
  messages from the first player to respond, ignore duplicates
  from other members to prevent entity flicker.
- Roster change debounce: retriggerable 5s timer with up to 5
  one-second extensions (10s max). Only fires on group size
  increase. Party events skipped when in raid.
- Area ID check in DLL respawn: markers only spawn when the
  player is in the same zone (area_id match against 0xB4E314).
- New GetCurrentAreaId() Lua function for addon zone awareness.
2026-03-02 11:26:10 -08:00
MarcelineVQ 93e4354d7b Fix group sync: permission model, delayed login request, LSR/SR split
- SR handler no longer requires sender permission (anyone can ask for
  marks). Split into SR (only leader/assist responds) and LSR (anyone
  with defs responds, for leader relog recovery).
- Login sync uses 5s delayed timer so group roster is populated first.
- Timer cancelled if leader places a mark before it fires.
- SF (sync response) accepted from anyone without permission check.
- Colon delimiter instead of pipe to avoid WoW color escape errors.
2026-03-02 10:58:43 -08:00
MarcelineVQ 6778437638 Add marker persistence, proximity respawn, and group sync
Markers now survive zone transitions via persistent MarkerDef structs
(position + area ID) that are NOT cleared during world teardown. The
per-frame tick detects zombie entities (refcount <= 1 from game culling)
and respawns markers when the player approaches within 200 yards.

New DLL Lua APIs: SetMarkerDef, ClearMarkerDef, GetMarkerDef for the
addon to store/query definitions without immediate entity creation.

Addon layer adds group sync via CHAT_MSG_ADDON messages using colon-
delimited protocol (P:idx:x:y:z:area, C:idx, CA, SR, SF:...). Wraps
WorldMarker/ClearWorldMarker to broadcast on placement. Permission
model: raid leader/assist or party leader only.

Fix lua_pushnumber calling convention: Ghidra confirms it is thiscall
(ECX=L, f64 on stack [EBP+8]/[EBP+0xc], ret 8), not fastcall. The
patched inreg fastcall was shoving the f64's low dword into EDX,
producing garbage values like 1.17e-250 from 1810.
2026-03-02 10:38:15 -08:00
MarcelineVQ 7e28c81db0 Tune marker animation: 2000ms Hold queue delay
Empirically tested delay thresholds (100/500/1000/2000/3900ms).
Delays under ~2s cause the engine's blend logic to accelerate the
Stand grow-in animation. 2000ms is the shortest delay that preserves
full-speed Stand across all 5 marker colors.

Also confirmed all 5 Raid_UI_FX M2 models have identical animation
sequence entries (Stand→Hold→loop chain via nextAnimation fields),
but the engine doesn't honor the chain — explicit PlayBoneAnimation
queue is still required.
2026-03-02 08:58:43 -08:00
MarcelineVQ e474b61c37 Move marker animation tick to DLL-side OnWorldUpdate hook
- Hook OnWorldUpdate (0x482EA0) for per-frame tick while world is active
- Remove Lua OnUpdate animation driver (ProcessMarkerAnimations)
- Add DistanceToMark(index) Lua API returning player-to-marker distance
- Track marker positions DLL-side for distance queries
- Clean up positions on marker clear and world teardown
2026-03-02 08:31:23 -08:00
MarcelineVQ 4b6e4ceaa9 Add end-user DLL README documenting features and install guide 2026-03-02 07:51:07 -08:00
MarcelineVQ 475070e910 Fix marker crash on logout and add module lifecycle table
The marker cleanup hook on CleanupWorldAndEntities was never installed —
markers.installHooks() was missing from install() in main.zig. Entities
created via WorldMarker were never cleaned up before the game's atexit
handler iterated the hash table over freed heap memory.

Key changes:
- Add markers.installHooks() call (the actual crash fix)
- Replace manual install/uninstall/shutdown lists with a single modules
  table that drives all three phases — prevents this class of bug
- Gate marker Lua functions, addon, and keybindings behind isActive()
  so they're skipped when another DLL owns the hooks
- Add world_cleanup_hook.detach() to removeHooks() (was missing)
- Migrate from vendored libs/hook to external zhook dependency
- Unify installHooks return types to void across all modules
- Add diagnostic logging to marker cleanup (temporary, for testing)
2026-03-02 07:34:18 -08:00
MarcelineVQ 43313f439d Add version-keyed patch sets to healtextfix
Detect SuperWoW version at runtime by scanning the DLL for
SUPERWOW_VERSION="..." and match against known PatchSet entries.
This allows adding patches for future SuperWoW versions without
losing support for older ones. Skips gracefully if version is
unrecognized.
2026-03-02 05:58:29 -08:00
MarcelineVQ 65f9dbb2a9 Add healtextfix: runtime patches for SuperWoW 1.5 duplicate heal text
Patches SuperWoWhook.dll handler function in memory to skip duplicate
floating combat text creation. Unlike the reference repos which patch
the DLL on disk (preventing hook registration), this patches the live
handler to JMP over its text creation and fall through to the original.
Also redirects HoT text handler pointers for correct color.
2026-03-02 05:52:48 -08:00
MarcelineVQ 1ec9d8d433 Smooth Stand→Hold animation transition with 100ms blend
- Set Hold blendTime=100ms in all 5 M2 files (was 0ms, causing jarring snap)
- Play Hold 100ms before Stand ends (3900ms) for overlap blend
- Set Stand.nextAnim=1, Hold.nextAnim=1 in M2 data for engine chaining
- Revert Hold duration from 300000ms (test residue) back to 4000ms
2026-03-02 04:23:56 -08:00
MarcelineVQ bc731bb1eb Fix marker Hold animation glitch and simplify animation control
M2 changes (all 5 Raid_UI_FX models):
- Set Stand nextAnim=1 to chain to Hold via engine's native mechanism
- Set Hold nextAnim=1 for self-loop chain
- Revert Hold duration from 300000ms (test residue) to 4000ms
- Fix Bone1 rotation quaternion loop: match last keyframe to first,
  fix hemisphere flip at 180° keyframe, zero X/Y drift in keyframes 6-9

markers.zig:
- Remove Hold re-queue logic (was causing blend transition glitches)
- Queue Hold once after Stand duration instead of every 1500ms
- Remove debug logging (process_call_count, per-frame dumps)
2026-03-02 04:13:34 -08:00
MarcelineVQ c70d39b1ea Add cursor terrain placement and marker animation control
Cursor terrain: UpdateHitTest raycast through mouse cursor, zero-before-check
to distinguish terrain hits from no-hit (both return hitType=0 outside AoE).

Animation: PlayBoneAnimation wrapper calls Stand->Hold on spawn, Decay on
despawn with lazy 700ms deferred cleanup. Not yet working correctly --
animations may not be taking effect or IDs may need verification.
2026-03-01 18:08:36 -08:00
MarcelineVQ d59cf42514 Replace test marker with WorldMarker/ClearWorldMarker Lua API
5 marker slots (Yellow, Cyan, Green, Purple, Red) with placement
by coords, unit ID, or cursor position (stubbed pending terrain
offset research). Key bindings for all 5 markers + clear all.
2026-03-01 16:23:51 -08:00
MarcelineVQ 608e1c43d5 Add generic hook module (x86dis + auto-sizing detour), framecrash updates, marker assets
Hook lib: port HDE32 length disassembler to Zig (x86dis.zig), add GenericHook
with automatic prologue sizing and relative instruction relocation, add
Detour(FnType) comptime-generic type-safe hook wrapper. Update build.zig
to expose x86dis, generic_hook, hook as separate modules.

Framecrash: expand vtable hook research and implementation.
Markers: updated raid marker M2 assets.
2026-02-28 17:46:03 -08:00
MarcelineVQ 2cca8f4b53 Add assetfix, transmogfix, minimapicons modules; fix assetfix disk-vs-MPQ priority
Assetfix: hook CheckFileExistence to serve loose Data\ files. The original
flags|1 approach failed because game paths contain backslashes, causing
CheckFileExistence to skip BuildFilePath and check the raw path (no Data\
prefix). Fix: write the correct Data\-prefixed disk path to the output buffer
directly and return 1, bypassing the original function for hash map hits.
This preserves hook chaining (filename argument is never transformed).

Also adds transmogfix (transmog update coalescing), minimapicons (stub),
new build options for all three modules, mutex-based multi-DLL safety,
embed .skin data into .m2 models, and various module improvements.
2026-02-28 14:07:53 -08:00
MarcelineVQ 6a290439c6 Document UpdateWorldPosition grid snap, fix BLP cleanup crash, remove test offsets
- cleanupFileHandleDetour: always delegate to original CleanupFileHandleResources
  trampoline instead of manual callCleanupFileContext+freeGameBuffer (fixes SMemFree
  crash at EIP=0x23 for BLP texture contexts)
- Add ECX to callCleanupFileContext clobber list (correctness fix)
- Document UpdateWorldPosition (0x698110) terrain chunk grid snapping behavior on
  createEntityInstance — updateNow=1 modifies position in-place
- Remove debug +10/+10 XY offset from marker placement
2026-02-28 07:50:10 -08:00
MarcelineVQ 303dc34407 Fix BLP texture cleanup crash: use original CleanupFileHandleResources for fake contexts
The manual callCleanupFileContext + freeGameBuffer path crashed inside SMemFree
(EIP=0x23, heap metadata corruption). The original CleanupFileHandleResources
handles fake contexts correctly (NULL-safe on handle fields), so always delegate
to the trampoline instead.

Also adds ECX to callCleanupFileContext clobber list, adds M2 file handle cleanup
before processLoadedModelData (matching onModelLoadComplete ordering), and adds
debug logging throughout the async model load path.
2026-02-27 22:23:08 -08:00
MarcelineVQ a8ebe21b0d Add hook 5 (loadModelFromFileAsync), combatlog stub, framecrash vtable hooks, marker assets
Hook 5 intercepts loadModelFromFileAsync (0x71d4e0) to synchronously load M2
model data for fake in-memory file contexts. processLoadedModelData returns 1
and entities are created, but file context cleanup is currently skipped (leaks
0x60 bytes per load) due to a crash in the cleanup path, and there's a later
EIP=0 crash during the game main loop that needs investigation.

Also adds: combatlog module stub, framecrash anchor vtable hooks (GetRelativeTo
and GetWidth/GetHeight crash guards), embedded Raid_UI_FX model assets with
skins and textures, WU_XYZ debug model.
2026-02-27 16:47:42 -08:00
MarcelineVQ fe1bfdedb8 Fix marker destruction: use CleanupEntity_ProcessAttachments (0x670d50)
The native high-level destructor counterpart to CreateEntityInstance_WithAttachment.
Properly detaches from render lists and scene graph before freeing memory,
fixing the delayed crash from dangling pointers in the per-frame render path.
2026-02-27 12:14:29 -08:00
MarcelineVQ ab6f5ea4b9 Replace manual world object creation with native CreateEntityInstance_WithAttachment API
Markers are now created via the game's high-level entity factory (0x6707c0)
which handles spatial registration, render setup, and lifecycle internally.
Removed ~300 lines of dead code: manual game object list insertion, A/B mode
switching, parity scanning, and model attachment wrappers.

Creation works (markers visible). Destruction still crashes — needs correct
destructor for entities created via CreateWorldUnit path (not DestroyWorldObjectAndRelease).
2026-02-27 11:18:48 -08:00
MarcelineVQ 37d42d09c2 Add markers module, framecrash stub, debug console, build-flag wiring
Markers: client-side world object system using CreateGameObject. Places
M2 models at arbitrary world positions via Lua commands (/mark test,
/mark pos). Includes embedded addon, xyz.m2/blp assets served from DLL
memory, position helpers from unit movement struct, and object lifecycle
management (create, cleanup, reposition, alpha, animation).

Framecrash: stub module with reference to crash at 0x007A2452.

Console: debug output via AllocConsole/WriteConsoleA, compiles out
entirely in non-Debug builds. Used by markers and file serve logging.

Build: markers added to feature flag matrix and all-variants step.
Main: conditional markers import, Lua function registration, embedded
addon + asset file serving, console init/deinit lifecycle.

Outline README: added misc planned features and debug mode notes.
2026-02-26 15:30:21 -08:00
MarcelineVQ cd7e585412 Restructure modules with per-module addon subdirs
- Each module (outline, interact, screenshot) now has its own addon/
  subdir with .toc, .lua, and Bindings.xml
- Core WeirdUtils addon lives in src/core/addon/
- build.zig supports compile-time feature gating via -D options
- main.zig uses build_options for conditional imports and addon embedding
- Module addons only load when their module is compiled in
- 'zig build all-variants' produces full.dll + 3 single-module DLLs
2026-02-25 19:15:08 -08:00
MarcelineVQ fbfe1cb545 Outline render order, stencil protection, JFA sentinel fix, diagnostics
Render order: 3-way M2 batch partition — game objects + local player
render first (write depth), then outline targets (stencil marks), then
other players/gear/NPCs. Outlines show through other players but are
occluded by world/WMO/game objects/local player.

Stencil protection: set STENCILWRITEMASK=0 after outline target DIPs
to prevent subsequent renders from overwriting stencil marks.

JFA sentinel: changed from (1,1) to (-1,-1) to move it outside UV
space. Did not fix banding but is correct regardless.

Debug: added DEBUG_SHOW_SILHOUETTE comptime flag to bypass JFA and
composite raw silhouette RT. Confirmed silhouette is clean — banding
is in the JFA pipeline, not stale vertex buffers.

Game object + local player tracking in tracker.zig for batch ordering.

Added project README and outline subsystem README documenting render
pipeline, architecture, known issues, and planned features.
2026-02-25 18:32:49 -08:00