mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-06 23:55:24 +13:00
Specify the ldh instruction, don't turn ld into ldh
This commit is contained in:
parent
c480632d54
commit
772fcc7588
219 changed files with 2556 additions and 2556 deletions
|
|
@ -2,11 +2,11 @@ InitPlayerData:
|
|||
InitPlayerData2:
|
||||
|
||||
call Random
|
||||
ld a, [hRandomSub]
|
||||
ldh a, [hRandomSub]
|
||||
ld [wPlayerID], a
|
||||
|
||||
call Random
|
||||
ld a, [hRandomAdd]
|
||||
ldh a, [hRandomAdd]
|
||||
ld [wPlayerID + 1], a
|
||||
|
||||
ld a, $ff
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ OakSpeech:
|
|||
ld [wDestinationMap], a
|
||||
call SpecialWarpIn
|
||||
xor a
|
||||
ld [hTilesetType], a
|
||||
ldh [hTilesetType], a
|
||||
ld a, [wd732]
|
||||
bit 1, a ; possibly a debug mode bit
|
||||
jp nz, .skipChoosingNames
|
||||
|
|
@ -104,12 +104,12 @@ OakSpeech:
|
|||
ld hl, OakSpeechText3
|
||||
call PrintText
|
||||
.next
|
||||
ld a, [hLoadedROMBank]
|
||||
ldh a, [hLoadedROMBank]
|
||||
push af
|
||||
ld a, SFX_SHRINK
|
||||
call PlaySound
|
||||
pop af
|
||||
ld [hLoadedROMBank], a
|
||||
ldh [hLoadedROMBank], a
|
||||
ld [MBC1RomBank], a
|
||||
ld c, 4
|
||||
call DelayFrames
|
||||
|
|
@ -126,7 +126,7 @@ OakSpeech:
|
|||
lb bc, BANK(ShrinkPic2), $00
|
||||
call IntroDisplayPicCenteredOrUpperRight
|
||||
call ResetPlayerSpriteData
|
||||
ld a, [hLoadedROMBank]
|
||||
ldh a, [hLoadedROMBank]
|
||||
push af
|
||||
ld a, BANK(Music_PalletTown)
|
||||
ld [wAudioROMBank], a
|
||||
|
|
@ -137,7 +137,7 @@ OakSpeech:
|
|||
ld [wNewSoundID], a
|
||||
call PlaySound
|
||||
pop af
|
||||
ld [hLoadedROMBank], a
|
||||
ldh [hLoadedROMBank], a
|
||||
ld [MBC1RomBank], a
|
||||
ld c, 20
|
||||
call DelayFrames
|
||||
|
|
@ -175,7 +175,7 @@ FadeInIntroPic:
|
|||
ld b, 6
|
||||
.next
|
||||
ld a, [hli]
|
||||
ld [rBGP], a
|
||||
ldh [rBGP], a
|
||||
ld c, 10
|
||||
call DelayFrames
|
||||
dec b
|
||||
|
|
@ -192,18 +192,18 @@ IntroFadePalettes:
|
|||
|
||||
MovePicLeft:
|
||||
ld a, 119
|
||||
ld [rWX], a
|
||||
ldh [rWX], a
|
||||
call DelayFrame
|
||||
|
||||
ld a, %11100100
|
||||
ld [rBGP], a
|
||||
ldh [rBGP], a
|
||||
.next
|
||||
call DelayFrame
|
||||
ld a, [rWX]
|
||||
ldh a, [rWX]
|
||||
sub 8
|
||||
cp $FF
|
||||
ret z
|
||||
ld [rWX], a
|
||||
ldh [rWX], a
|
||||
jr .next
|
||||
|
||||
DisplayPicCenteredOrUpperRight:
|
||||
|
|
@ -229,5 +229,5 @@ IntroDisplayPicCenteredOrUpperRight:
|
|||
coord hl, 6, 4
|
||||
.next
|
||||
xor a
|
||||
ld [hStartTileID], a
|
||||
ldh [hStartTileID], a
|
||||
predef_jump CopyUncompressedPicToTilemap
|
||||
|
|
|
|||
|
|
@ -90,13 +90,13 @@ OakSpeechSlidePicCommon:
|
|||
push hl
|
||||
push de
|
||||
push bc
|
||||
ld [hSlideDirection], a
|
||||
ldh [hSlideDirection], a
|
||||
ld a, d
|
||||
ld [hSlideAmount], a
|
||||
ldh [hSlideAmount], a
|
||||
ld a, e
|
||||
ld [hSlidingRegionSize], a
|
||||
ldh [hSlidingRegionSize], a
|
||||
ld c, a
|
||||
ld a, [hSlideDirection]
|
||||
ldh a, [hSlideDirection]
|
||||
and a
|
||||
jr nz, .next
|
||||
; If sliding right, point hl to the end of the pic's tiles.
|
||||
|
|
@ -107,8 +107,8 @@ OakSpeechSlidePicCommon:
|
|||
ld e, l
|
||||
.loop
|
||||
xor a
|
||||
ld [hAutoBGTransferEnabled], a
|
||||
ld a, [hSlideDirection]
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
ldh a, [hSlideDirection]
|
||||
and a
|
||||
jr nz, .slideLeft
|
||||
; sliding right
|
||||
|
|
@ -123,7 +123,7 @@ OakSpeechSlidePicCommon:
|
|||
.next2
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ld a, [hSlideDirection]
|
||||
ldh a, [hSlideDirection]
|
||||
and a
|
||||
jr z, .next3
|
||||
; If sliding left, we need to zero the last tile in the pic (there is no need
|
||||
|
|
@ -134,13 +134,13 @@ OakSpeechSlidePicCommon:
|
|||
ld [hl], a
|
||||
.next3
|
||||
ld a, 1
|
||||
ld [hAutoBGTransferEnabled], a
|
||||
ldh [hAutoBGTransferEnabled], a
|
||||
call Delay3
|
||||
ld a, [hSlidingRegionSize]
|
||||
ldh a, [hSlidingRegionSize]
|
||||
ld c, a
|
||||
ld h, d
|
||||
ld l, e
|
||||
ld a, [hSlideDirection]
|
||||
ldh a, [hSlideDirection]
|
||||
and a
|
||||
jr nz, .slideLeft2
|
||||
inc hl
|
||||
|
|
@ -150,9 +150,9 @@ OakSpeechSlidePicCommon:
|
|||
.next4
|
||||
ld d, h
|
||||
ld e, l
|
||||
ld a, [hSlideAmount]
|
||||
ldh a, [hSlideAmount]
|
||||
dec a
|
||||
ld [hSlideAmount], a
|
||||
ldh [hSlideAmount], a
|
||||
jr nz, .loop
|
||||
pop bc
|
||||
pop de
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue