diff --git a/crates/benilla-adt/src/lib.rs b/crates/benilla-adt/src/lib.rs index 61b6fe358..3d3213441 100644 --- a/crates/benilla-adt/src/lib.rs +++ b/crates/benilla-adt/src/lib.rs @@ -115,7 +115,7 @@ impl LiquidVertex { /// One MCLQ liquid block: a 9×9 absolute-height grid and an 8×8 cell-flag grid. An MCNK carries /// one per set liquid header bit, back to back (`0x6af7a3`–`0x6af7cb`): two at the 28 shipped river -/// mouths. The liquid type is each cell's flag nibble (`0x6ba970`, `0x68d9b0`), not a header bit. +/// mouths. The liquid type is each cell's flag nibble (`0x68b21f`, `0x68d9b0`), not a header bit. #[derive(Debug, Clone)] pub struct MclqChunk { pub min_height: f32, diff --git a/crates/benilla-app/src/bindings/chord.rs b/crates/benilla-app/src/bindings/chord.rs index 8f5e21243..a4fec770c 100644 --- a/crates/benilla-app/src/bindings/chord.rs +++ b/crates/benilla-app/src/bindings/chord.rs @@ -119,8 +119,8 @@ pub(crate) fn key_token(k: KeyCode, layout: &LayoutNames) -> Option { /// codes the table cannot name, `0x210` and `0x211` (ScrollLock and Pause, and F14 and F15 on a /// Mac). Every other key without a name never reaches the walk: the Windows key table drops it /// where `MapVirtualKeyA` answers 0 (`0x42da39`: the Windows and Menu keys, media keys, a key the -/// layout drops), the Mac table `0x5bf320` has -1 for Command and fn. Unlike [`key_token`], which -/// is a binding's, a modifier still gets a down and an up. +/// layout drops), the Mac client's table `0x5bf320` has -1 for Command and fn. Unlike +/// [`key_token`], which is a binding's, a modifier still gets a down and an up. pub(crate) fn walk_name(k: KeyCode, layout: &LayoutNames) -> Option { if let Some(name) = key_token(k, layout) { return Some(name.to_string()); @@ -157,8 +157,8 @@ fn fixed_name(k: KeyCode) -> Option { F10 => Word("F10"), F11 => Word("F11"), F12 => Word("F12"), - // On a Mac F13 is print-screen: the Mac key table `0x5bf320` maps keycode `0x69` to - // `0x212`, `PRINTSCREEN`, and macOS has no PrintScreen keycode. + // On a Mac F13 is print-screen: the Mac client's key table `0x5bf320` maps keycode + // `0x69` to `0x212`, `PRINTSCREEN`, and macOS has no PrintScreen keycode. #[cfg(target_os = "macos")] F13 => Word("PRINTSCREEN"), // `IsValidBindingKeyString` accepts `F` + any digits (`0x846c04`) and the Mac table maps diff --git a/crates/benilla-app/src/bindings/layout.rs b/crates/benilla-app/src/bindings/layout.rs index b373b0f37..f40525fc4 100644 --- a/crates/benilla-app/src/bindings/layout.rs +++ b/crates/benilla-app/src/bindings/layout.rs @@ -34,7 +34,7 @@ impl Position { /// The keys a layout names: the letters, the digits, the punctuation, the ISO and JIS extras and /// the keypad comma. Windows sends `VK_OEM_102`, `VK_ABNT_C2` and `VK_SEPARATOR` to the layout arm -/// like any `VK_OEM_*` key, and the Mac table leaves the ISO key `0x0A` and the keypad comma +/// like any `VK_OEM_*` key, and the Mac client's table leaves the ISO key `0x0A` and keypad comma /// `0x5F` to `KeyTranslate` (`-1` at `0x5bf320`). winit 0.30 cannot deliver those on a Mac, as on /// main: it reports `0x0A` as `Backquote` (whose scancode it gives back as `0x32`) and leaves /// `0x5E` and `0x5F` unidentified, so the `IntlBackslash`, `IntlRo` and `NumpadComma` arms never diff --git a/crates/benilla-app/src/cvars/table.rs b/crates/benilla-app/src/cvars/table.rs index 7008af093..54a2720b1 100644 --- a/crates/benilla-app/src/cvars/table.rs +++ b/crates/benilla-app/src/cvars/table.rs @@ -697,8 +697,9 @@ pub(crate) const REGISTERED: &[Registered] = &[ same("texLodBias", "0.0").checked(benilla_ui::script::check_tex_lod_bias), // `baseMip` (`0x6887aa`, "0", flags 1, callback `0x689090`, record `[0xc7f2f0]`), behind // `Get/SetBaseMip` as `1 − level`: the callback refuses outside [0, 1] ("BaseMip must be 0 or - // 1") and sets the device's first uploaded mip level (`0x589bf0`, read at `0x59f6ce`). benilla - // uploads every level; the write is kept and has no effect. `hwDetect` leaves it at 0. + // 1") and sets the device's first uploaded mip level (`0x589bf0`, read at `0x59f6d1`, on + // Direct3D `0x5a08fc`). benilla uploads every level; the write is kept and has no effect. + // `hwDetect` leaves it at 0. same("baseMip", "0").checked(benilla_ui::script::check_base_mip), // `spellEffectLevel` (`0x688900`: name `0x869324`, default `0x843068` "2", flags 1, callback // `0x689510`, record `[0xc7f2a4]`), the Spell Detail slider (`OptionsFrame.lua:32`). The diff --git a/crates/benilla-app/src/loading_screen/input.rs b/crates/benilla-app/src/loading_screen/input.rs index 533c78bee..b799cb1f6 100644 --- a/crates/benilla-app/src/loading_screen/input.rs +++ b/crates/benilla-app/src/loading_screen/input.rs @@ -11,9 +11,9 @@ //! released on world enter (`0x4908c0 → 0x49093c → 0x5144c0`). //! - Deviation: the wheel is swallowed, where the reference still zooms the hidden camera, because //! nothing should act through the screen. -//! - Deviation: the world pick is cleared, where the reference's `0x481790` keeps picking at the -//! frozen point, because ours is quieter and looks the same: the reference's pointer cannot -//! move, so its pick changes nothing visible. +//! - Deviation: the world pick is cleared, where the reference's freezes: the screen's layer +//! blocks the frame pass (bit 0 clear, `0x406808` → `0x4083c0`), so `0x481790` does not run, +//! except after a transport arrival (`0x5debb6`), when it picks at the frozen point. //! //! Taken: the button planes ([`swallow`]), the raw message queues and the window's event stream //! (no reader but the input records'), the mouse accumulators, and the window's cursor position, diff --git a/crates/benilla-app/src/player/camera_dynamics.rs b/crates/benilla-app/src/player/camera_dynamics.rs index 399c38d01..4b94aea9a 100644 --- a/crates/benilla-app/src/player/camera_dynamics.rs +++ b/crates/benilla-app/src/player/camera_dynamics.rs @@ -158,8 +158,8 @@ use crate::creature_anim::move_flags as mf; /// seated from the unbiased pitch (`0x50ee32`-`0x50ee58`); the body's aim is the sum (`0x5103e0`). /// /// The release's `0x511010` holds the bias while the Track latch is up and tracking is Never, or -/// a move-type-0 click-to-move order is in flight (`[0xc4d888]`); benilla has no click-to-move, -/// so only the first is built. +/// the auto-move mode (`[0xc4d888]`) is 0, keep facing the target; benilla has no mode 0, so +/// only the first is built. pub(super) struct SmartPivot { /// The bias channel `[cam+0x104]`; its armed bit is the reference's `[cam+0x90] & 0x8000000`. bias: SmoothChannel, diff --git a/crates/benilla-app/src/player/camera_zoom.rs b/crates/benilla-app/src/player/camera_zoom.rs index c993440dd..80054c478 100644 --- a/crates/benilla-app/src/player/camera_zoom.rs +++ b/crates/benilla-app/src/player/camera_zoom.rs @@ -7,7 +7,9 @@ use super::camera::CameraControl; /// The zoom floor, yd (`ds:0x8089a8` = 0.0): at 0 the eye sits at the framing pivot, inside the /// head, and the avatar fades out. Deviation: the starting zoom, [`CAM_DIST_DEFAULT`], is 15 yd -/// where the reference's `cameraDistance` is 5.55 (`0x84f488`), for a wider view. +/// where the reference starts at 5.55, the third-person-A row of its default table `0x84f488` +/// that `cameraView` 1 picks (`0x50c17a`, `0x50c18b`; the `cameraDistance` CVar itself registers +/// "0.0"), for a wider view. pub(super) const CAM_DIST_MIN: f32 = 0.0; /// The zoom ceiling, yd (`ds:0x8089a4` = 50.0): the cap on [`ZoomLimit`] (`0x511309`) and the top /// of the distance validator `0x50b310`; also the clamp for a distance read back off disk. diff --git a/crates/benilla-app/src/portrait/mod.rs b/crates/benilla-app/src/portrait/mod.rs index 0da7dabfe..dcb139c66 100644 --- a/crates/benilla-app/src/portrait/mod.rs +++ b/crates/benilla-app/src/portrait/mod.rs @@ -16,8 +16,9 @@ //! [`frame`]. The bake is a fresh instance frozen at Stand (`0x707400`, `0x7121a0`). //! //! Deviation: the round portraits bake at 256², not 64², because the 64² still is a resolution -//! limit, not a look; and under a fixed studio light, not the ambient state, because that neutral -//! light is the chosen portrait look (`light::BoothLight`). +//! limit, not a look; and under benilla's studio light (`light::BoothLight`), the chosen portrait +//! look, in place of the reference's own fixed rig (`0x525b10`, pushed at `0x52562e`: a 0.45 grey +//! ambient and a white directional). //! //! The frozen Stand phase is t=0; the reference's sampling clock is untraced. //! diff --git a/crates/benilla-app/src/shutdown.rs b/crates/benilla-app/src/shutdown.rs index a087e62bd..eaea82641 100644 --- a/crates/benilla-app/src/shutdown.rs +++ b/crates/benilla-app/src/shutdown.rs @@ -49,8 +49,9 @@ pub(crate) fn on_app_exit(app: &mut App, systems: ScheduleConfigs `0x423ca0` -> `0x41f5d0` -> `0x422030`), -/// with no logout timer, at the login screen and in game alike. A tiling window manager (i3, +/// `0x42d292`) and closes at once: the running client's callback `0x63c9a0` (installed from +/// `0x402840`, asked at `0x423a21`) answers 0 and tears the context down (`0x41f9b0`), with no +/// logout timer, at the login screen and in game alike. A tiling window manager (i3, /// sway, Hyprland) binds nothing to it, so benilla reads the chord itself and asks for the same /// close, which the shutdown tail above already serves. Not on macOS: `Cmd+Q` is /// [`benilla_world::mac_quit`]. diff --git a/crates/benilla-app/src/sound/money.rs b/crates/benilla-app/src/sound/money.rs index 8e2520d09..3b0d2c435 100644 --- a/crates/benilla-app/src/sound/money.rs +++ b/crates/benilla-app/src/sound/money.rs @@ -5,8 +5,9 @@ //! //! The first value after login or reconnect seeds without playing; whether the reference's watcher //! fires on the login set is untraced. Deviation: the reference also plays an optimistic coin at -//! the loot-money click, and at the auto-loot sweep's money, once a session (`0x4c201b`-`0x4c2020`, -//! the same `0x458030` call), so looted money sounds twice; benilla plays the watcher's coin +//! the loot-money click, and at the auto-loot sweep's money, once per loot source +//! (`0x4c201b`-`0x4c2020`, the same `0x458030` call; `0xb71bc4` set at `0x4c221e`, reset at +//! `0x4c1d95`), so looted money sounds twice; benilla plays the watcher's coin //! alone, because one coin on the confirmed change reads cleanly and the round trip the early coin //! hides is imperceptible on a local server. diff --git a/crates/benilla-app/src/sound/ui.rs b/crates/benilla-app/src/sound/ui.rs index 793429f96..dd1137bef 100644 --- a/crates/benilla-app/src/sound/ui.rs +++ b/crates/benilla-app/src/sound/ui.rs @@ -189,7 +189,7 @@ fn play_item_gesture_sounds( /// - An item plays its display's sound alone (`SetCursorItem`, `ClearCursor`'s item arm). /// - A preview (modes 5, 7, 9) grabs with its display's pickup alone (`0x495154`), and clears with /// its put-down, then `INTERFACESOUND_CURSORDROPOBJECT` (`0x49526a`, `0x495291`). -/// - A spell, macro (`0x494f60`), pet action (`0x494e20`) or stabled pet (`0x495010`) plays the +/// - A spell, macro (`0x494f80`), pet action (`0x494e20`) or stabled pet (`0x495010`) plays the /// generic grab or drop. /// - Coins play `LOOTWINDOWCOINSOUND` both ways, never the generic drop (`0x494cfe`, `0x49523a`). fn gesture_plan(payload: &CursorPayload, gesture: CursorGesture) -> (Option, Option) { diff --git a/crates/benilla-app/src/target/scan.rs b/crates/benilla-app/src/target/scan.rs index 54b4693a1..b1bc4fc8e 100644 --- a/crates/benilla-app/src/target/scan.rs +++ b/crates/benilla-app/src/target/scan.rs @@ -366,8 +366,9 @@ impl TargetScan<'_, '_> { } } } - // Deviation: no scene-attach gate (the reference's `0x6704c0`), because the draw - // election hides every body outside the frustum, which would empty the off-screen tier. + // Deviation: no drawn gate (the reference's IsEntityDrawn, `0x6704c0`), because the + // draw election hides every body outside the frustum, which would empty the off-screen + // tier. let dist = (tf.translation - self_tf.translation).length(); if dist > TAB_RANGE { trace_unit(guid_c.0, tf, "REJECT range (41 yd)"); diff --git a/crates/benilla-app/src/ui_aura.rs b/crates/benilla-app/src/ui_aura.rs index 9440e68f0..9089ff7f5 100644 --- a/crates/benilla-app/src/ui_aura.rs +++ b/crates/benilla-app/src/ui_aura.rs @@ -1131,9 +1131,8 @@ fn join_duration(stamp: Option<&DurationStamp>, stamp_now: f64, script_now: f64) } /// The session's end: drops the lists and stamps, so nothing reaches the next character's bar. -/// Deviation: the reference never clears its expiry array (`0xbc5f68`); this does, because vmangos -/// sends no durations at login to overwrite a kept stamp (`SMSG_UPDATE_AURA_DURATION` is an empty -/// placeholder in `Player::SendInitialPacketsBeforeAddToMap`, `Player.cpp:19248`). +/// Deviation: the reference clears its expiry array (`0xbc5f68`) at every game entry, in +/// `ResetBuffCache` (`0x4e40c0`, called from `0x48f5a9`); benilla clears it at exit instead. fn end_session_aura_state( mut hosted_vm: crate::script_calls::HostedVm, mut cache: ResMut, diff --git a/crates/benilla-app/src/ui_chat/settings.rs b/crates/benilla-app/src/ui_chat/settings.rs index ed7857254..5d36b3bde 100644 --- a/crates/benilla-app/src/ui_chat/settings.rs +++ b/crates/benilla-app/src/ui_chat/settings.rs @@ -29,7 +29,7 @@ //! the file omits keeps its boot init ([`ChatWindowLook::stock`]), and a file older than //! `ADDEDVERSION 2` gets the groups added since. `LOCKED` is an `i32` (`CHATWINDOW+0x8c`) written //! through `setne`, so only 0 and 1 round-trip. Deviation: `set_chat_window_looks` drops an -//! out-of-range window, where the reference's `WINDOW` bound is off by one (`0x498d1c`, `ja` where +//! out-of-range window, where the reference's `WINDOW` bound is off by one (`0x498d17`, `ja` where //! the array needs `jae`), because that write would land past the array. //! //! Ours is `benilla-config/chat/-.txt` diff --git a/crates/benilla-app/src/ui_guild/mod.rs b/crates/benilla-app/src/ui_guild/mod.rs index a272b7fe5..686be4305 100644 --- a/crates/benilla-app/src/ui_guild/mod.rs +++ b/crates/benilla-app/src/ui_guild/mod.rs @@ -543,7 +543,8 @@ impl GuildState { state.motd = roster.motd; state.info_text = roster.info; // Deviation: clamped to ten, because the reference's unbounded loop (`0x4d0bb0`) overruns - // its ten-slot array on a hostile `rankCount >= 12`. + // its ten-slot array from a hostile `rankCount` of 11: index 10 is `0xb726f8`, a float + // its initializer writes (`0x4d279c`). state.rank_rights = roster.rank_rights; state.rank_rights.truncate(GUILD_RANKS_MAX_COUNT); state.set_members(roster.members); diff --git a/crates/benilla-app/src/ui_party/mod.rs b/crates/benilla-app/src/ui_party/mod.rs index 1273e4e0c..2fc2f58bf 100644 --- a/crates/benilla-app/src/ui_party/mod.rs +++ b/crates/benilla-app/src/ui_party/mod.rs @@ -241,7 +241,7 @@ pub(crate) enum GroupSignal { /// One member's answer, relayed to the leader (`0x4ba3f9`, `0x4ba405`). ReadyCheckAnswer { guid: u64, ready: bool }, /// `UPDATE_INSTANCE_INFO`, once per `SMSG_RAID_INSTANCE_INFO` (`0x49e1a7`, straight from - /// `0x49e0d8` when empty), with the list: `RaidFrame.lua:43` ignores the first, so the Raid + /// `0x49e08e` when empty), with the list: `RaidFrame.lua:43` ignores the first, so the Raid /// Info button is decided on the second. InstanceInfo(Vec), } diff --git a/crates/benilla-app/src/ui_script/lifecycle.rs b/crates/benilla-app/src/ui_script/lifecycle.rs index 20f25ca4c..f235e5164 100644 --- a/crates/benilla-app/src/ui_script/lifecycle.rs +++ b/crates/benilla-app/src/ui_script/lifecycle.rs @@ -199,7 +199,7 @@ fn seed_vm_clock(world: &mut World, script: &mut UiScript) { } /// Start the new VM's `GetGameTime()` at the game clock as it stands: the reference's clock is one -/// object (`0xce8538`) built at start-up with every field -1 (`0x643300`, `0x642300`) and reset +/// object (`0xce8538`) built at start-up with its time at -1 (`0x643300`, `0x642300`) and reset /// by no logout or `ReloadUI`, so a VM answers -1, -1 before any server time and the last known /// time after it, from the first line its addons run. fn seed_game_time(world: &World, script: &mut UiScript) { @@ -1498,7 +1498,7 @@ mod tests { } } - /// The game clock is one object built at start-up with every field -1 (`0x643300`, `0x642300`) + /// The game clock is one object built at start-up with its time at -1 (`0x643300`, `0x642300`) /// that no logout or `ReloadUI` resets, and `GetGameTime` reads it unguarded (`0x515ee0`), so a /// VM answers -1, -1 before any server time and the last known time after it, from the first /// line its addons run. diff --git a/crates/benilla-app/src/ui_trainer/law.rs b/crates/benilla-app/src/ui_trainer/law.rs index 432d4666f..eaf11831d 100644 --- a/crates/benilla-app/src/ui_trainer/law.rs +++ b/crates/benilla-app/src/ui_trainer/law.rs @@ -298,9 +298,9 @@ pub(super) fn service_kind(wire_spell: u32, spells: &SpellCatalog) -> (bool, Opt /// re-evaluator's 3 (`0x4d7e3e`, `0x4d83a4`) among them; vmangos sends 0 to 2 /// (`NPCHandler.cpp:113`). /// -/// Deviation: benilla hides every state from 3 up. The reference shows bytes 32 and up, because -/// x86 `shl` wraps its count (bits 32-34 alias 0-2) and its group counter `[hdr+4+state*4]` -/// (`0x4d7854`) runs past the header. +/// Deviation: benilla hides every state from 3 up. The reference shows states 32-34, 64-66 … +/// 224-226 and hides the gaps, because x86 `shl` uses its count's low 5 bits and only filter bits +/// 0-2 are set (`0x4da390`); its group counter `[hdr+4+state*4]` (`0x4d7854`) runs past the header. pub(super) fn category(state: u8) -> TrainerServiceCategory { match state { trainer_spell_state::GREEN => TrainerServiceCategory::Available, diff --git a/crates/benilla-app/src/video.rs b/crates/benilla-app/src/video.rs index 8127ebe51..2d1cb33a8 100644 --- a/crates/benilla-app/src/video.rs +++ b/crates/benilla-app/src/video.rs @@ -4,9 +4,9 @@ //! //! Deviation: `gxWindow "0"` is borderless fullscreen, not 1.12's exclusive mode-set at //! `gxResolution`, because Wayland has no client mode-setting (winit ignores -//! `Fullscreen::Exclusive` there), X11's XRandR changes the desktop's mode and a crash leaves it -//! changed, and macOS has no exclusive mode. Bevy's `WindowMode::Fullscreen` also panics on a live -//! change that cannot resolve a monitor (`bevy_winit::winit_windows:91`, `system.rs:333`). +//! `Fullscreen::Exclusive` there), and X11's XRandR changes the desktop's mode and a crash leaves +//! it changed. Bevy's `WindowMode::Fullscreen` also panics on a live change that cannot resolve a +//! monitor (`bevy_winit::winit_windows:91`, `system.rs:333`). //! //! The `gx*` rows are latched until `RestartGx()`, as in 1.12; a restart re-asserts them against //! the window rather than re-creating the device, since wgpu reconfigures the surface live. diff --git a/crates/benilla-formats/src/chain.rs b/crates/benilla-formats/src/chain.rs index b557e78b6..37c487b9f 100644 --- a/crates/benilla-formats/src/chain.rs +++ b/crates/benilla-formats/src/chain.rs @@ -64,9 +64,10 @@ fn mount_order(dir_names: &[String]) -> Vec { impl Chain { /// Open a `Data` directory's archives in [`mount_order`], or a single `.MPQ` file. /// - /// Deviation: an archive that fails to open is an error, where the reference logs - /// `"Failed to open archive"` and goes on, because a skipped corrupt archive surfaces only as - /// missing files far downstream. + /// Deviation: an archive that fails to open is an error. In 1.12.1 a failed base archive is + /// fatal (Error #134: `0x4038ea` → `0x64d0e0` → `0x64cfa0` → `0x64cc80`, `ExitProcess`) and + /// only a failing patch archive is skipped, silently; benilla fails on that too, because a + /// skipped corrupt archive surfaces only as missing files far downstream. pub fn open(path: &Path) -> Result { let mut archives = Vec::new(); if path.is_dir() { diff --git a/crates/benilla-formats/src/light.rs b/crates/benilla-formats/src/light.rs index 53362bb58..b23e1f3bf 100644 --- a/crates/benilla-formats/src/light.rs +++ b/crates/benilla-formats/src/light.rs @@ -195,7 +195,8 @@ fn light_schema() -> Schema { s } -/// `LightParams.dbc`: 9 fields, 36-byte records, types per the client's reader `0x589030`. +/// `LightParams.dbc`: 9 fields, 36-byte records, read as nine untyped dwords (`0x589030`), so +/// int versus float is the consumers'. /// `cloudTypeID` (+0x0C) is 0 in every 5875 record; the glow is +0x10. fn light_params_schema() -> Schema { let mut s = Schema::new("LightParams"); diff --git a/crates/benilla-formats/src/liquid.rs b/crates/benilla-formats/src/liquid.rs index 1a2b060c5..01c6f777e 100644 --- a/crates/benilla-formats/src/liquid.rs +++ b/crates/benilla-formats/src/liquid.rs @@ -2,7 +2,7 @@ //! //! An MCNK carries one 804-byte MCLQ block per set liquid header bit, each a 9×9 absolute-height //! grid and an 8×8 cell-flag grid. Each wet cell is two triangles; a dry cell (nibble `0xf`, -//! corners at the FLT_MAX sentinel) is skipped. The cell nibble is the liquid type (`0x6ba970`, +//! corners at the FLT_MAX sentinel) is skipped. The cell nibble is the liquid type (`0x68b21f`, //! `0x68d9b0`); the header bits only count the blocks. use benilla_adt::MclqChunk; diff --git a/crates/benilla-formats/src/models/records.rs b/crates/benilla-formats/src/models/records.rs index 47bf857ca..3aa515d7d 100644 --- a/crates/benilla-formats/src/models/records.rs +++ b/crates/benilla-formats/src/models/records.rs @@ -349,7 +349,7 @@ mod tests { /// One camera table record by raw index, what `Model:SetCamera(n)` selects on a `` widget: /// `0x76cec0` reads the count off `MD20+0x124` and the record at `[model+0x3c4] + idx·0x84 + 0x80` -/// without consulting `cameraLookup` (only `0x713500`/`0x713540` do, for the portrait bake), so +/// without consulting `cameraLookup` (only `0x713540` does, for the portrait bake), so /// the index decides and [`Self::camera_type`] never does. Every shipped character, creature and /// interface camera is its [`Self::still`] rig, each track one key of zero; [`Self::at`] samples /// the `Cameras\*.m2` fly-bys. diff --git a/crates/benilla-formats/src/weapon_impact.rs b/crates/benilla-formats/src/weapon_impact.rs index a74ec2d31..fe64f5aff 100644 --- a/crates/benilla-formats/src/weapon_impact.rs +++ b/crates/benilla-formats/src/weapon_impact.rs @@ -1,7 +1,7 @@ //! `WeaponImpactSounds.dbc`: the melee impact sounds, ten normal and ten critical kits per weapon -//! subclass and material (column 2; a metal weapon carries the metal parry kits), which the client -//! reads as `AUIMPACTSOUNDARRAY` (`0x587450`). Slots 7-9 are wood, stone and ethereal creatures, -//! `CreatureImpactType` 2, 1 and 3. +//! subclass and material (column 2; a metal weapon carries the metal parry kits). `0x587450` reads +//! one 92-byte record (three dwords and two 40-byte reads). Slots 7-9 are wood, stone and ethereal +//! creatures, `CreatureImpactType` 2, 1 and 3. use std::collections::HashMap; diff --git a/crates/benilla-protocol/src/auth.rs b/crates/benilla-protocol/src/auth.rs index ae1edd65d..c447e8c7e 100644 --- a/crates/benilla-protocol/src/auth.rs +++ b/crates/benilla-protocol/src/auth.rs @@ -375,7 +375,7 @@ pub fn read_proof_reply(r: &mut impl Read) -> Result> { let server_proof = read_array::<20>(r)?; // Deviation: the survey id is read and dropped, and no survey runs, where the reference keeps // it on the link (`0x5bad53`) for the `Survey.dll` it downloads and calls (`GetSurveyId - // 0x5ab620`, passed at `0x47404f`). benilla runs no code a server sends + // 0x5ab620`, called at `0x474064`). benilla runs no code a server sends // ([`AuthReject::reply`] gives the rule). let _hardware_survey_id = read_u32_le(r)?; Ok(Some(server_proof)) diff --git a/crates/benilla-ui/src/script/addon.rs b/crates/benilla-ui/src/script/addon.rs index a474f7d4b..bcaa26385 100644 --- a/crates/benilla-ui/src/script/addon.rs +++ b/crates/benilla-ui/src/script/addon.rs @@ -782,8 +782,10 @@ fn load_saved_variables(lua: &Lua, i: usize) { } } Err(e) => { - // Deviation: the reference fails silently; we report it, as a player needs to - // know, and hold the file so the shutdown write keeps it. + // The reference runs the file under the Lua error handler (`0x704ae0`, + // `[0x8722c8]`, `0x704b68`), which stock sets to show the error + // (`BasicControls.xml:16`). Deviation: holding the file, so the shutdown write + // keeps it. log_error( lua, &format!("{}: {e}", path.display()), diff --git a/crates/benilla-ui/src/script/clock.rs b/crates/benilla-ui/src/script/clock.rs index c23802e61..16d524d96 100644 --- a/crates/benilla-ui/src/script/clock.rs +++ b/crates/benilla-ui/src/script/clock.rs @@ -58,7 +58,7 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> { g.set("GetTime", lua.create_function(|lua, ()| Ok(now(lua)))?)?; // GetGameTime() (`0x515ee0`): two numbers, the hour `[0xce853c]` then the minute `[0xce8538]`, // the clock the server's time messages set; minute resolution, no seconds. Read unguarded, so - // before the server sets the clock it answers the -1 its constructor stores in every field + // before the server sets the clock it answers the -1 its constructor stores in both fields // (`0x642300`, called at `0x643308`). g.set( "GetGameTime", diff --git a/crates/benilla-ui/src/script/cursor/pet.rs b/crates/benilla-ui/src/script/cursor/pet.rs index 771a529bf..af00c4711 100644 --- a/crates/benilla-ui/src/script/cursor/pet.rs +++ b/crates/benilla-ui/src/script/cursor/pet.rs @@ -18,9 +18,10 @@ use crate::script::{Model, PetActionView}; use super::{clear_cursor, set_cursor, CursorPayload, CursorPetAction, Setter}; /// Pet bar slots (`NUM_PET_ACTION_SLOTS`, vmangos `MAX_UNIT_ACTION_BAR_INDEX`). Deviation: slot -/// 11 is refused, because the reference's gate (`cmp esi,0xa; jbe`) admits it and neither -/// `0x4bce00` nor `0x4bc9a0` bounds-checks again, so it writes one dword past the array, and the -/// autocast toggle (`0x4bcbb0`) reads that word (`[0xb71438+0x28]`) with no bounds check. +/// 11 is refused, because the reference's gate (`cmp esi,0xa; jbe`) admits it; `0x4bce00` checks +/// its bound (`0x4bce14`) but `0x4bc9a0` does not, so it writes one dword past the array +/// (`0x4bcad9`), and the autocast toggle (`0x4bcbb0`) reads that word (`[0xb71438+0x28]`) with +/// no bounds check. const PET_SLOTS: u32 = 10; /// The slot type as the client masks it. diff --git a/crates/benilla-ui/src/script/cvars.rs b/crates/benilla-ui/src/script/cvars.rs index 09430d56a..143765b9a 100644 --- a/crates/benilla-ui/src/script/cvars.rs +++ b/crates/benilla-ui/src/script/cvars.rs @@ -81,7 +81,8 @@ pub struct MultisampleFormat { /// One screen resolution the Video options dropdown offers, in physical pixels. Deviation: the /// list is the window sizes this client can present, not the device's display modes, because /// benilla makes no exclusive mode-set. `"WxH"` is a contract: `OptionsFrame.lua:281-284` splits -/// on the `x` and `CT_Viewport.lua:107` matches `"(%d+)x(%d+)"`, both failing silently. +/// on the `x`, raising on a string without one, and `CT_Viewport.lua:107` matches +/// `"(%d+)x(%d+)"`, failing silently. #[derive(Clone, Copy, Debug, PartialEq, Eq)] pub struct ScreenResolution { pub width: u32, diff --git a/crates/benilla-ui/src/script/glue_core.rs b/crates/benilla-ui/src/script/glue_core.rs index ee95aa227..18056c69f 100644 --- a/crates/benilla-ui/src/script/glue_core.rs +++ b/crates/benilla-ui/src/script/glue_core.rs @@ -453,7 +453,8 @@ pub fn launch_url_allowed(url: &str) -> bool { /// What the browser is given for an add-on's URL, or `None` for one benilla will not open. The /// reference hands the server's string to `0x429ff0` with no whitelist (`0x46d5e0`): a C string of /// fewer than 0x400 bytes, each `%XY` replaced by the byte it spells (table `0x801490`: a -/// non-hex digit reads 0; a `%` with fewer than two bytes after it ends the string), then +/// non-hex ASCII digit reads 0, and one from 0x80 up, sign-extended at `0x42a059`, reads the 128 +/// bytes before the table; a `%` with fewer than two bytes after it ends the string), then /// `ShellExecute "open"`. /// /// Deviation: benilla keeps that decode and then encodes it again, every byte outside the URL @@ -467,6 +468,7 @@ pub fn launch_addon_url(url: &str) -> Option { if url.is_empty() || url.len() >= 0x400 { return None; } + // Any non-hex byte reads 0: the reference's read below its table from 0x80 up is not copied. let hex = |b: u8| -> u8 { match b { b'1'..=b'9' => b - b'0', @@ -1683,9 +1685,9 @@ mod tests { assert!(s.take_errors().is_empty()); } - /// `0x429ff0`'s copy: `%XY` is the byte it spells, a non-hex digit reads 0, a `%` with fewer - /// than two bytes after it ends the string, a decoded NUL ends it too; then the web-address - /// rule on the result. + /// `0x429ff0`'s copy: `%XY` is the byte it spells, a non-hex ASCII digit reads 0 (one from + /// 0x80 up reads before the table, `0x42a059`; benilla reads 0), a `%` with fewer than two + /// bytes after it ends the string, a decoded NUL ends it too; then the web-address rule. #[test] fn the_addon_url_is_decoded_as_the_launcher_decodes_it_and_must_be_a_web_address() { for (url, want) in [ diff --git a/crates/benilla-ui/src/script/item_stats.rs b/crates/benilla-ui/src/script/item_stats.rs index afed45935..a87e1705d 100644 --- a/crates/benilla-ui/src/script/item_stats.rs +++ b/crates/benilla-ui/src/script/item_stats.rs @@ -737,7 +737,8 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> { Value::Integer(i64::from(info.stackable)), Value::String(lua.create_string(equip_loc_token(inventory_type))?), // Deviation: nil for a display row with no icon, where the reference answers the - // unloadable `Interface\Icons\`, because `SetTexture` shows no icon for either. + // unloadable `Interface\Icons\`, on which `SetTexture` keeps the previous image + // (`0x7702ac`), so a reused button would show its old icon. match &icon { Some(icon) => Value::String(lua.create_string(icon)?), None => Value::Nil, diff --git a/crates/benilla-ui/src/script/region/paint.rs b/crates/benilla-ui/src/script/region/paint.rs index 8811c9cee..08d0311fb 100644 --- a/crates/benilla-ui/src/script/region/paint.rs +++ b/crates/benilla-ui/src/script/region/paint.rs @@ -275,7 +275,7 @@ pub(super) fn install(lua: &Lua, m: &Table) -> mlua::Result<()> { // SetTexCoordModifiesRect/GetTexCoordModifiesRect (`0x79c080`/`0x79c120`, table `0x87c128`): // the setter writes `[texture+0x124]` (`0x79c113`), as does installing the texture as a - // StatusBar's bar (`0x783220`); the getter answers 1 or nil. Stored, not applied: there a set + // StatusBar's bar (`0x783220`); the getter answers 1 or nil. The extract applies it: a set // flag makes `SetTexCoord` re-derive the rect from the UV quad (`0x770462`). m.set( "SetTexCoordModifiesRect", diff --git a/crates/benilla-ui/src/script/saved.rs b/crates/benilla-ui/src/script/saved.rs index 1301ed5e7..da1dad197 100644 --- a/crates/benilla-ui/src/script/saved.rs +++ b/crates/benilla-ui/src/script/saved.rs @@ -24,8 +24,9 @@ const MAX_DEPTH: usize = 32; impl super::UiScript { /// Hold a saved-variables file that failed to load, so the shutdown write leaves it alone. - /// Deviation: the reference rewrites it from the live defaults (`0x51f865`–`0x51f970`), which - /// would cost the player the whole file for one typo in a hand edit. + /// Deviation: the reference rewrites it from the live defaults (`0x51f865`–`0x51f970`) after + /// renaming the old file to `.bak` (`0x51f794`, `0x51f8eb`, `.bak` at `0x8431e4`), so a hand + /// edit with one typo survives only until the next logout. pub fn hold_saved_file(&self, path: &std::path::Path) { let mut model = self.model_mut(); if !model.held_saved_files.iter().any(|p| p == path) { diff --git a/crates/benilla-ui/src/script/slash.rs b/crates/benilla-ui/src/script/slash.rs index ffd666303..22be888d5 100644 --- a/crates/benilla-ui/src/script/slash.rs +++ b/crates/benilla-ui/src/script/slash.rs @@ -62,7 +62,9 @@ impl super::UiScript { let want = cmd.to_ascii_uppercase(); for pair in list.pairs::() { let Ok((index, Value::Function(handler))) = pair else { - continue; // Deviation: skipped because it is no command; the reference raises + // Deviation: skipped as no command. The stock walk calls an entry only when one of + // its aliases matches (`ChatFrame.lua:2164-2178`), so only a matched one raises. + continue; }; for n in 1.. { let alias: Option = globals.get(format!("SLASH_{index}{n}")).ok().flatten(); diff --git a/crates/benilla-ui/src/script/statusbar.rs b/crates/benilla-ui/src/script/statusbar.rs index 31dbdbb43..c811f20de 100644 --- a/crates/benilla-ui/src/script/statusbar.rs +++ b/crates/benilla-ui/src/script/statusbar.rs @@ -243,7 +243,7 @@ pub(super) fn install(lua: &Lua) -> mlua::Result<()> { })?, )?; // `0x78fc20` reads r, g, b by a bare `lua_tonumber`, so nil, a table or a non-numeric string - // is 0.0 and the call never raises (a numeric string also reads 0.0 here). Stock hands colour + // is 0.0 and the call never raises (a numeric string reads as its number). Stock hands colour // setters nils: `QuestLogFrame.lua:337` passes three to `SetVertexColor`. m.set( "SetStatusBarColor", diff --git a/crates/benilla-ui/src/script/tests/adopt.rs b/crates/benilla-ui/src/script/tests/adopt.rs index 76492984d..e2d602d54 100644 --- a/crates/benilla-ui/src/script/tests/adopt.rs +++ b/crates/benilla-ui/src/script/tests/adopt.rs @@ -213,8 +213,8 @@ fn a_status_bar_takes_a_texture_object_and_a_nil() { .unwrap(); } -/// `0x789860`: the thumb links on OVERLAY (the layer argument is constant 3), its anchors are -/// cleared (`0x767ed0`) since the slider places it, and the old thumb is deleted. +/// `0x789860`: the thumb links on OVERLAY, the layer `SetThumbTexture` passes (`0x790434`), its +/// anchors are cleared (`0x767ed0`) since the slider places it, and the old thumb is deleted. #[test] fn a_slider_thumb_object_links_on_overlay_with_its_anchors_cleared() { let s = script(); diff --git a/crates/benilla-ui/src/script/tests/channel.rs b/crates/benilla-ui/src/script/tests/channel.rs index 5e7a5b5b5..eada42023 100644 --- a/crates/benilla-ui/src/script/tests/channel.rs +++ b/crates/benilla-ui/src/script/tests/channel.rs @@ -147,7 +147,7 @@ fn get_channel_list_is_a_flat_slot_name_vararg_in_join_order() { } /// `GetGuildRecruitmentMode` (`0x4a0040`) always pushes its int global as a number; it boots at 1 -/// from a `.data` initialiser (`raw 0x443608`), the value `UIOptionsFrame_SetDefaults` sets. +/// from a `.data` initialiser (`0x843608`), the value `UIOptionsFrame_SetDefaults` sets. #[test] fn the_guild_recruitment_mode_boots_auto_and_answers_a_number() { let s = script(); diff --git a/crates/benilla-ui/src/script/types.rs b/crates/benilla-ui/src/script/types.rs index b3eccd6b5..bb4a9b18d 100644 --- a/crates/benilla-ui/src/script/types.rs +++ b/crates/benilla-ui/src/script/types.rs @@ -426,9 +426,9 @@ pub(crate) struct RegionData { /// regions. /// /// Deviation: kept apart from [`Self::vertex_color`], which the reference's `Texture:SetAlpha` - /// (`0x79b580`) rewrites, because the drawn product differs only on a region that sets both, - /// or a gradient and an alpha, which no stock code does, and a FontString's `SetAlpha` then - /// keeps its font colour. + /// (`0x79b580`) rewrites, because where stock sets both on one region (`PlayerFrame.lua:25-26`, + /// `TargetFrame.lua:408` with `420-426`) the drawn product differs for about one frame, and a + /// FontString's `SetAlpha` then keeps its font colour. pub(crate) alpha: Option, /// The texture slot (`+0xcc`): a path (`SetTexture("Interface\\...")`) or a solid fill /// (`SetTexture(r, g, b, a)`, an XML `` with no `file=`), each clearing the other. The diff --git a/crates/benilla-world/src/ffx_glow.rs b/crates/benilla-world/src/ffx_glow.rs index 7c60367ff..6298e685a 100644 --- a/crates/benilla-world/src/ffx_glow.rs +++ b/crates/benilla-world/src/ffx_glow.rs @@ -174,8 +174,8 @@ impl GlueFfx { /// `LightParams.glow` (`0xce9c70`) on a glue screen; the death combine packs it into its alpha /// byte (`0x6cb9ec`: 0.15 → 38, 0.40 → 102). Deviation: kept a float where every reference - /// pack (`0x6cb0e2`/`0x6cb557`/`0x6cb9e1`) quantizes it to a byte, because the two differ by - /// under a thousandth (38/255 against 0.15). + /// pack (`0x6cb0e2`/`0x6cb557`/`0x6cb9e1`) floors it to a byte (`x·255 + 512`, bits >> 14; + /// `0x7ffe58`, `0x8029cc`), because the two differ by at most 0.002 (0.30 packs to 76, 0.2980). fn glow(self) -> f32 { match self { // `*0x8380b4`, the widget's OnShow pin. diff --git a/crates/benilla-world/src/weather/precip/mod.rs b/crates/benilla-world/src/weather/precip/mod.rs index 812101eea..0bf044d6b 100644 --- a/crates/benilla-world/src/weather/precip/mod.rs +++ b/crates/benilla-world/src/weather/precip/mod.rs @@ -31,7 +31,8 @@ pub(crate) use wind::{wow_azimuth_to_bevy, WeatherWind}; // ===== The reference's constants ===== /// The weather leg: the reference runs the shader leg unless `useWeatherShaders` (default 1, -/// `0x67b81d`) is 0 or its ARB programs fail to validate (`0x58b360`); this always runs it. +/// `0x67b81d`) is 0 or a shader's loaded flag is clear (`0x58b360`): the file read sets it +/// (`0x595216`), and only OpenGL resets it from the compile (`0x59e544`). This always runs it. const SHADER_LEG: bool = true; /// Per-packet record capacity, 6144 (`0x80ffc8` as a float, which the open stamp divides by the /// rate). Not a population cap: packets form a growing list, so demand bounds the population. diff --git a/docs/DEVIATIONS.md b/docs/DEVIATIONS.md index f1b3413be..6d64d154f 100644 --- a/docs/DEVIATIONS.md +++ b/docs/DEVIATIONS.md @@ -124,7 +124,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The reference clips at full scale and has no headroom mechanism (its SFX-bus duck `0x457960` is a sidechain armed only by server-pushed voice lines); benilla limits because every SFX is mastered to full scale and overlapping kits clip. ([`src/cvars/table.rs:243`](../crates/benilla-app/src/cvars/table.rs#L243)) - Here the dial multiplies the camera's own rate, because benilla does not change the OS pointer speed, a system-wide setting. ([`src/cvars/table.rs:485`](../crates/benilla-app/src/cvars/table.rs#L485)) - "0" raises a borderless fullscreen window instead of mode-setting the display, because Wayland and macOS offer no mode-set and X11's leaves the desktop changed after a crash (`crate::video`). ([`src/cvars/table.rs:615`](../crates/benilla-app/src/cvars/table.rs#L615)) -- Benilla, which has no exclusive mode, applies the same curve in the composite pass (`crate::ui_gamma::DisplayGamma`), because the skipped upload would make a slider that moves no pixel. `SetGamma 0x4891f0` writes `"%f"` ("1.000000"), which `SaveConfig` (`0x63da4a`) keeps as a diff against the default "1.0", as the reference does. ([`src/cvars/table.rs:727`](../crates/benilla-app/src/cvars/table.rs#L727)) +- Benilla, which has no exclusive mode, applies the same curve in the composite pass (`crate::ui_gamma::DisplayGamma`), because the skipped upload would make a slider that moves no pixel. `SetGamma 0x4891f0` writes `"%f"` ("1.000000"), which `SaveConfig` (`0x63da4a`) keeps as a diff against the default "1.0", as the reference does. ([`src/cvars/table.rs:728`](../crates/benilla-app/src/cvars/table.rs#L728)) #### death @@ -157,7 +157,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The live window's aspect stands in for `gxResolution`'s, as in `portrait`'s `GxAspect`, because the window here takes any shape a drag gives it, where the reference's keeps `gxResolution`'s (`0x5989d7`). ([`src/loading_screen.rs:66`](../crates/benilla-app/src/loading_screen.rs#L66)) - The wheel is swallowed, where the reference still zooms the hidden camera, because nothing should act through the screen. ([`src/loading_screen/input.rs:12`](../crates/benilla-app/src/loading_screen/input.rs#L12)) -- The world pick is cleared, where the reference's `0x481790` keeps picking at the frozen point, because ours is quieter and looks the same: the reference's pointer cannot move, so its pick changes nothing visible. ([`src/loading_screen/input.rs:14`](../crates/benilla-app/src/loading_screen/input.rs#L14)) +- The world pick is cleared, where the reference's freezes: the screen's layer blocks the frame pass (bit 0 clear, `0x406808` → `0x4083c0`), so `0x481790` does not run, except after a transport arrival (`0x5debb6`), when it picks at the frozen point. ([`src/loading_screen/input.rs:14`](../crates/benilla-app/src/loading_screen/input.rs#L14)) #### local_state @@ -206,7 +206,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The reference sweeps the camera collision against the bobbed eye (`0x50ed47`); benilla adds the offset after the sweep, because it shares camera shake's accumulator there. ([`src/player/camera_dynamics.rs:447`](../crates/benilla-app/src/player/camera_dynamics.rs#L447)) - Both values clamp to the rig's range, because a hand-edited file should not land a pose play cannot reach; the reference stores them unbounded, the pitch until a mouse-look re-clamps it. ([`src/player/camera_saved.rs:64`](../crates/benilla-app/src/player/camera_saved.rs#L64)) - `ResetView` writes the CVars back to their defaults, because the CVar store is our persistence; the reference (`0x50fae0`) touches no CVar, so its reset reverts at next launch. ([`src/player/camera_view.rs:15`](../crates/benilla-app/src/player/camera_view.rs#L15)) -- The starting zoom, `CAM_DIST_DEFAULT`, is 15 yd where the reference's `cameraDistance` is 5.55 (`0x84f488`), for a wider view. ([`src/player/camera_zoom.rs:9`](../crates/benilla-app/src/player/camera_zoom.rs#L9)) +- The starting zoom, `CAM_DIST_DEFAULT`, is 15 yd where the reference starts at 5.55, the third-person-A row of its default table `0x84f488` that `cameraView` 1 picks (`0x50c17a`, `0x50c18b`; the `cameraDistance` CVar itself registers "0.0"), for a wider view. ([`src/player/camera_zoom.rs:9`](../crates/benilla-app/src/player/camera_zoom.rs#L9)) - No drunk field-of-view lane, because the reference's is invisible in play: its target `(179° − 90°)·fraction` (camera `+0x10c`, setter `0x511250`) eases at `cameraFoVSmoothSpeed`, 0.5°/s, and restarts on every drunk-byte change, so it creeps under 1°. ([`src/player/drunk.rs:46`](../crates/benilla-app/src/player/drunk.rs#L46)) - A settle hold is summed and sent once on release, without the push, because it stands in for the reference's blocking load (`0x694920`), not a refused substep, and lasts seconds. ([`src/player/movement_net.rs:470`](../crates/benilla-app/src/player/movement_net.rs#L470)) - The reference's blocking load (`0x694920`) waits out its reads before the frame goes on and has no such release; without one, a model that never loads would freeze our body for good. ([`src/player/state.rs:120`](../crates/benilla-app/src/player/state.rs#L120)) @@ -217,11 +217,11 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The auction house's `AuctionDressUpModel` draws the same one assembly, because the app's `TryOn`/`Dress` intents are not per-widget; the reference's two widgets each clone their own model. ([`src/portrait/dressup.rs:8`](../crates/benilla-app/src/portrait/dressup.rs#L8)) - A fixed neutral front-lit studio (`studio_light`) replaces the portrait bake's hard-coded rig (`0x525b10`: ambient 0.45 grey, white directional), because the studio is the look chosen for them. ([`src/portrait/light.rs:65`](../crates/benilla-app/src/portrait/light.rs#L65)) -- The round portraits bake at 256², not 64², because the 64² still is a resolution limit, not a look; and under a fixed studio light, not the ambient state, because that neutral light is the chosen portrait look (`light::BoothLight`). ([`src/portrait/mod.rs:18`](../crates/benilla-app/src/portrait/mod.rs#L18)) -- Only the four party slots hand over, capped at `Self::CAP`, instead of every portrait until `ClientDestroyGame` (`0x401ee0`), because a general cache would pay a texture per unit ever seen. ([`src/portrait/mod.rs:264`](../crates/benilla-app/src/portrait/mod.rs#L264)) -- This reads the window's aspect, not `gxResolution`'s, because the window here takes any shape a drag gives it, where the reference's keeps `gxResolution`'s (`0x5989d7`). ([`src/portrait/mod.rs:693`](../crates/benilla-app/src/portrait/mod.rs#L693)) -- `boothHalfRate` is benilla's own CVar, because the reference draws its doll in the main pass and has no second view; a full-rate pass costs up to 7.6 ms a frame at 4K. ([`src/portrait/mod.rs:732`](../crates/benilla-app/src/portrait/mod.rs#L732)) -- The reference widget draws only its model; a body pane clears to near-black, the chosen look where nothing sits behind the pane. ([`src/portrait/mod.rs:981`](../crates/benilla-app/src/portrait/mod.rs#L981)) +- The round portraits bake at 256², not 64², because the 64² still is a resolution limit, not a look; and under benilla's studio light (`light::BoothLight`), the chosen portrait look, in place of the reference's own fixed rig (`0x525b10`, pushed at `0x52562e`: a 0.45 grey ambient and a white directional). ([`src/portrait/mod.rs:18`](../crates/benilla-app/src/portrait/mod.rs#L18)) +- Only the four party slots hand over, capped at `Self::CAP`, instead of every portrait until `ClientDestroyGame` (`0x401ee0`), because a general cache would pay a texture per unit ever seen. ([`src/portrait/mod.rs:265`](../crates/benilla-app/src/portrait/mod.rs#L265)) +- This reads the window's aspect, not `gxResolution`'s, because the window here takes any shape a drag gives it, where the reference's keeps `gxResolution`'s (`0x5989d7`). ([`src/portrait/mod.rs:694`](../crates/benilla-app/src/portrait/mod.rs#L694)) +- `boothHalfRate` is benilla's own CVar, because the reference draws its doll in the main pass and has no second view; a full-rate pass costs up to 7.6 ms a frame at 4K. ([`src/portrait/mod.rs:733`](../crates/benilla-app/src/portrait/mod.rs#L733)) +- The reference widget draws only its model; a body pane clears to near-black, the chosen look where nothing sits behind the pane. ([`src/portrait/mod.rs:982`](../crates/benilla-app/src/portrait/mod.rs#L982)) #### quest_markers @@ -255,7 +255,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it #### shutdown -- The reference leaves it to the OS. Its key arm (`0x42d261`-`0x42d276`) hands Alt+F4 to `DefWindowProc`, whose `SC_CLOSE` becomes the kind-5 event (`0x42d287`, as `WM_CLOSE` posts at `0x42d292`) and runs the quit at once (`0x423a21` -> `0x423ca0` -> `0x41f5d0` -> `0x422030`), with no logout timer, at the login screen and in game alike. ([`src/shutdown.rs:50`](../crates/benilla-app/src/shutdown.rs#L50)) +- The reference leaves it to the OS. Its key arm (`0x42d261`-`0x42d276`) hands Alt+F4 to `DefWindowProc`, whose `SC_CLOSE` becomes the kind-5 event (`0x42d287`, as `WM_CLOSE` posts at `0x42d292`) and closes at once: the running client's callback `0x63c9a0` (installed from `0x402840`, asked at `0x423a21`) answers 0 and tears the context down (`0x41f9b0`), with no logout timer, at the login screen and in game alike. ([`src/shutdown.rs:50`](../crates/benilla-app/src/shutdown.rs#L50)) #### smart_rect @@ -274,7 +274,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - Default off where the reference registers "1". Its reverb is FMOD 3's EAX API, which renders only with hardware 3D mixing, so off is what the reference is heard to produce (inferred: `fmod.dll`'s render side is untraced). ([`src/sound/mod.rs:105`](../crates/benilla-app/src/sound/mod.rs#L105)) - `SoundOutputLimiter`, not a 1.12 CVar, default on, so overlapping full-scale kits are limited rather than clipped. ([`src/sound/mod.rs:123`](../crates/benilla-app/src/sound/mod.rs#L123)) - With no character the reference leaves the listener where it was; benilla seats it on the camera, where the view is. ([`src/sound/mod.rs:484`](../crates/benilla-app/src/sound/mod.rs#L484)) -- The reference also plays an optimistic coin at the loot-money click, and at the auto-loot sweep's money, once a session (`0x4c201b`-`0x4c2020`, the same `0x458030` call), so looted money sounds twice; benilla plays the watcher's coin alone, because one coin on the confirmed change reads cleanly and the round trip the early coin hides is imperceptible on a local server. ([`src/sound/money.rs:7`](../crates/benilla-app/src/sound/money.rs#L7)) +- The reference also plays an optimistic coin at the loot-money click, and at the auto-loot sweep's money, once per loot source (`0x4c201b`-`0x4c2020`, the same `0x458030` call; `0xb71bc4` set at `0x4c221e`, reset at `0x4c1d95`), so looted money sounds twice; benilla plays the watcher's coin alone, because one coin on the confirmed change reads cleanly and the round trip the early coin hides is imperceptible on a local server. ([`src/sound/money.rs:7`](../crates/benilla-app/src/sound/money.rs#L7)) - 1.12.1 sets FMOD up on driver 0 and, when that fails, runs silent for the session (`Sound::Initialize` `0x7a4330`, the driver −1 → 0 at `0x7a445f`); here another output stands in, because on Linux the default is often a stock `dmix` whose card a sound server holds. ([`src/sound/output/cpal.rs:193`](../crates/benilla-app/src/sound/output/cpal.rs#L193)) - A change of the default output device is followed (here and in `coreaudio.rs`), where 1.12.1 initialises its sound device once and never again (`Sound::Initialize` `0x7a4330` refuses a second call; the driver-enumeration functions `0x7a6320`-`0x7a6380` have no caller), because a headset plugged in mid-session should play at once. ([`src/sound/output/cpal.rs:544`](../crates/benilla-app/src/sound/output/cpal.rs#L544)) @@ -291,8 +291,8 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The rank is held to 7, the top of the ring scale's eight entries (`0..=7`), where the reference keeps any value; a server rank past 7 would index outside our palette. ([`src/target/relations.rs:487`](../crates/benilla-app/src/target/relations.rs#L487)) - TAB uses Classic Era's screen-space priority, not 1.12's ±30° facing cone and snapshot cursor (`0x493f60`), because the cone skips a close mob in front of the camera, which sits behind the character. ([`src/target/scan.rs:3`](../crates/benilla-app/src/target/scan.rs#L3)) - Our own body is never a candidate. The reference's friendly scan picks the player at some facings (`CanAssist(P, P)` is true, `0x6061e0`; the cone test `0x47f220`), but our scoring always puts the player dead centre at distance 0, so CTRL-TAB would pick us on every press. ([`src/target/scan.rs:194`](../crates/benilla-app/src/target/scan.rs#L194)) -- No scene-attach gate (the reference's `0x6704c0`), because the draw election hides every body outside the frustum, which would empty the off-screen tier. ([`src/target/scan.rs:369`](../crates/benilla-app/src/target/scan.rs#L369)) -- Sampled each frame, not stamped in `SetSelection`, so every selection writer is covered; a selected unit that turns hostile is remembered, where the reference's is not. ([`src/target/scan.rs:932`](../crates/benilla-app/src/target/scan.rs#L932)) +- No drawn gate (the reference's IsEntityDrawn, `0x6704c0`), because the draw election hides every body outside the frustum, which would empty the off-screen tier. ([`src/target/scan.rs:369`](../crates/benilla-app/src/target/scan.rs#L369)) +- Sampled each frame, not stamped in `SetSelection`, so every selection writer is covered; a selected unit that turns hostile is remembered, where the reference's is not. ([`src/target/scan.rs:933`](../crates/benilla-app/src/target/scan.rs#L933)) #### textinput @@ -310,7 +310,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - On a catalog miss the reference keeps the record's stale value (`0x4e4533`, `0x4e4550` skip the write); this answers from the joined expiry, because a stale value is no mechanism to reproduce. `None` is that miss: the call reads the expiry (`AuraState::until_cancelled_unknown`). ([`src/ui_aura.rs:654`](../crates/benilla-app/src/ui_aura.rs#L654)) - On other units' rows an id the catalog lacks stays visible, because every wire id is a real spell and failing closed would blank every aura on a catalog failure; the reference skips one there (`[0xc0d78c]`), though its player cache inserts one, as here. ([`src/ui_aura.rs:682`](../crates/benilla-app/src/ui_aura.rs#L682)) -- The reference never clears its expiry array (`0xbc5f68`); this does, because vmangos sends no durations at login to overwrite a kept stamp (`SMSG_UPDATE_AURA_DURATION` is an empty placeholder in `Player::SendInitialPacketsBeforeAddToMap`, `Player.cpp:19248`). ([`src/ui_aura.rs:1134`](../crates/benilla-app/src/ui_aura.rs#L1134)) +- The reference clears its expiry array (`0xbc5f68`) at every game entry, in `ResetBuffCache` (`0x4e40c0`, called from `0x48f5a9`); benilla clears it at exit instead. ([`src/ui_aura.rs:1134`](../crates/benilla-app/src/ui_aura.rs#L1134)) #### ui_binder @@ -326,7 +326,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - A line of 256 bytes or more, which reaches here only through `chat_send`'s deviation for `0x49f604`, is slurred whole instead of cut to that buffer, so it reaches the server whole for the refusal that deviation leaves to it. ([`src/ui_chat/input/send.rs:228`](../crates/benilla-app/src/ui_chat/input/send.rs#L228)) - The files live in `benilla-config/Logs/`, not the install's `Logs`, because the install is read-only. ([`src/ui_chat/logging.rs:4`](../crates/benilla-app/src/ui_chat/logging.rs#L4)) - No re-run when a remote player streams in, because the reference's re-run only repeats the join, which vmangos swallows, or the leave, whose "Not on channel" notice nothing prints. ([`src/ui_chat/recruitment.rs:7`](../crates/benilla-app/src/ui_chat/recruitment.rs#L7)) -- `set_chat_window_looks` drops an out-of-range window, where the reference's `WINDOW` bound is off by one (`0x498d1c`, `ja` where the array needs `jae`), because that write would land past the array. ([`src/ui_chat/settings.rs:31`](../crates/benilla-app/src/ui_chat/settings.rs#L31)) +- `set_chat_window_looks` drops an out-of-range window, where the reference's `WINDOW` bound is off by one (`0x498d17`, `ja` where the array needs `jae`), because that write would land past the array. ([`src/ui_chat/settings.rs:31`](../crates/benilla-app/src/ui_chat/settings.rs#L31)) - The debounce also writes Lua's changes (`dirty`) after the quiet time, where the reference writes only at teardown, so a crash loses at most a second of changes. ([`src/ui_chat/settings.rs:599`](../crates/benilla-app/src/ui_chat/settings.rs#L599)) #### ui_dressup @@ -355,7 +355,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - A script's 16-letter name, which the reference's bindings pass (1 to 16 units, `0x4d20d0`, `0x4d2210`), is dropped rather than sent or truncated, because vmangos would kick the session. ([`src/ui_guild/feed.rs:72`](../crates/benilla-app/src/ui_guild/feed.rs#L72)) - Bounded at the ten slots, because the reference's read (`0x4c93e7`) runs past its array. ([`src/ui_guild/mod.rs:87`](../crates/benilla-app/src/ui_guild/mod.rs#L87)) -- Clamped to ten, because the reference's unbounded loop (`0x4d0bb0`) overruns its ten-slot array on a hostile `rankCount >= 12`. ([`src/ui_guild/mod.rs:545`](../crates/benilla-app/src/ui_guild/mod.rs#L545)) +- Clamped to ten, because the reference's unbounded loop (`0x4d0bb0`) overruns its ten-slot array from a hostile `rankCount` of 11: index 10 is `0xb726f8`, a float its initializer writes (`0x4d279c`). ([`src/ui_guild/mod.rs:545`](../crates/benilla-app/src/ui_guild/mod.rs#L545)) - An exact tie is `Equal` where the reference answers ±1, and a NaN has a place (`total_cmp`), because Rust's sort requires a total order. ([`src/ui_guild/sort.rs:72`](../crates/benilla-app/src/ui_guild/sort.rs#L72)) - The reference ties a miss with a hit (`0x4d0e27`, `0x4d0ea1`), no total order. ([`src/ui_guild/sort.rs:89`](../crates/benilla-app/src/ui_guild/sort.rs#L89)) @@ -486,11 +486,11 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it #### ui_trainer -- Benilla hides every state from 3 up. The reference shows bytes 32 and up, because x86 `shl` wraps its count (bits 32-34 alias 0-2) and its group counter `[hdr+4+state*4]` (`0x4d7854`) runs past the header. ([`src/ui_trainer/law.rs:301`](../crates/benilla-app/src/ui_trainer/law.rs#L301)) +- Benilla hides every state from 3 up. The reference shows states 32-34, 64-66 … 224-226 and hides the gaps, because x86 `shl` uses its count's low 5 bits and only filter bits 0-2 are set (`0x4da390`); its group counter `[hdr+4+state*4]` (`0x4d7854`) runs past the header. ([`src/ui_trainer/law.rs:301`](../crates/benilla-app/src/ui_trainer/law.rs#L301)) #### video -- `gxWindow "0"` is borderless fullscreen, not 1.12's exclusive mode-set at `gxResolution`, because Wayland has no client mode-setting (winit ignores `Fullscreen::Exclusive` there), X11's XRandR changes the desktop's mode and a crash leaves it changed, and macOS has no exclusive mode. ([`src/video.rs:5`](../crates/benilla-app/src/video.rs#L5)) +- `gxWindow "0"` is borderless fullscreen, not 1.12's exclusive mode-set at `gxResolution`, because Wayland has no client mode-setting (winit ignores `Fullscreen::Exclusive` there), and X11's XRandR changes the desktop's mode and a crash leaves it changed. ([`src/video.rs:5`](../crates/benilla-app/src/video.rs#L5)) - On Windows, NVIDIA's Vulkan driver (610.88 seen) crashes inside `vkQueuePresentKHR` on the first present after any swapchain resize while the present mode is `Fifo`, `FifoRelaxed` or `AutoVsync` (a maximize is a resize). ([`src/video.rs:17`](../crates/benilla-app/src/video.rs#L17)) - Sizes are logical px, because the windowed `gxResolution` is a logical inner size here. ([`src/video.rs:588`](../crates/benilla-app/src/video.rs#L588)) @@ -543,8 +543,8 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it #### chain -- An archive that fails to open is an error, where the reference logs `"Failed to open archive"` and goes on, because a skipped corrupt archive surfaces only as missing files far downstream. ([`src/chain.rs:67`](../crates/benilla-formats/src/chain.rs#L67)) -- A last line with no CR or LF after it is passed too, where `0x648fb0` ends at the buffer's end without a flush (`0x64907f`) and drops it, a bug that loses a listfile's last name when it lacks a newline. ([`src/chain.rs:233`](../crates/benilla-formats/src/chain.rs#L233)) +- An archive that fails to open is an error. In 1.12.1 a failed base archive is fatal (Error #134: `0x4038ea` → `0x64d0e0` → `0x64cfa0` → `0x64cc80`, `ExitProcess`) and only a failing patch archive is skipped, silently; benilla fails on that too, because a skipped corrupt archive surfaces only as missing files far downstream. ([`src/chain.rs:67`](../crates/benilla-formats/src/chain.rs#L67)) +- A last line with no CR or LF after it is passed too, where `0x648fb0` ends at the buffer's end without a flush (`0x64907f`) and drops it, a bug that loses a listfile's last name when it lacks a newline. ([`src/chain.rs:234`](../crates/benilla-formats/src/chain.rs#L234)) #### characters @@ -641,7 +641,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The patch state downloads no patch and starts no updater, because benilla runs no code a server sends. ([`src/auth.rs:120`](../crates/benilla-protocol/src/auth.rs#L120)) - A stored per-OS constant, not the reference's HMAC over its own executables (`0x5b1170`), because every mangos-family realmd issues this one salt. ([`src/auth.rs:302`](../crates/benilla-protocol/src/auth.rs#L302)) -- The survey id is read and dropped, and no survey runs, where the reference keeps it on the link (`0x5bad53`) for the `Survey.dll` it downloads and calls (`GetSurveyId 0x5ab620`, passed at `0x47404f`). benilla runs no code a server sends (`AuthReject::reply` gives the rule). ([`src/auth.rs:376`](../crates/benilla-protocol/src/auth.rs#L376)) +- The survey id is read and dropped, and no survey runs, where the reference keeps it on the link (`0x5bad53`) for the `Survey.dll` it downloads and calls (`GetSurveyId 0x5ab620`, called at `0x474064`). benilla runs no code a server sends (`AuthReject::reply` gives the rule). ([`src/auth.rs:376`](../crates/benilla-protocol/src/auth.rs#L376)) #### events @@ -712,7 +712,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - An out-of-range slot answers nil, because the reference indexes `0xbc6980` with no bounds check and reads the memory beside its 120 slots. ([`src/script/action.rs:425`](../crates/benilla-ui/src/script/action.rs#L425)) - The files the handler writes beside the install (`.pub` with the key, `.url`; `0x51dce0`, `0x51dde0`) are not written, as the install is read-only; the key is never read either, as there is no signature to verify with it. ([`src/script/addon.rs:207`](../crates/benilla-ui/src/script/addon.rs#L207)) -- The reference fails silently; we report it, as a player needs to know, and hold the file so the shutdown write keeps it. ([`src/script/addon.rs:785`](../crates/benilla-ui/src/script/addon.rs#L785)) +- Holding the file, so the shutdown write keeps it. ([`src/script/addon.rs:787`](../crates/benilla-ui/src/script/addon.rs#L787)) - The reference drops a send that resolves to PARTY while party slot 0's guid (`0xbc6f48`) is zero (`0x49fa9f`-`0x49faab`); benilla sends it, because `PartyState` is empty until the first `SMSG_GROUP_LIST` and the gate would swallow a real broadcast. vmangos drops a group-less party line anyway (`ChatHandler.cpp:476`). ([`src/script/addon_message.rs:7`](../crates/benilla-ui/src/script/addon_message.rs#L7)) - Backed off to a char boundary, because a `String` must stay UTF-8; the cut is the same for ASCII. ([`src/script/addon_message.rs:124`](../crates/benilla-ui/src/script/addon_message.rs#L124)) - `GetPlayerBuffApplications` answers 1 for a cleared record where the reference reads its stale `+0x9`, the previous occupant's count, because no guarded caller reaches it. ([`src/script/aura/player_buff.rs:98`](../crates/benilla-ui/src/script/aura/player_buff.rs#L98)) @@ -742,28 +742,28 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - Returns nothing. The handler ends `mov eax,1` with nothing pushed (`0x4895bc`), so Lua 5.0 hands back the stack top, the last argument or the function itself: an accident of the handler, not an API, and copying a stack-top leak would copy a bug. ([`src/script/cursor.rs:1188`](../crates/benilla-ui/src/script/cursor.rs#L1188)) - An auto-store into a bank item or keyring slot sends nothing, because no container id names it and no stock caller passes one; the reference sends it and the server refuses. ([`src/script/cursor/bag_verbs.rs:26`](../crates/benilla-ui/src/script/cursor/bag_verbs.rs#L26)) - A row index the list no longer holds buys nothing and drops, where this site reads through a null row (`0x4c7e9a`, `0x4c7ea5`). ([`src/script/cursor/bag_verbs.rs:132`](../crates/benilla-ui/src/script/cursor/bag_verbs.rs#L132)) -- Slot 11 is refused, because the reference's gate (`cmp esi,0xa; jbe`) admits it and neither `0x4bce00` nor `0x4bc9a0` bounds-checks again, so it writes one dword past the array, and the autocast toggle (`0x4bcbb0`) reads that word (`[0xb71438+0x28]`) with no bounds check. ([`src/script/cursor/pet.rs:20`](../crates/benilla-ui/src/script/cursor/pet.rs#L20)) -- The list is the window sizes this client can present, not the device's display modes, because benilla makes no exclusive mode-set. `"WxH"` is a contract: `OptionsFrame.lua:281-284` splits on the `x` and `CT_Viewport.lua:107` matches `"(%d+)x(%d+)"`, both failing silently. ([`src/script/cvars.rs:81`](../crates/benilla-ui/src/script/cvars.rs#L81)) -- The tie-break is ours, because area alone with the reference's adjacent-only dedupe can leave a duplicate `"WxH"` when two modes share an area (1280x960, 1600x768). ([`src/script/cvars.rs:93`](../crates/benilla-ui/src/script/cvars.rs#L93)) -- An id out of range is ignored, because the reference reads one entry past the last (`0x48c67c`) and a clamp would apply a format the player did not pick. ([`src/script/cvars.rs:762`](../crates/benilla-ui/src/script/cvars.rs#L762)) -- The reference then runs the console command `gxRestart` (`0x842978` through `0x63ce00`); none is queued here, because `gxMultisample` applies at next launch anyway: the camera reads its sample count once, at spawn. ([`src/script/cvars.rs:776`](../crates/benilla-ui/src/script/cvars.rs#L776)) -- The reference (`0x48dad0` into `0x639a20`) writes hardware-recommended values from its matched `VideoHardware.dbc` row and the `CGxFormat` preset it names (`[0xc4e6ac]`): twelve `gx*` CVars, a synchronous `RestartGx`, then sixteen more. benilla has no such matching, so its registered defaults are its recommended configuration. ([`src/script/cvars.rs:835`](../crates/benilla-ui/src/script/cvars.rs#L835)) -- The index is of the live window size, not of the `gxResolution` CVar the reference parses (`0x48bf20`), because the window here can be dragged to any size, where the reference's backbuffer stays at `gxResolution`'s, and `CT_Viewport` scales by the live one. ([`src/script/cvars.rs:888`](../crates/benilla-ui/src/script/cvars.rs#L888)) -- 0, a negative or an index past the count clamps to the nearer end, because the reference reads one element past the last there (`0x48c00d`), uninitialised memory. ([`src/script/cvars.rs:906`](../crates/benilla-ui/src/script/cvars.rs#L906)) -- Always empty, because a refresh rate is only selectable through an exclusive mode-set and benilla has none. ([`src/script/cvars.rs:947`](../crates/benilla-ui/src/script/cvars.rs#L947)) -- 1.12 has no such CVar; it exists because our Graphics page needs somewhere to keep the stop, and takes the API's name. ([`src/script/cvars.rs:1065`](../crates/benilla-ui/src/script/cvars.rs#L1065)) -- The getter reads `CVAR_WORLD_DETAIL`, where the reference's reads only `smallCull` (`0x488d77`), because benilla's stop follows the knob that draws: a console `frillDensity` write moves the ground clutter and `WorldDetail` with it, and no renderer reads `smallCull` (its callback's `[0x868620]` has no reader). ([`src/script/cvars.rs:1093`](../crates/benilla-ui/src/script/cvars.rs#L1093)) +- Slot 11 is refused, because the reference's gate (`cmp esi,0xa; jbe`) admits it; `0x4bce00` checks its bound (`0x4bce14`) but `0x4bc9a0` does not, so it writes one dword past the array (`0x4bcad9`), and the autocast toggle (`0x4bcbb0`) reads that word (`[0xb71438+0x28]`) with no bounds check. ([`src/script/cursor/pet.rs:20`](../crates/benilla-ui/src/script/cursor/pet.rs#L20)) +- The list is the window sizes this client can present, not the device's display modes, because benilla makes no exclusive mode-set. `"WxH"` is a contract: `OptionsFrame.lua:281-284` splits on the `x`, raising on a string without one, and `CT_Viewport.lua:107` matches `"(%d+)x(%d+)"`, failing silently. ([`src/script/cvars.rs:81`](../crates/benilla-ui/src/script/cvars.rs#L81)) +- The tie-break is ours, because area alone with the reference's adjacent-only dedupe can leave a duplicate `"WxH"` when two modes share an area (1280x960, 1600x768). ([`src/script/cvars.rs:94`](../crates/benilla-ui/src/script/cvars.rs#L94)) +- An id out of range is ignored, because the reference reads one entry past the last (`0x48c67c`) and a clamp would apply a format the player did not pick. ([`src/script/cvars.rs:763`](../crates/benilla-ui/src/script/cvars.rs#L763)) +- The reference then runs the console command `gxRestart` (`0x842978` through `0x63ce00`); none is queued here, because `gxMultisample` applies at next launch anyway: the camera reads its sample count once, at spawn. ([`src/script/cvars.rs:777`](../crates/benilla-ui/src/script/cvars.rs#L777)) +- The reference (`0x48dad0` into `0x639a20`) writes hardware-recommended values from its matched `VideoHardware.dbc` row and the `CGxFormat` preset it names (`[0xc4e6ac]`): twelve `gx*` CVars, a synchronous `RestartGx`, then sixteen more. benilla has no such matching, so its registered defaults are its recommended configuration. ([`src/script/cvars.rs:836`](../crates/benilla-ui/src/script/cvars.rs#L836)) +- The index is of the live window size, not of the `gxResolution` CVar the reference parses (`0x48bf20`), because the window here can be dragged to any size, where the reference's backbuffer stays at `gxResolution`'s, and `CT_Viewport` scales by the live one. ([`src/script/cvars.rs:889`](../crates/benilla-ui/src/script/cvars.rs#L889)) +- 0, a negative or an index past the count clamps to the nearer end, because the reference reads one element past the last there (`0x48c00d`), uninitialised memory. ([`src/script/cvars.rs:907`](../crates/benilla-ui/src/script/cvars.rs#L907)) +- Always empty, because a refresh rate is only selectable through an exclusive mode-set and benilla has none. ([`src/script/cvars.rs:948`](../crates/benilla-ui/src/script/cvars.rs#L948)) +- 1.12 has no such CVar; it exists because our Graphics page needs somewhere to keep the stop, and takes the API's name. ([`src/script/cvars.rs:1066`](../crates/benilla-ui/src/script/cvars.rs#L1066)) +- The getter reads `CVAR_WORLD_DETAIL`, where the reference's reads only `smallCull` (`0x488d77`), because benilla's stop follows the knob that draws: a console `frillDensity` write moves the ground clutter and `WorldDetail` with it, and no renderer reads `smallCull` (its callback's `[0x868620]` has no reader). ([`src/script/cvars.rs:1094`](../crates/benilla-ui/src/script/cvars.rs#L1094)) - The promotion's IME legs (`0x77d417`–`0x77d431`) and the IME writer's `or 6` (`0x77acde`, in `0x77ac60`) are not modelled: benilla has no IME composition. ([`src/script/editbox/flush.rs:28`](../crates/benilla-ui/src/script/editbox/flush.rs#L28)) - The nameplate glow is shown but never drawn, because its additive rim reads as hard edge lines in our linear-blending pipeline; the lit plate brightens its bar instead. ([`src/script/extract.rs:223`](../crates/benilla-ui/src/script/extract.rs#L223)) - A host of 0x80 bytes or more is refused. The reference copies the host into a 0x80-byte buffer (`0x5abc7c`-`0x5abc9c`) and writes its terminator one byte past the end, and the cut host could end in a whitelisted suffix the real one does not; this takes the safe side. ([`src/script/glue_core.rs:415`](../crates/benilla-ui/src/script/glue_core.rs#L415)) -- Benilla keeps that decode and then encodes it again, every byte outside the URL characters `URL_SAFE` as `%XY` (a decoded `%` too), because the opener on some platforms is a shell script (`xdg-open`) or takes the raw command tail (`rundll32`) and the string comes off the wire: no space, quote, backtick, `$`, `;`, `<`, `>`, `|`, `^`, `\`, brace or control byte reaches it. ([`src/script/glue_core.rs:459`](../crates/benilla-ui/src/script/glue_core.rs#L459)) +- Benilla keeps that decode and then encodes it again, every byte outside the URL characters `URL_SAFE` as `%XY` (a decoded `%` too), because the opener on some platforms is a shell script (`xdg-open`) or takes the raw command tail (`rundll32`) and the string comes off the wire: no space, quote, backtick, `$`, `;`, `<`, `>`, `|`, `^`, `\`, brace or control byte reaches it. ([`src/script/glue_core.rs:460`](../crates/benilla-ui/src/script/glue_core.rs#L460)) - Past `NAME_TRIES` names the answer is nil, where the reference keeps trying, forever when the generator has learned nothing. ([`src/script/glue_create.rs:968`](../crates/benilla-ui/src/script/glue_create.rs#L968)) - With no Region rows the reference reads a NULL category (`0x46e5b8`, `0x46f26a`) and faults; benilla lists every realm under one category, so a client whose `Wow.ini` names another Region still reaches a realm. ([`src/script/glue_realm.rs:195`](../crates/benilla-ui/src/script/glue_realm.rs#L195)) - Equal nonzero counts tie here, where the reference answers +1 both ways (its name tie-break at `0x46e841` is clobbered by `0x46e846`), because a comparator that is not a total order has no defined sort. ([`src/script/glue_realm.rs:260`](../crates/benilla-ui/src/script/glue_realm.rs#L260)) - A span count that no longer matches the live set always rebuilds, so a state this model does not flag (a ring wiped by `SetMaxLines`, a hidden frame, a frame not yet laid out, which the reference's rebuild skips at `0x78af7b`) leaves no stale button. ([`src/script/hyperlink.rs:165`](../crates/benilla-ui/src/script/hyperlink.rs#L165)) - `IsInInstance()` then answers `nil, "none"`, because the reference returns two results without pushing either (`0x48a7a9`), a stack bug. ([`src/script/instance.rs:24`](../crates/benilla-ui/src/script/instance.rs#L24)) - Bounds-checked where the reference indexes unguarded, so none reads past it. ([`src/script/item_stats.rs:587`](../crates/benilla-ui/src/script/item_stats.rs#L587)) -- Nil for a display row with no icon, where the reference answers the unloadable `Interface\Icons\`, because `SetTexture` shows no icon for either. ([`src/script/item_stats.rs:739`](../crates/benilla-ui/src/script/item_stats.rs#L739)) +- Nil for a display row with no icon, where the reference answers the unloadable `Interface\Icons\`, on which `SetTexture` keeps the previous image (`0x7702ac`), so a reused button would show its old icon. ([`src/script/item_stats.rs:739`](../crates/benilla-ui/src/script/item_stats.rs#L739)) - A key rebound to the command it already has keeps a duplicate index in 1.12.1 (`0x4b7786` lowers the other keys' indices before `0x4b77ac` returns on the same name), so both getters there answer one key too few; that client fault is not reproduced. ([`src/script/keybind.rs:223`](../crates/benilla-ui/src/script/keybind.rs#L223)) - An addon file whose first binding has no header opens a `HEADER_` row, where the reference files those rows under the previous file's last header, because under a foreign header the player could not find them. ([`src/script/keybind.rs:326`](../crates/benilla-ui/src/script/keybind.rs#L326)) - The handle's value is the address of a `CGxTex` (`SMemAlloc(0x54)`, `0x594a96`), which benilla cannot reproduce; each texture ranks instead by a creation stamp, one global sequence number taken when its cache key is first created and taken anew once its last region has let go of it (`super::texel::Texels`). ([`src/script/layer_batch.rs:9`](../crates/benilla-ui/src/script/layer_batch.rs#L9)) @@ -788,13 +788,13 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The reference bounds the index with `jbe` against the entry count (`0xb73760`), so an index one past the last entry reads the pool entry after it, which only an earlier, longer list wrote, or uninitialised heap (`0x4d5310`, the rebuild resetting the count without clearing, `0x4d547f`); that stale read answers 0 here, as an index further on does. ([`src/script/reputation.rs:563`](../crates/benilla-ui/src/script/reputation.rs#L563)) - The folds are keyed by header, not by the reference's mask positions, whose rebuild folds bit N-1 by registration index before the sort (`0x4d5d49`-`0x4d5d68`) and whose fold verbs search `0xb736c0` before `0x4d5c40` sorts it (`0x4d6400`), so Inactive opens at login whenever a childless header exists and inactivating a header's last child shows it expanded; that is a reference bug, and the folds follow the header the player clicked. ([`src/script/reputation.rs:631`](../crates/benilla-ui/src/script/reputation.rs#L631)) - Nesting stops at 32 where the reference recurses uncapped (its indent saturates at `0x80`), so a hostile structure cannot exhaust the stack. ([`src/script/saved.rs:21`](../crates/benilla-ui/src/script/saved.rs#L21)) -- The reference rewrites it from the live defaults (`0x51f865`–`0x51f970`), which would cost the player the whole file for one typo in a hand edit. ([`src/script/saved.rs:27`](../crates/benilla-ui/src/script/saved.rs#L27)) -- The writer's escapes are undone (`unescape`), where the reference sets the bytes between the quotes raw, so a string holding a quote or a backslash would grow every session. ([`src/script/saved.rs:199`](../crates/benilla-ui/src/script/saved.rs#L199)) +- The reference rewrites it from the live defaults (`0x51f865`–`0x51f970`) after renaming the old file to `.bak` (`0x51f794`, `0x51f8eb`, `.bak` at `0x8431e4`), so a hand edit with one typo survives only until the next logout. ([`src/script/saved.rs:27`](../crates/benilla-ui/src/script/saved.rs#L27)) +- The writer's escapes are undone (`unescape`), where the reference sets the bytes between the quotes raw, so a string holding a quote or a backslash would grow every session. ([`src/script/saved.rs:200`](../crates/benilla-ui/src/script/saved.rs#L200)) - The block step is not pixel-snapped (`0x766750`), because layout here is in logical units; the two differ by under a pixel, and not at all at the default spacing of 0. ([`src/script/simplehtml/mod.rs:13`](../crates/benilla-ui/src/script/simplehtml/mod.rs#L13)) - A block of width 0, in a frame sized by anchors, gets its text's natural width where the reference keeps 0, because every width-less FontString here does. ([`src/script/simplehtml/mod.rs:15`](../crates/benilla-ui/src/script/simplehtml/mod.rs#L15)) - The reference prints these to the console; here they are host warnings, because a malformed page is bad content, not a script error. ([`src/script/simplehtml/mod.rs:104`](../crates/benilla-ui/src/script/simplehtml/mod.rs#L104)) - Only `%s` and `%%` are expanded and other specs copied, because the real `printf` would read the string pointers as other types. ([`src/script/simplehtml/parse.rs:247`](../crates/benilla-ui/src/script/simplehtml/parse.rs#L247)) -- Skipped because it is no command; the reference raises. ([`src/script/slash.rs:65`](../crates/benilla-ui/src/script/slash.rs#L65)) +- Skipped as no command. The stock walk calls an entry only when one of its aliases matches (`ChatFrame.lua:2164-2178`), so only a matched one raises. ([`src/script/slash.rs:65`](../crates/benilla-ui/src/script/slash.rs#L65)) - The app plays the queued file after the call, so the refusals (the bus-3 cap, a muted SFX channel, a missing file) come too late to answer, and a queued file answers 1. ([`src/script/sound.rs:68`](../crates/benilla-ui/src/script/sound.rs#L68)) - `BOOKTYPE_SPELL`/`BOOKTYPE_PET` are engine globals here, where the reference defines them in `SpellBookFrame.lua:5-6`, so this module's tests run without the stock file. ([`src/script/spellbook.rs:10`](../crates/benilla-ui/src/script/spellbook.rs#L10)) - Ours answers milliseconds, since a cycle count of unknown rate is no use to an addon timing its code. ([`src/script/stdlib.rs:99`](../crates/benilla-ui/src/script/stdlib.rs#L99)) @@ -812,7 +812,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it - The selection clears to 0, because the header the reference re-selects (`0x4d7b42`, reading 1) has no spell id; the stock window's `> 1` test treats 0 and 1 alike. ([`src/script/trainer/mod.rs:306`](../crates/benilla-ui/src/script/trainer/mod.rs#L306)) - A header clears it too, because it has no spell id; the reference stores its `0xffffffff` (`0x4d7b05`) and reads back 1, which the stock window's `> 1` test treats the same as 0. ([`src/script/trainer/mod.rs:1278`](../crates/benilla-ui/src/script/trainer/mod.rs#L1278)) - Index 0 is a no-op, because one stray call would spend the purse; the reference buys every visible service for any index at or below 0 (`0x4da244`, `0x4d8a70`). ([`src/script/trainer/mod.rs:1302`](../crates/benilla-ui/src/script/trainer/mod.rs#L1302)) -- Kept apart from `Self::vertex_color`, which the reference's `Texture:SetAlpha` (`0x79b580`) rewrites, because the drawn product differs only on a region that sets both, or a gradient and an alpha, which no stock code does, and a FontString's `SetAlpha` then keeps its font colour. ([`src/script/types.rs:428`](../crates/benilla-ui/src/script/types.rs#L428)) +- Kept apart from `Self::vertex_color`, which the reference's `Texture:SetAlpha` (`0x79b580`) rewrites, because where stock sets both on one region (`PlayerFrame.lua:25-26`, `TargetFrame.lua:408` with `420-426`) the drawn product differs for about one frame, and a FontString's `SetAlpha` then keeps its font colour. ([`src/script/types.rs:428`](../crates/benilla-ui/src/script/types.rs#L428)) - Among whole-name matches ours picks the nearest, because the reference's first-walked pick is order-dependent and reads as a bug. ([`src/script/unit/bindings.rs:1066`](../crates/benilla-ui/src/script/unit/bindings.rs#L1066)) - The reference's matcher takes a whole-string hit at once only when it is nearer than the best so far (`0x493c88`-`0x493ca2`); an exact hit that is not nearer competes on prefix length alone (`0x493cf8`-`0x493d09`), so a nearer "Bobby" walked first beats an exact "Bob", and the pick follows the object list's order. ([`src/script/unit/by_name.rs:19`](../crates/benilla-ui/src/script/unit/by_name.rs#L19)) - A full tie goes to the lower guid, where the reference keeps the first unit its walk (`0x493aa0`) reaches, an order neither of ours has; a guid keeps the two picks equal. ([`src/script/unit/by_name.rs:61`](../crates/benilla-ui/src/script/unit/by_name.rs#L61)) @@ -870,7 +870,7 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it #### ffx_glow -- Kept a float where every reference pack (`0x6cb0e2`/`0x6cb557`/`0x6cb9e1`) quantizes it to a byte, because the two differ by under a thousandth (38/255 against 0.15). ([`src/ffx_glow.rs:176`](../crates/benilla-world/src/ffx_glow.rs#L176)) +- Kept a float where every reference pack (`0x6cb0e2`/`0x6cb557`/`0x6cb9e1`) floors it to a byte (`x·255 + 512`, bits >> 14; `0x7ffe58`, `0x8029cc`), because the two differ by at most 0.002 (0.30 packs to 76, 0.2980). ([`src/ffx_glow.rs:176`](../crates/benilla-world/src/ffx_glow.rs#L176)) #### ground_fx @@ -940,10 +940,10 @@ Each entry is the first sentence of a `Deviation:` comment, linking to where it #### weather - It defaults to 3 where the reference registers 2, because the precipitation rates were graded against a reference install running 3. ([`src/weather/mod.rs:103`](../crates/benilla-world/src/weather/mod.rs#L103)) -- A spawn ceiling on live plus pending drops, which the reference lacks, because each flake here costs a 4-vertex quad. ([`src/weather/precip/mod.rs:47`](../crates/benilla-world/src/weather/precip/mod.rs#L47)) -- The drop rate is scaled to a 30 fps client, the frame rate the reference's look was matched at, because the reference budgets `min(dt, 1/60)·rate` and drops the remainder (`0x67846f`–`0x678480`), so it emits half its nominal rate at 30 fps. 60 is byte-faithful. ([`src/weather/precip/mod.rs:78`](../crates/benilla-world/src/weather/precip/mod.rs#L78)) -- Flake pixels are pixels of an 800-px-tall screen, the height the look was matched at, converted to an angle, because the reference's literal framebuffer pixels shrink with resolution (2.7× smaller at 4K scale 2). ([`src/weather/precip/mod.rs:140`](../crates/benilla-world/src/weather/precip/mod.rs#L140)) -- xorshift32 to \[0, 1) instead of the reference's lagged-table generator, because the laws need only a uniform distribution, not its exact stream. ([`src/weather/precip/mod.rs:174`](../crates/benilla-world/src/weather/precip/mod.rs#L174)) +- A spawn ceiling on live plus pending drops, which the reference lacks, because each flake here costs a 4-vertex quad. ([`src/weather/precip/mod.rs:48`](../crates/benilla-world/src/weather/precip/mod.rs#L48)) +- The drop rate is scaled to a 30 fps client, the frame rate the reference's look was matched at, because the reference budgets `min(dt, 1/60)·rate` and drops the remainder (`0x67846f`–`0x678480`), so it emits half its nominal rate at 30 fps. 60 is byte-faithful. ([`src/weather/precip/mod.rs:79`](../crates/benilla-world/src/weather/precip/mod.rs#L79)) +- Flake pixels are pixels of an 800-px-tall screen, the height the look was matched at, converted to an angle, because the reference's literal framebuffer pixels shrink with resolution (2.7× smaller at 4K scale 2). ([`src/weather/precip/mod.rs:141`](../crates/benilla-world/src/weather/precip/mod.rs#L141)) +- xorshift32 to \[0, 1) instead of the reference's lagged-table generator, because the laws need only a uniform distribution, not its exact stream. ([`src/weather/precip/mod.rs:175`](../crates/benilla-world/src/weather/precip/mod.rs#L175)) #### wmo_portal