mirror of
https://github.com/pret/pokeyellow.git
synced 2025-02-18 16:57:28 +00:00
Clean up white space
This commit is contained in:
parent
3af22139a9
commit
a070bdcb21
@ -449,7 +449,7 @@ INCLUDE "audio/music/printer.asm"
|
||||
INCLUDE "audio/sfx/unknown_80e5a.asm"
|
||||
INCLUDE "audio/sfx/unknown_80e91.asm"
|
||||
INCLUDE "audio/sfx/get_item2_4.asm"
|
||||
|
||||
|
||||
SECTION "Audio Engine 1", ROMX, BANK[AUDIO_1]
|
||||
|
||||
PlayBattleMusic:: ; 9064 (2:5064)
|
||||
@ -515,7 +515,7 @@ Music_RivalAlternateTempo:: ; 99db (2:59db)
|
||||
call PlayMusic
|
||||
ld de, Music_MeetRival_branch_b119
|
||||
jr asm_99ed
|
||||
|
||||
|
||||
; applies both the alternate start and alternate tempo
|
||||
Music_RivalAlternateStartAndTempo:: ; 99e7 (2:59e7)
|
||||
call Music_RivalAlternateStart
|
||||
@ -662,7 +662,7 @@ PokedexRatingSfxPointers: ; 7d0f8 (1f:50f8)
|
||||
OwnedMonValues: ; 7d106 (1f:5106)
|
||||
db 10, 40, 60, 90, 120, 150, $ff
|
||||
|
||||
|
||||
|
||||
INCLUDE "audio/engine_3.asm"
|
||||
|
||||
SECTION "Audio Engine 4", ROMX, BANK[AUDIO_4]
|
||||
@ -749,7 +749,7 @@ INCLUDE "audio/music/yellowunusedsong.asm"
|
||||
INCLUDE "audio/music/jessieandjames.asm"
|
||||
|
||||
INCBIN "audio/unknown_832b9.bin"
|
||||
|
||||
|
||||
SECTION "Pikachu Cries 1",ROMX,BANK[PCM_1]
|
||||
PikachuCry1:: ; 84000 (21:4000)
|
||||
dw (PikachuCry1_End - PikachuCry1) - 2 ; length of pcm data
|
||||
|
@ -967,7 +967,7 @@ Audio1_ApplyWavePatternAndFrequency: ; 0x964b
|
||||
ld a, $80
|
||||
ld [wTempoModifier], a
|
||||
ret
|
||||
|
||||
|
||||
Audio1_SetSfxTempo: ; 9657 (2:5657)
|
||||
call Audio1_IsCry
|
||||
jr c, .isCry
|
||||
@ -1070,7 +1070,7 @@ Audio1_96c3: ; 96c3 (2:56c3)
|
||||
.asm_96de
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Audio1_ApplyPitchBend: ; 0x96f9
|
||||
ld hl, wChannelFlags1
|
||||
add hl, bc
|
||||
@ -1566,7 +1566,7 @@ Audio1_9972: ; 9972 (2:5972)
|
||||
pop bc
|
||||
pop af
|
||||
ret
|
||||
|
||||
|
||||
Audio1_HWChannelEnableMasks: ; 9985 (2:5985)
|
||||
db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 0-3
|
||||
db HW_CH1_ENABLE_MASK, HW_CH2_ENABLE_MASK, HW_CH3_ENABLE_MASK, HW_CH4_ENABLE_MASK ; channels 4-7
|
||||
|
@ -207,7 +207,7 @@ Audio2_OverwriteChannelPointer: ; 219e6 (8:59e6)
|
||||
ret
|
||||
|
||||
INCLUDE "audio/sfx/pokeflute_ch1_ch2.asm"
|
||||
|
||||
|
||||
Audio2_InitMusicVariables:: ; 219f8 (8:59f8)
|
||||
xor a
|
||||
ld [wUnusedC000], a
|
||||
@ -407,7 +407,7 @@ Audio2_StopAllAudio:: ; 21b3f (8:5b3f)
|
||||
ld a, $ff
|
||||
ld [wStereoPanning], a
|
||||
ret
|
||||
|
||||
|
||||
FillAudioRAM2: ; 21b94 (8:5b94)
|
||||
ld b, d
|
||||
.loop
|
||||
|
@ -59,7 +59,7 @@ const_value set $0
|
||||
const SAFARI_BATTLE ; $2
|
||||
const HURRY_RUN_AWAY_BATTLE ; $3
|
||||
const STARTER_PIKACHU_BATTLE ; $4
|
||||
|
||||
|
||||
; text box IDs
|
||||
MESSAGE_BOX EQU $01
|
||||
FIELD_MOVE_MON_MENU EQU $04
|
||||
|
@ -1,5 +1,5 @@
|
||||
; Starter Pikachu emotion commands constants
|
||||
|
||||
|
||||
const_value = 0
|
||||
const PIKAEMOTION_DUMMY1
|
||||
const PIKAEMOTION_PRINTTEXT
|
||||
@ -12,7 +12,7 @@ const_value = 0
|
||||
const PIKAEMOTION_DUMMY2
|
||||
const PIKAEMOTION_9
|
||||
const PIKAEMOTION_DUMMY3
|
||||
|
||||
|
||||
const_value = 0
|
||||
const PIKAEMOTION_SUBCMD_LOADEXTRAPIKASPRITES
|
||||
const PIKAEMOTION_SUBCMD_LOADFONT
|
||||
|
@ -1,5 +1,5 @@
|
||||
const_value = 0
|
||||
|
||||
|
||||
const OVERWORLD ; 0
|
||||
const REDS_HOUSE_1 ; 1
|
||||
const MART ; 2
|
||||
|
@ -13,12 +13,12 @@ SpriteFacingAndAnimationTable: ; 4000 (1:4000)
|
||||
dw SpriteFacingLeftAndWalking ; facing left, walk animation frame 1
|
||||
dw SpriteFacingLeftAndStanding ; facing left, walk animation frame 2
|
||||
dw SpriteFacingLeftAndWalking ; facing left, walk animation frame 3
|
||||
|
||||
|
||||
dw SpriteFacingRightAndStanding ; facing right, walk animation frame 0
|
||||
dw SpriteFacingRightAndWalking ; facing right, walk animation frame 1
|
||||
dw SpriteFacingRightAndStanding ; facing right, walk animation frame 2
|
||||
dw SpriteFacingRightAndWalking ; facing right, walk animation frame 3
|
||||
|
||||
|
||||
dw SpriteFacingDownAndStanding ; ---
|
||||
dw SpriteFacingDownAndStanding ; This table is used for sprites $a and $b.
|
||||
dw SpriteFacingDownAndStanding ; All orientation and animation parameters
|
||||
@ -69,7 +69,7 @@ SpriteFacingUpAndStanding: ; 4075 (1:4075)
|
||||
db $00,$08,$05,$00 ; top right
|
||||
db $08,$00,$06,OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08,$08,$07,OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
|
||||
|
||||
SpriteFacingUpAndWalking: ; 4086 (1:4086)
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
@ -85,7 +85,7 @@ SpriteFacingUpAndWalking2: ; 4097 (1:4097)
|
||||
db $00,$00,$85,OAMFLAG_VFLIPPED ; top right
|
||||
db $08,$08,$86,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08,$00,$87,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
|
||||
|
||||
SpriteFacingLeftAndStanding: ; 40a8 (1:40a8)
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
@ -109,7 +109,7 @@ SpriteFacingRightAndStanding: ; 40ca (1:40ca)
|
||||
db $00,$00,$09,OAMFLAG_VFLIPPED ; top right
|
||||
db $08,$08,$0a,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08,$00,$0b,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
|
||||
|
||||
SpriteFacingRightAndWalking: ; 40db (1:40db)
|
||||
db $04
|
||||
; Sprite OAM Parameters
|
||||
@ -117,14 +117,14 @@ SpriteFacingRightAndWalking: ; 40db (1:40db)
|
||||
db $00,$00,$89,OAMFLAG_VFLIPPED ; top right
|
||||
db $08,$08,$8a,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED ; bottom left
|
||||
db $08,$00,$8b,OAMFLAG_VFLIPPED | OAMFLAG_CANBEMASKED | OAMFLAG_ENDOFDATA ; bottom right
|
||||
|
||||
|
||||
SpriteSpecialCase ; 40ec (1:40ec)
|
||||
db $09
|
||||
; Sprite OAM Parameters
|
||||
db -$4,-$4,$00,$00
|
||||
db -$4,$04,$01,$00
|
||||
db -$4,$0c,$00,OAMFLAG_VFLIPPED
|
||||
db $04,-$4,$01,$00
|
||||
db -$4,-$4,$00,$00
|
||||
db -$4,$04,$01,$00
|
||||
db -$4,$0c,$00,OAMFLAG_VFLIPPED
|
||||
db $04,-$4,$01,$00
|
||||
db $04,$04,$02,$00
|
||||
db $04,$0c,$01,$00
|
||||
db $0c,-$4,$00,OAM_VFLIP | OAMFLAG_CANBEMASKED
|
||||
|
@ -1,7 +1,7 @@
|
||||
; data for default hidden/shown
|
||||
; objects for each map ($00-$F8)
|
||||
|
||||
; Table of 2-Byte pointers, one pointer per map,
|
||||
; Table of 2-Byte pointers, one pointer per map,
|
||||
; goes up to Map_F7, ends with $FFFF.
|
||||
; points to table listing all missable object in the area
|
||||
MapHSPointers: ; c69b (3:469b)
|
||||
@ -589,5 +589,5 @@ MapHS27Copy: ; cb56 (3:4b56)
|
||||
db BLUES_HOUSE, $01, Show
|
||||
db BLUES_HOUSE, $02, Hide
|
||||
db BLUES_HOUSE, $03, Show
|
||||
|
||||
|
||||
db $FF, $01, Show
|
@ -8,7 +8,7 @@ Route19Object: ; 0x54e9a (size=87)
|
||||
db $b,$b,$b
|
||||
|
||||
db $a ; objects
|
||||
|
||||
|
||||
object SPRITE_BLACK_HAIR_BOY_1, $09, $07, STAY, RIGHT, $1, OPP_SWIMMER, $2
|
||||
object SPRITE_BLACK_HAIR_BOY_1, $0c, $09, STAY, LEFT, $2, OPP_SWIMMER, $3
|
||||
object SPRITE_SWIMMER, $0d, $19, STAY, LEFT, $3, OPP_SWIMMER, $4
|
||||
|
@ -118,41 +118,41 @@ UnknownPacket_72751: ; 72751 (1c:6751)
|
||||
|
||||
PalPacket_Empty: ; 72761 (1c:6761)
|
||||
PAL_SET 0, 0, 0, 0
|
||||
|
||||
|
||||
PalPacket_PartyMenu: ; 72771 (1c:6771)
|
||||
PAL_SET PAL_MEWMON, PAL_GREENBAR, PAL_YELLOWBAR, PAL_REDBAR
|
||||
|
||||
|
||||
PalPacket_Black: ; 72781 (1c:6781)
|
||||
PAL_SET PAL_BLACK, PAL_BLACK, PAL_BLACK, PAL_BLACK
|
||||
|
||||
|
||||
PalPacket_TownMap: ; 72791 (1c:6791)
|
||||
PAL_SET PAL_TOWNMAP, 0, 0, 0
|
||||
|
||||
|
||||
PalPacket_Pokedex: ; 727a1 (1c:67a1)
|
||||
PAL_SET PAL_BROWNMON, 0, 0, 0
|
||||
|
||||
|
||||
PalPacket_Slots: ; 727b1 (1c:67b1)
|
||||
PAL_SET PAL_SLOTS1, PAL_SLOTS2, PAL_SLOTS3, PAL_SLOTS4
|
||||
|
||||
|
||||
PalPacket_Titlescreen: ; 727c1 (1c:67c1)
|
||||
PAL_SET PAL_LOGO2, PAL_LOGO1, PAL_MEWMON, PAL_PURPLEMON
|
||||
|
||||
|
||||
PalPacket_TrainerCard: ; 727d1 (1c:67d1)
|
||||
PAL_SET PAL_MEWMON, PAL_BADGE, PAL_REDMON, PAL_YELLOWMON
|
||||
|
||||
|
||||
PalPacket_Generic: ; 727e1 (1c:67e1)
|
||||
PAL_SET PAL_MEWMON, 0, 0, 0
|
||||
|
||||
|
||||
PalPacket_NidorinoIntro: ; 727f1 (1c:67f1)
|
||||
PAL_SET PAL_PURPLEMON, PAL_BLACK, 0, 0
|
||||
|
||||
|
||||
PalPacket_GameFreakIntro: ; 72801 (1c:6801)
|
||||
PAL_SET PAL_GAMEFREAK, PAL_REDMON, PAL_VIRIDIAN, PAL_BLUEMON
|
||||
|
||||
|
||||
UnknownPalPacket_72811: ; 72811 (1c:6811)
|
||||
db $51,$25,$0,$25,$0,$25,$0,$25,$0,$0,$0,$0,$0,$0,$0,$0
|
||||
|
||||
UnknownPalPacket_72821: ; 72821 (1c:6821)
|
||||
|
||||
UnknownPalPacket_72821: ; 72821 (1c:6821)
|
||||
db $51,$25,$0,$27,$0,$25,$0,$25,$0,$0,$0,$0,$0,$0,$0,$0
|
||||
|
||||
PalTrnPacket: ; 72831 (1c:6831)
|
||||
|
@ -494,52 +494,52 @@ SpriteSheetPointerTable: ; 142a9 (5:42a9)
|
||||
dw PikachuSprite
|
||||
db $c0
|
||||
db BANK(PikachuSprite)
|
||||
|
||||
|
||||
; SPRITE_OFFICER_JENNY
|
||||
dw OfficerJennySprite
|
||||
db $c0
|
||||
db BANK(OfficerJennySprite)
|
||||
|
||||
|
||||
; SPRITE_SANDSHREW
|
||||
dw SandshrewSprite
|
||||
db $c0
|
||||
db BANK(SandshrewSprite)
|
||||
|
||||
|
||||
; SPRITE_ODDISH
|
||||
dw OddishSprite
|
||||
db $c0
|
||||
db BANK(OddishSprite)
|
||||
|
||||
|
||||
; SPRITE_BULBASAUR
|
||||
dw BulbasaurSprite
|
||||
db $c0
|
||||
db BANK(BulbasaurSprite)
|
||||
|
||||
|
||||
; SPRITE_JIGGLYPUFF
|
||||
dw JigglypuffSprite
|
||||
db $c0
|
||||
db BANK(JigglypuffSprite)
|
||||
|
||||
|
||||
; SPRITE_CLEFAIRY_2
|
||||
dw Clefairy2Sprite
|
||||
db $c0
|
||||
db BANK(Clefairy2Sprite)
|
||||
|
||||
|
||||
; SPRITE_CHANSEY
|
||||
dw ChanseySprite
|
||||
db $c0
|
||||
db BANK(ChanseySprite)
|
||||
|
||||
|
||||
; SPRITE_JESSIE
|
||||
dw JessieSprite
|
||||
db $c0
|
||||
db BANK(JessieSprite)
|
||||
|
||||
|
||||
; SPRITE_JAMES
|
||||
dw JamesSprite
|
||||
db $c0
|
||||
db BANK(JamesSprite)
|
||||
|
||||
|
||||
; SPRITE_BALL
|
||||
dw BallSprite
|
||||
db $40 ; byte count
|
||||
|
@ -1,6 +1,6 @@
|
||||
Tilesets: ; c558 (3:4558)
|
||||
; dr $c558,$c684
|
||||
|
||||
|
||||
tileset Overworld_Block, Overworld_GFX, Overworld_Coll, $FF,$FF,$FF, $52, OUTDOOR
|
||||
tileset RedsHouse1_Block, RedsHouse1_GFX, RedsHouse1_Coll, $FF,$FF,$FF, $FF, INDOOR
|
||||
tileset Mart_Block, Mart_GFX, Mart_Coll, $18,$19,$1E, $FF, INDOOR
|
||||
|
@ -14,5 +14,5 @@ EvilTrainerList:: ; 33c8 (0:33c8)
|
||||
db OPP_SCIENTIST
|
||||
db OPP_GIOVANNI
|
||||
db OPP_ROCKET
|
||||
|
||||
|
||||
db $ff
|
||||
|
@ -24,7 +24,7 @@ WarpTileIDPointers: ; c215 (3:4215)
|
||||
dw FacilityWarpTileIDs
|
||||
dw PlateauWarpTileIDs
|
||||
dw BeachHouseWarpTileIDs
|
||||
|
||||
|
||||
OverworldWarpTileIDs: ; c247 (3:4247)
|
||||
db $1B,$58,$FF
|
||||
|
||||
|
@ -1683,7 +1683,7 @@ Func_f8b7a:
|
||||
|
||||
Tilemap_f8b8d:
|
||||
db $2b,$2c,$25,$28,$2d
|
||||
|
||||
|
||||
Func_f8b92:
|
||||
ld hl, wd496
|
||||
ld a, [wc5dd]
|
||||
|
@ -573,7 +573,7 @@ SetAnimationPalette: ; 78e5c (1e:4e5c)
|
||||
call UpdateGBCPal_OBP0
|
||||
call UpdateGBCPal_OBP1
|
||||
ret
|
||||
|
||||
|
||||
Func_78e98: ; 78e98 (1e:4e98)
|
||||
call SaveScreenTilesToBuffer2
|
||||
xor a
|
||||
@ -586,14 +586,14 @@ Func_78e98: ; 78e98 (1e:4e98)
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call LoadScreenTilesFromBuffer2
|
||||
ld h, vBGMap1 / $100
|
||||
|
||||
|
||||
WriteLowerByteOfBGMapAndEnableBGTransfer: ; 78eb1 (1e:4eb1)
|
||||
ld l, vBGMap0 & $ff
|
||||
call BattleAnimCopyTileMapToVRAM
|
||||
ld a, $1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
ret
|
||||
|
||||
|
||||
PlaySubanimation: ; 78ebb (1e:4ebb)
|
||||
ld a,[wAnimSoundID]
|
||||
cp a,$FF
|
||||
@ -1207,7 +1207,7 @@ FlashScreenLongDelay: ; 79216 (1e:5216)
|
||||
ld c,1
|
||||
.delayFrames
|
||||
jp DelayFrames
|
||||
|
||||
|
||||
AnimationFlashScreen: ; 7922c (1e:522c)
|
||||
ld a,[rBGP]
|
||||
push af ; save initial palette
|
||||
@ -1273,14 +1273,14 @@ SetAnimationBGPalette: ; 79273 (1e:5273)
|
||||
ret
|
||||
|
||||
ld b, $5
|
||||
|
||||
|
||||
AnimationShakeScreenVertically: ; 79283 (1e:5283)
|
||||
predef_jump PredefShakeScreenVertically
|
||||
|
||||
AnimationShakeScreen: ; 79288 (1e:5288)
|
||||
; Shakes the screen for a while. Used in Earthquake/Fissure/etc. animations.
|
||||
ld b, $8
|
||||
|
||||
|
||||
AnimationShakeScreenHorizontallyFast: ; 7928a (1e:528a)
|
||||
predef_jump PredefShakeScreenHorizontally
|
||||
|
||||
@ -1384,19 +1384,19 @@ AnimationSlideMonDown: ; 79331 (1e:5331)
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
AnimationSlideMonOff: ; 79349 (1e:5349)
|
||||
; Slides the mon's sprite off the screen horizontally.
|
||||
ld e, 8
|
||||
ld a, 3
|
||||
ld [wSlideMonDelay], a
|
||||
jp _AnimationSlideMonOff
|
||||
|
||||
|
||||
AnimationSlideEnemyMonOff: ; 79353 (1e:5353)
|
||||
; Slides the enemy mon off the screen horizontally.
|
||||
ld hl, AnimationSlideMonOff
|
||||
jp CallWithTurnFlipped
|
||||
|
||||
|
||||
_AnimationSlideMonUp: ; 79359 (1e:5359)
|
||||
push de
|
||||
push hl
|
||||
@ -1553,7 +1553,7 @@ AdjustOAMBlockYPos2: ; 7940d (1e:540d)
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
AnimationBlinkEnemyMon: ; 79421 (1e:5421)
|
||||
; Make the enemy mon's sprite blink on and off for a second or two
|
||||
ld hl, AnimationBlinkMon
|
||||
@ -1933,7 +1933,7 @@ UpwardBallsAnimXCoordinatesEnemyTurn: ; 79667 (1e:5667)
|
||||
; AnimationShootManyBallsUpward animation. It's unused in the game.
|
||||
db $60, $90, $78, $68, $88, $80
|
||||
db $FF ; list terminator
|
||||
|
||||
|
||||
AnimationMinimizeMon: ; 7966e (1e:566e)
|
||||
; Changes the mon's sprite to a mini black sprite. Used by the
|
||||
; Minimize animation.
|
||||
@ -1961,7 +1961,7 @@ AnimationMinimizeMon: ; 7966e (1e:566e)
|
||||
MinimizedMonSprite: ; 79693 (1e:5693)
|
||||
INCBIN "gfx/minimized_mon_sprite.1bpp"
|
||||
MinimizedMonSpriteEnd:
|
||||
|
||||
|
||||
AnimationSlideMonDownAndHide: ; 79698 (1e:5698)
|
||||
; Slides the mon's sprite down and disappears. Used in Acid Armor.
|
||||
ld a, $1
|
||||
@ -1971,7 +1971,7 @@ AnimationSlideMonDownAndHide: ; 79698 (1e:5698)
|
||||
push af
|
||||
call AnimationHideMonPic
|
||||
pop af
|
||||
push af
|
||||
push af
|
||||
call GetTileIDList
|
||||
call GetMonSpriteTileMapPointerFromRowCount
|
||||
call CopyPicTiles
|
||||
@ -2138,7 +2138,7 @@ WavyScreenLineOffsets: ; 7978e (1e:578e)
|
||||
db 0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1
|
||||
db 0, 0, 0, 0, 0, -1, -1, -1, -2, -2, -2, -2, -2, -1, -1, -1
|
||||
db $80 ; terminator
|
||||
|
||||
|
||||
AnimationSubstitute: ; 797af (1e:57af)
|
||||
; Changes the pokemon's sprite to the mini sprite
|
||||
ld hl, wTempPic
|
||||
@ -2182,7 +2182,7 @@ CopySlowbroSpriteData: ; 7980e (1e:580e)
|
||||
ld bc, $0010
|
||||
ld a, BANK(SlowbroSprite)
|
||||
jp FarCopyData
|
||||
|
||||
|
||||
HideSubstituteShowMonAnim: ; 79816 (1e:5816)
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
@ -2291,7 +2291,7 @@ AnimationTransformMon: ; 798c8 (1e:58c8)
|
||||
ld [wChangeMonPicPlayerTurnSpecies], a
|
||||
ld a, [wBattleMonSpecies]
|
||||
ld [wChangeMonPicEnemyTurnSpecies], a
|
||||
|
||||
|
||||
ChangeMonPic: ; 798d4 (1e:58d4)
|
||||
ld a, [H_WHOSETURN]
|
||||
and a
|
||||
@ -2332,7 +2332,7 @@ AnimationHideEnemyMonPic: ; 79919 (1e:5919)
|
||||
ld a, $1
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
jp Delay3
|
||||
|
||||
|
||||
Func_79929: ; 79929 (1e:5929)
|
||||
ld hl, wPlayerMonMinimized
|
||||
ld a, [H_WHOSETURN]
|
||||
@ -2349,7 +2349,7 @@ Func_79929: ; 79929 (1e:5929)
|
||||
call AnimationFlashMonPic
|
||||
call AnimationShowMonPic
|
||||
ret
|
||||
|
||||
|
||||
InitMultipleObjectsOAM: ; 79943 (1e:5943)
|
||||
; Writes c OAM entries with tile d.
|
||||
; Sets their Y coordinates to sequential multiples of 8, starting from 0.
|
||||
@ -2370,9 +2370,9 @@ InitMultipleObjectsOAM: ; 79943 (1e:5943)
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
ret ; unreferenced
|
||||
|
||||
|
||||
AnimationHideMonPic: ; 7995d (1e:595d)
|
||||
; Hides the mon's sprite.
|
||||
ld a, [H_WHOSETURN]
|
||||
@ -2382,7 +2382,7 @@ AnimationHideMonPic: ; 7995d (1e:595d)
|
||||
jr ClearMonPicFromTileMap
|
||||
.playerTurn
|
||||
ld a, 5 * SCREEN_WIDTH + 1
|
||||
|
||||
|
||||
ClearMonPicFromTileMap: ; 79968 (1e:5968)
|
||||
push hl
|
||||
push de
|
||||
@ -2397,7 +2397,7 @@ ClearMonPicFromTileMap: ; 79968 (1e:5968)
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
; puts the tile map destination address of a mon sprite in hl, given the row count in b
|
||||
; The usual row count is 7, but it may be smaller when sliding a mon sprite in/out,
|
||||
; in order to show only a portion of the mon sprite.
|
||||
@ -2473,7 +2473,7 @@ AnimCopyRowRight: ; 799be (1e:59be)
|
||||
jr nz, AnimCopyRowRight
|
||||
ret
|
||||
|
||||
; get the sound of the move id in b
|
||||
; get the sound of the move id in b
|
||||
GetMoveSoundB: ; 799c5 (1e:59c5)
|
||||
ld a, b
|
||||
call GetMoveSound
|
||||
@ -2859,7 +2859,7 @@ AnimationLeavesFalling: ; 79dd0 (1e:5dd0)
|
||||
ld a, 3 ; number of leaves
|
||||
ld [wNumFallingObjects], a
|
||||
jp AnimationFallingObjects
|
||||
|
||||
|
||||
AnimationPetalsFalling: ; 79de2 (1e:5de2)
|
||||
; Makes lots of petals fall down from the top of the screen. It's used in
|
||||
; the animation for Petal Dance.
|
||||
@ -3153,7 +3153,7 @@ BattleAnimCopyTileMapToVRAM: ; 79fae (1e:5fae)
|
||||
ld a, l
|
||||
ld [H_AUTOBGTRANSFERDEST], a
|
||||
jp Delay3
|
||||
|
||||
|
||||
TossBallAnimation: ; 79fb7 (1e:5fb7)
|
||||
ld a,[wIsInBattle]
|
||||
cp a,2
|
||||
@ -3210,7 +3210,7 @@ TossBallAnimation: ; 79fb7 (1e:5fb7)
|
||||
ld a,BLOCKBALL_ANIM
|
||||
ld [wAnimationID],a
|
||||
jp PlayAnimation
|
||||
|
||||
|
||||
PlayApplyingAttackSound: ; 7a00b (1e:600b)
|
||||
; play a different sound depending if move is not very effective, neutral, or super-effective
|
||||
; don't play any sound at all if move is ineffective
|
||||
|
@ -166,7 +166,7 @@ _LoadTrainerPic: ; f615a (3d:615a)
|
||||
ld a, $77
|
||||
ld c, a
|
||||
jp LoadUncompressedSpriteData
|
||||
|
||||
|
||||
LoadMonBackPic: ; f6178 (3d:6178)
|
||||
; Assumes the monster's attributes have
|
||||
; been loaded with GetMonHeader.
|
||||
@ -186,7 +186,7 @@ LoadMonBackPic: ; f6178 (3d:6178)
|
||||
ld a, [H_LOADEDROMBANK]
|
||||
ld b, a
|
||||
jp CopyVideoData
|
||||
|
||||
|
||||
AnimateSendingOutMon: ; f61a6 (3d:f61a6)
|
||||
ld a, [wPredefRegisters]
|
||||
ld h, a
|
||||
@ -256,7 +256,7 @@ CopyUncompressedPicToHL: ; f6203 (3d:6203)
|
||||
dec b
|
||||
jr nz, .asm_f6211
|
||||
ret
|
||||
|
||||
|
||||
.asm_f6220
|
||||
push bc
|
||||
ld b, $0
|
||||
@ -279,7 +279,7 @@ CopyUncompressedPicToHL: ; f6203 (3d:6203)
|
||||
dec b
|
||||
jr nz, .asm_f6227
|
||||
ret
|
||||
|
||||
|
||||
INCLUDE "engine/battle/init_battle_variables.asm"
|
||||
INCLUDE "engine/battle/moveEffects/focus_energy_effect.asm"
|
||||
INCLUDE "engine/battle/moveEffects/heal_effect.asm"
|
||||
|
@ -142,7 +142,7 @@ PrintSendOutMonMessage: ; f40e0 (3d:40e5)
|
||||
ld a, [H_QUOTIENT + 3] ; a = (enemy mon current HP * 25) / (enemy max HP / 4); this approximates the current percentage of max HP
|
||||
ld hl, GoText ; 70% or greater
|
||||
cp 70
|
||||
jr nc, .printText
|
||||
jr nc, .printText
|
||||
ld hl, DoItText ; 40% - 69%
|
||||
cp 40
|
||||
jr nc, .printText
|
||||
|
@ -565,7 +565,7 @@ MainInBattleLoop: ; 3c249 (f:4249)
|
||||
call DrawHUDsAndHPBars
|
||||
call CheckNumAttacksLeft
|
||||
jp MainInBattleLoop
|
||||
|
||||
|
||||
HandlePoisonBurnLeechSeed: ; 3c3d3 (f:43d3)
|
||||
ld hl, wBattleMonHP
|
||||
ld de, wBattleMonStatus
|
||||
@ -1162,7 +1162,7 @@ RemoveFaintedPlayerMon: ; 3c75e (f:475e)
|
||||
sub b ; enemylevel - playerlevel
|
||||
; are we stronger than the opposing pokemon?
|
||||
jr c, .regularFaint ; if so, deduct happiness regularly
|
||||
|
||||
|
||||
cp 30 ; is the enemy 30 levels greater than us?
|
||||
jr nc, .carelessTrainer ; if so, punish the player for being careless, as they shouldn't be fighting a very high leveled trainer with such a level difference
|
||||
.regularFaint
|
||||
@ -1171,7 +1171,7 @@ RemoveFaintedPlayerMon: ; 3c75e (f:475e)
|
||||
.carelessTrainer
|
||||
callabd_ModifyPikachuHappiness PIKAHAPPY_CARELESSTRAINER
|
||||
ret
|
||||
|
||||
|
||||
PlayerMonFaintedText: ; 3c7fa (f:47fa)
|
||||
TX_FAR _PlayerMonFaintedText
|
||||
db "@"
|
||||
@ -2350,11 +2350,11 @@ DisplayBattleMenu: ; 3cf78 (f:4f78)
|
||||
.RunAwayText ; 3d0df (f:50df)
|
||||
TX_FAR _RunAwayText
|
||||
db "@"
|
||||
|
||||
|
||||
.upperLeftMenuItemWasNotSelected ; a menu item other than the upper left item was selected
|
||||
cp $2
|
||||
jp nz, PartyMenuOrRockOrRun
|
||||
|
||||
|
||||
; either the bag (normal battle) or bait (safari battle) was selected
|
||||
ld a, [wLinkState]
|
||||
cp LINK_STATE_BATTLING
|
||||
@ -2911,7 +2911,7 @@ Func_3d4f5: ; 3d4f5 (f:54f5)
|
||||
predef MoveAnimation
|
||||
callab Func_78e98
|
||||
jp MoveSelectionMenu
|
||||
|
||||
|
||||
Func_3d523: ; 3d523 (f:5523)
|
||||
ld a, [wTestBattlePlayerSelectedMove]
|
||||
dec a
|
||||
@ -2977,7 +2977,7 @@ AnyMoveToSelect: ; 3d55f (f:555f)
|
||||
.allMovesChecked
|
||||
; bugfix: only check PP value and not PP up bits
|
||||
; in case all other moves have no PP left and a move has a PP up used on it
|
||||
; and a non-PP up move is disabled
|
||||
; and a non-PP up move is disabled
|
||||
and $3f ; any PP left?
|
||||
ret nz ; return if a move has PP left
|
||||
.noMovesLeft
|
||||
@ -4150,7 +4150,7 @@ UnaffectedText: ; 3ddbe (f:5dbe)
|
||||
PrintDoesntAffectText: ; 3ddc3 (f:5dc3)
|
||||
ld hl, DoesntAffectMonText
|
||||
jp PrintText
|
||||
|
||||
|
||||
DoesntAffectMonText: ; 3ddc9 (f:5dc9)
|
||||
TX_FAR _DoesntAffectMonText
|
||||
db "@"
|
||||
@ -5554,7 +5554,7 @@ AdjustDamageForMoveType: ; 3e517 (f:6517)
|
||||
jp .loop
|
||||
.done
|
||||
ret
|
||||
|
||||
|
||||
AIGetTypeEffectiveness: ; 3e5bb (f:65bb)
|
||||
ld a,[wEnemyMoveType]
|
||||
ld d,a ; d = type of enemy move
|
||||
|
@ -1,5 +1,5 @@
|
||||
OneHitKOEffect_: ; f64db (3d:64db)
|
||||
ld hl, wDamage
|
||||
ld hl, wDamage
|
||||
xor a
|
||||
ld [hli], a
|
||||
ld [hl], a ; set the damage output to zero
|
||||
|
@ -7,7 +7,7 @@ ScaleSpriteByTwo: ; 2fd79 (b:7d79)
|
||||
call ScaleSpriteByTwo_
|
||||
call PrepareRTCDataAndDisableSRAM
|
||||
ret
|
||||
|
||||
|
||||
ScaleSpriteByTwo_: ; 2fd85 (b:7d85)
|
||||
ld de, S_SPRITEBUFFER1 + (4*4*8) - 5 ; last byte of input data, last 4 rows already skipped
|
||||
ld hl, S_SPRITEBUFFER0 + SPRITEBUFFERSIZE - 1 ; end of destination buffer
|
||||
|
@ -34,7 +34,7 @@ LoadBGMapAttributes:: ; bf450 (2f:7450)
|
||||
ld [rHDMA3], a
|
||||
ld a, e
|
||||
ld [rHDMA4], a
|
||||
|
||||
|
||||
ld a, [rLCDC]
|
||||
and rLCDC_ENABLE_MASK ; is LCD off?
|
||||
jr z, .lcdOff ; if off, transfer immediately
|
||||
@ -47,7 +47,7 @@ LoadBGMapAttributes:: ; bf450 (2f:7450)
|
||||
ld a, [rSTAT]
|
||||
and %10 ; are we in HBlank or VBlank?
|
||||
jr nz, .waitForAccessibleVRAMLoop1 ; loop until we're in a safe period to transfer to VRAM
|
||||
.lcdOff
|
||||
.lcdOff
|
||||
ld a, c ; number of BG attributes to transfer, plus 1 times 16
|
||||
ld [rHDMA5], a ; initiate transfer
|
||||
call Func_3082 ; update audio so it doesn't "lag"
|
||||
@ -104,7 +104,7 @@ LoadBGMapAttributes:: ; bf450 (2f:7450)
|
||||
ld [rVBK], a
|
||||
ei
|
||||
ret
|
||||
|
||||
|
||||
BGMapAttributesPointers: ; bf4de (2f:74de)
|
||||
dw BGMapAttributes_Unknown1
|
||||
dw BGMapAttributes_Unknown2
|
||||
@ -121,7 +121,7 @@ BGMapAttributesPointers: ; bf4de (2f:74de)
|
||||
dw BGMapAttributes_Unknown13
|
||||
|
||||
HandleBadgeFaceAttributes: ; bf4f8 (2f:74f8)
|
||||
; zero out the attributes if the player doesn't have the respective badge
|
||||
; zero out the attributes if the player doesn't have the respective badge
|
||||
; BOULDERBADGE
|
||||
ld hl, vBGMap1 + $183
|
||||
ld de, wTrainerCardBadgeAttributes + 6 * 0
|
||||
@ -174,7 +174,7 @@ HandleBadgeFaceAttributes: ; bf4f8 (2f:74f8)
|
||||
|
||||
ZeroOutCurrentBadgeAttributes: ; bf551 (2f:7551)
|
||||
push hl
|
||||
xor a
|
||||
xor a
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ld bc, $1f
|
||||
@ -202,16 +202,16 @@ HandlePartyHPBarAttributes: ; bf55d (2f:755d)
|
||||
ld bc, $40 ; get 2nd party location
|
||||
add hl, bc
|
||||
push hl
|
||||
|
||||
|
||||
push de ; (inefficiently) copy de to hl
|
||||
pop hl
|
||||
|
||||
|
||||
ld bc, $6
|
||||
add hl, bc ; get the next palette
|
||||
|
||||
|
||||
push hl
|
||||
pop de ; copy back to de
|
||||
|
||||
|
||||
pop hl
|
||||
pop bc
|
||||
dec c
|
||||
|
@ -978,7 +978,7 @@ CableClub_DrawHorizontalLine: ; 5b94 (1:5b94)
|
||||
dec d
|
||||
jr nz, .drawHorizontalLineLoop
|
||||
ret
|
||||
|
||||
|
||||
LoadTrainerInfoTextBoxTiles: ; 5b9a (1:5b9a)
|
||||
ld de, TrainerInfoTextBoxTileGraphics
|
||||
ld hl, vChars2 + $760
|
||||
|
@ -115,6 +115,6 @@ DrawBadges: ; e880 (3:6880)
|
||||
|
||||
.FaceBadgeTiles
|
||||
db $20, $28, $30, $38, $40, $48, $50, $58
|
||||
|
||||
|
||||
GymLeaderFaceAndBadgeTileGraphics: ; e91b (3:691b)
|
||||
INCBIN "gfx/badges.2bpp"
|
@ -99,7 +99,7 @@ Evolution_PartyMonLoop: ; 3add8 (e:6dd8)
|
||||
and a
|
||||
ld a, [hli]
|
||||
jp nz, .nextEvoEntry1 ; don't evolve if we're in a battle as wcf91 could be holding the last mon sent out
|
||||
|
||||
|
||||
ld b, a ; evolution item
|
||||
ld a, [wcf91] ; last item used
|
||||
cp b ; was the evolution item in this entry used?
|
||||
@ -387,16 +387,16 @@ Func_3b079: ; 3b079 (e:7079)
|
||||
push af
|
||||
call Func_3b0a2
|
||||
jr c, .asm_3b09c
|
||||
|
||||
|
||||
call Func_3b10f
|
||||
jr nc, .asm_3b096
|
||||
|
||||
|
||||
call Func_3b0a2
|
||||
jr c, .asm_3b09c
|
||||
|
||||
|
||||
call Func_3b10f
|
||||
jr nc, .asm_3b096
|
||||
|
||||
|
||||
call Func_3b0a2
|
||||
jr c, .asm_3b09c
|
||||
.asm_3b096
|
||||
@ -452,7 +452,7 @@ Func_3b0a2: ; 3b0a2 (e:70a2)
|
||||
.asm_3b0ec
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Pointer_3b0ee: ; 3b0ee (e:70ee)
|
||||
db NIDOKING
|
||||
db IVYSAUR
|
||||
@ -487,7 +487,7 @@ Pointer_3b0ee: ; 3b0ee (e:70ee)
|
||||
db VILEPLUME
|
||||
db VICTREEBEL
|
||||
db $ff
|
||||
|
||||
|
||||
Func_3b10f: ; 3b10f (e:710f)
|
||||
ld c, $0
|
||||
.asm_3b111
|
||||
@ -665,5 +665,5 @@ GetMonLearnset: ; 3b1d1 (e:71d1)
|
||||
and a ; have we reached the end of the evolution data?
|
||||
jr nz, .skipEvolutionDataLoop ; if not, jump back up
|
||||
ret
|
||||
|
||||
|
||||
INCLUDE "data/evos_moves.asm"
|
||||
|
@ -70,7 +70,7 @@ AnimateShootingStar: ; 7004a (1c:404a)
|
||||
add hl, de
|
||||
dec c
|
||||
jr nz, .clearOAMLoop
|
||||
|
||||
|
||||
; Make Gamefreak logo flash.
|
||||
ld b, 3
|
||||
.flashLogoLoop
|
||||
@ -95,7 +95,7 @@ AnimateShootingStar: ; 7004a (1c:404a)
|
||||
pop af
|
||||
dec a
|
||||
jr nz, .initSmallStarsOAMLoop
|
||||
|
||||
|
||||
; Animate the small stars falling from the Gamefreak logo.
|
||||
xor a
|
||||
ld [wMoveDownSmallStarsOAMCount], a ; wWhichTrade
|
||||
|
@ -72,7 +72,7 @@ SetPokedexOwnedFlag: ; f676c (3d:676c)
|
||||
|
||||
UnknownTerminator_f6794: ; f6794 (3d:6794)
|
||||
db "@"
|
||||
|
||||
|
||||
GotMonText: ; f6795 (3d:6795)
|
||||
TX_FAR _GotMonText
|
||||
db $0b
|
||||
|
@ -166,12 +166,12 @@ HoFDisplayAndRecordMonInfo: ; 7030e (1c:430e)
|
||||
call PlayCry
|
||||
.asm_7033c
|
||||
jp HoFRecordMonInfo
|
||||
|
||||
|
||||
Func_7033f: ; 7033f (1c:433f)
|
||||
call HoFDisplayMonInfo
|
||||
ld a,[wHoFMonSpecies]
|
||||
jp PlayCry
|
||||
|
||||
|
||||
HoFDisplayMonInfo: ; 70348 (1c:4348)
|
||||
coord hl, 0, 2
|
||||
lb bc, 9, 10
|
||||
|
@ -161,7 +161,7 @@ CinnabarGymQuiz: ; 1e3be (7:63be)
|
||||
CinnabarGymQuizDummyIntroText: ; 1e401 (7:6401)
|
||||
TX_FAR _CinnabarGymQuizDummyIntroText
|
||||
db "@"
|
||||
|
||||
|
||||
CinnabarGymQuizIntroText: ; 1e406 (7:6406)
|
||||
TX_FAR _CinnabarGymQuizIntroText
|
||||
db "@"
|
||||
@ -169,7 +169,7 @@ CinnabarGymQuizIntroText: ; 1e406 (7:6406)
|
||||
CinnabarGymQuizShortIntroText: ; 1e40b (7:640b)
|
||||
TX_FAR _CinnabarGymQuizShortIntroText
|
||||
db "@"
|
||||
|
||||
|
||||
CinnabarQuizQuestions: ; 1e410 (7:6410)
|
||||
dw CinnabarQuizQuestionsText1
|
||||
dw CinnabarQuizQuestionsText2
|
||||
@ -327,7 +327,7 @@ CinnabarGymGateCoords: ; 1e503 (7:6503)
|
||||
db $02,$06,$54,$00
|
||||
db $02,$03,$54,$00
|
||||
|
||||
|
||||
|
||||
CinnabarGym_ReplaceTileBlock: ; 1e51b (7:651b)
|
||||
; basically a copy of the first half of ReplaceTileBlock
|
||||
; before checking if it is necessary to redraw the map view
|
||||
|
@ -223,7 +223,7 @@ InGameTrade_FlagActionPredef: ; 71ded (1c:5ded)
|
||||
ld a,[wWhichTrade]
|
||||
ld c,a
|
||||
predef_jump FlagActionPredef
|
||||
|
||||
|
||||
InGameTrade_CheckForTradeEvo: ; 71df9 (1c:5df9)
|
||||
ld a,[wInGameTradeReceiveMonSpecies]
|
||||
cp KADABRA
|
||||
@ -235,7 +235,7 @@ InGameTrade_CheckForTradeEvo: ; 71df9 (1c:5df9)
|
||||
cp HAUNTER
|
||||
jr z,.tradeEvo
|
||||
ret
|
||||
|
||||
|
||||
.tradeEvo
|
||||
ld a,[wPartyCount]
|
||||
dec a
|
||||
@ -248,7 +248,7 @@ InGameTrade_CheckForTradeEvo: ; 71df9 (1c:5df9)
|
||||
xor a ; LINK_STATE_NONE
|
||||
ld [wLinkState],a
|
||||
jp PlayDefaultMusic
|
||||
|
||||
|
||||
InGameTrade_TrainerString: ; 71e2d (1c:5e2d)
|
||||
; "TRAINER@@@@@@@@@@"
|
||||
db $5d, "@@@@@@@@@@"
|
||||
|
@ -11,12 +11,12 @@ InitPlayerData2:
|
||||
|
||||
ld a, $ff
|
||||
ld [wUnusedD71B], a
|
||||
|
||||
|
||||
ld a, 90 ; initialize happiness to 90
|
||||
ld [wPikachuHappiness], a
|
||||
ld a, $80
|
||||
ld [wPikachuMood], a ; initialize mood
|
||||
|
||||
|
||||
ld hl, wPartyCount
|
||||
call InitializeEmptyList
|
||||
ld hl, wNumInBox
|
||||
|
@ -477,7 +477,7 @@ ItemUseBall: ; d3ad (3:53ad)
|
||||
jp RemoveItemFromInventory
|
||||
.emptyString
|
||||
db "@"
|
||||
|
||||
|
||||
ItemUseBallText00: ; d697 (3:5697)
|
||||
;"It dodged the thrown ball!"
|
||||
;"This pokemon can't be caught"
|
||||
@ -731,7 +731,7 @@ Func_d85d: ; d85d (3:585d)
|
||||
ld hl, wcd6d
|
||||
.loop
|
||||
ld a, [hli]
|
||||
and a
|
||||
and a
|
||||
jr z, .cannotEvolveWithUsedStone
|
||||
inc hl
|
||||
inc hl
|
||||
@ -902,7 +902,7 @@ ItemUseMedicine: ; d8ae (3:58ae)
|
||||
pop hl
|
||||
pop af
|
||||
ld [wWhichPokemon], a
|
||||
|
||||
|
||||
ld a,[wIsInBattle]
|
||||
and a
|
||||
jr z,.compareCurrentHPToMaxHP
|
||||
@ -1380,7 +1380,7 @@ ItemUseMedicine: ; d8ae (3:58ae)
|
||||
xor a ; PLAYER_PARTY_DATA
|
||||
ld [wMonDataLocation],a
|
||||
predef LearnMoveFromLevelUp ; learn level up move, if any
|
||||
|
||||
|
||||
xor a
|
||||
ld [wForceEvolution],a
|
||||
callabd_ModifyPikachuHappiness PIKAHAPPY_LEVELUP
|
||||
@ -1391,7 +1391,7 @@ ItemUseMedicine: ; d8ae (3:58ae)
|
||||
callab Func_2fd6a ; evolve pokemon, if appropriate
|
||||
pop af
|
||||
ld [wWhichPokemon],a
|
||||
|
||||
|
||||
callab TryEvolvingMon
|
||||
ld a,$01
|
||||
ld [wUpdateSpritesEnabled],a
|
||||
@ -1646,7 +1646,7 @@ ItemUseGuardSpec: ; df11 (3:5f11)
|
||||
ld a,[wIsInBattle]
|
||||
and a
|
||||
jp z,ItemUseNotTime
|
||||
|
||||
|
||||
ld a, [wWhichPokemon]
|
||||
push af
|
||||
ld a, [wPlayerMonNumber]
|
||||
@ -1654,7 +1654,7 @@ ItemUseGuardSpec: ; df11 (3:5f11)
|
||||
callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
|
||||
pop af
|
||||
ld [wWhichPokemon], a
|
||||
|
||||
|
||||
ld hl,wPlayerBattleStatus2
|
||||
set ProtectedByMist,[hl] ; Mist bit
|
||||
jp PrintItemUseTextAndRemoveItem
|
||||
@ -1671,7 +1671,7 @@ ItemUseDireHit: ; df42 (3:5f42)
|
||||
ld a,[wIsInBattle]
|
||||
and a
|
||||
jp z,ItemUseNotTime
|
||||
|
||||
|
||||
ld a, [wWhichPokemon]
|
||||
push af
|
||||
ld a, [wPlayerMonNumber]
|
||||
@ -1679,7 +1679,7 @@ ItemUseDireHit: ; df42 (3:5f42)
|
||||
callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
|
||||
pop af
|
||||
ld [wWhichPokemon], a
|
||||
|
||||
|
||||
ld hl,wPlayerBattleStatus2
|
||||
set GettingPumped,[hl] ; Focus Energy bit
|
||||
jp PrintItemUseTextAndRemoveItem
|
||||
@ -1710,7 +1710,7 @@ ItemUseXStat: ; df69 (3:df69)
|
||||
xor a
|
||||
ld [H_WHOSETURN],a ; set turn to player's turn
|
||||
callba StatModifierUpEffect ; do stat increase move
|
||||
|
||||
|
||||
ld a, [wWhichPokemon]
|
||||
push af
|
||||
ld a, [wPlayerMonNumber]
|
||||
@ -1718,7 +1718,7 @@ ItemUseXStat: ; df69 (3:df69)
|
||||
callabd_ModifyPikachuHappiness PIKAHAPPY_USEDXITEM
|
||||
pop af
|
||||
ld [wWhichPokemon], a
|
||||
|
||||
|
||||
pop hl
|
||||
pop af
|
||||
ld [hld],a ; restore [wPlayerMoveEffect]
|
||||
@ -1964,10 +1964,10 @@ ItemUseSuperRod: ; e130 (3:6130)
|
||||
xor a
|
||||
ld [wRodResponse], a
|
||||
jr DoNotGenerateFishingEncounter
|
||||
|
||||
|
||||
RodResponse: ; e15b (3:615b)
|
||||
ld [wRodResponse], a
|
||||
|
||||
|
||||
dec a ; is there a bite?
|
||||
jr nz, DoNotGenerateFishingEncounter
|
||||
; if yes, store level and species data
|
||||
@ -2367,7 +2367,7 @@ ItemUseTMHM: ; e374 (3:6374)
|
||||
ld a,b
|
||||
and a
|
||||
ret z
|
||||
|
||||
|
||||
ld a,[wWhichPokemon]
|
||||
push af
|
||||
ld a,d
|
||||
@ -2440,7 +2440,7 @@ Func_e4bf: ; e4bf (3:64bf)
|
||||
ld [wActionResultOrTookBattleTurn], a
|
||||
ld hl, DontHavePokemonText
|
||||
jp PrintText
|
||||
|
||||
|
||||
ThrowBallAtTrainerMon: ; e4ca (3:64ca)
|
||||
call RunDefaultPaletteCommand
|
||||
call LoadScreenTilesFromBuffer1 ; restore saved screen
|
||||
@ -2505,7 +2505,7 @@ BoxFullCannotThrowBallText: ; e522 (3:6522)
|
||||
DontHavePokemonText: ; e527 (3:6527)
|
||||
TX_FAR _DontHavePokemonText
|
||||
db "@"
|
||||
|
||||
|
||||
ItemUseText00: ; e52c (3:652c)
|
||||
TX_FAR _ItemUseText001
|
||||
db $05
|
||||
|
@ -25,7 +25,7 @@ CanLearnTM: ; 122f0 (4:62f0)
|
||||
pop hl
|
||||
ld c, 0
|
||||
ret
|
||||
|
||||
|
||||
; converts TM/HM number in wd11e into move number
|
||||
; HMs start at 51
|
||||
TMToMove: ; 1231d (4:631d)
|
||||
|
@ -16,7 +16,7 @@ LoadMonData_: ; 442b (1:442b)
|
||||
ld a, [wWhichPokemon]
|
||||
ld e, a
|
||||
call GetMonSpecies
|
||||
|
||||
|
||||
.GetMonHeader
|
||||
ld a, [wcf91]
|
||||
ld [wd0b5], a ; input for GetMonHeader
|
||||
@ -47,7 +47,7 @@ LoadMonData_: ; 442b (1:442b)
|
||||
ld de, wLoadedMon
|
||||
ld bc, wPartyMon2 - wPartyMon1
|
||||
jp CopyData
|
||||
|
||||
|
||||
; get species of mon e in list [wMonDataLocation] for LoadMonData
|
||||
GetMonSpecies: ; 4478 (1:4478)
|
||||
ld hl, wPartySpecies
|
||||
|
@ -183,7 +183,7 @@ BillsPCMenu: ; 21495 (8:5495)
|
||||
jp z, BillsPCChangeBox ; change box
|
||||
cp $4
|
||||
jp z, BillsPCPrintBox
|
||||
|
||||
|
||||
ExitBillsPC: ; 2153e (8:553e)
|
||||
ld a, [wFlags_0xcd60]
|
||||
bit 3, a ; accessing Bill's PC through another PC?
|
||||
@ -356,7 +356,7 @@ BillsPCRelease: ; 21690 (8:5690)
|
||||
ld hl, PikachuUnhappyText
|
||||
call PrintText
|
||||
jp BillsPCMenu
|
||||
|
||||
|
||||
BillsPCChangeBox: ; 216e7 (8:56e7)
|
||||
callba ChangeBox
|
||||
jp BillsPCMenu
|
||||
@ -540,7 +540,7 @@ PikachuUnhappyText: ; 21853 (8:5853)
|
||||
ReleaseWhichMonText: ; 21858 (8:5858)
|
||||
TX_FAR _ReleaseWhichMonText
|
||||
db "@"
|
||||
|
||||
|
||||
OnceReleasedText: ; 2185d (8:585d)
|
||||
TX_FAR _OnceReleasedText
|
||||
db "@"
|
||||
|
@ -175,7 +175,7 @@ Func_f531b:: ; f531b (3d:531b)
|
||||
ld [wUnknownSerialCounter+1],a
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
Func_f5476:: ; f5476 (3d:5476)
|
||||
ld hl,ColosseumIneligibleText
|
||||
call PrintText
|
||||
@ -207,7 +207,7 @@ PokeCup:: ; f548e (3d:548e)
|
||||
dec b
|
||||
jr nz,.loop
|
||||
dec hl
|
||||
dec hl
|
||||
dec hl
|
||||
cp [hl] ; is third mon second mon?
|
||||
jp z,DuplicateSpecies
|
||||
dec hl ; wPartySpecies
|
||||
@ -253,7 +253,7 @@ PikaCup:: ; f54e4 (3d:54e4)
|
||||
dec b
|
||||
jr nz,.loop
|
||||
dec hl
|
||||
dec hl
|
||||
dec hl
|
||||
cp [hl] ; is third mon second mon?
|
||||
jp z,DuplicateSpecies
|
||||
dec hl ; wPartySpecies
|
||||
@ -285,7 +285,7 @@ PikaCup:: ; f54e4 (3d:54e4)
|
||||
jp nc,CombinedLevelsAbove50
|
||||
xor a
|
||||
ret
|
||||
|
||||
|
||||
PetitCup:: ; f553a (3d:553a)
|
||||
ld hl,wPartyCount
|
||||
ld a,[hli]
|
||||
@ -299,7 +299,7 @@ PetitCup:: ; f553a (3d:553a)
|
||||
dec b
|
||||
jr nz,.loop
|
||||
dec hl
|
||||
dec hl
|
||||
dec hl
|
||||
cp [hl] ; is third mon second mon?
|
||||
jp z,DuplicateSpecies
|
||||
dec hl ; wPartySpecies
|
||||
@ -406,7 +406,7 @@ PetitCup:: ; f553a (3d:553a)
|
||||
jp nc,CombinedLevelsAbove80
|
||||
xor a
|
||||
ret
|
||||
|
||||
|
||||
NotThreeMonsInParty:: ; f561d (3d:516d)
|
||||
ld hl,Colosseum3MonsText
|
||||
call PrintText
|
||||
@ -418,67 +418,67 @@ MewInParty:: ; f5626 (3d:f5626)
|
||||
call PrintText
|
||||
ld a,$2
|
||||
ret
|
||||
|
||||
|
||||
DuplicateSpecies:: ; f562f (3d:f562f)
|
||||
ld hl,ColosseumDifferentMonsText
|
||||
call PrintText
|
||||
ld a,$3
|
||||
ret
|
||||
|
||||
|
||||
LevelAbove55:: ; f5638 (3d:5638)
|
||||
ld hl,ColosseumMaxL55Text
|
||||
call PrintText
|
||||
ld a,$4
|
||||
ret
|
||||
|
||||
|
||||
LevelUnder50:: ; f5641 (3d:5641)
|
||||
ld hl,ColosseumMinL50Text
|
||||
call PrintText
|
||||
ld a,$5
|
||||
ret
|
||||
|
||||
|
||||
CombinedLevelsGreaterThan155:: ; f5641 (3d:564a)
|
||||
ld hl,ColosseumTotalL155Text
|
||||
call PrintText
|
||||
ld a,$6
|
||||
ret
|
||||
|
||||
|
||||
LevelAbove30:: ; f5653 (3d:5653)
|
||||
ld hl,ColosseumMaxL30Text
|
||||
call PrintText
|
||||
ld a,$7
|
||||
ret
|
||||
|
||||
|
||||
LevelUnder25:: ; f565c (3d:565c)
|
||||
ld hl,ColosseumMinL25Text
|
||||
call PrintText
|
||||
ld a,$8
|
||||
ret
|
||||
|
||||
|
||||
CombinedLevelsAbove80:: ; f5665 (3d:5665)
|
||||
ld hl,ColosseumTotalL80Text
|
||||
call PrintText
|
||||
ld a,$9
|
||||
ret
|
||||
|
||||
|
||||
LevelAbove20:: ; f566e (3d:566e)
|
||||
ld hl,ColosseumMaxL20Text
|
||||
call PrintText
|
||||
ld a,$a
|
||||
ret
|
||||
|
||||
|
||||
LevelUnder15:: ; f5677 (3d:5677)
|
||||
ld hl,ColosseumMinL15Text
|
||||
call PrintText
|
||||
ld a,$b
|
||||
ret
|
||||
|
||||
|
||||
CombinedLevelsAbove50:: ; f5680 (3d:5680)
|
||||
ld hl,ColosseumTotalL50Text
|
||||
call PrintText
|
||||
ld a,$c
|
||||
ret
|
||||
|
||||
|
||||
asm_f5689:: ; f5689 (3d:5689)
|
||||
pop af
|
||||
pop bc
|
||||
@ -489,7 +489,7 @@ asm_f5689:: ; f5689 (3d:5689)
|
||||
call PrintText
|
||||
ld a,$d
|
||||
ret
|
||||
|
||||
|
||||
asm_f569b:: ; f569b (3d:569b)
|
||||
pop af
|
||||
pop bc
|
||||
@ -500,7 +500,7 @@ asm_f569b:: ; f569b (3d:569b)
|
||||
call PrintText
|
||||
ld a,$e
|
||||
ret
|
||||
|
||||
|
||||
asm_f56ad:: ; f56ad (3d:56ad)
|
||||
ld a,[hl]
|
||||
ld [wd11e],a
|
||||
@ -509,7 +509,7 @@ asm_f56ad:: ; f56ad (3d:56ad)
|
||||
call PrintText
|
||||
ld a,$f
|
||||
ret
|
||||
|
||||
|
||||
Func_f56bd:: ; f56bd (3d:56bd)
|
||||
xor a
|
||||
ld [H_AUTOBGTRANSFERENABLED],a
|
||||
@ -537,31 +537,31 @@ Func_f56bd:: ; f56bd (3d:56bd)
|
||||
ld a,$1
|
||||
ld [H_AUTOBGTRANSFERENABLED],a
|
||||
ret
|
||||
|
||||
|
||||
PointerTable_f56ee:: ; f56ee (3d:56ee)
|
||||
dw Text_f56f4
|
||||
dw Text_f5728
|
||||
dw Text_f575b
|
||||
|
||||
|
||||
Text_f56f4:: ; f56f4 (3d:56f4)
|
||||
db "LVs of 3<pkmn>:50-55"
|
||||
next "Sum of LVs:155 MAX"
|
||||
next "MEW can't attend.@"
|
||||
|
||||
|
||||
Text_f5728:: ; f5728 (3d:5728)
|
||||
db "LVs of 3<pkmn>:15-20"
|
||||
next "Sum of LVs:50 MAX"
|
||||
next "MEW can't attend.@"
|
||||
|
||||
|
||||
Text_f575b:: ; f575b (3d:575b)
|
||||
db "3 Basic <pkmn>.LV25-30"
|
||||
next "Sum of LVs:80 MAX"
|
||||
next "6′8″ and 44lb MAX@"
|
||||
|
||||
|
||||
Text_f5791:: ; f5791 (3d:5791)
|
||||
db "View"
|
||||
next "Rules@"
|
||||
|
||||
|
||||
Text_f579c:: ; f579c (3d:579c)
|
||||
db "# Cup"
|
||||
next "Pika Cup"
|
||||
@ -623,7 +623,7 @@ ColosseumHeightText:: ; f57f8 (3d:57f8)
|
||||
ColosseumWeightText:: ; f57fd (3d:57fd)
|
||||
TX_FAR _ColosseumWeightText ; a0b9f
|
||||
db "@"
|
||||
|
||||
|
||||
ColosseumEvolvedText:: ; f5802 (3d:5802)
|
||||
TX_FAR _ColosseumEvolvedText ; a0bbb
|
||||
db "@"
|
||||
@ -631,7 +631,7 @@ ColosseumEvolvedText:: ; f5802 (3d:5802)
|
||||
ColosseumIneligibleText:: ; f5807 (3d:5807)
|
||||
TX_FAR _ColosseumIneligibleText ; a0bd4
|
||||
db "@"
|
||||
|
||||
|
||||
LinkMenu: ; f580c (3d:580c)
|
||||
xor a
|
||||
ld [wLetterPrintingDelayFlags], a
|
||||
@ -854,7 +854,7 @@ LinkMenu: ; f580c (3d:580c)
|
||||
ld e,"▷"
|
||||
call Func_f59ec
|
||||
jp .choseCancel
|
||||
|
||||
|
||||
.asm_f59cd
|
||||
ld hl,ColosseumVersionText
|
||||
call PrintText
|
||||
@ -870,7 +870,7 @@ LinkMenu: ; f580c (3d:580c)
|
||||
jp c,.choseCancel
|
||||
ld a,$f0
|
||||
jp .next
|
||||
|
||||
|
||||
Func_f59ec:: ; f59ec (3d:59ec)
|
||||
ld a, b
|
||||
Coorda 6, 5
|
||||
@ -883,7 +883,7 @@ Func_f59ec:: ; f59ec (3d:59ec)
|
||||
ld c, 40
|
||||
call DelayFrames
|
||||
ret
|
||||
|
||||
|
||||
ColosseumWhereToText: ; f5a02 (3d:5a02)
|
||||
TX_FAR _ColosseumWhereToText
|
||||
db "@"
|
||||
@ -899,7 +899,7 @@ ColosseumCanceledText: ; f5a0c (3d:5a0c)
|
||||
ColosseumVersionText: ; f5a11 (3d:5a11)
|
||||
TX_FAR _ColosseumVersionText ; 28:4c47
|
||||
db "@"
|
||||
|
||||
|
||||
TextTerminator_f5a16: ; f5a16 (3d:5a16)
|
||||
db "@"
|
||||
|
||||
|
@ -139,11 +139,11 @@ Func_5cc1: ; 5cc1 (1:5cc1)
|
||||
ld hl, NotEnoughMemoryText
|
||||
call PrintText
|
||||
ret
|
||||
|
||||
NotEnoughMemoryText: ; 5ccd (1:5ccd)
|
||||
|
||||
NotEnoughMemoryText: ; 5ccd (1:5ccd)
|
||||
TX_FAR _NotEnoughMemoryText
|
||||
db "@"
|
||||
|
||||
|
||||
StartNewGame: ; 5cd2 (1:5cd2)
|
||||
ld hl, wd732
|
||||
res 1, [hl]
|
||||
|
@ -39,7 +39,7 @@ OptionMenuJumpTable: ; 41ca4 (10:5ca4)
|
||||
dw OptionsMenu_Dummy
|
||||
dw OptionsMenu_Dummy
|
||||
dw OptionsMenu_Cancel
|
||||
|
||||
|
||||
OptionsMenu_TextSpeed: ; 41cb4 (10:5cb4)
|
||||
call Func_41d07
|
||||
ld a, [hJoy5]
|
||||
@ -83,19 +83,19 @@ OptionsMenu_TextSpeed: ; 41cb4 (10:5cb4)
|
||||
call PlaceString
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
TextSpeedStringsPointerTable: ; 41cf2 (10:5cf2)
|
||||
dw FastText
|
||||
dw MidText
|
||||
dw SlowText
|
||||
|
||||
|
||||
FastText: ; 41cf9 (10:5cf9)
|
||||
db "FAST@"
|
||||
MidText: ; 41cfd (10:5cfd)
|
||||
db "MID @"
|
||||
SlowText: ; 41d02 (10:5d02)
|
||||
db "SLOW@"
|
||||
|
||||
|
||||
Func_41d07: ; 41d07 (10:5d07)
|
||||
ld a, [wOptions]
|
||||
and $f
|
||||
@ -115,7 +115,7 @@ Func_41d07: ; 41d07 (10:5d07)
|
||||
ld c, $0
|
||||
lb de, 5, 3
|
||||
ret
|
||||
|
||||
|
||||
OptionsMenu_BattleAnimations: ; 41d26 (10:5d26)
|
||||
ld a, [hJoy5]
|
||||
and D_RIGHT | D_LEFT
|
||||
@ -141,16 +141,16 @@ OptionsMenu_BattleAnimations: ; 41d26 (10:5d26)
|
||||
call PlaceString
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
AnimationOptionStringsPointerTable: ; 41d52 (10:5d52)
|
||||
dw AnimationOnText
|
||||
dw AnimationOffText
|
||||
|
||||
|
||||
AnimationOnText: ; 41d56 (10:5d56)
|
||||
db "ON @"
|
||||
AnimationOffText: ; 41d5a (10:5d5a)
|
||||
db "OFF@"
|
||||
|
||||
|
||||
OptionsMenu_BattleStyle: ; 41d5e (10:5d5e)
|
||||
ld a, [hJoy5]
|
||||
and D_LEFT | D_RIGHT
|
||||
@ -177,16 +177,16 @@ OptionsMenu_BattleStyle: ; 41d5e (10:5d5e)
|
||||
call PlaceString
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
BattleStyleOptionStringsPointerTable: ; 41d8c (10:5d8c)
|
||||
dw BattleStyleShiftText
|
||||
dw BattleStyleSetText
|
||||
|
||||
|
||||
BattleStyleShiftText: ; 41d90 (10:5d90)
|
||||
db "SHIFT@"
|
||||
BattleStyleSetText: ; 41d96 (10:5d96)
|
||||
db "SET @"
|
||||
|
||||
|
||||
OptionsMenu_SpeakerSettings: ; 41d9c (10:5d9c)
|
||||
ld a, [wOptions]
|
||||
and $30
|
||||
@ -235,7 +235,7 @@ SpeakerOptionStringsPointerTable: ; 41ddc (10:5ddc)
|
||||
dw Earphone1SoundText
|
||||
dw Earphone2SoundText
|
||||
dw Earphone3SoundText
|
||||
|
||||
|
||||
MonoSoundText: ; 41de4 (10:5de4)
|
||||
db "MONO @"
|
||||
Earphone1SoundText: ; 41dee (10:5dee)
|
||||
@ -244,7 +244,7 @@ Earphone2SoundText: ; 41df8 (10:5df8)
|
||||
db "EARPHONE2@"
|
||||
Earphone3SoundText: ; 41e02 (10:5e02)
|
||||
db "EARPHONE3@"
|
||||
|
||||
|
||||
OptionsMenu_GBPrinterBrightness: ; 41e0c (10:5e0c)
|
||||
call Func_41e7b
|
||||
ld a, [hJoy5]
|
||||
@ -285,14 +285,14 @@ OptionsMenu_GBPrinterBrightness: ; 41e0c (10:5e0c)
|
||||
call PlaceString
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
GBPrinterOptionStringsPointerTable: ; 41e44 (10:5e44)
|
||||
dw LightestPrintText
|
||||
dw LighterPrintText
|
||||
dw NormalPrintText
|
||||
dw DarkerPrintText
|
||||
dw DarkestPrintText
|
||||
|
||||
|
||||
LightestPrintText: ; 41e4e (10:5e4e)
|
||||
db "LIGHTEST@"
|
||||
LighterPrintText: ; 41e57 (10:5e57)
|
||||
@ -303,7 +303,7 @@ DarkerPrintText: ; 41e69 (10:5e69)
|
||||
db "DARKER @"
|
||||
DarkestPrintText: ; 41e72 (10:5e72)
|
||||
db "DARKEST @"
|
||||
|
||||
|
||||
Func_41e7b: ; 41e7b (10:5e7b)
|
||||
ld a, [wd498]
|
||||
and a
|
||||
@ -347,7 +347,7 @@ OptionsMenu_Cancel: ; 41ead (10:5ead)
|
||||
.pressedCancel
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Func_41eb7: ; 41eb7 (10:5eb7)
|
||||
ld hl, wOptionsCursorLocation
|
||||
ld a, [hJoy5]
|
||||
@ -387,7 +387,7 @@ Func_41eb7: ; 41eb7 (10:5eb7)
|
||||
dec [hl]
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Func_41ee9: ; 41ee9 (10:5ee9)
|
||||
coord hl, 1, 1
|
||||
ld de, SCREEN_WIDTH
|
||||
@ -431,13 +431,13 @@ Func_41f06: ; 41f06 (10:5f06)
|
||||
ld [H_AUTOBGTRANSFERENABLED], a
|
||||
call Delay3
|
||||
ret
|
||||
|
||||
|
||||
AllOptionsText: ; 41f3e (10:5f3e)
|
||||
db "TEXT SPEED :"
|
||||
next "ANIMATION :"
|
||||
next "BATTLESTYLE:"
|
||||
next "SOUND:"
|
||||
next "PRINT:@"
|
||||
|
||||
|
||||
OptionMenuCancelText: ; 41f73 (10:5f73)
|
||||
db "CANCEL@"
|
@ -13,7 +13,7 @@ PlayerPC: ; 778e (1:778e)
|
||||
call PlaySound
|
||||
ld hl, TurnedOnPC2Text
|
||||
call PrintText
|
||||
|
||||
|
||||
PlayerPCMenu: ; 790c (1:790c)
|
||||
ld hl, wd730
|
||||
set 6, [hl]
|
||||
|
@ -461,7 +461,7 @@ ShowPokedexDataInternal: ; 40323 (10:4323)
|
||||
ld a, $77 ; max volume
|
||||
ld [rNR50], a
|
||||
ret
|
||||
|
||||
|
||||
HeightWeightText: ; 40370 (10:4370)
|
||||
db "HT ?", $60, "??", $61
|
||||
next "WT ???lb@"
|
||||
@ -656,7 +656,7 @@ Func_404bc: ; 404bc (10:44bc)
|
||||
res 3, a
|
||||
ld [hFlags_0xFFFA], a
|
||||
ret
|
||||
|
||||
|
||||
; draws a line of tiles
|
||||
; INPUT:
|
||||
; b = tile ID
|
||||
|
@ -227,12 +227,12 @@ MonPartySpritePointers: ; 7184d (1c:584d)
|
||||
db $10 / $10 ; $10 bytes
|
||||
db BANK(MonPartySprites)
|
||||
dw vSprites + $260
|
||||
|
||||
|
||||
dw PikachuSprite
|
||||
db $40 / $10 ; $40 bytes
|
||||
db BANK(PikachuSprite)
|
||||
dw vSprites + $280
|
||||
|
||||
|
||||
dw MonPartySprites + $100
|
||||
db $40 / $10 ; $40 bytes
|
||||
db BANK(MonPartySprites)
|
||||
|
@ -39,7 +39,7 @@ SetDefaultNames: ; 5e27 (1:5e27)
|
||||
ld bc, NAME_LENGTH
|
||||
call CopyData ; rip optimizations
|
||||
ret
|
||||
|
||||
|
||||
OakSpeech: ; 5e85 (1:5e85)
|
||||
call StopAllMusic ; stop music
|
||||
ld a, BANK(Music_Routes2)
|
||||
@ -157,7 +157,7 @@ OakSpeech: ; 5e85 (1:5e85)
|
||||
call GBFadeOutToWhite
|
||||
call ClearScreen ; rip more tail-end optimizations
|
||||
ret
|
||||
|
||||
|
||||
OakSpeechText1: ; 5fb9 (1:5fb9)
|
||||
TX_FAR _OakSpeechText1
|
||||
db "@"
|
||||
|
@ -224,7 +224,7 @@ GetDefaultName: ; 6858 (1:6858)
|
||||
ld de, wcd6d
|
||||
ld bc, $14
|
||||
jp CopyData
|
||||
|
||||
|
||||
DefaultNamesPlayerList: ; 687d (1:687d)
|
||||
db "NEW NAME@YELLOW@ASH@JACK@"
|
||||
DefaultNamesRivalList: ; 688d (1:688d)
|
||||
|
@ -165,7 +165,7 @@ Serial_SyncAndExchangeNybbleDouble: ; 7131 (1:7131)
|
||||
ld [wUnknownSerialCounter], a
|
||||
ld [wUnknownSerialCounter + 1], a
|
||||
ret
|
||||
|
||||
|
||||
CableClubNPCAreaReservedFor2FriendsLinkedByCableText: ; 7188 (1:7188)
|
||||
TX_FAR _CableClubNPCAreaReservedFor2FriendsLinkedByCableText
|
||||
db "@"
|
||||
|
@ -83,7 +83,7 @@ CheckForceBikeOrSurf: ; c0d2 (3:40d2)
|
||||
ld [wWalkBikeSurfStateCopy], a
|
||||
call ForceBikeOrSurf
|
||||
ret
|
||||
|
||||
|
||||
INCLUDE "data/force_bike_surf.asm"
|
||||
|
||||
IsPlayerFacingEdgeOfMap: ; c148 (3:4148)
|
||||
|
@ -1,6 +1,6 @@
|
||||
GetTileAndCoordsInFrontOfPlayer: ; c2d4 (3:42d1)
|
||||
call GetPredefRegisters
|
||||
|
||||
|
||||
_GetTileAndCoordsInFrontOfPlayer: ; c2d4 (3:42d4)
|
||||
ld a, [wYCoord]
|
||||
ld d, a
|
||||
@ -37,7 +37,7 @@ _GetTileAndCoordsInFrontOfPlayer: ; c2d4 (3:42d4)
|
||||
ld c, a
|
||||
ld [wTileInFrontOfPlayer], a
|
||||
ret
|
||||
|
||||
|
||||
GetTileTwoStepsInFrontOfPlayer: ; c309 (3:4309)
|
||||
xor a
|
||||
ld [$ffdb], a
|
||||
|
@ -29,5 +29,5 @@ LoadWildData: ; cb62 (3:4b62)
|
||||
ld de,wWaterMons ; otherwise, load surfing data
|
||||
ld bc,$0014
|
||||
jp CopyData
|
||||
|
||||
|
||||
INCLUDE "data/wild_mons.asm"
|
@ -55,7 +55,7 @@ UpdateNonPlayerSprite: ; 4be3 (1:4be3)
|
||||
; multiple of $10 to make comparisons easier.
|
||||
DetectCollisionBetweenSprites: ; 4bf7 (1:4bf7)
|
||||
; nop
|
||||
|
||||
|
||||
ld h, wSpriteStateData1 / $100
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
ld l, a
|
||||
@ -355,7 +355,7 @@ Func_4d0a: ; 4d0a (1:4d0a)
|
||||
inc l
|
||||
inc l
|
||||
ret
|
||||
|
||||
|
||||
SetSpriteCollisionValues: ; 4d22 (1:4d22)
|
||||
and a
|
||||
ld b, 0
|
||||
|
@ -16,7 +16,7 @@ _InitMapSprites: ; 1401b (5:401b)
|
||||
call LoadMapSpriteTilePatterns
|
||||
call Func_14150
|
||||
ret
|
||||
|
||||
|
||||
; Loads sprite set for outside maps (cities and routes) and sets VRAM slots.
|
||||
; sets carry if the map is a city or route, unsets carry if not
|
||||
InitOutsideMapSprites: ; 14029 (5:4029)
|
||||
@ -49,7 +49,7 @@ InitOutsideMapSprites: ; 14029 (5:4029)
|
||||
call Func_14150
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
LoadSpriteSetFromMapHeader: ; 14061 (5:4061)
|
||||
; This loop stores the correct VRAM tile pattern slots according the sprite
|
||||
; data from the map's header. Since the VRAM tile pattern slots are filled in
|
||||
@ -80,7 +80,7 @@ LoadSpriteSetFromMapHeader: ; 14061 (5:4061)
|
||||
call CheckIfPictureIDAlreadyLoaded
|
||||
jr .continue
|
||||
.isFourTileSprite
|
||||
; loop through the space reserved for regular picture IDs
|
||||
; loop through the space reserved for regular picture IDs
|
||||
ld de, wSpriteSet
|
||||
ld b, 9
|
||||
call CheckIfPictureIDAlreadyLoaded
|
||||
@ -98,11 +98,11 @@ CheckIfPictureIDAlreadyLoaded: ; 1409b (5:409b)
|
||||
; their picture ID's match that of the current sprite slot.
|
||||
ld a, [de]
|
||||
and a ; is sprite set slot not taken up yet?
|
||||
jr z, .spriteSlotNotTaken ; if so, load it as it signifies we've reached
|
||||
jr z, .spriteSlotNotTaken ; if so, load it as it signifies we've reached
|
||||
; the end of data for the last sprite set
|
||||
|
||||
cp c ; is the tile pattern already loaded?
|
||||
ret z ; don't redundantly load
|
||||
ret z ; don't redundantly load
|
||||
dec b ; have we reached the end of the sprite set?
|
||||
jr z, .spriteNotAlreadyLoaded ; if so, we're done here
|
||||
inc de
|
||||
@ -121,14 +121,14 @@ CheckForFourTileSprite: ; 140ac (5:40ac)
|
||||
; Else, returns carry if the sprite uses 4 tiles
|
||||
cp SPRITE_PIKACHU ; is this the Pikachu Sprite?
|
||||
ret z ; return if yes
|
||||
|
||||
|
||||
cp SPRITE_BALL ; is this a four tile sprite?
|
||||
jr nc, .notYellowSprite ; set carry if yes
|
||||
; regular sprite
|
||||
and a
|
||||
ret
|
||||
.notYellowSprite
|
||||
scf
|
||||
scf
|
||||
ret
|
||||
|
||||
LoadMapSpriteTilePatterns: ; 140b7 (5:40b7)
|
||||
@ -148,7 +148,7 @@ LoadMapSpriteTilePatterns: ; 140b7 (5:40b7)
|
||||
cp 11
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
ReloadWalkingTilePatterns: ; 140d2 (5:40d2)
|
||||
xor a
|
||||
.loop
|
||||
@ -162,7 +162,7 @@ ReloadWalkingTilePatterns: ; 140d2 (5:40d2)
|
||||
cp 11
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
LoadStillTilePattern: ; 140e4 (5:40e4)
|
||||
ld a, [wFontLoaded]
|
||||
bit 0, a ; reloading upper half of tile patterns after displaying text?
|
||||
@ -172,7 +172,7 @@ LoadStillTilePattern: ; 140e4 (5:40e4)
|
||||
call GetSpriteVRAMAddress
|
||||
call CopyVideoDataAlternate ; new yellow function
|
||||
ret
|
||||
|
||||
|
||||
LoadWalkingTilePattern: ; 140f5 (5:40f5)
|
||||
call ReadSpriteSheetData
|
||||
ret nc
|
||||
@ -184,7 +184,7 @@ LoadWalkingTilePattern: ; 140f5 (5:40f5)
|
||||
set 3, h ; add $800 to hl
|
||||
call CopyVideoDataAlternate
|
||||
ret
|
||||
|
||||
|
||||
GetSpriteVRAMAddress: ; 14018 (5:4108)
|
||||
push bc
|
||||
ld a, [hVRAMSlot]
|
||||
@ -198,7 +198,7 @@ GetSpriteVRAMAddress: ; 14018 (5:4108)
|
||||
ld l, a
|
||||
pop bc
|
||||
ret
|
||||
|
||||
|
||||
SpriteVRAMAddresses: ; 14118 (5:4118)
|
||||
; Equivalent to multiplying $C0 (number of bytes in 12 tiles) times the VRAM
|
||||
; slot and adding the result to $8000 (the VRAM base address).
|
||||
@ -213,7 +213,7 @@ SpriteVRAMAddresses: ; 14118 (5:4118)
|
||||
dw vChars0 + $6c0
|
||||
dw vChars0 + $780
|
||||
dw vChars0 + $7c0
|
||||
|
||||
|
||||
ReadSpriteSheetData: ; 1412e (5:412e)
|
||||
ld a, [hVRAMSlot]
|
||||
ld e, a
|
||||
@ -243,13 +243,13 @@ ReadSpriteSheetData: ; 1412e (5:412e)
|
||||
inc hl
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Func_14150: ; 14150 (5:4150)
|
||||
ld a, $1
|
||||
ld [wSpriteStateData2 + $e], a ; vram slot for player
|
||||
ld a, $2
|
||||
ld [wSpriteStateData2 + $fe], a ; vram slot for Pikachu
|
||||
|
||||
|
||||
ld a, $e
|
||||
ld hl, wSpriteStateData1 + $10
|
||||
.loop
|
||||
@ -270,7 +270,7 @@ Func_14150: ; 14150 (5:4150)
|
||||
dec a
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
Func_14179: ; 14179 (5:4179)
|
||||
push de
|
||||
push bc
|
||||
|
@ -93,7 +93,7 @@ Func_4e32: ; 4e32 (1:4e32)
|
||||
add b
|
||||
ld [wSpriteStateData1 + 2], a
|
||||
ret
|
||||
|
||||
|
||||
UpdateNPCSprite: ; 4e3e (1:4e3e)
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
swap a
|
||||
@ -836,7 +836,7 @@ AdvanceScriptedNPCAnimFrameCounter: ; 5264 (1:5264)
|
||||
and $3
|
||||
ld [hSpriteAnimFrameCounter], a
|
||||
ret
|
||||
|
||||
|
||||
Func_5274: ; 5274 (1:5274)
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
add $7
|
||||
@ -853,7 +853,7 @@ Func_5274: ; 5274 (1:5274)
|
||||
and $3
|
||||
ld [hl], a ; advance to next animation frame every 4 ticks (16 ticks total for one step)
|
||||
ret
|
||||
|
||||
|
||||
Func_5288: ; 5288 (1:5288)
|
||||
; nice lookup table
|
||||
; a is supposedly [wNPCMovementDirections + $fe]
|
||||
@ -914,7 +914,7 @@ Func_5288: ; 5288 (1:5288)
|
||||
.asm_52e1
|
||||
call Func_532b
|
||||
jr .asm_530b
|
||||
|
||||
|
||||
.asm_52e6
|
||||
call Func_5337
|
||||
call Func_5349
|
||||
@ -939,7 +939,7 @@ Func_5288: ; 5288 (1:5288)
|
||||
call UpdateSpriteImage
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
.asm_530b
|
||||
call Func_5337
|
||||
call Func_5349
|
||||
@ -952,27 +952,27 @@ Func_5288: ; 5288 (1:5288)
|
||||
call UpdateSpriteImage
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Func_531f: ; 531f (1:531f)
|
||||
lb de, 1, 0
|
||||
ld c, SPRITE_FACING_DOWN
|
||||
ret
|
||||
|
||||
|
||||
Func_5325: ; 5325 (1:5325)
|
||||
lb de, -1, 0
|
||||
ld c, SPRITE_FACING_UP
|
||||
ret
|
||||
|
||||
|
||||
Func_532b: ; 532b (1:532b)
|
||||
lb de, 0, 1
|
||||
ld c, SPRITE_FACING_RIGHT
|
||||
ret
|
||||
|
||||
|
||||
Func_5331: ; 5331 (1:5331)
|
||||
lb de, 0, -1
|
||||
ld c, SPRITE_FACING_LEFT
|
||||
ret
|
||||
|
||||
|
||||
Func_5337: ; 5337 (1:5337)
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
add $9
|
||||
@ -987,7 +987,7 @@ Func_5337: ; 5337 (1:5337)
|
||||
inc l
|
||||
ld [hl], e ; c1x5 (update X movement delta)
|
||||
ret
|
||||
|
||||
|
||||
Func_5349: ; 5349 (1:5349)
|
||||
ld h, wSpriteStateData2 / $100
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
@ -1000,7 +1000,7 @@ Func_5349: ; 5349 (1:5349)
|
||||
add e
|
||||
ld [hl], a ; update X position
|
||||
ret
|
||||
|
||||
|
||||
Func_5357: ; 5357 (1:5357)
|
||||
call Func_5274
|
||||
ld a, [H_CURRENTSPRITEOFFSET]
|
||||
|
@ -19,10 +19,10 @@ PrepareOAMData: ; 499b (1:499b)
|
||||
|
||||
.spriteLoop
|
||||
ld [hSpriteOffset2], a
|
||||
|
||||
|
||||
ld e, a
|
||||
ld d, wSpriteStateData1 / $100
|
||||
|
||||
|
||||
ld a, [de] ; c1x0
|
||||
and a
|
||||
jp z, .nextSprite
|
||||
@ -42,7 +42,7 @@ PrepareOAMData: ; 499b (1:499b)
|
||||
jr c, .usefacing
|
||||
|
||||
; unchanging
|
||||
ld a, $0
|
||||
ld a, $0
|
||||
jr .next
|
||||
|
||||
.usefacing
|
||||
@ -81,7 +81,7 @@ PrepareOAMData: ; 499b (1:499b)
|
||||
call Func_4a7b
|
||||
ld [wd5cd], a
|
||||
ld a, [hOAMBufferOffset]
|
||||
|
||||
|
||||
ld e, a
|
||||
ld d, wOAMBuffer / $100
|
||||
|
||||
@ -185,7 +185,7 @@ GetSpriteScreenXY: ; 4a5f (1:4a5f)
|
||||
and $f0
|
||||
ld [de], a ; c1xb (x)
|
||||
ret
|
||||
|
||||
|
||||
Func_4a7b: ; 4a7b (1:4a7b)
|
||||
push bc
|
||||
ld a, [wd5cd] ; temp copy of c1x2
|
||||
@ -228,5 +228,5 @@ _IsTilePassable:: ; 4aaa (1:4aaa)
|
||||
.tileNotPassable
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
INCLUDE "data/collision.asm" ; probably
|
@ -418,7 +418,7 @@ FishingAnim: ; 70816 (1c:4816)
|
||||
cp $2
|
||||
ld hl, NothingHereText
|
||||
jr z, .done
|
||||
|
||||
|
||||
; there was a bite
|
||||
|
||||
; shake the player's sprite vertically
|
||||
@ -432,7 +432,7 @@ FishingAnim: ; 70816 (1c:4816)
|
||||
call Delay3
|
||||
dec b
|
||||
jr nz, .loop
|
||||
|
||||
|
||||
; If the player is facing up, hide the fishing rod so it doesn't overlap with
|
||||
; the exclamation bubble that will be shown next.
|
||||
ld a, [wSpriteStateData1 + 2]
|
||||
|
@ -106,7 +106,7 @@ Func_6eaa: ; 6eaa (1:6eaa)
|
||||
ld c, 64
|
||||
call DelayFrames
|
||||
ret
|
||||
|
||||
|
||||
Func_6ebb: ; 6ebb (1:6ebb)
|
||||
ld a, b
|
||||
ld [H_SPRITEINDEX], a
|
||||
@ -121,7 +121,7 @@ Func_6ebb: ; 6ebb (1:6ebb)
|
||||
ld [hSpriteImageIndex], a
|
||||
call SpriteFunc_34a1
|
||||
ret
|
||||
|
||||
|
||||
PokemonCenterWelcomeText: ; 6de0 (1:6de0)
|
||||
TX_FAR _PokemonCenterWelcomeText
|
||||
db "@"
|
||||
@ -143,7 +143,7 @@ PokemonCenterFarewellText: ; 6ee5 (1:6ee5)
|
||||
db $a
|
||||
TX_FAR _PokemonCenterFarewellText
|
||||
db "@"
|
||||
|
||||
|
||||
LooksContentText: ; 6eeb (1:6eeb)
|
||||
TX_FAR _LooksContentText
|
||||
db "@"
|
@ -123,7 +123,7 @@ ApplyOutOfBattlePoisonDamage: ; c3de (3:43de)
|
||||
.done
|
||||
ld [wOutOfBattleBlackout], a
|
||||
ret
|
||||
|
||||
|
||||
Func_c4c7: ; c4c7 (3:44c7)
|
||||
ld a, [wStepCounter]
|
||||
and a
|
||||
|
@ -10,9 +10,9 @@ IsPlayerTalkingToPikachu:: ; fcf0c (3f:4f0c)
|
||||
ld [hSpriteIndexOrTextID], a
|
||||
ld [wd436], a
|
||||
ret
|
||||
|
||||
|
||||
InitializePikachuTextID: ; fcf20 (3f:4f20)
|
||||
ld a, $d4 ; display
|
||||
ld a, $d4 ; display
|
||||
ld [hSpriteIndexOrTextID], a
|
||||
xor a
|
||||
ld [wPlayerMovingDirection], a
|
||||
@ -48,7 +48,7 @@ DoStarterPikachuEmotions: ; fcf35 (3f:4f35)
|
||||
jr .loop
|
||||
.done
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionsJumptable: ; fcf54 (3f:4f54)
|
||||
dw StarterPikachuEmotionCommand_nop ; 0
|
||||
dw StarterPikachuEmotionCommand_text ; 1
|
||||
@ -61,7 +61,7 @@ StarterPikachuEmotionsJumptable: ; fcf54 (3f:4f54)
|
||||
dw StarterPikachuEmotionCommand_nop2 ; 8
|
||||
dw StarterPikachuEmotionCommand_9 ; 9
|
||||
dw StarterPikachuEmotionCommand_nop3 ; a
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_nop: ; fcf6a (3f:4f6a)
|
||||
StarterPikachuEmotionCommand_nop3: ; fcf6a (3f:4f6a)
|
||||
ret
|
||||
@ -77,7 +77,7 @@ StarterPikachuEmotionCommand_text: ; fcf6b (3f:4f6b)
|
||||
call PrintText
|
||||
pop de
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_pcm: ; fcf77 (3f:4f77)
|
||||
ld a, [de]
|
||||
inc de
|
||||
@ -93,7 +93,7 @@ PlayPikachuSoundClip_: ; fcf81 (3f:4f81)
|
||||
ret z
|
||||
callab PlayPikachuSoundClip
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_emote: ; fcf8d (3f:4f8d)
|
||||
ld a, [wUpdateSpritesEnabled]
|
||||
push af
|
||||
@ -107,14 +107,14 @@ StarterPikachuEmotionCommand_emote: ; fcf8d (3f:4f8d)
|
||||
pop af
|
||||
ld [wUpdateSpritesEnabled], a
|
||||
ret
|
||||
|
||||
|
||||
ShowPikachuEmoteBubble: ; fcfa2 (3f:4fa2)
|
||||
ld [wWhichEmotionBubble], a
|
||||
ld a, $f
|
||||
ld [wEmotionBubbleSpriteIndex], a
|
||||
predef EmotionBubble
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_4: ; fcfb0 (3f:4fb0)
|
||||
ld a, [de]
|
||||
inc de
|
||||
@ -127,7 +127,7 @@ StarterPikachuEmotionCommand_4: ; fcfb0 (3f:4fb0)
|
||||
call Func_fd2a1
|
||||
pop de
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_delay: ; fcfbe (3f:4fbe)
|
||||
ld a, [de]
|
||||
inc de
|
||||
@ -136,7 +136,7 @@ StarterPikachuEmotionCommand_delay: ; fcfbe (3f:4fbe)
|
||||
call DelayFrames
|
||||
pop de
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_subcmd: ; fcfc7 (3f:4fc7)
|
||||
ld a, [de]
|
||||
inc de
|
||||
@ -161,10 +161,10 @@ Jumptable_fcfda:
|
||||
dw PikachuPewterPokecenterCheck
|
||||
dw PikachuFanClubCheck
|
||||
dw PikachuBillsHouseCheck
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_nop2: ; fcfe8 (3f:4fe8)
|
||||
ret
|
||||
|
||||
|
||||
StarterPikachuEmotionCommand_9: ; fcfe9 (3f:4fe9)
|
||||
push de
|
||||
call Func_fcff2
|
||||
@ -177,7 +177,7 @@ Func_fcff2: ; fcff2 (3f:4ff2)
|
||||
xor $4
|
||||
ld [wSpriteStateData1 + $f9], a
|
||||
ret
|
||||
|
||||
|
||||
Func_fcffb: ; fcffb (3f:4ffb)
|
||||
; Inexplicably empty.
|
||||
rept 5
|
||||
@ -199,7 +199,7 @@ asm_fd00f: ; fd00f (3f:500f)
|
||||
ld hl, PikachuEmotionTable
|
||||
call DoStarterPikachuEmotions
|
||||
ret
|
||||
|
||||
|
||||
PikachuEmotionTable: ; fd019 (3f:4019)
|
||||
dw PikachuEmotion0_fd115
|
||||
dw PikachuEmotion1_fd141
|
||||
@ -235,10 +235,10 @@ PikachuEmotionTable: ; fd019 (3f:4019)
|
||||
dw PikachuEmotion31_fd20a
|
||||
dw PikachuEmotion32_fd213
|
||||
dw PikachuEmotion33_fd05d
|
||||
|
||||
|
||||
PikachuEmotion33_fd05d: ; fd05d (3f:505d)
|
||||
db $ff
|
||||
|
||||
|
||||
Func_fd05e: ; fd05e (3f:505e)
|
||||
ld a, [wCurMap]
|
||||
cp POKEMON_FAN_CLUB
|
||||
@ -295,10 +295,10 @@ Func_fd05e: ; fd05e (3f:505e)
|
||||
.asm_fd0c9
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Pointer_fd0cb:
|
||||
db $12, $15, $17, $18, $19
|
||||
|
||||
|
||||
IsPlayerPikachuAsleepInParty:: ; fd0d0 (3f:50d0)
|
||||
xor a
|
||||
ld [wWhichPokemon], a
|
||||
@ -336,7 +336,7 @@ IsPlayerPikachuAsleepInParty:: ; fd0d0 (3f:50d0)
|
||||
.done
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
PikachuEmotion0_fd115: ; fd115 (3f:5115)
|
||||
db $ff
|
||||
|
||||
@ -1528,7 +1528,7 @@ Func_fd7f3:
|
||||
push bc
|
||||
push de
|
||||
push hl
|
||||
|
||||
|
||||
ld bc, wOAMBuffer + 4 * 36
|
||||
ld a, [wPikaSpriteY]
|
||||
ld e, a
|
||||
|
@ -838,7 +838,7 @@ Func_e8d11:
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
Func_e8d35:: ; e8d35 (3a:4e79)
|
||||
ld a, [wBoxDataStart]
|
||||
and a
|
||||
|
@ -182,7 +182,7 @@ WouldYouLikeToSaveText: ; 73ad1 (1c:7ad1)
|
||||
SavingText: ; 73ad6 (1c:7ad6)
|
||||
TX_FAR _SavingText
|
||||
db "@"
|
||||
|
||||
|
||||
GameSavedText: ; 73adb (1c:7adb)
|
||||
TX_FAR _GameSavedText
|
||||
db "@"
|
||||
@ -190,7 +190,7 @@ GameSavedText: ; 73adb (1c:7adb)
|
||||
OlderFileWillBeErasedText: ; 73ae0 (1c:7ae0)
|
||||
TX_FAR _OlderFileWillBeErasedText
|
||||
db "@"
|
||||
|
||||
|
||||
SaveSAVtoSRAM0: ; 73ae5 (1c:7ae5)
|
||||
call EnableSRAMAndLatchClockData
|
||||
ld a, $1
|
||||
@ -257,7 +257,7 @@ SaveSAVtoSRAM2: ; 73b56 (1c:7b56)
|
||||
ld [de], a
|
||||
ld hl, sPlayerName
|
||||
ld bc, sMainDataCheckSum - sPlayerName
|
||||
call SAVCheckSum
|
||||
call SAVCheckSum
|
||||
ld [sMainDataCheckSum], a
|
||||
call DisableSRAMAndPrepareClockData
|
||||
ret
|
||||
@ -674,7 +674,7 @@ EnableSRAMAndLatchClockData: ; 73e9f (1c:7e9f)
|
||||
ld a, SRAM_ENABLE
|
||||
ld [MBC1SRamEnable], a
|
||||
ret
|
||||
|
||||
|
||||
DisableSRAMAndPrepareClockData: ; 73eaa (1c:7eaa)
|
||||
ld a, SRAM_DISABLE
|
||||
ld [MBC1SRamBankingMode], a
|
||||
|
@ -216,7 +216,7 @@ DisplayTitleScreen: ; 4171 (1:4171)
|
||||
and a
|
||||
jr nz, .audioFadeLoop
|
||||
jp Init
|
||||
|
||||
|
||||
.doClearSaveDialogue ; 432a (1:432a)
|
||||
jpba DoClearSaveDialogue
|
||||
|
||||
@ -249,7 +249,7 @@ CopyrightTextString: ; 4355 (1:4355)
|
||||
TitleScreen_PlayPikachuPCM: ; 4387 (1:4387)
|
||||
callab PlayPikachuSoundClip
|
||||
ret
|
||||
|
||||
|
||||
Func_4390: ; 4390 (1:4390)
|
||||
call Func_43de
|
||||
ld a, [wTitleMonSpecies]
|
||||
@ -262,7 +262,7 @@ Func_4390: ; 4390 (1:4390)
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp hl
|
||||
|
||||
|
||||
PointerTable_43a2: ; 43a2 (1:43a2)
|
||||
dw Func_43be
|
||||
dw Func_43c3
|
||||
@ -276,13 +276,13 @@ PointerTable_43a2: ; 43a2 (1:43a2)
|
||||
dw Func_43d9
|
||||
dw Func_43bf
|
||||
dw Func_43ba
|
||||
|
||||
|
||||
Func_43ba: ; 43ba (1:43ba)
|
||||
xor a
|
||||
ld [wTitleMonSpecies], a
|
||||
Func_43be
|
||||
ret
|
||||
|
||||
|
||||
Func_43bf: ; 43bf (1:43bf)
|
||||
ld e, 0
|
||||
jr asm_43c9
|
||||
@ -308,7 +308,7 @@ Func_43d9: ; 43d9 (1:43d9)
|
||||
ld hl, wTitleMonSpecies
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
|
||||
Func_43de: ; 43de (1:43de)
|
||||
ld hl, wTitleMonSpecies + 1
|
||||
ld a, [hl]
|
||||
@ -328,7 +328,7 @@ Func_43de: ; 43de (1:43de)
|
||||
CopyFixedLengthText: ; 43f3 (1:43f3)
|
||||
ld bc, NAME_LENGTH
|
||||
jp CopyData
|
||||
|
||||
|
||||
NintenText: db "NINTEN@"
|
||||
SonyText: db "SONY@"
|
||||
|
||||
@ -349,7 +349,7 @@ IncrementResetCounter: ; 4405 (1:4405)
|
||||
.doReset
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
Func_4418: ; 4418 (1:4418)
|
||||
xor a
|
||||
call SwitchSRAMBankAndLatchClockData
|
||||
|
@ -587,12 +587,12 @@ LoadTownMapEntry: ; 7137a (1c:537a)
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ret
|
||||
|
||||
|
||||
; ExternalMapEntries: ; 7139c (1c:539c)
|
||||
; dr $7139c,$7140b
|
||||
; InternalMapEntries: ; 7140b (1c:540b)
|
||||
; dr $7140b,$7174b
|
||||
|
||||
|
||||
INCLUDE "data/town_map_entries.asm"
|
||||
|
||||
INCLUDE "text/map_names.asm" ; TODO: relabel addresses
|
||||
|
@ -136,7 +136,7 @@ PlayMusic:: ; 2211 (0:2211)
|
||||
ld [wAudioSavedROMBank], a
|
||||
ld a, b
|
||||
jr PlaySound
|
||||
|
||||
|
||||
Func_2223:: ; 2223 (0:2223)
|
||||
xor a
|
||||
ld [wChannelSoundIDs + CH4], a
|
||||
@ -145,7 +145,7 @@ Func_2223:: ; 2223 (0:2223)
|
||||
ld [wChannelSoundIDs + CH7], a
|
||||
ld [rNR10], a
|
||||
ret
|
||||
|
||||
|
||||
StopAllMusic:: ; 2233 (0:2233)
|
||||
ld a, $FF
|
||||
ld [wNewSoundID], a
|
||||
@ -232,7 +232,7 @@ InitMusicVariables:: ; 22aa (0:22aa)
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
InitSFXVariables:: ; 22c0 (0:22c0)
|
||||
push hl
|
||||
push de
|
||||
@ -242,7 +242,7 @@ InitSFXVariables:: ; 22c0 (0:22c0)
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
StopAllAudio:: ; 22d6 (0:22d6)
|
||||
push hl
|
||||
push de
|
||||
@ -252,7 +252,7 @@ StopAllAudio:: ; 22d6 (0:22d6)
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
DetermineAudioFunction:: ; 22ec (0:22ec)
|
||||
ld a, [H_LOADEDROMBANK]
|
||||
push af
|
||||
|
@ -24,7 +24,7 @@ CopyData:: ; 00b1 (0:00b1)
|
||||
dec b
|
||||
jr nz,.loop
|
||||
ret
|
||||
|
||||
|
||||
.copybytes ; 00c1
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
@ -52,7 +52,7 @@ CopyVideoDataAlternate:: ; 00c8 (0:00c8)
|
||||
ld c,a
|
||||
pop af
|
||||
jp FarCopyData
|
||||
|
||||
|
||||
CopyVideoDataDoubleAlternate:: ; 00e3 (0:00e3)
|
||||
ld a, [rLCDC]
|
||||
bit 7,a ; LCD enabled?
|
||||
|
@ -148,7 +148,7 @@ FillMemory:: ; 166e (0:166e)
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
GetFarByte:: ; 1681 (0:1681)
|
||||
; get a byte from a:hl
|
||||
; and return it in a
|
||||
|
@ -402,7 +402,7 @@ CheckWarpsNoCollisionLoop:: ; 04d5 (0:04d5)
|
||||
and D_DOWN | D_UP | D_LEFT | D_RIGHT
|
||||
jr z, CheckWarpsNoCollisionRetry2 ; if directional buttons aren't being pressed, do not pass through the warp
|
||||
jr WarpFound1
|
||||
|
||||
|
||||
CheckWarpsNoCollisionRetry1:: ; 050f (0:050f)
|
||||
inc hl
|
||||
CheckWarpsNoCollisionRetry2:: ; 0510 (0:0510)
|
||||
@ -413,7 +413,7 @@ ContinueCheckWarpsNoCollisionLoop:: ; 0512 (0:0512)
|
||||
dec c ; decrement number of warps
|
||||
jp nz, CheckWarpsNoCollisionLoop
|
||||
jp CheckMapConnections
|
||||
|
||||
|
||||
; check if the player has stepped onto a warp after having collided
|
||||
CheckWarpsCollision:: ; 051a (0:051a)
|
||||
ld a, [wNumberOfWarps]
|
||||
@ -767,8 +767,8 @@ HandleFlyWarpOrDungeonWarp:: ; 0794 (0:0794)
|
||||
|
||||
LeaveMapAnim:: ; 07bc (0:07bc)
|
||||
jpba _LeaveMapAnim
|
||||
|
||||
Func_07c4:: ; 07c4 (0:07c4)
|
||||
|
||||
Func_07c4:: ; 07c4 (0:07c4)
|
||||
ld a, [wWalkBikeSurfState]
|
||||
and a
|
||||
ret z
|
||||
@ -779,7 +779,7 @@ Func_07c4:: ; 07c4 (0:07c4)
|
||||
ret z
|
||||
call PlayDefaultMusic
|
||||
ret
|
||||
|
||||
|
||||
LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7)
|
||||
; Load sprite graphics based on whether the player is standing, biking, or surfing.
|
||||
|
||||
@ -797,7 +797,7 @@ LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7)
|
||||
jr .startWalking
|
||||
|
||||
.ridingBike
|
||||
; If the bike can't be used,
|
||||
; If the bike can't be used,
|
||||
; start walking instead.
|
||||
call IsBikeRidingAllowed
|
||||
jr c, .determineGraphics
|
||||
@ -819,7 +819,7 @@ LoadPlayerSpriteGraphics:: ; 07d7 (0:07d7)
|
||||
jp LoadWalkingPlayerSpriteGraphics
|
||||
|
||||
IsBikeRidingAllowed:: ; 0805 (0:0805)
|
||||
; The bike can be used on Route 23 and Indigo Plateau,
|
||||
; The bike can be used on Route 23 and Indigo Plateau,
|
||||
; or maps with tilesets in BikeRidingTilesets.
|
||||
; Return carry if biking is allowed.
|
||||
|
||||
@ -1157,7 +1157,7 @@ IsSpriteInFrontOfPlayer2:: ; 0985 (0:0985)
|
||||
.dontwritetowd436
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
SignLoop:: ; 09f2 (0:09f2)
|
||||
; search if a player is facing a sign
|
||||
ld hl, wSignCoords ; start of sign coordinates
|
||||
@ -1480,7 +1480,7 @@ CopyToRedrawRowOrColumnSrcTiles:: ; 0baa (0:0baa)
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
ScheduleSouthRowRedraw:: ; 0bb6 (0:0bb6)
|
||||
coord hl, 0, 16
|
||||
call CopyToRedrawRowOrColumnSrcTiles
|
||||
@ -1601,7 +1601,7 @@ JoypadOverworld:: ; 0c51 (0:0c51)
|
||||
call ForceBikeDown
|
||||
call AreInputsSimulated
|
||||
ret
|
||||
|
||||
|
||||
ForceBikeDown:: ; 0c65 (0:0c65)
|
||||
ld a, [wFlags_D733]
|
||||
bit 3, a ; check if a trainer wants a challenge
|
||||
@ -1615,7 +1615,7 @@ ForceBikeDown:: ; 0c65 (0:0c65)
|
||||
ld a, D_DOWN
|
||||
ld [hJoyHeld], a ; on the cycling road, if there isn't a trainer and the player isn't pressing buttons, simulate a down press
|
||||
ret
|
||||
|
||||
|
||||
AreInputsSimulated:: ; 0c7b (0:0c7b)
|
||||
ld a, [wd730]
|
||||
bit 7, a
|
||||
@ -1634,7 +1634,7 @@ AreInputsSimulated:: ; 0c7b (0:0c7b)
|
||||
ld [hJoyPressed], a
|
||||
ld [hJoyReleased], a
|
||||
ret
|
||||
|
||||
|
||||
; if done simulating button presses
|
||||
.doneSimulating
|
||||
xor a
|
||||
@ -1650,7 +1650,7 @@ AreInputsSimulated:: ; 0c7b (0:0c7b)
|
||||
ld hl, wd730
|
||||
res 7, [hl]
|
||||
ret
|
||||
|
||||
|
||||
GetSimulatedInput:: ; 0cb3 (0:0cb3)
|
||||
ld hl, wSimulatedJoypadStatesIndex
|
||||
dec [hl]
|
||||
@ -1676,8 +1676,8 @@ GetSimulatedInput:: ; 0cb3 (0:0cb3)
|
||||
; It seems that this function has a bug in it, but due to luck, it doesn't
|
||||
; show up. After detecting a sprite collision, it jumps to the code that
|
||||
; checks if the next tile is passable instead of just directly jumping to the
|
||||
; "collision detected" code. However, it doesn't store the next tile in c,
|
||||
; so the old value of c is used. 2429 is always called before this function,
|
||||
; "collision detected" code. However, it doesn't store the next tile in c,
|
||||
; so the old value of c is used. 2429 is always called before this function,
|
||||
; and 2429 always sets c to 0xF0. There is no 0xF0 background tile, so it
|
||||
; is considered impassable and it is detected as a collision.
|
||||
CollisionCheckOnWater:: ; 0cca (0:0cca)
|
||||
@ -1725,7 +1725,7 @@ CollisionCheckOnWater:: ; 0cca (0:0cca)
|
||||
jr .noCollision
|
||||
.noCollision ; ...and they do the same mistake twice
|
||||
and a
|
||||
.done
|
||||
.done
|
||||
ret
|
||||
|
||||
; function to run the current map's script
|
||||
@ -1762,7 +1762,7 @@ LoadWalkingPlayerSpriteGraphics:: ; 0d5e (0:0d5e)
|
||||
ld b, BANK(RedSprite)
|
||||
ld de, RedSprite ; $4180
|
||||
jr LoadPlayerSpriteGraphicsCommon
|
||||
|
||||
|
||||
LoadSurfingPlayerSpriteGraphics2:: ; 0d69 (0:0d69)
|
||||
ld a, [wd473]
|
||||
and a
|
||||
@ -1779,7 +1779,7 @@ LoadSurfingPlayerSpriteGraphics2:: ; 0d69 (0:0d69)
|
||||
ld b, BANK(SurfingPikachuSprite)
|
||||
ld de, SurfingPikachuSprite ; 3f:6def
|
||||
jr LoadPlayerSpriteGraphicsCommon
|
||||
|
||||
|
||||
LoadSurfingPlayerSpriteGraphics:: ; 0d83 (0:0d83)
|
||||
ld b, BANK(RedSprite) ; not sure, but probably same bank (5)
|
||||
ld de, SeelSprite
|
||||
@ -1968,7 +1968,7 @@ CopySignData:: ; 0eb3 (0:0eb3)
|
||||
dec a
|
||||
jr nz, .signcopyloop
|
||||
ret
|
||||
|
||||
|
||||
; function to load map data
|
||||
LoadMapData:: ; 1241 (0:1241)
|
||||
ld a, [H_LOADEDROMBANK]
|
||||
@ -2032,7 +2032,7 @@ Func_0f3d:: ; 0f3d (0:0f3d)
|
||||
asm_0f4d: ; 0f4d (0:0f4d)
|
||||
jpab Func_f02da
|
||||
ret ; useless?
|
||||
|
||||
|
||||
ResetMapVariables:: ; 0f56 (0:0f56)
|
||||
ld a, $98
|
||||
ld [wMapViewVRAMPointer + 1], a
|
||||
@ -2127,9 +2127,9 @@ ForceBikeOrSurf:: ; 0fd6 (0:0fd6)
|
||||
ld hl, LoadPlayerSpriteGraphics
|
||||
call Bankswitch
|
||||
jp PlayDefaultMusic ; update map/player state?
|
||||
|
||||
|
||||
; Handle the player jumping down
|
||||
; a ledge in the overworld.
|
||||
; a ledge in the overworld.
|
||||
HandleMidJump:: ; 0fe1 (0:0fe1)
|
||||
ld a, [wd736]
|
||||
bit 6, a ; jumping down a ledge?
|
||||
@ -2142,7 +2142,7 @@ IsSpinning:: ; 0ff0 (0:0ff0)
|
||||
bit 7, a
|
||||
ret z ; no spinning
|
||||
jpba LoadSpinnerArrowTiles ; spin while moving
|
||||
|
||||
|
||||
Func_0ffe:: ; 0ffe (0:0ffe)
|
||||
jpab IsPlayerTalkingToPikachu
|
||||
|
||||
@ -2214,7 +2214,7 @@ ZeroSpriteStateData:: ; 1050 (0:1050)
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
DisableRegularSprites:: ; 1060 (0:1060)
|
||||
; initialize all C100-C1FF sprite entries to disabled (other than player's and pikachu)
|
||||
ld hl, wSpriteStateData1 + 1 * $10 + 2
|
||||
@ -2226,7 +2226,7 @@ DisableRegularSprites:: ; 1060 (0:1060)
|
||||
dec c
|
||||
jr nz, .loop
|
||||
ret
|
||||
|
||||
|
||||
LoadSprite:: ; 106f (0:106f)
|
||||
push hl
|
||||
ld b, $0
|
||||
@ -2256,7 +2256,7 @@ LoadSprite:: ; 106f (0:106f)
|
||||
ld [hl], a
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
.trainerSprite
|
||||
ld a, [hli]
|
||||
ld [$ff8d], a ; save trainer class
|
||||
@ -2271,7 +2271,7 @@ LoadSprite:: ; 106f (0:106f)
|
||||
ld [hl], a ; store trainer number in byte 1 of the entry
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
.itemBallSprite
|
||||
ld a, [hli]
|
||||
ld [$ff8d], a ; save item number
|
||||
@ -2283,4 +2283,4 @@ LoadSprite:: ; 106f (0:106f)
|
||||
xor a
|
||||
ld [hl], a ; zero byte 1, since it is not used
|
||||
pop hl
|
||||
ret ; end of home/overworld.asm = 10b9 (0:10b9)
|
||||
ret ; end of home/overworld.asm = 10b9 (0:10b9)
|
||||
|
@ -20,7 +20,7 @@ Func_1525:: ; 1525 (0:1525)
|
||||
res 3, [hl]
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
Func_152d:: ; 152d (0:152d)
|
||||
push hl
|
||||
ld hl, wPikachuOverworldStateFlags
|
||||
@ -29,7 +29,7 @@ Func_152d:: ; 152d (0:152d)
|
||||
ld [hl], $ff
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
DisablePikachuFollowingPlayer:: ; 153a (0:153a)
|
||||
push hl
|
||||
ld hl, wPikachuOverworldStateFlags
|
||||
@ -43,14 +43,14 @@ EnablePikachuFollowingPlayer:: ; 1542 (0:1542)
|
||||
res 1, [hl]
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
CheckPikachuFollowingPlayer:: ; 154a (0:154a)
|
||||
push hl
|
||||
ld hl, wPikachuOverworldStateFlags
|
||||
bit 1, [hl]
|
||||
pop hl
|
||||
ret
|
||||
|
||||
|
||||
Func_1552:: ; 1552 (0:1552)
|
||||
ld a, [hl]
|
||||
dec a
|
||||
@ -78,7 +78,7 @@ Func_1568:: ; 1568 (0:1568)
|
||||
dec hl
|
||||
and a
|
||||
ret
|
||||
|
||||
|
||||
Func_157c:: ; 157c (0:157c)
|
||||
push hl
|
||||
push bc
|
||||
|
@ -58,7 +58,7 @@ PlaceNextChar:: ; 1724 (0:1724)
|
||||
pop hl
|
||||
ret
|
||||
|
||||
Char4ETest:: ; 172d (0:172d)
|
||||
Char4ETest:: ; 172d (0:172d)
|
||||
cp $4E
|
||||
jr nz, .next
|
||||
ld bc, $0028
|
||||
@ -304,7 +304,7 @@ Char49:: ; 18a3 (0:18a3)
|
||||
jr z, .Char49
|
||||
ld a, $4e
|
||||
jp Char4ETest
|
||||
|
||||
|
||||
.Char49
|
||||
push de
|
||||
ld a, $EE
|
||||
|
@ -9,7 +9,7 @@ VBlank:: ; 1de5 (0:1de5)
|
||||
push af
|
||||
xor a
|
||||
ld [rVBK], a ; reset vram bank to 0
|
||||
|
||||
|
||||
ld a, [H_LOADEDROMBANK]
|
||||
ld [wVBlankSavedROMBank], a
|
||||
|
||||
@ -39,7 +39,7 @@ VBlank:: ; 1de5 (0:1de5)
|
||||
|
||||
; VBlank-sensitive operations end.
|
||||
call TrackPlayTime ; keep track of time played
|
||||
|
||||
|
||||
call Random
|
||||
call ReadJoypad
|
||||
|
||||
@ -58,10 +58,10 @@ VBlank:: ; 1de5 (0:1de5)
|
||||
.skipDec
|
||||
|
||||
call FadeOutAudio
|
||||
|
||||
|
||||
callbs Music_DoLowHealthAlarm
|
||||
callbs Audio1_UpdateMusic
|
||||
|
||||
|
||||
call SerialFunction
|
||||
|
||||
ld a, [wVBlankSavedROMBank]
|
||||
@ -70,7 +70,7 @@ VBlank:: ; 1de5 (0:1de5)
|
||||
|
||||
pop af
|
||||
ld [rVBK],a
|
||||
|
||||
|
||||
pop hl
|
||||
pop de
|
||||
pop bc
|
||||
|
@ -335,7 +335,7 @@ VBlankCopy:: ; 1c21 (0:1c21)
|
||||
ld [H_VBCOPYSRC],sp
|
||||
ld sp,hl
|
||||
ld [H_VBCOPYDEST],sp
|
||||
|
||||
|
||||
ld a, [H_SPTEMP]
|
||||
ld l, a
|
||||
ld a, [H_SPTEMP + 1]
|
||||
@ -356,7 +356,7 @@ UpdateMovingBgTiles:: ; 1c75 (0:1c75)
|
||||
ld a,[rLY]
|
||||
cp $90 ; check if not in vblank period??? (maybe if vblank is too long)
|
||||
ret c
|
||||
|
||||
|
||||
ld a, [hMovingBGTilesCounter1]
|
||||
inc a
|
||||
ld [hMovingBGTilesCounter1], a
|
||||
|
12
macros.asm
12
macros.asm
@ -64,7 +64,7 @@ homecall_jump_sf: MACRO
|
||||
ld a,b
|
||||
jp BankswitchCommon
|
||||
ENDM
|
||||
|
||||
|
||||
homecall: MACRO
|
||||
ld a, [H_LOADEDROMBANK]
|
||||
push af
|
||||
@ -90,13 +90,13 @@ switchbank: MACRO
|
||||
ld a, BANK(\1)
|
||||
call BankswitchCommon
|
||||
ENDM
|
||||
|
||||
|
||||
callbs: MACRO
|
||||
ld a, BANK(\1)
|
||||
call BankswitchCommon
|
||||
call \1
|
||||
ENDM
|
||||
|
||||
|
||||
callba: MACRO
|
||||
ld b, BANK(\1)
|
||||
ld hl, \1
|
||||
@ -115,7 +115,7 @@ calladb_ModifyPikachuHappiness: MACRO
|
||||
ld b, BANK(ModifyPikachuHappiness)
|
||||
call Bankswitch
|
||||
ENDM
|
||||
|
||||
|
||||
callabd_ModifyPikachuHappiness: MACRO
|
||||
ld hl, ModifyPikachuHappiness
|
||||
ld b, BANK(ModifyPikachuHappiness)
|
||||
@ -379,11 +379,11 @@ predef_jump: MACRO
|
||||
predef_id \1
|
||||
jp Predef
|
||||
ENDM
|
||||
|
||||
|
||||
tx_pre_const: MACRO
|
||||
const \1_id
|
||||
ENDM
|
||||
|
||||
|
||||
add_tx_pre: MACRO
|
||||
\1_id:: dw \1
|
||||
ENDM
|
||||
|
@ -104,7 +104,7 @@ Func_f1c1b:
|
||||
call PrintText
|
||||
.asm_f1cfc
|
||||
ret
|
||||
|
||||
|
||||
Museum1FText_f1cfd:
|
||||
TX_FAR _Museum1FText_5c21a
|
||||
db "@"
|
||||
|
@ -604,7 +604,7 @@ OaksLabScript20:
|
||||
callba Music_RivalAlternateStart
|
||||
ld a, $1
|
||||
ld [hSpriteIndexOrTextID], a
|
||||
ld de, wNPCMovementDirections2
|
||||
ld de, wNPCMovementDirections2
|
||||
call MoveSprite
|
||||
ld a, $15
|
||||
ld [W_OAKSLABCURSCRIPT], a
|
||||
@ -887,7 +887,7 @@ OaksLabText3:
|
||||
call PrintText
|
||||
.asm_1ca6f
|
||||
jp TextScriptEnd
|
||||
|
||||
|
||||
OaksLabText_1ca72:
|
||||
TX_FAR _OaksLabPikachuText
|
||||
db "@"
|
||||
|
@ -127,7 +127,7 @@ PalletTownScript3: ; 18f12 (6:4f12)
|
||||
ld a, SPRITE_FACING_LEFT
|
||||
.asm_18f01
|
||||
ld [wSpriteStateData1 + 1 * $10 + 9], a
|
||||
|
||||
|
||||
; trigger the next script
|
||||
ld a, 4
|
||||
ld [W_PALLETTOWNCURSCRIPT], a
|
||||
@ -188,7 +188,7 @@ PalletTownScript6: ; 18f87 (6:4f87)
|
||||
ld a, 7
|
||||
ld [W_PALLETTOWNCURSCRIPT], a
|
||||
ret
|
||||
|
||||
|
||||
PalletTownScript7:
|
||||
ld a, [wNPCMovementScriptPointerTableNum]
|
||||
and a
|
||||
@ -198,7 +198,7 @@ PalletTownScript7:
|
||||
ld a, 8
|
||||
ld [W_PALLETTOWNCURSCRIPT], a
|
||||
ret
|
||||
|
||||
|
||||
PalletTownScript8:
|
||||
CheckEvent EVENT_DAISY_WALKING
|
||||
jr nz, .asm_18f9e
|
||||
|
@ -84,7 +84,7 @@ Func_f192c:
|
||||
ViridianCityText_f1945:
|
||||
TX_FAR _ViridianCityText_19191
|
||||
db "@"
|
||||
|
||||
|
||||
Func_f194a:
|
||||
CheckEvent EVENT_GOT_TM42
|
||||
jr nz, .asm_f1972
|
||||
@ -157,7 +157,7 @@ ViridianCityText_f19bb:
|
||||
ViridianCityText_f19c0:
|
||||
TX_FAR _OldManAgainText3
|
||||
db "@"
|
||||
|
||||
|
||||
Func_f19c5:
|
||||
ld hl, ViridianCityText_f19cc
|
||||
call PrintText
|
||||
|
2
text.asm
2
text.asm
@ -1483,7 +1483,7 @@ _WithExpAllText::
|
||||
_BoostedText::
|
||||
text "a boosted"
|
||||
cont "@@"
|
||||
|
||||
|
||||
_ExpPointsText::
|
||||
TX_NUM wExpAmountGained, 2, 4
|
||||
text " EXP. Points!"
|
||||
|
24
wram.asm
24
wram.asm
@ -427,7 +427,7 @@ wc710:: ; c710
|
||||
ds $f0
|
||||
wc800:: ; c800
|
||||
ds $178
|
||||
|
||||
|
||||
wPrinterTileBuffer:: ; c978
|
||||
ds SCREEN_HEIGHT * SCREEN_WIDTH
|
||||
wcae0:: ; cae0
|
||||
@ -1131,7 +1131,7 @@ wPlayerSpinWhileMovingUpOrDownAnimFrameDelay:: ; cd3f
|
||||
wHiddenObjectIndex:: ; cd3f
|
||||
|
||||
wTrainerFacingDirection:: ; cd3f
|
||||
|
||||
|
||||
ds 1
|
||||
|
||||
wHoFMonOrPlayer:: ; cd40
|
||||
@ -1485,7 +1485,7 @@ wScriptedNPCWalkCounter:: ; cf18
|
||||
wOnSGB:: ; cf1b
|
||||
; if running on SGB, it's 1, else it's 0
|
||||
ds 1
|
||||
|
||||
|
||||
wDefaultPaletteCommand:: ; cf1c
|
||||
ds 1
|
||||
|
||||
@ -2676,7 +2676,7 @@ wExpressionNumber:: ; d447
|
||||
ds 1
|
||||
wExpressionNumber2::
|
||||
ds 1
|
||||
|
||||
|
||||
wd44a:: ds 1 ; d449
|
||||
wd44b:: ds 1
|
||||
wd44c:: ds 1
|
||||
@ -2702,9 +2702,9 @@ wPikachuHappiness:: ds 1 ; d46f
|
||||
wPikachuMood:: ds 1 ; d470
|
||||
wd472:: ds 1
|
||||
wd473:: ds 1
|
||||
|
||||
|
||||
ds 1
|
||||
|
||||
|
||||
wd475:: ds 1
|
||||
|
||||
ds 4
|
||||
@ -2712,16 +2712,16 @@ wd475:: ds 1
|
||||
wd47a:: ds 1
|
||||
|
||||
ds 24
|
||||
|
||||
|
||||
wPreventBlackout:: ds 1 ; d492
|
||||
|
||||
|
||||
ds 1
|
||||
|
||||
|
||||
wd495:: ds 1
|
||||
wd496:: ds 1
|
||||
wd497:: ds 1
|
||||
wd498:: ds 1
|
||||
|
||||
|
||||
wUnknownSerialFlag_d499:: ds 1 ; d498
|
||||
wUnknownSerialFlag_d49a:: ds 1 ; d499
|
||||
wUnknownSerialFlag_d49b:: ds 1 ; d49a
|
||||
@ -3246,7 +3246,7 @@ wSecondLockTrashCanIndex:: ; d744
|
||||
ds 1
|
||||
|
||||
ds 2
|
||||
|
||||
|
||||
wEventFlags::
|
||||
wd747:: ds 3 ; below here are mostly in game flags
|
||||
wd74a:: ds 1
|
||||
@ -3406,7 +3406,7 @@ wWaterRate:: db ; d8a4
|
||||
wWaterMons:: db ; d8a5
|
||||
|
||||
ds wWaterRate - @
|
||||
|
||||
|
||||
wEnemyMons:: ; d8a4
|
||||
wEnemyMon1:: party_struct wEnemyMon1
|
||||
wEnemyMon2:: party_struct wEnemyMon2
|
||||
|
Loading…
x
Reference in New Issue
Block a user