yellow copyright diff

This commit is contained in:
bryanthaboi
2026-08-10 14:27:00 -04:00
parent aa45f05c63
commit 9d73ff4110
8 changed files with 114 additions and 19 deletions
+27 -8
View File
@@ -31,6 +31,7 @@
-- to just THE END.
local Font = require("src.render.Font")
local GameVersion = require("src.core.GameVersion")
local Music = require("src.core.Music")
local Strings = require("src.core.Strings")
@@ -64,11 +65,12 @@ local MON_PREP_FRAMES = 9
-- LoadCopyrightTiles (engine/movie/title.asm CopyrightTextString): tile
-- sequences into the extracted title/copyright.png strip (tiles $60-$72:
-- (c)'95.'96.'98 + Nintendo + Creatures inc.); the GAME FREAK inc. row is
-- the title/gamefreak_inc.png strip (GameFreakLogoGraphics, tiles
-- $73-$7B), with the intro's composed gamefreak_text.png as a fallback
-- for pre-regeneration data.
local COPY_PREFIX = { 0, 1, 2, 1, 3, 1, 4 } -- (c)'95.'96.'98
-- Red/Blue (c)'95.'96.'98, Yellow (c)1995-1999 + NineTile) + Nintendo +
-- Creatures inc.; the GAME FREAK inc. row is title/gamefreak_inc.png
-- (GameFreakLogoGraphics, tiles $73-$7B), with the intro's composed
-- gamefreak_text.png as a fallback for pre-regeneration data.
local COPY_PREFIX_RB = { 0, 1, 2, 1, 3, 1, 4 } -- (c)'95.'96.'98
local COPY_PREFIX_YELLOW = { 0, 1, 2, 3, 1, 2 } -- (c)1995-199
local COPY_NINTENDO = { 5, 6, 7, 8, 9, 10 } -- Nintendo
local COPY_CREATURES = { 11, 12, 13, 14, 15, 16, 17, 18 } -- Creatures inc.
@@ -140,6 +142,12 @@ function Credits.new(game, onDone, onTheEnd)
and title.gamefreakInc.path)
or tryImage(intro and intro.gamefreakText
and intro.gamefreakText.path)
self.yellowCopy = GameVersion.isYellow()
or (title and title.layout == "yellow_pikachu")
self.copyPrefix = self.yellowCopy and COPY_PREFIX_YELLOW or COPY_PREFIX_RB
self.nineImg = self.yellowCopy and tryImage(
title and title.nine and title.nine.path
or "assets/generated/title/nine.png") or nil
return self
end
@@ -255,6 +263,17 @@ function Credits:drawPage(screen, xoff, shade)
if screen.copyright then self:drawCopyright(xoff) end
end
function Credits:drawCopyPrefix(x, y)
local img = self.copyImg
for _, t in ipairs(self.copyPrefix) do
love.graphics.draw(img, self.copyQuads[t], x, y)
x = x + 8
end
if self.nineImg then
love.graphics.draw(self.nineImg, x, y)
end
end
function Credits:drawCopyright(xoff)
local img = self.copyImg
if img then
@@ -267,11 +286,11 @@ function Credits:drawCopyright(xoff)
end
return x
end
row(COPY_PREFIX, xoff + 16, 56)
self:drawCopyPrefix(xoff + 16, 56)
row(COPY_NINTENDO, xoff + 80, 56)
row(COPY_PREFIX, xoff + 16, 72)
self:drawCopyPrefix(xoff + 16, 72)
row(COPY_CREATURES, xoff + 80, 72)
row(COPY_PREFIX, xoff + 16, 88)
self:drawCopyPrefix(xoff + 16, 88)
if self.gfImg then
love.graphics.draw(self.gfImg, xoff + 80, 88)
else
+25 -3
View File
@@ -2,6 +2,7 @@
-- ..(engine/movie/splash.asm ln 27)
local Font = require("src.render.Font")
local GameVersion = require("src.core.GameVersion")
local Music = require("src.core.Music")
local Sound = require("src.core.Sound")
local Strings = require("src.core.Strings")
@@ -56,8 +57,13 @@ local SPLASH_FRAMES = WAVES_END + 40 -- ld c, 40 (intro.asm:329-331)
local LOGO_X, LOGO_Y = 72, 56
local TEXT_X, TEXT_Y = 40, 80
-- ..(engine/movie/title.asm ln 390)
local COPY_PREFIX = { 0, 1, 2, 1, 3, 1, 4 }
-- CopyrightTextString (engine/movie/title.asm). Red/Blue years are
-- (c)'95.'96.'98; Yellow's sheet spells (c)1995-1999 and finishes the
-- last digit with NineTile (title screen). Intro originally overflows
-- into the font "A" tile for that digit; we draw NineTile so both
-- screens read 1999.
local COPY_PREFIX_RB = { 0, 1, 2, 1, 3, 1, 4 }
local COPY_PREFIX_YELLOW = { 0, 1, 2, 3, 1, 2 }
local COPY_NINTENDO = { 5, 6, 7, 8, 9, 10 }
local COPY_CREATURES = { 11, 12, 13, 14, 15, 16, 17, 18 }
@@ -143,6 +149,12 @@ function IntroMovie.new(game, onDone)
end
self.gfInc = img(titleCfg.gamefreakInc)
or tryImage("assets/generated/title/gamefreak_inc.png")
-- ..(pokeyellow engine/movie/title.asm CopyrightTextString / NineTile)
self.yellowCopy = GameVersion.isYellow()
or titleCfg.layout == "yellow_pikachu"
self.copyPrefix = self.yellowCopy and COPY_PREFIX_YELLOW or COPY_PREFIX_RB
self.nineImg = self.yellowCopy and (
img(titleCfg.nine) or tryImage("assets/generated/title/nine.png")) or nil
self.studioLogo = tryImage(self.studio.logo)
if self.studioLogo then
self.studioLogo:setFilter("nearest", "nearest")
@@ -364,6 +376,16 @@ function IntroMovie:drawFight()
end
end
function IntroMovie:drawCopyPrefix(x, y)
for _, t in ipairs(self.copyPrefix) do
love.graphics.draw(self.copyright, self.copyQuads[t], x, y)
x = x + 8
end
if self.nineImg then
love.graphics.draw(self.nineImg, x, y)
end
end
function IntroMovie:drawCopyright()
if self.studio.card or self.studio.credit then
local card = self.studio.card or ""
@@ -378,7 +400,7 @@ function IntroMovie:drawCopyright()
x = x + 8
end
end
for _, y in ipairs({ 56, 72, 88 }) do row(COPY_PREFIX, 16, y) end
for _, y in ipairs({ 56, 72, 88 }) do self:drawCopyPrefix(16, y) end
row(COPY_NINTENDO, 80, 56)
row(COPY_CREATURES, 80, 72)
love.graphics.draw(self.gfInc, 80, 88)
+10 -4
View File
@@ -226,6 +226,11 @@ function TitleState.new(game, opts)
self.blue = GameVersion.isBlue()
self.yellow = GameVersion.isYellow()
or title.layout == "yellow_pikachu"
-- ..(pokeyellow engine/movie/title.asm .tileScreenCopyrightTiles / NineTile)
self.nineImg = self.yellow and tryImage(imagePath(title.nine)
or "assets/generated/title/nine.png") or nil
self.copyPrefix = self.yellow
and { 0, 1, 2, 3, 1, 2 } or { 0, 1, 2, 1, 3, 1, 4 }
-- Yellow title is a fixed Pikachu composition (title_yellow.asm), not
-- TitleMons cycling. Prefer composed pikachu.png from the Yellow import.
self.yellowPikachu = self.yellow and tryImage(imagePath(title.pikachu)
@@ -665,16 +670,17 @@ function TitleState:draw()
self:drawCopyright(136 + (preRibbon and 0 or scrollY))
end
-- ..(engine/movie/title.asm ln 117)
local COPY_PREFIX = { 0, 1, 2, 1, 3, 1, 4 }
function TitleState:drawCopyright(y)
if not self.title.copyrightText and self.copyImg and self.gfInc then
local x = 16
for _, t in ipairs(COPY_PREFIX) do
for _, t in ipairs(self.copyPrefix) do
love.graphics.draw(self.copyImg, self.copyQuads[t], x, y)
x = x + 8
end
if self.nineImg then
love.graphics.draw(self.nineImg, x, y)
x = x + 8
end
love.graphics.draw(self.gfInc, x, y)
return
end