You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
More splitting of main.asm; remove unneeded rept 2
This commit is contained in:
@@ -153,9 +153,8 @@ GetBattleVarAddr:: ; 39e7
|
||||
ld hl, .battlevarpairs
|
||||
ld c, a
|
||||
ld b, 0
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
@@ -175,9 +174,8 @@ endr
|
||||
ld b, 0
|
||||
|
||||
ld hl, .vars
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
|
||||
@@ -205,9 +205,8 @@ FarCopyBytesDouble:: ; e9b
|
||||
.loop
|
||||
ld a, [de]
|
||||
inc de
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
.dec
|
||||
dec c
|
||||
jr nz, .loop
|
||||
|
||||
@@ -42,9 +42,8 @@ Joypad:: ; 935
|
||||
ld a, R_DPAD
|
||||
ld [rJOYP], a
|
||||
; Read twice to give the request time to take.
|
||||
rept 2
|
||||
ld a, [rJOYP]
|
||||
endr
|
||||
ld a, [rJOYP]
|
||||
|
||||
; The Joypad register output is in the lo nybble (inversed).
|
||||
; We make the hi nybble of our new container d-pad input.
|
||||
@@ -209,9 +208,8 @@ GetJoypad:: ; 984
|
||||
jr nz, .next
|
||||
|
||||
; The current input is overwritten.
|
||||
rept 2
|
||||
dec hl
|
||||
endr
|
||||
dec hl
|
||||
ld b, NO_INPUT
|
||||
jr .finishauto
|
||||
|
||||
|
||||
@@ -28,9 +28,8 @@ GetSpriteVTile:: ; 180e
|
||||
.loop
|
||||
cp [hl]
|
||||
jr z, .found
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ld a, [UsedSprites + 1]
|
||||
@@ -503,9 +502,8 @@ rept SPRITEMOVEDATA_FIELDS
|
||||
endr
|
||||
ld a, BANK(SpriteMovementData)
|
||||
call GetFarByte
|
||||
rept 2
|
||||
add a
|
||||
endr
|
||||
add a
|
||||
and $c
|
||||
pop de
|
||||
pop bc
|
||||
|
||||
@@ -107,9 +107,8 @@ ComputePathToWalkToPlayer:: ; 1b5f
|
||||
push hl
|
||||
ld l, b
|
||||
ld h, 0
|
||||
rept 2
|
||||
add hl, hl
|
||||
endr
|
||||
add hl, hl
|
||||
ld e, a
|
||||
ld d, 0
|
||||
add hl, de
|
||||
@@ -148,9 +147,8 @@ SetMenuAttributes:: ; 1bb1
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ld a, $1
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hli], a
|
||||
xor a
|
||||
rept 3
|
||||
ld [hli], a
|
||||
|
||||
@@ -129,12 +129,10 @@ 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
|
||||
endr
|
||||
rept 2
|
||||
inc b
|
||||
inc c
|
||||
inc c
|
||||
endr
|
||||
ld a, TEXTBOX_PAL
|
||||
.col
|
||||
push bc
|
||||
@@ -640,12 +638,10 @@ TextScroll:: ; 138c
|
||||
dec c
|
||||
jr nz, .row
|
||||
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
rept 2
|
||||
inc de
|
||||
inc hl
|
||||
inc hl
|
||||
endr
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .col
|
||||
@@ -738,9 +734,8 @@ DoTextUntilTerminator:: ; 13f6
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, TextCommands
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld e, [hl]
|
||||
inc hl
|
||||
ld d, [hl]
|
||||
@@ -1014,9 +1009,8 @@ Text_PlaySound:: ; 1500
|
||||
jr z, .done
|
||||
cp b
|
||||
jr z, .play
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
inc hl
|
||||
jr .loop
|
||||
|
||||
.play
|
||||
@@ -1113,9 +1107,8 @@ Text_TX_STRINGBUFFER:: ; 156a
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, StringBufferPointers
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, BANK(StringBufferPointers)
|
||||
call GetFarHalfword
|
||||
ld d, h
|
||||
@@ -1136,9 +1129,8 @@ Text_TX_DAY:: ; 1582
|
||||
ld c, a
|
||||
ld b, 0
|
||||
ld hl, .Days
|
||||
rept 2
|
||||
add hl, bc
|
||||
endr
|
||||
add hl, bc
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
@@ -19,9 +19,8 @@ VBlank:: ; 283
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, .VBlanks
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
add hl, de
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
Reference in New Issue
Block a user