mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-28 18:06:09 +02:00
big palette energy
This commit is contained in:
@@ -20,8 +20,8 @@ return function(game)
|
||||
end
|
||||
assert(layoutRow and hudRow, "battle layout/HUD rows are present")
|
||||
|
||||
menu.index = 6
|
||||
menu.scroll = 3
|
||||
-- BATTLE HUD lives on the BATTLE OPTIONS page now, so focus it there.
|
||||
assert(menu:focusRow("battleHud"), "BATTLE HUD row is reachable")
|
||||
assert(hudRow.value(game) == "EXTENDED", "WIDE displays EXTENDED")
|
||||
assert(U.shot(game, BEFORE), "WIDE/EXTENDED screenshot was written")
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
-- Diagnostic probe: forces a loud custom COLORS ramp (hot pink paper, blue
|
||||
-- ink) and shoots StartMenu, PartyMenu, and PackMenu, so a gap between
|
||||
-- those screens and the rest of the UI can be checked by eye.
|
||||
--
|
||||
-- POKEPORT_GAME=gold POKEPORT_DRIVER=tests/drivers/custom_ramp_probe.lua love .
|
||||
local U = require("tests.drivers.util")
|
||||
|
||||
local GbcPalette = require("src.render.GbcPalette")
|
||||
local StartMenu = require("src.ui.gen2.StartMenu")
|
||||
local PartyMenu = require("src.ui.gen2.PartyMenu")
|
||||
local PackMenu = require("src.ui.gen2.PackMenu")
|
||||
|
||||
return function(game)
|
||||
local out = os.getenv("POKEPORT_SHOT_DIR") or "/tmp/custom-ramp-probe"
|
||||
|
||||
local function shot(name)
|
||||
U.wait(3)
|
||||
U.shot(game, ("%s/%s.png"):format(out, name))
|
||||
end
|
||||
|
||||
local function show(name, state)
|
||||
game.stack:push(state)
|
||||
shot(name)
|
||||
game.stack:pop()
|
||||
end
|
||||
|
||||
U.wait(45)
|
||||
assert(game.world and game.world.map, "gold world did not boot")
|
||||
|
||||
print("[driver] GbcPalette.available() = " .. tostring(GbcPalette.available()))
|
||||
|
||||
GbcPalette.setCustomRamp({
|
||||
{ 255, 100, 220 }, { 220, 60, 180 }, { 140, 20, 120 }, { 20, 0, 60 },
|
||||
})
|
||||
print("[driver] customRamp set, mode=" .. tostring(GbcPalette.mode))
|
||||
|
||||
local save = game.save
|
||||
save.party = save.party or {}
|
||||
save.inventory = { POTION = 5, SUPER_POTION = 2, ANTIDOTE = 1 }
|
||||
|
||||
show("01-startmenu-custom-ramp", StartMenu.new(game, { save = save }))
|
||||
show("02-party-custom-ramp", PartyMenu.new(game, { prompt = "choose" }))
|
||||
show("03-pack-items-custom-ramp", PackMenu.new(game, { pocket = "ITEM" }))
|
||||
|
||||
print("[driver] PASS custom ramp probe shots in " .. out)
|
||||
end
|
||||
@@ -28,8 +28,8 @@ return function(game)
|
||||
assert(bgRow.step(game, 1) == false, "AUTO background row is locked")
|
||||
assert(options.battleBg == "black", "locked AUTO does not overwrite the stored value")
|
||||
|
||||
menu.index = bgIndex
|
||||
menu.scroll = math.max(0, bgIndex - 5)
|
||||
-- BATTLE BG lives on the BATTLE OPTIONS page now, so focus it there.
|
||||
assert(menu:focusRow("battleBg"), "BATTLE BG row is reachable")
|
||||
U.wait(2)
|
||||
local autoPath = DIR .. "/fill_extended_auto_menu.png"
|
||||
os.remove(autoPath)
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
-- The grouped Gen 2 OPTION screen: the top level, one page, and a long
|
||||
-- COLOR value scrolling under the cursor.
|
||||
--
|
||||
-- POKEPORT_GAME=gold POKEPORT_DRIVER=tests/drivers/gold_options_groups_shots.lua love .
|
||||
local U = require("tests.drivers.util")
|
||||
|
||||
return function(game)
|
||||
local OptionsMenu = require("src.ui.gen2.OptionsMenu")
|
||||
local DIR = os.getenv("SHOT_DIR") or "/tmp/shots"
|
||||
U.wait(5)
|
||||
local menu = OptionsMenu.new(game, { options = game.options })
|
||||
game.stack:push(menu)
|
||||
U.wait(3)
|
||||
U.shot(game, DIR .. "/g2_0_top.png")
|
||||
|
||||
local page = menu:focusRow("color")
|
||||
U.wait(2)
|
||||
U.shot(game, DIR .. "/g2_1_graphics.png")
|
||||
game.options.palette = "1-A (Default) (BGB)"
|
||||
U.wait(2)
|
||||
U.shot(game, DIR .. "/g2_2_color_start.png")
|
||||
U.wait(85)
|
||||
U.shot(game, DIR .. "/g2_3_color_scrolled.png")
|
||||
|
||||
page.index = #page.view
|
||||
U.wait(3)
|
||||
U.shot(game, DIR .. "/g2_4_back.png")
|
||||
U.log("GOLD_OPTIONS_GROUPS_DONE")
|
||||
game.driverDone = true
|
||||
end
|
||||
@@ -0,0 +1,33 @@
|
||||
-- Driver: the grouped OPTION screen -- the top level with its group openers,
|
||||
-- one group's page, and the COLORS row scrolling its overlong value.
|
||||
return function(game)
|
||||
local U = dofile("tests/drivers/util.lua")
|
||||
local DIR = os.getenv("SHOT_DIR") or "/tmp/shots"
|
||||
U.teleport(game, "PALLET_TOWN", 10, 8, "down")
|
||||
local OptionsMenu = require("src.ui.OptionsMenu")
|
||||
local menu = OptionsMenu.new(game)
|
||||
game.stack:push(menu)
|
||||
U.wait(5)
|
||||
U.shot(game, DIR .. "/opt_0_top.png")
|
||||
|
||||
menu:focusRow("group.battle")
|
||||
U.wait(2)
|
||||
U.shot(game, DIR .. "/opt_1_battle_opener.png")
|
||||
U.tap(game, "a"); U.wait(3)
|
||||
U.shot(game, DIR .. "/opt_2_battle_page.png")
|
||||
U.tap(game, "b"); U.wait(3)
|
||||
|
||||
game.save.options.palette = "1-A (Default) (BGB)"
|
||||
-- COLORS is on the GRAPHICS page, so focusRow hands back that page.
|
||||
local graphics = menu:focusRow("colors")
|
||||
U.wait(2)
|
||||
U.shot(game, DIR .. "/opt_3_colors_start.png")
|
||||
U.wait(85)
|
||||
U.shot(game, DIR .. "/opt_4_colors_scrolled.png")
|
||||
|
||||
graphics.index = #graphics.rows + 1 -- the page's own BACK
|
||||
U.wait(3)
|
||||
U.shot(game, DIR .. "/opt_5_back.png")
|
||||
U.log("OPTIONS_GROUPS_SHOTS_DONE")
|
||||
game.driverDone = true
|
||||
end
|
||||
@@ -1,18 +1,21 @@
|
||||
-- Driver: the options screen with the port's audio rows (MUSIC VOL /
|
||||
-- SFX VOL / MUSIC FILTER) to prove the 4-box viewport, the ▼ scroll
|
||||
-- marker, and CANCEL fixed on the bottom line. The menu is pushed
|
||||
-- directly (title-menu row order shifts when a save file exists, so
|
||||
-- blind taps are unreliable).
|
||||
-- marker, and BACK fixed on the bottom line. The audio rows live on the
|
||||
-- AUDIO page now, so the menu focuses its way there rather than tapping
|
||||
-- down a fixed number of times. The menu is pushed directly (title-menu
|
||||
-- row order shifts when a save file exists, so blind taps are unreliable).
|
||||
return function(game)
|
||||
local U = dofile("tests/drivers/util.lua")
|
||||
local DIR = os.getenv("SHOT_DIR") or "/tmp/shots"
|
||||
U.teleport(game, "PALLET_TOWN", 10, 8, "down")
|
||||
local OptionsMenu = require("src.ui.OptionsMenu")
|
||||
game.stack:push(OptionsMenu.new(game))
|
||||
local menu = OptionsMenu.new(game)
|
||||
game.stack:push(menu)
|
||||
U.wait(5)
|
||||
U.shot(game, DIR .. "/options_0_top.png")
|
||||
for _ = 1, 4 do U.tap(game, "down"); U.wait(2) end
|
||||
U.shot(game, DIR .. "/options_1_musicvol.png") -- scrolled, ▼ visible
|
||||
local audio = menu:focusRow("musicVol")
|
||||
U.wait(2)
|
||||
U.shot(game, DIR .. "/options_1_musicvol.png") -- the AUDIO page
|
||||
U.tap(game, "left"); U.wait(2)
|
||||
U.tap(game, "left"); U.wait(2)
|
||||
U.shot(game, DIR .. "/options_2_musicvol_5.png")
|
||||
@@ -20,6 +23,7 @@ return function(game)
|
||||
U.tap(game, "down"); U.wait(2)
|
||||
U.tap(game, "right"); U.wait(2) -- MUSIC FILTER -> 1X
|
||||
U.shot(game, DIR .. "/options_3_filter_1x.png")
|
||||
U.tap(game, "down"); U.wait(2) -- CANCEL, tail rows behind it
|
||||
U.shot(game, DIR .. "/options_4_cancel.png")
|
||||
audio.index = #audio.view + 1 -- BACK, the page's rows behind it
|
||||
U.wait(2)
|
||||
U.shot(game, DIR .. "/options_4_back.png")
|
||||
end
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
-- The COLORS picker after the palette rename: the root folder list and one
|
||||
-- pack's contents.
|
||||
return function(game)
|
||||
local U = dofile("tests/drivers/util.lua")
|
||||
local DIR = os.getenv("SHOT_DIR") or "/tmp/shots"
|
||||
U.teleport(game, "PALLET_TOWN", 10, 8, "down")
|
||||
local Screens = require("src.ui.Screens")
|
||||
Screens.push(game, "PaletteScreen")
|
||||
U.wait(5)
|
||||
U.shot(game, DIR .. "/pal_0_root.png")
|
||||
for _ = 1, 6 do U.tap(game, "down"); U.wait(1) end
|
||||
U.shot(game, DIR .. "/pal_1_scrolled.png")
|
||||
U.tap(game, "a"); U.wait(4)
|
||||
U.shot(game, DIR .. "/pal_2_inside.png")
|
||||
U.log("PALETTE_PICKER_SHOTS_DONE")
|
||||
game.driverDone = true
|
||||
end
|
||||
Reference in New Issue
Block a user