Commit Graph
72 Commits
Author SHA1 Message Date
Dusk-92 17af79dff4 Fix V8 FrameScript registration ABI 2026-08-28 17:37:45 +02:00
Dusk-92 68c0ad2b75 Use minimal standalone core for Outline CustomAssets and TransmogFix 2026-08-28 16:46:54 +02:00
Dusk-92 f4cbacb7f9 Fix DllMain return type for Zig 0.16 2026-08-28 15:12:18 +02:00
MarcelineVQ 039cec1806 luagc: 5.1 incremental GC with timing, stress tests, pre-alloc hooks (BROKEN)
Current state CRASHES on load due to pre-alloc hooks with wrong calling
conventions. pushcclosure hook is still enabled with partially disabled
others. Needs all pre-alloc hooks disabled or CCs fixed before use.

Implemented:
- Full 5.1 tri-color incremental GC
- 5.1-style singlestep budget loop (replaces chunk-based approach)
- Per-step rdtsc timing (ZGCStats returns max_step_us, atomic_us)
- Configurable gcstepsize/gcstepmul/gcpause via ZGCTune()
- Pre-alloc GC hooks for 7 API functions (5.1 luaC_checkGC pattern)
- Stress test addon: /gclife, /gcsweep, /gccompare

Broken:
- Pre-alloc hooks have CC mismatches causing immediate crash on load
- pushfstring is cdecl variadic, not fastcall (removed)
- pushstring has ambiguous CC (removed, covered by pushlstring)
- pushcclosure hook still active -- may be causing the crash
- Half-initialized objects cause garbage gcptr under heavy stress

weirdperformance: re-enabled luagc.install() + luastr + luavm
2026-04-11 13:03:37 -07:00
MarcelineVQ 49f3f2452c fix: move CheckFileExistence gate NOPs to core file hooks
File_FindInArchive has two conditional jumps that skip calling
CheckFileExistence. Without NOPing them, preloadFileWithFlags
never reaches our hook and the game skips Bindings.xml loading
for embedded addons. This was previously only done by the
customassets module, so standalone variant DLLs (without
customassets) failed to load addon keybindings.
2026-04-06 17:42:32 -07:00
MarcelineVQ f58c100bf5 luavm: new module targeting top 3 Lua VM hotspots (4.5% CPU combined)
Three hooks from perf profiling (34M samples):
- lua_table_get_hash_element (1.65%): prefetch next chain node
- luaS_newlstr (1.35%): hash pre-check before memcmp (Lua 5.0->5.1 fix)
- lua_vm_execute (1.50%): jump table patches for MOVE (MOVDQU),
  ADD/SUB/MUL/DIV (SSE2 replacing x87)

Default off (-Dluavm=true to enable). Arithmetic slow path verified
against disasm: __fastcall(ECX=L, EDX=R(A), stack: opB, opC, tm_id),
callee cleans (RET 0xC).
2026-04-06 01:11:11 -07:00
MarcelineVQ 7a32d81fbb fix: allow multiple variant DLLs to coexist (fixes #7, fixes #4)
Remove the core mutex that prevented secondary DLLs from installing
shared infrastructure hooks (Lua registration, file serving, engine
init/shutdown). zhook already has explicit E9-chain detection -- each
DLL's trampoline chains to the previous DLL's detour, and per-module
mutexes still prevent duplicate module hooks. DLL_PROCESS_DETACH fires
in reverse load order so detach unwinds correctly.
2026-04-01 13:58:38 -07:00
MarcelineVQ 5e0b8c768c fix: remove filecache hook on shutdown to prevent SGroupPtr crash
weirdperformance's filecache hook (File_FindInArchive) stayed active
during game teardown, returning stale archive/block pointers after
Storm freed its MPQ archives. This corrupted heap metadata, causing
ERROR #124 (SGroupPtr invalid block) on game close.

Set remove_on_shutdown=true so the hook is detached during
logoutDetour before Storm archive teardown begins.

Also wires up superweirdo module and clickthrough lateInit.
2026-03-31 21:25:14 -07:00
MarcelineVQ db675c7a7e fix: MSVC ABI, heap allocator, deferred timer - vanillafixes compat
- Restore MSVC ABI (was accidentally GNU since v0.6.0, broke .CRT section)
- Replace game allocator with Windows process heap for filecache and
  libdeflate malloc/free - game allocator not initialized during DllMain
  when injected via CreateRemoteThread
- Defer timer calibration (Sleep 500ms) to lateInit - blocks under
  loader lock during DllMain
- Remove exported malloc/free symbols from DLL
- Eliminate addObject compilation units for SSE files - direct @import
  with AVX target instead
- Heap-allocate filecache (was 9.3MB static BSS)
- Strip transform44 of performance/ externs, pure profiling only
- Rename performance/ to weirdperformance/ to match module convention
- Skip default-off modules in all-variants build step
- Remove dead debug vars and stride logging from particle_sse
2026-03-28 05:31:31 -07:00
MarcelineVQ 9a3e06a7cc core: disableAll only removes module hooks, core stays until DLL unload
Core hooks (file serving, Lua registration, engine init/shutdown) are
shared infrastructure that other loaded DLLs depend on. Only release
them in uninstall (DLL_PROCESS_DETACH), never via the runtime API.
2026-03-24 18:52:51 -07:00
MarcelineVQ d748978d1c core: add mutex to prevent double-hooking shared infrastructure
When both weirdutils.dll and a standalone module DLL are loaded,
the core mutex (Local\WeirdUtils_weirdutils_<PID>) ensures only one
installs the shared hooks (file serving, Lua registration, engine
init/shutdown). Module hooks are unaffected (own mutexes). Addon
registration runs for every DLL since LoadAddonTOC is idempotent.
2026-03-24 18:03:42 -07:00
MarcelineVQ 4629ea71d6 rename performance to weirdperformance, move file cache hook into module
Move fileFindDetour from main.zig into filecache.zig with its own
install/remove. Remove file_cache import and all references from
main.zig. Rename module to weirdperformance throughout (build flag,
module_name, source file, main.zig variable).
2026-03-24 17:48:22 -07:00
MarcelineVQ 979e5729bc perf: consolidate filecache, timer calibration into performance module
Move filecache.zig and timer_fix.zig from standalone modules into
src/performance/. Filecache no longer has its own hooks/mutex — stats
are dumped by performance's worldupdate hook. Timer calibration runs
during performance install instead of transform44. Remove filecache
from build module list (enabled automatically with performance).
Merge DLL_README sections into single Performance entry.
2026-03-24 17:28:19 -07:00
MarcelineVQ 3b48b500ec perf: new 'performance' module — zero-overhead production SSE hooks
Clean module at src/performance/ with all verified permanent
optimizations and zero profiling overhead. No rdtsc, no A/B testing,
no probe counters, no dumpStats.

Hooks: transformMatrix4x4 bone SSE, RenderParticleSprites SSE,
GetOrCreateCharacterGlyph cache, OnWorldUpdate cache reset,
teardown guard.

SSE compilation units (bone_sse, particle_sse, clip_sse, silicon_sse)
moved to src/performance/ as canonical location.

Build: zig build -Dperformance=true -Dsilicon=true
(transform44 module remains available for profiling/development)
2026-03-24 01:21:10 -07:00
MarcelineVQ d84f723539 dpslog: handler table swaps, CombatLogGetCurrentEventInfo, unit flags, boolean fix
Major architectural changes:

- Migrate 12 packet handlers from JMP-patching Detours to NetClient opcode
  handler table pointer swaps. No code bytes modified — only heap pointers.
  Invisible to Warden memory scans. Hook InitializeGameEngine (0x401570,
  __thiscall) to install swaps after all handlers are registered.

- Implement CombatLogGetCurrentEventInfo() — WotLK-style lazy arg retrieval.
  Event fires with no args; addons call the function to get all fields from
  a C-side buffer. No arg count limit (bypasses ExecuteLuaCallback 19-arg cap).
  Includes unit flags, raid flags, and all suffix fields.

- Compute COMBATLOG_OBJECT_* unit flags: affiliation (MINE/PARTY/RAID/OUTSIDER),
  reaction (FRIENDLY/NEUTRAL/HOSTILE via UnitReaction), control (PLAYER/NPC),
  type (PLAYER/NPC/PET/GUARDIAN/OBJECT via SUMMONEDBY check), special (TARGET),
  and raid target markers.

- Fix boolean fields (critical/glancing/crushing): changed from %d (Lua number 0,
  which is TRUTHY) to nil/"1" via boolToLua(). Details addon was counting every
  hit as critical because it uses truthiness checks.

- SPELL_INSTAKILL now fires from SPELLLOGEXECUTE (has caster GUID).
  Standalone SMSG_SPELLINSTAKILLLOG handler is pass-through only.

- SPELL_EXTRA_ATTACKS now uses target GUID from packet (was discarded).

- SPELL_CAST_START/SUCCESS now parse spell target from packet.

- SPELL_DRAIN subevent added for instant power drain effects.

- Rename event from COMBAT_LOG_EVENT to COMBAT_LOG_EVENT_UNFILTERED.

- Update DPSMate and WSBT CLEU adapters to use CombatLogGetCurrentEventInfo().

- Remove unnecessary `or 0` guards on numeric fields (always non-nil from C).
2026-03-18 16:55:27 -07:00
MarcelineVQ fc762ac200 dpslog: CLEU rename, DPSMate absorb pipeline, WSBT adapter, module version API
- Rename COMBAT_LOG_EVENT -> COMBAT_LOG_EVENT_UNFILTERED across Zig/Lua
- DPSMate CLEU adapter: absorb pipeline (SetUnregisterVariables, Absorb,
  ConfirmAbsorbApplication, UnregisterAbsorb), BuildFail type 2/3,
  "(Periodic)" suffix, removed dead handler
- WSBT (Weird Scrolling Battle Text): CLEU adapter fork of MSBT with
  dispatch table, A/B combat profiling, selective event unregistration
- Module version API: GetWeirdUtilsVersion(name?) Lua function + WeirdUtils
  global table, additive across independent DLLs. Build system passes
  per-module version strings via build_options.
- Hook Glue_LoadScriptFunctions (0x46ABB0) for login screen availability
- Rename lsf_hook -> register_commands_hook (real name: Player_LoadScriptFunctions)
- lua.zig: add setglobal/getglobal via LUA_GLOBALSINDEX (-10001)
2026-03-18 14:20:16 -07:00
MarcelineVQ 56f5c0405d dpslog: WotLK CLEU parity — overkill, overheal, spell names, unit names, GetSpellInfo
Full WotLK 3.3.5 COMBAT_LOG_EVENT_UNFILTERED layout parity:

Event structure:
- Base: subevent, sourceGUID, sourceName, destGUID, destName
- Spell prefix: spellId, spellName, spellSchool
- All suffix field orders match WotLK (blocked before absorbed, etc.)

New fields:
- overkill (-1 if alive) on all _DAMAGE events
- overheal on SPELL_HEAL and SPELL_PERIODIC_HEAL
- sourceName/destName via getNameByGUID (name cache 0x55F080)
- spellName via SpellRec+0x1E0+locale*4 (verified from SuperWoW)
- glancing/crushing as separate booleans (was packed flags)
- amountMissed field (0 — downstream hook lacks amount)

New hooks:
- ProcessStandardPowerGainMessage (0x62CA00) for SPELL_ENERGIZE with
  actual amount and powerType from SMSG_SPELLENERGIZELOG (opcode 0x151)
- Periodic energize: divide by power display factor (rage/10, happiness/1000)

Leech/drain reclassification:
- Drain Life routed through SPELL_PERIODIC_LEECH (aura 53 check in spell DB)
- SPELL_HEAL suppressed for leech spells (covered by leech event)
- Power leech (aura 64): gainMultiplier read as f32, >0 = LEECH, ==0 = DRAIN
- _LEECH/_DRAIN suffix: amount, powerType(-2=health), extraAmount

Lua API:
- GetSpellInfo(spellId) -> name, rank, icon, castTime, minRange, maxRange, spellId
  Matches WotLK returns. DBC addresses verified from nampower + Ghidra:
  SpellRange.dbc (0xC0D79C), SpellIcon.dbc (0xC0D7EC),
  SpellCastTimes.dbc (0xC0D878). SpellRec offsets from nampower struct.

Reference docs:
- WOTLK_CLEU_SPEC.md: full suffix spec from Blizzard_CombatLog.lua + Skada
- WARDEN_CONCERNS.md: hook risk analysis and remaining parity gaps
2026-03-18 00:08:42 -07:00
MarcelineVQ e70015579f silicon: add 116 probe hooks for call-counting all explored functions
Probe infrastructure using comptime probeDetour() that generates
per-function detours: atomic counter increment + callOriginal passthrough.
Hit counts reported on shutdown. Hooks installed at lateInit (engine init),
not DLL load time.

Key findings during decompilation:
- 0x40CF81 is GetFPUControlWord, not ftol (silicon mislabel)
- Real __ftol at 0x40A2B0 (51+ callers, hot path)
- 0x7B7A80/7B7B10 use normal stack floats, not FPU register params
- 0x686640/686820/6868E0 are bounding volume ops, not vector ops
- 0x7786A0 is a UI model constructor, not SetModelLighting
2026-03-15 01:55:09 -07:00
MarcelineVQ 3c9a95d51e ssemaths: extract UnitXP math polyfill hooks into standalone module
Moved math_sse.zig and all 17 hook declarations + CriticalSection spin
count optimization from transform44 into new ssemaths module. Off by
default (-Dssemaths=true to enable).

transform44 retains its profiling hooks and blit_hub optimization.
ssemaths is a clean standalone module with its own mutex, install/remove
lifecycle, and lateInit for post-UnitXP hook clobbering.

Added performance note to math_sse.zig documenting that hook-based
replacement adds ~5-8 cycles overhead that makes small functions slower,
and that in-place patching is the path to realize the full 2-4x gains
shown in inlined benchmarks.
2026-03-14 22:28:31 -07:00
MarcelineVQ 692a02ed2c Move file cache to standalone module, add timer fix, fix refcount crashes
File cache (filecache module):
- Moved from transform44 sub-module to standalone src/filecache/
- 2-way set-associative cache (32768 sets x 2 ways) with FNV-1a hash + finalizer
- Fixed negative cache hit crash: zero output params before returning 0
  (FindFileInArchive reuses filename slot for out_outer_archive)
- Fixed path 2 crash: set out_outer_archive on all cache hit paths
- Fixed stale block_entry crash: cache block index instead of raw pointer,
  recompute from archive+0x290 on each hit
- Fixed archive-freed crash: use game's FindAndIncrementResourceReference
  (0x650780) instead of manual +0x38 increment -- validates archive is alive
- Periodic stats dump with projected time savings (hit=~1000cy vs miss=~30000cy)

Timer fix (transform44 sub-module, ported from VanillaFixes):
- TSC calibration via QPC reference over 500ms
- Enables TSC mode if game was using GetTickCount fallback
- NtSetTimerResolution for 0.5ms OS timer granularity
- SetProcessInformation to disable Windows 11 power throttling
- Always-on (no A/B toggle -- no measurable impact on Wine/Linux)
2026-03-14 14:57:58 -07:00
MarcelineVQ 55735d7b9e Add MPQ archive file cache: skip redundant chain walks on repeat file opens
Hook File_FindInArchive (0x6549a0) with a direct-mapped filename-verified
cache. First open does the full MPQ chain walk (~60K cycles), subsequent
opens hit the cache (~300 cycles). 80% hit rate in gameplay testing.

Cache design: 16384 entries, FNV-1a hash for slot index, raw filename
comparison (128 bytes) for collision safety. Stores outer_archive,
inner_archive, and block_entry per file. Negative cache for not-found files.
Refcount at +0x38 incremented on all output archives to match original
File_FindInArchive behavior (verified via Ghidra: FindAndIncrementResourceReference
at 0x650780, DecrementResourceReference at 0x6507e0).

Also: default build changed to ReleaseFast (works around Zig fastcall inreg
bug in Debug mode), logging gate changed to != ReleaseSmall, file cache
integrated as transform44 sub-module with A/B comparison timing in readout.
2026-03-13 23:05:38 -07:00
MarcelineVQ 79d9521953 Refactor addon system: derive module list from build.zig, prune inactive prefixes at runtime
- Eliminate hardcoded module_names in addons.zig — now derived from
  build.zig via all_module_names build option
- Add module_active.zig runtime registry: main.zig registers isActive
  pointers during install(), addons.zig queries them without importing
  each module directly
- Prune embedded file prefixes at startup: after all modules claim
  mutexes, build a runtime active_prefixes table excluding modules we
  don't own. findEmbeddedFile searches only active entries — no
  per-lookup isActive check on the hot path
- Tag both addon and asset prefixes with module_name so pruning applies
  to all embedded files for a module
- Rename src/markers/ → src/worldmarkers/, src/outline/api.zig →
  src/outline/outline.zig to follow {name}/{name}.zig convention
2026-03-13 11:40:49 -07:00
MarcelineVQ c770e053aa Add addonperf stub module for TBC+ addon profiling API
Registers GetAddOnMemoryUsage, UpdateAddOnMemoryUsage, GetAddOnCPUUsage,
UpdateAddOnCPUUsage, ResetAddOnCPUUsage, and GetScriptCPUUsage as global
Lua functions. All stubs for now — implementation will hook lua_Alloc
and FrameScript dispatch for per-addon tracking.
2026-03-12 23:38:36 -07:00
MarcelineVQ 0807612699 Add ReleaseFast SSE build unit, weather override Lua API, and research notes
build.zig: add clip_sse.zig as separate ReleaseFast compilation unit,
enable SSE/SSE2 target features, disable dpslog default.
main.zig: register SetWeatherOverride Lua func, call transform44.lateInit
for blit_hub hook capture.
RESEARCH.md: document GxDevice wrappers, weather control, RTQ batching.
2026-03-12 18:46:54 -07:00
MarcelineVQ 9965a50aab Add transform44 module stub for M2 bone transform optimization
Wires transform44 into build system and main.zig module table.
Module skeleton with mutex/logger, no hooks yet — analysis in progress.
2026-03-12 10:36:36 -07:00
MarcelineVQ 0f14213b0b Add logging module with auto-prefix, route all output through Logger
Replace console.zig with logging.zig: per-module Logger with auto
[name] prefix, optional file output, and destination routing. Convert
all modules from manual [name] prefixes and global con.print to Logger
instances. Remove redundant "Module loaded" lines. Replace
OutputDebugStringA in outline/tracker with Logger. Add dpslog module
with structured combat log events (SPELL_DMG, PERIODIC, HEAL, MELEE).
Add clickthrough module and bigcursor D3D9 cursor scaling.
2026-03-10 13:26:45 -07:00
MarcelineVQ d325c9f684 Use hook.cc.* aliases and migrate remaining hook.fastcall calls
Replace all local calling convention declarations (const fc/tc/sc)
with hook.cc.fastcall/thiscall/stdcall from zhook. Migrate remaining
17 hook.fastcall() inline asm call sites to hook.call() with typed
function pointers.
2026-03-09 11:16:52 -07:00
MarcelineVQ 9c96a94dc1 Migrate inline asm call sites to hook.call()
Replace hand-written inline asm blocks with hook.call() typed function
pointer dispatch across 10 files. Also migrates 4 D3D9 COM vtable
NULL-dispatch blocks using ?*anyopaque optional pointers.

Net removal: ~350 lines of inline asm replaced by single-line calls.
2026-03-09 10:28:55 -07:00
MarcelineVQ 541b9c97f0 Rename pngscreenshot to pngscreenshots 2026-03-08 22:09:38 -07:00
MarcelineVQ 8816cc14fd Add "Hide in Cities" toggle to minimap icons dropdown
Reads zone ID from 0xB4E314 and suppresses NPC/GO tracking in capital
cities (SW, IF, Darn, Org, TB, UC, Alah'Thalas) when enabled. Castle
icon converted from WC3-style PNG via png2blp.
2026-03-08 19:06:18 -07:00
MarcelineVQ 2c4132ead7 Rename screenshot module to pngscreenshot
Less generic DLL name for distribution.
2026-03-08 15:48:16 -07:00
MarcelineVQ eb7b7a94e4 Clean up minimap icons: remove WMO filtering, cache active tracking, namespace Lua API
Remove unused indoor/outdoor WMO filtering and gray blip tinting.
Cache active tracking state in a bool refreshed on config change
instead of scanning all entries per-object per-frame. Move
SetObjectTypeBlip into WeirdUtils table to keep it out of the
global namespace. Add minimap tracking section to DLL_README.
2026-03-08 13:37:44 -07:00
MarcelineVQ 7ccab8f802 Extract addon management into addons.zig with is_active gating
Move embedded file table, addon registration hooks, and loading logic
from main.zig into addons.zig. Each module's is_active callback gates
addon loading on mutex ownership so individual DLLs only load addons
for modules they control. Addon hooks are skipped entirely at comptime
when no addon-bearing modules are compiled in.

Also consolidates CheckFileExistence hook — customassets no longer hooks
it directly, instead exporting looseFilesLookup for main.zig's hook.
2026-03-08 12:59:51 -07:00
MarcelineVQ 9e4cbe4aaf Hook CheckFileExistence so game natively loads addon Bindings.xml
Move the CheckFileExistence (0x654DD0) hook from customassets into
main.zig's core file hooks. Embedded files now pass the game's
preloadFileWithFlags check, so LoadAddonRecursive handles Bindings.xml
loading naturally — respecting addon enabled/disabled state. Only hidden
addons still need explicit binding loading.
2026-03-08 12:37:59 -07:00
MarcelineVQ d2f91fe8c2 Replace screenshot addon with screenshotQuality CVar
Remove the embedded Screenshot addon (TOC + Lua) and WeirdUtilsScreenshot()
Lua function. Compression quality is now controlled entirely via a CVar
(saved to config.wtf), read fresh on each screenshot. CVar 0 disables PNG
and falls through to original TGA.
2026-03-08 12:24:19 -07:00
MarcelineVQ 6ce091607f Rename embedded addons to WeirdUtils_<name> namespace
Prefix all addon folder names with WeirdUtils_ to avoid collisions
with real addons. Rename SavedVariables global from UI_MinimapIcons
to WeirdUtils_MinimapIconsSettings.
2026-03-08 11:30:04 -07:00
MarcelineVQ 4052f8b26f Register DLL-embedded addons via LoadAddonTOC for SavedVariables support
Hook SetupAddonProcessing (0x51C740) to call LoadAddonTOC for each
embedded addon after the game's directory scan. This registers them in
the internal addon hash table so the game handles SavedVariables
loading/saving, file loading, and ADDON_LOADED events natively.

- Add SavedVariablesPerCharacter: UI_MinimapIcons to .toc
- Add VARIABLES_LOADED handler to load/initialize toggle state
- Add default=1 for Innkeeper, Repair, Brainwasher categories
- Write UI_MinimapIcons on toggle for save-on-logout persistence
- Remove manual callLoadFileListWithIncludes (game handles it now)
- Keep explicit Bindings.xml loading (preloadFileWithFlags bypass)
2026-03-08 11:25:01 -07:00
MarcelineVQ d28b6c8e04 Add Brainwasher GO tracking and Repair Bot reagent override
Add gameobject entry-ID tracking (go_entry) for Goblin Brainwashing
Device (1000333) with INV_Gizmo_01 icon. Extend TypeMapping to 3-way
enum (npc_flag, go_type, go_entry). Override Field Repair Bot 75B
(50041) to match reagent vendor filters despite having no subname.
2026-03-08 09:16:25 -07:00
MarcelineVQ 89b6082d73 Add DLL-side minimap NPC tracking with blip rendering
Hook ObjectEnumProc, RenderObjectBlips, and EnumVisibleObjects to classify
visible objects by NPC flags / GO type and render custom blip icons.

Includes Lua API (SetObjectTypeBlip), texture caching, WMO indoor/outdoor
filtering, and coordinate projection. Consolidate vendor subcategories
into single entry since vanilla only has one NPC_FLAG_VENDOR. Spell
tracking entries now toggle off when clicked while active.

Fix: queryMapObjIDs was __fastcall (not __thiscall) — pushing 3 stack
args but RET 0x8 only cleaned 2, corrupting ESP and crashing.
2026-03-07 20:29:09 -08:00
MarcelineVQ 528df27780 Add minimap tracking dropdown with Wrath-style NPC icons
Take over native MiniMapTrackingFrame to show a tracking spell
dropdown (Hunter Track X, Sense Undead/Demons, Find Herbs/Minerals)
plus NPC tracking categories with icons extracted from the 3.3.5
client (Auctioneer, Flight Master, Mailbox, Repair, etc.).
2026-03-07 17:20:43 -08:00
MarcelineVQ 9d51ff1c77 Rename sync functions and drop redundant GetMarkerDef
Rename SetMarkerDef → SetMarkerSync, ClearMarkerDef → ClearMarkerSync
to clarify their purpose. Remove GetMarkerDef from the table since
GetWorldMarker is now a public global.
2026-03-07 14:13:41 -08:00
MarcelineVQ 1e8091fcb5 Add GetWorldMarker, return position from WorldMarker, rename CanSetWorldMarker
- WorldMarker() now returns x,y,z,areaId on success (was just 1)
- New global GetWorldMarker(index) for querying marker positions
- Rename CanSetWorldMarkers → CanSetWorldMarker (singular)
- Addon uses WorldMarker return values directly instead of GetMarkerDef
2026-03-07 14:10:22 -08:00
MarcelineVQ 4f195c248f Auto-embed addon and asset files at compile time
build.zig scans module addon/ and assets/ directories, passes file
lists as build options. main.zig uses comptime helpers to @embedFile
each path and build the AddonPrefix table automatically. Adding or
removing files no longer requires editing main.zig.

Also renames markers addon files to match WoW addon name
(Markers.toc → WorldMarkers.toc, Markers.lua → WorldMarkers.lua)
and auto-generates loadAddonsDetour from the same module metadata.
2026-03-07 13:13:49 -08:00
MarcelineVQ 686d4bada0 Clean up module addons: remove logging, announcements, screenshot bindings
- Screenshot: remove Bindings.xml and login announcement, keep /ss commands
- Interact: reduce to just binding header setup
- Markers: remove all log() debug calls and login announcement
2026-03-07 11:22:18 -08:00
MarcelineVQ 6266d6ff10 Remove core addon, it only contained test functions
The WeirdUtils core addon only provided /wu slash commands, a version
global, and a test function. Remove it along with the WeirdUtils
dependency from all module addon TOC files -- the DLL controls addon
load order directly so the dependency was cosmetic.
2026-03-07 11:11:49 -08:00
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 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 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 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