ref: 7aef59841489ea449b9a34d424c681a4b48b88ab
parent: c5fb2c947ffcdd0ddd80319a24a6acbe828d9598
parent: 5d94fb22ed0e4c9edfca506b80f50ef71fd78664
author: yenatch <[email protected]>
date: Mon Apr 18 04:01:12 EDT 2016
Merge pull request #338 from PikalaxALT/master Battle anims, HP Bar anim
--- a/audio/engine.asm
+++ b/audio/engine.asm
@@ -38,8 +38,8 @@
dec e
jr nz, .clearsound
- ld hl, Channel1 ; start of channel data
- ld de, $1bf ; length of area to clear (entire sound wram area)
+ ld hl, Channels ; start of channel data
+ ld de, ChannelsEnd - Channels ; length of area to clear (entire sound wram area)
.clearchannels ; clear Channel1-$c2bf
xor a
ld [hli], a
@@ -233,7 +233,7 @@
jp [hl]
-.ChannelFnPtrs
+.ChannelFnPtrs:
dw .Channel1
dw .Channel2
dw .Channel3
@@ -245,11 +245,11 @@
dw .Channel7
dw .Channel8
-.Channel1
+.Channel1:
ld a, [Danger]
bit 7, a
ret nz
-.Channel5
+.Channel5:
ld hl, Channel1NoteFlags - Channel1
add hl, bc
bit NOTE_UNKN_3, [hl]
@@ -317,8 +317,8 @@
ld [rNR14], a
ret
-.Channel2
-.Channel6
+.Channel2:
+.Channel6:
ld hl, Channel1NoteFlags - Channel1
add hl, bc
bit NOTE_REST, [hl] ; rest
@@ -377,8 +377,8 @@
ld [rNR24], a
ret
-.Channel3
-.Channel7
+.Channel3:
+.Channel7:
ld hl, Channel1NoteFlags - Channel1
add hl, bc
bit NOTE_REST, [hl] ; rest
@@ -478,8 +478,8 @@
ld [rNR32], a
ret
-.Channel4
-.Channel8
+.Channel4:
+.Channel8:
ld hl, Channel1NoteFlags - Channel1
add hl, bc
bit NOTE_REST, [hl] ; rest
@@ -2483,28 +2483,28 @@
; Play cry de using parameters:
; CryPitch
; CryLength
-
+
call MusicOff
-
+
; Overload the music id with the cry id
ld hl, MusicID
ld [hl], e
inc hl
ld [hl], d
-
+
; 3-byte pointers (bank, address)
ld hl, Cries
rept 3
add hl, de
endr
-
+
ld a, [hli]
ld [MusicBank], a
-
+
ld e, [hl]
inc hl
ld d, [hl]
-
+
; Read the cry's sound header
call LoadMusicByte
; Top 2 bits contain the number of channels
@@ -2511,21 +2511,21 @@
rlca
rlca
and 3
-
+
; For each channel:
inc a
.loop
push af
call LoadChannel
-
+
ld hl, Channel1Flags - Channel1
add hl, bc
set SOUND_REST, [hl]
-
+
ld hl, Channel1Flags2 - Channel1
add hl, bc
set SOUND_CRY_PITCH, [hl]
-
+
ld hl, Channel1CryPitch - Channel1
add hl, bc
ld a, [CryPitch]
@@ -2532,13 +2532,13 @@
ld [hli], a
ld a, [CryPitch + 1]
ld [hl], a
-
+
; No tempo for channel 4
ld a, [CurChannel]
and 3
cp 3
jr nc, .start
-
+
; Tempo is effectively length
ld hl, Channel1Tempo - Channel1
add hl, bc
@@ -2551,14 +2551,14 @@
ld a, [wStereoPanningMask]
and a
jr z, .next
-
+
; Stereo only: Play cry from the monster's side.
; This only applies in-battle.
-
+
ld a, [Options]
bit 5, a ; stereo
jr z, .next
-
+
; [Tracks] &= [CryTracks]
ld hl, Channel1Tracks - Channel1
add hl, bc
@@ -2568,23 +2568,23 @@
ld hl, Channel1Tracks - Channel1
add hl, bc
ld [hl], a
-
+
.next
pop af
dec a
jr nz, .loop
-
-
+
+
; Cries play at max volume, so we save the current volume for later.
ld a, [LastVolume]
and a
jr nz, .end
-
+
ld a, [Volume]
ld [LastVolume], a
ld a, $77
ld [Volume], a
-
+
.end
ld a, 1 ; stop playing music
ld [SFXPriority], a
@@ -2699,24 +2699,24 @@
; play sfx de
call MusicOff
-
+
; standard procedure if stereo's off
ld a, [Options]
bit 5, a
jp z, _PlaySFX
-
+
; else, let's go ahead with this
ld hl, MusicID
ld [hl], e
inc hl
ld [hl], d
-
+
; get sfx ptr
ld hl, SFX
rept 3
add hl, de
endr
-
+
; bank
ld a, [hli]
ld [MusicBank], a
@@ -2724,7 +2724,7 @@
ld e, [hl]
inc hl
ld d, [hl]
-
+
; bit 2-3
call LoadMusicByte
rlca
@@ -2731,15 +2731,15 @@
rlca
and 3 ; ch1-4
inc a
-
+
.loop
push af
call LoadChannel
-
+
ld hl, Channel1Flags - Channel1
add hl, bc
set SOUND_SFX, [hl]
-
+
push de
; get tracks for this channel
ld a, [CurChannel]
@@ -2751,47 +2751,47 @@
ld a, [hl]
ld hl, wStereoPanningMask
and [hl]
-
+
ld hl, Channel1Tracks - Channel1
add hl, bc
ld [hl], a
-
+
ld hl, Channel1Field0x30 - Channel1 ; $c131 - Channel1
add hl, bc
ld [hl], a
-
+
ld a, [CryTracks]
cp 2 ; ch 1-2
jr c, .skip
-
+
; ch3-4
ld a, [wSFXDuration]
-
+
ld hl, Channel1Field0x2e - Channel1 ; $c12f - Channel1
add hl, bc
ld [hl], a
-
+
ld hl, Channel1Field0x2f - Channel1 ; $c130 - Channel1
add hl, bc
ld [hl], a
-
+
ld hl, Channel1Flags2 - Channel1
add hl, bc
set SOUND_UNKN_0F, [hl]
-
+
.skip
pop de
-
+
; turn channel on
ld hl, Channel1Flags - Channel1
add hl, bc
set SOUND_CHANNEL_ON, [hl] ; on
-
+
; done?
pop af
dec a
jr nz, .loop
-
+
; we're done
call MusicOn
ret
--- a/audio/music_pointers.asm
+++ b/audio/music_pointers.asm
@@ -102,9 +102,9 @@
dba Music_LakeOfRageRocketRadio ; 0xef5b1
dba Music_Printer ; 0xf07fd
dba Music_PostCredits ; 0xcfd9e
-
+
; Crystal adds the following songs:
-
+
dba Music_Clair ; 0x1fa8d
dba Music_MobileAdapterMenu ; 0x17801f
dba Music_MobileAdapter ; 0x1fc87
--- a/battle/ai/items.asm
+++ b/battle/ai/items.asm
@@ -9,7 +9,7 @@
and a
ret nz
- callba CheckSubstatus_RechargeChargedRampageBideRollout
+ callba CheckEnemyLockedIn
ret nz
ld a, [PlayerSubStatus5]
@@ -318,7 +318,7 @@
jp c, .Use
jp .DontUse
-.StatusCheckContext
+.StatusCheckContext:
ld a, [EnemySubStatus5]
bit SUBSTATUS_TOXIC, a
jr z, .FailToxicCheck
@@ -328,7 +328,7 @@
call Random
cp 1 + 50 percent
jp c, .Use
-.FailToxicCheck
+.FailToxicCheck:
ld a, [EnemyMonStatus]
and 1 << FRZ | SLP
jp z, .DontUse
@@ -344,7 +344,7 @@
call .Status
jp c, .DontUse
-.UseFullRestore
+.UseFullRestore:
call EnemyUsedFullRestore
jp .Use
; 38220
@@ -416,7 +416,7 @@
jp .Use
; 382ae
-.asm_382ae: ; This appears to be unused
+.asm_382ae ; This appears to be unused
callab AICheckEnemyMaxHP
jr c, .dont_use
push bc
@@ -676,7 +676,7 @@
ld c, a
ld hl, OTPartyMon1HP
ld d, 0
-.SwitchLoop
+.SwitchLoop:
ld a, [hli]
ld b, a
ld a, [hld]
@@ -716,7 +716,7 @@
ld d, h
ld e, l
ld hl, EnemyMonStatus
- ld bc, $0004
+ ld bc, MON_MAXHP - MON_STATUS
call CopyBytes
pop af
@@ -726,7 +726,7 @@
.skiptext
ld a, 1
- ld [wd264], a
+ ld [wAISwitch], a
callab NewEnemyMonStatus
callab ResetEnemyStatLevels
ld hl, PlayerSubStatus1
@@ -734,7 +734,7 @@
callba EnemySwitch
callba ResetBattleParticipants
xor a
- ld [wd264], a
+ ld [wAISwitch], a
ld a, [wLinkMode]
and a
ret nz
--- a/battle/ai/move.asm
+++ b/battle/ai/move.asm
@@ -12,7 +12,7 @@
ret nz
; No use picking a move if there's no choice.
- callba CheckSubstatus_RechargeChargedRampageBideRollout
+ callba CheckEnemyLockedIn
ret nz
@@ -31,13 +31,13 @@
ld hl, EnemyMonMoves
ld c, 0
-.CheckDisabledMove
+.CheckDisabledMove:
cp [hl]
jr z, .ScoreDisabledMove
inc c
inc hl
jr .CheckDisabledMove
-.ScoreDisabledMove
+.ScoreDisabledMove:
ld hl, Buffer1
ld b, 0
add hl, bc
@@ -44,11 +44,11 @@
ld [hl], 80
; Don't pick moves with 0 PP.
-.CheckPP
+.CheckPP:
ld hl, Buffer1 - 1
ld de, EnemyMonPP
ld b, 0
-.CheckMovePP
+.CheckMovePP:
inc b
ld a, b
cp EnemyMonMovesEnd - EnemyMonMoves + 1
@@ -63,7 +63,7 @@
; Apply AI scoring layers depending on the trainer class.
-.ApplyLayers
+.ApplyLayers:
ld hl, TrainerClassAttributes + TRNATTR_AI_MOVE_WEIGHTS
; If we have a battle in BattleTower just load the Attributes of the first TrainerClass (Falkner)
@@ -82,7 +82,7 @@
push bc
push hl
-.CheckLayer
+.CheckLayer:
pop hl
pop bc
@@ -119,12 +119,12 @@
jr .CheckLayer
; Decrement the scores of all moves one by one until one reaches 0.
-.DecrementScores
+.DecrementScores:
ld hl, Buffer1
ld de, EnemyMonMoves
ld c, EnemyMonMovesEnd - EnemyMonMoves
-.DecrementNextScore
+.DecrementNextScore:
; If the enemy has no moves, this will infinite.
ld a, [de]
inc de
@@ -145,7 +145,7 @@
; In order to avoid bias towards the moves located first in memory, increment the scores
; that were decremented one more time than the rest (in case there was a tie).
; This means that the minimum score will be 1.
-.PickLowestScoreMoves
+.PickLowestScoreMoves:
ld a, c
.move_loop
@@ -159,7 +159,7 @@
ld de, EnemyMonMoves
ld c, NUM_MOVES
-; Give a score of 0 to a blank move
+; Give a score of 0 to a blank move
.loop2
ld a, [de]
and a
@@ -166,7 +166,7 @@
jr nz, .skip_load
ld [hl], a
-; Disregard the move if its score is not 1
+; Disregard the move if its score is not 1
.skip_load
ld a, [hl]
dec a
@@ -183,8 +183,8 @@
dec c
jr nz, .loop2
-; Randomly choose one of the moves with a score of 1
-.ChooseMove
+; Randomly choose one of the moves with a score of 1
+.ChooseMove:
ld hl, Buffer1
call Random
and 3
--- a/battle/ai/scoring.asm
+++ b/battle/ai/scoring.asm
@@ -23,7 +23,7 @@
; Dismiss moves with special effects if they are
; useless or not a good choice right now.
-; For example, healing moves, weather moves, Dream Eater...
+; For example, healing moves, weather moves, Dream Eater...
push hl
push de
push bc
@@ -33,7 +33,7 @@
pop hl
jr nz, .discourage
-; Dismiss status-only moves if the player can't be statused.
+; Dismiss status-only moves if the player can't be statused.
ld a, [wEnemyMoveStruct + MOVE_EFFECT]
push hl
push de
@@ -680,7 +680,7 @@
inc [hl]
endr
-; 30% chance to end up here if enemy's HP is full and player is not badly poisoned.
+; 30% chance to end up here if enemy's HP is full and player is not badly poisoned.
; 77% chance to end up here if enemy's HP is above 50% but not full.
; 96% chance to end up here if enemy's HP is between 25% and 50%.
; 100% chance to end up here if enemy's HP is below 25%.
@@ -771,7 +771,7 @@
jr nz, .asm_38968
; ...do nothing if enemy is slower than player
- call AICompareSpeed
+ call AICompareSpeed
ret nc
; ...or dismiss this move if enemy is faster than player.
@@ -784,7 +784,7 @@
ld de, 1
call IsInArray
pop hl
-
+
; ...do nothing if he didn't use a useful move.
ret nc
@@ -813,11 +813,11 @@
call AICheckPlayerMaxHP
jr nc, .asm_389a0
-; ...and enemy's HP is above 50%...
+; ...and enemy's HP is above 50%...
call AICheckEnemyHalfHP
jr nc, .asm_389a0
-; ...greatly encourage this move if player is badly poisoned.
+; ...greatly encourage this move if player is badly poisoned.
ld a, [PlayerSubStatus5]
bit SUBSTATUS_TOXIC, a
jr nz, .asm_3899d
@@ -839,21 +839,21 @@
call AICheckPlayerQuarterHP
jr nc, .asm_389bd
-; If player's HP is above 25% but not full, 4% chance to greatly encourage this move.
+; If player's HP is above 25% but not full, 4% chance to greatly encourage this move.
call Random
cp $a
jr c, .asm_3899d
-; If player's HP is between 25% and 50%,...
+; If player's HP is between 25% and 50%,...
call AICheckPlayerHalfHP
jr nc, .asm_389b8
-; If player's HP is above 50% but not full, 20% chance to greatly encourage this move.
+; If player's HP is above 50% but not full, 20% chance to greatly encourage this move.
call AI_80_20
jr c, .asm_3899d
jr .asm_389bf
-; ...50% chance to greatly discourage this move.
+; ...50% chance to greatly discourage this move.
.asm_389b8
call AI_50_50
jr c, .asm_389bf
@@ -863,7 +863,7 @@
inc [hl]
endr
-; We only end up here if the move has not been already encouraged.
+; We only end up here if the move has not been already encouraged.
.asm_389bf
ld a, [PlayerSubStatus5]
bit SUBSTATUS_TOXIC, a
@@ -873,7 +873,7 @@
bit SUBSTATUS_LEECH_SEED, a
jr nz, .asm_389ef
-; Discourage this move if enemy's evasion level is higher than player's accuracy level.
+; Discourage this move if enemy's evasion level is higher than player's accuracy level.
ld a, [EnemyEvaLevel]
ld b, a
ld a, [PlayerAccLevel]
@@ -880,7 +880,7 @@
cp b
jr c, .asm_389e4
-; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout.
+; Greatly encourage this move if the player is in the middle of Fury Cutter or Rollout.
ld a, [PlayerFuryCutterCount]
and a
jr nz, .asm_3899d
@@ -895,7 +895,7 @@
; Player is badly poisoned.
; 80% chance to greatly encourage this move.
-; This would counter any previous discouragement.
+; This would counter any previous discouragement.
.asm_389e6
call Random
cp $50
@@ -907,7 +907,7 @@
; Player is seeded.
; 50% chance to encourage this move.
-; This would partly counter any previous discouragement.
+; This would partly counter any previous discouragement.
.asm_389ef
call AI_50_50
ret c
@@ -931,7 +931,7 @@
jr c, .asm_38a12
jr .asm_389fb
-; 85% chance to encourage this move if any of player's stat levels is higher than +2.
+; 85% chance to encourage this move if any of player's stat levels is higher than +2.
.asm_38a05
ld hl, PlayerAtkLevel
ld c, $8
@@ -1164,7 +1164,7 @@
cp $19
jr c, .asm_38ae7
inc [hl]
-
+
.asm_38ae7
; Discourage again if player's HP is below 25%.
call AICheckPlayerQuarterHP
@@ -1220,10 +1220,10 @@
ld a, [PlayerSubStatus3]
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
ret z
-
+
call AICompareSpeed
ret nc
-
+
rept 3
dec [hl]
endr
@@ -1246,9 +1246,9 @@
; 50% chance to discourage this move if player's HP is below 25%.
call AICheckPlayerQuarterHP
jr nc, .asm_38b3a
-
+
; 80% chance to greatly encourage this move
-; if enemy is slower than player and its HP is above 25%.
+; if enemy is slower than player and its HP is above 25%.
call AICompareSpeed
ret c
call AICheckEnemyQuarterHP
@@ -1308,8 +1308,8 @@
AI_Smart_HyperBeam: ; 38b63
call AICheckEnemyHalfHP
jr c, .asm_38b72
-
-; 50% chance to encourage this move if enemy's HP is below 25%.
+
+; 50% chance to encourage this move if enemy's HP is below 25%.
call AICheckEnemyQuarterHP
ret c
call AI_50_50
@@ -1335,13 +1335,13 @@
bit SUBSTATUS_RAGE, a
jr z, .asm_38b9b
-; If enemy's Rage is building, 50% chance to encourage this move.
+; If enemy's Rage is building, 50% chance to encourage this move.
call AI_50_50
jr c, .asm_38b8c
dec [hl]
-; Encourage this move based on Rage's counter.
+; Encourage this move based on Rage's counter.
.asm_38b8c
ld a, [wEnemyRageCounter]
cp $2
@@ -1773,12 +1773,12 @@
call AICompareSpeed
ret c
-; Dismiss this move if the player is flying or underground.
+; Dismiss this move if the player is flying or underground.
ld a, [PlayerSubStatus3]
and 1 << SUBSTATUS_FLYING | 1 << SUBSTATUS_UNDERGROUND
jp nz, AIDiscourageMove
-; Greatly encourage this move if it will KO the player.
+; Greatly encourage this move if it will KO the player.
ld a, $1
ld [hBattleTurn], a
push hl
@@ -1895,18 +1895,18 @@
pop hl
jp z, AIDiscourageMove
-; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird).
+; 80% chance to greatly encourage this move if the enemy is badly poisoned (weird).
ld a, [EnemySubStatus5]
bit SUBSTATUS_TOXIC, a
jr nz, .asm_38e26
; 80% chance to greatly encourage this move if the player is either
-; in love, identified, stuck in Rollout, or has a Nightmare.
+; in love, identified, stuck in Rollout, or has a Nightmare.
ld a, [PlayerSubStatus1]
and 1<<SUBSTATUS_IN_LOVE | 1<<SUBSTATUS_ROLLOUT | 1<<SUBSTATUS_IDENTIFIED | 1<<SUBSTATUS_NIGHTMARE
jr nz, .asm_38e26
-; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
+; Otherwise, discourage this move unless the player only has not very effective moves against the enemy.
push hl
callab CheckPlayerMoveTypeMatchups
ld a, [wEnemyAISwitchScore]
@@ -2233,7 +2233,7 @@
inc [hl]
ret
-.SandstormImmuneTypes
+.SandstormImmuneTypes:
db ROCK
db GROUND
db STEEL
@@ -2493,7 +2493,7 @@
push hl
ld a, 1
ld [hBattleTurn], a
-
+
; Calculate Hidden Power's type and base power based on enemy's DVs.
callab HiddenPowerDamage
callab BattleCheckTypeMatchup
@@ -2697,7 +2697,7 @@
jr nz, .asm_3915a
; Calculate the sum of all player's stat level modifiers. Add 100 first to prevent underflow.
-; Put the result in d. d will range between 58 and 142.
+; Put the result in d. d will range between 58 and 142.
ld hl, PlayerAtkLevel
ld b, $8
ld d, 100
@@ -2716,12 +2716,12 @@
pop hl
jr nc, .asm_39188
-; Else, 80% chance to encourage this move unless player's accuracy level is lower than -1...
+; Else, 80% chance to encourage this move unless player's accuracy level is lower than -1...
ld a, [PlayerAccLevel]
cp $6
ret c
-
-; ...or enemy's evasion level is higher than +0.
+
+; ...or enemy's evasion level is higher than +0.
ld a, [EnemyEvaLevel]
cp $8
ret nc
@@ -2825,7 +2825,7 @@
endr
ret
-; Try to predict if the player will use Fly this turn.
+; Try to predict if the player will use Fly this turn.
.couldFly
; 50% chance to encourage this move if the enemy is slower than the player.
@@ -3175,10 +3175,10 @@
call AICheckEnemyHalfHP
ret c
-; Discourage stall moves if enemy's HP is below 25%.
+; Discourage stall moves if enemy's HP is below 25%.
call AICheckEnemyQuarterHP
jr nc, .asm_39322
-
+
; 50% chance to discourage stall moves if enemy's HP is between 25% and 50%.
call AI_50_50
ret c
@@ -3333,12 +3333,12 @@
; Ignore this move if its power is 0 or 1.
; Moves such as Seismic Toss, Hidden Power,
-; Counter and Fissure have a base power of 1.
+; Counter and Fissure have a base power of 1.
ld a, [wEnemyMoveStruct + MOVE_POWER]
cp 2
jr c, .checkmove2
-; Ignore this move if it is reckless.
+; Ignore this move if it is reckless.
push hl
push de
push bc
@@ -3351,7 +3351,7 @@
pop hl
jr c, .checkmove2
-; If we made it this far, discourage this move.
+; If we made it this far, discourage this move.
inc [hl]
jr .checkmove2
@@ -3384,7 +3384,7 @@
callab BattleCommand_Stab
ret
-.ConstantDamageEffects
+.ConstantDamageEffects:
db EFFECT_SUPER_FANG
db EFFECT_STATIC_DAMAGE
db EFFECT_LEVEL_DAMAGE
@@ -3550,7 +3550,7 @@
call AICheckEnemyMaxHP
jr c, .nextmove
-; Else, 80% chance to exclude them.
+; Else, 80% chance to exclude them.
call Random
cp 200 ; 1/5
jr c, .nextmove
--- a/battle/ai/switch.asm
+++ b/battle/ai/switch.asm
@@ -161,7 +161,7 @@
.doubledown
call .DecreaseScore
-
+
; fallthrough
; 34931
--- a/battle/anim_commands.asm
+++ b/battle/anim_commands.asm
@@ -980,7 +980,7 @@
GetSubstitutePic: ; cc64c
ld hl, sScratch
- ld bc, $310
+ ld bc, (7 * 7) tiles
.loop
xor a
ld [hli], a
@@ -994,16 +994,16 @@
jr z, .player
ld hl, MonsterSpriteGFX + 0 tiles
- ld de, sScratch + $13 tiles
+ ld de, sScratch + (2 * 7 + 5) tiles
call .CopyTile
ld hl, MonsterSpriteGFX + 1 tiles
- ld de, sScratch + $1a tiles
+ ld de, sScratch + (3 * 7 + 5) tiles
call .CopyTile
ld hl, MonsterSpriteGFX + 2 tiles
- ld de, sScratch + $14 tiles
+ ld de, sScratch + (2 * 7 + 6) tiles
call .CopyTile
ld hl, MonsterSpriteGFX + 3 tiles
- ld de, sScratch + $1b tiles
+ ld de, sScratch + (3 * 7 + 6) tiles
call .CopyTile
ld hl, VTiles2 tile $00
@@ -1014,16 +1014,16 @@
.player
ld hl, MonsterSpriteGFX + 4 tiles
- ld de, sScratch + $10 tiles
+ ld de, sScratch + (2 * 6 + 4) tiles
call .CopyTile
ld hl, MonsterSpriteGFX + 5 tiles
- ld de, sScratch + $16 tiles
+ ld de, sScratch + (3 * 6 + 4) tiles
call .CopyTile
ld hl, MonsterSpriteGFX + 6 tiles
- ld de, sScratch + $11 tiles
+ ld de, sScratch + (2 * 6 + 5) tiles
call .CopyTile
ld hl, MonsterSpriteGFX + 7 tiles
- ld de, sScratch + $17 tiles
+ ld de, sScratch + (3 * 6 + 5) tiles
call .CopyTile
ld hl, VTiles2 tile $31
--- a/battle/anim_gfx.asm
+++ b/battle/anim_gfx.asm
@@ -1,41 +1,41 @@
AnimObj00GFX: ; 84a2e
-AnimObj01GFX: INCBIN "gfx/fx/001.2bpp.lz"
-AnimObj02GFX: INCBIN "gfx/fx/002.2bpp.lz"
-AnimObj03GFX: INCBIN "gfx/fx/003.2bpp.lz"
-AnimObj04GFX: INCBIN "gfx/fx/004.2bpp.lz"
-AnimObj05GFX: INCBIN "gfx/fx/005.2bpp.lz"
-AnimObj07GFX: INCBIN "gfx/fx/007.2bpp.lz"
-AnimObj08GFX: INCBIN "gfx/fx/008.2bpp.lz"
-AnimObj10GFX: INCBIN "gfx/fx/010.2bpp.lz"
-AnimObj09GFX: INCBIN "gfx/fx/009.2bpp.lz"
-AnimObj12GFX: INCBIN "gfx/fx/012.2bpp.lz"
-AnimObj06GFX: INCBIN "gfx/fx/006.2bpp.lz"
-AnimObj11GFX: INCBIN "gfx/fx/011.2bpp.lz"
-AnimObj13GFX: INCBIN "gfx/fx/013.2bpp.lz"
-AnimObj14GFX: INCBIN "gfx/fx/014.2bpp.lz"
-AnimObj24GFX: INCBIN "gfx/fx/024.2bpp.lz"
-AnimObj15GFX: INCBIN "gfx/fx/015.2bpp.lz"
-AnimObj16GFX: INCBIN "gfx/fx/016.2bpp.lz"
-AnimObj17GFX: INCBIN "gfx/fx/017.2bpp.lz"
-AnimObj18GFX: INCBIN "gfx/fx/018.2bpp.lz"
-AnimObj19GFX: INCBIN "gfx/fx/019.2bpp.lz"
-AnimObj20GFX: INCBIN "gfx/fx/020.2bpp.lz"
-AnimObj22GFX: INCBIN "gfx/fx/022.2bpp.lz"
-AnimObj21GFX: INCBIN "gfx/fx/021.2bpp.lz"
-AnimObj23GFX: INCBIN "gfx/fx/023.2bpp.lz"
-AnimObj26GFX: INCBIN "gfx/fx/026.2bpp.lz"
-AnimObj27GFX: INCBIN "gfx/fx/027.2bpp.lz"
-AnimObj28GFX: INCBIN "gfx/fx/028.2bpp.lz"
-AnimObj29GFX: INCBIN "gfx/fx/029.2bpp.lz"
-AnimObj30GFX: INCBIN "gfx/fx/030.2bpp.lz"
-AnimObj31GFX: INCBIN "gfx/fx/031.2bpp.lz"
-AnimObj32GFX: INCBIN "gfx/fx/032.2bpp.lz"
-AnimObj33GFX: INCBIN "gfx/fx/033.2bpp.lz"
-AnimObj34GFX: INCBIN "gfx/fx/034.2bpp.lz"
-AnimObj25GFX: INCBIN "gfx/fx/025.2bpp.lz"
-AnimObj35GFX: INCBIN "gfx/fx/035.2bpp.lz"
-AnimObj36GFX: INCBIN "gfx/fx/036.2bpp.lz"
-AnimObj37GFX: INCBIN "gfx/fx/037.2bpp.lz"
-AnimObj38GFX: INCBIN "gfx/fx/038.2bpp.lz"
-AnimObj39GFX: INCBIN "gfx/fx/039.2bpp.lz"
+AnimObjHitGFX: INCBIN "gfx/fx/hit.2bpp.lz"
+AnimObjCutGFX: INCBIN "gfx/fx/cut.2bpp.lz"
+AnimObjFireGFX: INCBIN "gfx/fx/fire.2bpp.lz"
+AnimObjWaterGFX: INCBIN "gfx/fx/water.2bpp.lz"
+AnimObjLightningGFX: INCBIN "gfx/fx/lightning.2bpp.lz"
+AnimObjSmokeGFX: INCBIN "gfx/fx/smoke.2bpp.lz"
+AnimObjExplosionGFX: INCBIN "gfx/fx/explosion.2bpp.lz"
+AnimObjIceGFX: INCBIN "gfx/fx/ice.2bpp.lz"
+AnimObjRocksGFX: INCBIN "gfx/fx/rocks.2bpp.lz"
+AnimObjPoisonGFX: INCBIN "gfx/fx/poison.2bpp.lz"
+AnimObjPlantGFX: INCBIN "gfx/fx/plant.2bpp.lz"
+AnimObjPokeBallGFX: INCBIN "gfx/fx/pokeball.2bpp.lz"
+AnimObjBubbleGFX: INCBIN "gfx/fx/bubble.2bpp.lz"
+AnimObjNoiseGFX: INCBIN "gfx/fx/noise.2bpp.lz"
+AnimObjReflectGFX: INCBIN "gfx/fx/reflect.2bpp.lz"
+AnimObjPowderGFX: INCBIN "gfx/fx/powder.2bpp.lz"
+AnimObjBeamGFX: INCBIN "gfx/fx/beam.2bpp.lz"
+AnimObjSpeedGFX: INCBIN "gfx/fx/speed.2bpp.lz"
+AnimObjChargeGFX: INCBIN "gfx/fx/charge.2bpp.lz"
+AnimObjWindGFX: INCBIN "gfx/fx/wind.2bpp.lz"
+AnimObjWhipGFX: INCBIN "gfx/fx/whip.2bpp.lz"
+AnimObjRopeGFX: INCBIN "gfx/fx/rope.2bpp.lz"
+AnimObjEggGFX: INCBIN "gfx/fx/egg.2bpp.lz"
+AnimObjPsychicGFX: INCBIN "gfx/fx/psychic.2bpp.lz"
+AnimObjSandGFX: INCBIN "gfx/fx/sand.2bpp.lz"
+AnimObjWebGFX: INCBIN "gfx/fx/web.2bpp.lz"
+AnimObjHazeGFX: INCBIN "gfx/fx/haze.2bpp.lz"
+AnimObjHornGFX: INCBIN "gfx/fx/horn.2bpp.lz"
+AnimObjFlowerGFX: INCBIN "gfx/fx/flower.2bpp.lz"
+AnimObjMiscGFX: INCBIN "gfx/fx/misc.2bpp.lz"
+AnimObjSkyAttackGFX: INCBIN "gfx/fx/skyattack.2bpp.lz"
+AnimObjGlobeGFX: INCBIN "gfx/fx/globe.2bpp.lz"
+AnimObjShapesGFX: INCBIN "gfx/fx/shapes.2bpp.lz"
+AnimObjStatusGFX: INCBIN "gfx/fx/status.2bpp.lz"
+AnimObjObjectsGFX: INCBIN "gfx/fx/objects.2bpp.lz"
+AnimObjShineGFX: INCBIN "gfx/fx/shine.2bpp.lz"
+AnimObjAngelsGFX: INCBIN "gfx/fx/angels.2bpp.lz"
+AnimObjWaveGFX: INCBIN "gfx/fx/wave.2bpp.lz"
+AnimObjAeroblastGFX: INCBIN "gfx/fx/aeroblast.2bpp.lz"
; 8640e
--- a/battle/anims.asm
+++ b/battle/anims.asm
@@ -321,7 +321,7 @@
anim_jump .Shake
; c92f2
-.TheTrainerBlockedTheBall
+.TheTrainerBlockedTheBall:
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_HIT
anim_sound 6, 2, SFX_THROW_BALL
anim_obj ANIM_OBJ_16, 8, 0, 11, 4, $20
@@ -331,7 +331,7 @@
anim_ret
; c9305
-.UltraBall
+.UltraBall:
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
anim_sound 6, 2, SFX_THROW_BALL
anim_obj ANIM_OBJ_POKE_BALL, 8, 4, 11, 4, $40
@@ -345,7 +345,7 @@
anim_jump .Shake
; c9326
-.GreatBall
+.GreatBall:
anim_2gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE
anim_sound 6, 2, SFX_THROW_BALL
anim_obj ANIM_OBJ_POKE_BALL, 8, 4, 11, 4, $40
@@ -359,7 +359,7 @@
anim_jump .Shake
; c9347
-.MasterBall
+.MasterBall:
anim_3gfx ANIM_GFX_POKE_BALL, ANIM_GFX_SMOKE, ANIM_GFX_SPEED
anim_sound 6, 2, SFX_THROW_BALL
anim_obj ANIM_OBJ_POKE_BALL, 8, 0, 11, 4, $20
@@ -380,7 +380,7 @@
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $36
anim_obj ANIM_OBJ_2B, -15, 0, 7, 0, $37
anim_wait 64
-.Shake
+.Shake:
anim_bgeffect ANIM_BG_RETURN_MON, $0, $0, $0
anim_wait 8
anim_incobj 2
@@ -394,7 +394,7 @@
anim_wait 32
anim_wait 8
anim_setvar $0
-.Loop
+.Loop:
anim_wait 48
anim_checkpokeball
anim_jumpvar $1, .Click
@@ -404,12 +404,12 @@
anim_jump .Loop
; c93bc
-.Click
+.Click:
anim_clearsprites
anim_ret
; c93be
-.BreakFree
+.BreakFree:
anim_setobj $1, $b
anim_sound 0, 1, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, -15, 0, 8, 0, $10
@@ -434,7 +434,7 @@
anim_call BattleAnim_ShowMon_0
anim_ret
-.Unknown
+.Unknown:
anim_1gfx ANIM_GFX_SMOKE
anim_call BattleAnim_FollowEnemyFeet_0
anim_bgeffect ANIM_BG_2A, $0, $1, $0
@@ -449,7 +449,7 @@
anim_call BattleAnim_ShowMon_0
anim_ret
-.Shiny
+.Shiny:
anim_1gfx ANIM_GFX_SPEED
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $3
anim_bgeffect ANIM_BG_06, $0, $2, $0
@@ -479,7 +479,7 @@
anim_wait 32
anim_ret
-.Normal
+.Normal:
anim_1gfx ANIM_GFX_SMOKE
anim_sound 0, 0, SFX_BALL_POOF
anim_obj ANIM_OBJ_1C, 5, 4, 12, 0, $0
@@ -1323,7 +1323,7 @@
BattleAnim_Thunderbolt: ; c9b66
anim_2gfx ANIM_GFX_LIGHTNING, ANIM_GFX_EXPLOSION
- anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
+ anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
anim_wait 16
anim_bgeffect ANIM_BG_FLASH_INVERTED, $0, $4, $2
anim_sound 0, 1, SFX_THUNDERSHOCK
@@ -2497,10 +2497,10 @@
anim_call BattleAnim_FollowPlayerHead_0
anim_transform
anim_sound 0, 0, SFX_PSYBEAM
- anim_bgeffect ANIM_BG_28, $0, $1, $0
+ anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
anim_wait 48
anim_updateactorpic
- anim_incbgeffect ANIM_BG_28
+ anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
anim_wait 48
anim_call BattleAnim_ShowMon_0
anim_ret
@@ -2759,10 +2759,10 @@
anim_1gfx ANIM_GFX_HIT
anim_call BattleAnim_FollowPlayerHead_0
anim_minimize
- anim_bgeffect ANIM_BG_28, $0, $1, $0
+ anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
anim_wait 48
anim_updateactorpic
- anim_incbgeffect ANIM_BG_28
+ anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
anim_wait 48
anim_call BattleAnim_ShowMon_0
anim_ret
@@ -2774,7 +2774,7 @@
anim_bgeffect ANIM_BG_27, $0, $1, $0
anim_wait 32
anim_sound 0, 0, SFX_HYPER_BEAM
- anim_obj ANIM_OBJ_6E, 6, 0, 11, 0, $40
+ anim_obj ANIM_OBJ_SKY_ATTACK_FEAROW, 6, 0, 11, 0, $40
anim_wait 64
anim_incobj 1
anim_wait 21
@@ -2805,7 +2805,7 @@
BattleAnim_Lick: ; ca7e5
anim_1gfx ANIM_GFX_WATER
anim_sound 0, 1, SFX_LICK
- anim_obj ANIM_OBJ_6F, -15, 0, 7, 0, $0
+ anim_obj ANIM_OBJ_LICK, -15, 0, 7, 0, $0
anim_wait 64
anim_ret
; ca7f1
@@ -3025,9 +3025,9 @@
anim_1gfx ANIM_GFX_HIT
anim_call BattleAnim_FollowEnemyFeet_0
anim_sound 0, 0, SFX_PSYBEAM
- anim_bgeffect ANIM_BG_28, $0, $1, $0
+ anim_bgeffect ANIM_BG_WAVE_DEFORM_USER, $0, $1, $0
anim_wait 48
- anim_incbgeffect ANIM_BG_28
+ anim_incbgeffect ANIM_BG_WAVE_DEFORM_USER
anim_wait 48
anim_call BattleAnim_ShowMon_0
anim_ret
@@ -3550,7 +3550,7 @@
anim_obp0 $54
anim_1gfx ANIM_GFX_MISC
anim_sound 0, 1, SFX_POWDER
-.loop: ; cae8b
+.loop ; cae8b
anim_obj ANIM_OBJ_81, -16, 4, 4, 0, $0
anim_wait 8
anim_loop 5, .loop
@@ -3592,7 +3592,7 @@
BattleAnim_PowderSnow: ; caee2
anim_1gfx ANIM_GFX_ICE
-.loop: ; caee4
+.loop ; caee4
anim_sound 6, 2, SFX_SHINE
anim_obj ANIM_OBJ_8F, 8, 0, 11, 0, $23
anim_wait 2
@@ -3765,13 +3765,13 @@
BattleAnim_Spikes: ; cb092
anim_1gfx ANIM_GFX_MISC
anim_sound 6, 2, SFX_MENU
- anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $20
+ anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $20
anim_wait 8
anim_sound 6, 2, SFX_MENU
- anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $30
+ anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $30
anim_wait 8
anim_sound 6, 2, SFX_MENU
- anim_obj ANIM_OBJ_8E, 6, 0, 11, 0, $28
+ anim_obj ANIM_OBJ_SPIKES, 6, 0, 11, 0, $28
anim_wait 64
anim_ret
; cb0b0
@@ -3784,7 +3784,7 @@
anim_obj ANIM_OBJ_A3, 8, 0, 11, 4, $2
anim_wait 40
anim_sound 0, 1, SFX_THUNDERSHOCK
- anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
+ anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
anim_wait 16
anim_obj ANIM_OBJ_31, -15, 0, 7, 0, $0
anim_wait 128
@@ -3830,14 +3830,14 @@
anim_bgeffect ANIM_BG_06, $0, $2, $0
anim_bgeffect ANIM_BG_ALTERNATE_HUES, $0, $2, $0
anim_sound 0, 2, SFX_PERISH_SONG
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $0
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $8
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $10
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $18
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $20
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $28
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $30
- anim_obj ANIM_OBJ_A6, 11, 0, 0, 0, $38
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $0
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $8
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $10
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $18
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $20
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $28
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $30
+ anim_obj ANIM_OBJ_PERISH_SONG, 11, 0, 0, 0, $38
anim_wait 112
anim_ret
; cb14c
@@ -4087,7 +4087,7 @@
anim_incobj 2
anim_wait 1
anim_sound 0, 1, SFX_THUNDERSHOCK
- anim_obj ANIM_OBJ_32, -15, 0, 7, 0, $2
+ anim_obj ANIM_OBJ_LIGHTNING_BOLT, -15, 0, 7, 0, $2
anim_obj ANIM_OBJ_33, -15, 0, 7, 0, $0
anim_wait 32
anim_ret
--- a/battle/bg_effects.asm
+++ b/battle/bg_effects.asm
@@ -236,7 +236,7 @@
call EndBattleBGEffect
ret
-.Pals
+.Pals:
db %11100100
db %11100000
db %11010000
@@ -254,7 +254,7 @@
call EndBattleBGEffect
ret
-.Pals
+.Pals:
db %11100100
db %11110100
db %11111000
@@ -273,7 +273,7 @@
call EndBattleBGEffect
ret
-.Pals
+.Pals:
db %11100100
db %11111000
db %11111100
@@ -298,12 +298,12 @@
ld [wOBP0], a
ret
-.PalsCGB
+.PalsCGB:
db %11100100
db %10010000
db -2
-.PalsSGB
+.PalsSGB:
db %11110000
db %11000000
db -2
@@ -322,12 +322,12 @@
ld [wOBP0], a
ret
-.PalsCGB
+.PalsCGB:
db %11100100
db %11011000
db -2
-.PalsSGB
+.PalsSGB:
db %11110000
db %11001100
db -2
@@ -339,7 +339,7 @@
ld [wBGP], a
ret
-.Pals
+.Pals:
db %00011011
db %01100011
db %10000111
@@ -405,10 +405,10 @@
call BattleBGEffect_RunPicResizeScript
ret
-.PlayerData
+.PlayerData:
db 0, $31, 0
db -1
-.EnemyData
+.EnemyData:
db 3, $00, 3
db -1
; c8214
@@ -670,12 +670,12 @@
call BattleBGEffect_RunPicResizeScript
ret
-.PlayerData
+.PlayerData:
db 2, $31, 2
db 1, $31, 1
db 0, $31, 0
db -1
-.EnemyData
+.EnemyData:
db 5, $00, 5
db 4, $00, 4
db 3, $00, 3
@@ -698,7 +698,7 @@
call BattleBGEffect_RunPicResizeScript
ret
-.PlayerData
+.PlayerData:
db 0, $31, 0
db -2, $66, 0
db 1, $31, 1
@@ -707,7 +707,7 @@
db -2, $22, 2
db -3, $00, 0
db -1
-.EnemyData
+.EnemyData:
db 3, $00, 3
db -2, $77, 3
db 4, $00, 4
@@ -773,7 +773,7 @@
call EndBattleBGEffect
ret
-.ClearBox
+.ClearBox:
; get dims
push bc
inc hl
@@ -798,7 +798,7 @@
pop bc
ret
-.PlaceGraphic
+.PlaceGraphic:
; get dims
push bc
push hl
@@ -858,7 +858,7 @@
pop bc
ret
-.Coords
+.Coords:
dwcoord 2, 6
dwcoord 3, 8
dwcoord 4, 10
@@ -866,7 +866,7 @@
dwcoord 13, 2
dwcoord 14, 4
-.BGSquares
+.BGSquares:
bgsquare: MACRO
dn \1,\2
dw \3
@@ -879,7 +879,7 @@
bgsquare 5, 5, .FiveByFive
bgsquare 3, 3, .ThreeByThree
-.SixBySix
+.SixBySix:
db $00, $06, $0c, $12, $18, $1e
db $01, $07, $0d, $13, $19, $1f
db $02, $08, $0e, $14, $1a, $20
@@ -887,17 +887,17 @@
db $04, $0a, $10, $16, $1c, $22
db $05, $0b, $11, $17, $1d, $23
-.FourByFour
+.FourByFour:
db $00, $0c, $12, $1e
db $02, $0e, $14, $20
db $03, $0f, $15, $21
db $05, $11, $17, $23
-.TwoByTwo
+.TwoByTwo:
db $00, $1e
db $05, $23
-.SevenBySeven
+.SevenBySeven:
db $00, $07, $0e, $15, $1c, $23, $2a
db $01, $08, $0f, $16, $1d, $24, $2b
db $02, $09, $10, $17, $1e, $25, $2c
@@ -906,7 +906,7 @@
db $05, $0c, $13, $1a, $21, $28, $2f
db $06, $0d, $14, $1b, $22, $29, $30
-.FiveByFive
+.FiveByFive:
db $00, $07, $15, $23, $2a
db $01, $08, $16, $24, $2b
db $03, $0a, $18, $26, $2d
@@ -913,7 +913,7 @@
db $05, $0c, $1a, $28, $2f
db $06, $0d, $1b, $29, $30
-.ThreeByThree
+.ThreeByThree:
db $00, $15, $2a
db $03, $18, $2d
db $06, $1b, $30
@@ -945,7 +945,7 @@
call BattleAnim_ResetLCDStatCustom
ret
-.RotatewSurfWaveBGEffect
+.RotatewSurfWaveBGEffect:
ld hl, wSurfWaveBGEffect
ld de, wSurfWaveBGEffect + 1
ld c, wSurfWaveBGEffectEnd - wSurfWaveBGEffect - 1
@@ -1218,7 +1218,7 @@
.four
ret
-.UpdateLYOverrides
+.UpdateLYOverrides:
ld e, a
xor $ff
inc a
@@ -1893,7 +1893,7 @@
call BattleBGEffects_IncrementJumptable
ret
-.SetLYOverridesBackup
+.SetLYOverridesBackup:
ld e, a
ld a, [hFFC7]
ld l, a
@@ -1913,7 +1913,7 @@
call BattleBGEffects_ResetVideoHRAM
ret
-.GetLYOverride
+.GetLYOverride:
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
@@ -2042,7 +2042,7 @@
ld [wOBP1], a
ret
-.DMG_LYOverrideLoads
+.DMG_LYOverrideLoads:
ld hl, LYOverridesBackup
.loop1
ld [hl], d
@@ -2061,7 +2061,7 @@
call BatttleBGEffects_GetNamedJumptablePointer
jp [hl]
-.Jumptable
+.Jumptable:
dw .cgb_zero
dw .cgb_one
dw .cgb_two
@@ -2118,12 +2118,12 @@
call EndBattleBGEffect
ret
-.CGB_DMGEnemyData
+.CGB_DMGEnemyData:
db $e4, $e4
db $f8, $90
db $fc, $40
db $f8, $90
-.DMG_PlayerData
+.DMG_PlayerData:
db $e4, $e4
db $90, $f8
db $40, $fc
@@ -2135,7 +2135,7 @@
call BGEffect_RapidCyclePals
ret
-.FlashPals
+.FlashPals:
db $e4, $6c, $fe
; c8bf2
@@ -2144,7 +2144,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $e4, $90, $40, $ff
; c8bfd
@@ -2153,7 +2153,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $e4, $f8, $fc, $ff
; c8c08
@@ -2162,7 +2162,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $e4, $90, $40, $90, $fe
; c8c14
@@ -2171,7 +2171,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $e4, $f8, $fc, $f8, $fe
; c8c20
@@ -2180,7 +2180,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $e4, $f8, $fc, $f8, $e4, $90, $40, $90, $fe
; c8c30
@@ -2189,7 +2189,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $e4, $fc, $e4, $00, $fe
; c8c3c
@@ -2198,7 +2198,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $e4, $90, $40, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $40, $90, $e4, $ff
; c8c55
@@ -2207,7 +2207,7 @@
call BGEffect_RapidCyclePals
ret
-.Pals
+.Pals:
db $00, $40, $90, $e4, $ff
; c8c61
@@ -2218,7 +2218,7 @@
dw .one
-.zero: ; c8c68 (32:4c68)
+.zero ; c8c68 (32:4c68)
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
ld a, $43
@@ -2234,7 +2234,7 @@
ld [hl], $20
ret
-.one: ; c8c85 (32:4c85)
+.one ; c8c85 (32:4c85)
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
@@ -2264,7 +2264,7 @@
dw .two
-.zero: ; c8cab (32:4cab)
+.zero ; c8cab (32:4cab)
call BattleBGEffects_IncrementJumptable
call BattleBGEffects_ClearLYOverrides
ld a, $43
@@ -2278,7 +2278,7 @@
ld [hl], $0
ret
-.one: ; c8cc3 (32:4cc3)
+.one ; c8cc3 (32:4cc3)
ld hl, BG_EFFECT_STRUCT_03
add hl, bc
ld a, [hl]
@@ -2294,7 +2294,7 @@
ld [hl], a
ret
-.two: ; c8cdd (32:4cdd)
+.two ; c8cdd (32:4cdd)
call BattleAnim_ResetLCDStatCustom
ret
@@ -2423,13 +2423,13 @@
pop de
jp [hl]
-.Jumptable_DMG
+.Jumptable_DMG:
dw .zero_dmg
dw .one_dmg
dw .two_dmg
-.zero_dmg: ; c8d8b (32:4d8b)
+.zero_dmg ; c8d8b (32:4d8b)
call BattleBGEffects_IncrementJumptable
ld a, $e4
call BattleBGEffects_SetLYOverrides
@@ -2447,7 +2447,7 @@
ld [hl], a
ret
-.one_dmg: ; c8daa (32:4daa)
+.one_dmg ; c8daa (32:4daa)
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hl]
@@ -2472,7 +2472,7 @@
dec [hl]
ret
-.two_dmg: ; c8dc9 (32:4dc9)
+.two_dmg ; c8dc9 (32:4dc9)
call BattleBGEffects_ResetVideoHRAM
ld a, %11100100
ld [rBGP], a
@@ -2494,7 +2494,7 @@
dw .four_cgb
-.zero_cgb: ; c8de7 (32:4de7)
+.zero_cgb ; c8de7 (32:4de7)
call BGEffect_CheckBattleTurn
jr nz, .player_turn_cgb
call BattleBGEffects_IncrementJumptable
@@ -2510,7 +2510,7 @@
ld [hl], a
ret
-.one_cgb: ; c8e02 (32:4e02)
+.one_cgb ; c8e02 (32:4e02)
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hl]
@@ -2535,13 +2535,13 @@
dec [hl]
ret
-.two_cgb: ; c8e21 (32:4e21)
+.two_cgb ; c8e21 (32:4e21)
ld a, $e4
call BGEffects_LoadBGPal0_OBPal1
call EndBattleBGEffect
ret
-.three_cgb: ; c8e2a (32:4e2a)
+.three_cgb ; c8e2a (32:4e2a)
ld hl, BG_EFFECT_STRUCT_BATTLE_TURN
add hl, bc
ld a, [hl]
@@ -2566,7 +2566,7 @@
dec [hl]
ret
-.four_cgb: ; c8e49 (32:4e49)
+.four_cgb ; c8e49 (32:4e49)
ld a, $e4
call BGEffects_LoadBGPal1_OBPal0
call EndBattleBGEffect
@@ -2836,7 +2836,7 @@
and a
ret
-.GetLYOverrideBackupAddrOffset
+.GetLYOverrideBackupAddrOffset:
ld a, [hFFC7]
ld e, a
ld a, [wBattleAnimTemp0]
--- a/battle/core.asm
+++ b/battle/core.asm
@@ -7,7 +7,7 @@
ld [wPlayerAction], a
ld [BattleEnded], a
inc a
- ld [wd264], a
+ ld [wAISwitch], a
ld hl, OTPartyMon1HP
ld bc, PARTYMON_STRUCT_LENGTH - 1
ld d, BATTLEACTION_SWITCH1 - 1
@@ -60,7 +60,7 @@
xor a
ld [CurPartyMon], a
.loop2
- call CheckIfPartyHasPkmnToBattleWith
+ call CheckIfCurPartyMonIsFitToFight
jr nz, .alive2
ld hl, CurPartyMon
inc [hl]
@@ -170,7 +170,7 @@
xor a
ld [wPlayerIsSwitching], a
ld [wEnemyIsSwitching], a
- ld [wd264], a
+ ld [wAISwitch], a
ld [wPlayerJustGotFrozen], a
ld [wEnemyJustGotFrozen], a
ld [CurDamage], a
@@ -273,7 +273,7 @@
ret c
jr .NoMoreFaintingConditions
-.CheckEnemyFirst
+.CheckEnemyFirst:
call CheckFaint_EnemyThenPlayer
ret c
call HandleFutureSight
@@ -289,7 +289,7 @@
call CheckFaint_EnemyThenPlayer
ret c
-.NoMoreFaintingConditions
+.NoMoreFaintingConditions:
call HandleLeftovers
call HandleMysteryberry
call HanleDefrost
@@ -310,7 +310,7 @@
and a
jr nz, .BattleIsOver
-.PlayerNotFainted
+.PlayerNotFainted:
call HasEnemyFainted
jr nz, .BattleContinues
call HandleEnemyMonFaint
@@ -318,11 +318,11 @@
and a
jr nz, .BattleIsOver
-.BattleContinues
+.BattleContinues:
and a
ret
-.BattleIsOver
+.BattleIsOver:
scf
ret
; 3c25c
@@ -335,7 +335,7 @@
and a
jr nz, .BattleIsOver
-.EnemyNotFainted
+.EnemyNotFainted:
call HasPlayerFainted
jr nz, .BattleContinues
call HandlePlayerMonFaint
@@ -343,11 +343,11 @@
and a
jr nz, .BattleIsOver
-.BattleContinues
+.BattleContinues:
and a
ret
-.BattleIsOver
+.BattleIsOver:
scf
ret
; 3c27c
@@ -565,7 +565,7 @@
ret
; 3c3f3
-.enemy_first: ; 3c3f3
+.enemy_first ; 3c3f3
and a
ret
; 3c3f5
@@ -816,11 +816,11 @@
call IsInArray
jr c, .Flee
-.Stay
+.Stay:
and a
ret
-.Flee
+.Flee:
scf
ret
; 3c59a
@@ -1218,7 +1218,7 @@
call SetEnemyTurn
jp .do_it
-.EnemyFirst
+.EnemyFirst:
call SetEnemyTurn
call .do_it
call SetPlayerTurn
@@ -1287,7 +1287,7 @@
call SetEnemyTurn
jp .do_it
-.EnemyFirst
+.EnemyFirst:
call SetEnemyTurn
call .do_it
call SetPlayerTurn
@@ -1359,7 +1359,7 @@
call SetEnemyTurn
jp .do_it
-.DoEnemyFirst
+.DoEnemyFirst:
call SetEnemyTurn
call .do_it
call SetPlayerTurn
@@ -1409,7 +1409,7 @@
call SetEnemyTurn
jp .do_it
-.DoEnemyFirst
+.DoEnemyFirst:
call SetEnemyTurn
call .do_it
call SetPlayerTurn
@@ -1667,7 +1667,7 @@
.player1
call .CheckEnemy
-.CheckPlayer
+.CheckPlayer:
ld a, [PlayerScreens]
bit SCREENS_SAFEGUARD, a
ret z
@@ -1679,7 +1679,7 @@
xor a
jr .print
-.CheckEnemy
+.CheckEnemy:
ld a, [EnemyScreens]
bit SCREENS_SAFEGUARD, a
ret z
@@ -1703,10 +1703,10 @@
call .CheckPlayer
jr .CheckEnemy
-.Both
+.Both:
call .CheckEnemy
-.CheckPlayer
+.CheckPlayer:
call SetPlayerTurn
ld de, .Your
call .Copy
@@ -1714,7 +1714,7 @@
ld de, PlayerLightScreenCount
jr .TickScreens
-.CheckEnemy
+.CheckEnemy:
call SetEnemyTurn
ld de, .Enemy
call .Copy
@@ -1721,7 +1721,7 @@
ld hl, EnemyScreens
ld de, EnemyLightScreenCount
-.TickScreens
+.TickScreens:
bit SCREENS_LIGHT_SCREEN, [hl]
call nz, .LightScreenTick
bit SCREENS_REFLECT, [hl]
@@ -1728,14 +1728,14 @@
call nz, .ReflectTick
ret
-.Copy
+.Copy:
ld hl, StringBuffer1
jp CopyName2
; 3cb75
-.Your
+.Your:
db "Your@"
-.Enemy
+.Enemy:
db "Enemy@"
; 3cb80
@@ -1797,7 +1797,7 @@
call .SandstormDamage
call SetPlayerTurn
-.SandstormDamage
+.SandstormDamage:
ld a, BATTLE_VARS_SUBSTATUS3
call GetBattleVar
bit SUBSTATUS_UNDERGROUND, a
@@ -1844,7 +1844,7 @@
ld [Weather], a
ret
-.PrintWeatherMessage
+.PrintWeatherMessage:
ld a, [Weather]
dec a
ld c, a
@@ -1857,11 +1857,11 @@
jp StdBattleTextBox
; 3cc2d
-.WeatherMessages
+.WeatherMessages:
dw BattleText_RainContinuesToFall
dw BattleText_TheSunlightIsStrong
dw BattleText_TheSandstormRages
-.WeatherEndedMessages
+.WeatherEndedMessages:
dw BattleText_TheRainStopped
dw BattleText_TheSunlightFaded
dw BattleText_TheSandstormSubsided
@@ -2497,7 +2497,7 @@
call PrintWinLossText
.skip_win_loss_text
- jp HandleBattleReward
+ jp .GiveMoney
.mobile
call BattleWinSlideInEnemyTrainerFrontpic
@@ -2524,9 +2524,8 @@
call ClearTileMap
call ClearBGPalettes
ret
-; 3d02b
-HandleBattleReward: ; 3d02b
+.GiveMoney:
ld a, [wAmuletCoin]
and a
call nz, .DoubleReward
@@ -2579,7 +2578,7 @@
ld l, a
jp StdBattleTextBox
-.KeepItAll
+.KeepItAll:
ld hl, GotMoneyForWinningText
jp StdBattleTextBox
; 3d081
@@ -3024,7 +3023,7 @@
call JumpToPartyMenuAndPrintText
call SelectBattleMon
ret c
- call CheckIfPartyHasPkmnToBattleWith
+ call CheckIfCurPartyMonIsFitToFight
jr z, .loop
xor a
ret
@@ -3144,7 +3143,7 @@
call SetPalettes
jr .end
-.LostLinkBattle
+.LostLinkBattle:
call UpdateEnemyMonInParty
call CheckEnemyTrainerDefeated
jr nz, .not_tied
@@ -3203,13 +3202,13 @@
ld [wcfbe], a
ld b, 7
-.OuterLoop
+.OuterLoop:
push bc
push de
push hl
ld b, 6
-.InnerLoop
+.InnerLoop:
push bc
push hl
push de
@@ -3247,7 +3246,7 @@
ret
; 3d488
-.Spaces
+.Spaces:
db " @"
; 3d490
@@ -3373,14 +3372,14 @@
.not_linked
ld a, [wEnemySwitchMonIndex]
and a
- jr z, .check_wd264
+ jr z, .check_wAISwitch
dec a
ld b, a
jr .return_carry
-.check_wd264
- ld a, [wd264]
+.check_wAISwitch
+ ld a, [wAISwitch]
and a
ld b, $0
jr nz, .return_carry
@@ -3656,7 +3655,7 @@
; 3d714
CheckWhetherToAskSwitch: ; 3d714
- ld a, [wd264]
+ ld a, [wAISwitch]
dec a
jp z, .return_nc
ld a, [PartyCount]
@@ -3836,19 +3835,19 @@
xor a
ld hl, PartyMon1HP
ld bc, PartyMon2 - (PartyMon1 + 1)
-.asm_3d87e
+.loop
or [hl]
inc hl
or [hl]
add hl, bc
dec e
- jr nz, .asm_3d87e
+ jr nz, .loop
ld d, a
ret
; 3d887
-CheckIfPartyHasPkmnToBattleWith: ; 3d887
+CheckIfCurPartyMonIsFitToFight: ; 3d887
ld a, [CurPartyMon]
ld hl, PartyMon1HP
call GetPartyLocation
@@ -3856,9 +3855,9 @@
or [hl]
ret nz
- ld a, [wd264]
+ ld a, [wAISwitch]
and a
- jr nz, .asm_3d8b1
+ jr nz, .finish_fail
ld hl, PartySpecies
ld a, [CurPartyMon]
ld c, a
@@ -3867,14 +3866,14 @@
ld a, [hl]
cp EGG
ld hl, BattleText_AnEGGCantBattle
- jr z, .asm_3d8ae
+ jr z, .print_textbox
ld hl, BattleText_TheresNoWillToBattle
-.asm_3d8ae
+.print_textbox
call StdBattleTextBox
-.asm_3d8b1
+.finish_fail
xor a
ret
; 3d8b3
@@ -4501,6 +4500,8 @@
ld hl, BattleMonMaxHP
.go
+; If, and only if, Pokemon's HP is less than half max, use the item.
+; Store current HP in Buffer 3/4
push bc
ld a, [de]
ld [Buffer3], a
@@ -4528,6 +4529,7 @@
.less
call ItemRecoveryAnim
+ ; store max HP in Buffer1/2
ld a, [hli]
ld [Buffer2], a
ld a, [hl]
@@ -4653,7 +4655,7 @@
ret
; 3de44
-.Statuses ; 3de44
+.Statuses: ; 3de44
db HELD_HEAL_POISON, 1 << PSN
db HELD_HEAL_FREEZE, 1 << FRZ
db HELD_HEAL_BURN, 1 << BRN
@@ -4777,7 +4779,7 @@
ret
; 3defc
-.StatUpItems
+.StatUpItems:
dbw HELD_ATTACK_UP, BattleCommand_AttackUp
dbw HELD_DEFENSE_UP, BattleCommand_DefenseUp
dbw HELD_SPEED_UP, BattleCommand_SpeedUp
@@ -5345,18 +5347,18 @@
jr z, .Cancel
jr .loop
-.PressedB
+.PressedB:
call CheckMobileBattleError
jr c, .Cancel
jr BattleMenuPKMN_Loop
-.Stats
+.Stats:
call Battle_StatsScreen
call CheckMobileBattleError
jr c, .Cancel
jp BattleMenuPKMN_ReturnFromStats
-.Cancel
+.Cancel:
call ClearSprites
call ClearPalettes
call DelayFrame
@@ -5434,7 +5436,7 @@
jp BattleMenuPKMN_Loop
.try_switch
- call CheckIfPartyHasPkmnToBattleWith
+ call CheckIfCurPartyMonIsFitToFight
jp z, BattleMenuPKMN_Loop
ld a, [CurBattleMon]
ld [LastPlayerMon], a
@@ -5675,15 +5677,15 @@
ld c, $2c
ld a, [wMoveSelectionMenuType]
dec a
- ld b, $c1
+ ld b, D_DOWN | D_UP | A_BUTTON
jr z, .okay
dec a
- ld b, $c3
+ ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON
jr z, .okay
ld a, [wLinkMode]
and a
jr nz, .okay
- ld b, $c7
+ ld b, D_DOWN | D_UP | A_BUTTON | B_BUTTON | SELECT
.okay
ld a, b
@@ -5727,6 +5729,7 @@
bit SELECT_F, a
jp nz, .pressed_select
bit B_BUTTON_F, a
+ ; A button
push af
xor a
@@ -5981,9 +5984,9 @@
ret
; 3e74f
-.Disabled
+.Disabled:
db "Disabled!@"
-.Type
+.Type:
db "TYPE/@"
; 3e75f
@@ -6106,7 +6109,7 @@
jp .finish
.skip_encore
- call CheckSubstatus_RechargeChargedRampageBideRollout
+ call CheckEnemyLockedIn
jp nz, ResetVarsForSubstatusRage
jr .continue
@@ -6173,7 +6176,7 @@
.skip_load
call SetEnemyTurn
callab UpdateMoveData
- call CheckSubstatus_RechargeChargedRampageBideRollout
+ call CheckEnemyLockedIn
jr nz, .raging
xor a
ld [wEnemyCharging], a
@@ -6219,7 +6222,7 @@
ret
; 3e8d1
-CheckSubstatus_RechargeChargedRampageBideRollout: ; 3e8d1
+CheckEnemyLockedIn: ; 3e8d1
ld a, [EnemySubStatus4]
and 1 << SUBSTATUS_RECHARGE
ret nz
@@ -6288,7 +6291,7 @@
jr .UpdateItem
-.WildItem
+.WildItem:
; In a wild battle, we pull from the item slots in BaseData
; Force Item1
@@ -6318,7 +6321,7 @@
ld a, [BaseItems+1]
-.UpdateItem
+.UpdateItem:
ld [EnemyMonItem], a
@@ -6344,7 +6347,7 @@
jp .Happiness
-.InitDVs
+.InitDVs:
; Trainer DVs
@@ -6400,7 +6403,7 @@
jr .UpdateDVs
-.NotRoaming
+.NotRoaming:
; Register a contains BattleType
; Forced shiny battle type
@@ -6412,7 +6415,7 @@
ld c, SPDSPCDV_SHINY ; $aa
jr .UpdateDVs
-.GenerateDVs
+.GenerateDVs:
; Generate new random DVs
call BattleRandom
ld b, a
@@ -6419,7 +6422,7 @@
call BattleRandom
ld c, a
-.UpdateDVs
+.UpdateDVs:
; Input DVs in register bc
ld hl, EnemyMonDVs
ld a, b
@@ -6450,7 +6453,7 @@
jr c, .GenerateDVs ; try again
-.Magikarp
+.Magikarp:
; Skimming this part recommended
ld a, [TempEnemyMonSpecies]
@@ -6485,7 +6488,7 @@
cp a, $40
jr nc, .GenerateDVs
-.CheckMagikarpArea
+.CheckMagikarpArea:
; The z checks are supposed to be nz
; Instead, all maps in GROUP_LAKE_OF_RAGE (mahogany area)
; and routes 20 and 44 are treated as Lake of Rage
@@ -6513,7 +6516,7 @@
; Finally done with DVs
-.Happiness
+.Happiness:
; Set happiness
ld a, BASE_HAPPINESS
ld [EnemyMonHappiness], a
@@ -6540,7 +6543,7 @@
bit SUBSTATUS_TRANSFORMED, a
jp nz, .Moves
-.TreeMon
+.TreeMon:
; If we're headbutting trees, some monsters enter battle asleep
call CheckSleepingTreeMon
ld a, SLP ; Asleep for 7 turns
@@ -6548,7 +6551,7 @@
; Otherwise, no status
xor a
-.UpdateStatus
+.UpdateStatus:
ld hl, EnemyMonStatus
ld [hli], a
@@ -6578,7 +6581,7 @@
ld [EnemyMonHP + 1], a
jr .Moves
-.InitRoamHP
+.InitRoamHP:
; HP only uses the lo byte in the RoamMon struct since
; Raikou/Entei/Suicune will have < 256 hp at level 40
ld a, [EnemyMonHP + 1]
@@ -6586,7 +6589,7 @@
jr .Moves
-.OpponentParty
+.OpponentParty:
; Get HP from the party struct
ld hl, (OTPartyMon1HP + 1)
ld a, [CurPartyMon]
@@ -6606,7 +6609,7 @@
ld [EnemyMonStatus], a
-.Moves
+.Moves:
ld hl, BaseType1
ld de, EnemyMonType1
ld a, [hli]
@@ -6629,7 +6632,7 @@
call CopyBytes
jr .PP
-.WildMoves
+.WildMoves:
; Clear EnemyMonMoves
xor a
ld h, d
@@ -6643,7 +6646,7 @@
; Fill moves based on level
predef FillMoves
-.PP
+.PP:
; Trainer battle?
ld a, [wBattleMode]
cp a, TRAINER_BATTLE
@@ -6655,7 +6658,7 @@
predef FillPP
jr .Finish
-.TrainerPP
+.TrainerPP:
; Copy PP from the party struct
ld hl, OTPartyMon1PP
ld a, [CurPartyMon]
@@ -6664,7 +6667,7 @@
ld bc, NUM_MOVES
call CopyBytes
-.Finish
+.Finish:
; Only the first five base stats are copied..
ld hl, BaseStats
ld de, EnemyMonBaseStats
@@ -6734,7 +6737,7 @@
jr z, .Check
ld hl, .Nite
-.Check
+.Check:
ld a, [TempEnemyMonSpecies]
ld de, 1 ; length of species id
call IsInArray
@@ -6741,11 +6744,11 @@
; If it's a match, the opponent is asleep
ret c
-.NotSleeping
+.NotSleeping:
and a
ret
-.Nite
+.Nite:
db CATERPIE
db METAPOD
db BUTTERFREE
@@ -6759,7 +6762,7 @@
db AIPOM
db -1 ; end
-.Day
+.Day:
db VENONAT
db HOOTHOOT
db NOCTOWL
@@ -6767,7 +6770,7 @@
db HERACROSS
db -1 ; end
-.Morn
+.Morn:
db VENONAT
db HOOTHOOT
db NOCTOWL
@@ -6824,22 +6827,22 @@
and a
ret
-.LetterSets
+.LetterSets:
dw .Set1
dw .Set2
dw .Set3
dw .Set4
-.Set1
+.Set1:
; A B C D E F G H I J K
db 01, 02, 03, 04, 05, 06, 07, 08, 09, 10, 11, $ff
-.Set2
+.Set2:
; L M N O P Q R
db 12, 13, 14, 15, 16, 17, 18, $ff
-.Set3
+.Set3:
; S T U V W
db 19, 20, 21, 22, 23, $ff
-.Set4
+.Set4:
; X Y Z
db 24, 25, 26, $ff
@@ -7121,7 +7124,7 @@
ret
; 3ed2b
-.StatLevelMultipliers
+.StatLevelMultipliers:
; /
db 25, 100 ; 25%
db 28, 100 ; 28%
@@ -7183,7 +7186,7 @@
ld hl, BattleMonAttack
ld c, 4
-.CheckBadge
+.CheckBadge:
ld a, b
srl b
call c, BoostStat
@@ -7751,7 +7754,7 @@
jp ResetBattleParticipants
; 3f0d4
-.EvenlyDivideExpAmongParticipants
+.EvenlyDivideExpAmongParticipants:
; count number of battle participants
ld a, [wBattleParticipantsNotFainted]
ld b, a
@@ -7875,7 +7878,7 @@
ld [hli], a
ld [hl], a
-.NoOverflow
+.NoOverflow:
ld d, MAX_LEVEL
callab CalcExpAtLevel
ld a, [hProduct + 1]
@@ -7899,7 +7902,7 @@
ld a, d
ld [hld], a
-.AlreadyAtMaxExp
+.AlreadyAtMaxExp:
callab CalcLevel
ld a, d
pop bc
@@ -7910,7 +7913,7 @@
ld a, e
ld d, a
-.LoopLevels
+.LoopLevels:
ld a, e
cp MAX_LEVEL
jr nc, .FinishExpBar
@@ -7941,7 +7944,7 @@
ld b, $0
jr .LoopLevels
-.FinishExpBar
+.FinishExpBar:
push bc
ld b, d
ld de, TempMonExp + 2
@@ -7961,7 +7964,7 @@
pop bc
ret
-.PlayExpBarSound
+.PlayExpBarSound:
push bc
call WaitSFX
ld de, SFX_EXP_BAR
@@ -7971,7 +7974,7 @@
pop bc
ret
-.LoopBarAnimation
+.LoopBarAnimation:
ld d, 3
dec b
.anim_loop
@@ -8025,7 +8028,7 @@
ld hl, JumpText_GoPkmn ; If we're in a LinkBattle print just "Go <PlayerMon>"
- ld a, [wd264] ; unless this (unidentified) variable is set
+ ld a, [wAISwitch] ; unless this (unidentified) variable is set
and a
jr nz, .skip_to_textbox
@@ -8116,7 +8119,7 @@
ld hl, .WithdrawPkmnText
jp BattleTextBox
-.WithdrawPkmnText
+.WithdrawPkmnText:
text_jump Text_BattleMonNickComma
start_asm
; Print text to withdraw Pkmn
@@ -8482,7 +8485,7 @@
ld [hMapAnims], a
callba PlayBattleMusic
callba ShowLinkBattleParticipants
- callba FindFirstAliveMon
+ callba FindFirstAliveMonAndStartBattle
call DisableSpriteUpdates
callba ClearBattleRAM
call InitEnemy
@@ -8520,7 +8523,7 @@
ld a, [TempWildMonSpecies]
ld [CurPartySpecies], a
-.Trainer
+.Trainer:
ld [TempEnemyMonSpecies], a
ret
; 3f55e
@@ -8870,11 +8873,11 @@
ret
; 3f7f7
-.Win
+.Win:
db "YOU WIN@"
-.Lose
+.Lose:
db "YOU LOSE@"
-.Draw
+.Draw:
db " DRAW@"
; 3f80f
@@ -8889,7 +8892,7 @@
ret
; 3f821
-.Invalid
+.Invalid:
db "INVALID BATTLE@"
; 3f830
@@ -8977,7 +8980,7 @@
call PrintNum
jr .next
-.PrintFormatString
+.PrintFormatString:
ld de, .Format
call PlaceString
.next
@@ -8994,7 +8997,7 @@
jr nz, .loop
ret
-.PrintBattleRecord
+.PrintBattleRecord:
hlcoord 1, 0
ld de, .Record
call PlaceString
@@ -9032,7 +9035,7 @@
.quit
ret
-.PrintZerosIfNoSaveFileExists
+.PrintZerosIfNoSaveFileExists:
ld a, [wSavedAtLeastOnce]
and a
ret nz
@@ -9042,18 +9045,18 @@
ret
; 3f938
-.Scores
+.Scores:
db " 0 0 0@"
; 3f947
-.Format ; 3f947
+.Format: ; 3f947
db " --- <LNBRK>"
db " - - -@"
-.Record ; 3f964
+.Record: ; 3f964
db "<PLAYER>'s RECORD@"
-.Result ; 3f96e
+.Result: ; 3f96e
db "RESULT WIN LOSE DRAW@"
-.Total ; 3f983
+.Total: ; 3f983
db "TOTAL WIN LOSE DRAW@"
; 3f998
@@ -9469,12 +9472,12 @@
callba GetKrisBackpic
ret
-.Chris
+.Chris:
; It's a boy.
ld b, BANK(ChrisBackpic)
ld hl, ChrisBackpic
-.Decompress
+.Decompress:
ld de, VTiles2 tile $31
ld c, $31
predef DecompressPredef
@@ -9600,7 +9603,7 @@
ld hl, HookedPokemonAttackedText
jr .PlaceBattleStartText
-.NotFishing
+.NotFishing:
ld hl, PokemonFellFromTreeText
cp BATTLETYPE_TREE
jr z, .PlaceBattleStartText
@@ -9609,7 +9612,7 @@
jr z, .PlaceBattleStartText
ld hl, WildPokemonAppearedText
-.PlaceBattleStartText
+.PlaceBattleStartText:
push hl
callba BattleStart_TrainerHuds
pop hl
--- a/battle/effect_commands.asm
+++ b/battle/effect_commands.asm
@@ -58,7 +58,7 @@
ld de, BattleScriptBuffer
-.GetMoveEffect
+.GetMoveEffect:
ld a, BANK(MoveEffects)
call GetFarByte
inc hl
@@ -74,7 +74,7 @@
ld a, h
ld [BattleScriptBufferLoc + 1], a
-.ReadMoveEffectCommand
+.ReadMoveEffectCommand:
; ld a, [BattleScriptBufferLoc++]
ld a, [BattleScriptBufferLoc]
@@ -112,7 +112,7 @@
jr .ReadMoveEffectCommand
-.DoMoveEffectCommand
+.DoMoveEffectCommand:
jp [hl]
; 34084
@@ -830,7 +830,7 @@
jp .EndDisobedience
-.Nap
+.Nap:
call BattleRandom
add a
swap a
@@ -843,7 +843,7 @@
jr .Print
-.DoNothing
+.DoNothing:
call BattleRandom
and 3
@@ -861,12 +861,12 @@
ld hl, IgnoredOrdersText
+.Print:
call StdBattleTextBox
jp .EndDisobedience
-.UseInstead
+.UseInstead:
; Can't use another move if the monster only has one!
ld a, [BattleMonMoves + 1]
@@ -884,7 +884,7 @@
ld b, 0
ld c, NUM_MOVES
-.GetTotalPP
+.GetTotalPP:
ld a, [hli]
and $3f ; exclude pp up
add b
@@ -900,7 +900,7 @@
jr nz, .GetTotalPP
-.CheckMovePP
+.CheckMovePP:
ld hl, BattleMonPP
ld a, [CurMoveNum]
ld e, a
@@ -927,7 +927,7 @@
push af
-.RandomMove
+.RandomMove:
call BattleRandom
and 3 ; TODO NUM_MOVES
@@ -968,7 +968,7 @@
ld [CurMoveNum], a
-.EndDisobedience
+.EndDisobedience:
xor a
ld [LastPlayerMove], a
ld [LastEnemyCounterMove], a
@@ -996,7 +996,7 @@
and a
ret
-.CheckSleep
+.CheckSleep:
ld a, BATTLE_VARS_STATUS
call GetBattleVar
and SLP
@@ -1191,7 +1191,7 @@
call GetBattleVar
cp MIMIC
jr z, .mimic
-;
+;
ld b, 0
add hl, bc
ld a, [hl]
@@ -1229,7 +1229,7 @@
ld hl, BattleMonItem
ld a, [BattleMonSpecies]
-.Item
+.Item:
ld c, 0
cp CHANSEY
@@ -1242,7 +1242,7 @@
ld c, 2
jr .Tally
-.Farfetchd
+.Farfetchd:
cp FARFETCH_D
jr nz, .FocusEnergy
ld a, [hl]
@@ -1253,7 +1253,7 @@
ld c, 2
jr .Tally
-.FocusEnergy
+.FocusEnergy:
ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVar
bit SUBSTATUS_FOCUS_ENERGY, a
@@ -1262,7 +1262,7 @@
; +1 critical level
inc c
-.CheckCritical
+.CheckCritical:
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
ld de, 1
@@ -1276,7 +1276,7 @@
inc c
inc c
-.ScopeLens
+.ScopeLens:
push bc
call GetUserItem
ld a, b
@@ -1287,7 +1287,7 @@
; +1 critical level
inc c
-.Tally
+.Tally:
ld hl, .Chances
ld b, 0
add hl, bc
@@ -1298,9 +1298,9 @@
ld [CriticalHit], a
ret
-.Criticals
+.Criticals:
db KARATE_CHOP, RAZOR_WIND, RAZOR_LEAF, CRABHAMMER, SLASH, AEROBLAST, CROSS_CHOP, $ff
-.Chances
+.Chances:
; 6.25% 12.1% 24.6% 33.2% 49.6% 49.6% 49.6%
db $11, $20, $40, $55, $80, $80, $80
; 0 1 2 3 4 5 6
@@ -1424,13 +1424,13 @@
ld hl, TypeModifier
set 7, [hl]
-.SkipStab
+.SkipStab:
ld a, BATTLE_VARS_MOVE_TYPE
call GetBattleVar
ld b, a
ld hl, TypeMatchup
-.TypesLoop
+.TypesLoop:
ld a, [hli]
cp $ff
@@ -1446,7 +1446,7 @@
jr .TypesLoop
-.SkipForesightCheck
+.SkipForesightCheck:
cp b
jr nz, .SkipType
ld a, [hl]
@@ -1456,7 +1456,7 @@
jr z, .GotMatchup
jr .SkipType
-.GotMatchup
+.GotMatchup:
push hl
push bc
inc hl
@@ -1470,7 +1470,7 @@
inc a
ld [AttackMissed], a
xor a
-.NotImmune
+.NotImmune:
ld [hMultiplier], a
add b
ld [TypeModifier], a
@@ -1517,7 +1517,7 @@
pop bc
pop hl
-.SkipType
+.SkipType:
inc hl
inc hl
jr .TypesLoop
@@ -1559,7 +1559,7 @@
ld a, 10 ; 1.0
ld [wTypeMatchup], a
ld hl, TypeMatchup
-.TypesLoop
+.TypesLoop:
ld a, [hli]
cp $ff
jr z, .End
@@ -1571,7 +1571,7 @@
jr nz, .End
jr .TypesLoop
-.Next
+.Next:
cp d
jr nz, .Nope
ld a, [hli]
@@ -1581,13 +1581,13 @@
jr z, .Yup
jr .Nope2
-.Nope
+.Nope:
inc hl
-.Nope2
+.Nope2:
inc hl
jr .TypesLoop
-.Yup
+.Yup:
xor a
ld [hDividend + 0], a
ld [hMultiplicand + 0], a
@@ -1607,7 +1607,7 @@
ld [wTypeMatchup], a
jr .TypesLoop
-.End
+.End:
pop bc
pop de
pop hl
@@ -1740,7 +1740,7 @@
ld a, [wEnemyMoveStruct + MOVE_ACC]
ld b, a
-.BrightPowder
+.BrightPowder:
push bc
call GetOpponentItem
ld a, b
@@ -1765,11 +1765,11 @@
cp b
jr nc, .Miss
-.Hit
+.Hit:
ret
-.Miss
+.Miss:
; Keep the damage value intact if we're using (Hi) Jump Kick.
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
@@ -1777,13 +1777,13 @@
jr z, .Missed
call ResetDamage
-.Missed
+.Missed:
ld a, 1
ld [AttackMissed], a
ret
-.DreamEater
+.DreamEater:
; Return z if we're trying to eat the dream of
; a monster that isn't sleeping.
ld a, BATTLE_VARS_MOVE_EFFECT
@@ -1797,7 +1797,7 @@
ret
-.Protect
+.Protect:
; Return nz if the opponent is protected.
ld a, BATTLE_VARS_SUBSTATUS1_OPP
call GetBattleVar
@@ -1819,7 +1819,7 @@
ret
-.LockOn
+.LockOn:
; Return nz if we are locked-on and aren't trying to use Earthquake,
; Fissure or Magnitude on a monster that is flying.
ld a, BATTLE_VARS_SUBSTATUS5_OPP
@@ -1843,13 +1843,13 @@
cp MAGNITUDE
ret z
-.LockedOn
+.LockedOn:
ld a, 1
and a
ret
-.DrainSub
+.DrainSub:
; Return z if using an HP drain move on a substitute.
call CheckSubstituteOpp
jr z, .not_draining_sub
@@ -1868,7 +1868,7 @@
ret
-.FlyDigMoves
+.FlyDigMoves:
; Check for moves that can hit underground/flying opponents.
; Return z if the current move can hit the opponent.
@@ -1892,7 +1892,7 @@
cp TWISTER
ret
-.DigMoves
+.DigMoves:
ld a, BATTLE_VARS_MOVE_ANIM
call GetBattleVar
@@ -1904,7 +1904,7 @@
ret
-.ThunderRain
+.ThunderRain:
; Return z if the current move always hits in rain, and it is raining.
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
@@ -1916,7 +1916,7 @@
ret
-.XAccuracy
+.XAccuracy:
ld a, BATTLE_VARS_SUBSTATUS4
call GetBattleVar
bit SUBSTATUS_X_ACCURACY, a
@@ -1923,7 +1923,7 @@
ret
-.StatModifiers
+.StatModifiers:
ld a, [hBattleTurn]
and a
@@ -2015,7 +2015,7 @@
ld [hl], a
ret
-.AccProb
+.AccProb:
db 33, 100 ; 33% -6
db 36, 100 ; 36% -5
db 43, 100 ; 43% -4
@@ -2112,7 +2112,7 @@
call BattleCommand_LowerSubNoAnim
jp BattleCommand_MoveDelay
-.Rampage
+.Rampage:
ld a, BATTLE_VARS_MOVE_EFFECT
call GetBattleVar
cp EFFECT_ROLLOUT
@@ -2764,7 +2764,7 @@
jr nz, .Ditto
ld a, [TempEnemyMonSpecies]
-.Ditto
+.Ditto:
cp DITTO
ret nz
@@ -2924,7 +2924,9 @@
ld a, [wLinkMode]
cp 3
jr z, .done
-
+; If we go back to the loop point,
+; it's the same as doing this exact
+; same check twice.
ld a, h
or b
jr nz, .loop
@@ -3046,7 +3048,7 @@
ld a, [hl]
jr z, .CompareSpecies
ld a, [TempEnemyMonSpecies]
-.CompareSpecies
+.CompareSpecies:
pop hl
cp b
@@ -3054,7 +3056,7 @@
cp c
ret nz
-.GetItemHeldEffect
+.GetItemHeldEffect:
push hl
call GetUserItem
ld a, [hl]
@@ -3108,7 +3110,7 @@
ld hl, EnemyStats
jr .thickclub
-.Special
+.Special:
ld hl, BattleMonSpclDef
ld a, [hli]
ld b, a
@@ -3335,7 +3337,7 @@
; 355b0
-.beatup_fail: ; 355b0
+.beatup_fail ; 355b0
ld b, buildopponentrage_command
jp SkipToBattleCommand
@@ -3515,7 +3517,7 @@
ld hl, TypeBoostItems
-.NextItem
+.NextItem:
ld a, [hli]
cp $ff
jr z, .DoneItem
@@ -3543,7 +3545,7 @@
ld [hDivisor], a
ld b, 4
call Divide
-.DoneItem
+.DoneItem:
; Critical hits
call .CriticalMultiplier
@@ -3607,7 +3609,7 @@
cp 998 % $100
jr c, .dont_cap_3
-.Cap
+.Cap:
ld a, 997 / $100
ld [hli], a
ld a, 997 % $100
@@ -3629,7 +3631,7 @@
ret
-.CriticalMultiplier
+.CriticalMultiplier:
ld a, [CriticalHit]
and a
ret z
@@ -3835,7 +3837,7 @@
ld [hl], 1
ret
-.FlailPower
+.FlailPower:
; px, bp
db 1, 200
db 4, 150
@@ -4068,7 +4070,7 @@
ld hl, SharedPainText
jp StdBattleTextBox
-.PlayerShareHP
+.PlayerShareHP:
ld a, [hld]
ld [Buffer1], a
ld a, [hld]
@@ -4125,7 +4127,7 @@
; 359cd
-.ButItFailed
+.ButItFailed:
jp PrintDidntAffect2
; 359d0
@@ -5186,7 +5188,7 @@
; 35fc0
-.apply_poison: ; 35fc0
+.apply_poison ; 35fc0
call AnimateCurrentMove
call PoisonOpponent
jp RefreshBattleHuds
@@ -5194,7 +5196,7 @@
; 35fc9
-.check_toxic: ; 35fc9
+.check_toxic ; 35fc9
ld a, BATTLE_VARS_SUBSTATUS5_OPP
call GetBattleVarAddr
ld a, [hBattleTurn]
@@ -5669,7 +5671,7 @@
; 3626e
-.stats_already_max: ; 3626e
+.stats_already_max ; 3626e
pop hl
dec [hl]
; fallthrough
@@ -5676,7 +5678,7 @@
; 36270
-.cant_raise_stat: ; 36270
+.cant_raise_stat ; 36270
ld a, $2
ld [FailedMessage], a
ld a, $1
@@ -5686,7 +5688,7 @@
; 3627b
-.stat_raise_failed: ; 3627b
+.stat_raise_failed ; 3627b
ld a, $1
ld [FailedMessage], a
ret
@@ -5805,7 +5807,7 @@
jr z, .GetStatLevel
ld hl, PlayerStatLevels
-.GetStatLevel
+.GetStatLevel:
; Attempt to lower the stat.
ld a, [LoweredStat]
and $f
@@ -5824,7 +5826,7 @@
jr nz, .ComputerMiss
inc b
-.ComputerMiss
+.ComputerMiss:
; Computer opponents have a 1/4 chance of failing.
ld a, [hBattleTurn]
and a
@@ -5853,7 +5855,7 @@
cp $40
jr c, .Failed
-.DidntMiss
+.DidntMiss:
call CheckSubstituteOpp
jr nz, .Failed
@@ -5887,14 +5889,14 @@
pop hl
jr z, .CouldntLower
-.Hit
+.Hit:
xor a
ld [FailedMessage], a
ret
-.CouldntLower
+.CouldntLower:
inc [hl]
-.CantLower
+.CantLower:
ld a, 3
ld [FailedMessage], a
ld a, 1
@@ -5901,13 +5903,13 @@
ld [AttackMissed], a
ret
-.Failed
+.Failed:
ld a, 1
ld [FailedMessage], a
ld [AttackMissed], a
ret
-.Mist
+.Mist:
ld a, 2
ld [FailedMessage], a
ld a, 1
@@ -6044,7 +6046,7 @@
call BattleCommand_SwitchTurn
jr .end
-.Player
+.Player:
call BattleCommand_SwitchTurn
call CalcEnemyStats
call BattleCommand_SwitchTurn
@@ -6104,16 +6106,16 @@
GetStatName: ; 3648f
ld hl, .names
ld c, "@"
-.CheckName
+.CheckName:
dec b
jr z, .Copy
-.GetName
+.GetName:
ld a, [hli]
cp c
jr z, .CheckName
jr .GetName
-.Copy
+.Copy:
ld de, StringBuffer2
ld bc, StringBuffer3 - StringBuffer2
jp CopyBytes
@@ -6299,7 +6301,7 @@
and a
jr z, .PlayerTurn
ld hl, GetMonFrontpic
-.PlayerTurn
+.PlayerTurn:
xor a
ld [hBGMapMode], a
call CallBattleCore
@@ -6314,7 +6316,7 @@
and a
jr z, .PlayerTurn
ld hl, DropEnemySub
-.PlayerTurn
+.PlayerTurn:
xor a
ld [hBGMapMode], a
call CallBattleCore
@@ -7351,7 +7353,7 @@
jp z, SkipToBattleCommand
jp EndMoveEffect
-.UsedText
+.UsedText:
text_jump UnknownText_0x1c0d0e ; "[USER]"
start_asm
ld a, BATTLE_VARS_MOVE_ANIM
@@ -7382,32 +7384,32 @@
.done
ret
-.RazorWind
+.RazorWind:
; 'made a whirlwind!'
text_jump UnknownText_0x1c0d12
db "@"
-.Solarbeam
+.Solarbeam:
; 'took in sunlight!'
text_jump UnknownText_0x1c0d26
db "@"
-.SkullBash
+.SkullBash:
; 'lowered its head!'
text_jump UnknownText_0x1c0d3a
db "@"
-.SkyAttack
+.SkyAttack:
; 'is glowing!'
text_jump UnknownText_0x1c0d4e
db "@"
-.Fly
+.Fly:
; 'flew up high!'
text_jump UnknownText_0x1c0d5c
db "@"
-.Dig
+.Dig:
; 'dug a hole!'
text_jump UnknownText_0x1c0d6c
db "@"
@@ -7469,7 +7471,7 @@
ld l, a
jp StdBattleTextBox
-.Traps
+.Traps:
dbw BIND, UsedBindText ; 'used BIND on'
dbw WRAP, WrappedByText ; 'was WRAPPED by'
dbw FIRE_SPIN, FireSpinTrapText ; 'was trapped!'
@@ -7871,7 +7873,7 @@
ld [hl], a
ld [de], a
call _CheckBattleScene
- jr c, .mobile
+ jr c, .no_anim
xor a
ld [wNumHits], a
@@ -7881,7 +7883,7 @@
call LoadAnim
jr .finish
-.mobile
+.no_anim
call BattleCommand_RaiseSubNoAnim
.finish
ld hl, MadeSubstituteText
@@ -8309,7 +8311,7 @@
ld hl, EliminatedStatsText
jp StdBattleTextBox
-.Fill
+.Fill:
ld b, PlayerStatLevelsEnd - PlayerStatLevels
.next
ld [hli], a
@@ -8490,7 +8492,7 @@
ld hl, LightScreenEffectText
jr .good
-.Reflect
+.Reflect:
bit SCREENS_REFLECT, [hl]
jr nz, .failed
set SCREENS_REFLECT, [hl]
@@ -8991,7 +8993,7 @@
pop bc
ret
-.Magnitudes
+.Magnitudes:
; /255, BP, magnitude
db 13, 10, 4
db 38, 30, 5
@@ -9051,7 +9053,7 @@
ret
-.Enemy
+.Enemy:
; Wildmons don't have anything to switch to
ld a, [wBattleMode]
@@ -9366,7 +9368,7 @@
jr z, .Weather
dec c ; double
-.Weather
+.Weather:
ld a, [Weather]
and a
jr z, .Heal
@@ -9379,7 +9381,7 @@
dec c
dec c
-.Heal
+.Heal:
ld b, 0
ld hl, .Multipliers
add hl, bc
@@ -9403,7 +9405,7 @@
ld hl, RegainedHealthText
jp StdBattleTextBox
-.Full
+.Full:
call AnimateFailedMove
; 'hp is full!'
@@ -9410,7 +9412,7 @@
ld hl, HPIsFullText
jp StdBattleTextBox
-.Multipliers
+.Multipliers:
dw GetEighthMaxHP
dw GetQuarterMaxHP
dw GetHalfMaxHP
@@ -9689,13 +9691,13 @@
ld a, BATTLE_VARS_LAST_MOVE
call GetBattleVarAddr
ld [hl], b
-.AlreadyChargingFutureSight
+.AlreadyChargingFutureSight:
ld hl, wPlayerFutureSightCount
ld a, [hBattleTurn]
and a
jr z, .GotFutureSightCount
ld hl, wEnemyFutureSightCount
-.GotFutureSightCount
+.GotFutureSightCount:
ld a, [hl]
and a
jr nz, .failed
@@ -9711,7 +9713,7 @@
and a
jr z, .StoreDamage
ld de, wEnemyFutureSightDamage
-.StoreDamage
+.StoreDamage:
ld hl, CurDamage
ld a, [hl]
ld [de], a
--- a/battle/effects/metronome.asm
+++ b/battle/effects/metronome.asm
@@ -14,7 +14,7 @@
.asm_3742b
call LoadMoveAnim
-.GetMove
+.GetMove:
call BattleRandom
; No invalid moves.
--- a/battle/effects/present.asm
+++ b/battle/effects/present.asm
@@ -85,7 +85,7 @@
.do_animation
jp EndMoveEffect
-.PresentPower
+.PresentPower:
db 40 percent, 40
db 70 percent + 1, 80
db 80 percent, 120
--- a/battle/misc.asm
+++ b/battle/misc.asm
@@ -58,7 +58,7 @@
ld a, [wd265] ; move type
ld c, a
-.CheckWeatherType
+.CheckWeatherType:
ld a, [de]
inc de
cp $ff
@@ -71,7 +71,7 @@
cp c
jr z, .ApplyModifier
-.NextWeatherType
+.NextWeatherType:
rept 2
inc de
endr
@@ -85,7 +85,7 @@
call GetBattleVar
ld c, a
-.CheckWeatherMove
+.CheckWeatherMove:
ld a, [de]
inc de
cp $ff
@@ -98,13 +98,13 @@
cp c
jr z, .ApplyModifier
-.NextWeatherMove
+.NextWeatherMove:
rept 2
inc de
endr
jr .CheckWeatherMove
-.ApplyModifier
+.ApplyModifier:
xor a
ld [hMultiplicand + 0], a
ld hl, CurDamage
@@ -138,7 +138,7 @@
ld bc, 1
-.Update
+.Update:
ld a, b
ld [CurDamage], a
ld a, c
@@ -147,7 +147,7 @@
.done
ret
-.WeatherTypeModifiers
+.WeatherTypeModifiers:
db WEATHER_RAIN, WATER, 15
db WEATHER_RAIN, FIRE, 05
db WEATHER_SUN, FIRE, 15
@@ -154,7 +154,7 @@
db WEATHER_SUN, WATER, 05
db $ff
-.WeatherMoveModifiers
+.WeatherMoveModifiers:
db WEATHER_RAIN, EFFECT_SOLARBEAM, 05
db $ff
; fbe24
@@ -183,7 +183,7 @@
ld a, [JohtoBadges]
ld c, a
-.CheckBadge
+.CheckBadge:
ld a, [hl]
cp $ff
jr z, .done
@@ -196,11 +196,11 @@
cp [hl]
jr z, .ApplyBoost
-.NextBadge
+.NextBadge:
inc hl
jr .CheckBadge
-.ApplyBoost
+.ApplyBoost:
ld a, [CurDamage]
ld h, a
ld d, a
@@ -226,7 +226,7 @@
ld hl, $ffff
-.Update
+.Update:
ld a, h
ld [CurDamage], a
ld a, l
@@ -237,7 +237,7 @@
pop de
ret
-.BadgeTypes
+.BadgeTypes:
db FLYING ; zephyrbadge
db BUG ; hivebadge
db NORMAL ; plainbadge
--- a/battle/moves/move_effects.asm
+++ b/battle/moves/move_effects.asm
@@ -2095,7 +2095,7 @@
damagestats
damagecalc
futuresight
- damagevariation
+ damagevariation ; skip here if last turn
checkhit
hittargetnosub
failuretext
--- a/battle/objects/data.asm
+++ b/battle/objects/data.asm
@@ -156,7 +156,7 @@
; ANIM_OBJ_31
battleanimobj $21, $90, BATTLEANIMFRAMESET_36, BATTLEANIMFUNC_00, $03, $05
-; ANIM_OBJ_32
+; ANIM_OBJ_LIGHTNING_BOLT
battleanimobj $21, $90, BATTLEANIMFRAMESET_37, BATTLEANIMFUNC_03, $02, $08
; ANIM_OBJ_33
@@ -336,10 +336,10 @@
; ANIM_OBJ_6D
battleanimobj $01, $88, BATTLEANIMFRAMESET_7A, BATTLEANIMFUNC_31, $03, $11
-; ANIM_OBJ_6E
+; ANIM_OBJ_SKY_ATTACK_FEAROW
battleanimobj $21, $88, BATTLEANIMFRAMESET_7B, BATTLEANIMFUNC_32, $02, $20
-; ANIM_OBJ_6F
+; ANIM_OBJ_LICK
battleanimobj $21, $98, BATTLEANIMFRAMESET_7C, BATTLEANIMFUNC_00, $02, $04
; ANIM_OBJ_70
@@ -432,7 +432,7 @@
; ANIM_OBJ_8D
battleanimobj $21, $a0, BATTLEANIMFRAMESET_99, BATTLEANIMFUNC_35, $04, $19
-; ANIM_OBJ_8E
+; ANIM_OBJ_SPIKES
battleanimobj $21, $70, BATTLEANIMFRAMESET_8B, BATTLEANIMFUNC_3F, $02, $1f
; ANIM_OBJ_8F
@@ -504,7 +504,7 @@
; ANIM_OBJ_A5
battleanimobj $61, $90, BATTLEANIMFRAMESET_A9, BATTLEANIMFUNC_46, $02, $23
-; ANIM_OBJ_A6
+; ANIM_OBJ_PERISH_SONG
battleanimobj $00, $00, BATTLEANIMFRAMESET_24, BATTLEANIMFUNC_47, $02, $0e
; ANIM_OBJ_A7
--- a/battle/objects/framesets.asm
+++ b/battle/objects/framesets.asm
@@ -1,220 +1,220 @@
-BattleAnimFrameData: ; ce85e
- dw .Frameset_00 ; 00
- dw .Frameset_01 ; 01
- dw .Frameset_02 ; 02
- dw .Frameset_03 ; 03
- dw .Frameset_04 ; 04
- dw .Frameset_05 ; 05
- dw .Frameset_06 ; 06
- dw .Frameset_07 ; 07
- dw .Frameset_08 ; 08
- dw .Frameset_09 ; 09
- dw .Frameset_0a ; 0a
- dw .Frameset_0b ; 0b
- dw .Frameset_0c ; 0c
- dw .Frameset_0d ; 0d
- dw .Frameset_0e ; 0e
- dw .Frameset_0f ; 0f
- dw .Frameset_10 ; 10
- dw .Frameset_11 ; 11
- dw .Frameset_12 ; 12
- dw .Frameset_13 ; 13
- dw .Frameset_14 ; 14
- dw .Frameset_15 ; 15
- dw .Frameset_16 ; 16
- dw .Frameset_17 ; 17
- dw .Frameset_18 ; 18
- dw .Frameset_19 ; 19
- dw .Frameset_1a ; 1a
- dw .Frameset_1b ; 1b
- dw .Frameset_1c ; 1c
- dw .Frameset_1d ; 1d
- dw .Frameset_1e ; 1e
- dw .Frameset_1f ; 1f
- dw .Frameset_20 ; 20
- dw .Frameset_21 ; 21
- dw .Frameset_22 ; 22
- dw .Frameset_23 ; 23
- dw .Frameset_24 ; 24
- dw .Frameset_25 ; 25
- dw .Frameset_26 ; 26
- dw .Frameset_27 ; 27
- dw .Frameset_28 ; 28
- dw .Frameset_29 ; 29
- dw .Frameset_2a ; 2a
- dw .Frameset_2b ; 2b
- dw .Frameset_2c ; 2c
- dw .Frameset_2d ; 2d
- dw .Frameset_2e ; 2e
- dw .Frameset_2f ; 2f
- dw .Frameset_30 ; 30
- dw .Frameset_31 ; 31
- dw .Frameset_32 ; 32
- dw .Frameset_33 ; 33
- dw .Frameset_34 ; 34
- dw .Frameset_35 ; 35
- dw .Frameset_36 ; 36
- dw .Frameset_37 ; 37
- dw .Frameset_38 ; 38
- dw .Frameset_39 ; 39
- dw .Frameset_3a ; 3a
- dw .Frameset_3b ; 3b
- dw .Frameset_3c ; 3c
- dw .Frameset_3d ; 3d
- dw .Frameset_3e ; 3e
- dw .Frameset_3f ; 3f
- dw .Frameset_40 ; 40
- dw .Frameset_41 ; 41
- dw .Frameset_42 ; 42
- dw .Frameset_43 ; 43
- dw .Frameset_44 ; 44
- dw .Frameset_45 ; 45
- dw .Frameset_46 ; 46
- dw .Frameset_47 ; 47
- dw .Frameset_48 ; 48
- dw .Frameset_49 ; 49
- dw .Frameset_4a ; 4a
- dw .Frameset_4b ; 4b
- dw .Frameset_4c ; 4c
- dw .Frameset_4d ; 4d
- dw .Frameset_4e ; 4e
- dw .Frameset_4f ; 4f
- dw .Frameset_50 ; 50
- dw .Frameset_51 ; 51
- dw .Frameset_52 ; 52
- dw .Frameset_53 ; 53
- dw .Frameset_54 ; 54
- dw .Frameset_55 ; 55
- dw .Frameset_56 ; 56
- dw .Frameset_57 ; 57
- dw .Frameset_58 ; 58
- dw .Frameset_59 ; 59
- dw .Frameset_5a ; 5a
- dw .Frameset_5b ; 5b
- dw .Frameset_5c ; 5c
- dw .Frameset_5d ; 5d
- dw .Frameset_5e ; 5e
- dw .Frameset_5f ; 5f
- dw .Frameset_60 ; 60
- dw .Frameset_61 ; 61
- dw .Frameset_62 ; 62
- dw .Frameset_63 ; 63
- dw .Frameset_64 ; 64
- dw .Frameset_65 ; 65
- dw .Frameset_66 ; 66
- dw .Frameset_67 ; 67
- dw .Frameset_68 ; 68
- dw .Frameset_69 ; 69
- dw .Frameset_6a ; 6a
- dw .Frameset_6b ; 6b
- dw .Frameset_6c ; 6c
- dw .Frameset_6d ; 6d
- dw .Frameset_6e ; 6e
- dw .Frameset_6f ; 6f
- dw .Frameset_70 ; 70
- dw .Frameset_71 ; 71
- dw .Frameset_72 ; 72
- dw .Frameset_73 ; 73
- dw .Frameset_74 ; 74
- dw .Frameset_75 ; 75
- dw .Frameset_76 ; 76
- dw .Frameset_77 ; 77
- dw .Frameset_78 ; 78
- dw .Frameset_79 ; 79
- dw .Frameset_7a ; 7a
- dw .Frameset_7b ; 7b
- dw .Frameset_7c ; 7c
- dw .Frameset_7d ; 7d
- dw .Frameset_7e ; 7e
- dw .Frameset_7f ; 7f
- dw .Frameset_80 ; 80
- dw .Frameset_81 ; 81
- dw .Frameset_82 ; 82
- dw .Frameset_83 ; 83
- dw .Frameset_84 ; 84
- dw .Frameset_85 ; 85
- dw .Frameset_86 ; 86
- dw .Frameset_87 ; 87
- dw .Frameset_88 ; 88
- dw .Frameset_89 ; 89
- dw .Frameset_8a ; 8a
- dw .Frameset_8b ; 8b
- dw .Frameset_8c ; 8c
- dw .Frameset_8d ; 8d
- dw .Frameset_8e ; 8e
- dw .Frameset_8f ; 8f
- dw .Frameset_90 ; 90
- dw .Frameset_91 ; 91
- dw .Frameset_92 ; 92
- dw .Frameset_93 ; 93
- dw .Frameset_94 ; 94
- dw .Frameset_95 ; 95
- dw .Frameset_96 ; 96
- dw .Frameset_97 ; 97
- dw .Frameset_98 ; 98
- dw .Frameset_99 ; 99
- dw .Frameset_9a ; 9a
- dw .Frameset_9b ; 9b
- dw .Frameset_9c ; 9c
- dw .Frameset_9d ; 9d
- dw .Frameset_9e ; 9e
- dw .Frameset_9f ; 9f
- dw .Frameset_a0 ; a0
- dw .Frameset_a1 ; a1
- dw .Frameset_a2 ; a2
- dw .Frameset_a3 ; a3
- dw .Frameset_a4 ; a4
- dw .Frameset_a5 ; a5
- dw .Frameset_a6 ; a6
- dw .Frameset_a7 ; a7
- dw .Frameset_a8 ; a8
- dw .Frameset_a9 ; a9
- dw .Frameset_aa ; aa
- dw .Frameset_ab ; ab
- dw .Frameset_ac ; ac
- dw .Frameset_ad ; ad
- dw .Frameset_ae ; ae
- dw .Frameset_af ; af
- dw .Frameset_b0 ; b0
- dw .Frameset_b1 ; b1
- dw .Frameset_b2 ; b2
- dw .Frameset_b3 ; b3
- dw .Frameset_b4 ; b4
- dw .Frameset_b5 ; b5
- dw .Frameset_b6 ; b6
- dw .Frameset_b7 ; b7
- dw .Frameset_b8 ; b8
-
- ; OAM index (see battle/objects/oam.asm), flip flags / duration
-.Frameset_00
- db BATTLEANIMOAMSET_00, $06
+BattleAnimFrameData: ; ce85e
+ dw .Frameset_00 ; 00
+ dw .Frameset_01 ; 01
+ dw .Frameset_02 ; 02
+ dw .Frameset_03 ; 03
+ dw .Frameset_04 ; 04
+ dw .Frameset_05 ; 05
+ dw .Frameset_06 ; 06
+ dw .Frameset_07 ; 07
+ dw .Frameset_08 ; 08
+ dw .Frameset_09 ; 09
+ dw .Frameset_0a ; 0a
+ dw .Frameset_0b ; 0b
+ dw .Frameset_0c ; 0c
+ dw .Frameset_0d ; 0d
+ dw .Frameset_0e ; 0e
+ dw .Frameset_0f ; 0f
+ dw .Frameset_10 ; 10
+ dw .Frameset_11 ; 11
+ dw .Frameset_12 ; 12
+ dw .Frameset_13 ; 13
+ dw .Frameset_14 ; 14
+ dw .Frameset_15 ; 15
+ dw .Frameset_16 ; 16
+ dw .Frameset_17 ; 17
+ dw .Frameset_18 ; 18
+ dw .Frameset_19 ; 19
+ dw .Frameset_1a ; 1a
+ dw .Frameset_1b ; 1b
+ dw .Frameset_1c ; 1c
+ dw .Frameset_1d ; 1d
+ dw .Frameset_1e ; 1e
+ dw .Frameset_1f ; 1f
+ dw .Frameset_20 ; 20
+ dw .Frameset_21 ; 21
+ dw .Frameset_22 ; 22
+ dw .Frameset_23 ; 23
+ dw .Frameset_24 ; 24
+ dw .Frameset_25 ; 25
+ dw .Frameset_26 ; 26
+ dw .Frameset_27 ; 27
+ dw .Frameset_28 ; 28
+ dw .Frameset_29 ; 29
+ dw .Frameset_2a ; 2a
+ dw .Frameset_2b ; 2b
+ dw .Frameset_2c ; 2c
+ dw .Frameset_2d ; 2d
+ dw .Frameset_2e ; 2e
+ dw .Frameset_2f ; 2f
+ dw .Frameset_30 ; 30
+ dw .Frameset_31 ; 31
+ dw .Frameset_32 ; 32
+ dw .Frameset_33 ; 33
+ dw .Frameset_34 ; 34
+ dw .Frameset_35 ; 35
+ dw .Frameset_36 ; 36
+ dw .Frameset_37 ; 37
+ dw .Frameset_38 ; 38
+ dw .Frameset_39 ; 39
+ dw .Frameset_3a ; 3a
+ dw .Frameset_3b ; 3b
+ dw .Frameset_3c ; 3c
+ dw .Frameset_3d ; 3d
+ dw .Frameset_3e ; 3e
+ dw .Frameset_3f ; 3f
+ dw .Frameset_40 ; 40
+ dw .Frameset_41 ; 41
+ dw .Frameset_42 ; 42
+ dw .Frameset_43 ; 43
+ dw .Frameset_44 ; 44
+ dw .Frameset_45 ; 45
+ dw .Frameset_46 ; 46
+ dw .Frameset_47 ; 47
+ dw .Frameset_48 ; 48
+ dw .Frameset_49 ; 49
+ dw .Frameset_4a ; 4a
+ dw .Frameset_4b ; 4b
+ dw .Frameset_4c ; 4c
+ dw .Frameset_4d ; 4d
+ dw .Frameset_4e ; 4e
+ dw .Frameset_4f ; 4f
+ dw .Frameset_50 ; 50
+ dw .Frameset_51 ; 51
+ dw .Frameset_52 ; 52
+ dw .Frameset_53 ; 53
+ dw .Frameset_54 ; 54
+ dw .Frameset_55 ; 55
+ dw .Frameset_56 ; 56
+ dw .Frameset_57 ; 57
+ dw .Frameset_58 ; 58
+ dw .Frameset_59 ; 59
+ dw .Frameset_5a ; 5a
+ dw .Frameset_5b ; 5b
+ dw .Frameset_5c ; 5c
+ dw .Frameset_5d ; 5d
+ dw .Frameset_5e ; 5e
+ dw .Frameset_5f ; 5f
+ dw .Frameset_60 ; 60
+ dw .Frameset_61 ; 61
+ dw .Frameset_62 ; 62
+ dw .Frameset_63 ; 63
+ dw .Frameset_64 ; 64
+ dw .Frameset_65 ; 65
+ dw .Frameset_66 ; 66
+ dw .Frameset_67 ; 67
+ dw .Frameset_68 ; 68
+ dw .Frameset_69 ; 69
+ dw .Frameset_6a ; 6a
+ dw .Frameset_6b ; 6b
+ dw .Frameset_6c ; 6c
+ dw .Frameset_6d ; 6d
+ dw .Frameset_6e ; 6e
+ dw .Frameset_6f ; 6f
+ dw .Frameset_70 ; 70
+ dw .Frameset_71 ; 71
+ dw .Frameset_72 ; 72
+ dw .Frameset_73 ; 73
+ dw .Frameset_74 ; 74
+ dw .Frameset_75 ; 75
+ dw .Frameset_76 ; 76
+ dw .Frameset_77 ; 77
+ dw .Frameset_78 ; 78
+ dw .Frameset_79 ; 79
+ dw .Frameset_7a ; 7a
+ dw .Frameset_7b ; 7b
+ dw .Frameset_7c ; 7c
+ dw .Frameset_7d ; 7d
+ dw .Frameset_7e ; 7e
+ dw .Frameset_7f ; 7f
+ dw .Frameset_80 ; 80
+ dw .Frameset_81 ; 81
+ dw .Frameset_82 ; 82
+ dw .Frameset_83 ; 83
+ dw .Frameset_84 ; 84
+ dw .Frameset_85 ; 85
+ dw .Frameset_86 ; 86
+ dw .Frameset_87 ; 87
+ dw .Frameset_88 ; 88
+ dw .Frameset_89 ; 89
+ dw .Frameset_8a ; 8a
+ dw .Frameset_8b ; 8b
+ dw .Frameset_8c ; 8c
+ dw .Frameset_8d ; 8d
+ dw .Frameset_8e ; 8e
+ dw .Frameset_8f ; 8f
+ dw .Frameset_90 ; 90
+ dw .Frameset_91 ; 91
+ dw .Frameset_92 ; 92
+ dw .Frameset_93 ; 93
+ dw .Frameset_94 ; 94
+ dw .Frameset_95 ; 95
+ dw .Frameset_96 ; 96
+ dw .Frameset_97 ; 97
+ dw .Frameset_98 ; 98
+ dw .Frameset_99 ; 99
+ dw .Frameset_9a ; 9a
+ dw .Frameset_9b ; 9b
+ dw .Frameset_9c ; 9c
+ dw .Frameset_9d ; 9d
+ dw .Frameset_9e ; 9e
+ dw .Frameset_9f ; 9f
+ dw .Frameset_a0 ; a0
+ dw .Frameset_a1 ; a1
+ dw .Frameset_a2 ; a2
+ dw .Frameset_a3 ; a3
+ dw .Frameset_a4 ; a4
+ dw .Frameset_a5 ; a5
+ dw .Frameset_a6 ; a6
+ dw .Frameset_a7 ; a7
+ dw .Frameset_a8 ; a8
+ dw .Frameset_a9 ; a9
+ dw .Frameset_aa ; aa
+ dw .Frameset_ab ; ab
+ dw .Frameset_ac ; ac
+ dw .Frameset_ad ; ad
+ dw .Frameset_ae ; ae
+ dw .Frameset_af ; af
+ dw .Frameset_b0 ; b0
+ dw .Frameset_b1 ; b1
+ dw .Frameset_b2 ; b2
+ dw .Frameset_b3 ; b3
+ dw .Frameset_b4 ; b4
+ dw .Frameset_b5 ; b5
+ dw .Frameset_b6 ; b6
+ dw .Frameset_b7 ; b7
+ dw .Frameset_b8 ; b8
+
+ ; OAM index (see battle/objects/oam.asm), flip flags / duration
+.Frameset_00:
+ db BATTLEANIMOAMSET_00, $06
db -4
-
-.Frameset_01
- db BATTLEANIMOAMSET_01, $06
+
+.Frameset_01:
+ db BATTLEANIMOAMSET_01, $06
db -4
-
-.Frameset_02
- db BATTLEANIMOAMSET_02, $06
+
+.Frameset_02:
+ db BATTLEANIMOAMSET_02, $06
db -4
-
-.Frameset_03
- db BATTLEANIMOAMSET_03, $06
+
+.Frameset_03:
+ db BATTLEANIMOAMSET_03, $06
db -4
-
-.Frameset_04
- db BATTLEANIMOAMSET_04, $06
+
+.Frameset_04:
+ db BATTLEANIMOAMSET_04, $06
db -4
-
-.Frameset_05
- db BATTLEANIMOAMSET_05, $06
+
+.Frameset_05:
+ db BATTLEANIMOAMSET_05, $06
db -4
-
-.Frameset_06
- db BATTLEANIMOAMSET_06, $06
+
+.Frameset_06:
+ db BATTLEANIMOAMSET_06, $06
db -4
-
-.Frameset_07
+
+.Frameset_07:
db BATTLEANIMOAMSET_03, $04
db BATTLEANIMOAMSET_01, $01
db BATTLEANIMOAMSET_03, $04
@@ -222,10 +222,10 @@
db BATTLEANIMOAMSET_03, $04
db BATTLEANIMOAMSET_01, $01
db BATTLEANIMOAMSET_03, $04
- db BATTLEANIMOAMSET_01, $01
+ db BATTLEANIMOAMSET_01, $01
db -4
-
-.Frameset_3e
+
+.Frameset_3e:
db BATTLEANIMOAMSET_4B, $02
db BATTLEANIMOAMSET_4C, $02
db BATTLEANIMOAMSET_4D, $04
@@ -235,10 +235,10 @@
db -3, $02
db BATTLEANIMOAMSET_4E, $02
db -3, $02
- db BATTLEANIMOAMSET_4E, $02
+ db BATTLEANIMOAMSET_4E, $02
db -4
-
-.Frameset_3f
+
+.Frameset_3f:
db BATTLEANIMOAMSET_4B, $42
db BATTLEANIMOAMSET_4C, $42
db BATTLEANIMOAMSET_4D, $44
@@ -248,10 +248,10 @@
db -3, $02
db BATTLEANIMOAMSET_4E, $42
db -3, $02
- db BATTLEANIMOAMSET_4E, $42
+ db BATTLEANIMOAMSET_4E, $42
db -4
-
-.Frameset_40
+
+.Frameset_40:
db BATTLEANIMOAMSET_4B, $c2
db BATTLEANIMOAMSET_4C, $c2
db BATTLEANIMOAMSET_4D, $c4
@@ -261,10 +261,10 @@
db -3, $02
db BATTLEANIMOAMSET_4E, $c2
db -3, $02
- db BATTLEANIMOAMSET_4E, $c2
+ db BATTLEANIMOAMSET_4E, $c2
db -4
-
-.Frameset_41
+
+.Frameset_41:
db BATTLEANIMOAMSET_4B, $01
db BATTLEANIMOAMSET_4C, $01
db BATTLEANIMOAMSET_4D, $01
@@ -277,10 +277,10 @@
db -3, $02
db BATTLEANIMOAMSET_52, $02
db -3, $02
- db BATTLEANIMOAMSET_52, $02
+ db BATTLEANIMOAMSET_52, $02
db -4
-
-.Frameset_42
+
+.Frameset_42:
db BATTLEANIMOAMSET_4B, $41
db BATTLEANIMOAMSET_4C, $41
db BATTLEANIMOAMSET_4D, $41
@@ -293,58 +293,58 @@
db -3, $02
db BATTLEANIMOAMSET_52, $42
db -3, $02
- db BATTLEANIMOAMSET_52, $42
+ db BATTLEANIMOAMSET_52, $42
db -4
-
-.Frameset_08
+
+.Frameset_08:
db BATTLEANIMOAMSET_00, $03
db BATTLEANIMOAMSET_07, $03
db BATTLEANIMOAMSET_08, $03
- db BATTLEANIMOAMSET_09, $03
+ db BATTLEANIMOAMSET_09, $03
db -4
-
-.Frameset_09
+
+.Frameset_09:
db BATTLEANIMOAMSET_0A, $07
db BATTLEANIMOAMSET_0B, $07
db BATTLEANIMOAMSET_0A, $07
- db BATTLEANIMOAMSET_0B, $47
+ db BATTLEANIMOAMSET_0B, $47
db -2
-
-.Frameset_0a
- db BATTLEANIMOAMSET_0C, $08
+
+.Frameset_0a:
+ db BATTLEANIMOAMSET_0C, $08
db -1
-
-.Frameset_0b
- db BATTLEANIMOAMSET_0D, $08
+
+.Frameset_0b:
+ db BATTLEANIMOAMSET_0D, $08
db -1
-
-.Frameset_0c
- db BATTLEANIMOAMSET_0A, $08
+
+.Frameset_0c:
+ db BATTLEANIMOAMSET_0A, $08
db -1
-
-.Frameset_0d
+
+.Frameset_0d:
db BATTLEANIMOAMSET_0A, $07
db BATTLEANIMOAMSET_0B, $07
db BATTLEANIMOAMSET_0A, $07
db BATTLEANIMOAMSET_0B, $47
- db BATTLEANIMOAMSET_0A, $07
+ db BATTLEANIMOAMSET_0A, $07
db -1
-
-.Frameset_0e
- db BATTLEANIMOAMSET_0A, $08
+
+.Frameset_0e:
+ db BATTLEANIMOAMSET_0A, $08
db -1
-
-.Frameset_0f
+
+.Frameset_0f:
db BATTLEANIMOAMSET_0A, $04
- db BATTLEANIMOAMSET_0E, $04
+ db BATTLEANIMOAMSET_0E, $04
db -2
-
-.Frameset_10
+
+.Frameset_10:
db BATTLEANIMOAMSET_0F, $04
- db BATTLEANIMOAMSET_10, $04
+ db BATTLEANIMOAMSET_10, $04
db -2
-
-.Frameset_11
+
+.Frameset_11:
db BATTLEANIMOAMSET_10, $04
db BATTLEANIMOAMSET_0F, $04
db BATTLEANIMOAMSET_0E, $04
@@ -352,19 +352,19 @@
db BATTLEANIMOAMSET_0E, $04
db BATTLEANIMOAMSET_0A, $04
db BATTLEANIMOAMSET_0E, $04
- db BATTLEANIMOAMSET_0A, $04
+ db BATTLEANIMOAMSET_0A, $04
db -4
-
-.Frameset_12
+
+.Frameset_12:
db BATTLEANIMOAMSET_10, $01
db BATTLEANIMOAMSET_0F, $01
db BATTLEANIMOAMSET_12, $01
db BATTLEANIMOAMSET_11, $01
db BATTLEANIMOAMSET_12, $01
- db BATTLEANIMOAMSET_0F, $01
+ db BATTLEANIMOAMSET_0F, $01
db -2
-
-.Frameset_13
+
+.Frameset_13:
db BATTLEANIMOAMSET_10, $03
db BATTLEANIMOAMSET_0F, $03
db BATTLEANIMOAMSET_12, $01
@@ -375,23 +375,23 @@
db -3, $01
db BATTLEANIMOAMSET_12, $01
db -3, $01
- db BATTLEANIMOAMSET_12, $03
+ db BATTLEANIMOAMSET_12, $03
db -4
-
-.Frameset_14
- db BATTLEANIMOAMSET_13, $14
+
+.Frameset_14:
+ db BATTLEANIMOAMSET_13, $14
db -4
-
-.Frameset_15
+
+.Frameset_15:
db BATTLEANIMOAMSET_10, $01
- db BATTLEANIMOAMSET_0F, $01
+ db BATTLEANIMOAMSET_0F, $01
db -2
-
-.Frameset_16
- db BATTLEANIMOAMSET_14, $08
+
+.Frameset_16:
+ db BATTLEANIMOAMSET_14, $08
db -1
-
-.Frameset_17
+
+.Frameset_17:
db BATTLEANIMOAMSET_17, $04
db BATTLEANIMOAMSET_16, $08
db BATTLEANIMOAMSET_15, $08
@@ -401,109 +401,109 @@
db BATTLEANIMOAMSET_16, $48
db BATTLEANIMOAMSET_15, $48
db BATTLEANIMOAMSET_16, $48
- db BATTLEANIMOAMSET_17, $04
+ db BATTLEANIMOAMSET_17, $04
db -2
-
-.Frameset_56
- db BATTLEANIMOAMSET_69, $08
+
+.Frameset_56:
+ db BATTLEANIMOAMSET_69, $08
db -1
-
-.Frameset_57
+
+.Frameset_57:
db BATTLEANIMOAMSET_69, $20
db BATTLEANIMOAMSET_6A, $04
db BATTLEANIMOAMSET_6B, $04
db BATTLEANIMOAMSET_6D, $04
- db BATTLEANIMOAMSET_6C, $04
+ db BATTLEANIMOAMSET_6C, $04
db -1
-
-.Frameset_58
+
+.Frameset_58:
db BATTLEANIMOAMSET_6C, $08
- db BATTLEANIMOAMSET_6D, $08
+ db BATTLEANIMOAMSET_6D, $08
db -2
-
-.Frameset_18
+
+.Frameset_18:
db BATTLEANIMOAMSET_18, $04
db BATTLEANIMOAMSET_19, $04
- db BATTLEANIMOAMSET_1A, $04
+ db BATTLEANIMOAMSET_1A, $04
db -4
-
-.Frameset_19
- db BATTLEANIMOAMSET_1B, $08
+
+.Frameset_19:
+ db BATTLEANIMOAMSET_1B, $08
db -1
-
-.Frameset_1a
- db BATTLEANIMOAMSET_0F, $08
+
+.Frameset_1a:
+ db BATTLEANIMOAMSET_0F, $08
db -1
-
-.Frameset_1b
- db BATTLEANIMOAMSET_1C, $08
+
+.Frameset_1b:
+ db BATTLEANIMOAMSET_1C, $08
db -1
-
-.Frameset_1c
- db BATTLEANIMOAMSET_0A, $08
+
+.Frameset_1c:
+ db BATTLEANIMOAMSET_0A, $08
db -4
-
-.Frameset_1d
- db BATTLEANIMOAMSET_1D, $08
+
+.Frameset_1d:
+ db BATTLEANIMOAMSET_1D, $08
db -1
-
-.Frameset_1e
- db BATTLEANIMOAMSET_17, $08
+
+.Frameset_1e:
+ db BATTLEANIMOAMSET_17, $08
db -1
-
-.Frameset_1f
+
+.Frameset_1f:
db BATTLEANIMOAMSET_0F, $03
db BATTLEANIMOAMSET_10, $03
- db BATTLEANIMOAMSET_1E, $03
+ db BATTLEANIMOAMSET_1E, $03
db -1
-
-.Frameset_20
+
+.Frameset_20:
db BATTLEANIMOAMSET_1F, $10
- db BATTLEANIMOAMSET_20, $03
+ db BATTLEANIMOAMSET_20, $03
db -4
-
-.Frameset_21
- db BATTLEANIMOAMSET_20, $08
+
+.Frameset_21:
+ db BATTLEANIMOAMSET_20, $08
db -1
-
-.Frameset_22
+
+.Frameset_22:
db BATTLEANIMOAMSET_20, $08
db BATTLEANIMOAMSET_21, $08
db BATTLEANIMOAMSET_1B, $08
- db BATTLEANIMOAMSET_21, $08
+ db BATTLEANIMOAMSET_21, $08
db -2
-
-.Frameset_23
- db BATTLEANIMOAMSET_22, $08
+
+.Frameset_23:
+ db BATTLEANIMOAMSET_22, $08
db -1
-
-.Frameset_24
- db BATTLEANIMOAMSET_1B, $08
+
+.Frameset_24:
+ db BATTLEANIMOAMSET_1B, $08
db -1
-
-.Frameset_25
- db BATTLEANIMOAMSET_23, $08
+
+.Frameset_25:
+ db BATTLEANIMOAMSET_23, $08
db -1
-
-.Frameset_26
- db BATTLEANIMOAMSET_24, $08
+
+.Frameset_26:
+ db BATTLEANIMOAMSET_24, $08
db -1
-
-.Frameset_27
- db BATTLEANIMOAMSET_25, $08
+
+.Frameset_27:
+ db BATTLEANIMOAMSET_25, $08
db -1
-
-.Frameset_28
+
+.Frameset_28:
db BATTLEANIMOAMSET_26, $08
- db BATTLEANIMOAMSET_27, $08
+ db BATTLEANIMOAMSET_27, $08
db -1
-
-.Frameset_29
+
+.Frameset_29:
db BATTLEANIMOAMSET_28, $08
- db BATTLEANIMOAMSET_29, $08
+ db BATTLEANIMOAMSET_29, $08
db -4
-
-.Frameset_2a
+
+.Frameset_2a:
db BATTLEANIMOAMSET_2A, $01
db BATTLEANIMOAMSET_2B, $01
db BATTLEANIMOAMSET_2C, $01
@@ -512,29 +512,29 @@
db BATTLEANIMOAMSET_2D, $01
db BATTLEANIMOAMSET_2C, $01
db BATTLEANIMOAMSET_2B, $01
- db BATTLEANIMOAMSET_2A, $01
+ db BATTLEANIMOAMSET_2A, $01
db -4
-
-.Frameset_2b
+
+.Frameset_2b:
db BATTLEANIMOAMSET_14, $01
- db BATTLEANIMOAMSET_15, $01
+ db BATTLEANIMOAMSET_15, $01
db -2
-
-.Frameset_2c
+
+.Frameset_2c:
db BATTLEANIMOAMSET_2F, $04
- db BATTLEANIMOAMSET_30, $28
+ db BATTLEANIMOAMSET_30, $28
db -4
-
-.Frameset_2d
- db BATTLEANIMOAMSET_31, $08
+
+.Frameset_2d:
+ db BATTLEANIMOAMSET_31, $08
db -1
-
-.Frameset_2e
+
+.Frameset_2e:
db BATTLEANIMOAMSET_32, $20
db BATTLEANIMOAMSET_33, $20
db BATTLEANIMOAMSET_34, $20
- db BATTLEANIMOAMSET_35, $20 ; fallthrough
-.Frameset_2f
+ db BATTLEANIMOAMSET_35, $20 ; fallthrough
+.Frameset_2f:
db -3, $02
db BATTLEANIMOAMSET_35, $04
db -3, $02
@@ -542,42 +542,42 @@
db -3, $02
db BATTLEANIMOAMSET_35, $04
db -3, $02
- db BATTLEANIMOAMSET_35, $04
+ db BATTLEANIMOAMSET_35, $04
db -4
-
-.Frameset_30
+
+.Frameset_30:
db BATTLEANIMOAMSET_14, $04
- db BATTLEANIMOAMSET_15, $04
+ db BATTLEANIMOAMSET_15, $04
db -2
-
-.Frameset_31
+
+.Frameset_31:
db BATTLEANIMOAMSET_36, $02
db BATTLEANIMOAMSET_37, $02
db BATTLEANIMOAMSET_38, $02
- db BATTLEANIMOAMSET_39, $20
+ db BATTLEANIMOAMSET_39, $20
db -4
-
-.Frameset_32
+
+.Frameset_32:
db BATTLEANIMOAMSET_3A, $02
db BATTLEANIMOAMSET_3B, $02
db BATTLEANIMOAMSET_3C, $02
- db BATTLEANIMOAMSET_3D, $20
+ db BATTLEANIMOAMSET_3D, $20
db -4
-
-.Frameset_33
+
+.Frameset_33:
db BATTLEANIMOAMSET_3A, $42
db BATTLEANIMOAMSET_3B, $42
db BATTLEANIMOAMSET_3C, $42
- db BATTLEANIMOAMSET_3D, $60
+ db BATTLEANIMOAMSET_3D, $60
db -4
-
-.Frameset_34
+
+.Frameset_34:
db BATTLEANIMOAMSET_3E, $08
db BATTLEANIMOAMSET_3F, $08
- db BATTLEANIMOAMSET_40, $08
+ db BATTLEANIMOAMSET_40, $08
db -1
-
-.Frameset_35
+
+.Frameset_35:
db BATTLEANIMOAMSET_40, $02
db -3, $02
db BATTLEANIMOAMSET_40, $02
@@ -585,60 +585,60 @@
db BATTLEANIMOAMSET_41, $02
db -3, $02
db BATTLEANIMOAMSET_41, $02
- db -3, $02
+ db -3, $02
db -2
-
-.Frameset_36
+
+.Frameset_36:
db BATTLEANIMOAMSET_42, $02
db BATTLEANIMOAMSET_43, $02
db BATTLEANIMOAMSET_44, $02
- db BATTLEANIMOAMSET_45, $02
+ db BATTLEANIMOAMSET_45, $02
db -2
-
-.Frameset_37
+
+.Frameset_37:
db BATTLEANIMOAMSET_19, $02
- db -3, $02
+ db -3, $02
db -2
-
-.Frameset_38
+
+.Frameset_38:
db BATTLEANIMOAMSET_46, $04
- db BATTLEANIMOAMSET_47, $04
+ db BATTLEANIMOAMSET_47, $04
db -2
-
-.Frameset_39
+
+.Frameset_39:
db BATTLEANIMOAMSET_18, $02
- db -3, $02
+ db -3, $02
db -2
-
-.Frameset_3a
- db BATTLEANIMOAMSET_48, $08
+
+.Frameset_3a:
+ db BATTLEANIMOAMSET_48, $08
db -1
-
-.Frameset_3b
- db BATTLEANIMOAMSET_48, $48
+
+.Frameset_3b:
+ db BATTLEANIMOAMSET_48, $48
db -1
-
-.Frameset_3c
- db BATTLEANIMOAMSET_49, $08
+
+.Frameset_3c:
+ db BATTLEANIMOAMSET_49, $08
db -1
-
-.Frameset_3d
- db BATTLEANIMOAMSET_4A, $08
+
+.Frameset_3d:
+ db BATTLEANIMOAMSET_4A, $08
db -1
-
-.Frameset_43
+
+.Frameset_43:
db BATTLEANIMOAMSET_20, $10
db BATTLEANIMOAMSET_1F, $10
- db BATTLEANIMOAMSET_1E, $10
+ db BATTLEANIMOAMSET_1E, $10
db -1
-
-.Frameset_4c
+
+.Frameset_4c:
db BATTLEANIMOAMSET_20, $08
db BATTLEANIMOAMSET_1F, $08
- db BATTLEANIMOAMSET_1E, $08
+ db BATTLEANIMOAMSET_1E, $08
db -1
-
-.Frameset_44
+
+.Frameset_44:
db -3, $14
db BATTLEANIMOAMSET_55, $28
db BATTLEANIMOAMSET_54, $28
@@ -648,16 +648,16 @@
db -3, $04
db BATTLEANIMOAMSET_53, $04
db -3, $04
- db BATTLEANIMOAMSET_53, $04
+ db BATTLEANIMOAMSET_53, $04
db -4
-
-.Frameset_7e
+
+.Frameset_7e:
db BATTLEANIMOAMSET_1E, $08
db BATTLEANIMOAMSET_1F, $08
- db BATTLEANIMOAMSET_20, $08
+ db BATTLEANIMOAMSET_20, $08
db -4
-
-.Frameset_45
+
+.Frameset_45:
db -3, $00
db BATTLEANIMOAMSET_14, $00
db BATTLEANIMOAMSET_15, $00
@@ -665,52 +665,52 @@
db -3, $00
db BATTLEANIMOAMSET_16, $40
db BATTLEANIMOAMSET_15, $00
- db BATTLEANIMOAMSET_16, $00
+ db BATTLEANIMOAMSET_16, $00
db -2
-
-.Frameset_46
+
+.Frameset_46:
db BATTLEANIMOAMSET_56, $02
- db BATTLEANIMOAMSET_57, $04
+ db BATTLEANIMOAMSET_57, $04
db -4
-
-.Frameset_47
+
+.Frameset_47:
db BATTLEANIMOAMSET_56, $c2
- db BATTLEANIMOAMSET_57, $c4
+ db BATTLEANIMOAMSET_57, $c4
db -4
-
-.Frameset_48
+
+.Frameset_48:
db BATTLEANIMOAMSET_56, $01
db BATTLEANIMOAMSET_57, $01
db BATTLEANIMOAMSET_58, $01
db BATTLEANIMOAMSET_57, $c1
db BATTLEANIMOAMSET_58, $c1
- db BATTLEANIMOAMSET_57, $02
+ db BATTLEANIMOAMSET_57, $02
db -4
-
-.Frameset_49
+
+.Frameset_49:
db BATTLEANIMOAMSET_56, $c1
db BATTLEANIMOAMSET_57, $c1
db BATTLEANIMOAMSET_58, $c1
db BATTLEANIMOAMSET_57, $01
db BATTLEANIMOAMSET_58, $01
- db BATTLEANIMOAMSET_57, $c2
+ db BATTLEANIMOAMSET_57, $c2
db -4
-
-.Frameset_4a
+
+.Frameset_4a:
db BATTLEANIMOAMSET_57, $c1
db BATTLEANIMOAMSET_58, $c1
db BATTLEANIMOAMSET_57, $01
- db BATTLEANIMOAMSET_58, $01
+ db BATTLEANIMOAMSET_58, $01
db -2
-
-.Frameset_4b
+
+.Frameset_4b:
db BATTLEANIMOAMSET_59, $01
db BATTLEANIMOAMSET_5A, $01
db BATTLEANIMOAMSET_5B, $01
- db BATTLEANIMOAMSET_5C, $02
+ db BATTLEANIMOAMSET_5C, $02
db -4
-
-.Frameset_4d
+
+.Frameset_4d:
db BATTLEANIMOAMSET_0A, $0a
db BATTLEANIMOAMSET_0B, $43
db BATTLEANIMOAMSET_5D, $43
@@ -718,103 +718,103 @@
db BATTLEANIMOAMSET_0A, $82
db BATTLEANIMOAMSET_0B, $81
db BATTLEANIMOAMSET_5D, $01
- db BATTLEANIMOAMSET_0B, $01
+ db BATTLEANIMOAMSET_0B, $01
db -2
-
-.Frameset_4e
+
+.Frameset_4e:
db BATTLEANIMOAMSET_0A, $03
db BATTLEANIMOAMSET_0B, $47
db BATTLEANIMOAMSET_0A, $07
db BATTLEANIMOAMSET_0B, $07
- db BATTLEANIMOAMSET_0A, $03
+ db BATTLEANIMOAMSET_0A, $03
db -2
-
-.Frameset_4f
+
+.Frameset_4f:
db BATTLEANIMOAMSET_5E, $20
- db BATTLEANIMOAMSET_5E, $20
+ db BATTLEANIMOAMSET_5E, $20
db -4
-
-.Frameset_50
+
+.Frameset_50:
db BATTLEANIMOAMSET_5F, $20
- db BATTLEANIMOAMSET_5F, $20
+ db BATTLEANIMOAMSET_5F, $20
db -4
-
-.Frameset_51
- db BATTLEANIMOAMSET_60, $08
+
+.Frameset_51:
+ db BATTLEANIMOAMSET_60, $08
db -1
-
-.Frameset_52
+
+.Frameset_52:
db BATTLEANIMOAMSET_61, $01
db BATTLEANIMOAMSET_62, $01
- db BATTLEANIMOAMSET_63, $01
+ db BATTLEANIMOAMSET_63, $01
db -1
-
-.Frameset_53
+
+.Frameset_53:
db BATTLEANIMOAMSET_63, $07
- db BATTLEANIMOAMSET_64, $07
+ db BATTLEANIMOAMSET_64, $07
db -2
-
-.Frameset_54
+
+.Frameset_54:
db BATTLEANIMOAMSET_65, $01
db BATTLEANIMOAMSET_66, $01
- db BATTLEANIMOAMSET_67, $01
+ db BATTLEANIMOAMSET_67, $01
db -1
-
-.Frameset_55
+
+.Frameset_55:
db BATTLEANIMOAMSET_67, $07
- db BATTLEANIMOAMSET_68, $07
+ db BATTLEANIMOAMSET_68, $07
db -2
-
-.Frameset_59
- db BATTLEANIMOAMSET_6E, $08
+
+.Frameset_59:
+ db BATTLEANIMOAMSET_6E, $08
db -1
-
-.Frameset_5a
- db BATTLEANIMOAMSET_6F, $08
+
+.Frameset_5a:
+ db BATTLEANIMOAMSET_6F, $08
db -1
-
-.Frameset_5b
- db BATTLEANIMOAMSET_6E, $88
+
+.Frameset_5b:
+ db BATTLEANIMOAMSET_6E, $88
db -1
-
-.Frameset_5c
+
+.Frameset_5c:
db BATTLEANIMOAMSET_18, $04
db BATTLEANIMOAMSET_70, $04
db BATTLEANIMOAMSET_71, $04
db BATTLEANIMOAMSET_72, $04
- db BATTLEANIMOAMSET_73, $04
+ db BATTLEANIMOAMSET_73, $04
db -4
-
-.Frameset_5d
+
+.Frameset_5d:
db BATTLEANIMOAMSET_74, $04
- db BATTLEANIMOAMSET_75, $04
+ db BATTLEANIMOAMSET_75, $04
db -2
-
-.Frameset_5e
- db BATTLEANIMOAMSET_14, $08
+
+.Frameset_5e:
+ db BATTLEANIMOAMSET_14, $08
db -1
-
-.Frameset_7a
+
+.Frameset_7a:
db BATTLEANIMOAMSET_74, $03
db BATTLEANIMOAMSET_14, $03
db BATTLEANIMOAMSET_15, $03
db BATTLEANIMOAMSET_14, $03
- db BATTLEANIMOAMSET_15, $03
+ db BATTLEANIMOAMSET_15, $03
db -4
-
-.Frameset_af
+
+.Frameset_af:
db BATTLEANIMOAMSET_14, $00
db BATTLEANIMOAMSET_15, $00
db BATTLEANIMOAMSET_14, $00
db BATTLEANIMOAMSET_15, $00
- db BATTLEANIMOAMSET_74, $0c
+ db BATTLEANIMOAMSET_74, $0c
db -4
-
-.Frameset_5f
- db BATTLEANIMOAMSET_76, $08
+
+.Frameset_5f:
+ db BATTLEANIMOAMSET_76, $08
db -1
-
-.Frameset_60
+
+.Frameset_60:
db BATTLEANIMOAMSET_77, $01
db BATTLEANIMOAMSET_78, $01
db BATTLEANIMOAMSET_79, $01
@@ -827,32 +827,32 @@
db BATTLEANIMOAMSET_7A, $c1
db BATTLEANIMOAMSET_79, $c1
db BATTLEANIMOAMSET_78, $c1
- db BATTLEANIMOAMSET_77, $c1
+ db BATTLEANIMOAMSET_77, $c1
db -4
-
-.Frameset_61
+
+.Frameset_61:
db BATTLEANIMOAMSET_1B, $04
- db BATTLEANIMOAMSET_7E, $04
+ db BATTLEANIMOAMSET_7E, $04
db -2
-
-.Frameset_62
+
+.Frameset_62:
db BATTLEANIMOAMSET_1B, $44
- db BATTLEANIMOAMSET_7E, $44
+ db BATTLEANIMOAMSET_7E, $44
db -2
-
-.Frameset_63
- db BATTLEANIMOAMSET_7F, $08
+
+.Frameset_63:
+ db BATTLEANIMOAMSET_7F, $08
db -1
-
-.Frameset_64
- db BATTLEANIMOAMSET_25, $08
+
+.Frameset_64:
+ db BATTLEANIMOAMSET_25, $08
db -1
-
-.Frameset_65
- db BATTLEANIMOAMSET_80, $08
+
+.Frameset_65:
+ db BATTLEANIMOAMSET_80, $08
db -1
-
-.Frameset_66
+
+.Frameset_66:
db BATTLEANIMOAMSET_83, $07
db BATTLEANIMOAMSET_82, $07
db BATTLEANIMOAMSET_81, $07
@@ -859,114 +859,114 @@
db BATTLEANIMOAMSET_82, $07
db BATTLEANIMOAMSET_83, $07
db BATTLEANIMOAMSET_82, $07
- db BATTLEANIMOAMSET_81, $07
+ db BATTLEANIMOAMSET_81, $07
db -4
-
-.Frameset_67
- db BATTLEANIMOAMSET_1B, $10
+
+.Frameset_67:
+ db BATTLEANIMOAMSET_1B, $10
db -4
-
-.Frameset_68
+
+.Frameset_68:
db -3, $0f
db BATTLEANIMOAMSET_84, $0f
db BATTLEANIMOAMSET_85, $0f
db BATTLEANIMOAMSET_29, $0f
db BATTLEANIMOAMSET_28, $0f
- db BATTLEANIMOAMSET_86, $20
+ db BATTLEANIMOAMSET_86, $20
db -4
-
-.Frameset_69
+
+.Frameset_69:
db BATTLEANIMOAMSET_1B, $03
db BATTLEANIMOAMSET_87, $03
db BATTLEANIMOAMSET_88, $03
- db BATTLEANIMOAMSET_89, $03
+ db BATTLEANIMOAMSET_89, $03
db -4
-
-.Frameset_6a
+
+.Frameset_6a:
db BATTLEANIMOAMSET_8A, $02
db BATTLEANIMOAMSET_8B, $02
db BATTLEANIMOAMSET_8C, $02
- db BATTLEANIMOAMSET_8D, $02
+ db BATTLEANIMOAMSET_8D, $02
db -4
-
-.Frameset_6b
+
+.Frameset_6b:
db BATTLEANIMOAMSET_61, $02
db BATTLEANIMOAMSET_62, $02
- db BATTLEANIMOAMSET_63, $02
+ db BATTLEANIMOAMSET_63, $02
db -1
-
-.Frameset_6c
+
+.Frameset_6c:
db BATTLEANIMOAMSET_65, $02
db BATTLEANIMOAMSET_66, $02
- db BATTLEANIMOAMSET_67, $02
+ db BATTLEANIMOAMSET_67, $02
db -1
-
-.Frameset_6d
- db BATTLEANIMOAMSET_8E, $08
+
+.Frameset_6d:
+ db BATTLEANIMOAMSET_8E, $08
db -1
-
-.Frameset_6e
- db BATTLEANIMOAMSET_8E, $48
+
+.Frameset_6e:
+ db BATTLEANIMOAMSET_8E, $48
db -1
-
-.Frameset_6f
+
+.Frameset_6f:
db BATTLEANIMOAMSET_8F, $10
- db BATTLEANIMOAMSET_90, $10
+ db BATTLEANIMOAMSET_90, $10
db -2
-
-.Frameset_70
+
+.Frameset_70:
db BATTLEANIMOAMSET_91, $10
- db BATTLEANIMOAMSET_92, $10
+ db BATTLEANIMOAMSET_92, $10
db -2
-
-.Frameset_71
- db BATTLEANIMOAMSET_93, $08
+
+.Frameset_71:
+ db BATTLEANIMOAMSET_93, $08
db -1
-
-.Frameset_72
- db BATTLEANIMOAMSET_1E, $08
+
+.Frameset_72:
+ db BATTLEANIMOAMSET_1E, $08
db -1
-
-.Frameset_73
+
+.Frameset_73:
db BATTLEANIMOAMSET_1B, $07
- db BATTLEANIMOAMSET_94, $07
+ db BATTLEANIMOAMSET_94, $07
db -2
-
-.Frameset_74
- db BATTLEANIMOAMSET_95, $08
+
+.Frameset_74:
+ db BATTLEANIMOAMSET_95, $08
db -1
-
-.Frameset_75
- db BATTLEANIMOAMSET_96, $08
+
+.Frameset_75:
+ db BATTLEANIMOAMSET_96, $08
db -1
-
-.Frameset_76
- db BATTLEANIMOAMSET_95, $08
+
+.Frameset_76:
+ db BATTLEANIMOAMSET_95, $08
db -1
-
-.Frameset_77
+
+.Frameset_77:
db BATTLEANIMOAMSET_97, $01
- db BATTLEANIMOAMSET_97, $41
+ db BATTLEANIMOAMSET_97, $41
db -2
-
-.Frameset_78
- db BATTLEANIMOAMSET_98, $08
+
+.Frameset_78:
+ db BATTLEANIMOAMSET_98, $08
db -1
-
-.Frameset_79
+
+.Frameset_79:
db BATTLEANIMOAMSET_99, $20
db BATTLEANIMOAMSET_99, $20
db BATTLEANIMOAMSET_99, $20
db BATTLEANIMOAMSET_99, $20
db BATTLEANIMOAMSET_99, $20
- db BATTLEANIMOAMSET_9A, $08
+ db BATTLEANIMOAMSET_9A, $08
db -1
-
-.Frameset_7b
- db BATTLEANIMOAMSET_9B, $08
+
+.Frameset_7b:
+ db BATTLEANIMOAMSET_9B, $08
db -1
-
-.Frameset_7c
+
+.Frameset_7c:
db BATTLEANIMOAMSET_9C, $02
db BATTLEANIMOAMSET_9D, $02
db BATTLEANIMOAMSET_9E, $08
@@ -975,182 +975,182 @@
db -3, $02
db BATTLEANIMOAMSET_9E, $02
db -3, $02
- db BATTLEANIMOAMSET_9E, $02
+ db BATTLEANIMOAMSET_9E, $02
db -4
-
-.Frameset_7d
- db BATTLEANIMOAMSET_9F, $08
+
+.Frameset_7d:
+ db BATTLEANIMOAMSET_9F, $08
db -1
-
-.Frameset_7f
- db BATTLEANIMOAMSET_0F, $08
+
+.Frameset_7f:
+ db BATTLEANIMOAMSET_0F, $08
db -1
-
-.Frameset_80
- db BATTLEANIMOAMSET_6B, $18
+
+.Frameset_80:
+ db BATTLEANIMOAMSET_6B, $18
db -4
-
-.Frameset_81
- db BATTLEANIMOAMSET_A0, $01 ; fallthrough
-.Frameset_82
- db BATTLEANIMOAMSET_A1, $01 ; fallthrough
-.Frameset_83
- db BATTLEANIMOAMSET_A2, $01
+
+.Frameset_81:
+ db BATTLEANIMOAMSET_A0, $01 ; fallthrough
+.Frameset_82:
+ db BATTLEANIMOAMSET_A1, $01 ; fallthrough
+.Frameset_83:
+ db BATTLEANIMOAMSET_A2, $01
db -4
-
-.Frameset_84
- db BATTLEANIMOAMSET_A3, $08
+
+.Frameset_84:
+ db BATTLEANIMOAMSET_A3, $08
db -1
-
-.Frameset_85
+
+.Frameset_85:
db BATTLEANIMOAMSET_A4, $04
db BATTLEANIMOAMSET_A5, $04
db BATTLEANIMOAMSET_A6, $04
db BATTLEANIMOAMSET_A7, $04
db BATTLEANIMOAMSET_A6, $44
- db BATTLEANIMOAMSET_A5, $44
+ db BATTLEANIMOAMSET_A5, $44
db -2
-
-.Frameset_86
+
+.Frameset_86:
db BATTLEANIMOAMSET_A8, $04
db BATTLEANIMOAMSET_A9, $04
db BATTLEANIMOAMSET_AA, $04
db BATTLEANIMOAMSET_AB, $04
db BATTLEANIMOAMSET_AA, $44
- db BATTLEANIMOAMSET_A9, $44
+ db BATTLEANIMOAMSET_A9, $44
db -2
-
-.Frameset_87
- db BATTLEANIMOAMSET_1B, $08
+
+.Frameset_87:
+ db BATTLEANIMOAMSET_1B, $08
db -1
-
-.Frameset_88
- db BATTLEANIMOAMSET_AC, $08
+
+.Frameset_88:
+ db BATTLEANIMOAMSET_AC, $08
db -1
-
-.Frameset_89
- db BATTLEANIMOAMSET_AD, $08
+
+.Frameset_89:
+ db BATTLEANIMOAMSET_AD, $08
db -1
-
-.Frameset_8a
- db BATTLEANIMOAMSET_AE, $08
+
+.Frameset_8a:
+ db BATTLEANIMOAMSET_AE, $08
db -1
-
-.Frameset_8b
- db BATTLEANIMOAMSET_AF, $08
+
+.Frameset_8b:
+ db BATTLEANIMOAMSET_AF, $08
db -1
-
-.Frameset_8c
- db BATTLEANIMOAMSET_B0, $20
+
+.Frameset_8c:
+ db BATTLEANIMOAMSET_B0, $20
db -4
-
-.Frameset_8d
+
+.Frameset_8d:
db BATTLEANIMOAMSET_B1, $07
- db BATTLEANIMOAMSET_B1, $47
+ db BATTLEANIMOAMSET_B1, $47
db -2
-
-.Frameset_8e
- db BATTLEANIMOAMSET_B2, $08
+
+.Frameset_8e:
+ db BATTLEANIMOAMSET_B2, $08
db -1
-
-.Frameset_8f
- db BATTLEANIMOAMSET_B3, $08
+
+.Frameset_8f:
+ db BATTLEANIMOAMSET_B3, $08
db -1
-
-.Frameset_90
- db BATTLEANIMOAMSET_B3, $48
+
+.Frameset_90:
+ db BATTLEANIMOAMSET_B3, $48
db -1
-
-.Frameset_91
- db BATTLEANIMOAMSET_B3, $88
+
+.Frameset_91:
+ db BATTLEANIMOAMSET_B3, $88
db -1
-
-.Frameset_92
- db BATTLEANIMOAMSET_B3, $c8
+
+.Frameset_92:
+ db BATTLEANIMOAMSET_B3, $c8
db -1
-
-.Frameset_93
- db BATTLEANIMOAMSET_B5, $08
+
+.Frameset_93:
+ db BATTLEANIMOAMSET_B5, $08
db -1
-
-.Frameset_94
- db BATTLEANIMOAMSET_B5, $48
+
+.Frameset_94:
+ db BATTLEANIMOAMSET_B5, $48
db -1
-
-.Frameset_95
- db BATTLEANIMOAMSET_B5, $88
+
+.Frameset_95:
+ db BATTLEANIMOAMSET_B5, $88
db -1
-
-.Frameset_96
- db BATTLEANIMOAMSET_B5, $c8
+
+.Frameset_96:
+ db BATTLEANIMOAMSET_B5, $c8
db -1
-
-.Frameset_97
- db BATTLEANIMOAMSET_B4, $08
+
+.Frameset_97:
+ db BATTLEANIMOAMSET_B4, $08
db -1
-
-.Frameset_98
- db BATTLEANIMOAMSET_6B, $08
+
+.Frameset_98:
+ db BATTLEANIMOAMSET_6B, $08
db -1
-
-.Frameset_99
- db BATTLEANIMOAMSET_B6, $08
+
+.Frameset_99:
+ db BATTLEANIMOAMSET_B6, $08
db -1
-
-.Frameset_9a
- db BATTLEANIMOAMSET_B7, $20
+
+.Frameset_9a:
+ db BATTLEANIMOAMSET_B7, $20
db -1
-
-.Frameset_9b
- db BATTLEANIMOAMSET_1B, $20
+
+.Frameset_9b:
+ db BATTLEANIMOAMSET_1B, $20
db -1
-
-.Frameset_9c
- db BATTLEANIMOAMSET_B8, $20
+
+.Frameset_9c:
+ db BATTLEANIMOAMSET_B8, $20
db -1
-
-.Frameset_9d
- db BATTLEANIMOAMSET_B8, $60
+
+.Frameset_9d:
+ db BATTLEANIMOAMSET_B8, $60
db -1
-
-.Frameset_9e
- db BATTLEANIMOAMSET_B9, $20
+
+.Frameset_9e:
+ db BATTLEANIMOAMSET_B9, $20
db -1
-
-.Frameset_9f
- db BATTLEANIMOAMSET_BA, $20
+
+.Frameset_9f:
+ db BATTLEANIMOAMSET_BA, $20
db -1
-
-.Frameset_a0
- db BATTLEANIMOAMSET_BB, $60
+
+.Frameset_a0:
+ db BATTLEANIMOAMSET_BB, $60
db -1
-
-.Frameset_a1
- db BATTLEANIMOAMSET_BB, $20
+
+.Frameset_a1:
+ db BATTLEANIMOAMSET_BB, $20
db -1
-
-.Frameset_a2
- db BATTLEANIMOAMSET_BC, $20
+
+.Frameset_a2:
+ db BATTLEANIMOAMSET_BC, $20
db -1
-
-.Frameset_a3
+
+.Frameset_a3:
db BATTLEANIMOAMSET_BD, $0b
db BATTLEANIMOAMSET_BE, $0b
- db BATTLEANIMOAMSET_1B, $0b
+ db BATTLEANIMOAMSET_1B, $0b
db -4
-
-.Frameset_a4
+
+.Frameset_a4:
db BATTLEANIMOAMSET_BF, $04
db BATTLEANIMOAMSET_C0, $04
- db BATTLEANIMOAMSET_C1, $04
+ db BATTLEANIMOAMSET_C1, $04
db -4
-
-.Frameset_a5
+
+.Frameset_a5:
db BATTLEANIMOAMSET_C2, $20
- db BATTLEANIMOAMSET_C2, $20
+ db BATTLEANIMOAMSET_C2, $20
db -4
-
-.Frameset_a6
+
+.Frameset_a6:
db BATTLEANIMOAMSET_4B, $02
db BATTLEANIMOAMSET_4C, $02
db BATTLEANIMOAMSET_4D, $20
@@ -1165,10 +1165,10 @@
db -3, $02
db BATTLEANIMOAMSET_52, $02
db -3, $02
- db BATTLEANIMOAMSET_52, $02
+ db BATTLEANIMOAMSET_52, $02
db -4
-
-.Frameset_a7
+
+.Frameset_a7:
db BATTLEANIMOAMSET_4B, $c2
db BATTLEANIMOAMSET_4C, $c2
db BATTLEANIMOAMSET_4D, $e0
@@ -1183,88 +1183,88 @@
db -3, $02
db BATTLEANIMOAMSET_52, $c2
db -3, $02
- db BATTLEANIMOAMSET_52, $c2
+ db BATTLEANIMOAMSET_52, $c2
db -4
-
-.Frameset_a8
+
+.Frameset_a8:
db BATTLEANIMOAMSET_C3, $01
- db BATTLEANIMOAMSET_C3, $c1
+ db BATTLEANIMOAMSET_C3, $c1
db -2
-
-.Frameset_a9
- db BATTLEANIMOAMSET_C4, $20
+
+.Frameset_a9:
+ db BATTLEANIMOAMSET_C4, $20
db -1
-
-.Frameset_aa
+
+.Frameset_aa:
db BATTLEANIMOAMSET_C5, $04
db BATTLEANIMOAMSET_C6, $04
- db BATTLEANIMOAMSET_C7, $04
+ db BATTLEANIMOAMSET_C7, $04
db -4
-
-.Frameset_ab
+
+.Frameset_ab:
db BATTLEANIMOAMSET_C8, $01
- db BATTLEANIMOAMSET_C8, $41
+ db BATTLEANIMOAMSET_C8, $41
db -2
-
-.Frameset_ac
+
+.Frameset_ac:
db BATTLEANIMOAMSET_C9, $03
- db BATTLEANIMOAMSET_05, $03
+ db BATTLEANIMOAMSET_05, $03
db -4
-
-.Frameset_ad
+
+.Frameset_ad:
db BATTLEANIMOAMSET_CA, $20
db BATTLEANIMOAMSET_CB, $03
db BATTLEANIMOAMSET_CA, $03
- db BATTLEANIMOAMSET_CB, $03
+ db BATTLEANIMOAMSET_CB, $03
db -2
-
-.Frameset_ae
- db BATTLEANIMOAMSET_03, $a0
+
+.Frameset_ae:
+ db BATTLEANIMOAMSET_03, $a0
db -1
-
-.Frameset_b0
- db BATTLEANIMOAMSET_CC, $20
+
+.Frameset_b0:
+ db BATTLEANIMOAMSET_CC, $20
db -1
-
-.Frameset_b1
+
+.Frameset_b1:
db BATTLEANIMOAMSET_7F, $02
db BATTLEANIMOAMSET_25, $02
db BATTLEANIMOAMSET_80, $02
- db BATTLEANIMOAMSET_25, $02
+ db BATTLEANIMOAMSET_25, $02
db -2
-
-.Frameset_b2
+
+.Frameset_b2:
db BATTLEANIMOAMSET_CD, $04
db BATTLEANIMOAMSET_CE, $04
db BATTLEANIMOAMSET_CD, $c4
- db BATTLEANIMOAMSET_CE, $c4
+ db BATTLEANIMOAMSET_CE, $c4
db -2
-
-.Frameset_b3
+
+.Frameset_b3:
db BATTLEANIMOAMSET_CF, $04
db BATTLEANIMOAMSET_D0, $04
db BATTLEANIMOAMSET_D1, $04
- db BATTLEANIMOAMSET_D2, $04
+ db BATTLEANIMOAMSET_D2, $04
db -4
-
-.Frameset_b4
- db BATTLEANIMOAMSET_D3, $20
+
+.Frameset_b4:
+ db BATTLEANIMOAMSET_D3, $20
db -1
-
-.Frameset_b5
- db BATTLEANIMOAMSET_D4, $08
+
+.Frameset_b5:
+ db BATTLEANIMOAMSET_D4, $08
db -1
-
-.Frameset_b6
- db BATTLEANIMOAMSET_D5, $08
+
+.Frameset_b6:
+ db BATTLEANIMOAMSET_D5, $08
db -1
-
-.Frameset_b7
- db BATTLEANIMOAMSET_D6, $08
+
+.Frameset_b7:
+ db BATTLEANIMOAMSET_D6, $08
db -1
-
-.Frameset_b8
- db BATTLEANIMOAMSET_D7, $08
+
+.Frameset_b8:
+ db BATTLEANIMOAMSET_D7, $08
db -1
-
-; ceeae
+
+; ceeae
--- a/battle/objects/functions.asm
+++ b/battle/objects/functions.asm
@@ -12,7 +12,7 @@
jp [hl]
; ccfce
-.Jumptable
+.Jumptable:
dw BattleAnimFunction_00 ; 00
dw BattleAnimFunction_01 ; 01
dw BattleAnimFunction_02 ; 02
@@ -425,7 +425,7 @@
ld e, a
pop af
ld [rSVBK], a
-.IsInArray
+.IsInArray:
ld a, [hli]
cp -1
jr z, .load
@@ -634,7 +634,7 @@
call .SetCoords
ret
-.SetCoords
+.SetCoords:
ld hl, BATTLEANIMSTRUCT_0B
add hl, bc
ld a, [hl]
@@ -4100,7 +4100,7 @@
inc a
ret
-.ApplySineWave
+.ApplySineWave:
ld e, a
ld a, d
ld d, 0
--- a/battle/objects/gfx_headers.asm
+++ b/battle/objects/gfx_headers.asm
@@ -2,51 +2,51 @@
AnimObjGFX: ; cfcf6
object_gfx: MACRO
-; label, # tiles
+; # tiles, label
db \1
dba \2
ENDM
object_gfx 0, AnimObj00GFX
- object_gfx 21, AnimObj01GFX
- object_gfx 6, AnimObj02GFX
- object_gfx 6, AnimObj03GFX
- object_gfx 20, AnimObj04GFX
- object_gfx 26, AnimObj05GFX
- object_gfx 18, AnimObj06GFX
- object_gfx 12, AnimObj07GFX
- object_gfx 9, AnimObj08GFX
- object_gfx 17, AnimObj09GFX
- object_gfx 6, AnimObj10GFX
- object_gfx 10, AnimObj11GFX
- object_gfx 9, AnimObj12GFX
- object_gfx 13, AnimObj13GFX
- object_gfx 16, AnimObj14GFX
- object_gfx 2, AnimObj15GFX
- object_gfx 11, AnimObj16GFX
- object_gfx 9, AnimObj17GFX
- object_gfx 9, AnimObj18GFX
- object_gfx 19, AnimObj19GFX
- object_gfx 10, AnimObj20GFX
- object_gfx 12, AnimObj21GFX
- object_gfx 18, AnimObj22GFX
- object_gfx 13, AnimObj23GFX
- object_gfx 10, AnimObj24GFX
- object_gfx 27, AnimObj25GFX
- object_gfx 12, AnimObj26GFX
- object_gfx 14, AnimObj27GFX
- object_gfx 16, AnimObj28GFX
- object_gfx 7, AnimObj29GFX
- object_gfx 8, AnimObj30GFX
- object_gfx 40, AnimObj31GFX
- object_gfx 36, AnimObj32GFX
- object_gfx 16, AnimObj33GFX
- object_gfx 48, AnimObj34GFX
- object_gfx 18, AnimObj35GFX
- object_gfx 38, AnimObj36GFX
- object_gfx 35, AnimObj37GFX
- object_gfx 18, AnimObj38GFX
- object_gfx 24, AnimObj39GFX
+ object_gfx 21, AnimObjHitGFX
+ object_gfx 6, AnimObjCutGFX
+ object_gfx 6, AnimObjFireGFX
+ object_gfx 20, AnimObjWaterGFX
+ object_gfx 26, AnimObjLightningGFX
+ object_gfx 18, AnimObjPlantGFX
+ object_gfx 12, AnimObjSmokeGFX
+ object_gfx 9, AnimObjExplosionGFX
+ object_gfx 17, AnimObjRocksGFX
+ object_gfx 6, AnimObjIceGFX
+ object_gfx 10, AnimObjPokeBallGFX
+ object_gfx 9, AnimObjPoisonGFX
+ object_gfx 13, AnimObjBubbleGFX
+ object_gfx 16, AnimObjNoiseGFX
+ object_gfx 2, AnimObjPowderGFX
+ object_gfx 11, AnimObjBeamGFX
+ object_gfx 9, AnimObjSpeedGFX
+ object_gfx 9, AnimObjChargeGFX
+ object_gfx 19, AnimObjWindGFX
+ object_gfx 10, AnimObjWhipGFX
+ object_gfx 12, AnimObjEggGFX
+ object_gfx 18, AnimObjRopeGFX
+ object_gfx 13, AnimObjPsychicGFX
+ object_gfx 10, AnimObjReflectGFX
+ object_gfx 27, AnimObjStatusGFX
+ object_gfx 12, AnimObjSandGFX
+ object_gfx 14, AnimObjWebGFX
+ object_gfx 16, AnimObjHazeGFX
+ object_gfx 7, AnimObjHornGFX
+ object_gfx 8, AnimObjFlowerGFX
+ object_gfx 40, AnimObjMiscGFX
+ object_gfx 36, AnimObjSkyAttackGFX
+ object_gfx 16, AnimObjGlobeGFX
+ object_gfx 48, AnimObjShapesGFX
+ object_gfx 18, AnimObjObjectsGFX
+ object_gfx 38, AnimObjShineGFX
+ object_gfx 35, AnimObjAngelsGFX
+ object_gfx 18, AnimObjWaveGFX
+ object_gfx 24, AnimObjAeroblastGFX
object_gfx 1, NULL
object_gfx 1, NULL
; cfd9e
--- a/battle/objects/oam.asm
+++ b/battle/objects/oam.asm
@@ -1,1086 +1,1086 @@
-
-BattleAnimOAMData: ; ceeae
-; vtile offset (?), length, address
- dbbw $00, 16, .OAMData_00 ; 00
- dbbw $04, 9, .OAMData_01 ; 01
- dbbw $08, 4, .OAMData_02 ; 02
- dbbw $09, 4, .OAMData_03 ; 03
- dbbw $0d, 4, .OAMData_04 ; 04
- dbbw $0f, 4, .OAMData_03 ; 05
- dbbw $13, 4, .OAMData_04 ; 06
- dbbw $04, 16, .OAMData_00 ; 07
- dbbw $08, 16, .OAMData_00 ; 08
- dbbw $08, 16, .OAMData_09 ; 09
- dbbw $00, 4, .OAMData_04 ; 0a
- dbbw $02, 4, .OAMData_03 ; 0b
- dbbw $06, 2, .OAMData_0c ; 0c
- dbbw $07, 2, .OAMData_0c ; 0d
- dbbw $02, 4, .OAMData_04 ; 0e
- dbbw $04, 1, .OAMData_0f ; 0f
- dbbw $05, 1, .OAMData_0f ; 10
- dbbw $00, 2, .OAMData_11 ; 11
- dbbw $02, 2, .OAMData_11 ; 12
- dbbw $00, 4, .OAMData_13 ; 13
- dbbw $00, 1, .OAMData_0f ; 14
- dbbw $01, 1, .OAMData_0f ; 15
- dbbw $02, 1, .OAMData_0f ; 16
- dbbw $03, 1, .OAMData_0f ; 17
- dbbw $00, 4, .OAMData_02 ; 18
- dbbw $01, 16, .OAMData_00 ; 19
- dbbw $05, 16, .OAMData_00 ; 1a
- dbbw $00, 4, .OAMData_03 ; 1b
- dbbw $05, 12, .OAMData_1c ; 1c
- dbbw $02, 4, .OAMData_02 ; 1d
- dbbw $06, 1, .OAMData_0f ; 1e
- dbbw $07, 1, .OAMData_0f ; 1f
- dbbw $08, 1, .OAMData_0f ; 20
- dbbw $04, 4, .OAMData_03 ; 21
- dbbw $09, 22, .OAMData_22 ; 22
- dbbw $04, 2, .OAMData_11 ; 23
- dbbw $06, 2, .OAMData_11 ; 24
- dbbw $0c, 1, .OAMData_0f ; 25
- dbbw $0a, 1, .OAMData_0f ; 26
- dbbw $0b, 4, .OAMData_02 ; 27
- dbbw $08, 4, .OAMData_04 ; 28
- dbbw $06, 4, .OAMData_04 ; 29
- dbbw $00, 5, .OAMData_2a ; 2a
- dbbw $03, 6, .OAMData_2b ; 2b
- dbbw $00, 7, .OAMData_2c ; 2c
- dbbw $03, 8, .OAMData_2d ; 2d
- dbbw $00, 9, .OAMData_2e ; 2e
- dbbw $00, 4, .OAMData_2f ; 2f
- dbbw $02, 4, .OAMData_30 ; 30
- dbbw $04, 6, .OAMData_31 ; 31
- dbbw $00, 2, .OAMData_32 ; 32
- dbbw $00, 7, .OAMData_33 ; 33
- dbbw $00, 14, .OAMData_32 ; 34
- dbbw $00, 21, .OAMData_33 ; 35
- dbbw $00, 2, .OAMData_36 ; 36
- dbbw $00, 6, .OAMData_36 ; 37
- dbbw $00, 10, .OAMData_36 ; 38
- dbbw $00, 14, .OAMData_36 ; 39
- dbbw $00, 2, .OAMData_3a ; 3a
- dbbw $00, 6, .OAMData_3a ; 3b
- dbbw $00, 10, .OAMData_3a ; 3c
- dbbw $00, 14, .OAMData_3a ; 3d
- dbbw $00, 4, .OAMData_3e ; 3e
- dbbw $00, 16, .OAMData_3e ; 3f
- dbbw $00, 26, .OAMData_3e ; 40
- dbbw $00, 26, .OAMData_41 ; 41
- dbbw $0e, 4, .OAMData_42 ; 42
- dbbw $0e, 8, .OAMData_42 ; 43
- dbbw $0e, 4, .OAMData_44 ; 44
- dbbw $0e, 8, .OAMData_44 ; 45
- dbbw $0e, 4, .OAMData_46 ; 46
- dbbw $0e, 4, .OAMData_47 ; 47
- dbbw $00, 6, .OAMData_48 ; 48
- dbbw $03, 4, .OAMData_49 ; 49
- dbbw $03, 2, .OAMData_4a ; 4a
- dbbw $01, 5, .OAMData_0f ; 4b
- dbbw $01, 6, .OAMData_4c ; 4c
- dbbw $01, 7, .OAMData_4d ; 4d
- dbbw $01, 3, .OAMData_4d ; 4e
- dbbw $01, 8, .OAMData_4f ; 4f
- dbbw $01, 9, .OAMData_50 ; 50
- dbbw $01, 10, .OAMData_51 ; 51
- dbbw $01, 6, .OAMData_51 ; 52
- dbbw $00, 9, .OAMData_01 ; 53
- dbbw $04, 4, .OAMData_02 ; 54
- dbbw $05, 4, .OAMData_02 ; 55
- dbbw $00, 2, .OAMData_56 ; 56
- dbbw $02, 2, .OAMData_56 ; 57
- dbbw $04, 2, .OAMData_56 ; 58
- dbbw $02, 4, .OAMData_59 ; 59
- dbbw $02, 4, .OAMData_5a ; 5a
- dbbw $02, 2, .OAMData_0c ; 5b
- dbbw $04, 2, .OAMData_0c ; 5c
- dbbw $06, 4, .OAMData_5d ; 5d
- dbbw $08, 2, .OAMData_0c ; 5e
- dbbw $09, 2, .OAMData_0c ; 5f
- dbbw $05, 2, .OAMData_60 ; 60
- dbbw $00, 2, .OAMData_61 ; 61
- dbbw $00, 5, .OAMData_61 ; 62
- dbbw $00, 9, .OAMData_61 ; 63
- dbbw $09, 9, .OAMData_61 ; 64
- dbbw $00, 4, .OAMData_65 ; 65
- dbbw $00, 7, .OAMData_65 ; 66
- dbbw $00, 9, .OAMData_65 ; 67
- dbbw $09, 9, .OAMData_65 ; 68
- dbbw $04, 1, .OAMData_69 ; 69
- dbbw $05, 2, .OAMData_6a ; 6a
- dbbw $06, 4, .OAMData_03 ; 6b
- dbbw $0a, 4, .OAMData_03 ; 6c
- dbbw $0e, 4, .OAMData_03 ; 6d
- dbbw $08, 5, .OAMData_6e ; 6e
- dbbw $0d, 3, .OAMData_6f ; 6f
- dbbw $01, 8, .OAMData_70 ; 70
- dbbw $03, 8, .OAMData_70 ; 71
- dbbw $05, 8, .OAMData_70 ; 72
- dbbw $07, 8, .OAMData_70 ; 73
- dbbw $06, 4, .OAMData_02 ; 74
- dbbw $07, 4, .OAMData_02 ; 75
- dbbw $0a, 2, .OAMData_76 ; 76
- dbbw $00, 1, .OAMData_77 ; 77
- dbbw $00, 3, .OAMData_78 ; 78
- dbbw $00, 6, .OAMData_79 ; 79
- dbbw $00, 9, .OAMData_7a ; 7a
- dbbw $00, 12, .OAMData_7b ; 7b
- dbbw $00, 14, .OAMData_7c ; 7c
- dbbw $00, 15, .OAMData_7d ; 7d
- dbbw $04, 4, .OAMData_03 ; 7e
- dbbw $08, 4, .OAMData_03 ; 7f
- dbbw $0d, 1, .OAMData_0f ; 80
- dbbw $0e, 4, .OAMData_81 ; 81
- dbbw $10, 1, .OAMData_0f ; 82
- dbbw $11, 1, .OAMData_0f ; 83
- dbbw $04, 2, .OAMData_6a ; 84
- dbbw $05, 2, .OAMData_6a ; 85
- dbbw $0a, 4, .OAMData_04 ; 86
- dbbw $00, 8, .OAMData_87 ; 87
- dbbw $00, 12, .OAMData_88 ; 88
- dbbw $00, 16, .OAMData_87 ; 89
- dbbw $09, 2, .OAMData_8a ; 8a
- dbbw $09, 4, .OAMData_8a ; 8b
- dbbw $09, 6, .OAMData_8a ; 8c
- dbbw $09, 8, .OAMData_8a ; 8d
- dbbw $12, 5, .OAMData_8e ; 8e
- dbbw $00, 4, .OAMData_8f ; 8f
- dbbw $04, 4, .OAMData_8f ; 90
- dbbw $08, 4, .OAMData_8f ; 91
- dbbw $0c, 4, .OAMData_8f ; 92
- dbbw $00, 6, .OAMData_93 ; 93
- dbbw $04, 4, .OAMData_03 ; 94
- dbbw $0a, 4, .OAMData_04 ; 95
- dbbw $15, 4, .OAMData_30 ; 96
- dbbw $04, 4, .OAMData_30 ; 97
- dbbw $0c, 4, .OAMData_04 ; 98
- dbbw $0a, 4, .OAMData_99 ; 99
- dbbw $0c, 4, .OAMData_03 ; 9a
- dbbw $00, 36, .OAMData_9b ; 9b
- dbbw $0d, 2, .OAMData_9c ; 9c
- dbbw $0d, 4, .OAMData_9c ; 9d
- dbbw $0d, 6, .OAMData_9c ; 9e
- dbbw $02, 8, .OAMData_9f ; 9f
- dbbw $08, 7, .OAMData_a0 ; a0
- dbbw $08, 5, .OAMData_a0 ; a1
- dbbw $08, 3, .OAMData_a0 ; a2
- dbbw $00, 16, .OAMData_1c ; a3
- dbbw $00, 9, .OAMData_a4 ; a4
- dbbw $06, 9, .OAMData_a4 ; a5
- dbbw $0c, 9, .OAMData_a4 ; a6
- dbbw $12, 9, .OAMData_a4 ; a7
- dbbw $18, 9, .OAMData_a4 ; a8
- dbbw $1e, 9, .OAMData_a4 ; a9
- dbbw $24, 9, .OAMData_a4 ; aa
- dbbw $2a, 9, .OAMData_a4 ; ab
- dbbw $03, 4, .OAMData_ac ; ac
- dbbw $12, 4, .OAMData_03 ; ad
- dbbw $10, 4, .OAMData_04 ; ae
- dbbw $16, 1, .OAMData_0f ; af
- dbbw $17, 4, .OAMData_02 ; b0
- dbbw $18, 4, .OAMData_03 ; b1
- dbbw $1c, 4, .OAMData_03 ; b2
- dbbw $20, 3, .OAMData_03 ; b3
- dbbw $23, 4, .OAMData_04 ; b4
- dbbw $25, 3, .OAMData_03 ; b5
- dbbw $17, 4, .OAMData_03 ; b6
- dbbw $0a, 16, .OAMData_00 ; b7
- dbbw $10, 16, .OAMData_1c ; b8
- dbbw $00, 16, .OAMData_1c ; b9
- dbbw $04, 4, .OAMData_03 ; ba
- dbbw $08, 2, .OAMData_11 ; bb
- dbbw $20, 6, .OAMData_bc ; bc
- dbbw $08, 1, .OAMData_0f ; bd
- dbbw $04, 4, .OAMData_03 ; be
- dbbw $1a, 4, .OAMData_30 ; bf
- dbbw $16, 9, .OAMData_01 ; c0
- dbbw $10, 16, .OAMData_c1 ; c1
- dbbw $09, 6, .OAMData_c2 ; c2
- dbbw $11, 9, .OAMData_c3 ; c3
- dbbw $0e, 4, .OAMData_03 ; c4
- dbbw $0b, 4, .OAMData_30 ; c5
- dbbw $1c, 6, .OAMData_02 ; c6
- dbbw $20, 16, .OAMData_c1 ; c7
- dbbw $05, 6, .OAMData_c8 ; c8
- dbbw $0b, 4, .OAMData_03 ; c9
- dbbw $09, 4, .OAMData_ca ; ca
- dbbw $0b, 4, .OAMData_04 ; cb
- dbbw $11, 13, .OAMData_cc ; cc
- dbbw $00, 9, .OAMData_c3 ; cd
- dbbw $09, 9, .OAMData_c3 ; ce
- dbbw $00, 12, .OAMData_cf ; cf
- dbbw $06, 12, .OAMData_cf ; d0
- dbbw $0c, 12, .OAMData_cf ; d1
- dbbw $12, 12, .OAMData_cf ; d2
- dbbw $00, 13, .OAMData_cc ; d3
- dbbw $00, 7, .OAMData_d4 ; d4
- dbbw $00, 6, .OAMData_d5 ; d5
- dbbw $00, 14, .OAMData_d6 ; d6
- dbbw $00, 12, .OAMData_d7 ; d7
-
-.OAMData_11
- dsprite -1, 0, -1, 4, $00, $00
- dsprite 0, 0, -1, 4, $01, $00
-
-.OAMData_56
- dsprite -1, 4, -1, 0, $00, $00
- dsprite -1, 4, 0, 0, $01, $00
-
-.OAMData_03
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $02, $00
- dsprite 0, 0, 0, 0, $03, $00
-
-.OAMData_02
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $00, $20
- dsprite 0, 0, -1, 0, $00, $40
- dsprite 0, 0, 0, 0, $00, $60
-
-.OAMData_c3
- dsprite -2, 4, -2, 4, $00, $00
- dsprite -2, 4, -1, 4, $01, $00
- dsprite -2, 4, 0, 4, $02, $00
- dsprite -1, 4, -2, 4, $03, $00
- dsprite -1, 4, -1, 4, $04, $00
- dsprite -1, 4, 0, 4, $05, $00
- dsprite 0, 4, -2, 4, $06, $00
- dsprite 0, 4, -1, 4, $07, $00
- dsprite 0, 4, 0, 4, $08, $00
-
-.OAMData_01
- dsprite -2, 4, -2, 4, $00, $00
- dsprite -2, 4, -1, 4, $01, $00
- dsprite -2, 4, 0, 4, $00, $20
- dsprite -1, 4, -2, 4, $02, $00
- dsprite -1, 4, -1, 4, $03, $00
- dsprite -1, 4, 0, 4, $02, $60
- dsprite 0, 4, -2, 4, $00, $40
- dsprite 0, 4, -1, 4, $01, $60
- dsprite 0, 4, 0, 4, $00, $60
-
-.OAMData_cf
- dsprite -2, 0, -2, 4, $00, $00
- dsprite -2, 0, -1, 4, $01, $00
- dsprite -2, 0, 0, 4, $02, $00
- dsprite -1, 0, -2, 4, $03, $00
- dsprite -1, 0, -1, 4, $04, $00
- dsprite -1, 0, 0, 4, $05, $00
- dsprite 0, 0, -2, 4, $05, $60
- dsprite 0, 0, -1, 4, $04, $60
- dsprite 0, 0, 0, 4, $03, $60
- dsprite 1, 0, -2, 4, $02, $60
- dsprite 1, 0, -1, 4, $01, $60
- dsprite 1, 0, 0, 4, $00, $60
-
-.OAMData_1c
- dsprite -2, 0, -2, 0, $00, $00
- dsprite -2, 0, -1, 0, $01, $00
- dsprite -2, 0, 0, 0, $02, $00
- dsprite -2, 0, 1, 0, $03, $00
- dsprite -1, 0, -2, 0, $04, $00
- dsprite -1, 0, -1, 0, $05, $00
- dsprite -1, 0, 0, 0, $06, $00
- dsprite -1, 0, 1, 0, $07, $00
- dsprite 0, 0, -2, 0, $08, $00
- dsprite 0, 0, -1, 0, $09, $00
- dsprite 0, 0, 0, 0, $0a, $00
- dsprite 0, 0, 1, 0, $0b, $00
- dsprite 1, 0, -2, 0, $0c, $00
- dsprite 1, 0, -1, 0, $0d, $00
- dsprite 1, 0, 0, 0, $0e, $00
- dsprite 1, 0, 1, 0, $0f, $00
-
-.OAMData_00
- dsprite -2, 0, -2, 0, $00, $00
- dsprite -2, 0, -1, 0, $01, $00
- dsprite -1, 0, -2, 0, $02, $00
- dsprite -1, 0, -1, 0, $03, $00
- dsprite -2, 0, 0, 0, $01, $20
- dsprite -2, 0, 1, 0, $00, $20
- dsprite -1, 0, 0, 0, $03, $20
- dsprite -1, 0, 1, 0, $02, $20
- dsprite 0, 0, -2, 0, $02, $40
- dsprite 0, 0, -1, 0, $03, $40
- dsprite 1, 0, -2, 0, $00, $40
- dsprite 1, 0, -1, 0, $01, $40
- dsprite 0, 0, 0, 0, $03, $60
- dsprite 0, 0, 1, 0, $02, $60
- dsprite 1, 0, 0, 0, $01, $60
- dsprite 1, 0, 1, 0, $00, $60
-
-.OAMData_09
- dsprite -3, 4, -3, 4, $00, $00
- dsprite -3, 4, -2, 4, $01, $00
- dsprite -2, 4, -3, 4, $02, $00
- dsprite -2, 4, -2, 4, $03, $00
- dsprite -3, 4, 0, 4, $01, $20
- dsprite -3, 4, 1, 4, $00, $20
- dsprite -2, 4, 0, 4, $03, $20
- dsprite -2, 4, 1, 4, $02, $20
- dsprite 0, 4, -3, 4, $02, $40
- dsprite 0, 4, -2, 4, $03, $40
- dsprite 1, 4, -3, 4, $00, $40
- dsprite 1, 4, -2, 4, $01, $40
- dsprite 0, 4, 0, 4, $03, $60
- dsprite 0, 4, 1, 4, $02, $60
- dsprite 1, 4, 0, 4, $01, $60
- dsprite 1, 4, 1, 4, $00, $60
-
-.OAMData_0c
- dsprite -1, 4, -1, 0, $00, $00
- dsprite -1, 4, 0, 0, $00, $20
-
-.OAMData_6a
- dsprite 0, 0, -1, 0, $00, $00
- dsprite 0, 0, 0, 0, $00, $20
-
-.OAMData_04
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $00, $20
- dsprite 0, 0, -1, 0, $01, $00
- dsprite 0, 0, 0, 0, $01, $20
-
-.OAMData_5d
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $00, $40
- dsprite 0, 0, 0, 0, $01, $40
-
-.OAMData_13
- dsprite -1, 2, -1, 0, $02, $00
- dsprite 0, 2, -1, 0, $03, $00
- dsprite -2, 6, 0, 0, $02, $00
- dsprite -1, 6, 0, 0, $03, $00
-
-.OAMData_22
- dsprite 1, 0, -11, 0, $01, $00
- dsprite 0, 0, -10, 0, $02, $00
- dsprite 0, 0, -9, 0, $03, $00
- dsprite 0, 0, -8, 0, $00, $00
- dsprite 0, 0, -7, 0, $03, $00
- dsprite 0, 0, -6, 0, $00, $00
- dsprite 0, 0, -5, 0, $03, $00
- dsprite 0, 0, -4, 0, $00, $00
- dsprite 0, 0, -3, 0, $03, $00
- dsprite 0, 0, -2, 0, $00, $00
- dsprite 0, 0, -1, 0, $01, $00
- dsprite -1, 0, 0, 0, $02, $00
- dsprite -1, 0, 1, 0, $03, $00
- dsprite -1, 0, 2, 0, $00, $00
- dsprite -1, 0, 3, 0, $03, $00
- dsprite -1, 0, 4, 0, $00, $00
- dsprite -1, 0, 5, 0, $03, $00
- dsprite -1, 0, 6, 0, $00, $00
- dsprite -1, 0, 7, 0, $03, $00
- dsprite -1, 0, 8, 0, $00, $00
- dsprite -1, 0, 9, 0, $01, $00
- dsprite -2, 0, 10, 0, $02, $00
-
-.OAMData_2a
- dsprite -3, 4, -1, 0, $00, $00
- dsprite -3, 4, 0, 0, $00, $20
- dsprite -2, 4, -1, 0, $01, $00
- dsprite -2, 4, 0, 0, $01, $20
- dsprite -1, 4, -1, 4, $02, $00
-
-.OAMData_2b
- dsprite -4, 4, -1, 0, $00, $00
- dsprite -4, 4, 0, 0, $00, $20
- dsprite -3, 4, -1, 0, $01, $00
- dsprite -3, 4, 0, 0, $01, $20
- dsprite -2, 4, -1, 4, $02, $00
- dsprite -1, 4, -1, 4, $02, $00
-
-.OAMData_2c
- dsprite -5, 4, -1, 0, $00, $00
- dsprite -5, 4, 0, 0, $00, $20
- dsprite -4, 4, -1, 0, $01, $00
- dsprite -4, 4, 0, 0, $01, $20
- dsprite -3, 4, -1, 4, $02, $00
- dsprite -2, 4, -1, 4, $02, $00
- dsprite -1, 4, -1, 4, $02, $00
-
-.OAMData_2d
- dsprite -6, 4, -1, 0, $00, $00
- dsprite -6, 4, 0, 0, $00, $20
- dsprite -5, 4, -1, 0, $01, $00
- dsprite -5, 4, 0, 0, $01, $20
- dsprite -4, 4, -1, 4, $02, $00
- dsprite -3, 4, -1, 4, $02, $00
- dsprite -2, 4, -1, 4, $02, $00
- dsprite -1, 4, -1, 4, $02, $00
-
-.OAMData_2e
- dsprite -7, 4, -1, 0, $00, $00
- dsprite -7, 4, 0, 0, $00, $20
- dsprite -6, 4, -1, 0, $01, $00
- dsprite -6, 4, 0, 0, $01, $20
- dsprite -5, 4, -1, 4, $02, $00
- dsprite -4, 4, -1, 4, $02, $00
- dsprite -3, 4, -1, 4, $02, $00
- dsprite -2, 4, -1, 4, $02, $00
- dsprite -1, 4, -1, 4, $02, $00
-
-.OAMData_2f
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $00, $20
- dsprite 0, 0, -1, 0, $01, $00
- dsprite 0, 0, 0, 0, $00, $60
-
-.OAMData_30
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $01, $60
- dsprite 0, 0, 0, 0, $00, $60
-
-.OAMData_31
- dsprite -2, 4, -1, 0, $00, $00
- dsprite -2, 4, 0, 0, $01, $00
- dsprite -1, 4, -1, 0, $02, $00
- dsprite -1, 4, 0, 0, $03, $00
- dsprite 0, 4, -1, 0, $04, $00
- dsprite 0, 4, 0, 0, $05, $00
-
-.OAMData_76
- dsprite -1, 5, -1, 0, $00, $00
- dsprite -1, 1, 0, 0, $00, $00
-
-.OAMData_32
- dsprite -1, 0, -2, 4, $00, $00
- dsprite -1, 0, 0, 4, $00, $00
- dsprite -3, 0, -2, 4, $00, $00
- dsprite -3, 0, 0, 4, $00, $00
- dsprite -2, 0, -3, 4, $00, $00
- dsprite -2, 0, -2, 4, $01, $00
- dsprite -2, 0, -1, 4, $00, $00
- dsprite -2, 0, 0, 4, $01, $00
- dsprite -2, 0, 1, 4, $00, $00
- dsprite -1, 0, -4, 4, $00, $00
- dsprite -1, 0, -3, 4, $01, $00
- dsprite -1, 0, -1, 4, $01, $00
- dsprite -1, 0, 1, 4, $01, $00
- dsprite -1, 0, 2, 4, $00, $00
-
-.OAMData_33
- dsprite -2, 0, -2, 4, $00, $00
- dsprite -2, 0, 0, 4, $00, $00
- dsprite -1, 0, -3, 4, $00, $00
- dsprite -1, 0, -2, 4, $01, $00
- dsprite -1, 0, -1, 4, $00, $00
- dsprite -1, 0, 0, 4, $01, $00
- dsprite -1, 0, 1, 4, $00, $00
- dsprite -4, 0, -2, 4, $00, $00
- dsprite -4, 0, 0, 4, $00, $00
- dsprite -3, 0, -3, 4, $00, $00
- dsprite -3, 0, -2, 4, $01, $00
- dsprite -3, 0, -1, 4, $00, $00
- dsprite -3, 0, 0, 4, $01, $00
- dsprite -3, 0, 1, 4, $00, $00
- dsprite -2, 0, -4, 4, $00, $00
- dsprite -2, 0, -3, 4, $01, $00
- dsprite -2, 0, -1, 4, $01, $00
- dsprite -2, 0, 1, 4, $01, $00
- dsprite -2, 0, 2, 4, $00, $00
- dsprite -1, 0, -4, 4, $01, $00
- dsprite -1, 0, 2, 4, $01, $00
-
-.OAMData_36
- dsprite -7, 4, -1, 0, $00, $00
- dsprite -7, 4, 0, 0, $01, $00
- dsprite -6, 4, -1, 0, $02, $00
- dsprite -6, 4, 0, 0, $03, $00
- dsprite -5, 4, -1, 0, $04, $00
- dsprite -5, 4, 0, 0, $05, $00
- dsprite -4, 4, -1, 0, $06, $00
- dsprite -4, 4, 0, 0, $07, $00
- dsprite -3, 4, -1, 0, $08, $00
- dsprite -3, 4, 0, 0, $09, $00
- dsprite -2, 4, -1, 0, $0a, $00
- dsprite -2, 4, 0, 0, $0b, $00
- dsprite -1, 4, -1, 0, $0c, $00
- dsprite -1, 4, 0, 0, $0d, $00
-
-.OAMData_3a
- dsprite -7, 4, -1, 0, $0c, $00
- dsprite -7, 4, 0, 0, $0d, $00
- dsprite -6, 4, -1, 0, $08, $00
- dsprite -6, 4, 0, 0, $09, $00
- dsprite -5, 4, -1, 0, $04, $00
- dsprite -5, 4, 0, 0, $05, $00
- dsprite -4, 4, -1, 0, $00, $00
- dsprite -4, 4, 0, 0, $01, $00
- dsprite -3, 4, -1, 0, $02, $00
- dsprite -3, 4, 0, 0, $03, $00
- dsprite -2, 4, 0, 0, $02, $00
- dsprite -2, 4, 1, 0, $03, $00
- dsprite -1, 4, 0, 0, $0a, $00
- dsprite -1, 4, 1, 0, $0b, $00
-
-.OAMData_3e
- dsprite 1, 4, -2, 0, $00, $40
- dsprite 1, 4, -1, 0, $02, $40
- dsprite 1, 4, 0, 0, $02, $60
- dsprite 1, 4, 1, 0, $00, $60
- dsprite -1, 4, -3, 0, $09, $20
- dsprite -1, 4, -2, 0, $08, $20
- dsprite -1, 4, -1, 0, $06, $00
- dsprite -1, 4, 0, 0, $07, $00
- dsprite -1, 4, 1, 0, $08, $00
- dsprite -1, 4, 2, 0, $09, $00
- dsprite 0, 4, -3, 0, $01, $20
- dsprite 0, 4, -2, 0, $00, $20
- dsprite 0, 4, -1, 0, $0c, $00
- dsprite 0, 4, 0, 0, $0d, $00
- dsprite 0, 4, 1, 0, $00, $00
- dsprite 0, 4, 2, 0, $01, $00
- dsprite -3, 4, -2, 0, $00, $00
- dsprite -3, 4, -1, 0, $02, $00
- dsprite -3, 4, 0, 0, $02, $20
- dsprite -3, 4, 1, 0, $00, $20
- dsprite -2, 4, -3, 0, $03, $20
- dsprite -2, 4, -2, 0, $02, $20
- dsprite -2, 4, -1, 0, $04, $00
- dsprite -2, 4, 0, 0, $05, $00
- dsprite -2, 4, 1, 0, $02, $00
- dsprite -2, 4, 2, 0, $03, $00
-
-.OAMData_41
- dsprite -3, 4, -2, 0, $00, $00
- dsprite -3, 4, -1, 0, $02, $00
- dsprite -3, 4, 0, 0, $02, $20
- dsprite -3, 4, 1, 0, $00, $20
- dsprite -2, 4, -3, 4, $00, $00
- dsprite -2, 4, -2, 4, $01, $00
- dsprite -2, 4, -1, 0, $05, $20
- dsprite -2, 4, 0, 0, $04, $20
- dsprite -2, 4, 0, 4, $01, $20
- dsprite -2, 4, 1, 4, $00, $20
- dsprite -1, 4, -3, 4, $02, $00
- dsprite -1, 4, -2, 4, $03, $00
- dsprite -1, 4, -1, 0, $07, $20
- dsprite -1, 4, 0, 0, $06, $20
- dsprite -1, 4, 0, 4, $03, $20
- dsprite -1, 4, 1, 4, $02, $20
- dsprite 0, 4, -3, 4, $04, $00
- dsprite 0, 4, -2, 4, $05, $00
- dsprite 0, 4, -1, 0, $0d, $20
- dsprite 0, 4, 0, 0, $0c, $20
- dsprite 0, 4, 0, 4, $05, $20
- dsprite 0, 4, 1, 4, $04, $20
- dsprite 1, 4, -2, 0, $00, $40
- dsprite 1, 4, -1, 0, $02, $40
- dsprite 1, 4, 0, 0, $02, $60
- dsprite 1, 4, 1, 0, $00, $60
-
-.OAMData_42
- dsprite -3, 0, -1, 4, $02, $00
- dsprite 2, 0, -1, 4, $02, $60
- dsprite -1, 4, -3, 0, $01, $00
- dsprite -1, 4, 2, 0, $01, $60
- dsprite -4, 0, -1, 4, $02, $00
- dsprite 3, 0, -1, 4, $02, $60
- dsprite -1, 4, -4, 0, $01, $00
- dsprite -1, 4, 3, 0, $01, $60
-
-.OAMData_44
- dsprite -3, 5, -3, 5, $00, $20
- dsprite -3, 5, 1, 3, $00, $00
- dsprite 1, 3, -3, 5, $00, $60
- dsprite 1, 3, 1, 3, $00, $40
- dsprite -4, 5, -4, 5, $00, $20
- dsprite -4, 5, 2, 3, $00, $00
- dsprite 2, 3, -4, 5, $00, $60
- dsprite 2, 3, 2, 3, $00, $40
-
-.OAMData_46
- dsprite -3, 4, -1, 4, $02, $00
- dsprite 1, 4, -1, 4, $02, $60
- dsprite -1, 4, -3, 4, $01, $00
- dsprite -1, 4, 1, 4, $01, $60
-
-.OAMData_47
- dsprite -2, 0, -2, 0, $00, $20
- dsprite -2, 0, 1, 0, $00, $00
- dsprite 1, 0, -2, 0, $00, $60
- dsprite 1, 0, 1, 0, $00, $40
-
-.OAMData_48
- dsprite -3, 0, -1, 4, $00, $00
- dsprite -2, 0, -1, 2, $00, $00
- dsprite -1, 0, -1, 0, $00, $00
- dsprite 0, 0, -1, 0, $00, $00
- dsprite 1, 0, -1, 2, $00, $00
- dsprite 2, 0, -1, 4, $00, $00
-
-.OAMData_49
- dsprite -1, 4, -2, 0, $00, $20
- dsprite -1, 2, -1, 0, $00, $20
- dsprite -1, 2, 0, 0, $00, $00
- dsprite -1, 4, 1, 0, $00, $00
-
-.OAMData_4a
- dsprite -1, 4, -1, 0, $00, $60
- dsprite -1, 4, 0, 0, $00, $40
-
-.OAMData_0f
- dsprite -1, 4, -1, 4, $00, $00
- dsprite -1, 4, -2, 4, $01, $00
- dsprite -1, 4, -1, 4, $01, $20
- dsprite 0, 4, -2, 4, $01, $40
- dsprite 0, 4, -1, 4, $01, $60
-
-.OAMData_4c
- dsprite -1, 4, -1, 4, $00, $00
- dsprite 0, 2, -2, 6, $00, $00
- dsprite 0, 2, -3, 6, $01, $00
- dsprite 0, 2, -2, 6, $01, $20
- dsprite 1, 2, -3, 6, $01, $40
- dsprite 1, 2, -2, 6, $01, $60
-
-.OAMData_4d
- dsprite -1, 4, -1, 4, $00, $00
- dsprite 0, 2, -2, 6, $00, $00
- dsprite 1, 0, -2, 0, $00, $00
- dsprite 1, 0, -3, 0, $01, $00
- dsprite 1, 0, -2, 0, $01, $20
- dsprite 2, 0, -3, 0, $01, $40
- dsprite 2, 0, -2, 0, $01, $60
-
-.OAMData_4f
- dsprite -1, 4, -1, 4, $00, $00
- dsprite 0, 2, -2, 6, $00, $00
- dsprite 1, 0, -2, 0, $00, $00
- dsprite 1, 6, -3, 2, $00, $00
- dsprite 1, 6, -4, 2, $01, $00
- dsprite 1, 6, -3, 2, $01, $20
- dsprite 2, 6, -4, 2, $01, $40
- dsprite 2, 6, -3, 2, $01, $60
-
-.OAMData_50
- dsprite -1, 4, -1, 4, $00, $00
- dsprite 0, 2, -2, 6, $00, $00
- dsprite 1, 0, -2, 0, $00, $00
- dsprite 1, 6, -3, 2, $00, $00
- dsprite 2, 4, -4, 4, $00, $00
- dsprite 2, 4, -5, 4, $01, $00
- dsprite 2, 4, -4, 4, $01, $20
- dsprite 3, 4, -5, 4, $01, $40
- dsprite 3, 4, -4, 4, $01, $60
-
-.OAMData_51
- dsprite -1, 4, -1, 4, $00, $00
- dsprite 0, 2, -2, 6, $00, $00
- dsprite 1, 0, -2, 0, $00, $00
- dsprite 1, 6, -3, 2, $00, $00
- dsprite 2, 4, -4, 4, $00, $00
- dsprite 3, 2, -5, 6, $00, $00
- dsprite 3, 2, -6, 6, $01, $00
- dsprite 3, 2, -5, 6, $01, $20
- dsprite 4, 2, -6, 6, $01, $40
- dsprite 4, 2, -5, 6, $01, $60
-
-.OAMData_59
- dsprite -1, 4, -2, 0, $00, $00
- dsprite -1, 4, -1, 0, $01, $00
- dsprite -1, 4, 0, 0, $01, $20
- dsprite -1, 4, 1, 0, $00, $20
-
-.OAMData_5a
- dsprite -1, 4, -2, 0, $02, $00
- dsprite -1, 4, -1, 0, $01, $00
- dsprite -1, 4, 0, 0, $01, $20
- dsprite -1, 4, 1, 0, $02, $20
-
-.OAMData_60
- dsprite -1, 0, -1, 4, $00, $00
-
-.OAMData_69
- dsprite 0, 0, -1, 4, $00, $00
-
-.OAMData_61
- dsprite -1, 4, -4, 4, $00, $00
- dsprite -1, 4, -3, 4, $01, $00
- dsprite -1, 4, -2, 4, $02, $00
- dsprite -1, 4, -1, 4, $03, $00
- dsprite -1, 4, 0, 4, $04, $00
- dsprite -1, 4, 1, 4, $05, $00
- dsprite -1, 4, 2, 4, $06, $00
- dsprite -2, 4, 1, 4, $07, $00
- dsprite -2, 4, 2, 4, $08, $00
-
-.OAMData_65
- dsprite -2, 4, -4, 4, $08, $20
- dsprite -2, 4, -3, 4, $07, $20
- dsprite -1, 4, -4, 4, $06, $20
- dsprite -1, 4, -3, 4, $05, $20
- dsprite -1, 4, -2, 4, $04, $20
- dsprite -1, 4, -1, 4, $03, $20
- dsprite -1, 4, 0, 4, $02, $20
- dsprite -1, 4, 1, 4, $01, $20
- dsprite -1, 4, 2, 4, $00, $20
-
-.OAMData_d4
- dsprite 0, 0, -4, 4, $00, $10
- dsprite 0, 0, -3, 4, $01, $10
- dsprite 0, 0, -2, 4, $02, $10
- dsprite 0, 0, -1, 4, $03, $10
- dsprite 0, 0, 0, 4, $04, $10
- dsprite 0, 0, 1, 4, $05, $10
- dsprite 0, 0, 2, 4, $06, $10
-
-.OAMData_d6
- dsprite -1, 0, -4, 4, $00, $10
- dsprite 0, 0, -4, 4, $01, $10
- dsprite -1, 0, -3, 4, $02, $10
- dsprite 0, 0, -3, 4, $03, $10
- dsprite -1, 0, -2, 4, $04, $10
- dsprite 0, 0, -2, 4, $05, $10
- dsprite -1, 0, -1, 4, $06, $10
- dsprite 0, 0, -1, 4, $07, $10
- dsprite -1, 0, 0, 4, $08, $10
- dsprite 0, 0, 0, 4, $09, $10
- dsprite -1, 0, 1, 4, $0a, $10
- dsprite 0, 0, 1, 4, $0b, $10
- dsprite -1, 0, 2, 4, $0c, $10
- dsprite 0, 0, 2, 4, $0d, $10
-
-.OAMData_d5
- dsprite 0, 0, -3, 0, $00, $11
- dsprite 0, 0, -2, 0, $01, $11
- dsprite 0, 0, -1, 0, $02, $11
- dsprite 0, 0, 0, 0, $03, $11
- dsprite 0, 0, 1, 0, $04, $11
- dsprite 0, 0, 2, 0, $05, $11
-
-.OAMData_d7
- dsprite 0, 0, -3, 0, $00, $11
- dsprite 1, 0, -3, 0, $01, $11
- dsprite 0, 0, -2, 0, $02, $11
- dsprite 1, 0, -2, 0, $03, $11
- dsprite 0, 0, -1, 0, $04, $11
- dsprite 1, 0, -1, 0, $05, $11
- dsprite 0, 0, 0, 0, $06, $11
- dsprite 1, 0, 0, 0, $07, $11
- dsprite 0, 0, 1, 0, $08, $11
- dsprite 1, 0, 1, 0, $09, $11
- dsprite 0, 0, 2, 0, $0a, $11
- dsprite 1, 0, 2, 0, $0b, $11
-
-.OAMData_6e
- dsprite -2, 4, 0, 4, $00, $00
- dsprite -1, 4, -2, 4, $01, $00
- dsprite -1, 4, -1, 4, $02, $00
- dsprite -1, 4, 0, 4, $03, $00
- dsprite 0, 4, -2, 4, $04, $00
-
-.OAMData_6f
- dsprite -1, 4, -2, 4, $00, $00
- dsprite -1, 4, -1, 4, $01, $00
- dsprite -1, 4, 0, 4, $02, $00
-
-.OAMData_77
- dsprite -4, 4, 1, 4, $01, $60
-
-.OAMData_78
- dsprite -4, 4, 1, 4, $00, $00
- dsprite -4, 4, 0, 4, $01, $60
- dsprite -3, 4, 1, 4, $01, $60
-
-.OAMData_79
- dsprite -4, 4, 1, 4, $01, $00
- dsprite -4, 4, 0, 4, $00, $00
- dsprite -4, 4, -1, 4, $01, $60
- dsprite -3, 4, 1, 4, $00, $00
- dsprite -3, 4, 0, 4, $01, $60
- dsprite -2, 4, 1, 4, $01, $60
-
-.OAMData_7a
- dsprite -4, 4, -2, 4, $01, $60
- dsprite -4, 4, -1, 4, $00, $00
- dsprite -4, 4, 0, 4, $01, $00
- dsprite -3, 4, -1, 4, $01, $60
- dsprite -3, 4, 0, 4, $00, $00
- dsprite -3, 4, 1, 4, $01, $00
- dsprite -2, 4, 0, 4, $01, $60
- dsprite -2, 4, 1, 4, $00, $00
- dsprite -1, 4, 1, 4, $01, $60
-
-.OAMData_7b
- dsprite -4, 4, -3, 4, $01, $60
- dsprite -4, 4, -2, 4, $00, $00
- dsprite -4, 4, -1, 4, $01, $00
- dsprite -3, 4, -2, 4, $01, $60
- dsprite -3, 4, -1, 4, $00, $00
- dsprite -3, 4, 0, 4, $01, $00
- dsprite -2, 4, -1, 4, $01, $60
- dsprite -2, 4, 0, 4, $00, $00
- dsprite -2, 4, 1, 4, $01, $00
- dsprite -1, 4, 0, 4, $01, $60
- dsprite -1, 4, 1, 4, $00, $00
- dsprite 0, 4, 1, 4, $01, $60
-
-.OAMData_7c
- dsprite -4, 4, -3, 4, $00, $00
- dsprite -4, 4, -2, 4, $01, $00
- dsprite -3, 4, -3, 4, $01, $60
- dsprite -3, 4, -2, 4, $00, $00
- dsprite -3, 4, -1, 4, $01, $00
- dsprite -2, 4, -2, 4, $01, $60
- dsprite -2, 4, -1, 4, $00, $00
- dsprite -2, 4, 0, 4, $01, $00
- dsprite -1, 4, -1, 4, $01, $60
- dsprite -1, 4, 0, 4, $00, $00
- dsprite -1, 4, 1, 4, $01, $00
- dsprite 0, 4, 0, 4, $01, $60
- dsprite 0, 4, 1, 4, $00, $00
- dsprite 1, 4, 1, 4, $01, $60
-
-.OAMData_7d
- dsprite -4, 4, -3, 4, $01, $00
- dsprite -3, 4, -3, 4, $00, $00
- dsprite -3, 4, -2, 4, $01, $00
- dsprite -2, 4, -3, 4, $01, $60
- dsprite -2, 4, -2, 4, $00, $00
- dsprite -2, 4, -1, 4, $01, $00
- dsprite -1, 4, -2, 4, $01, $60
- dsprite -1, 4, -1, 4, $00, $00
- dsprite -1, 4, 0, 4, $01, $00
- dsprite 0, 4, -1, 4, $01, $60
- dsprite 0, 4, 0, 4, $00, $00
- dsprite 0, 4, 1, 4, $01, $00
- dsprite 1, 4, 0, 4, $01, $60
- dsprite 1, 4, 1, 4, $00, $00
- dsprite 2, 4, 1, 4, $01, $60
-
-.OAMData_70
- dsprite -2, 0, -1, 0, $00, $00
- dsprite -1, 0, -1, 0, $01, $00
- dsprite -2, 0, 0, 0, $00, $20
- dsprite -1, 0, 0, 0, $01, $20
- dsprite 0, 0, -1, 0, $01, $40
- dsprite 1, 0, -1, 0, $00, $40
- dsprite 0, 0, 0, 0, $01, $60
- dsprite 1, 0, 0, 0, $00, $60
-
-.OAMData_81
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $01, $60
- dsprite 0, 0, 0, 0, $00, $60
-
-.OAMData_87
- dsprite -2, 4, -1, 0, $00, $00
- dsprite -2, 4, 0, 0, $01, $00
- dsprite -1, 4, -1, 0, $02, $00
- dsprite -1, 4, 0, 0, $03, $00
- dsprite -1, 4, -1, 0, $00, $00
- dsprite -1, 4, 0, 0, $01, $00
- dsprite 0, 4, -1, 0, $02, $00
- dsprite 0, 4, 0, 0, $03, $00
- dsprite -3, 4, -1, 0, $00, $00
- dsprite -3, 4, 0, 0, $01, $00
- dsprite -2, 4, -1, 0, $02, $00
- dsprite -2, 4, 0, 0, $03, $00
- dsprite 0, 4, -1, 0, $00, $00
- dsprite 0, 4, 0, 0, $01, $00
- dsprite 1, 4, -1, 0, $02, $00
- dsprite 1, 4, 0, 0, $03, $00
-
-.OAMData_88
- dsprite -2, 0, -1, 0, $00, $00
- dsprite -2, 0, 0, 0, $01, $00
- dsprite -1, 0, -1, 0, $02, $00
- dsprite -1, 0, 0, 0, $03, $00
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $00
- dsprite 0, 0, -1, 0, $02, $00
- dsprite 0, 0, 0, 0, $03, $00
- dsprite 0, 0, -1, 0, $00, $00
- dsprite 0, 0, 0, 0, $01, $00
- dsprite 1, 0, -1, 0, $02, $00
- dsprite 1, 0, 0, 0, $03, $00
-
-.OAMData_8a
- dsprite -1, 4, -1, 4, $00, $00
- dsprite -1, 0, 0, 4, $00, $00
- dsprite -2, 4, 1, 4, $00, $00
- dsprite -2, 0, 2, 4, $00, $00
- dsprite -3, 4, 3, 4, $00, $00
- dsprite -3, 0, 4, 4, $00, $00
- dsprite -4, 0, 5, 4, $00, $00
- dsprite -5, 4, 6, 4, $00, $00
-
-.OAMData_8e
- dsprite -3, 4, -1, 4, $00, $00
- dsprite -2, 4, -1, 4, $01, $00
- dsprite -1, 4, -1, 4, $02, $00
- dsprite 0, 4, -1, 4, $01, $40
- dsprite 1, 4, -1, 4, $00, $40
-
-.OAMData_8f
- dsprite -1, 4, -2, 0, $00, $00
- dsprite -1, 4, -1, 0, $01, $00
- dsprite -1, 4, 0, 0, $02, $00
- dsprite -1, 4, 1, 0, $03, $00
-
-.OAMData_93
- dsprite -1, 0, -2, 4, $00, $00
- dsprite -1, 0, -1, 4, $01, $00
- dsprite -1, 0, 0, 4, $02, $00
- dsprite 0, 0, -2, 4, $03, $00
- dsprite 0, 0, -1, 4, $04, $00
- dsprite 0, 0, 0, 4, $05, $00
-
-.OAMData_99
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $05, $00
- dsprite 0, 0, -1, 0, $01, $00
- dsprite 0, 0, 0, 0, $05, $00
-
-.OAMData_9b
- dsprite -4, 4, 1, 0, $00, $00
- dsprite -4, 4, 2, 0, $01, $00
- dsprite -3, 4, -1, 0, $02, $00
- dsprite -3, 4, 0, 0, $03, $00
- dsprite -3, 4, 1, 0, $04, $00
- dsprite -3, 4, 2, 0, $05, $00
- dsprite -3, 4, 3, 0, $06, $00
- dsprite -2, 4, -2, 0, $07, $00
- dsprite -2, 4, -1, 0, $08, $00
- dsprite -2, 4, 0, 0, $09, $00
- dsprite -2, 4, 1, 0, $0a, $00
- dsprite -2, 4, 2, 0, $0b, $00
- dsprite -2, 4, 3, 0, $0c, $00
- dsprite -2, 4, 4, 0, $0d, $00
- dsprite -1, 4, -3, 0, $0e, $00
- dsprite -1, 4, -2, 0, $0f, $00
- dsprite -1, 4, -1, 0, $10, $00
- dsprite -1, 4, 0, 0, $11, $00
- dsprite -1, 4, 1, 0, $12, $00
- dsprite -1, 4, 2, 0, $13, $00
- dsprite 0, 4, -5, 0, $14, $00
- dsprite 0, 4, -4, 0, $15, $00
- dsprite 0, 4, -3, 0, $16, $00
- dsprite 0, 4, -2, 0, $17, $00
- dsprite 0, 4, -1, 0, $18, $00
- dsprite 0, 4, 0, 0, $19, $00
- dsprite 0, 4, 1, 0, $1a, $00
- dsprite 0, 4, 2, 0, $1b, $00
- dsprite 0, 4, 3, 0, $1c, $00
- dsprite 1, 4, -5, 0, $1d, $00
- dsprite 1, 4, -4, 0, $1e, $00
- dsprite 1, 4, -2, 0, $1f, $00
- dsprite 1, 4, -1, 0, $20, $00
- dsprite 1, 4, 0, 0, $21, $00
- dsprite 1, 4, 1, 0, $22, $00
- dsprite 2, 4, 0, 0, $23, $00
-
-.OAMData_9c
- dsprite 0, 4, -1, 0, $02, $00
- dsprite 0, 4, 0, 0, $03, $00
- dsprite -1, 4, -1, 0, $01, $00
- dsprite -1, 4, 0, 0, $01, $20
- dsprite -2, 4, -1, 0, $00, $00
- dsprite -2, 4, 0, 0, $00, $20
-
-.OAMData_9f
- dsprite -1, 0, -2, 0, $00, $00
- dsprite -1, 0, -1, 0, $01, $00
- dsprite -1, 0, 0, 0, $02, $00
- dsprite -1, 0, 1, 0, $03, $00
- dsprite 0, 0, -2, 0, $04, $00
- dsprite 0, 0, -1, 0, $05, $00
- dsprite 0, 0, 0, 0, $06, $00
- dsprite 0, 0, 1, 0, $07, $00
-
-.OAMData_a0
- dsprite -2, 4, -1, 4, $00, $00
- dsprite -1, 4, -1, 4, $00, $00
- dsprite 0, 4, -1, 4, $00, $00
- dsprite -3, 4, -1, 4, $00, $00
- dsprite 1, 4, -1, 4, $00, $00
- dsprite -4, 4, -1, 4, $00, $00
- dsprite 2, 4, -1, 4, $00, $00
-
-.OAMData_a4
- dsprite -2, 4, -2, 4, $00, $00
- dsprite -2, 4, -1, 4, $01, $00
- dsprite -2, 4, 0, 4, $02, $00
- dsprite -1, 4, -2, 4, $03, $00
- dsprite -1, 4, -1, 4, $04, $00
- dsprite -1, 4, 0, 4, $05, $00
- dsprite 0, 4, -2, 4, $00, $40
- dsprite 0, 4, -1, 4, $01, $40
- dsprite 0, 4, 0, 4, $02, $40
-
-.OAMData_ac
- dsprite -1, 4, -2, 0, $00, $00
- dsprite -1, 4, -1, 0, $01, $00
- dsprite -1, 4, 0, 0, $01, $20
- dsprite -1, 4, 1, 0, $00, $20
-
-.OAMData_bc
- dsprite -1, 4, -3, 0, $00, $00
- dsprite -1, 4, -2, 0, $01, $00
- dsprite -1, 4, -1, 0, $02, $00
- dsprite -1, 4, 0, 0, $02, $20
- dsprite -1, 4, 1, 0, $01, $20
- dsprite -1, 4, 2, 0, $00, $20
-
-.OAMData_c1
- dsprite -2, 0, -2, 0, $00, $00
- dsprite -2, 0, -1, 0, $01, $00
- dsprite -2, 0, 0, 0, $02, $00
- dsprite -2, 0, 1, 0, $00, $20
- dsprite -1, 0, -2, 0, $03, $00
- dsprite -1, 0, -1, 0, $04, $00
- dsprite -1, 0, 0, 0, $04, $20
- dsprite -1, 0, 1, 0, $05, $00
- dsprite 0, 0, -2, 0, $05, $60
- dsprite 0, 0, -1, 0, $04, $40
- dsprite 0, 0, 0, 0, $04, $60
- dsprite 0, 0, 1, 0, $03, $60
- dsprite 1, 0, -2, 0, $00, $40
- dsprite 1, 0, -1, 0, $02, $60
- dsprite 1, 0, 0, 0, $01, $60
- dsprite 1, 0, 1, 0, $00, $60
-
-.OAMData_c2
- dsprite -1, 0, -2, 0, $00, $00
- dsprite -1, 0, -1, 0, $01, $00
- dsprite -1, 0, 0, 0, $00, $60
- dsprite 0, 0, -1, 0, $00, $00
- dsprite 0, 0, 0, 0, $01, $00
- dsprite 0, 0, 1, 0, $00, $60
-
-.OAMData_c8
- dsprite -1, 0, 1, 4, $00, $00
- dsprite -1, 0, 2, 4, $01, $00
- dsprite 0, 0, -1, 4, $02, $00
- dsprite 0, 0, 0, 4, $03, $00
- dsprite 0, 0, 1, 4, $04, $00
- dsprite 0, 0, 2, 4, $05, $00
-
-.OAMData_ca
- dsprite -1, 0, -1, 0, $00, $00
- dsprite -1, 0, 0, 0, $01, $60
- dsprite 0, 0, -1, 0, $01, $00
- dsprite 0, 0, 0, 0, $01, $20
-
-.OAMData_cc
- dsprite -2, 0, -13, 4, $00, $00
- dsprite -4, 0, -11, 4, $00, $00
- dsprite -1, 0, -9, 4, $00, $00
- dsprite -5, 0, -7, 4, $00, $00
- dsprite -3, 0, -5, 4, $00, $00
- dsprite -5, 0, -3, 4, $00, $00
- dsprite -3, 0, -1, 4, $00, $00
- dsprite -3, 0, 0, 4, $00, $00
- dsprite -5, 0, 2, 4, $00, $00
- dsprite 0, 0, 4, 4, $00, $00
- dsprite -2, 0, 6, 4, $00, $00
- dsprite -4, 0, 8, 4, $00, $00
- dsprite -2, 0, 10, 4, $00, $00
-; cfcf6
+
+BattleAnimOAMData: ; ceeae
+; vtile offset (?), length, address
+ dbbw $00, 16, .OAMData_00 ; 00
+ dbbw $04, 9, .OAMData_01 ; 01
+ dbbw $08, 4, .OAMData_02 ; 02
+ dbbw $09, 4, .OAMData_03 ; 03
+ dbbw $0d, 4, .OAMData_04 ; 04
+ dbbw $0f, 4, .OAMData_03 ; 05
+ dbbw $13, 4, .OAMData_04 ; 06
+ dbbw $04, 16, .OAMData_00 ; 07
+ dbbw $08, 16, .OAMData_00 ; 08
+ dbbw $08, 16, .OAMData_09 ; 09
+ dbbw $00, 4, .OAMData_04 ; 0a
+ dbbw $02, 4, .OAMData_03 ; 0b
+ dbbw $06, 2, .OAMData_0c ; 0c
+ dbbw $07, 2, .OAMData_0c ; 0d
+ dbbw $02, 4, .OAMData_04 ; 0e
+ dbbw $04, 1, .OAMData_0f ; 0f
+ dbbw $05, 1, .OAMData_0f ; 10
+ dbbw $00, 2, .OAMData_11 ; 11
+ dbbw $02, 2, .OAMData_11 ; 12
+ dbbw $00, 4, .OAMData_13 ; 13
+ dbbw $00, 1, .OAMData_0f ; 14
+ dbbw $01, 1, .OAMData_0f ; 15
+ dbbw $02, 1, .OAMData_0f ; 16
+ dbbw $03, 1, .OAMData_0f ; 17
+ dbbw $00, 4, .OAMData_02 ; 18
+ dbbw $01, 16, .OAMData_00 ; 19
+ dbbw $05, 16, .OAMData_00 ; 1a
+ dbbw $00, 4, .OAMData_03 ; 1b
+ dbbw $05, 12, .OAMData_1c ; 1c
+ dbbw $02, 4, .OAMData_02 ; 1d
+ dbbw $06, 1, .OAMData_0f ; 1e
+ dbbw $07, 1, .OAMData_0f ; 1f
+ dbbw $08, 1, .OAMData_0f ; 20
+ dbbw $04, 4, .OAMData_03 ; 21
+ dbbw $09, 22, .OAMData_22 ; 22
+ dbbw $04, 2, .OAMData_11 ; 23
+ dbbw $06, 2, .OAMData_11 ; 24
+ dbbw $0c, 1, .OAMData_0f ; 25
+ dbbw $0a, 1, .OAMData_0f ; 26
+ dbbw $0b, 4, .OAMData_02 ; 27
+ dbbw $08, 4, .OAMData_04 ; 28
+ dbbw $06, 4, .OAMData_04 ; 29
+ dbbw $00, 5, .OAMData_2a ; 2a
+ dbbw $03, 6, .OAMData_2b ; 2b
+ dbbw $00, 7, .OAMData_2c ; 2c
+ dbbw $03, 8, .OAMData_2d ; 2d
+ dbbw $00, 9, .OAMData_2e ; 2e
+ dbbw $00, 4, .OAMData_2f ; 2f
+ dbbw $02, 4, .OAMData_30 ; 30
+ dbbw $04, 6, .OAMData_31 ; 31
+ dbbw $00, 2, .OAMData_32 ; 32
+ dbbw $00, 7, .OAMData_33 ; 33
+ dbbw $00, 14, .OAMData_32 ; 34
+ dbbw $00, 21, .OAMData_33 ; 35
+ dbbw $00, 2, .OAMData_36 ; 36
+ dbbw $00, 6, .OAMData_36 ; 37
+ dbbw $00, 10, .OAMData_36 ; 38
+ dbbw $00, 14, .OAMData_36 ; 39
+ dbbw $00, 2, .OAMData_3a ; 3a
+ dbbw $00, 6, .OAMData_3a ; 3b
+ dbbw $00, 10, .OAMData_3a ; 3c
+ dbbw $00, 14, .OAMData_3a ; 3d
+ dbbw $00, 4, .OAMData_3e ; 3e
+ dbbw $00, 16, .OAMData_3e ; 3f
+ dbbw $00, 26, .OAMData_3e ; 40
+ dbbw $00, 26, .OAMData_41 ; 41
+ dbbw $0e, 4, .OAMData_42 ; 42
+ dbbw $0e, 8, .OAMData_42 ; 43
+ dbbw $0e, 4, .OAMData_44 ; 44
+ dbbw $0e, 8, .OAMData_44 ; 45
+ dbbw $0e, 4, .OAMData_46 ; 46
+ dbbw $0e, 4, .OAMData_47 ; 47
+ dbbw $00, 6, .OAMData_48 ; 48
+ dbbw $03, 4, .OAMData_49 ; 49
+ dbbw $03, 2, .OAMData_4a ; 4a
+ dbbw $01, 5, .OAMData_0f ; 4b
+ dbbw $01, 6, .OAMData_4c ; 4c
+ dbbw $01, 7, .OAMData_4d ; 4d
+ dbbw $01, 3, .OAMData_4d ; 4e
+ dbbw $01, 8, .OAMData_4f ; 4f
+ dbbw $01, 9, .OAMData_50 ; 50
+ dbbw $01, 10, .OAMData_51 ; 51
+ dbbw $01, 6, .OAMData_51 ; 52
+ dbbw $00, 9, .OAMData_01 ; 53
+ dbbw $04, 4, .OAMData_02 ; 54
+ dbbw $05, 4, .OAMData_02 ; 55
+ dbbw $00, 2, .OAMData_56 ; 56
+ dbbw $02, 2, .OAMData_56 ; 57
+ dbbw $04, 2, .OAMData_56 ; 58
+ dbbw $02, 4, .OAMData_59 ; 59
+ dbbw $02, 4, .OAMData_5a ; 5a
+ dbbw $02, 2, .OAMData_0c ; 5b
+ dbbw $04, 2, .OAMData_0c ; 5c
+ dbbw $06, 4, .OAMData_5d ; 5d
+ dbbw $08, 2, .OAMData_0c ; 5e
+ dbbw $09, 2, .OAMData_0c ; 5f
+ dbbw $05, 2, .OAMData_60 ; 60
+ dbbw $00, 2, .OAMData_61 ; 61
+ dbbw $00, 5, .OAMData_61 ; 62
+ dbbw $00, 9, .OAMData_61 ; 63
+ dbbw $09, 9, .OAMData_61 ; 64
+ dbbw $00, 4, .OAMData_65 ; 65
+ dbbw $00, 7, .OAMData_65 ; 66
+ dbbw $00, 9, .OAMData_65 ; 67
+ dbbw $09, 9, .OAMData_65 ; 68
+ dbbw $04, 1, .OAMData_69 ; 69
+ dbbw $05, 2, .OAMData_6a ; 6a
+ dbbw $06, 4, .OAMData_03 ; 6b
+ dbbw $0a, 4, .OAMData_03 ; 6c
+ dbbw $0e, 4, .OAMData_03 ; 6d
+ dbbw $08, 5, .OAMData_6e ; 6e
+ dbbw $0d, 3, .OAMData_6f ; 6f
+ dbbw $01, 8, .OAMData_70 ; 70
+ dbbw $03, 8, .OAMData_70 ; 71
+ dbbw $05, 8, .OAMData_70 ; 72
+ dbbw $07, 8, .OAMData_70 ; 73
+ dbbw $06, 4, .OAMData_02 ; 74
+ dbbw $07, 4, .OAMData_02 ; 75
+ dbbw $0a, 2, .OAMData_76 ; 76
+ dbbw $00, 1, .OAMData_77 ; 77
+ dbbw $00, 3, .OAMData_78 ; 78
+ dbbw $00, 6, .OAMData_79 ; 79
+ dbbw $00, 9, .OAMData_7a ; 7a
+ dbbw $00, 12, .OAMData_7b ; 7b
+ dbbw $00, 14, .OAMData_7c ; 7c
+ dbbw $00, 15, .OAMData_7d ; 7d
+ dbbw $04, 4, .OAMData_03 ; 7e
+ dbbw $08, 4, .OAMData_03 ; 7f
+ dbbw $0d, 1, .OAMData_0f ; 80
+ dbbw $0e, 4, .OAMData_81 ; 81
+ dbbw $10, 1, .OAMData_0f ; 82
+ dbbw $11, 1, .OAMData_0f ; 83
+ dbbw $04, 2, .OAMData_6a ; 84
+ dbbw $05, 2, .OAMData_6a ; 85
+ dbbw $0a, 4, .OAMData_04 ; 86
+ dbbw $00, 8, .OAMData_87 ; 87
+ dbbw $00, 12, .OAMData_88 ; 88
+ dbbw $00, 16, .OAMData_87 ; 89
+ dbbw $09, 2, .OAMData_8a ; 8a
+ dbbw $09, 4, .OAMData_8a ; 8b
+ dbbw $09, 6, .OAMData_8a ; 8c
+ dbbw $09, 8, .OAMData_8a ; 8d
+ dbbw $12, 5, .OAMData_8e ; 8e
+ dbbw $00, 4, .OAMData_8f ; 8f
+ dbbw $04, 4, .OAMData_8f ; 90
+ dbbw $08, 4, .OAMData_8f ; 91
+ dbbw $0c, 4, .OAMData_8f ; 92
+ dbbw $00, 6, .OAMData_93 ; 93
+ dbbw $04, 4, .OAMData_03 ; 94
+ dbbw $0a, 4, .OAMData_04 ; 95
+ dbbw $15, 4, .OAMData_30 ; 96
+ dbbw $04, 4, .OAMData_30 ; 97
+ dbbw $0c, 4, .OAMData_04 ; 98
+ dbbw $0a, 4, .OAMData_99 ; 99
+ dbbw $0c, 4, .OAMData_03 ; 9a
+ dbbw $00, 36, .OAMData_9b ; 9b
+ dbbw $0d, 2, .OAMData_9c ; 9c
+ dbbw $0d, 4, .OAMData_9c ; 9d
+ dbbw $0d, 6, .OAMData_9c ; 9e
+ dbbw $02, 8, .OAMData_9f ; 9f
+ dbbw $08, 7, .OAMData_a0 ; a0
+ dbbw $08, 5, .OAMData_a0 ; a1
+ dbbw $08, 3, .OAMData_a0 ; a2
+ dbbw $00, 16, .OAMData_1c ; a3
+ dbbw $00, 9, .OAMData_a4 ; a4
+ dbbw $06, 9, .OAMData_a4 ; a5
+ dbbw $0c, 9, .OAMData_a4 ; a6
+ dbbw $12, 9, .OAMData_a4 ; a7
+ dbbw $18, 9, .OAMData_a4 ; a8
+ dbbw $1e, 9, .OAMData_a4 ; a9
+ dbbw $24, 9, .OAMData_a4 ; aa
+ dbbw $2a, 9, .OAMData_a4 ; ab
+ dbbw $03, 4, .OAMData_ac ; ac
+ dbbw $12, 4, .OAMData_03 ; ad
+ dbbw $10, 4, .OAMData_04 ; ae
+ dbbw $16, 1, .OAMData_0f ; af
+ dbbw $17, 4, .OAMData_02 ; b0
+ dbbw $18, 4, .OAMData_03 ; b1
+ dbbw $1c, 4, .OAMData_03 ; b2
+ dbbw $20, 3, .OAMData_03 ; b3
+ dbbw $23, 4, .OAMData_04 ; b4
+ dbbw $25, 3, .OAMData_03 ; b5
+ dbbw $17, 4, .OAMData_03 ; b6
+ dbbw $0a, 16, .OAMData_00 ; b7
+ dbbw $10, 16, .OAMData_1c ; b8
+ dbbw $00, 16, .OAMData_1c ; b9
+ dbbw $04, 4, .OAMData_03 ; ba
+ dbbw $08, 2, .OAMData_11 ; bb
+ dbbw $20, 6, .OAMData_bc ; bc
+ dbbw $08, 1, .OAMData_0f ; bd
+ dbbw $04, 4, .OAMData_03 ; be
+ dbbw $1a, 4, .OAMData_30 ; bf
+ dbbw $16, 9, .OAMData_01 ; c0
+ dbbw $10, 16, .OAMData_c1 ; c1
+ dbbw $09, 6, .OAMData_c2 ; c2
+ dbbw $11, 9, .OAMData_c3 ; c3
+ dbbw $0e, 4, .OAMData_03 ; c4
+ dbbw $0b, 4, .OAMData_30 ; c5
+ dbbw $1c, 6, .OAMData_02 ; c6
+ dbbw $20, 16, .OAMData_c1 ; c7
+ dbbw $05, 6, .OAMData_c8 ; c8
+ dbbw $0b, 4, .OAMData_03 ; c9
+ dbbw $09, 4, .OAMData_ca ; ca
+ dbbw $0b, 4, .OAMData_04 ; cb
+ dbbw $11, 13, .OAMData_cc ; cc
+ dbbw $00, 9, .OAMData_c3 ; cd
+ dbbw $09, 9, .OAMData_c3 ; ce
+ dbbw $00, 12, .OAMData_cf ; cf
+ dbbw $06, 12, .OAMData_cf ; d0
+ dbbw $0c, 12, .OAMData_cf ; d1
+ dbbw $12, 12, .OAMData_cf ; d2
+ dbbw $00, 13, .OAMData_cc ; d3
+ dbbw $00, 7, .OAMData_d4 ; d4
+ dbbw $00, 6, .OAMData_d5 ; d5
+ dbbw $00, 14, .OAMData_d6 ; d6
+ dbbw $00, 12, .OAMData_d7 ; d7
+
+.OAMData_11:
+ dsprite -1, 0, -1, 4, $00, $00
+ dsprite 0, 0, -1, 4, $01, $00
+
+.OAMData_56:
+ dsprite -1, 4, -1, 0, $00, $00
+ dsprite -1, 4, 0, 0, $01, $00
+
+.OAMData_03:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $01, $00
+ dsprite 0, 0, -1, 0, $02, $00
+ dsprite 0, 0, 0, 0, $03, $00
+
+.OAMData_02:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $00, $20
+ dsprite 0, 0, -1, 0, $00, $40
+ dsprite 0, 0, 0, 0, $00, $60
+
+.OAMData_c3:
+ dsprite -2, 4, -2, 4, $00, $00
+ dsprite -2, 4, -1, 4, $01, $00
+ dsprite -2, 4, 0, 4, $02, $00
+ dsprite -1, 4, -2, 4, $03, $00
+ dsprite -1, 4, -1, 4, $04, $00
+ dsprite -1, 4, 0, 4, $05, $00
+ dsprite 0, 4, -2, 4, $06, $00
+ dsprite 0, 4, -1, 4, $07, $00
+ dsprite 0, 4, 0, 4, $08, $00
+
+.OAMData_01:
+ dsprite -2, 4, -2, 4, $00, $00
+ dsprite -2, 4, -1, 4, $01, $00
+ dsprite -2, 4, 0, 4, $00, $20
+ dsprite -1, 4, -2, 4, $02, $00
+ dsprite -1, 4, -1, 4, $03, $00
+ dsprite -1, 4, 0, 4, $02, $60
+ dsprite 0, 4, -2, 4, $00, $40
+ dsprite 0, 4, -1, 4, $01, $60
+ dsprite 0, 4, 0, 4, $00, $60
+
+.OAMData_cf:
+ dsprite -2, 0, -2, 4, $00, $00
+ dsprite -2, 0, -1, 4, $01, $00
+ dsprite -2, 0, 0, 4, $02, $00
+ dsprite -1, 0, -2, 4, $03, $00
+ dsprite -1, 0, -1, 4, $04, $00
+ dsprite -1, 0, 0, 4, $05, $00
+ dsprite 0, 0, -2, 4, $05, $60
+ dsprite 0, 0, -1, 4, $04, $60
+ dsprite 0, 0, 0, 4, $03, $60
+ dsprite 1, 0, -2, 4, $02, $60
+ dsprite 1, 0, -1, 4, $01, $60
+ dsprite 1, 0, 0, 4, $00, $60
+
+.OAMData_1c:
+ dsprite -2, 0, -2, 0, $00, $00
+ dsprite -2, 0, -1, 0, $01, $00
+ dsprite -2, 0, 0, 0, $02, $00
+ dsprite -2, 0, 1, 0, $03, $00
+ dsprite -1, 0, -2, 0, $04, $00
+ dsprite -1, 0, -1, 0, $05, $00
+ dsprite -1, 0, 0, 0, $06, $00
+ dsprite -1, 0, 1, 0, $07, $00
+ dsprite 0, 0, -2, 0, $08, $00
+ dsprite 0, 0, -1, 0, $09, $00
+ dsprite 0, 0, 0, 0, $0a, $00
+ dsprite 0, 0, 1, 0, $0b, $00
+ dsprite 1, 0, -2, 0, $0c, $00
+ dsprite 1, 0, -1, 0, $0d, $00
+ dsprite 1, 0, 0, 0, $0e, $00
+ dsprite 1, 0, 1, 0, $0f, $00
+
+.OAMData_00:
+ dsprite -2, 0, -2, 0, $00, $00
+ dsprite -2, 0, -1, 0, $01, $00
+ dsprite -1, 0, -2, 0, $02, $00
+ dsprite -1, 0, -1, 0, $03, $00
+ dsprite -2, 0, 0, 0, $01, $20
+ dsprite -2, 0, 1, 0, $00, $20
+ dsprite -1, 0, 0, 0, $03, $20
+ dsprite -1, 0, 1, 0, $02, $20
+ dsprite 0, 0, -2, 0, $02, $40
+ dsprite 0, 0, -1, 0, $03, $40
+ dsprite 1, 0, -2, 0, $00, $40
+ dsprite 1, 0, -1, 0, $01, $40
+ dsprite 0, 0, 0, 0, $03, $60
+ dsprite 0, 0, 1, 0, $02, $60
+ dsprite 1, 0, 0, 0, $01, $60
+ dsprite 1, 0, 1, 0, $00, $60
+
+.OAMData_09:
+ dsprite -3, 4, -3, 4, $00, $00
+ dsprite -3, 4, -2, 4, $01, $00
+ dsprite -2, 4, -3, 4, $02, $00
+ dsprite -2, 4, -2, 4, $03, $00
+ dsprite -3, 4, 0, 4, $01, $20
+ dsprite -3, 4, 1, 4, $00, $20
+ dsprite -2, 4, 0, 4, $03, $20
+ dsprite -2, 4, 1, 4, $02, $20
+ dsprite 0, 4, -3, 4, $02, $40
+ dsprite 0, 4, -2, 4, $03, $40
+ dsprite 1, 4, -3, 4, $00, $40
+ dsprite 1, 4, -2, 4, $01, $40
+ dsprite 0, 4, 0, 4, $03, $60
+ dsprite 0, 4, 1, 4, $02, $60
+ dsprite 1, 4, 0, 4, $01, $60
+ dsprite 1, 4, 1, 4, $00, $60
+
+.OAMData_0c:
+ dsprite -1, 4, -1, 0, $00, $00
+ dsprite -1, 4, 0, 0, $00, $20
+
+.OAMData_6a:
+ dsprite 0, 0, -1, 0, $00, $00
+ dsprite 0, 0, 0, 0, $00, $20
+
+.OAMData_04:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $00, $20
+ dsprite 0, 0, -1, 0, $01, $00
+ dsprite 0, 0, 0, 0, $01, $20
+
+.OAMData_5d:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $01, $00
+ dsprite 0, 0, -1, 0, $00, $40
+ dsprite 0, 0, 0, 0, $01, $40
+
+.OAMData_13:
+ dsprite -1, 2, -1, 0, $02, $00
+ dsprite 0, 2, -1, 0, $03, $00
+ dsprite -2, 6, 0, 0, $02, $00
+ dsprite -1, 6, 0, 0, $03, $00
+
+.OAMData_22:
+ dsprite 1, 0, -11, 0, $01, $00
+ dsprite 0, 0, -10, 0, $02, $00
+ dsprite 0, 0, -9, 0, $03, $00
+ dsprite 0, 0, -8, 0, $00, $00
+ dsprite 0, 0, -7, 0, $03, $00
+ dsprite 0, 0, -6, 0, $00, $00
+ dsprite 0, 0, -5, 0, $03, $00
+ dsprite 0, 0, -4, 0, $00, $00
+ dsprite 0, 0, -3, 0, $03, $00
+ dsprite 0, 0, -2, 0, $00, $00
+ dsprite 0, 0, -1, 0, $01, $00
+ dsprite -1, 0, 0, 0, $02, $00
+ dsprite -1, 0, 1, 0, $03, $00
+ dsprite -1, 0, 2, 0, $00, $00
+ dsprite -1, 0, 3, 0, $03, $00
+ dsprite -1, 0, 4, 0, $00, $00
+ dsprite -1, 0, 5, 0, $03, $00
+ dsprite -1, 0, 6, 0, $00, $00
+ dsprite -1, 0, 7, 0, $03, $00
+ dsprite -1, 0, 8, 0, $00, $00
+ dsprite -1, 0, 9, 0, $01, $00
+ dsprite -2, 0, 10, 0, $02, $00
+
+.OAMData_2a:
+ dsprite -3, 4, -1, 0, $00, $00
+ dsprite -3, 4, 0, 0, $00, $20
+ dsprite -2, 4, -1, 0, $01, $00
+ dsprite -2, 4, 0, 0, $01, $20
+ dsprite -1, 4, -1, 4, $02, $00
+
+.OAMData_2b:
+ dsprite -4, 4, -1, 0, $00, $00
+ dsprite -4, 4, 0, 0, $00, $20
+ dsprite -3, 4, -1, 0, $01, $00
+ dsprite -3, 4, 0, 0, $01, $20
+ dsprite -2, 4, -1, 4, $02, $00
+ dsprite -1, 4, -1, 4, $02, $00
+
+.OAMData_2c:
+ dsprite -5, 4, -1, 0, $00, $00
+ dsprite -5, 4, 0, 0, $00, $20
+ dsprite -4, 4, -1, 0, $01, $00
+ dsprite -4, 4, 0, 0, $01, $20
+ dsprite -3, 4, -1, 4, $02, $00
+ dsprite -2, 4, -1, 4, $02, $00
+ dsprite -1, 4, -1, 4, $02, $00
+
+.OAMData_2d:
+ dsprite -6, 4, -1, 0, $00, $00
+ dsprite -6, 4, 0, 0, $00, $20
+ dsprite -5, 4, -1, 0, $01, $00
+ dsprite -5, 4, 0, 0, $01, $20
+ dsprite -4, 4, -1, 4, $02, $00
+ dsprite -3, 4, -1, 4, $02, $00
+ dsprite -2, 4, -1, 4, $02, $00
+ dsprite -1, 4, -1, 4, $02, $00
+
+.OAMData_2e:
+ dsprite -7, 4, -1, 0, $00, $00
+ dsprite -7, 4, 0, 0, $00, $20
+ dsprite -6, 4, -1, 0, $01, $00
+ dsprite -6, 4, 0, 0, $01, $20
+ dsprite -5, 4, -1, 4, $02, $00
+ dsprite -4, 4, -1, 4, $02, $00
+ dsprite -3, 4, -1, 4, $02, $00
+ dsprite -2, 4, -1, 4, $02, $00
+ dsprite -1, 4, -1, 4, $02, $00
+
+.OAMData_2f:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $00, $20
+ dsprite 0, 0, -1, 0, $01, $00
+ dsprite 0, 0, 0, 0, $00, $60
+
+.OAMData_30:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $01, $00
+ dsprite 0, 0, -1, 0, $01, $60
+ dsprite 0, 0, 0, 0, $00, $60
+
+.OAMData_31:
+ dsprite -2, 4, -1, 0, $00, $00
+ dsprite -2, 4, 0, 0, $01, $00
+ dsprite -1, 4, -1, 0, $02, $00
+ dsprite -1, 4, 0, 0, $03, $00
+ dsprite 0, 4, -1, 0, $04, $00
+ dsprite 0, 4, 0, 0, $05, $00
+
+.OAMData_76:
+ dsprite -1, 5, -1, 0, $00, $00
+ dsprite -1, 1, 0, 0, $00, $00
+
+.OAMData_32:
+ dsprite -1, 0, -2, 4, $00, $00
+ dsprite -1, 0, 0, 4, $00, $00
+ dsprite -3, 0, -2, 4, $00, $00
+ dsprite -3, 0, 0, 4, $00, $00
+ dsprite -2, 0, -3, 4, $00, $00
+ dsprite -2, 0, -2, 4, $01, $00
+ dsprite -2, 0, -1, 4, $00, $00
+ dsprite -2, 0, 0, 4, $01, $00
+ dsprite -2, 0, 1, 4, $00, $00
+ dsprite -1, 0, -4, 4, $00, $00
+ dsprite -1, 0, -3, 4, $01, $00
+ dsprite -1, 0, -1, 4, $01, $00
+ dsprite -1, 0, 1, 4, $01, $00
+ dsprite -1, 0, 2, 4, $00, $00
+
+.OAMData_33:
+ dsprite -2, 0, -2, 4, $00, $00
+ dsprite -2, 0, 0, 4, $00, $00
+ dsprite -1, 0, -3, 4, $00, $00
+ dsprite -1, 0, -2, 4, $01, $00
+ dsprite -1, 0, -1, 4, $00, $00
+ dsprite -1, 0, 0, 4, $01, $00
+ dsprite -1, 0, 1, 4, $00, $00
+ dsprite -4, 0, -2, 4, $00, $00
+ dsprite -4, 0, 0, 4, $00, $00
+ dsprite -3, 0, -3, 4, $00, $00
+ dsprite -3, 0, -2, 4, $01, $00
+ dsprite -3, 0, -1, 4, $00, $00
+ dsprite -3, 0, 0, 4, $01, $00
+ dsprite -3, 0, 1, 4, $00, $00
+ dsprite -2, 0, -4, 4, $00, $00
+ dsprite -2, 0, -3, 4, $01, $00
+ dsprite -2, 0, -1, 4, $01, $00
+ dsprite -2, 0, 1, 4, $01, $00
+ dsprite -2, 0, 2, 4, $00, $00
+ dsprite -1, 0, -4, 4, $01, $00
+ dsprite -1, 0, 2, 4, $01, $00
+
+.OAMData_36:
+ dsprite -7, 4, -1, 0, $00, $00
+ dsprite -7, 4, 0, 0, $01, $00
+ dsprite -6, 4, -1, 0, $02, $00
+ dsprite -6, 4, 0, 0, $03, $00
+ dsprite -5, 4, -1, 0, $04, $00
+ dsprite -5, 4, 0, 0, $05, $00
+ dsprite -4, 4, -1, 0, $06, $00
+ dsprite -4, 4, 0, 0, $07, $00
+ dsprite -3, 4, -1, 0, $08, $00
+ dsprite -3, 4, 0, 0, $09, $00
+ dsprite -2, 4, -1, 0, $0a, $00
+ dsprite -2, 4, 0, 0, $0b, $00
+ dsprite -1, 4, -1, 0, $0c, $00
+ dsprite -1, 4, 0, 0, $0d, $00
+
+.OAMData_3a:
+ dsprite -7, 4, -1, 0, $0c, $00
+ dsprite -7, 4, 0, 0, $0d, $00
+ dsprite -6, 4, -1, 0, $08, $00
+ dsprite -6, 4, 0, 0, $09, $00
+ dsprite -5, 4, -1, 0, $04, $00
+ dsprite -5, 4, 0, 0, $05, $00
+ dsprite -4, 4, -1, 0, $00, $00
+ dsprite -4, 4, 0, 0, $01, $00
+ dsprite -3, 4, -1, 0, $02, $00
+ dsprite -3, 4, 0, 0, $03, $00
+ dsprite -2, 4, 0, 0, $02, $00
+ dsprite -2, 4, 1, 0, $03, $00
+ dsprite -1, 4, 0, 0, $0a, $00
+ dsprite -1, 4, 1, 0, $0b, $00
+
+.OAMData_3e:
+ dsprite 1, 4, -2, 0, $00, $40
+ dsprite 1, 4, -1, 0, $02, $40
+ dsprite 1, 4, 0, 0, $02, $60
+ dsprite 1, 4, 1, 0, $00, $60
+ dsprite -1, 4, -3, 0, $09, $20
+ dsprite -1, 4, -2, 0, $08, $20
+ dsprite -1, 4, -1, 0, $06, $00
+ dsprite -1, 4, 0, 0, $07, $00
+ dsprite -1, 4, 1, 0, $08, $00
+ dsprite -1, 4, 2, 0, $09, $00
+ dsprite 0, 4, -3, 0, $01, $20
+ dsprite 0, 4, -2, 0, $00, $20
+ dsprite 0, 4, -1, 0, $0c, $00
+ dsprite 0, 4, 0, 0, $0d, $00
+ dsprite 0, 4, 1, 0, $00, $00
+ dsprite 0, 4, 2, 0, $01, $00
+ dsprite -3, 4, -2, 0, $00, $00
+ dsprite -3, 4, -1, 0, $02, $00
+ dsprite -3, 4, 0, 0, $02, $20
+ dsprite -3, 4, 1, 0, $00, $20
+ dsprite -2, 4, -3, 0, $03, $20
+ dsprite -2, 4, -2, 0, $02, $20
+ dsprite -2, 4, -1, 0, $04, $00
+ dsprite -2, 4, 0, 0, $05, $00
+ dsprite -2, 4, 1, 0, $02, $00
+ dsprite -2, 4, 2, 0, $03, $00
+
+.OAMData_41:
+ dsprite -3, 4, -2, 0, $00, $00
+ dsprite -3, 4, -1, 0, $02, $00
+ dsprite -3, 4, 0, 0, $02, $20
+ dsprite -3, 4, 1, 0, $00, $20
+ dsprite -2, 4, -3, 4, $00, $00
+ dsprite -2, 4, -2, 4, $01, $00
+ dsprite -2, 4, -1, 0, $05, $20
+ dsprite -2, 4, 0, 0, $04, $20
+ dsprite -2, 4, 0, 4, $01, $20
+ dsprite -2, 4, 1, 4, $00, $20
+ dsprite -1, 4, -3, 4, $02, $00
+ dsprite -1, 4, -2, 4, $03, $00
+ dsprite -1, 4, -1, 0, $07, $20
+ dsprite -1, 4, 0, 0, $06, $20
+ dsprite -1, 4, 0, 4, $03, $20
+ dsprite -1, 4, 1, 4, $02, $20
+ dsprite 0, 4, -3, 4, $04, $00
+ dsprite 0, 4, -2, 4, $05, $00
+ dsprite 0, 4, -1, 0, $0d, $20
+ dsprite 0, 4, 0, 0, $0c, $20
+ dsprite 0, 4, 0, 4, $05, $20
+ dsprite 0, 4, 1, 4, $04, $20
+ dsprite 1, 4, -2, 0, $00, $40
+ dsprite 1, 4, -1, 0, $02, $40
+ dsprite 1, 4, 0, 0, $02, $60
+ dsprite 1, 4, 1, 0, $00, $60
+
+.OAMData_42:
+ dsprite -3, 0, -1, 4, $02, $00
+ dsprite 2, 0, -1, 4, $02, $60
+ dsprite -1, 4, -3, 0, $01, $00
+ dsprite -1, 4, 2, 0, $01, $60
+ dsprite -4, 0, -1, 4, $02, $00
+ dsprite 3, 0, -1, 4, $02, $60
+ dsprite -1, 4, -4, 0, $01, $00
+ dsprite -1, 4, 3, 0, $01, $60
+
+.OAMData_44:
+ dsprite -3, 5, -3, 5, $00, $20
+ dsprite -3, 5, 1, 3, $00, $00
+ dsprite 1, 3, -3, 5, $00, $60
+ dsprite 1, 3, 1, 3, $00, $40
+ dsprite -4, 5, -4, 5, $00, $20
+ dsprite -4, 5, 2, 3, $00, $00
+ dsprite 2, 3, -4, 5, $00, $60
+ dsprite 2, 3, 2, 3, $00, $40
+
+.OAMData_46:
+ dsprite -3, 4, -1, 4, $02, $00
+ dsprite 1, 4, -1, 4, $02, $60
+ dsprite -1, 4, -3, 4, $01, $00
+ dsprite -1, 4, 1, 4, $01, $60
+
+.OAMData_47:
+ dsprite -2, 0, -2, 0, $00, $20
+ dsprite -2, 0, 1, 0, $00, $00
+ dsprite 1, 0, -2, 0, $00, $60
+ dsprite 1, 0, 1, 0, $00, $40
+
+.OAMData_48:
+ dsprite -3, 0, -1, 4, $00, $00
+ dsprite -2, 0, -1, 2, $00, $00
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite 0, 0, -1, 0, $00, $00
+ dsprite 1, 0, -1, 2, $00, $00
+ dsprite 2, 0, -1, 4, $00, $00
+
+.OAMData_49:
+ dsprite -1, 4, -2, 0, $00, $20
+ dsprite -1, 2, -1, 0, $00, $20
+ dsprite -1, 2, 0, 0, $00, $00
+ dsprite -1, 4, 1, 0, $00, $00
+
+.OAMData_4a:
+ dsprite -1, 4, -1, 0, $00, $60
+ dsprite -1, 4, 0, 0, $00, $40
+
+.OAMData_0f:
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite -1, 4, -2, 4, $01, $00
+ dsprite -1, 4, -1, 4, $01, $20
+ dsprite 0, 4, -2, 4, $01, $40
+ dsprite 0, 4, -1, 4, $01, $60
+
+.OAMData_4c:
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite 0, 2, -2, 6, $00, $00
+ dsprite 0, 2, -3, 6, $01, $00
+ dsprite 0, 2, -2, 6, $01, $20
+ dsprite 1, 2, -3, 6, $01, $40
+ dsprite 1, 2, -2, 6, $01, $60
+
+.OAMData_4d:
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite 0, 2, -2, 6, $00, $00
+ dsprite 1, 0, -2, 0, $00, $00
+ dsprite 1, 0, -3, 0, $01, $00
+ dsprite 1, 0, -2, 0, $01, $20
+ dsprite 2, 0, -3, 0, $01, $40
+ dsprite 2, 0, -2, 0, $01, $60
+
+.OAMData_4f:
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite 0, 2, -2, 6, $00, $00
+ dsprite 1, 0, -2, 0, $00, $00
+ dsprite 1, 6, -3, 2, $00, $00
+ dsprite 1, 6, -4, 2, $01, $00
+ dsprite 1, 6, -3, 2, $01, $20
+ dsprite 2, 6, -4, 2, $01, $40
+ dsprite 2, 6, -3, 2, $01, $60
+
+.OAMData_50:
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite 0, 2, -2, 6, $00, $00
+ dsprite 1, 0, -2, 0, $00, $00
+ dsprite 1, 6, -3, 2, $00, $00
+ dsprite 2, 4, -4, 4, $00, $00
+ dsprite 2, 4, -5, 4, $01, $00
+ dsprite 2, 4, -4, 4, $01, $20
+ dsprite 3, 4, -5, 4, $01, $40
+ dsprite 3, 4, -4, 4, $01, $60
+
+.OAMData_51:
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite 0, 2, -2, 6, $00, $00
+ dsprite 1, 0, -2, 0, $00, $00
+ dsprite 1, 6, -3, 2, $00, $00
+ dsprite 2, 4, -4, 4, $00, $00
+ dsprite 3, 2, -5, 6, $00, $00
+ dsprite 3, 2, -6, 6, $01, $00
+ dsprite 3, 2, -5, 6, $01, $20
+ dsprite 4, 2, -6, 6, $01, $40
+ dsprite 4, 2, -5, 6, $01, $60
+
+.OAMData_59:
+ dsprite -1, 4, -2, 0, $00, $00
+ dsprite -1, 4, -1, 0, $01, $00
+ dsprite -1, 4, 0, 0, $01, $20
+ dsprite -1, 4, 1, 0, $00, $20
+
+.OAMData_5a:
+ dsprite -1, 4, -2, 0, $02, $00
+ dsprite -1, 4, -1, 0, $01, $00
+ dsprite -1, 4, 0, 0, $01, $20
+ dsprite -1, 4, 1, 0, $02, $20
+
+.OAMData_60:
+ dsprite -1, 0, -1, 4, $00, $00
+
+.OAMData_69:
+ dsprite 0, 0, -1, 4, $00, $00
+
+.OAMData_61:
+ dsprite -1, 4, -4, 4, $00, $00
+ dsprite -1, 4, -3, 4, $01, $00
+ dsprite -1, 4, -2, 4, $02, $00
+ dsprite -1, 4, -1, 4, $03, $00
+ dsprite -1, 4, 0, 4, $04, $00
+ dsprite -1, 4, 1, 4, $05, $00
+ dsprite -1, 4, 2, 4, $06, $00
+ dsprite -2, 4, 1, 4, $07, $00
+ dsprite -2, 4, 2, 4, $08, $00
+
+.OAMData_65:
+ dsprite -2, 4, -4, 4, $08, $20
+ dsprite -2, 4, -3, 4, $07, $20
+ dsprite -1, 4, -4, 4, $06, $20
+ dsprite -1, 4, -3, 4, $05, $20
+ dsprite -1, 4, -2, 4, $04, $20
+ dsprite -1, 4, -1, 4, $03, $20
+ dsprite -1, 4, 0, 4, $02, $20
+ dsprite -1, 4, 1, 4, $01, $20
+ dsprite -1, 4, 2, 4, $00, $20
+
+.OAMData_d4:
+ dsprite 0, 0, -4, 4, $00, $10
+ dsprite 0, 0, -3, 4, $01, $10
+ dsprite 0, 0, -2, 4, $02, $10
+ dsprite 0, 0, -1, 4, $03, $10
+ dsprite 0, 0, 0, 4, $04, $10
+ dsprite 0, 0, 1, 4, $05, $10
+ dsprite 0, 0, 2, 4, $06, $10
+
+.OAMData_d6:
+ dsprite -1, 0, -4, 4, $00, $10
+ dsprite 0, 0, -4, 4, $01, $10
+ dsprite -1, 0, -3, 4, $02, $10
+ dsprite 0, 0, -3, 4, $03, $10
+ dsprite -1, 0, -2, 4, $04, $10
+ dsprite 0, 0, -2, 4, $05, $10
+ dsprite -1, 0, -1, 4, $06, $10
+ dsprite 0, 0, -1, 4, $07, $10
+ dsprite -1, 0, 0, 4, $08, $10
+ dsprite 0, 0, 0, 4, $09, $10
+ dsprite -1, 0, 1, 4, $0a, $10
+ dsprite 0, 0, 1, 4, $0b, $10
+ dsprite -1, 0, 2, 4, $0c, $10
+ dsprite 0, 0, 2, 4, $0d, $10
+
+.OAMData_d5:
+ dsprite 0, 0, -3, 0, $00, $11
+ dsprite 0, 0, -2, 0, $01, $11
+ dsprite 0, 0, -1, 0, $02, $11
+ dsprite 0, 0, 0, 0, $03, $11
+ dsprite 0, 0, 1, 0, $04, $11
+ dsprite 0, 0, 2, 0, $05, $11
+
+.OAMData_d7:
+ dsprite 0, 0, -3, 0, $00, $11
+ dsprite 1, 0, -3, 0, $01, $11
+ dsprite 0, 0, -2, 0, $02, $11
+ dsprite 1, 0, -2, 0, $03, $11
+ dsprite 0, 0, -1, 0, $04, $11
+ dsprite 1, 0, -1, 0, $05, $11
+ dsprite 0, 0, 0, 0, $06, $11
+ dsprite 1, 0, 0, 0, $07, $11
+ dsprite 0, 0, 1, 0, $08, $11
+ dsprite 1, 0, 1, 0, $09, $11
+ dsprite 0, 0, 2, 0, $0a, $11
+ dsprite 1, 0, 2, 0, $0b, $11
+
+.OAMData_6e:
+ dsprite -2, 4, 0, 4, $00, $00
+ dsprite -1, 4, -2, 4, $01, $00
+ dsprite -1, 4, -1, 4, $02, $00
+ dsprite -1, 4, 0, 4, $03, $00
+ dsprite 0, 4, -2, 4, $04, $00
+
+.OAMData_6f:
+ dsprite -1, 4, -2, 4, $00, $00
+ dsprite -1, 4, -1, 4, $01, $00
+ dsprite -1, 4, 0, 4, $02, $00
+
+.OAMData_77:
+ dsprite -4, 4, 1, 4, $01, $60
+
+.OAMData_78:
+ dsprite -4, 4, 1, 4, $00, $00
+ dsprite -4, 4, 0, 4, $01, $60
+ dsprite -3, 4, 1, 4, $01, $60
+
+.OAMData_79:
+ dsprite -4, 4, 1, 4, $01, $00
+ dsprite -4, 4, 0, 4, $00, $00
+ dsprite -4, 4, -1, 4, $01, $60
+ dsprite -3, 4, 1, 4, $00, $00
+ dsprite -3, 4, 0, 4, $01, $60
+ dsprite -2, 4, 1, 4, $01, $60
+
+.OAMData_7a:
+ dsprite -4, 4, -2, 4, $01, $60
+ dsprite -4, 4, -1, 4, $00, $00
+ dsprite -4, 4, 0, 4, $01, $00
+ dsprite -3, 4, -1, 4, $01, $60
+ dsprite -3, 4, 0, 4, $00, $00
+ dsprite -3, 4, 1, 4, $01, $00
+ dsprite -2, 4, 0, 4, $01, $60
+ dsprite -2, 4, 1, 4, $00, $00
+ dsprite -1, 4, 1, 4, $01, $60
+
+.OAMData_7b:
+ dsprite -4, 4, -3, 4, $01, $60
+ dsprite -4, 4, -2, 4, $00, $00
+ dsprite -4, 4, -1, 4, $01, $00
+ dsprite -3, 4, -2, 4, $01, $60
+ dsprite -3, 4, -1, 4, $00, $00
+ dsprite -3, 4, 0, 4, $01, $00
+ dsprite -2, 4, -1, 4, $01, $60
+ dsprite -2, 4, 0, 4, $00, $00
+ dsprite -2, 4, 1, 4, $01, $00
+ dsprite -1, 4, 0, 4, $01, $60
+ dsprite -1, 4, 1, 4, $00, $00
+ dsprite 0, 4, 1, 4, $01, $60
+
+.OAMData_7c:
+ dsprite -4, 4, -3, 4, $00, $00
+ dsprite -4, 4, -2, 4, $01, $00
+ dsprite -3, 4, -3, 4, $01, $60
+ dsprite -3, 4, -2, 4, $00, $00
+ dsprite -3, 4, -1, 4, $01, $00
+ dsprite -2, 4, -2, 4, $01, $60
+ dsprite -2, 4, -1, 4, $00, $00
+ dsprite -2, 4, 0, 4, $01, $00
+ dsprite -1, 4, -1, 4, $01, $60
+ dsprite -1, 4, 0, 4, $00, $00
+ dsprite -1, 4, 1, 4, $01, $00
+ dsprite 0, 4, 0, 4, $01, $60
+ dsprite 0, 4, 1, 4, $00, $00
+ dsprite 1, 4, 1, 4, $01, $60
+
+.OAMData_7d:
+ dsprite -4, 4, -3, 4, $01, $00
+ dsprite -3, 4, -3, 4, $00, $00
+ dsprite -3, 4, -2, 4, $01, $00
+ dsprite -2, 4, -3, 4, $01, $60
+ dsprite -2, 4, -2, 4, $00, $00
+ dsprite -2, 4, -1, 4, $01, $00
+ dsprite -1, 4, -2, 4, $01, $60
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite -1, 4, 0, 4, $01, $00
+ dsprite 0, 4, -1, 4, $01, $60
+ dsprite 0, 4, 0, 4, $00, $00
+ dsprite 0, 4, 1, 4, $01, $00
+ dsprite 1, 4, 0, 4, $01, $60
+ dsprite 1, 4, 1, 4, $00, $00
+ dsprite 2, 4, 1, 4, $01, $60
+
+.OAMData_70:
+ dsprite -2, 0, -1, 0, $00, $00
+ dsprite -1, 0, -1, 0, $01, $00
+ dsprite -2, 0, 0, 0, $00, $20
+ dsprite -1, 0, 0, 0, $01, $20
+ dsprite 0, 0, -1, 0, $01, $40
+ dsprite 1, 0, -1, 0, $00, $40
+ dsprite 0, 0, 0, 0, $01, $60
+ dsprite 1, 0, 0, 0, $00, $60
+
+.OAMData_81:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $01, $00
+ dsprite 0, 0, -1, 0, $01, $60
+ dsprite 0, 0, 0, 0, $00, $60
+
+.OAMData_87:
+ dsprite -2, 4, -1, 0, $00, $00
+ dsprite -2, 4, 0, 0, $01, $00
+ dsprite -1, 4, -1, 0, $02, $00
+ dsprite -1, 4, 0, 0, $03, $00
+ dsprite -1, 4, -1, 0, $00, $00
+ dsprite -1, 4, 0, 0, $01, $00
+ dsprite 0, 4, -1, 0, $02, $00
+ dsprite 0, 4, 0, 0, $03, $00
+ dsprite -3, 4, -1, 0, $00, $00
+ dsprite -3, 4, 0, 0, $01, $00
+ dsprite -2, 4, -1, 0, $02, $00
+ dsprite -2, 4, 0, 0, $03, $00
+ dsprite 0, 4, -1, 0, $00, $00
+ dsprite 0, 4, 0, 0, $01, $00
+ dsprite 1, 4, -1, 0, $02, $00
+ dsprite 1, 4, 0, 0, $03, $00
+
+.OAMData_88:
+ dsprite -2, 0, -1, 0, $00, $00
+ dsprite -2, 0, 0, 0, $01, $00
+ dsprite -1, 0, -1, 0, $02, $00
+ dsprite -1, 0, 0, 0, $03, $00
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $01, $00
+ dsprite 0, 0, -1, 0, $02, $00
+ dsprite 0, 0, 0, 0, $03, $00
+ dsprite 0, 0, -1, 0, $00, $00
+ dsprite 0, 0, 0, 0, $01, $00
+ dsprite 1, 0, -1, 0, $02, $00
+ dsprite 1, 0, 0, 0, $03, $00
+
+.OAMData_8a:
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite -1, 0, 0, 4, $00, $00
+ dsprite -2, 4, 1, 4, $00, $00
+ dsprite -2, 0, 2, 4, $00, $00
+ dsprite -3, 4, 3, 4, $00, $00
+ dsprite -3, 0, 4, 4, $00, $00
+ dsprite -4, 0, 5, 4, $00, $00
+ dsprite -5, 4, 6, 4, $00, $00
+
+.OAMData_8e:
+ dsprite -3, 4, -1, 4, $00, $00
+ dsprite -2, 4, -1, 4, $01, $00
+ dsprite -1, 4, -1, 4, $02, $00
+ dsprite 0, 4, -1, 4, $01, $40
+ dsprite 1, 4, -1, 4, $00, $40
+
+.OAMData_8f:
+ dsprite -1, 4, -2, 0, $00, $00
+ dsprite -1, 4, -1, 0, $01, $00
+ dsprite -1, 4, 0, 0, $02, $00
+ dsprite -1, 4, 1, 0, $03, $00
+
+.OAMData_93:
+ dsprite -1, 0, -2, 4, $00, $00
+ dsprite -1, 0, -1, 4, $01, $00
+ dsprite -1, 0, 0, 4, $02, $00
+ dsprite 0, 0, -2, 4, $03, $00
+ dsprite 0, 0, -1, 4, $04, $00
+ dsprite 0, 0, 0, 4, $05, $00
+
+.OAMData_99:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $05, $00
+ dsprite 0, 0, -1, 0, $01, $00
+ dsprite 0, 0, 0, 0, $05, $00
+
+.OAMData_9b:
+ dsprite -4, 4, 1, 0, $00, $00
+ dsprite -4, 4, 2, 0, $01, $00
+ dsprite -3, 4, -1, 0, $02, $00
+ dsprite -3, 4, 0, 0, $03, $00
+ dsprite -3, 4, 1, 0, $04, $00
+ dsprite -3, 4, 2, 0, $05, $00
+ dsprite -3, 4, 3, 0, $06, $00
+ dsprite -2, 4, -2, 0, $07, $00
+ dsprite -2, 4, -1, 0, $08, $00
+ dsprite -2, 4, 0, 0, $09, $00
+ dsprite -2, 4, 1, 0, $0a, $00
+ dsprite -2, 4, 2, 0, $0b, $00
+ dsprite -2, 4, 3, 0, $0c, $00
+ dsprite -2, 4, 4, 0, $0d, $00
+ dsprite -1, 4, -3, 0, $0e, $00
+ dsprite -1, 4, -2, 0, $0f, $00
+ dsprite -1, 4, -1, 0, $10, $00
+ dsprite -1, 4, 0, 0, $11, $00
+ dsprite -1, 4, 1, 0, $12, $00
+ dsprite -1, 4, 2, 0, $13, $00
+ dsprite 0, 4, -5, 0, $14, $00
+ dsprite 0, 4, -4, 0, $15, $00
+ dsprite 0, 4, -3, 0, $16, $00
+ dsprite 0, 4, -2, 0, $17, $00
+ dsprite 0, 4, -1, 0, $18, $00
+ dsprite 0, 4, 0, 0, $19, $00
+ dsprite 0, 4, 1, 0, $1a, $00
+ dsprite 0, 4, 2, 0, $1b, $00
+ dsprite 0, 4, 3, 0, $1c, $00
+ dsprite 1, 4, -5, 0, $1d, $00
+ dsprite 1, 4, -4, 0, $1e, $00
+ dsprite 1, 4, -2, 0, $1f, $00
+ dsprite 1, 4, -1, 0, $20, $00
+ dsprite 1, 4, 0, 0, $21, $00
+ dsprite 1, 4, 1, 0, $22, $00
+ dsprite 2, 4, 0, 0, $23, $00
+
+.OAMData_9c:
+ dsprite 0, 4, -1, 0, $02, $00
+ dsprite 0, 4, 0, 0, $03, $00
+ dsprite -1, 4, -1, 0, $01, $00
+ dsprite -1, 4, 0, 0, $01, $20
+ dsprite -2, 4, -1, 0, $00, $00
+ dsprite -2, 4, 0, 0, $00, $20
+
+.OAMData_9f:
+ dsprite -1, 0, -2, 0, $00, $00
+ dsprite -1, 0, -1, 0, $01, $00
+ dsprite -1, 0, 0, 0, $02, $00
+ dsprite -1, 0, 1, 0, $03, $00
+ dsprite 0, 0, -2, 0, $04, $00
+ dsprite 0, 0, -1, 0, $05, $00
+ dsprite 0, 0, 0, 0, $06, $00
+ dsprite 0, 0, 1, 0, $07, $00
+
+.OAMData_a0:
+ dsprite -2, 4, -1, 4, $00, $00
+ dsprite -1, 4, -1, 4, $00, $00
+ dsprite 0, 4, -1, 4, $00, $00
+ dsprite -3, 4, -1, 4, $00, $00
+ dsprite 1, 4, -1, 4, $00, $00
+ dsprite -4, 4, -1, 4, $00, $00
+ dsprite 2, 4, -1, 4, $00, $00
+
+.OAMData_a4:
+ dsprite -2, 4, -2, 4, $00, $00
+ dsprite -2, 4, -1, 4, $01, $00
+ dsprite -2, 4, 0, 4, $02, $00
+ dsprite -1, 4, -2, 4, $03, $00
+ dsprite -1, 4, -1, 4, $04, $00
+ dsprite -1, 4, 0, 4, $05, $00
+ dsprite 0, 4, -2, 4, $00, $40
+ dsprite 0, 4, -1, 4, $01, $40
+ dsprite 0, 4, 0, 4, $02, $40
+
+.OAMData_ac:
+ dsprite -1, 4, -2, 0, $00, $00
+ dsprite -1, 4, -1, 0, $01, $00
+ dsprite -1, 4, 0, 0, $01, $20
+ dsprite -1, 4, 1, 0, $00, $20
+
+.OAMData_bc:
+ dsprite -1, 4, -3, 0, $00, $00
+ dsprite -1, 4, -2, 0, $01, $00
+ dsprite -1, 4, -1, 0, $02, $00
+ dsprite -1, 4, 0, 0, $02, $20
+ dsprite -1, 4, 1, 0, $01, $20
+ dsprite -1, 4, 2, 0, $00, $20
+
+.OAMData_c1:
+ dsprite -2, 0, -2, 0, $00, $00
+ dsprite -2, 0, -1, 0, $01, $00
+ dsprite -2, 0, 0, 0, $02, $00
+ dsprite -2, 0, 1, 0, $00, $20
+ dsprite -1, 0, -2, 0, $03, $00
+ dsprite -1, 0, -1, 0, $04, $00
+ dsprite -1, 0, 0, 0, $04, $20
+ dsprite -1, 0, 1, 0, $05, $00
+ dsprite 0, 0, -2, 0, $05, $60
+ dsprite 0, 0, -1, 0, $04, $40
+ dsprite 0, 0, 0, 0, $04, $60
+ dsprite 0, 0, 1, 0, $03, $60
+ dsprite 1, 0, -2, 0, $00, $40
+ dsprite 1, 0, -1, 0, $02, $60
+ dsprite 1, 0, 0, 0, $01, $60
+ dsprite 1, 0, 1, 0, $00, $60
+
+.OAMData_c2:
+ dsprite -1, 0, -2, 0, $00, $00
+ dsprite -1, 0, -1, 0, $01, $00
+ dsprite -1, 0, 0, 0, $00, $60
+ dsprite 0, 0, -1, 0, $00, $00
+ dsprite 0, 0, 0, 0, $01, $00
+ dsprite 0, 0, 1, 0, $00, $60
+
+.OAMData_c8:
+ dsprite -1, 0, 1, 4, $00, $00
+ dsprite -1, 0, 2, 4, $01, $00
+ dsprite 0, 0, -1, 4, $02, $00
+ dsprite 0, 0, 0, 4, $03, $00
+ dsprite 0, 0, 1, 4, $04, $00
+ dsprite 0, 0, 2, 4, $05, $00
+
+.OAMData_ca:
+ dsprite -1, 0, -1, 0, $00, $00
+ dsprite -1, 0, 0, 0, $01, $60
+ dsprite 0, 0, -1, 0, $01, $00
+ dsprite 0, 0, 0, 0, $01, $20
+
+.OAMData_cc:
+ dsprite -2, 0, -13, 4, $00, $00
+ dsprite -4, 0, -11, 4, $00, $00
+ dsprite -1, 0, -9, 4, $00, $00
+ dsprite -5, 0, -7, 4, $00, $00
+ dsprite -3, 0, -5, 4, $00, $00
+ dsprite -5, 0, -3, 4, $00, $00
+ dsprite -3, 0, -1, 4, $00, $00
+ dsprite -3, 0, 0, 4, $00, $00
+ dsprite -5, 0, 2, 4, $00, $00
+ dsprite 0, 0, 4, 4, $00, $00
+ dsprite -2, 0, 6, 4, $00, $00
+ dsprite -4, 0, 8, 4, $00, $00
+ dsprite -2, 0, 10, 4, $00, $00
+; cfcf6
--- a/battle/sliding_intro.asm
+++ b/battle/sliding_intro.asm
@@ -14,7 +14,7 @@
ret
; 4e998
-.subfunction1: ; 4e998
+.subfunction1 ; 4e998
call .subfunction4
ld a, $90
ld [hSCX], a
@@ -25,7 +25,7 @@
ret
; 4e9ab
-.subfunction2: ; 4e9ab
+.subfunction2 ; 4e9ab
ld d, $90
ld e, $72
ld a, $48
@@ -61,7 +61,7 @@
ret
; 4e9d6
-.subfunction3: ; 4e9d6
+.subfunction3 ; 4e9d6
ld hl, Sprites + 1 ; x pixel
ld c, $12 ; 18
ld de, $4
@@ -75,7 +75,7 @@
ret
; 4e9e5
-.subfunction4: ; 4e9e5
+.subfunction4 ; 4e9e5
ld hl, LYOverrides
ld a, $90
ld bc, SCREEN_HEIGHT_PX
@@ -83,7 +83,7 @@
ret
; 4e9f1
-.subfunction5: ; 4e9f1
+.subfunction5 ; 4e9f1
ld hl, LYOverrides
ld a, d
ld c, $3e ; 62
--- a/battle/trainer_huds.asm
+++ b/battle/trainer_huds.asm
@@ -238,7 +238,7 @@
ret
; 2c172
-.gfx: ; 2c172
+.gfx ; 2c172
INCBIN "gfx/battle/balls.2bpp"
; 2c1b2
--- a/battle/used_move_text.asm
+++ b/battle/used_move_text.asm
@@ -82,10 +82,10 @@
ret
; 105e1a
-.UsedInsteadText
+.UsedInsteadText:
text_jump _UsedInsteadText
start_asm
-.GetMoveNameText
+.GetMoveNameText:
ld hl, MoveNameText
ret
; 105e23
--- a/constants/animation_constants.asm
+++ b/constants/animation_constants.asm
@@ -76,7 +76,7 @@
const ANIM_OBJ_2F
const ANIM_OBJ_30
const ANIM_OBJ_31
- const ANIM_OBJ_32
+ const ANIM_OBJ_LIGHTNING_BOLT
const ANIM_OBJ_33
const ANIM_OBJ_34
const ANIM_OBJ_35
@@ -136,8 +136,8 @@
const ANIM_OBJ_6B
const ANIM_OBJ_6C
const ANIM_OBJ_6D
- const ANIM_OBJ_6E
- const ANIM_OBJ_6F
+ const ANIM_OBJ_SKY_ATTACK_FEAROW
+ const ANIM_OBJ_LICK
const ANIM_OBJ_70
const ANIM_OBJ_71
const ANIM_OBJ_72
@@ -168,7 +168,7 @@
const ANIM_OBJ_8B
const ANIM_OBJ_8C
const ANIM_OBJ_8D
- const ANIM_OBJ_8E
+ const ANIM_OBJ_SPIKES
const ANIM_OBJ_8F
const ANIM_OBJ_90
const ANIM_OBJ_91
@@ -192,7 +192,7 @@
const ANIM_OBJ_A3
const ANIM_OBJ_A4
const ANIM_OBJ_A5
- const ANIM_OBJ_A6
+ const ANIM_OBJ_PERISH_SONG
const ANIM_OBJ_A7
const ANIM_OBJ_A8
const ANIM_OBJ_A9
@@ -742,7 +742,7 @@
const ANIM_BG_25
const ANIM_BG_26
const ANIM_BG_27
- const ANIM_BG_28
+ const ANIM_BG_WAVE_DEFORM_USER
const ANIM_BG_PSYCHIC
const ANIM_BG_2A
const ANIM_BG_2B
@@ -767,6 +767,47 @@
const ANIM_MON_UNUSED ; 6
const ANIM_MON_EGG1 ; 7
const ANIM_MON_EGG2 ; 8
+
+const_value SET 1
+ const ANIM_GFX_HIT
+ const ANIM_GFX_CUT
+ const ANIM_GFX_FIRE
+ const ANIM_GFX_WATER
+ const ANIM_GFX_LIGHTNING
+ const ANIM_GFX_PLANT
+ const ANIM_GFX_SMOKE
+ const ANIM_GFX_EXPLOSION
+ const ANIM_GFX_ROCKS
+ const ANIM_GFX_ICE
+ const ANIM_GFX_POKE_BALL
+ const ANIM_GFX_POISON
+ const ANIM_GFX_BUBBLE
+ const ANIM_GFX_NOISE
+ const ANIM_GFX_POWDER
+ const ANIM_GFX_BEAM
+ const ANIM_GFX_SPEED
+ const ANIM_GFX_CHARGE
+ const ANIM_GFX_WIND
+ const ANIM_GFX_WHIP
+ const ANIM_GFX_EGG
+ const ANIM_GFX_ROPE
+ const ANIM_GFX_PSYCHIC
+ const ANIM_GFX_REFLECT
+ const ANIM_GFX_STATUS
+ const ANIM_GFX_SAND
+ const ANIM_GFX_WEB
+ const ANIM_GFX_HAZE
+ const ANIM_GFX_HORN
+ const ANIM_GFX_FLOWER
+ const ANIM_GFX_MISC
+ const ANIM_GFX_SKY_ATTACK
+ const ANIM_GFX_GLOBE
+ const ANIM_GFX_SHAPES
+ const ANIM_GFX_OBJECTS
+ const ANIM_GFX_SHINE
+ const ANIM_GFX_ANGELS
+ const ANIM_GFX_WAVE
+ const ANIM_GFX_AEROBLAST
const_def
const BG_EFFECT_STRUCT_FUNCTION
--- a/constants/battle_tower_constants.asm
+++ b/constants/battle_tower_constants.asm
@@ -19,8 +19,8 @@
const BATTLETOWERACTION_11 ; store 0 in 5:aa8d
const BATTLETOWERACTION_12 ; store 1 in 5:aa8d
const BATTLETOWERACTION_13 ; check 5:aa8d
- const BATTLETOWERACTION_14 ; if save file is yours: bit 0, [sbe4f]
- const BATTLETOWERACTION_15 ; set 0, [sbe4f]
+ const BATTLETOWERACTION_14 ; if save file is yours: bit 0, [s1_be4f]
+ const BATTLETOWERACTION_15 ; set 0, [s1_be4f]
const BATTLETOWERACTION_16 ; update time in SRAM bank 5
const BATTLETOWERACTION_17 ; check time in SRAM bank 5
const BATTLETOWERACTION_18 ; level check
--- a/constants/event_flags.asm
+++ b/constants/event_flags.asm
@@ -1232,7 +1232,7 @@
const EVENT_BEAT_BLACKBELT_LUNG
const EVENT_BEAT_BLACKBELT_KENJI
const EVENT_BEAT_BLACKBELT_WAI
-; Beauti
+; Beauty
const EVENT_BEAT_BEAUTY_VICTORIA
const EVENT_BEAT_BEAUTY_SAMANTHA
const EVENT_BEAT_BEAUTY_JULIE
--- a/constants/gfx_constants.asm
+++ b/constants/gfx_constants.asm
@@ -1,45 +1,3 @@
-const_value SET 1
- const ANIM_GFX_HIT
- const ANIM_GFX_CUT
- const ANIM_GFX_FIRE
- const ANIM_GFX_WATER
- const ANIM_GFX_LIGHTNING
- const ANIM_GFX_PLANT
- const ANIM_GFX_SMOKE
- const ANIM_GFX_EXPLOSION
- const ANIM_GFX_ROCKS
- const ANIM_GFX_ICE
- const ANIM_GFX_POKE_BALL
- const ANIM_GFX_POISON
- const ANIM_GFX_BUBBLE
- const ANIM_GFX_NOISE
- const ANIM_GFX_POWDER
- const ANIM_GFX_BEAM
- const ANIM_GFX_SPEED
- const ANIM_GFX_CHARGE
- const ANIM_GFX_WIND
- const ANIM_GFX_WHIP
- const ANIM_GFX_EGG
- const ANIM_GFX_ROPE
- const ANIM_GFX_PSYCHIC
- const ANIM_GFX_REFLECT
- const ANIM_GFX_STATUS
- const ANIM_GFX_SAND
- const ANIM_GFX_WEB
- const ANIM_GFX_HAZE
- const ANIM_GFX_HORN
- const ANIM_GFX_FLOWER
- const ANIM_GFX_MISC
- const ANIM_GFX_SKY_ATTACK
- const ANIM_GFX_GLOBE
- const ANIM_GFX_SHAPES
- const ANIM_GFX_OBJECTS
- const ANIM_GFX_SHINE
- const ANIM_GFX_ANGELS
- const ANIM_GFX_WAVE
- const ANIM_GFX_AEROBLAST
-
-
LEN_2BPP_TILE EQU 16
LEN_1BPP_TILE EQU 8
TILES_PER_FRAME EQU 6
--- a/constants/map_constants.asm
+++ b/constants/map_constants.asm
@@ -707,3 +707,5 @@
CMDQUEUE_05 EQU 5
CMDQUEUE_ENTRY_SIZE EQU 6
CMDQUEUE_CAPACITY EQU 4
+
+CMDQUEUE_STONETABLE EQU 2
--- a/constants/map_setup_constants.asm
+++ b/constants/map_setup_constants.asm
@@ -19,7 +19,7 @@
const MAPCALLBACK_SPRITES
const MAPCALLBACK_NEWMAP
-; Command descriptions from Condensation water's scripting compendium. const_def
+; Command descriptions from Condensation water's scripting compendium.
const_def
const map_lcd_on ; 00
--- a/constants/misc_constants.asm
+++ b/constants/misc_constants.asm
@@ -172,7 +172,7 @@
const HAPPINESS_REVIVALHERB ; 11
const HAPPINESS_MASSAGE ; 12
const HAPPINESS_GAINLEVELATHOME ; 13
-
+
const_def
const LINK_NULL
--- a/constants/radio_constants.asm
+++ b/constants/radio_constants.asm
@@ -1,6 +1,6 @@
const_def
const OAKS_POKEMON_TALK ; $00
- const POKEDEX_SHOW ; $01
+ const POKEDEX_SHOW ; $01
const POKEMON_MUSIC ; $02
const LUCKY_CHANNEL ; $03
const BUENAS_PASSWORD ; $04
--- a/constants/trainer_constants.asm
+++ b/constants/trainer_constants.asm
@@ -7,7 +7,7 @@
const PHONECONTACT_BILL
const PHONECONTACT_ELM
const PHONECONTACT_BUENA
-
+
KRIS EQU __enum__
trainerclass FALKNER ; 1
--- a/data/battle_tower.asm
+++ b/data/battle_tower.asm
@@ -3,19 +3,19 @@
push af
ld a, BANK(BT_OTTrainer)
ld [rSVBK], a
-
+
; Fill BT_OTTrainer with zeros
xor a
ld hl, BT_OTTrainer
ld bc, BT_OTTrainerEnd - BT_OTTrainer
call ByteFill
-
+
; Write $ff into the Item-Slots
ld a, $ff
ld [BT_OTPkmn1Item], a
ld [BT_OTPkmn2Item], a
ld [BT_OTPkmn3Item], a
-
+
; Set BT_OTTrainer as start address to write the following data to
ld de, BT_OTTrainer
@@ -97,7 +97,7 @@
ld a, BANK(sBTPkmnPrevTrainer1)
call GetSRAMBank
-.FindARandomBattleTowerPkmn
+.FindARandomBattleTowerPkmn:
; From Which LevelGroup are the Pkmn loaded
; a = 1..10
ld a, [wBTChoiceOfLvlGroup] ; [$d800]
--- a/data/odd_eggs.asm
+++ b/data/odd_eggs.asm
@@ -91,10 +91,10 @@
ret
; 1fb546
-.Odd
+.Odd:
db "ODD@@@@@@@@@"
-.Probabilities
+.Probabilities:
prob: MACRO
prob_total = prob_total + (\1)
--- a/data/pokedex/entries/001.asm
+++ b/data/pokedex/entries/001.asm
@@ -1,7 +1,7 @@
; BulbasaurPokedexEntry: ; 0x181695
db "SEED@" ; species name
dw 204, 150 ; height, width
-
+
db "While it is young,"
next "it uses the"
next "nutrients that are"
--- a/data/pokedex/entries/002.asm
+++ b/data/pokedex/entries/002.asm
@@ -1,7 +1,7 @@
; IvysaurPokedexEntry: ; 0x181702
db "SEED@" ; species name
dw 303, 290 ; height, width
-
+
db "The bulb on its"
next "back grows as it"
next "absorbs nutrients."
--- a/data/pokedex/entries/003.asm
+++ b/data/pokedex/entries/003.asm
@@ -1,7 +1,7 @@
; VenusaurPokedexEntry: ; 0x181773
db "SEED@" ; species name
dw 607, 2210 ; height, width
-
+
db "As it warms it-"
next "self and absorbs"
next "the sunlight, its"
--- a/data/pokedex/entries/004.asm
+++ b/data/pokedex/entries/004.asm
@@ -1,7 +1,7 @@
; CharmanderPokedexEntry: ; 0x1817db
db "LIZARD@" ; species name
dw 200, 190 ; height, width
-
+
db "If it's healthy,"
next "the flame on the"
next "tip of its tail"
--- a/data/pokedex/entries/005.asm
+++ b/data/pokedex/entries/005.asm
@@ -1,7 +1,7 @@
; CharmeleonPokedexEntry: ; 0x18184a
db "FLAME@" ; species name
dw 307, 420 ; height, width
-
+
db "If it becomes"
next "agitated during"
next "battle, it spouts"
--- a/data/pokedex/entries/006.asm
+++ b/data/pokedex/entries/006.asm
@@ -1,7 +1,7 @@
; CharizardPokedexEntry: ; 0x1818b3
db "FLAME@" ; species name
dw 507, 2000 ; height, width
-
+
db "It uses its wings"
next "to fly high. The"
next "temperature of its"
--- a/data/pokedex/entries/007.asm
+++ b/data/pokedex/entries/007.asm
@@ -1,7 +1,7 @@
; SquirtlePokedexEntry: ; 0x181926
db "TINYTURTLE@" ; species name
dw 108, 200 ; height, width
-
+
db "When it feels"
next "threatened, it"
next "draws its legs"
--- a/data/pokedex/entries/008.asm
+++ b/data/pokedex/entries/008.asm
@@ -1,7 +1,7 @@
; WartortlePokedexEntry: ; 0x181993
db "TURTLE@" ; species name
dw 303, 500 ; height, width
-
+
db "Its long, furry"
next "tail is a symbol"
next "of longevity,"
--- a/data/pokedex/entries/009.asm
+++ b/data/pokedex/entries/009.asm
@@ -1,7 +1,7 @@
; BlastoisePokedexEntry: ; 0x1819f9
db "SHELLFISH@" ; species name
dw 503, 1890 ; height, width
-
+
db "It firmly plants"
next "its feet on the"
next "ground before"
--- a/data/pokedex/entries/010.asm
+++ b/data/pokedex/entries/010.asm
@@ -1,7 +1,7 @@
; CaterpiePokedexEntry: ; 0x181a60
db "WORM@" ; species name
dw 100, 60 ; height, width
-
+
db "It crawls into"
next "foliage where it"
next "camouflages itself"
--- a/data/pokedex/entries/011.asm
+++ b/data/pokedex/entries/011.asm
@@ -1,7 +1,7 @@
; MetapodPokedexEntry: ; 0x181ace
db "COCOON@" ; species name
dw 204, 220 ; height, width
-
+
db "This is its pre-"
next "evolved form. At"
next "this stage, it can"
--- a/data/pokedex/entries/012.asm
+++ b/data/pokedex/entries/012.asm
@@ -1,7 +1,7 @@
; ButterfreePokedexEntry: ; 0x181b45
db "BUTTERFLY@" ; species name
dw 307, 710 ; height, width
-
+
db "It flits from"
next "flower to flower,"
next "collecting honey."
--- a/data/pokedex/entries/013.asm
+++ b/data/pokedex/entries/013.asm
@@ -1,7 +1,7 @@
; WeedlePokedexEntry: ; 0x181bb4
db "HAIRY BUG@" ; species name
dw 100, 70 ; height, width
-
+
db "The barb on top of"
next "its head secretes"
next "a strong poison."
--- a/data/pokedex/entries/014.asm
+++ b/data/pokedex/entries/014.asm
@@ -1,7 +1,7 @@
; KakunaPokedexEntry: ; 0x181c23
db "COCOON@" ; species name
dw 200, 220 ; height, width
-
+
db "Nearly incapable"
next "of movement, it"
next "leans against"
--- a/data/pokedex/entries/015.asm
+++ b/data/pokedex/entries/015.asm
@@ -1,7 +1,7 @@
; BeedrillPokedexEntry: ; 0x181c8a
db "POISON BEE@" ; species name
dw 303, 650 ; height, width
-
+
db "It uses sharp,"
next "poisonous stings"
next "to defeat prey,"
--- a/data/pokedex/entries/016.asm
+++ b/data/pokedex/entries/016.asm
@@ -1,7 +1,7 @@
; PidgeyPokedexEntry: ; 0x181cfa
db "TINY BIRD@" ; species name
dw 100, 40 ; height, width
-
+
db "It rapidly flaps"
next "its wings in the"
next "grass, stirring up"
--- a/data/pokedex/entries/017.asm
+++ b/data/pokedex/entries/017.asm
@@ -1,7 +1,7 @@
; PidgeottoPokedexEntry: ; 0x181d75
db "BIRD@" ; species name
dw 307, 660 ; height, width
-
+
db "It slowly flies in"
next "a circular pat-"
next "tern, all the"
--- a/data/pokedex/entries/018.asm
+++ b/data/pokedex/entries/018.asm
@@ -1,7 +1,7 @@
; PidgeotPokedexEntry: ; 0x181dd7
db "BIRD@" ; species name
dw 411, 870 ; height, width
-
+
db "Its outstanding"
next "vision allows it"
next "to spot splashing"
--- a/data/pokedex/entries/019.asm
+++ b/data/pokedex/entries/019.asm
@@ -1,7 +1,7 @@
; RattataPokedexEntry: ; 0x181e3d
db "RAT@" ; species name
dw 100, 80 ; height, width
-
+
db "This #MON's"
next "impressive vital-"
next "ity allows it to"
--- a/data/pokedex/entries/020.asm
+++ b/data/pokedex/entries/020.asm
@@ -1,7 +1,7 @@
; RaticatePokedexEntry: ; 0x181ea3
db "RAT@" ; species name
dw 204, 410 ; height, width
-
+
db "The webs on its"
next "hind legs enable"
next "it to cross"
--- a/data/pokedex/entries/021.asm
+++ b/data/pokedex/entries/021.asm
@@ -1,7 +1,7 @@
; SpearowPokedexEntry: ; 0x181f03
db "TINY BIRD@" ; species name
dw 100, 40 ; height, width
-
+
db "To protect its"
next "territory, it"
next "flies around"
--- a/data/pokedex/entries/022.asm
+++ b/data/pokedex/entries/022.asm
@@ -1,7 +1,7 @@
; FearowPokedexEntry: ; 0x181f64
db "BEAK@" ; species name
dw 311, 840 ; height, width
-
+
db "It uses its long"
next "beak to attack. It"
next "has a surprisingly"
--- a/data/pokedex/entries/023.asm
+++ b/data/pokedex/entries/023.asm
@@ -1,7 +1,7 @@
; EkansPokedexEntry: ; 0x181fd4
db "SNAKE@" ; species name
dw 607, 150 ; height, width
-
+
db "It flutters the"
next "tip of its tongue"
next "to seek out the"
--- a/data/pokedex/entries/024.asm
+++ b/data/pokedex/entries/024.asm
@@ -1,7 +1,7 @@
; ArbokPokedexEntry: ; 0x18203d
db "COBRA@" ; species name
dw 1106, 1430 ; height, width
-
+
db "To intimidate"
next "foes, it spreads"
next "its chest wide and"
--- a/data/pokedex/entries/025.asm
+++ b/data/pokedex/entries/025.asm
@@ -1,7 +1,7 @@
; PikachuPokedexEntry: ; 0x1820ad
db "MOUSE@" ; species name
dw 104, 130 ; height, width
-
+
db "When it is anger-"
next "ed, it immediately"
next "discharges the"
--- a/data/pokedex/entries/026.asm
+++ b/data/pokedex/entries/026.asm
@@ -1,7 +1,7 @@
; RaichuPokedexEntry: ; 0x182117
db "MOUSE@" ; species name
dw 207, 660 ; height, width
-
+
db "If its electric"
next "pouches run empty,"
next "it raises its tail"
--- a/data/pokedex/entries/027.asm
+++ b/data/pokedex/entries/027.asm
@@ -1,7 +1,7 @@
; SandshrewPokedexEntry: ; 0x182184
db "MOUSE@" ; species name
dw 200, 260 ; height, width
-
+
db "It prefers dry,"
next "sandy places"
next "because it uses"
--- a/data/pokedex/entries/028.asm
+++ b/data/pokedex/entries/028.asm
@@ -1,7 +1,7 @@
; SandslashPokedexEntry: ; 0x1821e7
db "MOUSE@" ; species name
dw 303, 650 ; height, width
-
+
db "Adept at climbing"
next "trees, it rolls"
next "into a spiny ball,"
--- a/data/pokedex/entries/029.asm
+++ b/data/pokedex/entries/029.asm
@@ -1,7 +1,7 @@
; NidoranFPokedexEntry: ; 0x18224b
db "POISON PIN@" ; species name
dw 104, 150 ; height, width
-
+
db "Small and very"
next "docile, it pro-"
next "tects itself with"
--- a/data/pokedex/entries/030.asm
+++ b/data/pokedex/entries/030.asm
@@ -1,7 +1,7 @@
; NidorinaPokedexEntry: ; 0x1822b6
db "POISON PIN@" ; species name
dw 207, 440 ; height, width
-
+
db "It has a docile"
next "nature. If it is"
next "threatened with"
--- a/data/pokedex/entries/031.asm
+++ b/data/pokedex/entries/031.asm
@@ -1,7 +1,7 @@
; NidoqueenPokedexEntry: ; 0x18232e
db "DRILL@" ; species name
dw 403, 1320 ; height, width
-
+
db "The hard scales"
next "that cover its"
next "strong body serve"
--- a/data/pokedex/entries/032.asm
+++ b/data/pokedex/entries/032.asm
@@ -1,7 +1,7 @@
; NidoranMPokedexEntry: ; 0x182392
db "POISON PIN@" ; species name
dw 108, 200 ; height, width
-
+
db "It constantly"
next "moves its large"
next "ears in many"
--- a/data/pokedex/entries/033.asm
+++ b/data/pokedex/entries/033.asm
@@ -1,7 +1,7 @@
; NidorinoPokedexEntry: ; 0x1823fd
db "POISON PIN@" ; species name
dw 211, 430 ; height, width
-
+
db "It is easily"
next "agitated and uses"
next "its horn for"
--- a/data/pokedex/entries/034.asm
+++ b/data/pokedex/entries/034.asm
@@ -1,7 +1,7 @@
; NidokingPokedexEntry: ; 0x182463
db "DRILL@" ; species name
dw 407, 1370 ; height, width
-
+
db "It uses its thick"
next "arms, legs and"
next "tail to attack"
--- a/data/pokedex/entries/035.asm
+++ b/data/pokedex/entries/035.asm
@@ -1,7 +1,7 @@
; ClefairyPokedexEntry: ; 0x1824c8
db "FAIRY@" ; species name
dw 200, 170 ; height, width
-
+
db "Though rarely"
next "seen, it becomes"
next "easier to spot,"
--- a/data/pokedex/entries/036.asm
+++ b/data/pokedex/entries/036.asm
@@ -1,7 +1,7 @@
; ClefablePokedexEntry: ; 0x182530
db "FAIRY@" ; species name
dw 403, 880 ; height, width
-
+
db "Said to live in"
next "quiet, remote"
next "mountains, this"
--- a/data/pokedex/entries/037.asm
+++ b/data/pokedex/entries/037.asm
@@ -1,7 +1,7 @@
; VulpixPokedexEntry: ; 0x18259b
db "FOX@" ; species name
dw 200, 220 ; height, width
-
+
db "As its body grows"
next "larger, its six"
next "warm tails become"
--- a/data/pokedex/entries/038.asm
+++ b/data/pokedex/entries/038.asm
@@ -1,7 +1,7 @@
; NinetalesPokedexEntry: ; 0x18260c
db "FOX@" ; species name
dw 307, 440 ; height, width
-
+
db "It is said to live"
next "a thousand years,"
next "and each of its"
--- a/data/pokedex/entries/039.asm
+++ b/data/pokedex/entries/039.asm
@@ -1,7 +1,7 @@
; JigglypuffPokedexEntry: ; 0x182673
db "BALLOON@" ; species name
dw 108, 120 ; height, width
-
+
db "It rolls its cute"
next "eyes as it sings a"
next "soothing lullaby."
--- a/data/pokedex/entries/040.asm
+++ b/data/pokedex/entries/040.asm
@@ -1,7 +1,7 @@
; WigglytuffPokedexEntry: ; 0x1826e9
db "BALLOON@" ; species name
dw 303, 260 ; height, width
-
+
db "The rich, fluffy"
next "fur that covers"
next "its body feels so"
--- a/data/pokedex/entries/041.asm
+++ b/data/pokedex/entries/041.asm
@@ -1,7 +1,7 @@
; ZubatPokedexEntry: ; 0x18275d
db "BAT@" ; species name
dw 207, 170 ; height, width
-
+
db "During the day, it"
next "gathers with"
next "others and hangs"
--- a/data/pokedex/entries/042.asm
+++ b/data/pokedex/entries/042.asm
@@ -1,7 +1,7 @@
; GolbatPokedexEntry: ; 0x1827c4
db "BAT@" ; species name
dw 503, 1210 ; height, width
-
+
db "When it plunges"
next "its fangs into its"
next "prey, it instantly"
--- a/data/pokedex/entries/043.asm
+++ b/data/pokedex/entries/043.asm
@@ -1,7 +1,7 @@
; OddishPokedexEntry: ; 0x182836
db "WEED@" ; species name
dw 108, 120 ; height, width
-
+
db "During the day, it"
next "stays in the cold"
next "underground to"
--- a/data/pokedex/entries/044.asm
+++ b/data/pokedex/entries/044.asm
@@ -1,7 +1,7 @@
; GloomPokedexEntry: ; 0x1828a6
db "WEED@" ; species name
dw 207, 190 ; height, width
-
+
db "The smell from its"
next "drool-like syrup"
next "and the pollen on"
--- a/data/pokedex/entries/045.asm
+++ b/data/pokedex/entries/045.asm
@@ -1,7 +1,7 @@
; VileplumePokedexEntry: ; 0x182918
db "FLOWER@" ; species name
dw 311, 410 ; height, width
-
+
db "By shaking its big"
next "petals, it scat-"
next "ters toxic pollen"
--- a/data/pokedex/entries/046.asm
+++ b/data/pokedex/entries/046.asm
@@ -1,7 +1,7 @@
; ParasPokedexEntry: ; 0x18297f
db "MUSHROOM@" ; species name
dw 100, 120 ; height, width
-
+
db "The tochukaso"
next "growing on this"
next "#MON's back"
--- a/data/pokedex/entries/047.asm
+++ b/data/pokedex/entries/047.asm
@@ -1,7 +1,7 @@
; ParasectPokedexEntry: ; 0x1829e2
db "MUSHROOM@" ; species name
dw 303, 650 ; height, width
-
+
db "When nothing's"
next "left to extract"
next "from the bug, the"
--- a/data/pokedex/entries/048.asm
+++ b/data/pokedex/entries/048.asm
@@ -1,7 +1,7 @@
; VenonatPokedexEntry: ; 0x182a53
db "INSECT@" ; species name
dw 303, 660 ; height, width
-
+
db "The small bugs it"
next "eats appear only"
next "at night, so it"
--- a/data/pokedex/entries/049.asm
+++ b/data/pokedex/entries/049.asm
@@ -1,7 +1,7 @@
; VenomothPokedexEntry: ; 0x182abf
db "POISONMOTH@" ; species name
dw 411, 280 ; height, width
-
+
db "The scales it"
next "scatters will"
next "paralyze anyone"
--- a/data/pokedex/entries/050.asm
+++ b/data/pokedex/entries/050.asm
@@ -1,7 +1,7 @@
; DiglettPokedexEntry: ; 0x182b30
db "MOLE@" ; species name
dw 8, 20 ; height, width
-
+
db "It digs under-"
next "ground and chews"
next "on tree roots,"
--- a/data/pokedex/entries/051.asm
+++ b/data/pokedex/entries/051.asm
@@ -1,7 +1,7 @@
; DugtrioPokedexEntry: ; 0x182b9d
db "MOLE@" ; species name
dw 204, 730 ; height, width
-
+
db "These DIGLETT"
next "triplets dig over"
next "60 miles below sea"
--- a/data/pokedex/entries/052.asm
+++ b/data/pokedex/entries/052.asm
@@ -1,7 +1,7 @@
; MeowthPokedexEntry: ; 0x182c08
db "SCRATCHCAT@" ; species name
dw 104, 90 ; height, width
-
+
db "It loves things"
next "that sparkle. When"
next "it sees a shiny"
--- a/data/pokedex/entries/053.asm
+++ b/data/pokedex/entries/053.asm
@@ -1,7 +1,7 @@
; PersianPokedexEntry: ; 0x182c78
db "CLASSY CAT@" ; species name
dw 303, 710 ; height, width
-
+
db "Behind its lithe,"
next "elegant appearance"
next "lies a barbaric"
--- a/data/pokedex/entries/054.asm
+++ b/data/pokedex/entries/054.asm
@@ -1,7 +1,7 @@
; PsyduckPokedexEntry: ; 0x182cee
db "DUCK@" ; species name
dw 207, 430 ; height, width
-
+
db "The only time it"
next "can use its psy-"
next "chic power is when"
--- a/data/pokedex/entries/055.asm
+++ b/data/pokedex/entries/055.asm
@@ -1,7 +1,7 @@
; GolduckPokedexEntry: ; 0x182d55
db "DUCK@" ; species name
dw 507, 1690 ; height, width
-
+
db "It swims grace-"
next "fully along on the"
next "quiet, slow-moving"
--- a/data/pokedex/entries/056.asm
+++ b/data/pokedex/entries/056.asm
@@ -1,7 +1,7 @@
; MankeyPokedexEntry: ; 0x182dbd
db "PIG MONKEY@" ; species name
dw 108, 620 ; height, width
-
+
db "It lives in groups"
next "in the treetops."
next "If it loses sight"
--- a/data/pokedex/entries/057.asm
+++ b/data/pokedex/entries/057.asm
@@ -1,7 +1,7 @@
; PrimeapePokedexEntry: ; 0x182e39
db "PIG MONKEY@" ; species name
dw 303, 710 ; height, width
-
+
db "It will beat up"
next "anyone who makes"
next "it mad, even if it"
--- a/data/pokedex/entries/058.asm
+++ b/data/pokedex/entries/058.asm
@@ -1,7 +1,7 @@
; GrowlithePokedexEntry: ; 0x182eaa
db "PUPPY@" ; species name
dw 204, 420 ; height, width
-
+
db "It controls a big"
next "territory. If it"
next "detects an unknown"
--- a/data/pokedex/entries/059.asm
+++ b/data/pokedex/entries/059.asm
@@ -1,7 +1,7 @@
; ArcaninePokedexEntry: ; 0x182f1c
db "LEGENDARY@" ; species name
dw 603, 3420 ; height, width
-
+
db "An ancient picture"
next "scroll shows that"
next "people were"
--- a/data/pokedex/entries/060.asm
+++ b/data/pokedex/entries/060.asm
@@ -1,7 +1,7 @@
; PoliwagPokedexEntry: ; 0x182f91
db "TADPOLE@" ; species name
dw 200, 270 ; height, width
-
+
db "The swirl on its"
next "belly is its"
next "insides showing"
--- a/data/pokedex/entries/061.asm
+++ b/data/pokedex/entries/061.asm
@@ -1,7 +1,7 @@
; PoliwhirlPokedexEntry: ; 0x182ffd
db "TADPOLE@" ; species name
dw 303, 440 ; height, width
-
+
db "Though it is"
next "skilled at walk-"
next "ing, it prefers to"
--- a/data/pokedex/entries/062.asm
+++ b/data/pokedex/entries/062.asm
@@ -1,7 +1,7 @@
; PoliwrathPokedexEntry: ; 0x183066
db "TADPOLE@" ; species name
dw 403, 1190 ; height, width
-
+
db "It can use its"
next "well-developed"
next "arms and legs to"
--- a/data/pokedex/entries/063.asm
+++ b/data/pokedex/entries/063.asm
@@ -1,7 +1,7 @@
; AbraPokedexEntry: ; 0x1830d5
db "PSI@" ; species name
dw 211, 430 ; height, width
-
+
db "It hypnotizes"
next "itself so that it"
next "can teleport away"
--- a/data/pokedex/entries/064.asm
+++ b/data/pokedex/entries/064.asm
@@ -1,7 +1,7 @@
; KadabraPokedexEntry: ; 0x18313c
db "PSI@" ; species name
dw 403, 1250 ; height, width
-
+
db "When it closes its"
next "eyes, twice as"
next "many alpha parti-"
--- a/data/pokedex/entries/065.asm
+++ b/data/pokedex/entries/065.asm
@@ -1,7 +1,7 @@
; AlakazamPokedexEntry: ; 0x1b8000
db "PSI@" ; species name
dw 411, 1060 ; height, width
-
+
db "It has an IQ of"
next "5000. It calcu-"
next "lates many things"
--- a/data/pokedex/entries/066.asm
+++ b/data/pokedex/entries/066.asm
@@ -1,7 +1,7 @@
; MachopPokedexEntry: ; 0x1b8065
db "SUPERPOWER@" ; species name
dw 207, 430 ; height, width
-
+
db "It trains by"
next "lifting rocks in"
next "the mountains. It"
--- a/data/pokedex/entries/067.asm
+++ b/data/pokedex/entries/067.asm
@@ -1,7 +1,7 @@
; MachokePokedexEntry: ; 0x1b80cb
db "SUPERPOWER@" ; species name
dw 411, 1550 ; height, width
-
+
db "This tough #MON"
next "always stays in"
next "the zone. Its"
--- a/data/pokedex/entries/068.asm
+++ b/data/pokedex/entries/068.asm
@@ -1,7 +1,7 @@
; MachampPokedexEntry: ; 0x1b8133
db "SUPERPOWER@" ; species name
dw 503, 2870 ; height, width
-
+
db "With four arms"
next "that react more"
next "quickly than it"
--- a/data/pokedex/entries/069.asm
+++ b/data/pokedex/entries/069.asm
@@ -1,7 +1,7 @@
; BellsproutPokedexEntry: ; 0x1b81a1
db "FLOWER@" ; species name
dw 204, 90 ; height, width
-
+
db "If it notices"
next "anything that"
next "moves, it"
--- a/data/pokedex/entries/070.asm
+++ b/data/pokedex/entries/070.asm
@@ -1,7 +1,7 @@
; WeepinbellPokedexEntry: ; 0x1b81fd
db "FLYCATCHER@" ; species name
dw 303, 140 ; height, width
-
+
db "When it's hungry,"
next "it swings its"
next "razor-sharp"
--- a/data/pokedex/entries/071.asm
+++ b/data/pokedex/entries/071.asm
@@ -1,7 +1,7 @@
; VictreebelPokedexEntry: ; 0x1b826e
db "FLYCATCHER@" ; species name
dw 507, 340 ; height, width
-
+
db "Once ingested into"
next "this #MON's"
next "body, even the"
--- a/data/pokedex/entries/072.asm
+++ b/data/pokedex/entries/072.asm
@@ -1,7 +1,7 @@
; TentacoolPokedexEntry: ; 0x1b82d1
db "JELLYFISH@" ; species name
dw 211, 1000 ; height, width
-
+
db "As it floats along"
next "on the waves, it"
next "uses its toxic"
--- a/data/pokedex/entries/073.asm
+++ b/data/pokedex/entries/073.asm
@@ -1,7 +1,7 @@
; TentacruelPokedexEntry: ; 0x1b8337
db "JELLYFISH@" ; species name
dw 503, 1210 ; height, width
-
+
db "When its 80 feel-"
next "ers absorb water,"
next "it stretches to"
--- a/data/pokedex/entries/074.asm
+++ b/data/pokedex/entries/074.asm
@@ -1,7 +1,7 @@
; GeodudePokedexEntry: ; 0x1b83a1
db "ROCK@" ; species name
dw 104, 440 ; height, width
-
+
db "Proud of their"
next "sturdy bodies,"
next "they bash against"
--- a/data/pokedex/entries/075.asm
+++ b/data/pokedex/entries/075.asm
@@ -1,7 +1,7 @@
; GravelerPokedexEntry: ; 0x1b840c
db "ROCK@" ; species name
dw 303, 2320 ; height, width
-
+
db "It travels by rol-"
next "ling on mountain"
next "paths. If it gains"
--- a/data/pokedex/entries/076.asm
+++ b/data/pokedex/entries/076.asm
@@ -1,7 +1,7 @@
; GolemPokedexEntry: ; 0x1b8481
db "MEGATON@" ; species name
dw 407, 6620 ; height, width
-
+
db "Its rock-like body"
next "is so durable,"
next "even high-powered"
--- a/data/pokedex/entries/077.asm
+++ b/data/pokedex/entries/077.asm
@@ -1,7 +1,7 @@
; PonytaPokedexEntry: ; 0x1b84f2
db "FIRE HORSE@" ; species name
dw 303, 660 ; height, width
-
+
db "Training by"
next "jumping over grass"
next "that grows longer"
--- a/data/pokedex/entries/078.asm
+++ b/data/pokedex/entries/078.asm
@@ -1,7 +1,7 @@
; RapidashPokedexEntry: ; 0x1b855e
db "FIRE HORSE@" ; species name
dw 507, 2090 ; height, width
-
+
db "It just loves to"
next "gallop. The faster"
next "it goes, the long-"
--- a/data/pokedex/entries/079.asm
+++ b/data/pokedex/entries/079.asm
@@ -1,7 +1,7 @@
; SlowpokePokedexEntry: ; 0x1b85d3
db "DOPEY@" ; species name
dw 311, 790 ; height, width
-
+
db "It is always so"
next "absent-minded that"
next "it won't react,"
--- a/data/pokedex/entries/080.asm
+++ b/data/pokedex/entries/080.asm
@@ -1,7 +1,7 @@
; SlowbroPokedexEntry: ; 0x1b8635
db "HERMITCRAB@" ; species name
dw 503, 1730 ; height, width
-
+
db "An attached"
next "SHELLDER won't let"
next "go because of the"
--- a/data/pokedex/entries/081.asm
+++ b/data/pokedex/entries/081.asm
@@ -1,7 +1,7 @@
; MagnemitePokedexEntry: ; 0x1b869d
db "MAGNET@" ; species name
dw 100, 130 ; height, width
-
+
db "The electricity"
next "emitted by the"
next "units on each side"
--- a/data/pokedex/entries/082.asm
+++ b/data/pokedex/entries/082.asm
@@ -1,7 +1,7 @@
; MagnetonPokedexEntry: ; 0x1b870a
db "MAGNET@" ; species name
dw 303, 1320 ; height, width
-
+
db "When many"
next "MAGNETON gather"
next "together, the"
--- a/data/pokedex/entries/083.asm
+++ b/data/pokedex/entries/083.asm
@@ -1,7 +1,7 @@
; FarfetchDPokedexEntry: ; 0x1b876c
db "WILD DUCK@" ; species name
dw 207, 330 ; height, width
-
+
db "In order to pre-"
next "vent their"
next "extinction, more"
--- a/data/pokedex/entries/084.asm
+++ b/data/pokedex/entries/084.asm
@@ -1,7 +1,7 @@
; DoduoPokedexEntry: ; 0x1b87d7
db "TWIN BIRD@" ; species name
dw 407, 860 ; height, width
-
+
db "It lives on a"
next "grassy plain where"
next "it can see a long"
--- a/data/pokedex/entries/085.asm
+++ b/data/pokedex/entries/085.asm
@@ -1,7 +1,7 @@
; DodrioPokedexEntry: ; 0x1b884a
db "TRIPLEBIRD@" ; species name
dw 511, 1880 ; height, width
-
+
db "An enemy that"
next "takes its eyes off"
next "any of the three"
--- a/data/pokedex/entries/086.asm
+++ b/data/pokedex/entries/086.asm
@@ -1,7 +1,7 @@
; SeelPokedexEntry: ; 0x1b88bf
db "SEA LION@" ; species name
dw 307, 1980 ; height, width
-
+
db "The light blue fur"
next "that covers it"
next "keeps it protected"
--- a/data/pokedex/entries/087.asm
+++ b/data/pokedex/entries/087.asm
@@ -1,7 +1,7 @@
; DewgongPokedexEntry: ; 0x1b8934
db "SEA LION@" ; species name
dw 507, 2650 ; height, width
-
+
db "It sleeps under"
next "shallow ocean"
next "waters during the"
--- a/data/pokedex/entries/088.asm
+++ b/data/pokedex/entries/088.asm
@@ -1,7 +1,7 @@
; GrimerPokedexEntry: ; 0x1b89a2
db "SLUDGE@" ; species name
dw 211, 660 ; height, width
-
+
db "When two of these"
next "#MON's bodies"
next "are combined"
--- a/data/pokedex/entries/089.asm
+++ b/data/pokedex/entries/089.asm
@@ -1,7 +1,7 @@
; MukPokedexEntry: ; 0x1b89fc
db "SLUDGE@" ; species name
dw 311, 660 ; height, width
-
+
db "As it moves, a"
next "very strong poison"
next "leaks from it,"
--- a/data/pokedex/entries/090.asm
+++ b/data/pokedex/entries/090.asm
@@ -1,7 +1,7 @@
; ShellderPokedexEntry: ; 0x1b8a68
db "BIVALVE@" ; species name
dw 100, 90 ; height, width
-
+
db "Clamping on to an"
next "opponent reveals"
next "its vulnerable"
--- a/data/pokedex/entries/091.asm
+++ b/data/pokedex/entries/091.asm
@@ -1,7 +1,7 @@
; CloysterPokedexEntry: ; 0x1b8ad9
db "BIVALVE@" ; species name
dw 411, 2920 ; height, width
-
+
db "Even a missile"
next "can't break the"
next "spikes it uses to"
--- a/data/pokedex/entries/092.asm
+++ b/data/pokedex/entries/092.asm
@@ -1,7 +1,7 @@
; GastlyPokedexEntry: ; 0x1b8b4a
db "GAS@" ; species name
dw 403, 2 ; height, width
-
+
db "It wraps its op-"
next "ponent in its gas-"
next "like body, slowly"
--- a/data/pokedex/entries/093.asm
+++ b/data/pokedex/entries/093.asm
@@ -1,7 +1,7 @@
; HaunterPokedexEntry: ; 0x1b8bbd
db "GAS@" ; species name
dw 503, 2 ; height, width
-
+
db "It hides in the"
next "dark, planning to"
next "take the life of"
--- a/data/pokedex/entries/094.asm
+++ b/data/pokedex/entries/094.asm
@@ -1,7 +1,7 @@
; GengarPokedexEntry: ; 0x1b8c25
db "SHADOW@" ; species name
dw 411, 890 ; height, width
-
+
db "Hiding in people's"
next "shadows at night,"
next "it absorbs their"
--- a/data/pokedex/entries/095.asm
+++ b/data/pokedex/entries/095.asm
@@ -1,7 +1,7 @@
; OnixPokedexEntry: ; 0x1b8c98
db "ROCK SNAKE@" ; species name
dw 2810, 4630 ; height, width
-
+
db "As it digs through"
next "the ground, it"
next "absorbs many hard"
--- a/data/pokedex/entries/096.asm
+++ b/data/pokedex/entries/096.asm
@@ -1,7 +1,7 @@
; DrowzeePokedexEntry: ; 0x1b8d0a
db "HYPNOSIS@" ; species name
dw 303, 710 ; height, width
-
+
db "When it twitches"
next "its nose, it can"
next "tell where someone"
--- a/data/pokedex/entries/097.asm
+++ b/data/pokedex/entries/097.asm
@@ -1,7 +1,7 @@
; HypnoPokedexEntry: ; 0x1b8d80
db "HYPNOSIS@" ; species name
dw 503, 1670 ; height, width
-
+
db "The longer it"
next "swings its"
next "pendulum, the"
--- a/data/pokedex/entries/098.asm
+++ b/data/pokedex/entries/098.asm
@@ -1,7 +1,7 @@
; KrabbyPokedexEntry: ; 0x1b8ddd
db "RIVER CRAB@" ; species name
dw 104, 140 ; height, width
-
+
db "If it is unable"
next "to find food, it"
next "will absorb"
--- a/data/pokedex/entries/099.asm
+++ b/data/pokedex/entries/099.asm
@@ -1,7 +1,7 @@
; KinglerPokedexEntry: ; 0x1b8e45
db "PINCER@" ; species name
dw 403, 1320 ; height, width
-
+
db "Its oversized claw"
next "is very powerful,"
next "but when it's not"
--- a/data/pokedex/entries/100.asm
+++ b/data/pokedex/entries/100.asm
@@ -1,7 +1,7 @@
; VoltorbPokedexEntry: ; 0x1b8eb0
db "BALL@" ; species name
dw 108, 230 ; height, width
-
+
db "During the study"
next "of this #MON,"
next "it was discovered"
--- a/data/pokedex/entries/101.asm
+++ b/data/pokedex/entries/101.asm
@@ -1,7 +1,7 @@
; ElectrodePokedexEntry: ; 0x1b8f19
db "BALL@" ; species name
dw 311, 1470 ; height, width
-
+
db "The more energy it"
next "charges up, the"
next "faster it gets."
--- a/data/pokedex/entries/102.asm
+++ b/data/pokedex/entries/102.asm
@@ -1,7 +1,7 @@
; ExeggcutePokedexEntry: ; 0x1b8f84
db "EGG@" ; species name
dw 104, 60 ; height, width
-
+
db "If even one is"
next "separated from the"
next "group, the energy"
--- a/data/pokedex/entries/103.asm
+++ b/data/pokedex/entries/103.asm
@@ -1,7 +1,7 @@
; ExeggutorPokedexEntry: ; 0x1b8ff6
db "COCONUT@" ; species name
dw 607, 2650 ; height, width
-
+
db "Living in a good"
next "environment makes"
next "it grow lots of"
--- a/data/pokedex/entries/104.asm
+++ b/data/pokedex/entries/104.asm
@@ -1,7 +1,7 @@
; CubonePokedexEntry: ; 0x1b9068
db "LONELY@" ; species name
dw 104, 140 ; height, width
-
+
db "It lost its mother"
next "after its birth."
next "It wears its"
--- a/data/pokedex/entries/105.asm
+++ b/data/pokedex/entries/105.asm
@@ -1,7 +1,7 @@
; MarowakPokedexEntry: ; 0x1b90d2
db "BONEKEEPER@" ; species name
dw 303, 990 ; height, width
-
+
db "Somewhere in the"
next "world is a ceme-"
next "tery just for"
--- a/data/pokedex/entries/106.asm
+++ b/data/pokedex/entries/106.asm
@@ -1,7 +1,7 @@
; HitmonleePokedexEntry: ; 0x1b913f
db "KICKING@" ; species name
dw 411, 1100 ; height, width
-
+
db "It is also called"
next "the Kick Master."
next "It uses its"
--- a/data/pokedex/entries/107.asm
+++ b/data/pokedex/entries/107.asm
@@ -1,7 +1,7 @@
; HitmonchanPokedexEntry: ; 0x1b91a4
db "PUNCHING@" ; species name
dw 407, 1110 ; height, width
-
+
db "To increase the"
next "strength of all"
next "its punch moves,"
--- a/data/pokedex/entries/108.asm
+++ b/data/pokedex/entries/108.asm
@@ -1,7 +1,7 @@
; LickitungPokedexEntry: ; 0x1b9210
db "LICKING@" ; species name
dw 311, 1440 ; height, width
-
+
db "It has a tongue"
next "that is over 6'6''"
next "long. It uses this"
--- a/data/pokedex/entries/109.asm
+++ b/data/pokedex/entries/109.asm
@@ -1,7 +1,7 @@
; KoffingPokedexEntry: ; 0x1b9276
db "POISON GAS@" ; species name
dw 200, 20 ; height, width
-
+
db "If one gets close"
next "enough to it when"
next "it expels poison-"
--- a/data/pokedex/entries/110.asm
+++ b/data/pokedex/entries/110.asm
@@ -1,7 +1,7 @@
; WeezingPokedexEntry: ; 0x1b92ec
db "POISON GAS@" ; species name
dw 311, 210 ; height, width
-
+
db "When it inhales"
next "poisonous gases"
next "from garbage, its"
--- a/data/pokedex/entries/111.asm
+++ b/data/pokedex/entries/111.asm
@@ -1,7 +1,7 @@
; RhyhornPokedexEntry: ; 0x1b935d
db "SPIKES@" ; species name
dw 303, 2540 ; height, width
-
+
db "It can remember"
next "only one thing at"
next "a time. Once it"
--- a/data/pokedex/entries/112.asm
+++ b/data/pokedex/entries/112.asm
@@ -1,7 +1,7 @@
; RhydonPokedexEntry: ; 0x1b93c5
db "DRILL@" ; species name
dw 603, 2650 ; height, width
-
+
db "By lightly spin-"
next "ning its drill-"
next "like horn, it can"
--- a/data/pokedex/entries/113.asm
+++ b/data/pokedex/entries/113.asm
@@ -1,7 +1,7 @@
; ChanseyPokedexEntry: ; 0x1b942e
db "EGG@" ; species name
dw 307, 760 ; height, width
-
+
db "People try to"
next "catch it for its"
next "extremely"
--- a/data/pokedex/entries/114.asm
+++ b/data/pokedex/entries/114.asm
@@ -1,7 +1,7 @@
; TangelaPokedexEntry: ; 0x1b948c
db "VINE@" ; species name
dw 303, 770 ; height, width
-
+
db "During battle, it"
next "constantly moves"
next "the vines that"
--- a/data/pokedex/entries/115.asm
+++ b/data/pokedex/entries/115.asm
@@ -1,7 +1,7 @@
; KangaskhanPokedexEntry: ; 0x1b94f6
db "PARENT@" ; species name
dw 703, 1760 ; height, width
-
+
db "To avoid"
next "crushing the"
next "baby it carries in"
--- a/data/pokedex/entries/116.asm
+++ b/data/pokedex/entries/116.asm
@@ -1,7 +1,7 @@
; HorseaPokedexEntry: ; 0x1b9553
db "DRAGON@" ; species name
dw 104, 180 ; height, width
-
+
db "When they're in a"
next "safe location,"
next "they can be seen"
--- a/data/pokedex/entries/117.asm
+++ b/data/pokedex/entries/117.asm
@@ -1,7 +1,7 @@
; SeadraPokedexEntry: ; 0x1b95b8
db "DRAGON@" ; species name
dw 311, 550 ; height, width
-
+
db "The male raises"
next "the young. If it"
next "is approached, it"
--- a/data/pokedex/entries/118.asm
+++ b/data/pokedex/entries/118.asm
@@ -1,7 +1,7 @@
; GoldeenPokedexEntry: ; 0x1b9626
db "GOLDFISH@" ; species name
dw 200, 330 ; height, width
-
+
db "During spawning"
next "season, they swim"
next "gracefully in the"
--- a/data/pokedex/entries/119.asm
+++ b/data/pokedex/entries/119.asm
@@ -1,7 +1,7 @@
; SeakingPokedexEntry: ; 0x1b9690
db "GOLDFISH@" ; species name
dw 403, 860 ; height, width
-
+
db "When autumn comes,"
next "the males patrol"
next "the area around"
--- a/data/pokedex/entries/120.asm
+++ b/data/pokedex/entries/120.asm
@@ -1,7 +1,7 @@
; StaryuPokedexEntry: ; 0x1b9702
db "STARSHAPE@" ; species name
dw 207, 760 ; height, width
-
+
db "When the stars"
next "twinkle at night,"
next "it floats up from"
--- a/data/pokedex/entries/121.asm
+++ b/data/pokedex/entries/121.asm
@@ -1,7 +1,7 @@
; StarmiePokedexEntry: ; 0x1b9776
db "MYSTERIOUS@" ; species name
dw 307, 1760 ; height, width
-
+
db "It is said that it"
next "uses the seven-"
next "colored core of"
--- a/data/pokedex/entries/122.asm
+++ b/data/pokedex/entries/122.asm
@@ -1,7 +1,7 @@
; MrMimePokedexEntry: ; 0x1b97ea
db "BARRIER@" ; species name
dw 403, 1200 ; height, width
-
+
db "It uses the"
next "mysterious"
next "power it has in"
--- a/data/pokedex/entries/123.asm
+++ b/data/pokedex/entries/123.asm
@@ -1,7 +1,7 @@
; ScytherPokedexEntry: ; 0x1b9851
db "MANTIS@" ; species name
dw 411, 1230 ; height, width
-
+
db "It's very proud of"
next "its speed. It"
next "moves so fast that"
--- a/data/pokedex/entries/124.asm
+++ b/data/pokedex/entries/124.asm
@@ -1,7 +1,7 @@
; JynxPokedexEntry: ; 0x1b98c5
db "HUMANSHAPE@" ; species name
dw 407, 900 ; height, width
-
+
db "It has several"
next "different cry pat-"
next "terns, each of"
--- a/data/pokedex/entries/125.asm
+++ b/data/pokedex/entries/125.asm
@@ -1,7 +1,7 @@
; ElectabuzzPokedexEntry: ; 0x1b992a
db "ELECTRIC@" ; species name
dw 307, 660 ; height, width
-
+
db "When two"
next "ELECTABUZZ touch,"
next "they control the"
--- a/data/pokedex/entries/126.asm
+++ b/data/pokedex/entries/126.asm
@@ -1,7 +1,7 @@
; MagmarPokedexEntry: ; 0x1b9994
db "SPITFIRE@" ; species name
dw 403, 980 ; height, width
-
+
db "It moves more"
next "frequently in hot"
next "areas. It can heal"
--- a/data/pokedex/entries/127.asm
+++ b/data/pokedex/entries/127.asm
@@ -1,7 +1,7 @@
; PinsirPokedexEntry: ; 0x1b99fb
db "STAGBEETLE@" ; species name
dw 411, 1210 ; height, width
-
+
db "When the tempera-"
next "ture drops at"
next "night, it sleeps"
--- a/data/pokedex/entries/128.asm
+++ b/data/pokedex/entries/128.asm
@@ -1,7 +1,7 @@
; TaurosPokedexEntry: ; 0x1b9a6f
db "WILD BULL@" ; species name
dw 407, 1950 ; height, width
-
+
db "These violent"
next "#MON fight"
next "with other mem-"
--- a/data/pokedex/entries/129.asm
+++ b/data/pokedex/entries/129.asm
@@ -1,7 +1,7 @@
; MagikarpPokedexEntry: ; 0x1cc000
db "FISH@" ; species name
dw 211, 220 ; height, width
-
+
db "This weak and"
next "pathetic #MON"
next "gets easily pushed"
--- a/data/pokedex/entries/130.asm
+++ b/data/pokedex/entries/130.asm
@@ -1,7 +1,7 @@
; GyaradosPokedexEntry: ; 0x1cc065
db "ATROCIOUS@" ; species name
dw 2104, 5180 ; height, width
-
+
db "It appears when-"
next "ever there is"
next "world conflict,"
--- a/data/pokedex/entries/131.asm
+++ b/data/pokedex/entries/131.asm
@@ -1,7 +1,7 @@
; LaprasPokedexEntry: ; 0x1cc0cd
db "TRANSPORT@" ; species name
dw 802, 4850 ; height, width
-
+
db "This gentle"
next "#MON loves to"
next "give people rides"
--- a/data/pokedex/entries/132.asm
+++ b/data/pokedex/entries/132.asm
@@ -1,7 +1,7 @@
; DittoPokedexEntry: ; 0x1cc13c
db "TRANSFORM@" ; species name
dw 100, 90 ; height, width
-
+
db "When it encount-"
next "ers another DITTO,"
next "it will move"
--- a/data/pokedex/entries/133.asm
+++ b/data/pokedex/entries/133.asm
@@ -1,7 +1,7 @@
; EeveePokedexEntry: ; 0x1cc1b2
db "EVOLUTION@" ; species name
dw 100, 140 ; height, width
-
+
db "Its ability to"
next "evolve into many"
next "forms allows it to"
--- a/data/pokedex/entries/134.asm
+++ b/data/pokedex/entries/134.asm
@@ -1,7 +1,7 @@
; VaporeonPokedexEntry: ; 0x1cc224
db "BUBBLE JET@" ; species name
dw 303, 640 ; height, width
-
+
db "As it uses the"
next "fins on the tip"
next "of its tail to"
--- a/data/pokedex/entries/135.asm
+++ b/data/pokedex/entries/135.asm
@@ -1,7 +1,7 @@
; JolteonPokedexEntry: ; 0x1cc28b
db "LIGHTNING@" ; species name
dw 207, 540 ; height, width
-
+
db "The negatively"
next "charged ions"
next "generated in its"
--- a/data/pokedex/entries/136.asm
+++ b/data/pokedex/entries/136.asm
@@ -1,7 +1,7 @@
; FlareonPokedexEntry: ; 0x1cc2ec
db "FLAME@" ; species name
dw 211, 550 ; height, width
-
+
db "Once it has stored"
next "up enough heat,"
next "this #MON's"
--- a/data/pokedex/entries/137.asm
+++ b/data/pokedex/entries/137.asm
@@ -1,7 +1,7 @@
; PorygonPokedexEntry: ; 0x1cc353
db "VIRTUAL@" ; species name
dw 207, 800 ; height, width
-
+
db "An artificial"
next "#MON created"
next "due to extensive"
--- a/data/pokedex/entries/138.asm
+++ b/data/pokedex/entries/138.asm
@@ -1,7 +1,7 @@
; OmanytePokedexEntry: ; 0x1cc3c1
db "SPIRAL@" ; species name
dw 104, 170 ; height, width
-
+
db "In prehistoric"
next "times, it swam on"
next "the sea floor,"
--- a/data/pokedex/entries/139.asm
+++ b/data/pokedex/entries/139.asm
@@ -1,7 +1,7 @@
; OmastarPokedexEntry: ; 0x1cc42e
db "SPIRAL@" ; species name
dw 303, 770 ; height, width
-
+
db "Its heavy shell"
next "allowed it to"
next "reach only nearby"
--- a/data/pokedex/entries/140.asm
+++ b/data/pokedex/entries/140.asm
@@ -1,7 +1,7 @@
; KabutoPokedexEntry: ; 0x1cc497
db "SHELLFISH@" ; species name
dw 108, 250 ; height, width
-
+
db "Three hundred"
next "million years ago,"
next "it hid on the sea"
--- a/data/pokedex/entries/141.asm
+++ b/data/pokedex/entries/141.asm
@@ -1,7 +1,7 @@
; KabutopsPokedexEntry: ; 0x1cc507
db "SHELLFISH@" ; species name
dw 403, 890 ; height, width
-
+
db "It was able to"
next "swim quickly thro-"
next "ugh the water by"
--- a/data/pokedex/entries/142.asm
+++ b/data/pokedex/entries/142.asm
@@ -1,7 +1,7 @@
; AerodactylPokedexEntry: ; 0x1cc576
db "FOSSIL@" ; species name
dw 511, 1300 ; height, width
-
+
db "In prehistoric"
next "times, this"
next "#MON flew"
--- a/data/pokedex/entries/143.asm
+++ b/data/pokedex/entries/143.asm
@@ -1,7 +1,7 @@
; SnorlaxPokedexEntry: ; 0x1cc5cf
db "SLEEPING@" ; species name
dw 611, 10140 ; height, width
-
+
db "This #MON's"
next "stomach is so"
next "strong, even"
--- a/data/pokedex/entries/144.asm
+++ b/data/pokedex/entries/144.asm
@@ -1,7 +1,7 @@
; ArticunoPokedexEntry: ; 0x1cc632
db "FREEZE@" ; species name
dw 507, 1220 ; height, width
-
+
db "Legendary bird"
next "#MON. As it"
next "flies through the"
--- a/data/pokedex/entries/145.asm
+++ b/data/pokedex/entries/145.asm
@@ -1,7 +1,7 @@
; ZapdosPokedexEntry: ; 0x1cc697
db "ELECTRIC@" ; species name
dw 503, 1160 ; height, width
-
+
db "Legendary bird"
next "#MON. They say"
next "lightning caused"
--- a/data/pokedex/entries/146.asm
+++ b/data/pokedex/entries/146.asm
@@ -1,7 +1,7 @@
; MoltresPokedexEntry: ; 0x1cc706
db "FLAME@" ; species name
dw 607, 1320 ; height, width
-
+
db "Legendary bird"
next "#MON. It is"
next "said to migrate"
--- a/data/pokedex/entries/147.asm
+++ b/data/pokedex/entries/147.asm
@@ -1,7 +1,7 @@
; DratiniPokedexEntry: ; 0x1cc761
db "DRAGON@" ; species name
dw 511, 70 ; height, width
-
+
db "It sheds many lay-"
next "ers of skin as it"
next "grows larger. Dur-"
--- a/data/pokedex/entries/148.asm
+++ b/data/pokedex/entries/148.asm
@@ -1,7 +1,7 @@
; DragonairPokedexEntry: ; 0x1cc7dc
db "DRAGON@" ; species name
dw 1301, 360 ; height, width
-
+
db "It is called the"
next "divine #MON."
next "When its entire"
--- a/data/pokedex/entries/149.asm
+++ b/data/pokedex/entries/149.asm
@@ -1,7 +1,7 @@
; DragonitePokedexEntry: ; 0x1cc843
db "DRAGON@" ; species name
dw 703, 4630 ; height, width
-
+
db "It is said that"
next "somewhere in the"
next "ocean lies an"
--- a/data/pokedex/entries/150.asm
+++ b/data/pokedex/entries/150.asm
@@ -1,7 +1,7 @@
; MewtwoPokedexEntry: ; 0x1cc8ae
db "GENETIC@" ; species name
dw 607, 2690 ; height, width
-
+
db "Said to rest qui-"
next "etly in an"
next "undiscovered cave,"
--- a/data/pokedex/entries/151.asm
+++ b/data/pokedex/entries/151.asm
@@ -1,7 +1,7 @@
; MewPokedexEntry: ; 0x1cc915
db "NEW SPECIE@" ; species name
dw 104, 90 ; height, width
-
+
db "Because it can"
next "learn any move,"
next "some people began"
--- a/data/pokedex/entries/152.asm
+++ b/data/pokedex/entries/152.asm
@@ -1,7 +1,7 @@
; ChikoritaPokedexEntry: ; 0x1cc988
db "LEAF@" ; species name
dw 211, 140 ; height, width
-
+
db "It loves to bask"
next "in the sunlight."
next "It uses the leaf"
--- a/data/pokedex/entries/153.asm
+++ b/data/pokedex/entries/153.asm
@@ -1,7 +1,7 @@
; BayleefPokedexEntry: ; 0x1cc9e9
db "LEAF@" ; species name
dw 311, 350 ; height, width
-
+
db "The scent that"
next "wafts from the"
next "leaves on its neck"
--- a/data/pokedex/entries/154.asm
+++ b/data/pokedex/entries/154.asm
@@ -1,7 +1,7 @@
; MeganiumPokedexEntry: ; 0x1cca54
db "HERB@" ; species name
dw 511, 2220 ; height, width
-
+
db "Anyone who stands"
next "beside it becomes"
next "refreshed, just as"
--- a/data/pokedex/entries/155.asm
+++ b/data/pokedex/entries/155.asm
@@ -1,7 +1,7 @@
; CyndaquilPokedexEntry: ; 0x1ccabd
db "FIRE MOUSE@" ; species name
dw 108, 170 ; height, width
-
+
db "The fire that"
next "spouts from its"
next "back burns hottest"
--- a/data/pokedex/entries/156.asm
+++ b/data/pokedex/entries/156.asm
@@ -1,7 +1,7 @@
; QuilavaPokedexEntry: ; 0x1ccb33
db "VOLCANO@" ; species name
dw 211, 420 ; height, width
-
+
db "Before battle, it"
next "turns its back on"
next "its opponent to"
--- a/data/pokedex/entries/157.asm
+++ b/data/pokedex/entries/157.asm
@@ -1,7 +1,7 @@
; TyphlosionPokedexEntry: ; 0x1ccba0
db "VOLCANO@" ; species name
dw 507, 1750 ; height, width
-
+
db "When heat from its"
next "body causes the"
next "air around it to"
--- a/data/pokedex/entries/158.asm
+++ b/data/pokedex/entries/158.asm
@@ -1,7 +1,7 @@
; TotodilePokedexEntry: ; 0x1ccc14
db "BIG JAW@" ; species name
dw 200, 210 ; height, width
-
+
db "This rough critter"
next "chomps at any"
next "moving object it"
--- a/data/pokedex/entries/159.asm
+++ b/data/pokedex/entries/159.asm
@@ -1,7 +1,7 @@
; CroconawPokedexEntry: ; 0x1ccc84
db "BIG JAW@" ; species name
dw 307, 550 ; height, width
-
+
db "The tips of its"
next "fangs are slanted"
next "backward. Once"
--- a/data/pokedex/entries/160.asm
+++ b/data/pokedex/entries/160.asm
@@ -1,7 +1,7 @@
; FeraligatrPokedexEntry: ; 0x1cccf9
db "BIG JAW@" ; species name
dw 707, 1960 ; height, width
-
+
db "Although it has a"
next "massive body, its"
next "powerful hind legs"
--- a/data/pokedex/entries/161.asm
+++ b/data/pokedex/entries/161.asm
@@ -1,7 +1,7 @@
; SentretPokedexEntry: ; 0x1ccd6b
db "SCOUT@" ; species name
dw 207, 130 ; height, width
-
+
db "When acting as a"
next "lookout, it warns"
next "others of danger"
--- a/data/pokedex/entries/162.asm
+++ b/data/pokedex/entries/162.asm
@@ -1,7 +1,7 @@
; FurretPokedexEntry: ; 0x1ccddd
db "LONG BODY@" ; species name
dw 511, 720 ; height, width
-
+
db "It lives in narrow"
next "burrows that fit"
next "its slim body. The"
--- a/data/pokedex/entries/163.asm
+++ b/data/pokedex/entries/163.asm
@@ -1,7 +1,7 @@
; HoothootPokedexEntry: ; 0x1cce58
db "OWL@" ; species name
dw 204, 470 ; height, width
-
+
db "It begins to hoot"
next "at the same time"
next "every day. Some"
--- a/data/pokedex/entries/164.asm
+++ b/data/pokedex/entries/164.asm
@@ -1,7 +1,7 @@
; NoctowlPokedexEntry: ; 0x1cceb9
db "OWL@" ; species name
dw 503, 900 ; height, width
-
+
db "Its extremely soft"
next "feathers make no"
next "sound in flight."
--- a/data/pokedex/entries/165.asm
+++ b/data/pokedex/entries/165.asm
@@ -1,7 +1,7 @@
; LedybaPokedexEntry: ; 0x1ccf2c
db "FIVE STAR@" ; species name
dw 303, 240 ; height, width
-
+
db "It is timid and"
next "clusters together"
next "with others. The"
--- a/data/pokedex/entries/166.asm
+++ b/data/pokedex/entries/166.asm
@@ -1,7 +1,7 @@
; LedianPokedexEntry: ; 0x1ccfa0
db "FIVE STAR@" ; species name
dw 407, 780 ; height, width
-
+
db "In the daytime"
next "when it gets warm,"
next "it curls up inside"
--- a/data/pokedex/entries/167.asm
+++ b/data/pokedex/entries/167.asm
@@ -1,7 +1,7 @@
; SpinarakPokedexEntry: ; 0x1cd012
db "STRINGSPIT@" ; species name
dw 108, 190 ; height, width
-
+
db "If prey becomes"
next "ensnared in its"
next "nest of spun"
--- a/data/pokedex/entries/168.asm
+++ b/data/pokedex/entries/168.asm
@@ -1,7 +1,7 @@
; AriadosPokedexEntry: ; 0x1cd083
db "LONG LEG@" ; species name
dw 307, 740 ; height, width
-
+
db "Rather than mak-"
next "ing a nest in one"
next "specific spot, it"
--- a/data/pokedex/entries/169.asm
+++ b/data/pokedex/entries/169.asm
@@ -1,7 +1,7 @@
; CrobatPokedexEntry: ; 0x1cd0f5
db "BAT@" ; species name
dw 511, 1650 ; height, width
-
+
db "As a result of its"
next "pursuit of faster,"
next "yet more silent"
--- a/data/pokedex/entries/170.asm
+++ b/data/pokedex/entries/170.asm
@@ -1,7 +1,7 @@
; ChinchouPokedexEntry: ; 0x1cd165
db "ANGLER@" ; species name
dw 108, 260 ; height, width
-
+
db "Its antennae, whi-"
next "ch evolved from a"
next "fin, have both po-"
--- a/data/pokedex/entries/171.asm
+++ b/data/pokedex/entries/171.asm
@@ -1,7 +1,7 @@
; LanturnPokedexEntry: ; 0x1cd1de
db "LIGHT@" ; species name
dw 311, 500 ; height, width
-
+
db "This #MON uses"
next "the bright part of"
next "its body, which"
--- a/data/pokedex/entries/172.asm
+++ b/data/pokedex/entries/172.asm
@@ -1,7 +1,7 @@
; PichuPokedexEntry: ; 0x1cd243
db "TINY MOUSE@" ; species name
dw 100, 40 ; height, width
-
+
db "It is unskilled at"
next "storing electric"
next "power. Any kind of"
--- a/data/pokedex/entries/173.asm
+++ b/data/pokedex/entries/173.asm
@@ -1,7 +1,7 @@
; CleffaPokedexEntry: ; 0x1cd2bc
db "STARSHAPE@" ; species name
dw 100, 70 ; height, width
-
+
db "If the impact site"
next "of a meteorite is"
next "found, this"
--- a/data/pokedex/entries/174.asm
+++ b/data/pokedex/entries/174.asm
@@ -1,7 +1,7 @@
; IgglybuffPokedexEntry: ; 0x1cd32c
db "BALLOON@" ; species name
dw 100, 20 ; height, width
-
+
db "Instead of walking"
next "with its short"
next "legs, it moves"
--- a/data/pokedex/entries/175.asm
+++ b/data/pokedex/entries/175.asm
@@ -1,7 +1,7 @@
; TogepiPokedexEntry: ; 0x1cd396
db "SPIKE BALL@" ; species name
dw 100, 30 ; height, width
-
+
db "It is considered"
next "to be a symbol of"
next "good luck. Its"
--- a/data/pokedex/entries/176.asm
+++ b/data/pokedex/entries/176.asm
@@ -1,7 +1,7 @@
; TogeticPokedexEntry: ; 0x1cd402
db "HAPPINESS@" ; species name
dw 200, 70 ; height, width
-
+
db "Although it does"
next "not flap its wings"
next "very much, it can"
--- a/data/pokedex/entries/177.asm
+++ b/data/pokedex/entries/177.asm
@@ -1,7 +1,7 @@
; NatuPokedexEntry: ; 0x1cd47d
db "LITTLE BIRD@" ; species name
dw 8, 40 ; height, width
-
+
db "It is extremely"
next "good at climbing"
next "tree trunks and"
--- a/data/pokedex/entries/178.asm
+++ b/data/pokedex/entries/178.asm
@@ -1,7 +1,7 @@
; XatuPokedexEntry: ; 0x1cd4e9
db "MYSTIC@" ; species name
dw 411, 330 ; height, width
-
+
db "Once it begins to"
next "meditate at sun-"
next "rise, the entire"
--- a/data/pokedex/entries/179.asm
+++ b/data/pokedex/entries/179.asm
@@ -1,7 +1,7 @@
; MareepPokedexEntry: ; 0x1cd551
db "WOOL@" ; species name
dw 200, 170 ; height, width
-
+
db "It stores lots of"
next "air in its soft"
next "fur, allowing it"
--- a/data/pokedex/entries/180.asm
+++ b/data/pokedex/entries/180.asm
@@ -1,7 +1,7 @@
; FlaaffyPokedexEntry: ; 0x1cd5b8
db "WOOL@" ; species name
dw 207, 290 ; height, width
-
+
db "Because of its"
next "rubbery, electric-"
next "ity-resistant"
--- a/data/pokedex/entries/181.asm
+++ b/data/pokedex/entries/181.asm
@@ -1,7 +1,7 @@
; AmpharosPokedexEntry: ; 0x1cd626
db "LIGHT@" ; species name
dw 407, 1360 ; height, width
-
+
db "When it gets dark,"
next "the light from its"
next "bright, shiny tail"
--- a/data/pokedex/entries/182.asm
+++ b/data/pokedex/entries/182.asm
@@ -1,7 +1,7 @@
; BellossomPokedexEntry: ; 0x1cd69a
db "FLOWER@" ; species name
dw 104, 130 ; height, width
-
+
db "When these dance"
next "together, their"
next "petals rub against"
--- a/data/pokedex/entries/183.asm
+++ b/data/pokedex/entries/183.asm
@@ -1,7 +1,7 @@
; MarillPokedexEntry: ; 0x1cd705
db "AQUAMOUSE@" ; species name
dw 104, 190 ; height, width
-
+
db "The fur on its"
next "body naturally"
next "repels water. It"
--- a/data/pokedex/entries/184.asm
+++ b/data/pokedex/entries/184.asm
@@ -1,7 +1,7 @@
; AzumarillPokedexEntry: ; 0x1cd771
db "AQUARABBIT@" ; species name
dw 207, 630 ; height, width
-
+
db "The bubble-like"
next "pattern on its"
next "stomach helps it"
--- a/data/pokedex/entries/185.asm
+++ b/data/pokedex/entries/185.asm
@@ -1,7 +1,7 @@
; SudowoodoPokedexEntry: ; 0x1cd7d9
db "IMITATION@" ; species name
dw 311, 840 ; height, width
-
+
db "If a tree branch"
next "shakes when there"
next "is no wind, it's a"
--- a/data/pokedex/entries/186.asm
+++ b/data/pokedex/entries/186.asm
@@ -1,7 +1,7 @@
; PolitoedPokedexEntry: ; 0x1cd84b
db "FROG@" ; species name
dw 307, 750 ; height, width
-
+
db "When it expands"
next "its throat to"
next "croak out a tune,"
--- a/data/pokedex/entries/187.asm
+++ b/data/pokedex/entries/187.asm
@@ -1,7 +1,7 @@
; HoppipPokedexEntry: ; 0x1cd8b5
db "COTTONWEED@" ; species name
dw 104, 10 ; height, width
-
+
db "It can be carried"
next "away on even the"
next "gentlest breeze."
--- a/data/pokedex/entries/188.asm
+++ b/data/pokedex/entries/188.asm
@@ -1,7 +1,7 @@
; SkiploomPokedexEntry: ; 0x1cd928
db "COTTONWEED@" ; species name
dw 200, 20 ; height, width
-
+
db "As soon as it"
next "rains, it closes"
next "its flower and"
--- a/data/pokedex/entries/189.asm
+++ b/data/pokedex/entries/189.asm
@@ -1,7 +1,7 @@
; JumpluffPokedexEntry: ; 0x1cd998
db "COTTONWEED@" ; species name
dw 207, 70 ; height, width
-
+
db "Even in the fierc-"
next "est wind, it can"
next "control its fluff"
--- a/data/pokedex/entries/190.asm
+++ b/data/pokedex/entries/190.asm
@@ -1,7 +1,7 @@
; AipomPokedexEntry: ; 0x1cda11
db "LONG TAIL@" ; species name
dw 207, 250 ; height, width
-
+
db "It uses its tail"
next "to hang on to tree"
next "branches. It uses"
--- a/data/pokedex/entries/191.asm
+++ b/data/pokedex/entries/191.asm
@@ -1,7 +1,7 @@
; SunkernPokedexEntry: ; 0x1cda87
db "SEED@" ; species name
dw 100, 40 ; height, width
-
+
db "It is very weak."
next "Its only means of"
next "defense is to"
--- a/data/pokedex/entries/192.asm
+++ b/data/pokedex/entries/192.asm
@@ -1,7 +1,7 @@
; SunfloraPokedexEntry: ; 0x1cdaef
db "SUN@" ; species name
dw 207, 190 ; height, width
-
+
db "As the hot season"
next "approaches, the"
next "petals on this"
--- a/data/pokedex/entries/193.asm
+++ b/data/pokedex/entries/193.asm
@@ -1,7 +1,7 @@
; YanmaPokedexEntry: ; 0x1d0000
db "CLEAR WING@" ; species name
dw 311, 840 ; height, width
-
+
db "It can see in all"
next "directions without"
next "moving its big"
--- a/data/pokedex/entries/194.asm
+++ b/data/pokedex/entries/194.asm
@@ -1,7 +1,7 @@
; WooperPokedexEntry: ; 0x1d0078
db "WATER FISH@" ; species name
dw 104, 190 ; height, width
-
+
db "A mucous"
next "membrane covers"
next "its body. Touching"
--- a/data/pokedex/entries/195.asm
+++ b/data/pokedex/entries/195.asm
@@ -1,7 +1,7 @@
; QuagsirePokedexEntry: ; 0x1d00dd
db "WATER FISH@" ; species name
dw 407, 1650 ; height, width
-
+
db "Its body is always"
next "slimy. It often"
next "bangs its head on"
--- a/data/pokedex/entries/196.asm
+++ b/data/pokedex/entries/196.asm
@@ -1,7 +1,7 @@
; EspeonPokedexEntry: ; 0x1d0155
db "SUN@" ; species name
dw 211, 580 ; height, width
-
+
db "The tip of its"
next "forked tail"
next "quivers when it is"
--- a/data/pokedex/entries/197.asm
+++ b/data/pokedex/entries/197.asm
@@ -1,7 +1,7 @@
; UmbreonPokedexEntry: ; 0x1d01af
db "MOONLIGHT@" ; species name
dw 303, 600 ; height, width
-
+
db "On the night of a"
next "full moon, or when"
next "it gets excited,"
--- a/data/pokedex/entries/198.asm
+++ b/data/pokedex/entries/198.asm
@@ -1,7 +1,7 @@
; MurkrowPokedexEntry: ; 0x1d021e
db "DARKNESS@" ; species name
dw 108, 50 ; height, width
-
+
db "It hides any shiny"
next "object it finds in"
next "a secret location."
--- a/data/pokedex/entries/199.asm
+++ b/data/pokedex/entries/199.asm
@@ -1,7 +1,7 @@
; SlowkingPokedexEntry: ; 0x1d0292
db "ROYAL@" ; species name
dw 607, 1750 ; height, width
-
+
db "Every time it ya-"
next "wns, SHELLDER"
next "injects more poi-"
--- a/data/pokedex/entries/200.asm
+++ b/data/pokedex/entries/200.asm
@@ -1,7 +1,7 @@
; MisdreavusPokedexEntry: ; 0x1d0301
db "SCREECH@" ; species name
dw 204, 20 ; height, width
-
+
db "It loves to watch"
next "people it's scar-"
next "ed. It frightens"
--- a/data/pokedex/entries/201.asm
+++ b/data/pokedex/entries/201.asm
@@ -1,7 +1,7 @@
; UnownPokedexEntry: ; 0x1d0373
db "SYMBOL@" ; species name
dw 108, 110 ; height, width
-
+
db "Because different"
next "types of UNOWN"
next "exist, it is said"
--- a/data/pokedex/entries/202.asm
+++ b/data/pokedex/entries/202.asm
@@ -1,7 +1,7 @@
; WobbuffetPokedexEntry: ; 0x1d03dd
db "PATIENT@" ; species name
dw 403, 630 ; height, width
-
+
db "In order to con-"
next "ceal its black"
next "tail, it lives in"
--- a/data/pokedex/entries/203.asm
+++ b/data/pokedex/entries/203.asm
@@ -1,7 +1,7 @@
; GirafarigPokedexEntry: ; 0x1d0446
db "LONG NECK@" ; species name
dw 411, 910 ; height, width
-
+
db "When it is in"
next "danger, its tail"
next "uses some sort of"
--- a/data/pokedex/entries/204.asm
+++ b/data/pokedex/entries/204.asm
@@ -1,7 +1,7 @@
; PinecoPokedexEntry: ; 0x1d04b0
db "BAGWORM@" ; species name
dw 200, 160 ; height, width
-
+
db "It spits out a"
next "fluid that it uses"
next "to glue tree bark"
--- a/data/pokedex/entries/205.asm
+++ b/data/pokedex/entries/205.asm
@@ -1,7 +1,7 @@
; ForretressPokedexEntry: ; 0x1d0524
db "BAGWORM@" ; species name
dw 311, 2770 ; height, width
-
+
db "Usually found"
next "hanging on to a"
next "fat tree trunk. It"
--- a/data/pokedex/entries/206.asm
+++ b/data/pokedex/entries/206.asm
@@ -1,7 +1,7 @@
; DunsparcePokedexEntry: ; 0x1d0593
db "LAND SNAKE@" ; species name
dw 411, 310 ; height, width
-
+
db "It hides deep"
next "inside caves where"
next "no light ever"
--- a/data/pokedex/entries/207.asm
+++ b/data/pokedex/entries/207.asm
@@ -1,7 +1,7 @@
; GligarPokedexEntry: ; 0x1d0604
db "FLYSCORPIO@" ; species name
dw 307, 1430 ; height, width
-
+
db "It builds its nest"
next "on a steep cliff."
next "When it is done"
--- a/data/pokedex/entries/208.asm
+++ b/data/pokedex/entries/208.asm
@@ -1,7 +1,7 @@
; SteelixPokedexEntry: ; 0x1d067c
db "IRON SNAKE@" ; species name
dw 3002, 8820 ; height, width
-
+
db "The many small"
next "metal particles"
next "that cover this"
--- a/data/pokedex/entries/209.asm
+++ b/data/pokedex/entries/209.asm
@@ -1,7 +1,7 @@
; SnubbullPokedexEntry: ; 0x1d06e0
db "FAIRY@" ; species name
dw 200, 170 ; height, width
-
+
db "In truth, it is a"
next "cowardly #MON."
next "It growls eagerly"
--- a/data/pokedex/entries/210.asm
+++ b/data/pokedex/entries/210.asm
@@ -1,7 +1,7 @@
; GranbullPokedexEntry: ; 0x1d074a
db "FAIRY@" ; species name
dw 407, 1070 ; height, width
-
+
db "It can make most"
next "any #MON run"
next "away simply by"
--- a/data/pokedex/entries/211.asm
+++ b/data/pokedex/entries/211.asm
@@ -1,7 +1,7 @@
; QwilfishPokedexEntry: ; 0x1d07b1
db "BALLOON@" ; species name
dw 108, 90 ; height, width
-
+
db "When faced with a"
next "larger opponent,"
next "it swallows as"
--- a/data/pokedex/entries/212.asm
+++ b/data/pokedex/entries/212.asm
@@ -1,7 +1,7 @@
; ScizorPokedexEntry: ; 0x1d0821
db "SCISSORS@" ; species name
dw 511, 2600 ; height, width
-
+
db "This #MON's"
next "pincers, which"
next "contain steel, can"
--- a/data/pokedex/entries/213.asm
+++ b/data/pokedex/entries/213.asm
@@ -1,7 +1,7 @@
; ShucklePokedexEntry: ; 0x1d088e
db "MOLD@" ; species name
dw 200, 450 ; height, width
-
+
db "The fluid secreted"
next "by its toes carves"
next "holes in rocks for"
--- a/data/pokedex/entries/214.asm
+++ b/data/pokedex/entries/214.asm
@@ -1,7 +1,7 @@
; HeracrossPokedexEntry: ; 0x1d0907
db "SINGLEHORN@" ; species name
dw 411, 1190 ; height, width
-
+
db "With its Herculean"
next "powers, it can"
next "easily throw arou-"
--- a/data/pokedex/entries/215.asm
+++ b/data/pokedex/entries/215.asm
@@ -1,7 +1,7 @@
; SneaselPokedexEntry: ; 0x1d097a
db "SHARP CLAW@" ; species name
dw 211, 620 ; height, width
-
+
db "This cunning"
next "#MON hides"
next "under the cover"
--- a/data/pokedex/entries/216.asm
+++ b/data/pokedex/entries/216.asm
@@ -1,7 +1,7 @@
; TeddiursaPokedexEntry: ; 0x1d09da
db "LITTLE BEAR@" ; species name
dw 200, 190 ; height, width
-
+
db "It always licks"
next "honey. Its palm"
next "tastes sweet"
--- a/data/pokedex/entries/217.asm
+++ b/data/pokedex/entries/217.asm
@@ -1,7 +1,7 @@
; UrsaringPokedexEntry: ; 0x1d0a41
db "HIBERNANT@" ; species name
dw 511, 2770 ; height, width
-
+
db "Although it has a"
next "large body, it is"
next "quite skilled at"
--- a/data/pokedex/entries/218.asm
+++ b/data/pokedex/entries/218.asm
@@ -1,7 +1,7 @@
; SlugmaPokedexEntry: ; 0x1d0ab8
db "LAVA@" ; species name
dw 204, 770 ; height, width
-
+
db "These group to-"
next "gether in areas"
next "that are hotter"
--- a/data/pokedex/entries/219.asm
+++ b/data/pokedex/entries/219.asm
@@ -1,7 +1,7 @@
; MagcargoPokedexEntry: ; 0x1d0b21
db "LAVA@" ; species name
dw 207, 1210 ; height, width
-
+
db "Its body is as hot"
next "as lava and is"
next "always billowing."
--- a/data/pokedex/entries/220.asm
+++ b/data/pokedex/entries/220.asm
@@ -1,7 +1,7 @@
; SwinubPokedexEntry: ; 0x1d0b8d
db "PIG@" ; species name
dw 104, 140 ; height, width
-
+
db "It uses the tip of"
next "its nose to dig"
next "for food. Its nose"
--- a/data/pokedex/entries/221.asm
+++ b/data/pokedex/entries/221.asm
@@ -1,7 +1,7 @@
; PiloswinePokedexEntry: ; 0x1d0c01
db "SWINE@" ; species name
dw 307, 1230 ; height, width
-
+
db "Although its legs"
next "are short, its"
next "rugged hooves"
--- a/data/pokedex/entries/222.asm
+++ b/data/pokedex/entries/222.asm
@@ -1,7 +1,7 @@
; CorsolaPokedexEntry: ; 0x1d0c68
db "CORAL@" ; species name
dw 200, 110 ; height, width
-
+
db "The points on its"
next "head absorb"
next "nutrients from"
--- a/data/pokedex/entries/223.asm
+++ b/data/pokedex/entries/223.asm
@@ -1,7 +1,7 @@
; RemoraidPokedexEntry: ; 0x1d0cd3
db "JET@" ; species name
dw 200, 260 ; height, width
-
+
db "To escape from an"
next "attacker, it may"
next "shoot water out of"
--- a/data/pokedex/entries/224.asm
+++ b/data/pokedex/entries/224.asm
@@ -1,7 +1,7 @@
; OctilleryPokedexEntry: ; 0x1d0d42
db "JET@" ; species name
dw 211, 630 ; height, width
-
+
db "Its instinct is to"
next "bury itself in"
next "holes. It often"
--- a/data/pokedex/entries/225.asm
+++ b/data/pokedex/entries/225.asm
@@ -1,7 +1,7 @@
; DelibirdPokedexEntry: ; 0x1d0db1
db "DELIVERY@" ; species name
dw 211, 350 ; height, width
-
+
db "It always carries"
next "its food with it,"
next "wherever it goes."
--- a/data/pokedex/entries/226.asm
+++ b/data/pokedex/entries/226.asm
@@ -1,7 +1,7 @@
; MantinePokedexEntry: ; 0x1d0e25
db "KITE@" ; species name
dw 611, 4850 ; height, width
-
+
db "It swims along"
next "freely, eating"
next "things that swim"
--- a/data/pokedex/entries/227.asm
+++ b/data/pokedex/entries/227.asm
@@ -1,7 +1,7 @@
; SkarmoryPokedexEntry: ; 0x1d0e8c
db "ARMOR BIRD@" ; species name
dw 507, 1110 ; height, width
-
+
db "The feathers that"
next "it sheds are very"
next "sharp. It is said"
--- a/data/pokedex/entries/228.asm
+++ b/data/pokedex/entries/228.asm
@@ -1,7 +1,7 @@
; HoundourPokedexEntry: ; 0x1d0eff
db "DARK@" ; species name
dw 200, 240 ; height, width
-
+
db "Around dawn, its"
next "ominous howl"
next "echoes through the"
--- a/data/pokedex/entries/229.asm
+++ b/data/pokedex/entries/229.asm
@@ -1,7 +1,7 @@
; HoundoomPokedexEntry: ; 0x1d0f66
db "DARK@" ; species name
dw 407, 770 ; height, width
-
+
db "The pungent-"
next "smelling flame"
next "that shoots from"
--- a/data/pokedex/entries/230.asm
+++ b/data/pokedex/entries/230.asm
@@ -1,7 +1,7 @@
; KingdraPokedexEntry: ; 0x1d0fd1
db "DRAGON@" ; species name
dw 511, 3350 ; height, width
-
+
db "It stores energy"
next "by sleeping at"
next "underwater depths"
--- a/data/pokedex/entries/231.asm
+++ b/data/pokedex/entries/231.asm
@@ -1,7 +1,7 @@
; PhanpyPokedexEntry: ; 0x1d1038
db "LONG NOSE@" ; species name
dw 108, 740 ; height, width
-
+
db "During the desert-"
next "ed morning hours,"
next "it comes ashore"
--- a/data/pokedex/entries/232.asm
+++ b/data/pokedex/entries/232.asm
@@ -1,7 +1,7 @@
; DonphanPokedexEntry: ; 0x1d10ac
db "ARMOR@" ; species name
dw 307, 2650 ; height, width
-
+
db "Because this"
next "#MON's skin is"
next "so tough, a normal"
--- a/data/pokedex/entries/233.asm
+++ b/data/pokedex/entries/233.asm
@@ -1,7 +1,7 @@
; Porygon2PokedexEntry: ; 0x1d110c
db "VIRTUAL@" ; species name
dw 200, 720 ; height, width
-
+
db "This manmade"
next "#MON evolved"
next "from the latest"
--- a/data/pokedex/entries/234.asm
+++ b/data/pokedex/entries/234.asm
@@ -1,7 +1,7 @@
; StantlerPokedexEntry: ; 0x1d1174
db "BIG HORN@" ; species name
dw 407, 1570 ; height, width
-
+
db "The round balls"
next "found on the"
next "fallen antlers can"
--- a/data/pokedex/entries/235.asm
+++ b/data/pokedex/entries/235.asm
@@ -1,7 +1,7 @@
; SmearglePokedexEntry: ; 0x1d11e0
db "PAINTER@" ; species name
dw 311, 1280 ; height, width
-
+
db "The color of the"
next "mysterious fluid"
next "secreted from its"
--- a/data/pokedex/entries/236.asm
+++ b/data/pokedex/entries/236.asm
@@ -1,7 +1,7 @@
; TyroguePokedexEntry: ; 0x1d124b
db "SCUFFLE@" ; species name
dw 204, 460 ; height, width
-
+
db "To brush up on its"
next "fighting skills,"
next "it will challenge"
--- a/data/pokedex/entries/237.asm
+++ b/data/pokedex/entries/237.asm
@@ -1,7 +1,7 @@
; HitmontopPokedexEntry: ; 0x1d12c0
db "HANDSTAND@" ; species name
dw 407, 1060 ; height, width
-
+
db "After doing a"
next "handstand to"
next "throw off the"
--- a/data/pokedex/entries/238.asm
+++ b/data/pokedex/entries/238.asm
@@ -1,7 +1,7 @@
; SmoochumPokedexEntry: ; 0x1d132b
db "KISS@" ; species name
dw 104, 130 ; height, width
-
+
db "The sensitivity of"
next "its lips develops"
next "most quickly."
--- a/data/pokedex/entries/239.asm
+++ b/data/pokedex/entries/239.asm
@@ -1,7 +1,7 @@
; ElekidPokedexEntry: ; 0x1d1398
db "ELECTRIC@" ; species name
dw 200, 520 ; height, width
-
+
db "It loves violent"
next "thunder. The space"
next "between its horns"
--- a/data/pokedex/entries/240.asm
+++ b/data/pokedex/entries/240.asm
@@ -1,7 +1,7 @@
; MagbyPokedexEntry: ; 0x1d140e
db "LIVE COAL@" ; species name
dw 204, 470 ; height, width
-
+
db "It naturally spits"
next "an 1100-degree"
next "flame. It is said"
--- a/data/pokedex/entries/241.asm
+++ b/data/pokedex/entries/241.asm
@@ -1,7 +1,7 @@
; MiltankPokedexEntry: ; 0x1d1482
db "MILK COW@" ; species name
dw 311, 1660 ; height, width
-
+
db "In order to milk a"
next "MILTANK, one must"
next "have a knack for"
--- a/data/pokedex/entries/242.asm
+++ b/data/pokedex/entries/242.asm
@@ -1,7 +1,7 @@
; BlisseyPokedexEntry: ; 0x1d14f7
db "HAPPINESS@" ; species name
dw 411, 1030 ; height, width
-
+
db "Biting into one"
next "of the delicious"
next "eggs that BLISSEY"
--- a/data/pokedex/entries/243.asm
+++ b/data/pokedex/entries/243.asm
@@ -1,7 +1,7 @@
; RaikouPokedexEntry: ; 0x1d156b
db "THUNDER@" ; species name
dw 603, 3920 ; height, width
-
+
db "This rough #MON"
next "stores energy"
next "inside its body,"
--- a/data/pokedex/entries/244.asm
+++ b/data/pokedex/entries/244.asm
@@ -1,7 +1,7 @@
; EnteiPokedexEntry: ; 0x1d15dd
db "VOLCANO@" ; species name
dw 607, 4370 ; height, width
-
+
db "This brawny"
next "#MON courses"
next "around the earth,"
--- a/data/pokedex/entries/245.asm
+++ b/data/pokedex/entries/245.asm
@@ -1,7 +1,7 @@
; SuicunePokedexEntry: ; 0x1d1642
db "AURORA@" ; species name
dw 607, 4120 ; height, width
-
+
db "This divine"
next "#MON blows"
next "around the world,"
--- a/data/pokedex/entries/246.asm
+++ b/data/pokedex/entries/246.asm
@@ -1,7 +1,7 @@
; LarvitarPokedexEntry: ; 0x1d169c
db "ROCK SKIN@" ; species name
dw 200, 1590 ; height, width
-
+
db "Born deep under-"
next "ground, this"
next "#MON becomes a"
--- a/data/pokedex/entries/247.asm
+++ b/data/pokedex/entries/247.asm
@@ -1,7 +1,7 @@
; PupitarPokedexEntry: ; 0x1d1709
db "HARD SHELL@" ; species name
dw 311, 3350 ; height, width
-
+
db "It will not stay"
next "still, even while"
next "it's a pupa. It"
--- a/data/pokedex/entries/248.asm
+++ b/data/pokedex/entries/248.asm
@@ -1,7 +1,7 @@
; TyranitarPokedexEntry: ; 0x1d177b
db "ARMOR@" ; species name
dw 607, 4450 ; height, width
-
+
db "In just one of its"
next "mighty hands, it"
next "has the power to"
--- a/data/pokedex/entries/249.asm
+++ b/data/pokedex/entries/249.asm
@@ -1,7 +1,7 @@
; LugiaPokedexEntry: ; 0x1d17e9
db "DIVING@" ; species name
dw 1701, 4760 ; height, width
-
+
db "It has an incred-"
next "ible ability to"
next "calm raging sto-"
--- a/data/pokedex/entries/250.asm
+++ b/data/pokedex/entries/250.asm
@@ -1,7 +1,7 @@
; HoOhPokedexEntry: ; 0x1d185d
db "RAINBOW@" ; species name
dw 1206, 4390 ; height, width
-
+
db "It will reveal"
next "itself before a"
next "pure-hearted"
--- a/data/pokedex/entries/251.asm
+++ b/data/pokedex/entries/251.asm
@@ -1,7 +1,7 @@
; CelebiPokedexEntry: ; 0x1d18cc
db "TIMETRAVEL@" ; species name
dw 200, 110 ; height, width
-
+
db "Revered as a"
next "guardian of the"
next "forest, CELEBI"
--- a/data/sprite_engine.asm
+++ b/data/sprite_engine.asm
@@ -622,11 +622,11 @@
dbw $04, .OAMData_84 ; 8a
dbw $00, .OAMData_84 ; 8b
-.OAMData_02
+.OAMData_02:
db 1
dsprite -1, 4, -1, 4, $00, $00
-.OAMData_04
+.OAMData_04:
db 4
dsprite -1, 0, -1, 0, $00, $00
dsprite -1, 0, 0, 0, $01, $00
@@ -633,7 +633,7 @@
dsprite 0, 0, -1, 0, $10, $00
dsprite 0, 0, 0, 0, $11, $00
-.OAMData_23
+.OAMData_23:
db 4
dsprite -1, 0, -1, 0, $00, $00
dsprite -1, 0, 0, 0, $00, $20
@@ -640,7 +640,7 @@
dsprite 0, 0, -1, 0, $01, $00
dsprite 0, 0, 0, 0, $01, $20
-.OAMData_30
+.OAMData_30:
db 4
dsprite -1, 0, -1, 0, $00, $80
dsprite -1, 0, 0, 0, $00, $a0
@@ -647,7 +647,7 @@
dsprite 0, 0, -1, 0, $01, $80
dsprite 0, 0, 0, 0, $01, $a0
-.OAMData_18
+.OAMData_18:
db 4
dsprite -1, 0, -1, 0, $00, $00
dsprite -1, 0, 0, 0, $00, $20
@@ -654,7 +654,7 @@
dsprite 0, 0, -1, 0, $00, $40
dsprite 0, 0, 0, 0, $00, $60
-.OAMData_35
+.OAMData_35:
db 4
dsprite -1, 0, -1, 0, $00, $07
dsprite -1, 0, 0, 0, $00, $27
@@ -669,7 +669,7 @@
dsprite 0, 0, -1, 0, $00, $c0
dsprite 0, 0, 0, 0, $00, $e0
-.OAMData_19
+.OAMData_19:
db 16
dsprite -2, 0, -2, 0, $00, $00
dsprite -2, 0, -1, 0, $01, $00
@@ -688,7 +688,7 @@
dsprite 1, 0, 0, 0, $01, $60
dsprite 1, 0, 1, 0, $00, $60
-.OAMData_1a
+.OAMData_1a:
db 36
dsprite -3, 0, -3, 0, $00, $00
dsprite -3, 0, -2, 0, $01, $00
@@ -727,7 +727,7 @@
dsprite 2, 0, 1, 0, $01, $60
dsprite 2, 0, 2, 0, $00, $60
-.OAMData_43
+.OAMData_43:
db 9
dsprite -2, 4, -2, 4, $00, $00
dsprite -2, 4, -1, 4, $01, $00
@@ -739,7 +739,7 @@
dsprite 0, 4, -1, 4, $21, $00
dsprite 0, 4, 0, 4, $22, $00
-.OAMData_0e
+.OAMData_0e:
db 16
dsprite -2, 0, -2, 0, $00, $00
dsprite -2, 0, -1, 0, $01, $00
@@ -758,7 +758,7 @@
dsprite 1, 0, 0, 0, $32, $00
dsprite 1, 0, 1, 0, $33, $00
-.OAMData_1b
+.OAMData_1b:
db 25
dsprite -3, 4, -3, 4, $00, $00
dsprite -2, 4, -3, 4, $01, $00
@@ -826,7 +826,7 @@
dsprite 2, 0, 1, 0, $22, $00
dsprite 2, 0, 2, 0, $23, $00
-.OAMData_00
+.OAMData_00:
; party menu icons
db 4
dsprite -1, 0, -1, 0, $00, $00
@@ -834,7 +834,7 @@
dsprite 0, 0, -1, 0, $02, $00
dsprite 0, 0, 0, 0, $03, $00
-.OAMData_31
+.OAMData_31:
db 4
dsprite -1, 0, -1, 0, $00, $80
dsprite -1, 0, 0, 0, $01, $80
@@ -841,7 +841,7 @@
dsprite 0, 0, -1, 0, $02, $80
dsprite 0, 0, 0, 0, $03, $80
-.OAMData_3d
+.OAMData_3d:
; party menu icon with mail, frame 1
db 4
dsprite -1, 0, -1, 0, $00, $00
@@ -849,7 +849,7 @@
dsprite 0, 0, -1, 0, $08, $00
dsprite 0, 0, 0, 0, $03, $00
-.OAMData_3e
+.OAMData_3e:
; party menu icon with mail, frame 2
db 4
dsprite -1, 0, -1, 0, $04, $00
@@ -857,7 +857,7 @@
dsprite 0, 0, -1, 0, $08, $00
dsprite 0, 0, 0, 0, $07, $00
-.OAMData_3f
+.OAMData_3f:
; party menu icon with item, frame 1
db 4
dsprite -1, 0, -1, 0, $00, $00
@@ -865,7 +865,7 @@
dsprite 0, 0, -1, 0, $09, $00
dsprite 0, 0, 0, 0, $03, $00
-.OAMData_40
+.OAMData_40:
; party menu icon with item, frame 2
db 4
dsprite -1, 0, -1, 0, $04, $00
@@ -873,7 +873,7 @@
dsprite 0, 0, -1, 0, $09, $00
dsprite 0, 0, 0, 0, $07, $00
-.OAMData_06
+.OAMData_06:
db 6
dsprite -1, 0, -2, 4, $00, $01
dsprite -1, 0, -1, 4, $01, $01
@@ -882,7 +882,7 @@
dsprite 0, 0, -1, 4, $11, $01
dsprite 0, 0, 0, 4, $12, $01
-.OAMData_08
+.OAMData_08:
db 29
dsprite -3, 0, -3, 0, $00, $00
dsprite -3, 0, -2, 0, $01, $00
@@ -914,12 +914,12 @@
dsprite 2, 0, 1, 0, $54, $80
dsprite 2, 0, 2, 0, $55, $80
-.OAMData_0c
+.OAMData_0c:
db 2
dsprite -1, 0, -1, 4, $00, $00
dsprite 0, 0, -1, 4, $10, $00
-.OAMData_15
+.OAMData_15:
db 5
dsprite -2, 0, 3, 0, $00, $00
dsprite -2, 0, 4, 0, $01, $00
@@ -927,11 +927,11 @@
dsprite -1, 0, 3, 0, $03, $00
dsprite 0, 0, 2, 0, $04, $00
-.OAMData_4f
+.OAMData_4f:
db 1
dsprite -1, 4, -1, 4, $00, $06
-.OAMData_50
+.OAMData_50:
db 4
dsprite -1, 0, -1, 0, $00, $06
dsprite -1, 0, 0, 0, $01, $06
@@ -938,7 +938,7 @@
dsprite 0, 0, -1, 0, $02, $06
dsprite 0, 0, 0, 0, $03, $06
-.OAMData_20
+.OAMData_20:
db 4
dsprite -1, 7, -1, 7, $00, $00
dsprite -1, 7, 0, 0, $00, $20
@@ -945,7 +945,7 @@
dsprite 0, 0, -1, 7, $00, $40
dsprite 0, 0, 0, 0, $00, $60
-.OAMData_21
+.OAMData_21:
db 10
dsprite -1, 7, 0, 0, $00, $00
dsprite -1, 7, 1, 0, $01, $00
@@ -958,7 +958,7 @@
dsprite 0, 0, 3, 0, $01, $40
dsprite 0, 0, 4, 0, $00, $60
-.OAMData_22
+.OAMData_22:
db 15
dsprite -3, 4, -2, 4, $00, $11
dsprite -3, 4, -1, 4, $01, $11
@@ -976,7 +976,7 @@
dsprite 1, 4, -1, 4, $0d, $11
dsprite 1, 4, 0, 4, $0e, $11
-.OAMData_27
+.OAMData_27:
db 6
dsprite -2, 4, -2, 4, $00, $15
dsprite -2, 4, -1, 4, $02, $15
@@ -985,7 +985,7 @@
dsprite 0, 4, -1, 4, $06, $15
dsprite 0, 4, 0, 4, $04, $35
-.OAMData_29
+.OAMData_29:
db 6
dsprite -2, 4, -2, 4, $00, $16
dsprite -2, 4, -1, 4, $02, $16
@@ -994,7 +994,7 @@
dsprite 0, 4, -1, 4, $08, $16
dsprite 0, 4, 0, 4, $0a, $16
-.OAMData_2a
+.OAMData_2a:
db 6
dsprite -2, 4, -2, 4, $00, $16
dsprite -2, 4, -1, 4, $02, $16
@@ -1003,7 +1003,7 @@
dsprite 0, 4, -1, 4, $0e, $16
dsprite 0, 4, 0, 4, $10, $16
-.OAMData_2b
+.OAMData_2b:
db 6
dsprite -2, 4, -2, 4, $00, $16
dsprite -2, 4, -1, 4, $02, $16
@@ -1012,7 +1012,7 @@
dsprite 0, 4, -1, 4, $14, $16
dsprite 0, 4, 0, 4, $16, $16
-.OAMData_2c
+.OAMData_2c:
db 6
dsprite -2, 4, -2, 4, $00, $16
dsprite -2, 4, -1, 4, $02, $16
@@ -1021,7 +1021,7 @@
dsprite 0, 4, -1, 4, $1a, $16
dsprite 0, 4, 0, 4, $1c, $16
-.OAMData_2d
+.OAMData_2d:
db 6
dsprite -2, 4, -2, 4, $1e, $16
dsprite -2, 4, -1, 4, $20, $16
@@ -1030,13 +1030,13 @@
dsprite 0, 4, -1, 4, $26, $16
dsprite 0, 4, 0, 4, $28, $16
-.OAMData_3c
+.OAMData_3c:
db 3
dsprite -2, 4, -1, 4, $00, $10
dsprite -1, 4, -1, 4, $00, $10
dsprite 0, 4, -1, 4, $00, $10
-.OAMData_4b
+.OAMData_4b:
db 6
dsprite 0, 0, 0, 0, $00, $00
dsprite 0, 0, 1, 0, $01, $00
@@ -1045,7 +1045,7 @@
dsprite 0, 0, 4, 0, $02, $00
dsprite 0, 0, 5, 0, $03, $00
-.OAMData_4c
+.OAMData_4c:
db 4
dsprite 0, 0, 0, 0, $00, $00
dsprite 0, 0, 1, 0, $01, $00
@@ -1052,7 +1052,7 @@
dsprite 0, 0, 2, 0, $02, $00
dsprite 0, 0, 3, 0, $03, $00
-.OAMData_51
+.OAMData_51:
db 4
dsprite -1, 0, -2, 6, $00, $06
dsprite -1, 0, 0, 2, $01, $06
@@ -1059,7 +1059,7 @@
dsprite 0, 0, -2, 6, $02, $06
dsprite 0, 0, 0, 2, $03, $06
-.OAMData_52
+.OAMData_52:
db 4
dsprite -1, 0, -2, 4, $00, $06
dsprite -1, 0, 0, 4, $01, $06
@@ -1066,7 +1066,7 @@
dsprite 0, 0, -2, 4, $02, $06
dsprite 0, 0, 0, 4, $03, $06
-.OAMData_53
+.OAMData_53:
db 4
dsprite -1, 0, -2, 0, $00, $06
dsprite -1, 0, 1, 0, $01, $06
@@ -1073,7 +1073,7 @@
dsprite 0, 0, -2, 0, $02, $06
dsprite 0, 0, 1, 0, $03, $06
-.OAMData_56
+.OAMData_56:
db 19
dsprite -1, 0, -4, 0, $00, $00
dsprite -2, 0, -3, 0, $02, $00
@@ -1095,7 +1095,7 @@
dsprite -2, 0, 3, 0, $22, $00
dsprite 0, 0, 3, 0, $24, $00
-.OAMData_57
+.OAMData_57:
db 16
dsprite -1, 0, -4, 0, $00, $00
dsprite -2, 0, -3, 0, $02, $00
@@ -1114,7 +1114,7 @@
dsprite -2, 0, 3, 0, $22, $00
dsprite 0, 0, 3, 0, $24, $00
-.OAMData_58
+.OAMData_58:
db 15
dsprite -1, 0, -4, 0, $00, $00
dsprite -2, 0, -3, 0, $02, $00
@@ -1132,7 +1132,7 @@
dsprite -2, 0, 3, 0, $22, $00
dsprite 0, 0, 3, 0, $24, $00
-.OAMData_59
+.OAMData_59:
db 17
dsprite -1, 0, -4, 0, $00, $00
dsprite -2, 0, -3, 0, $02, $00
@@ -1152,7 +1152,7 @@
dsprite -2, 0, 3, 0, $22, $00
dsprite 0, 0, 3, 0, $24, $00
-.OAMData_5a
+.OAMData_5a:
db 17
dsprite -1, 0, -4, 0, $00, $00
dsprite -2, 0, -3, 0, $02, $00
@@ -1172,11 +1172,11 @@
dsprite -2, 0, 3, 0, $22, $00
dsprite 0, 0, 3, 0, $24, $00
-.OAMData_1e
+.OAMData_1e:
db 1
dsprite -1, 4, -1, 4, $00, $11
-.OAMData_5c
+.OAMData_5c:
db 12
dsprite 0, 0, 0, 0, $30, $00
dsprite 0, 0, 1, 0, $31, $00
@@ -1191,11 +1191,11 @@
dsprite 1, 0, 4, 0, $34, $00
dsprite 1, 0, 5, 0, $35, $00
-.OAMData_5d
+.OAMData_5d:
db 1
dsprite 0, 0, 0, 0, $ed, $00
-.OAMData_5e
+.OAMData_5e:
db 4
dsprite -1, 7, -1, 7, $30, $00
dsprite -1, 7, 0, 1, $32, $00
@@ -1202,7 +1202,7 @@
dsprite 0, 1, -1, 7, $33, $00
dsprite 0, 1, 0, 1, $35, $00
-.OAMData_5f
+.OAMData_5f:
db 8
dsprite -1, 7, -1, 7, $30, $00
dsprite -1, 7, 0, 4, $31, $00
@@ -1213,21 +1213,21 @@
dsprite 0, 1, 1, 4, $34, $00
dsprite 0, 1, 2, 1, $35, $00
-.OAMData_60
+.OAMData_60:
db 1
dsprite 0, 0, 0, 0, $34, $00
-.OAMData_61
+.OAMData_61:
db 2
dsprite 0, 0, 0, 0, $30, $00
dsprite 1, 0, 0, 0, $33, $00
-.OAMData_62
+.OAMData_62:
db 2
dsprite 0, 0, 0, 0, $32, $00
dsprite 1, 0, 0, 0, $35, $00
-.OAMData_63
+.OAMData_63:
db 4
dsprite -1, 0, -1, 0, $00, $01
dsprite -1, 0, 0, 0, $01, $01
@@ -1234,7 +1234,7 @@
dsprite 0, 0, -1, 0, $02, $01
dsprite 0, 0, 0, 0, $03, $01
-.OAMData_65
+.OAMData_65:
db 4
dsprite -1, 0, -1, 0, $00, $81
dsprite -1, 0, 0, 0, $01, $81
@@ -1241,11 +1241,11 @@
dsprite 0, 0, -1, 0, $02, $81
dsprite 0, 0, 0, 0, $03, $81
-.OAMData_67
+.OAMData_67:
db 1
dsprite -1, 4, -1, 4, $00, $02
-.OAMData_6c
+.OAMData_6c:
db 4
dsprite -2, 0, -1, 4, $00, $03
dsprite -1, 0, -1, 4, $01, $03
@@ -1252,7 +1252,7 @@
dsprite 0, 0, -1, 4, $02, $03
dsprite 1, 0, -1, 4, $03, $03
-.OAMData_6d
+.OAMData_6d:
db 4
dsprite -2, 0, -1, 4, $03, $44
dsprite -1, 0, -1, 4, $02, $44
@@ -1259,7 +1259,7 @@
dsprite 0, 0, -1, 4, $01, $44
dsprite 1, 0, -1, 4, $00, $44
-.OAMData_69
+.OAMData_69:
db 4
dsprite -1, 0, -1, 0, $00, $01
dsprite -1, 0, 0, 0, $00, $21
@@ -1266,7 +1266,7 @@
dsprite 0, 0, -1, 0, $00, $41
dsprite 0, 0, 0, 0, $00, $61
-.OAMData_6a
+.OAMData_6a:
db 8
dsprite -2, 4, -2, 4, $00, $01
dsprite -2, 4, -1, 4, $01, $01
@@ -1277,7 +1277,7 @@
dsprite 0, 4, -1, 4, $01, $41
dsprite 0, 4, 0, 4, $00, $61
-.OAMData_6b
+.OAMData_6b:
db 12
dsprite -2, 0, -2, 0, $00, $01
dsprite -2, 0, -1, 0, $01, $01
@@ -1292,7 +1292,7 @@
dsprite 1, 0, 0, 0, $01, $61
dsprite 1, 0, 1, 0, $00, $61
-.OAMData_6e
+.OAMData_6e:
db 36
dsprite -3, 0, 1, 0, $05, $00
dsprite -3, 0, 2, 0, $06, $00
@@ -1331,7 +1331,7 @@
dsprite 2, 0, -3, 0, $51, $00
dsprite 2, 0, 3, 0, $57, $00
-.OAMData_6f
+.OAMData_6f:
db 28
dsprite -3, 0, 0, 0, $04, $00
dsprite -3, 0, 1, 0, $05, $00
@@ -1362,7 +1362,7 @@
dsprite 2, 0, 0, 0, $54, $00
dsprite 2, 0, 1, 0, $55, $00
-.OAMData_70
+.OAMData_70:
db 30
dsprite -3, 0, 0, 0, $04, $00
dsprite -3, 0, 1, 0, $05, $00
@@ -1395,7 +1395,7 @@
dsprite 2, 0, 0, 0, $54, $00
dsprite 2, 0, 1, 0, $55, $00
-.OAMData_71
+.OAMData_71:
db 31
dsprite -2, 0, -3, 0, $11, $00
dsprite -2, 0, -2, 0, $12, $00
@@ -1429,7 +1429,7 @@
dsprite 2, 0, 0, 0, $54, $00
dsprite 2, 0, 1, 0, $55, $00
-.OAMData_72
+.OAMData_72:
db 25
dsprite -3, 4, -3, 4, $00, $09
dsprite -3, 4, -2, 4, $01, $09
@@ -1457,7 +1457,7 @@
dsprite 1, 4, 0, 4, $43, $09
dsprite 1, 4, 1, 4, $44, $09
-.OAMData_75
+.OAMData_75:
db 16
dsprite -2, 0, -3, 4, $00, $0a
dsprite -2, 0, -2, 4, $01, $0a
@@ -1476,17 +1476,17 @@
dsprite 1, 0, -1, 4, $0e, $0a
dsprite 1, 0, 0, 4, $0f, $0a
-.OAMData_76
+.OAMData_76:
db 1
dsprite -1, 4, -1, 4, $00, $00
-.OAMData_77
+.OAMData_77:
db 3
dsprite 0, 0, -1, 0, $00, $00
dsprite -1, 0, -1, 0, $01, $00
dsprite -1, 0, 0, 0, $02, $00
-.OAMData_78
+.OAMData_78:
db 7
dsprite 1, 0, -2, 0, $00, $00
dsprite 0, 0, -2, 0, $01, $00
@@ -1496,7 +1496,7 @@
dsprite -2, 0, 0, 0, $05, $00
dsprite -2, 0, 1, 0, $06, $00
-.OAMData_7a
+.OAMData_7a:
db 8
dsprite -1, 0, -2, 0, $00, $00
dsprite -1, 0, -1, 0, $01, $00
@@ -1507,7 +1507,7 @@
dsprite 0, 0, 0, 0, $01, $60
dsprite 0, 0, 1, 0, $00, $60
-.OAMData_7b
+.OAMData_7b:
db 12
dsprite -3, 0, -1, 0, $00, $00
dsprite -2, 0, -1, 0, $01, $00
@@ -1522,7 +1522,7 @@
dsprite 1, 0, 0, 0, $01, $60
dsprite 2, 0, 0, 0, $00, $60
-.OAMData_7c
+.OAMData_7c:
db 20
dsprite -3, 4, -2, 0, $00, $00
dsprite -3, 4, -1, 0, $01, $00
@@ -1545,7 +1545,7 @@
dsprite 1, 4, 0, 0, $12, $00
dsprite 1, 4, 1, 0, $13, $00
-.OAMData_7e
+.OAMData_7e:
db 20
dsprite 0, 0, 1, 0, $00, $81
dsprite 1, 0, 2, 0, $00, $81
@@ -1568,7 +1568,7 @@
dsprite 2, 0, -13, 0, $00, $81
dsprite 3, 0, -12, 0, $00, $81
-.OAMData_7f
+.OAMData_7f:
db 4
dsprite -1, 0, -1, 0, $00, $02
dsprite -1, 0, 0, 0, $01, $02
@@ -1575,7 +1575,7 @@
dsprite 0, 0, -1, 0, $02, $02
dsprite 0, 0, 0, 0, $03, $02
-.OAMData_81
+.OAMData_81:
db 9
dsprite -2, 0, -2, 4, $00, $01
dsprite -2, 0, -1, 4, $01, $01
@@ -1587,7 +1587,7 @@
dsprite 0, 0, -1, 4, $21, $01
dsprite 0, 0, 0, 4, $22, $01
-.OAMData_84
+.OAMData_84:
db 24
dsprite -5, 0, -2, 4, $00, $01
dsprite -5, 0, -1, 4, $01, $01
--- a/data/wild/swarm_water.asm
+++ b/data/wild/swarm_water.asm
@@ -1,5 +1,5 @@
; swarms in water
; No swarms encountered while surfing in Crystal
-
+
db -1 ; end
--- a/engine/anim_hp_bar.asm
+++ b/engine/anim_hp_bar.asm
@@ -1,30 +1,30 @@
_AnimateHPBar: ; d627
- call Functiond65f
- jr c, .do_player
- call Functiond670
-.enemy_loop
+ call .IsMaximumMoreThan48Pixels
+ jr c, .MoreThan48Pixels
+ call .ComputePixels
+.ShortAnimLoop:
push bc
push hl
- call Functiond6e2
+ call ShortAnim_UpdateVariables
pop hl
pop bc
push af
push bc
push hl
- call Functiond730
- call Functiond7c9
+ call ShortHPBarAnim_UpdateTiles
+ call HPBarAnim_BGMapUpdate
pop hl
pop bc
pop af
- jr nc, .enemy_loop
+ jr nc, .ShortAnimLoop
ret
-.do_player
- call Functiond670
-.player_loop
+.MoreThan48Pixels:
+ call .ComputePixels
+.LongAnimLoop:
push bc
push hl
- call Functiond6f5
+ call LongAnim_UpdateVariables
pop hl
pop bc
ret c
@@ -31,16 +31,16 @@
push af
push bc
push hl
- call Functiond749
- call Functiond7c9
+ call LongHPBarAnim_UpdateTiles
+ call HPBarAnim_BGMapUpdate
pop hl
pop bc
pop af
- jr nc, .player_loop
+ jr nc, .LongAnimLoop
ret
; d65f
-Functiond65f: ; d65f
+.IsMaximumMoreThan48Pixels: ; d65f
ld a, [Buffer2]
and a
jr nz, .player
@@ -55,7 +55,7 @@
ret
; d670
-Functiond670: ; d670
+.ComputePixels: ; d670
; Buffer1-2: Max HP
; Buffer3-4: Old HP
; Buffer5-6: New HP
@@ -72,7 +72,7 @@
pop hl
call ComputeHPBarPixels
ld a, e
- ld [wd1f1], a
+ ld [wCurHPBarPixels], a
ld a, [Buffer5]
ld c, a
@@ -84,7 +84,7 @@
ld d, a
call ComputeHPBarPixels
ld a, e
- ld [wd1f2], a
+ ld [wNewHPBarPixels], a
push hl
ld hl, Buffer3
@@ -103,15 +103,15 @@
ld a, d
sbc b
ld d, a
- jr c, .asm_d6c1
+ jr c, .negative
ld a, [Buffer3]
ld [wd1f5], a
ld a, [Buffer5]
ld [wd1f6], a
ld bc, 1
- jr .asm_d6d9
+ jr .got_direction
-.asm_d6c1
+.negative
ld a, [Buffer3]
ld [wd1f6], a
ld a, [Buffer5]
@@ -123,8 +123,8 @@
ld a, d
xor $ff
ld d, a
- ld bc, rIE
-.asm_d6d9
+ ld bc, -1
+.got_direction
ld a, d
ld [wd1f3], a
ld a, e
@@ -132,25 +132,25 @@
ret
; d6e2
-Functiond6e2: ; d6e2
- ld hl, wd1f1
- ld a, [wd1f2]
+ShortAnim_UpdateVariables: ; d6e2
+ ld hl, wCurHPBarPixels
+ ld a, [wNewHPBarPixels]
cp [hl]
- jr nz, .asm_d6ed
+ jr nz, .not_finished
scf
ret
-.asm_d6ed
+.not_finished
ld a, c
add [hl]
ld [hl], a
- call Functiond839
+ call ShortHPBar_CalcPixelFrame
and a
ret
; d6f5
-Functiond6f5: ; d6f5
-.asm_d6f5
+LongAnim_UpdateVariables: ; d6f5
+.loop
ld hl, Buffer3
ld a, [hli]
ld e, a
@@ -158,15 +158,15 @@
ld d, a
ld a, e
cp [hl]
- jr nz, .asm_d707
+ jr nz, .next
inc hl
ld a, d
cp [hl]
- jr nz, .asm_d707
+ jr nz, .next
scf
ret
-.asm_d707
+.next
ld l, e
ld h, d
add hl, bc
@@ -173,7 +173,7 @@
ld a, l
ld [Buffer3], a
ld a, h
- ld [wd1ed], a
+ ld [Buffer4], a
push hl
push de
push bc
@@ -186,40 +186,45 @@
ld c, a
ld a, [hli]
ld b, a
+ ; This routine is buggy. The result from ComputeHPBarPixels is stored
+ ; in e. However, the pop de opcode deletes this result before it is even
+ ; used. The game then proceeds as though it never deleted that output.
+ ; To fix, uncomment the line below.
call ComputeHPBarPixels
+ ; ld a, e
pop bc
pop de
pop hl
- ld a, e
- ld hl, wd1f1
+ ld a, e ; Comment or delete this line to fix the above bug.
+ ld hl, wCurHPBarPixels
cp [hl]
- jr z, .asm_d6f5
+ jr z, .loop
ld [hl], a
and a
ret
; d730
-Functiond730: ; d730
- call Functiond784
+ShortHPBarAnim_UpdateTiles: ; d730
+ call HPBarAnim_UpdateHPRemaining
ld d, $6
ld a, [wWhichHPBar]
and $1
ld b, a
- ld a, [wd1f1]
+ ld a, [wCurHPBarPixels]
ld e, a
ld c, a
push de
- call Functiond771
+ call HPBarAnim_RedrawHPBar
pop de
- call Functiond7b4
+ call HPBarAnim_PaletteUpdate
ret
; d749
-Functiond749: ; d749
- call Functiond784
+LongHPBarAnim_UpdateTiles: ; d749
+ call HPBarAnim_UpdateHPRemaining
ld a, [Buffer3]
ld c, a
- ld a, [wd1ed]
+ ld a, [Buffer4]
ld b, a
ld a, [Buffer1]
ld e, a
@@ -232,20 +237,20 @@
and $1
ld b, a
push de
- call Functiond771
+ call HPBarAnim_RedrawHPBar
pop de
- call Functiond7b4
+ call HPBarAnim_PaletteUpdate
ret
; d771
-Functiond771: ; d771
+HPBarAnim_RedrawHPBar: ; d771
ld a, [wWhichHPBar]
cp $2
jr nz, .skip
- ld a, $28
+ ld a, 2 * SCREEN_WIDTH
add l
ld l, a
- ld a, $0
+ ld a, 0
adc h
ld h, a
.skip
@@ -253,17 +258,17 @@
ret
; d784
-Functiond784: ; d784
+HPBarAnim_UpdateHPRemaining: ; d784
ld a, [wWhichHPBar]
and a
ret z
cp $1
jr z, .load_15
- ld de, $16
+ ld de, SCREEN_WIDTH + 2
jr .loaded_de
.load_15
- ld de, $15
+ ld de, SCREEN_WIDTH + 1
.loaded_de
push hl
add hl, de
@@ -275,7 +280,7 @@
dec hl
ld a, [Buffer3]
ld [StringBuffer2 + 1], a
- ld a, [wd1ed]
+ ld a, [Buffer4]
ld [StringBuffer2], a
ld de, StringBuffer2
lb bc, 2, 3
@@ -284,7 +289,7 @@
ret
; d7b4
-Functiond7b4: ; d7b4
+HPBarAnim_PaletteUpdate: ; d7b4
ld a, [hCGB]
and a
ret z
@@ -296,7 +301,7 @@
ret
; d7c9
-Functiond7c9: ; d7c9
+HPBarAnim_BGMapUpdate: ; d7c9
ld a, [hCGB]
and a
jr nz, .cgb
@@ -312,13 +317,13 @@
jr z, .load_1
ld a, [CurPartyMon]
cp $3
- jr nc, .c_is_1
+ jr nc, .bottom_half_of_screen
ld c, $0
- jr .c_is_0
+ jr .got_third
-.c_is_1
+.bottom_half_of_screen
ld c, $1
-.c_is_0
+.got_third
push af
cp $2
jr z, .skip_delay
@@ -370,14 +375,14 @@
ret
; d839
-Functiond839: ; d839
+ShortHPBar_CalcPixelFrame: ; d839
ld a, [Buffer1]
ld c, a
ld b, 0
ld hl, 0
- ld a, [wd1f1]
+ ld a, [wCurHPBarPixels]
cp 6 * 8
- jr nc, .coppy_buffer
+ jr nc, .return_max
and a
jr z, .return_zero
call AddNTimes
@@ -423,7 +428,7 @@
ld [Buffer3], a
ret
-.coppy_buffer
+.return_max
ld a, [Buffer1]
ld [Buffer3], a
ret
--- a/engine/battle_start.asm
+++ b/engine/battle_start.asm
@@ -1,5 +1,5 @@
Predef_StartBattle: ; 8c20f
- call Function8c26d
+ call .InitGFX
ld a, [rBGP]
ld [wBGP], a
ld a, [rOBP0]
@@ -52,7 +52,7 @@
ret
; 8c26d
-Function8c26d: ; 8c26d
+.InitGFX: ; 8c26d
ld a, [wLinkMode]
cp LINK_MOBILE
jr z, .mobile
@@ -59,8 +59,8 @@
callba Function6454
call UpdateSprites
call DelayFrame
- call Function8c2a0
- call Function8cf4f
+ call .NonMobile_LoadPokeballTiles
+ call BattleStart_LoadEDTile
jr .resume
.mobile
@@ -81,7 +81,7 @@
ret
; 8c2a0
-Function8c2a0: ; 8c2a0
+.NonMobile_LoadPokeballTiles: ; 8c2a0
call LoadTrainerBattlePokeballTiles
hlbgcoord 0, 0
call Function8c2cf
@@ -148,7 +148,7 @@
jumptable .dw, wJumptableIndex
; 8c323
-.dw: ; 8c323 (23:4323)
+.dw ; 8c323 (23:4323)
dw StartTrainerBattle_DetermineWhichAnimation ; 00
; Animation 1: cave
@@ -279,7 +279,7 @@
ret
; 8c3db (23:43db)
-.pals: ; 8c3db
+.pals ; 8c3db
db %11111001 ; 3321
db %11111110 ; 3332
db %11111111 ; 3333
@@ -411,7 +411,7 @@
ret
; 8c490 (23:4490)
-.spintable: ; 8c490
+.spintable ; 8c490
spintable_entry UPPER_LEFT, 1, 1, 6
spintable_entry UPPER_LEFT, 2, 0, 3
spintable_entry UPPER_LEFT, 3, 1, 0
@@ -435,7 +435,7 @@
db -1
; 8c4f5
-.load: ; 8c4f5 (23:44f5)
+.load ; 8c4f5 (23:44f5)
ld a, [hli]
ld e, a
ld a, [hli]
@@ -489,11 +489,11 @@
jr .loop
; 8c538 (23:4538)
-.wedge1: db 2, 3, 5, 4, 9, -1
-.wedge2: db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1
-.wedge3: db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1
-.wedge4: db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1
-.wedge5: db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
+.wedge1 db 2, 3, 5, 4, 9, -1
+.wedge2 db 1, 1, 2, 2, 4, 2, 4, 2, 3, -1
+.wedge3 db 2, 1, 3, 1, 4, 1, 4, 1, 4, 1, 3, 1, 2, 1, 1, 1, 1, -1
+.wedge4 db 4, 1, 4, 0, 3, 1, 3, 0, 2, 1, 2, 0, 1, -1
+.wedge5 db 4, 0, 3, 0, 3, 0, 2, 0, 2, 0, 1, 0, 1, 0, 1, -1
; 8c578
StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578)
@@ -663,13 +663,13 @@
ld a, $1
ld [hCGBPalUpdate], a
call DelayFrame
- call Function8cf4f
+ call BattleStart_LoadEDTile
-.nextscene: ; 8c673 (23:4673)
+.nextscene ; 8c673 (23:4673)
call StartTrainerBattle_NextScene
ret
-.copypals: ; 8c677 (23:4677)
+.copypals ; 8c677 (23:4677)
ld de, UnknBGPals + 7 palettes
call .copy
ld de, BGPals + 7 palettes
@@ -682,7 +682,7 @@
call .copy
ld de, OBPals + 7 palettes
-.copy: ; 8c698 (23:4698)
+.copy ; 8c698 (23:4698)
push hl
ld bc, 1 palettes
call CopyBytes
@@ -690,7 +690,7 @@
ret
; 8c6a1 (23:46a1)
-.daypals: ; 8c6a1
+.daypals ; 8c6a1
RGB 31, 18, 29
RGB 31, 11, 15
RGB 31, 05, 05
@@ -697,13 +697,13 @@
RGB 07, 07, 07
; 8c6a9
-.nightpals: ; 8c6a9
+.nightpals ; 8c6a9
RGB 31, 18, 29
RGB 31, 05, 05
RGB 31, 05, 05
RGB 31, 05, 05
-.loadpokeballgfx:
+.loadpokeballgfx
ld a, [OtherTrainerClass]
ld de, PokeBallTransition
ret
@@ -742,7 +742,7 @@
ret
; 8c6ef
-.wipe: ; 8c6ef
+.wipe ; 8c6ef
xor a
ld c, SCREEN_HEIGHT_PX
.loop
@@ -792,7 +792,7 @@
ret
; 8c728 (23:4728)
-.sinewave: ; 8c728
+.sinewave ; 8c728
sine_wave $100
; 8c768
@@ -833,7 +833,7 @@
ret
; 8c792 (23:4792)
-.boxes: ; 8c792
+.boxes ; 8c792
zoombox 4, 2, 8, 8
zoombox 6, 4, 7, 7
zoombox 8, 6, 6, 6
--- a/engine/billspc.asm
+++ b/engine/billspc.asm
@@ -42,7 +42,7 @@
jp [hl]
.Jumptable: ; e23df (38:63df)
-
+
dw .Init
dw .HandleJoypad
dw .WhatsUp
@@ -151,7 +151,7 @@
jp [hl]
BillsPCDepositJumptable: ; e24a1 (38:64a1)
-
+
dw BillsPCDepositFuncDeposit ; Deposit Pokemon
dw BillsPCDepositFuncStats ; Pokemon Stats
dw BillsPCDepositFuncRelease ; Release Pokemon
@@ -310,7 +310,7 @@
jp [hl]
.Jumptable: ; e25d2 (38:65d2)
-
+
dw .Init
dw .Joypad
dw .PrepSubmenu
@@ -419,7 +419,7 @@
ld l, a
jp [hl]
-.dw: ; e2699 (38:6699) #mark
+.dw ; e2699 (38:6699) #mark
dw .withdraw ; Withdraw
dw .stats ; Stats
dw .release ; Release
@@ -426,7 +426,7 @@
dw .cancel ; Cancel
-.withdraw: ; e26a1 (38:66a1)
+.withdraw ; e26a1 (38:66a1)
call BillsPC_CheckMail_PreventBlackout
jp c, .cancel
call TryWithdrawPokemon
@@ -437,12 +437,12 @@
ld [wBillsPC_CursorPosition], a
ld [wBillsPC_ScrollPosition], a
ret
-.FailedWithdraw
+.FailedWithdraw:
ld de, PCString_WhatsUp
call BillsPC_PlaceString
ret
-.stats: ; e26c0 (38:66c0)
+.stats ; e26c0 (38:66c0)
call LoadStandardMenuDataHeader
call BillsPC_StatsScreen
call ExitMenu
@@ -453,7 +453,7 @@
call BillsPC_ApplyPalettes
ret
-.release: ; e26d8 (38:66d8)
+.release ; e26d8 (38:66d8)
ld a, [wMenuCursorY]
push af
call BillsPC_IsMonAnEgg
@@ -483,7 +483,7 @@
ld [wBillsPC_ScrollPosition], a
pop af
ret
-.FailedRelease
+.FailedRelease:
ld de, PCString_WhatsUp
call BillsPC_PlaceString
pop af
@@ -490,7 +490,7 @@
ld [wMenuCursorY], a
ret
-.cancel: ; e272b (38:672b)
+.cancel ; e272b (38:672b)
ld a, $0
ld [wJumptableIndex], a
ret
@@ -562,7 +562,7 @@
; e27ac
.Jumptable: ; e27ac
-
+
dw .Init
dw .Joypad
dw .PrepSubmenu
@@ -1664,21 +1664,21 @@
ld a, [wBillsPC_MonHasMail]
and a
jr nz, .HasMail
-.Okay
+.Okay:
and a
ret
-.HasMail
+.HasMail:
ld de, PCString_RemoveMail
jr .NotOkay
-.AllOthersFainted
+.AllOthersFainted:
ld de, PCString_NoMoreUsablePKMN
jr .NotOkay
-.ItsYourLastPokemon
+.ItsYourLastPokemon:
ld de, PCString_ItsYourLastPKMN
-.NotOkay
+.NotOkay:
call BillsPC_PlaceString
ld de, SFX_WRONG
call WaitPlaySFX
@@ -1918,7 +1918,7 @@
and a
ret
-.PartyFull
+.PartyFull:
ld de, PCString_PartyFull
call BillsPC_PlaceString
ld de, SFX_WRONG
@@ -2021,7 +2021,7 @@
jp [hl]
; e322a
-.dw_return: ; e322a
+.dw_return ; e322a
pop af
ld e, a
callba Function14ad5
@@ -2033,7 +2033,7 @@
; e3245
.Jumptable: ; e3245
-
+
dw .BoxToBox
dw .PartyToBox
dw .BoxToParty
@@ -2226,7 +2226,7 @@
ret
; e33a6 (38:73a6)
-.boxes: ; e33a6
+.boxes ; e33a6
; bank, address
dba sBox1
dba sBox2
@@ -2352,7 +2352,7 @@
db 1 ; default option
; 0xe35f9
-.menudata2: ; 0xe35f9
+.menudata2 ; 0xe35f9
db $22 ; flags
db 4, 0
db 1
@@ -2362,7 +2362,7 @@
dba BillsPC_PrintBoxCountAndCapacity
; e3609
-.boxes: ; e3609
+.boxes ; e3609
db NUM_BOXES
x = 1
rept NUM_BOXES
@@ -2372,7 +2372,7 @@
db -1
; e3619
-.boxnames: ; e3619
+.boxnames ; e3619
push de
ld a, [MenuSelection]
dec a
@@ -2416,7 +2416,7 @@
db "#MON@"
; e3668
-.out_of_20: ; e3668
+.out_of_20 ; e3668
; db "/20@"
db "/"
db "0" + MONS_PER_BOX / 10 ; "2"
@@ -2466,7 +2466,7 @@
ret
; e36a5 (38:76a5)
-.boxbanks: ; e36a5
+.boxbanks ; e36a5
dba sBox1
dba sBox2
dba sBox3
@@ -2519,7 +2519,7 @@
and a
ret
+.Print:
call GetBoxCount
and a
jr z, .EmptyBox
@@ -2533,12 +2533,12 @@
and a
ret
-.EmptyBox
+.EmptyBox:
call BillsPC_PlaceEmptyBoxString_SFX
and a
ret
-.Switch
+.Switch:
ld a, [MenuSelection]
dec a
ld e, a
@@ -2548,7 +2548,7 @@
callba ChangeBoxSaveGame
ret
-.Name
+.Name:
ld b, $4 ; box
ld de, wd002
callba NamingScreen
--- /dev/null
+++ b/engine/billspctop.asm
@@ -1,0 +1,388 @@
+_BillsPC: ; e3fd
+ call .CheckCanUsePC
+ ret c
+ call .LogIn
+ call .UseBillsPC
+ jp .LogOut
+
+.CheckCanUsePC: ; e40a (3:640a)
+ ld a, [PartyCount]
+ and a
+ ret nz
+ ld hl, .Text_GottaHavePokemon
+ call MenuTextBoxBackup
+ scf
+ ret
+
+.Text_GottaHavePokemon: ; 0xe417
+ ; You gotta have #MON to call!
+ text_jump UnknownText_0x1c1006
+ db "@"
+
+.LogIn: ; e41c (3:641c)
+ xor a
+ ld [hBGMapMode], a
+ call LoadStandardMenuDataHeader
+ call ClearPCItemScreen
+ ld hl, Options
+ ld a, [hl]
+ push af
+ set NO_TEXT_SCROLL, [hl]
+ ld hl, .Text_What
+ call PrintText
+ pop af
+ ld [Options], a
+ call LoadFontsBattleExtra
+ ret
+
+.Text_What: ; 0xe43a
+ ; What?
+ text_jump UnknownText_0x1c1024
+ db "@"
+
+.LogOut: ; e43f (3:643f)
+ call CloseSubmenu
+ ret
+
+.UseBillsPC: ; e443 (3:6443)
+ ld hl, .MenuDataHeader
+ call LoadMenuDataHeader
+ ld a, $1
+.loop
+ ld [wMenuCursorBuffer], a
+ call SetPalettes
+ xor a
+ ld [wWhichIndexSet], a
+ ld [hBGMapMode], a
+ call DoNthMenu
+ jr c, .cancel
+ ld a, [wMenuCursorBuffer]
+ push af
+ ld a, [MenuSelection]
+ ld hl, .Jumptable
+ rst JumpTable
+ pop bc
+ ld a, b
+ jr nc, .loop
+.cancel
+ call CloseWindow
+ ret
+
+.MenuDataHeader: ; 0xe46f
+ db $40 ; flags
+ db 00, 00 ; start coords
+ db 17, 19 ; end coords
+ dw .MenuData2
+ db 1 ; default option
+
+.MenuData2: ; 0xe477
+ db $80 ; flags
+ db 0 ; items
+ dw .items
+ dw PlaceMenuStrings
+ dw .strings
+
+.strings ; e47f
+ db "WITHDRAW <PK><MN>@"
+ db "DEPOSIT <PK><MN>@"
+ db "CHANGE BOX@"
+ db "MOVE <PK><MN> W/O MAIL@"
+ db "SEE YA!@"
+
+.Jumptable: ; e4ba (3:64ba)
+ dw BillsPC_WithdrawMenu
+ dw BillsPC_DepositMenu
+ dw BillsPC_ChangeBoxMenu
+ dw BillsPC_MovePKMNMenu
+ dw BillsPC_SeeYa
+
+.items ; e4c4
+ db 5
+ db 0 ; WITHDRAW
+ db 1; DEPOSIT
+ db 2 ; CHANGE BOX
+ db 3 ; MOVE PKMN
+ db 4 ; SEE YA!
+ db -1
+
+BillsPC_SeeYa: ; e4cb
+ scf
+ ret
+
+BillsPC_MovePKMNMenu: ; e4cd
+ call LoadStandardMenuDataHeader
+ callba IsAnyMonHoldingMail
+ jr nc, .no_mail
+ ld hl, .Text_MonHoldingMail
+ call PrintText
+ jr .quit
+
+.no_mail
+ callba StartMovePkmnWOMail_SaveGame
+ jr c, .quit
+ callba _MovePKMNWithoutMail
+ call ReturnToMapFromSubmenu
+ call ClearPCItemScreen
+
+.quit
+ call CloseWindow
+ and a
+ ret
+
+.Text_MonHoldingMail: ; 0xe4f9
+ ; There is a #MON holding MAIL. Please remove the MAIL.
+ text_jump UnknownText_0x1c102b
+ db "@"
+
+BillsPC_DepositMenu: ; e4fe (3:64fe)
+ call LoadStandardMenuDataHeader
+ callba _DepositPKMN
+ call ReturnToMapFromSubmenu
+ call ClearPCItemScreen
+ call CloseWindow
+ and a
+ ret
+
+Functione512: ; unused
+ ld a, [PartyCount]
+ and a
+ jr z, .no_pkmn
+ cp 2
+ jr c, .only_one_pkmn
+ and a
+ ret
+
+.no_pkmn
+ ld hl, .Text_NoPKMN
+ call MenuTextBoxBackup
+ scf
+ ret
+
+.only_one_pkmn
+ ld hl, .Text_ItsYourLastPKMN
+ call MenuTextBoxBackup
+ scf
+ ret
+
+.Text_NoPKMN: ; 0xe52e
+ ; You don't have a single #MON!
+ text_jump UnknownText_0x1c1062
+ db "@"
+
+.Text_ItsYourLastPKMN: ; 0xe533
+ ; You can't deposit your last #MON!
+ text_jump UnknownText_0x1c1080
+ db "@"
+
+CheckCurPartyMonFainted: ; e538
+ ld hl, PartyMon1HP
+ ld de, PARTYMON_STRUCT_LENGTH
+ ld b, $0
+.loop
+ ld a, [CurPartyMon]
+ cp b
+ jr z, .skip
+ ld a, [hli]
+ or [hl]
+ jr nz, .notfainted
+ dec hl
+
+.skip
+ inc b
+ ld a, [PartyCount]
+ cp b
+ jr z, .done
+ add hl, de
+ jr .loop
+
+.done
+ scf
+ ret
+
+.notfainted
+ and a
+ ret
+
+BillsPC_WithdrawMenu: ; e559 (3:6559)
+ call LoadStandardMenuDataHeader
+ callba _WithdrawPKMN
+ call ReturnToMapFromSubmenu
+ call ClearPCItemScreen
+ call CloseWindow
+ and a
+ ret
+
+Functione56d: ; unused
+ ld a, [PartyCount]
+ cp PARTY_LENGTH
+ jr nc, .asm_e576
+ and a
+ ret
+
+.asm_e576
+ ld hl, UnknownText_0xe57e
+ call MenuTextBoxBackup
+ scf
+ ret
+
+UnknownText_0xe57e: ; 0xe57e
+ ; You can't take any more #MON.
+ text_jump UnknownText_0x1c10a2
+ db "@"
+
+BillsPC_ChangeBoxMenu: ; e583 (3:6583)
+ callba _ChangeBox
+ and a
+ ret
+
+ClearPCItemScreen: ; e58b
+ call DisableSpriteUpdates
+ xor a
+ ld [hBGMapMode], a
+ call ClearBGPalettes
+ call ClearSprites
+ hlcoord 0, 0
+ ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
+ ld a, " "
+ call ByteFill
+ hlcoord 0,0
+ lb bc, 10, 18
+ call TextBox
+ hlcoord 0,12
+ lb bc, 4, 18
+ call TextBox
+ call WaitBGMap2
+ call SetPalettes ; load regular palettes?
+ ret
+
+CopyBoxmonToTempMon: ; e5bb
+ ld a, [CurPartyMon]
+ ld hl, sBoxMon1Species
+ ld bc, BOXMON_STRUCT_LENGTH
+ call AddNTimes
+ ld de, TempMonSpecies
+ ld bc, BOXMON_STRUCT_LENGTH
+ ld a, BANK(sBoxMon1Species)
+ call GetSRAMBank
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+Functione5d9: ; unreferenced
+ ld a, [wCurBox]
+ cp b
+ jr z, .same_box
+ ld a, b
+ ld hl, .BoxAddrs
+ ld bc, 3
+ call AddNTimes
+ ld a, [hli]
+ push af
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ pop af
+ jr .okay
+
+.same_box
+ ld a, BANK(sBoxCount)
+ ld hl, sBoxCount
+
+.okay
+ call GetSRAMBank
+ ld a, [hl]
+ ld bc, 1 + MONS_PER_BOX + 1
+ add hl, bc
+ ld b, a
+ ld c, $0
+ ld de, wc608
+ ld a, b
+ and a
+ jr z, .empty_box
+.loop
+ push hl
+ push bc
+ ld a, c
+ ld bc, 0
+ add hl, bc
+ ld bc, BOXMON_STRUCT_LENGTH
+ call AddNTimes
+ ld a, [hl]
+ ld [de], a
+ inc de
+ ld [CurSpecies], a
+ call GetBaseData
+ pop bc
+ pop hl
+
+ push hl
+ push bc
+ ld a, c
+ ld bc, MONS_PER_BOX * (BOXMON_STRUCT_LENGTH + NAME_LENGTH)
+ add hl, bc
+ call SkipNames
+ call CopyBytes
+ pop bc
+ pop hl
+
+ push hl
+ push bc
+ ld a, c
+ ld bc, MON_LEVEL
+ add hl, bc
+ ld bc, BOXMON_STRUCT_LENGTH
+ call AddNTimes
+ ld a, [hl]
+ ld [de], a
+ inc de
+ pop bc
+ pop hl
+
+ push hl
+ push bc
+ ld a, c
+ ld bc, MON_DVS
+ add hl, bc
+ ld bc, BOXMON_STRUCT_LENGTH
+ call AddNTimes
+ ld a, [hli]
+ and $f0
+ ld b, a
+ ld a, [hl]
+ and $f0
+ swap a
+ or b
+ ld b, a
+ ld a, [BaseGender]
+ cp b
+ ld a, $1
+ jr c, .okay2
+ xor a
+.okay2
+ ld [de], a
+ inc de
+ pop bc
+ pop hl
+
+ inc c
+ dec b
+ jr nz, .loop
+.empty_box
+ call CloseSRAM
+ ret
+
+.BoxAddrs: ; e66e
+ dba sBox1
+ dba sBox2
+ dba sBox3
+ dba sBox4
+ dba sBox5
+ dba sBox6
+ dba sBox7
+ dba sBox8
+ dba sBox9
+ dba sBox10
+ dba sBox11
+ dba sBox12
+ dba sBox13
+ dba sBox14
--- a/engine/breeding/egg.asm
+++ b/engine/breeding/egg.asm
@@ -166,11 +166,11 @@
cp c
jr z, .Compatible
-.Incompatible
+.Incompatible:
and a
ret
-.Compatible
+.Compatible:
scf
ret
; 16f3e
@@ -215,7 +215,7 @@
xor a
ld [CurPartyMon], a
-.loop: ; 16f7a (5:6f7a)
+.loop ; 16f7a (5:6f7a)
ld a, [de]
inc de
cp -1
@@ -348,7 +348,7 @@
ld bc, PKMN_NAME_LENGTH
call CopyBytes
-.next: ; 1707d (5:707d)
+.next ; 1707d (5:707d)
ld hl, CurPartyMon
inc [hl]
pop hl
@@ -357,7 +357,7 @@
pop de
jp .loop
-.done: ; 1708a (5:708a)
+.done ; 1708a (5:708a)
ret
; 1708b (5:708b)
@@ -989,7 +989,7 @@
ret
; 174b9
-.string: ; 174b9
+.string ; 174b9
db "@"
; 174ba
--- a/engine/buena_phone_scripts.asm
+++ b/engine/buena_phone_scripts.asm
@@ -21,12 +21,12 @@
buttonsound
end
-.morn:
+.morn
writetext UnknownText_0xa0c28
buttonsound
end
-.day:
+.day
writetext UnknownText_0xa0c72
buttonsound
end
@@ -46,12 +46,12 @@
buttonsound
end
-.morn:
+.morn
writetext UnknownText_0xa0d96
buttonsound
end
-.day:
+.day
writetext UnknownText_0xa0dcf
buttonsound
end
@@ -90,62 +90,62 @@
if_equal 12, .twelve
if_equal 13, .thirteen
-.zero:
+.zero
writetext UnknownText_0xa0efb
jump .finish
-.one:
+.one
writetext UnknownText_0xa0fcf
jump .finish
-.two:
+.two
writetext UnknownText_0xa109d
jump .finish
-.three:
+.three
writetext UnknownText_0xa1143
jump .finish
-.four:
+.four
writetext UnknownText_0xa1244
jump .finish
-.five:
+.five
writetext UnknownText_0xa1318
jump .finish
-.six:
+.six
writetext UnknownText_0xa13d8
jump .finish
-.seven:
+.seven
writetext UnknownText_0xa1488
jump .finish
-.eight:
+.eight
writetext UnknownText_0xa15de
jump .finish
-.nine:
+.nine
writetext UnknownText_0xa1717
jump .finish
-.ten:
+.ten
writetext UnknownText_0xa183d
jump .finish
-.eleven:
+.eleven
writetext UnknownText_0xa19b1
jump .finish
-.twelve:
+.twelve
writetext UnknownText_0xa1ac0
jump .finish
-.thirteen:
+.thirteen
writetext UnknownText_0xa1bed
-.finish:
+.finish
end
BuenaPhoneScript_Random1:
@@ -154,15 +154,15 @@
if_equal 1, .one
if_equal 2, .two
-.zero:
+.zero
writetext UnknownText_0xa1c88
end
-.one:
+.one
writetext UnknownText_0xa1d5f
end
-.two:
+.two
writetext UnknownText_0xa1e2f
end
; a0c28
--- a/engine/card_flip.asm
+++ b/engine/card_flip.asm
@@ -50,7 +50,7 @@
ld [wCardFlipCursorX], a
ld de, MUSIC_GAME_CORNER
call PlayMusic
-.MasterLoop
+.MasterLoop:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .leavethegame
@@ -81,7 +81,7 @@
; e01a0 (38:41a0)
.Jumptable: ; e01a0
-
+
dw .AskPlayWithThree
dw .DeductCoins
dw .ChooseACard
@@ -107,7 +107,7 @@
call .Increment
ret
-.SaidNo
+.SaidNo:
ld a, 7
ld [wJumptableIndex], a
ret
@@ -311,7 +311,7 @@
call .Increment
ret
-.Continue
+.Continue:
ld a, [wCardFlipNumCardsPlayed]
inc a
ld [wCardFlipNumCardsPlayed], a
@@ -325,10 +325,10 @@
call PrintText
jr .LoopAround
-.KeepTheCurrentDeck
+.KeepTheCurrentDeck:
call CardFlip_BlankDiscardedCardSlot
-.LoopAround
+.LoopAround:
ld a, 1
ld [wJumptableIndex], a
ret
@@ -401,7 +401,7 @@
bcpixel 2, 3
jr .done
-.BottomCard
+.BottomCard:
hlcoord 2, 6
bcpixel 8, 3
@@ -659,7 +659,7 @@
; e0553
.Jumptable: ; e0553
-
+
dw .Level1
dw .Level2
dw .Level3
@@ -848,7 +848,7 @@
; e0643
.Jumptable: ; e0643
-
+
dw .Impossible
dw .Impossible
dw .PikaJiggly
@@ -1270,7 +1270,7 @@
ret
; e08b8
-.d_left: ; e08b8
+.d_left ; e08b8
ld hl, wCardFlipCursorX
ld a, [wCardFlipCursorY]
and a
@@ -1309,7 +1309,7 @@
jp .play_sound
; e08ef
-.d_right: ; e08ef
+.d_right ; e08ef
ld hl, wCardFlipCursorX
ld a, [wCardFlipCursorY]
and a
@@ -1331,7 +1331,7 @@
endr
jr .play_sound
-.d_up: ; e090a
+.d_up ; e090a
ld hl, wCardFlipCursorY
ld a, [wCardFlipCursorX]
and a
@@ -1369,7 +1369,7 @@
ld [wCardFlipCursorX], a
jr .play_sound
-.d_down: ; e093d
+.d_down ; e093d
ld hl, wCardFlipCursorY
ld a, [wCardFlipCursorX]
and a
@@ -1391,7 +1391,7 @@
inc [hl]
endr
-.play_sound: ; e0959
+.play_sound ; e0959
ld de, SFX_POKEBALLS_PLACED_ON_TABLE
call PlaySFX
ret
@@ -1684,7 +1684,7 @@
ret
; e0c93 (38:4c93)
-.palettes: ; e0c93
+.palettes ; e0c93
RGB 31, 31, 31
RGB 17, 07, 31
RGB 06, 19, 08
--- a/engine/clock_reset.asm
+++ b/engine/clock_reset.asm
@@ -220,7 +220,7 @@
ret
; 20160 (8:4160)
-.unreferenced: ; 20160
+.unreferenced ; 20160
ld a, [Buffer3]
ld b, a
call Coord2Tile
--- a/engine/color.asm
+++ b/engine/color.asm
@@ -5,10 +5,8 @@
SHINY_DEF_VAL EQU 10
SHINY_SPD_VAL EQU 10
SHINY_SPC_VAL EQU 10
-LO_NYBBLE EQU $0f
-HI_NYBBLE EQU $f0
-CheckShininess: ; 8a68
+CheckShininess:
; Check if a mon is shiny by DVs at bc.
; Return carry if shiny.
@@ -22,33 +20,31 @@
; Defense
ld a, [hli]
- and LO_NYBBLE
+ and $f
cp SHINY_DEF_VAL
jr nz, .NotShiny
; Speed
ld a, [hl]
- and HI_NYBBLE
+ and $f0
cp SHINY_SPD_VAL << 4
jr nz, .NotShiny
; Special
ld a, [hl]
- and LO_NYBBLE
+ and $f
cp SHINY_SPC_VAL
jr nz, .NotShiny
-.Shiny
+.Shiny:
scf
ret
-.NotShiny
+.NotShiny:
and a
ret
-; 8a88
-
-CheckContestMon: ; 8a88
+CheckContestMon:
; Check a mon's DVs at hl in the bug catching contest.
; Return carry if its DVs are good enough to place in the contest.
@@ -59,7 +55,7 @@
; Defense
ld a, [hli]
- and LO_NYBBLE
+ and $f
cp 10
jr c, .Bad
@@ -70,21 +66,19 @@
; Special
ld a, [hl]
- and LO_NYBBLE
+ and $f
cp 10
jr c, .Bad
-.Good
+.Good:
scf
ret
-.Bad
+.Bad:
and a
ret
-; 8aa4
-
-Function8aa4: ; 8aa4
+Function8aa4:
push de
push bc
ld hl, PalPacket_9ce6
@@ -106,16 +100,13 @@
ld hl, BlkPacket_9a86
call Function9809
ret
-; 8ad1
-
-InitPartyMenuPalettes: ; 8ad1
+InitPartyMenuPalettes:
ld hl, PalPacket_9c56 + 1
call CopyFourPalettes
call InitPartyMenuOBPals
call WipeAttrMap
ret
-; 8ade
SGB_ApplyPartyMenuHPPals: ; 8ade SGB layout $fc
ld hl, wHPPals
@@ -142,9 +133,8 @@
pop de
ld [hl], e
ret
-; 8b07
-Function8b07: ; 8b07
+Function8b07:
; Unreferenced
call CheckCGB
ret z
@@ -165,21 +155,19 @@
ld [hCGBPalUpdate], a
ret
-.BGPal
+.BGPal:
RGB 31, 31, 31
RGB 18, 23, 31
RGB 15, 20, 31
RGB 00, 00, 00
-.OBPal
+.OBPal:
RGB 31, 31, 31
RGB 31, 31, 12
RGB 08, 16, 28
RGB 00, 00, 00
-; 8b3f
-
-Function8b3f: ; 8b3f
+Function8b3f:
; Unreferenced
call CheckCGB
ret nz
@@ -188,9 +176,8 @@
ret z
ld hl, BlkPacket_9a86
jp Function9809
-; 8b4d
-Function8b4d: ; 8b4d
+Function8b4d:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -204,9 +191,8 @@
ld a, $3b
call GetPredefPal
jp LoadHLPaletteIntoDE
-; 8b67
-Function8b67: ; 8b67
+Function8b67:
call CheckCGB
jr nz, .cgb
ld a, [hSGB]
@@ -220,9 +206,8 @@
ld a, $3c
call GetPredefPal
jp LoadHLPaletteIntoDE
-; 8b81
-Function8b81: ; 8b81
+Function8b81:
call CheckCGB
jr nz, .asm_8bb2
ld a, [hSGB]
@@ -253,9 +238,8 @@
call GetMonPalettePointer_
call LoadPalette_White_Col1_Col2_Black
ret
-; 8bbd
-Function8bbd: ; 8bbd
+Function8bbd:
ld a, [TrainerClass]
call GetTrainerPalettePointer
ld a, e
@@ -290,9 +274,8 @@
pop hl
call LoadPalette_White_Col1_Col2_Black
ret
-; 8bec
-Function8bec: ; 8bec
+Function8bec:
ld a, [hCGB]
and a
jr nz, .asm_8bf7
@@ -321,9 +304,8 @@
call FillBoxCGB
call LoadEDTile
ret
-; 8c1d
-ApplyMonOrTrainerPals: ; 8c1d
+ApplyMonOrTrainerPals:
call CheckCGB
ret z
ld a, e
@@ -344,9 +326,8 @@
call ApplyAttrMap
call ApplyPals
ret
-; 8c43
-ApplyHPBarPals: ; 8c43
+ApplyHPBarPals:
ld a, [wWhichHPBar]
and a
jr z, .Enemy
@@ -356,11 +337,11 @@
jr z, .PartyMenu
ret
-.Enemy
+.Enemy:
ld de, BGPals + 2 palettes + 2
jr .okay
-.Player
+.Player:
ld de, BGPals + 3 palettes + 2
.okay
@@ -377,7 +358,7 @@
ld [hCGBPalUpdate], a
ret
-.PartyMenu
+.PartyMenu:
ld e, c
inc e
hlcoord 11, 1, AttrMap
@@ -395,9 +376,8 @@
ld a, e
call FillBoxCGB
ret
-; 8c8a
-LoadStatsScreenPals: ; 8c8a
+LoadStatsScreenPals:
call CheckCGB
ret z
ld hl, StatsScreenPals
@@ -420,9 +400,8 @@
call ApplyPals
ld a, $1
ret
-; 8cb4
-Function8cb4: ; 8cb4
+Function8cb4:
ld l, e
ld h, 0
rept 3
@@ -463,9 +442,8 @@
call WipeAttrMap
call ApplyAttrMap
ret
-; 8d05
-Palettes_8d05: ; 8d05
+Palettes_8d05:
RGB 20, 31, 11
RGB 31, 19, 00
RGB 31, 10, 09
@@ -516,12 +494,9 @@
RGB 00, 21, 00
RGB 00, 00, 00
-; 8d55
-
INCLUDE "predef/cgb.asm"
-
-Function95f0: ; 95f0
+Function95f0:
ld hl, Palette_9608
ld de, UnknBGPals
ld bc, 8
@@ -531,22 +506,18 @@
call WipeAttrMap
call ApplyAttrMap
ret
-; 9608
-Palette_9608: ; 9608
+Palette_9608:
RGB 31, 31, 31
RGB 09, 31, 31
RGB 10, 12, 31
RGB 00, 03, 19
-; 9610
-
-
-CopyFourPalettes: ; 9610
+CopyFourPalettes:
ld de, UnknBGPals
ld c, $4
-CopyPalettes: ; 9615
+CopyPalettes:
.loop
push bc
ld a, [hli]
@@ -559,9 +530,8 @@
dec c
jr nz, .loop
ret
-; 9625
-GetPredefPal: ; 9625
+GetPredefPal:
ld l, a
ld h, $0
rept 3 ; multiply by 8
@@ -570,9 +540,8 @@
ld bc, Palettes_9df6
add hl, bc
ret
-; 9630
-LoadHLPaletteIntoDE: ; 9630
+LoadHLPaletteIntoDE:
ld a, [rSVBK]
push af
ld a, $5
@@ -587,9 +556,8 @@
pop af
ld [rSVBK], a
ret
-; 9643
-LoadPalette_White_Col1_Col2_Black: ; 9643
+LoadPalette_White_Col1_Col2_Black:
ld a, [rSVBK]
push af
ld a, $5
@@ -619,9 +587,8 @@
pop af
ld [rSVBK], a
ret
-; 9663
-FillBoxCGB: ; 9663
+FillBoxCGB:
.row
push bc
push hl
@@ -636,9 +603,8 @@
dec b
jr nz, .row
ret
-; 9673
-Function9673: ; 9673
+Function9673:
push af
push bc
push de
@@ -667,18 +633,15 @@
pop bc
pop af
ret
-; 9699
-
-WipeAttrMap: ; 9699
+WipeAttrMap:
hlcoord 0, 0, AttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
xor a
call ByteFill
ret
-; 96a4
-ApplyPals: ; 96a4
+ApplyPals:
ld hl, UnknBGPals
ld de, BGPals
ld bc, 16 palettes
@@ -685,9 +648,8 @@
ld a, $5
call FarCopyWRAM
ret
-; 96b3
-ApplyAttrMap: ; 96b3
+ApplyAttrMap:
ld a, [rLCDC]
bit 7, a
jr z, .UpdateVBank1
@@ -703,7 +665,7 @@
ld [hBGMapMode], a
ret
-.UpdateVBank1
+.UpdateVBank1:
hlcoord 0, 0, AttrMap
debgcoord 0, 0
ld b, SCREEN_HEIGHT
@@ -728,7 +690,6 @@
ld a, $0
ld [rVBK], a
ret
-; 96f3
CGB_ApplyPartyMenuHPPals: ; 96f3 CGB layout $fc
ld hl, wHPPals
@@ -755,10 +716,8 @@
ld a, e
call FillBoxCGB
ret
-; 971a
-
-InitPartyMenuOBPals: ; 971a
+InitPartyMenuOBPals:
ld hl, Palettes_b681
ld de, UnknOBPals
ld bc, 2 palettes
@@ -765,9 +724,8 @@
ld a, $5
call FarCopyWRAM
ret
-; 9729
-GetBattlemonBackpicPalettePointer: ; 9729
+GetBattlemonBackpicPalettePointer:
push de
callba GetPartyMonDVs
ld c, l
@@ -776,9 +734,8 @@
call GetPlayerOrMonPalettePointer
pop de
ret
-; 973a
-GetEnemyFrontpicPalettePointer: ; 973a
+GetEnemyFrontpicPalettePointer:
push de
callba GetEnemyMonDVs
ld c, l
@@ -787,9 +744,8 @@
call GetFrontpicPalettePointer
pop de
ret
-; 974b
-GetPlayerOrMonPalettePointer: ; 974b
+GetPlayerOrMonPalettePointer:
and a
jp nz, GetMonNormalOrShinyPalettePointer
ld a, [wPlayerSpriteSetupFlags]
@@ -804,14 +760,13 @@
.male
ld hl, PlayerPalette
ret
-; 9764
-GetFrontpicPalettePointer: ; 9764
+GetFrontpicPalettePointer:
and a
jp nz, GetMonNormalOrShinyPalettePointer
ld a, [TrainerClass]
-GetTrainerPalettePointer: ; 976b
+GetTrainerPalettePointer:
ld l, a
ld h, 0
add hl,hl
@@ -819,14 +774,12 @@
ld bc, TrainerPalettes
add hl, bc
ret
-; 9775
-GetMonPalettePointer_: ; 9775
+GetMonPalettePointer_:
call GetMonPalettePointer
ret
-; 9779
-Function9779: mobile ; 9779
+Function9779: mobile
call CheckCGB
ret z
ld hl, Palettes_979c
@@ -844,9 +797,8 @@
ld a, $5
call FarCopyWRAM
ret
-; 979c
-Palettes_979c: ; 979c
+Palettes_979c:
RGB 31, 31, 31
RGB 25, 25, 25
RGB 13, 13, 13
@@ -877,9 +829,7 @@
RGB 20, 15, 03
RGB 00, 00, 00
-; 97cc
-
-Function97cc: ; 97cc
+Function97cc:
call CheckCGB
ret z
ld a, $90
@@ -891,9 +841,8 @@
call GetPredefPal
call Function97e5
ret
-; 97e5
-Function97e5: ; 97e5
+Function97e5:
ld c, 1 palettes
.loop
ld a, [hli]
@@ -901,9 +850,8 @@
dec c
jr nz, .loop
ret
-; 97ee
-GetMonPalettePointer: ; 97ee
+GetMonPalettePointer:
ld l, a
ld h, $0
rept 3
@@ -912,9 +860,8 @@
ld bc, PokemonPalettes
add hl, bc
ret
-; 97f9
-GetMonNormalOrShinyPalettePointer: ; 97f9
+GetMonNormalOrShinyPalettePointer:
push bc
call GetMonPalettePointer
pop bc
@@ -926,9 +873,8 @@
inc hl
endr
ret
-; 9809
-Function9809: ; 9809
+Function9809:
ld a, [wcfbe]
push af
set 7, a
@@ -937,9 +883,8 @@
pop af
ld [wcfbe], a
ret
-; 981a
-PushSGBPals: ; 981a
+PushSGBPals:
ld a, [hl]
and $7
ret z
@@ -978,9 +923,8 @@
dec b
jr nz, .loop
ret
-; 9853
-Function9853: ; 9853
+Function9853:
call CheckCGB
ret nz
di
@@ -1010,10 +954,8 @@
ld [wcfbe], a
ei
ret
-; 9890
-
-Function9890:: ; 9890
+Function9890::
call CheckCGB
ret z
ld a, $1
@@ -1056,7 +998,7 @@
ld [rSVBK], a
ret
-.LoadWhitePals
+.LoadWhitePals:
ld c, 4 * 16
.loop
ld a, $7fff % $100
@@ -1066,9 +1008,8 @@
dec c
jr nz, .loop
ret
-; 98eb
-Function98eb: ; 98eb
+Function98eb:
ld hl, .PalPacketPointerTable
ld c, 9
.loop
@@ -1084,9 +1025,8 @@
dec c
jr nz, .loop
ret
-; 98ff
-.PalPacketPointerTable: ; 98ff
+.PalPacketPointerTable:
dw PalPacket_9d56
dw PalPacket_9d76
dw PalPacket_9d86
@@ -1096,9 +1036,8 @@
dw PalPacket_9dc6
dw PalPacket_9dd6
dw PalPacket_9de6
-; 9911
-Function9911: ; 9911
+Function9911:
di
xor a
ld [rJOYP], a
@@ -1111,9 +1050,8 @@
call PushSGBPals
ei
ret
-; 992c
-Function992c: ; 992c
+Function992c:
call .LoadSGBBorderPointers
push de
call Function9a24
@@ -1120,23 +1058,20 @@
pop hl
call Function99d8
ret
-; 9938
-.LoadSGBBorderPointers: ; 9938
+.LoadSGBBorderPointers:
ld hl, SGBBorder
ld de, SGBBorderMap
ret
-; 993f
-Function993f: ; 993f
+Function993f:
ld hl, VTiles0
ld bc, $2000
xor a
call ByteFill
ret
-; 994a
-Function994a: ; 994a
+Function994a:
ld hl, PalPacket_9d26
call PushSGBPals
call SGBDelayCycles
@@ -1180,15 +1115,13 @@
call Function99ab
scf
ret
-; 99ab
-Function99ab: ; 99ab
+Function99ab:
ld hl, PalPacket_9d16
call PushSGBPals
jp SGBDelayCycles
-; 99b4
-Function99b4: ; 99b4
+Function99b4:
call DisableLCD
ld a, $e4
ld [rBGP], a
@@ -1204,9 +1137,8 @@
xor a
ld [rBGP], a
ret
-; 99d8
-Function99d8: ; 99d8
+Function99d8:
call DisableLCD
ld a, $e4
ld [rBGP], a
@@ -1239,9 +1171,8 @@
xor a
ld [rBGP], a
ret
-; 9a24
-Function9a24: ; 9a24
+Function9a24:
call DisableLCD
ld a, %11100100
ld [rBGP], a
@@ -1264,7 +1195,6 @@
xor a
ld [rBGP], a
ret
-; 9a52
CopyData: ; 0x9a52
; copy bc bytes of data from hl to de
@@ -1310,7 +1240,7 @@
ret
; 0x9a7a
-SGBDelayCycles: ; 9a7a
+SGBDelayCycles:
ld de, 7000
.wait
nop
@@ -1321,52 +1251,48 @@
or e
jr nz, .wait
ret
-; 9a86
-BlkPacket_9a86: ; 9a86
+BlkPacket_9a86:
db $21, $01, $03, $00, $00, $00, $13, $11, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9a96: ; 9a96
+BlkPacket_9a96:
db $21, $01, $07, $05, $00, $0a, $13, $0d, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9aa6: ; 9a86
+BlkPacket_9aa6:
db $22, $05, $07, $0a, $00, $0c, $13, $11, $03, $05, $01, $00, $0a, $03, $03, $00
db $0a, $08, $13, $0a, $03, $0a, $00, $04, $08, $0b, $03, $0f, $0b, $00, $13, $07
-BlkPacket_9ac6: ; 9a86
+BlkPacket_9ac6:
db $21, $01, $07, $05, $00, $01, $07, $07, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9ad6: ; 9a86
+BlkPacket_9ad6:
db $21, $01, $07, $05, $0b, $01, $13, $02, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9ae6: ; 9a86
+BlkPacket_9ae6:
db $21, $01, $07, $05, $01, $01, $08, $08, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9af6: ; 9a86
+BlkPacket_9af6:
db $21, $01, $07, $05, $07, $05, $0d, $0b, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9b06: ; 9a86
+BlkPacket_9b06:
db $22, $05, $03, $05, $00, $00, $13, $0b, $03, $0a, $00, $04, $13, $09, $02, $0f
db $00, $06, $13, $07, $03, $00, $04, $04, $0f, $09, $03, $00, $00, $0c, $13, $11
-BlkPacket_9b26: ; 9a86
+BlkPacket_9b26:
db $23, $07, $07, $10, $00, $00, $02, $0c, $02, $00, $0c, $00, $12, $01, $02, $00
db $0c, $02, $12, $03, $02, $00, $0c, $04, $12, $05, $02, $00, $0c, $06, $12, $07
db $02, $00, $0c, $08, $12, $09, $02, $00, $0c, $0a, $12, $0b, $00, $00, $00, $00
-BlkPacket_9b56: ; 9a86
+BlkPacket_9b56:
db $22, $03, $07, $20, $00, $00, $13, $04, $03, $0f, $00, $06, $13, $11, $03, $05
db $0f, $01, $12, $04, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9b76: ; 9a86
+BlkPacket_9b76:
db $21, $01, $07, $10, $00, $00, $13, $05, $00, $00, $00, $00, $00, $00, $00, $00
-BlkPacket_9b86: ; 9a86
+BlkPacket_9b86:
db $21, $02, $07, $0a, $00, $04, $13, $0d, $03, $05, $00, $06, $13, $0b, $00, $00
-; 9b96
-; 9b96
-
PalPacket_9b96: db $51, $48, $00, $49, $00, $4a, $00, $4b, $00, $00, $00, $00, $00, $00, $00, $00
PalPacket_9ba6: db $51, $2b, $00, $24, $00, $20, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00
PalPacket_9bb6: db $51, $41, $00, $42, $00, $43, $00, $44, $00, $00, $00, $00, $00, $00, $00, $00
@@ -1405,9 +1331,8 @@
PalPacket_9dc6: db $79, $26, $08, $00, $0b, $39, $cd, $48, $0c, $d0, $34, $a5, $c9, $c9, $80, $d0
PalPacket_9dd6: db $79, $1b, $08, $00, $0b, $ea, $ea, $ea, $ea, $ea, $a9, $01, $cd, $4f, $0c, $d0
PalPacket_9de6: db $79, $10, $08, $00, $0b, $4c, $20, $08, $ea, $ea, $ea, $ea, $ea, $60, $ea, $ea
-; 9df6
-Palettes_9df6: ; 9df6
+Palettes_9df6:
RGB 31, 31, 31
RGB 22, 25, 19
RGB 16, 21, 30
@@ -1803,9 +1728,7 @@
RGB 21, 21, 21
RGB 31, 31, 31
-; a06e
-
-SGBBorderMap: ; a06e
+SGBBorderMap:
db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $14,$14, $15,$14, $16,$14, $17,$14, $17,$54, $16,$54, $15,$54, $14,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
db $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$54, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54
db $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54
@@ -1834,9 +1757,8 @@
db $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54, $24,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $01,$14, $02,$14, $03,$14, $03,$54, $02,$54, $01,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $25,$14, $26,$14, $07,$14, $07,$54, $26,$54, $25,$54
db $33,$14, $34,$14, $35,$14, $35,$54, $34,$54, $24,$54, $07,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $10,$14, $11,$14, $12,$14, $13,$14, $13,$54, $12,$54, $11,$54, $10,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $24,$14, $34,$14, $35,$14, $35,$54, $34,$54, $33,$54
db $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $20,$14, $21,$14, $22,$14, $23,$14, $23,$54, $22,$54, $21,$54, $20,$54, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14, $07,$14
-; a49e
-SGBBorderPalettes: ; a49e
+SGBBorderPalettes:
RGB 24, 06, 06
RGB 24, 24, 26
RGB 14, 15, 20
@@ -1917,13 +1839,10 @@
RGB 31, 31, 25
RGB 31, 31, 25
-; a51e
-
-SGBBorder: ; a51e
+SGBBorder:
INCBIN "gfx/misc/sgb_border.2bpp"
-; a8be
-Palettes_a8be: ; a8be
+Palettes_a8be:
RGB 30, 26, 15
RGB 00, 23, 00
@@ -1933,23 +1852,19 @@
RGB 30, 26, 15
RGB 31, 00, 00
-Palettes_a8ca: ; a8ca
+Palettes_a8ca:
RGB 30, 26, 15
RGB 04, 17, 31
-; a8ce
-; a8ce
INCLUDE "gfx/pics/palette_pointers.asm"
-; b0ce
-; b0ce
INCLUDE "gfx/trainers/palette_pointers.asm"
-; b1de
-LoadMapPals: ; b1de
+LoadMapPals:
callba LoadSpecialMapPalette
jr c, .got_pals
+ ; Which palette group is based on whether we're outside or inside
ld a, [wPermission]
and 7
ld e, a
@@ -1960,16 +1875,18 @@
ld a, [hli]
ld h, [hl]
ld l, a
+ ; Futher refine by time of day
ld a, [TimeOfDayPal]
and 3
-rept 3
add a
-endr
+ add a
+ add a
ld e, a
ld d, 0
add hl, de
ld e, l
ld d, h
+ ; Switch to palettes WRAM bank
ld a, [rSVBK]
push af
ld a, $5
@@ -1977,14 +1894,14 @@
ld hl, UnknBGPals
ld b, 8
.outer_loop
- ld a, [de]
+ ld a, [de] ; lookup index for TilesetBGPalette
push de
push hl
ld l, a
ld h, 0
-rept 3
- add hl,hl
-endr
+ add hl, hl
+ add hl, hl
+ add hl, hl
ld de, TilesetBGPalette
add hl, de
ld e, l
@@ -2042,43 +1959,41 @@
ld a, $5
call FarCopyWRAM
ret
-; b279
-.TilesetColorsPointers: ; b279
- dw TilesetColors1
- dw TilesetColors1
- dw TilesetColors1
- dw TilesetColors2
- dw TilesetColors3
- dw TilesetColors4
- dw TilesetColors2
- dw TilesetColors3
-; b289
+.TilesetColorsPointers:
+ dw .OutdoorColors ; unused
+ dw .OutdoorColors ; TOWN
+ dw .OutdoorColors ; ROUTE
+ dw .IndoorColors ; INDOOR
+ dw .DungeonColors ; CAVE
+ dw .Perm5Colors ; PERM_5
+ dw .IndoorColors ; GATE
+ dw .DungeonColors ; DUNGEON
-TilesetColors1: ; b289
- db $00, $01, $02, $28, $04, $05, $06, $07
- db $08, $09, $0a, $28, $0c, $0d, $0e, $0f
- db $10, $11, $12, $29, $14, $15, $16, $17
- db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
+; Valid indices: $00 - $29
+.OutdoorColors:
+ db $00, $01, $02, $28, $04, $05, $06, $07 ; morn
+ db $08, $09, $0a, $28, $0c, $0d, $0e, $0f ; day
+ db $10, $11, $12, $29, $14, $15, $16, $17 ; nite
+ db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark
-TilesetColors2: ; b289
- db $20, $21, $22, $23, $24, $25, $26, $07
- db $20, $21, $22, $23, $24, $25, $26, $07
- db $10, $11, $12, $13, $14, $15, $16, $07
- db $18, $19, $1a, $1b, $1c, $1d, $1e, $07
+.IndoorColors:
+ db $20, $21, $22, $23, $24, $25, $26, $07 ; morn
+ db $20, $21, $22, $23, $24, $25, $26, $07 ; day
+ db $10, $11, $12, $13, $14, $15, $16, $07 ; nite
+ db $18, $19, $1a, $1b, $1c, $1d, $1e, $07 ; dark
-TilesetColors3: ; b289
- db $00, $01, $02, $03, $04, $05, $06, $07
- db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f
- db $10, $11, $12, $13, $14, $15, $16, $17
- db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
+.DungeonColors:
+ db $00, $01, $02, $03, $04, $05, $06, $07 ; morn
+ db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; day
+ db $10, $11, $12, $13, $14, $15, $16, $17 ; nite
+ db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark
-TilesetColors4: ; b289
- db $00, $01, $02, $03, $04, $05, $06, $07
- db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f
- db $10, $11, $12, $13, $14, $15, $16, $17
- db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
-; b309
+.Perm5Colors:
+ db $00, $01, $02, $03, $04, $05, $06, $07 ; morn
+ db $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; day
+ db $10, $11, $12, $13, $14, $15, $16, $17 ; nite
+ db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f ; dark
Palette_b309: ; b309 mobile
RGB 31, 31, 31
@@ -2086,8 +2001,6 @@
RGB 30, 10, 06
RGB 00, 00, 00
-; b311
-
Palette_b311: ; b311 not mobile
RGB 31, 31, 31
RGB 17, 19, 31
@@ -2094,18 +2007,16 @@
RGB 14, 16, 31
RGB 00, 00, 00
-; b319
-
-TilesetBGPalette: ; b319
+TilesetBGPalette:
INCLUDE "tilesets/bg.pal"
-MapObjectPals:: ; b469
+MapObjectPals::
INCLUDE "tilesets/ob.pal"
-RoofPals: ; b569
+RoofPals:
INCLUDE "tilesets/roof.pal"
-Palettes_b641: ; b641
+Palettes_b641:
RGB 27, 31, 27
RGB 21, 21, 21
RGB 13, 13, 13
@@ -2146,9 +2057,7 @@
RGB 07, 07, 12
RGB 00, 00, 00
-; b681
-
-Palettes_b681: ; b681
+Palettes_b681:
RGB 27, 31, 27
RGB 31, 19, 10
RGB 31, 07, 04
@@ -2219,8 +2128,7 @@
RGB 20, 15, 03
RGB 07, 07, 07
-
-Palettes_b6f1: ; b6f1
+Palettes_b6f1:
RGB 31, 31, 31
RGB 18, 23, 31
RGB 15, 20, 31
@@ -2246,8 +2154,7 @@
RGB 18, 23, 31
RGB 00, 00, 00
-
-Palettes_b719: ; b719
+Palettes_b719:
RGB 31, 31, 31
RGB 07, 06, 03
RGB 07, 06, 03
@@ -2258,9 +2165,7 @@
RGB 26, 22, 00
RGB 00, 00, 00
-; b729
-
-MalePokegearPals: ; b729
+MalePokegearPals:
RGB 28, 31, 20
RGB 21, 21, 21
RGB 13, 13, 13
@@ -2291,9 +2196,7 @@
RGB 15, 07, 00
RGB 31, 00, 00
-; b759
-
-FemalePokegearPals: ; b759
+FemalePokegearPals:
RGB 28, 31, 20
RGB 21, 21, 21
RGB 13, 13, 13
@@ -2324,9 +2227,7 @@
RGB 15, 07, 00
RGB 31, 00, 00
-; b789
-
-Palettes_b789: ; b789
+Palettes_b789:
RGB 31, 31, 31
RGB 30, 22, 24
RGB 18, 18, 18
@@ -2347,9 +2248,7 @@
RGB 18, 18, 18
RGB 00, 00, 00
-; b7a9
-
-Palettes_b7a9: ; b7a9
+Palettes_b7a9:
RGB 31, 31, 31
RGB 24, 25, 28
RGB 24, 24, 09
@@ -2430,4 +2329,3 @@
RGB 00, 00, 00
RGB 00, 00, 00
-; b829
--- a/engine/credits.asm
+++ b/engine/credits.asm
@@ -269,7 +269,7 @@
.Jumptable: ; 109937 (42:5937)
-
+
dw ParseCredits
dw Credits_Next
dw Credits_Next
@@ -350,17 +350,17 @@
ld hl, wJumptableIndex
bit 7, [hl]
jp nz, .done
-
+
; Wait until the timer has run out to parse the next command.
ld hl, CreditsTimer
ld a, [hl]
and a
jr z, .parse
-
+
; One tick has passed.
dec [hl]
jp .done
-
+
.parse
; First, let's clear the current text display,
; starting from line 5.
@@ -370,12 +370,12 @@
ld bc, 20 * 12
ld a, " "
call ByteFill
-
+
; Then read the script.
-
+
.loop
call .get
-
+
; Commands:
cp CREDITS_END
jp z, .end
@@ -391,9 +391,9 @@
jr z, .wait2
cp CREDITS_THEEND
jr z, .theend
-
+
; If it's not a command, it's a string identifier.
-
+
push af
ld e, a
ld d, 0
@@ -405,27 +405,27 @@
ld d, [hl]
ld e, a
pop af
-
+
; Strings spanning multiple lines have special cases.
-
+
cp COPYRIGHT
jr z, .copyright
-
+
cp STAFF
jr c, .staff
-
+
; The rest start from line 6.
hlcoord 0, 6
jr .print
-
+
.copyright
hlcoord 2, 6
jr .print
-
+
.staff
hlcoord 0, 6
-
+
; Print strings spaced every two lines.
call .get
@@ -433,12 +433,12 @@
call AddNTimes
call PlaceString
jr .loop
-
+
.theend
; Display "The End" graphic.
call Credits_TheEnd
jr .loop
-
+
.scene
; Update the scene number and corresponding palette.
call .get
@@ -448,13 +448,13 @@
call GetCreditsPalette
call SetPalettes ; update hw pal registers
jr .loop
-
+
.clear
; Clear the banner.
ld a, $ff
ld [wCreditsBorderFrame], a ; frame
jr .loop
-
+
.music
; Play the credits music.
ld de, MUSIC_CREDITS
@@ -465,26 +465,26 @@
pop de
call PlayMusic
jp .loop
-
+
.wait2
; Wait for some amount of ticks.
call .get
ld [CreditsTimer], a
jr .done
-
+
.wait
; Wait for some amount of ticks, and do something else.
call .get
ld [CreditsTimer], a
-
+
xor a
ld [hBGMapThird], a
ld a, 1
ld [hBGMapMode], a
-
+
.done
jp Credits_Next
-
+
.end
; Stop execution.
ld hl, wJumptableIndex
@@ -507,7 +507,7 @@
ld d, a
ld hl, CreditsScript
add hl, de
-
+
inc de
ld a, e
ld [CreditsPos], a
@@ -614,14 +614,14 @@
GetCreditsPalette: ; 109b2c
call .GetPalAddress
-
+
push hl
ld a, 0
call .UpdatePals
pop hl
ret
-
-.GetPalAddress
+
+.GetPalAddress:
; Each set of palette data is 24 bytes long.
ld a, [wCreditsBorderMon] ; scene
and 3
@@ -635,10 +635,10 @@
add hl, de ; * 3
add hl, de
ret
-
-.UpdatePals
+
+.UpdatePals:
; Update the first three colors in both palette buffers.
-
+
push af
push hl
add UnknBGPals % $100
@@ -648,7 +648,7 @@
ld d, a
ld bc, 24
call CopyBytes
-
+
pop hl
pop af
add BGPals % $100
--- a/engine/crystal_intro.asm
+++ b/engine/crystal_intro.asm
@@ -129,7 +129,7 @@
jp [hl]
; e467f
-.dw: ; e467f
+.dw ; e467f
dw PlaceGameFreakPresents_0
dw PlaceGameFreakPresents_1
dw PlaceGameFreakPresents_2
@@ -154,7 +154,7 @@
inc [hl]
ret
-.PlaceGameFreak
+.PlaceGameFreak:
ld [hl], 0
ld hl, .GAME_FREAK
decoord 5, 10
@@ -166,7 +166,7 @@
ret
; e46af
-.GAME_FREAK
+.GAME_FREAK:
; G A M E _ F R E A K
db 0, 1, 2, 3, 13, 4, 5, 3, 1, 6
.end
@@ -383,7 +383,7 @@
ld a, [hVBlank]
push af
call .InitRAMAddrs
-.loop: ; e48bc
+.loop ; e48bc
call JoyTextDelay
ld a, [hJoyLast]
and BUTTONS
@@ -396,7 +396,7 @@
call DelayFrame
jp .loop
-.ShutOffMusic
+.ShutOffMusic:
ld de, MUSIC_NONE
call PlayMusic
@@ -547,7 +547,7 @@
ld de, SFX_INTRO_UNOWN_1
call PlaySFX
pop af
-.DontPlaySound
+.DontPlaySound:
ld [wcf65], a
xor a
call CrystalIntro_UnownFade
@@ -686,7 +686,7 @@
jr z, .FirstUnown
jr .NoUnown
-.FirstUnown
+.FirstUnown:
push af
depixel 7, 15
call CrystalIntro_InitUnownAnim
@@ -693,13 +693,13 @@
ld de, SFX_INTRO_UNOWN_2
call PlaySFX
pop af
-.NoUnown
+.NoUnown:
ld [wcf65], a
xor a
call CrystalIntro_UnownFade
ret
-.SecondUnown
+.SecondUnown:
push af
depixel 14, 6
call CrystalIntro_InitUnownAnim
@@ -706,7 +706,7 @@
ld de, SFX_INTRO_UNOWN_1
call PlaySFX
pop af
-.StopUnown
+.StopUnown:
ld [wcf65], a
ld a, $1
call CrystalIntro_UnownFade
@@ -1347,7 +1347,7 @@
ld [hSCY], a
ret
-.AppearUnown
+.AppearUnown:
sub $18
ld c, a
and $3
@@ -1827,7 +1827,7 @@
ret
; e538d (39:538d)
-.pal1: ; e538d
+.pal1 ; e538d
RGB 24, 12, 09
RGB 31, 31, 31
RGB 12, 00, 31
@@ -1835,7 +1835,7 @@
; e5395
-.pal2: ; e5395
+.pal2 ; e5395
RGB 24, 12, 09
RGB 31, 31, 31
RGB 31, 31, 31
@@ -1952,7 +1952,7 @@
jr z, .PrepareForSuicuneSwap
ret
-.PrepareForSuicuneSwap
+.PrepareForSuicuneSwap:
xor a
ld [hBGMapMode], a
ret
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -1365,7 +1365,7 @@
jp [hl]
; 82301
-.dw: ; 82301
+.dw ; 82301
dw Function82309
dw Function82339
dw Function8234b
--- a/engine/decorations.asm
+++ b/engine/decorations.asm
@@ -52,7 +52,7 @@
dw .pointers
; 0x267aa
-.pointers: ; 267aa
+.pointers ; 267aa
dw DecoBedMenu, .bed
dw DecoCarpetMenu, .carpet
dw DecoPlantMenu, .plant
@@ -127,7 +127,7 @@
ret
; 26855 (9:6855)
-.dw: ; 26855
+.dw ; 26855
dwb FindOwnedBeds, 0 ; bed
dwb FindOwnedCarpets, 1 ; carpet
dwb FindOwnedPlants, 2 ; plant
@@ -211,7 +211,7 @@
jp FindOwnedDecosInCategory
; 268c5
-.beds: ; 268c5
+.beds ; 268c5
db DECO_FEATHERY_BED ; 2
db DECO_PINK_BED ; 3
db DECO_POLKADOT_BED ; 4
@@ -232,7 +232,7 @@
jp FindOwnedDecosInCategory
; 268da
-.carpets: ; 268da
+.carpets ; 268da
db DECO_RED_CARPET ; 7
db DECO_BLUE_CARPET ; 8
db DECO_YELLOW_CARPET ; 9
@@ -253,7 +253,7 @@
jp FindOwnedDecosInCategory
; 268ef
-.plants: ; 268ef
+.plants ; 268ef
db DECO_MAGNAPLANT ; c
db DECO_TROPICPLANT ; d
db DECO_JUMBOPLANT ; e
@@ -273,7 +273,7 @@
jp FindOwnedDecosInCategory
; 26903
-.posters: ; 26903
+.posters ; 26903
db DECO_TOWN_MAP ; 10
db DECO_PIKACHU_POSTER ; 11
db DECO_CLEFAIRY_POSTER ; 12
@@ -294,7 +294,7 @@
jp FindOwnedDecosInCategory
; 26918
-.consoles: ; 26918
+.consoles ; 26918
db DECO_FAMICOM ; 15
db DECO_SNES ; 16
db DECO_N64 ; 17
@@ -315,7 +315,7 @@
jp FindOwnedDecosInCategory
; 2692d
-.ornaments: ; 2692d
+.ornaments ; 2692d
db DECO_PIKACHU_DOLL ; 1e
db DECO_SURF_PIKACHU_DOLL ; 1f
db DECO_CLEFAIRY_DOLL ; 20
@@ -355,7 +355,7 @@
jp FindOwnedDecosInCategory
; 26955
-.big_dolls: ; 26955
+.big_dolls ; 26955
db DECO_BIG_SNORLAX_DOLL ; 1a
db DECO_BIG_ONIX_DOLL ; 1b
db DECO_BIG_LAPRAS_DOLL ; 1c
@@ -656,37 +656,37 @@
; 26c8c
-.invalid: ; 26c8c
+.invalid ; 26c8c
ret
; 26c8d
-.plant: ; 26c8d
+.plant ; 26c8d
ld a, e
jr .getdeconame
-.bed: ; 26c90
+.bed ; 26c90
call .plant
ld a, _BED
jr .getdeconame
-.carpet: ; 26c97
+.carpet ; 26c97
call .plant
ld a, _CARPET
jr .getdeconame
-.poster: ; 26c9e
+.poster ; 26c9e
ld a, e
call .getpokename
ld a, _POSTER
jr .getdeconame
-.doll: ; 26ca6
+.doll ; 26ca6
ld a, e
call .getpokename
ld a, _DOLL
jr .getdeconame
-.bigdoll: ; 26cae
+.bigdoll ; 26cae
push de
ld a, BIG_
call .getdeconame
@@ -694,7 +694,7 @@
ld a, e
jr .getpokename
-.unused: ; 26cb8
+.unused ; 26cb8
push de
call .getdeconame
pop de
@@ -701,7 +701,7 @@
ld a, e
jr .getdeconame
-.getpokename: ; 26cc0
+.getpokename ; 26cc0
push bc
ld [wd265], a
call GetPokemonName
@@ -708,11 +708,11 @@
pop bc
jr .copy
-.getdeconame: ; 26cca
+.getdeconame ; 26cca
call ._getdeconame
jr .copy
-._getdeconame: ; 26ccf
+._getdeconame ; 26ccf
push bc
ld hl, DecorationNames
call GetNthString
@@ -721,7 +721,7 @@
pop bc
ret
-.copy: ; 26cda
+.copy ; 26cda
ld h, b
ld l, c
call CopyName2
@@ -957,7 +957,7 @@
ret
; 26e33
-.getwhichside: ; 26e33
+.getwhichside ; 26e33
ld a, [MenuSelection]
ld b, a
ld a, [wd1ed]
--- a/engine/dummy_game.asm
+++ b/engine/dummy_game.asm
@@ -6,7 +6,7 @@
jr nc, .loop
ret
-.LoadGFXAndPals
+.LoadGFXAndPals:
call DisableLCD
ld b, SCGB_08
call GetSGBLayout
@@ -42,7 +42,7 @@
call DmgToCgbObjPal0
ret
-.JumptableLoop
+.JumptableLoop:
ld a, [wJumptableIndex]
bit 7, a
jr nz, .quit
@@ -56,10 +56,10 @@
scf
ret
-.ExecuteJumptable
+.ExecuteJumptable:
jumptable .Jumptable, wJumptableIndex
-.Jumptable
+.Jumptable:
dw .RestartGame
dw .ResetBoard
dw .InitBoardTilemapAndCursorObject
@@ -70,13 +70,13 @@
dw .RevealAll
dw .AskPlayAgain
-.RestartGame
+.RestartGame:
call DummyGame_InitStrings
ld hl, wJumptableIndex
inc [hl]
ret
-.ResetBoard
+.ResetBoard:
call ret_e00ed
jr nc, .proceed
ld hl, wJumptableIndex
@@ -95,7 +95,7 @@
endr
ld [hl], a
ld [wDummyGameNumCardsMatched], a
-.InitBoardTilemapAndCursorObject
+.InitBoardTilemapAndCursorObject:
ld hl, wDummyGameCounter
ld a, [hl]
cp 45
@@ -117,7 +117,7 @@
inc [hl]
ret
-.CheckTriesRemaining
+.CheckTriesRemaining:
ld a, [wDummyGameNumberTriesRemaining]
hlcoord 17, 0
add "0"
@@ -136,7 +136,7 @@
ld [wcf64], a
ld hl, wJumptableIndex
inc [hl]
-.PickCard1
+.PickCard1:
ld a, [wcf64]
and a
ret z
@@ -160,7 +160,7 @@
inc [hl]
ret
-.PickCard2
+.PickCard2:
ld a, [wcf64]
and a
ret z
@@ -185,7 +185,7 @@
ld [wDummyGameCounter], a
ld hl, wJumptableIndex
inc [hl]
-.DelayPickAgain
+.DelayPickAgain:
ld hl, wDummyGameCounter
ld a, [hl]
and a
@@ -193,19 +193,19 @@
dec [hl]
ret
-.PickAgain
+.PickAgain:
call DummyGame_CheckMatch
ld a, $3
ld [wJumptableIndex], a
ret
-.RevealAll
+.RevealAll:
ld a, [hJoypadPressed]
and A_BUTTON
ret z
xor a
ld [wDummyGameCounter], a
-.RevelationLoop
+.RevelationLoop:
ld hl, wDummyGameCounter
ld a, [hl]
cp 45
@@ -231,7 +231,7 @@
call WaitPressAorB_BlinkCursor
ld hl, wJumptableIndex
inc [hl]
-.AskPlayAgain
+.AskPlayAgain:
call ret_e00ed
jr nc, .restart
ld hl, wJumptableIndex
@@ -310,7 +310,7 @@
call PrintText
ret
-.VictoryText
+.VictoryText:
start_asm
push bc
hlcoord 2, 13
--- a/engine/events.asm
+++ b/engine/events.asm
@@ -456,7 +456,7 @@
rept 4
add hl, de
endr
-
+
call GetMapScriptHeaderBank
call GetFarHalfword
call GetMapScriptHeaderBank
@@ -541,11 +541,11 @@
call CheckMenuOW
jr c, .Action
-.NoAction
+.NoAction:
xor a
ret
-.Action
+.Action:
push af
callba Function80422
pop af
@@ -581,7 +581,7 @@
xor a
ret
-.IsObject
+.IsObject:
call PlayTalkObject
ld a, [hObjectStructIndexBuffer]
call GetObjectStruct
@@ -687,7 +687,7 @@
xor a
ret
-.IsSign
+.IsSign:
ld a, [EngineBuffer3]
ld hl, .signs
rst JumpTable
@@ -887,11 +887,11 @@
scf
ret
-.NoMenu
+.NoMenu:
xor a
ret
-.Select
+.Select:
call PlayTalkObject
ld a, BANK(SelectMenuScript)
ld hl, SelectMenuScript
@@ -918,11 +918,11 @@
end
; 96b72
-.Script ; 96b72
+.Script: ; 96b72
ptjump wQueuedScriptBank
; 96b75
-.Asm ; 96b75
+.Asm: ; 96b75
ptcallasm wQueuedScriptBank
end
; 96b79
@@ -994,7 +994,7 @@
ret
; 96bd3
-.unreferenced: ; 96bd3
+.unreferenced ; 96bd3
ld a, 7
scf
ret
--- a/engine/events_2.asm
+++ b/engine/events_2.asm
@@ -191,13 +191,13 @@
ld hl, ContestMons
ld de, 4
-.CheckMon
+.CheckMon:
sub [hl]
jr c, .GotMon
add hl, de
jr .CheckMon
-.GotMon
+.GotMon:
inc hl
; Species
@@ -218,7 +218,7 @@
ld a, d
jr .GotLevel
-.RandomLevel
+.RandomLevel:
; Get a random level between the min and max.
ld c, a
inc c
@@ -227,7 +227,7 @@
call SimpleDivide
add d
-.GotLevel
+.GotLevel:
ld [CurPartyLevel], a
xor a
@@ -330,7 +330,7 @@
scf
ret
-.NoCall
+.NoCall:
xor a
ret
; 97df9
@@ -519,13 +519,13 @@
dw .one
; 97ec3
-.zero: ; 97ec3
+.zero ; 97ec3
ld a, [hSCY]
ld hl, 4
add hl, bc
ld [hl], a
call CmdQueueAnonJT_Increment
-.one: ; 97ecd
+.one ; 97ecd
ld hl, 1
add hl, bc
ld a, [hl]
@@ -566,11 +566,11 @@
dw .two
; 97f02
-.zero: ; 97f02
+.zero ; 97f02
call .IsPlayerFacingDown
jr z, .PlayerNotFacingDown
call CmdQueueAnonJT_Increment
-.one: ; 97f0a
+.one ; 97f0a
call .IsPlayerFacingDown
jr z, .PlayerNotFacingDown
call CmdQueueAnonJT_Increment
@@ -582,7 +582,7 @@
ret
; 97f1b
-.two: ; 97f1b
+.two ; 97f1b
call .IsPlayerFacingDown
jr z, .PlayerNotFacingDown
call CmdQueueAnonJT_Decrement
--- a/engine/events_3.asm
+++ b/engine/events_3.asm
@@ -8,7 +8,7 @@
ret
; b800a
-.inefficientcallba: ; b800a
+.inefficientcallba ; b800a
ld a, [MapGroup]
ld b, a
ld a, [MapNumber]
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -259,7 +259,7 @@
ret
; 4e794
-.check_statused: ; 4e794
+.check_statused ; 4e794
ld a, [CurPartyMon]
ld hl, PartyMon1Species
call GetPartyLocation
@@ -296,7 +296,7 @@
ret
; 4e7cf
-.balls_of_light: ; 4e7cf
+.balls_of_light ; 4e7cf
ld hl, wJumptableIndex
ld a, [hl]
cp 32
--- a/engine/evolve.asm
+++ b/engine/evolve.asm
@@ -336,7 +336,7 @@
; XXX
pop hl
-.ReturnToMap
+.ReturnToMap:
pop de
pop bc
pop hl
@@ -514,17 +514,17 @@
ld a, [hli]
ld h, [hl]
ld l, a
-.GoToAttacks
+.GoToAttacks:
ld a, [hli]
and a
jr nz, .GoToAttacks
jr .GetLevel
-.NextMove
+.NextMove:
pop de
-.GetMove
+.GetMove:
inc hl
-.GetLevel
+.GetLevel:
ld a, [hli]
and a
jp z, .done
@@ -539,10 +539,10 @@
cp b
jr nc, .GetMove
-.CheckMove
+.CheckMove:
push de
ld c, NUM_MOVES
-.CheckRepeat
+.CheckRepeat:
ld a, [de]
inc de
cp [hl]
@@ -552,7 +552,7 @@
pop de
push de
ld c, NUM_MOVES
-.CheckSlot
+.CheckSlot:
ld a, [de]
and a
jr z, .LearnMove
@@ -576,10 +576,10 @@
call ShiftMoves
pop de
-.ShiftedMove
+.ShiftedMove:
pop hl
-.LearnMove
+.LearnMove:
ld a, [hl]
ld [de], a
ld a, [Buffer1]
--- a/engine/healmachineanim.asm
+++ b/engine/healmachineanim.asm
@@ -122,7 +122,7 @@
ret
; 123db
-.dummy_5: ; 123db
+.dummy_5 ; 123db
ret
; 123dc
@@ -168,7 +168,7 @@
ret
; 12451
-.palettes: ; 12451
+.palettes ; 12451
RGB 31, 31, 31
RGB 31, 19, 10
RGB 31, 07, 01
--- /dev/null
+++ b/engine/health.asm
@@ -1,0 +1,110 @@
+HealParty: ; c658
+ xor a
+ ld [CurPartyMon], a
+ ld hl, PartySpecies
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .done
+ cp EGG
+ jr z, .next
+
+ push hl
+ call HealPartyMon
+ pop hl
+
+.next
+ ld a, [CurPartyMon]
+ inc a
+ ld [CurPartyMon], a
+ jr .loop
+
+.done
+ ret
+
+HealPartyMon: ; c677
+ ld a, MON_SPECIES
+ call GetPartyParamLocation
+ ld d, h
+ ld e, l
+
+ ld hl, MON_STATUS
+ add hl, de
+ xor a
+ ld [hli], a
+ ld [hl], a
+
+ ld hl, MON_MAXHP
+ add hl, de
+
+ ; bc = MON_HP
+ ld b, h
+ ld c, l
+ dec bc
+ dec bc
+
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ ld a, [hl]
+ ld [bc], a
+
+ callba RestoreAllPP
+ ret
+
+ComputeHPBarPixels: ; c699
+; e = bc * (6 * 8) / de
+ ld a, b
+ or c
+ jr z, .zero
+ push hl
+ xor a
+ ld [hMultiplicand + 0], a
+ ld a, b
+ ld [hMultiplicand + 1], a
+ ld a, c
+ ld [hMultiplicand + 2], a
+ ld a, 6 * 8
+ ld [hMultiplier], a
+ call Multiply
+ ; We need de to be under 256 because hDivisor is only 1 byte.
+ ld a, d
+ and a
+ jr z, .divide
+ ; divide de and hProduct by 4
+ srl d
+ rr e
+ srl d
+ rr e
+ ld a, [hProduct + 2]
+ ld b, a
+ ld a, [hProduct + 3]
+ srl b
+ rr a
+ srl b
+ rr a
+ ld [hDividend + 3], a
+ ld a, b
+ ld [hDividend + 2], a
+.divide
+ ld a, e
+ ld [hDivisor], a
+ ld b, 4
+ call Divide
+ ld a, [hQuotient + 2]
+ ld e, a
+ pop hl
+ and a
+ ret nz
+ ld e, 1
+ ret
+
+.zero
+ ld e, 0
+ ret
+
+AnimateHPBar: ; c6e0
+ call WaitBGMap
+ call _AnimateHPBar
+ call WaitBGMap
+ ret
--- a/engine/init_gender.asm
+++ b/engine/init_gender.asm
@@ -67,7 +67,7 @@
InitGenderScreen: ; 48e14 (12:4e14)
ld a, $10
ld [MusicFade], a
- ld a, $0
+ ld a, MUSIC_NONE
ld [MusicFadeIDLo], a
ld a, $0
ld [MusicFadeIDHi], a
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -30,7 +30,7 @@
ret
; 5b1c
-.Days ; 5b1c
+.Days: ; 5b1c
db "SUN@"
db "MON@"
db "TUES@"
@@ -40,7 +40,7 @@
db "SATUR@"
; 5b40
-.Day ; 5b40
+.Day: ; 5b40
db "DAY@"
; 5b44
@@ -270,7 +270,7 @@
jr c, .loop
ret
-.Box
+.Box:
db "BOX@"
; 5cd3
@@ -285,7 +285,7 @@
ret
; 5ce3
-.Ralph ; 5ce3
+.Ralph: ; 5ce3
db "RALPH@"
; 5ce9
@@ -305,15 +305,15 @@
ld hl, .Green
ld de, GreensName
-.Copy
+.Copy:
ld bc, NAME_LENGTH
call CopyBytes
ret
-.Rival db "???@"
-.Red db "RED@"
-.Green db "GREEN@"
-.Mom db "MOM@"
+.Rival: db "???@"
+.Red: db "RED@"
+.Green: db "GREEN@"
+.Mom: db "MOM@"
; 5d23
InitializeWorld: ; 5d23
@@ -365,13 +365,13 @@
call CloseWindow
jr .FailToLoad
-.Check1Pass
+.Check1Pass:
call Continue_CheckRTC_RestartClock
jr nc, .Check2Pass
call CloseWindow
jr .FailToLoad
-.Check2Pass
+.Check2Pass:
ld a, $8
ld [MusicFade], a
ld a, MUSIC_NONE % $100
@@ -394,10 +394,10 @@
ld [hMapEntryMethod], a
jp FinishContinueFunction
-.FailToLoad
+.FailToLoad:
ret
-.SpawnAfterE4
+.SpawnAfterE4:
ld a, SPAWN_NEW_BARK
ld [DefaultSpawnpoint], a
call PostCreditsSpawn
@@ -460,7 +460,7 @@
scf
ret
-.PressA
+.PressA:
ret
; 5e48
@@ -496,7 +496,7 @@
jr z, .AfterRed
jp Reset
-.AfterRed
+.AfterRed:
call SpawnAfterRed
jr .loop
; 5e85
@@ -609,7 +609,7 @@
pop hl
ret
-.Player
+.Player:
db "<PLAYER>@"
; 5f40
@@ -794,7 +794,7 @@
callba MovePlayerPicLeft
ret
-.NewName
+.NewName:
ld b, 1
ld de, PlayerName
callba NamingScreen
@@ -819,13 +819,13 @@
bit 0, a
jr z, .Male
ld de, .Kris
-.Male
+.Male:
call InitName
ret
-.Chris
+.Chris:
db "CHRIS@@@@@@"
-.Kris
+.Kris:
db "KRIS@@@@@@@"
; 60e9
@@ -1127,7 +1127,7 @@
dw TitleScreenEnd
; 62b7
-.NextScene ; Unreferenced
+.NextScene: ; Unreferenced
ld hl, wJumptableIndex
inc [hl]
ret
--- /dev/null
+++ b/engine/items.asm
@@ -1,0 +1,584 @@
+_ReceiveItem:: ; d1d5
+ call DoesHLEqualNumItems
+ jp nz, PutItemInPocket
+ push hl
+ call CheckItemPocket
+ pop de
+ ld a, [wItemAttributeParamBuffer]
+ dec a
+ ld hl, .Pockets
+ rst JumpTable
+ ret
+
+.Pockets: ; d1e9
+ dw .Item
+ dw .KeyItem
+ dw .Ball
+ dw .TMHM
+
+.Item: ; d1f1
+ ld h, d
+ ld l, e
+ jp PutItemInPocket
+
+.KeyItem: ; d1f6
+ ld h, d
+ ld l, e
+ jp ReceiveKeyItem
+
+.Ball: ; d1fb
+ ld hl, NumBalls
+ jp PutItemInPocket
+
+.TMHM: ; d201
+ ld h, d
+ ld l, e
+ ld a, [CurItem]
+ ld c, a
+ call GetTMHMNumber
+ jp ReceiveTMHM
+
+_TossItem:: ; d20d
+ call DoesHLEqualNumItems
+ jr nz, .remove
+ push hl
+ call CheckItemPocket
+ pop de
+ ld a, [wItemAttributeParamBuffer]
+ dec a
+ ld hl, .Pockets
+ rst JumpTable
+ ret
+
+.Pockets:
+ dw .Item
+ dw .KeyItem
+ dw .Ball
+ dw .TMHM
+
+.Ball: ; d228
+ ld hl, NumBalls
+ jp RemoveItemFromPocket
+
+.TMHM: ; d22e
+ ld h, d
+ ld l, e
+ ld a, [CurItem]
+ ld c, a
+ call GetTMHMNumber
+ jp TossTMHM
+
+.KeyItem: ; d23a
+ ld h, d
+ ld l, e
+ jp TossKeyItem
+
+.Item: ; d23f
+ ld h, d
+ ld l, e
+
+.remove
+ jp RemoveItemFromPocket
+
+_CheckItem:: ; d244
+ call DoesHLEqualNumItems
+ jr nz, .nope
+ push hl
+ call CheckItemPocket
+ pop de
+ ld a, [wItemAttributeParamBuffer]
+ dec a
+ ld hl, .Pockets
+ rst JumpTable
+ ret
+
+.Pockets:
+ dw .Item
+ dw .KeyItem
+ dw .Ball
+ dw .TMHM
+
+.Ball: ; d25f
+ ld hl, NumBalls
+ jp CheckTheItem
+
+.TMHM: ; d265
+ ld h, d
+ ld l, e
+ ld a, [CurItem]
+ ld c, a
+ call GetTMHMNumber
+ jp CheckTMHM
+
+.KeyItem: ; d271
+ ld h, d
+ ld l, e
+ jp CheckKeyItems
+
+.Item: ; d276
+ ld h, d
+ ld l, e
+
+.nope
+ jp CheckTheItem
+
+DoesHLEqualNumItems: ; d27b
+ ld a, l
+ cp NumItems % $100
+ ret nz
+ ld a, h
+ cp NumItems / $100
+ ret
+
+GetPocketCapacity: ; d283
+ ld c, MAX_ITEMS
+ ld a, e
+ cp NumItems % $100
+ jr nz, .not_bag
+ ld a, d
+ cp NumItems / $100
+ ret z
+
+.not_bag
+ ld c, MAX_PC_ITEMS
+ ld a, e
+ cp PCItems % $100
+ jr nz, .not_pc
+ ld a, d
+ cp PCItems / $100
+ ret z
+
+.not_pc
+ ld c, MAX_BALLS
+ ret
+
+PutItemInPocket: ; d29c
+ ld d, h
+ ld e, l
+ inc hl
+ ld a, [CurItem]
+ ld c, a
+ ld b, 0
+.loop
+ ld a, [hli]
+ cp -1
+ jr z, .terminator
+ cp c
+ jr nz, .next
+ ld a, 99
+ sub [hl]
+ add b
+ ld b, a
+ ld a, [wItemQuantityChangeBuffer]
+ cp b
+ jr z, .ok
+ jr c, .ok
+
+.next
+ inc hl
+ jr .loop
+
+.terminator
+ call GetPocketCapacity
+ ld a, [de]
+ cp c
+ jr c, .ok
+ and a
+ ret
+
+.ok
+ ld h, d
+ ld l, e
+ ld a, [CurItem]
+ ld c, a
+ ld a, [wItemQuantityChangeBuffer]
+ ld [wItemQuantityBuffer], a
+.loop2
+ inc hl
+ ld a, [hli]
+ cp -1
+ jr z, .terminator2
+ cp c
+ jr nz, .loop2
+ ld a, [wItemQuantityBuffer]
+ add [hl]
+ cp 100
+ jr nc, .newstack
+ ld [hl], a
+ jr .done
+
+.newstack
+ ld [hl], 99
+ sub 99
+ ld [wItemQuantityBuffer], a
+ jr .loop2
+
+.terminator2
+ dec hl
+ ld a, [CurItem]
+ ld [hli], a
+ ld a, [wItemQuantityBuffer]
+ ld [hli], a
+ ld [hl], -1
+ ld h, d
+ ld l, e
+ inc [hl]
+
+.done
+ scf
+ ret
+
+RemoveItemFromPocket: ; d2ff
+ ld d, h
+ ld e, l
+ ld a, [hli]
+ ld c, a
+ ld a, [CurItemQuantity]
+ cp c
+ jr nc, .ok ; memory
+ ld c, a
+ ld b, $0
+ add hl, bc
+ add hl, bc
+ ld a, [CurItem]
+ cp [hl]
+ inc hl
+ jr z, .skip
+ ld h, d
+ ld l, e
+ inc hl
+
+.ok
+ ld a, [CurItem]
+ ld b, a
+.loop
+ ld a, [hli]
+ cp b
+ jr z, .skip
+ cp -1
+ jr z, .nope
+ inc hl
+ jr .loop
+
+.skip
+ ld a, [wItemQuantityChangeBuffer]
+ ld b, a
+ ld a, [hl]
+ sub b
+ jr c, .nope
+ ld [hl], a
+ ld [wItemQuantityBuffer], a
+ and a
+ jr nz, .yup
+ dec hl
+ ld b, h
+ ld c, l
+ inc hl
+ inc hl
+.loop2
+ ld a, [hli]
+ ld [bc], a
+ inc bc
+ cp -1
+ jr nz, .loop2
+ ld h, d
+ ld l, e
+ dec [hl]
+
+.yup
+ scf
+ ret
+
+.nope
+ and a
+ ret
+
+CheckTheItem: ; d349
+ ld a, [CurItem]
+ ld c, a
+.loop
+ inc hl
+ ld a, [hli]
+ cp -1
+ jr z, .done
+ cp c
+ jr nz, .loop
+ scf
+ ret
+
+.done
+ and a
+ ret
+
+ReceiveKeyItem: ; d35a
+ ld hl, NumKeyItems
+ ld a, [hli]
+ cp MAX_KEY_ITEMS
+ jr nc, .nope
+ ld c, a
+ ld b, 0
+ add hl, bc
+ ld a, [CurItem]
+ ld [hli], a
+ ld [hl], -1
+ ld hl, NumKeyItems
+ inc [hl]
+ scf
+ ret
+
+.nope
+ and a
+ ret
+
+TossKeyItem: ; d374
+ ld a, [wd107]
+ ld e, a
+ ld d, 0
+ ld hl, NumKeyItems
+ ld a, [hl]
+ cp e
+ jr nc, .ok
+ call .Toss
+ ret nc
+ jr .ok2
+
+.ok
+ dec [hl]
+ inc hl
+ add hl, de
+
+.ok2
+ ld d, h
+ ld e, l
+ inc hl
+.loop
+ ld a, [hli]
+ ld [de], a
+ inc de
+ cp -1
+ jr nz, .loop
+ scf
+ ret
+
+.Toss: ; d396
+ ld hl, NumKeyItems
+ ld a, [CurItem]
+ ld c, a
+.loop3
+ inc hl
+ ld a, [hl]
+ cp c
+ jr z, .ok3
+ cp -1
+ jr nz, .loop3
+ xor a
+ ret
+
+.ok3
+ ld a, [NumKeyItems]
+ dec a
+ ld [NumKeyItems], a
+ scf
+ ret
+
+CheckKeyItems: ; d3b1
+ ld a, [CurItem]
+ ld c, a
+ ld hl, KeyItems
+.loop
+ ld a, [hli]
+ cp c
+ jr z, .done
+ cp -1
+ jr nz, .loop
+ and a
+ ret
+
+.done
+ scf
+ ret
+
+ReceiveTMHM: ; d3c4
+ dec c
+ ld b, 0
+ ld hl, TMsHMs
+ add hl, bc
+ ld a, [wItemQuantityChangeBuffer]
+ add [hl]
+ cp 100
+ jr nc, .toomany
+ ld [hl], a
+ scf
+ ret
+
+.toomany
+ and a
+ ret
+
+TossTMHM: ; d3d8
+ dec c
+ ld b, 0
+ ld hl, TMsHMs
+ add hl, bc
+ ld a, [wItemQuantityChangeBuffer]
+ ld b, a
+ ld a, [hl]
+ sub b
+ jr c, .nope
+ ld [hl], a
+ ld [wItemQuantityBuffer], a
+ jr nz, .yup
+ ld a, [wTMHMPocketScrollPosition]
+ and a
+ jr z, .yup
+ dec a
+ ld [wTMHMPocketScrollPosition], a
+
+.yup
+ scf
+ ret
+
+.nope
+ and a
+ ret
+
+CheckTMHM: ; d3fb
+ dec c
+ ld b, $0
+ ld hl, TMsHMs
+ add hl, bc
+ ld a, [hl]
+ and a
+ ret z
+ scf
+ ret
+
+GetTMHMNumber:: ; d407
+; Return the number of a TM/HM by item id c.
+
+ ld a, c
+
+; Skip any dummy items.
+ cp ITEM_C3 ; TM04-05
+ jr c, .done
+ cp ITEM_DC ; TM28-29
+ jr c, .skip
+
+ dec a
+.skip
+ dec a
+.done
+ sub TM01
+ inc a
+ ld c, a
+ ret
+
+GetNumberedTMHM: ; d417
+; Return the item id of a TM/HM by number c.
+
+ ld a, c
+
+; Skip any gaps.
+ cp ITEM_C3 - (TM01 - 1)
+ jr c, .done
+ cp ITEM_DC - (TM01 - 1) - 1
+ jr c, .skip_one
+
+.skip_two
+ inc a
+.skip_one
+ inc a
+.done
+ add TM01
+ dec a
+ ld c, a
+ ret
+
+_CheckTossableItem:: ; d427
+; Return 1 in wItemAttributeParamBuffer and carry if CurItem can't be removed from the bag.
+ ld a, ITEMATTR_PERMISSIONS
+ call GetItemAttr
+ bit 7, a
+ jr nz, ItemAttr_ReturnCarry
+ and a
+ ret
+
+CheckSelectableItem: ; d432
+; Return 1 in wItemAttributeParamBuffer and carry if CurItem can't be selected.
+ ld a, ITEMATTR_PERMISSIONS
+ call GetItemAttr
+ bit 6, a
+ jr nz, ItemAttr_ReturnCarry
+ and a
+ ret
+
+CheckItemPocket:: ; d43d
+; Return the pocket for CurItem in wItemAttributeParamBuffer.
+ ld a, ITEMATTR_POCKET
+ call GetItemAttr
+ and $f
+ ld [wItemAttributeParamBuffer], a
+ ret
+
+CheckItemContext: ; d448
+; Return the context for CurItem in wItemAttributeParamBuffer.
+ ld a, ITEMATTR_HELP
+ call GetItemAttr
+ and $f
+ ld [wItemAttributeParamBuffer], a
+ ret
+
+CheckItemMenu: ; d453
+; Return the menu for CurItem in wItemAttributeParamBuffer.
+ ld a, ITEMATTR_HELP
+ call GetItemAttr
+ swap a
+ and $f
+ ld [wItemAttributeParamBuffer], a
+ ret
+
+GetItemAttr: ; d460
+; Get attribute a of CurItem.
+
+ push hl
+ push bc
+
+ ld hl, ItemAttributes
+ ld c, a
+ ld b, 0
+ add hl, bc
+
+ xor a
+ ld [wItemAttributeParamBuffer], a
+
+ ld a, [CurItem]
+ dec a
+ ld c, a
+ ld a, NUM_ITEMATTRS
+ call AddNTimes
+ ld a, BANK(ItemAttributes)
+ call GetFarByte
+
+ pop bc
+ pop hl
+ ret
+
+ItemAttr_ReturnCarry: ; d47f
+ ld a, 1
+ ld [wItemAttributeParamBuffer], a
+ scf
+ ret
+
+GetItemPrice: ; d486
+; Return the price of CurItem in de.
+ push hl
+ push bc
+ ld a, ITEMATTR_PRICE
+ call GetItemAttr
+ ld e, a
+ ld a, ITEMATTR_PRICE_HI
+ call GetItemAttr
+ ld d, a
+ pop bc
+ pop hl
+ ret
--- a/engine/learn.asm
+++ b/engine/learn.asm
@@ -243,7 +243,7 @@
ld hl, .PoofForgot
ret
-.PoofForgot
+.PoofForgot:
; Poof! <MON> forgot <MOVE>. And…
text_jump UnknownText_0x1c574e
db "@"
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -204,7 +204,7 @@
ld a, $81
ld [rSC], a
-.Player1
+.Player1:
ld de, MUSIC_NONE
call PlayMusic
ld c, 3
@@ -1127,7 +1127,7 @@
pop hl
ret
-.TimeCapsuleAlt ; 28785
+.TimeCapsuleAlt: ; 28785
; Pokémon traded from RBY do not have held items, so GSC usually interprets the
; catch rate as an item. However, if the catch rate appears in this table, the
; item associated with the table entry is used instead.
--- a/engine/link_trade.asm
+++ b/engine/link_trade.asm
@@ -75,7 +75,7 @@
ret
; 16d640
-.draw_border: ; 16d640
+.draw_border ; 16d640
push hl
ld a, $30
ld [hli], a
@@ -107,7 +107,7 @@
ret
; 16d66d
-.fill_row: ; 16d66d
+.fill_row ; 16d66d
ld d, c
.loop4
ld [hli], a
--- a/engine/mail.asm
+++ b/engine/mail.asm
@@ -322,7 +322,7 @@
jp MenuTextBoxBackup
; 0x447b4
-.EmptyMailboxText ; 0x447b4
+.EmptyMailboxText: ; 0x447b4
text_jump _EmptyMailboxText
db "@"
@@ -431,13 +431,13 @@
ret
; 0x44861
-.JumpTable
+.JumpTable:
dw .ReadMail
dw .PutInPack
dw .AttachMail
dw .Cancel
-.ReadMail ; 0x44869
+.ReadMail: ; 0x44869
call FadeToMenu
ld a, [MenuSelection]
dec a
@@ -446,7 +446,7 @@
jp CloseSubmenu
; 0x44877
-.PutInPack ; 0x44877
+.PutInPack: ; 0x44877
ld hl, .MessageLostText
call MenuTextBox
call YesNoBox
@@ -472,15 +472,15 @@
jp MenuTextBoxBackup
; 0x448ac
-.PutAwayText ; 0x448ac
+.PutAwayText: ; 0x448ac
text_jump ClearedMailPutAwayText
db "@"
-.PackFullText ; 0x448b1
+.PackFullText: ; 0x448b1
text_jump MailPackFullText
db "@"
-.MessageLostText ; 0x448b6
+.MessageLostText: ; 0x448b6
text_jump MailMessageLostText
db "@"
@@ -497,7 +497,7 @@
jp CloseSRAM
; 0x448d2
-.AttachMail ; 0x448d2
+.AttachMail: ; 0x448d2
call FadeToMenu
xor a
ld [PartyMenuActionText], a
@@ -542,19 +542,19 @@
jp CloseSubmenu
; 0x4493c
-.HoldingMailText ; 0x4493c
+.HoldingMailText: ; 0x4493c
text_jump MailAlreadyHoldingItemText
db "@"
-.EggText ; 0x44941
+.EggText: ; 0x44941
text_jump MailEggText
db "@"
-.MailMovedText ; 0x44946
+.MailMovedText: ; 0x44946
text_jump MailMovedFromBoxText
db "@"
-.Cancel
+.Cancel:
ret
.TopMenuDataHeader: ; 0x4494c
@@ -564,7 +564,7 @@
dw .TopMenuData2
db 1 ; default option
-.TopMenuData2
+.TopMenuData2:
db %00010000 ; flags
db 4, 0 ; rows/columns?
db 1 ; horizontal spacing?
@@ -580,7 +580,7 @@
dw .SubMenuData2
db 1 ; default option
-.SubMenuData2
+.SubMenuData2:
db %10000000 ; flags
db 4 ; items
db "READ MAIL@"
--- a/engine/main_menu.asm
+++ b/engine/main_menu.asm
@@ -54,7 +54,7 @@
db "MOBILE STUDIUM@"
.Jumptable: ; 0x49d60
-
+
dw MainMenu_Continue
dw MainMenu_NewGame
dw MainMenu_Options
@@ -202,7 +202,7 @@
ld a, [w2DMenuFlags1]
set 5, a
ld [w2DMenuFlags1], a
- call Function1f1a
+ call GetScrollingMenuJoypad
ld a, [wMenuJoypad]
cp B_BUTTON
jr z, .b_button
@@ -250,7 +250,7 @@
call TextBox
ret
-.TimeFail
+.TimeFail:
call SpeechTextBox
ret
; 49e3d
@@ -291,11 +291,11 @@
ret
; 49e7f
-.TimeNotSet ; 49e7f
+.TimeNotSet: ; 49e7f
db "TIME NOT SET@"
; 49e8c
-.UnusedText ; 49e8c
+.UnusedText: ; 49e8c
; Clock time unknown
text_jump UnknownText_0x1c5182
db "@"
@@ -317,7 +317,7 @@
ret
; 49ea8
-.Days
+.Days:
db "SUN@"
db "MON@"
db "TUES@"
@@ -325,7 +325,7 @@
db "THURS@"
db "FRI@"
db "SATUR@"
-.Day
+.Day:
db "DAY@"
; 49ed0
--- a/engine/map_object_action.asm
+++ b/engine/map_object_action.asm
@@ -191,7 +191,7 @@
ret
; 456a
-.Directions ; 456a
+.Directions: ; 456a
db OW_DOWN, OW_RIGHT, OW_UP, OW_LEFT
; 456e
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -37,7 +37,7 @@
call .HandleObjectAction
ret
-.CheckObjectStillVisible
+.CheckObjectStillVisible:
ld hl, OBJECT_FLAGS2
add hl, bc
res 6, [hl]
@@ -107,7 +107,7 @@
and a
ret
-.HandleStepType
+.HandleStepType:
ld hl, OBJECT_STEP_TYPE
add hl, bc
ld a, [hl]
@@ -144,7 +144,7 @@
.bit5
ret
-.HandleObjectAction
+.HandleObjectAction:
ld hl, OBJECT_FLAGS1
add hl, bc
bit INVISIBLE, [hl]
@@ -534,7 +534,7 @@
rst JumpTable
ret
-.Pointers ; 47e9
+.Pointers: ; 47e9
dw .Null_00 ; 00
dw .RandomWalkY ; 01
dw .RandomWalkX ; 02
@@ -564,16 +564,16 @@
dw .MovementBoulderDust ; 1a
dw .MovementShakingGrass ; 1b
-.Null_00
+.Null_00:
ret
-.RandomWalkY
+.RandomWalkY:
call Random
ld a, [hRandomAdd]
and %00000001
jp .RandomWalkContinue
-.RandomWalkX
+.RandomWalkX:
call Random
ld a, [hRandomAdd]
and %00000001
@@ -580,13 +580,13 @@
or %00000010
jp .RandomWalkContinue
-.RandomWalkXY
+.RandomWalkXY:
call Random
ld a, [hRandomAdd]
and %00000011
jp .RandomWalkContinue
-.RandomSpin1
+.RandomSpin1:
call Random
ld a, [hRandomAdd]
and %00001100
@@ -595,7 +595,7 @@
ld [hl], a
jp RandomStepDuration_Slow
-.RandomSpin2
+.RandomSpin2:
ld hl, OBJECT_FACING
add hl, bc
ld a, [hl]
@@ -611,7 +611,7 @@
ld [hl], a
jp RandomStepDuration_Fast
-.Standing
+.Standing:
call Function462a
call EndSpriteMovement
ld hl, OBJECT_ACTION
@@ -622,48 +622,48 @@
ld [hl], STEP_TYPE_05
ret
-.ObeyDPad
+.ObeyDPad:
ld hl, Function5000
jp HandleMovementData
-.Movement08
+.Movement08:
ld hl, Function5015
jp HandleMovementData
-.Movement09
+.Movement09:
ld hl, Function5026
jp HandleMovementData
-.Movement0a
+.Movement0a:
jp _GetMovementPerson
-.Movement0b
+.Movement0b:
jp _GetMovementPerson
-.Movement0c
+.Movement0c:
jp _GetMovementPerson
-.Movement0d
+.Movement0d:
ld hl, Function5000
jp HandleMovementData
-.Movement0e
+.Movement0e:
jp _GetMovementPerson
-.Follow
+.Follow:
ld hl, GetFollowerNextMovementByte
jp HandleMovementData
-.Script
+.Script:
ld hl, GetMovementByte
jp HandleMovementData
-.Strength
+.Strength:
call MovementAnonymousJumptable
dw .Strength_Start
dw .Strength_Stop
-.Strength_Start
+.Strength_Start:
ld hl, OBJECT_NEXT_TILE
add hl, bc
ld a, [hl]
@@ -701,13 +701,13 @@
.on_pit
call IncrementObjectMovementByteIndex
-.Strength_Stop
+.Strength_Stop:
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
ld [hl], STANDING
ret
-.FollowNotExact
+.FollowNotExact:
ld hl, OBJECT_NEXT_MAP_X
add hl, bc
ld d, [hl]
@@ -769,7 +769,7 @@
ld [hl], PERSON_ACTION_STAND
ret
-.MovementBigStanding
+.MovementBigStanding:
call EndSpriteMovement
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@@ -782,7 +782,7 @@
ld [hl], STEP_TYPE_04
ret
-.MovementBouncing
+.MovementBouncing:
call EndSpriteMovement
ld hl, OBJECT_DIRECTION_WALKING
add hl, bc
@@ -795,22 +795,22 @@
ld [hl], STEP_TYPE_04
ret
-.MovementSpinCounterclockwise
+.MovementSpinCounterclockwise:
call MovementAnonymousJumptable
dw .MovementSpinInit
dw .MovementSpinRepeat
dw .MovementSpinTurnLeft
-.MovementSpinClockwise
+.MovementSpinClockwise:
call MovementAnonymousJumptable
dw .MovementSpinInit
dw .MovementSpinRepeat
dw .MovementSpinTurnRight
-.MovementSpinInit
+.MovementSpinInit:
call EndSpriteMovement
call IncrementObjectMovementByteIndex
-.MovementSpinRepeat
+.MovementSpinRepeat:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_STAND
@@ -827,23 +827,23 @@
call IncrementObjectMovementByteIndex
ret
-.MovementSpinTurnLeft
+.MovementSpinTurnLeft:
ld de, .DirectionData_Counterclockwise
call .MovementSpinNextFacing
jr .MovementSpinCounterclockwise
-.DirectionData_Counterclockwise ; 49c0
+.DirectionData_Counterclockwise: ; 49c0
db OW_RIGHT, OW_LEFT, OW_DOWN, OW_UP
-.MovementSpinTurnRight
+.MovementSpinTurnRight:
ld de, .DirectionData_Clockwise
call .MovementSpinNextFacing
jr .MovementSpinClockwise
-.DirectionData_Clockwise ; 49cc
+.DirectionData_Clockwise: ; 49cc
db OW_LEFT, OW_RIGHT, OW_UP, OW_DOWN
-.MovementSpinNextFacing
+.MovementSpinNextFacing:
ld hl, OBJECT_FACING
add hl, bc
ld a, [hl]
@@ -860,7 +860,7 @@
call DecrementObjectMovementByteIndex
ret
-.MovementShadow
+.MovementShadow:
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
add hl, bc
@@ -896,7 +896,7 @@
ld [hl], STEP_TYPE_TRACKING_OBJECT
ret
-.MovementEmote
+.MovementEmote:
call EndSpriteMovement
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
@@ -916,7 +916,7 @@
ld [hl], STEP_TYPE_TRACKING_OBJECT
ret
-.MovementBoulderDust
+.MovementBoulderDust:
call EndSpriteMovement
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
@@ -960,7 +960,7 @@
db 6, 2
db -6, 2
-.MovementShakingGrass
+.MovementShakingGrass:
call EndSpriteMovement
call ._MovementShadow_Grass_Emote_BoulderDust
ld hl, OBJECT_ACTION
@@ -978,7 +978,7 @@
ld [hl], STEP_TYPE_TRACKING_OBJECT
ret
-._MovementShadow_Grass_Emote_BoulderDust
+._MovementShadow_Grass_Emote_BoulderDust:
ld hl, OBJECT_RANGE
add hl, bc
ld a, [hl]
@@ -994,7 +994,7 @@
ld [hl], d
ret
-.MovementScreenShake
+.MovementScreenShake:
call EndSpriteMovement
ld hl, OBJECT_ACTION
add hl, bc
@@ -1014,7 +1014,7 @@
ld [hl], STEP_TYPE_15
ret
-._MovementScreenShake
+._MovementScreenShake:
ld d, a
and %00111111
ld e, a
@@ -1031,7 +1031,7 @@
add a
jr .loop
-.RandomWalkContinue
+.RandomWalkContinue:
call InitStep
call Function6ec1 ; check whether the object can move in that direction
jr c, .NewDuration
@@ -1054,7 +1054,7 @@
ld [hl], STEP_TYPE_PLAYER_WALK
ret
-.NewDuration
+.NewDuration:
call EndSpriteMovement
call Function462a
RandomStepDuration_Slow: ; 4b1d
@@ -1131,7 +1131,7 @@
dw .Jump
dw .Land
-.Jump
+.Jump:
call AddStepVector
call UpdateJumpPosition
ld hl, OBJECT_STEP_DURATION
@@ -1146,7 +1146,7 @@
call IncrementObjectStructField28
ret
-.Land
+.Land:
call AddStepVector
call UpdateJumpPosition
ld hl, OBJECT_STEP_DURATION
@@ -1219,7 +1219,7 @@
dw .DoSpinRise
; 4c23
-.InitSpin
+.InitSpin:
ld hl, OBJECT_STEP_FRAME
add hl, bc
ld [hl], 0
@@ -1227,7 +1227,7 @@
add hl, bc
ld [hl], 16
call IncrementObjectStructField28
-.DoSpin
+.DoSpin:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_SPIN
@@ -1238,7 +1238,7 @@
call IncrementObjectStructField28
ret
-.InitSpinRise
+.InitSpinRise:
ld hl, OBJECT_STEP_FRAME
add hl, bc
ld [hl], 0
@@ -1252,7 +1252,7 @@
add hl, bc
res 3, [hl]
call IncrementObjectStructField28
-.DoSpinRise
+.DoSpinRise:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_SPIN
@@ -1292,7 +1292,7 @@
dw .FinishStep
; 4c9a
-.InitWait
+.InitWait:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_00
@@ -1303,13 +1303,13 @@
ret
; 4caa
-.DoWait
+.DoWait:
ld hl, OBJECT_STEP_DURATION
add hl, bc
dec [hl]
ret nz
call IncrementObjectStructField28
-.InitDescent
+.InitDescent:
ld hl, OBJECT_STEP_FRAME
add hl, bc
ld [hl], 0
@@ -1323,7 +1323,7 @@
ret
; 4cc9
-.DoDescent
+.DoDescent:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_SPIN
@@ -1343,7 +1343,7 @@
dec [hl]
ret nz
call IncrementObjectStructField28
-.InitFinalSpin
+.InitFinalSpin:
ld hl, OBJECT_STEP_DURATION
add hl, bc
ld [hl], 16
@@ -1351,7 +1351,7 @@
ret
; 4cf5
-.DoFinalSpin
+.DoFinalSpin:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_SPIN
@@ -1359,7 +1359,7 @@
add hl, bc
dec [hl]
ret nz
-.FinishStep
+.FinishStep:
ld hl, OBJECT_STEP_FRAME
add hl, bc
ld [hl], 0
@@ -1381,7 +1381,7 @@
dw .Finish
; 4d1f
-.Init
+.Init:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_00
@@ -1389,7 +1389,7 @@
add hl, bc
ld [hl], 16
call IncrementObjectStructField28
-.Step
+.Step:
ld hl, OBJECT_STEP_DURATION
add hl, bc
dec [hl]
@@ -1407,7 +1407,7 @@
add hl, bc
ld [hl], 16
call IncrementObjectStructField28
-.Fall
+.Fall:
ld hl, OBJECT_31
add hl, bc
inc [hl]
@@ -1424,7 +1424,7 @@
dec [hl]
ret nz
call IncrementObjectStructField28
-.Finish
+.Finish:
ld hl, OBJECT_STEP_FRAME
add hl, bc
ld [hl], 0
@@ -1444,7 +1444,7 @@
dw .Run
; 4d85
-.Init
+.Init:
ld hl, OBJECT_STEP_DURATION
add hl, bc
ld [hl], 8
@@ -1452,7 +1452,7 @@
add hl, bc
ld [hl], 0
call IncrementObjectStructField28
-.Run
+.Run:
ld hl, OBJECT_SPRITE_Y_OFFSET
add hl, bc
ld a, [hl]
@@ -1476,7 +1476,7 @@
jp WaitStep_InPlace
; 4db5
-.Step
+.Step:
ld hl, OBJECT_STEP_DURATION
add hl, bc
ld a, [hl]
@@ -1548,7 +1548,7 @@
dw .Reset
dw StepType04
-.Reset
+.Reset:
call RestoreDefaultMovement
call GetInitialFacing
ld hl, OBJECT_FACING
@@ -1740,13 +1740,13 @@
dw .Init
dw .Run
-.Init
+.Init:
xor a
ld hl, OBJECT_29
add hl, bc
ld [hl], a
call IncrementObjectStructField28
-.Run
+.Run:
ld hl, OBJECT_29
add hl, bc
ld d, [hl]
@@ -1772,7 +1772,7 @@
call DeleteMapObject
ret
-.GetSign
+.GetSign:
ld hl, OBJECT_30
add hl, bc
and 1
@@ -1801,7 +1801,7 @@
dw .Init
dw .Run
-.Init
+.Init:
ld hl, OBJECT_ACTION
add hl, bc
ld [hl], PERSON_ACTION_10
@@ -1942,7 +1942,7 @@
jr nz, .loop
ret
-.StorePointer
+.StorePointer:
ld a, l
ld [wMovementPointer], a
ld a, h
@@ -2037,7 +2037,7 @@
ld a, movement_step_sleep_1
ret
-.CancelFollowIfLeaderMissing
+.CancelFollowIfLeaderMissing:
ld a, [wObjectFollow_Leader]
cp -1
jr z, .nope
@@ -2068,7 +2068,7 @@
pop bc
ret
-.ShadowObject
+.ShadowObject:
; vtile, palette, movement
db $00, PAL_OW_SILVER, SPRITEMOVEDATA_SHADOW
; 5538
@@ -2080,7 +2080,7 @@
pop bc
ret
-.BoulderDustObject
+.BoulderDustObject:
db $00, PAL_OW_SILVER, SPRITEMOVEDATA_BOULDERDUST
; 5547
SpawnEmote: ; 5547
@@ -2091,7 +2091,7 @@
pop bc
ret
-.EmoteObject
+.EmoteObject:
db $00, PAL_OW_SILVER, SPRITEMOVEDATA_EMOTE
; 5556
ShakeGrass: ; 5556
@@ -2116,7 +2116,7 @@
pop bc
ret
-.ScreenShakeObject
+.ScreenShakeObject:
db $00, PAL_OW_SILVER, SPRITEMOVEDATA_SCREENSHAKE
; 5579
DespawnEmote: ; 5579
@@ -2127,7 +2127,7 @@
pop bc
ret
-.DeleteEmote
+.DeleteEmote:
ld de, ObjectStructs
ld a, NUM_OBJECT_STRUCTS
.loop
@@ -2475,7 +2475,7 @@
call .DoStepsForAllObjects
ret
-.ResetStepVector
+.ResetStepVector:
xor a
ld [wPlayerStepVectorX], a
ld [wPlayerStepVectorY], a
@@ -2484,7 +2484,7 @@
ld [wPlayerStepDirection], a
ret
-.DoStepsForAllObjects
+.DoStepsForAllObjects:
ld bc, ObjectStructs
xor a
.loop
@@ -2871,7 +2871,7 @@
call .InitSpritesByPriority
ret
-.DeterminePriorities
+.DeterminePriorities:
xor a
ld hl, wMovementPointer
ld bc, NUM_OBJECT_STRUCTS
@@ -2924,7 +2924,7 @@
jr nz, .loop
ret
-.InitSpritesByPriority
+.InitSpritesByPriority:
ld hl, wMovementPointer
.next_sprite
ld a, [hli]
@@ -2943,7 +2943,7 @@
pop bc
jr .next_sprite
-.InitSprite
+.InitSprite:
ld hl, OBJECT_SPRITE_TILE
add hl, bc
ld a, [hl]
@@ -3069,7 +3069,7 @@
scf
ret
-.GetObjectStructPointer
+.GetObjectStructPointer:
ld c, a
ld b, 0
ld hl, .Addresses
@@ -3080,7 +3080,7 @@
ld b, [hl]
ret
-.Addresses ; 5ace
+.Addresses: ; 5ace
dw PlayerStruct
dw Object1Struct
dw Object2Struct
--- a/engine/map_setup.asm
+++ b/engine/map_setup.asm
@@ -248,7 +248,7 @@
dba EnterMapMusic ; 07
dba ForceMapMusic ; 08
dba FadeInMusic ; 09
- dba LoadBlockData ; 0a
+ dba LoadBlockData ; 0a (callback 1)
dba LoadNeighboringBlockData ; 0b
dba SaveScreen ; 0c
dba BufferScreen ; 0d
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -143,7 +143,7 @@
ld de, DefaultMart
ret
-.IsAMart
+.IsAMart:
ld hl, Marts
rept 2
add hl, de
@@ -165,7 +165,7 @@
jr nz, .loop
ret
-.MartFunctions
+.MartFunctions:
dw .HowMayIHelpYou
dw .TopMenu
dw .Buy
@@ -241,7 +241,7 @@
ld h, [hl]
ld l, a
ld de, CurMart
-.CopyMart
+.CopyMart:
ld a, [MartPointerBank]
call GetFarByte
ld [de], a
@@ -251,7 +251,7 @@
jr nz, .CopyMart
ld hl, wMartItem1BCD
ld de, CurMart + 1
-.ReadMartItem
+.ReadMartItem:
ld a, [de]
inc de
cp -1
@@ -299,7 +299,7 @@
ret
; 15c1a
-.CharToNybble ; 15c1a
+.CharToNybble: ; 15c1a
ld a, [de]
inc de
cp " "
@@ -427,7 +427,7 @@
ret
; 15cb0
-.MartTextFunctionPointers ; 15cb0
+.MartTextFunctionPointers: ; 15cb0
dwb .StandardMartPointers, 0
dwb .HerbShopPointers, 0
dwb .BargainShopPointers, 1
@@ -592,7 +592,7 @@
and a
ret
-.SoldOut
+.SoldOut:
ld a, MARTTEXT_SOLD_OUT
call LoadBuyMenuText
call JoyWaitAorB
@@ -651,7 +651,7 @@
db 1 ; default option
; 0x15e20
-.menudata2: ; 0x15e20
+.menudata2 ; 0x15e20
db $30 ; pointers
db 4, 8 ; rows, columns
db 1 ; horizontal spacing
@@ -846,7 +846,7 @@
ret
; 15eee
-.dw: ; 15eee
+.dw ; 15eee
dw .try_sell
dw .cant_buy
dw .cant_buy
@@ -856,12 +856,12 @@
dw .try_sell
; 15efc
-.cant_buy: ; 15efc
+.cant_buy ; 15efc
ret
; 15efd
-.try_sell: ; 15efd
+.try_sell ; 15efd
callba _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
@@ -936,7 +936,7 @@
db 1 ; default option
; 0x15f90
-.menudata2: ; 0x15f90
+.menudata2 ; 0x15f90
db $80 ; strings
db 3 ; items
db "BUY@"
--- a/engine/menu.asm
+++ b/engine/menu.asm
@@ -414,7 +414,7 @@
and a
ret
-.set_bit_7: ; 24299
+.set_bit_7 ; 24299
ld hl, w2DMenuFlags2
set 7, [hl]
scf
@@ -515,7 +515,7 @@
ret
; 24318
-.a_b_start_select: ; 24318
+.a_b_start_select ; 24318
xor a
ret
; 2431a
@@ -654,7 +654,7 @@
ret
; 243cd
-.copy: ; 243cd
+.copy ; 243cd
call GetMenuBoxDims
inc b
inc c
@@ -681,7 +681,7 @@
ret
; 243e7
-.ret: ; 243e7
+.ret ; 243e7
ret
; 243e8
@@ -763,7 +763,7 @@
ld hl, .Text_NoWindowsAvailableForPopping
call PrintText
call WaitBGMap
-.InfiniteLoop
+.InfiniteLoop:
jr .InfiniteLoop
; 24468
--- a/engine/mon_icons.asm
+++ b/engine/mon_icons.asm
@@ -14,7 +14,7 @@
ret
; 8e83f
-Function8e83f: ; 8e83f
+LoadMenuMonIcon: ; 8e83f
push hl
push de
push bc
@@ -28,9 +28,8 @@
.LoadIcon: ; 8e849
ld d, 0
ld hl, .Jumptable
-rept 2
add hl, de
-endr
+ add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
@@ -39,13 +38,13 @@
.Jumptable: ; 8e854 (23:6854)
- dw Function8e8d5 ; init
- dw Function8e961
- dw Function8e97d
- dw Trade_LoadMonIconGFX
- dw Function8e898
- dw Mobile_InitPartyMenuBGPal71
- dw .GetPartyMenuMonIcon
+ dw Function8e8d5 ; party menu
+ dw Function8e961 ; naming screen
+ dw Function8e97d ; moves (?)
+ dw Trade_LoadMonIconGFX ; trade
+ dw Function8e898 ; mobile
+ dw Mobile_InitPartyMenuBGPal71 ; mobile
+ dw .GetPartyMenuMonIcon ; unused
.GetPartyMenuMonIcon: ; 8e862 (23:6862)
@@ -89,7 +88,7 @@
call Function8e8d5
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
- ld a, $0
+ ld a, SPRITE_ANIM_SEQ_NULL
ld [hl], a
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -106,7 +105,7 @@
call SetPartyMonIconAnimSpeed
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
- ld a, $0
+ ld a, SPRITE_ANIM_SEQ_NULL
ld [hl], a
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -203,7 +202,7 @@
ld [hl], a
ret
-.getspeed: ; 8e94c (23:694c)
+.getspeed ; 8e94c (23:694c)
callba PlacePartymonHPBar
call GetHPPal
ld e, d
@@ -214,7 +213,7 @@
ret
; 8e95e (23:695e)
-.speeds: ; 8e95e
+.speeds ; 8e95e
db $00, $40, $80
; 8e961
@@ -229,7 +228,7 @@
call InitSpriteAnimStruct
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
- ld [hl], $0
+ ld [hl], SPRITE_ANIM_SEQ_NULL
ret
Function8e97d: ; 8e97d (23:697d)
--- a/engine/mon_menu.asm
+++ b/engine/mon_menu.asm
@@ -148,7 +148,7 @@
call GetMoveName
ret
-.NotMove
+.NotMove:
inc hl
ld a, [hl]
dec a
--- a/engine/money.asm
+++ b/engine/money.asm
@@ -191,7 +191,7 @@
ret
; 1608d
-.maxcoins: ; 1608d
+.maxcoins ; 1608d
bigdw 9999
; 1608f
--- a/engine/move_mon.asm
+++ b/engine/move_mon.asm
@@ -655,7 +655,7 @@
dec a
ld b, a
call Functiondcb6
-.CloseSRAM_And_ClearCarryFlag
+.CloseSRAM_And_ClearCarryFlag:
call CloseSRAM
and a
ret
@@ -1032,7 +1032,7 @@
ret
; df42
-.full: ; df42
+.full ; df42
call CloseSRAM
and a
ret
@@ -1481,18 +1481,18 @@
pop bc
jr .GotDV
-.Attack
+.Attack:
ld a, [hl]
swap a
and $f
jr .GotDV
-.Defense
+.Defense:
ld a, [hl]
and $f
jr .GotDV
-.Speed
+.Speed:
inc hl
ld a, [hl]
swap a
@@ -1499,12 +1499,12 @@
and $f
jr .GotDV
-.Special
+.Special:
inc hl
ld a, [hl]
and $f
-.GotDV
+.GotDV:
ld d, 0
add e
ld e, a
--- a/engine/movement.asm
+++ b/engine/movement.asm
@@ -55,8 +55,8 @@
dw Movement_fast_jump_step_up ; 35
dw Movement_fast_jump_step_left ; 36
dw Movement_fast_jump_step_right ; 37
- dw Movement_38 ; 38
- dw Movement_39 ; 39
+ dw Movement_remove_sliding ; 38
+ dw Movement_set_sliding ; 39
dw Movement_remove_fixed_facing ; 3a
dw Movement_fix_facing ; 3b
dw Movement_show_person ; 3c
@@ -85,7 +85,7 @@
dw Movement_hide_emote ; 53
dw Movement_show_emote ; 54
dw Movement_step_shake ; 55
- dw Movement_56 ; 56
+ dw Movement_tree_shake ; 56
dw Movement_rock_smash ; 57
dw Movement_return_dig ; 58
dw Movement_skyfall_top ; 59
@@ -353,7 +353,7 @@
ret
; 5279
-Movement_56: ; 5279
+Movement_tree_shake: ; 5279
ld a, 24
ld hl, OBJECT_STEP_DURATION
add hl, bc
@@ -373,7 +373,7 @@
ret
; 5293
-Movement_38: ; 5293
+Movement_remove_sliding: ; 5293
ld hl, OBJECT_FLAGS1
add hl, bc
res SLIDING, [hl]
@@ -380,7 +380,7 @@
jp ContinueReadingMovement
; 529c
-Movement_39: ; 529c
+Movement_set_sliding: ; 529c
ld hl, OBJECT_FLAGS1
add hl, bc
set SLIDING, [hl]
--- a/engine/mysterygift.asm
+++ b/engine/mysterygift.asm
@@ -198,9 +198,9 @@
inc hl
dec d
jr .loop
-.Yes
+.Yes:
scf
-.No
+.No:
jp CloseSRAM
.AddMysteryGiftPartnerID: ; 104a56 (41:4a56)
@@ -1350,7 +1350,7 @@
.Load16GFX: ; 105236 (41:5236)
ld b, 16
-.gfx_loop: ; 105238 (41:5238)
+.gfx_loop ; 105238 (41:5238)
ld [hli], a
inc a
dec b
@@ -1368,7 +1368,7 @@
.Load14Column: ; 105246 (41:5246)
ld b, 14
-.col_loop: ; 105248 (41:5248)
+.col_loop ; 105248 (41:5248)
ld [hl], a
ld de, SCREEN_WIDTH
add hl, de
@@ -1651,7 +1651,7 @@
.Load12Row: ; 1058ce (41:58ce)
ld b, 12
-.row_loop: ; 1058d0 (41:58d0)
+.row_loop ; 1058d0 (41:58d0)
ld [hli], a
inc a
dec b
@@ -1669,7 +1669,7 @@
.Load14Column: ; 1058de (41:58de)
ld b, 14
-.column_loop: ; 1058e0 (41:58e0)
+.column_loop ; 1058e0 (41:58e0)
ld [hl], a
ld de, SCREEN_WIDTH
add hl, de
--- a/engine/namingscreen.asm
+++ b/engine/namingscreen.asm
@@ -88,10 +88,10 @@
.Pokemon: ; 1173e (4:573e)
ld a, [CurPartySpecies]
ld [wd265], a
- ld hl, Function8e83f
- ld a, BANK(Function8e83f)
+ ld hl, LoadMenuMonIcon
+ ld a, BANK(LoadMenuMonIcon)
ld e, $1
- rst FarCall ; ; indirect jump to Function8e83f (8e83f (23:683f))
+ rst FarCall ; ; indirect jump to LoadMenuMonIcon (8e83f (23:683f))
ld a, [CurPartySpecies]
ld [wd265], a
call GetPokemonName
@@ -211,7 +211,7 @@
; 11839 (4:5839)
-.oTomodachi_no_namae_sutoringu: ; 11839
+.oTomodachi_no_namae_sutoringu ; 11839
db "おともだち の なまえは?@"
; 11847
@@ -1076,7 +1076,7 @@
INCBIN "gfx/icon/mail2.2bpp"
; 11f74
-.initwNamingScreenMaxNameLength: ; 11f74 (4:5f74)
+.initwNamingScreenMaxNameLength ; 11f74 (4:5f74)
ld a, MAIL_MSG_LENGTH + 1
ld [wNamingScreenMaxNameLength], a
ret
@@ -1176,7 +1176,7 @@
dw .init_blinking_cursor
dw .process_joypad
-.init_blinking_cursor: ; 1201b (4:601b)
+.init_blinking_cursor ; 1201b (4:601b)
depixel 9, 2
ld a, SPRITE_ANIM_INDEX_09
call _InitSpriteAnimStruct
@@ -1194,7 +1194,7 @@
inc [hl]
ret
-.process_joypad: ; 1203a (4:603a)
+.process_joypad ; 1203a (4:603a)
ld hl, hJoyPressed ; $ffa7
ld a, [hl]
and A_BUTTON
--- a/engine/options_menu.asm
+++ b/engine/options_menu.asm
@@ -52,7 +52,7 @@
call DelayFrames
jr .joypad_loop
-.ExitOptions
+.ExitOptions:
ld de, SFX_TRANSACTION
call PlaySFX
call WaitSFX
@@ -94,7 +94,7 @@
jp [hl] ; jump to the code of the current highlighted item
; e42e5
-.Pointers
+.Pointers:
dw Options_TextSpeed
dw Options_BattleScene
dw Options_BattleStyle
@@ -118,22 +118,22 @@
jr c, .Increase
ld c, FAST_TEXT +- 1
-.Increase
+.Increase:
inc c
ld a, e
jr .Save
-.LeftPressed
+.LeftPressed:
ld a, c
and a
jr nz, .Decrease
ld c, SLOW_TEXT + 1
-.Decrease
+.Decrease:
dec c
ld a, d
-.Save
+.Save:
ld b, a
ld a, [Options]
and $f0
@@ -140,7 +140,7 @@
or b
ld [Options], a
-.NonePressed
+.NonePressed:
ld b, 0
ld hl, .Strings
rept 2
@@ -155,16 +155,16 @@
ret
; e4331
-.Strings
+.Strings:
dw .Fast
dw .Mid
dw .Slow
-.Fast
+.Fast:
db "FAST@"
-.Mid
+.Mid:
db "MID @"
-.Slow
+.Slow:
db "SLOW@"
; e4346
@@ -203,26 +203,26 @@
jr nz, .ToggleOn
jr .ToggleOff
-.LeftPressed
+.LeftPressed:
bit BATTLE_SCENE, [hl]
jr z, .ToggleOff
jr .ToggleOn
-.NonePressed
+.NonePressed:
bit BATTLE_SCENE, [hl]
jr z, .ToggleOn
jr .ToggleOff
-.ToggleOn
+.ToggleOn:
res BATTLE_SCENE, [hl]
ld de, .On
jr .Display
-.ToggleOff
+.ToggleOff:
set BATTLE_SCENE, [hl]
ld de, .Off
-.Display
+.Display:
hlcoord 11, 5
call PlaceString
and a
@@ -229,9 +229,9 @@
ret
; e4398
-.On
+.On:
db "ON @"
-.Off
+.Off:
db "OFF@"
; e43a0
@@ -247,25 +247,25 @@
jr nz, .ToggleShift
jr .ToggleSet
-.LeftPressed
+.LeftPressed:
bit BATTLE_SHIFT, [hl]
jr z, .ToggleSet
jr .ToggleShift
-.NonePressed
+.NonePressed:
bit BATTLE_SHIFT, [hl]
jr nz, .ToggleSet
-.ToggleShift
+.ToggleShift:
res BATTLE_SHIFT, [hl]
ld de, .Shift
jr .Display
-.ToggleSet
+.ToggleSet:
set BATTLE_SHIFT, [hl]
ld de, .Set
-.Display
+.Display:
hlcoord 11, 7
call PlaceString
and a
@@ -272,9 +272,9 @@
ret
; e43d1
-.Shift
+.Shift:
db "SHIFT@"
-.Set
+.Set:
db "SET @"
; e43dd
@@ -290,32 +290,32 @@
jr nz, .SetMono
jr .SetStereo
-.LeftPressed
+.LeftPressed:
bit STEREO, [hl]
jr z, .SetStereo
jr .SetMono
-.NonePressed
+.NonePressed:
bit STEREO, [hl]
jr nz, .ToggleStereo
jr .ToggleMono
-.SetMono
+.SetMono:
res STEREO, [hl]
call RestartMapMusic
-.ToggleMono
+.ToggleMono:
ld de, .Mono
jr .Display
-.SetStereo
+.SetStereo:
set STEREO, [hl]
call RestartMapMusic
-.ToggleStereo
+.ToggleStereo:
ld de, .Stereo
-.Display
+.Display:
hlcoord 11, 9
call PlaceString
and a
@@ -322,9 +322,9 @@
ret
; e4416
-.Mono
+.Mono:
db "MONO @"
-.Stereo
+.Stereo:
db "STEREO@"
; e4424
@@ -341,26 +341,26 @@
jr c, .Increase
ld c, -1
-.Increase
+.Increase:
inc c
ld a, e
jr .Save
-.LeftPressed
+.LeftPressed:
ld a, c
and a
jr nz, .Decrease
ld c, 5
-.Decrease
+.Decrease:
dec c
ld a, d
-.Save
+.Save:
ld b, a
ld [GBPrinter], a
-.NonePressed
+.NonePressed:
ld b, $0
ld hl, .Strings
rept 2
@@ -375,7 +375,7 @@
ret
; e445a
-.Strings
+.Strings:
dw .Lightest
dw .Lighter
dw .Normal
@@ -382,15 +382,15 @@
dw .Darker
dw .Darkest
-.Lightest
+.Lightest:
db "LIGHTEST@"
-.Lighter
+.Lighter:
db "LIGHTER @"
-.Normal
+.Normal:
db "NORMAL @"
-.Darker
+.Darker:
db "DARKER @"
-.Darkest
+.Darkest:
db "DARKEST @"
; e4491
@@ -409,22 +409,22 @@
lb de, PRINT_LIGHTER, PRINT_DARKER ; the 2 values next to this setting
ret
-.IsLightest
+.IsLightest:
ld c, 0
lb de, PRINT_DARKEST, PRINT_LIGHTER ; the 2 values next to this setting
ret
-.IsLight
+.IsLight:
ld c, 1
lb de, PRINT_LIGHTEST, PRINT_NORMAL ; the 2 values next to this setting
ret
-.IsDark
+.IsDark:
ld c, 3
lb de, PRINT_NORMAL, PRINT_DARKEST ; the 2 values next to this setting
ret
-.IsDarkest
+.IsDarkest:
ld c, 4
lb de, PRINT_DARKER, PRINT_LIGHTEST ; the 2 values next to this setting
ret
@@ -441,25 +441,25 @@
jr nz, .ToggleOff
jr .ToggleOn
-.LeftPressed
+.LeftPressed:
bit MENU_ACCOUNT, [hl]
jr z, .ToggleOn
jr .ToggleOff
-.NonePressed
+.NonePressed:
bit MENU_ACCOUNT, [hl]
jr nz, .ToggleOn
-.ToggleOff
+.ToggleOff:
res MENU_ACCOUNT, [hl]
ld de, .Off
jr .Display
-.ToggleOn
+.ToggleOn:
set MENU_ACCOUNT, [hl]
ld de, .On
-.Display
+.Display:
hlcoord 11, 13
call PlaceString
and a
@@ -466,9 +466,9 @@
ret
; e44f2
-.Off
+.Off:
db "OFF@"
-.On
+.On:
db "ON @"
; e44fa
@@ -483,16 +483,16 @@
and a
ret
-.RightPressed
+.RightPressed:
ld a, [hl]
inc a
jr .Save
-.LeftPressed
+.LeftPressed:
ld a, [hl]
dec a
-.Save
+.Save:
and $7
ld [hl], a
UpdateFrame: ; e4512
@@ -512,7 +512,7 @@
and a
ret
-.Exit
+.Exit:
scf
ret
; e452a
@@ -527,7 +527,7 @@
and a
ret
-.DownPressed
+.DownPressed:
ld a, [hl] ; load the cursor position to a
cp $7 ; maximum number of items in option menu
jr nz, .CheckFive
@@ -535,17 +535,17 @@
scf
ret
-.CheckFive ; I have no idea why this exists...
+.CheckFive: ; I have no idea why this exists...
cp $5
jr nz, .Increase
ld [hl], $5
-.Increase
+.Increase:
inc [hl]
scf
ret
-.UpPressed
+.UpPressed:
ld a, [hl]
cp $6
jr nz, .NotSix
@@ -553,12 +553,12 @@
scf
ret
-.NotSix
+.NotSix:
and a
jr nz, .Decrease
ld [hl], $8 ; number of option items +1
-.Decrease
+.Decrease:
dec [hl]
scf
ret
--- a/engine/overworld.asm
+++ b/engine/overworld.asm
@@ -95,7 +95,7 @@
ld [PlayerObjectSprite], a
ret
-.Chris
+.Chris:
db PLAYER_NORMAL, SPRITE_CHRIS
db PLAYER_BIKE, SPRITE_CHRIS_BIKE
db PLAYER_SURF, SPRITE_SURF
@@ -102,7 +102,7 @@
db PLAYER_SURF_PIKA, SPRITE_SURFING_PIKACHU
db $ff
-.Kris
+.Kris:
db PLAYER_NORMAL, SPRITE_KRIS
db PLAYER_BIKE, SPRITE_KRIS_BIKE
db PLAYER_SURF, SPRITE_SURF
@@ -241,11 +241,11 @@
jr nc, .Variable
jr .Icon
-.Normal
+.Normal:
and a
ret
-.Icon
+.Icon:
sub SPRITE_POKEMON
ld e, a
ld d, 0
@@ -261,7 +261,7 @@
.wBreedMon2
ld a, [wBreedMon2Species]
-.Mon
+.Mon:
ld e, a
and a
jr z, .NoBreedmon
@@ -273,7 +273,7 @@
scf
ret
-.Variable
+.Variable:
sub SPRITE_VARS
ld e, a
ld d, 0
@@ -283,7 +283,7 @@
and a
jp nz, GetMonSprite
-.NoBreedmon
+.NoBreedmon:
ld a, 1
ld l, 1
ld h, 0
@@ -410,7 +410,7 @@
.done
ret
-.LoadSprite
+.LoadSprite:
call GetSprite
ld a, l
ret
@@ -424,7 +424,7 @@
ld c, SPRITE_GFX_LIST_CAPACITY
ld de, UsedSprites + (SPRITE_GFX_LIST_CAPACITY - 1) * 2
-.FindLastSprite
+.FindLastSprite:
ld a, [de]
and a
jr nz, .FoundLastSprite
@@ -433,7 +433,7 @@
endr
dec c
jr nz, .FindLastSprite
-.FoundLastSprite
+.FoundLastSprite:
dec c
jr z, .quit
@@ -443,12 +443,12 @@
inc de
ld hl, UsedSprites + 1
-.CheckSprite
+.CheckSprite:
push bc
push de
push hl
-.CheckFollowing
+.CheckFollowing:
ld a, [de]
cp [hl]
jr nc, .loop
@@ -499,7 +499,7 @@
ld hl, UsedSprites
ld c, SPRITE_GFX_LIST_CAPACITY
ld b, 0
-.FirstTableLength
+.FirstTableLength:
; Keep going until the end of the list.
ld a, [hli]
and a
@@ -523,11 +523,11 @@
dec c
jr nz, .FirstTableLength
-.SecondTable
+.SecondTable:
; The second tile table starts at tile $80.
ld b, $80
dec hl
-.SecondTableLength
+.SecondTableLength:
; Keep going until the end of the list.
ld a, [hli]
and a
@@ -565,11 +565,11 @@
ld a, 12
ret
-.AnyDirection
+.AnyDirection:
ld a, 12
ret
-.OneDirection
+.OneDirection:
ld a, 4
ret
; 1439b
--- a/engine/pack.asm
+++ b/engine/pack.asm
@@ -28,7 +28,7 @@
; 10030
.Jumptable: ; 10030 (4:4030)
-
+
dw .InitGFX ; 0
dw .InitItemsPocket ; 1
dw .ItemsPocketMenu ; 2
@@ -163,7 +163,7 @@
; 0x10137
.Jumptable1: ; 10137
-
+
dw .UseItem
dw QuitItemSubmenu
@@ -328,7 +328,7 @@
; 0x1026a
Jumptable_UseGiveTossRegisterQuit: ; 1026a
-
+
dw UseItem
dw GiveItem
dw TossMenu
@@ -354,7 +354,7 @@
; 0x10291
Jumptable_UseGiveTossQuit: ; 10291
-
+
dw UseItem
dw GiveItem
dw TossMenu
@@ -377,7 +377,7 @@
; 0x102ac
Jumptable_UseQuit: ; 102ac
-
+
dw UseItem
dw QuitItemSubmenu
; 102b0
@@ -399,7 +399,7 @@
; 0x102c7
Jumptable_UseRegisterQuit: ; 102c7
-
+
dw UseItem
dw RegisterItem
dw QuitItemSubmenu
@@ -423,7 +423,7 @@
; 0x102ea
Jumptable_GiveTossRegisterQuit: ; 102ea
-
+
dw GiveItem
dw TossMenu
dw RegisterItem
@@ -447,7 +447,7 @@
; 0x1030b
Jumptable_GiveTossQuit: ; 1030b
-
+
dw GiveItem
dw TossMenu
dw QuitItemSubmenu
@@ -462,8 +462,8 @@
ret
; 1031f
-.dw: ; 1031f (4:431f)
-
+.dw ; 1031f (4:431f)
+
dw .Oak
dw .Oak
dw .Oak
@@ -494,7 +494,7 @@
call Pack_InitColors
ret
-.NoPokemon
+.NoPokemon:
ld hl, TextJump_YouDontHaveAPkmn
call Pack_PrintTextNoScroll
ret
@@ -694,7 +694,7 @@
; 104c3
.Jumptable: ; 104c3 (4:44c3)
-
+
dw .InitGFX ; 0
dw .InitItemsPocket ; 1
dw .ItemsPocketMenu ; 2
@@ -833,7 +833,7 @@
ld de, .UsableJumptable
jr .proceed
-.NoUse
+.NoUse:
ld hl, .UnusableMenuDataHeader
ld de, .UnusableJumptable
.proceed
@@ -865,7 +865,7 @@
; 0x10614
.UsableJumptable: ; 10614
-
+
dw .Use
dw .Quit
; 10618
@@ -885,7 +885,7 @@
; 0x10627
.UnusableJumptable: ; 10627
-
+
dw .Quit
; 10629
@@ -897,7 +897,7 @@
ret
.ItemFunctionJumptable: ; 10637 (4:4637)
-
+
dw .Oak
dw .Oak
dw .Oak
@@ -941,12 +941,12 @@
jr z, .Oak
cp $2
jr z, .didnt_use_item
-.quit_run_script: ; 1067e (4:467e)
+.quit_run_script ; 1067e (4:467e)
ld a, 10
ld [wJumptableIndex], a
ret
-.didnt_use_item: ; 10684 (4:4684)
+.didnt_use_item ; 10684 (4:4684)
xor a
ld [wItemEffectSucceeded], a
ret
@@ -1002,7 +1002,7 @@
; 106d1
.Jumptable: ; 106d1 (4:46d1)
-
+
dw .ItemsPocket
dw .BallsPocket
dw .KeyItemsPocket
@@ -1148,8 +1148,8 @@
; 107e1
-.dw: ; 107e1 (4:47e1)
-
+.dw ; 107e1 (4:47e1)
+
dw .Items
dw .Balls
dw .KeyItems
@@ -1495,7 +1495,7 @@
ret
; 109e1
-.tilemap: ; 109e1
+.tilemap ; 109e1
db $00, $04, $04, $04, $01 ; top border
db $06, $07, $08, $09, $0a ; Items
db $02, $05, $05, $05, $03 ; bottom border
--- a/engine/party_menu.asm
+++ b/engine/party_menu.asm
@@ -263,7 +263,7 @@
ld [hli], a
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
; jr .okay
-.ThreeDigits
+.ThreeDigits:
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
; .okay
call PrintNum
@@ -359,11 +359,11 @@
ret
; 50221
-.string_able: ; 50221
+.string_able ; 50221
db "ABLE@"
; 50226
-.string_not_able: ; 50226
+.string_not_able ; 50226
db "NOT ABLE@"
; 5022f
@@ -448,10 +448,10 @@
ret
; 502a3
-.string_able: ; 502a3
+.string_able ; 502a3
db "ABLE@"
; 502a8
-.string_not_able: ; 502a8
+.string_not_able ; 502a8
db "NOT ABLE@"
; 502b1
@@ -496,15 +496,15 @@
ret
; 502ee
-.male: ; 502ee
+.male ; 502ee
db "♂…MALE@"
; 502f5
-.female: ; 502f5
+.female ; 502f5
db "♀…FEMALE@"
; 502fe
-.unknown: ; 502fe
+.unknown ; 502fe
db "…UNKNOWN@"
; 50307
@@ -658,8 +658,8 @@
.loop
push bc
push hl
- ld hl, Function8e83f
- ld a, BANK(Function8e83f)
+ ld hl, LoadMenuMonIcon
+ ld a, BANK(LoadMenuMonIcon)
ld e, $0
rst FarCall
ld a, [hObjectStructIndexBuffer]
@@ -752,8 +752,8 @@
ld [wPartyMenuCursor], a
ld a, [hJoyLast]
ld b, a
- bit 1, b
- jr nz, .exitmenu ; B button?
+ bit B_BUTTON_F, b
+ jr nz, .exitmenu ; B button
ld a, [wMenuCursorY]
dec a
ld [CurPartyMon], a
--- a/engine/phone.asm
+++ b/engine/phone.asm
@@ -60,7 +60,7 @@
xor a
ret
-.FoundOpenSpace
+.FoundOpenSpace:
dec hl
scf
ret
@@ -153,7 +153,7 @@
xor a
ret
-.timecheck: ; 900a6 (24:40a6)
+.timecheck ; 900a6 (24:40a6)
callba CheckReceiveCallTimer
ret
@@ -196,7 +196,7 @@
scf
ret
-.NothingToSample
+.NothingToSample:
xor a
ret
@@ -288,12 +288,12 @@
call CallScript
scf
ret
-.NoPhoneCall
+.NoPhoneCall:
xor a
ret
; 90173 (24:4173)
-.script: ; 0x90173
+.script ; 0x90173
pause 30
jump Script_ReceivePhoneCall
; 0x90178
@@ -363,7 +363,7 @@
ld hl, PhoneScript_JustTalkToThem
jr .DoPhoneCall
-.GetPhoneScript
+.GetPhoneScript:
ld hl, PHONE_CONTACT_SCRIPT1_BANK
add hl, de
ld b, [hl]
@@ -374,13 +374,13 @@
ld l, a
jr .DoPhoneCall
-.OutOfArea
+.OutOfArea:
ld b, BANK(UnknownScript_0x90209)
ld de, UnknownScript_0x90209
call ExecuteCallbackScript
ret
-.DoPhoneCall
+.DoPhoneCall:
ld a, b
ld [wd002], a
ld a, l
@@ -430,10 +430,10 @@
WrongNumber: ; 90233
db TRAINER_NONE, PHONE_00
dba .script
-.script:
+.script
writetext .text
end
-.text:
+.text
; Huh? Sorry, wrong number!
text_jump UnknownText_0x1c5565
db "@"
@@ -451,22 +451,20 @@
; 0x90255
Script_SpecialBillCall:: ; 0x90255
- callasm Function9025c
+ callasm .LoadBillScript
jump Script_ReceivePhoneCall
-; 0x9025c
-Function9025c: ; 9025c
+.LoadBillScript:
ld e, PHONE_BILL
jp LoadCallerScript
; 90261
UnknownScript_0x90261: ; 0x90261
- callasm Function9026a
+ callasm .LoadElmScript
pause 30
jump Script_ReceivePhoneCall
-; 0x9026a
-Function9026a: ; 9026a
+.LoadElmScript:
ld e, PHONE_ELM
jp LoadCallerScript
; 9026f
@@ -494,7 +492,6 @@
call Function90363
ret
-
PhoneCall:: ; 9029a
ld a, b
ld [PhoneScriptBank], a
@@ -697,7 +694,7 @@
call PlaceString
ret
-.NotTrainer
+.NotTrainer:
push hl
ld c, b
ld b, 0
@@ -721,12 +718,12 @@
dw .elm
dw .buena
-.none: db "----------@"
-.mom: db "MOM:@"
-.bill: db "BILL:@"
-.elm: db "PROF.ELM:@"
-.bikeshop: db "BIKE SHOP:@"
-.buena: db "BUENA:", $22, " DISC JOCKEY@"
+.none db "----------@"
+.mom db "MOM:@"
+.bill db "BILL:@"
+.elm db "PROF.ELM:@"
+.bikeshop db "BIKE SHOP:@"
+.buena db "BUENA:", $22, " DISC JOCKEY@"
; 90423
Phone_GetTrainerName: ; 90423 (24:4423)
--- a/engine/phone_scripts.asm
+++ b/engine/phone_scripts.asm
@@ -3137,7 +3137,7 @@
.TooEnergetic:
farjump .unnecessary
-.unnecessary:
+.unnecessary
farwritetext UnknownText_0x1b522b
buttonsound
farjump PhoneScript_HangupText_Male
--- a/engine/player_movement.asm
+++ b/engine/player_movement.asm
@@ -11,7 +11,7 @@
ld [wPlayerNextMovement], a
ret
-.GetDPad
+.GetDPad:
ld a, [hJoyDown]
ld [CurInput], a
@@ -32,7 +32,7 @@
ret
; 8002d
-.TranslateIntoMovement
+.TranslateIntoMovement:
ld a, [PlayerState]
cp PLAYER_NORMAL
jr z, .Normal
@@ -45,7 +45,7 @@
cp PLAYER_SLIP
jr z, .Ice
-.Normal
+.Normal:
call .CheckForced
call .GetAction
call .CheckTile
@@ -60,7 +60,7 @@
ret c
jr .NotMoving
-.Surf
+.Surf:
call .CheckForced
call .GetAction
call .CheckTile
@@ -71,7 +71,7 @@
ret c
jr .NotMoving
-.Ice
+.Ice:
call .CheckForced
call .GetAction
call .CheckTile
@@ -88,12 +88,12 @@
cp STANDING
jr z, .HitWall
call .BumpSound
-.HitWall
+.HitWall:
call .StandInPlace
xor a
ret
-.NotMoving
+.NotMoving:
ld a, [WalkingDirection]
cp STANDING
jr z, .Standing
@@ -103,12 +103,12 @@
and a
jr nz, .CantMove
call .BumpSound
-.CantMove
+.CantMove:
call ._WalkInPlace
xor a
ret
-.Standing
+.Standing:
call .StandInPlace
xor a
ret
@@ -121,12 +121,12 @@
ld a, [PlayerStandingTile]
ld c, a
call CheckWhirlpoolTile
- jr c, .asm_800c4
+ jr c, .not_whirlpool
ld a, 3
scf
ret
-.asm_800c4
+.not_whirlpool
and $f0
cp $30 ; moving water
jr z, .water
@@ -347,7 +347,7 @@
scf
ret
-.ExitWater
+.ExitWater:
call .GetOutOfWater
call PlayMapMusic
ld a, STEP_WALK
@@ -386,7 +386,7 @@
scf
ret
-.DontJump
+.DontJump:
xor a
ret
@@ -442,11 +442,11 @@
xor a
ret
-.EdgeWarps
+.EdgeWarps:
db $70, $78, $76, $7e
; 8025f
-.DoStep
+.DoStep:
ld e, a
ld d, 0
ld hl, .Steps
@@ -473,7 +473,7 @@
ld a, 4
ret
-.Steps
+.Steps:
dw .SlowStep
dw .NormalStep
dw .FastStep
@@ -483,42 +483,42 @@
dw .BackJumpStep
dw .InPlace
-.SlowStep
+.SlowStep:
slow_step_down
slow_step_up
slow_step_left
slow_step_right
-.NormalStep
+.NormalStep:
step_down
step_up
step_left
step_right
-.FastStep
+.FastStep:
big_step_down
big_step_up
big_step_left
big_step_right
-.JumpStep
+.JumpStep:
jump_step_down
jump_step_up
jump_step_left
jump_step_right
-.SlideStep
+.SlideStep:
fast_slide_step_down
fast_slide_step_up
fast_slide_step_left
fast_slide_step_right
-.BackJumpStep
+.BackJumpStep:
jump_step_up
jump_step_down
jump_step_right
jump_step_left
-.TurningStep
+.TurningStep:
turn_step_down
turn_step_up
turn_step_left
turn_step_right
-.InPlace
+.InPlace:
db $80 + movement_turn_head_down
db $80 + movement_turn_head_up
db $80 + movement_turn_head_left
@@ -719,7 +719,7 @@
xor a
ret
-.NotWalkable
+.NotWalkable:
scf
ret
; 803b4
@@ -741,7 +741,7 @@
and a
ret
-.NotSurfable
+.NotSurfable:
scf
ret
; 803ca
@@ -779,16 +779,16 @@
jr .Neither
-.Water
+.Water:
xor a
ret
-.Land
+.Land:
ld a, 1
and a
ret
-.Neither
+.Neither:
scf
ret
; 803ee
--- /dev/null
+++ b/engine/player_object.asm
@@ -1,0 +1,856 @@
+BlankScreen: ; 8000
+ call DisableSpriteUpdates
+ xor a
+ ld [hBGMapMode], a
+ call ClearBGPalettes
+ call ClearSprites
+ hlcoord 0, 0
+ ld bc, TileMapEnd - TileMap
+ ld a, " "
+ call ByteFill
+ hlcoord 0, 0, AttrMap
+ ld bc, AttrMapEnd - AttrMap
+ ld a, $7
+ call ByteFill
+ call WaitBGMap2
+ call SetPalettes
+ ret
+
+SpawnPlayer: ; 8029
+ ld a, -1
+ ld [wObjectFollow_Leader], a
+ ld [wObjectFollow_Follower], a
+ ld a, $0
+ ld hl, PlayerObjectTemplate
+ call CopyPlayerObjectTemplate
+ ld b, $0
+ call PlayerSpawn_ConvertCoords
+ ld a, $0
+ call GetMapObject
+ ld hl, MAPOBJECT_COLOR
+ add hl, bc
+ ln e, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT
+ ld a, [wPlayerSpriteSetupFlags]
+ bit 2, a
+ jr nz, .ok
+ ld a, [PlayerGender]
+ bit 0, a
+ jr z, .ok
+ ln e, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT
+
+.ok
+ ld [hl], e
+ ld a, $0
+ ld [hMapObjectIndexBuffer], a
+ ld bc, MapObjects
+ ld a, $0
+ ld [hObjectStructIndexBuffer], a
+ ld de, ObjectStructs
+ call CopyMapObjectToObjectStruct
+ ld a, PLAYER
+ ld [wCenteredObject], a
+ ret
+
+PlayerObjectTemplate: ; 8071
+; A dummy map object used to initialize the player object.
+; Shorter than the actual amount copied by two bytes.
+; Said bytes seem to be unused.
+ person_event SPRITE_CHRIS, -4, -4, SPRITEMOVEDATA_PLAYER, 15, 15, -1, -1, 0, PERSONTYPE_SCRIPT, 0, 0, -1
+
+CopyDECoordsToMapObject:: ; 807e
+ push de
+ ld a, b
+ call GetMapObject
+ pop de
+ ld hl, MAPOBJECT_X_COORD
+ add hl, bc
+ ld [hl], d
+ ld hl, MAPOBJECT_Y_COORD
+ add hl, bc
+ ld [hl], e
+ ret
+
+PlayerSpawn_ConvertCoords: ; 808f
+ push bc
+ ld a, [XCoord]
+ add 4
+ ld d, a
+ ld a, [YCoord]
+ add 4
+ ld e, a
+ pop bc
+ call CopyDECoordsToMapObject
+ ret
+
+WritePersonXY:: ; 80a1
+ ld a, b
+ call CheckObjectVisibility
+ ret c
+
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, bc
+ ld d, [hl]
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, bc
+ ld e, [hl]
+ ld a, [hMapObjectIndexBuffer]
+ ld b, a
+ call CopyDECoordsToMapObject
+ and a
+ ret
+
+RefreshPlayerCoords: ; 80b8
+ ld a, [XCoord]
+ add 4
+ ld d, a
+ ld hl, PlayerStandingMapX
+ sub [hl]
+ ld [hl], d
+ ld hl, MapObjects + MAPOBJECT_X_COORD
+ ld [hl], d
+ ld hl, PlayerLastMapX
+ ld [hl], d
+ ld d, a
+ ld a, [YCoord]
+ add 4
+ ld e, a
+ ld hl, PlayerStandingMapY
+ sub [hl]
+ ld [hl], e
+ ld hl, MapObjects + MAPOBJECT_Y_COORD
+ ld [hl], e
+ ld hl, PlayerLastMapY
+ ld [hl], e
+ ld e, a
+ ld a, [wObjectFollow_Leader]
+ cp $0
+ ret nz ; wtf
+ ret
+
+CopyObjectStruct:: ; 80e7
+ call CheckObjectMask
+ and a
+ ret nz ; masked
+
+ ld hl, ObjectStructs + OBJECT_STRUCT_LENGTH * 1
+ ld a, 1
+ ld de, OBJECT_STRUCT_LENGTH
+.loop
+ ld [hObjectStructIndexBuffer], a
+ ld a, [hl]
+ and a
+ jr z, .done
+ add hl, de
+ ld a, [hObjectStructIndexBuffer]
+ inc a
+ cp NUM_OBJECT_STRUCTS
+ jr nz, .loop
+ scf
+ ret ; overflow
+
+.done
+ ld d, h
+ ld e, l
+ call CopyMapObjectToObjectStruct
+ ld hl, VramState
+ bit 7, [hl]
+ ret z
+
+ ld hl, OBJECT_FLAGS2
+ add hl, de
+ set 5, [hl]
+ ret
+
+CopyMapObjectToObjectStruct: ; 8116
+ call .CopyMapObjectToTempObject
+ call CopyTempObjectToObjectStruct
+ ret
+
+.CopyMapObjectToTempObject: ; 811d
+ ld a, [hObjectStructIndexBuffer]
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld [hl], a
+
+ ld a, [hMapObjectIndexBuffer]
+ ld [wTempObjectCopyMapObjectIndex], a
+
+ ld hl, MAPOBJECT_SPRITE
+ add hl, bc
+ ld a, [hl]
+ ld [wTempObjectCopySprite], a
+
+ call GetSpriteVTile
+ ld [wTempObjectCopySpriteVTile], a
+
+ ld a, [hl]
+ call GetSpritePalette
+ ld [wTempObjectCopyPalette], a
+
+ ld hl, MAPOBJECT_COLOR
+ add hl, bc
+ ld a, [hl]
+ and $f0
+ jr z, .skip_color_override
+ swap a
+ and $7 ; OAM_PALETTE
+ ld [wTempObjectCopyPalette], a
+
+.skip_color_override
+ ld hl, MAPOBJECT_MOVEMENT
+ add hl, bc
+ ld a, [hl]
+ ld [wTempObjectCopyMovement], a
+
+ ld hl, MAPOBJECT_RANGE
+ add hl, bc
+ ld a, [hl]
+ ld [wTempObjectCopyRange], a
+
+ ld hl, MAPOBJECT_X_COORD
+ add hl, bc
+ ld a, [hl]
+ ld [wTempObjectCopyX], a
+
+ ld hl, MAPOBJECT_Y_COORD
+ add hl, bc
+ ld a, [hl]
+ ld [wTempObjectCopyY], a
+
+ ld hl, MAPOBJECT_RADIUS
+ add hl, bc
+ ld a, [hl]
+ ld [wTempObjectCopyRadius], a
+ ret
+
+InitializeVisibleSprites: ; 8177
+ ld bc, MapObjects + OBJECT_LENGTH
+ ld a, 1
+.loop
+ ld [hMapObjectIndexBuffer], a
+ ld hl, MAPOBJECT_SPRITE
+ add hl, bc
+ ld a, [hl]
+ and a
+ jr z, .next
+
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld a, [hl]
+ cp -1
+ jr nz, .next
+
+ ld a, [XCoord]
+ ld d, a
+ ld a, [YCoord]
+ ld e, a
+
+ ld hl, MAPOBJECT_X_COORD
+ add hl, bc
+ ld a, [hl]
+ add 1
+ sub d
+ jr c, .next
+
+ cp MAPOBJECT_SCREEN_WIDTH
+ jr nc, .next
+
+ ld hl, MAPOBJECT_Y_COORD
+ add hl, bc
+ ld a, [hl]
+ add 1
+ sub e
+ jr c, .next
+
+ cp MAPOBJECT_SCREEN_HEIGHT
+ jr nc, .next
+
+ push bc
+ call CopyObjectStruct
+ pop bc
+ jp c, .ret
+
+.next
+ ld hl, OBJECT_LENGTH
+ add hl, bc
+ ld b, h
+ ld c, l
+ ld a, [hMapObjectIndexBuffer]
+ inc a
+ cp NUM_OBJECTS
+ jr nz, .loop
+ ret
+
+.ret ; 81c9
+ ret
+
+CheckObjectEnteringVisibleRange:: ; 81ca
+ nop
+ ld a, [wPlayerStepDirection]
+ cp STANDING
+ ret z
+ ld hl, .dw
+ rst JumpTable
+ ret
+
+.dw ; 81d6
+ dw .Down
+ dw .Up
+ dw .Left
+ dw .Right
+
+.Up: ; 81de
+ ld a, [YCoord]
+ sub 1
+ jr .Vertical
+
+.Down: ; 81e5
+ ld a, [YCoord]
+ add 9
+.Vertical: ; 81ea
+ ld d, a
+ ld a, [XCoord]
+ ld e, a
+ ld bc, MapObjects + OBJECT_LENGTH
+ ld a, 1
+.loop_v
+ ld [hMapObjectIndexBuffer], a
+ ld hl, MAPOBJECT_SPRITE
+ add hl, bc
+ ld a, [hl]
+ and a
+ jr z, .next_v
+ ld hl, MAPOBJECT_Y_COORD
+ add hl, bc
+ ld a, d
+ cp [hl]
+ jr nz, .next_v
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld a, [hl]
+ cp -1
+ jr nz, .next_v
+ ld hl, MAPOBJECT_X_COORD
+ add hl, bc
+ ld a, [hl]
+ add 1
+ sub e
+ jr c, .next_v
+ cp MAPOBJECT_SCREEN_WIDTH
+ jr nc, .next_v
+ push de
+ push bc
+ call CopyObjectStruct
+ pop bc
+ pop de
+
+.next_v
+ ld hl, OBJECT_LENGTH
+ add hl, bc
+ ld b, h
+ ld c, l
+ ld a, [hMapObjectIndexBuffer]
+ inc a
+ cp NUM_OBJECTS
+ jr nz, .loop_v
+ ret
+
+.Left: ; 8232
+ ld a, [XCoord]
+ sub 1
+ jr .Horizontal
+
+.Right: ; 8239
+ ld a, [XCoord]
+ add 10
+.Horizontal: ; 823e
+ ld e, a
+ ld a, [YCoord]
+ ld d, a
+ ld bc, MapObjects + OBJECT_LENGTH
+ ld a, 1
+.loop_h
+ ld [hMapObjectIndexBuffer], a
+ ld hl, MAPOBJECT_SPRITE
+ add hl, bc
+ ld a, [hl]
+ and a
+ jr z, .next_h
+ ld hl, MAPOBJECT_X_COORD
+ add hl, bc
+ ld a, e
+ cp [hl]
+ jr nz, .next_h
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld a, [hl]
+ cp -1
+ jr nz, .next_h
+ ld hl, MAPOBJECT_Y_COORD
+ add hl, bc
+ ld a, [hl]
+ add 1
+ sub d
+ jr c, .next_h
+ cp MAPOBJECT_SCREEN_HEIGHT
+ jr nc, .next_h
+ push de
+ push bc
+ call CopyObjectStruct
+ pop bc
+ pop de
+
+.next_h
+ ld hl, OBJECT_LENGTH
+ add hl, bc
+ ld b, h
+ ld c, l
+ ld a, [hMapObjectIndexBuffer]
+ inc a
+ cp NUM_OBJECTS
+ jr nz, .loop_h
+ ret
+
+CopyTempObjectToObjectStruct: ; 8286
+ ld a, [wTempObjectCopyMapObjectIndex]
+ ld hl, OBJECT_MAP_OBJECT_INDEX
+ add hl, de
+ ld [hl], a
+
+ ld a, [wTempObjectCopyMovement]
+ call CopySpriteMovementData
+
+ ld a, [wTempObjectCopyPalette]
+ ld hl, OBJECT_PALETTE
+ add hl, de
+ or [hl]
+ ld [hl], a
+
+ ld a, [wTempObjectCopyY]
+ call .InitYCoord
+
+ ld a, [wTempObjectCopyX]
+ call .InitXCoord
+
+ ld a, [wTempObjectCopySprite]
+ ld hl, OBJECT_SPRITE
+ add hl, de
+ ld [hl], a
+
+ ld a, [wTempObjectCopySpriteVTile]
+ ld hl, OBJECT_SPRITE_TILE
+ add hl, de
+ ld [hl], a
+
+ ld hl, OBJECT_STEP_TYPE
+ add hl, de
+ ld [hl], STEP_TYPE_00
+
+ ld hl, OBJECT_FACING_STEP
+ add hl, de
+ ld [hl], STANDING
+
+ ld a, [wTempObjectCopyRadius]
+ call .InitRadius
+
+ ld a, [wTempObjectCopyRange]
+ ld hl, OBJECT_RANGE
+ add hl, de
+ ld [hl], a
+
+ and a
+ ret
+
+.InitYCoord: ; 82d5
+ ld hl, OBJECT_INIT_Y
+ add hl, de
+ ld [hl], a
+
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, de
+ ld [hl], a
+
+ ld hl, YCoord
+ sub [hl]
+ and $f
+ swap a
+ ld hl, wFollowNotExactPersonY
+ sub [hl]
+ ld hl, OBJECT_SPRITE_Y
+ add hl, de
+ ld [hl], a
+ ret
+
+.InitXCoord: ; 82f1
+ ld hl, OBJECT_INIT_X
+ add hl, de
+ ld [hl], a
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, de
+ ld [hl], a
+ ld hl, XCoord
+ sub [hl]
+ and $f
+ swap a
+ ld hl, wFollowNotExactPersonX
+ sub [hl]
+ ld hl, OBJECT_SPRITE_X
+ add hl, de
+ ld [hl], a
+ ret
+
+.InitRadius: ; 830d
+ ld h, a
+ inc a
+ and $f
+ ld l, a
+ ld a, h
+ add $10
+ and $f0
+ or l
+ ld hl, OBJECT_RADIUS
+ add hl, de
+ ld [hl], a
+ ret
+
+TrainerWalkToPlayer: ; 831e
+ ld a, [hLastTalked]
+ call InitMovementBuffer
+ ld a, movement_step_sleep_1
+ call AppendToMovementBuffer
+ ld a, [wd03f]
+ dec a
+ jr z, .TerminateStep
+ ld a, [hLastTalked]
+ ld b, a
+ ld c, PLAYER
+ ld d, 1
+ call .GetPathToPlayer
+ call DecrementMovementBufferCount
+
+.TerminateStep:
+ ld a, movement_step_end
+ call AppendToMovementBuffer
+ ret
+
+.GetPathToPlayer: ; 8341
+ push de
+ push bc
+; get player object struct, load to de
+ ld a, c
+ call GetMapObject
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld a, [hl]
+ call GetObjectStruct
+ ld d, b
+ ld e, c
+
+; get last talked object struct, load to bc
+ pop bc
+ ld a, b
+ call GetMapObject
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld a, [hl]
+ call GetObjectStruct
+
+; get last talked coords, load to bc
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, bc
+ ld a, [hl]
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, bc
+ ld c, [hl]
+ ld b, a
+
+; get player coords, load to de
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, de
+ ld a, [hl]
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, de
+ ld e, [hl]
+ ld d, a
+
+ pop af
+ call ComputePathToWalkToPlayer
+ ret
+
+Special_SurfStartStep: ; 8379
+ call InitMovementBuffer
+ call .GetMovementData
+ call AppendToMovementBuffer
+ ld a, movement_step_end
+ call AppendToMovementBuffer
+ ret
+
+.GetMovementData: ; 8388
+ ld a, [PlayerDirection]
+ srl a
+ srl a
+ and 3
+ ld e, a
+ ld d, 0
+ ld hl, .movement_data
+ add hl, de
+ ld a, [hl]
+ ret
+
+.movement_data
+ slow_step_down
+ slow_step_up
+ slow_step_left
+ slow_step_right
+
+FollowNotExact:: ; 839e
+ push bc
+ ld a, c
+ call CheckObjectVisibility
+ ld d, b
+ ld e, c
+ pop bc
+ ret c
+
+ ld a, b
+ call CheckObjectVisibility
+ ret c
+
+; Person 2 is now in bc, person 1 is now in de
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, bc
+ ld a, [hl]
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, bc
+ ld c, [hl]
+ ld b, a
+
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, de
+ ld a, [hl]
+ cp b
+ jr z, .same_x
+ jr c, .to_the_left
+ inc b
+ jr .continue
+
+.to_the_left
+ dec b
+ jr .continue
+
+.same_x
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, de
+ ld a, [hl]
+ cp c
+ jr z, .continue
+ jr c, .below
+ inc c
+ jr .continue
+
+.below
+ dec c
+
+.continue
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, de
+ ld [hl], b
+ ld a, b
+ ld hl, XCoord
+ sub [hl]
+ and $f
+ swap a
+ ld hl, wFollowNotExactPersonX
+ sub [hl]
+ ld hl, OBJECT_SPRITE_X
+ add hl, de
+ ld [hl], a
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, de
+ ld [hl], c
+ ld a, c
+ ld hl, YCoord
+ sub [hl]
+ and $f
+ swap a
+ ld hl, wFollowNotExactPersonY
+ sub [hl]
+ ld hl, OBJECT_SPRITE_Y
+ add hl, de
+ ld [hl], a
+ ld a, [hObjectStructIndexBuffer]
+ ld hl, OBJECT_RANGE
+ add hl, de
+ ld [hl], a
+ ld hl, OBJECT_MOVEMENTTYPE
+ add hl, de
+ ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT
+ ld hl, OBJECT_STEP_TYPE
+ add hl, de
+ ld [hl], STEP_TYPE_00
+ ret
+
+GetRelativeFacing:: ; 8417
+; Determines which way map object e would have to turn to face map object d. Returns carry if it's impossible for whatever reason.
+ ld a, d
+ call GetMapObject
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld a, [hl]
+ cp NUM_OBJECT_STRUCTS
+ jr nc, .carry
+ ld d, a
+ ld a, e
+ call GetMapObject
+ ld hl, MAPOBJECT_OBJECT_STRUCT_ID
+ add hl, bc
+ ld a, [hl]
+ cp NUM_OBJECT_STRUCTS
+ jr nc, .carry
+ ld e, a
+ call .GetFacing_e_relativeto_d
+ ret
+
+.carry
+ scf
+ ret
+
+.GetFacing_e_relativeto_d: ; 8439
+; Determines which way object e would have to turn to face object d. Returns carry if it's impossible.
+; load the coordinates of object d into bc
+ ld a, d
+ call GetObjectStruct
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, bc
+ ld a, [hl]
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, bc
+ ld c, [hl]
+ ld b, a
+ push bc
+; load the coordinates of object e into de
+ ld a, e
+ call GetObjectStruct
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, bc
+ ld d, [hl]
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, bc
+ ld e, [hl]
+ pop bc
+; |x1 - x2|
+ ld a, b
+ sub d
+ jr z, .same_x_1
+ jr nc, .b_right_of_d_1
+ cpl
+ inc a
+
+.b_right_of_d_1
+; |y1 - y2|
+ ld h, a
+ ld a, c
+ sub e
+ jr z, .same_y_1
+ jr nc, .c_below_e_1
+ cpl
+ inc a
+
+.c_below_e_1
+; |y1 - y2| - |x1 - x2|
+ sub h
+ jr c, .same_y_1
+
+.same_x_1
+; compare the y coordinates
+ ld a, c
+ cp e
+ jr z, .same_x_and_y
+ jr c, .c_directly_below_e
+; c directly above e
+ ld d, DOWN
+ and a
+ ret
+
+.c_directly_below_e
+ ld d, UP
+ and a
+ ret
+
+.same_y_1
+ ld a, b
+ cp d
+ jr z, .same_x_and_y
+ jr c, .b_directly_right_of_d
+; b directly left of d
+ ld d, RIGHT
+ and a
+ ret
+
+.b_directly_right_of_d
+ ld d, LEFT
+ and a
+ ret
+
+.same_x_and_y
+ scf
+ ret
+
+QueueFollowerFirstStep: ; 848a
+ call .QueueFirstStep
+ jr c, .same
+ ld [wFollowMovementQueue], a
+ xor a
+ ld [wFollowerMovementQueueLength], a
+ ret
+
+.same
+ ld a, -1
+ ld [wFollowerMovementQueueLength], a
+ ret
+
+.QueueFirstStep:
+ ld a, [wObjectFollow_Leader]
+ call GetObjectStruct
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, bc
+ ld d, [hl]
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, bc
+ ld e, [hl]
+ ld a, [wObjectFollow_Follower]
+ call GetObjectStruct
+ ld hl, OBJECT_NEXT_MAP_X
+ add hl, bc
+ ld a, d
+ cp [hl]
+ jr z, .check_y
+ jr c, .left
+ and a
+ ld a, movement_step_right
+ ret
+
+.left
+ and a
+ ld a, movement_step_left
+ ret
+
+.check_y
+ ld hl, OBJECT_NEXT_MAP_Y
+ add hl, bc
+ ld a, e
+ cp [hl]
+ jr z, .same_xy
+ jr c, .up
+ and a
+ ld a, movement_step_down
+ ret
+
+.up
+ and a
+ ld a, movement_step_up
+ ret
+
+.same_xy
+ scf
+ ret
--- a/engine/player_step.asm
+++ b/engine/player_step.asm
@@ -59,7 +59,7 @@
ret
.Jumptable: ; d4f2 (3:54f2)
-
+
dw GetMovementPermissions
dw BufferScreen
dw .mobile
@@ -73,14 +73,14 @@
dw .fail1
dw .fail1
-.fail1: ; d508 (3:5508)
+.fail1 ; d508 (3:5508)
ret
-.mobile: ; d509 (3:5509)
+.mobile ; d509 (3:5509)
callba MobileFn_10602e
ret
-.fail2: ; d510 (3:5510)
+.fail2 ; d510 (3:5510)
ret
UpdatePlayerCoords: ; d511 (3:5511)
--- a/engine/pokecenter_pc.asm
+++ b/engine/pokecenter_pc.asm
@@ -2,9 +2,9 @@
call PC_CheckPartyForPokemon
ret c
call PC_PlayBootSound
- ld hl, UnknownText_0x15a27
+ ld hl, PokeCenterPCText_BootedUpPC
call PC_DisplayText
- ld hl, UnknownText_0x15a2c
+ ld hl, PokeCenterPCText_AccessWhosePC
call PC_DisplayTextWaitMenu
ld hl, .TopMenu
call LoadMenuDataHeader
@@ -25,40 +25,35 @@
call ExitMenu
call CloseWindow
ret
-; 155d6
-.TopMenu: ; 0x155d6
+.TopMenu:
db $48 ; flags
db 00, 00 ; start coords
db 12, 15 ; end coords
dw .MenuData2
db 1 ; default option
-; 0x155de
-.MenuData2: ; 0x155de
+.MenuData2:
db $a0 ; flags
db 0 ; items
dw .WhichPC
dw PlaceNthMenuStrings
dw .JumpTable
-; 0x155e6
-.JumpTable: ; 155e6
+.JumpTable:
dw PlayersPC, .String_PlayersPC
dw BillsPC, .String_BillsPC
dw OaksPC, .String_OaksPC
dw HallOfFamePC, .String_HallOfFame
dw TurnOffPC, .String_TurnOff
-; 155fa
-.String_PlayersPC: db "<PLAYER>'s PC@"
-.String_BillsPC: db "BILL's PC@"
-.String_OaksPC: db "PROF.OAK's PC@"
-.String_HallOfFame: db "HALL OF FAME@"
-.String_TurnOff: db "TURN OFF@"
-; 1562c
+.String_PlayersPC: db "<PLAYER>'s PC@"
+.String_BillsPC: db "BILL's PC@"
+.String_OaksPC: db "PROF.OAK's PC@"
+.String_HallOfFame: db "HALL OF FAME@"
+.String_TurnOff: db "TURN OFF@"
-.WhichPC: ; 1562c
+.WhichPC:
; before pokedex
db 3 ; items
db 1, 0, 4 ; bill's, player's, turn off
@@ -73,9 +68,8 @@
db 5 ; items
db 1, 0, 2, 3, 4 ; bill's, player's, oak's, hall of fame, turn off
db -1
-; 1563e
-.ChooseWhichPCListToUse: ; 1563e
+.ChooseWhichPCListToUse:
call CheckReceivedDex
jr nz, .got_dex
ld a, $0
@@ -96,13 +90,12 @@
ret nz
ld de, SFX_CHOOSE_PC_OPTION
call PlaySFX
- ld hl, UnknownText_0x15663
+ ld hl, .MustHavePokemonToUse
call PC_DisplayText
scf
ret
-; 15663
-UnknownText_0x15663: ; 0x15663
+.MustHavePokemonToUse:
; Bzzzzt! You must have a #MON to use this!
text_jump UnknownText_0x1c1328
db "@"
@@ -110,7 +103,7 @@
BillsPC: ; 15668
call PC_PlayChoosePCSound
- ld hl, UnknownText_0x15a31
+ ld hl, PokeCenterPCText_AccessedBillsPC
call PC_DisplayText
callba _BillsPC
and a
@@ -119,7 +112,7 @@
PlayersPC: ; 15679
call PC_PlayChoosePCSound
- ld hl, UnknownText_0x15a36
+ ld hl, PokeCenterPCText_AccessedOwnPC
call PC_DisplayText
ld b, $0
call _PlayersPC
@@ -129,7 +122,7 @@
OaksPC: ; 15689
call PC_PlayChoosePCSound
- ld hl, UnknownText_0x15a3b
+ ld hl, PokeCenterPCText_AccessedOaksPC
call PC_DisplayText
callba ProfOaksPC
and a
@@ -146,7 +139,7 @@
; 156ab
TurnOffPC: ; 156ab
- ld hl, UnknownText_0x15a40
+ ld hl, PokeCenterPCText_LinkClosed
call PrintText
scf
ret
@@ -166,7 +159,7 @@
ld de, SFX_CHOOSE_PC_OPTION
jr PC_WaitPlaySFX
-Function156c7: ; 156c7
+PC_PlaySwapItemsSound: ; 156c7
ld de, SFX_SWITCH_POKEMON
call PC_WaitPlaySFX
ld de, SFX_SWITCH_POKEMON
@@ -218,8 +211,8 @@
Function15715: ; 15715
xor a
- ld [wd0d7], a
- ld [wd0dd], a
+ ld [wPCItemsCursor], a
+ ld [wPCItemsScrollPosition], a
ld hl, KrissPCMenuData
call LoadMenuDataHeader
.asm_15722
@@ -245,7 +238,7 @@
dw .KrissPCMenuData2
db 1 ; default selected option
-.KrissPCMenuData2
+.KrissPCMenuData2:
db %10100000 ; bit7
db 0 ; # items?
dw .KrissPCMenuList1
@@ -252,7 +245,7 @@
dw PlaceNthMenuStrings
dw .KrissPCMenuPointers
-.KrissPCMenuPointers ; 0x15746
+.KrissPCMenuPointers: ; 0x15746
dw KrisWithdrawItemMenu, .WithdrawItem
dw KrisDepositItemMenu, .DepositItem
dw KrisTossItemMenu, .TossItem
@@ -261,13 +254,13 @@
dw KrisLogOffMenu, .LogOff
dw KrisLogOffMenu, .TurnOff
-.WithdrawItem db "WITHDRAW ITEM@"
-.DepositItem db "DEPOSIT ITEM@"
-.TossItem db "TOSS ITEM@"
-.MailBox db "MAIL BOX@"
-.Decoration db "DECORATION@"
-.TurnOff db "TURN OFF@"
-.LogOff db "LOG OFF@"
+.WithdrawItem: db "WITHDRAW ITEM@"
+.DepositItem: db "DEPOSIT ITEM@"
+.TossItem: db "TOSS ITEM@"
+.MailBox: db "MAIL BOX@"
+.Decoration: db "DECORATION@"
+.TurnOff: db "TURN OFF@"
+.LogOff: db "LOG OFF@"
WITHDRAW_ITEM EQU 0
DEPOSIT_ITEM EQU 1
@@ -277,7 +270,7 @@
TURN_OFF EQU 5
LOG_OFF EQU 6
-.KrissPCMenuList1
+.KrissPCMenuList1:
db 5
db WITHDRAW_ITEM
db DEPOSIT_ITEM
@@ -286,7 +279,7 @@
db TURN_OFF
db -1
-.KrissPCMenuList2
+.KrissPCMenuList2:
db 6
db WITHDRAW_ITEM
db DEPOSIT_ITEM
@@ -316,19 +309,18 @@
KrisWithdrawItemMenu: ; 0x157d1
call LoadStandardMenuDataHeader
callba ClearPCItemScreen
-.asm_157da
- call Function15985
- jr c, .asm_157e4
- call Function157e9
- jr .asm_157da
+.loop
+ call PCItemsJoypad
+ jr c, .quit
+ call .Submenu
+ jr .loop
-.asm_157e4
+.quit
call CloseSubmenu
xor a
ret
-; 0x157e9
-Function157e9: ; 0x157e9
+.Submenu:
; check if the item has a quantity
callba _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
@@ -351,7 +343,7 @@
.withdraw
ld a, [wItemQuantityChangeBuffer]
ld [Buffer1], a ; quantity
- ld a, [wd107]
+ ld a, [CurItemQuantity]
ld [Buffer2], a
ld hl, NumItems
call ReceiveItem
@@ -359,7 +351,7 @@
ld a, [Buffer1]
ld [wItemQuantityChangeBuffer], a
ld a, [Buffer2]
- ld [wd107], a
+ ld [CurItemQuantity], a
ld hl, PCItems
call TossItem
predef PartyMonItemName
@@ -370,7 +362,7 @@
call ExitMenu
ret
-.PackFull
+.PackFull:
ld hl, .NoRoomText
call MenuTextBoxBackup
ret
@@ -377,38 +369,35 @@
.done
ret
-; 0x15850
-.HowManyText ; 0x15850
+.HowManyText: ; 0x15850
text_jump _KrissPCHowManyWithdrawText
db "@"
-.WithdrewText ; 0x15855
+.WithdrewText: ; 0x15855
text_jump _KrissPCWithdrewItemsText
db "@"
-.NoRoomText ; 0x1585a
+.NoRoomText: ; 0x1585a
text_jump _KrissPCNoRoomWithdrawText
db "@"
-
KrisTossItemMenu: ; 0x1585f
call LoadStandardMenuDataHeader
callba ClearPCItemScreen
-.asm_15868
- call Function15985
- jr c, .asm_15878
+.loop
+ call PCItemsJoypad
+ jr c, .quit
ld de, PCItems
- callba Function129f4
- jr .asm_15868
+ callba TossItemFromPC
+ jr .loop
-.asm_15878
+.quit
call CloseSubmenu
xor a
ret
; 0x1587d
-
KrisDecorationMenu: ; 0x1587d
callba _KrisDecorationMenu
ld a, c
@@ -418,7 +407,6 @@
ret
; 0x15888
-
KrisLogOffMenu: ; 0x15888
xor a
scf
@@ -425,47 +413,42 @@
ret
; 0x1588b
-
KrisDepositItemMenu: ; 0x1588b
- call Function158b8
- jr c, .asm_158b6
+ call .CheckItemsInBag
+ jr c, .nope
call DisableSpriteUpdates
call LoadStandardMenuDataHeader
callba DepositSellInitPackBuffers
-.asm_1589c
+.loop
callba DepositSellPack
ld a, [wcf66]
and a
- jr z, .asm_158b3
- call Function158cc
+ jr z, .close
+ call .TryDepositItem
callba CheckRegisteredItem
- jr .asm_1589c
+ jr .loop
-.asm_158b3
+.close
call CloseSubmenu
-.asm_158b6
+.nope
xor a
ret
-; 0x158b8
-Function158b8: ; 0x158b8
+.CheckItemsInBag:
callba HasNoItems
ret nc
- ld hl, UnknownText_0x158c7
+ ld hl, .NoItemsInBag
call MenuTextBoxBackup
scf
ret
-; 0x158c7
-UnknownText_0x158c7: ; 0x158c7
+.NoItemsInBag:
; No items here!
text_jump UnknownText_0x1c13df
db "@"
-; 0x158cc
-
-Function158cc: ; 0x158cc
+.TryDepositItem:
ld a, [wSpriteUpdatesEnabled]
push af
ld a, $0
@@ -477,9 +460,8 @@
pop af
ld [wSpriteUpdatesEnabled], a
ret
-; 0x158e7
-.dw: ; 0x158e7
+.dw
dw .tossable
dw .no_toss
dw .no_toss
@@ -488,32 +470,31 @@
dw .tossable
dw .tossable
-.no_toss:
+.no_toss
ret
-.tossable:
+.tossable
ld a, [Buffer1]
push af
ld a, [Buffer2]
push af
- call Function1590a
+ call .DepositItem_
pop af
ld [Buffer2], a
pop af
ld [Buffer1], a
ret
-; 0x1590a
-Function1590a: ; 0x1590a
+.DepositItem_:
callba _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
- jr z, .asm_1591d
+ jr z, .AskQuantity
ld a, $1
ld [wItemQuantityChangeBuffer], a
- jr .asm_15933
+ jr .DepositItem
-.asm_1591d
+.AskQuantity:
ld hl, .HowManyText
call MenuTextBox
callba SelectQuantityToToss
@@ -521,20 +502,20 @@
call ExitMenu
call ExitMenu
pop af
- jr c, .asm_1596c
+ jr c, .DeclinedToDeposit
-.asm_15933
+.DepositItem:
ld a, [wItemQuantityChangeBuffer]
ld [Buffer1], a
- ld a, [wd107]
+ ld a, [CurItemQuantity]
ld [Buffer2], a
ld hl, PCItems
call ReceiveItem
- jr nc, .asm_15965
+ jr nc, .NoRoomInPC
ld a, [Buffer1]
ld [wItemQuantityChangeBuffer], a
ld a, [Buffer2]
- ld [wd107], a
+ ld [CurItemQuantity], a
ld hl, NumItems
call TossItem
predef PartyMonItemName
@@ -542,30 +523,27 @@
call PrintText
ret
-.asm_15965
+.NoRoomInPC:
ld hl, .NoRoomText
call PrintText
ret
-.asm_1596c
+.DeclinedToDeposit:
and a
ret
-; 0x1596e
-
-.HowManyText ; 0x1596e
+.HowManyText: ; 0x1596e
text_jump _KrissPCHowManyDepositText
db "@"
-.DepositText ; 0x15973
+.DepositText: ; 0x15973
text_jump _KrissPCDepositItemsText
db "@"
-.NoRoomText ; 0x15978
+.NoRoomText: ; 0x15978
text_jump _KrissPCNoRoomDepositText
db "@"
-
KrisMailBoxMenu: ; 0x1597d
callba _KrisMailBoxMenu
xor a
@@ -572,80 +550,76 @@
ret
; 0x15985
-
-Function15985: ; 0x15985
+PCItemsJoypad: ; 0x15985
xor a
- ld [wd0e3], a
-.asm_15989
+ ld [wSwitchItem], a
+.loop
ld a, [wSpriteUpdatesEnabled]
push af
ld a, $0
ld [wSpriteUpdatesEnabled], a
- ld hl, MenuData15a08
+ ld hl, .PCItemsMenuData
call CopyMenuDataHeader
hlcoord 0, 0
- ld b, $a
- ld c, $12
+ ld b, 10
+ ld c, 18
call TextBox
- ld a, [wd0d7]
+ ld a, [wPCItemsCursor]
ld [wMenuCursorBuffer], a
- ld a, [wd0dd]
+ ld a, [wPCItemsScrollPosition]
ld [wMenuScrollPosition], a
call ScrollingMenu
ld a, [wMenuScrollPosition]
- ld [wd0dd], a
+ ld [wPCItemsScrollPosition], a
ld a, [wMenuCursorY]
- ld [wd0d7], a
+ ld [wPCItemsCursor], a
pop af
ld [wSpriteUpdatesEnabled], a
- ld a, [wd0e3]
+ ld a, [wSwitchItem]
and a
- jr nz, .asm_159d8
+ jr nz, .moving_stuff_around
ld a, [wMenuJoypad]
- cp $2
- jr z, .asm_15a06
- cp $1
- jr z, .asm_159fb
- cp $4
- jr z, .asm_159f2
- jr .asm_159f8
+ cp B_BUTTON
+ jr z, .b_1
+ cp A_BUTTON
+ jr z, .a_1
+ cp SELECT
+ jr z, .select_1
+ jr .next
-.asm_159d8
+.moving_stuff_around
ld a, [wMenuJoypad]
- cp $2
- jr z, .asm_159e9
- cp $1
- jr z, .asm_159ef
- cp $4
- jr z, .asm_159ef
- jr .asm_159f8
+ cp B_BUTTON
+ jr z, .b_2
+ cp A_BUTTON
+ jr z, .a_select_2
+ cp SELECT
+ jr z, .a_select_2
+ jr .next
-.asm_159e9
+.b_2
xor a
- ld [wd0e3], a
- jr .asm_159f8
+ ld [wSwitchItem], a
+ jr .next
-.asm_159ef
- call Function156c7
-
-.asm_159f2
+.a_select_2
+ call PC_PlaySwapItemsSound
+.select_1
callba SwitchItemsInBag
+.next
+ jp .loop
-.asm_159f8
- jp .asm_15989
-
-.asm_159fb
- callba Function24706
+.a_1
+ callba ScrollingMenu_ClearLeftColumn
call PlaceHollowCursor
and a
ret
-.asm_15a06
+.b_1
scf
ret
-; 0x15a08
-MenuData15a08: ; 0x15a08
+.PCItemsMenuData:
db %01000000
db 1, 4 ; start coords
db 10, 18 ; end coords
@@ -652,7 +626,7 @@
dw .MenuData2
db 1 ; default option
-.MenuData2
+.MenuData2:
db %10110000
db 4, 8 ; rows/cols?
db 2 ; horizontal spacing?
@@ -667,38 +641,37 @@
ret
; 15a27
-
-UnknownText_0x15a27: ; 0x15a27
+PokeCenterPCText_BootedUpPC: ; 0x15a27
; turned on the PC.
text_jump UnknownText_0x1c144d
db "@"
; 0x15a2c
-UnknownText_0x15a2c: ; 0x15a2c
+PokeCenterPCText_AccessWhosePC: ; 0x15a2c
; Access whose PC?
text_jump UnknownText_0x1c1462
db "@"
; 0x15a31
-UnknownText_0x15a31: ; 0x15a31
+PokeCenterPCText_AccessedBillsPC: ; 0x15a31
; BILL's PC accessed. #MON Storage System opened.
text_jump UnknownText_0x1c1474
db "@"
; 0x15a36
-UnknownText_0x15a36: ; 0x15a36
+PokeCenterPCText_AccessedOwnPC: ; 0x15a36
; Accessed own PC. Item Storage System opened.
text_jump UnknownText_0x1c14a4
db "@"
; 0x15a3b
-UnknownText_0x15a3b: ; 0x15a3b
+PokeCenterPCText_AccessedOaksPC: ; 0x15a3b
; PROF.OAK's PC accessed. #DEX Rating System opened.
text_jump UnknownText_0x1c14d2
db "@"
; 0x15a40
-UnknownText_0x15a40: ; 0x15a40
+PokeCenterPCText_LinkClosed: ; 0x15a40
; … Link closed…
text_jump UnknownText_0x1c1505
db "@"
--- a/engine/pokedex.asm
+++ b/engine/pokedex.asm
@@ -2407,7 +2407,7 @@
predef GetFrontpic
ret
-.QuestionMark
+.QuestionMark:
ld a, BANK(sScratch)
call GetSRAMBank
callba LoadQuestionMarkPic
@@ -2481,12 +2481,12 @@
callba LoadSGBPokedexGFX
jr .LoadPokedexSlowpokeLZ
-.LoadPokedexLZ
+.LoadPokedexLZ:
ld hl, PokedexLZ
ld de, VTiles2 tile $31
call Decompress
-.LoadPokedexSlowpokeLZ
+.LoadPokedexSlowpokeLZ:
ld hl, PokedexSlowpokeLZ
ld de, VTiles0
call Decompress
@@ -2614,7 +2614,7 @@
and a
jr z, .DMG
call Pokedex_SetBGMapMode4
-.DMG
+.DMG:
call Pokedex_SetBGMapMode3
ret
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -198,12 +198,12 @@
ld a, [BackupMapNumber]
ld c, a
call GetWorldMapLocation
-.LoadLandmark
+.LoadLandmark:
ld [wPokegearMapPlayerIconLandmark], a
ld [wPokegearMapCursorLandmark], a
ret
-.FastShip
+.FastShip:
ld [wPokegearMapPlayerIconLandmark], a
ld a, NEW_BARK_TOWN
ld [wPokegearMapCursorLandmark], a
@@ -940,7 +940,7 @@
; 9124c (24:524c)
-.dotdotdot: ; 0x9124c
+.dotdotdot ; 0x9124c
;
text_jump UnknownText_0x1c5824
db "@"
@@ -1240,7 +1240,7 @@
ld hl, PokegearText_WhomToCall
call PrintText
call WaitBGMap
-.CancelDelete
+.CancelDelete:
scf
ret
@@ -1525,7 +1525,7 @@
dbw 80, .EvolutionRadio
db -1
-.PkmnTalkAndPokedexShow
+.PkmnTalkAndPokedexShow:
; Pokédex Show in the morning
; Oak's Pokémon Talk in the afternoon and evening
@@ -1536,28 +1536,28 @@
jp z, LoadStation_PokedexShow
jp LoadStation_OaksPokemonTalk
-.PokemonMusic
+.PokemonMusic:
call .InJohto
jr nc, .NoSignal
jp LoadStation_PokemonMusic
-.LuckyChannel
+.LuckyChannel:
call .InJohto
jr nc, .NoSignal
jp LoadStation_LuckyChannel
-.BuenasPassword
+.BuenasPassword:
call .InJohto
jr nc, .NoSignal
jp LoadStation_BuenasPassword
-.RuinsOfAlphRadio
+.RuinsOfAlphRadio:
ld a, [wPokegearMapPlayerIconLandmark]
cp RUINS_OF_ALPH
jr nz, .NoSignal
jp LoadStation_UnownRadio
-.PlacesAndPeople
+.PlacesAndPeople:
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
@@ -1565,7 +1565,7 @@
jr z, .NoSignal
jp LoadStation_PlacesAndPeople
-.LetsAllSing
+.LetsAllSing:
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
@@ -1573,7 +1573,7 @@
jr z, .NoSignal
jp LoadStation_LetsAllSing
-.PokeFluteRadio
+.PokeFluteRadio:
call .InJohto
jr c, .NoSignal
ld a, [wPokegearFlags]
@@ -1581,7 +1581,7 @@
jr z, .NoSignal
jp LoadStation_PokeFluteRadio
-.EvolutionRadio
+.EvolutionRadio:
; This station airs in the Lake of Rage area when Rocket are still in Mahogany.
ld a, [StatusFlags]
bit 4, a
@@ -1596,11 +1596,11 @@
.ok
jp LoadStation_EvolutionRadio
-.NoSignal
+.NoSignal:
call NoRadioStation
ret
-.InJohto
+.InJohto:
; if in Johto or on the S.S. Aqua, set carry
; otherwise clear carry
@@ -2185,7 +2185,7 @@
jr nz, .ScrollPrev
ret
-.ScrollNext
+.ScrollNext:
ld hl, wd002
ld a, [hl]
cp d
@@ -2193,13 +2193,13 @@
ld a, e
dec a
ld [hl], a
-.NotAtEndYet
+.NotAtEndYet:
inc [hl]
call CheckIfVisitedFlypoint
jr z, .ScrollNext
jr .Finally
-.ScrollPrev
+.ScrollPrev:
ld hl, wd002
ld a, [hl]
cp e
@@ -2207,11 +2207,11 @@
ld a, d
inc a
ld [hl], a
-.NotAtStartYet
+.NotAtStartYet:
dec [hl]
call CheckIfVisitedFlypoint
jr z, .ScrollPrev
-.Finally
+.Finally:
call TownMapBubble
call WaitBGMap
xor a
@@ -2261,13 +2261,13 @@
call .Name
; Up/down arrows
hlcoord 18, 1
- ld [hl], $34
+ ld [hl], $34
ret
-.Where
+.Where:
db "Where?@"
-.Name
+.Name:
; We need the map location of the default flypoint
ld a, [wd002]
ld l, a
@@ -2398,11 +2398,11 @@
ld a, [BackupMapNumber]
ld c, a
call GetWorldMapLocation
-.CheckRegion
+.CheckRegion:
; The first 46 locations are part of Johto. The rest are in Kanto
cp KANTO_LANDMARK
jr nc, .KantoFlyMap
-.JohtoFlyMap
+.JohtoFlyMap:
; Note that .NoKanto should be modified in tandem with this branch
push af
; Start from New Bark Town
@@ -2420,7 +2420,7 @@
call TownMapPlayerIcon
ret
-.KantoFlyMap
+.KantoFlyMap:
; The event that there are no flypoints enabled in a map is not
; accounted for. As a result, if you attempt to select a flypoint
@@ -2457,7 +2457,7 @@
call TownMapPlayerIcon
ret
-.NoKanto
+.NoKanto:
; If Indigo Plateau hasn't been visited, we use Johto's map instead
; Start from New Bark Town
@@ -2470,7 +2470,7 @@
ld [EndFlypoint], a
call FillJohtoMap
pop af
-.MapHud
+.MapHud:
call TownMapBubble
call TownMapPals
hlbgcoord 0, 0 ; BG Map 0
@@ -2685,7 +2685,7 @@
ld b, d
ld de, .PlayerOAM
ld hl, Sprites
-.ShowPlayerLoop
+.ShowPlayerLoop:
ld a, [de]
cp $80
jr z, .clear_oam
@@ -2770,7 +2770,7 @@
callba GetPlayerIcon
ret
-.FastShip
+.FastShip:
ld de, FastShipGFX
ld b, BANK(FastShipGFX)
ret
@@ -2841,7 +2841,7 @@
; The palette data is condensed to nybbles,
; least-significant first.
- ld hl, TownMapPalMap
+ ld hl, .PalMap
srl a
jr c, .odd
; Even-numbered tile ids take the bottom nybble...
@@ -2878,13 +2878,20 @@
jr nz, .loop
ret
-TownMapPalMap:
- dn 1, 1, 2, 1, 2, 2, 0, 0, 1, 1, 1, 3, 5, 4, 5, 4
- dn 1, 1, 2, 1, 2, 2, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0
- dn 1, 1, 2, 1, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
- dn 0, 0, 0, 0, 4, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0
- dn 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 3
- dn 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0
+.PalMap:
+townmappals: MACRO
+rept _NARG / 2
+ dn \2, \1
+ shift
+ shift
+endr
+endm
+ townmappals 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, 3, 1, 4, 5, 4, 5
+ townmappals 1, 1, 1, 2, 2, 2, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0
+ townmappals 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ townmappals 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0
+ townmappals 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0
+ townmappals 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0
; 91f7b
TownMapMon: ; 91f7b
--- a/engine/printer.asm
+++ b/engine/printer.asm
@@ -32,7 +32,7 @@
.Jumptable: ; 84031 (21:4031)
-
+
dw Function84077
dw Function84143
dw Function84120
@@ -443,7 +443,7 @@
.Jumptable: ; 842ea (21:42ea)
-
+
dw Function8432f
dw Function84330
dw Function84339
--- /dev/null
+++ b/engine/printnum.asm
@@ -1,0 +1,300 @@
+_PrintNum:: ; c4c7
+; Print c digits of the b-byte value from de to hl.
+; Allows 2 to 7 digits. For 1-digit numbers, add
+; the value to char "0" instead of calling PrintNum.
+; Some extra flags can be given in bits 5-7 of b.
+; Bit 5: money if set (unless left-aligned without leading zeros)
+; Bit 6: right-aligned if set
+; Bit 7: print leading zeros if set
+
+ push bc
+
+ bit 5, b
+ jr z, .main
+ bit 7, b
+ jr nz, .moneyflag
+ bit 6, b
+ jr z, .main
+
+.moneyflag ; 101xxxxx or 011xxxxx
+ ld a, "¥"
+ ld [hli], a
+ res 5, b ; 100xxxxx or 010xxxxx
+
+.main
+ xor a
+ ld [hPrintNum1], a
+ ld [hPrintNum2], a
+ ld [hPrintNum3], a
+ ld a, b
+ and $f
+ cp 1
+ jr z, .byte
+ cp 2
+ jr z, .word
+; maximum 3 bytes
+.long
+ ld a, [de]
+ ld [hPrintNum2], a
+ inc de
+ ld a, [de]
+ ld [hPrintNum3], a
+ inc de
+ ld a, [de]
+ ld [hPrintNum4], a
+ jr .start
+
+.word
+ ld a, [de]
+ ld [hPrintNum3], a
+ inc de
+ ld a, [de]
+ ld [hPrintNum4], a
+ jr .start
+
+.byte
+ ld a, [de]
+ ld [hPrintNum4], a
+
+.start
+ push de
+
+ ld d, b
+ ld a, c
+ swap a
+ and $f
+ ld e, a
+ ld a, c
+ and $f
+ ld b, a
+ ld c, 0
+ cp 2
+ jr z, .two
+ cp 3
+ jr z, .three
+ cp 4
+ jr z, .four
+ cp 5
+ jr z, .five
+ cp 6
+ jr z, .six
+
+.seven
+ ld a, 1000000 / $10000 % $100
+ ld [hPrintNum5], a
+ ld a, 1000000 / $100 % $100
+ ld [hPrintNum6], a
+ ld a, 1000000 % $100
+ ld [hPrintNum7], a
+ call .PrintDigit
+ call .AdvancePointer
+
+.six
+ ld a, 100000 / $10000 % $100
+ ld [hPrintNum5], a
+ ld a, 100000 / $100 % $100
+ ld [hPrintNum6], a
+ ld a, 100000 % $100
+ ld [hPrintNum7], a
+ call .PrintDigit
+ call .AdvancePointer
+
+.five
+ xor a
+ ld [hPrintNum5], a
+ ld a, 10000 / $100
+ ld [hPrintNum6], a
+ ld a, 10000 % $100
+ ld [hPrintNum7], a
+ call .PrintDigit
+ call .AdvancePointer
+
+.four
+ xor a
+ ld [hPrintNum5], a
+ ld a, 1000 / $100
+ ld [hPrintNum6], a
+ ld a, 1000 % $100
+ ld [hPrintNum7], a
+ call .PrintDigit
+ call .AdvancePointer
+
+.three
+ xor a
+ ld [hPrintNum5], a
+ xor a
+ ld [hPrintNum6], a
+ ld a, 100
+ ld [hPrintNum7], a
+ call .PrintDigit
+ call .AdvancePointer
+
+.two
+ dec e
+ jr nz, .two_skip
+ ld a, "0"
+ ld [hPrintNum1], a
+.two_skip
+
+ ld c, 0
+ ld a, [hPrintNum4]
+.mod_10
+ cp 10
+ jr c, .modded_10
+ sub 10
+ inc c
+ jr .mod_10
+.modded_10
+
+ ld b, a
+ ld a, [hPrintNum1]
+ or c
+ jr nz, .money
+ call .PrintLeadingZero
+ jr .money_leading_zero
+
+.money
+ call .PrintYen
+ push af
+ ld a, "0"
+ add c
+ ld [hl], a
+ pop af
+ ld [hPrintNum1], a
+ inc e
+ dec e
+ jr nz, .money_leading_zero
+ inc hl
+ ld [hl], $f2 ; XXX
+
+.money_leading_zero
+ call .AdvancePointer
+ call .PrintYen
+ ld a, "0"
+ add b
+ ld [hli], a
+
+ pop de
+ pop bc
+ ret
+
+.PrintYen: ; c5ba
+ push af
+ ld a, [hPrintNum1]
+ and a
+ jr nz, .stop
+ bit 5, d
+ jr z, .stop
+ ld a, "¥"
+ ld [hli], a
+ res 5, d
+
+.stop
+ pop af
+ ret
+
+.PrintDigit: ; c5cb (3:45cb)
+ dec e
+ jr nz, .ok
+ ld a, "0"
+ ld [hPrintNum1], a
+.ok
+ ld c, 0
+.loop
+ ld a, [hPrintNum5]
+ ld b, a
+ ld a, [hPrintNum2]
+ ld [hPrintNum8], a
+ cp b
+ jr c, .skip1
+ sub b
+ ld [hPrintNum2], a
+ ld a, [hPrintNum6]
+ ld b, a
+ ld a, [hPrintNum3]
+ ld [hPrintNum9], a
+ cp b
+ jr nc, .skip2
+ ld a, [hPrintNum2]
+ or 0
+ jr z, .skip3
+ dec a
+ ld [hPrintNum2], a
+ ld a, [hPrintNum3]
+.skip2
+ sub b
+ ld [hPrintNum3], a
+ ld a, [hPrintNum7]
+ ld b, a
+ ld a, [hPrintNum4]
+ ld [hPrintNum10], a
+ cp b
+ jr nc, .skip4
+ ld a, [hPrintNum3]
+ and a
+ jr nz, .skip5
+ ld a, [hPrintNum2]
+ and a
+ jr z, .skip6
+ dec a
+ ld [hPrintNum2], a
+ xor a
+.skip5
+ dec a
+ ld [hPrintNum3], a
+ ld a, [hPrintNum4]
+.skip4
+ sub b
+ ld [hPrintNum4], a
+ inc c
+ jr .loop
+.skip6
+ ld a, [hPrintNum9]
+ ld [hPrintNum3], a
+.skip3
+ ld a, [hPrintNum8]
+ ld [hPrintNum2], a
+.skip1
+ ld a, [hPrintNum1]
+ or c
+ jr z, .PrintLeadingZero
+ ld a, [hPrintNum1]
+ and a
+ jr nz, .done
+ bit 5, d
+ jr z, .done
+ ld a, "¥"
+ ld [hli], a
+ res 5, d
+.done
+ ld a, "0"
+ add c
+ ld [hl], a
+ ld [hPrintNum1], a
+ inc e
+ dec e
+ ret nz
+ inc hl
+ ld [hl], "·"
+ ret
+
+.PrintLeadingZero: ; c644
+; prints a leading zero unless they are turned off in the flags
+ bit 7, d ; print leading zeroes?
+ ret z
+ ld [hl], "0"
+ ret
+
+.AdvancePointer: ; c64a
+; increments the pointer unless leading zeroes are not being printed,
+; the number is left-aligned, and no nonzero digits have been printed yet
+ bit 7, d ; print leading zeroes?
+ jr nz, .inc
+ bit 6, d ; left alignment or right alignment?
+ jr z, .inc
+ ld a, [hPrintNum1]
+ and a
+ ret z
+.inc
+ inc hl
+ ret
--- a/engine/radio.asm
+++ b/engine/radio.asm
@@ -372,7 +372,7 @@
ld a, OAKS_POKEMON_TALK_9
jp NextRadioLine
-.Descriptors
+.Descriptors:
dw .sweetadorably
dw .wigglyslickly
dw .aptlynamed
@@ -492,7 +492,7 @@
.ok
jp NextRadioLine
-.Descriptors
+.Descriptors:
dw .cute
dw .weird
dw .pleasant
@@ -896,7 +896,7 @@
ld hl, BenFernText2A
jr z, .SunTueThurSun
ld hl, BenFernText2B
-.SunTueThurSun
+.SunTueThurSun:
ld a, POKEMON_MUSIC_6
jp NextRadioLine
@@ -906,7 +906,7 @@
ld hl, BenFernText3A
jr z, .SunTueThurSun
ld hl, BenFernText3B
-.SunTueThurSun
+.SunTueThurSun:
ld a, POKEMON_MUSIC_7
jp NextRadioLine
@@ -921,7 +921,7 @@
and 1
jr z, .SunTueThurSun
ld de, MUSIC_POKEMON_LULLABY
-.SunTueThurSun
+.SunTueThurSun:
callab RadioMusicRestartDE
ret
@@ -1235,7 +1235,7 @@
.ok
jp NextRadioLine
-.Descriptors
+.Descriptors:
dw PnP_cute
dw PnP_lazy
dw PnP_happy
@@ -1352,7 +1352,7 @@
ld a, PLACES_AND_PEOPLE_7
jp NextRadioLine
-.Maps
+.Maps:
map PALLET_TOWN
map ROUTE_22
map PEWTER_CITY
@@ -1392,7 +1392,7 @@
.ok
jp PrintRadioLine
-.Descriptors
+.Descriptors:
dw PnP_cute
dw PnP_lazy
dw PnP_happy
@@ -1538,7 +1538,7 @@
jp z, BuenasPassword20
jp BuenasPassword8
-.PlayPassword
+.PlayPassword:
call StartRadioStation
ld a, [hBGMapMode]
push af
@@ -1594,7 +1594,7 @@
; Set the flag so that we don't generate a new password this week.
ld hl, WeeklyFlags
set 7, [hl]
-.AlreadyGotIt
+.AlreadyGotIt:
ld c, a
call GetBuenasPassword
ld hl, BuenaRadioText4
@@ -1638,7 +1638,7 @@
ld c, [hl]
ret
-.StringFunctionJumpTable
+.StringFunctionJumpTable:
dw .Mon
dw .Item
dw .Move
@@ -1645,22 +1645,22 @@
dw .RawString
-.Mon
+.Mon:
call .GetTheIndex
call GetPokemonName
ret
-.Item
+.Item:
call .GetTheIndex
call GetItemName
ret
-.Move
+.Move:
call .GetTheIndex
call GetMoveName
ret
-.GetTheIndex
+.GetTheIndex:
ld h, 0
ld l, c
add hl, de
@@ -1668,7 +1668,7 @@
ld [wNamedObjectIndexBuffer], a
ret
-.RawString
+.RawString:
; Get the string from the table...
ld a, c
and a
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -582,7 +582,7 @@
itemnotify
end
-.Full
+.Full:
buttonsound
pocketisfull
end
@@ -681,19 +681,19 @@
call CopyName2
ret
-.Pockets
+.Pockets:
dw .Item
dw .Key
dw .Ball
dw .TM
-.Item
+.Item:
db "ITEM POCKET@"
-.Key
+.Key:
db "KEY POCKET@"
-.Ball
+.Ball:
db "BALL POCKET@"
-.TM
+.TM:
db "TM POCKET@"
; 97051
@@ -1425,12 +1425,12 @@
applymovement2 .Hide
end
-.Show
+.Show:
show_emote
step_sleep_1
step_end
-.Hide
+.Hide:
hide_emote
step_sleep_1
step_end
@@ -1455,7 +1455,7 @@
jp ScriptCall
; 973e6
-.script: ; 973e6
+.script ; 973e6
applymovement PLAYER, wd002
end
; 973eb
--- a/engine/scrolling_menu.asm
+++ b/engine/scrolling_menu.asm
@@ -22,7 +22,7 @@
jr .loop
; 245d6
-.exit: ; 245d6
+.exit ; 245d6
call MenuClickSound
ld [wMenuJoypad], a
ld a, 0
@@ -30,7 +30,7 @@
ret
; 245e1
-.zero: ; 245e1
+.zero ; 245e1
call ScrollingMenu_InitDisplay
ld a, 1
ld [hBGMapMode], a
@@ -84,13 +84,13 @@
jr .loop
; 24640
-.unreferenced: ; unreferenced
+.unreferenced ; unreferenced
ld a, -1
and a
ret
; 24644
-.a_button: ; 24644
+.a_button ; 24644
call PlaceHollowCursor
ld a, [wMenuCursorY]
dec a
@@ -111,13 +111,13 @@
ret
; 2466f
-.b_button: ; 2466f
+.b_button ; 2466f
ld a, B_BUTTON
scf
ret
; 24673
-.select: ; 24673
+.select ; 24673
ld a, [wMenuData2Flags]
bit 7, a
jp z, xor_a_dec_a
@@ -135,7 +135,7 @@
ret
; 24695
-.start: ; 24695
+.start ; 24695
ld a, [wMenuData2Flags]
bit 6, a
jp z, xor_a_dec_a
@@ -144,7 +144,7 @@
ret
; 246a1
-.d_left: ; 246a1
+.d_left ; 246a1
ld hl, w2DMenuFlags2
bit 7, [hl]
jp z, xor_a_dec_a
@@ -156,7 +156,7 @@
ret
; 246b5
-.d_right: ; 246b5
+.d_right ; 246b5
ld hl, w2DMenuFlags2
bit 7, [hl]
jp z, xor_a_dec_a
@@ -168,7 +168,7 @@
ret
; 246c9
-.d_up: ; 246c9
+.d_up ; 246c9
ld hl, w2DMenuFlags2
bit 7, [hl]
jp z, xor_a
@@ -183,7 +183,7 @@
jp xor_a_dec_a
; 246df
-.d_down: ; 246df
+.d_down ; 246df
ld hl, w2DMenuFlags2
bit 7, [hl]
jp z, xor_a
@@ -210,17 +210,17 @@
ret
; 24706
-Function24706: ; 24706 (9:4706)
+ScrollingMenu_ClearLeftColumn: ; 24706 (9:4706)
call MenuBoxCoord2Tile
ld de, SCREEN_WIDTH
add hl, de
ld de, 2 * SCREEN_WIDTH
ld a, [wMenuData2_ScrollingMenuHeight]
-.asm_24713
+.loop
ld [hl], " "
add hl, de
dec a
- jr nz, .asm_24713
+ jr nz, .loop
ret
InitScrollingMenuCursor: ; 2471a
--- a/engine/selectmenu.asm
+++ b/engine/selectmenu.asm
@@ -4,7 +4,7 @@
jr c, .NotRegistered
jp UseRegisteredItem
-.NotRegistered
+.NotRegistered:
call OpenText
ld b, BANK(ItemMayBeRegisteredText)
ld hl, ItemMayBeRegisteredText
@@ -32,13 +32,13 @@
rst JumpTable
ret
-.Pockets
+.Pockets:
dw .CheckItem
dw .CheckBall
dw .CheckKeyItem
dw .CheckTMHM
-.CheckItem
+.CheckItem:
ld hl, NumItems
call .CheckRegisteredNo
jr c, .NoRegisteredItem
@@ -53,7 +53,7 @@
and a
ret
-.CheckKeyItem
+.CheckKeyItem:
ld a, [RegisteredItem]
ld hl, KeyItems
ld de, 1
@@ -64,7 +64,7 @@
and a
ret
-.CheckBall
+.CheckBall:
ld hl, NumBalls
call .CheckRegisteredNo
jr nc, .NoRegisteredItem
@@ -78,10 +78,10 @@
jr c, .NoRegisteredItem
ret
-.CheckTMHM
+.CheckTMHM:
jr .NoRegisteredItem
-.NoRegisteredItem
+.NoRegisteredItem:
xor a
ld [WhichRegisteredItem], a
ld [RegisteredItem], a
@@ -90,7 +90,7 @@
; 133a6
-.CheckRegisteredNo ; 133a6
+.CheckRegisteredNo: ; 133a6
ld a, [WhichRegisteredItem]
and REGISTERED_NUMBER
dec a
@@ -100,13 +100,13 @@
and a
ret
-.NotEnoughItems
+.NotEnoughItems:
scf
ret
; 133b6
-.IsSameItem ; 133b6
+.IsSameItem: ; 133b6
ld a, [RegisteredItem]
cp [hl]
jr nz, .NotSameItem
@@ -114,7 +114,7 @@
and a
ret
-.NotSameItem
+.NotSameItem:
scf
ret
; 133c3
@@ -128,7 +128,7 @@
rst JumpTable
ret
-.SwitchTo
+.SwitchTo:
dw .CantUse
dw .NoFunction
dw .NoFunction
@@ -138,7 +138,7 @@
dw .Overworld
; 133df
-.NoFunction ; 133df
+.NoFunction: ; 133df
call OpenText
call CantUseItem
call CloseText
@@ -146,7 +146,7 @@
ret
; 133ea
-.Current ; 133ea
+.Current: ; 133ea
call OpenText
call DoItemEffect
call CloseText
@@ -154,7 +154,7 @@
ret
; 133f5
-.Party ; 133f5
+.Party: ; 133f5
call RefreshScreen
call FadeToMenu
call DoItemEffect
@@ -164,7 +164,7 @@
ret
; 13406
-.Overworld ; 13406
+.Overworld: ; 13406
call RefreshScreen
ld a, 1
ld [wUsingItemWithSelect], a
@@ -180,7 +180,7 @@
ret
; 13422
-.CantUse ; 13422
+.CantUse: ; 13422
call RefreshScreen
._cantuse
--- /dev/null
+++ b/engine/sine.asm
@@ -1,0 +1,50 @@
+_Sine:: ; 84d9
+; A simple sine function.
+; Return d * sin(e) in hl.
+
+; e is a signed 6-bit value.
+ ld a, e
+ and %111111
+ cp %100000
+ jr nc, .negative
+
+ call .ApplySineWave
+ ld a, h
+ ret
+
+.negative
+ and %011111
+ call .ApplySineWave
+ ld a, h
+ xor -1
+ inc a
+ ret
+
+.ApplySineWave: ; 84ef
+ ld e, a
+ ld a, d
+ ld d, 0
+ ld hl, .sinewave
+ add hl, de
+ add hl, de
+ ld e, [hl]
+ inc hl
+ ld d, [hl]
+ ld hl, 0
+
+; Factor amplitude
+.multiply
+ srl a
+ jr nc, .even
+ add hl, de
+.even
+ sla e
+ rl d
+ and a
+ jr nz, .multiply
+ ret
+
+.sinewave ; 850b
+; A $20-word table representing a sine wave.
+; 90 degrees is index $10 at a base amplitude of $100.
+ sine_wave $100
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -213,7 +213,7 @@
SlotsJumptable: ; 92844 (24:6844)
jumptable .Jumptable, wJumptableIndex
-.Jumptable
+.Jumptable:
dw Slots_Init ; 00
dw Slots_BetAndStart ; 01
dw Slots_WaitStart ; 02
@@ -358,7 +358,7 @@
call Slots_Next
ret
-.GotIt
+.GotIt:
call Slots_Next
ld a, 16
ld [wcf64], a
@@ -800,8 +800,8 @@
; 92be4 (24:6be4)
-.dw: ; 92be4
-
+.dw ; 92be4
+
dw ReelAction_DoNothing ; 00
dw Slots_StopReelIgnoreJoypad ; 01
dw ReelAction_QuadrupleRate ; 02
@@ -893,7 +893,7 @@
dec [hl]
ret
-.EndReel
+.EndReel:
ld hl, wReel1ReelAction - wReel1
add hl, bc
ld a, $0
@@ -914,7 +914,7 @@
dec [hl]
call .CheckForBias
ret nz
-.NoBias
+.NoBias:
call Slots_StopReel
ret
@@ -955,7 +955,7 @@
dec [hl]
ret
-.NoBias
+.NoBias:
call Slots_StopReel
ret
@@ -975,7 +975,7 @@
dec [hl]
ret
-.NoMatch
+.NoMatch:
ld a, [wSlotBias]
cp SLOTS_NOMATCH
jr z, .NoBias
@@ -987,7 +987,7 @@
dec [hl]
ret
-.NoBias
+.NoBias:
call Slots_StopReel
ret
@@ -1177,7 +1177,7 @@
call Slots_StopReel
ret
-.EggAgain
+.EggAgain:
ld hl, wReel1SpinRate - wReel1
add hl, bc
ld [hl], $0
@@ -1234,7 +1234,7 @@
dec [hl]
ret
-.DropReel
+.DropReel:
ld hl, wReel1ReelAction - wReel1
add hl, bc
dec [hl]
@@ -1323,7 +1323,7 @@
; 92ebd
.Jumptable: ; 92ebd
-
+
dw .zero
dw .one
dw .two
@@ -1330,18 +1330,18 @@
dw .three
; 92ec5
-.three: ; 92ec5
+.three ; 92ec5
call .CheckUpwardsDiag
call .CheckDownwardsDiag
-.two: ; 92ecb
+.two ; 92ecb
call .CheckBottomRow
call .CheckTopRow
-.one: ; 92ed1
+.one ; 92ed1
call .CheckMiddleRow
-.zero: ; 92ed4
+.zero ; 92ed4
ret
; 92ed5
@@ -1438,7 +1438,7 @@
; 92f48
.Jumptable: ; 92f48
-
+
dw .zero
dw .one
dw .two
@@ -1445,18 +1445,18 @@
dw .three
; 92f50
-.three: ; 92f50
+.three ; 92f50
call .CheckUpwardsDiag
call .CheckDownwardsDiag
-.two: ; 92f56
+.two ; 92f56
call .CheckBottomRow
call .CheckTopRow
-.one: ; 92f5c
+.one ; 92f5c
call .CheckMiddleRow
-.zero: ; 92f5f
+.zero ; 92f5f
ret
; 92f60
@@ -1706,7 +1706,7 @@
call PrintText
jr .loop
-.Start
+.Start:
ld hl, Coins + 1
ld a, [hl]
sub c
@@ -1815,7 +1815,7 @@
callba MobileFn_105fe3
ret
-.PayoutTable
+.PayoutTable:
dw 300
dw 50
dw 6
@@ -1839,7 +1839,7 @@
callba MobileFn_105fd0
ret
-.MatchedSomething
+.MatchedSomething:
srl a
ld e, a
ld d, 0
@@ -1961,13 +1961,13 @@
jp [hl]
.Jumptable: ; 9322d (24:722d)
-
+
dw .init
dw .fall
dw .roll
-.init: ; 93233 (24:7233)
+.init ; 93233 (24:7233)
ld hl, SPRITEANIMSTRUCT_0E
add hl, bc
ld a, [hl]
@@ -1992,7 +1992,7 @@
add hl, bc
ld [hl], $0
-.fall: ; 93259 (24:7259)
+.fall ; 93259 (24:7259)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -2021,7 +2021,7 @@
call Slots_PlaySFX
ret
-.roll: ; 93289 (24:7289)
+.roll ; 93289 (24:7289)
ld hl, SPRITEANIMSTRUCT_XOFFSET
add hl, bc
ld a, [hl]
@@ -2062,13 +2062,13 @@
jp [hl]
.Jumptable: ; 932bc (24:72bc)
-
+
dw .walk
dw .one
dw .two
-.walk: ; 932c2 (24:72c2)
+.walk ; 932c2 (24:72c2)
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
@@ -2088,7 +2088,7 @@
ld a, $1
ld [wcf64], a
-.one: ; 932e0 (24:72e0)
+.one ; 932e0 (24:72e0)
ld a, [wcf64]
cp $2
jr z, .retain
@@ -2106,7 +2106,7 @@
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld [hl], $8
-.two: ; 932fc (24:72fc)
+.two ; 932fc (24:72fc)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -578,7 +578,7 @@
ld [ScriptVar], a
ret
-.ProximityCoords
+.ProximityCoords:
; x, y
db 33, 8 ; left
db 34, 10 ; below
--- a/engine/sprite_anims.asm
+++ b/engine/sprite_anims.asm
@@ -13,7 +13,7 @@
; 8d25b
.Jumptable: ; 8d25b (23:525b)
-
+
dw .Null ; null
dw .one ; bouncing mon icon
dw .two ; bouncing mon icon, selected
@@ -54,7 +54,7 @@
.Null: ; 8d2a1 (23:52a1)
ret
-.one: ; 8d2a2 (23:52a2)
+.one ; 8d2a2 (23:52a2)
ld a, [wMenuCursorY]
ld hl, SPRITEANIMSTRUCT_INDEX
@@ -71,7 +71,7 @@
ld [hl], $0
ret
-.two: ; 8d2b9 (23:52b9)
+.two ; 8d2b9 (23:52b9)
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld [hl], 8 * 3
@@ -113,7 +113,7 @@
ld [hl], a
ret
-.three: ; 8d2ea (23:52ea)
+.three ; 8d2ea (23:52ea)
ld a, [wMenuCursorY]
ld hl, SPRITEANIMSTRUCT_INDEX
@@ -132,7 +132,7 @@
ld [hl], 8 * 3
ret
-.four: ; 8d302 (23:5302)
+.four ; 8d302 (23:5302)
call .anonymous_dw
jp [hl]
; 8d306 (23:5306)
@@ -142,7 +142,7 @@
dw .four_one
; 8d30a
-.four_zero: ; 8d30a
+.four_zero ; 8d30a
call .IncrementSpriteAnimStruct0B
ld hl, SPRITEANIMSTRUCT_INDEX
@@ -160,7 +160,7 @@
add hl, bc
ld [hl], a
-.four_one: ; 8d321
+.four_one ; 8d321
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
@@ -203,7 +203,7 @@
ret
; 8d35a
-.twentyfive: ; 8d35a (23:535a)
+.twentyfive ; 8d35a (23:535a)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -217,11 +217,11 @@
ld [hl], a
ret
-.namingscreencursor: ; 8d36c (23:536c)
+.namingscreencursor ; 8d36c (23:536c)
callab NamingScreen_AnimateCursor
ret
-.mailcompositioncursor: ; 8d373 (23:5373)
+.mailcompositioncursor ; 8d373 (23:5373)
callab ComposeMail_AnimateCursor
ret
@@ -229,7 +229,7 @@
callab GameFreakLogoJumper
ret
-.seven: ; 8d381 (23:5381)
+.seven ; 8d381 (23:5381)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -279,7 +279,7 @@
call DeinitializeSprite
ret
-.eight: ; 8d3c3 (23:53c3)
+.eight ; 8d3c3 (23:53c3)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hli]
@@ -404,19 +404,19 @@
ld [hl], a
ret
-.thirteen: ; 8d46e (23:546e)
+.thirteen ; 8d46e (23:546e)
callab ret_e00ed
ret
-.fifteen: ; 8d475 (23:5475)
+.fifteen ; 8d475 (23:5475)
callab AnimatePokegearModeIndicatorArrow
ret
-.fourteen: ; 8d47c (23:547c)
+.fourteen ; 8d47c (23:547c)
callab DummyGame_InterpretJoypad_AnimateCursor
ret
-.sixteen: ; 8d483 (23:5483)
+.sixteen ; 8d483 (23:5483)
call .anonymous_dw
jp [hl]
; 8d487 (23:5487)
@@ -430,7 +430,7 @@
dw .sixteen_five
; 8d493
-.sixteen_zero: ; 8d493
+.sixteen_zero ; 8d493
ld a, $14
call _ReinitSpriteAnimFrame
@@ -444,7 +444,7 @@
ret
; 8d4a5
-.sixteen_two: ; 8d4a5
+.sixteen_two ; 8d4a5
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -460,7 +460,7 @@
add hl, bc
ld [hl], $40
-.sixteen_three: ; 8d4b8
+.sixteen_three ; 8d4b8
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -481,7 +481,7 @@
jr .sixteen_five
; 8d4d5
-.sixteen_one: ; 8d4d5
+.sixteen_one ; 8d4d5
ld hl, SPRITEANIMSTRUCT_0B
add hl, bc
ld [hl], $4
@@ -496,7 +496,7 @@
ret
; 8d4e8
-.sixteen_four: ; 8d4e8
+.sixteen_four ; 8d4e8
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld a, [hl]
@@ -542,12 +542,12 @@
call .IncrementSpriteAnimStruct0B
ret
-.sixteen_five: ; 8d526
+.sixteen_five ; 8d526
call DeinitializeSprite
ret
; 8d52a
-.seventeen: ; 8d52a (23:552a)
+.seventeen ; 8d52a (23:552a)
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
@@ -565,7 +565,7 @@
call DeinitializeSprite
ret
-.eighteen: ; 8d543 (23:5543)
+.eighteen ; 8d543 (23:5543)
callab Function29676
ret
@@ -610,7 +610,7 @@
callab AnimateTuningKnob
ret
-.twentyone: ; 8d57f (23:557f)
+.twentyone ; 8d57f (23:557f)
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld e, [hl]
@@ -749,15 +749,15 @@
ld [hl], a
ret
-.twentyseven: ; 8d630 (23:5630)
+.twentyseven ; 8d630 (23:5630)
callba Function108bc7
ret
-.twentyeight: ; 8d637 (23:5637)
+.twentyeight ; 8d637 (23:5637)
callba Function108be0
ret
-.twentynine: ; 8d63e (23:563e)
+.twentynine ; 8d63e (23:563e)
ld a, [wcf65]
and a
jr nz, .asm_8d645
@@ -784,7 +784,7 @@
call _ReinitSpriteAnimFrame
ret
-.thirty: ; 8d666 (23:5666)
+.thirty ; 8d666 (23:5666)
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -803,7 +803,7 @@
.asm_8d67f
ret
-.thirtytwo: ; 8d680 (23:5680)
+.thirtytwo ; 8d680 (23:5680)
ld hl, SPRITEANIMSTRUCT_0B
add hl, bc
ld d, [hl]
@@ -830,7 +830,7 @@
ld [hl], a
ret
-.thirtythree: ; 8d6a2 (23:56a2)
+.thirtythree ; 8d6a2 (23:56a2)
ld a, [wcf64]
cp $40
ret nz
@@ -838,7 +838,7 @@
call _ReinitSpriteAnimFrame
ret
-.thirtyfour: ; 8d6ae (23:56ae)
+.thirtyfour ; 8d6ae (23:56ae)
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
@@ -846,15 +846,15 @@
ld [hl], a
ret
-.twentysix: ; 8d6b7 (23:56b7)
+.twentysix ; 8d6b7 (23:56b7)
callba Function11d0b6
ret
-.thirtyone: ; 8d6be (23:56be)
+.thirtyone ; 8d6be (23:56be)
callba UpdateCelebiPosition
ret
-.anonymous_dw: ; 8d6c5 (23:56c5)
+.anonymous_dw ; 8d6c5 (23:56c5)
ld hl, [sp+$0]
ld e, [hl]
inc hl
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -173,7 +173,7 @@
ld [hli], a
inc de
; Look up the third field from the table in the wSpriteAnimDict array (10x2).
-; Take the value and load it in
+; Take the value and load it in
ld a, [de]
call GetSpriteAnimVTile
ld [hli], a
@@ -649,7 +649,7 @@
ret
; 8e75d
-.sinewave: ; 8e75d
+.sinewave ; 8e75d
sine_wave $100
--- a/engine/startmenu.asm
+++ b/engine/startmenu.asm
@@ -12,7 +12,7 @@
ld hl, .MenuDataHeader
jr z, .GotMenuData
ld hl, .ContestMenuDataHeader
-.GotMenuData
+.GotMenuData:
call LoadMenuDataHeader
call .SetUpMenuItems
@@ -28,7 +28,7 @@
call UpdateTimePals
jr .Select
-.Reopen
+.Reopen:
call UpdateSprites
call UpdateTimePals
call .SetUpMenuItems
@@ -35,7 +35,7 @@
ld a, [wd0d2]
ld [wMenuCursorBuffer], a
-.Select
+.Select:
call .GetInput
jr c, .Exit
call .DrawMenuAccount
@@ -57,7 +57,7 @@
ld l, a
jp [hl]
-.MenuReturns
+.MenuReturns:
dw .Reopen
dw .Exit
dw .ExitMenuCallFuncCloseText
@@ -66,7 +66,7 @@
dw .ReturnEnd
dw .ReturnRedraw
-.Exit
+.Exit:
ld a, [hOAMUpdate]
push af
ld a, 1
@@ -74,14 +74,14 @@
call LoadFontsExtra
pop af
ld [hOAMUpdate], a
-.ReturnEnd
+.ReturnEnd:
call ExitMenu
-.ReturnEnd2
+.ReturnEnd2:
call CloseText
call UpdateTimePals
ret
-.GetInput
+.GetInput:
; Return carry on exit, and no-carry on selection.
xor a
ld [hBGMapMode], a
@@ -91,7 +91,7 @@
ld [MenuSelection], a
.loop
call .PrintMenuAccount
- call Function1f1a
+ call GetScrollingMenuJoypad
ld a, [wMenuJoypad]
cp B_BUTTON
jr z, .b
@@ -107,7 +107,7 @@
ret
; 12691
-.ExitMenuRunScript ; 12691
+.ExitMenuRunScript: ; 12691
call ExitMenu
ld a, HMENURETURN_SCRIPT
ld [hMenuReturn], a
@@ -114,7 +114,7 @@
ret
; 12699
-.ExitMenuRunScriptCloseText ; 12699
+.ExitMenuRunScriptCloseText: ; 12699
call ExitMenu
ld a, HMENURETURN_SCRIPT
ld [hMenuReturn], a
@@ -121,7 +121,7 @@
jr .ReturnEnd2
; 126a2
-.ExitMenuCallFuncCloseText ; 126a2
+.ExitMenuCallFuncCloseText: ; 126a2
call ExitMenu
ld hl, wQueuedScriptAddr
ld a, [hli]
@@ -132,12 +132,12 @@
jr .ReturnEnd2
; 126b1
-.ReturnRedraw ; 126b1
+.ReturnRedraw: ; 126b1
call .Clear
jp .Reopen
; 126b7
-.Clear ; 126b7
+.Clear: ; 126b7
call ClearBGPalettes
call Call_ExitMenu
call ReloadTilesetAndPalettes
@@ -151,7 +151,7 @@
; 126d3
-.MenuDataHeader
+.MenuDataHeader:
db $40 ; tile backup
db 0, 10 ; start coords
db 17, 19 ; end coords
@@ -158,7 +158,7 @@
dw .MenuData
db 1 ; default selection
-.ContestMenuDataHeader
+.ContestMenuDataHeader:
db $40 ; tile backup
db 2, 10 ; start coords
db 17, 19 ; end coords
@@ -165,7 +165,7 @@
dw .MenuData
db 1 ; default selection
-.MenuData
+.MenuData:
db %10101000 ; x padding, wrap around, start can close
dn 0, 0 ; rows, columns
dw MenuItemsList
@@ -172,7 +172,7 @@
dw .MenuString
dw .Items
-.Items
+.Items:
dw StartMenu_Pokedex, .PokedexString, .PokedexDesc
dw StartMenu_Pokemon, .PartyString, .PartyDesc
dw StartMenu_Pack, .PackString, .PackDesc
@@ -183,45 +183,45 @@
dw StartMenu_Pokegear, .PokegearString, .PokegearDesc
dw StartMenu_Quit, .QuitString, .QuitDesc
-.PokedexString db "#DEX@"
-.PartyString db "#MON@"
-.PackString db "PACK@"
-.StatusString db "<PLAYER>@"
-.SaveString db "SAVE@"
-.OptionString db "OPTION@"
-.ExitString db "EXIT@"
-.PokegearString db $24, "GEAR@"
-.QuitString db "QUIT@"
+.PokedexString: db "#DEX@"
+.PartyString: db "#MON@"
+.PackString: db "PACK@"
+.StatusString: db "<PLAYER>@"
+.SaveString: db "SAVE@"
+.OptionString: db "OPTION@"
+.ExitString: db "EXIT@"
+.PokegearString: db $24, "GEAR@"
+.QuitString: db "QUIT@"
-.PokedexDesc db "#MON"
+.PokedexDesc: db "#MON"
next "database@"
-.PartyDesc db "Party ", $4a
+.PartyDesc: db "Party ", $4a
next "status@"
-.PackDesc db "Contains"
+.PackDesc: db "Contains"
next "items@"
-.PokegearDesc db "Trainer's"
+.PokegearDesc: db "Trainer's"
next "key device@"
-.StatusDesc db "Your own"
+.StatusDesc: db "Your own"
next "status@"
-.SaveDesc db "Save your"
+.SaveDesc: db "Save your"
next "progress@"
-.OptionDesc db "Change"
+.OptionDesc: db "Change"
next "settings@"
-.ExitDesc db "Close this"
+.ExitDesc: db "Close this"
next "menu@"
-.QuitDesc db "Quit and"
+.QuitDesc: db "Quit and"
next "be judged.@"
-.OpenMenu ; 127e5
+.OpenMenu: ; 127e5
ld a, [MenuSelection]
call .GetMenuAccountTextPointer
ld a, [hli]
@@ -230,7 +230,7 @@
jp [hl]
; 127ef
-.MenuString ; 127ef
+.MenuString: ; 127ef
push de
ld a, [MenuSelection]
call .GetMenuAccountTextPointer
@@ -244,7 +244,7 @@
ret
; 12800
-.MenuDesc ; 12800
+.MenuDesc: ; 12800
push de
ld a, [MenuSelection]
cp $ff
@@ -265,7 +265,7 @@
; 12819
-.GetMenuAccountTextPointer ; 12819
+.GetMenuAccountTextPointer: ; 12819
ld e, a
ld d, 0
ld hl, wMenuData2PointerTableAddr
@@ -279,7 +279,7 @@
; 12829
-.SetUpMenuItems ; 12829
+.SetUpMenuItems: ; 12829
xor a
ld [wWhichIndexSet], a
call .FillMenuList
@@ -340,7 +340,7 @@
; 1288d
-.FillMenuList ; 1288d
+.FillMenuList: ; 1288d
xor a
ld hl, MenuItemsList
ld [hli], a
@@ -352,7 +352,7 @@
ret
; 128a0
-.AppendMenuList ; 128a0
+.AppendMenuList: ; 128a0
ld [de], a
inc de
inc c
@@ -359,11 +359,11 @@
ret
; 128a4
-.DrawMenuAccount_ ; 128a4
+.DrawMenuAccount_: ; 128a4
jp .DrawMenuAccount
; 128a7
-.PrintMenuAccount ; 128a7
+.PrintMenuAccount: ; 128a7
call .IsMenuAccountOn
ret z
call .DrawMenuAccount
@@ -371,7 +371,7 @@
jp .MenuDesc
; 128b4
-.DrawMenuAccount ; 128b4
+.DrawMenuAccount: ; 128b4
call .IsMenuAccountOn
ret z
hlcoord 0, 13
@@ -383,13 +383,13 @@
jp TextBoxPalette
; 128cb
-.IsMenuAccountOn ; 128cb
+.IsMenuAccountOn: ; 128cb
ld a, [Options2]
and 1
ret
; 128d1
-.DrawBugContestStatusBox ; 128d1
+.DrawBugContestStatusBox: ; 128d1
ld hl, StatusFlags2
bit 2, [hl] ; bug catching contest
ret z
@@ -397,7 +397,7 @@
ret
; 128de
-.DrawBugContestStatus ; 128de
+.DrawBugContestStatus: ; 128de
ld hl, StatusFlags2
bit 2, [hl] ; bug catching contest
jr nz, .contest
@@ -428,11 +428,11 @@
ld a, 4
ret
-.DontEndContest
+.DontEndContest:
ld a, 0
ret
-.EndTheContestText
+.EndTheContestText:
text_jump UnknownText_0x1c1a6c
db "@"
; 1290b
@@ -591,14 +591,14 @@
and a
ret
-Function129f4: ; 129f4
+TossItemFromPC: ; 129f4
push de
call PartyMonItemName
callba _CheckTossableItem
ld a, [wItemAttributeParamBuffer]
and a
- jr nz, .asm_12a3f
- ld hl, UnknownText_0x12a45
+ jr nz, .key_item
+ ld hl, .TossHowMany
call MenuTextBox
callba SelectQuantityToToss
push af
@@ -605,56 +605,52 @@
call CloseWindow
call ExitMenu
pop af
- jr c, .asm_12a42
- ld hl, UnknownText_0x12a4a
+ jr c, .quit
+ ld hl, .ConfirmToss
call MenuTextBox
call YesNoBox
push af
call ExitMenu
pop af
- jr c, .asm_12a42
+ jr c, .quit
pop hl
ld a, [wd107]
call TossItem
call PartyMonItemName
- ld hl, UnknownText_0x12a4f
+ ld hl, .TossedThisMany
call MenuTextBox
call ExitMenu
and a
ret
-.asm_12a3f
- call Function12a54
-.asm_12a42
+
+.key_item
+ call .CantToss
+.quit
pop hl
scf
ret
-; 12a45 (4:6a45)
-UnknownText_0x12a45: ; 0x12a45
+.TossHowMany:
; Toss out how many @ (S)?
text_jump UnknownText_0x1c1a90
db "@"
-; 0x12a4a
-UnknownText_0x12a4a: ; 0x12a4a
+.ConfirmToss:
; Throw away @ @ (S)?
text_jump UnknownText_0x1c1aad
db "@"
-; 0x12a4f
-UnknownText_0x12a4f: ; 0x12a4f
+.TossedThisMany:
; Discarded @ (S).
text_jump UnknownText_0x1c1aca
db "@"
-; 0x12a54
-Function12a54: ; 12a54 (4:6a54)
- ld hl, UnknownText_0x12a5b
+.CantToss:
+ ld hl, .TooImportantToToss
call MenuTextBoxBackup
ret
-; 12a5b (4:6a5b)
-UnknownText_0x12a5b: ; 0x12a5b
+.TooImportantToToss:
; That's too impor- tant to toss out!
text_jump UnknownText_0x1c1adf
db "@"
@@ -711,7 +707,7 @@
ld a, 0
ret
-.Actions
+.Actions:
dbw MONMENU_CUT, MonMenu_Cut ; Cut
dbw MONMENU_FLY, MonMenu_Fly ; Fly
dbw MONMENU_SURF, MonMenu_Surf ; Surf
@@ -780,7 +776,7 @@
ld a, 1
ret
-.DontSwitch
+.DontSwitch:
xor a
ld [PartyMenuActionText], a
call CancelPokemonAction
@@ -830,7 +826,7 @@
; 12ba9
-.GiveItem: ; 12ba9
+.GiveItem:
callba DepositSellInitPackBuffers
@@ -986,7 +982,7 @@
dw .Items
db 1 ; default option
-.Items
+.Items:
db %10000000 ; x padding
db 2 ; # items
db "GIVE@"
@@ -1136,12 +1132,12 @@
call MenuTextBoxBackup
jr .done
-.MailboxFull
+.MailboxFull:
ld hl, .mailboxfulltext
call MenuTextBoxBackup
jr .done
-.RemoveMailToBag
+.RemoveMailToBag:
ld hl, .mailwilllosemessagetext
call StartMenuYesNo
jr c, .done
@@ -1157,7 +1153,7 @@
call MenuTextBoxBackup
jr .done
-.BagIsFull
+.BagIsFull:
ld hl, .bagfulltext
call MenuTextBoxBackup
jr .done
@@ -1168,7 +1164,7 @@
; 12dc9
-.MenuDataHeader: ; 0x12dc9
+.MenuDataHeader:
db $40 ; flags
db 10, 12 ; start coords
db 17, 19 ; end coords
@@ -1176,7 +1172,7 @@
db 1 ; default option
; 0x12dd1
-.MenuData2: ; 0x12dd1
+.MenuData2:
db $80 ; flags
db 3 ; items
db "READ@"
@@ -1185,37 +1181,37 @@
; 0x12de2
-.mailwilllosemessagetext: ; 0x12de2
+.mailwilllosemessagetext
; The MAIL will lose its message. OK?
text_jump UnknownText_0x1c1c22
db "@"
; 0x12de7
-.tookmailfrommontext: ; 0x12de7
+.tookmailfrommontext
; MAIL detached from <POKEMON>.
text_jump UnknownText_0x1c1c47
db "@"
; 0x12dec
-.bagfulltext: ; 0x12dec
+.bagfulltext
; There's no space for removing MAIL.
text_jump UnknownText_0x1c1c62
db "@"
; 0x12df1
-.sendmailtopctext: ; 0x12df1
+.sendmailtopctext
; Send the removed MAIL to your PC?
text_jump UnknownText_0x1c1c86
db "@"
; 0x12df6
-.mailboxfulltext: ; 0x12df6
+.mailboxfulltext
; Your PC's MAILBOX is full.
text_jump UnknownText_0x1c1ca9
db "@"
; 0x12dfb
-.sentmailtopctext: ; 0x12dfb
+.sentmailtopctext
; The MAIL was sent to your PC.
text_jump UnknownText_0x1c1cc4
db "@"
@@ -1246,7 +1242,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12e30
@@ -1264,15 +1260,15 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
-.Error
+.Error:
ld a, $0
ret
-.Unused
+.Unused:
ld a, $1
ret
; 12e55
@@ -1286,7 +1282,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12e6a
@@ -1300,7 +1296,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12e7f
@@ -1314,7 +1310,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12e94
@@ -1328,7 +1324,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12ea9
@@ -1342,7 +1338,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12ebd
@@ -1356,7 +1352,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12ed1
@@ -1370,7 +1366,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12ee6
@@ -1381,7 +1377,7 @@
callba Softboiled_MilkDrinkFunction
jr .finish
-.NotEnoughHP
+.NotEnoughHP:
ld hl, .Text_NotEnoughHP
call PrintText
@@ -1392,13 +1388,13 @@
ret
; 12f00
-.Text_NotEnoughHP: ; 0x12f00
+.Text_NotEnoughHP:
; Not enough HP!
text_jump UnknownText_0x1c1ce3
db "@"
; 0x12f05
-.CheckMonHasEnoughHP: ; 12f05
+.CheckMonHasEnoughHP:
; Need to have at least (MaxHP / 5) HP left.
ld a, MON_MAXHP
call GetPartyParamLocation
@@ -1429,7 +1425,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12f3b
@@ -1443,7 +1439,7 @@
ld a, $2
ret
-.Fail
+.Fail:
ld a, $3
ret
; 12f50
@@ -1471,7 +1467,7 @@
ret
; 12f73
-.asm_12f73: ; 12f73
+.asm_12f73
call SetUpMoveScreenBG
ld de, DeleteMoveScreenAttrs
call SetMenuAttributes
@@ -1480,7 +1476,7 @@
set 6, [hl]
jr .asm_12f93
-.asm_12f86: ; 12f86
+.asm_12f86
call ScrollingMenuJoypad
bit 1, a
jp nz, .asm_12f9f
@@ -1487,20 +1483,20 @@
bit 0, a
jp nz, .asm_12f9c
-.asm_12f93: ; 12f93
+.asm_12f93
call PrepareToPlaceMoveData
call PlaceMoveData
jp .asm_12f86
; 12f9c
-.asm_12f9c: ; 12f9c
+.asm_12f9c
and a
jr .asm_12fa0
-.asm_12f9f: ; 12f9f
+.asm_12f9f
scf
-.asm_12fa0: ; 12fa0
+.asm_12fa0
push af
xor a
ld [wSwitchMon], a
@@ -1583,7 +1579,7 @@
ld de, String_1316b
call PlaceString
jp .joy_loop
-.b_button: ; 13038
+.b_button
call PlayClickSFX
call WaitSFX
ld a, [wMoveSwapBuffer]
@@ -1600,7 +1596,7 @@
jp .loop
; 1305b
-.d_right: ; 1305b
+.d_right
ld a, [wMoveSwapBuffer]
and a
jp nz, .joy_loop
@@ -1615,7 +1611,7 @@
jp z, .joy_loop
jp MoveScreenLoop
-.d_left: ; 13075
+.d_left
ld a, [wMoveSwapBuffer]
and a
jp nz, .joy_loop
@@ -1665,7 +1661,7 @@
jr .cycle_left_loop
; 130c6
-.a_button: ; 130c6
+.a_button
call PlayClickSFX
call WaitSFX
ld a, [wMoveSwapBuffer]
@@ -1716,7 +1712,7 @@
jp .loop
; 1313a
-.copy_move: ; 1313a
+.copy_move
push hl
ld a, [wMenuCursorY]
dec a
@@ -1739,7 +1735,7 @@
ret
; 13154
-.exit: ; 13154
+.exit
xor a
ld [wMoveSwapBuffer], a
ld hl, w2DMenuFlags1
@@ -1776,7 +1772,7 @@
ld a, [hl]
ld [wd265], a
ld e, $2
- callba Function8e83f
+ callba LoadMenuMonIcon
hlcoord 0, 1
ld b, 9
ld c, 18
--- a/engine/stats_screen.asm
+++ b/engine/stats_screen.asm
@@ -100,7 +100,7 @@
; 4dd2a
StatsScreenPointerTable: ; 4dd2a
-
+
dw MonStatsInit ; regular pokémon
dw EggStatsInit ; egg
dw StatsScreenWaitCry
@@ -369,7 +369,7 @@
call StatsScreen_SetJumptableIndex
ret
-.b_button: ; 4dee4 (13:5ee4)
+.b_button ; 4dee4 (13:5ee4)
ld h, 7
call StatsScreen_SetJumptableIndex
ret
@@ -535,7 +535,7 @@
ret
.Jumptable: ; 4e00d (13:600d)
-
+
dw .PinkPage
dw .GreenPage
dw .BluePage
@@ -559,7 +559,7 @@
jr z, .NotImmuneToPkrs
hlcoord 8, 8
ld [hl], "."
-.NotImmuneToPkrs
+.NotImmuneToPkrs:
ld a, [MonType]
cp BOXMON
jr z, .StatusOK
@@ -570,12 +570,12 @@
pop hl
jr nz, .done_status
jr .StatusOK
-.HasPokerus
+.HasPokerus:
ld de, .PkrsStr
hlcoord 1, 13
call PlaceString
jr .done_status
-.StatusOK
+.StatusOK:
ld de, .OK_str
call PlaceString
.done_status
@@ -628,7 +628,7 @@
jr z, .AtMaxLevel
inc a
ld [TempMonLevel], a
-.AtMaxLevel
+.AtMaxLevel:
call PrintLevel
pop af
ld [TempMonLevel], a
@@ -657,7 +657,7 @@
ld [Buffer1], a ; wd1ea (aliases: MagikarpLength)
ret
-.AlreadyAtMaxLevel
+.AlreadyAtMaxLevel:
ld hl, Buffer1 ; wd1ea (aliases: MagikarpLength)
xor a
rept 2
@@ -747,7 +747,7 @@
ld de, SCREEN_WIDTH
ld b, 10
ld a, $31
-.BluePageVerticalDivider
+.BluePageVerticalDivider:
ld [hl], a
add hl, de
dec b
@@ -863,7 +863,7 @@
call .get_animation
ret
-.get_animation: ; 4e289 (13:6289)
+.get_animation ; 4e289 (13:6289)
ld a, [CurPartySpecies]
call IsAPokemon
ret c
@@ -1101,7 +1101,7 @@
hlcoord 15, 5
jr z, .load_square
hlcoord 17, 5
-.load_square: ; 4e4f7 (13:64f7)
+.load_square ; 4e4f7 (13:64f7)
push bc
ld [hli], a
inc a
--- a/engine/std_scripts.asm
+++ b/engine/std_scripts.asm
@@ -252,37 +252,37 @@
if_equal SATURDAY, .Saturday
stringtotext .SundayText, 0
end
-.Monday
+.Monday:
stringtotext .MondayText, 0
end
-.Tuesday
+.Tuesday:
stringtotext .TuesdayText, 0
end
-.Wednesday
+.Wednesday:
stringtotext .WednesdayText, 0
end
-.Thursday
+.Thursday:
stringtotext .ThursdayText, 0
end
-.Friday
+.Friday:
stringtotext .FridayText, 0
end
-.Saturday
+.Saturday:
stringtotext .SaturdayText, 0
end
-.SundayText
+.SundayText:
db "SUNDAY@"
-.MondayText
+.MondayText:
db "MONDAY@"
-.TuesdayText
+.TuesdayText:
db "TUESDAY@"
-.WednesdayText
+.WednesdayText:
db "WEDNESDAY@"
-.ThursdayText
+.ThursdayText:
db "THURSDAY@"
-.FridayText
+.FridayText:
db "FRIDAY@"
-.SaturdayText
+.SaturdayText:
db "SATURDAY@"
GoldenrodRocketsScript:
@@ -643,64 +643,64 @@
if_equal PHONE_BLACKBELT_KENJI, .Kenji
if_equal PHONE_HIKER_PARRY, .Parry
-.Jack
+.Jack:
farwritetext JackAskNumber1Text
end
-.Huey
+.Huey:
farwritetext HueyAskNumber1Text
end
-.Gaven
+.Gaven:
farwritetext GavenAskNumber1Text
end
-.Jose
+.Jose:
farwritetext JoseAskNumber1Text
end
-.Joey
+.Joey:
farwritetext JoeyAskNumber1Text
end
-.Wade
+.Wade:
farwritetext WadeAskNumber1Text
end
-.Ralph
+.Ralph:
farwritetext RalphAskNumber1Text
end
-.Anthony
+.Anthony:
farwritetext AnthonyAskNumber1Text
end
-.Todd
+.Todd:
farwritetext ToddAskNumber1Text
end
-.Irwin
+.Irwin:
farwritetext IrwinAskNumber1Text
end
-.Arnie
+.Arnie:
farwritetext ArnieAskNumber1Text
end
-.Alan
+.Alan:
farwritetext AlanAskNumber1Text
end
-.Chad
+.Chad:
farwritetext ChadAskNumber1Text
end
-.Derek
+.Derek:
farwritetext DerekAskNumber1Text
end
-.Tully
+.Tully:
farwritetext TullyAskNumber1Text
end
-.Brent
+.Brent:
farwritetext BrentAskNumber1Text
end
-.Vance
+.Vance:
farwritetext VanceAskNumber1Text
end
-.Wilton
+.Wilton:
farwritetext WiltonAskNumber1Text
end
-.Kenji
+.Kenji:
farwritetext KenjiAskNumber1Text
end
-.Parry
+.Parry:
farwritetext ParryAskNumber1Text
end
@@ -728,64 +728,64 @@
if_equal PHONE_BLACKBELT_KENJI, .Kenji
if_equal PHONE_HIKER_PARRY, .Parry
-.Jack
+.Jack:
farwritetext JackAskNumber2Text
end
-.Huey
+.Huey:
farwritetext HueyAskNumber2Text
end
-.Gaven
+.Gaven:
farwritetext GavenAskNumber2Text
end
-.Jose
+.Jose:
farwritetext JoseAskNumber2Text
end
-.Joey
+.Joey:
farwritetext JoeyAskNumber2Text
end
-.Wade
+.Wade:
farwritetext WadeAskNumber2Text
end
-.Ralph
+.Ralph:
farwritetext RalphAskNumber2Text
end
-.Anthony
+.Anthony:
farwritetext AnthonyAskNumber2Text
end
-.Todd
+.Todd:
farwritetext ToddAskNumber2Text
end
-.Irwin
+.Irwin:
farwritetext IrwinAskNumber2Text
end
-.Arnie
+.Arnie:
farwritetext ArnieAskNumber2Text
end
-.Alan
+.Alan:
farwritetext AlanAskNumber2Text
end
-.Chad
+.Chad:
farwritetext ChadAskNumber2Text
end
-.Derek
+.Derek:
farwritetext DerekAskNumber2Text
end
-.Tully
+.Tully:
farwritetext TullyAskNumber2Text
end
-.Brent
+.Brent:
farwritetext BrentAskNumber2Text
end
-.Vance
+.Vance:
farwritetext VanceAskNumber2Text
end
-.Wilton
+.Wilton:
farwritetext WiltonAskNumber2Text
end
-.Kenji
+.Kenji:
farwritetext KenjiAskNumber2Text
end
-.Parry
+.Parry:
farwritetext ParryAskNumber2Text
end
@@ -819,102 +819,102 @@
if_equal PHONE_BLACKBELT_KENJI, .Kenji
if_equal PHONE_HIKER_PARRY, .Parry
-.Jack
+.Jack:
farwritetext JackNumberAcceptedText
waitbutton
closetext
end
-.Huey
+.Huey:
farwritetext HueyNumberAcceptedText
waitbutton
closetext
end
-.Gaven
+.Gaven:
farwritetext GavenNumberAcceptedText
waitbutton
closetext
end
-.Jose
+.Jose:
farwritetext JoseNumberAcceptedText
waitbutton
closetext
end
-.Joey
+.Joey:
farwritetext JoeyNumberAcceptedText
waitbutton
closetext
end
-.Wade
+.Wade:
farwritetext WadeNumberAcceptedText
waitbutton
closetext
end
-.Ralph
+.Ralph:
farwritetext RalphNumberAcceptedText
waitbutton
closetext
end
-.Anthony
+.Anthony:
farwritetext AnthonyNumberAcceptedText
waitbutton
closetext
end
-.Todd
+.Todd:
farwritetext ToddNumberAcceptedText
waitbutton
closetext
end
-.Irwin
+.Irwin:
farwritetext IrwinNumberAcceptedText
waitbutton
closetext
end
-.Arnie
+.Arnie:
farwritetext ArnieNumberAcceptedText
waitbutton
closetext
end
-.Alan
+.Alan:
farwritetext AlanNumberAcceptedText
waitbutton
closetext
end
-.Chad
+.Chad:
farwritetext ChadNumberAcceptedText
waitbutton
closetext
end
-.Derek
+.Derek:
farwritetext DerekNumberAcceptedText
waitbutton
closetext
end
-.Tully
+.Tully:
farwritetext TullyNumberAcceptedText
waitbutton
closetext
end
-.Brent
+.Brent:
farwritetext BrentNumberAcceptedText
waitbutton
closetext
end
-.Vance
+.Vance:
farwritetext VanceNumberAcceptedText
waitbutton
closetext
end
-.Wilton
+.Wilton:
farwritetext WiltonNumberAcceptedText
waitbutton
closetext
end
-.Kenji
+.Kenji:
farwritetext KenjiNumberAcceptedText
waitbutton
closetext
end
-.Parry
+.Parry:
farwritetext ParryNumberAcceptedText
waitbutton
closetext
@@ -943,102 +943,102 @@
if_equal PHONE_BLACKBELT_KENJI, .Kenji
if_equal PHONE_HIKER_PARRY, .Parry
-.Jack
+.Jack:
farwritetext JackNumberDeclinedText
waitbutton
closetext
end
-.Huey
+.Huey:
farwritetext HueyNumberDeclinedText
waitbutton
closetext
end
-.Gaven
+.Gaven:
farwritetext GavenNumberDeclinedText
waitbutton
closetext
end
-.Jose
+.Jose:
farwritetext JoseNumberDeclinedText
waitbutton
closetext
end
-.Joey
+.Joey:
farwritetext JoeyNumberDeclinedText
waitbutton
closetext
end
-.Wade
+.Wade:
farwritetext WadeNumberDeclinedText
waitbutton
closetext
end
-.Ralph
+.Ralph:
farwritetext RalphNumberDeclinedText
waitbutton
closetext
end
-.Anthony
+.Anthony:
farwritetext AnthonyNumberDeclinedText
waitbutton
closetext
end
-.Todd
+.Todd:
farwritetext ToddNumberDeclinedText
waitbutton
closetext
end
-.Irwin
+.Irwin:
farwritetext IrwinNumberDeclinedText
waitbutton
closetext
end
-.Arnie
+.Arnie:
farwritetext ArnieNumberDeclinedText
waitbutton
closetext
end
-.Alan
+.Alan:
farwritetext AlanNumberDeclinedText
waitbutton
closetext
end
-.Chad
+.Chad:
farwritetext ChadNumberDeclinedText
waitbutton
closetext
end
-.Derek
+.Derek:
farwritetext DerekNumberDeclinedText
waitbutton
closetext
end
-.Tully
+.Tully:
farwritetext TullyNumberDeclinedText
waitbutton
closetext
end
-.Brent
+.Brent:
farwritetext BrentNumberDeclinedText
waitbutton
closetext
end
-.Vance
+.Vance:
farwritetext VanceNumberDeclinedText
waitbutton
closetext
end
-.Wilton
+.Wilton:
farwritetext WiltonNumberDeclinedText
waitbutton
closetext
end
-.Kenji
+.Kenji:
farwritetext KenjiNumberDeclinedText
waitbutton
closetext
end
-.Parry
+.Parry:
farwritetext ParryNumberDeclinedText
waitbutton
closetext
@@ -1067,102 +1067,102 @@
if_equal PHONE_BLACKBELT_KENJI, .Kenji
if_equal PHONE_HIKER_PARRY, .Parry
-.Jack
+.Jack:
farwritetext JackPhoneFullText
waitbutton
closetext
end
-.Huey
+.Huey:
farwritetext HueyPhoneFullText
waitbutton
closetext
end
-.Gaven
+.Gaven:
farwritetext GavenPhoneFullText
waitbutton
closetext
end
-.Jose
+.Jose:
farwritetext JosePhoneFullText
waitbutton
closetext
end
-.Joey
+.Joey:
farwritetext JoeyPhoneFullText
waitbutton
closetext
end
-.Wade
+.Wade:
farwritetext WadePhoneFullText
waitbutton
closetext
end
-.Ralph
+.Ralph:
farwritetext RalphPhoneFullText
waitbutton
closetext
end
-.Anthony
+.Anthony:
farwritetext AnthonyPhoneFullText
waitbutton
closetext
end
-.Todd
+.Todd:
farwritetext ToddPhoneFullText
waitbutton
closetext
end
-.Irwin
+.Irwin:
farwritetext IrwinPhoneFullText
waitbutton
closetext
end
-.Arnie
+.Arnie:
farwritetext ArniePhoneFullText
waitbutton
closetext
end
-.Alan
+.Alan:
farwritetext AlanPhoneFullText
waitbutton
closetext
end
-.Chad
+.Chad:
farwritetext ChadPhoneFullText
waitbutton
closetext
end
-.Derek
+.Derek:
farwritetext DerekPhoneFullText
waitbutton
closetext
end
-.Tully
+.Tully:
farwritetext TullyPhoneFullText
waitbutton
closetext
end
-.Brent
+.Brent:
farwritetext BrentPhoneFullText
waitbutton
closetext
end
-.Vance
+.Vance:
farwritetext VancePhoneFullText
waitbutton
closetext
end
-.Wilton
+.Wilton:
farwritetext WiltonPhoneFullText
waitbutton
closetext
end
-.Kenji
+.Kenji:
farwritetext KenjiPhoneFullText
waitbutton
closetext
end
-.Parry
+.Parry:
farwritetext ParryPhoneFullText
waitbutton
closetext
@@ -1188,87 +1188,87 @@
if_equal PHONE_FISHER_WILTON, .Wilton
if_equal PHONE_HIKER_PARRY, .Parry
-.Jack
+.Jack:
farwritetext JackRematchText
waitbutton
closetext
end
-.Huey
+.Huey:
farwritetext HueyRematchText
waitbutton
closetext
end
-.Gaven
+.Gaven:
farwritetext GavenRematchText
waitbutton
closetext
end
-.Jose
+.Jose:
farwritetext JoseRematchText
waitbutton
closetext
end
-.Joey
+.Joey:
farwritetext JoeyRematchText
waitbutton
closetext
end
-.Wade
+.Wade:
farwritetext WadeRematchText
waitbutton
closetext
end
-.Ralph
+.Ralph:
farwritetext RalphRematchText
waitbutton
closetext
end
-.Anthony
+.Anthony:
farwritetext AnthonyRematchText
waitbutton
closetext
end
-.Todd
+.Todd:
farwritetext ToddRematchText
waitbutton
closetext
end
-.Arnie
+.Arnie:
farwritetext ArnieRematchText
waitbutton
closetext
end
-.Alan
+.Alan:
farwritetext AlanRematchText
waitbutton
closetext
end
-.Chad
+.Chad:
farwritetext ChadRematchText
waitbutton
closetext
end
-.Tully
+.Tully:
farwritetext TullyRematchText
waitbutton
closetext
end
-.Brent
+.Brent:
farwritetext BrentRematchText
waitbutton
closetext
end
-.Vance
+.Vance:
farwritetext VanceRematchText
waitbutton
closetext
end
-.Wilton
+.Wilton:
farwritetext WiltonRematchText
waitbutton
closetext
end
-.Parry
+.Parry:
farwritetext ParryRematchText
waitbutton
closetext
@@ -1284,31 +1284,31 @@
if_equal PHONE_FISHER_WILTON, .Wilton
if_equal PHONE_BLACKBELT_KENJI, .Kenji
-.Jose
+.Jose:
farwritetext JoseGiftText
buttonsound
end
-.Wade
+.Wade:
farwritetext WadeGiftText
buttonsound
end
-.Alan
+.Alan:
farwritetext AlanGiftText
buttonsound
end
-.Derek
+.Derek:
farwritetext DerekGiftText
buttonsound
end
-.Tully
+.Tully:
farwritetext TullyGiftText
buttonsound
end
-.Wilton
+.Wilton:
farwritetext WiltonGiftText
buttonsound
end
-.Kenji
+.Kenji:
farwritetext KenjiGiftText
buttonsound
end
@@ -1327,57 +1327,57 @@
if_equal PHONE_BLACKBELT_KENJI, .Kenji
if_equal PHONE_HIKER_PARRY, .Parry
-.Huey
+.Huey:
farwritetext HueyPackFullText
waitbutton
closetext
end
-.Jose
+.Jose:
farwritetext JosePackFullText
waitbutton
closetext
end
-.Joey
+.Joey:
farwritetext JoeyPackFullText
waitbutton
closetext
end
-.Wade
+.Wade:
farwritetext WadePackFullText
waitbutton
closetext
end
-.Alan
+.Alan:
farwritetext AlanPackFullText
waitbutton
closetext
end
-.Derek
+.Derek:
farwritetext DerekPackFullText
waitbutton
closetext
end
-.Tully
+.Tully:
farwritetext TullyPackFullText
waitbutton
closetext
end
-.Vance
+.Vance:
farwritetext VancePackFullText
waitbutton
closetext
end
-.Wilton
+.Wilton:
farwritetext WiltonPackFullText
waitbutton
closetext
end
-.Kenji
+.Kenji:
farwritetext KenjiPackFullText
waitbutton
closetext
end
-.Parry
+.Parry:
farwritetext ParryPackFullText
waitbutton
closetext
@@ -1391,19 +1391,19 @@
if_equal PHONE_BIRDKEEPER_VANCE, .Vance
if_equal PHONE_HIKER_PARRY, .Parry
-.Huey
+.Huey:
farwritetext HueyRematchGiftText
buttonsound
end
-.Joey
+.Joey:
farwritetext JoeyRematchGiftText
buttonsound
end
-.Vance
+.Vance:
farwritetext VanceRematchGiftText
buttonsound
end
-.Parry
+.Parry:
farwritetext ParryRematchGiftText
buttonsound
end
@@ -1419,28 +1419,28 @@
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Beverly
+.Beverly:
farwritetext BeverlyAskNumber1Text
end
-.Beth
+.Beth:
farwritetext BethAskNumber1Text
end
-.Reena
+.Reena:
farwritetext ReenaAskNumber1Text
end
-.Liz
+.Liz:
farwritetext LizAskNumber1Text
end
-.Gina
+.Gina:
farwritetext GinaAskNumber1Text
end
-.Dana
+.Dana:
farwritetext DanaAskNumber1Text
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyAskNumber1Text
end
-.Erin
+.Erin:
farwritetext ErinAskNumber1Text
end
@@ -1455,28 +1455,28 @@
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Beverly
+.Beverly:
farwritetext BeverlyAskNumber2Text
end
-.Beth
+.Beth:
farwritetext BethAskNumber2Text
end
-.Reena
+.Reena:
farwritetext ReenaAskNumber2Text
end
-.Liz
+.Liz:
farwritetext LizAskNumber2Text
end
-.Gina
+.Gina:
farwritetext GinaAskNumber2Text
end
-.Dana
+.Dana:
farwritetext DanaAskNumber2Text
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyAskNumber2Text
end
-.Erin
+.Erin:
farwritetext ErinAskNumber2Text
end
@@ -1498,42 +1498,42 @@
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Beverly
+.Beverly:
farwritetext BeverlyNumberAcceptedText
waitbutton
closetext
end
-.Beth
+.Beth:
farwritetext BethNumberAcceptedText
waitbutton
closetext
end
-.Reena
+.Reena:
farwritetext ReenaNumberAcceptedText
waitbutton
closetext
end
-.Liz
+.Liz:
farwritetext LizNumberAcceptedText
waitbutton
closetext
end
-.Gina
+.Gina:
farwritetext GinaNumberAcceptedText
waitbutton
closetext
end
-.Dana
+.Dana:
farwritetext DanaNumberAcceptedText
waitbutton
closetext
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyNumberAcceptedText
waitbutton
closetext
end
-.Erin
+.Erin:
farwritetext ErinNumberAcceptedText
waitbutton
closetext
@@ -1550,42 +1550,42 @@
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Beverly
+.Beverly:
farwritetext BeverlyNumberDeclinedText
waitbutton
closetext
end
-.Beth
+.Beth:
farwritetext BethNumberDeclinedText
waitbutton
closetext
end
-.Reena
+.Reena:
farwritetext ReenaNumberDeclinedText
waitbutton
closetext
end
-.Liz
+.Liz:
farwritetext LizNumberDeclinedText
waitbutton
closetext
end
-.Gina
+.Gina:
farwritetext GinaNumberDeclinedText
waitbutton
closetext
end
-.Dana
+.Dana:
farwritetext DanaNumberDeclinedText
waitbutton
closetext
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyNumberDeclinedText
waitbutton
closetext
end
-.Erin
+.Erin:
farwritetext ErinNumberDeclinedText
waitbutton
closetext
@@ -1602,42 +1602,42 @@
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Beverly
+.Beverly:
farwritetext BeverlyPhoneFullText
waitbutton
closetext
end
-.Beth
+.Beth:
farwritetext BethPhoneFullText
waitbutton
closetext
end
-.Reena
+.Reena:
farwritetext ReenaPhoneFullText
waitbutton
closetext
end
-.Liz
+.Liz:
farwritetext LizPhoneFullText
waitbutton
closetext
end
-.Gina
+.Gina:
farwritetext GinaPhoneFullText
waitbutton
closetext
end
-.Dana
+.Dana:
farwritetext DanaPhoneFullText
waitbutton
closetext
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyPhoneFullText
waitbutton
closetext
end
-.Erin
+.Erin:
farwritetext ErinPhoneFullText
waitbutton
closetext
@@ -1653,37 +1653,37 @@
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Beth
+.Beth:
farwritetext BethRematchText
waitbutton
closetext
end
-.Reena
+.Reena:
farwritetext ReenaRematchText
waitbutton
closetext
end
-.Liz
+.Liz:
farwritetext LizRematchText
waitbutton
closetext
end
-.Gina
+.Gina:
farwritetext GinaRematchText
waitbutton
closetext
end
-.Dana
+.Dana:
farwritetext DanaRematchText
waitbutton
closetext
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyRematchText
waitbutton
closetext
end
-.Erin
+.Erin:
farwritetext ErinRematchText
waitbutton
closetext
@@ -1696,19 +1696,19 @@
if_equal PHONE_LASS_DANA, .Dana
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
-.Beverly
+.Beverly:
farwritetext BeverlyGiftText
buttonsound
end
-.Gina
+.Gina:
farwritetext GinaGiftText
buttonsound
end
-.Dana
+.Dana:
farwritetext DanaGiftText
buttonsound
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyGiftText
buttonsound
end
@@ -1721,27 +1721,27 @@
if_equal PHONE_PICNICKER_TIFFANY, .Tiffany
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Beverly
+.Beverly:
farwritetext BeverlyPackFullText
waitbutton
closetext
end
-.Gina
+.Gina:
farwritetext GinaPackFullText
waitbutton
closetext
end
-.Dana
+.Dana:
farwritetext DanaPackFullText
waitbutton
closetext
end
-.Tiffany
+.Tiffany:
farwritetext TiffanyPackFullText
waitbutton
closetext
end
-.Erin
+.Erin:
farwritetext ErinPackFullText
waitbutton
closetext
@@ -1751,7 +1751,7 @@
checkcode VAR_CALLERID
if_equal PHONE_PICNICKER_ERIN, .Erin
-.Erin
+.Erin:
opentext
farwritetext ErinRematchGiftText
buttonsound
@@ -1807,7 +1807,7 @@
CoinVendor_IntroScript: ; 0xbcde0
farwritetext CoinVendor_IntroText
-.loop: ; 0xbcde4
+.loop ; 0xbcde4
special Special_DisplayMoneyAndCoinBalance
loadmenudata .MenuDataHeader
verticalmenu
@@ -1867,7 +1867,7 @@
; 0xbce54
-.MenuDataHeader
+.MenuDataHeader:
db $40 ; flags
db 04, 00 ; start coords
db 11, 15 ; end coords
@@ -1874,7 +1874,7 @@
dw .MenuData2
db 1 ; default option
-.MenuData2
+.MenuData2:
db $80 ; flags
db 3 ; items
db " 50 : ¥1000@"
@@ -1894,13 +1894,13 @@
closetext
end
-.KindaHappy
+.KindaHappy:
farwritetext HappinessText2
waitbutton
closetext
end
-.Unhappy
+.Unhappy:
farwritetext HappinessText1
waitbutton
closetext
--- a/engine/switch_items.asm
+++ b/engine/switch_items.asm
@@ -242,7 +242,7 @@
; 24a91 (9:4a91)
-.spacing_dws: ; 24a91
+.spacing_dws ; 24a91
dw 0, 1, 2
; 24a97
--- a/engine/tile_events.asm
+++ b/engine/tile_events.asm
@@ -21,17 +21,17 @@
; Else, set carry (immediate warp).
ld a, [PlayerStandingTile]
cp $70 ; Warp on down
- jr z, .not_warp
+ jr z, .directional
cp $76 ; Warp on left
- jr z, .not_warp
+ jr z, .directional
cp $78 ; Warp on up
- jr z, .not_warp
+ jr z, .directional
cp $7e ; Warp on right
- jr z, .not_warp
+ jr z, .directional
scf
ret
-.not_warp
+.directional
xor a
ret
; 149c6
@@ -44,7 +44,7 @@
ret
; 149d3
-.blocks: ; 149d3
+.blocks ; 149d3
db $71 ; door
db $79
db $7a ; stairs
@@ -65,7 +65,7 @@
ret
; 149ea
-.blocks: ; 149ea
+.blocks ; 149ea
db $08
db $18 ; tall grass
db $14 ; tall grass
@@ -87,7 +87,7 @@
ret
; 14a00
-.blocks: ; 14a00
+.blocks ; 14a00
db $12 ; cut tree
db $1a ; cut tree
db $10 ; tall grass
--- a/engine/time.asm
+++ b/engine/time.asm
@@ -30,7 +30,7 @@
jp RestartReceiveCallDelay
; 113fd
-.ReceiveCallDelays
+.ReceiveCallDelays:
db 20, 10, 5, 3
; 11401
@@ -124,16 +124,14 @@
jr z, .RestartKenjiBreakCountdown
dec [hl]
jr nz, .DontRestartKenjiBreakCountdown
-
-.RestartKenjiBreakCountdown
+.RestartKenjiBreakCountdown:
call Special_SampleKenjiBreakCountdown
-
-.DontRestartKenjiBreakCountdown
+.DontRestartKenjiBreakCountdown:
jr RestartDailyResetTimer
; 11485
Special_SampleKenjiBreakCountdown: ; 11485
-; Generate a random number between 3 and 5
+; Generate a random number between 3 and 6
call Random
and 3
add 3
--- a/engine/timeofdaypals.asm
+++ b/engine/timeofdaypals.asm
@@ -215,7 +215,7 @@
ld [wTimeOfDayPalset], a
ret
-.DarkCave
+.DarkCave:
ld a, [StatusFlags]
bit 2, a ; Flash
jr nz, .UsedFlash
@@ -223,7 +223,7 @@
ld [wTimeOfDayPalset], a
ret
-.UsedFlash
+.UsedFlash:
ld a, %10101010 ; 2, 2, 2, 2
ld [wTimeOfDayPalset], a
ret
@@ -254,18 +254,18 @@
jp [hl]
; 8c126
-.TimePalettes
+.TimePalettes:
dw .MorningPalette
dw .DayPalette
dw .NitePalette
dw .DarknessPalette
-.MorningPalette
+.MorningPalette:
ld a, [wTimeOfDayPalset]
and %00000011 ; 0
ret
-.DayPalette
+.DayPalette:
ld a, [wTimeOfDayPalset]
and %00001100 ; 1
srl a
@@ -272,13 +272,13 @@
srl a
ret
-.NitePalette
+.NitePalette:
ld a, [wTimeOfDayPalset]
and %00110000 ; 2
swap a
ret
-.DarknessPalette
+.DarknessPalette:
ld a, [wTimeOfDayPalset]
and %11000000 ; 3
rlca
@@ -381,8 +381,8 @@
db %00000000, %00000000, %00000000
.day
- db %11111111, %11111111, %11111111
- db %11111110, %11111110, %11111110
+ db %11111111, %11111111, %11111111
+ db %11111110, %11111110, %11111110
db %11111001, %11100100, %11100100
db %11100100, %11010000, %11010000
db %10010000, %10000000, %10000000
--- a/engine/timeset.asm
+++ b/engine/timeset.asm
@@ -63,7 +63,7 @@
ld c, 10
call DelayFrames
-.SetHourLoop
+.SetHourLoop:
call JoyTextDelay
call SetHour
jr nc, .SetHourLoop
@@ -78,7 +78,7 @@
call .ClearScreen
jr .loop
-.HourIsSet
+.HourIsSet:
ld hl, Text_HowManyMinutes
call PrintText
hlcoord 11, 7
@@ -93,7 +93,7 @@
ld c, 10
call DelayFrames
-.SetMinutesLoop
+.SetMinutesLoop:
call JoyTextDelay
call SetMinutes
jr nc, .SetMinutesLoop
@@ -108,7 +108,7 @@
call .ClearScreen
jr .HourIsSet
-.MinutesAreSet
+.MinutesAreSet:
call SetTimeOfDay
ld hl, OakText_ResponseToSetTime
call PrintText
@@ -150,7 +150,7 @@
and a
jr nz, .DecreaseThroughMidnight
ld a, 23 + 1
-.DecreaseThroughMidnight
+.DecreaseThroughMidnight:
dec a
ld [hl], a
jr .okay
@@ -161,7 +161,7 @@
cp 23
jr c, .AdvanceThroughMidnight
ld a, -1
-.AdvanceThroughMidnight
+.AdvanceThroughMidnight:
inc a
ld [hl], a
@@ -176,7 +176,7 @@
and a
ret
-.Confirm
+.Confirm:
scf
ret
@@ -368,30 +368,30 @@
jr c, .MORN
cp 18
jr c, .DAY
-.NITE
+.NITE:
ld hl, .sodark
ret
-.MORN
+.MORN:
ld hl, .overslept
ret
-.DAY
+.DAY:
ld hl, .yikes
ret
; 908ec (24:48ec)
-.overslept: ; 0x908ec
+.overslept ; 0x908ec
; ! I overslept!
text_jump UnknownText_0x1bc326
db "@"
; 0x908f1
-.yikes: ; 0x908f1
+.yikes ; 0x908f1
; ! Yikes! I over- slept!
text_jump UnknownText_0x1bc336
db "@"
; 0x908f6
-.sodark: ; 0x908f6
+.sodark ; 0x908f6
; ! No wonder it's so dark!
text_jump UnknownText_0x1bc34f
db "@"
--- a/engine/title.asm
+++ b/engine/title.asm
@@ -3,11 +3,11 @@
call ClearBGPalettes
call ClearSprites
call ClearTileMap
-
+
; Turn BG Map update off
xor a
ld [hBGMapMode], a
-
+
; Reset timing variables
ld hl, wJumptableIndex
ld [hli], a ; cf63 ; Scene?
@@ -14,29 +14,29 @@
ld [hli], a ; cf64
ld [hli], a ; cf65 ; Timer lo
ld [hl], a ; cf66 ; Timer hi
-
+
; Turn LCD off
call DisableLCD
-
-
+
+
; VRAM bank 1
ld a, 1
ld [rVBK], a
-
-
+
+
; Decompress running Suicune gfx
ld hl, TitleSuicuneGFX
ld de, VTiles1
call Decompress
-
-
+
+
; Clear screen palettes
hlbgcoord 0, 0
ld bc, 20 bgrows
xor a
call ByteFill
-
+
; Fill tile palettes:
; BG Map 1:
@@ -77,43 +77,43 @@
ld bc, 2 bgrows
ld a, 6
call ByteFill
-
+
; 'CRYSTAL VERSION'
hlbgcoord 5, 9
ld bc, NAME_LENGTH ; length of version text
ld a, 1
call ByteFill
-
+
; Suicune gfx
hlbgcoord 0, 12
ld bc, 6 bgrows ; the rest of the screen
ld a, 8
call ByteFill
-
-
+
+
; Back to VRAM bank 0
ld a, $0
ld [rVBK], a
-
-
+
+
; Decompress logo
ld hl, TitleLogoGFX
ld de, VTiles1
call Decompress
-
+
; Decompress background crystal
ld hl, TitleCrystalGFX
ld de, VTiles0
call Decompress
-
-
+
+
; Clear screen tiles
hlbgcoord 0, 0
ld bc, 64 bgrows
ld a, " "
call ByteFill
-
+
; Draw Pokemon logo
hlcoord 0, 3
lb bc, 7, 20
@@ -120,7 +120,7 @@
ld d, $80
ld e, $14
call DrawTitleGraphic
-
+
; Draw copyright text
hlbgcoord 3, 0, VBGMap1
lb bc, 1, 13
@@ -127,14 +127,14 @@
ld d, $c
ld e, $10
call DrawTitleGraphic
-
+
; Initialize running Suicune?
ld d, $0
call LoadSuicuneFrame
-
+
; Initialize background crystal
call InitializeBackground
-
+
; Save WRAM bank
ld a, [rSVBK]
push af
@@ -141,30 +141,30 @@
; WRAM bank 5
ld a, 5
ld [rSVBK], a
-
+
; Update palette colors
ld hl, TitleScreenPalettes
ld de, UnknBGPals
ld bc, 4 * 32
call CopyBytes
-
+
ld hl, TitleScreenPalettes
ld de, BGPals
ld bc, 4 * 32
call CopyBytes
-
+
; Restore WRAM bank
pop af
ld [rSVBK], a
-
-
+
+
; LY/SCX trickery starts here
-
+
ld a, [rSVBK]
push af
ld a, 5 ; BANK(LYOverrides)
ld [rSVBK], a
-
+
; Make alternating lines come in from opposite sides
; ( This part is actually totally pointless, you can't
@@ -180,30 +180,30 @@
inc hl
dec b
jr nz, .loop
-
+
; Make sure the rest of the buffer is empty
ld hl, LYOverrides + 80
xor a
ld bc, LYOverridesEnd - (LYOverrides + 80)
call ByteFill
-
+
; Let LCD Stat know we're messing around with SCX
ld a, rSCX - rJOYP
ld [hFFC6], a
-
+
pop af
ld [rSVBK], a
-
-
+
+
; Reset audio
call ChannelsOff
call EnableLCD
-
+
; Set sprite size to 8x16
ld a, [rLCDC]
set 2, a
ld [rLCDC], a
-
+
ld a, +112
ld [hSCX], a
ld a, 8
@@ -212,21 +212,21 @@
ld [hWX], a
ld a, -112
ld [hWY], a
-
+
ld a, $1
ld [hCGBPalUpdate], a
-
+
; Update BG Map 0 (bank 0)
ld [hBGMapMode], a
-
+
xor a
ld [UnknBGPals + 2], a
-
+
; Play starting sound effect
call SFXChannelsOff
ld de, SFX_TITLE_SCREEN_ENTRANCE
call PlaySFX
-
+
ret
; 10eea7
@@ -371,7 +371,7 @@
ld a, [hl]
cp 6 + $10
ret z
-
+
; Move all 30 parts of the crystal down by 2
ld c, 30
.loop
@@ -383,7 +383,7 @@
endr
dec c
jr nz, .loop
-
+
ret
; 10ef46
@@ -405,78 +405,78 @@
RGB 19, 00, 00
RGB 15, 08, 31
RGB 15, 08, 31
-
+
RGB 00, 00, 00
RGB 31, 31, 31
RGB 15, 16, 31
RGB 31, 01, 13
-
+
RGB 00, 00, 00
RGB 07, 07, 07
RGB 31, 31, 31
RGB 02, 03, 30
-
+
RGB 00, 00, 00
RGB 13, 13, 13
RGB 31, 31, 18
RGB 02, 03, 30
-
+
RGB 00, 00, 00
RGB 19, 19, 19
RGB 29, 28, 12
RGB 02, 03, 30
-
+
RGB 00, 00, 00
RGB 25, 25, 25
RGB 28, 25, 06
RGB 02, 03, 30
-
+
RGB 00, 00, 00
RGB 31, 31, 31
RGB 26, 21, 00
RGB 02, 03, 30
-
+
RGB 00, 00, 00
RGB 11, 11, 19
RGB 31, 31, 31
RGB 00, 00, 00
-
+
; OBJ
RGB 00, 00, 00
RGB 10, 00, 15
RGB 17, 05, 22
RGB 19, 09, 31
-
+
RGB 31, 31, 31
RGB 00, 00, 00
RGB 00, 00, 00
RGB 00, 00, 00
-
+
RGB 31, 31, 31
RGB 00, 00, 00
RGB 00, 00, 00
RGB 00, 00, 00
-
+
RGB 31, 31, 31
RGB 00, 00, 00
RGB 00, 00, 00
RGB 00, 00, 00
-
+
RGB 31, 31, 31
RGB 00, 00, 00
RGB 00, 00, 00
RGB 00, 00, 00
-
+
RGB 31, 31, 31
RGB 00, 00, 00
RGB 00, 00, 00
RGB 00, 00, 00
-
+
RGB 31, 31, 31
RGB 00, 00, 00
RGB 00, 00, 00
RGB 00, 00, 00
-
+
RGB 31, 31, 31
RGB 00, 00, 00
RGB 00, 00, 00
--- a/engine/tmhm2.asm
+++ b/engine/tmhm2.asm
@@ -59,12 +59,12 @@
cp HM01
jr c, .TM
ld hl, Text_BootedHM ; Booted up an HM
-.TM
+.TM:
call PrintText
ld hl, Text_ItContained
call PrintText
call YesNoBox
-.NotTMHM
+.NotTMHM:
pop bc
ld a, b
ld [Options], a
@@ -374,7 +374,7 @@
call PrintNum
jr .okay
-.HM
+.HM:
push af
sub NUM_TMS
ld [wd265], a
@@ -421,7 +421,7 @@
jr nz, .loop2
jr .done
-.NotTMHM
+.NotTMHM:
call TMHMPocket_GetCurrentLineCoord
rept 3
inc hl
--- a/engine/trade/animation.asm
+++ b/engine/trade/animation.asm
@@ -155,7 +155,7 @@
ld a, $0
ld [rVBK], a
-.NotCGB
+.NotCGB:
hlbgcoord 0, 0
ld bc, sScratch - VBGMap0
ld a, " "
@@ -1440,7 +1440,7 @@
LoadTradeBubbleGFX: ; 2985a
call DelayFrame
ld e, $3
- callab Function8e83f
+ callab LoadMenuMonIcon
ld de, TradeBubbleGFX
ld hl, VTiles0 tile $72
lb bc, BANK(TradeBubbleGFX), $4
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -118,7 +118,7 @@
ld [wJumptableIndex], a
ret
-.KantoCheck
+.KantoCheck:
; unreferenced
ld a, [KantoBadges]
and a
@@ -164,7 +164,7 @@
ld [wJumptableIndex], a
ret
-.KantoCheck
+.KantoCheck:
; unreferenced
ld a, [KantoBadges]
and a
@@ -173,7 +173,7 @@
ld [wJumptableIndex], a
ret
-.Quit
+.Quit:
ld a, $6
ld [wJumptableIndex], a
ret
@@ -289,11 +289,11 @@
call ClearBox
ret
-.Dex_PlayTime
+.Dex_PlayTime:
db "#DEX"
next "PLAY TIME@@"
-.Badges
+.Badges:
db " BADGES▶@"
.StatusTilemap: ; 25366
@@ -540,7 +540,7 @@
; 254a7 (9:54a7)
-.facing1: ; 254a7
+.facing1 ; 254a7
; y, x, tile, OAM attributes
db 0, 0, 0, 0
db 0, 8, 1, 0
@@ -548,7 +548,7 @@
db 8, 8, 3, 0
db -1
-.facing2: ; 254b8
+.facing2 ; 254b8
db 0, 0, 1, X_FLIP
db 0, 8, 0, X_FLIP
db 8, 0, 3, X_FLIP
--- a/engine/unown_puzzle.asm
+++ b/engine/unown_puzzle.asm
@@ -188,7 +188,7 @@
; e12d9
.Jumptable: ; e12d9
-
+
dw .Function
; e12db
@@ -321,7 +321,7 @@
ld [wHoldingUnownPuzzlePiece], a
ret
-.TryPlacePiece
+.TryPlacePiece:
call UnownPuzzle_CheckCurrentTileOccupancy
and a
jr nz, UnownPuzzle_InvalidAction
@@ -546,7 +546,7 @@
ld hl, .OAM_HoldingPiece
jr .load
-.NoPiece
+.NoPiece:
ld hl, .OAM_NotHoldingPiece
.load
--- a/engine/variables.asm
+++ b/engine/variables.asm
@@ -28,7 +28,7 @@
call _de_
ret
-.loadstringbuffer2: ; 8066c (20:466c)
+.loadstringbuffer2 ; 8066c (20:466c)
ld de, StringBuffer2
ld [de], a
ret
--- a/engine/warp_connection.asm
+++ b/engine/warp_connection.asm
@@ -277,7 +277,7 @@
decoord 0, 0, AttrMap
ld a, $1
ld [rVBK], a
-.copy:
+.copy
hlbgcoord 0, 0
ld c, SCREEN_WIDTH
ld b, SCREEN_HEIGHT
--- a/engine/wildmons.asm
+++ b/engine/wildmons.asm
@@ -103,7 +103,7 @@
.SearchMapForMon: ; 2a088
inc hl
-.ScanMapLoop
+.ScanMapLoop:
push af
ld a, [wNamedObjectIndexBuffer]
cp [hl]
@@ -128,7 +128,7 @@
ld c, a
hlcoord 0, 0
ld de, SCREEN_WIDTH * SCREEN_HEIGHT
-.AppendNestLoop
+.AppendNestLoop:
ld a, [hli]
cp c
jr z, .found_nest
@@ -459,7 +459,7 @@
scf
ret
-.CheckYanma
+.CheckYanma:
push hl
ld hl, SwarmFlags
bit 3, [hl]
@@ -611,7 +611,7 @@
scf
ret
-.DontEncounterRoamMon
+.DontEncounterRoamMon:
pop hl
and a
ret
@@ -631,7 +631,7 @@
ld a, c
ld [wRoamMon1MapNumber], a
-.SkipRaikou
+.SkipRaikou:
ld a, [wRoamMon2MapGroup]
cp GROUP_N_A
jr z, .SkipEntei
@@ -644,7 +644,7 @@
ld a, c
ld [wRoamMon2MapNumber], a
-.SkipEntei
+.SkipEntei:
ld a, [wRoamMon3MapGroup]
cp GROUP_N_A
jr z, .SkipSuicune
@@ -657,7 +657,7 @@
ld a, c
ld [wRoamMon3MapNumber], a
-.SkipSuicune
+.SkipSuicune:
jp _BackUpMapIndices
; 2a355
@@ -729,7 +729,7 @@
ld [wRoamMon1MapGroup], a
ld a, c
ld [wRoamMon1MapNumber], a
-.SkipRaikou
+.SkipRaikou:
ld a, [wRoamMon2MapGroup]
cp GROUP_N_A
@@ -739,7 +739,7 @@
ld [wRoamMon2MapGroup], a
ld a, c
ld [wRoamMon2MapNumber], a
-.SkipEntei
+.SkipEntei:
ld a, [wRoamMon3MapGroup]
cp GROUP_N_A
@@ -749,7 +749,7 @@
ld [wRoamMon3MapGroup], a
ld a, c
ld [wRoamMon3MapNumber], a
-.SkipSuicune
+.SkipSuicune:
jp _BackUpMapIndices
@@ -852,7 +852,7 @@
call LookUpWildmonsForMapDE
jr nc, .done
-.GetGrassmon
+.GetGrassmon:
push hl
ld bc, 5 + 4 * 2 ; Location of the level of the 5th wild Pokemon in that map
add hl, bc
@@ -908,7 +908,7 @@
ld [ScriptVar], a
ret
-.SawRareMonText
+.SawRareMonText:
; I just saw some rare @ in @ . I'll call you if I see another rare #MON, OK?
text_jump UnknownText_0x1bd34b
db "@"
--- a/event/battle_tower.asm
+++ b/event/battle_tower.asm
@@ -300,7 +300,7 @@
ret
; 8b31a
-.nextmon: ; 8b31a
+.nextmon ; 8b31a
push bc
ld bc, PARTYMON_STRUCT_LENGTH
add hl, bc
@@ -309,7 +309,7 @@
ret
; 8b322
-.isegg: ; 8b322
+.isegg ; 8b322
push bc
ld b, a
ld a, [de]
--- a/event/buena.asm
+++ b/event/buena.asm
@@ -121,15 +121,15 @@
call PrintBlueCardBalance
jr .Purchase
-.InsufficientBalance
+.InsufficientBalance:
ld hl, .Text_NotEnoughPoints
jr .print
-.BagFull
+.BagFull:
ld hl, .Text_NoRoom
jr .print
-.Purchase
+.Purchase:
ld de, SFX_TRANSACTION
call PlaySFX
ld hl, .Text_HereYouGo
@@ -160,7 +160,7 @@
db "@"
; 0x8b07c
-.Text_HereYouGo ; Here you go!
+.Text_HereYouGo: ; Here you go!
text_jump UnknownText_0x1c58d1
db "@"
; 0x8b081
@@ -236,7 +236,7 @@
ret
; 8b0dd
-.menudataheader: ; 0x8b0dd
+.menudataheader ; 0x8b0dd
db $40 ; flags
db 00, 00 ; start coords
db 11, 17 ; end coords
@@ -288,13 +288,13 @@
dba .prizepoints
; 8b129
-.indices: ; 8b129
+.indices ; 8b129
db 9
db 1, 2, 3, 4, 5, 6, 7, 8, 9
db -1
; 8b134
-.prizeitem: ; 8b134
+.prizeitem ; 8b134
ld a, [MenuSelection]
call Buena_getprize
ld a, [hl]
@@ -306,7 +306,7 @@
ret
; 8b147
-.prizepoints: ; 8b147
+.prizepoints ; 8b147
ld a, [MenuSelection]
call Buena_getprize
inc hl
@@ -328,7 +328,7 @@
ret
; 8b15e
-.prizes: ; 8b15e
+.prizes ; 8b15e
db ULTRA_BALL, 2
db FULL_RESTORE, 2
db NUGGET, 3
--- a/event/celebi.asm
+++ b/event/celebi.asm
@@ -53,7 +53,7 @@
ld hl, Sprites + 2
xor a
ld c, $4
-.OAMloop
+.OAMloop:
ld [hli], a
rept 3
inc hl
@@ -171,7 +171,7 @@
jr nc, .ShiftY
cp 8 * 8 + 4
jr nc, .ReinitSpriteAnimFrame
-.ShiftY
+.ShiftY:
pop af
push af
cp d
@@ -203,7 +203,7 @@
ld a, [hl]
add $1
ld [hl], a
-.ReinitSpriteAnimFrame
+.ReinitSpriteAnimFrame:
pop af
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
@@ -279,7 +279,7 @@
; 49b6e (12:5b6e)
-.sinewave: ; 49b6e
+.sinewave ; 49b6e
sine_wave $100
; 49bae
@@ -306,22 +306,22 @@
jr .restart
-.Frame1
+.Frame1:
ld a, $84
jr .load_tile
-.Frame2
+.Frame2:
ld a, $88
jr .load_tile
-.Frame3
+.Frame3:
ld a, $8c
jr .load_tile
-.Frame4
+.Frame4:
ld a, $90
.load_tile
--- a/event/daycare.asm
+++ b/event/daycare.asm
@@ -37,7 +37,7 @@
call DayCare_InitBreeding
ret
-.AskWithdrawMon
+.AskWithdrawMon:
callba GetBreedMon1LevelGrowth
ld hl, wBreedMon1Nick
call GetPriceToRetrieveBreedmon
@@ -76,7 +76,7 @@
call DayCare_InitBreeding
ret
-.AskWithdrawMon
+.AskWithdrawMon:
callba GetBreedMon2LevelGrowth
ld hl, wBreedMon2Nick
call GetPriceToRetrieveBreedmon
@@ -144,27 +144,27 @@
and a
ret
-.Declined
+.Declined:
ld a, DAYCARETEXT_COME_AGAIN
scf
ret
-.Egg
+.Egg:
ld a, DAYCARETEXT_CANT_BREED_EGG
scf
ret
-.OnlyOneMon
+.OnlyOneMon:
ld a, DAYCARETEXT_LAST_MON
scf
ret
-.OutOfUsableMons
+.OutOfUsableMons:
ld a, DAYCARETEXT_LAST_ALIVE_MON
scf
ret
-.HoldingMail
+.HoldingMail:
ld a, DAYCARETEXT_REMOVE_MAIL
scf
ret
@@ -227,7 +227,7 @@
scf
ret
-.PartyFull
+.PartyFull:
ld a, DAYCARETEXT_NOT_ENOUGH_MONEY
scf
ret
@@ -460,16 +460,16 @@
ld hl, .TakeGoodCareOfItText
jr .Load0
-.Declined
+.Declined:
ld hl, .IllKeepItThanksText
-.Load0
+.Load0:
call PrintText
xor a
ld [ScriptVar], a
ret
-.PartyFull
+.PartyFull:
ld hl, .PartyFullText
call PrintText
ld a, $1
@@ -575,7 +575,7 @@
and a
ret
-.PartyFull
+.PartyFull:
scf
ret
; 16a31
@@ -644,7 +644,7 @@
jr z, .LoadWhichBreedmonIsTheMother
inc a
-.LoadWhichBreedmonIsTheMother
+.LoadWhichBreedmonIsTheMother:
ld [wBreedMotherOrNonDitto], a
and a
ld a, [wBreedMon1Species]
@@ -651,7 +651,7 @@
jr z, .GotMother
ld a, [wBreedMon2Species]
-.GotMother
+.GotMother:
ld [CurPartySpecies], a
callab GetPreEvolution
callab GetPreEvolution
@@ -666,7 +666,7 @@
ld a, NIDORAN_F
jr c, .GotEggSpecies
ld a, NIDORAN_M
-.GotEggSpecies
+.GotEggSpecies:
ld [CurPartySpecies], a
ld [CurSpecies], a
ld [wEggMonSpecies], a
@@ -739,7 +739,7 @@
ld e, c
jr .GotDVs
-.ParentCheck2
+.ParentCheck2:
ld a, [wBreedMotherOrNonDitto]
and a
jr nz, .GotDVs
@@ -746,7 +746,7 @@
ld d, b
ld e, c
-.GotDVs
+.GotDVs:
ld a, [de]
inc de
and $f
@@ -763,7 +763,7 @@
add b
ld [hl], a
-.SkipDVs
+.SkipDVs:
ld hl, StringBuffer1
ld de, wMonOrItemNameBuffer
ld bc, NAME_LENGTH
--- a/event/dratini.asm
+++ b/event/dratini.asm
@@ -13,7 +13,7 @@
ld a, [bc]
ld c, a
ld de, PARTYMON_STRUCT_LENGTH
-.CheckForDratini
+.CheckForDratini:
; start at the end of the party and search backwards for a Dratini
ld a, [hl]
cp DRATINI
@@ -28,7 +28,7 @@
jr nz, .CheckForDratini
ret
-.GiveMoveset
+.GiveMoveset:
push hl
ld a, [ScriptVar]
ld hl, .Movesets
@@ -41,7 +41,7 @@
inc de
endr
-.GiveMoves
+.GiveMoves:
ld a, [hl]
and a ; is the move 00?
ret z ; if so, we're done here
@@ -69,8 +69,8 @@
inc hl
jr .GiveMoves
-.Movesets
-.Moveset0
+.Movesets:
+.Moveset0:
; Dratini does not normally learn Extremespeed. This is a special gift.
db WRAP
db THUNDER_WAVE
@@ -77,7 +77,7 @@
db TWISTER
db EXTREMESPEED
db 0
-.Moveset1
+.Moveset1:
; This is the normal moveset of a level 15 Dratini
db WRAP
db LEER
@@ -107,7 +107,7 @@
jr nz, .loop
ret
-.EmptyParty
+.EmptyParty:
scf
ret
; 8b1e1
--- a/event/field_moves.asm
+++ b/event/field_moves.asm
@@ -174,7 +174,7 @@
; 8ca1b
-.dw: ; 8ca1b (23:4a1b)
+.dw ; 8ca1b (23:4a1b)
dw Cut_SpawnAnimateTree
dw Cut_SpawnAnimateLeaves
dw Cut_StartWaiting
--- a/event/forced_movement.asm
+++ b/event/forced_movement.asm
@@ -7,22 +7,22 @@
end
; 0x12550
-.up: ; 0x12550
+.up ; 0x12550
applymovement PLAYER, .MovementData_up
end
; 0x12555
-.down: ; 0x12555
+.down ; 0x12555
applymovement PLAYER, .MovementData_down
end
; 0x1255a
-.right: ; 0x1255a
+.right ; 0x1255a
applymovement PLAYER, .MovementData_right
end
; 0x1255f
-.left: ; 0x1255f
+.left ; 0x1255f
applymovement PLAYER, .MovementData_left
end
; 0x12564
--- a/event/halloffame.asm
+++ b/event/halloffame.asm
@@ -310,7 +310,7 @@
call LoadFontsBattleExtra
xor a
ld [wJumptableIndex], a
-.MasterLoop
+.MasterLoop:
call LoadHOFTeam
ret c
call .DisplayTeam
@@ -319,7 +319,7 @@
inc [hl]
jr .MasterLoop
-.DisplayTeam
+.DisplayTeam:
xor a
ld [wcf64], a
.next
@@ -353,7 +353,7 @@
and a
ret
-.DisplayMonAndStrings
+.DisplayMonAndStrings:
; Print the number of times the player has entered the Hall of Fame.
; If that number is above 200, print "HOF Master!" instead.
ld a, [wcf64]
@@ -616,7 +616,7 @@
ret
; 868ed
-.PlayTime
+.PlayTime:
db "PLAY TIME@"
; 868f7
--- /dev/null
+++ b/event/happiness_egg.asm
@@ -1,0 +1,238 @@
+GetFirstPokemonHappiness: ; 718d
+ ld hl, PartyMon1Happiness
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld de, PartySpecies
+.loop
+ ld a, [de]
+ cp EGG
+ jr nz, .done
+ inc de
+ add hl, bc
+ jr .loop
+
+.done
+ ld [wd265], a
+ ld a, [hl]
+ ld [ScriptVar], a
+ call GetPokemonName
+ jp CopyPokemonName_Buffer1_Buffer3
+
+CheckFirstMonIsEgg: ; 71ac
+ ld a, [PartySpecies]
+ ld [wd265], a
+ cp EGG
+ ld a, $1
+ jr z, .egg
+ xor a
+
+.egg
+ ld [ScriptVar], a
+ call GetPokemonName
+ jp CopyPokemonName_Buffer1_Buffer3
+
+ChangeHappiness: ; 71c2
+; Perform happiness action c on CurPartyMon
+
+ ld a, [CurPartyMon]
+ inc a
+ ld e, a
+ ld d, 0
+ ld hl, PartySpecies - 1
+ add hl, de
+ ld a, [hl]
+ cp EGG
+ ret z
+
+ push bc
+ ld hl, PartyMon1Happiness
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, [CurPartyMon]
+ call AddNTimes
+ pop bc
+
+ ld d, h
+ ld e, l
+
+ push de
+ ld a, [de]
+ cp 100
+ ld e, 0
+ jr c, .ok
+ inc e
+ cp 200
+ jr c, .ok
+ inc e
+
+.ok
+ dec c
+ ld b, 0
+ ld hl, .Actions
+rept 3
+ add hl, bc
+endr
+ ld d, 0
+ add hl, de
+ ld a, [hl]
+ cp 100
+ pop de
+
+ ld a, [de]
+ jr nc, .negative
+ add [hl]
+ jr nc, .done
+ ld a, -1
+ jr .done
+
+.negative
+ add [hl]
+ jr c, .done
+ xor a
+
+.done
+ ld [de], a
+ ld a, [wBattleMode]
+ and a
+ ret z
+ ld a, [CurPartyMon]
+ ld b, a
+ ld a, [wPartyMenuCursor]
+ cp b
+ ret nz
+ ld a, [de]
+ ld [BattleMonHappiness], a
+ ret
+
+.Actions:
+ db +5, +3, +2 ; Gained a level
+ db +5, +3, +2 ; Vitamin
+ db +1, +1, +0 ; X Item
+ db +3, +2, +1 ; Battled a Gym Leader
+ db +1, +1, +0 ; Learned a move
+ db -1, -1, -1 ; Lost to an enemy
+ db -5, -5, -10 ; Fainted due to poison
+ db -5, -5, -10 ; Lost to a much stronger enemy
+ db +1, +1, +1 ; Haircut (Y1)
+ db +3, +3, +1 ; Haircut (Y2)
+ db +5, +5, +2 ; Haircut (Y3)
+ db +1, +1, +1 ; Haircut (O1)
+ db +3, +3, +1 ; Haircut (O2)
+ db +10, +10, +4 ; Haircut (O3)
+ db -5, -5, -10 ; Used Heal Powder or Energypowder (bitter)
+ db -10, -10, -15 ; Used Energy Root (bitter)
+ db -15, -15, -20 ; Used Revival Herb (bitter)
+ db +3, +3, +1 ; Grooming
+ db +10, +6, +4 ; Gained a level in the place where it was caught
+
+StepHappiness:: ; 725a
+; Raise the party's happiness by 1 point every other step cycle.
+
+ ld hl, wHappinessStepCount
+ ld a, [hl]
+ inc a
+ and 1
+ ld [hl], a
+ ret nz
+
+ ld de, PartyCount
+ ld a, [de]
+ and a
+ ret z
+
+ ld c, a
+ ld hl, PartyMon1Happiness
+.loop
+ inc de
+ ld a, [de]
+ cp EGG
+ jr z, .next
+ inc [hl]
+ jr nz, .next
+ ld [hl], $ff
+
+.next
+ push de
+ ld de, PARTYMON_STRUCT_LENGTH
+ add hl, de
+ pop de
+ dec c
+ jr nz, .loop
+ ret
+
+DaycareStep:: ; 7282
+
+ ld a, [wDaycareMan]
+ bit 0, a
+ jr z, .daycare_lady
+
+ ld a, [wBreedMon1Level] ; level
+ cp 100
+ jr nc, .daycare_lady
+ ld hl, wBreedMon1Exp + 2 ; exp
+ inc [hl]
+ jr nz, .daycare_lady
+ dec hl
+ inc [hl]
+ jr nz, .daycare_lady
+ dec hl
+ inc [hl]
+ ld a, [hl]
+ cp 5242880 / $10000
+ jr c, .daycare_lady
+ ld a, 5242880 / $10000
+ ld [hl], a
+
+.daycare_lady
+ ld a, [wDaycareLady]
+ bit 0, a
+ jr z, .check_egg
+
+ ld a, [wBreedMon2Level] ; level
+ cp 100
+ jr nc, .check_egg
+ ld hl, wBreedMon2Exp + 2 ; exp
+ inc [hl]
+ jr nz, .check_egg
+ dec hl
+ inc [hl]
+ jr nz, .check_egg
+ dec hl
+ inc [hl]
+ ld a, [hl]
+ cp 5242880 / $10000
+ jr c, .check_egg
+ ld a, 5242880 / $10000
+ ld [hl], a
+
+.check_egg
+ ld hl, wDaycareMan
+ bit 5, [hl] ; egg
+ ret z
+ ld hl, wStepsToEgg
+ dec [hl]
+ ret nz
+
+ call Random
+ ld [hl], a
+ callab CheckBreedmonCompatibility
+ ld a, [wd265]
+ cp 230
+ ld b, -1 + 32 percent
+ jr nc, .okay
+ ld a, [wd265]
+ cp 170
+ ld b, 16 percent
+ jr nc, .okay
+ ld a, [wd265]
+ cp 110
+ ld b, 12 percent
+ jr nc, .okay
+ ld b, 4 percent
+
+.okay
+ call Random
+ cp b
+ ret nc
+ ld hl, wDaycareMan
+ res 5, [hl]
+ set 6, [hl]
+ ret
--- a/event/itemball.asm
+++ b/event/itemball.asm
@@ -11,7 +11,7 @@
end
; 0x122e3
-.no_room: ; 0x122e3
+.no_room ; 0x122e3
opentext
writetext .text_found
waitbutton
@@ -21,13 +21,13 @@
end
; 0x122ee
-.text_found: ; 0x122ee
+.text_found ; 0x122ee
; found @ !
text_jump UnknownText_0x1c0a1c
db "@"
; 0x122f3
-.text_bag_full: ; 0x122f3
+.text_bag_full ; 0x122f3
; But can't carry any more items.
text_jump UnknownText_0x1c0a2c
db "@"
--- a/event/kurt.asm
+++ b/event/kurt.asm
@@ -315,7 +315,7 @@
cp -1
jr nz, .loop2
-.OnlyOne
+.OnlyOne:
ld hl, wApricorns
.loop4
ld a, [hl]
--- a/event/magikarp.asm
+++ b/event/magikarp.asm
@@ -10,7 +10,7 @@
ld a, [CurPartySpecies]
cp MAGIKARP
jr nz, .not_magikarp
-
+
; Now let's compute its length based on its DVs and ID.
ld a, [CurPartyMon]
ld hl, PartyMon1Species
@@ -31,7 +31,7 @@
callba MagikarpLength_Mobile
ld hl, .MeasureItText
call PrintText
-
+
; Did we beat the record?
ld hl, Buffer1
ld de, wBestMagikarpLengthFeet
@@ -38,7 +38,7 @@
ld c, 2
call StringCmp
jr nc, .not_long_enough
-
+
; NEW RECORD!!! Let's save that.
ld hl, Buffer1
ld de, wBestMagikarpLengthFeet
@@ -86,7 +86,7 @@
ret
; fbbbb
-.feetinchchars: ; fbbb
+.feetinchchars ; fbbb
INCBIN "gfx/unknown/0fbbbb.2bpp"
; fbbdb
--- a/event/magnet_train.asm
+++ b/event/magnet_train.asm
@@ -7,7 +7,7 @@
lb de, (11 * 8) - (11 * 8 + 4), -$60
jr .continue
-.ToGoldenrod
+.ToGoldenrod:
ld a, -1 ; backwards
lb bc, -$40, -$60
lb de, (11 * 8) + (11 * 8 + 4), $60
@@ -187,7 +187,7 @@
ret
; 8cd65
-.FillLine ; 8cd65
+.FillLine: ; 8cd65
ld a, [de]
inc de
ld [hli], a
@@ -196,7 +196,7 @@
ret
; 8cd6c
-.FillAlt ; 8cd6c
+.FillAlt: ; 8cd6c
ld [hl], e
inc hl
ld [hl], d
@@ -306,7 +306,7 @@
; 8ce06
.Jumptable: ; 8ce06
-
+
dw .InitPlayerSpriteAnim
dw .WaitScene
dw .MoveTrain1
@@ -367,7 +367,7 @@
ld [hl], a
ret
-.PrepareToHoldTrain
+.PrepareToHoldTrain:
call .Next
ld a, $80
ld [wcf66], a
@@ -382,7 +382,7 @@
dec [hl]
ret
-.DoneWaiting
+.DoneWaiting:
call .Next
ret
; 8ce7a
@@ -414,7 +414,7 @@
ret
-.PrepareToFinishAnim
+.PrepareToFinishAnim:
call .Next
ret
; 8cea2
--- a/event/mom.asm
+++ b/event/mom.asm
@@ -32,8 +32,8 @@
jp [hl]
; 16242
-.dw: ; 16242
-
+.dw ; 16242
+
dw .CheckIfBankInitialized
dw .InitializeBank
dw .IsThisAboutYourMoney
@@ -72,7 +72,7 @@
ld a, %10000001
jr .done_1
-.DontSaveMoney
+.DontSaveMoney:
ld a, %10000000
.done_1
@@ -188,17 +188,17 @@
ld a, $8
jr .done_4
-.DontHaveThatMuchToDeposit
+.DontHaveThatMuchToDeposit:
ld hl, UnknownText_0x1667b
call PrintText
ret
-.CantDepositThatMuch
+.CantDepositThatMuch:
ld hl, UnknownText_0x16680
call PrintText
ret
-.CancelDeposit
+.CancelDeposit:
ld a, $7
.done_4
@@ -256,17 +256,17 @@
ld a, $8
jr .done_5
-.InsufficientFundsInBank
+.InsufficientFundsInBank:
ld hl, UnknownText_0x16671
call PrintText
ret
-.NotEnoughRoomInWallet
+.NotEnoughRoomInWallet:
ld hl, UnknownText_0x16676
call PrintText
ret
-.CancelWithdraw
+.CancelWithdraw:
ld a, $7
.done_5
@@ -287,7 +287,7 @@
ld [wJumptableIndex], a
ret
-.StopSavingMoney
+.StopSavingMoney:
ld a, $80
ld [wMomSavingMoney], a
ld a, $7
@@ -315,12 +315,12 @@
jr z, .LostBooklet
jr .loop
-.NotDST
+.NotDST:
cp 23 ; within one hour of 23:00?
jr nz, .loop
; fallthrough
-.LostBooklet
+.LostBooklet:
call .ClearBox
bccoord 1, 14
ld hl, .Text_AdjustClock
@@ -353,7 +353,7 @@
call PlaceWholeStringInBoxAtOnce
ret
-.SetDST
+.SetDST:
ld hl, .Text_SwitchToDST
call PlaceWholeStringInBoxAtOnce
call YesNoBox
@@ -375,7 +375,7 @@
sub 24
jr nc, .DontLoopHourForward
add 24
-.DontLoopHourForward
+.DontLoopHourForward:
ld [StartHour], a
ccf
ld a, [StartDay]
@@ -389,13 +389,13 @@
sub 1
jr nc, .DontLoopHourBack
add 24
-.DontLoopHourBack
+.DontLoopHourBack:
ld [StartHour], a
ld a, [StartDay]
sbc 0
jr nc, .DontLoopDayBack
add 7
-.DontLoopDayBack
+.DontLoopDayBack:
ld [StartDay], a
ret
; 164ea
@@ -480,7 +480,7 @@
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
call PrintNum
call UpdateSprites
- call Function3238
+ call CGBOnly_LoadEDTile
ret
; 1656b
@@ -534,7 +534,7 @@
ret
; 165b9
-.dpadaction: ; 165b9
+.dpadaction ; 165b9
ld hl, hJoyLast
ld a, [hl]
and D_UP
@@ -586,7 +586,7 @@
ret
; 16607
-.getdigitquantity: ; 16607
+.getdigitquantity ; 16607
ld a, [wMomBankDigitCursorPosition]
push de
ld e, a
--- a/event/mom_phone.asm
+++ b/event/mom_phone.asm
@@ -103,7 +103,7 @@
scf
ret
-.AddMoney
+.AddMoney:
ld de, MomItemTriggerBalance
ld bc, hMoneyTemp
callba AddMoney
@@ -198,7 +198,7 @@
.ok
ld de, MomItems_2
-.GetFromList1
+.GetFromList1:
ld l, a
ld h, 0
rept 3 ; multiply hl by 8
--- /dev/null
+++ b/event/overworld.asm
@@ -1,0 +1,1890 @@
+FieldMoveJumptableReset: ; c6ea
+ xor a
+ ld hl, Buffer1
+ ld bc, 7
+ call ByteFill
+ ret
+
+FieldMoveJumptable: ; c6f5
+ ld a, [Buffer1]
+ rst JumpTable
+ ld [Buffer1], a
+ bit 7, a
+ jr nz, .okay
+ and a
+ ret
+
+.okay
+ and $7f
+ scf
+ ret
+
+GetPartyNick: ; c706
+; write CurPartyMon nickname to StringBuffer1-3
+ ld hl, PartyMonNicknames
+ ld a, BOXMON
+ ld [MonType], a
+ ld a, [CurPartyMon]
+ call GetNick
+ call CopyName1
+; copy text from StringBuffer2 to StringBuffer3
+ ld de, StringBuffer2
+ ld hl, StringBuffer3
+ call CopyName2
+ ret
+
+CheckEngineFlag: ; c721
+; Check engine flag de
+; Return carry if flag is not set
+ ld b, CHECK_FLAG
+ callba EngineFlagAction
+ ld a, c
+ and a
+ jr nz, .isset
+ scf
+ ret
+.isset
+ xor a
+ ret
+
+CheckBadge: ; c731
+; Check engine flag a (ENGINE_ZEPHYRBADGE thru ENGINE_EARTHBADGE)
+; Display "Badge required" text and return carry if the badge is not owned
+ call CheckEngineFlag
+ ret nc
+ ld hl, .BadgeRequiredText
+ call MenuTextBoxBackup ; push text to queue
+ scf
+ ret
+
+.BadgeRequiredText: ; c73d
+ ; Sorry! A new BADGE
+ ; is required.
+ text_jump _BadgeRequiredText
+ db "@"
+
+CheckPartyMove: ; c742
+; Check if a monster in your party has move d.
+
+ ld e, 0
+ xor a
+ ld [CurPartyMon], a
+.loop
+ ld c, e
+ ld b, 0
+ ld hl, PartySpecies
+ add hl, bc
+ ld a, [hl]
+ and a
+ jr z, .no
+ cp a, -1
+ jr z, .no
+ cp a, EGG
+ jr z, .next
+
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld hl, PartyMon1Moves
+ ld a, e
+ call AddNTimes
+ ld b, NUM_MOVES
+.check
+ ld a, [hli]
+ cp d
+ jr z, .yes
+ dec b
+ jr nz, .check
+
+.next
+ inc e
+ jr .loop
+
+.yes
+ ld a, e
+ ld [CurPartyMon], a ; which mon has the move
+ xor a
+ ret
+.no
+ scf
+ ret
+
+FieldMoveFailed: ; c779
+ ld hl, .CantUseHere
+ call MenuTextBoxBackup
+ ret
+
+.CantUseHere: ; 0xc780
+ ; Can't use that here.
+ text_jump UnknownText_0x1c05c8
+ db "@"
+
+CutFunction: ; c785
+ call FieldMoveJumptableReset
+.loop
+ ld hl, .Jumptable
+ call FieldMoveJumptable
+ jr nc, .loop
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.Jumptable: ; c796 (3:4796)
+
+ dw .CheckAble
+ dw .DoCut
+ dw .FailCut
+
+.CheckAble: ; c79c (3:479c)
+ ld de, ENGINE_HIVEBADGE
+ call CheckBadge
+ jr c, .nohivebadge
+ call CheckMapForSomethingToCut
+ jr c, .nothingtocut
+ ld a, $1
+ ret
+
+.nohivebadge
+ ld a, $80
+ ret
+
+.nothingtocut
+ ld a, $2
+ ret
+
+.DoCut: ; c7b2 (3:47b2)
+ ld hl, Script_CutFromMenu
+ call QueueScript
+ ld a, $81
+ ret
+
+.FailCut: ; c7bb (3:47bb)
+ ld hl, Text_NothingToCut
+ call MenuTextBoxBackup
+ ld a, $80
+ ret
+
+Text_UsedCut: ; 0xc7c4
+ ; used CUT!
+ text_jump UnknownText_0x1c05dd
+ db "@"
+
+Text_NothingToCut: ; 0xc7c9
+ ; There's nothing to CUT here.
+ text_jump UnknownText_0x1c05ec
+ db "@"
+
+CheckMapForSomethingToCut: ; c7ce
+ ; Does the collision data of the facing tile permit cutting?
+ call GetFacingTileCoord
+ ld c, a
+ push de
+ callba CheckCutCollision
+ pop de
+ jr nc, .fail
+ ; Get the location of the current block in OverworldMap.
+ call GetBlockLocation
+ ld c, [hl]
+ ; See if that block contains something that can be cut.
+ push hl
+ ld hl, CutTreeBlockPointers
+ call CheckOverworldTileArrays
+ pop hl
+ jr nc, .fail
+ ; Back up the OverworldMap address to Buffer3
+ ld a, l
+ ld [Buffer3], a
+ ld a, h
+ ld [Buffer4], a
+ ; Back up the replacement tile to Buffer5
+ ld a, b
+ ld [Buffer5], a
+ ; Back up the animation index to Buffer6
+ ld a, c
+ ld [Buffer6], a
+ xor a
+ ret
+
+.fail
+ scf
+ ret
+
+Script_CutFromMenu: ; c7fe
+ reloadmappart
+ special UpdateTimePals
+
+Script_Cut: ; 0xc802
+ callasm GetPartyNick
+ writetext Text_UsedCut
+ reloadmappart
+ callasm CutDownTreeOrGrass
+ closetext
+ end
+
+CutDownTreeOrGrass: ; c810
+ ld hl, Buffer3 ; OverworldMapTile
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [Buffer5] ; ReplacementTile
+ ld [hl], a
+ xor a
+ ld [hBGMapMode], a
+ call OverworldTextModeSwitch
+ call UpdateSprites
+ call DelayFrame
+ ld a, [Buffer6] ; Animation type
+ ld e, a
+ callba OWCutAnimation
+ call BufferScreen
+ call GetMovementPermissions
+ call UpdateSprites
+ call DelayFrame
+ call LoadStandardFont
+ ret
+
+CheckOverworldTileArrays: ; c840
+ ; Input: c contains the tile you're facing
+ ; Output: Replacement tile in b and effect on wild encounters in c, plus carry set.
+ ; Carry is not set if the facing tile cannot be replaced, or if the tileset
+ ; does not contain a tile you can replace.
+
+ ; Dictionary lookup for pointer to tile replacement table
+ push bc
+ ld a, [wTileset]
+ ld de, 3
+ call IsInArray
+ pop bc
+ jr nc, .nope
+ ; Load the pointer
+ inc hl
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ; Look up the tile you're facing
+ ld de, 3
+ ld a, c
+ call IsInArray
+ jr nc, .nope
+ ; Load the replacement to b
+ inc hl
+ ld b, [hl]
+ ; Load the animation type parameter to c
+ inc hl
+ ld c, [hl]
+ scf
+ ret
+
+.nope
+ xor a
+ ret
+
+CutTreeBlockPointers: ; c862
+; Which tileset are we in?
+ dbw TILESET_JOHTO_1, .johto1
+ dbw TILESET_JOHTO_2, .johto2
+ dbw TILESET_KANTO, .kanto
+ dbw TILESET_PARK, .park
+ dbw TILESET_ILEX_FOREST, .ilex
+ db -1
+
+.johto1 ; Johto OW
+; Which meta tile are we facing, which should we replace it with, and which animation?
+ db $03, $02, $01 ; grass
+ db $5b, $3c, $00 ; tree
+ db $5f, $3d, $00 ; tree
+ db $63, $3f, $00 ; tree
+ db $67, $3e, $00 ; tree
+ db -1
+
+.johto2 ; Goldenrod area
+ db $03, $02, $01 ; grass
+ db -1
+
+.kanto ; Kanto OW
+ db $0b, $0a, $01 ; grass
+ db $32, $6d, $00 ; tree
+ db $33, $6c, $00 ; tree
+ db $34, $6f, $00 ; tree
+ db $35, $4c, $00 ; tree
+ db $60, $6e, $00 ; tree
+ db -1
+
+.park ; National Park
+ db $13, $03, $01 ; grass
+ db $03, $04, $01 ; grass
+ db -1
+
+.ilex ; Ilex Forest
+ db $0f, $17, $00
+ db -1
+
+WhirlpoolBlockPointers: ; c8a4
+ dbw TILESET_JOHTO_1, .johto
+ db -1
+
+.johto ; c8a8
+ db $07, $36, $00
+ db -1
+
+OWFlash: ; c8ac
+ call .CheckUseFlash
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.CheckUseFlash: ; c8b5
+; Flash
+ ld de, ENGINE_ZEPHYRBADGE
+ callba CheckBadge
+ jr c, .nozephyrbadge
+ push hl
+ callba SpecialAerodactylChamber
+ pop hl
+ jr c, .useflash
+ ld a, [wTimeOfDayPalset]
+ cp %11111111 ; 3, 3, 3, 3
+ jr nz, .notadarkcave
+.useflash
+ call UseFlash
+ ld a, $81
+ ret
+
+.notadarkcave
+ call FieldMoveFailed
+ ld a, $80
+ ret
+
+.nozephyrbadge
+ ld a, $80
+ ret
+
+UseFlash: ; c8e0
+ ld hl, Script_UseFlash
+ jp QueueScript
+
+Script_UseFlash: ; 0xc8e6
+ reloadmappart
+ special UpdateTimePals
+ writetext UnknownText_0xc8f3
+ callasm BlindingFlash
+ closetext
+ end
+
+UnknownText_0xc8f3: ; 0xc8f3
+ text_jump UnknownText_0x1c0609
+ start_asm
+ call WaitSFX
+ ld de, SFX_FLASH
+ call PlaySFX
+ call WaitSFX
+ ld hl, .BlankText
+ ret
+
+.BlankText: ; 0xc908
+ db "@"
+
+SurfFunction: ; c909
+ call FieldMoveJumptableReset
+.loop
+ ld hl, .Jumptable
+ call FieldMoveJumptable
+ jr nc, .loop
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.Jumptable: ; c91a (3:491a)
+ dw .TrySurf
+ dw .DoSurf
+ dw .FailSurf
+ dw .AlreadySurfing
+
+.TrySurf: ; c922 (3:4922)
+ ld de, ENGINE_FOGBADGE
+ call CheckBadge
+ jr c, .asm_c956
+ ld hl, BikeFlags
+ bit 1, [hl] ; always on bike
+ jr nz, .cannotsurf
+ ld a, [PlayerState]
+ cp PLAYER_SURF
+ jr z, .alreadyfail
+ cp PLAYER_SURF_PIKA
+ jr z, .alreadyfail
+ call GetFacingTileCoord
+ call GetTileCollision
+ cp $1
+ jr nz, .cannotsurf
+ call CheckDirection
+ jr c, .cannotsurf
+ callba CheckFacingObject
+ jr c, .cannotsurf
+ ld a, $1
+ ret
+.asm_c956
+ ld a, $80
+ ret
+.alreadyfail
+ ld a, $3
+ ret
+.cannotsurf
+ ld a, $2
+ ret
+
+.DoSurf: ; c95f (3:495f)
+ call GetSurfType
+ ld [Buffer2], a ; wd1eb (aliases: MovementType)
+ call GetPartyNick
+ ld hl, SurfFromMenuScript
+ call QueueScript
+ ld a, $81
+ ret
+
+.FailSurf: ; c971 (3:4971)
+ ld hl, CantSurfText
+ call MenuTextBoxBackup
+ ld a, $80
+ ret
+
+.AlreadySurfing: ; c97a (3:497a)
+ ld hl, AlreadySurfingText
+ call MenuTextBoxBackup
+ ld a, $80
+ ret
+
+SurfFromMenuScript: ; c983
+ special UpdateTimePals
+
+UsedSurfScript: ; c986
+ writetext UsedSurfText ; "used SURF!"
+ waitbutton
+ closetext
+
+ callasm .empty_fn ; empty function
+
+ copybytetovar Buffer2
+ writevarcode VAR_MOVEMENT
+
+ special ReplaceKrisSprite
+ special PlayMapMusic
+; step into the water
+ special Special_SurfStartStep ; (slow_step_x, step_end)
+ applymovement PLAYER, MovementBuffer ; PLAYER, MovementBuffer
+ end
+
+.empty_fn ; c9a2
+ callba MobileFn_1060bb ; empty
+ ret
+
+UsedSurfText: ; c9a9
+ text_jump _UsedSurfText
+ db "@"
+
+CantSurfText: ; c9ae
+ text_jump _CantSurfText
+ db "@"
+
+AlreadySurfingText: ; c9b3
+ text_jump _AlreadySurfingText
+ db "@"
+
+GetSurfType: ; c9b8
+; Surfing on Pikachu uses an alternate sprite.
+; This is done by using a separate movement type.
+
+ ld a, [CurPartyMon]
+ ld e, a
+ ld d, 0
+ ld hl, PartySpecies
+ add hl, de
+
+ ld a, [hl]
+ cp PIKACHU
+ ld a, PLAYER_SURF_PIKA
+ ret z
+ ld a, PLAYER_SURF
+ ret
+
+CheckDirection: ; c9cb
+; Return carry if a tile permission prevents you
+; from moving in the direction you're facing.
+
+; Get player direction
+ ld a, [PlayerDirection]
+ and a, %00001100 ; bits 2 and 3 contain direction
+ rrca
+ rrca
+ ld e, a
+ ld d, 0
+ ld hl, .Directions
+ add hl, de
+
+; Can you walk in this direction?
+ ld a, [TilePermissions]
+ and [hl]
+ jr nz, .quit
+ xor a
+ ret
+
+.quit
+ scf
+ ret
+
+.Directions:
+ db FACE_DOWN
+ db FACE_UP
+ db FACE_LEFT
+ db FACE_RIGHT
+
+TrySurfOW:: ; c9e7
+; Checking a tile in the overworld.
+; Return carry if fail is allowed.
+
+; Don't ask to surf if already fail.
+ ld a, [PlayerState]
+ cp PLAYER_SURF_PIKA
+ jr z, .quit
+ cp PLAYER_SURF
+ jr z, .quit
+
+; Must be facing water.
+ ld a, [EngineBuffer1]
+ call GetTileCollision
+ cp 1 ; surfable
+ jr nz, .quit
+
+; Check tile permissions.
+ call CheckDirection
+ jr c, .quit
+
+ ld de, ENGINE_FOGBADGE
+ call CheckEngineFlag
+ jr c, .quit
+
+ ld d, SURF
+ call CheckPartyMove
+ jr c, .quit
+
+ ld hl, BikeFlags
+ bit 1, [hl] ; always on bike (can't surf)
+ jr nz, .quit
+
+ call GetSurfType
+ ld [MovementType], a
+ call GetPartyNick
+
+ ld a, BANK(AskSurfScript)
+ ld hl, AskSurfScript
+ call CallScript
+
+ scf
+ ret
+
+.quit
+ xor a
+ ret
+
+AskSurfScript: ; ca2c
+ opentext
+ writetext AskSurfText
+ yesorno
+ iftrue UsedSurfScript
+ closetext
+ end
+
+AskSurfText: ; ca36
+ text_jump _AskSurfText ; The water is calm.
+ db "@" ; Want to SURF?
+
+FlyFunction: ; ca3b
+ call FieldMoveJumptableReset
+.loop
+ ld hl, .Jumptable
+ call FieldMoveJumptable
+ jr nc, .loop
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.Jumptable:
+ dw .TryFly
+ dw .DoFly
+ dw .FailFly
+
+.TryFly: ; ca52
+; Fly
+ ld de, ENGINE_STORMBADGE
+ call CheckBadge
+ jr c, .nostormbadge
+ call GetMapPermission
+ call CheckOutdoorMap
+ jr z, .outdoors
+ jr .indoors
+
+.outdoors
+ xor a
+ ld [hMapAnims], a
+ call LoadStandardMenuDataHeader
+ call ClearSprites
+ callba _FlyMap
+ ld a, e
+ cp -1
+ jr z, .illegal
+ cp NUM_SPAWNS
+ jr nc, .illegal
+
+ ld [wd001], a
+ call CloseWindow
+ ld a, $1
+ ret
+
+.nostormbadge
+ ld a, $82
+ ret
+
+.indoors
+ ld a, $2
+ ret
+
+.illegal
+ call CloseWindow
+ call WaitBGMap
+ ld a, $80
+ ret
+
+.DoFly: ; ca94
+ ld hl, .FlyScript
+ call QueueScript
+ ld a, $81
+ ret
+
+.FailFly: ; ca9d
+ call FieldMoveFailed
+ ld a, $82
+ ret
+
+.FlyScript: ; 0xcaa3
+ reloadmappart
+ callasm HideSprites
+ special UpdateTimePals
+ callasm FlyFromAnim
+ farscall Script_AbortBugContest
+ special WarpToSpawnPoint
+ callasm DelayLoadingNewSprites
+ writecode VAR_MOVEMENT, PLAYER_NORMAL
+ newloadmap MAPSETUP_FLY
+ callasm FlyToAnim
+ special WaitSFX
+ callasm .ReturnFromFly
+ end
+
+.ReturnFromFly: ; cacb
+ callba Function561d
+ call DelayFrame
+ call ReplaceKrisSprite
+ callba LoadOverworldFont
+ ret
+
+WaterfallFunction: ; cade
+ call .TryWaterfall
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.TryWaterfall: ; cae7
+; Waterfall
+ ld de, ENGINE_RISINGBADGE
+ callba CheckBadge
+ ld a, $80
+ ret c
+ call CheckMapCanWaterfall
+ jr c, .failed
+ ld hl, Script_WaterfallFromMenu
+ call QueueScript
+ ld a, $81
+ ret
+
+.failed
+ call FieldMoveFailed
+ ld a, $80
+ ret
+
+CheckMapCanWaterfall: ; cb07
+ ld a, [PlayerDirection]
+ and $c
+ cp FACE_UP
+ jr nz, .failed
+ ld a, [TileUp]
+ call CheckWaterfallTile
+ jr nz, .failed
+ xor a
+ ret
+
+.failed
+ scf
+ ret
+
+Script_WaterfallFromMenu: ; 0xcb1c
+ reloadmappart
+ special UpdateTimePals
+
+Script_UsedWaterfall: ; 0xcb20
+ callasm GetPartyNick
+ writetext .Text_UsedWaterfall
+ waitbutton
+ closetext
+ playsound SFX_BUBBLEBEAM
+.loop
+ applymovement PLAYER, .WaterfallStep
+ callasm .CheckContinueWaterfall
+ iffalse .loop
+ end
+
+.CheckContinueWaterfall: ; cb38
+ xor a
+ ld [ScriptVar], a
+ ld a, [PlayerStandingTile]
+ call CheckWaterfallTile
+ ret z
+ callba MobileFn_1060c1
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+
+.WaterfallStep: ; cb4f
+ turn_waterfall_up
+ step_end
+
+.Text_UsedWaterfall: ; 0xcb51
+ ; used WATERFALL!
+ text_jump UnknownText_0x1c068e
+ db "@"
+
+TryWaterfallOW:: ; cb56
+ ld d, WATERFALL
+ call CheckPartyMove
+ jr c, .failed
+ ld de, ENGINE_RISINGBADGE
+ call CheckEngineFlag
+ jr c, .failed
+ call CheckMapCanWaterfall
+ jr c, .failed
+ ld a, BANK(Script_AskWaterfall)
+ ld hl, Script_AskWaterfall
+ call CallScript
+ scf
+ ret
+
+.failed
+ ld a, BANK(Script_CantDoWaterfall)
+ ld hl, Script_CantDoWaterfall
+ call CallScript
+ scf
+ ret
+
+Script_CantDoWaterfall: ; 0xcb7e
+ jumptext .Text_CantDoWaterfall
+
+.Text_CantDoWaterfall: ; 0xcb81
+ ; Wow, it's a huge waterfall.
+ text_jump UnknownText_0x1c06a3
+ db "@"
+
+Script_AskWaterfall: ; 0xcb86
+ opentext
+ writetext .AskUseWaterfall
+ yesorno
+ iftrue Script_UsedWaterfall
+ closetext
+ end
+
+.AskUseWaterfall: ; 0xcb90
+ ; Do you want to use WATERFALL?
+ text_jump UnknownText_0x1c06bf
+ db "@"
+
+EscapeRopeFunction: ; cb95
+ call FieldMoveJumptableReset
+ ld a, $1
+ jr dig_incave
+
+DigFunction: ; cb9c
+ call FieldMoveJumptableReset
+ ld a, $2
+
+dig_incave
+ ld [Buffer2], a
+.loop
+ ld hl, .DigTable
+ call FieldMoveJumptable
+ jr nc, .loop
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.DigTable: ; cbb2
+ dw .CheckCanDig
+ dw .DoDig
+ dw .FailDig
+
+.CheckCanDig: ; cbb8
+ call GetMapPermission
+ cp CAVE
+ jr z, .incave
+ cp DUNGEON
+ jr z, .incave
+.fail
+ ld a, $2
+ ret
+
+.incave
+ ld hl, wDigWarp
+ ld a, [hli]
+ and a
+ jr z, .fail
+ ld a, [hli]
+ and a
+ jr z, .fail
+ ld a, [hl]
+ and a
+ jr z, .fail
+ ld a, $1
+ ret
+
+.DoDig: ; cbd8
+ ld hl, wDigWarp
+ ld de, wNextWarp
+ ld bc, 3
+ call CopyBytes
+ call GetPartyNick
+ ld a, [Buffer2]
+ cp $2
+ jr nz, .escaperope
+ ld hl, .UsedDigScript
+ call QueueScript
+ ld a, $81
+ ret
+
+.escaperope
+ callba SpecialKabutoChamber
+ ld hl, .UsedEscapeRopeScript
+ call QueueScript
+ ld a, $81
+ ret
+
+.FailDig: ; cc06
+ ld a, [Buffer2]
+ cp $2
+ jr nz, .failescaperope
+ ld hl, .Text_CantUseHere
+ call MenuTextBox
+ call WaitPressAorB_BlinkCursor
+ call CloseWindow
+
+.failescaperope
+ ld a, $80
+ ret
+
+.Text_UsedDig: ; 0xcc1c
+ ; used DIG!
+ text_jump UnknownText_0x1c06de
+ db "@"
+
+.Text_UsedEscapeRope: ; 0xcc21
+ ; used an ESCAPE ROPE.
+ text_jump UnknownText_0x1c06ed
+ db "@"
+
+.Text_CantUseHere: ; 0xcc26
+ ; Can't use that here.
+ text_jump UnknownText_0x1c0705
+ db "@"
+
+.UsedEscapeRopeScript: ; 0xcc2b
+ reloadmappart
+ special UpdateTimePals
+ writetext .Text_UsedEscapeRope
+ jump .UsedDigOrEscapeRopeScript
+
+.UsedDigScript: ; 0xcc35
+ reloadmappart
+ special UpdateTimePals
+ writetext .Text_UsedDig
+
+.UsedDigOrEscapeRopeScript: ; 0xcc3c
+ waitbutton
+ closetext
+ playsound SFX_WARP_TO
+ applymovement PLAYER, .DigOut
+ farscall Script_AbortBugContest
+ special WarpToSpawnPoint
+ writecode VAR_MOVEMENT, PLAYER_NORMAL
+ newloadmap MAPSETUP_DOOR
+ playsound SFX_WARP_FROM
+ applymovement PLAYER, .DigReturn
+ end
+
+.DigOut: ; 0xcc59
+ step_dig 32
+ hide_person
+ step_end
+
+.DigReturn: ; 0xcc5d
+ show_person
+ return_dig 32
+ step_end
+
+TeleportFunction: ; cc61
+ call FieldMoveJumptableReset
+.loop
+ ld hl, .Jumptable
+ call FieldMoveJumptable
+ jr nc, .loop
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.Jumptable: ; cc72
+ dw .TryTeleport
+ dw .DoTeleport
+ dw .FailTeleport
+
+.TryTeleport: ; cc78
+ call GetMapPermission
+ call CheckOutdoorMap
+ jr z, .CheckIfSpawnPoint
+ jr .nope
+
+.CheckIfSpawnPoint:
+ ld a, [wLastSpawnMapGroup]
+ ld d, a
+ ld a, [wLastSpawnMapNumber]
+ ld e, a
+ callba IsSpawnPoint
+ jr nc, .nope
+ ld a, c
+ ld [wd001], a
+ ld a, $1
+ ret
+
+.nope
+ ld a, $2
+ ret
+
+.DoTeleport: ; cc9c
+ call GetPartyNick
+ ld hl, .TeleportScript
+ call QueueScript
+ ld a, $81
+ ret
+
+.FailTeleport: ; cca8
+ ld hl, .Text_CantUseHere
+ call MenuTextBoxBackup
+ ld a, $80
+ ret
+
+.Text_ReturnToLastMonCenter: ; 0xccb1
+ ; Return to the last #MON CENTER.
+ text_jump UnknownText_0x1c071a
+ db "@"
+
+.Text_CantUseHere: ; 0xccb6
+ ; Can't use that here.
+ text_jump UnknownText_0x1c073b
+ db "@"
+
+.TeleportScript: ; 0xccbb
+ reloadmappart
+ special UpdateTimePals
+ writetext .Text_ReturnToLastMonCenter
+ pause 60
+ reloadmappart
+ closetext
+ playsound SFX_WARP_TO
+ applymovement PLAYER, .TeleportFrom
+ farscall Script_AbortBugContest
+ special WarpToSpawnPoint
+ writecode VAR_MOVEMENT, PLAYER_NORMAL
+ newloadmap MAPSETUP_TELEPORT
+ playsound SFX_WARP_FROM
+ applymovement PLAYER, .TeleportTo
+ end
+
+.TeleportFrom: ; cce1
+ teleport_from
+ step_end
+
+.TeleportTo: ; cce3
+ teleport_to
+ step_end
+
+StrengthFunction: ; cce5
+ call .TryStrength
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.TryStrength: ; ccee
+; Strength
+ ld de, ENGINE_PLAINBADGE
+ call CheckBadge
+ jr c, .Failed
+ jr .UseStrength
+
+.AlreadyUsing: ; unreferenced
+ ld hl, .JumpText
+ call MenuTextBoxBackup
+ ld a, $80
+ ret
+
+.JumpText: ; 0xcd01
+ text_jump UnknownText_0x1c0751
+ db "@"
+
+.Failed: ; cd06
+ ld a, $80
+ ret
+
+.UseStrength: ; cd09
+ ld hl, Script_StrengthFromMenu
+ call QueueScript
+ ld a, $81
+ ret
+
+SetStrengthFlag: ; cd12
+ ld hl, BikeFlags
+ set 0, [hl]
+ ld a, [CurPartyMon]
+ ld e, a
+ ld d, 0
+ ld hl, PartySpecies
+ add hl, de
+ ld a, [hl]
+ ld [Buffer6], a
+ call GetPartyNick
+ ret
+
+Script_StrengthFromMenu: ; 0xcd29
+ reloadmappart
+ special UpdateTimePals
+
+Script_UsedStrength: ; 0xcd2d
+ callasm SetStrengthFlag
+ writetext .UsedStrength
+ copybytetovar Buffer6
+ cry 0
+ pause 3
+ writetext .StrengthAllowedItToMoveBoulders
+ closetext
+ end
+
+.UsedStrength: ; 0xcd41
+ text_jump UnknownText_0x1c0774
+ db "@"
+
+.StrengthAllowedItToMoveBoulders: ; 0xcd46
+ text_jump UnknownText_0x1c0788
+ db "@"
+
+AskStrengthScript:
+ callasm TryStrengthOW
+ iffalse .AskStrength
+ if_equal $1, .DontMeetRequirements
+ jump .AlreadyUsedStrength
+
+.DontMeetRequirements: ; 0xcd59
+ jumptext UnknownText_0xcd73
+
+.AlreadyUsedStrength: ; 0xcd5c
+ jumptext UnknownText_0xcd6e
+
+.AskStrength: ; 0xcd5f
+ opentext
+ writetext UnknownText_0xcd69
+ yesorno
+ iftrue Script_UsedStrength
+ closetext
+ end
+
+UnknownText_0xcd69: ; 0xcd69
+ ; A #MON may be able to move this. Want to use STRENGTH?
+ text_jump UnknownText_0x1c07a0
+ db "@"
+
+UnknownText_0xcd6e: ; 0xcd6e
+ ; Boulders may now be moved!
+ text_jump UnknownText_0x1c07d8
+ db "@"
+
+UnknownText_0xcd73: ; 0xcd73
+ ; A #MON may be able to move this.
+ text_jump UnknownText_0x1c07f4
+ db "@"
+
+TryStrengthOW: ; cd78
+ ld d, STRENGTH
+ call CheckPartyMove
+ jr c, .nope
+
+ ld de, ENGINE_PLAINBADGE
+ call CheckEngineFlag
+ jr c, .nope
+
+ ld hl, BikeFlags
+ bit 0, [hl]
+ jr z, .already_using
+
+ ld a, 2
+ jr .done
+
+.nope
+ ld a, 1
+ jr .done
+
+.already_using
+ xor a
+ jr .done
+
+.done
+ ld [ScriptVar], a
+ ret
+
+WhirlpoolFunction: ; cd9d
+ call FieldMoveJumptableReset
+.loop
+ ld hl, Jumptable_cdae
+ call FieldMoveJumptable
+ jr nc, .loop
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+Jumptable_cdae: ; cdae
+ dw .TryWhirlpool
+ dw .DoWhirlpool
+ dw .FailWhirlpool
+
+.TryWhirlpool: ; cdb4
+ ld de, ENGINE_GLACIERBADGE
+ call CheckBadge
+ jr c, .noglacierbadge
+ call TryWhirlpoolMenu
+ jr c, .failed
+ ld a, $1
+ ret
+
+.failed
+ ld a, $2
+ ret
+
+.noglacierbadge
+ ld a, $80
+ ret
+
+.DoWhirlpool: ; cdca
+ ld hl, Script_WhirlpoolFromMenu
+ call QueueScript
+ ld a, $81
+ ret
+
+.FailWhirlpool: ; cdd3
+ call FieldMoveFailed
+ ld a, $80
+ ret
+
+Text_UsedWhirlpool: ; 0xcdd9
+ ; used WHIRLPOOL!
+ text_jump UnknownText_0x1c0816
+ db "@"
+
+TryWhirlpoolMenu: ; cdde
+ call GetFacingTileCoord
+ ld c, a
+ push de
+ call CheckWhirlpoolTile
+ pop de
+ jr c, .failed
+ call GetBlockLocation
+ ld c, [hl]
+ push hl
+ ld hl, WhirlpoolBlockPointers
+ call CheckOverworldTileArrays
+ pop hl
+ jr nc, .failed
+ ld a, l
+ ld [Buffer3], a
+ ld a, h
+ ld [Buffer4], a
+ ld a, b
+ ld [Buffer5], a
+ ld a, c
+ ld [Buffer6], a
+ xor a
+ ret
+
+.failed
+ scf
+ ret
+
+Script_WhirlpoolFromMenu: ; 0xce0b
+ reloadmappart
+ special UpdateTimePals
+
+Script_UsedWhirlpool: ; 0xce0f
+ callasm GetPartyNick
+ writetext Text_UsedWhirlpool
+ reloadmappart
+ callasm DisappearWhirlpool
+ closetext
+ end
+
+DisappearWhirlpool: ; ce1d
+ ld hl, Buffer3
+ ld a, [hli]
+ ld h, [hl]
+ ld l, a
+ ld a, [Buffer5]
+ ld [hl], a
+ xor a
+ ld [hBGMapMode], a
+ call OverworldTextModeSwitch
+ ld a, [Buffer6]
+ ld e, a
+ callba PlayWhirlpoolSound
+ call BufferScreen
+ call GetMovementPermissions
+ ret
+
+TryWhirlpoolOW:: ; ce3e
+ ld d, WHIRLPOOL
+ call CheckPartyMove
+ jr c, .failed
+ ld de, ENGINE_GLACIERBADGE
+ call CheckEngineFlag
+ jr c, .failed
+ call TryWhirlpoolMenu
+ jr c, .failed
+ ld a, BANK(Script_AskWhirlpoolOW)
+ ld hl, Script_AskWhirlpoolOW
+ call CallScript
+ scf
+ ret
+
+.failed
+ ld a, BANK(Script_MightyWhirlpool)
+ ld hl, Script_MightyWhirlpool
+ call CallScript
+ scf
+ ret
+
+Script_MightyWhirlpool: ; 0xce66
+ jumptext .MightyWhirlpoolText
+
+.MightyWhirlpoolText: ; 0xce69
+ text_jump UnknownText_0x1c082b
+ db "@"
+
+Script_AskWhirlpoolOW: ; 0xce6e
+ opentext
+ writetext UnknownText_0xce78
+ yesorno
+ iftrue Script_UsedWhirlpool
+ closetext
+ end
+
+UnknownText_0xce78: ; 0xce78
+ text_jump UnknownText_0x1c0864
+ db "@"
+
+HeadbuttFunction: ; ce7d
+ call TryHeadbuttFromMenu
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+TryHeadbuttFromMenu: ; ce86
+ call GetFacingTileCoord
+ call CheckHeadbuttTreeTile
+ jr nz, .no_tree
+
+ ld hl, HeadbuttFromMenuScript
+ call QueueScript
+ ld a, $81
+ ret
+
+.no_tree
+ call FieldMoveFailed
+ ld a, $80
+ ret
+
+UnknownText_0xce9d: ; 0xce9d
+ ; did a HEADBUTT!
+ text_jump UnknownText_0x1c0897
+ db "@"
+
+UnknownText_0xcea2: ; 0xcea2
+ ; Nope. Nothing…
+ text_jump UnknownText_0x1c08ac
+ db "@"
+
+HeadbuttFromMenuScript: ; 0xcea7
+ reloadmappart
+ special UpdateTimePals
+
+HeadbuttScript: ; 0xceab
+ callasm GetPartyNick
+ writetext UnknownText_0xce9d
+
+ reloadmappart
+ callasm ShakeHeadbuttTree
+
+ callasm TreeMonEncounter
+ iffalse .no_battle
+ closetext
+ randomwildmon
+ startbattle
+ reloadmapafterbattle
+ end
+
+.no_battle
+ writetext UnknownText_0xcea2
+ waitbutton
+ closetext
+ end
+
+TryHeadbuttOW:: ; cec9
+ ld d, HEADBUTT
+ call CheckPartyMove
+ jr c, .no
+
+ ld a, BANK(AskHeadbuttScript)
+ ld hl, AskHeadbuttScript
+ call CallScript
+ scf
+ ret
+
+.no
+ xor a
+ ret
+
+AskHeadbuttScript: ; 0xcedc
+ opentext
+ writetext UnknownText_0xcee6
+ yesorno
+ iftrue HeadbuttScript
+ closetext
+ end
+
+UnknownText_0xcee6: ; 0xcee6
+ ; A #MON could be in this tree. Want to HEADBUTT it?
+ text_jump UnknownText_0x1c08bc
+ db "@"
+
+RockSmashFunction: ; ceeb
+ call TryRockSmashFromMenu
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+TryRockSmashFromMenu: ; cef4
+ call GetFacingObject
+ jr c, .no_rock
+ ld a, d
+ cp $18
+ jr nz, .no_rock
+
+ ld hl, RockSmashFromMenuScript
+ call QueueScript
+ ld a, $81
+ ret
+
+.no_rock
+ call FieldMoveFailed
+ ld a, $80
+ ret
+
+GetFacingObject: ; cf0d
+ callba CheckFacingObject
+ jr nc, .fail
+
+ ld a, [hObjectStructIndexBuffer]
+ call GetObjectStruct
+ ld hl, OBJECT_MAP_OBJECT_INDEX
+ add hl, bc
+ ld a, [hl]
+ ld [hLastTalked], a
+ call GetMapObject
+ ld hl, MAPOBJECT_MOVEMENT
+ add hl, bc
+ ld a, [hl]
+ ld d, a
+ and a
+ ret
+
+.fail
+ scf
+ ret
+
+RockSmashFromMenuScript: ; 0xcf2e
+ reloadmappart
+ special UpdateTimePals
+
+RockSmashScript: ; cf32
+ callasm GetPartyNick
+ writetext UnknownText_0xcf58
+ closetext
+ special WaitSFX
+ playsound SFX_STRENGTH
+ earthquake 84
+ applymovement2 MovementData_0xcf55
+ disappear -2
+
+ callasm RockMonEncounter
+ copybytetovar TempWildMonSpecies
+ iffalse .done
+ randomwildmon
+ startbattle
+ reloadmapafterbattle
+.done
+ end
+
+MovementData_0xcf55: ; 0xcf55
+ rock_smash 10
+ step_end
+
+UnknownText_0xcf58: ; 0xcf58
+ text_jump UnknownText_0x1c08f0
+ db "@"
+
+AskRockSmashScript: ; 0xcf5d
+ callasm HasRockSmash
+ if_equal 1, .no
+
+ opentext
+ writetext UnknownText_0xcf77
+ yesorno
+ iftrue RockSmashScript
+ closetext
+ end
+.no
+ jumptext UnknownText_0xcf72
+
+UnknownText_0xcf72: ; 0xcf72
+ ; Maybe a #MON can break this.
+ text_jump UnknownText_0x1c0906
+ db "@"
+
+UnknownText_0xcf77: ; 0xcf77
+ ; This rock looks breakable. Want to use ROCK SMASH?
+ text_jump UnknownText_0x1c0924
+ db "@"
+
+HasRockSmash: ; cf7c
+ ld d, ROCK_SMASH
+ call CheckPartyMove
+ jr nc, .yes
+.no
+ ld a, 1
+ jr .done
+.yes
+ xor a
+ jr .done
+.done
+ ld [ScriptVar], a
+ ret
+
+FishFunction: ; cf8e
+ ld a, e
+ push af
+ call FieldMoveJumptableReset
+ pop af
+ ld [Buffer2], a
+.loop
+ ld hl, .FishTable
+ call FieldMoveJumptable
+ jr nc, .loop
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.FishTable: ; cfa5
+ dw .TryFish
+ dw .FishNoBite
+ dw .FishGotSomething
+ dw .FailFish
+ dw .FishNoFish
+
+.TryFish: ; cfaf
+ ld a, [PlayerState]
+ cp PLAYER_SURF
+ jr z, .fail
+ cp PLAYER_SURF_PIKA
+ jr z, .fail
+ call GetFacingTileCoord
+ call GetTileCollision
+ cp $1
+ jr z, .facingwater
+.fail
+ ld a, $3
+ ret
+
+.facingwater
+ call GetFishingGroup
+ and a
+ jr nz, .goodtofish
+ ld a, $4
+ ret
+
+.goodtofish
+ ld d, a
+ ld a, [Buffer2]
+ ld e, a
+ callba Fish
+ ld a, d
+ and a
+ jr z, .nonibble
+ ld [TempWildMonSpecies], a
+ ld a, e
+ ld [CurPartyLevel], a
+ ld a, BATTLETYPE_FISH
+ ld [BattleType], a
+ ld a, $2
+ ret
+
+.nonibble
+ ld a, $1
+ ret
+
+.FailFish: ; cff1
+ ld a, $80
+ ret
+
+.FishGotSomething: ; cff4
+ ld a, $1
+ ld [Buffer6], a
+ ld hl, Script_GotABite
+ call QueueScript
+ ld a, $81
+ ret
+
+.FishNoBite: ; d002
+ ld a, $2
+ ld [Buffer6], a
+ ld hl, Script_NotEvenANibble
+ call QueueScript
+ ld a, $81
+ ret
+
+.FishNoFish: ; d010
+ ld a, $0
+ ld [Buffer6], a
+ ld hl, Script_NotEvenANibble2
+ call QueueScript
+ ld a, $81
+ ret
+
+Script_NotEvenANibble: ; 0xd01e
+ scall Script_FishCastRod
+ writetext UnknownText_0xd0a9
+ jump Script_NotEvenANibble_FallThrough
+
+Script_NotEvenANibble2: ; 0xd027
+ scall Script_FishCastRod
+ writetext UnknownText_0xd0a9
+
+Script_NotEvenANibble_FallThrough: ; 0xd02d
+ loademote EMOTE_SHADOW
+ callasm PutTheRodAway
+ closetext
+ end
+
+Script_GotABite: ; 0xd035
+ scall Script_FishCastRod
+ callasm Fishing_CheckFacingUp
+ iffalse .NotFacingUp
+ applymovement PLAYER, .Movement_FacingUp
+ jump .FightTheHookedPokemon
+
+.NotFacingUp: ; 0xd046
+ applymovement PLAYER, .Movement_NotFacingUp
+
+.FightTheHookedPokemon: ; 0xd04a
+ pause 40
+ applymovement PLAYER, .Movement_RestoreRod
+ writetext UnknownText_0xd0a4
+ callasm PutTheRodAway
+ closetext
+ randomwildmon
+ startbattle
+ reloadmapafterbattle
+ end
+
+.Movement_NotFacingUp: ; d05c
+ fish_got_bite
+ fish_got_bite
+ fish_got_bite
+ fish_got_bite
+ show_emote
+ step_end
+
+.Movement_FacingUp: ; d062
+ fish_got_bite
+ fish_got_bite
+ fish_got_bite
+ fish_got_bite
+ step_sleep_1
+ show_emote
+ step_end
+
+.Movement_RestoreRod: ; d069
+ hide_emote
+ fish_cast_rod
+ step_end
+
+Fishing_CheckFacingUp: ; d06c
+ ld a, [PlayerDirection]
+ and $c
+ cp OW_UP
+ ld a, $1
+ jr z, .up
+ xor a
+
+.up
+ ld [ScriptVar], a
+ ret
+
+Script_FishCastRod: ; 0xd07c
+ reloadmappart
+ loadvar hBGMapMode, $0
+ special UpdateTimePals
+ loademote EMOTE_ROD
+ callasm LoadFishingGFX
+ loademote EMOTE_SHOCK
+ applymovement PLAYER, MovementData_0xd093
+ pause 40
+ end
+
+MovementData_0xd093: ; d093
+ fish_cast_rod
+ step_end
+
+PutTheRodAway: ; d095
+ xor a
+ ld [hBGMapMode], a
+ ld a, $1
+ ld [PlayerAction], a
+ call UpdateSprites
+ call ReplaceKrisSprite
+ ret
+
+UnknownText_0xd0a4: ; 0xd0a4
+ ; Oh! A bite!
+ text_jump UnknownText_0x1c0958
+ db "@"
+
+UnknownText_0xd0a9: ; 0xd0a9
+ ; Not even a nibble!
+ text_jump UnknownText_0x1c0965
+ db "@"
+
+UnknownText_0xd0ae: ; unused
+ ; Looks like there's nothing here.
+ text_jump UnknownText_0x1c0979
+ db "@"
+
+BikeFunction: ; d0b3
+ call .TryBike
+ and $7f
+ ld [wFieldMoveSucceeded], a
+ ret
+
+.TryBike: ; d0bc
+ call .CheckEnvironment
+ jr c, .CannotUseBike
+ ld a, [PlayerState]
+ cp PLAYER_NORMAL
+ jr z, .GetOnBike
+ cp PLAYER_BIKE
+ jr z, .GetOffBike
+ jr .CannotUseBike
+
+.GetOnBike:
+ ld hl, Script_GetOnBike
+ ld de, Script_GetOnBike_Register
+ call .CheckIfRegistered
+ call QueueScript
+ xor a
+ ld [MusicFade], a
+ ld de, MUSIC_NONE
+ call PlayMusic
+ call DelayFrame
+ call MaxVolume
+ ld de, MUSIC_BICYCLE
+ ld a, e
+ ld [wMapMusic], a
+ call PlayMusic
+ ld a, $1
+ ret
+
+.GetOffBike:
+ ld hl, BikeFlags
+ bit 1, [hl]
+ jr nz, .CantGetOffBike
+ ld hl, Script_GetOffBike
+ ld de, Script_GetOffBike_Register
+ call .CheckIfRegistered
+ ld a, BANK(Script_GetOffBike)
+ jr .done
+
+.CantGetOffBike:
+ ld hl, Script_CantGetOffBike
+ jr .done
+
+.CannotUseBike:
+ ld a, $0
+ ret
+
+.done
+ call QueueScript
+ ld a, $1
+ ret
+
+.CheckIfRegistered: ; d119
+ ld a, [wUsingItemWithSelect]
+ and a
+ ret z
+ ld h, d
+ ld l, e
+ ret
+
+.CheckEnvironment: ; d121
+ call GetMapPermission
+ call CheckOutdoorMap
+ jr z, .ok
+ cp CAVE
+ jr z, .ok
+ cp GATE
+ jr z, .ok
+ jr .nope
+
+.ok
+ call GetPlayerStandingTile
+ and $f ; can't use our bike in a wall or on water
+ jr nz, .nope
+ xor a
+ ret
+
+.nope
+ scf
+ ret
+
+Script_GetOnBike: ; 0xd13e
+ reloadmappart
+ special UpdateTimePals
+ writecode VAR_MOVEMENT, PLAYER_BIKE
+ writetext GotOnTheBikeText
+ waitbutton
+ closetext
+ special ReplaceKrisSprite
+ end
+
+Script_GetOnBike_Register: ; 0xd14e
+ writecode VAR_MOVEMENT, PLAYER_BIKE
+ closetext
+ special ReplaceKrisSprite
+ end
+
+; XXX
+ nop
+ ret
+
+Script_GetOffBike: ; 0xd158
+ reloadmappart
+ special UpdateTimePals
+ writecode VAR_MOVEMENT, PLAYER_NORMAL
+ writetext GotOffTheBikeText
+ waitbutton
+
+FinishGettingOffBike:
+ closetext
+ special ReplaceKrisSprite
+ special PlayMapMusic
+ end
+
+Script_GetOffBike_Register: ; 0xd16b
+ writecode VAR_MOVEMENT, PLAYER_NORMAL
+ jump FinishGettingOffBike
+
+Script_CantGetOffBike: ; 0xd171
+ writetext .CantGetOffBikeText
+ waitbutton
+ closetext
+ end
+
+.CantGetOffBikeText: ; 0xd177
+ ; You can't get off here!
+ text_jump UnknownText_0x1c099a
+ db "@"
+
+GotOnTheBikeText: ; 0xd17c
+ ; got on the @ .
+ text_jump UnknownText_0x1c09b2
+ db "@"
+
+GotOffTheBikeText: ; 0xd181
+ ; got off the @ .
+ text_jump UnknownText_0x1c09c7
+ db "@"
+
+TryCutOW:: ; d186
+ ld d, CUT
+ call CheckPartyMove
+ jr c, .cant_cut
+
+ ld de, ENGINE_HIVEBADGE
+ call CheckEngineFlag
+ jr c, .cant_cut
+
+ ld a, BANK(AskCutScript)
+ ld hl, AskCutScript
+ call CallScript
+ scf
+ ret
+
+.cant_cut
+ ld a, BANK(CantCutScript)
+ ld hl, CantCutScript
+ call CallScript
+ scf
+ ret
+
+AskCutScript: ; 0xd1a9
+ opentext
+ writetext UnknownText_0xd1c8
+ yesorno
+ iffalse .script_d1b8
+ callasm .CheckMap
+ iftrue Script_Cut
+.script_d1b8
+ closetext
+ end
+
+.CheckMap: ; d1ba
+ xor a
+ ld [ScriptVar], a
+ call CheckMapForSomethingToCut
+ ret c
+ ld a, TRUE
+ ld [ScriptVar], a
+ ret
+
+UnknownText_0xd1c8: ; 0xd1c8
+ text_jump UnknownText_0x1c09dd
+ db "@"
+
+CantCutScript: ; 0xd1cd
+ jumptext UnknownText_0xd1d0
+
+UnknownText_0xd1d0: ; 0xd1d0
+ text_jump UnknownText_0x1c0a05
+ db "@"
--- a/event/poisonstep.asm
+++ b/event/poisonstep.asm
@@ -118,7 +118,7 @@
end
; 50677
-.whiteout: ; 50677
+.whiteout ; 50677
farjump Script_OverworldWhiteout
; 5067b
--- a/event/poke_seer.asm
+++ b/event/poke_seer.asm
@@ -163,6 +163,7 @@
call ByteFill
; caught level
+ ; Limited to between 1 and 63 for some reason.
ld a, [wSeerCaughtData]
and $3f
jr z, .unknown
@@ -247,7 +248,7 @@
and a
ret
-.Unknown
+.Unknown:
ld de, wSeerCaughtLocation
jp UnknownCaughtData
--- /dev/null
+++ b/event/special.asm
@@ -1,0 +1,231 @@
+SpecialGiveShuckle: ; 7305
+
+; Adding to the party.
+ xor a
+ ld [MonType], a
+
+; Level 15 Shuckle.
+ ld a, SHUCKLE
+ ld [CurPartySpecies], a
+ ld a, 15
+ ld [CurPartyLevel], a
+
+ predef TryAddMonToParty
+ jr nc, .NotGiven
+
+; Caught data.
+ ld b, 0
+ callba SetGiftPartyMonCaughtData
+
+; Holding a Berry.
+ ld bc, PARTYMON_STRUCT_LENGTH
+ ld a, [PartyCount]
+ dec a
+ push af
+ push bc
+ ld hl, PartyMon1Item
+ call AddNTimes
+ ld [hl], BERRY
+ pop bc
+ pop af
+
+; OT ID.
+ ld hl, PartyMon1ID
+ call AddNTimes
+ ld a, $2
+ ld [hli], a
+ ld [hl], $6
+
+; Nickname.
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMonNicknames
+ call SkipNames
+ ld de, SpecialShuckleNick
+ call CopyName2
+
+; OT.
+ ld a, [PartyCount]
+ dec a
+ ld hl, PartyMonOT
+ call SkipNames
+ ld de, SpecialShuckleOT
+ call CopyName2
+
+; Engine flag for this event.
+ ld hl, DailyFlags
+ set 5, [hl]
+; setflag ENGINE_SHUCKLE_GIVEN
+ ld a, 1
+ ld [ScriptVar], a
+ ret
+
+.NotGiven:
+ xor a
+ ld [ScriptVar], a
+ ret
+
+SpecialShuckleOT:
+ db "MANIA@"
+SpecialShuckleNick:
+ db "SHUCKIE@"
+
+SpecialReturnShuckle: ; 737e
+ callba SelectMonFromParty
+ jr c, .refused
+
+ ld a, [CurPartySpecies]
+ cp SHUCKLE
+ jr nz, .DontReturn
+
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1ID
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+
+; OT ID
+ ld a, [hli]
+ cp 00518 / $100
+ jr nz, .DontReturn
+ ld a, [hl]
+ cp 00518 % $100
+ jr nz, .DontReturn
+
+; OT
+ ld a, [CurPartyMon]
+ ld hl, PartyMonOT
+ call SkipNames
+ ld de, SpecialShuckleOT
+.CheckOT:
+ ld a, [de]
+ cp [hl]
+ jr nz, .DontReturn
+ cp "@"
+ jr z, .done
+ inc de
+ inc hl
+ jr .CheckOT
+
+.done
+ callba CheckCurPartyMonFainted
+ jr c, .fainted
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1Happiness
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ ld a, [hl]
+ cp 150
+ ld a, $3
+ jr nc, .HappyToStayWithYou
+ xor a ; take from pc
+ ld [wPokemonWithdrawDepositParameter], a
+ callab RemoveMonFromPartyOrBox
+ ld a, $2
+.HappyToStayWithYou:
+ ld [ScriptVar], a
+ ret
+
+.refused
+ ld a, $1
+ ld [ScriptVar], a
+ ret
+
+.DontReturn:
+ xor a
+ ld [ScriptVar], a
+ ret
+
+.fainted
+ ld a, $4
+ ld [ScriptVar], a
+ ret
+
+Special_BillsGrandfather: ; 73f7
+ callba SelectMonFromParty
+ jr c, .cancel
+ ld a, [CurPartySpecies]
+ ld [ScriptVar], a
+ ld [wNamedObjectIndexBuffer], a
+ call GetPokemonName
+ jp CopyPokemonName_Buffer1_Buffer3
+
+.cancel
+ xor a
+ ld [ScriptVar], a
+ ret
+
+Special_YoungerHaircutBrother: ; 7413
+ ld hl, Data_YoungerHaircutBrother
+ jr MassageOrHaircut
+
+Special_OlderHaircutBrother: ; 7418
+ ld hl, Data_OlderHaircutBrother
+ jr MassageOrHaircut
+
+Special_DaisyMassage: ; 741d
+ ld hl, Data_DaisyMassage
+
+MassageOrHaircut: ; 7420
+ push hl
+ callba SelectMonFromParty
+ pop hl
+ jr c, .nope
+ ld a, [CurPartySpecies]
+ cp EGG
+ jr z, .egg
+ push hl
+ call GetCurNick
+ call CopyPokemonName_Buffer1_Buffer3
+ pop hl
+ call Random
+; Bug: Subtracting $ff from $ff fails to set c.
+; This can result in overflow into the next data array.
+; In the case of getting a massage from Daisy, we bleed
+; into CopyPokemonName_Buffer1_Buffer3, which passes
+; $d0 to ChangeHappiness and returns $73 to the script.
+; The end result is that there is a 0.4% chance your
+; Pokemon's happiness will not change at all.
+.loop
+ sub [hl]
+ jr c, .ok
+rept 3
+ inc hl
+endr
+ jr .loop
+
+.ok
+ inc hl
+ ld a, [hli]
+ ld [ScriptVar], a
+ ld c, [hl]
+ call ChangeHappiness
+ ret
+
+.nope
+ xor a
+ ld [ScriptVar], a
+ ret
+
+.egg
+ ld a, 1
+ ld [ScriptVar], a
+ ret
+
+Data_YoungerHaircutBrother: ; 7459
+ db $4c, 2, HAPPINESS_YOUNGCUT1 ; 30% chance
+ db $80, 3, HAPPINESS_YOUNGCUT2 ; 20% chance
+ db $ff, 4, HAPPINESS_YOUNGCUT3 ; 50% chance
+
+Data_OlderHaircutBrother: ; 7462
+ db $9a, 2, HAPPINESS_OLDERCUT1 ; 60% chance
+ db $4c, 3, HAPPINESS_OLDERCUT2 ; 10% chance
+ db $ff, 4, HAPPINESS_OLDERCUT3 ; 30% chance
+
+Data_DaisyMassage: ; 746b
+ db $ff, 2, HAPPINESS_MASSAGE ; 99.6% chance
+
+CopyPokemonName_Buffer1_Buffer3: ; 746e
+ ld hl, StringBuffer1
+ ld de, StringBuffer3
+ ld bc, PKMN_NAME_LENGTH
+ jp CopyBytes
binary files a/gfx/fx/001.2bpp.lz /dev/null differ
binary files a/gfx/fx/002.2bpp.lz /dev/null differ
binary files a/gfx/fx/003.2bpp.lz /dev/null differ
binary files a/gfx/fx/004.2bpp.lz /dev/null differ
binary files a/gfx/fx/005.2bpp.lz /dev/null differ
--- a/gfx/fx/006.2bpp.lz
+++ /dev/null
@@ -1,3 +1,0 @@
-a<<~B��ߡ>�����
-<$xx��c >2��88i��~Bø}c}CC��➆�xx<$|D~B^b3=a��C e00PpC��
-=%}EC_c�����<�>��c����_aOq'83<e 79Nr���� )���`�@I@� 00<,.2/1'9a�� ,4\d���� ������
\ No newline at end of file
binary files a/gfx/fx/007.2bpp.lz /dev/null differ
binary files a/gfx/fx/008.2bpp.lz /dev/null differ
binary files a/gfx/fx/009.2bpp.lz /dev/null differ
binary files a/gfx/fx/010.2bpp.lz /dev/null differ
binary files a/gfx/fx/011.2bpp.lz /dev/null differ
binary files a/gfx/fx/012.2bpp.lz /dev/null differ
binary files a/gfx/fx/013.2bpp.lz /dev/null differ
binary files a/gfx/fx/014.2bpp.lz /dev/null differ
--- a/gfx/fx/015.2bpp.lz
+++ /dev/null
@@ -1,1 +1,0 @@
-@@��GEa8(@@��EG��Î
\ No newline at end of file
binary files a/gfx/fx/016.2bpp.lz /dev/null differ
binary files a/gfx/fx/017.2bpp.lz /dev/null differ
binary files a/gfx/fx/018.2bpp.lz /dev/null differ
binary files a/gfx/fx/019.2bpp.lz /dev/null differ
binary files a/gfx/fx/020.2bpp.lz /dev/null differ
binary files a/gfx/fx/021.2bpp.lz /dev/null differ
binary files a/gfx/fx/022.2bpp.lz /dev/null differ
binary files a/gfx/fx/023.2bpp.lz /dev/null differ
binary files a/gfx/fx/024.2bpp.lz /dev/null differ
binary files a/gfx/fx/025.2bpp.lz /dev/null differ
binary files a/gfx/fx/026.2bpp.lz /dev/null differ
binary files a/gfx/fx/027.2bpp.lz /dev/null differ
binary files a/gfx/fx/028.2bpp.lz /dev/null differ
binary files a/gfx/fx/029.2bpp.lz /dev/null differ
binary files a/gfx/fx/030.2bpp.lz /dev/null differ
binary files a/gfx/fx/031.2bpp.lz /dev/null differ
binary files a/gfx/fx/032.2bpp.lz /dev/null differ
binary files a/gfx/fx/033.2bpp.lz /dev/null differ
binary files a/gfx/fx/034.2bpp.lz /dev/null differ
binary files a/gfx/fx/035.2bpp.lz /dev/null differ
binary files a/gfx/fx/036.2bpp.lz /dev/null differ
binary files a/gfx/fx/037.2bpp.lz /dev/null differ
binary files a/gfx/fx/038.2bpp.lz /dev/null differ
binary files a/gfx/fx/039.2bpp.lz /dev/null differ
binary files /dev/null b/gfx/fx/aeroblast.2bpp.lz differ
binary files /dev/null b/gfx/fx/angels.2bpp.lz differ
binary files /dev/null b/gfx/fx/beam.2bpp.lz differ
binary files /dev/null b/gfx/fx/bubble.2bpp.lz differ
binary files /dev/null b/gfx/fx/charge.2bpp.lz differ
binary files /dev/null b/gfx/fx/cut.2bpp.lz differ
binary files /dev/null b/gfx/fx/egg.2bpp.lz differ
binary files /dev/null b/gfx/fx/explosion.2bpp.lz differ
binary files /dev/null b/gfx/fx/fire.2bpp.lz differ
binary files /dev/null b/gfx/fx/flower.2bpp.lz differ
binary files /dev/null b/gfx/fx/globe.2bpp.lz differ
binary files /dev/null b/gfx/fx/haze.2bpp.lz differ
binary files /dev/null b/gfx/fx/hit.2bpp.lz differ
binary files /dev/null b/gfx/fx/horn.2bpp.lz differ
binary files /dev/null b/gfx/fx/ice.2bpp.lz differ
binary files /dev/null b/gfx/fx/lightning.2bpp.lz differ
binary files /dev/null b/gfx/fx/misc.2bpp.lz differ
binary files /dev/null b/gfx/fx/noise.2bpp.lz differ
binary files /dev/null b/gfx/fx/objects.2bpp.lz differ
--- /dev/null
+++ b/gfx/fx/plant.2bpp.lz
@@ -1,0 +1,3 @@
+a<<~B��ߡ>�����
+<$xx��c >2��88i��~Bø}c}CC��➆�xx<$|D~B^b3=a��C e00PpC��
+=%}EC_c�����<�>��c����_aOq'83<e 79Nr���� )���`�@I@� 00<,.2/1'9a�� ,4\d���� ������
\ No newline at end of file
binary files /dev/null b/gfx/fx/poison.2bpp.lz differ
binary files /dev/null b/gfx/fx/pokeball.2bpp.lz differ
--- /dev/null
+++ b/gfx/fx/powder.2bpp.lz
@@ -1,0 +1,1 @@
+@@��GEa8(@@��EG��Î
\ No newline at end of file
binary files /dev/null b/gfx/fx/psychic.2bpp.lz differ
binary files /dev/null b/gfx/fx/reflect.2bpp.lz differ
binary files /dev/null b/gfx/fx/rocks.2bpp.lz differ
binary files /dev/null b/gfx/fx/rope.2bpp.lz differ
binary files /dev/null b/gfx/fx/sand.2bpp.lz differ
binary files /dev/null b/gfx/fx/shapes.2bpp.lz differ
binary files /dev/null b/gfx/fx/shine.2bpp.lz differ
binary files /dev/null b/gfx/fx/skyattack.2bpp.lz differ
binary files /dev/null b/gfx/fx/smoke.2bpp.lz differ
binary files /dev/null b/gfx/fx/speed.2bpp.lz differ
binary files /dev/null b/gfx/fx/status.2bpp.lz differ
binary files /dev/null b/gfx/fx/water.2bpp.lz differ
binary files /dev/null b/gfx/fx/wave.2bpp.lz differ
binary files /dev/null b/gfx/fx/web.2bpp.lz differ
binary files /dev/null b/gfx/fx/whip.2bpp.lz differ
binary files /dev/null b/gfx/fx/wind.2bpp.lz differ
--- a/gfx/load_pics.asm
+++ b/gfx/load_pics.asm
@@ -454,7 +454,7 @@
call .Fill
ret
-.Fill
+.Fill:
ld [hli], a
dec c
jr nz, .Fill
--- a/gfx/pics/pic_pointers.asm
+++ b/gfx/pics/pic_pointers.asm
@@ -399,11 +399,11 @@
add_pic SlowkingBackpic
add_pic MisdreavusFrontpic
add_pic MisdreavusBackpic
-
+
; Unown pics have their own table. See UnownPicPointers
dbw -1, -1
dbw -1, -1
-
+
add_pic WobbuffetFrontpic
add_pic WobbuffetBackpic
add_pic GirafarigFrontpic
--- a/home.asm
+++ b/home.asm
@@ -135,15 +135,15 @@
ld c, a
call GetWorldMapLocation
-.CheckRegion
+.CheckRegion:
cp KANTO_LANDMARK
jr nc, .Kanto
-.Johto
+.Johto:
xor a
ret
-.Kanto
+.Kanto:
ld a, 1
ret
; 2f3e
@@ -267,11 +267,11 @@
add hl, de
jr .loop
-.NotInArray
+.NotInArray:
and a
ret
-.InArray
+.InArray:
scf
ret
; 30f4
@@ -497,7 +497,7 @@
scf
ret
-.Diff
+.Diff:
and a
ret
; 31f3
@@ -560,7 +560,7 @@
ret
; 3238
-Function3238:: ; 3238
+CGBOnly_LoadEDTile:: ; 3238
ld a, [hCGB]
and a
jr z, WaitBGMap
@@ -574,7 +574,7 @@
ret
; 3246
-.LoadEDTile ; 3246
+.LoadEDTile: ; 3246
ld a, [hBGMapMode]
push af
xor a
@@ -613,7 +613,7 @@
ret
; 327b
-.StackPointerMagic ; 327b
+.StackPointerMagic: ; 327b
; Copy all tiles to VBGMap
ld [hSPBuffer], sp
ld sp, hl
@@ -668,7 +668,7 @@
ld [rOBP1], a
ret
-.SetPalettesForGameBoyColor
+.SetPalettesForGameBoyColor:
push de
ld a, %11100100
call DmgToCgbBGPals
@@ -828,7 +828,7 @@
ld d, h
jr .done
-.NotPokeName
+.NotPokeName:
ld a, [wNamedObjectTypeBuffer]
dec a
ld e, a
@@ -963,9 +963,9 @@
ld [wNamedObjectTypeBuffer], a
call GetName
jr .Copied
-.TM
+.TM:
call GetTMHMName
-.Copied
+.Copied:
ld de, StringBuffer1
pop bc
pop hl
@@ -990,7 +990,7 @@
ld bc, .HMTextEnd - .HMText
jr .asm_34a1
-.TM
+.TM:
ld hl, .TMText
ld bc, .TMTextEnd - .TMText
@@ -1044,14 +1044,14 @@
pop hl
ret
-.TMText
+.TMText:
db "TM"
-.TMTextEnd
+.TMTextEnd:
db "@"
-.HMText
+.HMText:
db "HM"
-.HMTextEnd
+.HMTextEnd:
db "@"
; 34df
@@ -1060,7 +1060,7 @@
jr c, .NotHM
scf
ret
-.NotHM
+.NotHM:
and a
ret
; 34e7
@@ -1070,7 +1070,7 @@
ld de, 1
jp IsInArray
-.HMMoves
+.HMMoves:
db CUT
db FLY
db SURF
@@ -1116,7 +1116,7 @@
ret
; 3524
-.UpdatePalettes ; 3524
+.UpdatePalettes: ; 3524
ld hl, VramState
bit 0, [hl]
jp nz, UpdateTimePals
@@ -1176,7 +1176,7 @@
ret
; 3574
-.WarpAction ; 3574
+.WarpAction: ; 3574
ld hl, OBJECT_MAP_OBJECT_INDEX
add hl, de
ld a, [hl]
@@ -1202,7 +1202,7 @@
ret
; 3599
-.IsPersonOnWarp ; 3599
+.IsPersonOnWarp: ; 3599
push de
ld hl, OBJECT_NEXT_MAP_X
@@ -1269,7 +1269,7 @@
ret
; 35de
-.IsObjectInStoneTable ; 35de
+.IsObjectInStoneTable: ; 35de
inc e
ld hl, CMDQUEUE_ADDR
add hl, bc
@@ -1473,7 +1473,7 @@
and a
ret
-.CheckY
+.CheckY:
ld a, [PlayerStandingMapY]
sub e
jr z, .NotFacing
@@ -1486,12 +1486,12 @@
ld e, OW_UP
jr .CheckFacing
-.Above
+.Above:
ld d, a
ld e, OW_DOWN
jr .CheckFacing
-.CheckX
+.CheckX:
ld a, [PlayerStandingMapX]
sub d
jr z, .NotFacing
@@ -1504,11 +1504,11 @@
ld e, OW_LEFT
jr .CheckFacing
-.Left
+.Left:
ld d, a
ld e, OW_RIGHT
-.CheckFacing
+.CheckFacing:
call GetSpriteDirection
cp e
jr nz, .NotFacing
@@ -1515,7 +1515,7 @@
scf
ret
-.NotFacing
+.NotFacing:
and a
ret
; 36f5
@@ -1581,11 +1581,11 @@
cp NUM_POKEMON + 1
jr c, .Pokemon
-.NotAPokemon
+.NotAPokemon:
scf
ret
-.Pokemon
+.Pokemon:
and a
ret
; 3750
--- a/home/audio.asm
+++ b/home/audio.asm
@@ -185,7 +185,7 @@
pop af
ld [hROMBank], a
ld [MBC3RomBank], a
-
+
pop af
pop bc
pop de
@@ -247,7 +247,7 @@
; infinite loop until sfx is done playing
push hl
-
+
.wait
ld hl, Channel5Flags
bit 0, [hl]
@@ -261,7 +261,7 @@
ld hl, Channel8Flags
bit 0, [hl]
jr nz, .wait
-
+
pop hl
ret
; 3c74
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -167,7 +167,7 @@
and a
jr z, .getvar
inc hl
-
+
.getvar
; var id
ld a, [hl]
@@ -182,9 +182,9 @@
ld a, [hli]
ld h, [hl]
ld l, a
-
+
ld a, [hl]
-
+
pop bc
ret
--- a/home/copy.asm
+++ b/home/copy.asm
@@ -246,7 +246,7 @@
ld a, $6
ld [hTilesPerCycle], a
-.NotMobile
+.NotMobile:
ld a, e
ld [Requested2bppSource], a
ld a, d
@@ -322,7 +322,7 @@
ld a, $6
ld [hTilesPerCycle], a
-.NotMobile
+.NotMobile:
ld a, e
ld [Requested1bppSource], a
ld a, d
--- a/home/copy2.asm
+++ b/home/copy2.asm
@@ -3,11 +3,11 @@
inc b ; we bail the moment b hits 0, so include the last run
inc c ; same thing; include last byte
jr .HandleLoop
-.CopyByte
+.CopyByte:
ld a, [hli]
ld [de], a
inc de
-.HandleLoop
+.HandleLoop:
dec c
jr nz, .CopyByte
dec b
@@ -16,7 +16,7 @@
SwapBytes:: ; 0x3034
; swap bc bytes between hl and de
-.Loop
+.Loop:
; stash [hl] away on the stack
ld a, [hl]
push af
@@ -42,9 +42,9 @@
inc b ; we bail the moment b hits 0, so include the last run
inc c ; same thing; include last byte
jr .HandleLoop
-.PutByte
+.PutByte:
ld [hli], a
-.HandleLoop
+.HandleLoop:
dec c
jr nz, .PutByte
dec b
--- a/home/decompress.asm
+++ b/home/decompress.asm
@@ -79,7 +79,7 @@
ld a, d
ld [wLZAddress + 1], a
-.Main
+.Main:
ld a, [hl]
cp LZ_END
ret z
@@ -145,7 +145,7 @@
jr z, .Zero
-.Literal
+.Literal:
; Read literal data for bc bytes.
.lloop
dec c
@@ -160,7 +160,7 @@
jr .lloop
-.Iter
+.Iter:
; Write the same byte for bc bytes.
ld a, [hli]
@@ -176,7 +176,7 @@
jr .iloop
-.Alt
+.Alt:
; Alternate two bytes for bc bytes.
dec c
jr nz, .anext1
@@ -206,7 +206,7 @@
jr .Main
-.Zero
+.Zero:
; Write 0 for bc bytes.
xor a
@@ -276,7 +276,7 @@
; For now, it defaults to LZ_REPEAT.
-.Repeat
+.Repeat:
; Copy decompressed data for bc bytes.
dec c
jr nz, .rnext
@@ -290,7 +290,7 @@
jr .Repeat
-.Flip
+.Flip:
; Copy bitflipped decompressed data for bc bytes.
dec c
jr nz, .fnext
@@ -316,7 +316,7 @@
jr .Flip
-.Reverse
+.Reverse:
; Copy reversed decompressed data for bc bytes.
dec c
jr nz, .rvnext
--- a/home/farcall.asm
+++ b/home/farcall.asm
@@ -31,17 +31,17 @@
ReturnFarCall:: ; 2d6e
; We want to retain the contents of f.
; To do this, we can pop to bc instead of af.
-
+
ld a, b
ld [wFarCallBCBuffer], a
ld a, c
ld [wFarCallBCBuffer + 1], a
-
+
; Restore the working bank.
pop bc
ld a, b
rst Bankswitch
-
+
ld a, [wFarCallBCBuffer]
ld b, a
ld a, [wFarCallBCBuffer + 1]
--- a/home/handshake.asm
+++ b/home/handshake.asm
@@ -16,11 +16,11 @@
ld a, [wc2d4]
bit 0, a
ret z
-
+
ld a, [wc2d5]
and a
ret nz
-
+
; once every 6 frames
ld hl, wca8a
inc [hl]
@@ -27,24 +27,24 @@
ld a, [hl]
cp 6
ret c
-
+
xor a
ld [hl], a
-
+
ld a, $c
ld [wc2d5], a
-
+
; handshake
ld a, $88
ld [rSB], a
-
+
; switch to internal clock
ld a, %00000001
ld [rSC], a
-
+
; start transfer
ld a, %10000001
ld [rSC], a
-
+
ret
; 208a
--- a/home/init.asm
+++ b/home/init.asm
@@ -71,7 +71,7 @@
; Clear WRAM bank 0
ld hl, wc000
ld bc, wd000 - wc000
-.ByteFill
+.ByteFill:
ld [hl], 0
inc hl
dec bc
--- a/home/joypad.asm
+++ b/home/joypad.asm
@@ -31,12 +31,12 @@
ld a, [wcfbe]
and %11010000
ret nz
-
+
; If we're saving, input is disabled.
ld a, [wc2cd]
and a
ret nz
-
+
; We can only get four inputs at a time.
; We take d-pad first for no particular reason.
ld a, R_DPAD
@@ -45,16 +45,16 @@
rept 2
ld a, [rJOYP]
endr
-
+
; The Joypad register output is in the lo nybble (inversed).
; We make the hi nybble of our new container d-pad input.
cpl
and $f
swap a
-
+
; We'll keep this in b for now.
ld b, a
-
+
; Buttons make 8 total inputs (A, B, Select, Start).
; We can fit this into one byte.
ld a, R_BUTTONS
@@ -68,11 +68,11 @@
and $f
or b
ld b, a
-
+
; Reset the joypad register since we're done with it.
ld a, $30
ld [rJOYP], a
-
+
; To get the delta we xor the last frame's input with the new one.
ld a, [hJoypadDown] ; last frame
ld e, a
@@ -85,17 +85,17 @@
ld a, d
and b
ld [hJoypadPressed], a
-
+
; Add any new presses to the list of collective presses:
ld c, a
ld a, [hJoypadSum]
or c
ld [hJoypadSum], a
-
+
; Currently pressed:
ld a, b
ld [hJoypadDown], a
-
+
; Now that we have the input, we can do stuff with it.
; For example, soft reset:
@@ -102,7 +102,7 @@
and A_BUTTON | B_BUTTON | SELECT | START
cp A_BUTTON | B_BUTTON | SELECT | START
jp z, Reset
-
+
ret
; 984
@@ -127,7 +127,7 @@
push hl
push de
push bc
-
+
; The player input can be automated using an input stream.
; See more below.
ld a, [InputType]
@@ -139,31 +139,31 @@
ld b, a
ld a, [hJoyDown] ; last frame mirror
ld e, a
-
+
; Released this frame:
xor b
ld d, a
and e
ld [hJoyReleased], a
-
+
; Pressed this frame:
ld a, d
and b
ld [hJoyPressed], a
-
+
; It looks like the collective presses got commented out here.
ld c, a
-
+
; Currently pressed:
ld a, b
ld [hJoyDown], a ; frame input
-
+
.quit
pop bc
pop de
pop hl
pop af
- ret
+ ret
.auto
; Use a predetermined input stream (used in the catching tutorial).
@@ -176,17 +176,17 @@
push af
ld a, [AutoInputBank]
rst Bankswitch
-
+
ld hl, AutoInputAddress
ld a, [hli]
ld h, [hl]
ld l, a
-
+
; We only update when the input duration has expired.
ld a, [AutoInputLength]
and a
jr z, .updateauto
-
+
; Until then, don't change anything.
dec a
ld [AutoInputLength], a
@@ -193,8 +193,8 @@
pop af
rst Bankswitch
jr .quit
-
-
+
+
.updateauto
; An input of $ff will end the stream.
ld a, [hli]
@@ -201,13 +201,13 @@
cp a, -1
jr z, .stopauto
ld b, a
-
+
; A duration of $ff will end the stream indefinitely.
ld a, [hli]
ld [AutoInputLength], a
cp a, -1
jr nz, .next
-
+
; The current input is overwritten.
rept 2
dec hl
@@ -214,7 +214,7 @@
endr
ld b, NO_INPUT
jr .finishauto
-
+
.next
; On to the next input...
ld a, l
@@ -222,11 +222,11 @@
ld a, h
ld [AutoInputAddress+1], a
jr .finishauto
-
+
.stopauto
call StopAutoInput
ld b, NO_INPUT
-
+
.finishauto
pop af
rst Bankswitch
@@ -239,7 +239,7 @@
StartAutoInput:: ; 9ee
; Start reading automated input stream at a:hl.
-
+
ld [AutoInputBank], a
ld a, l
ld [AutoInputAddress], a
@@ -253,7 +253,7 @@
ld [hJoyPressed], a ; pressed this frame
ld [hJoyReleased], a ; released this frame
ld [hJoyDown], a ; currently pressed
-
+
ld a, AUTO_INPUT
ld [InputType], a
ret
@@ -408,7 +408,7 @@
jp DelayFrames
; ac6
-.wait_input: ; ac6
+.wait_input ; ac6
ld a, [hOAMUpdate]
push af
ld a, $1
@@ -436,7 +436,7 @@
ret
; af5
-.blink_cursor: ; af5
+.blink_cursor ; af5
ld a, [hVBlankCounter]
and %00010000 ; bit 4, a
jr z, .cursor_off
--- a/home/lcd.asm
+++ b/home/lcd.asm
@@ -50,7 +50,7 @@
ld [rIF], a
ld a, [rIE]
ld b, a
-
+
; Disable VBlank
res 0, a ; vblank
ld [rIE], a
--- a/home/map.asm
+++ b/home/map.asm
@@ -255,7 +255,7 @@
ret
; 2266
-.GetDestinationWarpNumber ; 2266
+.GetDestinationWarpNumber: ; 2266
ld a, [PlayerStandingMapY]
sub $4
ld e, a
@@ -307,7 +307,7 @@
scf
ret
-.IncreaseHLTwice
+.IncreaseHLTwice:
inc hl
inc hl
scf
@@ -327,7 +327,7 @@
ret
; 22b4
-.CopyWarpData ; 22b4
+.CopyWarpData: ; 22b4
push bc
ld hl, wCurrMapWarpHeaderPointer
ld a, [hli]
@@ -815,7 +815,7 @@
ld [hConnectedMapWidth], a
call FillNorthConnectionStrip
-.South
+.South:
ld a, [SouthConnectedMapGroup]
cp $ff
jr z, .West
@@ -838,7 +838,7 @@
ld [hConnectedMapWidth], a
call FillSouthConnectionStrip
-.West
+.West:
ld a, [WestConnectedMapGroup]
cp $ff
jr z, .East
@@ -861,7 +861,7 @@
ld [hConnectionStripLength], a
call FillWestConnectionStrip
-.East
+.East:
ld a, [EastConnectedMapGroup]
cp $ff
jr z, .Done
@@ -884,7 +884,7 @@
ld [hConnectionStripLength], a
call FillEastConnectionStrip
-.Done
+.Done:
ret
; 25d3
@@ -1592,11 +1592,18 @@
ret
; 2945
-.MovementPermissionsData ; 2945
- db 1, 2, 4, 8, 9, 10, 5, 6
+.MovementPermissionsData: ; 2945
+ db 1 << DOWN
+ db 1 << UP
+ db 1 << LEFT
+ db 1 << RIGHT
+ db (1 << DOWN) | (1 << RIGHT)
+ db (1 << UP) | (1 << RIGHT)
+ db (1 << DOWN) | (1 << LEFT)
+ db (1 << UP) | (1 << LEFT)
; 294d
-.UpDown
+.UpDown:
ld a, [PlayerStandingMapX]
ld d, a
ld a, [PlayerStandingMapY]
@@ -1616,7 +1623,7 @@
ret
; 296c
-.LeftRight
+.LeftRight:
ld a, [PlayerStandingMapX]
ld d, a
ld a, [PlayerStandingMapY]
@@ -1636,7 +1643,7 @@
ret
; 298b
-.Down
+.Down:
call .CheckHiNybble
ret nz
ld a, [TileDown]
@@ -1655,7 +1662,7 @@
ret
; 29a8
-.Up
+.Up:
call .CheckHiNybble
ret nz
ld a, [TileUp]
@@ -1674,7 +1681,7 @@
ret
; 29c5
-.Right
+.Right:
call .CheckHiNybble
ret nz
ld a, [TileRight]
@@ -1693,7 +1700,7 @@
ret
; 29e2
-.Left
+.Left:
call .CheckHiNybble
ret nz
ld a, [TileLeft]
@@ -1712,7 +1719,7 @@
ret
; 29ff
-.CheckHiNybble
+.CheckHiNybble:
and $f0
cp $b0
ret z
@@ -1753,7 +1760,7 @@
ld a, [hl]
ret
-.Directions
+.Directions:
; x, y
db 0, 1
dw TileDown
@@ -1805,7 +1812,7 @@
add 6
ld c, a
ld b, 0
- ld hl, wc801
+ ld hl, OverworldMap + 1
add hl, bc
ld a, e
srl a
@@ -1912,7 +1919,7 @@
rst Bankswitch
ret
-.TriggerCheck
+.TriggerCheck:
; Checks to see if you are standing on an xy-trigger. If yes, copies the trigger to EngineBuffer1 and sets carry.
ld hl, wCurrentMapXYTriggerHeaderPointer
ld a, [hli]
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -276,7 +276,7 @@
and a
ret
-.TimeOfDayValues_191e
+.TimeOfDayValues_191e:
db 1 << MORN ; 1
db 1 << DAY ; 2
db 1 << NITE ; 4
@@ -351,7 +351,7 @@
callba DeleteMapObject
ret
-.CheckStopFollow
+.CheckStopFollow:
ld hl, wObjectFollow_Leader
cp [hl]
jr z, .ok
@@ -530,7 +530,7 @@
ret
; 1a71
-.CopyData ; 1a71
+.CopyData: ; 1a71
ld hl, OBJECT_MOVEMENTTYPE
add hl, de
ld [hl], a
--- a/home/menu.asm
+++ b/home/menu.asm
@@ -39,7 +39,7 @@
ret
; 1d5f
-.MenuDataHeader ; 1d5f
+.MenuDataHeader: ; 1d5f
db $40 ; tile backup
db 12, 0 ; start coords
db 17, 19 ; end coords
@@ -59,7 +59,7 @@
ret
; 1d75
-.MenuDataHeader ; 1d75
+.MenuDataHeader: ; 1d75
db $40 ; tile backup
db 0, 0 ; start coords
db 17, 19 ; end coords
@@ -190,7 +190,7 @@
db 1 ; default option
; 1e25
-.MenuData2 ; 1e25
+.MenuData2: ; 1e25
db $c0 ; flags
db 2
db "YES@"
@@ -232,7 +232,7 @@
call MenuFunc_1e7f
call MenuWriteText
call Function1eff
- call Function1f23
+ call GetStaticMenuJoypad
call GetMenuJoypad
call MenuClickSound
ret
@@ -360,20 +360,20 @@
; 1f1a
-Function1f1a:: ; 1f1a
+GetScrollingMenuJoypad:: ; 1f1a
call ScrollingMenuJoypad
ld hl, wMenuJoypadFilter
and [hl]
- jr Function1f2a
+ jr ContinueGettingMenuJoypad
; 1f23
-Function1f23:: ; 1f23
+GetStaticMenuJoypad:: ; 1f23
xor a
ld [wMenuJoypad], a
call StaticMenuJoypad
; 1f2a
-Function1f2a:: ; 1f2a
+ContinueGettingMenuJoypad:
bit A_BUTTON_F, a
jr nz, .a_button
bit B_BUTTON_F, a
@@ -516,7 +516,7 @@
ret
; 1ff0
-.bytefill: ; 1ff0
+.bytefill ; 1ff0
ld bc, $0010
xor a
call ByteFill
--- a/home/mobile.asm
+++ b/home/mobile.asm
@@ -221,7 +221,7 @@
push bc
call .FillTop
pop bc
-.RowLoop
+.RowLoop:
push bc
call .FillMiddle
pop bc
@@ -231,28 +231,28 @@
ret
; 3f58
-.FillTop
+.FillTop:
ld a, $63
ld d, $62
ld e, $64
jr .FillRow
-.FillBottom
+.FillBottom:
ld a, $68
ld d, $67
ld e, $69
jr .FillRow
-.FillMiddle
+.FillMiddle:
ld a, $7f
ld d, $65
ld e, $66
-.FillRow
+.FillRow:
push hl
ld [hl], d
inc hl
-.FillLoop
+.FillLoop:
ld [hli], a
dec c
jr nz, .FillLoop
--- a/home/movement.asm
+++ b/home/movement.asm
@@ -4,9 +4,9 @@
ld [wMovementBufferCount], a
ld a, $0 ; useless
ld [wd004], a
- ld a, $7
+ ld a, MovementBuffer % $100
ld [wd005], a
- ld a, $d0
+ ld a, MovementBuffer / $100
ld [wd006], a
ret
; 1b35
@@ -121,7 +121,7 @@
ret
; 1ba5
-.MovementData
+.MovementData:
slow_step_down
slow_step_up
slow_step_left
--- a/home/palettes.asm
+++ b/home/palettes.asm
@@ -42,9 +42,9 @@
dec b
jr nz, .bgp
-
+
; hl is now 5:d0c0 OBPals
-
+
; copy 8 pals to obpd
ld a, %10000000 ; auto increment, index 0
ld [rOBPI], a
@@ -58,7 +58,7 @@
dec b
jr nz, .obp
-
+
pop af
ld [rSVBK], a
@@ -127,7 +127,7 @@
ld [rOBP0], a
ld a, d
ld [rOBP1], a
-
+
ld a, [hCGB]
and a
ret z
@@ -250,7 +250,7 @@
.loop
push de
push hl
-
+
; get pal color
ld a, b
and %11 ; color
@@ -262,7 +262,7 @@
ld e, [hl]
inc hl
ld d, [hl]
-
+
; dest
pop hl
; write color
@@ -278,7 +278,7 @@
; done pal?
dec c
jr nz, .loop
-
+
; de += 8 (next pal)
ld a, 1 palettes ; NUM_PAL_COLORS * 2 ; bytes per pal
add e
@@ -286,7 +286,7 @@
inc d
.ok
ld e, a
-
+
; how many more pals?
pop bc
dec c
--- a/home/predef.asm
+++ b/home/predef.asm
@@ -18,7 +18,7 @@
ld hl, .Return
push hl
-
+
; Call the Predef function
ld a, [PredefAddress]
ld h, a
@@ -33,7 +33,7 @@
ld l, a
ret
-.Return
+.Return:
; Clean up after the Predef call
ld a, h
--- a/home/rtc.asm
+++ b/home/rtc.asm
@@ -5,9 +5,9 @@
ld a, [wSpriteUpdatesEnabled]
cp 0
ret z
-
+
call UpdateTime
-
+
; obj update on?
ld a, [VramState]
bit 0, a ; obj update
--- a/home/serial.asm
+++ b/home/serial.asm
@@ -366,7 +366,7 @@
ret
; 8f3
-.Receive ; 8f3
+.Receive: ; 8f3
ld a, [hSerialReceive]
ld [wOtherPlayerLinkMode], a
and $f0
--- a/home/text.asm
+++ b/home/text.asm
@@ -41,7 +41,7 @@
ld a, " "
ld bc, TileMapEnd - TileMap
call ByteFill
-
+
; Update the BG Map.
ld a, [rLCDC]
bit 7, a
@@ -1153,7 +1153,7 @@
pop hl
ret
-.Days ; 15a2
+.Days: ; 15a2
dw .Sun
dw .Mon
dw .Tues
@@ -1162,12 +1162,12 @@
dw .Fri
dw .Satur
-.Sun db "SUN@"
-.Mon db "MON@"
-.Tues db "TUES@"
-.Wednes db "WEDNES@"
-.Thurs db "THURS@"
-.Fri db "FRI@"
-.Satur db "SATUR@"
-.Day db "DAY@"
+.Sun: db "SUN@"
+.Mon: db "MON@"
+.Tues: db "TUES@"
+.Wednes: db "WEDNES@"
+.Thurs: db "THURS@"
+.Fri: db "FRI@"
+.Satur: db "SATUR@"
+.Day: db "DAY@"
; 15d8
--- a/home/tilemap.asm
+++ b/home/tilemap.asm
@@ -29,7 +29,7 @@
ret
; 0x1c30
-.copy: ; 0x1c30
+.copy ; 0x1c30
call GetMenuBoxDims
inc b
inc c
--- a/home/time.asm
+++ b/home/time.asm
@@ -86,7 +86,7 @@
; reset dh (bit 8)
res 0, a
ld [hRTCDayHi], a ; DH
-
+
; mod 140
; mod twice since bit 8 (DH) was set
ld a, [hRTCDayLo] ; DL
@@ -97,7 +97,7 @@
sub 140
jr nc, .modl
add 140
-
+
; update dl
ld [hRTCDayLo], a ; DL
@@ -110,19 +110,19 @@
ld a, [hRTCDayLo] ; DL
cp 140
jr c, .quit
-
+
; mod 140
.mod
sub 140
jr nc, .mod
add 140
-
+
; update dl
ld [hRTCDayLo], a ; DL
-
+
; flag for sRTCStatusFlags
ld a, %00100000
-
+
.set
; update clock with modded day value
push af
@@ -130,7 +130,7 @@
pop af
scf
ret
-
+
.quit
xor a
ret
@@ -152,7 +152,7 @@
add 60
.updatesec
ld [hSeconds], a
-
+
; minute
ccf ; carry is set, so turn it off
ld a, [hRTCMinutes] ; M
@@ -164,7 +164,7 @@
add 60
.updatemin
ld [hMinutes], a
-
+
; hour
ccf ; carry is set, so turn it off
ld a, [hRTCHours] ; H
@@ -176,7 +176,7 @@
add 24
.updatehr
ld [hHours], a
-
+
; day
ccf ; carry is set, so turn it off
ld a, [hRTCDayLo] ; DL
@@ -217,7 +217,7 @@
ret
; 685
-.ClearhRTC ; 685
+.ClearhRTC: ; 685
xor a
ld [hRTCSeconds], a
ld [hRTCMinutes], a
@@ -234,7 +234,7 @@
; enable clock r/w
ld a, SRAM_ENABLE
ld [MBC3SRamEnable], a
-
+
; set clock data
; stored 'backwards' in hram
@@ -241,7 +241,7 @@
call LatchClock
ld hl, MBC3SRamBank
ld de, MBC3RTC
-
+
; seems to be a halt check that got partially commented out
; this block is totally pointless
ld [hl], RTC_DH
@@ -248,7 +248,7 @@
ld a, [de]
bit 6, a ; halt
ld [de], a
-
+
; seconds
ld [hl], RTC_S
ld a, [hRTCSeconds]
@@ -270,7 +270,7 @@
ld a, [hRTCDayHi]
res 6, a ; make sure timer is active
ld [de], a
-
+
; cleanup
call CloseSRAM ; unlatch clock, disable clock r/w
ret
--- a/home/vblank.asm
+++ b/home/vblank.asm
@@ -37,7 +37,7 @@
reti
; 2a1
-.VBlanks ; 2a1
+.VBlanks: ; 2a1
dw VBlank0
dw VBlank1
dw VBlank2
--- a/home/video.asm
+++ b/home/video.asm
@@ -164,7 +164,7 @@
ret
-.Attr
+.Attr:
ld a, 1
ld [rVBK], a
@@ -176,13 +176,13 @@
ret
-.Tiles
+.Tiles:
hlcoord 0, 0
.update
ld [hSPBuffer], sp
-
+
; Which third?
ld a, [hBGMapThird]
and a ; 0
@@ -306,13 +306,13 @@
ld h, [hl]
ld l, a
ld sp, hl
-
+
; Destination
ld hl, Requested1bppDest
ld a, [hli]
ld h, [hl]
ld l, a
-
+
; # tiles to copy
ld a, [Requested1bpp]
ld b, a
@@ -389,7 +389,7 @@
; Copy [Requested2bpp] 2bpp tiles from [Requested2bppSource] to [Requested2bppDest]
ld [hSPBuffer], sp
-
+
; Source
ld hl, Requested2bppSource
ld a, [hli]
@@ -396,13 +396,13 @@
ld h, [hl]
ld l, a
ld sp, hl
-
+
; Destination
ld hl, Requested2bppDest
ld a, [hli]
ld h, [hl]
ld l, a
-
+
; # tiles to copy
ld a, [Requested2bpp]
ld b, a
@@ -409,7 +409,7 @@
xor a
ld [Requested2bpp], a
-
+
.next
rept 7
@@ -451,7 +451,7 @@
ld a, [hMapAnims]
and a
ret z
-
+
; Back out if we're too far into VBlank
ld a, [rLY]
cp 144
--- a/home/window.asm
+++ b/home/window.asm
@@ -31,7 +31,7 @@
ret
; 2de2
-.CloseText ; 2de2
+.CloseText: ; 2de2
call ClearWindowData
xor a
ld [hBGMapMode], a
--- a/items/item_effects.asm
+++ b/items/item_effects.asm
@@ -338,11 +338,13 @@
; catch rate than BRN/PSN/PAR, which in turn provide a higher catch rate than
; no status effect at all. But instead, it makes BRN/PSN/PAR provide no
; benefit.
+; Uncomment the line below to fix this.
ld b, a
ld a, [EnemyMonStatus]
and 1 << FRZ | SLP
ld c, 10
jr nz, .addstatus
+ ; ld a, [EnemyMonStatus]
and a
ld c, 5
jr nz, .addstatus
@@ -502,7 +504,7 @@
ld de, EnemyMonPP
ld bc, NUM_MOVES
call CopyBytes
-.Transformed
+.Transformed:
ld a, [EnemyMonSpecies]
ld [wWildMon], a
@@ -578,7 +580,7 @@
ld a, FRIEND_BALL_HAPPINESS
ld [hl], a
-.SkipPartyMonFriendBall
+.SkipPartyMonFriendBall:
ld hl, Text_AskNicknameNewlyCaughtMon
call PrintText
@@ -615,7 +617,7 @@
jp .return_from_capture
-.SendToPC
+.SendToPC:
call ClearSprites
predef SentPkmnIntoBox
@@ -630,7 +632,7 @@
jr nz, .BoxNotFullYet
ld hl, wBattleResult
set 7, [hl]
-.BoxNotFullYet
+.BoxNotFullYet:
ld a, [CurItem]
cp FRIEND_BALL
jr nz, .SkipBoxMonFriendBall
@@ -637,7 +639,7 @@
; Bug: overwrites the happiness of the first mon in the box!
ld a, FRIEND_BALL_HAPPINESS
ld [sBoxMon1Happiness], a
-.SkipBoxMonFriendBall
+.SkipBoxMonFriendBall:
call CloseSRAM
ld hl, Text_AskNicknameNewlyCaughtMon
@@ -672,7 +674,7 @@
call CloseSRAM
-.SkipBoxMonNickname
+.SkipBoxMonNickname:
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
@@ -694,7 +696,7 @@
callba BugContest_SetCaughtContestMon
jr .return_from_capture
-.FinishTutorial
+.FinishTutorial:
ld hl, Text_GotchaMonWasCaught
.shake_and_break_free
@@ -780,7 +782,7 @@
pop hl
ret
-.PokedexEntryBanks
+.PokedexEntryBanks:
GLOBAL PokedexEntries1
GLOBAL PokedexEntries2
@@ -809,7 +811,7 @@
ld a, BANK(PokedexDataPointerTable)
call GetFarHalfword
-.SkipText
+.SkipText:
call GetPokedexEntryBank
call GetFarByte
inc hl
@@ -888,7 +890,7 @@
ld b, $1
ret
-.WeightsTable
+.WeightsTable:
; weight factor, boost
db 2048 >> 8, 0
db 3072 >> 8, 20
@@ -1215,10 +1217,10 @@
jp UseDisposableItem
-.NoEffect
+.NoEffect:
call WontHaveAnyEffectMessage
-.DecidedNotToUse
+.DecidedNotToUse:
xor a
ld [wItemEffectSucceeded], a
ret
@@ -1594,7 +1596,7 @@
ret
; f071 (3:7071)
-.healingactions: ; f071
+.healingactions ; f071
; item, party menu action text, status
db ANTIDOTE, PARTYMENUTEXT_HEAL_PSN, 1 << PSN
db BURN_HEAL, PARTYMENUTEXT_HEAL_BRN, 1 << BRN
@@ -1618,7 +1620,7 @@
rst JumpTable
ret
-.dw: ; f0a3 (3:70a3)
+.dw ; f0a3 (3:70a3)
dw StatusHealer_ClearPalettes
dw StatusHealer_NoEffect
dw StatusHealer_ExitMenu
@@ -1715,7 +1717,7 @@
jp FullyHealStatus
-.NotAtFullHealth
+.NotAtFullHealth:
call .FullRestore
jp StatusHealer_Jumptable
; f144
@@ -2130,7 +2132,7 @@
endr
jr .next
-.NotFound
+.NotFound:
scf
.done
ld e, [hl]
@@ -2358,7 +2360,7 @@
ret
; f504
-.x_item_table: ; f504
+.x_item_table ; f504
db X_ATTACK, ATTACK
db X_DEFEND, DEFENSE
db X_SPEED, SPEED
@@ -2411,7 +2413,7 @@
jp PrintText
-.CureSleep
+.CureSleep:
ld de, PARTYMON_STRUCT_LENGTH
ld c, PARTY_LENGTH
@@ -2579,7 +2581,7 @@
cp 3 << 6 ; have 3 PP Ups already been used?
jr c, .do_ppup
-.CantUsePPUpOnSketch
+.CantUsePPUpOnSketch:
.pp_is_maxed_out
ld hl, TextJump_PPIsMaxedOut
call PrintText
@@ -2622,7 +2624,7 @@
call PrintText
jr FinishPPRestore
-.UpdateBattleMonPP
+.UpdateBattleMonPP:
ld a, [CurPartyMon]
ld hl, PartyMon1Moves
ld bc, PARTYMON_STRUCT_LENGTH
@@ -2826,7 +2828,7 @@
jp UseDisposableItem
; f778
-.text: ; 0xf778
+.text ; 0xf778
; There was a trophy inside!
text_jump UnknownText_0x1c5d03
db "@"
@@ -3182,7 +3184,7 @@
dec c
jr nz, .loop
-.NoPPUp
+.NoPPUp:
ld [hl], b
pop bc
ret
@@ -3315,3 +3317,5 @@
add hl, bc
ret
; f971
+
+INCLUDE "items/pokeball_wobble.asm"
--- /dev/null
+++ b/items/pokeball_wobble.asm
@@ -1,0 +1,88 @@
+GetPokeBallWobble: ; f971 (3:7971)
+; Returns whether a Poke Ball will wobble in the catch animation.
+; Whether a Pokemon is caught is determined beforehand.
+
+ push de
+
+ ld a, [rSVBK]
+ ld d, a
+ push de
+
+ ld a, 1 ; BANK(Buffer2)
+ ld [rSVBK], a
+
+ ld a, [Buffer2]
+ inc a
+ ld [Buffer2], a
+
+; Wobble up to 3 times.
+ cp 3 + 1
+ jr z, .finished
+
+ ld a, [wWildMon]
+ and a
+ ld c, 0 ; next
+ jr nz, .done
+
+ ld hl, .WobbleProbabilities
+ ld a, [Buffer1]
+ ld b, a
+.loop
+ ld a, [hli]
+ cp b
+ jr nc, .checkwobble
+ inc hl
+ jr .loop
+
+.checkwobble
+ ld b, [hl]
+ call Random
+ cp b
+ ld c, 0 ; next
+ jr c, .done
+ ld c, 2 ; escaped
+ jr .done
+
+.finished
+ ld a, [wWildMon]
+ and a
+ ld c, 1 ; caught
+ jr nz, .done
+ ld c, 2 ; escaped
+
+.done
+ pop de
+ ld e, a
+ ld a, d
+ ld [rSVBK], a
+ ld a, e
+ pop de
+ ret
+
+.WobbleProbabilities: ; f9ba
+; catch rate, chance of wobbling / 255
+; nLeft/255 = (nRight/255) ** 4
+ db 1, 63
+ db 2, 75
+ db 3, 84
+ db 4, 90
+ db 5, 95
+ db 7, 103
+ db 10, 113
+ db 15, 126
+ db 20, 134
+ db 30, 149
+ db 40, 160
+ db 50, 169
+ db 60, 177
+ db 80, 191
+ db 100, 201
+ db 120, 211
+ db 140, 220
+ db 160, 227
+ db 180, 234
+ db 200, 240
+ db 220, 246
+ db 240, 251
+ db 254, 253
+ db 255, 255
--- a/lib/mobile/main.asm
+++ b/lib/mobile/main.asm
@@ -117,7 +117,7 @@
ret ; indirectly jump to the function loaded from the dw, which returns to Function3e60.
; 110070 (44:4070)
-.dw: ; 110070
+.dw ; 110070
dw Function110115
dw Function110236
dw Function110291
@@ -9413,7 +9413,7 @@
ld [hl], a
ret
-.Function113dfa
+.Function113dfa:
cp $2b
jr c, .asm_113e24
jr z, .asm_113e31
--- a/macros/move_effect.asm
+++ b/macros/move_effect.asm
@@ -5,181 +5,181 @@
enum_start 1
- command checkturn
- command checkobedience
- command usedmovetext
- command doturn
- command critical
- command damagestats
- command stab
- command damagevariation
- command checkhit
- command lowersub
- command hittargetnosub
- command raisesub
- command failuretext
- command checkfaint
- command criticaltext
- command supereffectivetext
- command checkdestinybond
- command buildopponentrage
- command poisontarget
- command sleeptarget
- command draintarget
- command eatdream
- command burntarget
- command freezetarget
- command paralyzetarget
- command selfdestruct
- command mirrormove
- command statup
- command statdown
- command payday
- command conversion
- command resetstats
- command storeenergy
- command unleashenergy
- command forceswitch
- command endloop
- command flinchtarget
- command ohko
- command recoil
- command mist
- command focusenergy
- command confuse
- command confusetarget
- command heal
- command transform
- command screen
- command poison
- command paralyze
- command substitute
- command rechargenextturn
- command mimic
- command metronome
- command leechseed
- command splash
- command disable
- command cleartext
- command charge
- command checkcharge
- command traptarget
- command effect0x3c
- command rampage
- command checkrampage
- command constantdamage
- command counter
- command encore
- command painsplit
- command snore
- command conversion2
- command lockon
- command sketch
- command defrostopponent
- command sleeptalk
- command destinybond
- command spite
- command falseswipe
- command healbell
- command kingsrock
- command triplekick
- command kickcounter
- command thief
- command arenatrap
- command nightmare
- command defrost
- command curse
- command protect
- command spikes
- command foresight
- command perishsong
- command startsandstorm
- command endure
- command checkcurl
- command rolloutpower
- command effect0x5d
- command furycutter
- command attract
- command happinesspower
- command present
- command damagecalc
- command frustrationpower
- command safeguard
- command checksafeguard
- command getmagnitude
- command batonpass
- command pursuit
- command clearhazards
- command healmorn
- command healday
- command healnite
- command hiddenpower
- command startrain
- command startsun
- command attackup
- command defenseup
- command speedup
- command specialattackup
- command specialdefenseup
- command accuracyup
- command evasionup
- command attackup2
- command defenseup2
- command speedup2
- command specialattackup2
- command specialdefenseup2
- command accuracyup2
- command evasionup2
- command attackdown
- command defensedown
- command speeddown
- command specialattackdown
- command specialdefensedown
- command accuracydown
- command evasiondown
- command attackdown2
- command defensedown2
- command speeddown2
- command specialattackdown2
- command specialdefensedown2
- command accuracydown2
- command evasiondown2
- command statupmessage
- command statdownmessage
- command statupfailtext
- command statdownfailtext
- command effectchance
- command statdownanim
- command statupanim
- command switchturn
- command fakeout
- command bellydrum
- command psychup
- command rage
- command doubleflyingdamage
- command doubleundergrounddamage
- command mirrorcoat
- command checkfuturesight
- command futuresight
- command doubleminimizedamage
- command skipsuncharge
- command thunderaccuracy
- command teleport
- command beatup
- command ragedamage
- command resettypematchup
- command allstatsup
- command effect0xa5
- command raisesubnoanim
- command lowersubnoanim
- command effect0xa8
- command clearmissdamage
- command movedelay
- command hittarget
- command tristatuschance
- command supereffectivelooptext
- command startloop
- command curl
+ command checkturn ; 01
+ command checkobedience ; 02
+ command usedmovetext ; 03
+ command doturn ; 04
+ command critical ; 05
+ command damagestats ; 06
+ command stab ; 07
+ command damagevariation ; 08
+ command checkhit ; 09
+ command lowersub ; 0a
+ command hittargetnosub ; 0b
+ command raisesub ; 0c
+ command failuretext ; 0d
+ command checkfaint ; 0e
+ command criticaltext ; 0f
+ command supereffectivetext ; 10
+ command checkdestinybond ; 11
+ command buildopponentrage ; 12
+ command poisontarget ; 13
+ command sleeptarget ; 14
+ command draintarget ; 15
+ command eatdream ; 16
+ command burntarget ; 17
+ command freezetarget ; 18
+ command paralyzetarget ; 19
+ command selfdestruct ; 1a
+ command mirrormove ; 1b
+ command statup ; 1c
+ command statdown ; 1d
+ command payday ; 1e
+ command conversion ; 1f
+ command resetstats ; 20
+ command storeenergy ; 21
+ command unleashenergy ; 22
+ command forceswitch ; 23
+ command endloop ; 24
+ command flinchtarget ; 25
+ command ohko ; 26
+ command recoil ; 27
+ command mist ; 28
+ command focusenergy ; 29
+ command confuse ; 2a
+ command confusetarget ; 2b
+ command heal ; 2c
+ command transform ; 2d
+ command screen ; 2e
+ command poison ; 2f
+ command paralyze ; 30
+ command substitute ; 31
+ command rechargenextturn ; 32
+ command mimic ; 33
+ command metronome ; 34
+ command leechseed ; 35
+ command splash ; 36
+ command disable ; 37
+ command cleartext ; 38
+ command charge ; 39
+ command checkcharge ; 3a
+ command traptarget ; 3b
+ command effect0x3c ; 3c
+ command rampage ; 3d
+ command checkrampage ; 3e
+ command constantdamage ; 3f
+ command counter ; 40
+ command encore ; 41
+ command painsplit ; 42
+ command snore ; 43
+ command conversion2 ; 44
+ command lockon ; 45
+ command sketch ; 46
+ command defrostopponent ; 47
+ command sleeptalk ; 48
+ command destinybond ; 49
+ command spite ; 4a
+ command falseswipe ; 4b
+ command healbell ; 4c
+ command kingsrock ; 4d
+ command triplekick ; 4e
+ command kickcounter ; 4f
+ command thief ; 50
+ command arenatrap ; 51
+ command nightmare ; 52
+ command defrost ; 53
+ command curse ; 54
+ command protect ; 55
+ command spikes ; 56
+ command foresight ; 57
+ command perishsong ; 58
+ command startsandstorm ; 59
+ command endure ; 5a
+ command checkcurl ; 5b
+ command rolloutpower ; 5c
+ command effect0x5d ; 5d
+ command furycutter ; 5e
+ command attract ; 5f
+ command happinesspower ; 60
+ command present ; 61
+ command damagecalc ; 62
+ command frustrationpower ; 63
+ command safeguard ; 64
+ command checksafeguard ; 65
+ command getmagnitude ; 66
+ command batonpass ; 67
+ command pursuit ; 68
+ command clearhazards ; 69
+ command healmorn ; 6a
+ command healday ; 6b
+ command healnite ; 6c
+ command hiddenpower ; 6d
+ command startrain ; 6e
+ command startsun ; 6f
+ command attackup ; 70
+ command defenseup ; 71
+ command speedup ; 72
+ command specialattackup ; 73
+ command specialdefenseup ; 74
+ command accuracyup ; 75
+ command evasionup ; 76
+ command attackup2 ; 77
+ command defenseup2 ; 78
+ command speedup2 ; 79
+ command specialattackup2 ; 7a
+ command specialdefenseup2 ; 7b
+ command accuracyup2 ; 7c
+ command evasionup2 ; 7d
+ command attackdown ; 7e
+ command defensedown ; 7f
+ command speeddown ; 80
+ command specialattackdown ; 81
+ command specialdefensedown ; 82
+ command accuracydown ; 83
+ command evasiondown ; 84
+ command attackdown2 ; 85
+ command defensedown2 ; 86
+ command speeddown2 ; 87
+ command specialattackdown2 ; 88
+ command specialdefensedown2 ; 89
+ command accuracydown2 ; 8a
+ command evasiondown2 ; 8b
+ command statupmessage ; 8c
+ command statdownmessage ; 8d
+ command statupfailtext ; 8e
+ command statdownfailtext ; 8f
+ command effectchance ; 90
+ command statdownanim ; 91
+ command statupanim ; 92
+ command switchturn ; 93
+ command fakeout ; 94
+ command bellydrum ; 95
+ command psychup ; 96
+ command rage ; 97
+ command doubleflyingdamage ; 98
+ command doubleundergrounddamage ; 99
+ command mirrorcoat ; 9a
+ command checkfuturesight ; 9b
+ command futuresight ; 9c
+ command doubleminimizedamage ; 9d
+ command skipsuncharge ; 9e
+ command thunderaccuracy ; 9f
+ command teleport ; a0
+ command beatup ; a1
+ command ragedamage ; a2
+ command resettypematchup ; a3
+ command allstatsup ; a4
+ command effect0xa5 ; a5
+ command raisesubnoanim ; a6
+ command lowersubnoanim ; a7
+ command effect0xa8 ; a8
+ command clearmissdamage ; a9
+ command movedelay ; aa
+ command hittarget ; ab
+ command tristatuschance ; ac
+ command supereffectivelooptext ; ad
+ command startloop ; ae
+ command curl ; af
enum_start -1, -1
command endmove
--- a/macros/movement.asm
+++ b/macros/movement.asm
@@ -281,8 +281,16 @@
db movement_fast_jump_step_right ; $37
endm
-__enum__ = $3a
+ enum movement_remove_sliding
+remove_sliding: macro
+ db movement_remove_sliding ; $38
+ endm
+ enum movement_set_sliding
+set_sliding: macro
+ db movement_set_sliding ; $39
+ endm
+
enum movement_remove_fixed_facing
remove_fixed_facing: macro
db movement_remove_fixed_facing ; $3a
@@ -425,7 +433,11 @@
db \1 ; displacement
endm
-__enum__ = $57
+ enum movement_tree_shake
+tree_shake: macro
+ db movement_tree_shake
+ endm
+
enum movement_rock_smash
rock_smash: macro
db movement_rock_smash ; $57
--- a/macros/sound.asm
+++ b/macros/sound.asm
@@ -15,7 +15,7 @@
endm
musicheader: macro
- ; number of tracks, ??, address
+ ; number of tracks, track idx, address
dbw ((\1 - 1) << 6) + (\2 - 1), \3
endm
--- a/macros/text.asm
+++ b/macros/text.asm
@@ -19,7 +19,7 @@
db TX_RAM
dw \1
ENDM
-
+
enum TX_BCD
text_bcd: macro
db TX_BCD
--- a/macros/trade_anim.asm
+++ b/macros/trade_anim.asm
@@ -167,7 +167,7 @@
; Mobile
enum_start 1
-
+
enum mobiletradeanim_showgivemon_command
mobiletradeanim_showgivemon: macro
db mobiletradeanim_showgivemon_command ; 01
--- a/macros/wram.asm
+++ b/macros/wram.asm
@@ -202,11 +202,11 @@
hall_of_fame: MACRO
\1::
\1WinCount:: ds 1
-\1Mon1:: hof_mon \1Mon1
-\1Mon2:: hof_mon \1Mon2
-\1Mon3:: hof_mon \1Mon3
-\1Mon4:: hof_mon \1Mon4
-\1Mon5:: hof_mon \1Mon5
+\1Mon1:: hof_mon \1Mon1
+\1Mon2:: hof_mon \1Mon2
+\1Mon3:: hof_mon \1Mon3
+\1Mon4:: hof_mon \1Mon4
+\1Mon5:: hof_mon \1Mon5
\1Mon6:: hof_mon \1Mon6
\1End:: ds 1
ENDM
--- a/main.asm
+++ b/main.asm
@@ -24,7 +24,7 @@
ld c, 50
jp DelayFrames
-.Waiting ; 4025
+.Waiting: ; 4025
db "Waiting...!@"
LoadPushOAM:: ; 4031
@@ -74,7 +74,7 @@
set 6, [hl]
ret
-.Function6473
+.Function6473:
xor a
ld [hFFC6], a
ld [hBGMapMode], a
@@ -122,7 +122,7 @@
ld [hOAMUpdate], a
ret
-.Function64cd
+.Function64cd:
call LoadFontsExtra
ld a, $90
ld [hWY], a
@@ -238,478 +238,9 @@
ItemAttributes: ; 67c1
INCLUDE "items/item_attributes.asm"
INCLUDE "engine/npc_movement.asm"
+INCLUDE "event/happiness_egg.asm"
+INCLUDE "event/special.asm"
-GetFirstPokemonHappiness: ; 718d
- ld hl, PartyMon1Happiness
- ld bc, PARTYMON_STRUCT_LENGTH
- ld de, PartySpecies
-.loop
- ld a, [de]
- cp EGG
- jr nz, .done
- inc de
- add hl, bc
- jr .loop
-
-.done
- ld [wd265], a
- ld a, [hl]
- ld [ScriptVar], a
- call GetPokemonName
- jp CopyPokemonName_Buffer1_Buffer3
-
-CheckFirstMonIsEgg: ; 71ac
- ld a, [PartySpecies]
- ld [wd265], a
- cp EGG
- ld a, $1
- jr z, .egg
- xor a
-
-.egg
- ld [ScriptVar], a
- call GetPokemonName
- jp CopyPokemonName_Buffer1_Buffer3
-
-ChangeHappiness: ; 71c2
-; Perform happiness action c on CurPartyMon
-
- ld a, [CurPartyMon]
- inc a
- ld e, a
- ld d, 0
- ld hl, PartySpecies - 1
- add hl, de
- ld a, [hl]
- cp EGG
- ret z
-
- push bc
- ld hl, PartyMon1Happiness
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [CurPartyMon]
- call AddNTimes
- pop bc
-
- ld d, h
- ld e, l
-
- push de
- ld a, [de]
- cp 100
- ld e, 0
- jr c, .ok
- inc e
- cp 200
- jr c, .ok
- inc e
-
-.ok
- dec c
- ld b, 0
- ld hl, .Actions
-rept 3
- add hl, bc
-endr
- ld d, 0
- add hl, de
- ld a, [hl]
- cp 100
- pop de
-
- ld a, [de]
- jr nc, .negative
- add [hl]
- jr nc, .done
- ld a, -1
- jr .done
-
-.negative
- add [hl]
- jr c, .done
- xor a
-
-.done
- ld [de], a
- ld a, [wBattleMode]
- and a
- ret z
- ld a, [CurPartyMon]
- ld b, a
- ld a, [wPartyMenuCursor]
- cp b
- ret nz
- ld a, [de]
- ld [BattleMonHappiness], a
- ret
-
-.Actions
- db +5, +3, +2 ; Gained a level
- db +5, +3, +2 ; Vitamin
- db +1, +1, +0 ; X Item
- db +3, +2, +1 ; Battled a Gym Leader
- db +1, +1, +0 ; Learned a move
- db -1, -1, -1 ; Lost to an enemy
- db -5, -5, -10 ; Fainted due to poison
- db -5, -5, -10 ; Lost to a much stronger enemy
- db +1, +1, +1 ; Haircut (Y1)
- db +3, +3, +1 ; Haircut (Y2)
- db +5, +5, +2 ; Haircut (Y3)
- db +1, +1, +1 ; Haircut (O1)
- db +3, +3, +1 ; Haircut (O2)
- db +10, +10, +4 ; Haircut (O3)
- db -5, -5, -10 ; Used Heal Powder or Energypowder (bitter)
- db -10, -10, -15 ; Used Energy Root (bitter)
- db -15, -15, -20 ; Used Revival Herb (bitter)
- db +3, +3, +1 ; Grooming
- db +10, +6, +4 ; Gained a level in the place where it was caught
-
-StepHappiness:: ; 725a
-; Raise the party's happiness by 1 point every other step cycle.
-
- ld hl, wHappinessStepCount
- ld a, [hl]
- inc a
- and 1
- ld [hl], a
- ret nz
-
- ld de, PartyCount
- ld a, [de]
- and a
- ret z
-
- ld c, a
- ld hl, PartyMon1Happiness
-.loop
- inc de
- ld a, [de]
- cp EGG
- jr z, .next
- inc [hl]
- jr nz, .next
- ld [hl], $ff
-
-.next
- push de
- ld de, PARTYMON_STRUCT_LENGTH
- add hl, de
- pop de
- dec c
- jr nz, .loop
- ret
-
-DaycareStep:: ; 7282
-
- ld a, [wDaycareMan]
- bit 0, a
- jr z, .daycare_lady
-
- ld a, [wBreedMon1Level] ; level
- cp 100
- jr nc, .daycare_lady
- ld hl, wBreedMon1Exp + 2 ; exp
- inc [hl]
- jr nz, .daycare_lady
- dec hl
- inc [hl]
- jr nz, .daycare_lady
- dec hl
- inc [hl]
- ld a, [hl]
- cp 5242880 / $10000
- jr c, .daycare_lady
- ld a, 5242880 / $10000
- ld [hl], a
-
-.daycare_lady
- ld a, [wDaycareLady]
- bit 0, a
- jr z, .check_egg
-
- ld a, [wBreedMon2Level] ; level
- cp 100
- jr nc, .check_egg
- ld hl, wBreedMon2Exp + 2 ; exp
- inc [hl]
- jr nz, .check_egg
- dec hl
- inc [hl]
- jr nz, .check_egg
- dec hl
- inc [hl]
- ld a, [hl]
- cp 5242880 / $10000
- jr c, .check_egg
- ld a, 5242880 / $10000
- ld [hl], a
-
-.check_egg
- ld hl, wDaycareMan
- bit 5, [hl] ; egg
- ret z
- ld hl, wStepsToEgg
- dec [hl]
- ret nz
-
- call Random
- ld [hl], a
- callab CheckBreedmonCompatibility
- ld a, [wd265]
- cp 230
- ld b, -1 + 32 percent
- jr nc, .okay
- ld a, [wd265]
- cp 170
- ld b, 16 percent
- jr nc, .okay
- ld a, [wd265]
- cp 110
- ld b, 12 percent
- jr nc, .okay
- ld b, 4 percent
-
-.okay
- call Random
- cp b
- ret nc
- ld hl, wDaycareMan
- res 5, [hl]
- set 6, [hl]
- ret
-
-SpecialGiveShuckle: ; 7305
-
-; Adding to the party.
- xor a
- ld [MonType], a
-
-; Level 15 Shuckle.
- ld a, SHUCKLE
- ld [CurPartySpecies], a
- ld a, 15
- ld [CurPartyLevel], a
-
- predef TryAddMonToParty
- jr nc, .NotGiven
-
-; Caught data.
- ld b, 0
- callba SetGiftPartyMonCaughtData
-
-; Holding a Berry.
- ld bc, PARTYMON_STRUCT_LENGTH
- ld a, [PartyCount]
- dec a
- push af
- push bc
- ld hl, PartyMon1Item
- call AddNTimes
- ld [hl], BERRY
- pop bc
- pop af
-
-; OT ID.
- ld hl, PartyMon1ID
- call AddNTimes
- ld a, $2
- ld [hli], a
- ld [hl], $6
-
-; Nickname.
- ld a, [PartyCount]
- dec a
- ld hl, PartyMonNicknames
- call SkipNames
- ld de, SpecialShuckleNick
- call CopyName2
-
-; OT.
- ld a, [PartyCount]
- dec a
- ld hl, PartyMonOT
- call SkipNames
- ld de, SpecialShuckleOT
- call CopyName2
-
-; Engine flag for this event.
- ld hl, DailyFlags
- set 5, [hl]
-; setflag ENGINE_SHUCKLE_GIVEN
- ld a, 1
- ld [ScriptVar], a
- ret
-
-.NotGiven
- xor a
- ld [ScriptVar], a
- ret
-
-SpecialShuckleOT:
- db "MANIA@"
-SpecialShuckleNick:
- db "SHUCKIE@"
-
-SpecialReturnShuckle: ; 737e
- callba SelectMonFromParty
- jr c, .refused
-
- ld a, [CurPartySpecies]
- cp SHUCKLE
- jr nz, .DontReturn
-
- ld a, [CurPartyMon]
- ld hl, PartyMon1ID
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
-
-; OT ID
- ld a, [hli]
- cp 00518 / $100
- jr nz, .DontReturn
- ld a, [hl]
- cp 00518 % $100
- jr nz, .DontReturn
-
-; OT
- ld a, [CurPartyMon]
- ld hl, PartyMonOT
- call SkipNames
- ld de, SpecialShuckleOT
-.CheckOT
- ld a, [de]
- cp [hl]
- jr nz, .DontReturn
- cp "@"
- jr z, .done
- inc de
- inc hl
- jr .CheckOT
-
-.done
- callba CheckCurPartyMonFainted
- jr c, .fainted
- ld a, [CurPartyMon]
- ld hl, PartyMon1Happiness
- ld bc, PARTYMON_STRUCT_LENGTH
- call AddNTimes
- ld a, [hl]
- cp 150
- ld a, $3
- jr nc, .HappyToStayWithYou
- xor a ; take from pc
- ld [wPokemonWithdrawDepositParameter], a
- callab RemoveMonFromPartyOrBox
- ld a, $2
-.HappyToStayWithYou
- ld [ScriptVar], a
- ret
-
-.refused
- ld a, $1
- ld [ScriptVar], a
- ret
-
-.DontReturn
- xor a
- ld [ScriptVar], a
- ret
-
-.fainted
- ld a, $4
- ld [ScriptVar], a
- ret
-
-Special_BillsGrandfather: ; 73f7
- callba SelectMonFromParty
- jr c, .cancel
- ld a, [CurPartySpecies]
- ld [ScriptVar], a
- ld [wNamedObjectIndexBuffer], a
- call GetPokemonName
- jp CopyPokemonName_Buffer1_Buffer3
-
-.cancel
- xor a
- ld [ScriptVar], a
- ret
-
-Special_YoungerHaircutBrother: ; 7413
- ld hl, Data_YoungerHaircutBrother
- jr MassageOrHaircut
-
-Special_OlderHaircutBrother: ; 7418
- ld hl, Data_OlderHaircutBrother
- jr MassageOrHaircut
-
-Special_DaisyMassage: ; 741d
- ld hl, Data_DaisyMassage
-
-MassageOrHaircut: ; 7420
- push hl
- callba SelectMonFromParty
- pop hl
- jr c, .nope
- ld a, [CurPartySpecies]
- cp EGG
- jr z, .egg
- push hl
- call GetCurNick
- call CopyPokemonName_Buffer1_Buffer3
- pop hl
- call Random
-; Bug: Subtracting $ff from $ff fails to set c.
-; This can result in overflow into the next data array.
-; In the case of getting a massage from Daisy, we bleed
-; into CopyPokemonName_Buffer1_Buffer3, which passes
-; $d0 to ChangeHappiness and returns $73 to the script.
-; The end result is that there is a 0.4% chance your
-; Pokemon's happiness will not change at all.
-.loop
- sub [hl]
- jr c, .ok
-rept 3
- inc hl
-endr
- jr .loop
-
-.ok
- inc hl
- ld a, [hli]
- ld [ScriptVar], a
- ld c, [hl]
- call ChangeHappiness
- ret
-
-.nope
- xor a
- ld [ScriptVar], a
- ret
-
-.egg
- ld a, 1
- ld [ScriptVar], a
- ret
-
-Data_YoungerHaircutBrother: ; 7459
- db $4c, 2, HAPPINESS_YOUNGCUT1 ; 30% chance
- db $80, 3, HAPPINESS_YOUNGCUT2 ; 20% chance
- db $ff, 4, HAPPINESS_YOUNGCUT3 ; 50% chance
-
-Data_OlderHaircutBrother: ; 7462
- db $9a, 2, HAPPINESS_OLDERCUT1 ; 60% chance
- db $4c, 3, HAPPINESS_OLDERCUT2 ; 10% chance
- db $ff, 4, HAPPINESS_OLDERCUT3 ; 30% chance
-
-Data_DaisyMassage: ; 746b
- db $ff, 2, HAPPINESS_MASSAGE ; 99.6% chance
-
-CopyPokemonName_Buffer1_Buffer3: ; 746e
- ld hl, StringBuffer1
- ld de, StringBuffer3
- ld bc, PKMN_NAME_LENGTH
- jp CopyBytes
-
Predef1: ; 747a
; not used
ret
@@ -716,916 +247,9 @@
SECTION "bank2", ROMX, BANK[$2]
-BlankScreen: ; 8000
- call DisableSpriteUpdates
- xor a
- ld [hBGMapMode], a
- call ClearBGPalettes
- call ClearSprites
- hlcoord 0, 0
- ld bc, TileMapEnd - TileMap
- ld a, " "
- call ByteFill
- hlcoord 0, 0, AttrMap
- ld bc, AttrMapEnd - AttrMap
- ld a, $7
- call ByteFill
- call WaitBGMap2
- call SetPalettes
- ret
-
-SpawnPlayer: ; 8029
- ld a, -1
- ld [wObjectFollow_Leader], a
- ld [wObjectFollow_Follower], a
- ld a, $0
- ld hl, PlayerObjectTemplate
- call CopyPlayerObjectTemplate
- ld b, $0
- call PlayerSpawn_ConvertCoords
- ld a, $0
- call GetMapObject
- ld hl, MAPOBJECT_COLOR
- add hl, bc
- ln e, (1 << 3) | PAL_OW_RED, PERSONTYPE_SCRIPT
- ld a, [wPlayerSpriteSetupFlags]
- bit 2, a
- jr nz, .ok
- ld a, [PlayerGender]
- bit 0, a
- jr z, .ok
- ln e, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT
-
-.ok
- ld [hl], e
- ld a, $0
- ld [hMapObjectIndexBuffer], a
- ld bc, MapObjects
- ld a, $0
- ld [hObjectStructIndexBuffer], a
- ld de, ObjectStructs
- call CopyMapObjectToObjectStruct
- ld a, PLAYER
- ld [wCenteredObject], a
- ret
-
-PlayerObjectTemplate: ; 8071
-; A dummy map object used to initialize the player object.
-; Shorter than the actual amount copied by two bytes.
-; Said bytes seem to be unused.
- person_event SPRITE_CHRIS, -4, -4, SPRITEMOVEDATA_PLAYER, 15, 15, -1, -1, 0, PERSONTYPE_SCRIPT, 0, 0, -1
-
-CopyDECoordsToMapObject:: ; 807e
- push de
- ld a, b
- call GetMapObject
- pop de
- ld hl, MAPOBJECT_X_COORD
- add hl, bc
- ld [hl], d
- ld hl, MAPOBJECT_Y_COORD
- add hl, bc
- ld [hl], e
- ret
-
-PlayerSpawn_ConvertCoords: ; 808f
- push bc
- ld a, [XCoord]
- add 4
- ld d, a
- ld a, [YCoord]
- add 4
- ld e, a
- pop bc
- call CopyDECoordsToMapObject
- ret
-
-WritePersonXY:: ; 80a1
- ld a, b
- call CheckObjectVisibility
- ret c
-
- ld hl, OBJECT_NEXT_MAP_X
- add hl, bc
- ld d, [hl]
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, bc
- ld e, [hl]
- ld a, [hMapObjectIndexBuffer]
- ld b, a
- call CopyDECoordsToMapObject
- and a
- ret
-
-RefreshPlayerCoords: ; 80b8
- ld a, [XCoord]
- add 4
- ld d, a
- ld hl, PlayerStandingMapX
- sub [hl]
- ld [hl], d
- ld hl, MapObjects + MAPOBJECT_X_COORD
- ld [hl], d
- ld hl, PlayerLastMapX
- ld [hl], d
- ld d, a
- ld a, [YCoord]
- add 4
- ld e, a
- ld hl, PlayerStandingMapY
- sub [hl]
- ld [hl], e
- ld hl, MapObjects + MAPOBJECT_Y_COORD
- ld [hl], e
- ld hl, PlayerLastMapY
- ld [hl], e
- ld e, a
- ld a, [wObjectFollow_Leader]
- cp $0
- ret nz ; wtf
- ret
-
-CopyObjectStruct:: ; 80e7
- call CheckObjectMask
- and a
- ret nz ; masked
-
- ld hl, ObjectStructs + OBJECT_STRUCT_LENGTH * 1
- ld a, 1
- ld de, OBJECT_STRUCT_LENGTH
-.loop
- ld [hObjectStructIndexBuffer], a
- ld a, [hl]
- and a
- jr z, .done
- add hl, de
- ld a, [hObjectStructIndexBuffer]
- inc a
- cp NUM_OBJECT_STRUCTS
- jr nz, .loop
- scf
- ret ; overflow
-
-.done
- ld d, h
- ld e, l
- call CopyMapObjectToObjectStruct
- ld hl, VramState
- bit 7, [hl]
- ret z
-
- ld hl, OBJECT_FLAGS2
- add hl, de
- set 5, [hl]
- ret
-
-CopyMapObjectToObjectStruct: ; 8116
- call .CopyMapObjectToTempObject
- call CopyTempObjectToObjectStruct
- ret
-
-.CopyMapObjectToTempObject: ; 811d
- ld a, [hObjectStructIndexBuffer]
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld [hl], a
-
- ld a, [hMapObjectIndexBuffer]
- ld [wTempObjectCopyMapObjectIndex], a
-
- ld hl, MAPOBJECT_SPRITE
- add hl, bc
- ld a, [hl]
- ld [wTempObjectCopySprite], a
-
- call GetSpriteVTile
- ld [wTempObjectCopySpriteVTile], a
-
- ld a, [hl]
- call GetSpritePalette
- ld [wTempObjectCopyPalette], a
-
- ld hl, MAPOBJECT_COLOR
- add hl, bc
- ld a, [hl]
- and $f0
- jr z, .skip_color_override
- swap a
- and $7 ; OAM_PALETTE
- ld [wTempObjectCopyPalette], a
-
-.skip_color_override
- ld hl, MAPOBJECT_MOVEMENT
- add hl, bc
- ld a, [hl]
- ld [wTempObjectCopyMovement], a
-
- ld hl, MAPOBJECT_RANGE
- add hl, bc
- ld a, [hl]
- ld [wTempObjectCopyRange], a
-
- ld hl, MAPOBJECT_X_COORD
- add hl, bc
- ld a, [hl]
- ld [wTempObjectCopyX], a
-
- ld hl, MAPOBJECT_Y_COORD
- add hl, bc
- ld a, [hl]
- ld [wTempObjectCopyY], a
-
- ld hl, MAPOBJECT_RADIUS
- add hl, bc
- ld a, [hl]
- ld [wTempObjectCopyRadius], a
- ret
-
-InitializeVisibleSprites: ; 8177
- ld bc, MapObjects + OBJECT_LENGTH
- ld a, 1
-.loop
- ld [hMapObjectIndexBuffer], a
- ld hl, MAPOBJECT_SPRITE
- add hl, bc
- ld a, [hl]
- and a
- jr z, .next
-
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld a, [hl]
- cp -1
- jr nz, .next
-
- ld a, [XCoord]
- ld d, a
- ld a, [YCoord]
- ld e, a
-
- ld hl, MAPOBJECT_X_COORD
- add hl, bc
- ld a, [hl]
- add 1
- sub d
- jr c, .next
-
- cp MAPOBJECT_SCREEN_WIDTH
- jr nc, .next
-
- ld hl, MAPOBJECT_Y_COORD
- add hl, bc
- ld a, [hl]
- add 1
- sub e
- jr c, .next
-
- cp MAPOBJECT_SCREEN_HEIGHT
- jr nc, .next
-
- push bc
- call CopyObjectStruct
- pop bc
- jp c, .ret
-
-.next
- ld hl, OBJECT_LENGTH
- add hl, bc
- ld b, h
- ld c, l
- ld a, [hMapObjectIndexBuffer]
- inc a
- cp NUM_OBJECTS
- jr nz, .loop
- ret
-
-.ret: ; 81c9
- ret
-
-CheckObjectEnteringVisibleRange:: ; 81ca
- nop
- ld a, [wPlayerStepDirection]
- cp STANDING
- ret z
- ld hl, .dw
- rst JumpTable
- ret
-
-.dw: ; 81d6
- dw .Down
- dw .Up
- dw .Left
- dw .Right
-
-.Up: ; 81de
- ld a, [YCoord]
- sub 1
- jr .Vertical
-
-.Down: ; 81e5
- ld a, [YCoord]
- add 9
-.Vertical: ; 81ea
- ld d, a
- ld a, [XCoord]
- ld e, a
- ld bc, MapObjects + OBJECT_LENGTH
- ld a, 1
-.loop_v
- ld [hMapObjectIndexBuffer], a
- ld hl, MAPOBJECT_SPRITE
- add hl, bc
- ld a, [hl]
- and a
- jr z, .next_v
- ld hl, MAPOBJECT_Y_COORD
- add hl, bc
- ld a, d
- cp [hl]
- jr nz, .next_v
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld a, [hl]
- cp -1
- jr nz, .next_v
- ld hl, MAPOBJECT_X_COORD
- add hl, bc
- ld a, [hl]
- add 1
- sub e
- jr c, .next_v
- cp MAPOBJECT_SCREEN_WIDTH
- jr nc, .next_v
- push de
- push bc
- call CopyObjectStruct
- pop bc
- pop de
-
-.next_v
- ld hl, OBJECT_LENGTH
- add hl, bc
- ld b, h
- ld c, l
- ld a, [hMapObjectIndexBuffer]
- inc a
- cp NUM_OBJECTS
- jr nz, .loop_v
- ret
-
-.Left: ; 8232
- ld a, [XCoord]
- sub 1
- jr .Horizontal
-
-.Right: ; 8239
- ld a, [XCoord]
- add 10
-.Horizontal: ; 823e
- ld e, a
- ld a, [YCoord]
- ld d, a
- ld bc, MapObjects + OBJECT_LENGTH
- ld a, 1
-.loop_h
- ld [hMapObjectIndexBuffer], a
- ld hl, MAPOBJECT_SPRITE
- add hl, bc
- ld a, [hl]
- and a
- jr z, .next_h
- ld hl, MAPOBJECT_X_COORD
- add hl, bc
- ld a, e
- cp [hl]
- jr nz, .next_h
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld a, [hl]
- cp -1
- jr nz, .next_h
- ld hl, MAPOBJECT_Y_COORD
- add hl, bc
- ld a, [hl]
- add 1
- sub d
- jr c, .next_h
- cp MAPOBJECT_SCREEN_HEIGHT
- jr nc, .next_h
- push de
- push bc
- call CopyObjectStruct
- pop bc
- pop de
-
-.next_h
- ld hl, OBJECT_LENGTH
- add hl, bc
- ld b, h
- ld c, l
- ld a, [hMapObjectIndexBuffer]
- inc a
- cp NUM_OBJECTS
- jr nz, .loop_h
- ret
-
-CopyTempObjectToObjectStruct: ; 8286
- ld a, [wTempObjectCopyMapObjectIndex]
- ld hl, OBJECT_MAP_OBJECT_INDEX
- add hl, de
- ld [hl], a
-
- ld a, [wTempObjectCopyMovement]
- call CopySpriteMovementData
-
- ld a, [wTempObjectCopyPalette]
- ld hl, OBJECT_PALETTE
- add hl, de
- or [hl]
- ld [hl], a
-
- ld a, [wTempObjectCopyY]
- call .InitYCoord
-
- ld a, [wTempObjectCopyX]
- call .InitXCoord
-
- ld a, [wTempObjectCopySprite]
- ld hl, OBJECT_SPRITE
- add hl, de
- ld [hl], a
-
- ld a, [wTempObjectCopySpriteVTile]
- ld hl, OBJECT_SPRITE_TILE
- add hl, de
- ld [hl], a
-
- ld hl, OBJECT_STEP_TYPE
- add hl, de
- ld [hl], STEP_TYPE_00
-
- ld hl, OBJECT_FACING_STEP
- add hl, de
- ld [hl], STANDING
-
- ld a, [wTempObjectCopyRadius]
- call .InitRadius
-
- ld a, [wTempObjectCopyRange]
- ld hl, OBJECT_RANGE
- add hl, de
- ld [hl], a
-
- and a
- ret
-
-.InitYCoord: ; 82d5
- ld hl, OBJECT_INIT_Y
- add hl, de
- ld [hl], a
-
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, de
- ld [hl], a
-
- ld hl, YCoord
- sub [hl]
- and $f
- swap a
- ld hl, wFollowNotExactPersonY
- sub [hl]
- ld hl, OBJECT_SPRITE_Y
- add hl, de
- ld [hl], a
- ret
-
-.InitXCoord: ; 82f1
- ld hl, OBJECT_INIT_X
- add hl, de
- ld [hl], a
- ld hl, OBJECT_NEXT_MAP_X
- add hl, de
- ld [hl], a
- ld hl, XCoord
- sub [hl]
- and $f
- swap a
- ld hl, wFollowNotExactPersonX
- sub [hl]
- ld hl, OBJECT_SPRITE_X
- add hl, de
- ld [hl], a
- ret
-
-.InitRadius: ; 830d
- ld h, a
- inc a
- and $f
- ld l, a
- ld a, h
- add $10
- and $f0
- or l
- ld hl, OBJECT_RADIUS
- add hl, de
- ld [hl], a
- ret
-
-TrainerWalkToPlayer: ; 831e
- ld a, [hLastTalked]
- call InitMovementBuffer
- ld a, movement_step_sleep_1
- call AppendToMovementBuffer
- ld a, [wd03f]
- dec a
- jr z, .TerminateStep
- ld a, [hLastTalked]
- ld b, a
- ld c, PLAYER
- ld d, 1
- call .GetPathToPlayer
- call DecrementMovementBufferCount
-
-.TerminateStep
- ld a, movement_step_end
- call AppendToMovementBuffer
- ret
-
-.GetPathToPlayer: ; 8341
- push de
- push bc
-; get player object struct, load to de
- ld a, c
- call GetMapObject
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld a, [hl]
- call GetObjectStruct
- ld d, b
- ld e, c
-
-; get last talked object struct, load to bc
- pop bc
- ld a, b
- call GetMapObject
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld a, [hl]
- call GetObjectStruct
-
-; get last talked coords, load to bc
- ld hl, OBJECT_NEXT_MAP_X
- add hl, bc
- ld a, [hl]
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, bc
- ld c, [hl]
- ld b, a
-
-; get player coords, load to de
- ld hl, OBJECT_NEXT_MAP_X
- add hl, de
- ld a, [hl]
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, de
- ld e, [hl]
- ld d, a
-
- pop af
- call ComputePathToWalkToPlayer
- ret
-
-Special_SurfStartStep: ; 8379
- call InitMovementBuffer
- call .GetMovementData
- call AppendToMovementBuffer
- ld a, movement_step_end
- call AppendToMovementBuffer
- ret
-
-.GetMovementData: ; 8388
- ld a, [PlayerDirection]
- srl a
- srl a
- and 3
- ld e, a
- ld d, 0
- ld hl, .movement_data
- add hl, de
- ld a, [hl]
- ret
-
-.movement_data
- slow_step_down
- slow_step_up
- slow_step_left
- slow_step_right
-
-FollowNotExact:: ; 839e
- push bc
- ld a, c
- call CheckObjectVisibility
- ld d, b
- ld e, c
- pop bc
- ret c
-
- ld a, b
- call CheckObjectVisibility
- ret c
-
-; Person 2 is now in bc, person 1 is now in de
- ld hl, OBJECT_NEXT_MAP_X
- add hl, bc
- ld a, [hl]
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, bc
- ld c, [hl]
- ld b, a
-
- ld hl, OBJECT_NEXT_MAP_X
- add hl, de
- ld a, [hl]
- cp b
- jr z, .same_x
- jr c, .to_the_left
- inc b
- jr .continue
-
-.to_the_left
- dec b
- jr .continue
-
-.same_x
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, de
- ld a, [hl]
- cp c
- jr z, .continue
- jr c, .below
- inc c
- jr .continue
-
-.below
- dec c
-
-.continue
- ld hl, OBJECT_NEXT_MAP_X
- add hl, de
- ld [hl], b
- ld a, b
- ld hl, XCoord
- sub [hl]
- and $f
- swap a
- ld hl, wFollowNotExactPersonX
- sub [hl]
- ld hl, OBJECT_SPRITE_X
- add hl, de
- ld [hl], a
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, de
- ld [hl], c
- ld a, c
- ld hl, YCoord
- sub [hl]
- and $f
- swap a
- ld hl, wFollowNotExactPersonY
- sub [hl]
- ld hl, OBJECT_SPRITE_Y
- add hl, de
- ld [hl], a
- ld a, [hObjectStructIndexBuffer]
- ld hl, OBJECT_RANGE
- add hl, de
- ld [hl], a
- ld hl, OBJECT_MOVEMENTTYPE
- add hl, de
- ld [hl], SPRITEMOVEDATA_FOLLOWNOTEXACT
- ld hl, OBJECT_STEP_TYPE
- add hl, de
- ld [hl], STEP_TYPE_00
- ret
-
-GetRelativeFacing:: ; 8417
-; Determines which way map object e would have to turn to face map object d. Returns carry if it's impossible for whatever reason.
- ld a, d
- call GetMapObject
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld a, [hl]
- cp NUM_OBJECT_STRUCTS
- jr nc, .carry
- ld d, a
- ld a, e
- call GetMapObject
- ld hl, MAPOBJECT_OBJECT_STRUCT_ID
- add hl, bc
- ld a, [hl]
- cp NUM_OBJECT_STRUCTS
- jr nc, .carry
- ld e, a
- call .GetFacing_e_relativeto_d
- ret
-
-.carry
- scf
- ret
-
-.GetFacing_e_relativeto_d: ; 8439
-; Determines which way object e would have to turn to face object d. Returns carry if it's impossible.
-; load the coordinates of object d into bc
- ld a, d
- call GetObjectStruct
- ld hl, OBJECT_NEXT_MAP_X
- add hl, bc
- ld a, [hl]
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, bc
- ld c, [hl]
- ld b, a
- push bc
-; load the coordinates of object e into de
- ld a, e
- call GetObjectStruct
- ld hl, OBJECT_NEXT_MAP_X
- add hl, bc
- ld d, [hl]
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, bc
- ld e, [hl]
- pop bc
-; |x1 - x2|
- ld a, b
- sub d
- jr z, .same_x_1
- jr nc, .b_right_of_d_1
- cpl
- inc a
-
-.b_right_of_d_1
-; |y1 - y2|
- ld h, a
- ld a, c
- sub e
- jr z, .same_y_1
- jr nc, .c_below_e_1
- cpl
- inc a
-
-.c_below_e_1
-; |y1 - y2| - |x1 - x2|
- sub h
- jr c, .same_y_1
-
-.same_x_1
-; compare the y coordinates
- ld a, c
- cp e
- jr z, .same_x_and_y
- jr c, .c_directly_below_e
-; c directly above e
- ld d, DOWN
- and a
- ret
-
-.c_directly_below_e
- ld d, UP
- and a
- ret
-
-.same_y_1
- ld a, b
- cp d
- jr z, .same_x_and_y
- jr c, .b_directly_right_of_d
-; b directly left of d
- ld d, RIGHT
- and a
- ret
-
-.b_directly_right_of_d
- ld d, LEFT
- and a
- ret
-
-.same_x_and_y
- scf
- ret
-
-QueueFollowerFirstStep: ; 848a
- call .QueueFirstStep
- jr c, .same
- ld [wFollowMovementQueue], a
- xor a
- ld [wFollowerMovementQueueLength], a
- ret
-
-.same
- ld a, -1
- ld [wFollowerMovementQueueLength], a
- ret
-
-.QueueFirstStep
- ld a, [wObjectFollow_Leader]
- call GetObjectStruct
- ld hl, OBJECT_NEXT_MAP_X
- add hl, bc
- ld d, [hl]
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, bc
- ld e, [hl]
- ld a, [wObjectFollow_Follower]
- call GetObjectStruct
- ld hl, OBJECT_NEXT_MAP_X
- add hl, bc
- ld a, d
- cp [hl]
- jr z, .check_y
- jr c, .left
- and a
- ld a, movement_step_right
- ret
-
-.left
- and a
- ld a, movement_step_left
- ret
-
-.check_y
- ld hl, OBJECT_NEXT_MAP_Y
- add hl, bc
- ld a, e
- cp [hl]
- jr z, .same_xy
- jr c, .up
- and a
- ld a, movement_step_down
- ret
-
-.up
- and a
- ld a, movement_step_up
- ret
-
-.same_xy
- scf
- ret
-
-_Sine:: ; 84d9
-; A simple sine function.
-; Return d * sin(e) in hl.
-
-; e is a signed 6-bit value.
- ld a, e
- and %111111
- cp %100000
- jr nc, .negative
-
- call .ApplySineWave
- ld a, h
- ret
-
-.negative
- and %011111
- call .ApplySineWave
- ld a, h
- xor -1
- inc a
- ret
-
-.ApplySineWave: ; 84ef
- ld e, a
- ld a, d
- ld d, 0
- ld hl, .sinewave
- add hl, de
- add hl, de
- ld e, [hl]
- inc hl
- ld d, [hl]
- ld hl, 0
-
-; Factor amplitude
-.multiply
- srl a
- jr nc, .even
- add hl, de
-.even
- sla e
- rl d
- and a
- jr nz, .multiply
- ret
-
-.sinewave: ; 850b
-; A $20-word table representing a sine wave.
-; 90 degrees is index $10 at a base amplitude of $100.
- sine_wave $100
-
+INCLUDE "engine/player_object.asm"
+INCLUDE "engine/sine.asm"
INCLUDE "engine/predef.asm"
-
INCLUDE "engine/color.asm"
SECTION "bank3", ROMX, BANK[$3]
@@ -1651,3288 +275,15 @@
db -1
INCLUDE "engine/specials.asm"
-
-_PrintNum:: ; c4c7
-; Print c digits of the b-byte value from de to hl.
-; Allows 2 to 7 digits. For 1-digit numbers, add
-; the value to char "0" instead of calling PrintNum.
-; Some extra flags can be given in bits 5-7 of b.
-; Bit 5: money if set (unless left-aligned without leading zeros)
-; Bit 6: right-aligned if set
-; Bit 7: print leading zeros if set
-
- push bc
-
- bit 5, b
- jr z, .main
- bit 7, b
- jr nz, .moneyflag
- bit 6, b
- jr z, .main
-
-.moneyflag ; 101xxxxx or 011xxxxx
- ld a, "¥"
- ld [hli], a
- res 5, b ; 100xxxxx or 010xxxxx
-
-.main
- xor a
- ld [hPrintNum1], a
- ld [hPrintNum2], a
- ld [hPrintNum3], a
- ld a, b
- and $f
- cp 1
- jr z, .byte
- cp 2
- jr z, .word
-; maximum 3 bytes
-.long
- ld a, [de]
- ld [hPrintNum2], a
- inc de
- ld a, [de]
- ld [hPrintNum3], a
- inc de
- ld a, [de]
- ld [hPrintNum4], a
- jr .start
-
-.word
- ld a, [de]
- ld [hPrintNum3], a
- inc de
- ld a, [de]
- ld [hPrintNum4], a
- jr .start
-
-.byte
- ld a, [de]
- ld [hPrintNum4], a
-
-.start
- push de
-
- ld d, b
- ld a, c
- swap a
- and $f
- ld e, a
- ld a, c
- and $f
- ld b, a
- ld c, 0
- cp 2
- jr z, .two
- cp 3
- jr z, .three
- cp 4
- jr z, .four
- cp 5
- jr z, .five
- cp 6
- jr z, .six
-
-.seven
- ld a, 1000000 / $10000 % $100
- ld [hPrintNum5], a
- ld a, 1000000 / $100 % $100
- ld [hPrintNum6], a
- ld a, 1000000 % $100
- ld [hPrintNum7], a
- call .PrintDigit
- call .AdvancePointer
-
-.six
- ld a, 100000 / $10000 % $100
- ld [hPrintNum5], a
- ld a, 100000 / $100 % $100
- ld [hPrintNum6], a
- ld a, 100000 % $100
- ld [hPrintNum7], a
- call .PrintDigit
- call .AdvancePointer
-
-.five
- xor a
- ld [hPrintNum5], a
- ld a, 10000 / $100
- ld [hPrintNum6], a
- ld a, 10000 % $100
- ld [hPrintNum7], a
- call .PrintDigit
- call .AdvancePointer
-
-.four
- xor a
- ld [hPrintNum5], a
- ld a, 1000 / $100
- ld [hPrintNum6], a
- ld a, 1000 % $100
- ld [hPrintNum7], a
- call .PrintDigit
- call .AdvancePointer
-
-.three
- xor a
- ld [hPrintNum5], a
- xor a
- ld [hPrintNum6], a
- ld a, 100
- ld [hPrintNum7], a
- call .PrintDigit
- call .AdvancePointer
-
-.two
- dec e
- jr nz, .two_skip
- ld a, "0"
- ld [hPrintNum1], a
-.two_skip
-
- ld c, 0
- ld a, [hPrintNum4]
-.mod_10
- cp 10
- jr c, .modded_10
- sub 10
- inc c
- jr .mod_10
-.modded_10
-
- ld b, a
- ld a, [hPrintNum1]
- or c
- jr nz, .money
- call .PrintLeadingZero
- jr .money_leading_zero
-
-.money
- call .PrintYen
- push af
- ld a, "0"
- add c
- ld [hl], a
- pop af
- ld [hPrintNum1], a
- inc e
- dec e
- jr nz, .money_leading_zero
- inc hl
- ld [hl], $f2 ; XXX
-
-.money_leading_zero
- call .AdvancePointer
- call .PrintYen
- ld a, "0"
- add b
- ld [hli], a
-
- pop de
- pop bc
- ret
-
-.PrintYen: ; c5ba
- push af
- ld a, [hPrintNum1]
- and a
- jr nz, .stop
- bit 5, d
- jr z, .stop
- ld a, "¥"
- ld [hli], a
- res 5, d
-
-.stop
- pop af
- ret
-
-.PrintDigit: ; c5cb (3:45cb)
- dec e
- jr nz, .ok
- ld a, "0"
- ld [hPrintNum1], a
-.ok
- ld c, 0
-.loop
- ld a, [hPrintNum5]
- ld b, a
- ld a, [hPrintNum2]
- ld [hPrintNum8], a
- cp b
- jr c, .skip1
- sub b
- ld [hPrintNum2], a
- ld a, [hPrintNum6]
- ld b, a
- ld a, [hPrintNum3]
- ld [hPrintNum9], a
- cp b
- jr nc, .skip2
- ld a, [hPrintNum2]
- or 0
- jr z, .skip3
- dec a
- ld [hPrintNum2], a
- ld a, [hPrintNum3]
-.skip2
- sub b
- ld [hPrintNum3], a
- ld a, [hPrintNum7]
- ld b, a
- ld a, [hPrintNum4]
- ld [hPrintNum10], a
- cp b
- jr nc, .skip4
- ld a, [hPrintNum3]
- and a
- jr nz, .skip5
- ld a, [hPrintNum2]
- and a
- jr z, .skip6
- dec a
- ld [hPrintNum2], a
- xor a
-.skip5
- dec a
- ld [hPrintNum3], a
- ld a, [hPrintNum4]
-.skip4
- sub b
- ld [hPrintNum4], a
- inc c
- jr .loop
-.skip6
- ld a, [hPrintNum9]
- ld [hPrintNum3], a
-.skip3
- ld a, [hPrintNum8]
- ld [hPrintNum2], a
-.skip1
- ld a, [hPrintNum1]
- or c
- jr z, .PrintLeadingZero
- ld a, [hPrintNum1]
- and a
- jr nz, .done
- bit 5, d
- jr z, .done
- ld a, "¥"
- ld [hli], a
- res 5, d
-.done
- ld a, "0"
- add c
- ld [hl], a
- ld [hPrintNum1], a
- inc e
- dec e
- ret nz
- inc hl
- ld [hl], "·"
- ret
-
-.PrintLeadingZero: ; c644
-; prints a leading zero unless they are turned off in the flags
- bit 7, d ; print leading zeroes?
- ret z
- ld [hl], "0"
- ret
-
-.AdvancePointer: ; c64a
-; increments the pointer unless leading zeroes are not being printed,
-; the number is left-aligned, and no nonzero digits have been printed yet
- bit 7, d ; print leading zeroes?
- jr nz, .inc
- bit 6, d ; left alignment or right alignment?
- jr z, .inc
- ld a, [hPrintNum1]
- and a
- ret z
-.inc
- inc hl
- ret
-
-HealParty: ; c658
- xor a
- ld [CurPartyMon], a
- ld hl, PartySpecies
-.loop
- ld a, [hli]
- cp -1
- jr z, .done
- cp EGG
- jr z, .next
-
- push hl
- call HealPartyMon
- pop hl
-
-.next
- ld a, [CurPartyMon]
- inc a
- ld [CurPartyMon], a
- jr .loop
-
-.done
- ret
-
-HealPartyMon: ; c677
- ld a, MON_SPECIES
- call GetPartyParamLocation
- ld d, h
- ld e, l
-
- ld hl, MON_STATUS
- add hl, de
- xor a
- ld [hli], a
- ld [hl], a
-
- ld hl, MON_MAXHP
- add hl, de
-
- ; bc = MON_HP
- ld b, h
- ld c, l
- dec bc
- dec bc
-
- ld a, [hli]
- ld [bc], a
- inc bc
- ld a, [hl]
- ld [bc], a
-
- callba RestoreAllPP
- ret
-
-ComputeHPBarPixels: ; c699
-; bc * (6 * 8) / de
- ld a, b
- or c
- jr z, .zero
- push hl
- xor a
- ld [hMultiplicand + 0], a
- ld a, b
- ld [hMultiplicand + 1], a
- ld a, c
- ld [hMultiplicand + 2], a
- ld a, 6 * 8
- ld [hMultiplier], a
- call Multiply
- ; We need de to be under 256 because hDivisor is only 1 byte.
- ld a, d
- and a
- jr z, .divide
- ; divide de and hProduct by 4
- srl d
- rr e
- srl d
- rr e
- ld a, [hProduct + 2]
- ld b, a
- ld a, [hProduct + 3]
- srl b
- rr a
- srl b
- rr a
- ld [hDividend + 3], a
- ld a, b
- ld [hDividend + 2], a
-.divide
- ld a, e
- ld [hDivisor], a
- ld b, 4
- call Divide
- ld a, [hQuotient + 2]
- ld e, a
- pop hl
- and a
- ret nz
- ld e, 1
- ret
-
-.zero
- ld e, 0
- ret
-
-AnimateHPBar: ; c6e0
- call WaitBGMap
- call _AnimateHPBar
- call WaitBGMap
- ret
-
-ClearBuffer1: ; c6ea
- xor a
- ld hl, Buffer1
- ld bc, 7
- call ByteFill
- ret
-
-FieldMoveJumptable: ; c6f5
- ld a, [Buffer1]
- rst JumpTable
- ld [Buffer1], a
- bit 7, a
- jr nz, .okay
- and a
- ret
-
-.okay
- and $7f
- scf
- ret
-
-GetPartyNick: ; c706
-; write CurPartyMon nickname to StringBuffer1-3
- ld hl, PartyMonNicknames
- ld a, BOXMON
- ld [MonType], a
- ld a, [CurPartyMon]
- call GetNick
- call CopyName1
-; copy text from StringBuffer2 to StringBuffer3
- ld de, StringBuffer2
- ld hl, StringBuffer3
- call CopyName2
- ret
-
-CheckEngineFlag: ; c721
-; Check engine flag de
-; Return carry if flag is not set
- ld b, CHECK_FLAG
- callba EngineFlagAction
- ld a, c
- and a
- jr nz, .isset
- scf
- ret
-.isset
- xor a
- ret
-
-CheckBadge: ; c731
-; Check engine flag a (ENGINE_ZEPHYRBADGE thru ENGINE_EARTHBADGE)
-; Display "Badge required" text and return carry if the badge is not owned
- call CheckEngineFlag
- ret nc
- ld hl, .BadgeRequiredText
- call MenuTextBoxBackup ; push text to queue
- scf
- ret
-
-.BadgeRequiredText: ; c73d
- ; Sorry! A new BADGE
- ; is required.
- text_jump _BadgeRequiredText
- db "@"
-
-CheckPartyMove: ; c742
-; Check if a monster in your party has move d.
-
- ld e, 0
- xor a
- ld [CurPartyMon], a
-.loop
- ld c, e
- ld b, 0
- ld hl, PartySpecies
- add hl, bc
- ld a, [hl]
- and a
- jr z, .no
- cp a, -1
- jr z, .no
- cp a, EGG
- jr z, .next
-
- ld bc, PARTYMON_STRUCT_LENGTH
- ld hl, PartyMon1Moves
- ld a, e
- call AddNTimes
- ld b, NUM_MOVES
-.check
- ld a, [hli]
- cp d
- jr z, .yes
- dec b
- jr nz, .check
-
-.next
- inc e
- jr .loop
-
-.yes
- ld a, e
- ld [CurPartyMon], a ; which mon has the move
- xor a
- ret
-.no
- scf
- ret
-
-FieldMoveFailed: ; c779
- ld hl, .CantUseHere
- call MenuTextBoxBackup
- ret
-
-.CantUseHere: ; 0xc780
- ; Can't use that here.
- text_jump UnknownText_0x1c05c8
- db "@"
-
-CutFunction: ; c785
- call ClearBuffer1
-.loop
- ld hl, .Jumptable
- call FieldMoveJumptable
- jr nc, .loop
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.Jumptable: ; c796 (3:4796)
-
- dw .CheckAble
- dw .DoCut
- dw .FailCut
-
-.CheckAble: ; c79c (3:479c)
- ld de, ENGINE_HIVEBADGE
- call CheckBadge
- jr c, .nohivebadge
- call CheckMapForSomethingToCut
- jr c, .nothingtocut
- ld a, $1
- ret
-
-.nohivebadge
- ld a, $80
- ret
-
-.nothingtocut
- ld a, $2
- ret
-
-.DoCut: ; c7b2 (3:47b2)
- ld hl, Script_CutFromMenu
- call QueueScript
- ld a, $81
- ret
-
-.FailCut: ; c7bb (3:47bb)
- ld hl, Text_NothingToCut
- call MenuTextBoxBackup
- ld a, $80
- ret
-
-Text_UsedCut: ; 0xc7c4
- ; used CUT!
- text_jump UnknownText_0x1c05dd
- db "@"
-
-Text_NothingToCut: ; 0xc7c9
- ; There's nothing to CUT here.
- text_jump UnknownText_0x1c05ec
- db "@"
-
-CheckMapForSomethingToCut: ; c7ce
- ; Does the collision data of the facing tile permit cutting?
- call GetFacingTileCoord
- ld c, a
- push de
- callba CheckCutCollision
- pop de
- jr nc, .fail
- ; Get the location of the current block in OverworldMap.
- call GetBlockLocation
- ld c, [hl]
- ; See if that block contains something that can be cut.
- push hl
- ld hl, CutTreeBlockPointers
- call CheckOverworldTileArrays
- pop hl
- jr nc, .fail
- ; Back up the OverworldMap address to Buffer3
- ld a, l
- ld [Buffer3], a
- ld a, h
- ld [Buffer4], a
- ; Back up the replacement tile to Buffer5
- ld a, b
- ld [Buffer5], a
- ; Back up the animation index to Buffer6
- ld a, c
- ld [Buffer6], a
- xor a
- ret
-
-.fail
- scf
- ret
-
-Script_CutFromMenu: ; c7fe
- reloadmappart
- special UpdateTimePals
-
-Script_Cut: ; 0xc802
- callasm GetPartyNick
- writetext Text_UsedCut
- reloadmappart
- callasm CutDownTreeOrGrass
- closetext
- end
-
-CutDownTreeOrGrass: ; c810
- ld hl, Buffer3 ; OverworldMapTile
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [Buffer5] ; ReplacementTile
- ld [hl], a
- xor a
- ld [hBGMapMode], a
- call OverworldTextModeSwitch
- call UpdateSprites
- call DelayFrame
- ld a, [Buffer6] ; Animation type
- ld e, a
- callba OWCutAnimation
- call BufferScreen
- call GetMovementPermissions
- call UpdateSprites
- call DelayFrame
- call LoadStandardFont
- ret
-
-CheckOverworldTileArrays: ; c840
- ; Input: c contains the tile you're facing
- ; Output: Replacement tile in b and effect on wild encounters in c, plus carry set.
- ; Carry is not set if the facing tile cannot be replaced, or if the tileset
- ; does not contain a tile you can replace.
-
- ; Dictionary lookup for pointer to tile replacement table
- push bc
- ld a, [wTileset]
- ld de, 3
- call IsInArray
- pop bc
- jr nc, .nope
- ; Load the pointer
- inc hl
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ; Look up the tile you're facing
- ld de, 3
- ld a, c
- call IsInArray
- jr nc, .nope
- ; Load the replacement to b
- inc hl
- ld b, [hl]
- ; Load the animation type parameter to c
- inc hl
- ld c, [hl]
- scf
- ret
-
-.nope
- xor a
- ret
-
-CutTreeBlockPointers: ; c862
-; Which tileset are we in?
- dbw TILESET_JOHTO_1, .johto1
- dbw TILESET_JOHTO_2, .johto2
- dbw TILESET_KANTO, .kanto
- dbw TILESET_PARK, .park
- dbw TILESET_ILEX_FOREST, .ilex
- db -1
-
-.johto1: ; Johto OW
-; Which meta tile are we facing, which should we replace it with, and which animation?
- db $03, $02, $01 ; grass
- db $5b, $3c, $00 ; tree
- db $5f, $3d, $00 ; tree
- db $63, $3f, $00 ; tree
- db $67, $3e, $00 ; tree
- db -1
-
-.johto2: ; Goldenrod area
- db $03, $02, $01 ; grass
- db -1
-
-.kanto: ; Kanto OW
- db $0b, $0a, $01 ; grass
- db $32, $6d, $00 ; tree
- db $33, $6c, $00 ; tree
- db $34, $6f, $00 ; tree
- db $35, $4c, $00 ; tree
- db $60, $6e, $00 ; tree
- db -1
-
-.park: ; National Park
- db $13, $03, $01 ; grass
- db $03, $04, $01 ; grass
- db -1
-
-.ilex: ; Ilex Forest
- db $0f, $17, $00
- db -1
-
-WhirlpoolBlockPointers: ; c8a4
- dbw TILESET_JOHTO_1, .johto
- db -1
-
-.johto: ; c8a8
- db $07, $36, $00
- db -1
-
-OWFlash: ; c8ac
- call .CheckUseFlash
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.CheckUseFlash: ; c8b5
-; Flash
- ld de, ENGINE_ZEPHYRBADGE
- callba CheckBadge
- jr c, .nozephyrbadge
- push hl
- callba SpecialAerodactylChamber
- pop hl
- jr c, .useflash
- ld a, [wTimeOfDayPalset]
- cp %11111111 ; 3, 3, 3, 3
- jr nz, .notadarkcave
-.useflash
- call UseFlash
- ld a, $81
- ret
-
-.notadarkcave
- call FieldMoveFailed
- ld a, $80
- ret
-
-.nozephyrbadge
- ld a, $80
- ret
-
-UseFlash: ; c8e0
- ld hl, Script_UseFlash
- jp QueueScript
-
-Script_UseFlash: ; 0xc8e6
- reloadmappart
- special UpdateTimePals
- writetext UnknownText_0xc8f3
- callasm BlindingFlash
- closetext
- end
-
-UnknownText_0xc8f3: ; 0xc8f3
- text_jump UnknownText_0x1c0609
- start_asm
- call WaitSFX
- ld de, SFX_FLASH
- call PlaySFX
- call WaitSFX
- ld hl, .BlankText
- ret
-
-.BlankText: ; 0xc908
- db "@"
-
-SurfFunction: ; c909
- call ClearBuffer1
-.loop
- ld hl, .Jumptable
- call FieldMoveJumptable
- jr nc, .loop
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.Jumptable: ; c91a (3:491a)
- dw .TrySurf
- dw .DoSurf
- dw .FailSurf
- dw .AlreadySurfing
-
-.TrySurf: ; c922 (3:4922)
- ld de, ENGINE_FOGBADGE
- call CheckBadge
- jr c, .asm_c956
- ld hl, BikeFlags
- bit 1, [hl] ; always on bike
- jr nz, .cannotsurf
- ld a, [PlayerState]
- cp PLAYER_SURF
- jr z, .alreadyfail
- cp PLAYER_SURF_PIKA
- jr z, .alreadyfail
- call GetFacingTileCoord
- call GetTileCollision
- cp $1
- jr nz, .cannotsurf
- call CheckDirection
- jr c, .cannotsurf
- callba CheckFacingObject
- jr c, .cannotsurf
- ld a, $1
- ret
-.asm_c956
- ld a, $80
- ret
-.alreadyfail
- ld a, $3
- ret
-.cannotsurf
- ld a, $2
- ret
-
-.DoSurf: ; c95f (3:495f)
- call GetSurfType
- ld [Buffer2], a ; wd1eb (aliases: MovementType)
- call GetPartyNick
- ld hl, SurfFromMenuScript
- call QueueScript
- ld a, $81
- ret
-
-.FailSurf: ; c971 (3:4971)
- ld hl, CantSurfText
- call MenuTextBoxBackup
- ld a, $80
- ret
-
-.AlreadySurfing: ; c97a (3:497a)
- ld hl, AlreadySurfingText
- call MenuTextBoxBackup
- ld a, $80
- ret
-
-SurfFromMenuScript: ; c983
- special UpdateTimePals
-
-UsedSurfScript: ; c986
- writetext UsedSurfText ; "used SURF!"
- waitbutton
- closetext
-
- callasm .empty_fn ; empty function
-
- copybytetovar Buffer2
- writevarcode VAR_MOVEMENT
-
- special ReplaceKrisSprite
- special PlayMapMusic
-; step into the water
- special Special_SurfStartStep ; (slow_step_x, step_end)
- applymovement PLAYER, MovementBuffer ; PLAYER, MovementBuffer
- end
-
-.empty_fn: ; c9a2
- callba MobileFn_1060bb ; empty
- ret
-
-UsedSurfText: ; c9a9
- text_jump _UsedSurfText
- db "@"
-
-CantSurfText: ; c9ae
- text_jump _CantSurfText
- db "@"
-
-AlreadySurfingText: ; c9b3
- text_jump _AlreadySurfingText
- db "@"
-
-GetSurfType: ; c9b8
-; Surfing on Pikachu uses an alternate sprite.
-; This is done by using a separate movement type.
-
- ld a, [CurPartyMon]
- ld e, a
- ld d, 0
- ld hl, PartySpecies
- add hl, de
-
- ld a, [hl]
- cp PIKACHU
- ld a, PLAYER_SURF_PIKA
- ret z
- ld a, PLAYER_SURF
- ret
-
-CheckDirection: ; c9cb
-; Return carry if a tile permission prevents you
-; from moving in the direction you're facing.
-
-; Get player direction
- ld a, [PlayerDirection]
- and a, %00001100 ; bits 2 and 3 contain direction
- rrca
- rrca
- ld e, a
- ld d, 0
- ld hl, .Directions
- add hl, de
-
-; Can you walk in this direction?
- ld a, [TilePermissions]
- and [hl]
- jr nz, .quit
- xor a
- ret
-
-.quit
- scf
- ret
-
-.Directions
- db FACE_DOWN
- db FACE_UP
- db FACE_LEFT
- db FACE_RIGHT
-
-TrySurfOW:: ; c9e7
-; Checking a tile in the overworld.
-; Return carry if fail is allowed.
-
-; Don't ask to surf if already fail.
- ld a, [PlayerState]
- cp PLAYER_SURF_PIKA
- jr z, .quit
- cp PLAYER_SURF
- jr z, .quit
-
-; Must be facing water.
- ld a, [EngineBuffer1]
- call GetTileCollision
- cp 1 ; surfable
- jr nz, .quit
-
-; Check tile permissions.
- call CheckDirection
- jr c, .quit
-
- ld de, ENGINE_FOGBADGE
- call CheckEngineFlag
- jr c, .quit
-
- ld d, SURF
- call CheckPartyMove
- jr c, .quit
-
- ld hl, BikeFlags
- bit 1, [hl] ; always on bike (can't surf)
- jr nz, .quit
-
- call GetSurfType
- ld [MovementType], a
- call GetPartyNick
-
- ld a, BANK(AskSurfScript)
- ld hl, AskSurfScript
- call CallScript
-
- scf
- ret
-
-.quit
- xor a
- ret
-
-AskSurfScript: ; ca2c
- opentext
- writetext AskSurfText
- yesorno
- iftrue UsedSurfScript
- closetext
- end
-
-AskSurfText: ; ca36
- text_jump _AskSurfText ; The water is calm.
- db "@" ; Want to SURF?
-
-FlyFunction: ; ca3b
- call ClearBuffer1
-.loop
- ld hl, .Jumptable
- call FieldMoveJumptable
- jr nc, .loop
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.Jumptable
- dw .TryFly
- dw .DoFly
- dw .FailFly
-
-.TryFly: ; ca52
-; Fly
- ld de, ENGINE_STORMBADGE
- call CheckBadge
- jr c, .nostormbadge
- call GetMapPermission
- call CheckOutdoorMap
- jr z, .outdoors
- jr .indoors
-
-.outdoors
- xor a
- ld [hMapAnims], a
- call LoadStandardMenuDataHeader
- call ClearSprites
- callba _FlyMap
- ld a, e
- cp -1
- jr z, .illegal
- cp NUM_SPAWNS
- jr nc, .illegal
-
- ld [wd001], a
- call CloseWindow
- ld a, $1
- ret
-
-.nostormbadge
- ld a, $82
- ret
-
-.indoors
- ld a, $2
- ret
-
-.illegal
- call CloseWindow
- call WaitBGMap
- ld a, $80
- ret
-
-.DoFly: ; ca94
- ld hl, .FlyScript
- call QueueScript
- ld a, $81
- ret
-
-.FailFly: ; ca9d
- call FieldMoveFailed
- ld a, $82
- ret
-
-.FlyScript: ; 0xcaa3
- reloadmappart
- callasm HideSprites
- special UpdateTimePals
- callasm FlyFromAnim
- farscall Script_AbortBugContest
- special WarpToSpawnPoint
- callasm DelayLoadingNewSprites
- writecode VAR_MOVEMENT, PLAYER_NORMAL
- newloadmap MAPSETUP_FLY
- callasm FlyToAnim
- special WaitSFX
- callasm .ReturnFromFly
- end
-
-.ReturnFromFly: ; cacb
- callba Function561d
- call DelayFrame
- call ReplaceKrisSprite
- callba LoadOverworldFont
- ret
-
-WaterfallFunction: ; cade
- call .TryWaterfall
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.TryWaterfall: ; cae7
-; Waterfall
- ld de, ENGINE_RISINGBADGE
- callba CheckBadge
- ld a, $80
- ret c
- call CheckMapCanWaterfall
- jr c, .failed
- ld hl, Script_WaterfallFromMenu
- call QueueScript
- ld a, $81
- ret
-
-.failed
- call FieldMoveFailed
- ld a, $80
- ret
-
-CheckMapCanWaterfall: ; cb07
- ld a, [PlayerDirection]
- and $c
- cp FACE_UP
- jr nz, .failed
- ld a, [TileUp]
- call CheckWaterfallTile
- jr nz, .failed
- xor a
- ret
-
-.failed
- scf
- ret
-
-Script_WaterfallFromMenu: ; 0xcb1c
- reloadmappart
- special UpdateTimePals
-
-Script_UsedWaterfall: ; 0xcb20
- callasm GetPartyNick
- writetext .Text_UsedWaterfall
- waitbutton
- closetext
- playsound SFX_BUBBLEBEAM
-.loop
- applymovement PLAYER, .WaterfallStep
- callasm .CheckContinueWaterfall
- iffalse .loop
- end
-
-.CheckContinueWaterfall: ; cb38
- xor a
- ld [ScriptVar], a
- ld a, [PlayerStandingTile]
- call CheckWaterfallTile
- ret z
- callba MobileFn_1060c1
- ld a, $1
- ld [ScriptVar], a
- ret
-
-.WaterfallStep: ; cb4f
- turn_waterfall_up
- step_end
-
-.Text_UsedWaterfall: ; 0xcb51
- ; used WATERFALL!
- text_jump UnknownText_0x1c068e
- db "@"
-
-TryWaterfallOW:: ; cb56
- ld d, WATERFALL
- call CheckPartyMove
- jr c, .failed
- ld de, ENGINE_RISINGBADGE
- call CheckEngineFlag
- jr c, .failed
- call CheckMapCanWaterfall
- jr c, .failed
- ld a, BANK(Script_AskWaterfall)
- ld hl, Script_AskWaterfall
- call CallScript
- scf
- ret
-
-.failed
- ld a, BANK(Script_CantDoWaterfall)
- ld hl, Script_CantDoWaterfall
- call CallScript
- scf
- ret
-
-Script_CantDoWaterfall: ; 0xcb7e
- jumptext .Text_CantDoWaterfall
-
-.Text_CantDoWaterfall: ; 0xcb81
- ; Wow, it's a huge waterfall.
- text_jump UnknownText_0x1c06a3
- db "@"
-
-Script_AskWaterfall: ; 0xcb86
- opentext
- writetext .AskUseWaterfall
- yesorno
- iftrue Script_UsedWaterfall
- closetext
- end
-
-.AskUseWaterfall: ; 0xcb90
- ; Do you want to use WATERFALL?
- text_jump UnknownText_0x1c06bf
- db "@"
-
-EscapeRopeFunction: ; cb95
- call ClearBuffer1
- ld a, $1
- jr dig_incave
-
-DigFunction: ; cb9c
- call ClearBuffer1
- ld a, $2
-
-dig_incave
- ld [Buffer2], a
-.loop
- ld hl, .DigTable
- call FieldMoveJumptable
- jr nc, .loop
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.DigTable: ; cbb2
- dw .CheckCanDig
- dw .DoDig
- dw .FailDig
-
-.CheckCanDig: ; cbb8
- call GetMapPermission
- cp CAVE
- jr z, .incave
- cp DUNGEON
- jr z, .incave
-.fail
- ld a, $2
- ret
-
-.incave
- ld hl, wDigWarp
- ld a, [hli]
- and a
- jr z, .fail
- ld a, [hli]
- and a
- jr z, .fail
- ld a, [hl]
- and a
- jr z, .fail
- ld a, $1
- ret
-
-.DoDig: ; cbd8
- ld hl, wDigWarp
- ld de, wNextWarp
- ld bc, 3
- call CopyBytes
- call GetPartyNick
- ld a, [Buffer2]
- cp $2
- jr nz, .escaperope
- ld hl, .UsedDigScript
- call QueueScript
- ld a, $81
- ret
-
-.escaperope
- callba SpecialKabutoChamber
- ld hl, .UsedEscapeRopeScript
- call QueueScript
- ld a, $81
- ret
-
-.FailDig: ; cc06
- ld a, [Buffer2]
- cp $2
- jr nz, .failescaperope
- ld hl, .Text_CantUseHere
- call MenuTextBox
- call WaitPressAorB_BlinkCursor
- call CloseWindow
-
-.failescaperope
- ld a, $80
- ret
-
-.Text_UsedDig: ; 0xcc1c
- ; used DIG!
- text_jump UnknownText_0x1c06de
- db "@"
-
-.Text_UsedEscapeRope: ; 0xcc21
- ; used an ESCAPE ROPE.
- text_jump UnknownText_0x1c06ed
- db "@"
-
-.Text_CantUseHere: ; 0xcc26
- ; Can't use that here.
- text_jump UnknownText_0x1c0705
- db "@"
-
-.UsedEscapeRopeScript: ; 0xcc2b
- reloadmappart
- special UpdateTimePals
- writetext .Text_UsedEscapeRope
- jump .UsedDigOrEscapeRopeScript
-
-.UsedDigScript: ; 0xcc35
- reloadmappart
- special UpdateTimePals
- writetext .Text_UsedDig
-
-.UsedDigOrEscapeRopeScript: ; 0xcc3c
- waitbutton
- closetext
- playsound SFX_WARP_TO
- applymovement PLAYER, .DigOut
- farscall Script_AbortBugContest
- special WarpToSpawnPoint
- writecode VAR_MOVEMENT, PLAYER_NORMAL
- newloadmap MAPSETUP_DOOR
- playsound SFX_WARP_FROM
- applymovement PLAYER, .DigReturn
- end
-
-.DigOut: ; 0xcc59
- step_dig 32
- hide_person
- step_end
-
-.DigReturn: ; 0xcc5d
- show_person
- return_dig 32
- step_end
-
-TeleportFunction: ; cc61
- call ClearBuffer1
-.loop
- ld hl, .Jumptable
- call FieldMoveJumptable
- jr nc, .loop
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.Jumptable: ; cc72
- dw .TryTeleport
- dw .DoTeleport
- dw .FailTeleport
-
-.TryTeleport: ; cc78
- call GetMapPermission
- call CheckOutdoorMap
- jr z, .CheckIfSpawnPoint
- jr .nope
-
-.CheckIfSpawnPoint
- ld a, [wLastSpawnMapGroup]
- ld d, a
- ld a, [wLastSpawnMapNumber]
- ld e, a
- callba IsSpawnPoint
- jr nc, .nope
- ld a, c
- ld [wd001], a
- ld a, $1
- ret
-
-.nope
- ld a, $2
- ret
-
-.DoTeleport: ; cc9c
- call GetPartyNick
- ld hl, .TeleportScript
- call QueueScript
- ld a, $81
- ret
-
-.FailTeleport: ; cca8
- ld hl, .Text_CantUseHere
- call MenuTextBoxBackup
- ld a, $80
- ret
-
-.Text_ReturnToLastMonCenter: ; 0xccb1
- ; Return to the last #MON CENTER.
- text_jump UnknownText_0x1c071a
- db "@"
-
-.Text_CantUseHere: ; 0xccb6
- ; Can't use that here.
- text_jump UnknownText_0x1c073b
- db "@"
-
-.TeleportScript: ; 0xccbb
- reloadmappart
- special UpdateTimePals
- writetext .Text_ReturnToLastMonCenter
- pause 60
- reloadmappart
- closetext
- playsound SFX_WARP_TO
- applymovement PLAYER, .TeleportFrom
- farscall Script_AbortBugContest
- special WarpToSpawnPoint
- writecode VAR_MOVEMENT, PLAYER_NORMAL
- newloadmap MAPSETUP_TELEPORT
- playsound SFX_WARP_FROM
- applymovement PLAYER, .TeleportTo
- end
-
-.TeleportFrom: ; cce1
- teleport_from
- step_end
-
-.TeleportTo: ; cce3
- teleport_to
- step_end
-
-StrengthFunction: ; cce5
- call .TryStrength
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.TryStrength: ; ccee
-; Strength
- ld de, ENGINE_PLAINBADGE
- call CheckBadge
- jr c, .Failed
- jr .UseStrength
-
-.AlreadyUsing: ; unreferenced
- ld hl, .JumpText
- call MenuTextBoxBackup
- ld a, $80
- ret
-
-.JumpText: ; 0xcd01
- text_jump UnknownText_0x1c0751
- db "@"
-
-.Failed: ; cd06
- ld a, $80
- ret
-
-.UseStrength: ; cd09
- ld hl, Script_StrengthFromMenu
- call QueueScript
- ld a, $81
- ret
-
-SetStrengthFlag: ; cd12
- ld hl, BikeFlags
- set 0, [hl]
- ld a, [CurPartyMon]
- ld e, a
- ld d, 0
- ld hl, PartySpecies
- add hl, de
- ld a, [hl]
- ld [Buffer6], a
- call GetPartyNick
- ret
-
-Script_StrengthFromMenu: ; 0xcd29
- reloadmappart
- special UpdateTimePals
-
-Script_UsedStrength: ; 0xcd2d
- callasm SetStrengthFlag
- writetext .UsedStrength
- copybytetovar Buffer6
- cry 0
- pause 3
- writetext .StrengthAllowedItToMoveBoulders
- closetext
- end
-
-.UsedStrength: ; 0xcd41
- text_jump UnknownText_0x1c0774
- db "@"
-
-.StrengthAllowedItToMoveBoulders: ; 0xcd46
- text_jump UnknownText_0x1c0788
- db "@"
-
-AskStrengthScript:
- callasm TryStrengthOW
- iffalse .AskStrength
- if_equal $1, .DontMeetRequirements
- jump .AlreadyUsedStrength
-
-.DontMeetRequirements: ; 0xcd59
- jumptext UnknownText_0xcd73
-
-.AlreadyUsedStrength: ; 0xcd5c
- jumptext UnknownText_0xcd6e
-
-.AskStrength: ; 0xcd5f
- opentext
- writetext UnknownText_0xcd69
- yesorno
- iftrue Script_UsedStrength
- closetext
- end
-
-UnknownText_0xcd69: ; 0xcd69
- ; A #MON may be able to move this. Want to use STRENGTH?
- text_jump UnknownText_0x1c07a0
- db "@"
-
-UnknownText_0xcd6e: ; 0xcd6e
- ; Boulders may now be moved!
- text_jump UnknownText_0x1c07d8
- db "@"
-
-UnknownText_0xcd73: ; 0xcd73
- ; A #MON may be able to move this.
- text_jump UnknownText_0x1c07f4
- db "@"
-
-TryStrengthOW: ; cd78
- ld d, STRENGTH
- call CheckPartyMove
- jr c, .nope
-
- ld de, ENGINE_PLAINBADGE
- call CheckEngineFlag
- jr c, .nope
-
- ld hl, BikeFlags
- bit 0, [hl]
- jr z, .already_using
-
- ld a, 2
- jr .done
-
-.nope
- ld a, 1
- jr .done
-
-.already_using
- xor a
- jr .done
-
-.done
- ld [ScriptVar], a
- ret
-
-WhirlpoolFunction: ; cd9d
- call ClearBuffer1
-.loop
- ld hl, Jumptable_cdae
- call FieldMoveJumptable
- jr nc, .loop
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-Jumptable_cdae: ; cdae
- dw .TryWhirlpool
- dw .DoWhirlpool
- dw .FailWhirlpool
-
-.TryWhirlpool: ; cdb4
- ld de, ENGINE_GLACIERBADGE
- call CheckBadge
- jr c, .noglacierbadge
- call TryWhirlpoolMenu
- jr c, .failed
- ld a, $1
- ret
-
-.failed
- ld a, $2
- ret
-
-.noglacierbadge
- ld a, $80
- ret
-
-.DoWhirlpool: ; cdca
- ld hl, Script_WhirlpoolFromMenu
- call QueueScript
- ld a, $81
- ret
-
-.FailWhirlpool: ; cdd3
- call FieldMoveFailed
- ld a, $80
- ret
-
-Text_UsedWhirlpool: ; 0xcdd9
- ; used WHIRLPOOL!
- text_jump UnknownText_0x1c0816
- db "@"
-
-TryWhirlpoolMenu: ; cdde
- call GetFacingTileCoord
- ld c, a
- push de
- call CheckWhirlpoolTile
- pop de
- jr c, .failed
- call GetBlockLocation
- ld c, [hl]
- push hl
- ld hl, WhirlpoolBlockPointers
- call CheckOverworldTileArrays
- pop hl
- jr nc, .failed
- ld a, l
- ld [Buffer3], a
- ld a, h
- ld [Buffer4], a
- ld a, b
- ld [Buffer5], a
- ld a, c
- ld [Buffer6], a
- xor a
- ret
-
-.failed
- scf
- ret
-
-Script_WhirlpoolFromMenu: ; 0xce0b
- reloadmappart
- special UpdateTimePals
-
-Script_UsedWhirlpool: ; 0xce0f
- callasm GetPartyNick
- writetext Text_UsedWhirlpool
- reloadmappart
- callasm DisappearWhirlpool
- closetext
- end
-
-DisappearWhirlpool: ; ce1d
- ld hl, Buffer3
- ld a, [hli]
- ld h, [hl]
- ld l, a
- ld a, [Buffer5]
- ld [hl], a
- xor a
- ld [hBGMapMode], a
- call OverworldTextModeSwitch
- ld a, [Buffer6]
- ld e, a
- callba PlayWhirlpoolSound
- call BufferScreen
- call GetMovementPermissions
- ret
-
-TryWhirlpoolOW:: ; ce3e
- ld d, WHIRLPOOL
- call CheckPartyMove
- jr c, .failed
- ld de, ENGINE_GLACIERBADGE
- call CheckEngineFlag
- jr c, .failed
- call TryWhirlpoolMenu
- jr c, .failed
- ld a, BANK(Script_AskWhirlpoolOW)
- ld hl, Script_AskWhirlpoolOW
- call CallScript
- scf
- ret
-
-.failed
- ld a, BANK(Script_MightyWhirlpool)
- ld hl, Script_MightyWhirlpool
- call CallScript
- scf
- ret
-
-Script_MightyWhirlpool: ; 0xce66
- jumptext .MightyWhirlpoolText
-
-.MightyWhirlpoolText: ; 0xce69
- text_jump UnknownText_0x1c082b
- db "@"
-
-Script_AskWhirlpoolOW: ; 0xce6e
- opentext
- writetext UnknownText_0xce78
- yesorno
- iftrue Script_UsedWhirlpool
- closetext
- end
-
-UnknownText_0xce78: ; 0xce78
- text_jump UnknownText_0x1c0864
- db "@"
-
-HeadbuttFunction: ; ce7d
- call TryHeadbuttFromMenu
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-TryHeadbuttFromMenu: ; ce86
- call GetFacingTileCoord
- call CheckHeadbuttTreeTile
- jr nz, .no_tree
-
- ld hl, HeadbuttFromMenuScript
- call QueueScript
- ld a, $81
- ret
-
-.no_tree
- call FieldMoveFailed
- ld a, $80
- ret
-
-UnknownText_0xce9d: ; 0xce9d
- ; did a HEADBUTT!
- text_jump UnknownText_0x1c0897
- db "@"
-
-UnknownText_0xcea2: ; 0xcea2
- ; Nope. Nothing…
- text_jump UnknownText_0x1c08ac
- db "@"
-
-HeadbuttFromMenuScript: ; 0xcea7
- reloadmappart
- special UpdateTimePals
-
-HeadbuttScript: ; 0xceab
- callasm GetPartyNick
- writetext UnknownText_0xce9d
-
- reloadmappart
- callasm ShakeHeadbuttTree
-
- callasm TreeMonEncounter
- iffalse .no_battle
- closetext
- randomwildmon
- startbattle
- reloadmapafterbattle
- end
-
-.no_battle
- writetext UnknownText_0xcea2
- waitbutton
- closetext
- end
-
-TryHeadbuttOW:: ; cec9
- ld d, HEADBUTT
- call CheckPartyMove
- jr c, .no
-
- ld a, BANK(AskHeadbuttScript)
- ld hl, AskHeadbuttScript
- call CallScript
- scf
- ret
-
-.no
- xor a
- ret
-
-AskHeadbuttScript: ; 0xcedc
- opentext
- writetext UnknownText_0xcee6
- yesorno
- iftrue HeadbuttScript
- closetext
- end
-
-UnknownText_0xcee6: ; 0xcee6
- ; A #MON could be in this tree. Want to HEADBUTT it?
- text_jump UnknownText_0x1c08bc
- db "@"
-
-RockSmashFunction: ; ceeb
- call TryRockSmashFromMenu
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-TryRockSmashFromMenu: ; cef4
- call GetFacingObject
- jr c, .no_rock
- ld a, d
- cp $18
- jr nz, .no_rock
-
- ld hl, RockSmashFromMenuScript
- call QueueScript
- ld a, $81
- ret
-
-.no_rock
- call FieldMoveFailed
- ld a, $80
- ret
-
-GetFacingObject: ; cf0d
- callba CheckFacingObject
- jr nc, .fail
-
- ld a, [hObjectStructIndexBuffer]
- call GetObjectStruct
- ld hl, OBJECT_MAP_OBJECT_INDEX
- add hl, bc
- ld a, [hl]
- ld [hLastTalked], a
- call GetMapObject
- ld hl, MAPOBJECT_MOVEMENT
- add hl, bc
- ld a, [hl]
- ld d, a
- and a
- ret
-
-.fail
- scf
- ret
-
-RockSmashFromMenuScript: ; 0xcf2e
- reloadmappart
- special UpdateTimePals
-
-RockSmashScript: ; cf32
- callasm GetPartyNick
- writetext UnknownText_0xcf58
- closetext
- special WaitSFX
- playsound SFX_STRENGTH
- earthquake 84
- applymovement2 MovementData_0xcf55
- disappear -2
-
- callasm RockMonEncounter
- copybytetovar TempWildMonSpecies
- iffalse .done
- randomwildmon
- startbattle
- reloadmapafterbattle
-.done
- end
-
-MovementData_0xcf55: ; 0xcf55
- rock_smash 10
- step_end
-
-UnknownText_0xcf58: ; 0xcf58
- text_jump UnknownText_0x1c08f0
- db "@"
-
-AskRockSmashScript: ; 0xcf5d
- callasm HasRockSmash
- if_equal 1, .no
-
- opentext
- writetext UnknownText_0xcf77
- yesorno
- iftrue RockSmashScript
- closetext
- end
-.no
- jumptext UnknownText_0xcf72
-
-UnknownText_0xcf72: ; 0xcf72
- ; Maybe a #MON can break this.
- text_jump UnknownText_0x1c0906
- db "@"
-
-UnknownText_0xcf77: ; 0xcf77
- ; This rock looks breakable. Want to use ROCK SMASH?
- text_jump UnknownText_0x1c0924
- db "@"
-
-HasRockSmash: ; cf7c
- ld d, ROCK_SMASH
- call CheckPartyMove
- jr nc, .yes
-.no
- ld a, 1
- jr .done
-.yes
- xor a
- jr .done
-.done
- ld [ScriptVar], a
- ret
-
-FishFunction: ; cf8e
- ld a, e
- push af
- call ClearBuffer1
- pop af
- ld [Buffer2], a
-.loop
- ld hl, .FishTable
- call FieldMoveJumptable
- jr nc, .loop
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.FishTable: ; cfa5
- dw .TryFish
- dw .FishNoBite
- dw .FishGotSomething
- dw .FailFish
- dw .FishNoFish
-
-.TryFish: ; cfaf
- ld a, [PlayerState]
- cp PLAYER_SURF
- jr z, .fail
- cp PLAYER_SURF_PIKA
- jr z, .fail
- call GetFacingTileCoord
- call GetTileCollision
- cp $1
- jr z, .facingwater
-.fail
- ld a, $3
- ret
-
-.facingwater
- call GetFishingGroup
- and a
- jr nz, .goodtofish
- ld a, $4
- ret
-
-.goodtofish
- ld d, a
- ld a, [Buffer2]
- ld e, a
- callba Fish
- ld a, d
- and a
- jr z, .nonibble
- ld [TempWildMonSpecies], a
- ld a, e
- ld [CurPartyLevel], a
- ld a, BATTLETYPE_FISH
- ld [BattleType], a
- ld a, $2
- ret
-
-.nonibble
- ld a, $1
- ret
-
-.FailFish: ; cff1
- ld a, $80
- ret
-
-.FishGotSomething: ; cff4
- ld a, $1
- ld [Buffer6], a
- ld hl, Script_GotABite
- call QueueScript
- ld a, $81
- ret
-
-.FishNoBite: ; d002
- ld a, $2
- ld [Buffer6], a
- ld hl, Script_NotEvenANibble
- call QueueScript
- ld a, $81
- ret
-
-.FishNoFish: ; d010
- ld a, $0
- ld [Buffer6], a
- ld hl, Script_NotEvenANibble2
- call QueueScript
- ld a, $81
- ret
-
-Script_NotEvenANibble: ; 0xd01e
- scall Script_FishCastRod
- writetext UnknownText_0xd0a9
- jump Script_NotEvenANibble_FallThrough
-
-Script_NotEvenANibble2: ; 0xd027
- scall Script_FishCastRod
- writetext UnknownText_0xd0a9
-
-Script_NotEvenANibble_FallThrough: ; 0xd02d
- loademote EMOTE_SHADOW
- callasm PutTheRodAway
- closetext
- end
-
-Script_GotABite: ; 0xd035
- scall Script_FishCastRod
- callasm Fishing_CheckFacingUp
- iffalse .NotFacingUp
- applymovement PLAYER, .Movement_FacingUp
- jump .FightTheHookedPokemon
-
-.NotFacingUp: ; 0xd046
- applymovement PLAYER, .Movement_NotFacingUp
-
-.FightTheHookedPokemon: ; 0xd04a
- pause 40
- applymovement PLAYER, .Movement_RestoreRod
- writetext UnknownText_0xd0a4
- callasm PutTheRodAway
- closetext
- randomwildmon
- startbattle
- reloadmapafterbattle
- end
-
-.Movement_NotFacingUp: ; d05c
- fish_got_bite
- fish_got_bite
- fish_got_bite
- fish_got_bite
- show_emote
- step_end
-
-.Movement_FacingUp: ; d062
- fish_got_bite
- fish_got_bite
- fish_got_bite
- fish_got_bite
- step_sleep_1
- show_emote
- step_end
-
-.Movement_RestoreRod: ; d069
- hide_emote
- fish_cast_rod
- step_end
-
-Fishing_CheckFacingUp: ; d06c
- ld a, [PlayerDirection]
- and $c
- cp OW_UP
- ld a, $1
- jr z, .up
- xor a
-
-.up
- ld [ScriptVar], a
- ret
-
-Script_FishCastRod: ; 0xd07c
- reloadmappart
- loadvar hBGMapMode, $0
- special UpdateTimePals
- loademote EMOTE_ROD
- callasm LoadFishingGFX
- loademote EMOTE_SHOCK
- applymovement PLAYER, MovementData_0xd093
- pause 40
- end
-
-MovementData_0xd093: ; d093
- fish_cast_rod
- step_end
-
-PutTheRodAway: ; d095
- xor a
- ld [hBGMapMode], a
- ld a, $1
- ld [PlayerAction], a
- call UpdateSprites
- call ReplaceKrisSprite
- ret
-
-UnknownText_0xd0a4: ; 0xd0a4
- ; Oh! A bite!
- text_jump UnknownText_0x1c0958
- db "@"
-
-UnknownText_0xd0a9: ; 0xd0a9
- ; Not even a nibble!
- text_jump UnknownText_0x1c0965
- db "@"
-
-UnknownText_0xd0ae: ; unused
- ; Looks like there's nothing here.
- text_jump UnknownText_0x1c0979
- db "@"
-
-BikeFunction: ; d0b3
- call .TryBike
- and $7f
- ld [wFieldMoveSucceeded], a
- ret
-
-.TryBike: ; d0bc
- call .CheckEnvironment
- jr c, .CannotUseBike
- ld a, [PlayerState]
- cp PLAYER_NORMAL
- jr z, .GetOnBike
- cp PLAYER_BIKE
- jr z, .GetOffBike
- jr .CannotUseBike
-
-.GetOnBike
- ld hl, Script_GetOnBike
- ld de, Script_GetOnBike_Register
- call .CheckIfRegistered
- call QueueScript
- xor a
- ld [MusicFade], a
- ld de, MUSIC_NONE
- call PlayMusic
- call DelayFrame
- call MaxVolume
- ld de, MUSIC_BICYCLE
- ld a, e
- ld [wMapMusic], a
- call PlayMusic
- ld a, $1
- ret
-
-.GetOffBike
- ld hl, BikeFlags
- bit 1, [hl]
- jr nz, .CantGetOffBike
- ld hl, Script_GetOffBike
- ld de, Script_GetOffBike_Register
- call .CheckIfRegistered
- ld a, $3
- jr .done
-
-.CantGetOffBike
- ld hl, Script_CantGetOffBike
- jr .done
-
-.CannotUseBike
- ld a, $0
- ret
-
-.done
- call QueueScript
- ld a, $1
- ret
-
-.CheckIfRegistered: ; d119
- ld a, [wUsingItemWithSelect]
- and a
- ret z
- ld h, d
- ld l, e
- ret
-
-.CheckEnvironment: ; d121
- call GetMapPermission
- call CheckOutdoorMap
- jr z, .ok
- cp CAVE
- jr z, .ok
- cp GATE
- jr z, .ok
- jr .nope
-
-.ok
- call GetPlayerStandingTile
- and $f ; can't use our bike in a wall or on water
- jr nz, .nope
- xor a
- ret
-
-.nope
- scf
- ret
-
-Script_GetOnBike: ; 0xd13e
- reloadmappart
- special UpdateTimePals
- writecode VAR_MOVEMENT, PLAYER_BIKE
- writetext GotOnTheBikeText
- waitbutton
- closetext
- special ReplaceKrisSprite
- end
-
-Script_GetOnBike_Register: ; 0xd14e
- writecode VAR_MOVEMENT, PLAYER_BIKE
- closetext
- special ReplaceKrisSprite
- end
-
-; XXX
- nop
- ret
-
-Script_GetOffBike: ; 0xd158
- reloadmappart
- special UpdateTimePals
- writecode VAR_MOVEMENT, PLAYER_NORMAL
- writetext GotOffTheBikeText
- waitbutton
-
-FinishGettingOffBike:
- closetext
- special ReplaceKrisSprite
- special PlayMapMusic
- end
-
-Script_GetOffBike_Register: ; 0xd16b
- writecode VAR_MOVEMENT, PLAYER_NORMAL
- jump FinishGettingOffBike
-
-Script_CantGetOffBike: ; 0xd171
- writetext .CantGetOffBikeText
- waitbutton
- closetext
- end
-
-.CantGetOffBikeText: ; 0xd177
- ; You can't get off here!
- text_jump UnknownText_0x1c099a
- db "@"
-
-GotOnTheBikeText: ; 0xd17c
- ; got on the @ .
- text_jump UnknownText_0x1c09b2
- db "@"
-
-GotOffTheBikeText: ; 0xd181
- ; got off the @ .
- text_jump UnknownText_0x1c09c7
- db "@"
-
-TryCutOW:: ; d186
- ld d, CUT
- call CheckPartyMove
- jr c, .cant_cut
-
- ld de, ENGINE_HIVEBADGE
- call CheckEngineFlag
- jr c, .cant_cut
-
- ld a, BANK(AskCutScript)
- ld hl, AskCutScript
- call CallScript
- scf
- ret
-
-.cant_cut
- ld a, BANK(CantCutScript)
- ld hl, CantCutScript
- call CallScript
- scf
- ret
-
-AskCutScript: ; 0xd1a9
- opentext
- writetext UnknownText_0xd1c8
- yesorno
- iffalse .script_d1b8
- callasm .CheckMap
- iftrue Script_Cut
-.script_d1b8
- closetext
- end
-
-.CheckMap: ; d1ba
- xor a
- ld [ScriptVar], a
- call CheckMapForSomethingToCut
- ret c
- ld a, TRUE
- ld [ScriptVar], a
- ret
-
-UnknownText_0xd1c8: ; 0xd1c8
- text_jump UnknownText_0x1c09dd
- db "@"
-
-CantCutScript: ; 0xd1cd
- jumptext UnknownText_0xd1d0
-
-UnknownText_0xd1d0: ; 0xd1d0
- text_jump UnknownText_0x1c0a05
- db "@"
-
-_ReceiveItem:: ; d1d5
- call DoesHLEqualNumItems
- jp nz, PutItemInPocket
- push hl
- call CheckItemPocket
- pop de
- ld a, [wItemAttributeParamBuffer]
- dec a
- ld hl, .Pockets
- rst JumpTable
- ret
-
-.Pockets: ; d1e9
- dw .Item
- dw .KeyItem
- dw .Ball
- dw .TMHM
-
-.Item: ; d1f1
- ld h, d
- ld l, e
- jp PutItemInPocket
-
-.KeyItem: ; d1f6
- ld h, d
- ld l, e
- jp ReceiveKeyItem
-
-.Ball: ; d1fb
- ld hl, NumBalls
- jp PutItemInPocket
-
-.TMHM: ; d201
- ld h, d
- ld l, e
- ld a, [CurItem]
- ld c, a
- call GetTMHMNumber
- jp ReceiveTMHM
-
-_TossItem:: ; d20d
- call DoesHLEqualNumItems
- jr nz, .remove
- push hl
- call CheckItemPocket
- pop de
- ld a, [wItemAttributeParamBuffer]
- dec a
- ld hl, .Pockets
- rst JumpTable
- ret
-
-.Pockets
- dw .Item
- dw .KeyItem
- dw .Ball
- dw .TMHM
-
-.Ball ; d228
- ld hl, NumBalls
- jp RemoveItemFromPocket
-
-.TMHM ; d22e
- ld h, d
- ld l, e
- ld a, [CurItem]
- ld c, a
- call GetTMHMNumber
- jp TossTMHM
-
-.KeyItem ; d23a
- ld h, d
- ld l, e
- jp TossKeyItem
-
-.Item ; d23f
- ld h, d
- ld l, e
-
-.remove
- jp RemoveItemFromPocket
-
-_CheckItem:: ; d244
- call DoesHLEqualNumItems
- jr nz, .nope
- push hl
- call CheckItemPocket
- pop de
- ld a, [wItemAttributeParamBuffer]
- dec a
- ld hl, .Pockets
- rst JumpTable
- ret
-
-.Pockets
- dw .Item
- dw .KeyItem
- dw .Ball
- dw .TMHM
-
-.Ball ; d25f
- ld hl, NumBalls
- jp CheckTheItem
-
-.TMHM ; d265
- ld h, d
- ld l, e
- ld a, [CurItem]
- ld c, a
- call GetTMHMNumber
- jp CheckTMHM
-
-.KeyItem ; d271
- ld h, d
- ld l, e
- jp CheckKeyItems
-
-.Item ; d276
- ld h, d
- ld l, e
-
-.nope
- jp CheckTheItem
-
-DoesHLEqualNumItems: ; d27b
- ld a, l
- cp NumItems % $100
- ret nz
- ld a, h
- cp NumItems / $100
- ret
-
-GetPocketCapacity: ; d283
- ld c, MAX_ITEMS
- ld a, e
- cp NumItems % $100
- jr nz, .not_bag
- ld a, d
- cp NumItems / $100
- ret z
-
-.not_bag
- ld c, MAX_PC_ITEMS
- ld a, e
- cp PCItems % $100
- jr nz, .not_pc
- ld a, d
- cp PCItems / $100
- ret z
-
-.not_pc
- ld c, MAX_BALLS
- ret
-
-PutItemInPocket: ; d29c
- ld d, h
- ld e, l
- inc hl
- ld a, [CurItem]
- ld c, a
- ld b, 0
-.loop
- ld a, [hli]
- cp -1
- jr z, .terminator
- cp c
- jr nz, .next
- ld a, 99
- sub [hl]
- add b
- ld b, a
- ld a, [wItemQuantityChangeBuffer]
- cp b
- jr z, .ok
- jr c, .ok
-
-.next
- inc hl
- jr .loop
-
-.terminator
- call GetPocketCapacity
- ld a, [de]
- cp c
- jr c, .ok
- and a
- ret
-
-.ok
- ld h, d
- ld l, e
- ld a, [CurItem]
- ld c, a
- ld a, [wItemQuantityChangeBuffer]
- ld [wItemQuantityBuffer], a
-.loop2
- inc hl
- ld a, [hli]
- cp -1
- jr z, .terminator2
- cp c
- jr nz, .loop2
- ld a, [wItemQuantityBuffer]
- add [hl]
- cp 100
- jr nc, .newstack
- ld [hl], a
- jr .done
-
-.newstack
- ld [hl], 99
- sub 99
- ld [wItemQuantityBuffer], a
- jr .loop2
-
-.terminator2
- dec hl
- ld a, [CurItem]
- ld [hli], a
- ld a, [wItemQuantityBuffer]
- ld [hli], a
- ld [hl], -1
- ld h, d
- ld l, e
- inc [hl]
-
-.done
- scf
- ret
-
-RemoveItemFromPocket: ; d2ff
- ld d, h
- ld e, l
- ld a, [hli]
- ld c, a
- ld a, [CurItemQuantity]
- cp c
- jr nc, .ok ; memory
- ld c, a
- ld b, $0
- add hl, bc
- add hl, bc
- ld a, [CurItem]
- cp [hl]
- inc hl
- jr z, .skip
- ld h, d
- ld l, e
- inc hl
-
-.ok
- ld a, [CurItem]
- ld b, a
-.loop
- ld a, [hli]
- cp b
- jr z, .skip
- cp -1
- jr z, .nope
- inc hl
- jr .loop
-
-.skip
- ld a, [wItemQuantityChangeBuffer]
- ld b, a
- ld a, [hl]
- sub b
- jr c, .nope
- ld [hl], a
- ld [wItemQuantityBuffer], a
- and a
- jr nz, .yup
- dec hl
- ld b, h
- ld c, l
- inc hl
- inc hl
-.loop2
- ld a, [hli]
- ld [bc], a
- inc bc
- cp -1
- jr nz, .loop2
- ld h, d
- ld l, e
- dec [hl]
-
-.yup
- scf
- ret
-
-.nope
- and a
- ret
-
-CheckTheItem: ; d349
- ld a, [CurItem]
- ld c, a
-.loop
- inc hl
- ld a, [hli]
- cp -1
- jr z, .done
- cp c
- jr nz, .loop
- scf
- ret
-
-.done
- and a
- ret
-
-ReceiveKeyItem: ; d35a
- ld hl, NumKeyItems
- ld a, [hli]
- cp MAX_KEY_ITEMS
- jr nc, .nope
- ld c, a
- ld b, 0
- add hl, bc
- ld a, [CurItem]
- ld [hli], a
- ld [hl], -1
- ld hl, NumKeyItems
- inc [hl]
- scf
- ret
-
-.nope
- and a
- ret
-
-TossKeyItem: ; d374
- ld a, [wd107]
- ld e, a
- ld d, 0
- ld hl, NumKeyItems
- ld a, [hl]
- cp e
- jr nc, .ok
- call .Toss
- ret nc
- jr .ok2
-
-.ok
- dec [hl]
- inc hl
- add hl, de
-
-.ok2
- ld d, h
- ld e, l
- inc hl
-.loop
- ld a, [hli]
- ld [de], a
- inc de
- cp -1
- jr nz, .loop
- scf
- ret
-
-.Toss: ; d396
- ld hl, NumKeyItems
- ld a, [CurItem]
- ld c, a
-.loop3
- inc hl
- ld a, [hl]
- cp c
- jr z, .ok3
- cp -1
- jr nz, .loop3
- xor a
- ret
-
-.ok3
- ld a, [NumKeyItems]
- dec a
- ld [NumKeyItems], a
- scf
- ret
-
-CheckKeyItems: ; d3b1
- ld a, [CurItem]
- ld c, a
- ld hl, KeyItems
-.loop
- ld a, [hli]
- cp c
- jr z, .done
- cp -1
- jr nz, .loop
- and a
- ret
-
-.done
- scf
- ret
-
-ReceiveTMHM: ; d3c4
- dec c
- ld b, 0
- ld hl, TMsHMs
- add hl, bc
- ld a, [wItemQuantityChangeBuffer]
- add [hl]
- cp 100
- jr nc, .toomany
- ld [hl], a
- scf
- ret
-
-.toomany
- and a
- ret
-
-TossTMHM: ; d3d8
- dec c
- ld b, 0
- ld hl, TMsHMs
- add hl, bc
- ld a, [wItemQuantityChangeBuffer]
- ld b, a
- ld a, [hl]
- sub b
- jr c, .nope
- ld [hl], a
- ld [wItemQuantityBuffer], a
- jr nz, .yup
- ld a, [wTMHMPocketScrollPosition]
- and a
- jr z, .yup
- dec a
- ld [wTMHMPocketScrollPosition], a
-
-.yup
- scf
- ret
-
-.nope
- and a
- ret
-
-CheckTMHM: ; d3fb
- dec c
- ld b, $0
- ld hl, TMsHMs
- add hl, bc
- ld a, [hl]
- and a
- ret z
- scf
- ret
-
-GetTMHMNumber:: ; d407
-; Return the number of a TM/HM by item id c.
-
- ld a, c
-
-; Skip any dummy items.
- cp ITEM_C3 ; TM04-05
- jr c, .done
- cp ITEM_DC ; TM28-29
- jr c, .skip
-
- dec a
-.skip
- dec a
-.done
- sub TM01
- inc a
- ld c, a
- ret
-
-GetNumberedTMHM: ; d417
-; Return the item id of a TM/HM by number c.
-
- ld a, c
-
-; Skip any gaps.
- cp ITEM_C3 - (TM01 - 1)
- jr c, .done
- cp ITEM_DC - (TM01 - 1) - 1
- jr c, .skip_one
-
-.skip_two
- inc a
-.skip_one
- inc a
-.done
- add TM01
- dec a
- ld c, a
- ret
-
-_CheckTossableItem:: ; d427
-; Return 1 in wItemAttributeParamBuffer and carry if CurItem can't be removed from the bag.
- ld a, ITEMATTR_PERMISSIONS
- call GetItemAttr
- bit 7, a
- jr nz, ItemAttr_ReturnCarry
- and a
- ret
-
-CheckSelectableItem: ; d432
-; Return 1 in wItemAttributeParamBuffer and carry if CurItem can't be selected.
- ld a, ITEMATTR_PERMISSIONS
- call GetItemAttr
- bit 6, a
- jr nz, ItemAttr_ReturnCarry
- and a
- ret
-
-CheckItemPocket:: ; d43d
-; Return the pocket for CurItem in wItemAttributeParamBuffer.
- ld a, ITEMATTR_POCKET
- call GetItemAttr
- and $f
- ld [wItemAttributeParamBuffer], a
- ret
-
-CheckItemContext: ; d448
-; Return the context for CurItem in wItemAttributeParamBuffer.
- ld a, ITEMATTR_HELP
- call GetItemAttr
- and $f
- ld [wItemAttributeParamBuffer], a
- ret
-
-CheckItemMenu: ; d453
-; Return the menu for CurItem in wItemAttributeParamBuffer.
- ld a, ITEMATTR_HELP
- call GetItemAttr
- swap a
- and $f
- ld [wItemAttributeParamBuffer], a
- ret
-
-GetItemAttr: ; d460
-; Get attribute a of CurItem.
-
- push hl
- push bc
-
- ld hl, ItemAttributes
- ld c, a
- ld b, 0
- add hl, bc
-
- xor a
- ld [wItemAttributeParamBuffer], a
-
- ld a, [CurItem]
- dec a
- ld c, a
- ld a, NUM_ITEMATTRS
- call AddNTimes
- ld a, BANK(ItemAttributes)
- call GetFarByte
-
- pop bc
- pop hl
- ret
-
-ItemAttr_ReturnCarry: ; d47f
- ld a, 1
- ld [wItemAttributeParamBuffer], a
- scf
- ret
-
-GetItemPrice: ; d486
-; Return the price of CurItem in de.
- push hl
- push bc
- ld a, ITEMATTR_PRICE
- call GetItemAttr
- ld e, a
- ld a, ITEMATTR_PRICE_HI
- call GetItemAttr
- ld d, a
- pop bc
- pop hl
- ret
-
+INCLUDE "engine/printnum.asm"
+INCLUDE "engine/health.asm"
+INCLUDE "event/overworld.asm"
+INCLUDE "engine/items.asm"
INCLUDE "engine/player_step.asm"
INCLUDE "engine/anim_hp_bar.asm"
INCLUDE "engine/move_mon.asm"
+INCLUDE "engine/billspctop.asm"
-_BillsPC: ; e3fd
- call .CheckCanUsePC
- ret c
- call .LogIn
- call .UseBillsPC
- jp .LogOut
-
-.CheckCanUsePC: ; e40a (3:640a)
- ld a, [PartyCount]
- and a
- ret nz
- ld hl, .Text_GottaHavePokemon
- call MenuTextBoxBackup
- scf
- ret
-
-.Text_GottaHavePokemon: ; 0xe417
- ; You gotta have #MON to call!
- text_jump UnknownText_0x1c1006
- db "@"
-
-.LogIn: ; e41c (3:641c)
- xor a
- ld [hBGMapMode], a
- call LoadStandardMenuDataHeader
- call ClearPCItemScreen
- ld hl, Options
- ld a, [hl]
- push af
- set NO_TEXT_SCROLL, [hl]
- ld hl, .Text_What
- call PrintText
- pop af
- ld [Options], a
- call LoadFontsBattleExtra
- ret
-
-.Text_What: ; 0xe43a
- ; What?
- text_jump UnknownText_0x1c1024
- db "@"
-
-.LogOut: ; e43f (3:643f)
- call CloseSubmenu
- ret
-
-.UseBillsPC: ; e443 (3:6443)
- ld hl, .MenuDataHeader
- call LoadMenuDataHeader
- ld a, $1
-.loop
- ld [wMenuCursorBuffer], a
- call SetPalettes
- xor a
- ld [wWhichIndexSet], a
- ld [hBGMapMode], a
- call DoNthMenu
- jr c, .cancel
- ld a, [wMenuCursorBuffer]
- push af
- ld a, [MenuSelection]
- ld hl, .Jumptable
- rst JumpTable
- pop bc
- ld a, b
- jr nc, .loop
-.cancel
- call CloseWindow
- ret
-
-.MenuDataHeader: ; 0xe46f
- db $40 ; flags
- db 00, 00 ; start coords
- db 17, 19 ; end coords
- dw .MenuData2
- db 1 ; default option
-
-.MenuData2: ; 0xe477
- db $80 ; flags
- db 0 ; items
- dw .items
- dw PlaceMenuStrings
- dw .strings
-
-.strings: ; e47f
- db "WITHDRAW <PK><MN>@"
- db "DEPOSIT <PK><MN>@"
- db "CHANGE BOX@"
- db "MOVE <PK><MN> W/O MAIL@"
- db "SEE YA!@"
-
-.Jumptable: ; e4ba (3:64ba)
- dw BillsPC_WithdrawMenu
- dw BillsPC_DepositMenu
- dw BillsPC_ChangeBoxMenu
- dw BillsPC_MovePKMNMenu
- dw BillsPC_SeeYa
-
-.items: ; e4c4
- db 5
- db 0 ; WITHDRAW
- db 1; DEPOSIT
- db 2 ; CHANGE BOX
- db 3 ; MOVE PKMN
- db 4 ; SEE YA!
- db -1
-
-BillsPC_SeeYa: ; e4cb
- scf
- ret
-
-BillsPC_MovePKMNMenu: ; e4cd
- call LoadStandardMenuDataHeader
- callba IsAnyMonHoldingMail
- jr nc, .no_mail
- ld hl, .Text_MonHoldingMail
- call PrintText
- jr .quit
-
-.no_mail
- callba StartMovePkmnWOMail_SaveGame
- jr c, .quit
- callba _MovePKMNWithoutMail
- call ReturnToMapFromSubmenu
- call ClearPCItemScreen
-
-.quit
- call CloseWindow
- and a
- ret
-
-.Text_MonHoldingMail: ; 0xe4f9
- ; There is a #MON holding MAIL. Please remove the MAIL.
- text_jump UnknownText_0x1c102b
- db "@"
-
-BillsPC_DepositMenu: ; e4fe (3:64fe)
- call LoadStandardMenuDataHeader
- callba _DepositPKMN
- call ReturnToMapFromSubmenu
- call ClearPCItemScreen
- call CloseWindow
- and a
- ret
-
-Functione512: ; unused
- ld a, [PartyCount]
- and a
- jr z, .no_pkmn
- cp 2
- jr c, .only_one_pkmn
- and a
- ret
-
-.no_pkmn
- ld hl, .Text_NoPKMN
- call MenuTextBoxBackup
- scf
- ret
-
-.only_one_pkmn
- ld hl, .Text_ItsYourLastPKMN
- call MenuTextBoxBackup
- scf
- ret
-
-.Text_NoPKMN: ; 0xe52e
- ; You don't have a single #MON!
- text_jump UnknownText_0x1c1062
- db "@"
-
-.Text_ItsYourLastPKMN: ; 0xe533
- ; You can't deposit your last #MON!
- text_jump UnknownText_0x1c1080
- db "@"
-
-CheckCurPartyMonFainted: ; e538
- ld hl, PartyMon1HP
- ld de, PARTYMON_STRUCT_LENGTH
- ld b, $0
-.loop
- ld a, [CurPartyMon]
- cp b
- jr z, .skip
- ld a, [hli]
- or [hl]
- jr nz, .notfainted
- dec hl
-
-.skip
- inc b
- ld a, [PartyCount]
- cp b
- jr z, .done
- add hl, de
- jr .loop
-
-.done
- scf
- ret
-
-.notfainted
- and a
- ret
-
-BillsPC_WithdrawMenu: ; e559 (3:6559)
- call LoadStandardMenuDataHeader
- callba _WithdrawPKMN
- call ReturnToMapFromSubmenu
- call ClearPCItemScreen
- call CloseWindow
- and a
- ret
-
-Functione56d: ; unused
- ld a, [PartyCount]
- cp PARTY_LENGTH
- jr nc, .asm_e576
- and a
- ret
-
-.asm_e576
- ld hl, UnknownText_0xe57e
- call MenuTextBoxBackup
- scf
- ret
-
-UnknownText_0xe57e: ; 0xe57e
- ; You can't take any more #MON.
- text_jump UnknownText_0x1c10a2
- db "@"
-
-BillsPC_ChangeBoxMenu: ; e583 (3:6583)
- callba _ChangeBox
- and a
- ret
-
-ClearPCItemScreen: ; e58b
- call DisableSpriteUpdates
- xor a
- ld [hBGMapMode], a
- call ClearBGPalettes
- call ClearSprites
- hlcoord 0, 0
- ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
- ld a, " "
- call ByteFill
- hlcoord 0,0
- lb bc, 10, 18
- call TextBox
- hlcoord 0,12
- lb bc, 4, 18
- call TextBox
- call WaitBGMap2
- call SetPalettes ; load regular palettes?
- ret
-
-CopyBoxmonToTempMon: ; e5bb
- ld a, [CurPartyMon]
- ld hl, sBoxMon1Species
- ld bc, BOXMON_STRUCT_LENGTH
- call AddNTimes
- ld de, TempMonSpecies
- ld bc, BOXMON_STRUCT_LENGTH
- ld a, BANK(sBoxMon1Species)
- call GetSRAMBank
- call CopyBytes
- call CloseSRAM
- ret
-
-Functione5d9: ; unreferenced
- ld a, [wCurBox]
- cp b
- jr z, .same_box
- ld a, b
- ld hl, .BoxAddrs
- ld bc, 3
- call AddNTimes
- ld a, [hli]
- push af
- ld a, [hli]
- ld h, [hl]
- ld l, a
- pop af
- jr .okay
-
-.same_box
- ld a, BANK(sBoxCount)
- ld hl, sBoxCount
-
-.okay
- call GetSRAMBank
- ld a, [hl]
- ld bc, 1 + MONS_PER_BOX + 1
- add hl, bc
- ld b, a
- ld c, $0
- ld de, wc608
- ld a, b
- and a
- jr z, .empty_box
-.loop
- push hl
- push bc
- ld a, c
- ld bc, 0
- add hl, bc
- ld bc, BOXMON_STRUCT_LENGTH
- call AddNTimes
- ld a, [hl]
- ld [de], a
- inc de
- ld [CurSpecies], a
- call GetBaseData
- pop bc
- pop hl
-
- push hl
- push bc
- ld a, c
- ld bc, MONS_PER_BOX * (BOXMON_STRUCT_LENGTH + NAME_LENGTH)
- add hl, bc
- call SkipNames
- call CopyBytes
- pop bc
- pop hl
-
- push hl
- push bc
- ld a, c
- ld bc, MON_LEVEL
- add hl, bc
- ld bc, BOXMON_STRUCT_LENGTH
- call AddNTimes
- ld a, [hl]
- ld [de], a
- inc de
- pop bc
- pop hl
-
- push hl
- push bc
- ld a, c
- ld bc, MON_DVS
- add hl, bc
- ld bc, BOXMON_STRUCT_LENGTH
- call AddNTimes
- ld a, [hli]
- and $f0
- ld b, a
- ld a, [hl]
- and $f0
- swap a
- or b
- ld b, a
- ld a, [BaseGender]
- cp b
- ld a, $1
- jr c, .okay2
- xor a
-.okay2
- ld [de], a
- inc de
- pop bc
- pop hl
-
- inc c
- dec b
- jr nz, .loop
-.empty_box
- call CloseSRAM
- ret
-
-.BoxAddrs: ; e66e
- dba sBox1
- dba sBox2
- dba sBox3
- dba sBox4
- dba sBox5
- dba sBox6
- dba sBox7
- dba sBox8
- dba sBox9
- dba sBox10
- dba sBox11
- dba sBox12
- dba sBox13
- dba sBox14
-
GetBreedMon1LevelGrowth: ; e698
ld hl, wBreedMon1Stats
ld de, TempMon
@@ -4981,7 +332,7 @@
call PrintText
ret
-.generatestats: ; e6fd
+.generatestats ; e6fd
ld a, [TempEnemyMonSpecies]
ld [CurSpecies], a
ld [CurPartySpecies], a
@@ -4995,7 +346,7 @@
ld hl, wContestMon
jp GeneratePartyMonStats
-.caughttext: ; 0xe71d
+.caughttext ; 0xe71d
; Caught @ !
text_jump UnknownText_0x1c10c0
db "@"
@@ -5002,95 +353,6 @@
INCLUDE "items/item_effects.asm"
-GetPokeBallWobble: ; f971 (3:7971)
-; Returns whether a Poke Ball will wobble in the catch animation.
-; Whether a Pokemon is caught is determined beforehand.
-
- push de
-
- ld a, [rSVBK]
- ld d, a
- push de
-
- ld a, 1 ; BANK(Buffer2)
- ld [rSVBK], a
-
- ld a, [Buffer2]
- inc a
- ld [Buffer2], a
-
-; Wobble up to 3 times.
- cp 3 + 1
- jr z, .finished
-
- ld a, [wWildMon]
- and a
- ld c, 0 ; next
- jr nz, .done
-
- ld hl, .WobbleProbabilities
- ld a, [Buffer1]
- ld b, a
-.loop
- ld a, [hli]
- cp b
- jr nc, .checkwobble
- inc hl
- jr .loop
-
-.checkwobble
- ld b, [hl]
- call Random
- cp b
- ld c, 0 ; next
- jr c, .done
- ld c, 2 ; escaped
- jr .done
-
-.finished
- ld a, [wWildMon]
- and a
- ld c, 1 ; caught
- jr nz, .done
- ld c, 2 ; escaped
-
-.done
- pop de
- ld e, a
- ld a, d
- ld [rSVBK], a
- ld a, e
- pop de
- ret
-
-.WobbleProbabilities: ; f9ba
-; catch rate, chance of wobbling / 255
-; nLeft/255 = (nRight/255) ** 4
- db 1, 63
- db 2, 75
- db 3, 84
- db 4, 90
- db 5, 95
- db 7, 103
- db 10, 113
- db 15, 126
- db 20, 134
- db 30, 149
- db 40, 160
- db 50, 169
- db 60, 177
- db 80, 191
- db 100, 201
- db 120, 211
- db 140, 220
- db 160, 227
- db 180, 234
- db 200, 240
- db 220, 246
- db 240, 251
- db 254, 253
- db 255, 255
-
KnowsMove: ; f9ea
ld a, MON_MOVES
call GetPartyParamLocation
@@ -5192,7 +454,7 @@
closetext
end
-.text: ; 0x13620
+.text ; 0x13620
; REPEL's effect wore off.
text_jump UnknownText_0x1bd308
db "@"
@@ -5209,21 +471,21 @@
itemnotify
jump .finish
-.bag_full: ; 0x1363e
+.bag_full ; 0x1363e
buttonsound
writetext .no_room_text
waitbutton
-.finish: ; 13643
+.finish ; 13643
closetext
end
-.found_text: ; 0x13645
+.found_text ; 0x13645
; found @ !
text_jump UnknownText_0x1bd321
db "@"
-.no_room_text: ; 0x1364a
+.no_room_text ; 0x1364a
; But has no space left…
text_jump UnknownText_0x1bd331
db "@"
@@ -5622,9 +884,9 @@
ld [Options], a
ret
-.slash_500: ; 24bcf
+.slash_500 ; 24bcf
db "/500@"
-.booru_ko: ; 24bd4
+.booru_ko ; 24bd4
db "ボール こ@"
StartMenu_DrawBugContestStatusBox: ; 24bdc
@@ -5723,7 +985,7 @@
scf
ret
-.addtobuffer: ; 24c94
+.addtobuffer ; 24c94
push hl
ld hl, Buffer1
inc [hl]
@@ -6161,7 +1423,7 @@
ld [hl], a
ret
-.TrySpreadPokerus
+.TrySpreadPokerus:
call Random
cp 1 + 33 percent
ret nc ; 1/3 chance
@@ -6275,7 +1537,7 @@
call ClearSprites
ret
-FindFirstAliveMon: ; 2ee2f
+FindFirstAliveMonAndStartBattle: ; 2ee2f
xor a
ld [hMapAnims], a
call DelayFrame
@@ -7148,7 +2410,7 @@
and $f
jr .next
-.UpperNybble
+.UpperNybble:
ld hl, TilesetPalettes
add [hl]
ld l, a
@@ -7192,7 +2454,7 @@
and $f
jr .next
-.UpperNybble
+.UpperNybble:
ld hl, TilesetPalettes
add [hl]
ld l, a
@@ -7252,7 +2514,7 @@
push af
xor a
ld [hMapAnims], a
-.WaitLY
+.WaitLY:
ld a, [rLY]
cp $60
jr c, .WaitLY
@@ -7266,7 +2528,7 @@
ld [rVBK], a
hlcoord 0, 0
call .LoadEDTile
-.WaitLY2
+.WaitLY2:
ld a, [rLY]
cp $60
jr c, .WaitLY2
@@ -7588,17 +2850,17 @@
call PrintText
ret
-.text_okay: ; 0x4d3fe
+.text_okay ; 0x4d3fe
; Password OK. Select CONTINUE & reset settings.
text_jump UnknownText_0x1c55db
db "@"
-.text_wrong: ; 0x4d403
+.text_wrong ; 0x4d403
; Wrong password!
text_jump UnknownText_0x1c560b
db "@"
-.text_askreset: ; 0x4d408
+.text_askreset ; 0x4d408
; Reset the clock?
text_jump UnknownText_0x1c561c
db "@"
@@ -7659,12 +2921,12 @@
scf
ret
-.pleaseenterpasswordtext: ; 0x4d463
+.pleaseenterpasswordtext ; 0x4d463
; Please enter the password.
text_jump UnknownText_0x1c562e
db "@"
-.updateIDdisplay: ; 4d468
+.updateIDdisplay ; 4d468
hlcoord 14, 15
ld de, StringBuffer2
ld c, 5
@@ -7687,7 +2949,7 @@
ld [hl], $61
ret
-.dpadinput: ; 4d490
+.dpadinput ; 4d490
ld a, b
and D_LEFT
jr nz, .left
@@ -7744,7 +3006,7 @@
ld [hl], 9
ret
-.getcurrentdigit: ; 4d4d5
+.getcurrentdigit ; 4d4d5
ld a, [StringBuffer2 + 5]
ld e, a
ld d, $0
@@ -7978,7 +3240,7 @@
; Check each monster in the party for Pokerus
ld hl, PartyMon1PokerusStatus
ld de, PARTYMON_STRUCT_LENGTH
-.Check
+.Check:
ld a, [hl]
and $0f ; only the bottom nybble is used
jr nz, .HasPokerus
@@ -7986,10 +3248,10 @@
add hl, de
dec b
jr nz, .Check
-.NoPokerus
+.NoPokerus:
and a
ret
-.HasPokerus
+.HasPokerus:
scf
ret
@@ -8003,7 +3265,7 @@
ld d, a
ld hl, PartyMon1ID
ld bc, PartySpecies
-.PartyLoop
+.PartyLoop:
ld a, [bc]
inc bc
cp EGG
@@ -8022,7 +3284,7 @@
ld d, a
ld hl, sBoxMon1ID
ld bc, sBoxSpecies
-.OpenBoxLoop
+.OpenBoxLoop:
ld a, [bc]
inc bc
cp EGG
@@ -8032,7 +3294,7 @@
ld a, 1
ld [wFoundMatchingIDInParty], a
-.SkipOpenBoxMon
+.SkipOpenBoxMon:
push bc
ld bc, BOXMON_STRUCT_LENGTH
add hl, bc
@@ -8040,10 +3302,10 @@
dec d
jr nz, .OpenBoxLoop
-.SkipOpenBox
+.SkipOpenBox:
call CloseSRAM
ld c, $0
-.BoxesLoop
+.BoxesLoop:
ld a, [wCurBox]
and $f
cp c
@@ -8068,7 +3330,7 @@
ld de, sBoxMon1ID - sBox
add hl, de
ld d, a
-.BoxNLoop
+.BoxNLoop:
ld a, [bc]
inc bc
cp EGG
@@ -8079,7 +3341,7 @@
ld a, 1
ld [wFoundMatchingIDInParty], a
-.SkipBoxMon
+.SkipBoxMon:
push bc
ld bc, BOXMON_STRUCT_LENGTH
add hl, bc
@@ -8088,7 +3350,7 @@
jr nz, .BoxNLoop
pop bc
-.SkipBox
+.SkipBox:
inc c
ld a, c
cp NUM_BOXES
@@ -8276,7 +3538,7 @@
ld de, wMonOrItemNameBuffer
callab InitNickname
-.Party_SkipNickname
+.Party_SkipNickname:
ld a, [PartyCount]
dec a
ld hl, PartyMonNicknames
@@ -8338,7 +3600,7 @@
callab InitNickname
ld hl, wMonOrItemNameBuffer
-.Box_SkipNickname
+.Box_SkipNickname:
ld a, BANK(sBoxMonNicknames)
call GetSRAMBank
ld de, sBoxMonNicknames
@@ -8346,7 +3608,7 @@
call CopyBytes
call CloseSRAM
-.BoxFull
+.BoxFull:
ld a, BANK(sBoxMon1Level)
call GetSRAMBank
ld a, [sBoxMon1Level]
@@ -8412,7 +3674,7 @@
ld a, [BackupMapNumber]
ld c, a
-.NotPokeCenter2F
+.NotPokeCenter2F:
call GetWorldMapLocation
ld b, a
ld a, [PlayerGender]
@@ -8618,7 +3880,7 @@
ld l, a
jp [hl]
-.dw: ; 4e564 (13:6564)
+.dw ; 4e564 (13:6564)
dw .DudeTutorial
dw .DudeTutorial
dw .DudeTutorial
@@ -9150,27 +4412,27 @@
dw OTClassName
dw OTClassName
-.Youngster db "たんパン@"
-.BugCatcher db "むしとり@"
-.Lass db "ミニスカ@"
-.JrTrainerM db "ボーイ@"
-.JrTrainerF db "ガール@"
-.Pokemaniac db "マニア@"
-.SuperNerd db "りかけい@"
-.Burglar db "どろぼう@"
-.Engineer db "ォヤジ@"
-.Jack db "ジャック@"
-.Swimmer db "かいパン@"
-.Beauty db "おねえさん@"
-.Rocker db "グループ@"
-.Juggler db "ジャグラー@"
-.Blackbelt db "からて@"
-.ProfOak db "ォーキド@"
-.Chief db "チーフ@"
-.Scientist db "けんきゅういん@"
-.Rocket db "だんいん@"
-.CooltrainerM db "エりート♂@"
-.CooltrainerF db "エりート♀@"
+.Youngster: db "たんパン@"
+.BugCatcher: db "むしとり@"
+.Lass: db "ミニスカ@"
+.JrTrainerM: db "ボーイ@"
+.JrTrainerF: db "ガール@"
+.Pokemaniac: db "マニア@"
+.SuperNerd: db "りかけい@"
+.Burglar: db "どろぼう@"
+.Engineer: db "ォヤジ@"
+.Jack: db "ジャック@"
+.Swimmer: db "かいパン@"
+.Beauty: db "おねえさん@"
+.Rocker: db "グループ@"
+.Juggler: db "ジャグラー@"
+.Blackbelt: db "からて@"
+.ProfOak: db "ォーキド@"
+.Chief: db "チーフ@"
+.Scientist: db "けんきゅういん@"
+.Rocket: db "だんいん@"
+.CooltrainerM: db "エりート♂@"
+.CooltrainerF: db "エりート♀@"
DrawPlayerHP: ; 50b0a
ld a, $1
@@ -9337,12 +4599,12 @@
; Get our place in the party/box.
-.PartyMon
+.PartyMon:
.sBoxMon
ld a, [CurPartyMon]
call AddNTimes
-.DVs
+.DVs:
; sBoxMon data is read directly from SRAM.
ld a, [MonType]
@@ -9395,16 +4657,16 @@
cp b
jr c, .Male
-.Female
+.Female:
xor a
ret
-.Male
+.Male:
ld a, 1
and a
ret
-.Genderless
+.Genderless:
scf
ret
@@ -9489,7 +4751,7 @@
.done
ret
-.load_loop: ; 50cc9
+.load_loop ; 50cc9
ld [hli], a
ld [hld], a
add hl, de
@@ -10292,7 +5554,7 @@
bit 0, a
jr z, .GotGender
ld hl, KrisNameMenuHeader
-.GotGender
+.GotGender:
call LoadMenuDataHeader
call VerticalMenu
ld a, [wMenuCursorY]
@@ -10377,7 +5639,7 @@
bit 0, a
jr z, .GotClass
ld hl, KrisCardPic
-.GotClass
+.GotClass:
ld de, VTiles2 tile $00
ld bc, $23 tiles
ld a, BANK(ChrisCardPic) ; BANK(KrisCardPic)
@@ -10423,7 +5685,7 @@
jr z, .GotClass
ld e, 1
-.GotClass
+.GotClass:
ld a, e
ld [TrainerClass], a
ld de, ChrisPic
@@ -10432,7 +5694,7 @@
jr z, .GotPic
ld de, KrisPic
-.GotPic
+.GotPic:
ld hl, VTiles2
ld b, BANK(ChrisPic) ; BANK(KrisPic)
ld c, 7 * 7
@@ -10451,7 +5713,7 @@
bit 0, a
jr z, .GotClass
ld e, KRIS
-.GotClass
+.GotClass:
ld a, e
ld [TrainerClass], a
@@ -10461,7 +5723,7 @@
bit 0, a
jr z, .GotPic
ld de, KrisPic
-.GotPic
+.GotPic:
ld hl, VTiles2
ld b, BANK(ChrisPic) ; BANK(KrisPic)
ld c, 7 * 7 ; dimensions
@@ -10522,8 +5784,8 @@
INCLUDE "event/field_moves.asm"
INCLUDE "event/magnet_train.asm"
-Function8cf4f: ; 8cf4f
- call Function3238
+BattleStart_LoadEDTile: ; 8cf4f
+ call CGBOnly_LoadEDTile
ret
INCLUDE "engine/sprites.asm"
@@ -10764,11 +6026,11 @@
call SetPalettes
ret
-.Health
+.Health:
db "HEALTH@"
-.Stock
+.Stock:
db " STOCK ", $4a, " @"
-.This
+.This:
db " THIS ", $4a, " @"
SwitchMonText: ; cc0c2
@@ -11149,11 +6411,11 @@
jr z, .PM
sub 12
jr .PM
-.AM
+.AM:
or a
jr nz, .PM
ld a, 12
-.PM
+.PM:
ld b, a
; Crazy stuff happening with the stack
push bc
@@ -11249,7 +6511,7 @@
ld [hl], $52
jr .Done
-.OldMode
+.OldMode:
; no scroll bar
hlcoord 11, 0
ld [hl], $66
@@ -11258,7 +6520,7 @@
ld b, SCREEN_HEIGHT - 3
call Bank77_FillColumn
ld [hl], $68
-.Done
+.Done:
ret
DrawPokedexSearchResultsWindow: ; 1de1d1 (77:61d1)
@@ -11304,7 +6566,7 @@
call PlaceString
ret
-.esults_D: ; 1de23c
+.esults_D ; 1de23c
; (SEARCH R)
db "ESULTS<NEXT>"
; (### FOUN)
--- a/maps/AzaleaGym.asm
+++ b/maps/AzaleaGym.asm
@@ -34,7 +34,7 @@
setflag ENGINE_HIVEBADGE
checkcode VAR_BADGES
scall AzaleaGymTriggerRockets
-.FightDone
+.FightDone:
checkevent EVENT_GOT_TM49_FURY_CUTTER
iftrue .GotFuryCutter
setevent EVENT_BEAT_TWINS_AMY_AND_MAY
@@ -63,10 +63,10 @@
if_equal 6, .GoldenrodRockets
end
-.GoldenrodRockets
+.GoldenrodRockets:
jumpstd goldenrodrockets
-.RadioTowerRockets
+.RadioTowerRockets:
jumpstd radiotowerrockets
TrainerTwinsAmyandmay1:
@@ -134,7 +134,7 @@
closetext
end
-.AzaleaGymGuyWinScript
+.AzaleaGymGuyWinScript:
opentext
writetext AzaleaGymGuyWinText
waitbutton
@@ -145,7 +145,7 @@
checkflag ENGINE_HIVEBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext BUGSY, 1, $1
jumpstd gymstatue2
--- a/maps/AzaleaTown.asm
+++ b/maps/AzaleaTown.asm
@@ -27,16 +27,16 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .Flypoint
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
end
-.Trigger2
+.Trigger2:
end
-.Flypoint
+.Flypoint:
setflag ENGINE_FLYPOINT_AZALEA
return
@@ -216,7 +216,7 @@
AzaleaTownHiddenFullHeal:
dwb EVENT_AZALEA_TOWN_HIDDEN_FULL_HEAL, FULL_HEAL
-
+
AzaleaTownRivalBattleApproachMovement1:
step_left
--- a/maps/BattleTower1F.asm
+++ b/maps/BattleTower1F.asm
@@ -33,7 +33,7 @@
priorityjump Script_ResumeBattleTowerChallenge
end
-.priorityjump1:
+.priorityjump1
priorityjump BattleTower_LeftWithoutSaving
writebyte BATTLETOWERACTION_CHALLENGECANCELED
special BattleTowerAction
@@ -62,7 +62,7 @@
opentext
writetext Text_BattleTowerWelcomesYou
buttonsound
- writebyte BATTLETOWERACTION_00 ; if new save file: bit 1, [sbe4f]
+ writebyte BATTLETOWERACTION_00 ; if new save file: bit 1, [s1_be4f]
special BattleTowerAction
if_not_equal $0, Script_Menu_ChallengeExplanationCancel
jump Script_BattleTowerIntroductionYesNo
@@ -87,7 +87,7 @@
special Special_TryQuickSave
iffalse Script_Menu_ChallengeExplanationCancel
dotrigger $1
- writebyte BATTLETOWERACTION_01 ; set 1, [sbe4f]
+ writebyte BATTLETOWERACTION_01 ; set 1, [s1_be4f]
special BattleTowerAction
special Function1700b0
if_equal $a, Script_Menu_ChallengeExplanationCancel
@@ -203,7 +203,7 @@
writetext Text_CantBeRegistered_PreviousRecordDeleted
jump continue
-.zero:
+.zero
writetext Text_CantBeRegistered
continue:
yesorno
--- a/maps/BattleTowerHallway.asm
+++ b/maps/BattleTowerHallway.asm
@@ -24,7 +24,7 @@
jump .WalkToChosenBattleRoom
-.asm_load_battle_room:
+.asm_load_battle_room
ld a, [rSVBK]
push af
--- a/maps/BattleTowerOutside.asm
+++ b/maps/BattleTowerOutside.asm
@@ -15,10 +15,10 @@
dbw MAPCALLBACK_TILES, .Callback1
dbw MAPCALLBACK_OBJECTS, .Callback2
-.Callback1
+.Callback1:
return
-.Callback2
+.Callback2:
clearevent EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
return
--- a/maps/BlackthornCity.asm
+++ b/maps/BlackthornCity.asm
@@ -20,17 +20,17 @@
dbw MAPCALLBACK_NEWMAP, .FlyPoint
dbw MAPCALLBACK_OBJECTS, .Santos
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_BLACKTHORN
return
-.Santos
+.Santos:
checkcode VAR_WEEKDAY
if_equal SATURDAY, .SantosAppears
disappear BLACKTHORNCITY_SANTOS
return
-.SantosAppears
+.SantosAppears:
appear BLACKTHORNCITY_SANTOS
return
@@ -101,7 +101,7 @@
writetext MeetSantosText
buttonsound
setevent EVENT_MET_SANTOS_OF_SATURDAY
-.MetSantos
+.MetSantos:
writetext SantosGivesGiftText
buttonsound
verbosegiveitem SPELL_TAG
@@ -112,14 +112,14 @@
closetext
end
-.Saturday
+.Saturday:
writetext SantosSaturdayText
waitbutton
-.Done
+.Done:
closetext
end
-.NotSaturday
+.NotSaturday:
writetext SantosNotSaturdayText
waitbutton
closetext
--- a/maps/BlackthornGym1F.asm
+++ b/maps/BlackthornGym1F.asm
@@ -15,7 +15,7 @@
; callbacks
dbw MAPCALLBACK_TILES, .Boulders
-.Boulders
+.Boulders:
checkevent EVENT_BOULDER_IN_BLACKTHORN_GYM_1
iffalse .skip1
changeblock $8, $2, $3b
@@ -59,13 +59,13 @@
clearevent EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN
end
-.FightDone
+.FightDone:
writetext ClairText_TooMuchToExpect
waitbutton
closetext
end
-.AlreadyGotBadge
+.AlreadyGotBadge:
checkevent EVENT_GOT_TM24_DRAGONBREATH
iftrue .GotTM24
writetext BlackthornGymClairText_YouKeptMeWaiting
@@ -137,7 +137,7 @@
closetext
end
-.BlackthornGymGuyWinScript
+.BlackthornGymGuyWinScript:
writetext BlackthornGymGuyWinText
waitbutton
closetext
@@ -147,7 +147,7 @@
checkflag ENGINE_RISINGBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext CLAIR, 1, $1
jumpstd gymstatue2
--- a/maps/BlackthornGym2F.asm
+++ b/maps/BlackthornGym2F.asm
@@ -18,33 +18,33 @@
; callbacks
dbw MAPCALLBACK_CMDQUEUE, .Boulders
-.Boulders
+.Boulders:
writecmdqueue .BoulderCmdQueue
return
-.BoulderCmdQueue
- dbw MAPCALLBACK_OBJECTS, .BoulderTable ; check if any stones are sitting on a warp
- db 0, 0 ; filler
+.BoulderCmdQueue:
+ dbw CMDQUEUE_STONETABLE, .BoulderTable ; check if any stones are sitting on a warp
+ dw 0 ; filler
-.BoulderTable
+.BoulderTable:
stonetable 5, BLACKTHORNGYM2F_BOULDER1, .Disappear4
stonetable 3, BLACKTHORNGYM2F_BOULDER2, .Disappear5
stonetable 4, BLACKTHORNGYM2F_BOULDER3, .Disappear6
db -1 ; end
-.Disappear4
+.Disappear4:
disappear BLACKTHORNGYM2F_BOULDER1
jump .Fall
-.Disappear5
+.Disappear5:
disappear BLACKTHORNGYM2F_BOULDER2
jump .Fall
-.Disappear6
+.Disappear6:
disappear BLACKTHORNGYM2F_BOULDER3
jump .Fall
-.Fall
+.Fall:
pause 30
scall .FX
opentext
@@ -53,7 +53,7 @@
closetext
end
-.FX
+.FX:
playsound SFX_STRENGTH
earthquake 80
end
@@ -137,9 +137,9 @@
db 5
warp_def $7, $1, 3, BLACKTHORN_GYM_1F
warp_def $9, $7, 4, BLACKTHORN_GYM_1F
- warp_def $5, $2, 5, BLACKTHORN_GYM_1F
- warp_def $7, $8, 6, BLACKTHORN_GYM_1F
- warp_def $3, $8, 7, BLACKTHORN_GYM_1F
+ warp_def $5, $2, 5, BLACKTHORN_GYM_1F ; hole
+ warp_def $7, $8, 6, BLACKTHORN_GYM_1F ; hole
+ warp_def $3, $8, 7, BLACKTHORN_GYM_1F ; hole
.XYTriggers:
db 0
--- a/maps/BrunosRoom.asm
+++ b/maps/BrunosRoom.asm
@@ -16,11 +16,11 @@
dbw MAPCALLBACK_TILES, .BrunosRoomDoors
-.Trigger0
+.Trigger0:
priorityjump UnknownScript_0x1809ad
end
-.Trigger1
+.Trigger1:
end
.BrunosRoomDoors:
@@ -27,11 +27,11 @@
checkevent EVENT_BRUNOS_ROOM_ENTRANCE_CLOSED
iffalse .KeepDoorClosed
changeblock $4, $e, $2a
-.KeepDoorClosed
+.KeepDoorClosed:
checkevent EVENT_BRUNOS_ROOM_EXIT_OPEN
iffalse .OpenDoor
changeblock $4, $2, $16
-.OpenDoor
+.OpenDoor:
return
UnknownScript_0x1809ad:
--- a/maps/BurnedTower1F.asm
+++ b/maps/BurnedTower1F.asm
@@ -35,11 +35,11 @@
checkevent EVENT_HOLE_IN_BURNED_TOWER
iftrue .Next
changeblock $a, $8, $32 ; hole
-.Next
+.Next:
checkevent EVENT_RELEASED_THE_BEASTS
iftrue .Done
changeblock $6, $e, $9 ; ladder
-.Done
+.Done:
return
.EusineTrigger:
@@ -79,7 +79,7 @@
reloadmapafterbattle
jump .returnfrombattle
-.totodile:
+.totodile
winlosstext BurnedTowerSilver_WinText, BurnedTowerSilver_LossText
setlasttalked BURNEDTOWER1F_SILVER
loadtrainer RIVAL1, RIVAL1_7
@@ -88,7 +88,7 @@
reloadmapafterbattle
jump .returnfrombattle
-.chikorita:
+.chikorita
winlosstext BurnedTowerSilver_WinText, BurnedTowerSilver_LossText
setlasttalked BURNEDTOWER1F_SILVER
loadtrainer RIVAL1, RIVAL1_8
@@ -97,7 +97,7 @@
reloadmapafterbattle
jump .returnfrombattle
-.returnfrombattle:
+.returnfrombattle
playmusic MUSIC_RIVAL_AFTER
opentext
writetext BurnedTowerSilver_AfterText1
@@ -137,11 +137,11 @@
BurnedTower1FHiddenEther:
dwb EVENT_BURNED_TOWER_1F_HIDDEN_ETHER, ETHER
-
+
BurnedTower1FHiddenUltraBall:
dwb EVENT_BURNED_TOWER_1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+
BurnedTower1FHPUp:
itemball HP_UP
--- a/maps/BurnedTowerB1F.asm
+++ b/maps/BurnedTowerB1F.asm
@@ -34,7 +34,7 @@
checkevent EVENT_RELEASED_THE_BEASTS
iftrue .NoChange
changeblock $6, $e, $2
-.NoChange
+.NoChange:
return
ReleaseTheBeasts:
@@ -115,7 +115,7 @@
applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement1
jump UnknownScript_0x18622a
-.Movement
+.Movement:
applymovement BURNEDTOWERB1F_EUSINE, BurnedTowerB1FEusineMovement2
UnknownScript_0x18622a:
disappear BURNEDTOWERB1F_EUSINE
@@ -130,46 +130,46 @@
jumpstd strengthboulder
BurnedTowerRaikouMovement:
- db $39 ; movement
+ set_sliding
fast_jump_step_down
fast_jump_step_left
- db $38 ; movement
+ remove_sliding
step_end
BurnedTowerEnteiMovement:
- db $39 ; movement
+ set_sliding
fast_jump_step_right
fast_jump_step_down
fast_jump_step_right
- db $38 ; movement
+ remove_sliding
step_end
BurnedTowerSuicuneMovement1:
- db $39 ; movement
+ set_sliding
fast_jump_step_right
fast_jump_step_down
fast_jump_step_down
fast_jump_step_left
- db $38 ; movement
+ remove_sliding
step_end
BurnedTowerSuicuneMovement2:
- db $39 ; movement
+ set_sliding
fast_jump_step_left
fast_jump_step_up
big_step_up
fast_jump_step_right
- db $38 ; movement
+ remove_sliding
step_end
MovementData_0x18624f:
- db $39 ; movement
+ set_sliding
big_step_down
- db $38 ; movement
+ remove_sliding
step_end
BurnedTowerSuicuneMovement3:
- db $39 ; movement
+ set_sliding
big_step_up
fast_jump_step_right
fast_jump_step_down
@@ -176,7 +176,7 @@
fast_jump_step_down
fast_jump_step_down
fast_jump_step_down
- db $38 ; movement
+ remove_sliding
step_end
BurnedTowerB1FEusineMovement2:
--- a/maps/CeladonCafe.asm
+++ b/maps/CeladonCafe.asm
@@ -105,7 +105,7 @@
setevent EVENT_FOUND_LEFTOVERS_IN_CELADON_CAFE
end
-.PackFull
+.PackFull:
opentext
itemtotext LEFTOVERS, $0
writetext FoundLeftoversText
@@ -115,7 +115,7 @@
closetext
end
-.TrashEmpty
+.TrashEmpty:
jumpstd trashcan
UnknownText_0x730de:
--- a/maps/CeladonCity.asm
+++ b/maps/CeladonCity.asm
@@ -19,7 +19,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_CELADON
return
--- a/maps/CeladonDeptStore6F.asm
+++ b/maps/CeladonDeptStore6F.asm
@@ -26,7 +26,7 @@
CeladonVendingMachine:
opentext
writetext CeladonVendingText
-.Start
+.Start:
special PlaceMoneyTopRight
loadmenudata .MenuData
verticalmenu
@@ -37,7 +37,7 @@
closetext
end
-.FreshWater
+.FreshWater:
checkmoney $0, 200
if_equal $2, .NotEnoughMoney
giveitem FRESH_WATER
@@ -46,7 +46,7 @@
itemtotext FRESH_WATER, $0
jump .VendItem
-.SodaPop
+.SodaPop:
checkmoney $0, 300
if_equal $2, .NotEnoughMoney
giveitem SODA_POP
@@ -55,7 +55,7 @@
itemtotext SODA_POP, $0
jump .VendItem
-.Lemonade
+.Lemonade:
checkmoney $0, 350
if_equal $2, .NotEnoughMoney
giveitem LEMONADE
@@ -64,7 +64,7 @@
itemtotext LEMONADE, $0
jump .VendItem
-.VendItem
+.VendItem:
pause 10
playsound SFX_ENTER_DOOR
writetext CeladonClangText
@@ -72,17 +72,17 @@
itemnotify
jump .Start
-.NotEnoughMoney
+.NotEnoughMoney:
writetext CeladonVendingNoMoneyText
waitbutton
jump .Start
-.NotEnoughSpace
+.NotEnoughSpace:
writetext CeladonVendingNoSpaceText
waitbutton
jump .Start
-.MenuData
+.MenuData:
db $40 ; flags
db 02, 00 ; start coords
db 11, 19 ; end coords
@@ -89,7 +89,7 @@
dw .MenuData2
db 1 ; default option
-.MenuData2
+.MenuData2:
db $80 ; flags
db 4 ; items
db "FRESH WATER ¥200@"
--- a/maps/CeladonGameCorner.asm
+++ b/maps/CeladonGameCorner.asm
@@ -64,7 +64,7 @@
scall .UnknownScript_0x72172
givecoins 18
setevent EVENT_GOT_COINS_FROM_GAMBLER_AT_CELADON
-.UnknownScript_0x72169
+.UnknownScript_0x72169:
writetext UnknownText_0x72345
waitbutton
closetext
@@ -71,7 +71,7 @@
spriteface LAST_TALKED, LEFT
end
-.UnknownScript_0x72172
+.UnknownScript_0x72172:
jumpstd receiveitem
end
--- a/maps/CeladonGameCornerPrizeRoom.asm
+++ b/maps/CeladonGameCornerPrizeRoom.asm
@@ -33,7 +33,7 @@
if_equal $3, .hyperbeam
jump CeladonPrizeRoom_cancel
-.doubleteam:
+.doubleteam
checkcoins 1500
if_equal $2, CeladonPrizeRoom_notenoughcoins
itemtotext TM_DOUBLE_TEAM, $0
@@ -44,7 +44,7 @@
takecoins 1500
jump CeladonPrizeRoom_purchased
-.psychic:
+.psychic
checkcoins 3500
if_equal $2, CeladonPrizeRoom_notenoughcoins
itemtotext TM_PSYCHIC, $0
@@ -55,7 +55,7 @@
takecoins 3500
jump CeladonPrizeRoom_purchased
-.hyperbeam:
+.hyperbeam
checkcoins 7500
if_equal $2, CeladonPrizeRoom_notenoughcoins
itemtotext TM_HYPER_BEAM, $0
@@ -126,7 +126,7 @@
waitbutton
checkitem COIN_CASE
iffalse CeladonPrizeRoom_NoCoinCase
-.loop:
+.loop
writetext CeladonPrizeRoom_AskWhichPrizeText
special Special_DisplayCoinCaseBalance
loadmenudata .MenuDataHeader
@@ -137,7 +137,7 @@
if_equal $3, .larvitar
jump CeladonPrizeRoom_cancel
-.pikachu:
+.pikachu
checkcoins 2222
if_equal $2, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
@@ -155,7 +155,7 @@
takecoins 2222
jump .loop
-.porygon:
+.porygon
checkcoins 5555
if_equal $2, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
@@ -173,7 +173,7 @@
takecoins 5555
jump .loop
-.larvitar:
+.larvitar
checkcoins 8888
if_equal $2, CeladonPrizeRoom_notenoughcoins
checkcode VAR_PARTYCOUNT
--- a/maps/CeladonGym.asm
+++ b/maps/CeladonGym.asm
@@ -35,7 +35,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_RAINBOWBADGE
-.FightDone
+.FightDone:
checkevent EVENT_GOT_TM19_GIGA_DRAIN
iftrue UnknownScript_0x72aae
writetext UnknownText_0x72cb0
@@ -108,7 +108,7 @@
checkflag ENGINE_RAINBOWBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext ERIKA, 1, $1
jumpstd gymstatue2
--- a/maps/CeladonPokeCenter1F.asm
+++ b/maps/CeladonPokeCenter1F.asm
@@ -36,11 +36,11 @@
iftrue .HoOh
writetext NoBeastsText
waitbutton
-.NoSuicune
+.NoSuicune:
closetext
end
-.HoOh
+.HoOh:
writetext EusineLeavesCeladonText
waitbutton
closetext
@@ -49,15 +49,15 @@
applymovement CELADONPOKECENTER1F_EUSINE, .Movement1
jump .Continue
-.Location1
+.Location1:
applymovement CELADONPOKECENTER1F_EUSINE, .Movement2
-.Continue
+.Continue:
disappear CELADONPOKECENTER1F_EUSINE
playsound SFX_EXIT_BUILDING
waitsfx
end
-.Movement2
+.Movement2:
step_left
step_down
step_down
@@ -65,7 +65,7 @@
step_down
step_end
-.Movement1
+.Movement1:
step_down
step_down
step_down
--- a/maps/CeruleanCity.asm
+++ b/maps/CeruleanCity.asm
@@ -16,7 +16,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_CERULEAN
return
--- a/maps/CeruleanGym.asm
+++ b/maps/CeruleanGym.asm
@@ -81,7 +81,7 @@
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_CASCADEBADGE
-.FightDone
+.FightDone:
writetext UnknownText_0x188782
waitbutton
closetext
@@ -130,7 +130,7 @@
closetext
end
-.CeruleanGymGuyWinScript
+.CeruleanGymGuyWinScript:
writetext CeruleanGymGuyWinText
waitbutton
closetext
@@ -138,8 +138,8 @@
CeruleanGymHiddenMachinePart:
dwb EVENT_FOUND_MACHINE_PART_IN_CERULEAN_GYM, MACHINE_PART
-
+
CeruleanGymStatue1:
checkevent EVENT_TRAINERS_IN_CERULEAN_GYM
iffalse CeruleanGymStatue
@@ -162,7 +162,7 @@
checkflag ENGINE_CASCADEBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext MISTY, 1, $1
jumpstd gymstatue2
--- a/maps/CeruleanPokeCenter1F.asm
+++ b/maps/CeruleanPokeCenter1F.asm
@@ -18,7 +18,7 @@
iftrue .mobile
jumptextfaceplayer UnknownText_0x188221
-.mobile:
+.mobile
jumptextfaceplayer UnknownText_0x18828c
GymGuyScript_0x18821e:
--- a/maps/CharcoalKiln.asm
+++ b/maps/CharcoalKiln.asm
@@ -22,13 +22,13 @@
closetext
end
-.SavedSlowpoke
+.SavedSlowpoke:
writetext CharcoalKilnBossText2
waitbutton
closetext
end
-.GotCut
+.GotCut:
writetext CharcoalKilnBossText3
waitbutton
closetext
@@ -46,7 +46,7 @@
closetext
end
-.Thanks
+.Thanks:
writetext CharcoalKilnApprenticeText2
buttonsound
verbosegiveitem CHARCOAL
@@ -55,10 +55,10 @@
closetext
end
-.YoureTheCoolest
+.YoureTheCoolest:
writetext CharcoalKilnApprenticeText3
waitbutton
-.Done
+.Done:
closetext
end
--- a/maps/CherrygroveCity.asm
+++ b/maps/CherrygroveCity.asm
@@ -19,13 +19,13 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
end
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_CHERRYGROVE
return
@@ -36,7 +36,7 @@
yesorno
iffalse .No
jump .Yes
-.Yes
+.Yes:
writetext GuideGentTourText1
waitbutton
closetext
@@ -91,7 +91,7 @@
waitsfx
end
-.JumpstdReceiveItem
+.JumpstdReceiveItem:
jumpstd receiveitem
end
@@ -98,7 +98,7 @@
.mapcardname
db "MAP CARD@"
-.No
+.No:
writetext GuideGentNoText
waitbutton
closetext
--- a/maps/CianwoodCity.asm
+++ b/maps/CianwoodCity.asm
@@ -26,13 +26,13 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPointAndSuicune
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
end
-.FlyPointAndSuicune
+.FlyPointAndSuicune:
setflag ENGINE_FLYPOINT_CIANWOOD
setevent EVENT_EUSINE_IN_BURNED_TOWER
checkevent EVENT_FOUGHT_EUSINE
@@ -83,7 +83,7 @@
special Special_FadeOutMusic
playmapmusic
pause 10
-.Done
+.Done:
end
PokefanFScript_0x1a0084:
--- a/maps/CianwoodGym.asm
+++ b/maps/CianwoodGym.asm
@@ -21,15 +21,15 @@
opentext
checkevent EVENT_BEAT_CHUCK
iftrue .FightDone
- writetext UnknownText_0x9d6f9
+ writetext ChuckIntroText1
waitbutton
closetext
spriteface CIANWOODGYM_CHUCK, RIGHT
opentext
- writetext UnknownText_0x9d76f
+ writetext ChuckIntroText2
waitbutton
closetext
- applymovement CIANWOODGYM_BOULDER1, MovementData_0x9d6f3
+ applymovement CIANWOODGYM_BOULDER1, CianwoodGymMovement_ChuckChucksBoulder
playsound SFX_STRENGTH
earthquake 80
disappear CIANWOODGYM_BOULDER1
@@ -36,42 +36,42 @@
pause 30
faceplayer
opentext
- writetext UnknownText_0x9d78a
+ writetext ChuckIntroText3
waitbutton
closetext
- winlosstext UnknownText_0x9d7f6, 0
+ winlosstext ChuckLossText, 0
loadtrainer CHUCK, 1
startbattle
reloadmapafterbattle
setevent EVENT_BEAT_CHUCK
opentext
- writetext UnknownText_0x9d835
+ writetext GetStormBadgeText
playsound SFX_GET_BADGE
waitsfx
setflag ENGINE_STORMBADGE
checkcode VAR_BADGES
scall CianwoodGymTriggerRockets
-.FightDone
+.FightDone:
checkevent EVENT_GOT_TM01_DYNAMICPUNCH
- iftrue UnknownScript_0x9d67b
+ iftrue .AlreadyGotTM
setevent EVENT_BEAT_BLACKBELT_YOSHI
setevent EVENT_BEAT_BLACKBELT_LAO
setevent EVENT_BEAT_BLACKBELT_NOB
setevent EVENT_BEAT_BLACKBELT_LUNG
- writetext UnknownText_0x9d84d
+ writetext ChuckExplainBadgeText
buttonsound
verbosegiveitem TM_DYNAMICPUNCH
- iffalse UnknownScript_0x9d67f
+ iffalse .BagFull
setevent EVENT_GOT_TM01_DYNAMICPUNCH
- writetext UnknownText_0x9d8da
+ writetext ChuckExplainTMText
waitbutton
closetext
end
-UnknownScript_0x9d67b:
- writetext UnknownText_0x9d930
+.AlreadyGotTM:
+ writetext ChuckAfterText
waitbutton
-UnknownScript_0x9d67f:
+.BagFull:
closetext
end
@@ -80,52 +80,52 @@
if_equal 6, .GoldenrodRockets
end
-.GoldenrodRockets
+.GoldenrodRockets:
jumpstd goldenrodrockets
-.RadioTowerRockets
+.RadioTowerRockets:
jumpstd radiotowerrockets
TrainerBlackbeltYoshi:
- trainer EVENT_BEAT_BLACKBELT_YOSHI, BLACKBELT_T, YOSHI, BlackbeltYoshiSeenText, BlackbeltYoshiBeatenText, 0, BlackbeltYoshiScript
+ trainer EVENT_BEAT_BLACKBELT_YOSHI, BLACKBELT_T, YOSHI, BlackbeltYoshiSeenText, BlackbeltYoshiBeatenText, 0, .Script
-BlackbeltYoshiScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9d9fa
+ writetext BlackbeltYoshiAfterText
waitbutton
closetext
end
TrainerBlackbeltLao:
- trainer EVENT_BEAT_BLACKBELT_LAO, BLACKBELT_T, LAO, BlackbeltLaoSeenText, BlackbeltLaoBeatenText, 0, BlackbeltLaoScript
+ trainer EVENT_BEAT_BLACKBELT_LAO, BLACKBELT_T, LAO, BlackbeltLaoSeenText, BlackbeltLaoBeatenText, 0, .Script
-BlackbeltLaoScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9da61
+ writetext BlackbeltLaoAfterText
waitbutton
closetext
end
TrainerBlackbeltNob:
- trainer EVENT_BEAT_BLACKBELT_NOB, BLACKBELT_T, NOB, BlackbeltNobSeenText, BlackbeltNobBeatenText, 0, BlackbeltNobScript
+ trainer EVENT_BEAT_BLACKBELT_NOB, BLACKBELT_T, NOB, BlackbeltNobSeenText, BlackbeltNobBeatenText, 0, .Script
-BlackbeltNobScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9dac0
+ writetext BlackbeltNobAfterText
waitbutton
closetext
end
TrainerBlackbeltLung:
- trainer EVENT_BEAT_BLACKBELT_LUNG, BLACKBELT_T, LUNG, BlackbeltLungSeenText, BlackbeltLungBeatenText, 0, BlackbeltLungScript
+ trainer EVENT_BEAT_BLACKBELT_LUNG, BLACKBELT_T, LUNG, BlackbeltLungSeenText, BlackbeltLungBeatenText, 0, .Script
-BlackbeltLungScript:
+.Script:
end_if_just_battled
opentext
- writetext UnknownText_0x9db14
+ writetext BlackbeltLungAfterText
waitbutton
closetext
end
@@ -137,19 +137,19 @@
checkflag ENGINE_STORMBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext CHUCK, 1, $1
jumpstd gymstatue2
-MovementData_0x9d6f3:
- db $39 ; movement
+CianwoodGymMovement_ChuckChucksBoulder:
+ set_sliding
big_step_left
big_step_up
fast_jump_step_right
- db $38 ; movement
+ remove_sliding
step_end
-UnknownText_0x9d6f9:
+ChuckIntroText1:
text "WAHAHAH!"
para "So you've come"
@@ -165,7 +165,7 @@
para "Watch this!"
done
-UnknownText_0x9d76f:
+ChuckIntroText2:
text "CHUCK: Urggh!"
line "…"
@@ -172,7 +172,7 @@
para "Oooarrgh!"
done
-UnknownText_0x9d78a:
+ChuckIntroText3:
text "There! Scared now,"
line "are you?"
@@ -186,7 +186,7 @@
line "do battle!"
done
-UnknownText_0x9d7f6:
+ChuckLossText:
text "Wha? Huh?"
line "I lost?"
@@ -195,12 +195,12 @@
cont "STORMBADGE!"
done
-UnknownText_0x9d835:
+GetStormBadgeText:
text "<PLAYER> received"
line "STORMBADGE."
done
-UnknownText_0x9d84d:
+ChuckExplainBadgeText:
text "STORMBADGE makes"
line "all #MON up to"
@@ -217,7 +217,7 @@
line "too!"
done
-UnknownText_0x9d8da:
+ChuckExplainTMText:
text "That is DYNAMIC-"
line "PUNCH."
@@ -228,7 +228,7 @@
line "confusion!"
done
-UnknownText_0x9d930:
+ChuckAfterText:
text "WAHAHAH! I enjoyed"
line "battling you!"
@@ -253,7 +253,7 @@
text "This isn't real!"
done
-UnknownText_0x9d9fa:
+BlackbeltYoshiAfterText:
text "You seem to have a"
line "strong bond with"
cont "your #MON too!"
@@ -268,7 +268,7 @@
text "That's shocking!"
done
-UnknownText_0x9da61:
+BlackbeltLaoAfterText:
text "Fighting #MON"
line "are afraid of psy-"
cont "chics…"
@@ -284,7 +284,7 @@
text "…"
done
-UnknownText_0x9dac0:
+BlackbeltNobAfterText:
text "I lost! "
line "I'm speechless!"
done
@@ -299,7 +299,7 @@
text "I got shattered!"
done
-UnknownText_0x9db14:
+BlackbeltLungAfterText:
text "My #MON lost…"
line "My… my pride is"
cont "shattered…"
--- a/maps/CianwoodPharmacy.asm
+++ b/maps/CianwoodPharmacy.asm
@@ -34,7 +34,7 @@
closetext
end
-.Mart
+.Mart:
pokemart MARTTYPE_PHARMACY, MART_CIANWOOD
closetext
end
--- a/maps/CianwoodPokeCenter1F.asm
+++ b/maps/CianwoodPokeCenter1F.asm
@@ -27,7 +27,7 @@
closetext
end
-.CianwoodGymGuyWinScript
+.CianwoodGymGuyWinScript:
opentext
writetext CianwoodGymGuyWinText
waitbutton
--- a/maps/CinnabarIsland.asm
+++ b/maps/CinnabarIsland.asm
@@ -11,7 +11,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_CINNABAR
return
--- a/maps/CopycatsHouse2F.asm
+++ b/maps/CopycatsHouse2F.asm
@@ -23,10 +23,10 @@
disappear COPYCATSHOUSE2F_COPYCAT2
appear COPYCATSHOUSE2F_COPYCAT1
jump .Done
-.Part1
+.Part1:
disappear COPYCATSHOUSE2F_COPYCAT1
appear COPYCATSHOUSE2F_COPYCAT2
-.Done
+.Done:
return
Copycat:
@@ -44,11 +44,11 @@
variablesprite SPRITE_COPYCAT, SPRITE_CHRIS
jump .Part2
-.Part1
+.Part1:
applymovement COPYCATSHOUSE2F_COPYCAT2, MovementData_0x18afd0
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_KRIS
-.Part2
+.Part2:
special RunCallback_04
checkevent EVENT_RETURNED_MACHINE_PART
iftrue .Part7
@@ -58,9 +58,9 @@
writetext UnknownText_0x18afda
jump .Part4
-.Part3
+.Part3:
writetext UnknownText_0x18b316
-.Part4
+.Part4:
waitbutton
closetext
checkflag ENGINE_PLAYER_IS_FEMALE
@@ -68,9 +68,9 @@
applymovement COPYCATSHOUSE2F_COPYCAT1, MovementData_0x18afd0
jump .Part6
-.Part5
+.Part5:
applymovement COPYCATSHOUSE2F_COPYCAT2, MovementData_0x18afd0
-.Part6
+.Part6:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
special RunCallback_04
@@ -80,7 +80,7 @@
closetext
end
-.Part7
+.Part7:
opentext
checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .Part8
@@ -87,9 +87,9 @@
writetext UnknownText_0x18b064
jump .Part9
-.Part8
+.Part8:
writetext UnknownText_0x18b366
-.Part9
+.Part9:
waitbutton
closetext
checkflag ENGINE_PLAYER_IS_FEMALE
@@ -97,9 +97,9 @@
applymovement COPYCATSHOUSE2F_COPYCAT1, MovementData_0x18afd0
jump .Part11
-.Part10
+.Part10:
applymovement COPYCATSHOUSE2F_COPYCAT2, MovementData_0x18afd0
-.Part11
+.Part11:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
special RunCallback_04
@@ -110,7 +110,7 @@
setevent EVENT_MET_COPYCAT_FOUND_OUT_ABOUT_LOST_ITEM
end
-.Part12
+.Part12:
opentext
writetext UnknownText_0x18b17f
buttonsound
@@ -119,9 +119,9 @@
clearevent EVENT_COPYCATS_HOUSE_2F_DOLL
jump .Part14
-.Part13
+.Part13:
opentext
-.Part14
+.Part14:
writetext UnknownText_0x18b1e2
buttonsound
verbosegiveitem PASS
@@ -132,7 +132,7 @@
closetext
end
-.Part15
+.Part15:
checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .Part16
applymovement COPYCATSHOUSE2F_COPYCAT1, MovementData_0x18afd0
@@ -140,11 +140,11 @@
variablesprite SPRITE_COPYCAT, SPRITE_CHRIS
jump .Part17
-.Part16
+.Part16:
applymovement COPYCATSHOUSE2F_COPYCAT2, MovementData_0x18afd0
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_KRIS
-.Part17
+.Part17:
special RunCallback_04
opentext
checkflag ENGINE_PLAYER_IS_FEMALE
@@ -152,9 +152,9 @@
writetext UnknownText_0x18b298
jump .Part19
-.Part18
+.Part18:
writetext UnknownText_0x18b415
-.Part19
+.Part19:
waitbutton
closetext
checkflag ENGINE_PLAYER_IS_FEMALE
@@ -162,9 +162,9 @@
applymovement COPYCATSHOUSE2F_COPYCAT1, MovementData_0x18afd0
jump .Part21
-.Part20
+.Part20:
applymovement COPYCATSHOUSE2F_COPYCAT2, MovementData_0x18afd0
-.Part21
+.Part21:
faceplayer
variablesprite SPRITE_COPYCAT, SPRITE_LASS
special RunCallback_04
@@ -171,7 +171,7 @@
opentext
writetext UnknownText_0x18b2f5
waitbutton
-.Part22
+.Part22:
closetext
end
--- a/maps/DarkCaveVioletEntrance.asm
+++ b/maps/DarkCaveVioletEntrance.asm
@@ -32,7 +32,7 @@
DarkCaveVioletEntranceHiddenElixer:
dwb EVENT_DARK_CAVE_VIOLET_ENTRANCE_HIDDEN_ELIXER, ELIXER
-
+
DarkCaveVioletEntrance_MapEventHeader:
; filler
--- a/maps/DiglettsCave.asm
+++ b/maps/DiglettsCave.asm
@@ -13,7 +13,7 @@
DiglettsCaveHiddenMaxRevive:
dwb EVENT_DIGLETTS_CAVE_HIDDEN_MAX_REVIVE, MAX_REVIVE
-
+
UnknownText_0x74008:
text "A bunch of DIGLETT"
--- a/maps/EarlsPokemonAcademy.asm
+++ b/maps/EarlsPokemonAcademy.asm
@@ -23,7 +23,7 @@
writetext UnknownText_0x68bbd
yesorno
iffalse .Done
-.Part1
+.Part1:
writetext UnknownText_0x68c51
yesorno
iffalse .Done
@@ -32,7 +32,7 @@
closetext
end
-.Done
+.Done:
writetext UnknownText_0x68d31
waitbutton
closetext
@@ -65,7 +65,7 @@
AcademyBlackboard:
opentext
writetext AcademyBlackboardText
-.Loop
+.Loop:
loadmenudata .MenuHeader
_2dmenu
closewindow
@@ -77,22 +77,22 @@
closetext
end
-.Poison
+.Poison:
writetext AcademyPoisonText
waitbutton
jump .Loop
-.Paralysis
+.Paralysis:
writetext AcademyParalysisText
waitbutton
jump .Loop
-.Sleep
+.Sleep:
writetext AcademySleepText
waitbutton
jump .Loop
-.Burn
+.Burn:
writetext AcademyBurnText
waitbutton
jump .Loop
@@ -102,7 +102,7 @@
waitbutton
jump .Loop
-.MenuHeader
+.MenuHeader:
db $40 ; flags
db 00, 00 ; start coords
db 08, 11 ; end coords
@@ -109,7 +109,7 @@
dw .Data
db 1 ; default option
-.Data
+.Data:
db $80 ; flags
dn 3, 2 ; rows, columns
db 5 ; spacing
@@ -116,7 +116,7 @@
dba .Text
dbw BANK(AcademyBlackboard), 0
-.Text
+.Text:
db "PSN@"
db "PAR@"
db "SLP@"
@@ -137,7 +137,7 @@
iffalse .Done
writetext AcademyNotebookText3
waitbutton
-.Done
+.Done:
closetext
end
--- a/maps/EcruteakCity.asm
+++ b/maps/EcruteakCity.asm
@@ -17,7 +17,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_ECRUTEAK
return
--- a/maps/EcruteakGym.asm
+++ b/maps/EcruteakGym.asm
@@ -48,7 +48,7 @@
domaptrigger ECRUTEAK_HOUSE, $1
setevent EVENT_RANG_CLEAR_BELL_1
setevent EVENT_RANG_CLEAR_BELL_2
-.FightDone
+.FightDone:
checkevent EVENT_GOT_TM30_SHADOW_BALL
iftrue UnknownScript_0x99db1
setevent EVENT_BEAT_SAGE_JEFFREY
@@ -77,10 +77,10 @@
if_equal 6, .GoldenrodRockets
end
-.GoldenrodRockets
+.GoldenrodRockets:
jumpstd goldenrodrockets
-.RadioTowerRockets
+.RadioTowerRockets:
jumpstd radiotowerrockets
UnknownScript_0x99dc6:
@@ -153,7 +153,7 @@
closetext
end
-.EcruteakGymGuyWinScript
+.EcruteakGymGuyWinScript:
writetext EcruteakGymGuyWinText
waitbutton
closetext
@@ -163,7 +163,7 @@
checkflag ENGINE_FOGBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext MORTY, 1, $1
jumpstd gymstatue2
--- a/maps/EcruteakPokeCenter1F.asm
+++ b/maps/EcruteakPokeCenter1F.asm
@@ -45,7 +45,7 @@
buttonsound
jump .PointlessJump
-.PointlessJump
+.PointlessJump:
writetext EcruteakPokeCenter1F_BillText2
waitbutton
closetext
@@ -67,7 +67,7 @@
iftrue .mobile
jumptextfaceplayer EcruteakPokeCenter1FPokefanMText
-.mobile:
+.mobile
jumptextfaceplayer EcruteakPokeCenter1FPokefanMTextMobile
EcruteakPokeCenter1FCooltrainerFScript:
--- a/maps/ElmsLab.asm
+++ b/maps/ElmsLab.asm
@@ -305,7 +305,7 @@
closetext
end
-.CanHeal
+.CanHeal:
writetext ElmsLabHealingMachineText2
yesorno
iftrue ElmsLabHealingMachine_HealParty
@@ -578,13 +578,13 @@
iftrue .BreakIn
jump .Normal
-.BreakIn
+.BreakIn:
writetext ElmsLabWindowText2
waitbutton
closetext
end
-.Normal
+.Normal:
writetext ElmsLabWindowText1
waitbutton
closetext
--- a/maps/FastShip1F.asm
+++ b/maps/FastShip1F.asm
@@ -56,7 +56,7 @@
closetext
end
-.Olivine
+.Olivine:
writetext UnknownText_0x7529b
waitbutton
closetext
@@ -77,7 +77,7 @@
warp VERMILION_PORT, $7, $11
end
-._Olivine
+._Olivine:
writetext UnknownText_0x7548d
waitbutton
closetext
--- a/maps/FastShipCabins_SW_SSW_NW.asm
+++ b/maps/FastShipCabins_SW_SSW_NW.asm
@@ -57,7 +57,7 @@
closetext
end
-.mobile:
+.mobile
opentext
writetext UnknownText_0x75cfe
waitbutton
--- a/maps/FuchsiaCity.asm
+++ b/maps/FuchsiaCity.asm
@@ -14,7 +14,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_FUCHSIA
return
--- a/maps/FuchsiaGym.asm
+++ b/maps/FuchsiaGym.asm
@@ -42,7 +42,7 @@
waitsfx
setflag ENGINE_SOULBADGE
jump UnknownScript_0x195e02
-.FightDone
+.FightDone:
faceplayer
opentext
UnknownScript_0x195e02:
@@ -205,7 +205,7 @@
closetext
end
-.FuchsiaGymGuyWinScript
+.FuchsiaGymGuyWinScript:
writetext FuchsiaGymGuyWinText
waitbutton
closetext
@@ -215,7 +215,7 @@
checkflag ENGINE_SOULBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext JANINE, 1, $1
jumpstd gymstatue2
--- a/maps/GoldenrodCity.asm
+++ b/maps/GoldenrodCity.asm
@@ -26,16 +26,16 @@
dbw MAPCALLBACK_NEWMAP, .FlyPointAndFloria
dbw MAPCALLBACK_OBJECTS, .MoveTutor
-.FlyPointAndFloria
+.FlyPointAndFloria:
setflag ENGINE_FLYPOINT_GOLDENROD
setflag ENGINE_FLORIA
checkevent EVENT_MET_FLORIA
iftrue .FloriaDone
clearevent EVENT_FLORIA_AT_SUDOWOODO
-.FloriaDone
+.FloriaDone:
return
-.MoveTutor
+.MoveTutor:
checkevent EVENT_BEAT_ELITE_FOUR
iffalse .MoveTutorDone
checkitem COIN_CASE
@@ -43,15 +43,15 @@
checkcode VAR_WEEKDAY
if_equal WEDNESDAY, .MoveTutorAppear
if_equal SATURDAY, .MoveTutorAppear
-.MoveTutorDisappear
+.MoveTutorDisappear:
disappear GOLDENRODCITY_POKEFAN_M2
return
-.MoveTutorAppear
+.MoveTutorAppear:
checkflag ENGINE_DAILY_MOVE_TUTOR
iftrue .MoveTutorDone
appear GOLDENRODCITY_POKEFAN_M2
-.MoveTutorDone
+.MoveTutorDone:
return
MoveTutor:
--- a/maps/GoldenrodDeptStore5F.asm
+++ b/maps/GoldenrodDeptStore5F.asm
@@ -23,7 +23,7 @@
disappear GOLDENRODDEPTSTORE5F_RECEPTIONIST
return
-.yes:
+.yes
appear GOLDENRODDEPTSTORE5F_RECEPTIONIST
return
@@ -36,27 +36,27 @@
iftrue .onlyrocksmash
jump .neither
-.headbutt:
+.headbutt
checkevent EVENT_GOT_TM08_ROCK_SMASH
iftrue .both
jump .onlyheadbutt
-.neither:
+.neither
pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_1
closetext
end
-.onlyheadbutt:
+.onlyheadbutt
pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_2
closetext
end
-.onlyrocksmash:
+.onlyrocksmash
pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_3
closetext
end
-.both:
+.both
pokemart MARTTYPE_STANDARD, MART_GOLDENROD_5F_4
closetext
end
--- a/maps/GoldenrodDeptStore6F.asm
+++ b/maps/GoldenrodDeptStore6F.asm
@@ -12,7 +12,7 @@
GoldenrodVendingMachine:
opentext
writetext GoldenrodVendingText
-.Start
+.Start:
special PlaceMoneyTopRight
loadmenudata .MenuData
verticalmenu
@@ -23,7 +23,7 @@
closetext
end
-.FreshWater
+.FreshWater:
checkmoney $0, 200
if_equal $2, .NotEnoughMoney
giveitem FRESH_WATER
@@ -32,7 +32,7 @@
itemtotext FRESH_WATER, $0
jump .VendItem
-.SodaPop
+.SodaPop:
checkmoney $0, 300
if_equal $2, .NotEnoughMoney
giveitem SODA_POP
@@ -41,7 +41,7 @@
itemtotext SODA_POP, $0
jump .VendItem
-.Lemonade
+.Lemonade:
checkmoney $0, 350
if_equal $2, .NotEnoughMoney
giveitem LEMONADE
@@ -50,7 +50,7 @@
itemtotext LEMONADE, $0
jump .VendItem
-.VendItem
+.VendItem:
pause 10
playsound SFX_ENTER_DOOR
writetext GoldenrodClangText
@@ -58,17 +58,17 @@
itemnotify
jump .Start
-.NotEnoughMoney
+.NotEnoughMoney:
writetext GoldenrodVendingNoMoneyText
waitbutton
jump .Start
-.NotEnoughSpace
+.NotEnoughSpace:
writetext GoldenrodVendingNoSpaceText
waitbutton
jump .Start
-.MenuData
+.MenuData:
db $40 ; flags
db 02, 00 ; start coords
db 11, 19 ; end coords
@@ -75,7 +75,7 @@
dw .MenuData2
db 1 ; default option
-.MenuData2
+.MenuData2:
db $80 ; flags
db 4 ; items
db "FRESH WATER ¥200@"
--- a/maps/GoldenrodDeptStoreB1F.asm
+++ b/maps/GoldenrodDeptStoreB1F.asm
@@ -38,11 +38,11 @@
changeblock $a, $8, $d
return
-.Layout2
+.Layout2:
changeblock $4, $a, $d
return
-.Layout3
+.Layout3:
changeblock $a, $c, $d
return
--- a/maps/GoldenrodDeptStoreElevator.asm
+++ b/maps/GoldenrodDeptStoreElevator.asm
@@ -22,25 +22,25 @@
iftrue .BoxLayout2
checkevent EVENT_WAREHOUSE_LAYOUT_3
iftrue .BoxLayout3
-.BoxLayout3
+.BoxLayout3:
setevent EVENT_WAREHOUSE_LAYOUT_1
clearevent EVENT_WAREHOUSE_LAYOUT_2
clearevent EVENT_WAREHOUSE_LAYOUT_3
end
-.BoxLayout1
+.BoxLayout1:
clearevent EVENT_WAREHOUSE_LAYOUT_1
setevent EVENT_WAREHOUSE_LAYOUT_2
clearevent EVENT_WAREHOUSE_LAYOUT_3
end
-.BoxLayout2
+.BoxLayout2:
clearevent EVENT_WAREHOUSE_LAYOUT_1
clearevent EVENT_WAREHOUSE_LAYOUT_2
setevent EVENT_WAREHOUSE_LAYOUT_3
end
-.Done
+.Done:
end
--- a/maps/GoldenrodGameCorner.asm
+++ b/maps/GoldenrodGameCorner.asm
@@ -23,7 +23,7 @@
dbw MAPCALLBACK_OBJECTS, .Callback
-.Callback
+.Callback:
checkevent EVENT_BEAT_ELITE_FOUR
iffalse .finish
checkitem COIN_CASE
@@ -149,7 +149,7 @@
dw .MenuData2
db 1 ; default option
-.MenuData2
+.MenuData2:
db $80 ; flags
db 4 ; items
db "TM25 5500@"
@@ -176,7 +176,7 @@
if_equal $3, .wobbuffet
jump GoldenrodGameCornerPrizeVendor_CancelPurchaseScript
-.abra:
+.abra
checkcoins 100
if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
@@ -194,7 +194,7 @@
takecoins 100
jump .loop
-.cubone:
+.cubone
checkcoins 800
if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
@@ -212,7 +212,7 @@
takecoins 800
jump .loop
-.wobbuffet:
+.wobbuffet
checkcoins 1500
if_equal $2, GoldenrodGameCornerPrizeVendor_NotEnoughCoinsScript
checkcode VAR_PARTYCOUNT
--- a/maps/GoldenrodGym.asm
+++ b/maps/GoldenrodGym.asm
@@ -42,7 +42,7 @@
setevent EVENT_BEAT_BEAUTY_SAMANTHA
setevent EVENT_BEAT_LASS_CARRIE
setevent EVENT_BEAT_LASS_BRIDGET
-.FightDone
+.FightDone:
opentext
checkevent EVENT_MADE_WHITNEY_CRY
iffalse .StoppedCrying
@@ -51,7 +51,7 @@
closetext
end
-.StoppedCrying
+.StoppedCrying:
checkevent EVENT_GOT_TM45_ATTRACT
iftrue UnknownScript_0x54077
checkflag ENGINE_PLAINBADGE
@@ -88,10 +88,10 @@
if_equal 6, .GoldenrodRockets
end
-.GoldenrodRockets
+.GoldenrodRockets:
jumpstd goldenrodrockets
-.RadioTowerRockets
+.RadioTowerRockets:
jumpstd radiotowerrockets
TrainerLassCarrie:
@@ -161,7 +161,7 @@
closetext
end
-.GoldenrodGymGuyWinScript
+.GoldenrodGymGuyWinScript:
opentext
writetext GoldenrodGymGuyWinText
waitbutton
@@ -172,7 +172,7 @@
checkflag ENGINE_PLAINBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext WHITNEY, 1, $1
jumpstd gymstatue2
--- a/maps/GoldenrodPokeCenter1F.asm
+++ b/maps/GoldenrodPokeCenter1F.asm
@@ -21,7 +21,7 @@
if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
end
-.gsball:
+.gsball
checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
iftrue .cancel
playsound SFX_EXIT_BUILDING
@@ -44,7 +44,7 @@
special RestartMapMusic
disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
playsound SFX_EXIT_BUILDING
-.cancel:
+.cancel
end
GoldenrodPokeCenter1F_GSBallTriggerRight:
@@ -53,7 +53,7 @@
if_equal MOBILE_EVENT_OBJECT_GS_BALL, .gsball
end
-.gsball:
+.gsball
checkevent EVENT_GOT_GS_BALL_FROM_POKECOM_CENTER
iftrue .cancel
playsound SFX_EXIT_BUILDING
@@ -76,7 +76,7 @@
special RestartMapMusic
disappear GOLDENRODPOKECENTER1F_LINK_RECEPTIONIST
playsound SFX_EXIT_BUILDING
-.cancel:
+.cancel
end
GameboyKidScript_0x6101e:
--- a/maps/IcePathB1F.asm
+++ b/maps/IcePathB1F.asm
@@ -21,8 +21,8 @@
return
.CommandQueue:
- dbw MAPCALLBACK_OBJECTS, .StoneTable ; check if any stones are sitting on a warp
- db 0, 0 ; filler
+ dbw CMDQUEUE_STONETABLE, .StoneTable ; check if any stones are sitting on a warp
+ dw 0 ; filler
.StoneTable:
stonetable 3, ICEPATHB1F_BOULDER1, .Boulder1
@@ -90,10 +90,10 @@
db 8
warp_def $f, $3, 3, ICE_PATH_1F
warp_def $3, $11, 1, ICE_PATH_B2F_MAHOGANY_SIDE
- warp_def $2, $b, 3, ICE_PATH_B2F_MAHOGANY_SIDE
- warp_def $7, $4, 4, ICE_PATH_B2F_MAHOGANY_SIDE
- warp_def $c, $5, 5, ICE_PATH_B2F_MAHOGANY_SIDE
- warp_def $d, $c, 6, ICE_PATH_B2F_MAHOGANY_SIDE
+ warp_def $2, $b, 3, ICE_PATH_B2F_MAHOGANY_SIDE ; hole
+ warp_def $7, $4, 4, ICE_PATH_B2F_MAHOGANY_SIDE ; hole
+ warp_def $c, $5, 5, ICE_PATH_B2F_MAHOGANY_SIDE ; hole
+ warp_def $d, $c, 6, ICE_PATH_B2F_MAHOGANY_SIDE ; hole
warp_def $19, $5, 4, ICE_PATH_1F
warp_def $1b, $b, 1, ICE_PATH_B2F_BLACKTHORN_SIDE
--- a/maps/IcePathB2FBlackthornSide.asm
+++ b/maps/IcePathB2FBlackthornSide.asm
@@ -13,7 +13,7 @@
IcePathB2FBlackthornSideHiddenIceHeal:
dwb EVENT_ICE_PATH_B2F_BLACKTHORN_SIDE_HIDDEN_ICE_HEAL, ICE_HEAL
-
+
IcePathB2FBlackthornSide_MapEventHeader:
; filler
--- a/maps/IcePathB2FMahoganySide.asm
+++ b/maps/IcePathB2FMahoganySide.asm
@@ -24,7 +24,7 @@
IcePathB2FMahoganySideHiddenCarbos:
dwb EVENT_ICE_PATH_B2F_MAHOGANY_SIDE_HIDDEN_CARBOS, CARBOS
-
+
UnknownText_0x7e5ad:
text "It's immovably"
--- a/maps/IlexForest.asm
+++ b/maps/IlexForest.asm
@@ -418,11 +418,11 @@
IlexForestHiddenEther:
dwb EVENT_ILEX_FOREST_HIDDEN_ETHER, ETHER
-
+
IlexForestHiddenSuperPotion:
dwb EVENT_ILEX_FOREST_HIDDEN_SUPER_POTION, SUPER_POTION
-
+
IlexForestHiddenFullHeal:
dwb EVENT_ILEX_FOREST_HIDDEN_FULL_HEAL, FULL_HEAL
--- a/maps/IndigoPlateauPokeCenter1F.asm
+++ b/maps/IndigoPlateauPokeCenter1F.asm
@@ -108,7 +108,7 @@
reloadmapafterbattle
jump PlateauRivalPostBattle
-.Totodile
+.Totodile:
winlosstext PlateauRivalWinText, PlateauRivalLoseText
setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
loadtrainer RIVAL2, 4
@@ -117,7 +117,7 @@
reloadmapafterbattle
jump PlateauRivalPostBattle
-.Chikorita
+.Chikorita:
winlosstext PlateauRivalWinText, PlateauRivalLoseText
setlasttalked INDIGOPLATEAUPOKECENTER1F_SILVER
loadtrainer RIVAL2, 5
@@ -168,7 +168,7 @@
warp NEW_BARK_TOWN, $d, $6
end
-.No
+.No:
writetext TeleportGuyNoText
waitbutton
closetext
--- a/maps/KrissHouse1F.asm
+++ b/maps/KrissHouse1F.asm
@@ -164,22 +164,22 @@
checknite
iftrue .NiteScript
-.MornScript
+.MornScript:
writetext NeighborMornIntroText
buttonsound
jump .Main
-.DayScript
+.DayScript:
writetext NeighborDayIntroText
buttonsound
jump .Main
-.NiteScript
+.NiteScript:
writetext NeighborNiteIntroText
buttonsound
jump .Main
-.Main
+.Main:
writetext NeighborText
waitbutton
closetext
--- a/maps/KrissHouse2F.asm
+++ b/maps/KrissHouse2F.asm
@@ -53,7 +53,7 @@
KrissHousePoster:
dw EVENT_KRISS_ROOM_POSTER, .Script
-.Script
+.Script:
describedecoration 0
KrissHouseRadio:
@@ -76,10 +76,10 @@
setevent EVENT_LISTENED_TO_INITIAL_RADIO
end
-.NormalRadio
+.NormalRadio:
jumpstd radio1
-.AbbreviatedRadio
+.AbbreviatedRadio:
opentext
writetext KrisRadioText4
pause 45
@@ -95,7 +95,7 @@
iftrue .Warp
closetext
end
-.Warp
+.Warp:
warp NONE, $0, $0
end
--- a/maps/KrissNeighborsHouse.asm
+++ b/maps/KrissNeighborsHouse.asm
@@ -37,9 +37,9 @@
closetext
setevent EVENT_LISTENED_TO_INITIAL_RADIO
end
-.NormalRadio
+.NormalRadio:
jumpstd radio1
-.AbbreviatedRadio
+.AbbreviatedRadio:
opentext
writetext KrisNeighborRadioText4
pause 45
--- a/maps/KurtsHouse.asm
+++ b/maps/KurtsHouse.asm
@@ -368,7 +368,7 @@
closetext
end
-.SlowpokeBack
+.SlowpokeBack:
opentext
writetext KurtsGranddaughterSlowpokeBackText
waitbutton
@@ -375,7 +375,7 @@
closetext
end
-.Lonely
+.Lonely:
opentext
writetext KurtsGranddaughterLonelyText
waitbutton
@@ -382,7 +382,7 @@
closetext
end
-.Dad
+.Dad:
opentext
writetext KurtsGranddaughterDadText
waitbutton
@@ -401,7 +401,7 @@
spriteface KURTSHOUSE_TWIN2, RIGHT
end
-.GSBall
+.GSBall:
writetext KurtsGranddaughterGSBallText
waitbutton
closetext
--- a/maps/LakeofRage.asm
+++ b/maps/LakeofRage.asm
@@ -28,23 +28,23 @@
dbw MAPCALLBACK_NEWMAP, .FlyPoint
dbw MAPCALLBACK_OBJECTS, .Wesley
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
end
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_LAKE_OF_RAGE
return
-.Wesley
+.Wesley:
checkcode VAR_WEEKDAY
if_equal WEDNESDAY, .WesleyAppears
disappear LAKEOFRAGE_WESLEY
return
-.WesleyAppears
+.WesleyAppears:
appear LAKEOFRAGE_WESLEY
return
@@ -206,7 +206,7 @@
writetext MeetWesleyText
buttonsound
setevent EVENT_MET_WESLEY_OF_WEDNESDAY
-.MetWesley
+.MetWesley:
writetext WesleyGivesGiftText
buttonsound
verbosegiveitem BLACKBELT
@@ -238,15 +238,15 @@
LakeofRageHiddenFullRestore:
dwb EVENT_LAKE_OF_RAGE_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+
LakeofRageHiddenRareCandy:
dwb EVENT_LAKE_OF_RAGE_HIDDEN_RARE_CANDY, RARE_CANDY
-
+
LakeofRageHiddenMaxPotion:
dwb EVENT_LAKE_OF_RAGE_HIDDEN_MAX_POTION, MAX_POTION
-
+
MovementData_0x70155:
teleport_from
--- a/maps/LakeofRageHiddenPowerHouse.asm
+++ b/maps/LakeofRageHiddenPowerHouse.asm
@@ -22,10 +22,10 @@
waitbutton
closetext
end
-.AlreadyGotItem
+.AlreadyGotItem:
writetext HiddenPowerGuyText3
waitbutton
-.Done
+.Done:
closetext
end
--- a/maps/LancesRoom.asm
+++ b/maps/LancesRoom.asm
@@ -8,8 +8,8 @@
db 2
; triggers
- dw UnknownScript_0x180e39, 0
- dw UnknownScript_0x180e3d, 0
+ dw .Trigger0, 0
+ dw .Trigger1, 0
.MapCallbacks:
db 1
@@ -16,28 +16,28 @@
; callbacks
- dbw MAPCALLBACK_TILES, UnknownScript_0x180e3e
+ dbw MAPCALLBACK_TILES, .CheckDoor
-UnknownScript_0x180e39:
- priorityjump UnknownScript_0x180e53
+.Trigger0:
+ priorityjump LancesRoom_PlayerWalksIn_DoorsCloseBehind
end
-UnknownScript_0x180e3d:
+.Trigger1:
end
-UnknownScript_0x180e3e:
+.CheckDoor:
checkevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
- iffalse UnknownScript_0x180e48
+ iffalse .LanceEntranceOpen
changeblock $4, $16, $34
-UnknownScript_0x180e48:
+.LanceEntranceOpen:
checkevent EVENT_LANCES_ROOM_EXIT_OPEN
- iffalse UnknownScript_0x180e52
+ iffalse .LanceExitClosed
changeblock $4, $0, $b
-UnknownScript_0x180e52:
+.LanceExitClosed:
return
-UnknownScript_0x180e53:
- applymovement PLAYER, MovementData_0x180f33
+LancesRoom_PlayerWalksIn_DoorsCloseBehind:
+ applymovement PLAYER, LancesRoom_PlayerWalksInMovementData
refreshscreen $86
playsound SFX_STRENGTH
earthquake 80
@@ -48,21 +48,21 @@
setevent EVENT_LANCES_ROOM_ENTRANCE_CLOSED
end
-UnknownScript_0x180e6a:
+Script_ApproachLanceFromLeft:
special Special_FadeOutMusic
- applymovement PLAYER, MovementData_0x180f38
+ applymovement PLAYER, MovementData_ApproachLanceFromLeft
jump LanceScript_0x180e7b
-UnknownScript_0x180e74:
+Script_ApproachLanceFromRight:
special Special_FadeOutMusic
- applymovement PLAYER, MovementData_0x180f3c
+ applymovement PLAYER, MovementData_ApproachLanceFromRight
LanceScript_0x180e7b:
spriteface LANCESROOM_LANCE, LEFT
opentext
- writetext UnknownText_0x180f67
+ writetext LanceBattleIntroText
waitbutton
closetext
- winlosstext UnknownText_0x1810a4, 0
+ winlosstext LanceBattleWinText, 0
setlasttalked LANCESROOM_LANCE
loadtrainer CHAMPION, LANCE
startbattle
@@ -70,7 +70,7 @@
reloadmapafterbattle
setevent EVENT_BEAT_CHAMPION_LANCE
opentext
- writetext UnknownText_0x181132
+ writetext LanceBattleAfterText
waitbutton
closetext
playsound SFX_ENTER_DOOR
@@ -85,15 +85,15 @@
pause 10
spriteface PLAYER, DOWN
appear LANCESROOM_MARY
- applymovement LANCESROOM_MARY, MovementData_0x180f41
+ applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRushesIn
opentext
writetext UnknownText_0x1811dd
waitbutton
closetext
appear LANCESROOM_OAK
- applymovement LANCESROOM_OAK, MovementData_0x180f46
+ applymovement LANCESROOM_OAK, LancesRoomMovementData_OakWalksIn
follow LANCESROOM_MARY, LANCESROOM_OAK
- applymovement LANCESROOM_MARY, MovementData_0x180f49
+ applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryYieldsToOak
stopfollow
spriteface LANCESROOM_OAK, UP
spriteface LANCESROOM_LANCE, LEFT
@@ -101,13 +101,13 @@
writetext UnknownText_0x18121b
waitbutton
closetext
- applymovement LANCESROOM_MARY, MovementData_0x180f4c
+ applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryInterviewChampion
spriteface PLAYER, LEFT
opentext
writetext UnknownText_0x18134b
waitbutton
closetext
- applymovement LANCESROOM_LANCE, MovementData_0x180f4f
+ applymovement LANCESROOM_LANCE, LancesRoomMovementData_LancePositionsSelfToGuidePlayerAway
spriteface PLAYER, UP
opentext
writetext UnknownText_0x18137b
@@ -116,26 +116,26 @@
follow LANCESROOM_LANCE, PLAYER
spriteface LANCESROOM_MARY, UP
spriteface LANCESROOM_OAK, UP
- applymovement LANCESROOM_LANCE, MovementData_0x180f53
+ applymovement LANCESROOM_LANCE, LancesRoomMovementData_LanceLeadsPlayerToHallOfFame
stopfollow
playsound SFX_EXIT_BUILDING
disappear LANCESROOM_LANCE
- applymovement PLAYER, MovementData_0x180f55
+ applymovement PLAYER, LancesRoomMovementData_PlayerExits
playsound SFX_EXIT_BUILDING
disappear PLAYER
- applymovement LANCESROOM_MARY, MovementData_0x180f57
+ applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryTriesToFollow
showemote EMOTE_SHOCK, LANCESROOM_MARY, 15
opentext
writetext UnknownText_0x1813c5
pause 30
closetext
- applymovement LANCESROOM_MARY, MovementData_0x180f5b
+ applymovement LANCESROOM_MARY, LancesRoomMovementData_MaryRunsBackAndForth
special FadeOutPalettes
pause 15
warpfacing UP, HALL_OF_FAME, $4, $d
end
-MovementData_0x180f33:
+LancesRoom_PlayerWalksInMovementData:
step_up
step_up
step_up
@@ -142,13 +142,13 @@
step_up
step_end
-MovementData_0x180f38:
+MovementData_ApproachLanceFromLeft:
step_up
step_up
turn_head_right
step_end
-MovementData_0x180f3c:
+MovementData_ApproachLanceFromRight:
step_up
step_left
step_up
@@ -155,7 +155,7 @@
turn_head_right
step_end
-MovementData_0x180f41:
+LancesRoomMovementData_MaryRushesIn:
big_step_up
big_step_up
big_step_up
@@ -162,42 +162,42 @@
turn_head_down
step_end
-MovementData_0x180f46:
+LancesRoomMovementData_OakWalksIn:
step_up
step_up
step_end
-MovementData_0x180f49:
+LancesRoomMovementData_MaryYieldsToOak:
step_left
turn_head_right
step_end
-MovementData_0x180f4c:
+LancesRoomMovementData_MaryInterviewChampion:
big_step_up
turn_head_right
step_end
-MovementData_0x180f4f:
+LancesRoomMovementData_LancePositionsSelfToGuidePlayerAway:
step_up
step_left
turn_head_down
step_end
-MovementData_0x180f53:
+LancesRoomMovementData_LanceLeadsPlayerToHallOfFame:
step_up
step_end
-MovementData_0x180f55:
+LancesRoomMovementData_PlayerExits:
step_up
step_end
-MovementData_0x180f57:
+LancesRoomMovementData_MaryTriesToFollow:
step_up
step_right
turn_head_up
step_end
-MovementData_0x180f5b:
+LancesRoomMovementData_MaryRunsBackAndForth:
big_step_right
big_step_right
big_step_left
@@ -211,7 +211,7 @@
turn_head_up
step_end
-UnknownText_0x180f67:
+LanceBattleIntroText:
text "LANCE: I've been"
line "waiting for you."
@@ -243,7 +243,7 @@
cont "your challenge!"
done
-UnknownText_0x1810a4:
+LanceBattleWinText:
text "…It's over."
para "But it's an odd"
@@ -260,7 +260,7 @@
line "CHAMPION!"
done
-UnknownText_0x181132:
+LanceBattleAfterText:
text "…Whew."
para "You have become"
@@ -355,8 +355,8 @@
.XYTriggers:
db 2
- xy_trigger 1, $5, $4, $0, UnknownScript_0x180e6a, $0, $0
- xy_trigger 1, $5, $5, $0, UnknownScript_0x180e74, $0, $0
+ xy_trigger 1, $5, $4, $0, Script_ApproachLanceFromLeft, $0, $0
+ xy_trigger 1, $5, $5, $0, Script_ApproachLanceFromRight, $0, $0
.Signposts:
db 0
--- a/maps/LavRadioTower1F.asm
+++ b/maps/LavRadioTower1F.asm
@@ -39,13 +39,13 @@
stringtotext .expncardname, $1
scall .UnknownScript_0x7ee94
setflag ENGINE_EXPN_CARD
-.UnknownScript_0x7ee8e
+.UnknownScript_0x7ee8e:
writetext UnknownText_0x7f141
waitbutton
closetext
end
-.UnknownScript_0x7ee94
+.UnknownScript_0x7ee94:
jumpstd receiveitem
end
--- a/maps/LavenderTown.asm
+++ b/maps/LavenderTown.asm
@@ -14,7 +14,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_LAVENDER
return
--- a/maps/MahoganyGym.asm
+++ b/maps/MahoganyGym.asm
@@ -34,7 +34,7 @@
setflag ENGINE_GLACIERBADGE
checkcode VAR_BADGES
scall MahoganyGymTriggerRockets
-.FightDone
+.FightDone:
checkevent EVENT_GOT_TM16_ICY_WIND
iftrue UnknownScript_0x199af0
setevent EVENT_BEAT_SKIER_ROXANNE
@@ -64,10 +64,10 @@
if_equal 6, .GoldenrodRockets
end
-.GoldenrodRockets
+.GoldenrodRockets:
jumpstd goldenrodrockets
-.RadioTowerRockets
+.RadioTowerRockets:
jumpstd radiotowerrockets
TrainerSkierRoxanne:
@@ -135,7 +135,7 @@
closetext
end
-.MahoganyGymGuyWinScript
+.MahoganyGymGuyWinScript:
writetext MahoganyGymGuyWinText
waitbutton
closetext
@@ -145,7 +145,7 @@
checkflag ENGINE_GLACIERBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext PRYCE, 1, $1
jumpstd gymstatue2
--- a/maps/MahoganyTown.asm
+++ b/maps/MahoganyTown.asm
@@ -18,13 +18,13 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
end
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_MAHOGANY
return
--- a/maps/ManiasHouse.asm
+++ b/maps/ManiasHouse.asm
@@ -30,7 +30,7 @@
setevent EVENT_GOT_SHUCKIE
end
-.alreadyhaveshuckie:
+.alreadyhaveshuckie
checkflag ENGINE_SHUCKLE_GIVEN
iffalse .returnshuckie
writetext ManiaText_TakeCareOfShuckle
@@ -38,19 +38,19 @@
closetext
end
-.partyfull:
+.partyfull
writetext ManiaText_PartyFull
waitbutton
closetext
end
-.refusetotakeshuckie:
+.refusetotakeshuckie
writetext ManiaText_IfHeComesBack
waitbutton
closetext
end
-.returnshuckie:
+.returnshuckie
writetext ManiaText_CanIHaveMyMonBack
yesorno
iffalse .refused
@@ -65,13 +65,13 @@
setevent EVENT_MANIA_TOOK_SHUCKIE_OR_LET_YOU_KEEP_HIM
end
-.wrong:
+.wrong
writetext ManiaText_ShuckleNotThere
waitbutton
closetext
end
-.superhappy:
+.superhappy
writetext ManiaText_ShuckleLikesYou
waitbutton
closetext
@@ -78,19 +78,19 @@
setevent EVENT_MANIA_TOOK_SHUCKIE_OR_LET_YOU_KEEP_HIM
end
-.refused:
+.refused
writetext ManiaText_SameAsBeingRobbed
waitbutton
closetext
end
-.nothingleft:
+.nothingleft
writetext ManiaText_ShuckleIsYourLastMon
waitbutton
closetext
end
-.default_postevent:
+.default_postevent
writetext ManiaText_HappinessSpeech
waitbutton
closetext
--- a/maps/MobileBattleRoom.asm
+++ b/maps/MobileBattleRoom.asm
@@ -31,7 +31,7 @@
if_equal $2, .two_
jump .false
-.one_:
+.one_
writetext MobileBattleRoom_HealText
pause 20
closetext
@@ -42,18 +42,18 @@
special FadeInPalettes
special RestartMapMusic
refreshscreen $0
-.two_:
+.two_
special Mobile_HealParty
special HealParty
special Function10383c
iftrue .false
-.one:
+.one
special Function10387b
writetext MobileBattleRoom_EstablishingCommsText
waitbutton
reloadmappart
special Function101225
-.false:
+.false
closetext
end
--- a/maps/MountMoonSquare.asm
+++ b/maps/MountMoonSquare.asm
@@ -23,7 +23,7 @@
end
UnknownScript_0x77093:
- setevent EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE
+ setevent EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE
return
UnknownScript_0x77097:
@@ -82,7 +82,7 @@
MountMoonSquareHiddenMoonStone:
dwb EVENT_MOUNT_MOON_SQUARE_HIDDEN_MOON_STONE, MOON_STONE
-
+
DontLitterSign:
jumptext DontLitterSignText
--- a/maps/MountMortar1FInside.asm
+++ b/maps/MountMortar1FInside.asm
@@ -65,7 +65,7 @@
MountMortar1FInsideHiddenMaxRepel:
dwb EVENT_MOUNT_MORTAR_1F_INSIDE_HIDDEN_MAX_REPEL, MAX_REPEL
-
+
PokemaniacMillerSeenText:
text "I'm not losing"
--- a/maps/MountMortar1FOutside.asm
+++ b/maps/MountMortar1FOutside.asm
@@ -17,7 +17,7 @@
MountMortar1FOutsideHiddenHyperPotion:
dwb EVENT_MOUNT_MORTAR_1F_OUTSIDE_HIDDEN_HYPER_POTION, HYPER_POTION
-
+
MountMortar1FOutside_MapEventHeader:
; filler
--- a/maps/MountMortar2FInside.asm
+++ b/maps/MountMortar2FInside.asm
@@ -45,7 +45,7 @@
MountMortar2FInsideHiddenFullRestore:
dwb EVENT_MOUNT_MORTAR_2F_INSIDE_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+
SupernerdHughSeenText:
text "Yo! MARKUS!"
--- a/maps/MountMortarB1F.asm
+++ b/maps/MountMortarB1F.asm
@@ -73,7 +73,7 @@
MountMortarB1FHiddenMaxRevive:
dwb EVENT_MOUNT_MORTAR_B1F_HIDDEN_MAX_REVIVE, MAX_REVIVE
-
+
UnknownText_0x7e24d:
text "Hey!"
--- a/maps/MrPokemonsHouse.asm
+++ b/maps/MrPokemonsHouse.asm
@@ -3,7 +3,7 @@
const MRPOKEMONSHOUSE_OAK
MrPokemonsHouse_MapScriptHeader:
-.MapTriggers
+.MapTriggers:
db 2
; triggers
@@ -10,17 +10,17 @@
maptrigger .Trigger0
maptrigger .Trigger1
-.MapCallbacks
+.MapCallbacks:
db 0
-.Trigger0
+.Trigger0:
priorityjump .MrPokemonEvent
end
-.Trigger1
+.Trigger1:
end
-.MrPokemonEvent
+.MrPokemonEvent:
showemote EMOTE_SHOCK, MRPOKEMONSHOUSE_GENTLEMAN, 15
spriteface MRPOKEMONSHOUSE_GENTLEMAN, DOWN
opentext
@@ -63,13 +63,13 @@
closetext
end
-.AlwaysNewDiscoveries
+.AlwaysNewDiscoveries:
writetext MrPokemonText_AlwaysNewDiscoveries
waitbutton
closetext
end
-.RedScale
+.RedScale:
writetext MrPokemonText_GimmeTheScale
yesorno
iffalse .refused
@@ -139,11 +139,11 @@
setevent EVENT_TOTODILE_POKEBALL_IN_ELMS_LAB
end
-.RivalTakesChikorita
+.RivalTakesChikorita:
setevent EVENT_CHIKORITA_POKEBALL_IN_ELMS_LAB
end
-.RivalTakesCyndaquil
+.RivalTakesCyndaquil:
setevent EVENT_CYNDAQUIL_POKEBALL_IN_ELMS_LAB
end
--- a/maps/MrPsychicsHouse.asm
+++ b/maps/MrPsychicsHouse.asm
@@ -18,10 +18,10 @@
verbosegiveitem TM_PSYCHIC
iffalse .Done
setevent EVENT_GOT_TM29_PSYCHIC
-.AlreadyGotItem
+.AlreadyGotItem:
writetext MrPsychicText2
waitbutton
-.Done
+.Done:
closetext
end
--- a/maps/NationalPark.asm
+++ b/maps/NationalPark.asm
@@ -109,19 +109,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_OLIVINE
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer SCHOOLBOY, JACK1
startbattle
reloadmapafterbattle
@@ -129,7 +129,7 @@
clearflag ENGINE_JACK
end
-.LoadFight1
+.LoadFight1:
loadtrainer SCHOOLBOY, JACK2
startbattle
reloadmapafterbattle
@@ -137,7 +137,7 @@
clearflag ENGINE_JACK
end
-.LoadFight2
+.LoadFight2:
loadtrainer SCHOOLBOY, JACK3
startbattle
reloadmapafterbattle
@@ -145,7 +145,7 @@
clearflag ENGINE_JACK
end
-.LoadFight3
+.LoadFight3:
loadtrainer SCHOOLBOY, JACK4
startbattle
reloadmapafterbattle
@@ -153,7 +153,7 @@
clearflag ENGINE_JACK
end
-.LoadFight4
+.LoadFight4:
loadtrainer SCHOOLBOY, JACK5
startbattle
reloadmapafterbattle
@@ -306,7 +306,7 @@
NationalParkHiddenFullHeal:
dwb EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
-
+
UnknownText_0x5c1d3:
text "Look! Check out my"
--- a/maps/NationalParkBugContest.asm
+++ b/maps/NationalParkBugContest.asm
@@ -116,7 +116,7 @@
NationalParkBugContestHiddenFullHeal:
dwb EVENT_NATIONAL_PARK_HIDDEN_FULL_HEAL, FULL_HEAL
-
+
UnknownText_0x5c94c:
text "DON: I'm going to"
--- a/maps/NewBarkTown.asm
+++ b/maps/NewBarkTown.asm
@@ -17,13 +17,13 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
end
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_NEW_BARK
clearevent EVENT_FIRST_TIME_BANKING_WITH_MOM
return
--- a/maps/OaksLab.asm
+++ b/maps/OaksLab.asm
@@ -24,13 +24,13 @@
writetext OakWelcomeKantoText
buttonsound
setevent EVENT_TALKED_TO_OAK_IN_KANTO
-.CheckBadges
+.CheckBadges:
checkcode VAR_BADGES
if_equal 16, .OpenMtSilver
if_equal 8, .Complain
jump .AhGood
-.CheckPokedex
+.CheckPokedex:
writetext OakLabDexCheckText
waitbutton
special ProfOaksPCBoot
@@ -39,18 +39,18 @@
closetext
end
-.OpenMtSilver
+.OpenMtSilver:
writetext OakOpenMtSilverText
buttonsound
setevent EVENT_OPENED_MT_SILVER
jump .CheckPokedex
-.Complain
+.Complain:
writetext OakNoKantoBadgesText
buttonsound
jump .CheckPokedex
-.AhGood
+.AhGood:
writetext OakYesKantoBadgesText
buttonsound
jump .CheckPokedex
--- a/maps/OlivineCity.asm
+++ b/maps/OlivineCity.asm
@@ -18,13 +18,13 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
end
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_OLIVINE
return
--- a/maps/OlivineGoodRodHouse.asm
+++ b/maps/OlivineGoodRodHouse.asm
@@ -25,13 +25,13 @@
setevent EVENT_GOT_GOOD_ROD
end
-.DontWantIt
+.DontWantIt:
writetext DontWantGoodRodText
waitbutton
closetext
end
-.AlreadyGotItem
+.AlreadyGotItem:
writetext HaveGoodRodText
waitbutton
closetext
--- a/maps/OlivineGym.asm
+++ b/maps/OlivineGym.asm
@@ -29,7 +29,7 @@
setflag ENGINE_MINERALBADGE
checkcode VAR_BADGES
scall OlivineGymTriggerRockets
-.FightDone
+.FightDone:
checkevent EVENT_GOT_TM23_IRON_TAIL
iftrue UnknownScript_0x9c172
writetext UnknownText_0x9c354
@@ -54,10 +54,10 @@
if_equal 6, .GoldenrodRockets
end
-.GoldenrodRockets
+.GoldenrodRockets:
jumpstd goldenrodrockets
-.RadioTowerRockets
+.RadioTowerRockets:
jumpstd radiotowerrockets
OlivineGymGuyScript:
@@ -72,7 +72,7 @@
closetext
end
-.OlivineGymGuyWinScript
+.OlivineGymGuyWinScript:
opentext
writetext OlivineGymGuyWinText
waitbutton
@@ -79,7 +79,7 @@
closetext
end
-.OlivineGymGuyPreScript
+.OlivineGymGuyPreScript:
opentext
writetext OlivineGymGuyPreText
waitbutton
@@ -90,7 +90,7 @@
checkflag ENGINE_MINERALBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext JASMINE, 1, $1
jumpstd gymstatue2
--- a/maps/OlivineLighthouse2F.asm
+++ b/maps/OlivineLighthouse2F.asm
@@ -55,16 +55,16 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight3
+.Fight3:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer SAILOR, HUEY1
startbattle
reloadmapafterbattle
@@ -72,7 +72,7 @@
clearflag ENGINE_HUEY
end
-.LoadFight1
+.LoadFight1:
loadtrainer SAILOR, HUEY2
startbattle
reloadmapafterbattle
@@ -80,7 +80,7 @@
clearflag ENGINE_HUEY
end
-.LoadFight2
+.LoadFight2:
loadtrainer SAILOR, HUEY3
startbattle
reloadmapafterbattle
@@ -88,7 +88,7 @@
clearflag ENGINE_HUEY
end
-.LoadFight3
+.LoadFight3:
loadtrainer SAILOR, HUEY4
startbattle
reloadmapafterbattle
--- a/maps/OlivineLighthouse5F.asm
+++ b/maps/OlivineLighthouse5F.asm
@@ -45,7 +45,7 @@
OlivineLighthouse5FHiddenHyperPotion:
dwb EVENT_OLIVINE_LIGHTHOUSE_5F_HIDDEN_HYPER_POTION, HYPER_POTION
-
+
SailorErnestSeenText:
text "I wanted to battle"
--- a/maps/OlivinePort.asm
+++ b/maps/OlivinePort.asm
@@ -237,7 +237,7 @@
OlivinePortHiddenProtein:
dwb EVENT_OLIVINE_PORT_HIDDEN_PROTEIN, PROTEIN
-
+
MovementData_0x74a30:
step_down
--- a/maps/PalletTown.asm
+++ b/maps/PalletTown.asm
@@ -12,7 +12,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_PALLET
return
--- a/maps/PewterCity.asm
+++ b/maps/PewterCity.asm
@@ -15,7 +15,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_PEWTER
return
--- a/maps/PewterGym.asm
+++ b/maps/PewterGym.asm
@@ -34,7 +34,7 @@
closetext
end
-.FightDone
+.FightDone:
writetext UnknownText_0x1a2ada
waitbutton
closetext
@@ -61,7 +61,7 @@
closetext
end
-.PewterGymGuyWinScript
+.PewterGymGuyWinScript:
writetext PewterGymGuyWinText
waitbutton
closetext
@@ -71,7 +71,7 @@
checkflag ENGINE_BOULDERBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext BROCK, 1, $1
jumpstd gymstatue2
--- a/maps/RadioTower1F.asm
+++ b/maps/RadioTower1F.asm
@@ -37,7 +37,7 @@
special Special_CheckLuckyNumberShowFlag
iffalse .skip
special Special_ResetLuckyNumberShowFlag
-.skip:
+.skip
special Special_PrintTodaysLuckyNumber
checkflag ENGINE_LUCKY_NUMBER_SHOW
iftrue .GameOver
@@ -62,13 +62,13 @@
if_equal 3, .ThirdPlace
jump .NoPrize
-.GameOver
+.GameOver:
writetext UnknownText_0x5cf7e
waitbutton
closetext
end
-.FirstPlace
+.FirstPlace:
writetext UnknownText_0x5cfb5
playsound SFX_1ST_PLACE
waitsfx
@@ -79,7 +79,7 @@
setflag ENGINE_LUCKY_NUMBER_SHOW
jump .GameOver
-.SecondPlace
+.SecondPlace:
writetext UnknownText_0x5d023
playsound SFX_2ND_PLACE
waitsfx
@@ -90,7 +90,7 @@
setflag ENGINE_LUCKY_NUMBER_SHOW
jump .GameOver
-.ThirdPlace
+.ThirdPlace:
writetext UnknownText_0x5d076
playsound SFX_3RD_PLACE
waitsfx
@@ -101,7 +101,7 @@
setflag ENGINE_LUCKY_NUMBER_SHOW
jump .GameOver
-.NoPrize
+.NoPrize:
writetext UnknownText_0x5d0c0
waitbutton
closetext
--- a/maps/RadioTower2F.asm
+++ b/maps/RadioTower2F.asm
@@ -34,7 +34,7 @@
closetext
end
-.Rockets
+.Rockets:
writetext UnknownText_0x5d983
waitbutton
closetext
--- a/maps/RadioTower3F.asm
+++ b/maps/RadioTower3F.asm
@@ -23,7 +23,7 @@
iftrue .Change
return
-.Change
+.Change:
changeblock $e, $2, $2a
changeblock $e, $4, $1
return
--- a/maps/RedsHouse1F.asm
+++ b/maps/RedsHouse1F.asm
@@ -11,7 +11,7 @@
.MapCallbacks:
db 0
-.Trigger
+.Trigger:
end
RedsMom:
@@ -24,7 +24,7 @@
closetext
setevent EVENT_MET_REDS_MOM
end
-.MetAlready
+.MetAlready:
writetext RedsMomText2
waitbutton
closetext
--- a/maps/RockTunnel1F.asm
+++ b/maps/RockTunnel1F.asm
@@ -17,11 +17,11 @@
RockTunnel1FHiddenXAccuracy:
dwb EVENT_ROCK_TUNNEL_1F_HIDDEN_X_ACCURACY, X_ACCURACY
-
+
RockTunnel1FHiddenXDefend:
dwb EVENT_ROCK_TUNNEL_1F_HIDDEN_X_DEFEND, X_DEFEND
-
+
RockTunnel1F_MapEventHeader:
; filler
--- a/maps/RockTunnelB1F.asm
+++ b/maps/RockTunnelB1F.asm
@@ -21,7 +21,7 @@
RockTunnelB1FHiddenMaxPotion:
dwb EVENT_ROCK_TUNNEL_B1F_HIDDEN_MAX_POTION, MAX_POTION
-
+
RockTunnelB1F_MapEventHeader:
; filler
--- a/maps/Route11.asm
+++ b/maps/Route11.asm
@@ -64,7 +64,7 @@
Route11HiddenRevive:
dwb EVENT_ROUTE_11_HIDDEN_REVIVE, REVIVE
-
+
YoungsterOwenSeenText:
text "There's no cheat-"
--- a/maps/Route12.asm
+++ b/maps/Route12.asm
@@ -71,7 +71,7 @@
Route12HiddenElixer:
dwb EVENT_ROUTE_12_HIDDEN_ELIXER, ELIXER
-
+
FisherMartinSeenText:
text "Patience is the"
--- a/maps/Route13.asm
+++ b/maps/Route13.asm
@@ -78,7 +78,7 @@
Route13HiddenCalcium:
dwb EVENT_ROUTE_13_HIDDEN_CALCIUM, CALCIUM
-
+
PokefanmAlexSeenText:
text "Bow down before my"
--- a/maps/Route17.asm
+++ b/maps/Route17.asm
@@ -66,11 +66,11 @@
Route17HiddenMaxEther:
dwb EVENT_ROUTE_17_HIDDEN_MAX_ETHER, MAX_ETHER
-
+
Route17HiddenMaxElixer:
dwb EVENT_ROUTE_17_HIDDEN_MAX_ELIXER, MAX_ELIXER
-
+
BikerRileySeenText:
text "Hey, you! You're"
--- a/maps/Route19.asm
+++ b/maps/Route19.asm
@@ -17,7 +17,7 @@
dbw MAPCALLBACK_TILES, .ClearRocks
-.ClearRocks
+.ClearRocks:
checkevent EVENT_CINNABAR_ROCKS_CLEARED
iftrue .Done
changeblock $6, $6, $7a
@@ -26,7 +26,7 @@
changeblock $c, $8, $7a
changeblock $4, $8, $7a
changeblock $a, $a, $7a
-.Done
+.Done:
return
TrainerSwimmerfDawn:
@@ -99,7 +99,7 @@
closetext
end
-.RocksCleared
+.RocksCleared:
writetext Route19FisherText2
waitbutton
closetext
--- a/maps/Route19FuchsiaGate.asm
+++ b/maps/Route19FuchsiaGate.asm
@@ -18,7 +18,7 @@
closetext
end
-.RocksCleared
+.RocksCleared:
writetext UnknownText_0x1ab48a
waitbutton
closetext
--- a/maps/Route20.asm
+++ b/maps/Route20.asm
@@ -14,7 +14,7 @@
dbw MAPCALLBACK_NEWMAP, .ClearRocks
-.ClearRocks
+.ClearRocks:
setevent EVENT_CINNABAR_ROCKS_CLEARED
return
--- a/maps/Route23.asm
+++ b/maps/Route23.asm
@@ -8,7 +8,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_INDIGO_PLATEAU
return
--- a/maps/Route25.asm
+++ b/maps/Route25.asm
@@ -194,7 +194,7 @@
Route25HiddenPotion:
dwb EVENT_ROUTE_25_HIDDEN_POTION, POTION
-
+
MovementData_0x19efe8:
big_step_down
--- a/maps/Route26.asm
+++ b/maps/Route26.asm
@@ -62,13 +62,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer COOLTRAINERM, GAVEN3
startbattle
reloadmapafterbattle
@@ -76,7 +76,7 @@
clearflag ENGINE_GAVEN
end
-.LoadFight1
+.LoadFight1:
loadtrainer COOLTRAINERM, GAVEN1
startbattle
reloadmapafterbattle
@@ -84,7 +84,7 @@
clearflag ENGINE_GAVEN
end
-.LoadFight2
+.LoadFight2:
loadtrainer COOLTRAINERM, GAVEN2
startbattle
reloadmapafterbattle
@@ -166,13 +166,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer COOLTRAINERF, BETH1
startbattle
reloadmapafterbattle
@@ -180,7 +180,7 @@
clearflag ENGINE_BETH
end
-.LoadFight1
+.LoadFight1:
loadtrainer COOLTRAINERF, BETH2
startbattle
reloadmapafterbattle
@@ -188,7 +188,7 @@
clearflag ENGINE_BETH
end
-.LoadFight2
+.LoadFight2:
loadtrainer COOLTRAINERF, BETH3
startbattle
reloadmapafterbattle
--- a/maps/Route27.asm
+++ b/maps/Route27.asm
@@ -99,13 +99,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer BIRD_KEEPER, JOSE2
startbattle
reloadmapafterbattle
@@ -113,7 +113,7 @@
clearflag ENGINE_JOSE
end
-.LoadFight1
+.LoadFight1:
loadtrainer BIRD_KEEPER, JOSE1
startbattle
reloadmapafterbattle
@@ -121,7 +121,7 @@
clearflag ENGINE_JOSE
end
-.LoadFight2
+.LoadFight2:
loadtrainer BIRD_KEEPER, JOSE3
startbattle
reloadmapafterbattle
@@ -232,13 +232,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer COOLTRAINERF, REENA1
startbattle
reloadmapafterbattle
@@ -246,7 +246,7 @@
clearflag ENGINE_REENA
end
-.LoadFight1
+.LoadFight1:
loadtrainer COOLTRAINERF, REENA2
startbattle
reloadmapafterbattle
@@ -254,7 +254,7 @@
clearflag ENGINE_REENA
end
-.LoadFight2
+.LoadFight2:
loadtrainer COOLTRAINERF, REENA3
startbattle
reloadmapafterbattle
--- a/maps/Route27SandstormHouse.asm
+++ b/maps/Route27SandstormHouse.asm
@@ -19,20 +19,20 @@
if_greater_than $95, .Loyal
jump .Disloyal
-.Loyal
+.Loyal:
writetext SandstormHouseWomanLoyalText
buttonsound
verbosegiveitem TM_SANDSTORM
iffalse .Done
setevent EVENT_GOT_TM37_SANDSTORM
-.AlreadyGotItem
+.AlreadyGotItem:
writetext SandstormHouseSandstormDescription
waitbutton
-.Done
+.Done:
closetext
end
-.Disloyal
+.Disloyal:
writetext SandstormHouseWomanDisloyalText
waitbutton
closetext
--- a/maps/Route28.asm
+++ b/maps/Route28.asm
@@ -10,7 +10,7 @@
Route28HiddenRareCandy:
dwb EVENT_ROUTE_28_HIDDEN_RARE_CANDY, RARE_CANDY
-
+
Route28SignText:
text "ROUTE 28"
--- a/maps/Route28FamousSpeechHouse.asm
+++ b/maps/Route28FamousSpeechHouse.asm
@@ -12,7 +12,7 @@
.MapCallbacks:
db 0
-.Trigger
+.Trigger:
end
Celebrity:
@@ -25,10 +25,10 @@
verbosegiveitem TM_STEEL_WING
iffalse .Done
setevent EVENT_GOT_TM47_STEEL_WING
-.Done
+.Done:
closetext
end
-.AlreadyGotItem
+.AlreadyGotItem:
writetext CelebrityText2
waitbutton
closetext
--- a/maps/Route29.asm
+++ b/maps/Route29.asm
@@ -33,11 +33,11 @@
checkflag ENGINE_ZEPHYRBADGE
iftrue .DoesTuscanyAppear
-.TuscanyDisappears
+.TuscanyDisappears:
disappear ROUTE29_TUSCANY
return
-.DoesTuscanyAppear
+.DoesTuscanyAppear:
checkcode VAR_WEEKDAY
if_not_equal TUESDAY, .TuscanyDisappears
appear ROUTE29_TUSCANY
@@ -159,13 +159,13 @@
iftrue .day_morn
checknite
iftrue .nite
-.day_morn:
+.day_morn
writetext Text_WaitingForNight
waitbutton
closetext
end
-.nite:
+.nite
writetext Text_WaitingForMorning
waitbutton
closetext
@@ -183,7 +183,7 @@
writetext MeetTuscanyText
buttonsound
setevent EVENT_MET_TUSCANY_OF_TUESDAY
-.MetTuscany
+.MetTuscany:
writetext TuscanyGivesGiftText
buttonsound
verbosegiveitem PINK_BOW
--- a/maps/Route2NuggetSpeechHouse.asm
+++ b/maps/Route2NuggetSpeechHouse.asm
@@ -18,10 +18,10 @@
verbosegiveitem NUGGET
iffalse .Done
setevent EVENT_GOT_NUGGET_FROM_GUY
-.GotItem
+.GotItem:
writetext UnknownText_0x9b8e5
waitbutton
-.Done
+.Done:
closetext
end
--- a/maps/Route30.asm
+++ b/maps/Route30.asm
@@ -76,19 +76,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkflag ENGINE_FLYPOINT_OLIVINE
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_GOLDENROD
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer YOUNGSTER, JOEY1
startbattle
reloadmapafterbattle
@@ -96,7 +96,7 @@
clearflag ENGINE_JOEY
end
-.LoadFight1
+.LoadFight1:
loadtrainer YOUNGSTER, JOEY2
startbattle
reloadmapafterbattle
@@ -104,7 +104,7 @@
clearflag ENGINE_JOEY
end
-.LoadFight2
+.LoadFight2:
loadtrainer YOUNGSTER, JOEY3
startbattle
reloadmapafterbattle
@@ -112,7 +112,7 @@
clearflag ENGINE_JOEY
end
-.LoadFight3
+.LoadFight3:
loadtrainer YOUNGSTER, JOEY4
startbattle
reloadmapafterbattle
@@ -120,7 +120,7 @@
clearflag ENGINE_JOEY
end
-.LoadFight4
+.LoadFight4:
loadtrainer YOUNGSTER, JOEY5
startbattle
reloadmapafterbattle
@@ -135,7 +135,7 @@
setevent EVENT_GOT_HP_UP_FROM_JOEY
jump .NumberAccepted
-.done:
+.done
end
.GiveHPUp:
@@ -249,7 +249,7 @@
Route30HiddenPotion:
dwb EVENT_ROUTE_30_HIDDEN_POTION, POTION
-
+
Route30_JoeysRattataAttacksMovement:
fix_facing
--- a/maps/Route31.asm
+++ b/maps/Route31.asm
@@ -67,19 +67,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkflag ENGINE_FLYPOINT_MAHOGANY
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_GOLDENROD
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer BUG_CATCHER, WADE1
startbattle
reloadmapafterbattle
@@ -87,7 +87,7 @@
clearflag ENGINE_WADE
end
-.LoadFight1
+.LoadFight1:
loadtrainer BUG_CATCHER, WADE2
startbattle
reloadmapafterbattle
@@ -95,7 +95,7 @@
clearflag ENGINE_WADE
end
-.LoadFight2
+.LoadFight2:
loadtrainer BUG_CATCHER, WADE3
startbattle
reloadmapafterbattle
@@ -103,7 +103,7 @@
clearflag ENGINE_WADE
end
-.LoadFight3
+.LoadFight3:
loadtrainer BUG_CATCHER, WADE4
startbattle
reloadmapafterbattle
@@ -111,7 +111,7 @@
clearflag ENGINE_WADE
end
-.LoadFight4
+.LoadFight4:
loadtrainer BUG_CATCHER, WADE5
startbattle
reloadmapafterbattle
@@ -128,25 +128,25 @@
iftrue .Przcureberry
checkevent EVENT_WADE_HAS_BITTER_BERRY
iftrue .BitterBerry
-.Berry
+.Berry:
verbosegiveitem BERRY
iffalse .PackFull
jump .Done
-.Psncureberry
+.Psncureberry:
verbosegiveitem PSNCUREBERRY
iffalse .PackFull
jump .Done
-.Przcureberry
+.Przcureberry:
verbosegiveitem PRZCUREBERRY
iffalse .PackFull
jump .Done
-.BitterBerry
+.BitterBerry:
verbosegiveitem BITTER_BERRY
iffalse .PackFull
-.Done
+.Done:
clearflag ENGINE_WADE_HAS_ITEM
jump .AcceptedNumberSTD
-.PackFull
+.PackFull:
jump .PackFullSTD
.AskPhoneNumberSTD:
--- a/maps/Route32.asm
+++ b/maps/Route32.asm
@@ -45,7 +45,7 @@
disappear ROUTE32_FRIEDA
return
-.FriedaAppears
+.FriedaAppears:
appear ROUTE32_FRIEDA
return
@@ -142,7 +142,7 @@
closetext
end
-.refused:
+.refused
writetext Text_RefusedToBuySlowpokeTail
waitbutton
closetext
@@ -210,19 +210,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkflag ENGINE_FLYPOINT_LAKE_OF_RAGE
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_ECRUTEAK
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer FISHER, RALPH1
startbattle
reloadmapafterbattle
@@ -230,7 +230,7 @@
clearflag ENGINE_RALPH
end
-.LoadFight1
+.LoadFight1:
loadtrainer FISHER, RALPH2
startbattle
reloadmapafterbattle
@@ -238,7 +238,7 @@
clearflag ENGINE_RALPH
end
-.LoadFight2
+.LoadFight2:
loadtrainer FISHER, RALPH3
startbattle
reloadmapafterbattle
@@ -246,7 +246,7 @@
clearflag ENGINE_RALPH
end
-.LoadFight3
+.LoadFight3:
loadtrainer FISHER, RALPH4
startbattle
reloadmapafterbattle
@@ -254,7 +254,7 @@
clearflag ENGINE_RALPH
end
-.LoadFight4
+.LoadFight4:
loadtrainer FISHER, RALPH5
startbattle
reloadmapafterbattle
@@ -316,7 +316,7 @@
checkflag ENGINE_LIZ
iftrue .Rematch
checkcellnum PHONE_PICNICKER_LIZ
- iftrue .NumberAccepted
+ iftrue .NumberAccepted
checkevent EVENT_LIZ_ASKED_FOR_PHONE_NUMBER
iftrue .AskAgain
writetext PicnickerLiz1AfterText
@@ -344,19 +344,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_ECRUTEAK
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer PICNICKER, LIZ1
startbattle
reloadmapafterbattle
@@ -364,7 +364,7 @@
clearflag ENGINE_LIZ
end
-.LoadFight1
+.LoadFight1:
loadtrainer PICNICKER, LIZ2
startbattle
reloadmapafterbattle
@@ -372,7 +372,7 @@
clearflag ENGINE_LIZ
end
-.LoadFight2
+.LoadFight2:
loadtrainer PICNICKER, LIZ3
startbattle
reloadmapafterbattle
@@ -380,7 +380,7 @@
clearflag ENGINE_LIZ
end
-.LoadFight3
+.LoadFight3:
loadtrainer PICNICKER, LIZ4
startbattle
reloadmapafterbattle
@@ -388,7 +388,7 @@
clearflag ENGINE_LIZ
end
-.LoadFight4
+.LoadFight4:
loadtrainer PICNICKER, LIZ5
startbattle
reloadmapafterbattle
@@ -468,7 +468,7 @@
writetext MeetFriedaText
buttonsound
setevent EVENT_MET_FRIEDA_OF_FRIDAY
-.MetFrieda
+.MetFrieda:
writetext FriedaGivesGiftText
buttonsound
verbosegiveitem POISON_BARB
@@ -512,11 +512,11 @@
Route32HiddenGreatBall:
dwb EVENT_ROUTE_32_HIDDEN_GREAT_BALL, GREAT_BALL
-
+
Route32HiddenSuperPotion:
dwb EVENT_ROUTE_32_HIDDEN_SUPER_POTION, SUPER_POTION
-
+
Movement_Route32CooltrainerMPushesYouBackToViolet:
step_up
--- a/maps/Route33.asm
+++ b/maps/Route33.asm
@@ -53,19 +53,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_OLIVINE
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer HIKER, ANTHONY2
startbattle
reloadmapafterbattle
@@ -73,7 +73,7 @@
clearflag ENGINE_ANTHONY
end
-.LoadFight1
+.LoadFight1:
loadtrainer HIKER, ANTHONY1
startbattle
reloadmapafterbattle
@@ -81,7 +81,7 @@
clearflag ENGINE_ANTHONY
end
-.LoadFight2
+.LoadFight2:
loadtrainer HIKER, ANTHONY3
startbattle
reloadmapafterbattle
@@ -89,7 +89,7 @@
clearflag ENGINE_ANTHONY
end
-.LoadFight3
+.LoadFight3:
loadtrainer HIKER, ANTHONY4
startbattle
reloadmapafterbattle
@@ -97,7 +97,7 @@
clearflag ENGINE_ANTHONY
end
-.LoadFight4
+.LoadFight4:
loadtrainer HIKER, ANTHONY5
startbattle
reloadmapafterbattle
--- a/maps/Route34.asm
+++ b/maps/Route34.asm
@@ -69,10 +69,10 @@
applymovement ROUTE34_GRAMPS, Route34MovementData_DayCareManWalksBackInside
playsound SFX_ENTER_DOOR
disappear ROUTE34_GRAMPS
-.end_fail:
+.end_fail
end
-.walk_around_player:
+.walk_around_player
applymovement ROUTE34_GRAMPS, Route34MovementData_DayCareManWalksBackInside_WalkAroundPlayer
playsound SFX_ENTER_DOOR
disappear ROUTE34_GRAMPS
@@ -130,19 +130,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkflag ENGINE_FLYPOINT_BLACKTHORN
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_CIANWOOD
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer CAMPER, TODD1
startbattle
reloadmapafterbattle
@@ -150,7 +150,7 @@
clearflag ENGINE_TODD
end
-.LoadFight1
+.LoadFight1:
loadtrainer CAMPER, TODD2
startbattle
reloadmapafterbattle
@@ -158,7 +158,7 @@
clearflag ENGINE_TODD
end
-.LoadFight2
+.LoadFight2:
loadtrainer CAMPER, TODD3
startbattle
reloadmapafterbattle
@@ -166,7 +166,7 @@
clearflag ENGINE_TODD
end
-.LoadFight3
+.LoadFight3:
loadtrainer CAMPER, TODD4
startbattle
reloadmapafterbattle
@@ -174,7 +174,7 @@
clearflag ENGINE_TODD
end
-.LoadFight4
+.LoadFight4:
loadtrainer CAMPER, TODD5
startbattle
reloadmapafterbattle
@@ -255,19 +255,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_MAHOGANY
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer PICNICKER, GINA1
startbattle
reloadmapafterbattle
@@ -275,7 +275,7 @@
clearflag ENGINE_GINA
end
-.LoadFight1
+.LoadFight1:
loadtrainer PICNICKER, GINA2
startbattle
reloadmapafterbattle
@@ -283,7 +283,7 @@
clearflag ENGINE_GINA
end
-.LoadFight2
+.LoadFight2:
loadtrainer PICNICKER, GINA3
startbattle
reloadmapafterbattle
@@ -291,7 +291,7 @@
clearflag ENGINE_GINA
end
-.LoadFight3
+.LoadFight3:
loadtrainer PICNICKER, GINA4
startbattle
reloadmapafterbattle
@@ -299,7 +299,7 @@
clearflag ENGINE_GINA
end
-.LoadFight4
+.LoadFight4:
loadtrainer PICNICKER, GINA5
startbattle
reloadmapafterbattle
@@ -492,11 +492,11 @@
Route34HiddenRareCandy:
dwb EVENT_ROUTE_34_HIDDEN_RARE_CANDY, RARE_CANDY
-
+
Route34HiddenSuperPotion:
dwb EVENT_ROUTE_34_HIDDEN_SUPER_POTION, SUPER_POTION
-
+
Route34MovementData_DayCareManWalksBackInside:
slow_step_left
--- a/maps/Route35.asm
+++ b/maps/Route35.asm
@@ -168,19 +168,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkflag ENGINE_FLYPOINT_BLACKTHORN
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_LAKE_OF_RAGE
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer BUG_CATCHER, ARNIE1
startbattle
reloadmapafterbattle
@@ -188,7 +188,7 @@
clearflag ENGINE_ARNIE
end
-.LoadFight1
+.LoadFight1:
loadtrainer BUG_CATCHER, ARNIE2
startbattle
reloadmapafterbattle
@@ -196,7 +196,7 @@
clearflag ENGINE_ARNIE
end
-.LoadFight2
+.LoadFight2:
loadtrainer BUG_CATCHER, ARNIE3
startbattle
reloadmapafterbattle
@@ -204,7 +204,7 @@
clearflag ENGINE_ARNIE
end
-.LoadFight3
+.LoadFight3:
loadtrainer BUG_CATCHER, ARNIE4
startbattle
reloadmapafterbattle
@@ -212,7 +212,7 @@
clearflag ENGINE_ARNIE
end
-.LoadFight4
+.LoadFight4:
loadtrainer BUG_CATCHER, ARNIE5
startbattle
reloadmapafterbattle
--- a/maps/Route35Goldenrodgate.asm
+++ b/maps/Route35Goldenrodgate.asm
@@ -33,34 +33,34 @@
givepoke SPEAROW, 10, NO_ITEM, 1, GiftSpearowName, GiftSpearowOTName
givepokeitem GiftSpearowMail
setevent EVENT_GOT_KENYA
-.alreadyhavekenya:
+.alreadyhavekenya
writetext UnknownText_0x69ed6
waitbutton
closetext
end
-.partyfull:
+.partyfull
writetext UnknownText_0x69f56
waitbutton
closetext
end
-.refused:
+.refused
writetext UnknownText_0x69f74
waitbutton
closetext
end
-.questcomplete:
+.questcomplete
writetext UnknownText_0x69f8b
buttonsound
verbosegiveitem HP_UP
iffalse .bagfull
setevent EVENT_GOT_HP_UP_FROM_RANDY
-.gothpup:
+.gothpup
writetext UnknownText_0x69fd9
waitbutton
-.bagfull:
+.bagfull
closetext
end
@@ -85,7 +85,7 @@
closetext
end
-.aftersudowoodo:
+.aftersudowoodo
writetext UnknownText_0x6a09a
waitbutton
closetext
--- a/maps/Route36.asm
+++ b/maps/Route36.asm
@@ -14,8 +14,8 @@
db 2
; triggers
- dw UnknownScript_0x19400d, 0
- dw UnknownScript_0x19400e, 0
+ dw .Trigger0, 0
+ dw .Trigger1, 0
.MapCallbacks:
db 1
@@ -22,21 +22,21 @@
; callbacks
- dbw MAPCALLBACK_OBJECTS, ArthurCallback
+ dbw MAPCALLBACK_OBJECTS, .ArthurCallback
-UnknownScript_0x19400d:
+.Trigger0:
end
-UnknownScript_0x19400e:
+.Trigger1:
end
-ArthurCallback:
+.ArthurCallback:
checkcode VAR_WEEKDAY
if_equal THURSDAY, .ArthurAppears
disappear ROUTE36_ARTHUR
return
-.ArthurAppears
+.ArthurAppears:
appear ROUTE36_ARTHUR
return
@@ -45,7 +45,7 @@
pause 15
playsound SFX_WARP_FROM
spriteface PLAYER, UP
- applymovement ROUTE36_SUICUNE, MovementData_0x194262
+ applymovement ROUTE36_SUICUNE, Route36SuicuneMovement
disappear ROUTE36_SUICUNE
spriteface PLAYER, DOWN
pause 10
@@ -63,14 +63,12 @@
applymovement ROUTE36_WEIRD_TREE, SudowoodoShakeMovement
end
-.Fight
+.Fight:
opentext
writetext UseSquirtbottleText
yesorno
iffalse DidntUseSquirtbottleScript
closetext
- ; fallthrough
-
WateredWeirdTreeScript:: ; export (for when you use Squirtbottle from pack)
opentext
writetext UsedSquirtbottleText
@@ -86,7 +84,7 @@
loadwildmon SUDOWOODO, 20
startbattle
setevent EVENT_FOUGHT_SUDOWOODO
- if_equal $2, UnknownScript_0x19407b
+ if_equal $2, DidntCatchSudowoodo
disappear ROUTE36_WEIRD_TREE
variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN
reloadmapafterbattle
@@ -96,9 +94,9 @@
closetext
end
-UnknownScript_0x19407b:
+DidntCatchSudowoodo:
reloadmapafterbattle
- applymovement ROUTE36_WEIRD_TREE, MovementData_0x19424b
+ applymovement ROUTE36_WEIRD_TREE, WeirdTreeMovement_Flee
disappear ROUTE36_WEIRD_TREE
variablesprite SPRITE_WEIRD_TREE, SPRITE_TWIN
special RunCallback_04
@@ -121,39 +119,39 @@
disappear ROUTE36_FLORIA
end
-.Up
+.Up:
applymovement ROUTE36_FLORIA, FloriaMovement2
disappear ROUTE36_FLORIA
end
-.SecondTimeTalking
+.SecondTimeTalking:
writetext FloriaText2
waitbutton
closetext
end
-FisherScript_0x1940b9:
+Route36RockSmashGuyScript:
faceplayer
opentext
checkevent EVENT_GOT_TM08_ROCK_SMASH
- iftrue UnknownScript_0x1940da
+ iftrue .AlreadyGotRockSmash
checkevent EVENT_FOUGHT_SUDOWOODO
- iftrue UnknownScript_0x1940cd
- writetext UnknownText_0x19446f
+ iftrue .ClearedSudowoodo
+ writetext RockSmashGuyText1
waitbutton
closetext
end
-UnknownScript_0x1940cd:
- writetext UnknownText_0x1944d0
+.ClearedSudowoodo:
+ writetext RockSmashGuyText2
buttonsound
verbosegiveitem TM_ROCK_SMASH
- iffalse UnknownScript_0x1940de
+ iffalse .NoRoomForTM
setevent EVENT_GOT_TM08_ROCK_SMASH
-UnknownScript_0x1940da:
- writetext UnknownText_0x19452c
+.AlreadyGotRockSmash:
+ writetext RockSmashGuyText3
waitbutton
-UnknownScript_0x1940de:
+.NoRoomForTM:
closetext
end
@@ -161,13 +159,13 @@
faceplayer
opentext
checkevent EVENT_FOUGHT_SUDOWOODO
- iftrue UnknownScript_0x1940ee
+ iftrue .ClearedSudowoodo
writetext UnknownText_0x194626
waitbutton
closetext
end
-UnknownScript_0x1940ee:
+.ClearedSudowoodo:
writetext UnknownText_0x19469e
waitbutton
closetext
@@ -174,38 +172,38 @@
end
TrainerSchoolboyAlan1:
- trainer EVENT_BEAT_SCHOOLBOY_ALAN, SCHOOLBOY, ALAN1, SchoolboyAlan1SeenText, SchoolboyAlan1BeatenText, 0, SchoolboyAlan1Script
+ trainer EVENT_BEAT_SCHOOLBOY_ALAN, SCHOOLBOY, ALAN1, SchoolboyAlan1SeenText, SchoolboyAlan1BeatenText, 0, .Script
-SchoolboyAlan1Script:
+.Script:
writecode VAR_CALLERID, PHONE_SCHOOLBOY_ALAN
end_if_just_battled
opentext
checkflag ENGINE_ALAN
- iftrue UnknownScript_0x194140
+ iftrue .ChooseRematch
checkflag ENGINE_ALAN_HAS_FIRE_STONE
- iftrue UnknownScript_0x1941b4
+ iftrue .GiveFireStone
checkcellnum PHONE_SCHOOLBOY_ALAN
- iftrue UnknownScript_0x1941d5
+ iftrue .NumberAccepted
checkevent EVENT_ALAN_ASKED_FOR_PHONE_NUMBER
- iftrue UnknownScript_0x194129
+ iftrue .AskAgainForPhoneNumber
writetext UnknownText_0x1947aa
buttonsound
setevent EVENT_ALAN_ASKED_FOR_PHONE_NUMBER
- scall UnknownScript_0x1941c9
- jump UnknownScript_0x19412c
+ scall .AskNumber1
+ jump .ContinueAskForPhoneNumber
-UnknownScript_0x194129:
- scall UnknownScript_0x1941cd
-UnknownScript_0x19412c:
+.AskAgainForPhoneNumber:
+ scall .AskNumber2
+.ContinueAskForPhoneNumber:
askforphonenumber PHONE_SCHOOLBOY_ALAN
- if_equal $1, UnknownScript_0x1941dd
- if_equal $2, UnknownScript_0x1941d9
+ if_equal $1, .PhoneFull
+ if_equal $2, .NumberDeclined
trainertotext SCHOOLBOY, ALAN1, $0
- scall UnknownScript_0x1941d1
- jump UnknownScript_0x1941d5
+ scall .RegisteredNumber
+ jump .NumberAccepted
-UnknownScript_0x194140:
- scall UnknownScript_0x1941e1
+.ChooseRematch:
+ scall .Rematch
winlosstext SchoolboyAlan1BeatenText, 0
copybytetovar wAlanFightCount
if_equal 4, .Fight4
@@ -213,19 +211,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkflag ENGINE_FLYPOINT_BLACKTHORN
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_OLIVINE
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer SCHOOLBOY, ALAN1
startbattle
reloadmapafterbattle
@@ -233,7 +231,7 @@
clearflag ENGINE_ALAN
end
-.LoadFight1
+.LoadFight1:
loadtrainer SCHOOLBOY, ALAN2
startbattle
reloadmapafterbattle
@@ -241,7 +239,7 @@
clearflag ENGINE_ALAN
end
-.LoadFight2
+.LoadFight2:
loadtrainer SCHOOLBOY, ALAN3
startbattle
reloadmapafterbattle
@@ -249,7 +247,7 @@
clearflag ENGINE_ALAN
end
-.LoadFight3
+.LoadFight3:
loadtrainer SCHOOLBOY, ALAN4
startbattle
reloadmapafterbattle
@@ -257,7 +255,7 @@
clearflag ENGINE_ALAN
end
-.LoadFight4
+.LoadFight4:
loadtrainer SCHOOLBOY, ALAN5
startbattle
reloadmapafterbattle
@@ -264,57 +262,57 @@
clearflag ENGINE_ALAN
end
-UnknownScript_0x1941b4:
- scall UnknownScript_0x1941e5
+.GiveFireStone:
+ scall .Gift
verbosegiveitem FIRE_STONE
- iffalse UnknownScript_0x1941c6
+ iffalse .BagFull
clearflag ENGINE_ALAN_HAS_FIRE_STONE
setevent EVENT_ALAN_GAVE_FIRE_STONE
- jump UnknownScript_0x1941d5
+ jump .NumberAccepted
-UnknownScript_0x1941c6:
- jump UnknownScript_0x1941e9
+.BagFull:
+ jump .PackFull
-UnknownScript_0x1941c9:
+.AskNumber1:
jumpstd asknumber1m
end
-UnknownScript_0x1941cd:
+.AskNumber2:
jumpstd asknumber2m
end
-UnknownScript_0x1941d1:
+.RegisteredNumber:
jumpstd registerednumberm
end
-UnknownScript_0x1941d5:
+.NumberAccepted:
jumpstd numberacceptedm
end
-UnknownScript_0x1941d9:
+.NumberDeclined:
jumpstd numberdeclinedm
end
-UnknownScript_0x1941dd:
+.PhoneFull:
jumpstd phonefullm
end
-UnknownScript_0x1941e1:
+.Rematch:
jumpstd rematchm
end
-UnknownScript_0x1941e5:
+.Gift:
jumpstd giftm
end
-UnknownScript_0x1941e9:
+.PackFull:
jumpstd packfullm
end
TrainerPsychicMark:
- trainer EVENT_BEAT_PSYCHIC_MARK, PSYCHIC_T, MARK, PsychicMarkSeenText, PsychicMarkBeatenText, 0, PsychicMarkScript
+ trainer EVENT_BEAT_PSYCHIC_MARK, PSYCHIC_T, MARK, PsychicMarkSeenText, PsychicMarkBeatenText, 0, .Script
-PsychicMarkScript:
+.Script:
end_if_just_battled
opentext
writetext UnknownText_0x19471e
@@ -326,7 +324,7 @@
faceplayer
opentext
checkevent EVENT_GOT_HARD_STONE_FROM_ARTHUR
- iftrue ArthurThursdayScript
+ iftrue .AlreadyGotStone
checkcode VAR_WEEKDAY
if_not_equal THURSDAY, ArthurNotThursdayScript
checkevent EVENT_MET_ARTHUR_OF_THURSDAY
@@ -334,11 +332,11 @@
writetext MeetArthurText
buttonsound
setevent EVENT_MET_ARTHUR_OF_THURSDAY
-.MetArthur
+.MetArthur:
writetext ArthurGivesGiftText
buttonsound
verbosegiveitem HARD_STONE
- iffalse ArthurDoneScript
+ iffalse .BagFull
setevent EVENT_GOT_HARD_STONE_FROM_ARTHUR
writetext ArthurGaveGiftText
waitbutton
@@ -345,10 +343,10 @@
closetext
end
-ArthurThursdayScript:
+.AlreadyGotStone:
writetext ArthurThursdayText
waitbutton
-ArthurDoneScript:
+.BagFull:
closetext
end
@@ -370,14 +368,14 @@
Route36TrainerTips2:
jumptext Route36TrainerTips2Text
-FruitTreeScript_0x194247:
+Route36FruitTree:
fruittree FRUITTREE_ROUTE_36
SudowoodoShakeMovement:
- db $56 ; shake
+ tree_shake ; shake
step_end
-MovementData_0x19424b:
+WeirdTreeMovement_Flee:
fast_jump_step_up
fast_jump_step_up
step_end
@@ -406,8 +404,8 @@
step_left
step_end
-MovementData_0x194262:
- db $39 ; movement
+Route36SuicuneMovement:
+ set_sliding
fast_jump_step_down
fast_jump_step_down
fast_jump_step_down
@@ -414,7 +412,7 @@
fast_jump_step_right
fast_jump_step_right
fast_jump_step_right
- db $38 ; movement
+ remove_sliding
step_end
UseSquirtbottleText:
@@ -476,7 +474,7 @@
line "bottle…"
done
-UnknownText_0x19446f:
+RockSmashGuyText1:
text "Wa-hey!"
para "I was going to"
@@ -489,7 +487,7 @@
line "I'm a failure!"
done
-UnknownText_0x1944d0:
+RockSmashGuyText2:
text "Did you clear that"
line "wretched tree?"
@@ -503,7 +501,7 @@
line "TM08."
done
-UnknownText_0x19452c:
+RockSmashGuyText3:
text "That happens to be"
line "ROCK SMASH."
@@ -695,8 +693,8 @@
person_event SPRITE_YOUNGSTER, 14, 31, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_TRAINER, 5, TrainerSchoolboyAlan1, -1
person_event SPRITE_WEIRD_TREE, 9, 35, SPRITEMOVEDATA_SUDOWOODO, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, SudowoodoScript, EVENT_ROUTE_36_SUDOWOODO
person_event SPRITE_LASS, 8, 51, SPRITEMOVEDATA_WALK_LEFT_RIGHT, 0, 2, -1, -1, 0, PERSONTYPE_SCRIPT, 0, LassScript_0x1940e0, -1
- person_event SPRITE_FISHER, 9, 44, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FisherScript_0x1940b9, -1
- person_event SPRITE_FRUIT_TREE, 4, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, FruitTreeScript_0x194247, -1
+ person_event SPRITE_FISHER, 9, 44, SPRITEMOVEDATA_STANDING_LEFT, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route36RockSmashGuyScript, -1
+ person_event SPRITE_FRUIT_TREE, 4, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, PERSONTYPE_SCRIPT, 0, Route36FruitTree, -1
person_event SPRITE_YOUNGSTER, 6, 46, SPRITEMOVEDATA_WANDER, 1, 1, -1, -1, 0, PERSONTYPE_SCRIPT, 0, ArthurScript, EVENT_ROUTE_36_ARTHUR_OF_THURSDAY
person_event SPRITE_LASS, 12, 33, SPRITEMOVEDATA_STANDING_DOWN, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, Route36FloriaScript, EVENT_FLORIA_AT_SUDOWOODO
person_event SPRITE_SUICUNE, 6, 21, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, PERSONTYPE_SCRIPT, 0, ObjectEvent, EVENT_SAW_SUICUNE_ON_ROUTE_36
--- a/maps/Route37.asm
+++ b/maps/Route37.asm
@@ -24,7 +24,7 @@
disappear ROUTE37_SUNNY
return
-.SunnyAppears
+.SunnyAppears:
appear ROUTE37_SUNNY
return
@@ -73,13 +73,13 @@
writetext MeetSunnyText
buttonsound
setevent EVENT_MET_SUNNY_OF_SUNDAY
-.MetSunny
+.MetSunny:
checkflag ENGINE_PLAYER_IS_FEMALE
iftrue .Kris
writetext SunnyGivesGiftText1
buttonsound
jump .next
-.Kris
+.Kris:
writetext SunnyGivesGiftText2
buttonsound
.next
@@ -118,7 +118,7 @@
Route37HiddenEther:
dwb EVENT_ROUTE_37_HIDDEN_ETHER, ETHER
-
+
TwinsAnnandanne1SeenText:
text "ANN: ANNE and I"
--- a/maps/Route38.asm
+++ b/maps/Route38.asm
@@ -17,7 +17,7 @@
TrainerBird_keeperToby:
trainer EVENT_BEAT_BIRD_KEEPER_TOBY, BIRD_KEEPER, TOBY, Bird_keeperTobySeenText, Bird_keeperTobyBeatenText, 0, .script
-.script:
+.script
end_if_just_battled
opentext
writetext UnknownText_0x1a1f86
@@ -28,7 +28,7 @@
TrainerSailorHarry:
trainer EVENT_BEAT_SAILOR_HARRY, SAILOR, HARRY, SailorHarrySeenText, SailorHarryBeatenText, 0, .script
-.script:
+.script
end_if_just_battled
opentext
writetext UnknownText_0x1a220c
@@ -39,7 +39,7 @@
TrainerLassDana1:
trainer EVENT_BEAT_LASS_DANA, LASS, DANA1, LassDana1SeenText, LassDana1BeatenText, 0, .script
-.script:
+.script
writecode VAR_CALLERID, PHONE_LASS_DANA
end_if_just_battled
opentext
@@ -76,19 +76,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_CIANWOOD
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer LASS, DANA1
startbattle
reloadmapafterbattle
@@ -96,7 +96,7 @@
clearflag ENGINE_DANA
end
-.LoadFight1
+.LoadFight1:
loadtrainer LASS, DANA2
startbattle
reloadmapafterbattle
@@ -104,7 +104,7 @@
clearflag ENGINE_DANA
end
-.LoadFight2
+.LoadFight2:
loadtrainer LASS, DANA3
startbattle
reloadmapafterbattle
@@ -112,7 +112,7 @@
clearflag ENGINE_DANA
end
-.LoadFight3
+.LoadFight3:
loadtrainer LASS, DANA4
startbattle
reloadmapafterbattle
@@ -120,7 +120,7 @@
clearflag ENGINE_DANA
end
-.LoadFight4
+.LoadFight4:
loadtrainer LASS, DANA5
startbattle
reloadmapafterbattle
@@ -177,7 +177,7 @@
TrainerSchoolboyChad1:
trainer EVENT_BEAT_SCHOOLBOY_CHAD, SCHOOLBOY, CHAD1, SchoolboyChad1SeenText, SchoolboyChad1BeatenText, 0, .script
-.script:
+.script
writecode VAR_CALLERID, PHONE_SCHOOLBOY_CHAD
end_if_just_battled
opentext
@@ -212,19 +212,19 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight4
+.Fight4:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight4
-.Fight3
+.Fight3:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkflag ENGINE_FLYPOINT_MAHOGANY
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer SCHOOLBOY, CHAD1
startbattle
reloadmapafterbattle
@@ -232,7 +232,7 @@
clearflag ENGINE_CHAD
end
-.LoadFight1
+.LoadFight1:
loadtrainer SCHOOLBOY, CHAD2
startbattle
reloadmapafterbattle
@@ -240,7 +240,7 @@
clearflag ENGINE_CHAD
end
-.LoadFight2
+.LoadFight2:
loadtrainer SCHOOLBOY, CHAD3
startbattle
reloadmapafterbattle
@@ -248,7 +248,7 @@
clearflag ENGINE_CHAD
end
-.LoadFight3
+.LoadFight3:
loadtrainer SCHOOLBOY, CHAD4
startbattle
reloadmapafterbattle
@@ -256,7 +256,7 @@
clearflag ENGINE_CHAD
end
-.LoadFight4
+.LoadFight4:
loadtrainer SCHOOLBOY, CHAD5
startbattle
reloadmapafterbattle
@@ -294,7 +294,7 @@
TrainerBeautyValerie:
trainer EVENT_BEAT_BEAUTY_VALERIE, BEAUTY, VALERIE, BeautyValerieSeenText, BeautyValerieBeatenText, 0, .script
-.script:
+.script
end_if_just_battled
opentext
writetext UnknownText_0x1a2185
@@ -305,7 +305,7 @@
TrainerBeautyOlivia:
trainer EVENT_BEAT_BEAUTY_OLIVIA, BEAUTY, OLIVIA, BeautyOliviaSeenText, BeautyOliviaBeatenText, 0, .script
-.script:
+.script
end_if_just_battled
opentext
writetext UnknownText_0x1a229a
--- a/maps/Route39.asm
+++ b/maps/Route39.asm
@@ -181,7 +181,7 @@
Route39HiddenNugget:
dwb EVENT_ROUTE_39_HIDDEN_NUGGET, NUGGET
-
+
Route39MiltankText:
text "MILTANK: Mooo!"
--- a/maps/Route4.asm
+++ b/maps/Route4.asm
@@ -52,7 +52,7 @@
Route4HiddenUltraBall:
dwb EVENT_ROUTE_4_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+
Bird_keeperHankSeenText:
text "I'm raising my"
--- a/maps/Route40.asm
+++ b/maps/Route40.asm
@@ -30,7 +30,7 @@
disappear ROUTE40_MONICA
return
-.MonicaAppears
+.MonicaAppears:
appear ROUTE40_MONICA
return
@@ -86,7 +86,7 @@
iftrue .mobile
jumptextfaceplayer UnknownText_0x1a646a
-.mobile:
+.mobile
jumptextfaceplayer UnknownText_0x1a649b
LassScript_0x1a61d3:
@@ -107,7 +107,7 @@
writetext MeetMonicaText
buttonsound
setevent EVENT_MET_MONICA_OF_MONDAY
-.MetMonica
+.MetMonica:
writetext MonicaGivesGiftText
buttonsound
verbosegiveitem SHARP_BEAK
--- a/maps/Route42.asm
+++ b/maps/Route42.asm
@@ -77,16 +77,16 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight3
+.Fight3:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer FISHER, TULLY1
startbattle
reloadmapafterbattle
@@ -94,7 +94,7 @@
clearflag ENGINE_TULLY
end
-.LoadFight1
+.LoadFight1:
loadtrainer FISHER, TULLY2
startbattle
reloadmapafterbattle
@@ -102,7 +102,7 @@
clearflag ENGINE_TULLY
end
-.LoadFight2
+.LoadFight2:
loadtrainer FISHER, TULLY3
startbattle
reloadmapafterbattle
@@ -110,7 +110,7 @@
clearflag ENGINE_TULLY
end
-.LoadFight3
+.LoadFight3:
loadtrainer FISHER, TULLY4
startbattle
reloadmapafterbattle
@@ -215,7 +215,7 @@
Route42HiddenMaxPotion:
dwb EVENT_ROUTE_42_HIDDEN_MAX_POTION, MAX_POTION
-
+
MovementData_0x1a9356:
db $39 ; movement
--- a/maps/Route43.asm
+++ b/maps/Route43.asm
@@ -88,16 +88,16 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight3
+.Fight3:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_CLEARED_ROCKET_HIDEOUT
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer POKEMANIAC, BRENT1
startbattle
reloadmapafterbattle
@@ -105,7 +105,7 @@
clearflag ENGINE_BRENT
end
-.LoadFight1
+.LoadFight1:
loadtrainer POKEMANIAC, BRENT2
startbattle
reloadmapafterbattle
@@ -113,7 +113,7 @@
clearflag ENGINE_BRENT
end
-.LoadFight2
+.LoadFight2:
loadtrainer POKEMANIAC, BRENT3
startbattle
reloadmapafterbattle
@@ -121,7 +121,7 @@
clearflag ENGINE_BRENT
end
-.LoadFight3
+.LoadFight3:
loadtrainer POKEMANIAC, BRENT4
startbattle
reloadmapafterbattle
@@ -219,16 +219,16 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight3
+.Fight3:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight3
-.Fight2
+.Fight2:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_CLEARED_RADIO_TOWER
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer PICNICKER, TIFFANY3
startbattle
reloadmapafterbattle
@@ -236,7 +236,7 @@
clearflag ENGINE_TIFFANY
end
-.LoadFight1
+.LoadFight1:
loadtrainer PICNICKER, TIFFANY1
startbattle
reloadmapafterbattle
@@ -244,7 +244,7 @@
clearflag ENGINE_TIFFANY
end
-.LoadFight2
+.LoadFight2:
loadtrainer PICNICKER, TIFFANY2
startbattle
reloadmapafterbattle
@@ -252,7 +252,7 @@
clearflag ENGINE_TIFFANY
end
-.LoadFight3
+.LoadFight3:
loadtrainer PICNICKER, TIFFANY4
startbattle
reloadmapafterbattle
--- a/maps/Route44.asm
+++ b/maps/Route44.asm
@@ -54,13 +54,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer BIRD_KEEPER, VANCE1
startbattle
reloadmapafterbattle
@@ -68,7 +68,7 @@
clearflag ENGINE_VANCE
end
-.LoadFight1
+.LoadFight1:
loadtrainer BIRD_KEEPER, VANCE2
startbattle
reloadmapafterbattle
@@ -76,7 +76,7 @@
clearflag ENGINE_VANCE
end
-.LoadFight2
+.LoadFight2:
loadtrainer BIRD_KEEPER, VANCE3
startbattle
reloadmapafterbattle
@@ -198,13 +198,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer FISHER, WILTON1
startbattle
reloadmapafterbattle
@@ -212,7 +212,7 @@
clearflag ENGINE_WILTON
end
-.LoadFight1
+.LoadFight1:
loadtrainer FISHER, WILTON2
startbattle
reloadmapafterbattle
@@ -220,7 +220,7 @@
clearflag ENGINE_WILTON
end
-.LoadFight2
+.LoadFight2:
loadtrainer FISHER, WILTON3
startbattle
reloadmapafterbattle
@@ -319,7 +319,7 @@
Route44HiddenElixer:
dwb EVENT_ROUTE_44_HIDDEN_ELIXER, ELIXER
-
+
FisherWilton1SeenText:
text "Aack! You made me"
--- a/maps/Route45.asm
+++ b/maps/Route45.asm
@@ -182,13 +182,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer HIKER, PARRY3
startbattle
reloadmapafterbattle
@@ -196,7 +196,7 @@
clearflag ENGINE_PARRY
end
-.LoadFight1
+.LoadFight1:
loadtrainer HIKER, PARRY1
startbattle
reloadmapafterbattle
@@ -204,7 +204,7 @@
clearflag ENGINE_PARRY
end
-.LoadFight2
+.LoadFight2:
loadtrainer HIKER, PARRY2
startbattle
reloadmapafterbattle
@@ -313,7 +313,7 @@
Route45HiddenPpUp:
dwb EVENT_ROUTE_45_HIDDEN_PP_UP, PP_UP
-
+
HikerErikSeenText:
text "Be prepared for"
--- a/maps/Route46.asm
+++ b/maps/Route46.asm
@@ -60,13 +60,13 @@
if_equal 2, .Fight2
if_equal 1, .Fight1
if_equal 0, .LoadFight0
-.Fight2
+.Fight2:
checkevent EVENT_RESTORED_POWER_TO_KANTO
iftrue .LoadFight2
-.Fight1
+.Fight1:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue .LoadFight1
-.LoadFight0
+.LoadFight0:
loadtrainer PICNICKER, ERIN1
startbattle
reloadmapafterbattle
@@ -74,7 +74,7 @@
clearflag ENGINE_ERIN
end
-.LoadFight1
+.LoadFight1:
loadtrainer PICNICKER, ERIN2
startbattle
reloadmapafterbattle
@@ -82,7 +82,7 @@
clearflag ENGINE_ERIN
end
-.LoadFight2
+.LoadFight2:
loadtrainer PICNICKER, ERIN3
startbattle
reloadmapafterbattle
--- a/maps/Route9.asm
+++ b/maps/Route9.asm
@@ -84,7 +84,7 @@
Route9HiddenEther:
dwb EVENT_ROUTE_9_HIDDEN_ETHER, ETHER
-
+
CamperDeanSeenText:
text "I came to explore"
--- a/maps/RuinsofAlphOutside.asm
+++ b/maps/RuinsofAlphOutside.asm
@@ -83,7 +83,7 @@
setevent EVENT_TALKED_TO_RUINS_COWARD
writetext UnknownText_0x583a4
buttonsound
-.Next
+.Next:
writetext UnknownText_0x58420
waitbutton
closetext
--- a/maps/SafariZoneWardensHome.asm
+++ b/maps/SafariZoneWardensHome.asm
@@ -18,7 +18,7 @@
closetext
setevent EVENT_TALKED_TO_WARDENS_GRANDDAUGHTER
end
-.AlreadyMet
+.AlreadyMet:
writetext WardensGranddaughterText2
waitbutton
closetext
--- a/maps/SaffronCity.asm
+++ b/maps/SaffronCity.asm
@@ -18,7 +18,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_SAFFRON
return
--- a/maps/SaffronGym.asm
+++ b/maps/SaffronGym.asm
@@ -40,7 +40,7 @@
closetext
end
-.FightDone
+.FightDone:
writetext UnknownText_0x189f6c
waitbutton
closetext
@@ -100,7 +100,7 @@
closetext
end
-.SaffronGymGuyWinScript
+.SaffronGymGuyWinScript:
writetext SaffronGymGuyWinText
waitbutton
closetext
@@ -110,7 +110,7 @@
checkflag ENGINE_MARSHBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext SABRINA, 1, $1
jumpstd gymstatue2
--- a/maps/SaffronPokeCenter1F.asm
+++ b/maps/SaffronPokeCenter1F.asm
@@ -19,7 +19,7 @@
iftrue .mobile
jumptextfaceplayer UnknownText_0x18a4a3
-.mobile:
+.mobile
jumptextfaceplayer UnknownText_0x18a532
FisherScript_0x18a48c:
--- a/maps/SeafoamGym.asm
+++ b/maps/SeafoamGym.asm
@@ -28,7 +28,7 @@
startbattle
iftrue .ReturnAfterBattle
appear SEAFOAMGYM_GYM_GUY
-.ReturnAfterBattle
+.ReturnAfterBattle:
reloadmapafterbattle
setevent EVENT_BEAT_BLAINE
opentext
@@ -41,7 +41,7 @@
closetext
end
-.FightDone
+.FightDone:
writetext UnknownText_0x1ab71c
waitbutton
closetext
@@ -58,7 +58,7 @@
setevent EVENT_TALKED_TO_SEAFOAM_GYM_GUY_ONCE
end
-.TalkedToSeafoamGymGuyScript
+.TalkedToSeafoamGymGuyScript:
writetext SeafoamGymGuyWinText2
waitbutton
closetext
--- a/maps/SilverCaveOutside.asm
+++ b/maps/SilverCaveOutside.asm
@@ -8,7 +8,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_SILVER_CAVE
return
--- a/maps/SilverCaveRoom1.asm
+++ b/maps/SilverCaveRoom1.asm
@@ -25,11 +25,11 @@
SilverCaveRoom1HiddenDireHit:
dwb EVENT_SILVER_CAVE_ROOM_1_HIDDEN_DIRE_HIT, DIRE_HIT
-
+
SilverCaveRoom1HiddenUltraBall:
dwb EVENT_SILVER_CAVE_ROOM_1_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+
SilverCaveRoom1_MapEventHeader:
; filler
--- a/maps/SilverCaveRoom2.asm
+++ b/maps/SilverCaveRoom2.asm
@@ -21,7 +21,7 @@
SilverCaveRoom2HiddenMaxPotion:
dwb EVENT_SILVER_CAVE_ROOM_2_HIDDEN_MAX_POTION, MAX_POTION
-
+
SilverCaveRoom2_MapEventHeader:
; filler
--- a/maps/TeamRocketBaseB1F.asm
+++ b/maps/TeamRocketBaseB1F.asm
@@ -546,7 +546,7 @@
TeamRocketBaseB1FHiddenRevive:
dwb EVENT_TEAM_ROCKET_BASE_B1F_HIDDEN_REVIVE, REVIVE
-
+
SecurityCameraMovement1:
big_step_right
--- a/maps/TeamRocketBaseB2F.asm
+++ b/maps/TeamRocketBaseB2F.asm
@@ -48,7 +48,7 @@
iftrue .Change
return
-.Change
+.Change:
changeblock $e, $c, $7
return
@@ -322,8 +322,8 @@
MapTeamRocketBaseB2FSignpostPtr1:
dw EVENT_OPENED_DOOR_TO_ROCKET_HIDEOUT_TRANSMITTER
dw MapTeamRocketBaseB2FSignpost1Script
-
+
MapTeamRocketBaseB2FSignpost1Script:
opentext
checkevent EVENT_LEARNED_HAIL_GIOVANNI
@@ -364,7 +364,7 @@
TeamRocketBaseB2FHiddenFullHeal:
dwb EVENT_TEAM_ROCKET_BASE_B2F_HIDDEN_FULL_HEAL, FULL_HEAL
-
+
MovementData_0x6d212:
step_right
--- a/maps/TeamRocketBaseB3F.asm
+++ b/maps/TeamRocketBaseB3F.asm
@@ -181,8 +181,8 @@
BossDoor:
dw EVENT_OPENED_DOOR_TO_GIOVANNIS_OFFICE
dw .Script
-
-.Script
+
+.Script:
opentext
checkevent EVENT_LEARNED_SLOWPOKETAIL
iffalse .NeedsPassword
@@ -190,13 +190,13 @@
iffalse .NeedsPassword
jump .OpenSesame
-.NeedsPassword
+.NeedsPassword:
writetext UnknownText_0x6e970
waitbutton
closetext
end
-.OpenSesame
+.OpenSesame:
writetext UnknownText_0x6e9a3
waitbutton
playsound SFX_ENTER_DOOR
--- a/maps/TinTower1F.asm
+++ b/maps/TinTower1F.asm
@@ -47,7 +47,7 @@
checkevent EVENT_FOUGHT_HO_OH
iffalse .Done
appear TINTOWER1F_EUSINE
-.Done
+.Done:
return
UnknownScript_0x185050:
@@ -86,7 +86,7 @@
checkevent EVENT_GOT_RAINBOW_WING
iftrue .NoChange
changeblock $a, $2, $9
-.NoChange
+.NoChange:
return
SuicuneBattle:
@@ -104,7 +104,7 @@
disappear TINTOWER1F_RAIKOU
playsound SFX_EXIT_BUILDING
waitsfx
-.Next1
+.Next1:
writebyte ENTEI
special SpecialMonCheck
iftrue .Next2 ; if player caught Entei, he doesn't appear in Tin Tower
@@ -117,7 +117,7 @@
disappear TINTOWER1F_ENTEI
playsound SFX_EXIT_BUILDING
waitsfx
-.Next2
+.Next2:
spriteface PLAYER, UP
pause 10
applymovement PLAYER, TinTowerPlayerMovement2
@@ -243,37 +243,37 @@
step_end
TinTowerRaikouMovement1:
- db $39 ; movement
+ set_sliding
fast_jump_step_down
- db $38 ; movement
+ remove_sliding
step_end
TinTowerRaikouMovement2:
- db $39 ; movement
+ set_sliding
fast_jump_step_down
fast_jump_step_right
fast_jump_step_down
- db $38 ; movement
+ remove_sliding
step_end
TinTowerEnteiMovement1:
- db $39 ; movement
+ set_sliding
fast_jump_step_down
- db $38 ; movement
+ remove_sliding
step_end
TinTowerEnteiMovement2:
- db $39 ; movement
+ set_sliding
fast_jump_step_down
fast_jump_step_left
fast_jump_step_down
- db $38 ; movement
+ remove_sliding
step_end
TinTowerSuicuneMovement:
- db $39 ; movement
+ set_sliding
fast_jump_step_down
- db $38 ; movement
+ remove_sliding
step_end
TinTowerPlayerMovement2:
--- a/maps/TinTower4F.asm
+++ b/maps/TinTower4F.asm
@@ -21,7 +21,7 @@
TinTower4FHiddenMaxPotion:
dwb EVENT_TIN_TOWER_4F_HIDDEN_MAX_POTION, MAX_POTION
-
+
TinTower4F_MapEventHeader:
; filler
--- a/maps/TinTower5F.asm
+++ b/maps/TinTower5F.asm
@@ -13,11 +13,11 @@
TinTower5FHiddenFullRestore:
dwb EVENT_TIN_TOWER_5F_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+
TinTower5FHiddenCarbos:
dwb EVENT_TIN_TOWER_5F_HIDDEN_CARBOS, CARBOS
-
+
TinTower5F_MapEventHeader:
; filler
--- a/maps/TinTowerRoof.asm
+++ b/maps/TinTowerRoof.asm
@@ -12,7 +12,7 @@
dbw MAPCALLBACK_OBJECTS, .HoOh
-.HoOh
+.HoOh:
checkevent EVENT_FOUGHT_HO_OH
iftrue .NoAppear
checkitem RAINBOW_WING
@@ -19,11 +19,11 @@
iftrue .Appear
jump .NoAppear
-.Appear
+.Appear:
appear TINTOWERROOF_HO_OH
return
-.NoAppear
+.NoAppear:
disappear TINTOWERROOF_HO_OH
return
--- a/maps/Underground.asm
+++ b/maps/Underground.asm
@@ -7,11 +7,11 @@
UndergroundHiddenFullRestore:
dwb EVENT_UNDERGROUND_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+
UndergroundHiddenXSpecial:
dwb EVENT_UNDERGROUND_HIDDEN_X_SPECIAL, X_SPECIAL
-
+
Underground_MapEventHeader:
; filler
--- a/maps/UndergroundPathSwitchRoomEntrances.asm
+++ b/maps/UndergroundPathSwitchRoomEntrances.asm
@@ -68,52 +68,52 @@
checkevent EVENT_SWITCH_4
iffalse .false4
doorstate 1, OPEN1
-.false4:
+.false4
checkevent EVENT_SWITCH_5
iffalse .false5
doorstate 2, OPEN1
-.false5:
+.false5
checkevent EVENT_SWITCH_6
iffalse .false6
doorstate 3, OPEN1
-.false6:
+.false6
checkevent EVENT_SWITCH_7
iffalse .false7
doorstate 4, OPEN1
-.false7:
+.false7
checkevent EVENT_SWITCH_8
iffalse .false8
doorstate 5, OPEN1
-.false8:
+.false8
checkevent EVENT_SWITCH_9
iffalse .false9
doorstate 6, OPEN1
-.false9:
+.false9
checkevent EVENT_SWITCH_10
iffalse .false10
doorstate 7, CLOSED1
doorstate 8, OPEN1
-.false10:
+.false10
checkevent EVENT_SWITCH_11
iffalse .false11
doorstate 9, CLOSED1
doorstate 10, OPEN1
-.false11:
+.false11
checkevent EVENT_SWITCH_12
iffalse .false12
doorstate 11, CLOSED1
doorstate 12, OPEN1
-.false12:
+.false12
checkevent EVENT_SWITCH_13
iffalse .false13
doorstate 13, CLOSED1
doorstate 14, OPEN1
-.false13:
+.false13
checkevent EVENT_SWITCH_14
iffalse .false14
doorstate 15, CLOSED1
doorstate 16, OPEN1
-.false14:
+.false14
return
SuperNerdScript_0x7ca7a:
@@ -636,11 +636,11 @@
UndergroundPathSwitchRoomEntrancesHiddenMaxPotion:
dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_MAX_POTION, MAX_POTION
-
+
UndergroundPathSwitchRoomEntrancesHiddenRevive:
dwb EVENT_UNDERGROUND_PATH_SWITCH_ROOM_ENTRANCES_HIDDEN_REVIVE, REVIVE
-
+
UndergroundSilverApproachMovement1:
step_down
--- a/maps/UnionCaveB2F.asm
+++ b/maps/UnionCaveB2F.asm
@@ -17,16 +17,16 @@
dbw MAPCALLBACK_OBJECTS, .Lapras
-.Lapras
+.Lapras:
checkflag ENGINE_UNION_CAVE_LAPRAS
iftrue .NoAppear
checkcode VAR_WEEKDAY
if_equal FRIDAY, .Appear
-.NoAppear
+.NoAppear:
disappear UNIONCAVEB2F_LAPRAS
return
-.Appear
+.Appear:
appear UNIONCAVEB2F_LAPRAS
return
--- a/maps/VermilionCity.asm
+++ b/maps/VermilionCity.asm
@@ -16,7 +16,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_VERMILION
return
@@ -78,28 +78,28 @@
closetext
end
-.SomeBadges
+.SomeBadges:
writetext UnknownText_0x1aac2b
waitbutton
closetext
end
-.MostBadges
+.MostBadges:
writetext UnknownText_0x1aac88
waitbutton
closetext
end
-.AllBadges
+.AllBadges:
writetext UnknownText_0x1aacf3
buttonsound
verbosegiveitem HP_UP
iffalse .Done
setevent EVENT_GOT_HP_UP_FROM_VERMILION_GUY
-.AlreadyGotItem
+.AlreadyGotItem:
writetext UnknownText_0x1aad4a
waitbutton
-.Done
+.Done:
closetext
end
--- a/maps/VermilionGym.asm
+++ b/maps/VermilionGym.asm
@@ -38,7 +38,7 @@
closetext
end
-.FightDone
+.FightDone:
writetext UnknownText_0x192303
waitbutton
closetext
@@ -87,7 +87,7 @@
closetext
end
-.VermilionGymGuyWinScript
+.VermilionGymGuyWinScript:
writetext VermilionGymGuyWinText
waitbutton
closetext
@@ -100,7 +100,7 @@
checkflag ENGINE_THUNDERBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext LT_SURGE, 1, $1
jumpstd gymstatue2
--- a/maps/VermilionPort.asm
+++ b/maps/VermilionPort.asm
@@ -17,14 +17,14 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.Trigger0
+.Trigger0:
end
-.Trigger1
+.Trigger1:
priorityjump UnknownScript_0x74da6
end
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_VERMILION
return
@@ -200,7 +200,7 @@
VermilionPortHiddenIron:
dwb EVENT_VERMILION_PORT_HIDDEN_IRON, IRON
-
+
MovementData_0x74ef1:
step_down
--- a/maps/VictoryRoad.asm
+++ b/maps/VictoryRoad.asm
@@ -115,11 +115,11 @@
VictoryRoadHiddenMaxPotion:
dwb EVENT_VICTORY_ROAD_HIDDEN_MAX_POTION, MAX_POTION
-
+
VictoryRoadHiddenFullHeal:
dwb EVENT_VICTORY_ROAD_HIDDEN_FULL_HEAL, FULL_HEAL
-
+
MovementData_0x74539:
step_left
--- a/maps/VioletCity.asm
+++ b/maps/VioletCity.asm
@@ -18,7 +18,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_VIOLET
return
--- a/maps/VioletGym.asm
+++ b/maps/VioletGym.asm
@@ -31,7 +31,7 @@
setflag ENGINE_ZEPHYRBADGE
checkcode VAR_BADGES
scall VioletGymTriggerRockets
-.FightDone
+.FightDone:
checkevent EVENT_GOT_TM31_MUD_SLAP
iftrue .SpeechAfterTM
setevent EVENT_BEAT_BIRD_KEEPER_ROD
@@ -60,10 +60,10 @@
if_equal 6, .GoldenrodRockets
end
-.GoldenrodRockets
+.GoldenrodRockets:
jumpstd goldenrodrockets
-.RadioTowerRockets
+.RadioTowerRockets:
jumpstd radiotowerrockets
TrainerBird_keeperRod:
@@ -98,7 +98,7 @@
closetext
end
-.VioletGymGuyWinScript
+.VioletGymGuyWinScript:
writetext VioletGymGuyWinText
waitbutton
closetext
@@ -108,7 +108,7 @@
checkflag ENGINE_ZEPHYRBADGE
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext FALKNER, 1, $1
jumpstd gymstatue2
--- a/maps/VioletPokeCenter1F.asm
+++ b/maps/VioletPokeCenter1F.asm
@@ -45,7 +45,7 @@
waitsfx
end
-.AideWalksAroundPlayer
+.AideWalksAroundPlayer:
applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideWalksLeftToExitPokecenter
spriteface PLAYER, DOWN
applymovement VIOLETPOKECENTER1F_SCIENTIST, MovementData_AideFinishesLeavingPokecenter
--- a/maps/ViridianCity.asm
+++ b/maps/ViridianCity.asm
@@ -14,7 +14,7 @@
; callbacks
dbw MAPCALLBACK_NEWMAP, .FlyPoint
-.FlyPoint
+.FlyPoint:
setflag ENGINE_FLYPOINT_VIRIDIAN
return
@@ -45,7 +45,7 @@
closetext
end
-.BlueReturned
+.BlueReturned:
writetext UnknownText_0x1a9c7e
waitbutton
closetext
--- a/maps/ViridianGym.asm
+++ b/maps/ViridianGym.asm
@@ -32,7 +32,7 @@
closetext
end
-.FightDone
+.FightDone:
writetext LeaderBlueEpilogueText
waitbutton
closetext
@@ -48,7 +48,7 @@
closetext
end
-.ViridianGymGuyWinScript
+.ViridianGymGuyWinScript:
writetext ViridianGymGuyWinText
waitbutton
closetext
@@ -59,7 +59,7 @@
iftrue .Beaten
jumpstd gymstatue1
-.Beaten
+.Beaten:
trainertotext BLUE, 1, $1
jumpstd gymstatue2
--- a/maps/ViridianPokeCenter1F.asm
+++ b/maps/ViridianPokeCenter1F.asm
@@ -24,7 +24,7 @@
closetext
end
-.BlueReturned
+.BlueReturned:
writetext UnknownText_0x9b6f5
waitbutton
closetext
--- a/maps/WarehouseEntrance.asm
+++ b/maps/WarehouseEntrance.asm
@@ -213,25 +213,25 @@
if_equal $3, .three
jump .else
-.two:
+.two
setevent EVENT_GAVE_KURT_APRICORNS
clearevent EVENT_RECEIVED_BALLS_FROM_KURT
clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
-.three:
+.three
clearevent EVENT_GAVE_KURT_APRICORNS
setevent EVENT_RECEIVED_BALLS_FROM_KURT
clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
-.else:
+.else
clearevent EVENT_GAVE_KURT_APRICORNS
clearevent EVENT_RECEIVED_BALLS_FROM_KURT
setevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
-.then:
+.then
takemoney $0, 500
special PlaceMoneyTopRight
writetext UnknownText_0x7c6b8
@@ -296,25 +296,25 @@
if_equal $3, .three
jump .else
-.two:
+.two
setevent EVENT_GAVE_KURT_APRICORNS
clearevent EVENT_RECEIVED_BALLS_FROM_KURT
clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
-.three:
+.three
clearevent EVENT_GAVE_KURT_APRICORNS
setevent EVENT_RECEIVED_BALLS_FROM_KURT
clearevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
-.else:
+.else
clearevent EVENT_GAVE_KURT_APRICORNS
clearevent EVENT_RECEIVED_BALLS_FROM_KURT
setevent EVENT_DRAGON_SHRINE_QUESTION_2
jump .then
-.then:
+.then
takemoney $0, 300
special PlaceMoneyTopRight
writetext UnknownText_0x7c80e
@@ -415,15 +415,15 @@
WarehouseEntranceHiddenParlyzHeal:
dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_PARLYZ_HEAL, PARLYZ_HEAL
-
+
WarehouseEntranceHiddenSuperPotion:
dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_SUPER_POTION, SUPER_POTION
-
+
WarehouseEntranceHiddenAntidote:
dwb EVENT_WAREHOUSE_ENTRANCE_HIDDEN_ANTIDOTE, ANTIDOTE
-
+
SupernerdEricSeenText:
text "I got booted out"
--- a/maps/WhirlIslandB1F.asm
+++ b/maps/WhirlIslandB1F.asm
@@ -33,15 +33,15 @@
WhirlIslandB1FHiddenRareCandy:
dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_RARE_CANDY, RARE_CANDY
-
+
WhirlIslandB1FHiddenUltraBall:
dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_ULTRA_BALL, ULTRA_BALL
-
+
WhirlIslandB1FHiddenFullRestore:
dwb EVENT_WHIRL_ISLAND_B1F_HIDDEN_FULL_RESTORE, FULL_RESTORE
-
+
WhirlIslandB1F_MapEventHeader:
; filler
--- a/maps/WhirlIslandLugiaChamber.asm
+++ b/maps/WhirlIslandLugiaChamber.asm
@@ -12,7 +12,7 @@
dbw MAPCALLBACK_OBJECTS, .Lugia
-.Lugia
+.Lugia:
checkevent EVENT_FOUGHT_LUGIA
iftrue .NoAppear
checkitem SILVER_WING
@@ -19,11 +19,11 @@
iftrue .Appear
jump .NoAppear
-.Appear
+.Appear:
appear WHIRLISLANDLUGIACHAMBER_LUGIA
return
-.NoAppear
+.NoAppear:
disappear WHIRLISLANDLUGIACHAMBER_LUGIA
return
--- a/misc/battle_tower_5c.asm
+++ b/misc/battle_tower_5c.asm
@@ -125,7 +125,7 @@
ld a, PartyMonNicknames / $100
ld [wcd4c], a
ld a, 3
-.CopyLoop
+.CopyLoop:
push af
ld a, [wcd49]
ld l, a
@@ -212,7 +212,7 @@
ret
; 17023a
-.do_dw: ; 17023a
+.do_dw ; 17023a
ld a, [wBattleTowerBattleEnded]
ld e, a
ld d, 0
@@ -226,7 +226,7 @@
jp [hl]
; 170249
-.dw: ; 170249
+.dw ; 170249
dw RunBattleTowerTrainer
dw SkipBattleTowerTrainer
; 17024d
@@ -699,7 +699,7 @@
jp [hl]
; 17051f
-.dw: ; 17051f
+.dw ; 17051f
dw .Jumptable_0
dw .Jumptable_1
dw .Jumptable_2
@@ -957,7 +957,7 @@
; 170696
-.dw: ; 170696 (5c:4696)
+.dw ; 170696 (5c:4696)
dw Function17075f ; 0x00
dw Function170788 ; 0x01
dw Function170778 ; 0x02
@@ -1085,9 +1085,9 @@
and a
ret z
- ld a, BANK(sbe4f)
+ ld a, BANK(s1_be4f)
call GetSRAMBank
- ld a, [sbe4f]
+ ld a, [s1_be4f]
and $2
ld [ScriptVar], a
call CloseSRAM
@@ -1103,11 +1103,11 @@
ret
Function170788: ; 170788 (5c:4788) BattleTowerAction $01
- ld a, BANK(sbe4f)
+ ld a, BANK(s1_be4f)
call GetSRAMBank
- ld a, [sbe4f]
+ ld a, [s1_be4f]
or $2
- ld [sbe4f], a
+ ld [s1_be4f], a
call CloseSRAM
ret
@@ -1591,9 +1591,9 @@
and a
ret z
- ld a, BANK(sbe4f)
+ ld a, BANK(s1_be4f)
call GetSRAMBank
- ld a, [sbe4f]
+ ld a, [s1_be4f]
and $1
ld [ScriptVar], a
call CloseSRAM
@@ -1600,11 +1600,11 @@
ret
Function170ad7: ; 170ad7 (5c:4ad7) BattleTowerAction $15
- ld a, BANK(sbe4f)
+ ld a, BANK(s1_be4f)
call GetSRAMBank
- ld a, [sbe4f]
+ ld a, [s1_be4f]
or $1
- ld [sbe4f], a
+ ld [s1_be4f], a
call CloseSRAM
ret
--- a/misc/fixed_words.asm
+++ b/misc/fixed_words.asm
@@ -2509,7 +2509,7 @@
ld l, a
jp [hl]
-.Jumptable
+.Jumptable:
dw .zero
dw .one
dw .two
@@ -2523,7 +2523,7 @@
dw .ten
-.zero: ; 11d0dd (47:50dd)
+.zero ; 11d0dd (47:50dd)
ld a, [wcd20] ; wcd20 (aliases: CreditsPos)
sla a
ld hl, Unknown_11d208
@@ -2530,7 +2530,7 @@
ld e, $1
jr .load
-.one: ; 11d0e9 (47:50e9)
+.one ; 11d0e9 (47:50e9)
ld a, [wcd21]
sla a
ld hl, Unknown_11d21a
@@ -2537,7 +2537,7 @@
ld e, $2
jr .load
-.two: ; 11d0f5 (47:50f5)
+.two ; 11d0f5 (47:50f5)
ld hl, Unknown_11d2be
ld a, [wcd22]
ld e, a
@@ -2551,7 +2551,7 @@
ld e, $4
jr .load
-.three: ; 11d10f (47:510f)
+.three ; 11d10f (47:510f)
ld a, SPRITE_ANIM_FRAMESET_27
call ReinitSpriteAnimFrame
ld a, [wcd25]
@@ -2558,7 +2558,7 @@
sla a
ld hl, Unknown_11d29e
ld e, $8
-.load: ; 11d11e (47:511e)
+.load ; 11d11e (47:511e)
push de
ld e, a
ld d, $0
@@ -2577,7 +2577,7 @@
call Function11d2ee
ret
-.four: ; 11d134 (47:5134)
+.four ; 11d134 (47:5134)
ld a, SPRITE_ANIM_FRAMESET_27
call ReinitSpriteAnimFrame
ld a, [wcd2a]
@@ -2586,7 +2586,7 @@
ld e, $10
jr .load
-.five: ; 11d145 (47:5145)
+.five ; 11d145 (47:5145)
ld a, SPRITE_ANIM_FRAMESET_27
call ReinitSpriteAnimFrame
ld a, [wcd2c]
@@ -2595,7 +2595,7 @@
ld e, $20
jr .load
-.six: ; 11d156 (47:5156)
+.six ; 11d156 (47:5156)
ld a, SPRITE_ANIM_FRAMESET_2A
call ReinitSpriteAnimFrame
ld a, [wcd4a]
@@ -2613,7 +2613,7 @@
call Function11d2ee
ret
-.seven: ; 11d175 (47:5175)
+.seven ; 11d175 (47:5175)
ld a, [wcd4d]
cp $4
jr z, .asm_11d180
@@ -2666,15 +2666,15 @@
call Function11d2ee
ret
-.nine: ; 11d1d1 (47:51d1)
+.nine ; 11d1d1 (47:51d1)
ld d, -13 * 8
ld a, SPRITE_ANIM_FRAMESET_2C
jr .eight_nine_load
-.eight: ; 11d1d7 (47:51d7)
+.eight ; 11d1d7 (47:51d7)
ld d, 2 * 8
ld a, SPRITE_ANIM_FRAMESET_2B
-.eight_nine_load: ; 11d1db (47:51db)
+.eight_nine_load ; 11d1db (47:51db)
push de
call ReinitSpriteAnimFrame
ld a, [wcd4a]
@@ -2695,7 +2695,7 @@
call Function11d2ee
ret
-.ten: ; 11d1fc (47:51fc)
+.ten ; 11d1fc (47:51fc)
ld a, SPRITE_ANIM_FRAMESET_26
call ReinitSpriteAnimFrame
ld a, $8
@@ -3142,7 +3142,7 @@
jr z, .ExitMasterLoop
jp .MasterLoop
-.ExitMasterLoop
+.ExitMasterLoop:
pop af
ld [rSVBK], a
ret
@@ -3289,84 +3289,84 @@
db -1
.o: db FERALIGATR, FURRET, OCTILLERY, PRIMEAPE, SENTRET, STANTLER, SPEAROW, FEAROW, OMASTAR, OMANYTE
db -1
-.ka_ga: db GROWLITHE, MACHAMP, DRAGONITE, PINSIR, SNORLAX, KABUTO, KABUTOPS, HITMONTOP, WARTORTLE, BLASTOISE, FARFETCH_D, CUBONE, MAROWAK, KANGASKHAN
+.ka_ga db GROWLITHE, MACHAMP, DRAGONITE, PINSIR, SNORLAX, KABUTO, KABUTOPS, HITMONTOP, WARTORTLE, BLASTOISE, FARFETCH_D, CUBONE, MAROWAK, KANGASKHAN
db -1
-.ki_gi: db SUNFLORA, CATERPIE, GYARADOS, RAPIDASH, NINETALES, GIRAFARIG, BELLOSSOM, KINGDRA, KINGLER
+.ki_gi db SUNFLORA, CATERPIE, GYARADOS, RAPIDASH, NINETALES, GIRAFARIG, BELLOSSOM, KINGDRA, KINGLER
db -1
-.ku_gu: db GLOOM, PINECO, GLIGAR, KRABBY, GRANBULL, CROBAT
+.ku_gu db GLOOM, PINECO, GLIGAR, KRABBY, GRANBULL, CROBAT
db -1
-.ke_ge: db ABRA, GENGAR, TAUROS
+.ke_ge db ABRA, GENGAR, TAUROS
db -1
-.ko_go: db MAGIKARP, MAGNEMITE, GASTLY, HAUNTER, MACHOKE, KAKUNA, PSYDUCK, PHANPY, RATTATA, GOLDUCK, GOLBAT, GOLEM, GRAVELER, VENONAT
+.ko_go db MAGIKARP, MAGNEMITE, GASTLY, HAUNTER, MACHOKE, KAKUNA, PSYDUCK, PHANPY, RATTATA, GOLDUCK, GOLBAT, GOLEM, GRAVELER, VENONAT
db -1
-.sa_za: db RHYHORN, PUPITAR, CORSOLA, HITMONLEE, ZAPDOS, JOLTEON, SANDSHREW, SANDSLASH ; RHYDON should lead this list
+.sa_za db RHYHORN, PUPITAR, CORSOLA, HITMONLEE, ZAPDOS, JOLTEON, SANDSHREW, SANDSLASH ; RHYDON should lead this list
db -1
-.shi_ji: db SEADRA, SHELLDER, VAPOREON, DEWGONG
+.shi_ji db SEADRA, SHELLDER, VAPOREON, DEWGONG
db -1
-.su_zu: db SUICUNE, STARMIE, SCYTHER, ZUBAT, BEEDRILL, HYPNO, DROWZEE
+.su_zu db SUICUNE, STARMIE, SCYTHER, ZUBAT, BEEDRILL, HYPNO, DROWZEE
db -1
-.se_ze: db SQUIRTLE, CELEBI
+.se_ze db SQUIRTLE, CELEBI
db -1
-.so_zo: db WOBBUFFET
+.so_zo db WOBBUFFET
db -1
-.ta_da: db DUGTRIO, HORSEA, EXEGGCUTE
+.ta_da db DUGTRIO, HORSEA, EXEGGCUTE
db -1
-.chi_dhi: db CHIKORITA, CHINCHOU
+.chi_dhi db CHIKORITA, CHINCHOU
db -1
-.tsu_du: db SHUCKLE
+.tsu_du db SHUCKLE
db -1
-.te_de: db DIGLETT, REMORAID, DELIBIRD, HOUNDOUR, AMPHAROS
+.te_de db DIGLETT, REMORAID, DELIBIRD, HOUNDOUR, AMPHAROS
db -1
-.to_do: db DODUO, DODRIO, SMEARGLE, KOFFING, TENTACRUEL, TOGETIC, TOGEPI, GOLDEEN, METAPOD, DONPHAN
+.to_do db DODUO, DODRIO, SMEARGLE, KOFFING, TENTACRUEL, TOGETIC, TOGEPI, GOLDEEN, METAPOD, DONPHAN
db -1
-.na: db ODDISH, EXEGGUTOR
+.na db ODDISH, EXEGGUTOR
db -1
-.ni: db NIDOKING, NIDOQUEEN, NIDORAN_M, NIDORAN_F, NIDORINA, NIDORINO, MEOWTH, SNEASEL, POLIWHIRL, POLITOED, POLIWRATH, POLIWAG
+.ni db NIDOKING, NIDOQUEEN, NIDORAN_M, NIDORAN_F, NIDORINA, NIDORINO, MEOWTH, SNEASEL, POLIWHIRL, POLITOED, POLIWRATH, POLIWAG
db -1
-.nu: db QUAGSIRE
+.nu db QUAGSIRE
db -1
-.ne: db NATU, XATU
+.ne db NATU, XATU
db -1
-.no: db DUNSPARCE
+.no db DUNSPARCE
db -1
-.ha_ba_pa: db SEEL, STEELIX, TYPHLOSION, DRAGONAIR, BUTTERFREE, SCIZOR, HOPPIP, BLISSEY, PARAS, PARASECT, QWILFISH, MR__MIME, TYROGUE, CLOYSTER, TYRANITAR
+.ha_ba_pa db SEEL, STEELIX, TYPHLOSION, DRAGONAIR, BUTTERFREE, SCIZOR, HOPPIP, BLISSEY, PARAS, PARASECT, QWILFISH, MR__MIME, TYROGUE, CLOYSTER, TYRANITAR
db -1
-.hi_bi_pi: db CLEFFA, WEEDLE, PIKACHU, CLEFABLE, PIDGEOT, PIDGEOTTO, PICHU, CLEFAIRY, CHARMANDER, STARYU, CYNDAQUIL, SUNKERN, TEDDIURSA, VOLTORB
+.hi_bi_pi db CLEFFA, WEEDLE, PIKACHU, CLEFABLE, PIDGEOT, PIDGEOTTO, PICHU, CLEFAIRY, CHARMANDER, STARYU, CYNDAQUIL, SUNKERN, TEDDIURSA, VOLTORB
db -1
-.fu_bu_pu: db MOLTRES, FLAREON, ALAKAZAM, MAGMAR, FORRETRESS, WIGGLYTUFF, IVYSAUR, BULBASAUR, VENUSAUR, AERODACTYL, MAGBY, IGGLYBUFF, UMBREON, ARTICUNO, JIGGLYPUFF, SNUBBULL
+.fu_bu_pu db MOLTRES, FLAREON, ALAKAZAM, MAGMAR, FORRETRESS, WIGGLYTUFF, IVYSAUR, BULBASAUR, VENUSAUR, AERODACTYL, MAGBY, IGGLYBUFF, UMBREON, ARTICUNO, JIGGLYPUFF, SNUBBULL
db -1
-.he_be_pe: db BAYLEEF, GRIMER, MUK, HERACROSS, HOUNDOOM, PERSIAN, LICKITUNG
+.he_be_pe db BAYLEEF, GRIMER, MUK, HERACROSS, HOUNDOOM, PERSIAN, LICKITUNG
db -1
-.ho_bo_po: db HO_OH, HOOTHOOT, PIDGEY, PONYTA, SKIPLOOM, PORYGON, PORYGON2
+.ho_bo_po db HO_OH, HOOTHOOT, PIDGEY, PONYTA, SKIPLOOM, PORYGON, PORYGON2
db -1
-.ma: db MAGCARGO, SLUGMA, QUILAVA, BELLSPROUT, WEEZING, MARILL, AZUMARILL, ELECTRODE, MANKEY, MANTINE
+.ma db MAGCARGO, SLUGMA, QUILAVA, BELLSPROUT, WEEZING, MARILL, AZUMARILL, ELECTRODE, MANKEY, MANTINE
db -1
-.mi: db DRATINI, MEW, MEWTWO, MILTANK
+.mi db DRATINI, MEW, MEWTWO, MILTANK
db -1
-.mu: db MISDREAVUS, SMOOCHUM
+.mu db MISDREAVUS, SMOOCHUM
db -1
-.me: db MEGANIUM, DITTO, TENTACOOL, MAREEP
+.me db MEGANIUM, DITTO, TENTACOOL, MAREEP
db -1
-.mo: db FLAAFFY, VENOMOTH, TANGELA
+.mo db FLAAFFY, VENOMOTH, TANGELA
db -1
-.ya: db SLOWKING, SLOWBRO, SLOWPOKE, MURKROW, YANMA
+.ya db SLOWKING, SLOWBRO, SLOWPOKE, MURKROW, YANMA
db -1
-.yu: db KADABRA
+.yu db KADABRA
db -1
-.yo: db LARVITAR, NOCTOWL
+.yo db LARVITAR, NOCTOWL
db -1
-.ra: db RAIKOU, RAICHU, CHANSEY, RATICATE, LAPRAS, VILEPLUME, LANTURN
+.ra db RAIKOU, RAICHU, CHANSEY, RATICATE, LAPRAS, VILEPLUME, LANTURN
db -1
-.ri: db CHARMELEON, CHARIZARD, URSARING
+.ri db CHARMELEON, CHARIZARD, URSARING
db -1
-.ru: db JYNX, LUGIA
+.ru db JYNX, LUGIA
db -1
-.re: db MAGNETON, LEDIAN, LEDYBA
+.re db MAGNETON, LEDIAN, LEDYBA
db -1
-.ro: db VULPIX
+.ro db VULPIX
db -1
-.wa: db JUMPLUFF, TOTODILE, MACHOP
-.end: db -1
+.wa db JUMPLUFF, TOTODILE, MACHOP
+.end db -1
; 11d67e
GFX_11d67e:
--- a/misc/gbc_only.asm
+++ b/misc/gbc_only.asm
@@ -96,7 +96,7 @@
ret
; 4eb15
-.FillRow ; 4eb15
+.FillRow: ; 4eb15
ld c, SCREEN_WIDTH - 2
.next_column
ld [hli], a
@@ -105,7 +105,7 @@
ret
; 4eb1c
-.FillColumn ; 4eb1c
+.FillColumn: ; 4eb1c
ld de, SCREEN_WIDTH
ld c, SCREEN_HEIGHT - 2
.next_row
--- a/misc/gfx_41.asm
+++ b/misc/gfx_41.asm
@@ -2,7 +2,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
decoord 0, 0, AttrMap
ld hl, wBackupAttrMap
call CutAndPasteAttrMap
@@ -24,7 +24,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
decoord 0, 0
ld hl, wDecompressScratch
call CutAndPasteTilemap
@@ -39,7 +39,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
decoord 0, 0, AttrMap
ld hl, wBackupAttrMap
call CutAndPasteAttrMap
@@ -54,7 +54,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
decoord 0, 0, AttrMap
ld hl, wBackupAttrMap
call CutAndPasteAttrMap
@@ -83,7 +83,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
decoord 0, 0, AttrMap
ld hl, wBackupAttrMap
call CutAndPasteAttrMap
@@ -112,7 +112,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
ld a, $1
ld [rVBK], a
ld a, $3
@@ -136,7 +136,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
ld a, $1
ld [rVBK], a
ld a, $3
@@ -151,7 +151,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
decoord 0, 0, AttrMap
ld hl, wBackupAttrMap
call CutAndPasteAttrMap
@@ -181,7 +181,7 @@
ld hl, .Function
jp CallInSafeGFXMode
-.Function
+.Function:
decoord 0, 0, AttrMap
ld hl, wBackupAttrMap
call CutAndPasteAttrMap
@@ -228,7 +228,7 @@
ret
; 10419c
-._hl_: ; 10419c
+._hl_ ; 10419c
jp [hl]
; 10419d
@@ -454,7 +454,7 @@
ld l, e
ld de, wDecompressScratch
call FarCopyBytes
-
+
pop hl
pop bc
@@ -500,7 +500,7 @@
jr .loop
; 1042d6
-.bankswitch: ; 1042d6
+.bankswitch ; 1042d6
ld a, [rSVBK]
push af
ld a, $6
--- a/misc/mobile_12_2.asm
+++ b/misc/mobile_12_2.asm
@@ -443,7 +443,7 @@
push bc
push hl
ld e, 0
- callba Function8e83f
+ callba LoadMenuMonIcon
ld a, [hObjectStructIndexBuffer]
inc a
ld [hObjectStructIndexBuffer], a
@@ -481,7 +481,7 @@
jr nz, .NotFainted
scf
-.NotFainted
+.NotFainted:
ret
; 4ab1a
--- a/misc/mobile_22.asm
+++ b/misc/mobile_22.asm
@@ -2216,7 +2216,7 @@
push hl
call Function8923c
call _hl_
- call Function3238
+ call CGBOnly_LoadEDTile
pop hl
asm_89d90: ; 89d90 (22:5d90)
@@ -2661,7 +2661,7 @@
endr
ld a, $6
call Function8a5a3
- call Function3238
+ call CGBOnly_LoadEDTile
pop bc
ld a, c
cp $b
@@ -2676,7 +2676,7 @@
ld a, $6
hlcoord 15, 4, AttrMap
call Function8a5a3
- call Function3238
+ call CGBOnly_LoadEDTile
jp Function89e36
Function8a0a1: ; 8a0a1 (22:60a1)
--- a/misc/mobile_22_2.asm
+++ b/misc/mobile_22_2.asm
@@ -19,21 +19,21 @@
ret
; 8b354
-.dw: ; 8b354
+.dw ; 8b354
dw .zero
dw .one
dw .two
; 8b35a
-.zero: ; 8b35a
+.zero ; 8b35a
mobile
; 8b35b
-.one: ; 8b35b
+.one ; 8b35b
mobile
; 8b35c
-.two: ; 8b35c
+.two ; 8b35c
mobile
; 8b35d
@@ -401,7 +401,7 @@
call Function8b4fd
ld e, $0
call Function89c44
- call Function3238
+ call CGBOnly_LoadEDTile
ret
Function8b555: ; 8b555 (22:7555)
--- a/misc/mobile_40.asm
+++ b/misc/mobile_40.asm
@@ -1998,7 +1998,7 @@
ret
; 100cad
-.attrs: ; 100cad
+.attrs ; 100cad
db 10, 1
db 255, 1
db $a0, $00
@@ -3079,7 +3079,7 @@
; 1013dd
Function1013dd: ; 1013dd
- call Function3238
+ call CGBOnly_LoadEDTile
ret
; 1013e1
@@ -6880,7 +6880,7 @@
ret
; 102e32
-.waiting: ; 102e32
+.waiting ; 102e32
db "Waiting...!@"
; 102e3e
--- a/misc/mobile_41.asm
+++ b/misc/mobile_41.asm
@@ -1095,5 +1095,5 @@
ret
; 1065ad
-.bgfont:
+.bgfont
INCBIN "gfx/unknown/1065ad.2bpp"
--- a/misc/mobile_42.asm
+++ b/misc/mobile_42.asm
@@ -9,7 +9,7 @@
mobiletradeanim_showgtsgivemon
mobiletradeanim_12
mobiletradeanim_10
- mobiletradeanim_sendmon
+ mobiletradeanim_sendmon
mobiletradeanim_06
mobiletradeanim_0f
mobiletradeanim_end
@@ -29,7 +29,7 @@
.TradeAnimScript:
mobiletradeanim_11
mobiletradeanim_07
- mobiletradeanim_receivemon
+ mobiletradeanim_receivemon
mobiletradeanim_showgtsgetmon
mobiletradeanim_end
@@ -50,9 +50,9 @@
mobiletradeanim_showgivemon
mobiletradeanim_12
mobiletradeanim_02
- mobiletradeanim_sendmon
+ mobiletradeanim_sendmon
mobiletradeanim_05
- mobiletradeanim_receivemon
+ mobiletradeanim_receivemon
mobiletradeanim_showgetmon
mobiletradeanim_end
@@ -66,7 +66,7 @@
.TradeAnimScript:
mobiletradeanim_11
mobiletradeanim_07
- mobiletradeanim_receivemon
+ mobiletradeanim_receivemon
mobiletradeanim_showoddegg
mobiletradeanim_end
@@ -351,7 +351,7 @@
and a
ret
-.StopAnim
+.StopAnim:
xor a
ld [hSCX], a
ld [hSCY], a
@@ -382,7 +382,7 @@
; 10828a
.Jumptable: ; 10828a
-
+
dw GetMobileTradeAnimByte ; 00
dw MobileTradeAnim_ShowPlayerMonToBeSent ; 01
dw MobileTradeAnim_02 ; 02
@@ -1534,7 +1534,7 @@
ld de, (31 << 10) + (31 << 5) + 31 ; $7fff
jr .load_pal
-.Orange
+.Orange:
ld de, ( 1 << 10) + (15 << 5) + 31 ; $05ff
.load_pal
ld a, e
@@ -1680,7 +1680,7 @@
call DelayFrames
ret
-.Getmon
+.Getmon:
ld hl, .TakeGoodCareOf
call PrintText
ld c, 80
--- a/misc/mobile_46.asm
+++ b/misc/mobile_46.asm
@@ -1858,7 +1858,7 @@
ld hl, Text_SaveFileWillBeSent
call Function11a9c0
-.DontSendSaveFile
+.DontSendSaveFile:
ld a, [wcd57]
ld l, a
ld a, [wcd58]
@@ -4252,10 +4252,10 @@
ld [hBGMapMode], a
ret
-.RunJumptable
+.RunJumptable:
jumptable .Jumptable, wcd3c
-.Jumptable
+.Jumptable:
dw Function119f3f
dw Function119f45
dw Function119f56
@@ -5846,12 +5846,12 @@
ld [hObjectStructIndexBuffer], a
ld a, $10
ld [wCurIconTile], a
- ld hl, Function8e83f
- ld a, BANK(Function8e83f)
+ ld hl, LoadMenuMonIcon
+ ld a, BANK(LoadMenuMonIcon)
ld e, $4
rst FarCall
- ld hl, Function8e83f
- ld a, BANK(Function8e83f)
+ ld hl, LoadMenuMonIcon
+ ld a, BANK(LoadMenuMonIcon)
ld e, $5
rst FarCall
ld hl, $c6d0
@@ -7086,7 +7086,7 @@
.IterateJumptable: ; 11b46a
jumptable .Jumptable, wJumptableIndex
-.Jumptable
+.Jumptable:
dw Function11b483
dw Function11b570
dw Function11b5c0
@@ -7232,7 +7232,7 @@
call CloseSRAM
jp Function11ad8a
-.InitRAM
+.InitRAM:
ld bc, $c626
ld a, [PlayerID]
ld [wcd2a], a
@@ -7285,7 +7285,7 @@
ld [wJumptableIndex], a
ret
-.SaveData
+.SaveData:
ld a, $3
ld [rSVBK], a
@@ -7390,9 +7390,9 @@
jr nz, .loop
ret
-.RunJumptable
+.RunJumptable:
jumptable .Jumptable, wJumptableIndex
-.Jumptable
+.Jumptable:
dw Function11b66d
dw Function11b6b3
; 11b66d
--- a/misc/mobile_5f.asm
+++ b/misc/mobile_5f.asm
@@ -213,15 +213,15 @@
cp $49
jr c, .NextChar
-.Fail
+.Fail:
scf
ret
-.NextChar
+.NextChar:
dec c
jr nz, .loop
-.Done
+.Done:
and a
ret
; 17d0b3
@@ -448,12 +448,12 @@
ld hl, MenuDataHeader_17d26a ; Japanese Menu, where you can choose 'News' as an option
jr .Load_Interpret
-.English
+.English:
ld a, $4
ld [ScriptVar], a
ld hl, MenuDataHeader_ChallengeExplanationCancel ; English Menu
-.Load_Interpret
+.Load_Interpret:
call LoadMenuDataHeader
call Function17d246
call CloseWindow
@@ -473,14 +473,14 @@
dec a
jr .LoadToScriptVar
-.UsewMenuCursorY
+.UsewMenuCursorY:
ld a, [wMenuCursorY]
-.LoadToScriptVar
+.LoadToScriptVar:
ld [ScriptVar], a
ret
-.Exit
+.Exit:
ld a, $4
ld [ScriptVar], a
ret
@@ -4869,7 +4869,7 @@
ret
; 17f6cd
-.bcd_two_digits: ; 17f6cd
+.bcd_two_digits ; 17f6cd
ld c, a
and $f0
swap a
@@ -4877,7 +4877,7 @@
ld a, c
and $f
-.bcd_digit: ; 17f6d8
+.bcd_digit ; 17f6d8
add "0"
ld [hli], a
ret
--- a/misc/mobile_menu.asm
+++ b/misc/mobile_menu.asm
@@ -424,7 +424,7 @@
scf
ret
-.DeleteLoginPassword
+.DeleteLoginPassword:
call PlaceHollowCursor
ld hl, UnknownText_0x4a358
call PrintText
--- a/predef/cgb.asm
+++ b/predef/cgb.asm
@@ -32,7 +32,7 @@
ret
; 8d7a
-.dw: ; 8d7a
+.dw ; 8d7a
dw _CGB_BattleGrayscale
dw _CGB_BattleColors
dw _CGB_PokegearPals
@@ -341,11 +341,11 @@
call LoadHLPaletteIntoDE
jr .Resume
-.GetMonPalette
+.GetMonPalette:
ld bc, TempMonDVs
call GetPlayerOrMonPalettePointer
call LoadPalette_White_Col1_Col2_Black
-.Resume
+.Resume:
call WipeAttrMap
hlcoord 1, 4, AttrMap
lb bc, 7, 7
--- a/predef/crystal.asm
+++ b/predef/crystal.asm
@@ -22,8 +22,8 @@
ret
; 49330 (12:5330)
-.dw: ; 49330
-
+.dw ; 49330
+
dw MG_Mobile_Layout00
dw MG_Mobile_Layout01
dw MG_Mobile_Layout02
--- a/sram.asm
+++ b/sram.asm
@@ -69,7 +69,7 @@
sMysteryGiftTrainerHouseFlag:: ds 1
sMysteryGiftPartnerName:: ds NAME_LENGTH
s0_ac09:: ds 1
-sMysteryGiftTrainer:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
+sMysteryGiftTrainer:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2 ; ac0a
sBackupMysteryGiftItemEnd::
ds $30
@@ -81,7 +81,7 @@
SECTION "Backup Save", SRAM [$b200], BANK [0]
sBackupOptions:: ds OptionsEnd - Options
-s0_b208:: ds 1
+s0_b208:: ds 1 ; loaded with 99, used to check save corruption
sBackupGameData::
sBackupPlayerData:: ds wPlayerDataEnd - wPlayerData
@@ -94,11 +94,11 @@
; bf0d
sBackupChecksum:: ds 2
-s0_bf0f:: ds 1
+s0_bf0f:: ds 1 ; loaded with 0x7f, used to check save corruption
sStackTop:: ds 2
-SECTION "SRAM Bank 1", SRAM, BANK [1]
+SECTION "Save", SRAM, BANK [1]
sOptions:: ds OptionsEnd - Options
@@ -117,11 +117,13 @@
sChecksum:: ds 2
s1_ad0f:: ds 1 ; loaded with 0x7f, used to check save corruption
+SECTION "Active Box", SRAM, BANK [1]
; ad10
box sBox
; b160
ds $f4
+SECTION "Link Battle Data", SRAM, BANK [1]
sLinkBattleResults:: ds $c
sLinkBattleStats:: ; b260
@@ -143,6 +145,7 @@
sLinkBattleRecord5:: link_battle_record sLinkBattleRecord5
sLinkBattleStatsEnd::
+SECTION "SRAM Hall of Fame", SRAM, BANK [1]
sHallOfFame:: ; b2c0
; temporary until I can find a way to macrofy it
hall_of_fame sHallOfFame01
@@ -190,6 +193,7 @@
; endr
sHallOfFameEnd::
+SECTION "SRAM Crystal Data", SRAM, BANK [1]
sMobileEventIndex:: ds 1 ; be3c
sCrystalData::
@@ -208,7 +212,7 @@
; The 7 trainers of the BattleTower are saved here, so nobody appears more than once
sBTTrainers:: ; sbe48
ds 7
-sbe4f:: ds 1
+s1_be4f:: ds 1
sBattleTowerReward:: ds 1
; Pkmn of previous trainer
sBTPkmnOfTrainers:: ; 0xbe51
--- a/text/types.asm
+++ b/text/types.asm
@@ -22,7 +22,7 @@
ld bc, SCREEN_WIDTH
add hl, bc
+.Print:
ld b, a
jr PrintType
--- a/tilesets/animations.asm
+++ b/tilesets/animations.asm
@@ -296,7 +296,7 @@
; Reset the animation command loop.
xor a
ld [hTileAnimFrame], a
-
+
WaitTileAnimation: ; fc2fe
; Do nothing this frame.
ret
@@ -466,29 +466,29 @@
ld hl, [sp+0]
ld b, h
ld c, l
-
+
ld a, [TileAnimationTimer]
-
+
; 4 tile graphics, updated every other frame.
and 3 << 1
-
+
; 2 x 8 = 16 bytes per tile
rept 3
add a
endr
-
+
add WaterTileFrames % $100
ld l, a
ld a, 0
adc WaterTileFrames / $100
ld h, a
-
+
; Stack now points to the start of the tile for this frame.
ld sp, hl
-
+
ld l, e
ld h, d
-
+
jp WriteTile
; fc41c
@@ -675,16 +675,16 @@
ld hl, [sp+0]
ld b, h
ld c, l
-
+
; Alternate tile graphic every other frame
ld a, [TileAnimationTimer]
and 1 << 1
ld e, a
-
+
; CGB has different color mappings for flowers.
ld a, [hCGB]
and 1
-
+
add e
swap a ; << 4 (16 bytes)
ld e, a
@@ -692,9 +692,9 @@
ld hl, FlowerTileFrames
add hl, de
ld sp, hl
-
+
ld hl, VTiles2 + $30 ; tile 4
-
+
jp WriteTile
; fc58c
@@ -825,7 +825,7 @@
ld hl, [sp+0]
ld b, h
ld c, l
-
+
; de = VRAM address
ld l, e
ld h, d
@@ -834,12 +834,12 @@
ld d, [hl]
inc hl
; Tile address is now at hl.
-
+
; Get the tile for this frame.
ld a, [TileAnimationTimer]
and %11 ; 4 frames x2
swap a ; * 16 bytes per tile
-
+
add [hl]
inc hl
ld h, [hl]
@@ -847,17 +847,17 @@
ld a, 0
adc h
ld h, a
-
+
; Stack now points to the desired frame.
ld sp, hl
-
+
ld l, e
ld h, d
-
+
jr WriteTile
; fc696
-
-
+
+
WriteTileFromBuffer: ; fc696
; Write tiledata at wTileAnimBuffer to de.
; wTileAnimBuffer is loaded to sp for WriteTile.
@@ -865,16 +865,16 @@
ld hl, [sp+0]
ld b, h
ld c, l
-
+
ld hl, wTileAnimBuffer
ld sp, hl
-
+
ld h, d
ld l, e
jr WriteTile
; fc6a2
-
-
+
+
WriteTileToBuffer: ; fc6a2
; Write tiledata de to wTileAnimBuffer.
; de is loaded to sp for WriteTile.
@@ -882,13 +882,13 @@
ld hl, [sp+0]
ld b, h
ld c, l
-
+
ld h, d
ld l, e
ld sp, hl
-
+
ld hl, wTileAnimBuffer
-
+
; fallthrough
WriteTile: ; fc6ac
@@ -901,7 +901,7 @@
ld [hl], e
inc hl
ld [hl], d
-
+
rept 7
pop de
inc hl
@@ -909,7 +909,7 @@
inc hl
ld [hl], d
endr
-
+
; restore sp
ld h, b
ld l, c
@@ -925,37 +925,37 @@
ld a, [hCGB]
and a
ret z
-
+
; We don't want to mess with non-standard palettes.
ld a, [rBGP] ; BGP
cp %11100100
ret nz
-
+
; Only update on even frames.
ld a, [TileAnimationTimer]
ld l, a
and 1 ; odd
ret nz
-
+
; Ready for BGPD input...
ld a, %10011000 ; auto increment, index $18 (pal 3 color 0)
ld [rBGPI], a
-
+
ld a, [rSVBK]
push af
ld a, 5 ; wra5: gfx
ld [rSVBK], a
-
+
; Update color 0 in order 0 1 2 1
-
+
ld a, l
and %110 ; frames 0 2 4 6
-
+
jr z, .color0
-
+
cp 4
jr z, .color2
-
+
.color1
ld hl, UnknBGPals + $1a ; pal 3 color 1
ld a, [hli]
@@ -963,7 +963,7 @@
ld a, [hli]
ld [rBGPD], a
jr .end
-
+
.color0
ld hl, UnknBGPals + $18 ; pal 3 color 0
ld a, [hli]
@@ -971,7 +971,7 @@
ld a, [hli]
ld [rBGPD], a
jr .end
-
+
.color2
ld hl, UnknBGPals + $1c ; pal 3 color 2
ld a, [hli]
@@ -978,7 +978,7 @@
ld [rBGPD], a
ld a, [hli]
ld [rBGPD], a
-
+
.end
pop af
ld [rSVBK], a
--- a/wram.asm
+++ b/wram.asm
@@ -118,7 +118,7 @@
Channel2JumpCondition:: ds 1
Channel3JumpCondition:: ds 1
Channel4JumpCondition:: ds 1
-wStereoPanningMask:: ds 1
+wStereoPanningMask:: ds 1 ; c2bc
CryTracks:: ; c2bd
; plays only in left or right track depending on what side the monster is on
; both tracks active outside of battle
@@ -127,7 +127,7 @@
CurSFX:: ; c2bf
; id of sfx currently playing
ds 1
-
+ChannelsEnd::
wMapMusic:: ; c2c0
ds 1
@@ -252,7 +252,7 @@
\1YCoord:: ds 1 ; 5
\1XOffset:: ds 1 ; 6
\1YOffset:: ds 1 ; 7
-\1Duration:: ds 1 ; 8
+\1Duration:: ds 1 ; 8
\1DurationOffset:: ds 1 ; 9
\1FrameIndex:: ds 1 ; a
\1Sprite0b:: ds 1
@@ -1328,9 +1328,9 @@
wMenuJoypad:: ds 1 ; cf73
MenuSelection:: ds 1 ; cf74
MenuSelectionQuantity:: ds 1 ; cf75
-wWhichIndexSet:: ds 1
-wScrollingMenuCursorPosition:: ds 1
-wWindowStackSize:: ds 9
+wWhichIndexSet:: ds 1 ; cf76
+wScrollingMenuCursorPosition:: ds 1 ; cf77
+wWindowStackSize:: ds 9 ; cf78
; menu data header
wMenuDataHeader:: ; cf81
@@ -1727,18 +1727,21 @@
ds 1
wLastPocket:: ds 1
-wd0d7:: ds 1
-wd0d8::
+
+wPCItemsCursor:: ds 1
wPartyMenuCursor:: ds 1
wItemsPocketCursor:: ds 1
wKeyItemsPocketCursor:: ds 1
wBallsPocketCursor:: ds 1
wTMHMPocketCursor:: ds 1
-wd0dd:: ds 2
+
+wPCItemsScrollPosition:: ds 1
+wPartyMenuScrollPosition:: ds 1 ; unused
wItemsPocketScrollPosition:: ds 1
wKeyItemsPocketScrollPosition:: ds 1
wBallsPocketScrollPosition:: ds 1
wTMHMPocketScrollPosition:: ds 1
+
wMoveSwapBuffer::
wSwitchMon::
wSwitchItem::
@@ -1764,9 +1767,9 @@
; flickers when climbing waterfall
ds 1
-wBattleResult:: ds 1
-wUsingItemWithSelect:: ds 1
-CurMart:: ds 16
+wBattleResult:: ds 1 ; d0ee
+wUsingItemWithSelect:: ds 1 ; d0ef
+CurMart:: ds 16 ; d0f0
CurMartEnd::
ds CurMart - @
CurElevator:: ds 1
@@ -1776,7 +1779,7 @@
wd0f2::
wMailboxCount:: ds 1
wMailboxItems:: ds MAILBOX_CAPACITY
-wMailboxEnd:: ds 1 ; d1fe
+wMailboxEnd:: ds 1 ; d0fe
ds 2
wd100:: ds 1
@@ -1786,9 +1789,7 @@
wd104:: ds 1
wd105:: ds 1
-CurItem:: ; d106
- ds 1
-
+CurItem:: ds 1 ; d106
CurItemQuantity:: ; d107
wMartItemID::
wd107:: ds 1
@@ -1805,6 +1806,7 @@
wWhichHPBar::
; 0: Enemy
; 1: Player
+; 2: Party Menu
ds 1
wPokemonWithdrawDepositParameter::
; 0: Take from PC
@@ -2027,7 +2029,9 @@
Buffer6::
wd1ef:: ds 1
wd1f0:: ds 1
+wCurHPBarPixels::
wd1f1:: ds 1
+wNewHPBarPixels::
wd1f2:: ds 1
wd1f3:: ds 1
wd1f4:: ds 1
@@ -2148,7 +2152,7 @@
wListMoves_MoveIndicesBuffer:: ds NUM_MOVES
wPutativeTMHMMove:: ds 1
wd263:: ds 1
-wd264:: ds 1
+wAISwitch:: ds 1
wFoundMatchingIDInParty::
wNamedObjectIndexBuffer::
wCurTMHM::
@@ -2461,7 +2465,7 @@
StatusFlags:: ; d84c
; 0 - pokedex
; 1 - unown dex
- ; 2 -
+ ; 2 -
; 3 - pokerus
; 4 - rocket signal
; 5 - wild encounters on/off
@@ -2471,9 +2475,9 @@
StatusFlags2:: ; d84d
; 0 - rockets
- ; 1 -
+ ; 1 -
; 2 - bug contest timer
- ; 3 -
+ ; 3 -
; 4 - bike shop call
; 5 - pokerus
; 6 - berry juice?
@@ -2801,16 +2805,16 @@
VisitedSpawns:: ; dca5
flag_array NUM_SPAWNS
-wDigWarp:: ds 1
-wDigMapGroup:: ds 1
-wDigMapNumber:: ds 1
+wDigWarp:: ds 1 ; dcaa
+wDigMapGroup:: ds 1 ; dcab
+wDigMapNumber:: ds 1 ; dcac
; used on maps like second floor pokécenter, which are reused, so we know which
; map to return to
-BackupWarpNumber:: ; dcac
+BackupWarpNumber:: ; dcad
ds 1
-BackupMapGroup:: ; dcad
+BackupMapGroup:: ; dcae
ds 1
-BackupMapNumber:: ; dcae
+BackupMapNumber:: ; dcaf
ds 1
ds 3
@@ -2843,7 +2847,7 @@
ds PARTY_LENGTH ; species of each Pokémon in party
PartyEnd:: ; dcde
ds 1 ; legacy scripts don't check PartyCount
-
+
PartyMons::
PartyMon1:: party_struct PartyMon1 ; dcdf
PartyMon2:: party_struct PartyMon2 ; dd0f
@@ -2993,7 +2997,7 @@
w3_d100:: ; BattleTower OpponentTrainer-Data (length = 0xe0 = $a + $1 + 3*$3b + $24)
BT_OTTrainer:: battle_tower_struct BT_OT
-; d1e0
+; d1e0
ds $20
; d200
BT_TrainerTextIndex:: ds 2