--- a/UPDATE-NOTES.md +++ b/UPDATE-NOTES.md @@ -5,6 +5,27 @@ (`release/notes.sh`, from `.github/workflows/dev.yml`); an edit to this file alone is put on the page by `.github/workflows/notes.yml`. +## 2026-11-21 · EQOA Rising: the tether camera looks up and down, and a smaller chat box +- With the Tether camera, push the right stick up to tilt the camera up and down to tilt it down. Hold R2 and + push the right stick forward or back to bring the camera closer or move it further out. The mouse wheel and + Page Up / Page Down still zoom. +- With Camera Pitch Axis on Normal (Options > Game), the Tether camera now turns the way the right stick is + pushed: right looks right, left looks left, up looks up. Inverted turns both round. +- Two new options under Options > Extended > UI > Chat: Chat Size draws the whole chat box smaller, from 100% + (the game's) down to 50%, text and all; Chat Lines sets how many lines it holds, 2 to 15 (5 is the game's). +- Mouse Smoothing (Options > Extended > Other > Camera), on by default: looking round slowly with the mouse + glides instead of stepping a pixel at a time; a quick flick still turns at once. Turn it off for the raw feel. +- Weapon Trails (Options > Extended > Graphics > Characters): turn off the streak a weapon leaves as it swings. +- Speech Bubbles (Options > Extended > UI > Name Plates), on by default: what someone says shows in a bubble + over their name for a few seconds. +- The page no longer sends crash reports to another server, and Network Setup no longer offers eqoaclassic.com. +- The compass's ring is drawn smooth, its edge round instead of in blocky steps; the rest of the HUD is as it was. +- A player who is raised, or respawns, in front of you stands up properly again, so if they die again you see them + fall again (and they block your way again while alive). +- New: a Windows client, the same game with every change above as a small download (your own disc image as + ever, no emulator). Its Network Setup offers EQOA Rising's own server, never another, and it sends no crash + reports to another server either. + ## 2026-11-20 · A gargoyle's left-hand weapon the right way up - A Gargoyle's weapon in the left hand was drawn upside down, its blade pointing at the ground. It is held as the right hand's is now, mirrored, as every other race holds a weapon in its off hand. --- a/crates/eqoa/src/controls.rs +++ b/crates/eqoa/src/controls.rs @@ -148,11 +148,15 @@ /// One of the game's frames (`frames.rs`): what this counts in frames /// (the manual look's step) moves only then. `Walker::frame_with` sets it. pub step: bool, + /// EQOA Rising: R2 held (the chat box's history, `VIWndGame` mode 33, where + /// the walk and the camera go on): the tether camera's right stick forward + /// and back is the camera's distance, not its tilt. + pub r2: bool, } impl Default for Client { fn default() -> Self { - Client { has_chat: false, inverted: false, auto_attack: false, swung: false, target: None, autorun: false, casting: false, move_ok: true, look_ok: true, rooted: false, timed_out: false, keys: [0.0; 8], steer: false, walk_view: None, lean: 0.0, follow: Follow::Off, run_speed: vi::walk::RUN_SPEED, walk_speed: 3.0, modal: false, flying: false, noclip: false, jumps: false, stood_sent: false, step: true } + Client { has_chat: false, inverted: false, auto_attack: false, swung: false, target: None, autorun: false, casting: false, move_ok: true, look_ok: true, rooted: false, timed_out: false, keys: [0.0; 8], steer: false, walk_view: None, lean: 0.0, follow: Follow::Off, run_speed: vi::walk::RUN_SPEED, walk_speed: 3.0, modal: false, flying: false, noclip: false, jumps: false, stood_sent: false, step: true, r2: false } } } @@ -262,6 +266,16 @@ if c.inverted && (mode == 2 || mode == 0) { pitch = -pitch; } + // EQOA Rising: the tether camera (mode 3) turns the other way round from + // the game's on the right stick, under either Camera Pitch Axis: Normal + // turns the way the stick is pushed (right looks right), Inverted the + // other way, as it turns the tilt round too (the server owner, 2026-11-22: + // "on normal its looking left is looking right", and "the inverted camera + // pitch still moves left and right looking like normal"). The keys' Home + // and End, a follow's steer and the mouse are the game's. + if mode == 3 && k[0] != Fe::ZERO { + orbit = -orbit; + } // the manual camera all the way in: the right stick looks, and the body // turns to the look (the module's doc) if c.modal && w.manual_terp() == Fe::ONE { @@ -485,8 +499,26 @@ } if c.flying { w.fly_look(if c.inverted { -pitch } else { pitch }); - } else if !w.under_liquid() && !w.at_liquid_surface() { + } else if !w.under_liquid() && !w.at_liquid_surface() && c.r2 { + // EQOA Rising: R2 held, the right stick forward and back is the + // camera's distance, as the game's own orbit zoom w.orbit_in(-pitch); + } else if !w.under_liquid() && !w.at_liquid_surface() { + // EQOA Rising: the tether camera's right stick tilts the view + // instead of zooming, as a flight looks (`fly_look`): under + // Camera Pitch Axis Normal pushed up the view goes up and pushed + // down it goes down (the server owner, 2026-11-22: tried on the + // stick's y as it comes), Inverted the other way round; R2 held + // with it zooms (above), and Page Up, Page Down and the mouse + // wheel still zoom. + // the stick's part, held still as the camera is (a window up, + // a silent line: `look_ok`, `timed_out`) + let stick = if c.look_ok && !c.timed_out { k[1] } else { Fe::ZERO }; + if stick != Fe::ZERO { + w.fly_look(if c.inverted { -stick } else { stick }); + } + // the keys' part (Page Up, Page Down) still zooms + w.orbit_in(-(pitch - stick)); } else { w.swim_up(-pitch); } @@ -609,12 +641,12 @@ // mode 1: the left stick's x strafes AND turns; the right orbits assert_eq!(run(1, STICKS, c).0, ["move 1 -0.75", "turn 0.75", "in -0.25", "right 0.5"]); // mode 3: view relative, zoom on ry, orbit on rx - assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "in -0.25", "right 0.5"]); + assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "flylook 0.25", "in -0", "right -0.5"]); // under liquid ry swims instead let mut w = Log::new(3); w.liquid = true; update_controls(&mut w, STICKS, &c); - assert_eq!(w.calls, ["vmove 1 -0.75", "swim -0.25", "right 0.5"]); + assert_eq!(w.calls, ["vmove 1 -0.75", "swim -0.25", "right -0.5"]); // the player's own cast walks let cast = Client { casting: true, ..c }; assert_eq!(run(0, STICKS, cast).0[0], "walk 1 -0.75"); @@ -628,13 +660,13 @@ #[test] fn in_flight_the_orbits_right_stick_looks_up_and_down() { let c = Client { flying: true, ..Client::default() }; - assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "flylook 0.25", "right 0.5"]); + assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "flylook 0.25", "right -0.5"]); assert_eq!(run(1, STICKS, c).0, ["move 1 -0.75", "turn 0.75", "flylook 0.25", "right 0.5"]); for m in [0, 2] { assert_eq!(run(m, STICKS, c).0, ["move 1 -0.75", "turn -0.5", "pitch 0.25"], "mode {m}"); } let turned = Client { inverted: true, ..c }; - assert_eq!(run(3, STICKS, turned).0, ["vmove 1 -0.75", "flylook -0.25", "right -0.5"]); + assert_eq!(run(3, STICKS, turned).0, ["vmove 1 -0.75", "flylook -0.25", "right 0.5"]); assert_eq!(run(1, STICKS, turned).0, ["move 1 -0.75", "turn 0.75", "flylook -0.25", "right -0.5"]); // the keyboard's Page Up looks up let mut keys = c; @@ -648,7 +680,26 @@ assert_eq!(run(0, STICKS, c).0, ["move 1 -0.75", "turn -0.5", "pitch -0.25"]); assert_eq!(run(2, STICKS, c).0, ["move 1 -0.75", "turn -0.5", "pitch -0.25"]); assert_eq!(run(1, STICKS, c).0, ["move 1 -0.75", "turn 0.75", "in -0.25", "right -0.5"]); - assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "in -0.25", "right -0.5"]); + // EQOA Rising: the tether camera's tilt and turn both turned round + assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "flylook -0.25", "in -0", "right 0.5"]); + } + + /// EQOA Rising: the tether camera (mode 3) tilts on the right stick's y and + /// turns the way the stick is pushed under Normal, Inverted turning both + /// round; with R2 held (the chat box's history) the stick's y zooms as the + /// game did. + #[test] + fn the_tether_camera_tilts_on_the_stick_and_zooms_with_r2() { + let c = Client::default(); + assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "flylook 0.25", "in -0", "right -0.5"]); + let inverted = Client { inverted: true, ..c }; + assert_eq!(run(3, STICKS, inverted).0, ["vmove 1 -0.75", "flylook -0.25", "in -0", "right 0.5"]); + let r2 = Client { r2: true, ..c }; + assert_eq!(run(3, STICKS, r2).0, ["vmove 1 -0.75", "in -0.25", "right -0.5"]); + // the control: the keys' Home turns as the game's Normal did + let mut keys = c; + keys.keys[7] = 1.0; + assert_eq!(run(3, [0.0; 4], keys).0, ["vmove 0 0", "in -0", "right -1"]); } #[test] @@ -843,7 +894,7 @@ #[test] fn the_mouse_steer_walks_mode_3_on_the_body_and_turns_to_no_target() { let steer = Client { steer: true, ..Client::default() }; - assert_eq!(run(3, STICKS, steer).0, ["move 1 -0.75", "in -0.25", "right 0.5"]); + assert_eq!(run(3, STICKS, steer).0, ["move 1 -0.75", "flylook 0.25", "in -0", "right -0.5"]); assert_eq!(run(3, STICKS, Client::default()).0[0], "vmove 1 -0.75"); assert_eq!(run(3, STICKS, Client { casting: true, ..steer }).0[0], "walk 1 -0.75"); // a fight: the game turns to the target; steered, the mouse's heading stays @@ -871,7 +922,7 @@ for (client, view) in [(c, kept.dir), (Client::default(), camera)] { let mut w = Log::new(3); update_controls(&mut w, STICKS, &client); - assert_eq!(w.calls, ["vmove 1 -0.75", "in -0.25", "right 0.5"]); + assert_eq!(w.calls, ["vmove 1 -0.75", "flylook 0.25", "in -0", "right -0.5"]); assert_eq!(w.views, [view]); } let mut w = Log::new(3); @@ -894,7 +945,7 @@ // the PS2's keyboard axes are left out then; the sticks are the same let c = Client { has_chat: true, ..Client::default() }; assert_eq!(run(0, STICKS, c).0, ["move 1 -0.75", "turn -0.5", "pitch 0.25"]); - assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "in -0.25", "right 0.5"]); + assert_eq!(run(3, STICKS, c).0, ["vmove 1 -0.75", "flylook 0.25", "in -0", "right -0.5"]); } /// The manual camera all the way in, a step: the look's heading turns by --- a/crates/eqoa/src/play.rs +++ b/crates/eqoa/src/play.rs @@ -195,6 +195,74 @@ pub name: String, pub tag: Option, pub mark: Option, + /// EQOA Rising: what it said lately and how much of its bubble shows + /// (Speech Bubbles: `Play::said_now`) + pub say: Option<(String, f32)>, +} + +/// EQOA Rising: a speech bubble: at most this wide (the PS2's pixels), this +/// many lines, this much room round its words, this far over the name, +/// its tail this long; its words' and its box's colours. +const BUBBLE_WIDTH: f32 = 170.0; +const BUBBLE_ROWS: usize = 3; +const BUBBLE_PAD: f32 = 4.0; +const BUBBLE_GAP: f32 = 3.0; +const BUBBLE_TAIL: f32 = 5.0; +const BUBBLE_TEXT: [f32; 4] = [1.0, 1.0, 1.0, 1.0]; +const BUBBLE_BOX: [f32; 4] = [0.06, 0.05, 0.09, 0.62]; + +/// EQOA Rising: how long a bubble stays (ms), by how much was said, and +/// how long it fades out at its end. +fn bubble_ms(said: &str) -> u32 { + (3500 + 70 * said.chars().count() as u32).clamp(4000, 10000) +} +const BUBBLE_FADE_MS: u32 = 600; + +/// EQOA Rising: a speaker's name as a bubble is kept under: its tags in +/// brackets ("[HC] ") left off, in lower case. +fn bubble_key(name: &str) -> String { + let mut s = name.trim(); + while s.starts_with('[') { + match s.find("] ") { + Some(i) => s = s[i + 2..].trim_start(), + None => break, + } + } + s.to_lowercase() +} + +/// EQOA Rising: a bubble's lines: its words wrapped at `BUBBLE_WIDTH`, a +/// word too long for a line cut to it, at most `BUBBLE_ROWS`, the last +/// ending "..." when more was said. +fn bubble_rows(said: &str, width: &impl Fn(&str) -> u32) -> Vec { + let fits = |s: &str| width(s) as f32 <= BUBBLE_WIDTH; + let mut rows: Vec = Vec::new(); + let mut row = String::new(); + for word in said.split_whitespace() { + let longer = if row.is_empty() { word.to_string() } else { format!("{row} {word}") }; + if fits(&longer) || row.is_empty() { + row = longer; + } else { + rows.push(std::mem::replace(&mut row, word.to_string())); + } + } + if !row.is_empty() { + rows.push(row); + } + for r in rows.iter_mut() { + while !fits(r) && r.chars().count() > 1 { + r.pop(); + } + } + if rows.len() > BUBBLE_ROWS { + rows.truncate(BUBBLE_ROWS); + let last = &mut rows[BUBBLE_ROWS - 1]; + while !fits(&format!("{last}...")) && !last.is_empty() { + last.pop(); + } + last.push_str("..."); + } + rows } /// A quest mark's colour (a GM's petition 1813: "yellow ! and ?"). @@ -523,6 +591,9 @@ /// The weapon trails (`VITrailFx`'s pool) and this frame's strips. trails: vi::trail::Trails, pub trail_strips: Vec, + /// EQOA Rising: Speech Bubbles: what each speaker said last and when + /// (the session's ms), by `bubble_key` + bubbles: std::collections::HashMap, /// The start menu (mode 13), when CLIENT's image gave its menus. pub start: Option, /// `m_p2EC28`: Quit answered yes; the viewer leaves. @@ -1980,13 +2051,26 @@ /// Overlapping Names Show (`overlap`) none is dropped, and they come /// farthest first, so the nearest is drawn over the rest (a plate tests the /// scene's depth but writes none: the order decides between plates). +#[allow(dead_code)] pub fn labels(plates: &[Plate], view: &PlateView, view_proj: glam::Mat4, text: &render::text::Text) -> Vec { labels_by(plates, view, view_proj, |s| text.width(s), text.height()) } +/// EQOA Rising: `labels`, and the speech bubbles' boxes behind them +/// (Speech Bubbles: a plate's `say`). +pub fn labels_and_bubbles(plates: &[Plate], view: &PlateView, view_proj: glam::Mat4, text: &render::text::Text) -> (Vec, Vec) { + plates_by(plates, view, view_proj, |s| text.width(s), text.height()) +} + /// `labels` with the font's measures: a string's `width` and the `height`, /// in the PS2's pixels. fn labels_by(plates: &[Plate], view: &PlateView, view_proj: glam::Mat4, width: impl Fn(&str) -> u32, height: u32) -> Vec { + plates_by(plates, view, view_proj, width, height).0 +} + +/// `labels_by`, and the boxes behind the speech bubbles it lays over the +/// names (EQOA Rising: a plate's `say`). +fn plates_by(plates: &[Plate], view: &PlateView, view_proj: glam::Mat4, width: impl Fn(&str) -> u32, height: u32) -> (Vec, Vec) { let mut queued = Vec::new(); let reach = view.distance * view.distance; for p in plates { @@ -2049,6 +2133,7 @@ // PS2's 448 lines is 2 / 448 high) let line = 2.0 * height as f32 * view.scale / render::text::SCREEN_H; let mut out = Vec::new(); + let mut boxes = Vec::new(); for (w, _, _, ndc, p, fade) in kept { let up = if p.tag.is_some() { line } else { 0.0 }; let color = [p.color[0], p.color[1], p.color[2], p.color[3] * fade]; @@ -2065,8 +2150,38 @@ color[3] *= fade; out.push(render::text::Label { at: [ndc.x, at, ndc.z], color, text: sign.into(), size }); } + // EQOA Rising: what it said, in a bubble over the name (and its + // mark): the lines from the top down, a box behind them with its + // tail toward the name + if let Some((said, shows)) = &p.say { + let rows = bubble_rows(said, &width); + if !rows.is_empty() { + let mut top = ndc.y + up + line * 0.5; + if p.mark.and_then(net::headmarks::sign).is_some() { + let size = mark_size(w); + top = ndc.y + up + line * (0.5 + 0.5 * size + 0.15) + line * size * 0.5; + } + // a PS2 pixel, at the plates' size, in the screen's -1..1 + let px = 2.0 * view.scale / render::text::SCREEN_H; + let n = rows.len() as f32; + let bottom = top + px * (BUBBLE_GAP + BUBBLE_TAIL); + let a = shows * fade; + let mut text_color = BUBBLE_TEXT; + text_color[3] *= a; + for (i, r) in rows.iter().enumerate() { + let y = bottom + px * BUBBLE_PAD + line * (n - 1.0 - i as f32 + 0.5); + out.push(render::text::Label { at: [ndc.x, y, ndc.z], color: text_color, text: r.clone(), size: 1.0 }); + } + let wide = rows.iter().map(|r| width(r)).max().unwrap_or(0) as f32 + 2.0 * BUBBLE_PAD; + let high = n * height as f32 + 2.0 * BUBBLE_PAD; + let mut box_color = BUBBLE_BOX; + box_color[3] *= a; + let mid = bottom + (n * line + 2.0 * px * BUBBLE_PAD) / 2.0; + boxes.push(render::text::PlateBox { at: [ndc.x, mid, ndc.z], size: [wide, high], color: box_color, tail: BUBBLE_TAIL }); + } + } } - out + (out, boxes) } /// How much smaller a merc's tag is drawn than its name: two of the font's @@ -2697,8 +2812,33 @@ /// A plate at `at` (the view is the identity, so its x and y are where /// it is on the screen, -1 to 1). + /// EQOA Rising: a plate with something said has its bubble over the + /// name, the words wrapped from the top down and a box behind them; + /// the control: the same plate with nothing said has neither. + #[test] + fn a_speech_bubble_sits_over_its_name() { + let width = |s: &str| s.chars().count() as u32 * 6; + let view = PlateView::game(Vec3::ZERO); + let (ls, boxes) = plates_by(&[plate([0.0; 3], "Ann")], &view, Mat4::IDENTITY, width, 12); + assert!(boxes.is_empty() && ls.len() == 1, "the control: no bubble: {ls:?}"); + let mut p = plate([0.0; 3], "Ann"); + p.say = Some(("well met friend, have you seen the gnoll camp by the old farm road".into(), 1.0)); + let (ls, boxes) = plates_by(&[p], &view, Mat4::IDENTITY, width, 12); + let name = ls.iter().find(|l| l.text == "Ann").unwrap(); + let rows: Vec<_> = ls.iter().filter(|l| l.text != "Ann").collect(); + assert!(rows.len() >= 2 && rows.iter().all(|l| l.at[1] > name.at[1]), "wrapped over the name: {ls:?}"); + assert!(rows.windows(2).all(|w| w[0].at[1] > w[1].at[1]), "the first line on top: {ls:?}"); + assert!(rows.iter().all(|l| width(&l.text) as f32 <= BUBBLE_WIDTH), "each line fits: {ls:?}"); + assert_eq!(boxes.len(), 1); + assert!(boxes[0].at[1] > name.at[1] && boxes[0].size[0] <= BUBBLE_WIDTH + 2.0 * BUBBLE_PAD); + // too much said: three lines, the last cut + let rows = bubble_rows(&"word ".repeat(80), &width); + assert!(rows.len() == BUBBLE_ROWS && rows[BUBBLE_ROWS - 1].ends_with("..."), "{rows:?}"); + assert_eq!(bubble_key("[HC] Ann"), "ann"); + } + fn plate(at: [f32; 3], name: &str) -> Plate { - Plate { at, color: [1.0; 4], name: name.into(), tag: None, mark: None } + Plate { at, color: [1.0; 4], name: name.into(), tag: None, mark: None, say: None } } fn names(view: &PlateView, plates: &[Plate]) -> Vec { @@ -2968,6 +3108,12 @@ WATCH.get_or_init(|| std::env::var("EQOA_WATCH").ok()).as_deref().is_some_and(|w| w.eq_ignore_ascii_case(name)) } +/// EQOA Rising: a creature's sprite laid down by death (`set_death`) whose +/// state is no longer death (14): a player raised or respawned in view. +fn up_again(state: u8, dead: bool) -> bool { + dead && state != 14 +} + /// `UpdateCreatures`' order: state 14 is death first, walking (`m_p255`) /// or not; then a walking creature follows its walk control, and any other /// takes its state as its locomotion. @@ -2985,6 +3131,15 @@ mod creature_sprite { use super::*; + /// EQOA Rising: a sprite laid down by death is up again once its state + /// is off death (a player raised or respawned in view). The control: + /// dead still, or never laid down. + #[test] + fn a_raised_creature_is_up_again() { + assert!(up_again(0, true) && up_again(1, true), "a raised player's sprite"); + assert!(!up_again(14, true) && !up_again(0, false), "the control"); + } + /// A creature that dies on the move dies: the death comes before the /// walk. The control: the walk first, as the client had it, leaves it /// walking. @@ -3486,7 +3641,7 @@ crate::racelabel::clear(); // Msg000D reads `m_speed` out of the dump let speed = dump.speed; - let mut p = Play { session, player, dump, entities: Entities::default(), view_sent: None, last_send: -1, stood_sent: false, last_pos: [0.0; 3], send_interval: 100, puppets: (0..MAX_SLOTS).map(|_| None).collect(), cues: vec![crate::sound::Cue::Named("respawn", 0.4)], weather: Vec::new(), regional: Default::default(), regional_clock: web_time::Instant::now(), retail_weather: 0, weather_fog: None, abilities: Default::default(), ability_token: 0, presses: Default::default(), hud_menus: Default::default(), autocast: Default::default(), slot_asked: None, gear: Default::default(), walks: (0..MAX_SLOTS).map(|_| None).collect(), aloft_vy: vec![None; MAX_SLOTS], airs: vec![Default::default(); MAX_SLOTS], carried: vec![false; MAX_SLOTS], carry_buf: vec![Default::default(); MAX_SLOTS], actors: vec![None; MAX_SLOTS], actor_passes: vec![false; MAX_SLOTS], shortcuts: (false, false), self_actor: None, actors_in: 0, refresh_collision: false, self_model: None, self_puppet: None, self_shown: true, cam_inside: false, cam_carry: None, chat: Default::default(), typing: None, target: u32::MAX, auto_attack: false, attack: Default::default(), swung: 0, stats: Default::default(), effects: Default::default(), damage: Default::default(), rings: Default::default(), self_at: None, words: None, ui_textures: None, ui_data: None, ui_assets: None, ui_art: None, modules_taken: [false; 2], hud: None, target_info: None, target_title: String::new(), target_guild: String::new(), info_up: false, mob_info: None, talk_held: false, mob_shown_at: None, pet_id: u32::MAX, pet_name: String::new(), info_window: Default::default(), chat_pending: Vec::new(), links: Default::default(), buffs: Default::default(), link_draft: None, event_no: 0, next_links: None, shift: false, wnd_chat: None, hud_last: 0, channel: 0, reply_name: String::new(), mode: 0, dialogs: Default::default(), priv_chat: Default::default(), response: Default::default(), pending_box: None, world_change: None, arrival: Vec::new(), group: Default::default(), mbox: Default::default(), trails: Default::default(), trail_strips: Vec::new(), race_cams: None, light: Default::default(), cam_preset: Default::default(), cam_saved: Default::default(), cam_entered: false, race_framed: false, race_frame_due: Vec::new(), death: None, fade: Default::default(), dead_casters: Vec::new(), death_ms: 0, death_eye: None, start: None, quit: false, booted: false, disconnected: None, hc_fall: None, start_open: None, start_keys: Vec::new(), emote: None, edit: Default::default(), edit_keys: Vec::new(), who: Default::default(), who_wnd: Default::default(), who_open: false, search_mode: false, search: Default::default(), who_keys: Vec::new(), who_tell: None, edit_typed: 0, spells: None, projectiles: Default::default(), casts: Vec::new(), petart: Default::default(), pet_tops: Default::default(), spell_ids: vec![None; MAX_SLOTS], spell_rand: Rand(1), book: Default::default(), book_open: false, book_keys: Vec::new(), items: Default::default(), waiting: false, quests: Default::default(), quest_log: Default::default(), quest_open: false, quest_from_hud: false, quest_keys: Vec::new(), guide: Default::default(), server_quests: false, guide_from: None, guide_forced: std::env::var_os("EQOA_QUEST_GUIDE").is_some(), trainer: Default::default(), trainer_open: false, trainer_refresh: false, trainer_keys: Vec::new(), cm: Default::default(), cm_wnd: Default::default(), cm_wait_since: None, cm_open: false, cm_msgs: Vec::new(), cm_keys: Vec::new(), factions: Default::default(), faction_wnd: Default::default(), faction_open: false, faction_keys: Vec::new(), npcw: Default::default(), options: crate::options::GameOptions { compact: std::env::var_os("EQOA_SOFT_KEYBOARD").is_none() as u8, ..Default::default() }, options_wnd: Default::default(), sound_ops: Vec::new(), apply_camera: false, filters_sent: None, shouts_told: false, shouts_dropped: false, chat_unsent: 0, reopened: 0, buddies: Default::default(), buddy_wnd: crate::social::BuddyList::new(0), ignore: Default::default(), ignore_wnd: crate::social::IgnoreList::new(0), panel_open: false, panel_keys: Vec::new(), controls_open: false, guild: Default::default(), guild_cmds: Default::default(), guild_wnd: Default::default(), guild_open: None, guild_keys: Vec::new(), craft: Default::default(), recipe_wnd: Default::default(), exp_wnd: Default::default(), craft_keys: Vec::new(), craft_outs: Vec::new(), mail: Default::default(), support: Default::default(), bank: Default::default(), autorun: false, following: false, follow_id: u32::MAX, cast_window: (0, 0), rooted: false, ride: None, locks: (true, true), aim_hold: false, aim_at: 0, manual_on: false, reticle_alpha: F::new(0.5), pad_mode: 0, last_group: false, keyboard: true, touched: false, rumbles: Vec::new(), glyphs: Default::default(), wheel: 0.0, key_queue: Default::default(), held: None, quick: Default::default(), quick_held: None, alarm: Default::default(), quick_typed: (0, 0), map: Default::default(), loading: Default::default(), speed, walk_speed: 3.0, drawn: 0, far_last: 0, fish: Default::default(), admin: Default::default(), live: Default::default(), duel: Default::default(), record: Default::default(), raid: Default::default(), meter: Default::default(), merc: Default::default(), dyepick: Default::default() }; + let mut p = Play { session, player, dump, entities: Entities::default(), view_sent: None, last_send: -1, stood_sent: false, last_pos: [0.0; 3], send_interval: 100, puppets: (0..MAX_SLOTS).map(|_| None).collect(), cues: vec![crate::sound::Cue::Named("respawn", 0.4)], weather: Vec::new(), regional: Default::default(), regional_clock: web_time::Instant::now(), retail_weather: 0, weather_fog: None, abilities: Default::default(), ability_token: 0, presses: Default::default(), hud_menus: Default::default(), autocast: Default::default(), slot_asked: None, gear: Default::default(), walks: (0..MAX_SLOTS).map(|_| None).collect(), aloft_vy: vec![None; MAX_SLOTS], airs: vec![Default::default(); MAX_SLOTS], carried: vec![false; MAX_SLOTS], carry_buf: vec![Default::default(); MAX_SLOTS], actors: vec![None; MAX_SLOTS], actor_passes: vec![false; MAX_SLOTS], shortcuts: (false, false), self_actor: None, actors_in: 0, refresh_collision: false, self_model: None, self_puppet: None, self_shown: true, cam_inside: false, cam_carry: None, chat: Default::default(), typing: None, target: u32::MAX, auto_attack: false, attack: Default::default(), swung: 0, stats: Default::default(), effects: Default::default(), damage: Default::default(), rings: Default::default(), self_at: None, words: None, ui_textures: None, ui_data: None, ui_assets: None, ui_art: None, modules_taken: [false; 2], hud: None, target_info: None, target_title: String::new(), target_guild: String::new(), info_up: false, mob_info: None, talk_held: false, mob_shown_at: None, pet_id: u32::MAX, pet_name: String::new(), info_window: Default::default(), chat_pending: Vec::new(), links: Default::default(), buffs: Default::default(), link_draft: None, event_no: 0, next_links: None, shift: false, wnd_chat: None, hud_last: 0, channel: 0, reply_name: String::new(), mode: 0, dialogs: Default::default(), priv_chat: Default::default(), response: Default::default(), pending_box: None, world_change: None, arrival: Vec::new(), group: Default::default(), mbox: Default::default(), trails: Default::default(), trail_strips: Vec::new(), bubbles: Default::default(), race_cams: None, light: Default::default(), cam_preset: Default::default(), cam_saved: Default::default(), cam_entered: false, race_framed: false, race_frame_due: Vec::new(), death: None, fade: Default::default(), dead_casters: Vec::new(), death_ms: 0, death_eye: None, start: None, quit: false, booted: false, disconnected: None, hc_fall: None, start_open: None, start_keys: Vec::new(), emote: None, edit: Default::default(), edit_keys: Vec::new(), who: Default::default(), who_wnd: Default::default(), who_open: false, search_mode: false, search: Default::default(), who_keys: Vec::new(), who_tell: None, edit_typed: 0, spells: None, projectiles: Default::default(), casts: Vec::new(), petart: Default::default(), pet_tops: Default::default(), spell_ids: vec![None; MAX_SLOTS], spell_rand: Rand(1), book: Default::default(), book_open: false, book_keys: Vec::new(), items: Default::default(), waiting: false, quests: Default::default(), quest_log: Default::default(), quest_open: false, quest_from_hud: false, quest_keys: Vec::new(), guide: Default::default(), server_quests: false, guide_from: None, guide_forced: std::env::var_os("EQOA_QUEST_GUIDE").is_some(), trainer: Default::default(), trainer_open: false, trainer_refresh: false, trainer_keys: Vec::new(), cm: Default::default(), cm_wnd: Default::default(), cm_wait_since: None, cm_open: false, cm_msgs: Vec::new(), cm_keys: Vec::new(), factions: Default::default(), faction_wnd: Default::default(), faction_open: false, faction_keys: Vec::new(), npcw: Default::default(), options: crate::options::GameOptions { compact: std::env::var_os("EQOA_SOFT_KEYBOARD").is_none() as u8, ..Default::default() }, options_wnd: Default::default(), sound_ops: Vec::new(), apply_camera: false, filters_sent: None, shouts_told: false, shouts_dropped: false, chat_unsent: 0, reopened: 0, buddies: Default::default(), buddy_wnd: crate::social::BuddyList::new(0), ignore: Default::default(), ignore_wnd: crate::social::IgnoreList::new(0), panel_open: false, panel_keys: Vec::new(), controls_open: false, guild: Default::default(), guild_cmds: Default::default(), guild_wnd: Default::default(), guild_open: None, guild_keys: Vec::new(), craft: Default::default(), recipe_wnd: Default::default(), exp_wnd: Default::default(), craft_keys: Vec::new(), craft_outs: Vec::new(), mail: Default::default(), support: Default::default(), bank: Default::default(), autorun: false, following: false, follow_id: u32::MAX, cast_window: (0, 0), rooted: false, ride: None, locks: (true, true), aim_hold: false, aim_at: 0, manual_on: false, reticle_alpha: F::new(0.5), pad_mode: 0, last_group: false, keyboard: true, touched: false, rumbles: Vec::new(), glyphs: Default::default(), wheel: 0.0, key_queue: Default::default(), held: None, quick: Default::default(), quick_held: None, alarm: Default::default(), quick_typed: (0, 0), map: Default::default(), loading: Default::default(), speed, walk_speed: 3.0, drawn: 0, far_last: 0, fish: Default::default(), admin: Default::default(), live: Default::default(), duel: Default::default(), record: Default::default(), raid: Default::default(), meter: Default::default(), merc: Default::default(), dyepick: Default::default() }; p.take_abilities(); p.npcw_world_entry(); // world entry: LoadModels and StreamFillCache under the loading screen @@ -4551,6 +4706,13 @@ // SetLocomotion(state) (`creature_loco`). if let Some(c) = &e.creature { let walk = self.walks[slot].as_ref().map(|(_, w)| w).filter(|_| c.p255 != 0); + // EQOA Rising: up again where it lay (a player raised + // or respawned in view, which the server lays down + // while dead): no longer dead, so its body blocks + // again and its next death lays it down again + if up_again(c.state, cs.dead) { + cs.dead = false; + } match (creature_loco(c.state, walk.is_some()), walk) { // laid down at once for a corpse seen first, its // spells ended @@ -4690,6 +4852,10 @@ self.self_at = None; } self.trail_strips = crate::trails::render(&mut self.trails, game_ms); + // EQOA Rising: Weapon Trails off, the swings' streaks not drawn + if !crate::settings::weapon_trails() { + self.trail_strips.clear(); + } // The camera style: the first entry's ToggleCameraStyle; the start // menu's ApplyRaceCamera while it is up, ApplyDefaultCamera after let rc = self.race_camera(); @@ -5059,6 +5225,21 @@ NAME_COLORS[k] } + /// EQOA Rising: what `name` said lately and how much of its bubble + /// shows (fading out over its last `BUBBLE_FADE_MS`), while Speech + /// Bubbles is on. + fn said_now(&self, name: &str, now: u32) -> Option<(String, f32)> { + if !crate::settings::speech_bubbles() { + return None; + } + let (said, at) = self.bubbles.get(&bubble_key(name))?; + let (age, life) = (now.wrapping_sub(*at), bubble_ms(said)); + if age >= life { + return None; + } + Some((said.clone(), ((life - age) as f32 / BUBBLE_FADE_MS as f32).min(1.0))) + } + /// `SetName`'s plates for every creature drawn: its name, in /// `NameColors[ApplyLook's pick]`, at its name node. pub fn plates(&self) -> Vec { @@ -5066,6 +5247,7 @@ if self.loading.up() { return out; } + let now = self.session.now(); for (slot, e) in self.entities.slots.iter().enumerate() { let (Some(e), Some(Some(p))) = (e, self.puppets.get(slot)) else { continue }; let (Some(c), Some(at)) = (&e.creature, p.name_at) else { continue }; @@ -5077,7 +5259,9 @@ // a quest mark over it from a server that sends them, while // Extended's Quest Markers is on (`net::headmarks`) let mark = crate::settings::head_marks().then(|| self.session.head_mark(e.id)).flatten(); - out.push(Plate { at, color: self.name_color(c), name: c.name.clone(), tag: self.merc_tag(c), mark }); + // what it said lately (Speech Bubbles) + let say = self.said_now(&c.name, now); + out.push(Plate { at, color: self.name_color(c), name: c.name.clone(), tag: self.merc_tag(c), mark, say }); } out } @@ -6059,7 +6243,8 @@ let f = render::ui::frame_from_window(size, [at.0 as f32, at.1 as f32]); // where the player put the box (`hudlayout`) let m = crate::hudlayout::shift(crate::hudlayout::Piece::Chat, crate::hudlayout::Beyond::of(size)); - [f[0] - render::ui::side(size) - m[0], f[1] - render::ui::top(size) - m[1]] + // EQOA Rising: Chat Size, the point back in the box's own size + crate::hudlayout::chat_unzoom([f[0] - render::ui::side(size) - m[0], f[1] - render::ui::top(size) - m[1]]) } /// A mouse button down in the world at window pixels `at` (`left`: the left @@ -6625,6 +6810,17 @@ eprintln!("chat: link {} {:?}", l.id, String::from_utf16_lossy(&w[a..b])); } } + // EQOA Rising: a say line ("Name: words") gives its speaker a bubble + // (Speech Bubbles); the old ones go + let now = self.session.now(); + self.bubbles.retain(|_, (said, at)| now.wrapping_sub(*at) < bubble_ms(said)); + if crate::chat::kind_of(&text, color) == crate::chat::Kind::Say + && let Some((who, said)) = text.split_once(": ") + && !who.trim().is_empty() + && !said.trim().is_empty() + { + self.bubbles.insert(bubble_key(who), (said.trim().to_string(), now)); + } self.chat_pending.push((text.clone(), color, self.session.now(), links)); self.chat.push_back((text, color)); while self.chat.len() > 8 { @@ -6998,6 +7194,9 @@ stood_sent: self.stood_sent && self.arrival.is_empty(), // a frame of the game's: the walker's (`frame_with`) step: true, + // EQOA Rising: R2 held (the chat box's history): the tether + // camera's right stick zooms (`controls::update_controls`) + r2: self.mode == 33, } } @@ -10385,6 +10584,8 @@ c.show_links = crate::settings::item_links(); // Chat Always Shown (ticket 1914): never sliding away c.always = crate::settings::chat_always(); + // EQOA Rising: Chat Lines, the box's size + c.rows = crate::settings::chat_lines(); // the chat tabs (ticket 1951), each line into its kind's let opts = crate::settings::client(); c.set_tabs(opts.chat_tabs, opts.chat_tab_names); --- a/crates/eqoa/src/chat.rs +++ b/crates/eqoa/src/chat.rs @@ -636,6 +636,12 @@ walk: Option, /// Chat Always Shown (the module's doc): open at five rows, every line. pub always: bool, + /// EQOA Rising: the lines the box holds (Chat Lines, 5 the game's to 15): + /// a taller box grows upward, its bottom where the game's is; at 5, the + /// game's box exactly. + pub rows: i32, + /// EQOA Rising: the box's full height for `rows` (the game's 85 at 5). + full_height_px: i32, /// The chat tabs (the module's doc). tabs: Tabs, } @@ -650,7 +656,7 @@ /// `Init`: the window is 462 wide and lines wrap at its width less 45. pub fn new() -> Self { - WndChat { mode: 0, height: 0, target: 0, lines: 0, text: ChatText::new(462 - 45), window: Window::default(), scroll: 0, top: 0, bottom: 0, held: 0, repeat: 0.0, cues: Vec::new(), shown: Vec::new(), sel: None, drag: None, told: None, wheel: 0.0, following: false, link_hits: Vec::new(), show_links: true, walk: None, always: false, tabs: Tabs::default() } + WndChat { mode: 0, height: 0, target: 0, lines: 0, text: ChatText::new(462 - 45), window: Window::default(), scroll: 0, top: 0, bottom: 0, held: 0, repeat: 0.0, cues: Vec::new(), shown: Vec::new(), sel: None, drag: None, told: None, wheel: 0.0, following: false, link_hits: Vec::new(), show_links: true, walk: None, always: false, rows: 5, full_height_px: 85, tabs: Tabs::default() } } /// The tabs as the settings have them now (each kind's tab, the names): @@ -759,7 +765,7 @@ /// fixed mode), at most five. fn count_lines(&self) -> i32 { if self.fixed() { - return 5; + return self.rows; } let mut n = 0; let mut i = self.text.first(); @@ -769,7 +775,7 @@ } i = ChatText::next(i); } - n.min(5) + n.min(self.rows) } /// The chat box's top left at its full height (its five rows, as the fixed @@ -777,11 +783,15 @@ /// before a moved piece's shift): `draw`'s window there. The stacked bars /// stand on it (`hudmenu::HudMenus::draw_stacked`). pub fn full_top_left(vui: &Vui, ui: &dyn Raster) -> [i32; 2] { + // EQOA Rising: Chat Lines' taller box, its top that much higher + let (rows, step) = (crate::settings::chat_lines(), vui.font_height(ui) - 4); let mut w = Window::default(); - w.init(vui, ui, [422, 390], 462, 6, 1); - w.center = [422, 475 - 85]; + w.init(vui, ui, [422, 390], 462, rows + 1, 1); + w.center = [422, 475 - 85 - (rows - 5) * step + (rows - 5) * step / 2]; let tl = w.top_left(); - [tl[0] + 25, tl[1]] + // EQOA Rising: Chat Size, the box's corner where it is drawn + let z = crate::hudlayout::chat_zoom([(tl[0] + 25) as f32, tl[1] as f32]); + [z[0].round() as i32, z[1].round() as i32] } /// Whether the box is held open at five rows with every line in it: the @@ -800,11 +810,11 @@ } self.scroll = on; if on == 1 { - self.target = 85; - self.height = 85; + self.target = self.full_height_px; + self.height = self.full_height_px; self.top = self.text.end(); self.bottom = self.top; - for _ in 0..5 { + for _ in 0..self.rows { if self.top == self.text.first() { break; } @@ -889,17 +899,21 @@ } } } - self.window.init(vui, ui, [422, 390], 462, 6, 1); + // EQOA Rising: the window holds `rows` lines (the game's 5: 6 rows of + // it), its backdrop and its full height as much taller + let extra = (self.rows - 5) * (vui.font_height(ui) - 4); + self.full_height_px = 85 + extra; + self.window.init(vui, ui, [422, 390], 462, self.rows + 1, 1); if self.mode != 0 { - crate::ui::chat_strip(vui, ui, [200, 331], [442, 118]); + crate::ui::chat_strip(vui, ui, [200, 331 - extra], [442, 118 + extra]); } self.follow(); let it = if self.scroll == 1 { self.bottom } else { self.text.end() }; - self.lines = if self.scroll == 1 { 5 } else { self.count_lines() }; + self.lines = if self.scroll == 1 { self.rows } else { self.count_lines() }; let h = vui.font_height(ui); if self.fixed() { - self.target = 85; - self.height = 85; + self.target = self.full_height_px; + self.height = self.full_height_px; self.window.open(true); } else if self.lines == 0 { self.target = -((h - 4) * 2); @@ -908,7 +922,7 @@ self.target = (h - 4) * self.lines; self.window.open(false); } - self.window.center = [422, 475 - self.height]; + self.window.center = [422, 475 - self.height + extra / 2]; if self.window.is_open() || self.window.is_opening() || self.window.is_closing() { self.window.draw(vui, ui); } @@ -941,7 +955,8 @@ self.tell_copy(); if self.scroll == 1 { let n = self.text.count(); - let t = if n > 5 { self.text.index(self.top) as f32 / (n - 5) as f32 } else { 0.0 }; + let r = self.rows as usize; + let t = if n > r { self.text.index(self.top) as f32 / (n - r) as f32 } else { 0.0 }; let tl = self.window.top_left(); let at = [tl[0] + 10, tl[1] + 10]; self.window.draw_vscroll(vui, ui, at, self.window.bottom_right()[1] - tl[1] - 40, t); --- a/crates/eqoa/src/settings.rs +++ b/crates/eqoa/src/settings.rs @@ -574,12 +574,16 @@ const SERVER_FILE: &str = "server.opt"; -/// The server a client that never kept one connects to (the user, 2026-11-08: -/// "lets make eqoaclassic.com the default network config for the vanilla -/// client. apk users reporting they cannot login"): natively alone, as a page -/// is told its own (`web`'s `server` option) and another site's page must not -/// be sent here. -pub const DEFAULT_SERVER: &str = "eqoaclassic.com"; +/// The server a client that never kept one connects to, natively alone, as a +/// page is told its own (`web`'s `server` option). EQOA Rising: its own +/// address, built in (`EQOA_RISING_SERVER` when the program is built, +/// ship.sh), and none without it, Play then saying to set one in Network +/// Setup: never another server's (the vanilla client's was eqoaclassic.com), +/// where an EQOA Rising account's login would go. +pub const DEFAULT_SERVER: Option<&str> = match option_env!("EQOA_RISING_SERVER") { + Some(s) if !s.is_empty() => Some(s), + _ => None, +}; /// The server the title's Network Setup keeps (`server.opt`: the address /// alone, a host name or IPv4 address), if one was set; a blank one kept is @@ -594,7 +598,7 @@ /// [`DEFAULT_SERVER`] natively; none in a page. fn default_server() -> Option { - (!cfg!(target_arch = "wasm32")).then(|| DEFAULT_SERVER.to_string()) + DEFAULT_SERVER.filter(|_| !cfg!(target_arch = "wasm32")).map(str::to_string) } /// Keeps `s` as the server (blank: none). @@ -1059,6 +1063,21 @@ /// rows with the last lines in it, never sliding away (`chat::WndChat:: /// always`). Off by default, the game's box. pub chat_always: bool, + /// EQOA Rising: Chat Lines (Extended > UI > Chat), how many lines the chat + /// box holds, 5 (the game's) to 15; the box grows upward (`chat::WndChat::rows`). + pub chat_lines: u8, + /// EQOA Rising: Chat Size (Extended > UI > Chat), the whole chat box drawn + /// at this percent of the game's size, 50 to 100 (`hudlayout`: Piece::Chat). + pub chat_scale: u8, + /// EQOA Rising: Mouse Smoothing (Extended > Camera), the mouse's look + /// eased over a few frames (`mouse::smooth_look`). On by default. + pub mouse_smooth: bool, + /// EQOA Rising: Weapon Trails (Extended > Characters), the streak a + /// weapon leaves as it swings (`trails`). On by default, the game's. + pub weapon_trails: bool, + /// EQOA Rising: Speech Bubbles (Extended > Name Plates), what someone + /// says shown over its name for a few seconds. On by default. + pub speech_bubbles: bool, /// R2 Channel Switch (the server owner, 2026-11-18: "for switching chat /// channels hold r2 then dpad left/right can switch channels if players /// have that on"): with R2 held (the chat box's history, mode 33) left @@ -1529,6 +1548,11 @@ auto_target: false, weapon_swap_back: false, chat_always: false, + chat_lines: CHAT_LINES_GAME, + chat_scale: 100, + mouse_smooth: true, + weapon_trails: true, + speech_bubbles: true, r2_channels: false, stacked_bars: false, spell_bar_opacity: 100, @@ -1708,6 +1732,23 @@ if self.chat_always { s.push_str("chat_always=on\n"); } + // Chat Lines only when not the game's five + if self.chat_lines != CHAT_LINES_GAME { + s.push_str(&format!("chat_lines={}\n", self.chat_lines)); + } + // Chat Size only when not the game's + if !self.speech_bubbles { + s.push_str("speech_bubbles=off\n"); + } + if !self.weapon_trails { + s.push_str("weapon_trails=off\n"); + } + if !self.mouse_smooth { + s.push_str("mouse_smooth=off\n"); + } + if self.chat_scale != 100 { + s.push_str(&format!("chat_scale={}\n", self.chat_scale)); + } if self.stacked_bars { s.push_str("stacked_bars=on\n"); } @@ -1972,6 +2013,22 @@ ("r2_channels", "on") => c.r2_channels = true, ("r2_channels", "off") => c.r2_channels = false, ("chat_always", "off") => c.chat_always = false, + ("chat_lines", v) => { + if let Some(n) = v.parse::().ok().filter(|n| (CHAT_LINES_MIN..=CHAT_LINES_MAX).contains(n)) { + c.chat_lines = n; + } + } + ("speech_bubbles", "on") => c.speech_bubbles = true, + ("speech_bubbles", "off") => c.speech_bubbles = false, + ("weapon_trails", "on") => c.weapon_trails = true, + ("weapon_trails", "off") => c.weapon_trails = false, + ("mouse_smooth", "on") => c.mouse_smooth = true, + ("mouse_smooth", "off") => c.mouse_smooth = false, + ("chat_scale", v) => { + if let Some(n) = v.parse::().ok().filter(|n| (CHAT_SCALE_MIN..=100).contains(n) && n % 5 == 0) { + c.chat_scale = n; + } + } ("stacked_bars", "on") => c.stacked_bars = true, ("stacked_bars", "off") => c.stacked_bars = false, ("spell_bar_opacity", v) => { @@ -2670,6 +2727,38 @@ client().chat_always } +/// EQOA Rising: Chat Lines' range, two up to fifteen (five the game's). +pub const CHAT_LINES_GAME: u8 = 5; +pub const CHAT_LINES_MIN: u8 = 2; +pub const CHAT_LINES_MAX: u8 = 15; +/// EQOA Rising: Chat Size's smallest, in percent of the game's box. +pub const CHAT_SCALE_MIN: u8 = 50; + +/// EQOA Rising: Chat Lines (Extended > UI > Chat), the chat box's lines. +pub fn chat_lines() -> i32 { + client().chat_lines.clamp(CHAT_LINES_MIN, CHAT_LINES_MAX) as i32 +} + +/// EQOA Rising: Speech Bubbles (Extended > Name Plates). +pub fn speech_bubbles() -> bool { + client().speech_bubbles +} + +/// EQOA Rising: Weapon Trails (Extended > Characters). +pub fn weapon_trails() -> bool { + client().weapon_trails +} + +/// EQOA Rising: Mouse Smoothing (Extended > Camera). +pub fn mouse_smooth() -> bool { + client().mouse_smooth +} + +/// EQOA Rising: Chat Size (Extended > UI > Chat), the chat box's scale, 0.5 to 1. +pub fn chat_scale() -> f32 { + client().chat_scale.clamp(CHAT_SCALE_MIN, 100) as f32 / 100.0 +} + /// Auto Save Options (Extended > Other > General; ticket 2002). pub fn auto_save() -> bool { client().auto_save @@ -4830,20 +4919,21 @@ assert_eq!(saved_login(), (String::new(), String::new(), false)); } - /// Network Setup's server: eqoaclassic.com until one is kept, kept + /// Network Setup's server: the built-in one (EQOA Rising's, or none) + /// until one is kept, kept /// trimmed, a blank one is none (not the default again), and a store that /// refuses keeps nothing. #[test] fn the_server_is_kept_trimmed_and_blank_is_none() { testing::reset(false); - assert_eq!(server().as_deref(), Some(DEFAULT_SERVER), "none kept yet: the default"); + assert_eq!(server().as_deref(), DEFAULT_SERVER, "none kept yet: the default"); set_server(" eqoa.example.com \n").unwrap(); assert_eq!(server().as_deref(), Some("eqoa.example.com")); set_server("").unwrap(); assert_eq!(server(), None, "blank is none"); testing::reset(true); assert!(set_server("192.0.2.1").is_err(), "the control: a refusing store"); - assert_eq!(server().as_deref(), Some(DEFAULT_SERVER), "nothing kept: the default"); + assert_eq!(server().as_deref(), DEFAULT_SERVER, "nothing kept: the default"); testing::reset(false); } --- a/crates/eqoa/src/options.rs +++ b/crates/eqoa/src/options.rs @@ -1088,6 +1088,18 @@ // Chat Always Shown (ticket 1914): the box from the next // frame (`chat::WndChat::always`) 89 => c.chat_always = !c.chat_always, + // EQOA Rising: Chat Lines, the box from the next frame + // (`chat::WndChat::rows`) + CHAT_LINES => slide(&mut c.chat_lines, crate::settings::CHAT_LINES_MIN, crate::settings::CHAT_LINES_MAX, 1), + // EQOA Rising: Chat Size, the box drawn smaller from the + // next frame (`hudlayout::begin`, Piece::Chat) + CHAT_SCALE => slide(&mut c.chat_scale, crate::settings::CHAT_SCALE_MIN, 100, 5), + // EQOA Rising: Mouse Smoothing, the look from the next frame + MOUSE_SMOOTH => c.mouse_smooth = !c.mouse_smooth, + // EQOA Rising: Weapon Trails, from the next frame + WEAPON_TRAILS => c.weapon_trails = !c.weapon_trails, + // EQOA Rising: Speech Bubbles, from the next frame + SPEECH_BUBBLES => c.speech_bubbles = !c.speech_bubbles, // Stacked Spell Bars (ticket 1913): from the next frame // (`hudmenu::Stacked`) 90 => c.stacked_bars = !c.stacked_bars, @@ -1814,7 +1826,7 @@ /// Extended's rows, by the item each changes (`change`), and their labels. /// A row is drawn by its item (`value_text`, or `slider_at` for a slider) /// and shown on the page of the category that lists it (`CATEGORIES`). -const EXTENDED_ITEMS: [(i32, &str); 102] = [ +const EXTENDED_ITEMS: [(i32, &str); 107] = [ (12, "Level of Detail"), (13, "Brightness"), (14, "Frame Rate"), @@ -1911,6 +1923,11 @@ (WEATHER, "Weather"), (WEAPON_SWAP_BACK, "Weapon Swap Back"), (R2_CHANNELS, "R2 Channel Switch"), + (CHAT_LINES, "Chat Lines"), + (CHAT_SCALE, "Chat Size"), + (MOUSE_SMOOTH, "Mouse Smoothing"), + (WEAPON_TRAILS, "Weapon Trails"), + (SPEECH_BUBBLES, "Speech Bubbles"), (PACK_MEMORY, "Texture Pack Memory"), (PACK_PRECACHE, "Precache Textures"), (PACK_COMPRESS, "Pack Compression"), @@ -1961,6 +1978,16 @@ /// R2 Channel Switch's item (the server owner, 2026-11-18). 150, not the next /// free, as Weapon Swap Back's 140. const R2_CHANNELS: i32 = 150; +/// EQOA Rising: Chat Lines' item, the chat box's size. +const CHAT_LINES: i32 = 151; +/// EQOA Rising: Chat Size's item, the chat box's scale. +const CHAT_SCALE: i32 = 152; +/// EQOA Rising: Mouse Smoothing's item. +const MOUSE_SMOOTH: i32 = 153; +/// EQOA Rising: Weapon Trails' item. +const WEAPON_TRAILS: i32 = 154; +/// EQOA Rising: Speech Bubbles' item. +const SPEECH_BUBBLES: i32 = 155; /// Texture Pack Memory's item (the owner's report of 2026-11-18, "some /// textures are not being loaded from texture packs"). 160, not the next /// free, as R2 Channel Switch's 150. @@ -2070,7 +2097,7 @@ Category { name: "Video", items: VIDEO, note: Note::Scale, group: Group::Graphics }, Category { name: "World", items: &[20, 35, 36, 37, 47, 25], note: Note::None, group: Group::Graphics }, Category { name: "Lighting", items: &[52, 53, 56, 57, 54, 63], note: Note::Lighting, group: Group::Graphics }, - Category { name: "Characters", items: &[12, 23, 24, 46], note: Note::Server, group: Group::Graphics }, + Category { name: "Characters", items: &[12, 23, 24, 46, WEAPON_TRAILS], note: Note::Server, group: Group::Graphics }, Category { name: "Textures", items: TEXTURES, note: Note::Textures, group: Group::Graphics }, Category { name: "HUD", items: &[22, 90, 30, 40, 58, 83], note: Note::None, group: Group::Ui }, // the group's and the raid's windows (2026-11-12, Power Bars: HUD's page @@ -2079,15 +2106,15 @@ // Minimap Scroll Frame (2026-11-13) here: Map's page was full // Spell Bar Opacity (2026-11-13, ticket 1953) here: HUD's page is full Category { name: "HUD Layout", items: &[76, 77, 91, SPELL_BAR_OPACITY, SPELL_BAR_LAYOUT, UTILITY_LAYOUT], note: Note::Hud, group: Group::Ui }, - Category { name: "Name Plates", items: &[27, 34, 85, TARGET_LEVEL], note: Note::None, group: Group::Ui }, + Category { name: "Name Plates", items: &[27, 34, 85, TARGET_LEVEL, SPEECH_BUBBLES], note: Note::None, group: Group::Ui }, Category { name: "Map", items: &[41, 42, 87, 43, 44, 45], note: Note::None, group: Group::Ui }, Category { name: "Number Colors", items: &crate::numcolor::NUMBER_ITEMS, note: Note::None, group: Group::Ui }, Category { name: "Merc Colors", items: &crate::numcolor::MERC_ITEMS, note: Note::None, group: Group::Ui }, Category { name: "DPS Meter", items: &[70, 71, 72], note: Note::Meter, group: Group::Ui }, - Category { name: "Chat", items: &[73, 89, R2_CHANNELS], note: Note::Links, group: Group::Ui }, + Category { name: "Chat", items: &[73, 89, CHAT_LINES, CHAT_SCALE, R2_CHANNELS], note: Note::Links, group: Group::Ui }, Category { name: "General", items: &[29, 38, 84, SHARED_SHORTCUTS, AUTO_SAVE], note: Note::Shortcuts, group: Group::Other }, Category { name: "Combat", items: &[78, 79, PETS_PASS, WEAPON_SWAP_BACK], note: Note::None, group: Group::Other }, - Category { name: "Camera", items: &[15, 17, 18], note: Note::None, group: Group::Other }, + Category { name: "Camera", items: &[15, 17, 18, MOUSE_SMOOTH], note: Note::None, group: Group::Other }, Category { name: "Size & Look", items: &[59, 60, 61, 62], note: Note::Reads, group: Group::Touch }, Category { name: "Sound", items: &[32], note: Note::Output, group: Group::Other }, Category { name: "Multi-boxing settings", items: MULTIBOX, note: Note::Reads, group: Group::Multibox }, @@ -2295,6 +2322,9 @@ 77 => wide("Reset"), 73 => on_off(c.item_links), 89 => on_off(c.chat_always), + MOUSE_SMOOTH => on_off(c.mouse_smooth), + WEAPON_TRAILS => on_off(c.weapon_trails), + SPEECH_BUBBLES => on_off(c.speech_bubbles), PETS_PASS => on_off(c.pets_pass), SHARED_SHORTCUTS => on_off(c.shared_shortcuts), AUTO_SAVE => on_off(c.auto_save), @@ -2384,6 +2414,8 @@ 62 => (c.touch_edge as f32 / TOUCH_EDGE_MAX as f32, Some(c.touch_edge as u16)), 57 => (at(c.shadow_distance as f32, SHADOW_DISTANCE_GAME as f32, SHADOW_DISTANCE_MAX as f32), Some(c.shadow_distance)), SPELL_BAR_OPACITY => (c.spell_bar_opacity as f32 / 100.0, Some(c.spell_bar_opacity as u16)), + CHAT_LINES => (at(c.chat_lines as f32, crate::settings::CHAT_LINES_MIN as f32, crate::settings::CHAT_LINES_MAX as f32), Some(c.chat_lines as u16)), + CHAT_SCALE => (at(c.chat_scale as f32, crate::settings::CHAT_SCALE_MIN as f32, 100.0), Some(c.chat_scale as u16)), 36 => share_slider(c.flora), 37 => share_slider(c.environment), WEATHER => share_slider(c.weather), @@ -3657,7 +3689,7 @@ ("Video", vec!["Display", "Brightness", "Frame Rate", "VSync", "Render Scale"]), ("World", vec!["Fog", "Mipmaps", "Flora", "Environment", "Ground Fog", "Art"]), ("Lighting", vec!["Dynamic Lighting", "Sun Shadows", "Light Shadows", "Shadow Distance", "Ambient Occlusion", "Particles"]), - ("Characters", vec!["Level of Detail", "NPC/PC Display", "NPC/PC Distance", "Shadows"]), + ("Characters", vec!["Level of Detail", "NPC/PC Display", "NPC/PC Distance", "Shadows", "Weapon Trails"]), ("Textures", textures), ("Weather", vec!["Weather"]), ("Texture Cache", vec!["Precache Textures", "Pack Compression", "Rebuild Pack Cache"]), @@ -3671,12 +3703,12 @@ ("HUD", vec!["Ability Bars", "Stacked Spell Bars", "Text", "HUD", "Pet Effects", "Buff Window"]), ("Group & Raid", vec!["Raid List", "Power Bars", "Raid Mercenaries"]), ("HUD Layout", vec!["Move HUD", "Reset HUD", "Minimap Scroll Frame", "Spell Bar Opacity", "Spell Bar Layout", "Utility Bar Layout"]), - ("Name Plates", vec!["Name Distance", "Overlapping Names", "Quest Markers", "Target Level"]), + ("Name Plates", vec!["Name Distance", "Overlapping Names", "Quest Markers", "Target Level", "Speech Bubbles"]), ("Map", vec!["Map", "Minimap", "Map Pointer", "Map Markers", "Quest Helper", "Quest Tracker"]), ("Number Colors", n[..6].to_vec()), ("Merc Colors", n[6..8].to_vec()), ("DPS Meter", vec!["DPS Meter", "DPS Meter Shows", "Reset DPS Meter"]), - ("Chat", vec!["Item Links", "Chat Always Shown", "R2 Channel Switch"]), + ("Chat", vec!["Item Links", "Chat Always Shown", "Chat Lines", "Chat Size", "R2 Channel Switch"]), ("Chat Tabs: Talk", vec!["Say", "Tells", "Group", "Guild", "Shouts"]), ("Chat Tabs: Game", vec!["Combat", "Loot", "Rolls", "Experience", "System"]), ], @@ -3687,7 +3719,7 @@ vec![ ("General", vec!["Update Notices", "Loading Screens", "Loading Tips", "Same Shortcuts", "Auto Save Options"]), ("Combat", vec!["Auto-Cast", "Auto Target", "Pets Pass Through", "Weapon Swap Back"]), - ("Camera", vec!["Camera Distance", "Camera Turn Speed", "Screen Shake"]), + ("Camera", vec!["Camera Distance", "Camera Turn Speed", "Screen Shake", "Mouse Smoothing"]), ("Sound", vec!["Output Device"]), ], "Other: the rest" @@ -3984,8 +4016,11 @@ assert_eq!(w.point([slider + 2.0, y(&w, 1)]), down(1, key::LEFT)); assert_eq!(w.point([frame + 110.0, y(&w, 2)]), down(2, key::RIGHT), "Screen Shake's value"); assert_eq!(w.point([frame + 20.0, y(&w, 2)]), down(2, key::LEFT)); - assert!(w.point([frame + 110.0, y(&w, 3)]).is_empty(), "the row under the last: nothing"); - assert!(w.point([slider + 70.0, y(&w, 4)]).is_empty(), "the legend's row: nothing"); + // EQOA Rising: Mouse Smoothing, the page's fourth row + assert_eq!(w.point([frame + 110.0, y(&w, 3)]), down(3, key::RIGHT), "Mouse Smoothing's value"); + assert_eq!(w.point([frame + 20.0, y(&w, 3)]), down(3, key::LEFT)); + assert!(w.point([frame + 110.0, y(&w, 4)]).is_empty(), "the row under the last: nothing"); + assert!(w.point([slider + 70.0, y(&w, 5)]).is_empty(), "the legend's row: nothing"); // Video: Display's value, Brightness at 5 of 10 (its knob mid-bar), // Frame Rate's value go(&mut w, &vui, &mut o, "Video"); --- a/crates/eqoa/src/hudlayout.rs +++ b/crates/eqoa/src/hudlayout.rs @@ -416,6 +416,25 @@ from: usize, shift: [f32; 2], before: [f32; 2], + /// EQOA Rising: Chat Size, the chat box's quads scaled round this placed + /// point (its bottom-left corner, `CHAT_ORIGIN`) by this much + zoom: Option<([f32; 2], f32)>, +} + +/// EQOA Rising: the frame point the chat box shrinks toward under Chat Size: +/// its window's bottom-left corner (`chat::WndChat`'s 462-wide window round 422). +pub const CHAT_ORIGIN: [f32; 2] = [191.0, 448.0]; + +/// EQOA Rising: a chat box's frame point `p` (before a wide window's move, a +/// tall one's and the player's) as Chat Size draws it, and back (`unzoom`). +pub fn chat_zoom(p: [f32; 2]) -> [f32; 2] { + let s = crate::settings::chat_scale(); + [CHAT_ORIGIN[0] + (p[0] - CHAT_ORIGIN[0]) * s, CHAT_ORIGIN[1] + (p[1] - CHAT_ORIGIN[1]) * s] +} + +pub fn chat_unzoom(p: [f32; 2]) -> [f32; 2] { + let s = crate::settings::chat_scale(); + [CHAT_ORIGIN[0] + (p[0] - CHAT_ORIGIN[0]) / s, CHAT_ORIGIN[1] + (p[1] - CHAT_ORIGIN[1]) / s] } /// `piece` is drawn next on `ui`, moved where the player put it. @@ -423,13 +442,30 @@ let b = Beyond { side: ui.side(), top: ui.top() }; let shift = shift(piece, b); let before = std::mem::replace(&mut ui.shift, shift); - Mark { piece, from: ui.quads.len(), shift, before } + // EQOA Rising: Chat Size below the game's, the box's origin as placed now + let s = if piece == Piece::Chat { crate::settings::chat_scale() } else { 1.0 }; + let zoom = (s < 1.0).then(|| (ui.placed(CHAT_ORIGIN), s)); + Mark { piece, from: ui.quads.len(), shift, before, zoom } } /// The piece `m` drawn: the rectangle its quads cover noted (beside what the /// frame noted of it already) and `ui`'s shift as it was. pub fn end(ui: &mut Ui, m: Mark) { ui.shift = m.before; + if let Some((o, s)) = m.zoom { + let from = m.from.min(ui.quads.len()); + for q in &mut ui.quads[from..] { + for p in &mut q.pos { + *p = [o[0] + (p[0] - o[0]) * s, o[1] + (p[1] - o[1]) * s]; + } + if let Some(c) = q.clip + && c != render::ui::WHOLE + { + let z = |v: i32, at: f32| (at + (v as f32 - at) * s).round() as i32; + q.clip = Some([z(c[0], o[0]), z(c[1], o[1]), z(c[2], o[0]), z(c[3], o[1])]); + } + } + } if let Some(r) = covered(&ui.quads[m.from.min(ui.quads.len())..]) { note(m.piece, r, m.shift); } --- a/crates/eqoa/src/mouse.rs +++ b/crates/eqoa/src/mouse.rs @@ -123,6 +123,43 @@ const STICK_PER_PIXEL: f32 = 0.05; /// The tilt for a pixel of motion (radians), as the orbit's turn. const TILT_PER_PIXEL: f32 = 0.008; + +/// EQOA Rising: Mouse Smoothing (Extended > Camera). A page's Pointer Lock +/// gives the motion in whole pixels, each 0.46 degrees of look, and a slow +/// drag's come one now and none the next frame: the view stepped (the server +/// owner, 2026-11-22: "stuttery when moving the mouse slowly"). The look +/// is given the camera as it eases out of what is pending: a few pixels +/// (a slow drag's, up to `LOOK_SLOW` pending) over `LOOK_SMOOTH_S` (its time +/// constant), many (from `LOOK_FAST` pending: a flick, or what is left of +/// one) all but at once, so a fast turn is not late. +const LOOK_SMOOTH_S: f64 = 0.03; +const LOOK_SMOOTH_FAST_S: f64 = 0.004; +const LOOK_SLOW: f64 = 4.0; +const LOOK_FAST: f64 = 16.0; + +/// This frame's share of the look, `raw` pixels come since the last frame +/// added to `pending` (Mouse Smoothing): what is given now comes back and +/// the rest stays pending, a remainder under a hundredth of a pixel given +/// at once. +fn smooth_look(pending: &mut (f64, f64), raw: (f64, f64), frame_s: f32) -> (f64, f64) { + let dt = (frame_s as f64).max(0.001); + pending.0 += raw.0; + pending.1 += raw.1; + let size = (pending.0 * pending.0 + pending.1 * pending.1).sqrt(); + let fast = ((size - LOOK_SLOW) / (LOOK_FAST - LOOK_SLOW)).clamp(0.0, 1.0); + let tau = LOOK_SMOOTH_S + (LOOK_SMOOTH_FAST_S - LOOK_SMOOTH_S) * fast; + let share = 1.0 - (-dt / tau).exp(); + let mut out = (pending.0 * share, pending.1 * share); + if (pending.0 - out.0).abs() < 0.01 { + out.0 = pending.0; + } + if (pending.1 - out.1).abs() < 0.01 { + out.1 = pending.1; + } + pending.0 -= out.0; + pending.1 -= out.1; + out +} /// The orbit's pitch the look keeps to: 45 degrees below level (the camera /// under the head, looking up past it at the sky; the ground pulls it in, /// as the game's sweep pulls it in from anything it meets: `MoveCamera`'s @@ -339,6 +376,11 @@ last_click: Option<((f64, f64), Instant)>, /// the look since the last frame (pixels of motion) look: (f64, f64), + /// EQOA Rising: Mouse Smoothing, the look's pixels not yet given the + /// camera (`smooth_look`), and whether it is on (the caller's, from the + /// settings, before `look`) + pending: (f64, f64), + pub smooth: bool, /// the wheel since the last frame, in lines (up positive), and in a /// window's steps (a notch one) wheel: f32, @@ -741,7 +783,16 @@ /// zoom. The view the walk keeps (`walk_view`) is taken off the camera /// as last drawn (`Walker::eye`), before the look moves it. pub fn look(&mut self, w: &mut Walker, inverted: bool, frame_s: f32) -> ([f32; 2], Zoom) { - let (dx, dy) = std::mem::take(&mut self.look); + let raw = std::mem::take(&mut self.look); + // EQOA Rising: Mouse Smoothing, a slow drag's whole pixels spread + // over the frames drawn; off, or the drag let go, all of it at once + let (dx, dy) = if self.smooth && self.press.is_some() { + smooth_look(&mut self.pending, raw, frame_s) + } else { + let all = (self.pending.0 + raw.0, self.pending.1 + raw.1); + self.pending = (0.0, 0.0); + all + }; let wheel = std::mem::take(&mut self.wheel); self.steps = 0.0; let zoom = zoom_step(&w.cam, wheel); @@ -1110,6 +1161,32 @@ #[cfg(test)] mod tests { + /// EQOA Rising: Mouse Smoothing spreads a slow drag's single pixels over + /// the frames drawn, gives every pixel in the end, and lets a flick through + /// at once; the control: one pixel unsmoothed is all given in its frame. + #[test] + fn mouse_smoothing_spreads_slow_pixels_and_passes_flicks() { + let frame = 1.0 / 144.0; + let mut pending = (0.0, 0.0); + let first = super::smooth_look(&mut pending, (1.0, 0.0), frame); + assert!(first.0 > 0.0 && first.0 < 0.5, "a pixel is spread: {first:?}"); + let mut given = first.0; + for _ in 0..60 { + given += super::smooth_look(&mut pending, (0.0, 0.0), frame).0; + } + assert!((given - 1.0).abs() < 1e-9 && pending == (0.0, 0.0), "all of it given: {given}"); + let mut pending = (0.0, 0.0); + let flick = super::smooth_look(&mut pending, (40.0, 0.0), frame); + assert!(flick.0 > 30.0, "a flick mostly at once: {flick:?}"); + let mut given = flick.0; + for _ in 0..12 { + given += super::smooth_look(&mut pending, (0.0, 0.0), frame).0; + } + assert!(given > 39.0, "and its tail within a few frames: {given}"); + let m = Mouse::default(); + assert!(!m.smooth && m.pending == (0.0, 0.0), "off unless the settings turn it on"); + } + use super::*; #[test] --- a/crates/eqoa/src/viewer.rs +++ b/crates/eqoa/src/viewer.rs @@ -764,6 +764,8 @@ // the look turns the walk as the last console frame left it // (`Walker::rewind`) walker.rewind(); + // EQOA Rising: Mouse Smoothing (`mouse::smooth_look`) + mouse.smooth = crate::settings::mouse_smooth(); let (look, zoom) = mouse.look(&mut walker, inverted, frame_s); if let Some(p) = play.as_mut() { p.wheel_style(&mut walker, zoom, &mut mouse.back); @@ -1474,11 +1476,14 @@ if shot_override { (pv.eye, pv.scale) = (shot_eye, 1.0); } - t.plates = crate::play::labels(&plates, &pv, view.view_proj, t); + let (labels, boxes) = crate::play::labels_and_bubbles(&plates, &pv, view.view_proj, t); + t.plates = labels; + t.boxes = boxes; t.plate_scale = pv.scale; t.labels = crate::play::chat_labels(p, t, (w, h)); if hide { t.plates.clear(); + t.boxes.clear(); t.labels.clear(); } } @@ -1499,6 +1504,7 @@ && let Some(t) = renderer.text.as_mut() { t.plates.clear(); + t.boxes.clear(); } let refs: Vec = match &loading { Some((_, gears)) => gears.iter().map(|&m| render::Draw::Model(m)).collect(), @@ -3308,6 +3314,8 @@ // A and D (or a stick to the side) turn both buttons' run // (`Mouse::side`) self.mouse.side = if pad[2].abs() > a[2].abs() { pad[2] } else { a[2] }; + // EQOA Rising: Mouse Smoothing (`mouse::smooth_look`) + self.mouse.smooth = crate::settings::mouse_smooth(); let ((look, zoom), feel) = match self.walker.as_mut() { Some(w) if free => { // the looks turn the walk as the last console frame left it @@ -4089,6 +4097,7 @@ if let Some(t) = g.renderer.text.as_mut() { t.labels.clear(); t.plates.clear(); + t.boxes.clear(); } g.renderer.strips.clear(); g.renderer.decor.clear(); @@ -6895,12 +6904,15 @@ if let Some(t) = g.renderer.text.as_mut() { let mut pv = crate::play::PlateView::of(&w.cam, &w.eye.position, (g.config.width, g.config.height)); pv.fog = p.weather_fog; - t.plates = crate::play::labels(&plates, &pv, view.view_proj, t); + let (labels, boxes) = crate::play::labels_and_bubbles(&plates, &pv, view.view_proj, t); + t.plates = labels; + t.boxes = boxes; t.plate_scale = pv.scale; t.labels = crate::play::chat_labels(p, t, (g.config.width, g.config.height)); // Hide UI: no names over heads, no line typed if hide { t.plates.clear(); + t.boxes.clear(); t.labels.clear(); } } --- a/crates/render/src/text.rs +++ b/crates/render/src/text.rs @@ -29,6 +29,18 @@ pub size: f32, } +/// EQOA Rising: a box drawn behind the name plates (a speech bubble's): +/// its centre as a label's (`at`, the depth too), its size in the PS2's +/// pixels at the plates' size, its colour, and a tail under its middle +/// that many pixels long (0: none). +#[derive(Clone, Debug)] +pub struct PlateBox { + pub at: [f32; 3], + pub size: [f32; 2], + pub color: [f32; 4], + pub tail: f32, +} + struct Glyph { width: u32, uv: [f32; 4], @@ -50,6 +62,11 @@ /// particles, the lightning, the trails and the weather /// (`Renderer::draw_plates`). pub plates: Vec