diff --git a/engine/events/odd_egg.asm b/engine/events/odd_egg.asm index a6ca15b8c..d6d8f344e 100644 --- a/engine/events/odd_egg.asm +++ b/engine/events/odd_egg.asm @@ -23,13 +23,13 @@ _GiveOddEgg: .not_done ; Break when [hRandom] <= de. - ldh a, [hRandom + 1] + ldh a, [hRandomSub] cp d jr c, .done jr z, .ok jr .next .ok - ldh a, [hRandom + 0] + ldh a, [hRandomAdd] cp e jr c, .done jr z, .done diff --git a/engine/link/mystery_gift.asm b/engine/link/mystery_gift.asm index 76f94c680..83c5a06de 100644 --- a/engine/link/mystery_gift.asm +++ b/engine/link/mystery_gift.asm @@ -985,7 +985,7 @@ Function104faf: cpl ld b, a xor a - ldh [hMGJoypadPressed + 2], a + ldh [hMGPrevTIMA], a call Function104d86 .asm_104fd2 inc b @@ -1008,10 +1008,10 @@ Function104faf: bit 1, a jr nz, .asm_104fe5 .asm_104fed - ldh a, [hMGJoypadPressed + 2] + ldh a, [hMGPrevTIMA] ld d, a ldh a, [rTIMA] - ldh [hMGJoypadPressed + 2], a + ldh [hMGPrevTIMA], a sub d cp $12 jr c, .asm_104ffd diff --git a/engine/overworld/events.asm b/engine/overworld/events.asm index bdac21c94..7c79d41df 100644 --- a/engine/overworld/events.asm +++ b/engine/overworld/events.asm @@ -813,7 +813,7 @@ PlayerMovement: CheckMenuOW: xor a ldh [hMenuReturn], a - ldh [hMenuReturn + 1], a + ldh [hUnusedFFA1], a ldh a, [hJoyPressed] bit SELECT_F, a diff --git a/engine/overworld/player_object.asm b/engine/overworld/player_object.asm index 75d1de594..6905c83f0 100644 --- a/engine/overworld/player_object.asm +++ b/engine/overworld/player_object.asm @@ -20,10 +20,10 @@ SpawnPlayer: ld a, -1 ld [wObjectFollow_Leader], a ld [wObjectFollow_Follower], a - ld a, $0 + ld a, PLAYER ld hl, PlayerObjectTemplate call CopyPlayerObjectTemplate - ld b, $0 + ld b, PLAYER call PlayerSpawn_ConvertCoords ld a, PLAYER_OBJECT call GetMapObject diff --git a/home/joypad.asm b/home/joypad.asm index 2ffd8343c..79129ecc4 100644 --- a/home/joypad.asm +++ b/home/joypad.asm @@ -1,5 +1,5 @@ Joypad:: -; Replaced by Joypad, called from VBlank instead of the useless +; Replaced by UpdateJoypad, called from VBlank instead of the useless ; joypad interrupt. ; This is a placeholder in case the interrupt is somehow enabled. diff --git a/home/menu.asm b/home/menu.asm index fb2db1b91..12dfc67af 100644 --- a/home/menu.asm +++ b/home/menu.asm @@ -517,9 +517,9 @@ DoNthMenu:: ret SetUpMenu:: - call DrawVariableLengthMenuBox ; ??? + call DrawVariableLengthMenuBox call MenuWriteText - call InitMenuCursorAndButtonPermissions ; set up selection pointer + call InitMenuCursorAndButtonPermissions ld hl, w2DMenuFlags1 set 7, [hl] ret diff --git a/hram.asm b/hram.asm index 8b730b229..722ea2573 100644 --- a/hram.asm +++ b/hram.asm @@ -33,7 +33,7 @@ hVBlank:: db ; ff9e hMapEntryMethod:: db ; ff9f hMenuReturn:: db ; ffa0 - ds 1 +hUnusedFFA1:: db ; ffa1 hJoypadReleased:: db ; ffa2 hJoypadPressed:: db ; ffa3 @@ -107,6 +107,7 @@ hMoneyTemp:: ds 3 ; ffc3 NEXTU ; ffc3 hMGJoypadPressed:: db ; ffc3 hMGJoypadReleased:: db ; ffc4 +hMGPrevTIMA:: db ; ffc5 ENDU ; ffc6 hLCDCPointer:: db ; ffc6 diff --git a/maps/PlayersHouse2F.asm b/maps/PlayersHouse2F.asm index 21a229351..02659d55b 100644 --- a/maps/PlayersHouse2F.asm +++ b/maps/PlayersHouse2F.asm @@ -9,7 +9,7 @@ PlayersHouse2F_MapScripts: db 2 ; callbacks callback MAPCALLBACK_NEWMAP, .InitializeRoom - callback MAPCALLBACK_TILES, .SetSpawn + callback MAPCALLBACK_TILES, .SetUpTileDecorations ; unused .Null: @@ -26,7 +26,7 @@ PlayersHouse2F_MapScripts: .SkipInitialization: return -.SetSpawn: +.SetUpTileDecorations: special ToggleMaptileDecorations return