mirror of
https://github.com/pret/pokered.git
synced 2024-10-23 06:58:24 +00:00
b29e5ee203
Top level text/ is now solely for the former text/maps/ files, and other files are in their respective subdirectories in data/.
33 lines
652 B
NASM
33 lines
652 B
NASM
LoadWildData::
|
|
ld hl, WildDataPointers
|
|
ld a, [wCurMap]
|
|
|
|
; get wild data for current map
|
|
ld c, a
|
|
ld b, 0
|
|
add hl, bc
|
|
add hl, bc
|
|
ld a, [hli]
|
|
ld h, [hl]
|
|
ld l, a ; hl now points to wild data for current map
|
|
ld a, [hli]
|
|
ld [wGrassRate], a
|
|
and a
|
|
jr z, .NoGrassData ; if no grass data, skip to surfing data
|
|
push hl
|
|
ld de, wGrassMons ; otherwise, load grass data
|
|
ld bc, $0014
|
|
call CopyData
|
|
pop hl
|
|
ld bc, $0014
|
|
add hl, bc
|
|
.NoGrassData
|
|
ld a, [hli]
|
|
ld [wWaterRate], a
|
|
and a
|
|
ret z ; if no water data, we're done
|
|
ld de, wWaterMons ; otherwise, load surfing data
|
|
ld bc, $0014
|
|
jp CopyData
|
|
|
|
INCLUDE "data/wild/grass_water.asm"
|