Files
YataiDONNijiiro/Scripts/game/guide_label.lua
TaikoZhongandClaude Fable 5.1 41a731a3af Control guide: replay the cabinet clip at 60 fps, whole all loop
The top-left drum panel was a bake of the movie at every second frame (30 fps,
325 cells) and only ever played half of the cabinet's `all` loop.  It is now
replayed from the clip data (Scripts/game/ending_anim/guide_all.lua = taiko_small
`all`, 650 frames: rim up, rim down, face + 「決定」; guide_decide.lua = `decide`,
230 frames) over the movie's own white panel shape, on the credit screen, on
mode select and on song select.  The pill's 「決定」 is a text field on the
cabinet, so game/guide_label.lua draws it with the engine font whenever a frame
places the pill.  The bake stays as the fallback when the clip data is missing.

New textures (global/indicator/panel, game/guide_*_anim) need the engine's
TexID table regenerated, i.e. a rebuild after the skin update.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-11 01:44:12 +08:00

25 lines
1.0 KiB
Lua

-- The control guide's 「決定」 pill label. On the cabinet it is a DynamicText field
-- (control_guide text_guide: 28 pt in a 138x54 box, the pill at 0.95), so the replayed
-- clips (guide_all / guide_decide) carry only the pill shape; the label is drawn with
-- the engine's font, centred on the pill whenever a frame places it (the 216x72 shape).
local M = {}
local LABEL_SIZE = 28
local label
function M.draw(clip, now, fade)
if not clip or not clip.data then return end
local rows = clip.data.frames[clip:frame(now) + 1]
if not rows then return end
for i = 1, #rows do
local s = clip.data.shapes[rows[i][1]]
if s and s[1] == 216 and s[2] == 72 then
label = label or text.create_raw_text("決定", LABEL_SIZE, { 0, 0, 0, 255 }, { 0, 0, 0, 255 }, false, 0, 0.0)
local cx, cy = clip.x + rows[i][2], clip.y + rows[i][3]
label:draw({ x = cx - label.width / 2, y = cy - label.height / 2, fade = (fade or 1.0) * rows[i][7] })
return
end
end
end
return M