mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-21 14:48:43 +13:00
Add subdirectories to engine/ similar to pokecrystal
This commit is contained in:
parent
5559d51c86
commit
f275790aec
124 changed files with 342 additions and 346 deletions
49
engine/pokemon/load_mon_data.asm
Normal file
49
engine/pokemon/load_mon_data.asm
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
LoadMonData_::
|
||||
; Load monster [wWhichPokemon] from list [wMonDataLocation]:
|
||||
; 0: partymon
|
||||
; 1: enemymon
|
||||
; 2: boxmon
|
||||
; 3: daycaremon
|
||||
; Return monster id at wcf91 and its data at wLoadedMon.
|
||||
; Also load base stats at wMonHeader for convenience.
|
||||
|
||||
ld a, [wDayCareMonSpecies]
|
||||
ld [wcf91], a
|
||||
ld a, [wMonDataLocation]
|
||||
cp DAYCARE_DATA
|
||||
jr z, .GetMonHeader
|
||||
|
||||
ld a, [wWhichPokemon]
|
||||
ld e, a
|
||||
callab GetMonSpecies
|
||||
|
||||
.GetMonHeader
|
||||
ld a, [wcf91]
|
||||
ld [wd0b5], a ; input for GetMonHeader
|
||||
call GetMonHeader
|
||||
|
||||
ld hl, wPartyMons
|
||||
ld bc, wPartyMon2 - wPartyMon1
|
||||
ld a, [wMonDataLocation]
|
||||
cp ENEMY_PARTY_DATA
|
||||
jr c, .getMonEntry
|
||||
|
||||
ld hl, wEnemyMons
|
||||
jr z, .getMonEntry
|
||||
|
||||
cp 2
|
||||
ld hl, wBoxMons
|
||||
ld bc, wBoxMon2 - wBoxMon1
|
||||
jr z, .getMonEntry
|
||||
|
||||
ld hl, wDayCareMon
|
||||
jr .copyMonData
|
||||
|
||||
.getMonEntry
|
||||
ld a, [wWhichPokemon]
|
||||
call AddNTimes
|
||||
|
||||
.copyMonData
|
||||
ld de, wLoadedMon
|
||||
ld bc, wPartyMon2 - wPartyMon1
|
||||
jp CopyData
|
||||
Loading…
Add table
Add a link
Reference in a new issue