Song select: the decided genre board stays up while its songs load #22
No files matched your search
@@ -712,13 +712,17 @@ end
|
||||
-- width -- exactly how the existing `y2 = h - 352` calls already drive the height. So a
|
||||
-- horizontal scale is `x2 = BOARD_W * (sx - 1)` plus a re-centred x, with no engine
|
||||
-- change. sx = nil/1 leaves every pre-r61 call byte-identical.
|
||||
-- A furled board (sx < 1) is not a squashed copy of the 960-wide texture: squashing
|
||||
-- averages the outline away and makes the GPU pick a small mip level (the LOD follows
|
||||
-- the larger axis), which blurs every row. The cabinet scales a vector shape, so its
|
||||
-- edges stay sharp at any width. Five columns get the same result from the bitmap:
|
||||
-- the two rounded corners at 1:1 (40 px), and the coloured band / inner panel / band
|
||||
-- between them scaled in proportion, each drawn from an 8 px flat slice of itself and
|
||||
-- MAGNIFIED to its width. Column layout of every bar_genre frame and the back board:
|
||||
-- corner 0..40 | band 40..83 | panel 83..877 | band 877..920 | corner 920..960.
|
||||
local function draw_board(bar_id, frame, bx, by, cen_h, fade, crop_center, sx)
|
||||
local w = BOARD_W
|
||||
local x2 = nil
|
||||
if sx and sx ~= 1.0 then
|
||||
w = BOARD_W * sx
|
||||
x2 = w - BOARD_W
|
||||
end
|
||||
if sx and sx ~= 1.0 then w = math.max(2, math.floor(BOARD_W * sx + 0.5)) end
|
||||
local x = math.floor(bx - w / 2 + 0.5)
|
||||
local top = math.floor(by - cen_h / 2 + 0.5) - CAP_H
|
||||
local src_y, src_h = CAP_H, CEN_SRC_H
|
||||
@@ -727,12 +731,53 @@ local function draw_board(bar_id, frame, bx, by, cen_h, fade, crop_center, sx)
|
||||
src_y = CAP_H + math.floor((CEN_SRC_H - src_h) / 2)
|
||||
cen_h = src_h
|
||||
end
|
||||
tex.draw_texture(bar_id, { frame = frame, x = x, y = top, y2 = CAP_H - 352, x2 = x2, fade = fade,
|
||||
src = { x = 0, y = 0, width = BOARD_W, height = CAP_H } })
|
||||
tex.draw_texture(bar_id, { frame = frame, x = x, y = top + CAP_H, y2 = cen_h - 352, x2 = x2, fade = fade,
|
||||
src = { x = 0, y = src_y, width = BOARD_W, height = src_h } })
|
||||
tex.draw_texture(bar_id, { frame = frame, x = x, y = top + CAP_H + cen_h, y2 = CAP_H - 352, x2 = x2, fade = fade,
|
||||
src = { x = 0, y = CAP_H + CEN_SRC_H, width = BOARD_W, height = CAP_H } })
|
||||
-- the three horizontal bands (top cap / centre / bottom cap) as {y, src_y, src_h, dst_h}
|
||||
local bands = { { top, 0, CAP_H, CAP_H }, { top + CAP_H, src_y, src_h, cen_h },
|
||||
{ top + CAP_H + cen_h, CAP_H + CEN_SRC_H, CAP_H, CAP_H } }
|
||||
if w == BOARD_W then
|
||||
for _, b in ipairs(bands) do
|
||||
tex.draw_texture(bar_id, { frame = frame, x = x, y = b[1], y2 = b[4] - 352, fade = fade,
|
||||
src = { x = 0, y = b[2], width = BOARD_W, height = b[3] } })
|
||||
end
|
||||
return
|
||||
end
|
||||
local CORNER, BAND, PANEL = 40, 43, 794 -- source widths; 40+43+794+43+40 = 960
|
||||
local cols
|
||||
if w >= 2 * CORNER then
|
||||
local corner = CORNER
|
||||
local inner = w - 2 * corner
|
||||
local band = math.floor(inner * BAND / (2 * BAND + PANEL) + 0.5)
|
||||
local panel = inner - 2 * band
|
||||
-- columns: {src_x, src_w, dst_x, dst_w}
|
||||
cols = {
|
||||
{ 0, CORNER, x, corner },
|
||||
{ CORNER + BAND / 2 - 4, 8, x + corner, band },
|
||||
{ BOARD_W / 2 - 4, 8, x + corner + band, panel },
|
||||
{ BOARD_W - CORNER - BAND / 2 - 4, 8, x + corner + band + panel, band },
|
||||
{ BOARD_W - CORNER, CORNER, x + w - corner, corner },
|
||||
}
|
||||
else
|
||||
-- narrower than both corners (the last frames of a furl / first of an unfurl): the
|
||||
-- cabinet's vector shape is a solid bar with its outline all round, so draw the
|
||||
-- two outline columns (texture x 13..20 / 940..947) at a few px each and fill the
|
||||
-- rest from the flat centre slice -- squeezing the rounded corners instead left
|
||||
-- two hollow strokes with nothing between them.
|
||||
local ol = math.max(2, math.min(8, math.floor(w / 6)))
|
||||
local mid = math.max(0, w - 2 * ol)
|
||||
cols = {
|
||||
{ 13, 8, x, ol },
|
||||
{ BOARD_W / 2 - 4, 8, x + ol, mid },
|
||||
{ 940, 8, x + ol + mid, ol },
|
||||
}
|
||||
end
|
||||
for _, b in ipairs(bands) do
|
||||
for _, c in ipairs(cols) do
|
||||
if c[4] > 0 then
|
||||
tex.draw_texture(bar_id, { frame = frame, x = c[3], y = b[1], x2 = c[4] - BOARD_W, y2 = b[4] - 352,
|
||||
fade = fade, src = { x = c[1], y = b[2], width = c[2], height = b[3] } })
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- Yellow cursor glow around the board (arcade cursor_top/center/bottom): the glow's caps
|
||||
@@ -883,7 +928,6 @@ local WHEEL_FLY = folder_anim.safe("anim/wheel_decide")
|
||||
-- put it out of phase with the board unfurl that shares the same genre_deceide play.
|
||||
-- ROUND 85: FLY_HOLD_F0 removed -- the fly rides the shared leg clock (see fly_offset).
|
||||
local FLY_END_F = WHEEL_FLY:label("return") or 150
|
||||
local FLY_CLOSE_END_F = (WHEEL_FLY:label("genre_deceide2") or 255) - 1 -- last frame of the close leg
|
||||
local FLY_TRACKS_UP = { "kanban_genre_2", "kanban_genre_4", "kanban_genre_6", "kanban_genre_8" }
|
||||
local FLY_TRACKS_DOWN = { "kanban_genre_3", "kanban_genre_5", "kanban_genre_7" }
|
||||
local FLY_CENTER_Y, FLY_ROW_GAP, FLY_ROW_PITCH = 540, 120, 135
|
||||
@@ -1131,7 +1175,7 @@ local function fly_offset(box)
|
||||
-- the CLOSE leg is the clip's `return` half: the song boxes fly out f184..204,
|
||||
-- wait off screen across the swap (f219) and the genre boxes fly back in
|
||||
-- f234..254; f255 (`genre_deceide2`) re-bases the clip, so stop just before it
|
||||
if f >= FLY_CLOSE_END_F then return 0.0, 0.0 end
|
||||
if f >= (WHEEL_FLY:label("genre_deceide2") or 255) - 1 then return 0.0, 0.0 end
|
||||
else
|
||||
return 0.0, 0.0
|
||||
end
|
||||
|
||||
+1
-1
@@ -3280,7 +3280,7 @@ bae62b0f451139b880d57d4b214156a8deaadedb2aacc1f7421d4e21189a810d *./Scripts/resu
|
||||
fe5bc0a6cff271012d0de9ec7fc5cc7a94b3f1268ea1aa4a18e72c38b1a0e6c3 *./Scripts/result/result_fade_in.lua
|
||||
9447dea62976348429b38b22104c68708b21cfbbf61f5d37a5a8d082d69f7a1c *./Scripts/result/result_player.lua
|
||||
1033652c20bd62a07f645c94961227dfe73fb49df9bc581c460739c96c109c08 *./Scripts/song_select/dan_doors.lua
|
||||
1cf961b5b95fc54b9a1591f2d696002fb152a0efb264a0657d475c1d7ede8259 *./Scripts/song_select/song_select.lua
|
||||
698d1ba46c4be558b59624e339a5e1971d12bff5119daed2bc22bdeb5b305286 *./Scripts/song_select/song_select.lua
|
||||
89047ab5b642696922ca2c6e098ca288580a9c0bb3e197a08f17b821a31fc519 *./.skin-repo
|
||||
40c378cdcaea2e2c9ec3da4c7fa72911d13a849a5b51e9645300f9571a7e12c8 *./Sounds/dan_result/achieve_tamashii.ogg
|
||||
606f2d3558badc06e54b2c59a36f0580f4954774918d69a712ad6de45518cba0 *./Sounds/dan_result/advance_intro.ogg
|
||||
|
||||
Reference in new issue
Block a user