Merge branch 'master' of github.com:pret/pokecrystal

This commit is contained in:
surskitty 2017-12-11 17:37:34 -05:00
commit 98128cd4d8
255 changed files with 4844 additions and 4679 deletions

View File

@ -58,7 +58,7 @@ In the installer, select the following packages:
- `gcc-core`
Then download [**rgbds**](https://github.com/rednex/rgbds/releases/).
Extract the archive and put all the `exe` and `dll` files individually in `C:\cygwin64\usr\local\bin`.
Extract rgbds-0.3.3-win64.tar.gz and put all the `exe` and `dll` files individually in **C:\Cygwin64\usr\local\bin**. If you are using 32-bit Windows and Cygwin, extract **rgbds-0.3.3-win32.tar.gz** to **C:\Cygwin\usr\local\bin**.
**Note: If you have an older rgbds, you will need to update to 0.3.3 or newer.** Ignore this if you have never installed rgbds before.

View File

@ -140,8 +140,8 @@ gfx/pics/%/front.animated.tilemap: gfx/pics/%/front.2bpp gfx/pics/%/front.dimens
### Misc file-specific graphics rules
gfx/shrink1.2bpp: rgbgfx += -h
gfx/shrink2.2bpp: rgbgfx += -h
gfx/shrink/shrink1.2bpp: rgbgfx += -h
gfx/shrink/shrink2.2bpp: rgbgfx += -h
gfx/trainers/%.2bpp: rgbgfx += -h
gfx/trainers/%.pal: gfx/trainers/%.gbcpal
@ -153,7 +153,9 @@ gfx/mail/0b9d86.1bpp: tools/gfx += --remove-whitespace
gfx/mail/0b9dc6.1bpp: tools/gfx += --remove-whitespace
gfx/mail/0b9cfe.1bpp: tools/gfx += --remove-whitespace
gfx/pokedex/%.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/pokedex.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/sgb.2bpp: tools/gfx += --trim-whitespace
gfx/pokedex/slowpoke.2bpp: tools/gfx += --trim-whitespace
gfx/title/crystal.2bpp: tools/gfx += --interleave --png=$<
gfx/title/old_fg.2bpp: tools/gfx += --interleave --png=$<
@ -162,10 +164,10 @@ gfx/title/logo.2bpp: rgbgfx += -x 4
gfx/trade/ball.2bpp: tools/gfx += --remove-whitespace
gfx/trade/game_boy_n64.2bpp: tools/gfx += --trim-whitespace
gfx/slots_2.2bpp: tools/gfx += --interleave --png=$<
gfx/slots_3.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip
gfx/slots_3a.2bpp: tools/gfx += --interleave --png=$<
gfx/slots_3b.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip
gfx/slots/slots_2.2bpp: tools/gfx += --interleave --png=$<
gfx/slots/slots_3.2bpp: tools/gfx += --interleave --png=$< --remove-duplicates --keep-whitespace --remove-xflip
gfx/card_flip/card_flip_2.2bpp: tools/gfx += --remove-whitespace
gfx/fx/angels.2bpp: tools/gfx += --trim-whitespace
gfx/fx/beam.2bpp: tools/gfx += --remove-xflip --remove-yflip --remove-whitespace
@ -185,18 +187,21 @@ gfx/fx/rocks.2bpp: tools/gfx += --remove-whitespace
gfx/fx/skyattack.2bpp: tools/gfx += --remove-whitespace
gfx/fx/status.2bpp: tools/gfx += --remove-whitespace
gfx/misc/chris.2bpp: rgbgfx += -h
gfx/misc/chris_card.2bpp: rgbgfx += -h
gfx/misc/kris.2bpp: rgbgfx += -h
gfx/misc/kris_card.2bpp: rgbgfx += -h
gfx/misc/kris_back.2bpp: rgbgfx += -h
gfx/misc/dude.2bpp: rgbgfx += -h
gfx/misc/unknown_egg.2bpp: rgbgfx += -h
gfx/misc/player.2bpp: rgbgfx += -h
gfx/misc/pokegear.2bpp: rgbgfx += -x2
gfx/misc/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
gfx/player/chris.2bpp: rgbgfx += -h
gfx/player/chris_back.2bpp: rgbgfx += -h
gfx/player/kris.2bpp: rgbgfx += -h
gfx/player/kris_back.2bpp: rgbgfx += -h
gfx/trainer_card/chris_card.2bpp: rgbgfx += -h
gfx/trainer_card/kris_card.2bpp: rgbgfx += -h
gfx/battle/dude.2bpp: rgbgfx += -h
gfx/misc/unknown_egg.2bpp: rgbgfx += -h
gfx/pokegear/pokegear.2bpp: rgbgfx += -x2
gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
gfx/unknown/0e0ea8.2bpp: tools/gfx += --remove-whitespace
gfx/unknown/0f8f34.1bpp: tools/gfx += --trim-whitespace
gfx/unknown/16c173.2bpp: tools/gfx += --remove-duplicates --remove-xflip
gfx/unknown/170d16.2bpp: tools/gfx += --trim-whitespace

View File

@ -22,7 +22,7 @@ _MapSetup_Sound_Off:: ; e8000
ld [hli], a ; ff26 ; music channels
ld hl, rNR10 ; sound channel registers
ld e, $4 ; number of channels
ld e, NUM_MUSIC_CHANS
.clearsound
; sound channel 1 2 3 4
xor a
@ -47,7 +47,7 @@ _MapSetup_Sound_Off:: ; e8000
ld a, e
or d
jr nz, .clearchannels
ld a, $77 ; max
ld a, MAX_VOLUME
ld [Volume], a
call MusicOn
pop af
@ -60,15 +60,15 @@ _MapSetup_Sound_Off:: ; e8000
MusicFadeRestart: ; e803d
; restart but keep the music id to fade in to
ld a, [MusicFadeIDHi]
ld a, [MusicFadeID + 1]
push af
ld a, [MusicFadeIDLo]
ld a, [MusicFadeID]
push af
call _MapSetup_Sound_Off
pop af
ld [MusicFadeIDLo], a
ld [MusicFadeID], a
pop af
ld [MusicFadeIDHi], a
ld [MusicFadeID + 1], a
ret
; e8051
@ -151,7 +151,7 @@ _UpdateSound:: ; e805c
jr z, .next
; are we in a sfx channel right now?
ld a, [CurChannel]
cp $4
cp CHAN5
jr nc, .next
; are any sfx channels active?
; if so, mute
@ -174,7 +174,7 @@ _UpdateSound:: ; e805c
.next
; are we in a sfx channel right now?
ld a, [CurChannel]
cp $4 ; sfx
cp CHAN5
jr nc, .sfx_channel
ld hl, Channel5Flags - Channel1
add hl, bc
@ -654,11 +654,11 @@ FadeMusic: ; e8358
; restart sound
call MusicFadeRestart
; get new song id
ld a, [MusicFadeIDLo]
ld a, [MusicFadeID]
and a
jr z, .quit ; this assumes there are fewer than 256 songs!
ld e, a
ld a, [MusicFadeIDHi]
ld a, [MusicFadeID + 1]
ld d, a
; load new song
call _PlayMusic
@ -679,9 +679,9 @@ FadeMusic: ; e8358
xor a
ld [Volume], a
; get new song id
ld a, [MusicFadeIDLo]
ld a, [MusicFadeID]
ld e, a
ld a, [MusicFadeIDHi]
ld a, [MusicFadeID + 1]
ld d, a
; load new song
call _PlayMusic
@ -744,7 +744,7 @@ LoadNote: ; e83d1
sub [hl]
ld e, a
ld a, d
sbc a, 0
sbc 0
ld d, a
ld hl, Channel1PitchWheelTarget + 1 - Channel1
add hl, bc
@ -766,7 +766,7 @@ LoadNote: ; e83d1
sub e
ld e, a
ld a, d
sbc a, 0
sbc 0
ld d, a
; ????
ld hl, Channel1PitchWheelTarget + 1 - Channel1
@ -793,7 +793,7 @@ LoadNote: ; e83d1
sub [hl]
ld e, a
ld a, d
sbc a, 0
sbc 0
ld d, a
ld hl, Channel1PitchWheelTarget + 1 - Channel1
add hl, bc
@ -1021,7 +1021,7 @@ ApplyPitchWheel: ; e84f9
sub e
ld e, a
ld a, d
sbc a, 0
sbc 0
ld d, a
; [Channel*Field0x25] *= 2
; if rollover: Frequency -= 1
@ -1031,10 +1031,10 @@ ApplyPitchWheel: ; e84f9
add a
ld [hl], a
ld a, e
sbc a, 0
sbc 0
ld e, a
ld a, d
sbc a, 0
sbc 0
ld d, a
; Compare the dw at [Channel*PitchWheelTarget] to de.
; If frequency is lower, we're finished.
@ -1223,7 +1223,7 @@ ParseMusic: ; e85e1
bit SOUND_SUBROUTINE, [hl] ; in a subroutine?
jr nz, .readcommand ; execute
ld a, [CurChannel]
cp $4 ; channels 0-3?
cp CHAN5
jr nc, .chan_5to8
; ????
ld hl, Channel5Flags - Channel1
@ -1237,7 +1237,7 @@ ParseMusic: ; e85e1
call nz, RestoreVolume
; end music
ld a, [CurChannel]
cp $4 ; channel 5?
cp CHAN5
jr nz, .ok
; ????
xor a
@ -1266,7 +1266,7 @@ ParseMusic: ; e85e1
RestoreVolume: ; e8679
; ch5 only
ld a, [CurChannel]
cp $4
cp CHAN5
ret nz
xor a
ld hl, Channel6CryPitch
@ -1364,9 +1364,9 @@ GetNoiseSample: ; e86c5
add hl, de
; load sample pointer into NoiseSampleAddress
ld a, [hli]
ld [NoiseSampleAddressLo], a
ld [NoiseSampleAddress], a
ld a, [hl]
ld [NoiseSampleAddressHi], a
ld [NoiseSampleAddress + 1], a
; clear ????
xor a
ld [wNoiseSampleDelay], a
@ -1378,7 +1378,7 @@ ParseMusicCommand: ; e870f
; reload command
ld a, [CurMusicByte]
; get command #
sub a, $d0 ; first command
sub $d0 ; first command
ld e, a
ld d, 0
; seek command pointer
@ -1968,7 +1968,7 @@ Music_NoteType: ; e8963
ld [hl], a
ld a, [CurChannel]
and $3
cp CHAN4 ; CHAN8 & $3
cp CHAN8 & $3
ret z
; intensity
call Music_Intensity
@ -2063,7 +2063,7 @@ Music_StereoPanning: ; e89ba
; params: 1
; stereo on?
ld a, [Options]
bit 5, a ; stereo
bit STEREO, a
jr nz, Music_Panning
; skip param
call GetMusicByte
@ -2160,9 +2160,9 @@ Music_RestartChannel: ; e8a08
ld hl, Channel1MusicID - Channel1
add hl, bc
ld a, [hli]
ld [MusicIDLo], a
ld [MusicID], a
ld a, [hl]
ld [MusicIDHi], a
ld [MusicID + 1], a
; update music bank
ld hl, Channel1MusicBank - Channel1
add hl, bc
@ -2437,7 +2437,7 @@ _PlayMusic:: ; e8b30
ld hl, MusicID
ld [hl], e ; song number
inc hl
ld [hl], d ; MusicIDHi (always $)
ld [hl], d ; (always 0)
ld hl, Music
add hl, de ; three
add hl, de ; byte
@ -2466,8 +2466,8 @@ _PlayMusic:: ; e8b30
ld [Channel2JumpCondition], a
ld [Channel3JumpCondition], a
ld [Channel4JumpCondition], a
ld [NoiseSampleAddressLo], a
ld [NoiseSampleAddressHi], a
ld [NoiseSampleAddress], a
ld [NoiseSampleAddress + 1], a
ld [wNoiseSampleDelay], a
ld [MusicNoiseSampleSet], a
call MusicOn
@ -2552,7 +2552,7 @@ _PlayCryHeader:: ; e8b79
; This only applies in-battle.
ld a, [Options]
bit 5, a ; stereo
bit STEREO, a
jr z, .next
; [Tracks] &= [CryTracks]
@ -2577,7 +2577,7 @@ _PlayCryHeader:: ; e8b79
ld a, [Volume]
ld [LastVolume], a
ld a, $77
ld a, MAX_VOLUME
ld [Volume], a
.end
@ -2647,8 +2647,8 @@ _PlaySFX:: ; e8c04
ld a, $80
ld [rNR44], a ; restart sound (freq hi = 0)
xor a
ld [NoiseSampleAddressLo], a
ld [NoiseSampleAddressHi], a
ld [NoiseSampleAddress], a
ld [NoiseSampleAddress + 1], a
.chscleared
; start reading sfx header for # chs
ld hl, MusicID
@ -2696,7 +2696,7 @@ PlayStereoSFX:: ; e8ca6
; standard procedure if stereo's off
ld a, [Options]
bit 5, a
bit STEREO, a
jp z, _PlaySFX
; else, let's go ahead with this
@ -2825,9 +2825,9 @@ LoadChannel: ; e8d1b
; load music id
ld hl, Channel1MusicID - Channel1
add hl, bc
ld a, [MusicIDLo]
ld a, [MusicID]
ld [hli], a
ld a, [MusicIDHi]
ld a, [MusicID + 1]
ld [hl], a
; load music bank
ld hl, Channel1MusicBank - Channel1
@ -3231,7 +3231,7 @@ GetLRTracks: ; e8fc2
; gets the default sound l/r channels
; stores mono/stereo table in hl
ld a, [Options]
bit 5, a ; stereo
bit STEREO, a
; made redundant, could have had a purpose in gold
jr nz, .stereo
ld hl, MonoTracks
@ -3279,7 +3279,7 @@ ClearChannels:: ; e8fe9
ld a, $80
ld [hli], a
ld hl, rNR10
ld e, $4
ld e, NUM_MUSIC_CHANS
.loop
call ClearChannel
dec e

View File

@ -27,7 +27,7 @@ AI_SwitchOrTryItem: ; 38000
ld a, [TrainerClass]
dec a
ld bc, 7
ld bc, NUM_TRAINER_ATTRIBUTES
call AddNTimes
.ok
bit SWITCH_OFTEN_F, [hl]
@ -174,8 +174,8 @@ AI_TryItem: ; 38105
ld a, [TrainerClass]
dec a
ld hl, TrainerClassAttributes + 5
ld bc, 7
ld hl, TrainerClassAttributes + TRNATTR_AI_ITEM_SWITCH
ld bc, NUM_TRAINER_ATTRIBUTES
call AddNTimes
ld b, h
ld c, l

View File

@ -57,7 +57,7 @@ _PlayBattleAnim: ; cc0e4
BattleAnimRunScript: ; cc11c
ld a, [FXAnimIDHi]
ld a, [FXAnimID + 1]
and a
jr nz, .hi_byte
@ -86,9 +86,9 @@ BattleAnimRunScript: ; cc11c
ld de, ANIM_MISS
add hl, de
ld a, l
ld [FXAnimIDLo], a
ld [FXAnimID], a
ld a, h
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
.hi_byte
call WaitSFX
@ -112,11 +112,11 @@ RunBattleAnimScript: ; cc163
call BattleAnimRequestPals
; Speed up Rollout's animation.
ld a, [FXAnimIDHi]
ld a, [FXAnimID + 1]
or a
jr nz, .not_rollout
ld a, [FXAnimIDLo]
ld a, [FXAnimID]
cp ROLLOUT
jr nz, .not_rollout
@ -1393,7 +1393,7 @@ ClearBattleAnims: ; cc8d3
or b
jr nz, .loop
ld hl, FXAnimIDLo
ld hl, FXAnimID
ld e, [hl]
inc hl
ld d, [hl]

View File

@ -868,7 +868,7 @@ BattleBGEffect_RunPicResizeScript: ; c83ed (32:43ed)
.BGSquares:
bgsquare: MACRO
dn \1,\2
dn \1, \2
dw \3
endm
@ -1538,10 +1538,10 @@ Tackle_BGEffect25_2d_two:
Functionc88a5: ; c88a5 (32:48a5)
push af
ld a, [FXAnimIDHi] ; FXAnimIDHi
ld a, [FXAnimID + 1] ; FXAnimID + 1
or a
jr nz, .not_rollout
ld a, [FXAnimIDLo] ; FXAnimID
ld a, [FXAnimID] ; FXAnimID
cp ROLLOUT
jr z, .rollout
.not_rollout
@ -2581,8 +2581,8 @@ BGEffects_LoadBGPal0_OBPal1: ; c8e52 (32:4e52)
ld a, h
push bc
push af
ld hl, BGPals ; BGPals
ld de, UnknBGPals ; wd000
ld hl, BGPals
ld de, UnknBGPals
ld b, a
ld c, $1
call CopyPals

View File

@ -633,7 +633,7 @@ ParsePlayerAction: ; 3c434
xor a
ld [wMoveSelectionMenuType], a
inc a ; POUND
ld [FXAnimIDLo], a
ld [FXAnimID], a
call MoveSelectionScreen
push af
call Call_LoadTempTileMapToTileMap
@ -1305,7 +1305,7 @@ HandleWrap: ; 3c874
ld a, [de]
ld [wd265], a
ld [FXAnimIDLo], a
ld [FXAnimID], a
call GetMoveName
dec [hl]
jr z, .release_from_bounds
@ -1318,7 +1318,7 @@ HandleWrap: ; 3c874
call SwitchTurnCore
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
predef PlayBattleAnim
call SwitchTurnCore
@ -4213,7 +4213,7 @@ SendOutPlayerMon: ; 3db5f
call GetMonBackpic
xor a
ld [hGraphicStartTile], a
ld [wd0d2], a
ld [wBattleMenuCursorBuffer], a
ld [CurMoveNum], a
ld [TypeModifier], a
ld [wPlayerMoveStruct + MOVE_ANIM], a
@ -4551,11 +4551,11 @@ ItemRecoveryAnim: ; 3ddc8
push bc
call EmptyBattleTextBox
ld a, RECOVER
ld [FXAnimIDLo], a
ld [FXAnimID], a
call SwitchTurnCore
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
predef PlayBattleAnim
call SwitchTurnCore
pop bc
@ -5130,7 +5130,7 @@ BattleMenu: ; 3e139
.next
ld a, $1
ld [hBGMapMode], a
ld a, [wd0d2]
ld a, [wBattleMenuCursorBuffer]
cp $1
jp z, BattleMenu_Fight
cp $3
@ -6267,13 +6267,13 @@ LoadEnemyMon: ; 3e8eb
; 25% chance of getting an item
call BattleRandom
cp a, 1 + (75 percent)
cp 1 + (75 percent)
ld a, NO_ITEM
jr c, .UpdateItem
; From there, an 8% chance for Item2
call BattleRandom
cp a, 8 percent ; 8% of 25% = 2% Item2
cp 8 percent ; 8% of 25% = 2% Item2
ld a, [BaseItems]
jr nc, .UpdateItem
ld a, [BaseItems+1]
@ -6320,7 +6320,7 @@ LoadEnemyMon: ; 3e8eb
; Roaming monsters (Entei, Raikou) work differently
; They have their own structs, which are shorter than normal
ld a, [BattleType]
cp a, BATTLETYPE_ROAMING
cp BATTLETYPE_ROAMING
jr nz, .NotRoaming
; Grab HP
@ -6361,7 +6361,7 @@ LoadEnemyMon: ; 3e8eb
; Forced shiny battle type
; Used by Red Gyarados at Lake of Rage
cp a, BATTLETYPE_SHINY
cp BATTLETYPE_SHINY
jr nz, .GenerateDVs
ld b, ATKDEFDV_SHINY ; $ea
@ -6391,7 +6391,7 @@ LoadEnemyMon: ; 3e8eb
; Unown
ld a, [TempEnemyMonSpecies]
cp a, UNOWN
cp UNOWN
jr nz, .Magikarp
; Get letter based on DVs
@ -6406,7 +6406,7 @@ LoadEnemyMon: ; 3e8eb
; Skimming this part recommended
ld a, [TempEnemyMonSpecies]
cp a, MAGIKARP
cp MAGIKARP
jr nz, .Happiness
; Get Magikarp's length
@ -6415,26 +6415,26 @@ LoadEnemyMon: ; 3e8eb
callab CalcMagikarpLength
; We're clear if the length is < 1536
ld a, [MagikarpLength]
cp a, $06 ; $600 = 1536
ld a, [wMagikarpLength]
cp $06 ; $600 = 1536
jr nz, .CheckMagikarpArea
; 5% chance of skipping size checks
call Random
cp a, $0c ; / $100
cp $0c ; / $100
jr c, .CheckMagikarpArea
; Try again if > 1614
ld a, [MagikarpLength + 1]
cp a, $50
ld a, [wMagikarpLength + 1]
cp $50
jr nc, .GenerateDVs
; 20% chance of skipping this check
call Random
cp a, $32 ; / $100
cp $32 ; / $100
jr c, .CheckMagikarpArea
; Try again if > 1598
ld a, [MagikarpLength + 1]
cp a, $40
ld a, [wMagikarpLength + 1]
cp $40
jr nc, .GenerateDVs
.CheckMagikarpArea:
@ -6448,18 +6448,18 @@ LoadEnemyMon: ; 3e8eb
; Intended behavior enforces a minimum size at Lake of Rage
; The real behavior prevents size flooring in the Lake of Rage area
ld a, [MapGroup]
cp a, GROUP_LAKE_OF_RAGE
cp GROUP_LAKE_OF_RAGE
jr z, .Happiness
ld a, [MapNumber]
cp a, MAP_LAKE_OF_RAGE
cp MAP_LAKE_OF_RAGE
jr z, .Happiness
; 40% chance of not flooring
call Random
cp a, $64 ; / $100
cp $64 ; / $100
jr c, .Happiness
; Floor at length 1024
ld a, [MagikarpLength]
cp a, 1024 >> 8
ld a, [wMagikarpLength]
cp 1024 >> 8
jr c, .GenerateDVs ; try again
; Finally done with DVs
@ -6480,7 +6480,7 @@ LoadEnemyMon: ; 3e8eb
; If we're in a trainer battle,
; get the rest of the parameters from the party struct
ld a, [wBattleMode]
cp a, TRAINER_BATTLE
cp TRAINER_BATTLE
jr z, .OpponentParty
; If we're in a wild battle, check wild-specific stuff
@ -6515,7 +6515,7 @@ LoadEnemyMon: ; 3e8eb
; ..unless it's a RoamMon
ld a, [BattleType]
cp a, BATTLETYPE_ROAMING
cp BATTLETYPE_ROAMING
jr nz, .Moves
; Grab HP
@ -6568,7 +6568,7 @@ LoadEnemyMon: ; 3e8eb
ld de, EnemyMonMoves
; Are we in a trainer battle?
ld a, [wBattleMode]
cp a, TRAINER_BATTLE
cp TRAINER_BATTLE
jr nz, .WildMoves
; Then copy moves from the party struct
ld hl, OTPartyMon1Moves
@ -6588,14 +6588,14 @@ LoadEnemyMon: ; 3e8eb
ld [hli], a
ld [hl], a
; Make sure the predef knows this isn't a partymon
ld [MagikarpLength], a
ld [wEvolutionOldSpecies], a
; Fill moves based on level
predef FillMoves
.PP:
; Trainer battle?
ld a, [wBattleMode]
cp a, TRAINER_BATTLE
cp TRAINER_BATTLE
jr z, .TrainerPP
; Fill wild PP
@ -6670,13 +6670,13 @@ CheckSleepingTreeMon: ; 3eb38
; Don't do anything if this isn't a tree encounter
ld a, [BattleType]
cp a, BATTLETYPE_TREE
cp BATTLETYPE_TREE
jr nz, .NotSleeping
; Get list for the time of day
ld hl, .Morn
ld a, [TimeOfDay]
cp a, DAY
cp DAY
jr c, .Check
ld hl, .Day
jr z, .Check
@ -6759,7 +6759,7 @@ CheckUnownLetter: ; 3eb75
inc e
inc e
ld a, e
cp a, .Set1 - .LetterSets
cp .Set1 - .LetterSets
jr c, .loop
; Hasn't been unlocked, or the letter is invalid
@ -7285,9 +7285,9 @@ Call_PlayBattleAnim_OnlyIfVisible: ; 3ee0f
Call_PlayBattleAnim: ; 3ee17
ld a, e
ld [FXAnimIDLo], a
ld [FXAnimID], a
ld a, d
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
call WaitBGMap
predef_jump PlayBattleAnim
; 3ee27
@ -8405,7 +8405,7 @@ BattleIntro: ; 3f4dd
call LoadTrainerOrWildMonPic
xor a
ld [TempBattleMonSpecies], a
ld [wd0d2], a
ld [wBattleMenuCursorBuffer], a
xor a
ld [hMapAnims], a
callba PlayBattleMusic
@ -8670,7 +8670,7 @@ CleanUpBattleRAM: ; 3f6d0
ld [wPartyMenuCursor], a
ld [wKeyItemsPocketCursor], a
ld [wItemsPocketCursor], a
ld [wd0d2], a
ld [wBattleMenuCursorBuffer], a
ld [CurMoveNum], a
ld [wBallsPocketCursor], a
ld [wLastPocket], a

View File

@ -70,25 +70,25 @@ DoMove: ; 3402c
; Start at the first command.
ld hl, BattleScriptBuffer
ld a, l
ld [BattleScriptBufferLoc], a
ld [BattleScriptBufferAddress], a
ld a, h
ld [BattleScriptBufferLoc + 1], a
ld [BattleScriptBufferAddress + 1], a
.ReadMoveEffectCommand:
; ld a, [BattleScriptBufferLoc++]
ld a, [BattleScriptBufferLoc]
; ld a, [BattleScriptBufferAddress++]
ld a, [BattleScriptBufferAddress]
ld l, a
ld a, [BattleScriptBufferLoc + 1]
ld a, [BattleScriptBufferAddress + 1]
ld h, a
ld a, [hli]
push af
ld a, l
ld [BattleScriptBufferLoc], a
ld [BattleScriptBufferAddress], a
ld a, h
ld [BattleScriptBufferLoc + 1], a
ld [BattleScriptBufferAddress + 1], a
pop af
; endturn_command (-2) is used to terminate branches without ending the read cycle.
@ -2103,7 +2103,7 @@ BattleCommand_LowerSub: ; 34eee
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
inc a
ld [wKickCounter], a
ld a, SUBSTITUTE
@ -2280,7 +2280,7 @@ BattleCommand_RaiseSub: ; 35004
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
ld a, $2
ld [wKickCounter], a
ld a, SUBSTITUTE
@ -2645,7 +2645,7 @@ BattleCommand_CheckDestinyBond: ; 351c0
call BattleCommand_SwitchTurn
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
inc a
ld [wKickCounter], a
ld a, DESTINY_BOND
@ -2743,9 +2743,9 @@ BattleCommand_RageDamage: ; 3527b
EndMoveEffect: ; 352a3
ld a, [BattleScriptBufferLoc]
ld a, [BattleScriptBufferAddress]
ld l, a
ld a, [BattleScriptBufferLoc + 1]
ld a, [BattleScriptBufferAddress + 1]
ld h, a
ld a, $ff
ld [hli], a
@ -4738,9 +4738,9 @@ FarPlayBattleAnimation: ; 35d00
PlayFXAnimID: ; 35d08
ld a, e
ld [FXAnimIDLo], a
ld [FXAnimID], a
ld a, d
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
ld c, 3
call DelayFrames
@ -7097,9 +7097,9 @@ BattleCommand_EndLoop: ; 369b6
; Loop back to the command before 'critical'.
.loop_back_to_critical
ld a, [BattleScriptBufferLoc + 1]
ld a, [BattleScriptBufferAddress + 1]
ld h, a
ld a, [BattleScriptBufferLoc]
ld a, [BattleScriptBufferAddress]
ld l, a
.not_critical
ld a, [hld]
@ -7107,9 +7107,9 @@ BattleCommand_EndLoop: ; 369b6
jr nz, .not_critical
inc hl
ld a, h
ld [BattleScriptBufferLoc + 1], a
ld [BattleScriptBufferAddress + 1], a
ld a, l
ld [BattleScriptBufferLoc], a
ld [BattleScriptBufferAddress], a
ret
; 36a82
@ -7882,7 +7882,7 @@ BattleCommand_Substitute: ; 36e7c
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
ld [wKickCounter], a
ld a, SUBSTITUTE
call LoadAnim
@ -9862,14 +9862,14 @@ AnimateCurrentMove: ; 37e01
PlayDamageAnim: ; 37e19
xor a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
and a
ret z
ld [FXAnimIDLo], a
ld [FXAnimID], a
ld a, [hBattleTurn]
and a
@ -9888,7 +9888,7 @@ PlayDamageAnim: ; 37e19
LoadMoveAnim: ; 37e36
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@ -9901,7 +9901,7 @@ LoadMoveAnim: ; 37e36
LoadAnim: ; 37e44
ld [FXAnimIDLo], a
ld [FXAnimID], a
; fallthrough
; 37e47
@ -9922,9 +9922,9 @@ PlayUserBattleAnim: ; 37e47
PlayOpponentBattleAnim: ; 37e54
ld a, e
ld [FXAnimIDLo], a
ld [FXAnimID], a
ld a, d
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
xor a
ld [wNumHits], a
@ -9983,9 +9983,9 @@ BattleCommand_ClearText: ; 37e85
SkipToBattleCommand: ; 37e8c
; Skip over commands until reaching command b.
ld a, [BattleScriptBufferLoc + 1]
ld a, [BattleScriptBufferAddress + 1]
ld h, a
ld a, [BattleScriptBufferLoc]
ld a, [BattleScriptBufferAddress]
ld l, a
.loop
ld a, [hli]
@ -9993,9 +9993,9 @@ SkipToBattleCommand: ; 37e8c
jr nz, .loop
ld a, h
ld [BattleScriptBufferLoc + 1], a
ld [BattleScriptBufferAddress + 1], a
ld a, l
ld [BattleScriptBufferLoc], a
ld [BattleScriptBufferAddress], a
ret
; 37ea1

View File

@ -11,7 +11,7 @@ BattleCommand_Transform: ; 371cd
jp nz, BattleEffect_ButItFailed
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
ld a, $1
ld [wKickCounter], a
ld a, BATTLE_VARS_SUBSTATUS4
@ -129,7 +129,7 @@ BattleCommand_Transform: ; 371cd
.after_anim
xor a
ld [wNumHits], a
ld [FXAnimIDHi], a
ld [FXAnimID + 1], a
ld a, $2
ld [wKickCounter], a
pop af

View File

@ -1,5 +1,5 @@
CalcMagikarpLength: ; fbbfc
; Return Magikarp's length (in mm) at MagikarpLength (big endian).
; Return Magikarp's length (in mm) at wMagikarpLength (big endian).
;
; input:
; de: EnemyMonDVs
@ -16,9 +16,9 @@ CalcMagikarpLength: ; fbbfc
; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
; if bc < 10: [MagikarpLength] = c + 190
; if bc >= $ff00: [MagikarpLength] = c + 1370
; else: [MagikarpLength] = z * 100 + (bc - x) / y
; if bc < 10: [wMagikarpLength] = c + 190
; if bc >= $ff00: [wMagikarpLength] = c + 1370
; else: [wMagikarpLength] = z * 100 + (bc - x) / y
; X, Y, and Z depend on the value of b as follows:
@ -165,7 +165,7 @@ CalcMagikarpLength: ; fbbfc
.ok
ld e, a
ld hl, MagikarpLength
ld hl, wMagikarpLength
ld [hl], d
inc hl
ld [hl], e

View File

@ -1,11 +1,11 @@
LoadBattleMenu: ; 24ef2
ld hl, BattleMenuDataHeader
call LoadMenuDataHeader
ld a, [wd0d2]
ld a, [wBattleMenuCursorBuffer]
ld [wMenuCursorBuffer], a
call InterpretBattleMenu
ld a, [wMenuCursorBuffer]
ld [wd0d2], a
ld [wBattleMenuCursorBuffer], a
call ExitMenu
ret
; 24f0b
@ -23,11 +23,11 @@ ContestBattleMenu: ; 24f13
; 24f19
Function24f19: ; 24f19
ld a, [wd0d2]
ld a, [wBattleMenuCursorBuffer]
ld [wMenuCursorBuffer], a
call _2DMenu
ld a, [wMenuCursorBuffer]
ld [wd0d2], a
ld [wBattleMenuCursorBuffer], a
call ExitMenu
ret
; 24f2c

File diff suppressed because it is too large Load Diff

View File

@ -249,10 +249,10 @@ InitBattleAnimBuffer: ; ccaaa
.check_kinesis_softboiled_milkdrink
sub d
push af
ld a, [FXAnimIDHi]
ld a, [FXAnimID + 1]
or a
jr nz, .no_sub
ld a, [FXAnimIDLo]
ld a, [FXAnimID]
cp KINESIS
jr z, .kinesis
cp SOFTBOILED

View File

@ -451,18 +451,18 @@ GetBallAnimPal: ; cd249 (33:5249)
; cd26c (33:526c)
.balls
db MASTER_BALL, 5
db ULTRA_BALL, 3
db GREAT_BALL, 6
db POKE_BALL, 4
db HEAVY_BALL, 2
db LEVEL_BALL, 7
db LURE_BALL, 6
db FAST_BALL, 6
db FRIEND_BALL, 3
db MOON_BALL, 2
db LOVE_BALL, 4
db -1, 2
db MASTER_BALL, PAL_BATTLE_GREEN
db ULTRA_BALL, PAL_BATTLE_YELLOW
db GREAT_BALL, PAL_BATTLE_BLUE
db POKE_BALL, PAL_BATTLE_RED
db HEAVY_BALL, PAL_BATTLE_GRAY
db LEVEL_BALL, PAL_BATTLE_BROWN
db LURE_BALL, PAL_BATTLE_BLUE
db FAST_BALL, PAL_BATTLE_BLUE
db FRIEND_BALL, PAL_BATTLE_YELLOW
db MOON_BALL, PAL_BATTLE_GRAY
db LOVE_BALL, PAL_BATTLE_RED
db -1, PAL_BATTLE_GRAY
; cd284
BattleAnimFunction_10: ; cd284 (33:5284)
call BattleAnim_AnonJumptable

View File

@ -256,9 +256,9 @@ _ShowLinkBattleParticipants: ; 2c1b2
ld de, OTPlayerName
call PlaceString
hlcoord 9, 8
ld a, $69 ; "V"
ld a, "<BOLD_V>"
ld [hli], a
ld [hl], $6a ; "S"
ld [hl], "<BOLD_S>"
callba LinkBattle_TrainerHuds ; no need to callba
ld b, SCGB_DIPLOMA
call GetSGBLayout

View File

@ -22,6 +22,7 @@ INCLUDE "constants/animation_constants.asm"
INCLUDE "constants/phone_constants.asm"
INCLUDE "constants/gfx_constants.asm"
INCLUDE "constants/pokemon_data_constants.asm"
INCLUDE "constants/mobile_constants.asm"
INCLUDE "constants/misc_constants.asm"
INCLUDE "constants/std_constants.asm"
INCLUDE "constants/deco_constants.asm"

View File

@ -1,3 +1,4 @@
; battle_anim_struct members (see macros/wram.asm)
const_def
const BATTLEANIMSTRUCT_INDEX
const BATTLEANIMSTRUCT_01
@ -25,6 +26,7 @@
const BATTLEANIMSTRUCT_17
BATTLEANIMSTRUCT_LENGTH EQU const_value
; BattleAnimObjects indexes (see battle/objects/data.asm)
const_def
const ANIM_OBJ_00
const ANIM_OBJ_01
@ -215,6 +217,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const ANIM_OBJ_BA
const ANIM_OBJ_BB
; DoBattleAnimFrame arguments (see battle/objects/functions.asm)
const_def
const BATTLEANIMFUNC_00
const BATTLEANIMFUNC_01
@ -297,6 +300,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMFUNC_4E
const BATTLEANIMFUNC_4F
; BattleAnimFrameData indexes (see battle/objects/framesets.asm)
const_def
const BATTLEANIMFRAMESET_00
const BATTLEANIMFRAMESET_01
@ -484,6 +488,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMFRAMESET_B7
const BATTLEANIMFRAMESET_B8
; BattleAnimOAMData indexes (see battle/objects/oam.asm)
const_def
const BATTLEANIMOAMSET_00
const BATTLEANIMOAMSET_01
@ -702,6 +707,7 @@ BATTLEANIMSTRUCT_LENGTH EQU const_value
const BATTLEANIMOAMSET_D6
const BATTLEANIMOAMSET_D7
; BattleBGEffects indexes (see battle/bg_effects.asm)
const_value SET 1
const ANIM_BG_FLASH_INVERTED
const ANIM_BG_FLASH_WHITE
@ -757,17 +763,19 @@ const_value SET 1
const ANIM_BG_WOBBLE_MON
const ANIM_BG_35
; PokeAnims indexes (see gfx/pics/animation.asm)
const_def
const ANIM_MON_SLOW ; 0
const ANIM_MON_NORMAL ; 1
const ANIM_MON_MENU ; 2
const ANIM_MON_TRADE ; 3
const ANIM_MON_EVOLVE ; 4
const ANIM_MON_HATCH ; 5
const ANIM_MON_UNUSED ; 6
const ANIM_MON_EGG1 ; 7
const ANIM_MON_EGG2 ; 8
const ANIM_MON_SLOW
const ANIM_MON_NORMAL
const ANIM_MON_MENU
const ANIM_MON_TRADE
const ANIM_MON_EVOLVE
const ANIM_MON_HATCH
const ANIM_MON_UNUSED
const ANIM_MON_EGG1
const ANIM_MON_EGG2
; AnimObjGFX indexes (see battle/objects/gfx_headers.asm)
const_value SET 1
const ANIM_GFX_HIT
const ANIM_GFX_CUT
@ -809,8 +817,20 @@ const_value SET 1
const ANIM_GFX_WAVE
const ANIM_GFX_AEROBLAST
; battle_bg_effect struct members (see macros/wram.asm)
const_def
const BG_EFFECT_STRUCT_FUNCTION
const BG_EFFECT_STRUCT_JT_INDEX
const BG_EFFECT_STRUCT_BATTLE_TURN
const BG_EFFECT_STRUCT_03
; animation object palettes
const_def
const PAL_BATTLE_ENEMY ; 0
const PAL_BATTLE_PLAYER ; 1
const PAL_BATTLE_GRAY ; 2
const PAL_BATTLE_YELLOW ; 3
const PAL_BATTLE_RED ; 4
const PAL_BATTLE_GREEN ; 5
const PAL_BATTLE_BLUE ; 6
const PAL_BATTLE_BROWN ; 7

View File

@ -1,63 +1,69 @@
; pitch
const_def
const __
const C_
const C#
const D_
const D#
const E_
const F_
const F#
const G_
const G#
const A_
const A#
const B_
const CC ; used for pitchoffset
const __ ; 0
const C_ ; 1
const C# ; 2
const D_ ; 3
const D# ; 4
const E_ ; 5
const F_ ; 6
const F# ; 7
const G_ ; 8
const G# ; 9
const A_ ; a
const A# ; b
const B_ ; c
const CC ; d (used for pitchoffset)
; channel
; ChannelPointers indexes (see engine/audio.asm)
const_def
const CHAN1
const CHAN2
const CHAN3
const CHAN4
const CHAN1 ; 0
const CHAN2 ; 1
const CHAN3 ; 2
const CHAN4 ; 3
NUM_MUSIC_CHANS EQU const_value
NUM_NOISE_CHANS EQU const_value
const CHAN5
const CHAN6
const CHAN7
const CHAN8
const CHAN5 ; 4
const CHAN6 ; 5
const CHAN7 ; 6
const CHAN8 ; 7
NUM_CHANNELS EQU const_value
; Flags1
SOUND_CHANNEL_ON EQU 0
SOUND_SUBROUTINE EQU 1
SOUND_LOOPING EQU 2
SOUND_SFX EQU 3
SOUND_NOISE EQU 4
SOUND_REST EQU 5
const_def
const SOUND_CHANNEL_ON ; 0
const SOUND_SUBROUTINE ; 1
const SOUND_LOOPING ; 2
const SOUND_SFX ; 3
const SOUND_NOISE ; 4
const SOUND_REST ; 5
; Flags2
SOUND_VIBRATO EQU 0
SOUND_PITCH_WHEEL EQU 1
SOUND_DUTY EQU 2
SOUND_UNKN_0B EQU 3
SOUND_CRY_PITCH EQU 4
SOUND_UNKN_0D EQU 5
SOUND_UNKN_0E EQU 6
SOUND_UNKN_0F EQU 7
const_def
const SOUND_VIBRATO ; 0
const SOUND_PITCH_WHEEL ; 1
const SOUND_DUTY ; 2
const SOUND_UNKN_0B ; 3
const SOUND_CRY_PITCH ; 4
const SOUND_UNKN_0D ; 5
const SOUND_UNKN_0E ; 6
const SOUND_UNKN_0F ; 7
; Flags3
SOUND_VIBRATO_DIR EQU 0
SOUND_PITCH_WHEEL_DIR EQU 1
const_def
const SOUND_VIBRATO_DIR ; 0
const SOUND_PITCH_WHEEL_DIR ; 1
; NoteFlags
NOTE_DUTY_OVERRIDE EQU 0
NOTE_FREQ_OVERRIDE EQU 1
NOTE_UNKN_3 EQU 3
NOTE_NOISE_SAMPLING EQU 4
NOTE_REST EQU 5
NOTE_VIBRATO_OVERRIDE EQU 6
const_def
const NOTE_DUTY_OVERRIDE ; 0
const NOTE_FREQ_OVERRIDE ; 1
const NOTE_UNUSED ; 2
const NOTE_UNKN_3 ; 3
const NOTE_NOISE_SAMPLING ; 4
const NOTE_REST ; 5
const NOTE_VIBRATO_OVERRIDE ; 6
; Volume:
MAX_VOLUME EQU $77

View File

@ -1,12 +1,20 @@
; significant level values
MAX_LEVEL EQU 100
MIN_LEVEL EQU 2
EGG_LEVEL EQU 5
; maximum moves known per mon
NUM_MOVES EQU 4
REST_TURNS EQU 2
MAX_STAT_LEVEL EQU 13
; significant stat values
BASE_STAT_LEVEL EQU 7
MAX_STAT_LEVEL EQU 13
; turns that Rest sleep lasts
REST_TURNS EQU 2
; PlayerStatLevels and EnemyStatLevels indexes
; used for GetStatName
const_def
const ATTACK
const DEFENSE
@ -15,10 +23,10 @@ BASE_STAT_LEVEL EQU 7
const SP_DEFENSE
const ACCURACY
const EVASION
const ABILITY
const ABILITY ; used for BattleCommand_Curse
NUM_LEVEL_STATS EQU const_value
; move struct
; move struct members (see battle/moves/moves.asm)
const_def
const MOVE_ANIM
const MOVE_EFFECT
@ -30,6 +38,9 @@ NUM_LEVEL_STATS EQU const_value
const MOVE_LENGTH
; stat constants
; indexes for:
; - PlayerStats and EnemyStats (see wram.asm)
; - party_struct and battle_struct members (see macros/wram.asm)
const_value SET 1
const STAT_HP
const STAT_ATK
@ -38,6 +49,8 @@ const_value SET 1
const STAT_SATK
const STAT_SDEF
NUM_STATS EQU const_value
; stat formula constants
STAT_MIN_NORMAL EQU 5
STAT_MIN_HP EQU 10
@ -45,12 +58,12 @@ STAT_MIN_HP EQU 10
ATKDEFDV_SHINY EQU $EA
SPDSPCDV_SHINY EQU $AA
; battle classes
; battle classes (wBattleMode values)
const_value SET 1
const WILD_BATTLE
const TRAINER_BATTLE
; battle types
; battle types (BattleType values)
const_def
const BATTLETYPE_NORMAL
const BATTLETYPE_CANLOSE
@ -66,7 +79,7 @@ const_value SET 1
const BATTLETYPE_CELEBI
const BATTLETYPE_SUICUNE
; battle variables
; GetBattleVar and GetBattleVarAddr arguments (see home/battle.asm)
const_def
const BATTLE_VARS_SUBSTATUS1
const BATTLE_VARS_SUBSTATUS2
@ -90,8 +103,37 @@ const_value SET 1
const BATTLE_VARS_LAST_MOVE
const BATTLE_VARS_LAST_MOVE_OPP
; status
SLP EQU 7 ; 0-7 turns
; GetBattleVar and GetBattleVarAddr internal indexes (see home/battle.asm)
const_def
const PLAYER_SUBSTATUS_1
const ENEMY_SUBSTATUS_1
const PLAYER_SUBSTATUS_2
const ENEMY_SUBSTATUS_2
const PLAYER_SUBSTATUS_3
const ENEMY_SUBSTATUS_3
const PLAYER_SUBSTATUS_4
const ENEMY_SUBSTATUS_4
const PLAYER_SUBSTATUS_5
const ENEMY_SUBSTATUS_5
const PLAYER_STATUS
const ENEMY_STATUS
const PLAYER_MOVE_ANIMATION
const ENEMY_MOVE_ANIMATION
const PLAYER_MOVE_EFFECT
const ENEMY_MOVE_EFFECT
const PLAYER_MOVE_POWER
const ENEMY_MOVE_POWER
const PLAYER_MOVE_TYPE
const ENEMY_MOVE_TYPE
const PLAYER_CUR_MOVE
const ENEMY_CUR_MOVE
const PLAYER_COUNTER_MOVE
const ENEMY_COUNTER_MOVE
const PLAYER_LAST_MOVE
const ENEMY_LAST_MOVE
; status condition bit flags
SLP EQU %111 ; 0-7 turns
const_value SET 3
const PSN
const BRN
@ -100,7 +142,7 @@ const_value SET 3
ALL_STATUS EQU (1 << PSN) + (1 << BRN) + (1 << FRZ) + (1 << PAR) + SLP
; substatus
; PlayerSubStatus1 or EnemySubStatus1 bit flags
enum_start 7, -1
enum SUBSTATUS_IN_LOVE
enum SUBSTATUS_ROLLOUT
@ -111,8 +153,10 @@ ALL_STATUS EQU (1 << PSN) + (1 << BRN) + (1 << FRZ) + (1 << PAR) + SLP
enum SUBSTATUS_CURSE
enum SUBSTATUS_NIGHTMARE
SUBSTATUS_CURLED EQU 0
; PlayerSubStatus2 or EnemySubStatus2 bit flags
SUBSTATUS_CURLED EQU 0
; PlayerSubStatus3 or EnemySubStatus3 bit flags
enum_start 7, -1
enum SUBSTATUS_CONFUSED
enum SUBSTATUS_FLYING
@ -123,6 +167,7 @@ SUBSTATUS_CURLED EQU 0
enum SUBSTATUS_RAMPAGE
enum SUBSTATUS_BIDE
; PlayerSubStatus4 or EnemySubStatus4 bit flags
enum_start 7, -1
enum SUBSTATUS_LEECH_SEED
enum SUBSTATUS_RAGE
@ -133,6 +178,7 @@ SUBSTATUS_CURLED EQU 0
enum SUBSTATUS_MIST
enum SUBSTATUS_X_ACCURACY
; PlayerSubStatus5 or EnemySubStatus5 bit flags
enum_start 7, -1
enum SUBSTATUS_CANT_RUN
enum SUBSTATUS_DESTINY_BOND
@ -143,7 +189,7 @@ SUBSTATUS_CURLED EQU 0
enum SUBSTATUS_UNKNOWN_3
enum SUBSTATUS_TOXIC
; environmental
; PlayerScreens or EnemyScreens bit flags
enum_start 4, -1
enum SCREENS_REFLECT
enum SCREENS_LIGHT_SCREEN
@ -151,7 +197,7 @@ SUBSTATUS_CURLED EQU 0
enum SCREENS_UNUSED
enum SCREENS_SPIKES
; weather
; Weather values
const_def
const WEATHER_NONE
const WEATHER_RAIN
@ -161,8 +207,7 @@ SUBSTATUS_CURLED EQU 0
const WEATHER_SUN_END
const WEATHER_SANDSTORM_END
; move effects
; MoveEffectsPointers indexes (see battle/moves/move_effects_pointers.asm)
const_def
const EFFECT_NORMAL_HIT
const EFFECT_SLEEP
@ -322,35 +367,6 @@ SUBSTATUS_CURLED EQU 0
const EFFECT_FLY
const EFFECT_DEFENSE_CURL
; Battle vars used in home/battle.asm
const_def
const PLAYER_SUBSTATUS_1
const ENEMY_SUBSTATUS_1
const PLAYER_SUBSTATUS_2
const ENEMY_SUBSTATUS_2
const PLAYER_SUBSTATUS_3
const ENEMY_SUBSTATUS_3
const PLAYER_SUBSTATUS_4
const ENEMY_SUBSTATUS_4
const PLAYER_SUBSTATUS_5
const ENEMY_SUBSTATUS_5
const PLAYER_STATUS
const ENEMY_STATUS
const PLAYER_MOVE_ANIMATION
const ENEMY_MOVE_ANIMATION
const PLAYER_MOVE_EFFECT
const ENEMY_MOVE_EFFECT
const PLAYER_MOVE_POWER
const ENEMY_MOVE_POWER
const PLAYER_MOVE_TYPE
const ENEMY_MOVE_TYPE
const PLAYER_CUR_MOVE
const ENEMY_CUR_MOVE
const PLAYER_COUNTER_MOVE
const ENEMY_COUNTER_MOVE
const PLAYER_LAST_MOVE
const ENEMY_LAST_MOVE
; wBattleAction
const_def
const BATTLEACTION_MOVE1
@ -370,6 +386,7 @@ SUBSTATUS_CURLED EQU 0
const BATTLEACTION_E
const BATTLEACTION_FORFEIT
; wBattleResult
const_def
const WIN
const LOSE

View File

@ -1,3 +1,4 @@
; BattleTowerAction arguments (see misc/battle_tower_5c.asm)
const_def
const BATTLETOWERACTION_CHECK_EXPLANATION_READ
const BATTLETOWERACTION_SET_EXPLANATION_READ
@ -32,8 +33,19 @@
const BATTLETOWERACTION_CHOOSEREWARD ; save options
const BATTLETOWERACTION_SAVEOPTIONS
BATTLETOWER_NO_CHALLENGE EQU 0
BATTLETOWER_SAVED_AND_LEFT EQU 1
BATTLETOWER_CHALLENGE_IN_PROGESS EQU 2
BATTLETOWER_WON_CHALLENGE EQU 3
BATTLETOWER_RECEIVED_REWARD EQU 4
; sBattleTowerChallengeState
const_def
const BATTLETOWER_NO_CHALLENGE
const BATTLETOWER_SAVED_AND_LEFT
const BATTLETOWER_CHALLENGE_IN_PROGESS
const BATTLETOWER_WON_CHALLENGE
const BATTLETOWER_RECEIVED_REWARD
BATTLETOWER_NROFPKMNS EQU 3
BATTLETOWER_TRAINERDATALENGTH EQU $24
BATTLETOWER_NROFTRAINERS EQU 7
BATTLETOWER_NRMONSPERLEVELBRACKET EQU BATTLETOWER_NROFPKMNS * BATTLETOWER_NROFTRAINERS
BATTLE_TOWER_STRUCT_LENGTH EQU $e0 ; NAME_LENGTH + 3 * (PARTYMON_STRUCT_LENGTH + PKMN_NAME_LENGTH) + BATTLETOWER_TRAINERDATALENGTH
; return value from BattleTowerAction(BATTLETOWERACTION_CHECKMOBILEEVENT)
MOBILE_EVENT_OBJECT_GS_BALL EQU $b

Some files were not shown because too many files have changed in this diff Show More