Extract duplicated WoW 1.12.1 addresses and game accessor functions into shared modules (src/offsets.zig, src/wow.zig), replacing 5+ copies of getObjectByGUID, isInBattleground, isValidPtr, etc. - src/offsets.zig: shared address constants (object manager, descriptor fields, map/zone, core function addresses, D3D9/GX) - src/wow.zig: shared accessor functions (pointer validation, object manager traversal, field reads, unit helpers, battleground detection, game function wrappers, raid target cache) - Update 10 modules to import from shared instead of inline constants - Remove outline/wow.zig (promoted to src/wow.zig) - Trim outline/offsets.zig and markers/offsets.zig to module-specific only
37 lines
1.7 KiB
Zig
37 lines
1.7 KiB
Zig
//! Outline-specific WoW 1.12.1 memory addresses and struct offsets.
|
|
//!
|
|
//! Shared addresses (object manager, game functions, etc.) live in src/offsets.zig.
|
|
|
|
// =============================================================================
|
|
// Model ownership (offsets from model pointer)
|
|
// =============================================================================
|
|
|
|
/// model + this → direct owner object pointer (set by InitializeModelWithParameters).
|
|
pub const MODEL_OWNER_DIRECT: usize = 0x28;
|
|
|
|
/// model + this → render callback owner pointer (set by SetRenderCallbacks).
|
|
pub const MODEL_OWNER_CALLBACK: usize = 0x3C0;
|
|
|
|
// =============================================================================
|
|
// Render context
|
|
// =============================================================================
|
|
|
|
/// renderContext + this → current model pointer being rendered.
|
|
pub const RENDER_CONTEXT_MODEL_OFFSET: usize = 0x3310;
|
|
|
|
// =============================================================================
|
|
// Hooked function addresses (model rendering pipeline)
|
|
// =============================================================================
|
|
|
|
/// CM2SceneRenderDraw - main batch rendering entry point.
|
|
/// __thiscall(this, viewMatrix, batchData, batchIndices, batchCount)
|
|
pub const FN_CM2SCENE_RENDER_DRAW: usize = 0x0070b360;
|
|
|
|
/// CM2Model_ManageRenderListNode - called for every model added/removed from render list.
|
|
/// __thiscall(model_ECX, addToList_stack)
|
|
pub const FN_CM2MODEL_MANAGE_RENDER_LIST: usize = 0x00710b90;
|
|
|
|
/// CM2Scene_DrawModelBatchProjected - called per batch (type 0) during rendering.
|
|
/// __fastcall(renderContext_ECX)
|
|
pub const FN_DRAW_BATCH_PROJ: usize = 0x0070cb30;
|