Specify the ldh instruction, don't turn ld into ldh

This commit is contained in:
Rangi 2020-07-06 19:03:05 -04:00
parent c480632d54
commit 772fcc7588
219 changed files with 2556 additions and 2556 deletions

View file

@ -24,7 +24,7 @@ PrintBookshelfText::
pop af
call PrintPredefTextID
xor a
ld [hFFDB], a
ldh [hFFDB], a
ret
.nextBookshelfEntry1
inc hl
@ -33,7 +33,7 @@ PrintBookshelfText::
jr .loop
.noMatch
ld a, $ff
ld [hFFDB], a
ldh [hFFDB], a
jpba PrintCardKeyText
INCLUDE "data/tilesets/bookshelf_tile_ids.asm"

View file

@ -12,14 +12,14 @@ CinnabarGymQuiz::
ld a, [wHiddenObjectFunctionArgument]
push af
and $f
ld [hGymGateIndex], a
ldh [hGymGateIndex], a
pop af
and $f0
swap a
ld [hGymGateAnswer], a
ldh [hGymGateAnswer], a
ld hl, CinnabarGymQuizIntroText
call PrintText
ld a, [hGymGateIndex]
ldh a, [hGymGateIndex]
dec a
add a
ld d, 0
@ -77,18 +77,18 @@ CinnabarGymGateFlagAction:
CinnabarGymQuiz_1ea92:
call YesNoChoice
ld a, [hGymGateAnswer]
ldh a, [hGymGateAnswer]
ld c, a
ld a, [wCurrentMenuItem]
cp c
jr nz, .wrongAnswer
ld hl, wCurrentMapScriptFlags
set 5, [hl]
ld a, [hGymGateIndex]
ld [hBackupGymGateIndex], a
ldh a, [hGymGateIndex]
ldh [hBackupGymGateIndex], a
ld hl, CinnabarGymQuizCorrectText
call PrintText
ld a, [hBackupGymGateIndex]
ldh a, [hBackupGymGateIndex]
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
ld c, a
ld b, FLAG_SET
@ -101,7 +101,7 @@ CinnabarGymQuiz_1ea92:
call WaitForSoundToFinish
ld hl, CinnabarGymQuizIncorrectText
call PrintText
ld a, [hGymGateIndex]
ldh a, [hGymGateIndex]
add $2
AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
ld c, a
@ -111,7 +111,7 @@ CinnabarGymQuiz_1ea92:
ld a, c
and a
ret nz
ld a, [hGymGateIndex]
ldh a, [hGymGateIndex]
add $2
ld [wOpponentAfterWrongAnswer], a
ret
@ -122,7 +122,7 @@ CinnabarGymQuizCorrectText:
text_promptbutton
text_asm
ld a, [hBackupGymGateIndex]
ldh a, [hBackupGymGateIndex]
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
ld c, a
ld b, FLAG_TEST
@ -144,9 +144,9 @@ UpdateCinnabarGymGateTileBlocks_::
; Update the overworld map with open floor blocks or locked gate blocks
; depending on event flags.
ld a, 6
ld [hGymGateIndex], a
ldh [hGymGateIndex], a
.loop
ld a, [hGymGateIndex]
ldh a, [hGymGateIndex]
dec a
add a
add a
@ -161,8 +161,8 @@ UpdateCinnabarGymGateTileBlocks_::
ld a, [hl]
ld [wGymGateTileBlock], a
push bc
ld a, [hGymGateIndex]
ld [hBackupGymGateIndex], a
ldh a, [hGymGateIndex]
ldh [hBackupGymGateIndex], a
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
ld c, a
ld b, FLAG_TEST

View file

@ -26,10 +26,10 @@ DisplayMonFrontSpriteInBox:
; Displays a pokemon's front sprite in a pop-up window.
; [wcf91] = pokemon internal id number
ld a, 1
ld [hAutoBGTransferEnabled], a
ldh [hAutoBGTransferEnabled], a
call Delay3
xor a
ld [hWY], a
ldh [hWY], a
call SaveScreenTilesToBuffer1
ld a, MON_SPRITE_POPUP
ld [wTextBoxID], a
@ -41,12 +41,12 @@ DisplayMonFrontSpriteInBox:
ld de, vChars1 + $310
call LoadMonFrontSprite
ld a, $80
ld [hStartTileID], a
ldh [hStartTileID], a
coord hl, 10, 11
predef AnimateSendingOutMon
call WaitForTextScrollButtonPress
call LoadScreenTilesFromBuffer1
call Delay3
ld a, $90
ld [hWY], a
ldh [hWY], a
ret

View file

@ -37,12 +37,12 @@ SafariZoneGameOver:
cp SFX_SAFARI_ZONE_PA
jr nz, .waitForMusicToPlay
ld a, TEXT_SAFARI_GAME_OVER
ld [hSpriteIndexOrTextID], a
ldh [hSpriteIndexOrTextID], a
call DisplayTextID
xor a
ld [wPlayerMovingDirection], a
ld a, SAFARI_ZONE_GATE
ld [hWarpDestinationMap], a
ldh [hWarpDestinationMap], a
ld a, $3
ld [wDestinationWarpID], a
ld a, $5

View file

@ -8,15 +8,15 @@ TownMapText::
set 6, [hl]
call GBPalWhiteOutWithDelay3
xor a
ld [hWY], a
ldh [hWY], a
inc a
ld [hAutoBGTransferEnabled], a
ldh [hAutoBGTransferEnabled], a
call LoadFontTilePatterns
callba DisplayTownMap
ld hl, wd730
res 6, [hl]
ld de, TextScriptEnd
push de
ld a, [hLoadedROMBank]
ldh a, [hLoadedROMBank]
push af
jp CloseTextDisplay

View file

@ -56,12 +56,12 @@ GymTrashScript:
; first lock was in trash can 1 or 3. However, due to this bug, trash can 0 can
; have the second lock regardless of which trash can had the first lock.
ld [hGymTrashCanRandNumMask], a
ldh [hGymTrashCanRandNumMask], a
push hl
call Random
swap a
ld b, a
ld a, [hGymTrashCanRandNumMask]
ldh a, [hGymTrashCanRandNumMask]
and b
dec a
pop hl