diff options
-rw-r--r-- | constants.asm | 2 | ||||
-rw-r--r-- | constants/misc_constants.asm | 2 | ||||
-rw-r--r-- | constants/wram_constants.asm | 10 | ||||
-rw-r--r-- | engine/battle/wild_encounters.asm | 4 | ||||
-rwxr-xr-x | main.asm | 4 | ||||
-rwxr-xr-x | wram.asm | 40 |
6 files changed, 44 insertions, 18 deletions
diff --git a/constants.asm b/constants.asm index 3b2d8437..090799f9 100644 --- a/constants.asm +++ b/constants.asm @@ -7,8 +7,6 @@ INCLUDE "constants/hardware_constants.asm" INCLUDE "constants/oam_constants.asm" INCLUDE "constants/misc_constants.asm" -INCLUDE "constants/wram_constants.asm" - INCLUDE "constants/pokemon_constants.asm" INCLUDE "constants/pokedex_constants.asm" INCLUDE "constants/trainer_constants.asm" diff --git a/constants/misc_constants.asm b/constants/misc_constants.asm index c9240ad7..de777c5d 100644 --- a/constants/misc_constants.asm +++ b/constants/misc_constants.asm @@ -38,6 +38,8 @@ SCREEN_HEIGHT_PIXELS EQU SCREEN_HEIGHT * 8 BG_MAP_WIDTH EQU 32 BG_MAP_HEIGHT EQU 32 +SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile) + NPC_MOVEMENT_DOWN EQU $00 NPC_MOVEMENT_UP EQU $40 NPC_MOVEMENT_LEFT EQU $80 diff --git a/constants/wram_constants.asm b/constants/wram_constants.asm deleted file mode 100644 index b6939a3e..00000000 --- a/constants/wram_constants.asm +++ /dev/null @@ -1,10 +0,0 @@ - -SPRITEBUFFERSIZE EQU 7*7 * 8 ; 7 * 7 (tiles) * 8 (bytes per tile) - -; Overload wGrassMons -wSerialEnemyDataBlock EQU $d893 ; wGrassMons + 11 - -; Overload enemy party data -W_WATERRATE EQU $d8a4 ; wEnemyMon1Species -W_WATERMONS EQU $d8a5 ; wEnemyMon1Species + 1 - diff --git a/engine/battle/wild_encounters.asm b/engine/battle/wild_encounters.asm index 5e553129..044f7ea5 100644 --- a/engine/battle/wild_encounters.asm +++ b/engine/battle/wild_encounters.asm @@ -33,7 +33,7 @@ TryDoWildEncounter: ; 13870 (4:7870) jr z, .CanEncounter ld a, $14 ; in all tilesets with a water tile, this is its id cp c - ld a, [W_WATERRATE] + ld a, [wWaterRate] jr z, .CanEncounter ; even if not in grass/water, standing anywhere we can encounter pokemon ; so long as the map is "indoor" and has wild pokemon defined. @@ -67,7 +67,7 @@ TryDoWildEncounter: ; 13870 (4:7870) aCoord 8, 9 cp $14 ; is the bottom left tile (8,9) of the half-block we're standing in a water tile? jr nz, .gotWildEncounterType ; else, it's treated as a grass tile by default - ld hl, W_WATERMONS + ld hl, wWaterMons ; since the bottom right tile of a "left shore" half-block is $14 but the bottom left tile is not, ; "left shore" half-blocks (such as the one in the east coast of Cinnabar) load grass encounters. .gotWildEncounterType @@ -2967,10 +2967,10 @@ LoadWildData: ; ceb8 (3:4eb8) add hl,bc .NoGrassData ld a,[hli] - ld [W_WATERRATE],a + ld [wWaterRate],a and a ret z ; if no water data, we're done - ld de,W_WATERMONS ; otherwise, load surfing data + ld de,wWaterMons ; otherwise, load surfing data ld bc,$0014 jp CopyData @@ -3062,13 +3062,49 @@ wGrassRate:: ; d887 ds 1 wGrassMons:: ; d888 - ds 20 + ;ds 20 + + ds 11 +; Overload wGrassMons +wSerialEnemyDataBlock:: ; d893 + ds 9 wEnemyPartyCount:: ds 1 ; d89c wEnemyPartyMons:: ds PARTY_LENGTH + 1 ; d89d wEnemyMons:: ; d8a4 -wEnemyMon1:: party_struct wEnemyMon1 +wEnemyMon1:: +wEnemyMon1Species:: + +; Overload enemy party data +wWaterRate:: db ; d8a4 +wWaterMons:: ; d8a5 + +wEnemyMon1HP:: dw +wEnemyMon1BoxLevel:: db +wEnemyMon1Status:: db +wEnemyMon1Type:: +wEnemyMon1Type1:: db +wEnemyMon1Type2:: db +wEnemyMon1CatchRate:: db +wEnemyMon1Moves:: ds NUM_MOVES +wEnemyMon1OTID:: dw +wEnemyMon1Exp:: ds 3 +wEnemyMon1HPExp:: dw +wEnemyMon1AttackExp:: dw +wEnemyMon1DefenseExp:: dw +wEnemyMon1SpeedExp:: dw +wEnemyMon1SpecialExp:: dw +wEnemyMon1DVs:: ds 2 +wEnemyMon1PP:: ds NUM_MOVES +wEnemyMon1Level:: db +wEnemyMon1Stats:: +wEnemyMon1MaxHP:: dw +wEnemyMon1Attack:: dw +wEnemyMon1Defense:: dw +wEnemyMon1Speed:: dw +wEnemyMon1Special:: dw + wEnemyMon2:: party_struct wEnemyMon2 wEnemyMon3:: party_struct wEnemyMon3 wEnemyMon4:: party_struct wEnemyMon4 |