Author SHA1 Message Date
TaikoZhongandClaude Opus 5.5 6fdaf558de Nameplate: no dan on a plate without a player badge
The entry screen's plate shows only the title and the name, centred. This
replaces the left-end fill from the previous commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 15:01:30 +08:00
TaikoZhongandClaude Opus 5.5 8ceb2df868 Nameplate: without a badge, the dan chip's black reaches the plate's left end
The chip curves in around the player badge; on a plate without one that left
a light crescent at the left end. dan_emblem_bg_left fills it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 14:55:51 +08:00
TaikoZhongandClaude Opus 5.5 4560b5a4b1 Nameplate: keep the name clear of the dan chip
The name was centred right of half the badge plus the chip's width, but the
chip is drawn at its texture.json x: without a badge (the entry screen) the
name started at x 64 while the chip ends at x 126, so a name ran over the
dan text. The name is now centred right of the chip's actual right edge
(or the badge when there is no dan).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 14:53:04 +08:00
3 changed files with 40 additions and 36 deletions

No files matched your search

@@ -1,9 +1,9 @@
{
"background": {},
"overlay": {
"x": 207
"x": 100
},
"footer": {
"y": 110
"y": 105
}
}
+30 -31
View File
@@ -27,41 +27,46 @@ function TutorialDonBG:update(current_time_ms)
self.overlay_move:update(current_time_ms)
end
-- One Fuji (background frame 1), one cloud (overlay) and one set of dots (background frame 2) per
-- pattern tile, all scrolling with the pattern: the Fuji's foot behind the fans, the dots around
-- the clouds (they bob with them). The cloud's place in the tile is overlay's x in texture.json.
local FUJI_X, FUJI_Y = 39, 91
local CLOUD_Y = 32
local DOTS_X, DOTS_Y = 32, CLOUD_Y + 13
-- The fans repeat every 80 px: their strips are tiled (and scroll a whole tile per loop) every
-- 560 px, a multiple of that, so the copies line up.
local FAN_TILE = 560
local FLOOR_DY = 34
function TutorialDonBG:draw_textures(fade, y, frame)
y = y + 40
local tile = self.bg_texture.width
local bob = self.overlay_move.attribute
for i = 0, 4 do
tex.draw_texture(self._id_bg, {
frame = 0,
fade = fade,
x = (i * tile) + self.move.attribute,
x = (i * self.bg_texture.width) + self.move.attribute,
y = y
})
tex.draw_texture(self._id_bg, {
frame = 1,
fade = fade,
x = (i * self.bg_texture.width) + self.move.attribute,
y = y
})
end
for i = 0, 3 do
local x = (i * tile) + self.move.attribute
tex.draw_texture(self._id_bg, { frame = 1, fade = fade, x = x + FUJI_X, y = y + FUJI_Y })
tex.draw_texture(self._id_overlay, { frame = frame, fade = fade, x = x, y = y + CLOUD_Y + bob })
tex.draw_texture(self._id_bg, { frame = 2, fade = fade, x = x + DOTS_X, y = y + DOTS_Y + bob })
for i = 0, 5 do
tex.draw_texture(self._id_overlay, {
frame = frame,
fade = fade,
x = (i * self.overlay_texture.width) +
self.move.attribute * (self.overlay_texture.width / self.bg_texture.width),
y = y + self.overlay_move.attribute
})
end
local fan_x = self.move.attribute * (FAN_TILE / tile)
for i = 0, 4 do
tex.draw_texture(self._id_footer, { frame = 0, fade = fade, x = (i * FAN_TILE) + fan_x, y = y + bob })
tex.draw_texture(self._id_footer, { frame = 1, fade = fade, x = (i * FAN_TILE) + fan_x, y = (y + 30) + bob })
-- a third row so the fans reach down to the lane
tex.draw_texture(self._id_footer, { frame = 1, fade = fade, x = (i * FAN_TILE) + fan_x, y = (y + 60) + bob })
tex.draw_texture(self._id_footer, {
frame = 0,
fade = fade,
x = (i * self.footer_texture.width) +
self.move.attribute * (self.footer_texture.width / self.bg_texture.width),
y = y + self.overlay_move.attribute
})
tex.draw_texture(self._id_footer, {
frame = 1,
fade = fade,
x = (i * (self.footer_texture.width - 80)) +
self.move.attribute * (self.footer_texture.width / self.bg_texture.width),
y = (y + 30) + self.overlay_move.attribute
})
end
end
@@ -74,7 +79,6 @@ function TutorialBackground.new(player_num, bpm)
tex.load_folder(COLLAB_PATH, "bg_normal/bg_0")
self.donbg = TutorialDonBG.new(1, player_num, COLLAB_PATH)
self._id_bg_0 = tex.get_texture(COLLAB_PATH .. "/" .. "bg_0" .. "/" .. "background") or 0
self.floor_texture = tex.get_texture_info("bg_0", "background")
return self
end
@@ -97,12 +101,7 @@ function TutorialBackground:handle_gauge(player_num, progress, is_clear, is_rain
function TutorialBackground:draw_back()
self.donbg:draw()
-- the floor sits FLOOR_DY lower than texture.json says, so the drums clear the lane; the rows that
-- would then run into the bottom band are cut off
tex.draw_texture(self._id_bg_0, {
y = FLOOR_DY, y2 = -FLOOR_DY,
src = { x = 0, y = 0, width = self.floor_texture.width, height = self.floor_texture.height - FLOOR_DY },
})
tex.draw_texture(self._id_bg_0)
end
function TutorialBackground:draw_fore() end
+8 -3
View File
@@ -166,7 +166,8 @@ function Nameplate:draw(x, y, fade)
if self.now and self.shiny then self:draw_sparkles(x, y, fade) end
local dan_offset = 0
if self.dan ~= -1 then
-- a plate without a player badge (the entry screen) shows no dan
if self.dan ~= -1 and self.pnum_tex then
tex.draw_texture(self.dan_emblem_bg, { x = x, y = y, fade = fade })
if self.is_gold then
tex.draw_texture(self.dan_emblem_gold, { frame = self.dan, x = x, y = y, fade = fade })
@@ -187,9 +188,13 @@ function Nameplate:draw(x, y, fade)
local frame_top_h = self.frame_top_info.height
local outline_h = self.outline_info.height
local name_max = frame_top_w - self.padding - offset - dan_offset
-- the name is centred right of the badge, or right of the dan chip (drawn at its texture.json x,
-- so where it ends doesn't depend on the badge)
local left = offset
if dan_offset > 0 then left = math.max(offset, self.emblem_info.x[1] + dan_offset) end
local name_max = frame_top_w - self.padding - left
local name_width = math.min(self.name_text.width, name_max)
local name_x = x + offset + dan_offset + (outline_w - offset - dan_offset) / 2.0 - name_width / 2
local name_x = x + left + (outline_w - left) / 2.0 - name_width / 2
local name_y = y + outline_h / 2.0 + self.name_offset
self.name_text:draw({ x = name_x, y = name_y, x2 = name_width - self.name_text.width, fade = fade })