mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-22 13:36:14 +02:00
Fix Gen 1/2 battle, menu, PC and audio parity gaps; wire luacheck into CI
CLOSES #1484, CLOSES #1486, CLOSES #1513, CLOSES #1517, CLOSES #1556, CLOSES #1564, CLOSES #1567
This commit is contained in:
@@ -83,6 +83,7 @@ local SFX = {
|
||||
WARP_TO = 19,
|
||||
EXIT_BUILDING = 35,
|
||||
JUMP_OVER_LEDGE = 0x16,
|
||||
BUMP = 0x24,
|
||||
}
|
||||
local EMOTE_SHOCK = 0
|
||||
|
||||
@@ -2183,6 +2184,13 @@ function World:playSfxNamed(want, fallbackId)
|
||||
self:playSfx(self:sfxIdNamed(want, fallbackId))
|
||||
end
|
||||
|
||||
-- .BumpSound (engine/overworld/player_movement.asm:771): `call CheckSFX /
|
||||
-- ret c` is the whole rate limit (home/audio.asm:477), not a frame counter.
|
||||
function World:bumpSound()
|
||||
if Sound.sfxBusy() then return end
|
||||
self:playSfxNamed("Sfx_Bump", SFX.BUMP)
|
||||
end
|
||||
|
||||
-- Script_specialsound (engine/overworld/scripting.asm:476) is not a fixed cue:
|
||||
-- it farcalls CheckItemPocket (engine/items/items.asm:512), which writes
|
||||
-- wCurItem's pocket into wItemAttributeValue, and rings SFX.GET_TM for the
|
||||
@@ -9031,6 +9039,9 @@ function World:movePlayer(dir)
|
||||
elseif result == "blocked" or result == "edge" then
|
||||
self.turningDirection = nil
|
||||
end
|
||||
-- .NotMoving and .Ice's own arm (player_movement.asm:102 and :87), which
|
||||
-- .TryJump's carry (:376) returns above.
|
||||
if result == "blocked" then self:bumpSound() end
|
||||
-- NormalStep, in order (engine/overworld/movement.asm:657-674): InitStep has
|
||||
-- already moved OBJECT_TILE_COLLISION onto the destination.
|
||||
if result == "moved" then self:playerStepGrass() end
|
||||
@@ -9738,7 +9749,8 @@ function World:stepBody()
|
||||
|
||||
local result = self:movePlayer(dir)
|
||||
if result == "edge" then
|
||||
self:tryConnection(dir)
|
||||
-- A border block is a wall: engine/overworld/player_movement.asm:264
|
||||
if not self:tryConnection(dir) then self:bumpSound() end
|
||||
elseif result == "blocked" and p.facing == dir then
|
||||
-- .CheckNPC came back 2: something movable is in the way. The step is
|
||||
-- lost either way, and the boulder is what moves.
|
||||
|
||||
Reference in New Issue
Block a user