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 .not_done
; Break when [hRandom] <= de. ; Break when [hRandom] <= de.
ldh a, [hRandom + 1] ldh a, [hRandomSub]
cp d cp d
jr c, .done jr c, .done
jr z, .ok jr z, .ok
jr .next jr .next
.ok .ok
ldh a, [hRandom + 0] ldh a, [hRandomAdd]
cp e cp e
jr c, .done jr c, .done
jr z, .done jr z, .done

View File

@ -985,7 +985,7 @@ Function104faf:
cpl cpl
ld b, a ld b, a
xor a xor a
ldh [hMGJoypadPressed + 2], a ldh [hMGPrevTIMA], a
call Function104d86 call Function104d86
.asm_104fd2 .asm_104fd2
inc b inc b
@ -1008,10 +1008,10 @@ Function104faf:
bit 1, a bit 1, a
jr nz, .asm_104fe5 jr nz, .asm_104fe5
.asm_104fed .asm_104fed
ldh a, [hMGJoypadPressed + 2] ldh a, [hMGPrevTIMA]
ld d, a ld d, a
ldh a, [rTIMA] ldh a, [rTIMA]
ldh [hMGJoypadPressed + 2], a ldh [hMGPrevTIMA], a
sub d sub d
cp $12 cp $12
jr c, .asm_104ffd jr c, .asm_104ffd

View File

@ -813,7 +813,7 @@ PlayerMovement:
CheckMenuOW: CheckMenuOW:
xor a xor a
ldh [hMenuReturn], a ldh [hMenuReturn], a
ldh [hMenuReturn + 1], a ldh [hUnusedFFA1], a
ldh a, [hJoyPressed] ldh a, [hJoyPressed]
bit SELECT_F, a bit SELECT_F, a

View File

@ -20,10 +20,10 @@ SpawnPlayer:
ld a, -1 ld a, -1
ld [wObjectFollow_Leader], a ld [wObjectFollow_Leader], a
ld [wObjectFollow_Follower], a ld [wObjectFollow_Follower], a
ld a, $0 ld a, PLAYER
ld hl, PlayerObjectTemplate ld hl, PlayerObjectTemplate
call CopyPlayerObjectTemplate call CopyPlayerObjectTemplate
ld b, $0 ld b, PLAYER
call PlayerSpawn_ConvertCoords call PlayerSpawn_ConvertCoords
ld a, PLAYER_OBJECT ld a, PLAYER_OBJECT
call GetMapObject call GetMapObject

View File

@ -1,5 +1,5 @@
Joypad:: Joypad::
; Replaced by Joypad, called from VBlank instead of the useless ; Replaced by UpdateJoypad, called from VBlank instead of the useless
; joypad interrupt. ; joypad interrupt.
; This is a placeholder in case the interrupt is somehow enabled. ; This is a placeholder in case the interrupt is somehow enabled.

View File

@ -517,9 +517,9 @@ DoNthMenu::
ret ret
SetUpMenu:: SetUpMenu::
call DrawVariableLengthMenuBox ; ??? call DrawVariableLengthMenuBox
call MenuWriteText call MenuWriteText
call InitMenuCursorAndButtonPermissions ; set up selection pointer call InitMenuCursorAndButtonPermissions
ld hl, w2DMenuFlags1 ld hl, w2DMenuFlags1
set 7, [hl] set 7, [hl]
ret ret

View File

@ -33,7 +33,7 @@ hVBlank:: db ; ff9e
hMapEntryMethod:: db ; ff9f hMapEntryMethod:: db ; ff9f
hMenuReturn:: db ; ffa0 hMenuReturn:: db ; ffa0
ds 1 hUnusedFFA1:: db ; ffa1
hJoypadReleased:: db ; ffa2 hJoypadReleased:: db ; ffa2
hJoypadPressed:: db ; ffa3 hJoypadPressed:: db ; ffa3
@ -107,6 +107,7 @@ hMoneyTemp:: ds 3 ; ffc3
NEXTU ; ffc3 NEXTU ; ffc3
hMGJoypadPressed:: db ; ffc3 hMGJoypadPressed:: db ; ffc3
hMGJoypadReleased:: db ; ffc4 hMGJoypadReleased:: db ; ffc4
hMGPrevTIMA:: db ; ffc5
ENDU ; ffc6 ENDU ; ffc6
hLCDCPointer:: db ; ffc6 hLCDCPointer:: db ; ffc6

View File

@ -9,7 +9,7 @@ PlayersHouse2F_MapScripts:
db 2 ; callbacks db 2 ; callbacks
callback MAPCALLBACK_NEWMAP, .InitializeRoom callback MAPCALLBACK_NEWMAP, .InitializeRoom
callback MAPCALLBACK_TILES, .SetSpawn callback MAPCALLBACK_TILES, .SetUpTileDecorations
; unused ; unused
.Null: .Null:
@ -26,7 +26,7 @@ PlayersHouse2F_MapScripts:
.SkipInitialization: .SkipInitialization:
return return
.SetSpawn: .SetUpTileDecorations:
special ToggleMaptileDecorations special ToggleMaptileDecorations
return return