mirror of
https://github.com/thornAvery/jep-hack.git
synced 2026-04-06 18:42:09 +12:00
First Commit
Upload literally everything from the pokecrystal16 expand-move-ID branch
This commit is contained in:
commit
2f8a41f833
4618 changed files with 480386 additions and 0 deletions
36
engine/overworld/load_map_part.asm
Normal file
36
engine/overworld/load_map_part.asm
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
_LoadMapPart::
|
||||
ld hl, wSurroundingTiles
|
||||
ld a, [wPlayerMetatileY]
|
||||
and a
|
||||
jr z, .top_row
|
||||
ld bc, SURROUNDING_WIDTH * 2
|
||||
add hl, bc
|
||||
|
||||
.top_row
|
||||
ld a, [wPlayerMetatileX]
|
||||
and a
|
||||
jr z, .left_column
|
||||
inc hl
|
||||
inc hl
|
||||
|
||||
.left_column
|
||||
decoord 0, 0
|
||||
ld b, SCREEN_HEIGHT
|
||||
.loop
|
||||
ld c, SCREEN_WIDTH
|
||||
.loop2
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
dec c
|
||||
jr nz, .loop2
|
||||
ld a, l
|
||||
add METATILE_WIDTH
|
||||
ld l, a
|
||||
jr nc, .carry
|
||||
inc h
|
||||
|
||||
.carry
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
Loading…
Add table
Add a link
Reference in a new issue