Comment naming screen

also use more joypad constants
This commit is contained in:
dannye 2015-07-14 03:46:23 -05:00
parent ef9e59101e
commit b1cb378893
12 changed files with 158 additions and 150 deletions

View File

@ -41,7 +41,7 @@ EndOfBattle: ; 137aa (4:77aa)
call PrintText call PrintText
.evolution .evolution
xor a xor a
ld [wccd4], a ld [wForceEvolution], a
predef EvolutionAfterBattle predef EvolutionAfterBattle
.resetVariables .resetVariables
xor a xor a

View File

@ -816,7 +816,7 @@ TradeCenter_Trade:
dec a dec a
ld [wWhichPokemon], a ld [wWhichPokemon], a
ld a, $1 ld a, $1
ld [wccd4], a ld [wForceEvolution], a
ld a, [wTradingWhichEnemyMon] ld a, [wTradingWhichEnemyMon]
ld hl, wEnemyPartyMons ld hl, wEnemyPartyMons
ld b, 0 ld b, 0

View File

@ -27,7 +27,7 @@ EvolveMon: ; 7bde9 (1e:7de9)
ld a, [wHPBarMaxHP + 1] ld a, [wHPBarMaxHP + 1]
ld [wcf91], a ld [wcf91], a
ld [wd0b5], a ld [wd0b5], a
call Func_7beb9 call Evolution_LoadPic
ld de, vFrontPic ld de, vFrontPic
ld hl, vBackPic ld hl, vBackPic
ld bc, 7 * 7 ld bc, 7 * 7
@ -35,7 +35,7 @@ EvolveMon: ; 7bde9 (1e:7de9)
ld a, [wHPBarMaxHP] ld a, [wHPBarMaxHP]
ld [wcf91], a ld [wcf91], a
ld [wd0b5], a ld [wd0b5], a
call Func_7beb9 call Evolution_LoadPic
ld a, $1 ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
ld a, [wHPBarMaxHP] ld a, [wHPBarMaxHP]
@ -51,8 +51,8 @@ EvolveMon: ; 7bde9 (1e:7de9)
ld bc, $110 ld bc, $110
.asm_7be63 .asm_7be63
push bc push bc
call Func_7befa call Evolution_CheckForCancel
jr c, .asm_7bea9 jr c, .evolutionCancelled
call Func_7bec2 call Func_7bec2
pop bc pop bc
inc b inc b
@ -65,7 +65,7 @@ EvolveMon: ; 7bde9 (1e:7de9)
ld [wHPBarOldHP], a ld [wHPBarOldHP], a
call Func_7bed6 call Func_7bed6
ld a, [wHPBarMaxHP + 1] ld a, [wHPBarMaxHP + 1]
.asm_7be81 .afterCancellation
ld [wcf1d], a ld [wcf1d], a
ld a, $ff ld a, $ff
ld [wc0ee], a ld [wc0ee], a
@ -86,18 +86,18 @@ EvolveMon: ; 7bde9 (1e:7de9)
ret z ret z
scf scf
ret ret
.asm_7bea9 .evolutionCancelled
pop bc pop bc
ld a, $1 ld a, $1
ld [wHPBarOldHP + 1], a ld [wHPBarOldHP + 1], a
ld a, [wHPBarMaxHP] ld a, [wHPBarMaxHP]
jr .asm_7be81 jr .afterCancellation
EvolutionSetWholeScreenPalette: ; 7beb4 (1e:7eb4) EvolutionSetWholeScreenPalette: ; 7beb4 (1e:7eb4)
ld b, $b ld b, $b
jp GoPAL_SET jp GoPAL_SET
Func_7beb9: ; 7beb9 (1e:7eb9) Evolution_LoadPic: ; 7beb9 (1e:7eb9)
call GetMonHeader call GetMonHeader
hlCoord 7, 2 hlCoord 7, 2
jp LoadFlippedFrontSpriteByMonIndex jp LoadFlippedFrontSpriteByMonIndex
@ -138,22 +138,22 @@ Func_7bed6: ; 7bed6 (1e:7ed6)
pop bc pop bc
ret ret
Func_7befa: ; 7befa (1e:7efa) Evolution_CheckForCancel: ; 7befa (1e:7efa)
call DelayFrame call DelayFrame
push bc push bc
call JoypadLowSensitivity call JoypadLowSensitivity
ld a, [hJoy5] ld a, [hJoy5]
pop bc pop bc
and $2 and B_BUTTON
jr nz, .asm_7bf0d jr nz, .pressedB
.asm_7bf08 .notAllowedToCancel
dec c dec c
jr nz, Func_7befa jr nz, Evolution_CheckForCancel
and a and a
ret ret
.asm_7bf0d .pressedB
ld a, [wccd4] ld a, [wForceEvolution]
and a and a
jr nz, .asm_7bf08 jr nz, .notAllowedToCancel
scf scf
ret ret

View File

@ -35,7 +35,7 @@ EvolveTradeMon: ; 17d7d (5:7d7d)
dec a dec a
ld [wWhichPokemon], a ld [wWhichPokemon], a
ld a, $1 ld a, $1
ld [wccd4], a ld [wForceEvolution], a
ld a, LINK_STATE_TRADING ld a, LINK_STATE_TRADING
ld [wLinkState], a ld [wLinkState], a
callab TryEvolvingMon callab TryEvolvingMon

View File

@ -76,7 +76,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, b ld a, b
cp EV_ITEM cp EV_ITEM
jr z, .checkItemEvo jr z, .checkItemEvo
ld a, [wccd4] ld a, [wForceEvolution]
and a and a
jr nz, Evolution_PartyMonLoop jr nz, Evolution_PartyMonLoop
ld a, b ld a, b

View File

@ -643,7 +643,7 @@ ItemUseEvoStone: ; da5b (3:5a5b)
ld a,b ld a,b
ld [wcf91],a ld [wcf91],a
ld a,$01 ld a,$01
ld [wccd4],a ld [wForceEvolution],a
ld a,(SFX_02_3e - SFX_Headers_02) / 3 ld a,(SFX_02_3e - SFX_Headers_02) / 3
call PlaySoundWaitForCurrent call PlaySoundWaitForCurrent
call WaitForSoundToFinish call WaitForSoundToFinish
@ -1275,7 +1275,7 @@ ItemUseMedicine: ; dabb (3:5abb)
ld [wcc49],a ld [wcc49],a
predef LearnMoveFromLevelUp ; learn level up move, if any predef LearnMoveFromLevelUp ; learn level up move, if any
xor a xor a
ld [wccd4],a ld [wForceEvolution],a
callab TryEvolvingMon ; evolve pokemon, if appropriate callab TryEvolvingMon ; evolve pokemon, if appropriate
ld a,$01 ld a,$01
ld [wUpdateSpritesEnabled],a ld [wUpdateSpritesEnabled],a

View File

@ -90,7 +90,7 @@ MainMenu: ; 5af2 (1:5af2)
call ContinueGame call ContinueGame
ld hl,wd126 ld hl,wd126
set 5,[hl] set 5,[hl]
.next6 .inputLoop
xor a xor a
ld [hJoyPressed],a ld [hJoyPressed],a
ld [hJoyReleased],a ld [hJoyReleased],a
@ -98,11 +98,11 @@ MainMenu: ; 5af2 (1:5af2)
call Joypad call Joypad
ld a,[hJoyHeld] ld a,[hJoyHeld]
bit 0,a bit 0,a
jr nz,.next5 jr nz,.pressedA
bit 1,a bit 1,a
jp nz,.next0 jp nz,.next0 ; pressedB
jr .next6 jr .inputLoop
.next5 .pressedA
call GBPalWhiteOutWithDelay3 call GBPalWhiteOutWithDelay3
call ClearScreen call ClearScreen
ld a,4 ld a,4
@ -121,6 +121,7 @@ MainMenu: ; 5af2 (1:5af2)
set 2,[hl] ; fly warp or dungeon warp set 2,[hl] ; fly warp or dungeon warp
call SpecialWarpIn call SpecialWarpIn
jp SpecialEnterMap jp SpecialEnterMap
Func_5bff: ; 5bff (1:5bff) Func_5bff: ; 5bff (1:5bff)
ld a,1 ld a,1
ld [wd358],a ld [wd358],a
@ -468,7 +469,7 @@ DisplayOptionMenu: ; 5e8a (1:5e8a)
call JoypadLowSensitivity call JoypadLowSensitivity
ld a,[hJoy5] ld a,[hJoy5]
ld b,a ld b,a
and a,%11111011 ; any key besides select pressed? and a,A_BUTTON | B_BUTTON | START | D_RIGHT | D_LEFT | D_UP | D_DOWN ; any key besides select pressed?
jr z,.getJoypadStateLoop jr z,.getJoypadStateLoop
bit 1,b ; B button pressed? bit 1,b ; B button pressed?
jr nz,.exitMenu jr nz,.exitMenu

View File

@ -21,7 +21,7 @@ AskName: ; 64eb (1:64eb)
pop hl pop hl
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
and a and a
jr nz, .asm_654c jr nz, .declinedNickname
ld a, [wUpdateSpritesEnabled] ld a, [wUpdateSpritesEnabled]
push af push af
xor a xor a
@ -32,9 +32,9 @@ AskName: ; 64eb (1:64eb)
call DisplayNamingScreen call DisplayNamingScreen
ld a, [W_ISINBATTLE] ld a, [W_ISINBATTLE]
and a and a
jr nz, .asm_653e jr nz, .inBattle
call ReloadMapSpriteTilePatterns call ReloadMapSpriteTilePatterns
.asm_653e .inBattle
call LoadScreenTilesFromBuffer1 call LoadScreenTilesFromBuffer1
pop hl pop hl
pop af pop af
@ -42,11 +42,11 @@ AskName: ; 64eb (1:64eb)
ld a, [wcf4b] ld a, [wcf4b]
cp $50 cp $50
ret nz ret nz
.asm_654c .declinedNickname
ld d, h ld d, h
ld e, l ld e, l
ld hl, wcd6d ld hl, wcd6d
ld bc, $000b ld bc, 11
jp CopyData jp CopyData
DoYouWantToNicknameText: ; 0x6557 DoYouWantToNicknameText: ; 0x6557
@ -65,7 +65,7 @@ DisplayNameRaterScreen: ; 655c (1:655c)
call LoadGBPal call LoadGBPal
ld a, [wcf4b] ld a, [wcf4b]
cp $50 cp $50
jr z, .asm_6594 jr z, .playerCancelled
ld hl, wPartyMonNicks ld hl, wPartyMonNicks
ld bc, $b ld bc, $b
ld a, [wWhichPokemon] ld a, [wWhichPokemon]
@ -73,11 +73,11 @@ DisplayNameRaterScreen: ; 655c (1:655c)
ld e, l ld e, l
ld d, h ld d, h
ld hl, wHPBarMaxHP ld hl, wHPBarMaxHP
ld bc, $b ld bc, 11
call CopyData call CopyData
and a and a
ret ret
.asm_6594 .playerCancelled
scf scf
ret ret
@ -115,17 +115,17 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld [hli], a ld [hli], a
ld [hli], a ld [hli], a
ld [wAnimCounter], a ld [wAnimCounter], a
.asm_65ed .selectReturnPoint
call PrintAlphabet call PrintAlphabet
call GBPalNormal call GBPalNormal
.asm_65f3 .ABStartReturnPoint
ld a, [wHPBarMaxHP + 1] ld a, [wHPBarMaxHP + 1]
and a and a
jr nz, .asm_662d jr nz, .submitNickname
call Func_680e call PrintNicknameAndUnderscores
.asm_65fc .dPadReturnPoint
call PlaceMenuCursor call PlaceMenuCursor
.asm_65ff .inputLoop
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
push af push af
callba AnimatePartyMon_ForceSpeed1 callba AnimatePartyMon_ForceSpeed1
@ -134,17 +134,17 @@ DisplayNamingScreen: ; 6596 (1:6596)
call JoypadLowSensitivity call JoypadLowSensitivity
ld a, [hJoyPressed] ld a, [hJoyPressed]
and a and a
jr z, .asm_65ff jr z, .inputLoop
ld hl, .unknownPointerTable_665e ld hl, .namingScreenButtonFunctions
.asm_661a .checkForPressedButton
sla a sla a
jr c, .asm_6624 jr c, .foundPressedButton
inc hl inc hl
inc hl inc hl
inc hl inc hl
inc hl inc hl
jr .asm_661a jr .checkForPressedButton
.asm_6624 .foundPressedButton
ld a, [hli] ld a, [hli]
ld e, a ld e, a
ld a, [hli] ld a, [hli]
@ -154,10 +154,11 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld l, a ld l, a
push de push de
jp [hl] jp [hl]
.asm_662d
.submitNickname
pop de pop de
ld hl, wcf4b ld hl, wcf4b
ld bc, $b ld bc, 11
call CopyData call CopyData
call GBPalWhiteOutWithDelay3 call GBPalWhiteOutWithDelay3
call ClearScreen call ClearScreen
@ -175,52 +176,54 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld b, BANK(LoadHudTilePatterns) ld b, BANK(LoadHudTilePatterns)
jp Bankswitch jp Bankswitch
.unknownPointerTable_665e: ; 665e (1:665e) .namingScreenButtonFunctions
dw .asm_65fc dw .dPadReturnPoint
dw .asm_673e dw .pressedDown
dw .asm_65fc dw .dPadReturnPoint
dw .asm_672c dw .pressedUp
dw .asm_65fc dw .dPadReturnPoint
dw .asm_6718 dw .pressedLeft
dw .asm_65fc dw .dPadReturnPoint
dw .asm_6702 dw .pressedRight
dw .asm_65f3 dw .ABStartReturnPoint
dw .asm_668c dw .pressedStart
dw .asm_65ed dw .selectReturnPoint
dw .asm_6683 dw .pressedSelect
dw .asm_65f3 dw .ABStartReturnPoint
dw .deleteLetter dw .pressedB
dw .asm_65f3 dw .ABStartReturnPoint
dw .asm_6692 dw .pressedA
.asm_667e .pressedA_changedCase
pop de pop de
ld de, .asm_65ed ld de, .selectReturnPoint
push de push de
.asm_6683 .pressedSelect
ld a, [wHPBarOldHP] ld a, [wHPBarOldHP]
xor $1 xor $1
ld [wHPBarOldHP], a ld [wHPBarOldHP], a
ret ret
.asm_668c
.pressedStart
ld a, $1 ld a, $1
ld [wHPBarMaxHP + 1], a ld [wHPBarMaxHP + 1], a
ret ret
.asm_6692
.pressedA
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
cp $5 cp $5 ; "ED" row
jr nz, .asm_66a0 jr nz, .didNotPressED
ld a, [wTopMenuItemX] ld a, [wTopMenuItemX]
cp $11 cp $11 ; "ED" column
jr z, .asm_668c jr z, .pressedStart
.asm_66a0 .didNotPressED
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
cp $6 cp $6 ; case swtich row
jr nz, .asm_66ae jr nz, .didNotPressCaseSwtich
ld a, [wTopMenuItemX] ld a, [wTopMenuItemX]
cp $1 cp $1 ; case switch column
jr z, .asm_667e jr z, .pressedA_changedCase
.asm_66ae .didNotPressCaseSwtich
ld hl, wMenuCursorLocation ld hl, wMenuCursorLocation
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
@ -232,10 +235,10 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld a, [wHPBarNewHP] ld a, [wHPBarNewHP]
cp $e5 cp $e5
ld de, Dakutens ld de, Dakutens
jr z, .asm_66e3 jr z, .dakutensAndHandakutens
cp $e4 cp $e4
ld de, Handakutens ld de, Handakutens
jr z, .asm_66e3 jr z, .dakutensAndHandakutens
ld a, [wNamingScreenType] ld a, [wNamingScreenType]
cp NAME_MON_SCREEN cp NAME_MON_SCREEN
jr nc, .checkMonNameLength jr nc, .checkMonNameLength
@ -248,9 +251,10 @@ DisplayNamingScreen: ; 6596 (1:6596)
.checkNameLength .checkNameLength
jr c, .addLetter jr c, .addLetter
ret ret
.asm_66e3
.dakutensAndHandakutens
push hl push hl
call Func_6871 call DakutensAndHandakutens
pop hl pop hl
ret nc ret nc
dec hl dec hl
@ -261,7 +265,7 @@ DisplayNamingScreen: ; 6596 (1:6596)
ld a, (SFX_02_40 - SFX_Headers_02) / 3 ld a, (SFX_02_40 - SFX_Headers_02) / 3
call PlaySound call PlaySound
ret ret
.deleteLetter .pressedB
ld a, [wHPBarMaxHP] ld a, [wHPBarMaxHP]
and a and a
ret z ret z
@ -269,55 +273,55 @@ DisplayNamingScreen: ; 6596 (1:6596)
dec hl dec hl
ld [hl], $50 ld [hl], $50
ret ret
.asm_6702 .pressedRight
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
cp $6 cp $6
ret z ret z ; can't scroll right on bottom row
ld a, [wTopMenuItemX] ld a, [wTopMenuItemX]
cp $11 cp $11 ; max
jp z, .asm_6714 jp z, .wrapToFirstColumn
inc a inc a
inc a inc a
jr .asm_6755 jr .done
.asm_6714 .wrapToFirstColumn
ld a, $1 ld a, $1
jr .asm_6755 jr .done
.asm_6718 .pressedLeft
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
cp $6 cp $6
ret z ret z ; can't scroll right on bottom row
ld a, [wTopMenuItemX] ld a, [wTopMenuItemX]
dec a dec a
jp z, .asm_6728 jp z, .wrapToLastColumn
dec a dec a
jr .asm_6755 jr .done
.asm_6728 .wrapToLastColumn
ld a, $11 ld a, $11 ; max
jr .asm_6755 jr .done
.asm_672c .pressedUp
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
dec a dec a
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
and a and a
ret nz ret nz
ld a, $6 ld a, $6 ; wrap to bottom row
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
ld a, $1 ld a, $1 ; force left column
jr .asm_6755 jr .done
.asm_673e .pressedDown
ld a, [wCurrentMenuItem] ld a, [wCurrentMenuItem]
inc a inc a
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
cp $7 cp $7
jr nz, .asm_6750 jr nz, .wrapToTopRow
ld a, $1 ld a, $1
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
jr .asm_6755 jr .done
.asm_6750 .wrapToTopRow
cp $6 cp $6
ret nz ret nz
ld a, $1 ld a, $1
.asm_6755 .done
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
jp EraseMenuCursor jp EraseMenuCursor
@ -336,25 +340,25 @@ PrintAlphabet: ; 676f (1:676f)
ld a, [wHPBarOldHP] ld a, [wHPBarOldHP]
and a and a
ld de, LowerCaseAlphabet ld de, LowerCaseAlphabet
jr nz, .asm_677e jr nz, .lowercase
ld de, UpperCaseAlphabet ld de, UpperCaseAlphabet
.asm_677e .lowercase
hlCoord 2, 5 hlCoord 2, 5
ld bc, $509 ld bc, $509 ; 5 rows, 9 columns
.asm_6784 .outerLoop
push bc push bc
.asm_6785 .innerLoop
ld a, [de] ld a, [de]
ld [hli], a ld [hli], a
inc hl inc hl
inc de inc de
dec c dec c
jr nz, .asm_6785 jr nz, .innerLoop
ld bc, $16 ld bc, SCREEN_WIDTH + 2
add hl, bc add hl, bc
pop bc pop bc
dec b dec b
jr nz, .asm_6784 jr nz, .outerLoop
call PlaceString call PlaceString
ld a, $1 ld a, $1
ld [H_AUTOBGTRANSFERENABLED], a ld [H_AUTOBGTRANSFERENABLED], a
@ -366,7 +370,7 @@ LowerCaseAlphabet: ; 679e (1:679e)
UpperCaseAlphabet: ; 67d6 (1:67d6) UpperCaseAlphabet: ; 67d6 (1:67d6)
db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥lower case@" db "ABCDEFGHIJKLMNOPQRSTUVWXYZ ×():;[]",$e1,$e2,"-?!♂♀/",$f2,",¥lower case@"
Func_680e: ; 680e (1:680e) PrintNicknameAndUnderscores: ; 680e (1:680e)
call CalcStringLength call CalcStringLength
ld a, c ld a, c
ld [wHPBarMaxHP], a ld [wHPBarMaxHP], a
@ -379,46 +383,48 @@ Func_680e: ; 680e (1:680e)
hlCoord 10, 3 hlCoord 10, 3
ld a, [wNamingScreenType] ld a, [wNamingScreenType]
cp NAME_MON_SCREEN cp NAME_MON_SCREEN
jr nc, .asm_6835 jr nc, .pokemon1
ld b, $7 ld b, 7 ; player or rival max name length
jr .asm_6837 jr .playerOrRival1
.asm_6835 .pokemon1
ld b, $a ld b, 10 ; pokemon max name length
.asm_6837 .playerOrRival1
ld a, $76 ld a, $76 ; underscore tile id
.asm_6839 .placeUnderscoreLoop
ld [hli], a ld [hli], a
dec b dec b
jr nz, .asm_6839 jr nz, .placeUnderscoreLoop
ld a, [wNamingScreenType] ld a, [wNamingScreenType]
cp NAME_MON_SCREEN cp NAME_MON_SCREEN
ld a, [wHPBarMaxHP] ld a, [wHPBarMaxHP]
jr nc, .asm_684b jr nc, .pokemon2
cp $7 cp 7 ; player or rival max name length
jr .asm_684d jr .playerOrRival2
.asm_684b .pokemon2
cp $a cp 10 ; pokemon max name length
.asm_684d .playerOrRival2
jr nz, .asm_6867 jr nz, .emptySpacesRemaining
; when all spaces are filled, force the cursor onto the ED tile
call EraseMenuCursor call EraseMenuCursor
ld a, $11 ld a, $11 ; "ED" x coord
ld [wTopMenuItemX], a ld [wTopMenuItemX], a
ld a, $5 ld a, $5 ; "ED" y corrd
ld [wCurrentMenuItem], a ld [wCurrentMenuItem], a
ld a, [wNamingScreenType] ld a, [wNamingScreenType]
cp NAME_MON_SCREEN cp NAME_MON_SCREEN
ld a, $9 ld a, 9 ; keep the last underscore raised
jr nc, .asm_6867 jr nc, .pokemon3
ld a, $6 ld a, 6 ; keep the last underscore raised
.asm_6867 .pokemon3
.emptySpacesRemaining
ld c, a ld c, a
ld b, $0 ld b, $0
hlCoord 10, 3 hlCoord 10, 3
add hl, bc add hl, bc
ld [hl], $77 ld [hl], $77 ; raised underscore tile id
ret ret
Func_6871: ; 6871 (1:6871) DakutensAndHandakutens: ; 6871 (1:6871)
push de push de
call CalcStringLength call CalcStringLength
dec hl dec hl
@ -452,13 +458,13 @@ Handakutens: ; 68d6 (1:68d6)
CalcStringLength: ; 68eb (1:68eb) CalcStringLength: ; 68eb (1:68eb)
ld hl, wcf4b ld hl, wcf4b
ld c, $0 ld c, $0
.asm_68f0 .loop
ld a, [hl] ld a, [hl]
cp $50 cp $50
ret z ret z
inc hl inc hl
inc c inc c
jr .asm_68f0 jr .loop
PrintNamingText: ; 68f8 (1:68f8) PrintNamingText: ; 68f8 (1:68f8)
hlCoord 0, 1 hlCoord 0, 1

View File

@ -554,7 +554,7 @@ ShowPokedexDataInternal: ; 402e2 (10:42e2)
.waitForButtonPress .waitForButtonPress
call JoypadLowSensitivity call JoypadLowSensitivity
ld a,[hJoy5] ld a,[hJoy5]
and a,%00000011 ; A button and B button and a,A_BUTTON | B_BUTTON
jr z,.waitForButtonPress jr z,.waitForButtonPress
pop af pop af
ld [hTilesetType],a ld [hTilesetType],a

View File

@ -576,7 +576,7 @@ TextCommand0A:: ; 1c1d (0:1c1d)
push bc push bc
call Joypad call Joypad
ld a,[hJoyHeld] ld a,[hJoyHeld]
and a,%00000011 ; A and B buttons and a,A_BUTTON | B_BUTTON
jr nz,.skipDelay jr nz,.skipDelay
ld c,30 ld c,30
call DelayFrames call DelayFrames
@ -654,7 +654,7 @@ TextCommand0C:: ; 1c78 (0:1c78)
call Joypad call Joypad
pop de pop de
ld a,[hJoyHeld] ; joypad state ld a,[hJoyHeld] ; joypad state
and a,%00000011 ; is A or B button pressed? and a,A_BUTTON | B_BUTTON
jr nz,.skipDelay ; if so, skip the delay jr nz,.skipDelay ; if so, skip the delay
ld c,10 ld c,10
call DelayFrames call DelayFrames

View File

@ -3461,7 +3461,7 @@ TryPushingBoulder: ; f225 (3:7225)
set 6, [hl] ; indicate that the player has tried pushing set 6, [hl] ; indicate that the player has tried pushing
ret z ; the player must try pushing twice before the boulder will move ret z ; the player must try pushing twice before the boulder will move
ld a, [hJoyHeld] ld a, [hJoyHeld]
and $f0 and D_RIGHT | D_LEFT | D_UP | D_DOWN
ret z ret z
predef CheckForCollisionWhenPushingBoulder predef CheckForCollisionWhenPushingBoulder
ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult] ld a, [wTileInFrontOfBoulderAndBoulderCollisionResult]

View File

@ -399,7 +399,8 @@ wSimulatedJoypadStatesEnd:: ; ccd3
; overloaded with below labels ; overloaded with below labels
wccd3:: ds 1 ; used in battle, pokemon, PC and game corner stuff wccd3:: ds 1 ; used in battle, pokemon, PC and game corner stuff
wccd4:: ds 1 ; used in evolving pokemon and has a direct reference for simulated joypad stuff in vermillion and seafoam wForceEvolution::
wccd4:: ds 1 ; has a direct reference for simulated joypad stuff in vermillion and seafoam
; if [ccd5] != 1, the second AI layer is not applied ; if [ccd5] != 1, the second AI layer is not applied
wAILayer2Encouragement:: ; ccd5 wAILayer2Encouragement:: ; ccd5