From 2ab127b8b3ca85d3e938cb31c881c896418a10fa Mon Sep 17 00:00:00 2001 From: TaikoZhong <108016253+GanYiZhong@users.noreply.github.com> Date: Tue, 29 Sep 2026 05:39:26 +0800 Subject: [PATCH] Ending: place the 2P banner on the 2P lane (game_p2_y) game_2p_offset is the distance between the two background bands (536), not between the lanes, so in two-player games the 2P clear / full combo / fail banner was drawn below the screen. The 2P lane is at game_p2_y, the 1P lane at 184 (both x screen scale). Co-Authored-By: Claude Opus 5.5 --- Scripts/background/bg_objects/ending.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Scripts/background/bg_objects/ending.lua b/Scripts/background/bg_objects/ending.lua index ae653ee..8fb0efb 100644 --- a/Scripts/background/bg_objects/ending.lua +++ b/Scripts/background/bg_objects/ending.lua @@ -5,7 +5,7 @@ -- Graphics/game/ending__anim/s.png -- one texture per shape -- The clip plays once from frame 0 and then loops from `loop_at`, at 60 fps, on the -- 1920x264 stage the original places at the lane (screen y 276 for 1P; the 2P --- lane adds the skin's game_2p_offset). The engine keeps its own ending +-- lane is game_p2_y lower). The engine keeps its own ending -- animation running for the sounds and hands the drawing to this object through -- Background:handle_ending / draw_ending. local Ending = {} @@ -40,8 +40,11 @@ function Ending.new(kind, player_num, path) self.t0 = nil self.y = STAGE_Y if player_num == 2 then - local off = tex.get_skin_config("game_2p_offset") - self.y = STAGE_Y + ((off and off.y) or 0) + -- the 2P lane sits at game_p2_y, the 1P lane at 184 (both x screen scale); game_2p_offset + -- (536) is not that distance and put the 2P banner below the screen + local p2 = tex.get_skin_config("game_p2_y") + local lane1 = 184 * tex.get_screen_scale() + self.y = STAGE_Y + ((p2 and p2.y) and (p2.y - lane1) or 0) end return self end -- 2.54.0