Fix #709 miscellaneous issues

This commit is contained in:
Rangi 2020-04-16 09:30:50 -04:00
parent 3540578cb3
commit 58b377f25b
8 changed files with 15 additions and 14 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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