Reverted ld_hl_pointer macro

This commit is contained in:
PikalaxALT
2015-07-20 22:18:18 -04:00
parent d1e11f77e5
commit 471492b775
60 changed files with 1538 additions and 1079 deletions

View File

@@ -158,12 +158,9 @@ PlayCryHeader:: ; 3be3
ld [MBC3RomBank], a
ld hl, CryHeaders
rept 6
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
add hl, de
endr
ld e, [hl]
inc hl

View File

@@ -153,8 +153,9 @@ GetBattleVarAddr:: ; 39e7
ld hl, .battlevarpairs
ld c, a
ld b, 0
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
@@ -174,8 +175,9 @@ GetBattleVarAddr:: ; 39e7
ld b, 0
ld hl, .vars
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]

View File

@@ -195,8 +195,9 @@ FarCopyBytesDouble:: ; e9b
.loop
ld a, [de]
inc de
rept 2
ld [hli], a
ld [hli], a
endr
.dec
dec c
jr nz, .loop
@@ -406,9 +407,9 @@ Copy1bpp:: ; fa4
push af
ld h, 0
ld l, c
rept 3
add hl, hl
add hl, hl
add hl, hl
endr
ld b, h
ld c, l
pop af

View File

@@ -66,12 +66,9 @@ LoadCryHeader:: ; 37f3
rst Bankswitch
ld hl, CryHeaders
rept 6
add hl, bc
add hl, bc
add hl, bc
add hl, bc
add hl, bc
add hl, bc
endr
ld e, [hl]
inc hl

View File

@@ -42,8 +42,9 @@ Joypad:: ; 935
ld a, D_PAD
ld [rJOYP], a
; Read twice to give the request time to take.
rept 2
ld a, [rJOYP]
ld a, [rJOYP]
endr
; The Joypad register output is in the lo nybble (inversed).
; We make the hi nybble of our new container d-pad input.
@@ -59,12 +60,9 @@ Joypad:: ; 935
ld a, BUTTONS
ld [rJOYP], a
; Wait for input to stabilize.
rept 6
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
ld a, [rJOYP]
endr
; Buttons take the lo nybble.
cpl
and $f
@@ -211,8 +209,9 @@ GetJoypad:: ; 984
jr nz, .next
; The current input is overwritten.
rept 2
dec hl
dec hl
endr
ld b, NO_INPUT
jr .finishauto

View File

@@ -303,8 +303,9 @@ Function2266:: ; 2266
; 22a3
Function22a3:: ; 22a3
rept 2
inc hl
inc hl
endr
scf
ret
; 22a7
@@ -420,8 +421,9 @@ Function2336:: ; 2336
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
call Function23da
call Function23f1
call Function2408
@@ -672,9 +674,9 @@ RestoreFacingAfterWarp:: ; 248a
ld a, [hli]
ld h, [hl]
ld l, a
rept 3
inc hl
inc hl
inc hl
endr
ld a, [WarpNumber]
dec a
ld c, a
@@ -730,9 +732,9 @@ ChangeMap:: ; 24e4
ld [hConnectionStripLength], a
ld c, a
ld b, 0
rept 3
add hl, bc
add hl, bc
add hl, bc
endr
ld c, 3
add hl, bc
ld a, [MapBlockDataBank]
@@ -1324,8 +1326,9 @@ Function27d3:: ; 27d3
ld a, d
ld [hli], a
ld a, e
rept 2
inc a
inc a
endr
and $1f
ld b, a
ld a, e
@@ -1764,8 +1767,9 @@ endr
.nocarry
rr e
jr nc, .nocarry2
rept 2
inc hl
inc hl
endr
.nocarry2
ld a, [TilesetCollisionBank]
@@ -2062,8 +2066,9 @@ GetAnyMapHeaderPointer:: ; 0x2bed
ld c, b
ld b, 0
ld hl, MapGroupPointers
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]

View File

@@ -28,8 +28,9 @@ Function180e:: ; 180e
.loop
cp [hl]
jr z, .found
rept 2
inc hl
inc hl
endr
dec c
jr nz, .loop
ld a, [UsedSprites + 1]
@@ -511,8 +512,9 @@ rept OBJECT_STRUCT_3_DATA_WIDTH
endr
ld a, BANK(ObjectStruct3_Data)
call GetFarByte
rept 2
add a
add a
endr
and $c
pop de
pop bc

View File

@@ -111,8 +111,9 @@ Function1db8:: ; 0x1db8
ld a, [hli]
ld h, [hl]
ld l, a
rept 2
inc hl
inc hl
endr
pop af
call GetNthString
ld d, h
@@ -439,8 +440,9 @@ Function1f8d:: ; 1f8d
push de
ld a, [MenuSelection]
call Function1fb1
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld d, [hl]
ld e, a
@@ -451,8 +453,9 @@ Function1f8d:: ; 1f8d
Function1f9e:: ; 1f9e
call Function1fb1
rept 2
inc hl
inc hl
endr
ld a, [hli]
ld d, [hl]
ld e, a
@@ -475,10 +478,9 @@ Function1fb1:: ; 1fb1
ld a, [hli]
ld h, [hl]
ld l, a
rept 4
add hl, de
add hl, de
add hl, de
add hl, de
endr
ret
; 1fbf
@@ -497,8 +499,9 @@ Function1fbf:: ; 1fbf
ld [rSVBK], a
xor a
ld hl, $dfff
rept 2
ld [hld], a
ld [hld], a
endr
ld a, l
ld [wcf71], a
ld a, h

View File

@@ -102,8 +102,9 @@ Function1b92:: ; 1b92
push hl
ld l, b
ld h, 0
rept 2
add hl, hl
add hl, hl
endr
ld e, a
ld d, 0
add hl, de
@@ -131,12 +132,13 @@ Function1bb1:: ; 1bb1
dec b
jr nz, .asm_1bb8
ld a, $1
rept 2
ld [hli], a
ld [hli], a
endr
xor a
rept 3
ld [hli], a
ld [hli], a
ld [hli], a
endr
pop bc
pop hl
ret

View File

@@ -126,10 +126,12 @@ TextBoxPalette:: ; 1024
; Fill text box width c height b at hl with pal 7
ld de, AttrMap - TileMap
add hl, de
rept 2
inc b
inc b
inc c
endr
rept 2
inc c
endr
ld a, TEXTBOX_PAL
.col
push bc
@@ -626,10 +628,12 @@ Function138c:: ; 138c
inc de
dec c
jr nz, .row
rept 2
inc de
inc de
inc hl
endr
rept 2
inc hl
endr
pop af
dec a
jr nz, .col
@@ -719,8 +723,9 @@ Function13f6:: ; 13f6
ld c, a
ld b, 0
ld hl, TextCommands
rept 2
add hl, bc
add hl, bc
endr
ld e, [hl]
inc hl
ld d, [hl]
@@ -992,8 +997,9 @@ Text_PlaySound:: ; 1500
jr z, .done
cp b
jr z, .play
rept 2
inc hl
inc hl
endr
jr .loop
.play
@@ -1088,8 +1094,9 @@ Text_14:: ; 156a
ld e, a
ld d, 0
ld hl, Unknown_24000
rept 2
add hl, de
add hl, de
endr
ld a, BANK(Unknown_24000)
call GetFarHalfword
ld d, h
@@ -1110,8 +1117,9 @@ Text_15:: ; 1582
ld c, a
ld b, 0
ld hl, .Days
rept 2
add hl, bc
add hl, bc
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@@ -175,11 +175,13 @@ GetTileCoord:: ; 1d05
ld a, c
ld b, h
ld c, l
rept 2
add hl, hl
add hl, hl
endr
add hl, bc
rept 2
add hl, hl
add hl, hl
endr
ld c, a
xor a
ld b, a
@@ -203,11 +205,13 @@ GetAttrCoord:: ; 1d21
ld a, c
ld b, h
ld c, l
rept 2
add hl, hl
add hl, hl
endr
add hl, bc
rept 2
add hl, hl
add hl, hl
endr
ld c, a
xor a
ld b, a

View File

@@ -19,8 +19,9 @@ VBlank:: ; 283
ld e, a
ld d, 0
ld hl, .VBlanks
rept 2
add hl, de
add hl, de
endr
ld a, [hli]
ld h, [hl]
ld l, a

View File

@@ -77,8 +77,9 @@ endr
; We've done 2 16x8 blocks
ld a, [$ffdc]
rept 2
dec a
dec a
endr
ld [$ffdc], a
jr nz, .next