mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-01-23 09:16:20 -08:00
condense some repetitive asm with rept macros
This commit is contained in:
parent
cc98fab33e
commit
64a6af4052
95
main.asm
95
main.asm
@ -421,51 +421,13 @@ UpdateBGMap: ; 164c
|
|||||||
|
|
||||||
.row
|
.row
|
||||||
; write a row of 20 tiles
|
; write a row of 20 tiles
|
||||||
|
rept 9
|
||||||
pop de
|
pop de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc l
|
inc l
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
inc l
|
inc l
|
||||||
pop de
|
endr
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
pop de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc l
|
inc l
|
||||||
@ -528,6 +490,8 @@ GetTiles2: ; 1717
|
|||||||
|
|
||||||
.loop
|
.loop
|
||||||
; put 1 tile (16 bytes) into hl from sp
|
; put 1 tile (16 bytes) into hl from sp
|
||||||
|
|
||||||
|
rept 3
|
||||||
pop de
|
pop de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc l
|
inc l
|
||||||
@ -537,24 +501,7 @@ GetTiles2: ; 1717
|
|||||||
inc l
|
inc l
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
inc l
|
inc l
|
||||||
pop de
|
endr
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
pop de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc l
|
inc l
|
||||||
@ -639,41 +586,13 @@ GetTiles: ; 177d
|
|||||||
|
|
||||||
.loop
|
.loop
|
||||||
; put 1 tile (16 bytes) into hl from sp
|
; put 1 tile (16 bytes) into hl from sp
|
||||||
|
rept 7
|
||||||
pop de
|
pop de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc l
|
inc l
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
inc l
|
inc l
|
||||||
pop de
|
endr
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
|
||||||
ld [hl], e
|
|
||||||
inc l
|
|
||||||
ld [hl], d
|
|
||||||
inc l
|
|
||||||
pop de
|
pop de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc l
|
inc l
|
||||||
|
Loading…
x
Reference in New Issue
Block a user