[PR #4587] [MERGED] Draw map markers on the cartography table's preview #5712

Closed
opened 2026-11-03 05:14:28 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/4587
Author: @phexuss
Created: 10/30/2026
Status: ✅ Merged
Merged: 10/30/2026
Merged by: @rdbtCVS

Base: main ← Head: fix/cartography-map-markers


📝 Commits (1)

  • 72f66bb Draw map markers on the cartography table's preview

📊 Changes

2 files changed (+96 additions, -10 deletions)

View changed files

📝 crates/horizon-client/src/game/cartography.rs (+84 -2)
📝 crates/horizon-client/src/game/maps.rs (+12 -8)

📄 Description

🤖 Opened by phexuss's AI agent (Claude Code, Claude Opus 5.5), not by phexuss personally.

What and why

Part of #3518 (row GuiGraphicsExtractor.map).

The cartography table drew a map's image in its preview but none of its markers (players, banners, structure and target markers). MapRenderer.render draws the decorations over the image in a screen too, all of them since the map isn't in an item frame. This draws them on every preview (plain, scaled, duplicated, locked) with the same pose as on a held map: decoration_pose is split out of map_vertices so the world and the screen share it.

Kind

  • parity: Horizon now does what vanilla 26.3 does
  • bug: a crash or a breakage
  • perf: faster, or less memory
  • feature: something new for players (listed under New in the release notes)
  • extra: Horizon-only, off by default
  • tooling: tools, CI, tests, harnesses
  • docs

Vanilla reference

MapRenderer.render, GuiGraphicsExtractor.map, CartographyTableScreen.extractBackground. No harness: a unit test for the marker corners (centre, a quarter turn, and the preview's offset and scale). Not checked in game against vanilla, and written without the decompiled sources at hand, so a reviewer comparing against them is welcome.

Self-check

pr_ready (tools/pr_ready.py --quick on vm, against origin/main at 1c7eb1280, 1 min 40 s)

Check Result
Scope ✅ 2 files, +96 −10
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ✅ 481 passed (35 s)
rustfmt ✅ (7 s)
tests: horizon-client ✅ 1086 passed (39 s)
doc tests ✅ 0 passed (2 s)
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses

The clippy failure is manual_range_contains from the local toolchain (Rust 1.97) in files this PR doesn't touch (horizon-world/src/worldgen/aquifer/noise_based.rs, game/dragon.rs). With that lint allowed, cargo clippy -p horizon-client --lib --bins --tests -- -D warnings is clean.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/4587 **Author:** [@phexuss](https://github.com/phexuss) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/cartography-map-markers` --- ### 📝 Commits (1) - [`72f66bb`](https://github.com/horizon-rust/horizon/commit/72f66bb71cb7f4471a0440137845d9e04103c4bc) Draw map markers on the cartography table's preview ### 📊 Changes **2 files changed** (+96 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/cartography.rs` (+84 -2) 📝 `crates/horizon-client/src/game/maps.rs` (+12 -8) </details> ### 📄 Description > 🤖 Opened by phexuss's AI agent (Claude Code, Claude Opus 5.5), not by phexuss personally. ## What and why Part of #3518 (row `GuiGraphicsExtractor.map`). The cartography table drew a map's image in its preview but none of its markers (players, banners, structure and target markers). `MapRenderer.render` draws the decorations over the image in a screen too, all of them since the map isn't in an item frame. This draws them on every preview (plain, scaled, duplicated, locked) with the same pose as on a held map: `decoration_pose` is split out of `map_vertices` so the world and the screen share it. ## Kind - [x] parity: Horizon now does what vanilla 26.3 does - [ ] bug: a crash or a breakage - [ ] perf: faster, or less memory - [ ] feature: something new for players (listed under New in the release notes) - [ ] extra: Horizon-only, off by default - [ ] tooling: tools, CI, tests, harnesses - [ ] docs ## Vanilla reference `MapRenderer.render`, `GuiGraphicsExtractor.map`, `CartographyTableScreen.extractBackground`. No harness: a unit test for the marker corners (centre, a quarter turn, and the preview's offset and scale). Not checked in game against vanilla, and written without the decompiled sources at hand, so a reviewer comparing against them is welcome. ## Self-check **pr_ready** (`tools/pr_ready.py --quick` on vm, against origin/main at 1c7eb1280, 1 min 40 s) | Check | Result | | --- | --- | | Scope | ✅ 2 files, +96 −10 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ✅ 481 passed (35 s) | | rustfmt | ✅ (7 s) | | tests: horizon-client | ✅ 1086 passed (39 s) | | doc tests | ✅ 0 passed (2 s) | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | The clippy failure is `manual_range_contains` from the local toolchain (Rust 1.97) in files this PR doesn't touch (`horizon-world/src/worldgen/aquifer/noise_based.rs`, `game/dragon.rs`). With that lint allowed, `cargo clippy -p horizon-client --lib --bins --tests -- -D warnings` is clean. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:14:28 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#5712
No description provided.