Commit Graph
100 Commits
Author SHA1 Message Date
MarcelineVQ 3e2739dd91 Add tea token fetching instructions to RELEASING.md 2026-03-09 22:43:27 -07:00
MarcelineVQ d4e9c0417a Remove debug logging, update DLL_README with clickthrough 2026-03-09 22:42:57 -07:00
MarcelineVQ d155914059 Add NPC click-through and fix NPC_FLAGS descriptor offset
Player hit → re-raycast without players, accept interactable NPCs
(npc_flags != 0: vendors, quest givers, flight masters, etc.) or GOs.
Unit hit → re-raycast GO-only, accept interactable GOs.

Fix DESC_NPC_FLAGS: was 0x8D*4 (0x234), should be 0x93*4 (0x24C) —
field index includes OBJECT_END (0x06) base, matching minimapicons.
2026-03-09 21:34:33 -07:00
MarcelineVQ 85682f186b Add clickthrough module: GO click-through via dual WorldIntersectionTest
Hooks WorldIntersectionTest (0x480DF0) to detect when the raycast hits a
unit/player, then re-calls the original with GO-only flags (0x04). If an
interactable GO is behind the unit/player on the same ray, replaces the
hit result so the game targets the GO instead.

Uses CallSpellCastHandler (0x5F8800) for interactability filtering —
any usable GO (mailboxes, soulwells, portals, etc.) triggers click-through.
2026-03-09 20:58:56 -07:00
MarcelineVQ db8178f08f Add wiki/ to gitignore 2026-03-09 13:54:14 -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 b688a3dee9 Add Oranges (Refreshment Table) tracking to minimap icons 2026-03-08 22:09:44 -07:00
MarcelineVQ 541b9c97f0 Rename pngscreenshot to pngscreenshots 2026-03-08 22:09:38 -07:00
MarcelineVQ b6a2d066f7 Hide own summoned units (e.g. repair bot) from minimap icons
Cache local player GUID per enumeration cycle and compare against
UNIT_FIELD_SUMMONEDBY before showing a summoned unit's blip.
2026-03-08 19:20:17 -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 7bbce3b8a9 Use race-based faction check and CallSpellCastHandler for GO interactability
Replace faction template comparison with race-based same-faction check
since faction template is dynamically overwritten in cross-faction groups.
Uses bitmask lookup for Alliance/Horde races (including High Elf/Goblin).

Replace GO flag checks with CallSpellCastHandler (0x5f8800) — the same
virtual dispatch the game's cursor system uses to determine if a GO is
interactable. This correctly handles enemy-summoned mailboxes and
brainwashers that have no distinguishing descriptor flags.
2026-03-08 17:44:54 -07:00
MarcelineVQ 08cbbb2b8e Add faction/interactability filtering to minimap icons
Filter hostile units, wrong-faction summoned NPCs, and non-interactable
game objects from minimap tracking. Dynamic checks (UnitReaction, owner
faction, GO_FLAG_NO_INTERACT) run every frame since group membership can
change. GUID cache still handles static classification (NPC flags/subname).

Also fix missing ECX clobber in outline UnitReaction inline asm.
2026-03-08 17:15:17 -07:00
MarcelineVQ 3485699422 Update releasing docs: header upload, no unreleased names, preserve trailing spaces 2026-03-08 15:55:17 -07:00
MarcelineVQ 2c4132ead7 Rename screenshot module to pngscreenshot
Less generic DLL name for distribution.
2026-03-08 15:48:16 -07:00
MarcelineVQ 4e4743afed Optimize minimap icons hot path and add Trade/Brainwasher icons
Performance:
- GUID->blip result cache (256-entry direct-mapped) skips classification
  after first match; only position lookup remains per-frame
- Active NPC flag bitmask rejects most objects before the 16-entry loop
- Split tracking by object type (unit vs GO) for early exit
- Per-frame minimap info cache (center/radius/scale read once per cycle)
- Skip subname/entry reads when no filters are active
- Batch draw calls by texture (sort blips, one GxRsSet per unique texture)
- Split drawMinimapTexture into getGxTex + drawMinimapBlip for batching

Assets:
- Add Trade.blp icon (INV_Potion_85 derived) for Trade Goods vendors
- Update Brainwasher.blp with stark contrast version, downsized to 32x32
- Add png2blp.py converter (PNG to BLP2 DXT3 with mipmaps)
2026-03-08 15:33:42 -07:00
MarcelineVQ 3a84185c07 Reorder minimap tracking categories and update addon system docs 2026-03-08 14:02:02 -07:00
MarcelineVQ bd111e8b3c Fix missing ECX/EDX clobbers in minimapicons inline asm
All inline asm call blocks must clobber ECX and EDX since callees
destroy them. Without clobbers, ReleaseSmall reuses register values
the callee already overwrote, causing NULL dereference crashes.
2026-03-08 13:46:53 -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 95df207eb8 Hide embedded addons from login addon list via +0x29 flag
All embedded addons now register through LoadAddonTOC (no more
separate hidden loading path). For addons marked hidden, walk the
addon linked list after registration and set the +0x29 exclusion
byte so DeserializeAddonData skips them when building the flat
display array. Removes the LoadAddonsRecursively hook since the
game's native LoadAddonRecursive handles all addon loading.
2026-03-08 13:13:46 -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 00e7e8b472 Use [WeirdUtils] prefix in addon TOC titles for consistent display 2026-03-08 12:24:52 -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 cd7c867f00 Add embedded Brainwasher/Poison BLP assets, fix GO tracking activation
Convert custom icon PNGs to BLP2 DXT5 with correct header layout
(mipSizes at 0x54). Fix hasActiveTracking() to check g_go_id_tracking
so brainwasher works standalone. Support per-category scale in Lua.
2026-03-08 10:05:41 -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 de908eb64f Add vendor subcategories with locale-aware filtering and ammo tracking
Heap-allocated pipe-delimited subname filters for vendor subcategories:
Poison, Reagent, Trade Goods, Ammunition — each with 6-locale support.
Fix same-priority same-flag classification to first-match-wins ordering.
Rename Vendor to General Vendor, fix Reagent icon path to Reagents.blp.
2026-03-08 09:01:27 -07:00
MarcelineVQ 1b9396f8dc Add subname-based NPC classification for minimap tracking
Read creature subname/title from the creature cache (obj+0xB30 → entry+0x10)
to distinguish NPC subtypes sharing the same flag. SetObjectTypeBlip now
accepts include and exclude subname filters (args 4 and 5).

Class Trainer filters by player class name (e.g. "Druid"), Profession
Trainer excludes the player class. Entries with include filters take
priority over exclude-only, which take priority over unfiltered catch-all.
Consolidate vendor subcategories into single Vendor entry.
2026-03-07 21:23:34 -08: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 44f13c42f4 Fix tooltip: hide on dropdown open, conditional cancel hint 2026-03-07 17:28:17 -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 5689349158 Remove XYZ debug model assets 2026-03-07 14:27:56 -08:00
MarcelineVQ f836850768 Separate UI feedback from public Lua API
Public functions (WorldMarker, ClearWorldMarker) no longer show chat
messages — return values indicate status. New WorldMarkers.UI_WorldMarker
and UI_ClearWorldMarker wrappers provide user-facing feedback for
slash commands and keybindings. Update README with new API signatures.
2026-03-07 14:23:52 -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 edf0be9dbb Distinguish placement failure from permission denied in WorldMarker
DLL now returns -1 for placement failures (no terrain, unit not found)
instead of nil. Lua side shows a throttled (2s cooldown) failure message
separate from the permission denied message.
2026-03-07 11:27:14 -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 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