mirror of
https://github.com/bryanthaboi/gen1recomp
synced 2026-10-02 15:50:39 -04:00
couple other things
This commit is contained in:
@@ -402,6 +402,11 @@ local function right_align_3(n)
|
||||
n = math.floor(tonumber(n) or 0)
|
||||
if n < 0 then n = 0 end
|
||||
if n > 999 then n = 999 end
|
||||
if isRse() then
|
||||
-- pokeemerald/src/string_util.c:209 ConvertIntToDecimalStringN
|
||||
local digits = tostring(n)
|
||||
return string.rep("{UNK_SPACER}", 3 - #digits) .. digits
|
||||
end
|
||||
return string.format("%3d", n)
|
||||
end
|
||||
|
||||
|
||||
@@ -467,6 +467,23 @@ local function drawSkills(m, Sm, mon)
|
||||
end
|
||||
end
|
||||
|
||||
local function drawMoveSelector(m, row, endFrame, midFrame)
|
||||
local y = 40 + (row - 1) * 16 - 8
|
||||
for i = 0, 9 do
|
||||
local x = i * 16 + 89 - 8
|
||||
if i == 9 then
|
||||
local img = Kit.image(m.moveSelect.png)
|
||||
if img then
|
||||
local sw, sh = img:getDimensions()
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
love.graphics.draw(img, quad(m.moveSelect.png, 0, endFrame * 16, 16, 16, sw, sh), x + 16, y, 0, -1, 1)
|
||||
end
|
||||
else
|
||||
drawFrame(m.moveSelect, i == 0 and endFrame or midFrame, x, y)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- pokeemerald/src/pokemon_summary_screen.c:3527
|
||||
local function drawMoves(m, Sm, mon, contest, detail)
|
||||
local moves = moveList(Sm, mon)
|
||||
@@ -497,21 +514,19 @@ local function drawMoves(m, Sm, mon, contest, detail)
|
||||
local cur = Sm._moveCursor or 1
|
||||
local sel = moves[cur]
|
||||
-- pokeemerald/src/pokemon_summary_screen.c:4112
|
||||
local swapSlot = Sm._swapSlot
|
||||
if (swapSlot ~= nil) ~= st.swapping then
|
||||
st.swapping = swapSlot ~= nil
|
||||
st.blink = 0
|
||||
end
|
||||
st.blink = ((st.blink or 0) + 1) % 32
|
||||
if st.blink <= 24 then
|
||||
local y = 40 + (cur - 1) * 16 - 8
|
||||
for i = 0, 9 do
|
||||
local x = i * 16 + 89 - 8
|
||||
if i == 9 then
|
||||
local img = Kit.image(m.moveSelect.png)
|
||||
if img then
|
||||
local sw, sh = img:getDimensions()
|
||||
love.graphics.draw(img, quad(m.moveSelect.png, 0, 4 * 16, 16, 16, sw, sh), x + 16, y, 0, -1, 1)
|
||||
end
|
||||
else
|
||||
drawFrame(m.moveSelect, i == 0 and 4 or 5, x, y)
|
||||
end
|
||||
end
|
||||
local visible = st.blink <= 24
|
||||
if swapSlot then
|
||||
-- pokeemerald/src/pokemon_summary_screen.c:2043
|
||||
drawMoveSelector(m, swapSlot, 6, 7)
|
||||
if visible then drawMoveSelector(m, cur, 4, 5) end
|
||||
elseif visible then
|
||||
drawMoveSelector(m, cur, 4, 5)
|
||||
end
|
||||
if not sel then return end
|
||||
local dw = pageWin(m, "moves", 2)
|
||||
|
||||
Reference in New Issue
Block a user