Compare commits

...
2 changed files with 29 additions and 8 deletions

No files matched your search

+28 -8
View File
@@ -27,6 +27,19 @@ local function rank_of(score)
return r
end
-- the score_rank clip for rank 1..7 at this seat (nil when it can't load)
local function rank_clip(rank, is_2p)
local side = is_2p and "R" or "L"
local pos = (rank == 7) and KIWAMI_POS[side] or RANK_POS[side]
local clip = (rank == 7) and "rank_result_kiwami" or "rank_result"
local obj = ClipPlayer.new("game/ending_anim/" .. clip, "game", clip .. "_anim", pos[1], pos[2])
if obj then
obj.hold_last = true
if rank < 7 then obj.shape_map = { [74] = RANK_SHAPES[rank], [76] = RANK_SHAPES[rank] } end -- clip uses plate 74 then 76
end
return obj
end
local digit_ok, dg_anim = pcall(require, "anim/sampler")
if not digit_ok then dg_anim = { safe = function()
local n = {}
@@ -315,22 +328,29 @@ function ResultPlayer:update(current_ms, fade_in_finished,
self.msg_at = self.crown_at + ((self.gauge_state >= 1) and CROWN_TO_ACTION or 0)
end
if self.skipped and self.fade_in_started then
self.rank_obj = nil
-- the rank plate lands on its last frame like every other skipped state (no sound),
-- once the score it depends on is in
if not self.rank_settled and self.score ~= "" then
self.rank_settled = true
self.rank_done = true
local rank = rank_of(math.floor(tonumber(self.score) or 0))
if rank > 0 then
self.rank_obj = self.rank_obj or rank_clip(rank, self.is_2p)
if self.rank_obj then
self.rank_obj:start(current_ms - self.rank_obj.data.nframes * (1000 / 60)) -- clips run at 60 fps
end
end
end
self.crown_at = math.min(self.crown_at or current_ms, current_ms)
self.msg_at = math.min(self.msg_at or current_ms, current_ms)
end
if self.crown_at and current_ms >= self.crown_at and not self.rank_done then
self.rank_done = true
local rank = (not self.skipped) and rank_of(math.floor(tonumber(self.score) or 0)) or 0
local rank = rank_of(math.floor(tonumber(self.score) or 0))
if rank > 0 then
local side = self.is_2p and "R" or "L"
local pos = (rank == 7) and KIWAMI_POS[side] or RANK_POS[side]
local clip = (rank == 7) and "rank_result_kiwami" or "rank_result"
self.rank_obj = ClipPlayer.new("game/ending_anim/" .. clip, "game", clip .. "_anim", pos[1], pos[2])
self.rank_obj = rank_clip(rank, self.is_2p)
if self.rank_obj then
self.rank_obj.hold_last = true
if rank < 7 then self.rank_obj.shape_map = { [74] = RANK_SHAPES[rank], [76] = RANK_SHAPES[rank] } end -- clip uses plate 74 then 76
self.rank_obj:start(current_ms)
-- se_result `scorerank_NN_<seat>`: one sample for every rank, seat like the crown
audio.play_sound("scorerank" .. (self.has_2p and (self.is_2p and "_r" or "_l") or "_c"), "sound")
+1
View File
@@ -5334,3 +5334,4 @@ c567acc69bf6e9a239e66a195f2d65a7ec6455acff3ee248f4302477d01c193d *./Videos/attra
54f561d89b48feff2fa31999e7485e370f2c55b9f360102b2014310078d20fc3 *./Videos/attract_videos/attractdemo_kor.mp4
3801f84ff85f56376828abef0b12bd8a1e336b4bc739557bc0ccfa386d79668e *./Videos/op_videos/title.mp4
ff683df979890751a798250df629989280257eb35d560eefaa3111530430a4f7 *./Scripts/background/bg_objects/packed_channel.lua
8f8f0910e33b6cc90646e81c2674a3c31004106ff9fe2b38788bcd2067691ffc *./Scripts/game/gauge.lua