dan game: soul gauge drawn as on the cabinet #66

Merged
GanYiZhong merged 5 commits from GanYiZhong/YataiDONNijiiro:fix/dan-game-gauge into main 2026-10-14 15:38:18 +02:00
Collaborator

Draws the dan play soul gauge the way the cabinet does.

Gauge (Scripts/game/gauge.lua, this skin's own Gauge:draw_dan)

  • Track: the gold track (border), plus the red track (gauge_dan/track_red) only up to the threshold. Cells past the threshold are dark gold.
  • Lit cells: the cabinet's lamp stretched 21 px per cell (gauge_dan/1p_lamp, 2p_lamp). Once the gauge reaches the threshold they're all yellow (lamp_clear), and a newly lit cell gets the matching glow (bar_fade_clear).
  • Separators: drawn at the cabinet's 103/255. Before, they were at 0.15, with a second copy drawn from the dan background.
  • 魂: grey, white once cleared, in flames at full.
  • Over the lane: the cabinet draws the gauge over the lane's top edge, with cells down to y 281. The engine draws the lane after the gauge, so the gauge leaves a redraw (g_dan_gauge_redraw) that the dan background's draw_fore repeats, clipped to the covered strip (y 276–288).
  • The threshold comes from the dan exam: background/bg_objects/dan_info hands it over as g_dan_gauge_border. Without it, or on a screen without these pieces, the parent's draw_dan is used.

Threshold plate

  • The white threshold marker (game/dan_info/gauge_border_cell) is drawn on the threshold cell, as on the cabinet. It's drawn from Background:draw_fore, so it stays above the lane frame.
  • The plate art is the cabinet's whole plate. Before, its top and left rows were cut off, which flattened the top of the 魂ゲージ pill.
  • 「100 %以上」 on the plate is the cabinet's size (36) and sits where the cabinet's does.

Checked in play with one-song test courses at 100 %, 90 % and 50 %:

  • red up to the threshold and dark gold after it;
  • all lit cells turn yellow and 魂 turns white once the gauge passes 50 %;
  • the caption and the marker are within 2 px of the cabinet.

No errors in the log.

checksums.sha256 is not part of this PR.

🤖 Generated with Claude Code

Draws the dan play soul gauge the way the cabinet does. **Gauge (`Scripts/game/gauge.lua`, this skin's own `Gauge:draw_dan`)** - **Track:** the gold track (`border`), plus the red track (`gauge_dan/track_red`) only up to the threshold. Cells past the threshold are dark gold. - **Lit cells:** the cabinet's lamp stretched 21 px per cell (`gauge_dan/1p_lamp`, `2p_lamp`). Once the gauge reaches the threshold they're all yellow (`lamp_clear`), and a newly lit cell gets the matching glow (`bar_fade_clear`). - **Separators:** drawn at the cabinet's 103/255. Before, they were at 0.15, with a second copy drawn from the dan background. - **魂:** grey, white once cleared, in flames at full. - **Over the lane:** the cabinet draws the gauge over the lane's top edge, with cells down to y 281. The engine draws the lane after the gauge, so the gauge leaves a redraw (`g_dan_gauge_redraw`) that the dan background's `draw_fore` repeats, clipped to the covered strip (y 276–288). - The threshold comes from the dan exam: `background/bg_objects/dan_info` hands it over as `g_dan_gauge_border`. Without it, or on a screen without these pieces, the parent's `draw_dan` is used. **Threshold plate** - The white threshold marker (`game/dan_info/gauge_border_cell`) is drawn on the threshold cell, as on the cabinet. It's drawn from `Background:draw_fore`, so it stays above the lane frame. - The plate art is the cabinet's whole plate. Before, its top and left rows were cut off, which flattened the top of the 魂ゲージ pill. - 「100 %以上」 on the plate is the cabinet's size (36) and sits where the cabinet's does. Checked in play with one-song test courses at 100 %, 90 % and 50 %: - red up to the threshold and dark gold after it; - all lit cells turn yellow and 魂 turns white once the gauge passes 50 %; - the caption and the marker are within 2 px of the cabinet. No errors in the log. `checksums.sha256` is not part of this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
GanYiZhong added 5 commits 2026-10-14 15:38:09 +02:00
- The white threshold marker (game/dan_info/gauge_border_cell) is drawn on the threshold
  cell, as the cabinet's border_N, from Background:draw_fore so it sits over the lane frame.
- The gauge cells (gauge_dan/1p_bar, 2p_bar, 1p_bar_fade) get the cabinet lamp's light
  band along the top.
- The 「100 %以上」 caption on the threshold plate sits lower and one size smaller, as on
  the cabinet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The cabinet shows the cells past the threshold in gold: dark gold while unfilled, its
lamp_clear (white band over yellow) once filled. The gauge script does not know the
threshold, so dan_info, which does, paints them over the engine's cells in the gauge layer
(game/dan_info/gauge_gold_cell, gauge_gold_unfilled).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Gauge:draw_dan is this skin's own now, built from the cabinet's tamashii_gauge pieces:
- the gold track (border) with the red track (gauge_dan/track_red, gauge_bg) only up to the
  threshold, so the cells past it are dark gold;
- the lit cells as the cabinet's lamp stretched 21 px per cell (gauge_dan/1p_lamp, 2p_lamp),
  all yellow (lamp_clear) once the gauge reaches the threshold, with the matching glow on a
  newly lit cell (bar_fade_clear);
- the cell separators at the cabinet's 103/255 (they were drawn at 0.15, plus a second copy
  from the dan background);
- 魂 grey, white once cleared, in flames at full.
The threshold comes from the dan exam: background/dan_info hands it over as
g_dan_gauge_border. Without it, or on a screen without these pieces, the parent draws.
This replaces the gold-zone repaint in dan_info, and 1p_bar / 2p_bar / 1p_bar_fade go back
to what they were.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The engine draws the lane after the gauge, and the lane's black top edge (y 276) hid the
cells' last six rows; the cabinet's gauge sits over it (cells down to y 281). The gauge
leaves a redraw (g_dan_gauge_redraw) that the dan background's draw_fore repeats, clipped
to that strip (y 276-288).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plate art had its top and left rows cut off, flattening the top of the
魂ゲージ pill. It is now the cabinet's whole plate (with its 9 px margin),
drawn 9 px up and left so the layout constants stay put. The threshold
caption is the cabinet's size 36, its centre moved up to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GanYiZhong merged commit 8397c6b98e into main 2026-10-14 15:38:18 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Yonokid/YataiDONNijiiro#66