bone_sse: fix ribbon emitter offsets (#18-19), teardown guard
Bug #18: Ribbon emitter track offsets completely wrong. Position was entry+0x24, actual tracks from assembly (0x716402-0x716AA9): Track 1 (Vec3): gate=+0x1C, AnimData=+0x10, output=+0x00 Track 2 (Vec3): gate=+0x38, AnimData=+0x2C, output=+0x30 Track 3 (float): gate=+0x70, AnimData=+0x64, output=+0x80 Track 4 (Vec3): gate=+0x54, AnimData=+0x48, output=+0x50 Bug #19: Track 4 output was +0xA0 (should be +0x50), and tracks 2/4 were float (should be Vec3). Wrong output offsets corrupted stack data, causing bone_rt pointer to contain float bit patterns. Teardown: hook World_HandleLogoutCleanup (0x491180) instead of CleanupWorldAndEntities (0x66FC40). Fires at START of logout sequence before any Lua callbacks trigger model processing on freed data. Prologue: PUSH ESI/EDI, epilogue: POP EDI/ESI, JMP (tail call). Also: added bone_sse_reference.zig as separate compilation unit for A/B testing the proven-working version independently.
This commit is contained in:
@@ -27,10 +27,10 @@ const module_list = [_]ModuleDesc{
|
||||
.{ .name = "healtextfix", .desc = "Enable SuperWoW heal text fix" },
|
||||
.{ .name = "bigcursor", .desc = "Enable big cursor module" },
|
||||
.{ .name = "clickthrough", .desc = "Enable GO click-through (enlarge GO model bounds)" },
|
||||
.{ .name = "dpslog", .desc = "Enable structured combat log events for addons", .default = false },
|
||||
.{ .name = "dpslog", .desc = "Enable structured combat log events for addons" },
|
||||
.{ .name = "transform44", .desc = "Enable transformMatrix4x4 hook", .default = false },
|
||||
.{ .name = "addonperf", .desc = "Enable addon memory/CPU profiling API" },
|
||||
.{ .name = "filecache", .desc = "Enable MPQ archive file cache", .default = false },
|
||||
.{ .name = "addonperf", .desc = "Enable addon memory/CPU profiling API", .default = false },
|
||||
.{ .name = "filecache", .desc = "Enable MPQ archive file cache" },
|
||||
.{ .name = "ssemaths", .desc = "Enable UnitXP x87 math polyfill replacements (SSE)", .default = false },
|
||||
.{ .name = "silicon", .desc = "Enable SSE2 math replacements (ported from libSiliconPatch)", .default = false },
|
||||
};
|
||||
@@ -71,6 +71,14 @@ pub fn build(b: *std.Build) void {
|
||||
.optimize = .ReleaseFast,
|
||||
}),
|
||||
});
|
||||
const bone_sse_ref_obj = b.addObject(.{
|
||||
.name = "bone_sse_ref",
|
||||
.root_module = b.createModule(.{
|
||||
.root_source_file = b.path("src/transform44/bone_sse_reference.zig"),
|
||||
.target = target,
|
||||
.optimize = .ReleaseFast,
|
||||
}),
|
||||
});
|
||||
const math_sse_obj = b.addObject(.{
|
||||
.name = "math_sse",
|
||||
.root_module = b.createModule(.{
|
||||
@@ -95,6 +103,7 @@ pub fn build(b: *std.Build) void {
|
||||
});
|
||||
lib.root_module.addObject(clip_sse_obj);
|
||||
lib.root_module.addObject(bone_sse_obj);
|
||||
lib.root_module.addObject(bone_sse_ref_obj);
|
||||
lib.root_module.addObject(math_sse_obj);
|
||||
b.installArtifact(lib);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user