From 46c7cf2b80a5c1e65619852eef78cec24b3ce96d Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 2 Sep 2026 17:07:15 +0700 Subject: [PATCH] spells shake the camera, and the sound keeps playing in the background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - spells shake the camera: `SpellEffectCameraShakes.dbc` loads beside `CameraShakes.dbc` as the group table, `SpellVisualKit` field 14 is the shake column (58 of 1772 kits carry one — War Stomp, Thunder Clap, Kodo Stomp, the ~50 Knockdown/Slam/Charge impacts, every summon, Sapper Charge, Earthquake, Sapphiron's death), and the kit shake fires exactly once per play from the first effect node's one-time arm pass (`0x620e11`), the same leg that plays the kit sound one field over — the older "fires only if nothing else did" reading would have silenced every kit with a populated effect slot; `$SHK` markers fire from GameObject and DynamicObject hosts only (the titan chest, the bomb wagon); one deliberate deviation — the reference reads a bone-attached node's position twelve instructions before it is written, so 26 of its 58 shake kits shake at the world origin and are culled by the 80 yd cut, which is an uninitialised field, not a design; 21 of 24 presets now have a live producer, up from 6 - the sound keeps playing when the window loses focus, if you want it to: 1.12 mutes everything on `WM_ACTIVATE` and offers no way out, so benilla ships that as the default (`Sound_EnableSoundWhenGameIsInBG` "0") and puts an Audio-page checkbox on it — a gate appended LAST in the main-track chain, downstream of every tap, so an unattended capture still records; wow-re's round settled that music is not exempt and that it is a mute, not a pause - a building's far side no longer draws through its own walls: the camera-inside leg has three passes and we had one and a half — Pass 2 admits an exterior-shell group only against a frustum clipped to ONE deferred window (we marked every such group visible against the full view, under a comment calling it a benign over-draw), and Pass 3, which we had none of, draws the 24 `0x10000` groups (14 in Stormwind, 6 across Dire Maul, Razorfen's four 450–520 yd shells) from anywhere, frustum-tested on both legs by byte-identical setup; there is no antiportal branch in 5875 and no such flag in its data (815/815 roots and 5220/5220 groups censused, no bit above 18 ever set) - the macro window is the reference's own `Blizzard_MacroUI`, and `GlobalStrings.lua` — line 1 of the reference's own toc — was missing from our manifest entirely (the app loaded it out of band at startup, so the client was right and every harness that loaded the manifest was not); exactly one `` runs, the most-derived, because `SetScript` releases the slot before it looks at the new body — which is why the reference re-states the template's width line in tab 1 and not tab 2 Co-Authored-By: Claude Fable 5.1 --- crates/benilla-app/assets/ui/MacroFrame.xml | 972 ------------------ crates/benilla-app/assets/ui/OptionsFrame.xml | 32 + .../benilla-app/assets/ui/SpellBookFrame.xml | 4 +- crates/benilla-app/assets/ui/UIParent.xml | 13 + crates/benilla-app/assets/ui/UiPanels.xml | 2 +- crates/benilla-app/assets/ui/benilla.toc | 41 +- crates/benilla-app/src/bindings.rs | 12 + crates/benilla-app/src/camera_shake.rs | 284 ++++- crates/benilla-app/src/capture/fixtures.rs | 4 +- crates/benilla-app/src/creature_anim.rs | 3 +- .../src/creature_anim/spell_visual.rs | 58 +- .../src/creature_anim/spell_visual/tests.rs | 13 +- crates/benilla-app/src/cvars.rs | 32 +- crates/benilla-app/src/sound/mixer.rs | 115 ++- crates/benilla-app/src/sound/mod.rs | 76 ++ crates/benilla-app/src/ui_macro/tests.rs | 13 + .../src/ui_script/bagnon_render_tests.rs | 13 + .../src/ui_script/bottom_hud_tests.rs | 26 + .../src/ui_script/cinematic_tests.rs | 13 + .../src/ui_script/frame_flag_gate.rs | 13 + .../benilla-app/src/ui_script/macro_tests.rs | 412 ++++---- .../src/ui_script/options_tests.rs | 80 +- .../benilla-app/src/ui_script/quiver_tests.rs | 13 + .../benilla-app/src/ui_script/reference_ui.rs | 74 ++ .../src/ui_script/resolve_bench.rs | 13 + .../src/ui_script/shipped_xml_tests.rs | 130 +++ .../src/ui_script/spellbook_tests.rs | 52 +- .../src/ui_script/world_map_tests.rs | 13 + .../examples/wmo_antiportal_census.rs | 499 +++++++++ .../src/bin/benilla-extract/scan/mod.rs | 2 +- .../src/bin/benilla-extract/shakecensus.rs | 284 ++++- .../src/bin/benilla-extract/spellvis.rs | 22 +- crates/benilla-formats/src/camera_shakes.rs | 221 +++- crates/benilla-formats/src/creatures.rs | 7 + crates/benilla-formats/src/lib.rs | 2 +- .../benilla-formats/src/spell_visual/mod.rs | 22 +- crates/benilla-world/src/exterior_cull.rs | 8 +- crates/benilla-world/src/wmo_portal/mod.rs | 456 +++++++- crates/benilla-world/src/wmo_portal/probe.rs | 18 + 39 files changed, 2752 insertions(+), 1315 deletions(-) delete mode 100644 crates/benilla-app/assets/ui/MacroFrame.xml create mode 100644 crates/benilla-formats/examples/wmo_antiportal_census.rs diff --git a/crates/benilla-app/assets/ui/MacroFrame.xml b/crates/benilla-app/assets/ui/MacroFrame.xml deleted file mode 100644 index 91d6e608..00000000 --- a/crates/benilla-app/assets/ui/MacroFrame.xml +++ /dev/null @@ -1,972 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - self:RegisterForDrag("LeftButton") - BenillaMacroButton_OnClick(self) - PickupMacro(getglobal("BenillaMacroFrame").macroBase + self:GetID()) - - - - - - - BenillaMacroPopupButton_OnClick(self) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - self:SetChecked(nil) - PickupMacro(getglobal("BenillaMacroFrame").selectedMacro) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - self:SetBackdropBorderColor(TOOLTIP_DEFAULT_COLOR.r, TOOLTIP_DEFAULT_COLOR.g, TOOLTIP_DEFAULT_COLOR.b) - self:SetBackdropColor(TOOLTIP_DEFAULT_BACKGROUND_COLOR.r, TOOLTIP_DEFAULT_BACKGROUND_COLOR.g, TOOLTIP_DEFAULT_BACKGROUND_COLOR.b) - - - - - - - - - - - - - - - - - - - - - BenillaScrollBar_OnValueChanged(self, arg1) - - - - - - - - BenillaMacroFrameText_OnTextChanged(self) - self:ClearFocus() - - - - - BenillaMacroFrameScrollFrame_OnLoad(self) - - - - - - - - - - - - - - - - - - - - BenillaMacroFrame_OnLoad(self) - self:RegisterEvent("UPDATE_MACROS") - - BenillaMacroFrame_OnEvent(self, event) - - getglobal("BenillaMacroFrameTab2"):SetText(BenillaMacroFrame_TabTwoLabel()) - BenillaMacroFrame_OnShow() - UpdateMicroButtons() - - - BenillaMacroFrame_OnHide() - UpdateMicroButtons() - - BenillaScroll_OnMouseWheel(getglobal("BenillaMacroFrameScrollFrame"), arg1) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaMacroPopupOkayButton_Update() - getglobal("BenillaMacroFrameSelectedMacroName"):SetText(self:GetText()) - - getglobal("BenillaMacroPopupFrame"):Hide() - - -- The ref's own spelling, and now literally ours: IsEnabled answers the - -- NUMBER 1 or 0 (button.rs, wow-re button-enabled-state.md). Plain - -- truthiness would be WRONG here — 0 is truthy in Lua. - if getglobal("BenillaMacroPopupOkayButton"):IsEnabled() ~= 0 then - BenillaMacroPopupOkayButton_OnClick() - end - - - - - - - - - - - - - - ScrollFrame_OnLoad() - self.updateFunc = BenillaMacroPopupFrame_Update - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - BenillaMacroPopupFrame_OnShow(self) - BenillaMacroPopupFrame_OnHide(self) - BenillaFauxScrollFrame_OnMouseWheel(getglobal("BenillaMacroPopupScrollFrame"), arg1) - - - diff --git a/crates/benilla-app/assets/ui/OptionsFrame.xml b/crates/benilla-app/assets/ui/OptionsFrame.xml index 7f9c6376..0fb88a6d 100644 --- a/crates/benilla-app/assets/ui/OptionsFrame.xml +++ b/crates/benilla-app/assets/ui/OptionsFrame.xml @@ -655,6 +655,17 @@ .. "Below 100% trades sharpness for frame rate; above 100% is supersampling, which " .. "smooths edges at the cost of frame rate. Applies when you click Apply." + -- Enable Sound in Background (1847). An era row: 1.12 hardcodes the behaviour and has no + -- checkbox, so there is no OPTION_TOOLTIP_* to resolve and the BENILLA_ prefix applies + -- for the same reason Render Scale's does -- the reference's namespace stays the + -- reference's. The last line is not padding: mute is not pause on either client, and a + -- player who expects a paused fight to resume where it stopped is owed the difference. + BENILLA_TOOLTIP_BACKGROUND_SOUND = + "Keeps the game's sound playing while you are working in another window.\n\n" + .. "With this off, switching away silences the game and switching back restores it. " + .. "Sounds keep running while they are silenced, so a long one may have finished by " + .. "the time you return." + -- Display Mode (1650). 1.12's own OPTION_TOOLTIP_WINDOWED_MODE cannot ride this row: it -- is written for the checkbox it belonged to ("Check to play in a non-fullscreen -- window..."), and its second half describes a desktop-gamma consequence of an exclusive @@ -674,6 +685,7 @@ Audio = { "RowEnableAll", "RowMaster", "RowSound", "RowMusic", "RowAmbience", "RowEnableMusic", "RowEnableAmbience", "RowEnableErrorSpeech", + "RowBackgroundSound", }, Graphics = { "RowUiScale", "RowFarclip", "RowWorldDetail", @@ -2356,6 +2368,26 @@ self.soundQuirk = 1 + + + + + + + + OptionsRow_OnLoad(self, "Sound_EnableSoundWhenGameIsInBG", + "Enable Sound in Background", + "BENILLA_TOOLTIP_BACKGROUND_SOUND") + self.soundQuirk = 1 + +