mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-04-09 05:44:44 -07:00
Move effects; no more reloadmapmusic, returnafterbattle
This commit is contained in:
parent
f485a45cda
commit
2bd45ca574
@ -663,7 +663,7 @@ EnemyPotionFinish: ; 38436
|
||||
call PrintText_UsedItemOn
|
||||
hlcoord 2, 2
|
||||
xor a
|
||||
ld [wd10a], a
|
||||
ld [wWhichHPBar], a
|
||||
call AIUsedItemSound
|
||||
predef AnimateHPBar
|
||||
jp AIUpdateHUD
|
||||
|
@ -2098,7 +2098,7 @@ UpdateHPBar: ; 3cd3c
|
||||
xor a
|
||||
.ok
|
||||
push bc
|
||||
ld [wd10a], a
|
||||
ld [wWhichHPBar], a
|
||||
predef AnimateHPBar
|
||||
pop bc
|
||||
ret
|
||||
@ -2494,7 +2494,7 @@ WinTrainerBattle: ; 3cfa4
|
||||
jr nz, .skip_heal
|
||||
predef HealParty
|
||||
.skip_heal
|
||||
ld a, [wc2cc]
|
||||
ld a, [wMonStatusFlags]
|
||||
bit 0, a
|
||||
jr nz, .skip_win_loss_text
|
||||
call PrintWinLossText
|
||||
@ -2888,7 +2888,7 @@ AskUseNextPokemon: ; 3d1f8
|
||||
ForcePlayerMonChoice: ; 3d227
|
||||
call EmptyBattleTextBox
|
||||
call LoadStandardMenuDataHeader
|
||||
call Function3d2f7
|
||||
call SetUpBattlePartyMenu_NoLoop
|
||||
call ForcePickPartyMonInBattle
|
||||
ld a, [wLinkMode]
|
||||
and a
|
||||
@ -2992,12 +2992,12 @@ IsMobileBattle: ; 3d2f1
|
||||
ret
|
||||
; 3d2f7
|
||||
|
||||
Function3d2f7: ; 3d2f7
|
||||
SetUpBattlePartyMenu_NoLoop: ; 3d2f7
|
||||
call ClearBGPalettes
|
||||
Function3d2fa: ; switch to fullscreen menu?
|
||||
SetUpBattlePartyMenu: ; switch to fullscreen menu?
|
||||
callba LoadPartyMenuGFX
|
||||
callba InitPartyMenuWithCancel
|
||||
callba Function8e85
|
||||
callba InitBattlePartyMenuPals
|
||||
callba InitPartyMenuGFX
|
||||
ret
|
||||
; 3d313
|
||||
@ -3113,7 +3113,7 @@ LostBattle: ; 3d38e
|
||||
ld c, 40
|
||||
call DelayFrames
|
||||
|
||||
ld a, [wc2cc]
|
||||
ld a, [wMonStatusFlags]
|
||||
bit 0, a
|
||||
jr nz, .skip_win_loss_text
|
||||
call PrintWinLossText
|
||||
@ -3701,7 +3701,7 @@ OfferSwitch: ; 3d74b
|
||||
ld a, [wMenuCursorY]
|
||||
dec a
|
||||
jr nz, .said_no
|
||||
call Function3d2f7
|
||||
call SetUpBattlePartyMenu_NoLoop
|
||||
call PickSwitchMonInBattle
|
||||
jr c, .canceled_switch
|
||||
ld a, [CurBattleMon]
|
||||
@ -4563,14 +4563,14 @@ HandleHPHealingItem: ; 3dd2f
|
||||
ld a, [Buffer5]
|
||||
ld [de], a
|
||||
ld a, [hBattleTurn]
|
||||
ld [wd10a], a
|
||||
ld [wWhichHPBar], a
|
||||
and a
|
||||
hlcoord 2, 2
|
||||
jr z, .got_hp_bar_coords
|
||||
hlcoord 10, 9
|
||||
|
||||
.got_hp_bar_coords
|
||||
ld [wd10a], a
|
||||
ld [wWhichHPBar], a
|
||||
predef AnimateHPBar
|
||||
UseOpponentItem:
|
||||
call RefreshBattleHuds
|
||||
@ -5113,7 +5113,7 @@ DrawEnemyHUD: ; 3e043
|
||||
|
||||
.draw_bar
|
||||
xor a
|
||||
ld [wd10a], a
|
||||
ld [wWhichHPBar], a
|
||||
hlcoord 2, 2
|
||||
ld b, 0
|
||||
call DrawBattleHPBar
|
||||
@ -5332,7 +5332,7 @@ Function3e290:
|
||||
call LoadStandardMenuDataHeader
|
||||
call ClearBGPalettes
|
||||
BattleMenuPKMN_Loop:
|
||||
call Function3d2fa
|
||||
call SetUpBattlePartyMenu
|
||||
xor a
|
||||
ld [PartyMenuActionText], a
|
||||
call Function3d313
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -202,7 +202,7 @@ Functiond6f5: ; d6f5
|
||||
Functiond730: ; d730
|
||||
call Functiond784
|
||||
ld d, $6
|
||||
ld a, [wd10a]
|
||||
ld a, [wWhichHPBar]
|
||||
and $1
|
||||
ld b, a
|
||||
ld a, [wd1f1]
|
||||
@ -228,7 +228,7 @@ Functiond749: ; d749
|
||||
call ComputeHPBarPixels
|
||||
ld c, e
|
||||
ld d, $6
|
||||
ld a, [wd10a]
|
||||
ld a, [wWhichHPBar]
|
||||
and $1
|
||||
ld b, a
|
||||
push de
|
||||
@ -239,7 +239,7 @@ Functiond749: ; d749
|
||||
; d771
|
||||
|
||||
Functiond771: ; d771
|
||||
ld a, [wd10a]
|
||||
ld a, [wWhichHPBar]
|
||||
cp $2
|
||||
jr nz, .skip
|
||||
ld a, $28
|
||||
@ -254,7 +254,7 @@ Functiond771: ; d771
|
||||
; d784
|
||||
|
||||
Functiond784: ; d784
|
||||
ld a, [wd10a]
|
||||
ld a, [wWhichHPBar]
|
||||
and a
|
||||
ret z
|
||||
cp $1
|
||||
@ -292,7 +292,7 @@ Functiond7b4: ; d7b4
|
||||
call SetHPPal
|
||||
ld a, [wd1f0]
|
||||
ld c, a
|
||||
callba Function8c43
|
||||
callba ApplyHPBarPals
|
||||
ret
|
||||
; d7c9
|
||||
|
||||
@ -305,7 +305,7 @@ Functiond7c9: ; d7c9
|
||||
ret
|
||||
|
||||
.cgb
|
||||
ld a, [wd10a]
|
||||
ld a, [wWhichHPBar]
|
||||
and a
|
||||
jr z, .load_0
|
||||
cp $1
|
||||
|
@ -324,21 +324,21 @@ Function8bec: ; 8bec
|
||||
ret
|
||||
; 8c1d
|
||||
|
||||
Function8c1d: ; 8c1d
|
||||
ApplyMonOrTrainerPals: ; 8c1d
|
||||
call CheckCGB
|
||||
ret z
|
||||
ld a, e
|
||||
and a
|
||||
jr z, .asm_8c2d
|
||||
jr z, .get_trainer
|
||||
ld a, [CurPartySpecies]
|
||||
call GetMonPalettePointer_
|
||||
jr .asm_8c33
|
||||
jr .load_palettes
|
||||
|
||||
.asm_8c2d
|
||||
.get_trainer
|
||||
ld a, [TrainerClass]
|
||||
call GetTrainerPalettePointer
|
||||
|
||||
.asm_8c33
|
||||
.load_palettes
|
||||
ld de, UnknBGPals
|
||||
call LoadPalette_White_Col1_Col2_Black
|
||||
call WipeAttrMap
|
||||
@ -347,24 +347,24 @@ Function8c1d: ; 8c1d
|
||||
ret
|
||||
; 8c43
|
||||
|
||||
Function8c43: ; 8c43
|
||||
ld a, [wd10a]
|
||||
ApplyHPBarPals: ; 8c43
|
||||
ld a, [wWhichHPBar]
|
||||
and a
|
||||
jr z, .asm_8c52
|
||||
jr z, .Enemy
|
||||
cp $1
|
||||
jr z, .asm_8c57
|
||||
jr z, .Player
|
||||
cp $2
|
||||
jr z, .asm_8c70
|
||||
jr z, .PartyMenu
|
||||
ret
|
||||
|
||||
.asm_8c52
|
||||
.Enemy
|
||||
ld de, BGPals + 2 palettes + 2
|
||||
jr .asm_8c5a
|
||||
jr .okay
|
||||
|
||||
.asm_8c57
|
||||
.Player
|
||||
ld de, BGPals + 3 palettes + 2
|
||||
|
||||
.asm_8c5a
|
||||
.okay
|
||||
ld l, c
|
||||
ld h, $0
|
||||
rept 2
|
||||
@ -372,27 +372,27 @@ rept 2
|
||||
endr
|
||||
ld bc, Palettes_a8be
|
||||
add hl, bc
|
||||
ld bc, $4
|
||||
ld bc, 4
|
||||
ld a, $5
|
||||
call FarCopyWRAM
|
||||
ld a, $1
|
||||
ld [hCGBPalUpdate], a
|
||||
ret
|
||||
|
||||
.asm_8c70
|
||||
.PartyMenu
|
||||
ld e, c
|
||||
inc e
|
||||
hlcoord 11, 1, AttrMap
|
||||
ld bc, $28
|
||||
ld bc, 2 * SCREEN_WIDTH
|
||||
ld a, [CurPartyMon]
|
||||
.asm_8c7b
|
||||
.loop
|
||||
and a
|
||||
jr z, .asm_8c82
|
||||
jr z, .done
|
||||
add hl, bc
|
||||
dec a
|
||||
jr .asm_8c7b
|
||||
jr .loop
|
||||
|
||||
.asm_8c82
|
||||
.done
|
||||
lb bc, 2, 8
|
||||
ld a, e
|
||||
call FillBoxCGB
|
||||
@ -2088,7 +2088,7 @@ TilesetColors4: ; b289
|
||||
db $18, $19, $1a, $1b, $1c, $1d, $1e, $1f
|
||||
; b309
|
||||
|
||||
Palette_b309: ; b309
|
||||
Palette_b309: ; b309 mobile
|
||||
RGB 31, 31, 31
|
||||
RGB 31, 19, 24
|
||||
RGB 30, 10, 06
|
||||
@ -2096,7 +2096,7 @@ Palette_b309: ; b309
|
||||
|
||||
; b311
|
||||
|
||||
Palette_b311: ; b311
|
||||
Palette_b311: ; b311 not mobile
|
||||
RGB 31, 31, 31
|
||||
RGB 17, 19, 31
|
||||
RGB 14, 16, 31
|
||||
|
@ -144,7 +144,7 @@ RandomEncounter:: ; 97cc0
|
||||
WildBattleScript: ; 97cf9
|
||||
randomwildmon
|
||||
startbattle
|
||||
returnafterbattle
|
||||
reloadmapafterbattle
|
||||
end
|
||||
; 97cfd
|
||||
|
||||
|
@ -68,7 +68,7 @@ OptionsMenu: ; 5b64
|
||||
|
||||
NewGame: ; 5b6b
|
||||
xor a
|
||||
ld [wc2cc], a
|
||||
ld [wMonStatusFlags], a
|
||||
call ResetWRAM
|
||||
call NewGame_ClearTileMapEtc
|
||||
call AreYouABoyOrAreYouAGirl
|
||||
@ -86,7 +86,7 @@ NewGame: ; 5b6b
|
||||
; 5b8f
|
||||
|
||||
AreYouABoyOrAreYouAGirl: ; 5b8f
|
||||
callba Function10632f ; some mobile stuff
|
||||
callba Mobile_AlwaysReturnNotCarry ; some mobile stuff
|
||||
jr c, .ok
|
||||
callba InitGender
|
||||
ret
|
||||
@ -211,9 +211,9 @@ ENDC
|
||||
ld [Money + 2], a
|
||||
|
||||
xor a
|
||||
ld [wdc17], a
|
||||
ld [wWhichMomItem], a
|
||||
|
||||
ld hl, wdc19
|
||||
ld hl, MomItemTriggerBalance
|
||||
ld [hl], 2300 / $10000
|
||||
inc hl
|
||||
ld [hl], 2300 / $100 % $100
|
||||
@ -385,7 +385,7 @@ Continue: ; 5d65
|
||||
ld c, 20
|
||||
call DelayFrames
|
||||
callba JumpRoamMons
|
||||
callba Function105091 ; Mystery Gift
|
||||
callba MysteryGift_CopyReceivedDecosToPC ; Mystery Gift
|
||||
callba Function140ae ; time-related
|
||||
ld a, [wSpawnAfterChampion]
|
||||
cp SPAWN_LANCE
|
||||
@ -399,14 +399,14 @@ Continue: ; 5d65
|
||||
|
||||
.SpawnAfterE4
|
||||
ld a, SPAWN_NEW_BARK
|
||||
ld [wd001], a
|
||||
ld [DefaultSpawnpoint], a
|
||||
call PostCreditsSpawn
|
||||
jp FinishContinueFunction
|
||||
; 5de2
|
||||
|
||||
SpawnAfterRed: ; 5de2
|
||||
ld a, SPAWN_MT_SILVER
|
||||
ld [wd001], a
|
||||
ld [DefaultSpawnpoint], a
|
||||
; 5de7
|
||||
|
||||
PostCreditsSpawn: ; 5de7
|
||||
@ -418,8 +418,11 @@ PostCreditsSpawn: ; 5de7
|
||||
; 5df0
|
||||
|
||||
Continue_MobileAdapterMenu: ; 5df0
|
||||
callba Function10632f ; mobile check
|
||||
callba Mobile_AlwaysReturnNotCarry ; mobile check
|
||||
ret nc
|
||||
|
||||
; the rest of this stuff is never reached because
|
||||
; the previous function returns with carry not set
|
||||
ld hl, wd479
|
||||
bit 1, [hl]
|
||||
ret nz
|
||||
@ -480,7 +483,7 @@ Continue_CheckRTC_RestartClock: ; 5e48
|
||||
FinishContinueFunction: ; 5e5d
|
||||
.loop
|
||||
xor a
|
||||
ld [wc2c1], a
|
||||
ld [wDontPlayMapMusicOnReload], a
|
||||
ld [wLinkMode], a
|
||||
ld hl, GameTimerPause
|
||||
set 0, [hl]
|
||||
@ -641,7 +644,7 @@ Continue_DisplayBadgeCount: ; 5f58
|
||||
|
||||
Continue_DisplayPokedexNumCaught: ; 5f6b
|
||||
ld a, [StatusFlags]
|
||||
bit 0, a
|
||||
bit 0, a ; Pokedex
|
||||
ret z
|
||||
push hl
|
||||
ld hl, PokedexCaught
|
||||
@ -787,7 +790,7 @@ NamePlayer: ; 0x6074
|
||||
dec a
|
||||
jr z, .NewName
|
||||
call StorePlayerName
|
||||
callba Function8c1d
|
||||
callba ApplyMonOrTrainerPals
|
||||
callba MovePlayerPicLeft
|
||||
ret
|
||||
|
||||
@ -1024,7 +1027,7 @@ StartTitleScreen: ; 6219
|
||||
call .TitleScreen
|
||||
call DelayFrame
|
||||
.loop
|
||||
call Function627b
|
||||
call RunTitleScreen
|
||||
jr nc, .loop
|
||||
|
||||
call ClearSprites
|
||||
@ -1079,7 +1082,7 @@ endr
|
||||
ret
|
||||
; 627b
|
||||
|
||||
Function627b: ; 627b
|
||||
RunTitleScreen: ; 627b
|
||||
ld a, [wJumptableIndex]
|
||||
bit 7, a
|
||||
jr nz, .done_title
|
||||
@ -1126,7 +1129,7 @@ endr
|
||||
dw TitleScreenEnd
|
||||
; 62b7
|
||||
|
||||
Function62b7: ; Unreferenced
|
||||
.NextScene ; Unreferenced
|
||||
ld hl, wJumptableIndex
|
||||
inc [hl]
|
||||
ret
|
||||
@ -1152,7 +1155,7 @@ TitleScreenEntrance: ; 62bc
|
||||
; Reversed signage for every other line's position.
|
||||
; This is responsible for the interlaced effect.
|
||||
ld a, e
|
||||
xor -1
|
||||
xor $ff
|
||||
inc a
|
||||
|
||||
ld b, 8 * 10 / 2 ; logo height / 2
|
||||
@ -1191,7 +1194,7 @@ TitleScreenTimer: ; 62f6
|
||||
|
||||
; Start a timer
|
||||
ld hl, wcf65
|
||||
ld de, $1140 ; 73.6 seconds
|
||||
ld de, 73 * 60 + 36
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld [hl], d
|
||||
@ -1225,7 +1228,7 @@ TitleScreenMain: ; 6304
|
||||
; To bring up the clock reset dialog:
|
||||
|
||||
; Hold Down + B + Select to initiate the sequence.
|
||||
ld a, [$ffeb]
|
||||
ld a, [hClockResetTrigger]
|
||||
cp $34
|
||||
jr z, .check_clock_reset
|
||||
|
||||
@ -1235,17 +1238,17 @@ TitleScreenMain: ; 6304
|
||||
jr nz, .check_start
|
||||
|
||||
ld a, $34
|
||||
ld [$ffeb], a
|
||||
ld [hClockResetTrigger], a
|
||||
jr .check_start
|
||||
|
||||
; Keep Select pressed, and hold Left + Up.
|
||||
; Then let go of Select.
|
||||
.check_clock_reset
|
||||
bit 2, [hl] ; SELECT
|
||||
bit SELECT_F, [hl]
|
||||
jr nz, .check_start
|
||||
|
||||
xor a
|
||||
ld [$ffeb], a
|
||||
ld [hClockResetTrigger], a
|
||||
|
||||
ld a, [hl]
|
||||
and D_LEFT + D_UP
|
||||
@ -1368,12 +1371,12 @@ endr
|
||||
|
||||
Data63ca: ; 63ca
|
||||
; frame 0 y, x; frame 1 y, x
|
||||
db $5c, $50, $00, $00
|
||||
db $5c, $68, $5c, $58
|
||||
db $5c, $68, $5c, $78
|
||||
db $5c, $88, $5c, $78
|
||||
db $00, $00, $5c, $78
|
||||
db $00, $00, $5c, $58
|
||||
db 11 * 8 + 4, 10 * 8, 0 * 8, 0 * 8
|
||||
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 11 * 8
|
||||
db 11 * 8 + 4, 13 * 8, 11 * 8 + 4, 15 * 8
|
||||
db 11 * 8 + 4, 17 * 8, 11 * 8 + 4, 15 * 8
|
||||
db 0 * 8, 0 * 8, 11 * 8 + 4, 15 * 8
|
||||
db 0 * 8, 0 * 8, 11 * 8 + 4, 11 * 8
|
||||
; 63e2
|
||||
|
||||
Copyright: ; 63e2
|
||||
@ -1390,20 +1393,16 @@ Copyright: ; 63e2
|
||||
|
||||
CopyrightString: ; 63fd
|
||||
; ©1995-2001 Nintendo
|
||||
db $60, $61, $62, $63, $64, $65, $66
|
||||
db $67, $68, $69, $6a, $6b, $6c
|
||||
|
||||
db $4e
|
||||
db $60, $61, $62, $63, $64, $65, $66
|
||||
db $67, $68, $69, $6a, $6b, $6c
|
||||
|
||||
; ©1995-2001 Creatures inc.
|
||||
db $60, $61, $62, $63, $64, $65, $66, $6d
|
||||
db $6e, $6f, $70, $71, $72, $7a, $7b, $7c
|
||||
|
||||
db $4e
|
||||
next $60, $61, $62, $63, $64, $65, $66
|
||||
db $6d, $6e, $6f, $70, $71, $72, $7a, $7b, $7c
|
||||
|
||||
; ©1995-2001 GAME FREAK inc.
|
||||
db $60, $61, $62, $63, $64, $65, $66, $73, $74
|
||||
db $75, $76, $77, $78, $79, $7a, $7b, $7c
|
||||
next $60, $61, $62, $63, $64, $65, $66
|
||||
db $73, $74, $75, $76, $77, $78, $79, $7a, $7b, $7c
|
||||
|
||||
db "@"
|
||||
; 642e
|
||||
|
@ -16,7 +16,7 @@ TryAddMonToParty: ; d88c
|
||||
; Increase the party count
|
||||
ld [de], a
|
||||
ld a, [de] ; Why are we doing this?
|
||||
ld [$ffae], a ; HRAM backup
|
||||
ld [hMoveMon], a ; HRAM backup
|
||||
add e
|
||||
ld e, a
|
||||
jr nc, .loadspecies
|
||||
@ -39,7 +39,7 @@ TryAddMonToParty: ; d88c
|
||||
ld hl, OTPartyMonOT
|
||||
|
||||
.loadOTname
|
||||
ld a, [$ffae] ; Restore index from backup
|
||||
ld a, [hMoveMon] ; Restore index from backup
|
||||
dec a
|
||||
call SkipNames
|
||||
ld d, h
|
||||
@ -54,7 +54,7 @@ TryAddMonToParty: ; d88c
|
||||
ld [wd265], a
|
||||
call GetPokemonName
|
||||
ld hl, PartyMonNicknames
|
||||
ld a, [$ffae]
|
||||
ld a, [hMoveMon]
|
||||
dec a
|
||||
call SkipNames
|
||||
ld d, h
|
||||
@ -71,7 +71,7 @@ TryAddMonToParty: ; d88c
|
||||
ld hl, OTPartyMon1Species
|
||||
|
||||
.initializeStats
|
||||
ld a, [$ffae]
|
||||
ld a, [hMoveMon]
|
||||
dec a
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
@ -1168,7 +1168,7 @@ GiveEgg:: ; df8c
|
||||
ld hl, PartyMon1Happiness
|
||||
ld bc, PARTYMON_STRUCT_LENGTH
|
||||
call AddNTimes
|
||||
ld a, [wc2cc]
|
||||
ld a, [wMonStatusFlags]
|
||||
bit 1, a
|
||||
ld a, 1
|
||||
jr nz, .got_init_happiness
|
||||
|
@ -51,7 +51,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
||||
ld a, [wMysteryGiftPlayerBackupItem]
|
||||
and a
|
||||
jp nz, .GiftWaiting
|
||||
ld a, [wc912]
|
||||
ld a, [wMysteryGiftPartnerBackupItem]
|
||||
and a
|
||||
jp nz, .FriendNotReady
|
||||
ld a, [wc900]
|
||||
@ -73,7 +73,7 @@ DoMysteryGift: ; 1048ba (41:48ba)
|
||||
ld c, a
|
||||
callba MysteryGiftGetDecoration
|
||||
push bc
|
||||
call Function105069
|
||||
call MysteryGift_CheckAndSetDecorationAlreadyReceived
|
||||
pop bc
|
||||
jr nz, .item
|
||||
callab GetDecorationName_c
|
||||
@ -680,24 +680,24 @@ Function104db7: ; 104db7 (41:4db7)
|
||||
Function104dc5: ; 104dc5 (41:4dc5)
|
||||
ld a, $c1
|
||||
ld [$ff00+c], a
|
||||
.asm_104dc8
|
||||
.wait
|
||||
dec d
|
||||
ret z
|
||||
xor a
|
||||
ld [rIF], a
|
||||
halt
|
||||
jr .asm_104dc8
|
||||
jr .wait
|
||||
|
||||
Function104dd1: ; 104dd1 (41:4dd1)
|
||||
ld a, $c0
|
||||
ld [$ff00+c], a
|
||||
.asm_104dd4
|
||||
.wait
|
||||
dec d
|
||||
ret z
|
||||
xor a
|
||||
ld [rIF], a
|
||||
halt
|
||||
jr .asm_104dd4
|
||||
jr .wait
|
||||
|
||||
Function104ddd: ; 104ddd (41:4ddd)
|
||||
ld d, $0
|
||||
@ -763,7 +763,7 @@ asm_104e3a: ; 104e3a (41:4e3a)
|
||||
Function104e46: ; 104e46 (41:4e46)
|
||||
ld a, $2
|
||||
ld [hPrintNum9], a
|
||||
ld c, $56
|
||||
ld c, rRP % $100
|
||||
ld d, $0
|
||||
ld e, d
|
||||
ld d, $3d
|
||||
@ -800,14 +800,14 @@ Function104e8c: ; 104e8c (41:4e8c)
|
||||
|
||||
Function104e93: ; 104e93 (41:4e93)
|
||||
xor a
|
||||
ld [hDivisor], a
|
||||
ld [hMathBuffer], a
|
||||
ld [hPrintNum5], a
|
||||
ld [hPrintNum6], a
|
||||
push hl
|
||||
push bc
|
||||
ld c, $56
|
||||
ld c, rRP % $100
|
||||
ld d, $3d
|
||||
call Function104dd1
|
||||
ld hl, hQuotient ; $ffb4 (aliases: hMultiplicand)
|
||||
ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
|
||||
ld a, $5a
|
||||
ld [hli], a
|
||||
ld [hl], b
|
||||
@ -817,26 +817,26 @@ Function104e93: ; 104e93 (41:4e93)
|
||||
pop bc
|
||||
pop hl
|
||||
call Function104ed6
|
||||
ld a, [hDivisor]
|
||||
ld [hQuotient], a
|
||||
ld a, [hMathBuffer]
|
||||
ld [$ffb5], a
|
||||
ld a, [hPrintNum5]
|
||||
ld [hPrintNum2], a
|
||||
ld a, [hPrintNum6]
|
||||
ld [hPrintNum3], a
|
||||
push hl
|
||||
ld hl, hQuotient ; $ffb4 (aliases: hMultiplicand)
|
||||
ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
|
||||
ld b, $2
|
||||
call Function104ed6
|
||||
ld hl, hPrintNum10
|
||||
ld b, $1
|
||||
call Function104faf
|
||||
ld a, [hQuotient]
|
||||
ld [hDivisor], a
|
||||
ld a, [$ffb5]
|
||||
ld [hMathBuffer], a
|
||||
ld a, [hPrintNum2]
|
||||
ld [hPrintNum5], a
|
||||
ld a, [hPrintNum3]
|
||||
ld [hPrintNum6], a
|
||||
pop hl
|
||||
ret
|
||||
|
||||
Function104ed6: ; 104ed6 (41:4ed6)
|
||||
ld c, $56
|
||||
ld c, rRP % $100
|
||||
ld d, $5
|
||||
call Function104dd1
|
||||
ld d, $5
|
||||
@ -852,15 +852,15 @@ Function104ed6: ; 104ed6 (41:4ed6)
|
||||
inc b
|
||||
jr z, .asm_104f2e
|
||||
ld a, $8
|
||||
ld [$ffb6], a
|
||||
ld [hPrintNum4], a
|
||||
ld a, [hli]
|
||||
ld e, a
|
||||
ld a, [hDivisor]
|
||||
ld a, [hPrintNum5]
|
||||
add e
|
||||
ld [hDivisor], a
|
||||
ld a, [hMathBuffer]
|
||||
ld [hPrintNum5], a
|
||||
ld a, [hPrintNum6]
|
||||
adc $0
|
||||
ld [hMathBuffer], a
|
||||
ld [hPrintNum6], a
|
||||
.asm_104f02
|
||||
xor a
|
||||
ld [rIF], a
|
||||
@ -885,10 +885,10 @@ Function104ed6: ; 104ed6 (41:4ed6)
|
||||
ld [rIF], a
|
||||
halt
|
||||
.asm_104f25
|
||||
ld a, [$ffb6]
|
||||
ld a, [hPrintNum4]
|
||||
dec a
|
||||
jr z, .asm_104eee
|
||||
ld [$ffb6], a
|
||||
ld [hPrintNum4], a
|
||||
jr .asm_104f02
|
||||
.asm_104f2e
|
||||
ld a, $fe
|
||||
@ -922,35 +922,35 @@ Function104f50: ; 104f50 (41:4f50)
|
||||
|
||||
Function104f57: ; 104f57 (41:4f57)
|
||||
xor a
|
||||
ld [hDivisor], a
|
||||
ld [hMathBuffer], a
|
||||
ld [hPrintNum5], a
|
||||
ld [hPrintNum6], a
|
||||
push bc
|
||||
push hl
|
||||
ld hl, hQuotient ; $ffb4 (aliases: hMultiplicand)
|
||||
ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
|
||||
ld b, $2
|
||||
call Function104faf
|
||||
ld a, [$ffb5]
|
||||
ld [$ffba], a
|
||||
ld a, [hPrintNum3]
|
||||
ld [hPrintNum8], a
|
||||
ld b, a
|
||||
pop hl
|
||||
pop af
|
||||
cp b
|
||||
jp c, Function104f50
|
||||
ld a, [hQuotient]
|
||||
ld a, [hPrintNum2]
|
||||
cp $5a
|
||||
jp nz, Function104f50
|
||||
call Function104faf
|
||||
ld a, [hDivisor]
|
||||
ld a, [hPrintNum5]
|
||||
ld d, a
|
||||
ld a, [hMathBuffer]
|
||||
ld a, [hPrintNum6]
|
||||
ld e, a
|
||||
push hl
|
||||
push de
|
||||
ld hl, hQuotient ; $ffb4 (aliases: hMultiplicand)
|
||||
ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
|
||||
ld b, $2
|
||||
call Function104faf
|
||||
pop de
|
||||
ld hl, hQuotient ; $ffb4 (aliases: hMultiplicand)
|
||||
ld hl, hPrintNum2 ; $ffb4 (aliases: hMultiplicand)
|
||||
ld a, [hli]
|
||||
xor d
|
||||
ld b, a
|
||||
@ -967,9 +967,9 @@ Function104f57: ; 104f57 (41:4f57)
|
||||
pop de
|
||||
pop hl
|
||||
ld a, d
|
||||
ld [hDivisor], a
|
||||
ld [hPrintNum5], a
|
||||
ld a, e
|
||||
ld [hMathBuffer], a
|
||||
ld [hPrintNum6], a
|
||||
ret
|
||||
|
||||
Function104faf: ; 104faf (41:4faf)
|
||||
@ -993,7 +993,7 @@ Function104faf: ; 104faf (41:4faf)
|
||||
inc b
|
||||
jr z, .asm_10501a
|
||||
ld a, $8
|
||||
ld [$ffb6], a
|
||||
ld [hPrintNum4], a
|
||||
.asm_104fd9
|
||||
ld d, $0
|
||||
.asm_104fdb
|
||||
@ -1022,9 +1022,9 @@ Function104faf: ; 104faf (41:4faf)
|
||||
.asm_104ffd
|
||||
res 0, e
|
||||
.asm_104fff
|
||||
ld a, [$ffb6]
|
||||
ld a, [hPrintNum4]
|
||||
dec a
|
||||
ld [$ffb6], a
|
||||
ld [hPrintNum4], a
|
||||
jr z, .asm_10500b
|
||||
ld a, e
|
||||
rlca
|
||||
@ -1033,12 +1033,12 @@ Function104faf: ; 104faf (41:4faf)
|
||||
.asm_10500b
|
||||
ld a, e
|
||||
ld [hli], a
|
||||
ld a, [hDivisor]
|
||||
ld a, [hPrintNum5]
|
||||
add e
|
||||
ld [hDivisor], a
|
||||
ld a, [hMathBuffer]
|
||||
ld [hPrintNum5], a
|
||||
ld a, [hPrintNum6]
|
||||
adc $0
|
||||
ld [hMathBuffer], a
|
||||
ld [hPrintNum6], a
|
||||
jr .asm_104fd2
|
||||
.asm_10501a
|
||||
call Function104d74
|
||||
@ -1088,7 +1088,7 @@ endr
|
||||
ld [rJOYP], a
|
||||
ret
|
||||
|
||||
Function105069: ; 105069 (41:5069)
|
||||
MysteryGift_CheckAndSetDecorationAlreadyReceived: ; 105069 (41:5069)
|
||||
call GetMysteryGiftBank
|
||||
ld d, $0
|
||||
ld b, CHECK_FLAG
|
||||
@ -1110,7 +1110,7 @@ Function105069: ; 105069 (41:5069)
|
||||
xor a
|
||||
ret
|
||||
|
||||
Function105091: ; 105091 (41:5091)
|
||||
MysteryGift_CopyReceivedDecosToPC: ; 105091 (41:5091)
|
||||
call GetMysteryGiftBank
|
||||
ld c, $0
|
||||
.loop
|
||||
|
@ -168,7 +168,7 @@ ENDC
|
||||
dw Script_loadwildmon ; 5d
|
||||
dw Script_loadtrainer ; 5e
|
||||
dw Script_startbattle ; 5f
|
||||
dw Script_returnafterbattle ; 60
|
||||
dw Script_reloadmapafterbattle ; 60
|
||||
dw Script_catchtutorial ; 61
|
||||
dw Script_trainertext ; 62
|
||||
dw Script_trainerflagaction ; 63
|
||||
@ -203,7 +203,7 @@ ENDC
|
||||
dw Script_encountermusic ; 80
|
||||
dw Script_musicfadeout ; 81
|
||||
dw Script_playmapmusic ; 82
|
||||
dw Script_reloadmapmusic ; 83
|
||||
dw Script_dontrestartmapmusic ; 83
|
||||
dw Script_cry ; 84
|
||||
dw Script_playsound ; 85
|
||||
dw Script_waitsfx ; 86
|
||||
@ -1555,7 +1555,7 @@ Script_catchtutorial: ; 97447
|
||||
jp Script_reloadmap
|
||||
; 97459
|
||||
|
||||
Script_returnafterbattle: ; 97459
|
||||
Script_reloadmapafterbattle: ; 97459
|
||||
; script command 0x60
|
||||
|
||||
ld hl, wBattleScriptFlags
|
||||
@ -2905,11 +2905,11 @@ Script_blackoutmod: ; 97a78
|
||||
ret
|
||||
; 97a85
|
||||
|
||||
Script_reloadmapmusic: ; 97a85
|
||||
Script_dontrestartmapmusic: ; 97a85
|
||||
; script command 0x83
|
||||
|
||||
ld a, 1
|
||||
ld [wc2c1], a
|
||||
ld [wDontPlayMapMusicOnReload], a
|
||||
ret
|
||||
; 97a8b
|
||||
|
||||
|
@ -94,13 +94,13 @@ endr
|
||||
add hl, bc
|
||||
ld a, d
|
||||
and $10 ; bit 4
|
||||
jr z, .load_Null
|
||||
jr z, .load_zero
|
||||
ld a, e
|
||||
and a
|
||||
jr z, .load_minus_two
|
||||
cp $1
|
||||
jr z, .load_minus_one
|
||||
.load_Null
|
||||
.load_zero
|
||||
xor a
|
||||
ld [hl], a
|
||||
ret
|
||||
@ -140,11 +140,11 @@ endr
|
||||
; 8d306 (23:5306)
|
||||
|
||||
; Anonymous jumptable (see .anonymous_jumptable)
|
||||
dw .four_Null
|
||||
dw .four_zero
|
||||
dw .four_one
|
||||
; 8d30a
|
||||
|
||||
.four_Null: ; 8d30a
|
||||
.four_zero: ; 8d30a
|
||||
call .IncrementSpriteAnimStruct0B
|
||||
|
||||
ld hl, SPRITEANIMSTRUCT_INDEX
|
||||
@ -425,7 +425,7 @@ endr
|
||||
; 8d487 (23:5487)
|
||||
|
||||
; Anonymous jumptable (see .anonymous_jumptable)
|
||||
dw .sixteen_Null
|
||||
dw .sixteen_zero
|
||||
dw .sixteen_one
|
||||
dw .sixteen_two
|
||||
dw .sixteen_three
|
||||
@ -433,7 +433,7 @@ endr
|
||||
dw .sixteen_five
|
||||
; 8d493
|
||||
|
||||
.sixteen_Null: ; 8d493
|
||||
.sixteen_zero: ; 8d493
|
||||
ld a, $14
|
||||
call _ReinitSpriteAnimFrame
|
||||
|
||||
|
@ -6,7 +6,7 @@ MomTriesToBuySomething:: ; fcfec
|
||||
and a
|
||||
ret nz
|
||||
xor a
|
||||
ld [wdc18], a
|
||||
ld [wWhichMomItemSet], a
|
||||
call CheckBalance_MomItem2
|
||||
ret nc
|
||||
call Mom_GiveItemOrDoll
|
||||
@ -26,10 +26,10 @@ MomTriesToBuySomething:: ; fcfec
|
||||
.ASMFunction: ; fd017
|
||||
call MomBuysItem_DeductFunds
|
||||
call Mom_GetScriptPointer
|
||||
ld a, [wdc18]
|
||||
ld a, [wWhichMomItemSet]
|
||||
and a
|
||||
jr nz, .ok
|
||||
ld hl, wdc17
|
||||
ld hl, wWhichMomItem
|
||||
inc [hl]
|
||||
.ok
|
||||
ld a, PHONE_MOM
|
||||
@ -52,7 +52,7 @@ MomTriesToBuySomething:: ; fcfec
|
||||
; fd044
|
||||
|
||||
CheckBalance_MomItem2: ; fd044
|
||||
ld a, [wdc17]
|
||||
ld a, [wWhichMomItem]
|
||||
cp 10
|
||||
jr nc, .nope
|
||||
call GetItemFromMom
|
||||
@ -82,12 +82,12 @@ CheckBalance_MomItem2: ; fd044
|
||||
inc hl
|
||||
ld [hl], (2300 % $100) ; $fc
|
||||
.loop
|
||||
ld de, wdc19
|
||||
ld de, MomItemTriggerBalance
|
||||
ld bc, wMomsMoney
|
||||
callba CompareMoney
|
||||
jr z, .exact
|
||||
jr nc, .less_than
|
||||
call Functionfd099
|
||||
call .AddMoney
|
||||
jr .loop
|
||||
|
||||
.less_than
|
||||
@ -95,17 +95,16 @@ CheckBalance_MomItem2: ; fd044
|
||||
ret
|
||||
|
||||
.exact
|
||||
call Functionfd099
|
||||
call .AddMoney
|
||||
ld a, 5
|
||||
call RandomRange
|
||||
inc a
|
||||
ld [wdc18], a
|
||||
ld [wWhichMomItemSet], a
|
||||
scf
|
||||
ret
|
||||
; fd099
|
||||
|
||||
Functionfd099: ; fd099
|
||||
ld de, wdc19
|
||||
.AddMoney
|
||||
ld de, MomItemTriggerBalance
|
||||
ld bc, hMoneyTemp
|
||||
callba AddMoney
|
||||
ret
|
||||
@ -183,7 +182,7 @@ Mom_GetScriptPointer: ; fd0eb (3f:50eb)
|
||||
|
||||
|
||||
GetItemFromMom: ; fd117
|
||||
ld a, [wdc18]
|
||||
ld a, [wWhichMomItemSet]
|
||||
and a
|
||||
jr z, .zero
|
||||
dec a
|
||||
@ -191,7 +190,7 @@ GetItemFromMom: ; fd117
|
||||
jr .GetFromList1
|
||||
|
||||
.zero
|
||||
ld a, [wdc17]
|
||||
ld a, [wWhichMomItem]
|
||||
cp 10 ; length of MomItems_2
|
||||
jr c, .ok
|
||||
xor a
|
||||
|
@ -18,7 +18,7 @@ UnknownScript_0x506c8: ; 0x506c8
|
||||
iftrue UnknownScript_0x506e5
|
||||
randomwildmon
|
||||
startbattle
|
||||
returnafterbattle
|
||||
reloadmapafterbattle
|
||||
end
|
||||
; 0x506e5
|
||||
|
||||
|
82
home.asm
82
home.asm
@ -3,18 +3,15 @@ INCLUDE "includes.asm"
|
||||
SECTION "NULL", ROM0[0]
|
||||
NULL::
|
||||
|
||||
|
||||
INCLUDE "rst.asm"
|
||||
INCLUDE "interrupts.asm"
|
||||
|
||||
|
||||
SECTION "Header", ROM0[$100]
|
||||
|
||||
Start::
|
||||
nop
|
||||
jp _Start
|
||||
|
||||
|
||||
SECTION "Home", ROM0[$150]
|
||||
|
||||
INCLUDE "home/init.asm"
|
||||
@ -40,7 +37,6 @@ INCLUDE "home/handshake.asm"
|
||||
INCLUDE "home/game_time.asm"
|
||||
INCLUDE "home/map.asm"
|
||||
|
||||
|
||||
Function2d43:: ; 2d43
|
||||
; Inexplicably empty.
|
||||
; Seen in PredefPointers.
|
||||
@ -50,29 +46,26 @@ Function2d43:: ; 2d43
|
||||
ret
|
||||
; 2d54
|
||||
|
||||
|
||||
INCLUDE "home/farcall.asm"
|
||||
INCLUDE "home/predef.asm"
|
||||
INCLUDE "home/window.asm"
|
||||
|
||||
|
||||
Function2e4e:: ; 2e4e
|
||||
; Unreferenced.
|
||||
scf
|
||||
ret
|
||||
; 2e50
|
||||
|
||||
|
||||
INCLUDE "home/flag.asm"
|
||||
|
||||
|
||||
Function2ebb:: ; 2ebb
|
||||
ld a, [wc2cc]
|
||||
; unreferenced
|
||||
ld a, [wMonStatusFlags]
|
||||
bit 1, a
|
||||
ret z
|
||||
|
||||
ld a, [hJoyDown]
|
||||
bit 1, a ; B_BUTTON
|
||||
bit B_BUTTON_F, a
|
||||
ret
|
||||
; 2ec6
|
||||
|
||||
@ -88,14 +81,14 @@ xor_a_dec_a:: ; 2ec8
|
||||
; 2ecb
|
||||
|
||||
Function2ecb:: ; 2ecb
|
||||
; unreferenced
|
||||
push hl
|
||||
ld hl, wc2cc
|
||||
ld hl, wMonStatusFlags
|
||||
bit 1, [hl]
|
||||
pop hl
|
||||
ret
|
||||
; 2ed3
|
||||
|
||||
|
||||
DisableSpriteUpdates:: ; 0x2ed3
|
||||
; disables overworld sprite updating?
|
||||
xor a
|
||||
@ -119,10 +112,8 @@ EnableSpriteUpdates:: ; 2ee4
|
||||
ret
|
||||
; 2ef6
|
||||
|
||||
|
||||
INCLUDE "home/string.asm"
|
||||
|
||||
|
||||
IsInJohto:: ; 2f17
|
||||
; Return 0 if the player is in Johto, and 1 in Kanto.
|
||||
|
||||
@ -157,17 +148,14 @@ IsInJohto:: ; 2f17
|
||||
ret
|
||||
; 2f3e
|
||||
|
||||
|
||||
ret_2f3e:: ; 2f3e
|
||||
ret
|
||||
; 2f3f
|
||||
|
||||
|
||||
INCLUDE "home/item.asm"
|
||||
INCLUDE "home/random.asm"
|
||||
INCLUDE "home/sram.asm"
|
||||
|
||||
|
||||
; Register aliases
|
||||
|
||||
_hl_:: ; 2fec
|
||||
@ -179,10 +167,8 @@ _de_:: ; 2fed
|
||||
ret
|
||||
; 2fef
|
||||
|
||||
|
||||
INCLUDE "home/double_speed.asm"
|
||||
|
||||
|
||||
ClearSprites:: ; 300b
|
||||
; Erase OAM data
|
||||
ld hl, Sprites
|
||||
@ -209,10 +195,8 @@ HideSprites:: ; 3016
|
||||
ret
|
||||
; 3026
|
||||
|
||||
|
||||
INCLUDE "home/copy2.asm"
|
||||
|
||||
|
||||
LoadTileMapToTempTileMap:: ; 309d
|
||||
; Load TileMap into TempTileMap
|
||||
ld a, [rSVBK]
|
||||
@ -252,7 +236,6 @@ LoadTempTileMapToTileMap:: ; 30bf
|
||||
ret
|
||||
; 30d6
|
||||
|
||||
|
||||
CopyName1:: ; 30d6
|
||||
; Copies the name from de to StringBuffer2
|
||||
ld hl, StringBuffer2
|
||||
@ -305,10 +288,8 @@ SkipNames:: ; 0x30f4
|
||||
ret
|
||||
; 0x30fe
|
||||
|
||||
|
||||
INCLUDE "home/math.asm"
|
||||
|
||||
|
||||
PrintLetterDelay:: ; 313d
|
||||
; Wait before printing the next letter.
|
||||
|
||||
@ -392,7 +373,6 @@ PrintLetterDelay:: ; 313d
|
||||
ret
|
||||
; 318c
|
||||
|
||||
|
||||
CopyDataUntil:: ; 318c
|
||||
; Copy [hl .. bc) to de.
|
||||
|
||||
@ -412,7 +392,6 @@ CopyDataUntil:: ; 318c
|
||||
ret
|
||||
; 0x3198
|
||||
|
||||
|
||||
PrintNum:: ; 3198
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@ -426,7 +405,6 @@ PrintNum:: ; 3198
|
||||
ret
|
||||
; 31a4
|
||||
|
||||
|
||||
MobilePrintNum:: ; 31a4
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@ -440,7 +418,6 @@ MobilePrintNum:: ; 31a4
|
||||
ret
|
||||
; 31b0
|
||||
|
||||
|
||||
FarPrintText:: ; 31b0
|
||||
ld [hBuffer], a
|
||||
ld a, [hROMBank]
|
||||
@ -455,7 +432,6 @@ FarPrintText:: ; 31b0
|
||||
ret
|
||||
; 31be
|
||||
|
||||
|
||||
CallPointerAt:: ; 31be
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@ -474,7 +450,6 @@ CallPointerAt:: ; 31be
|
||||
ret
|
||||
; 31cd
|
||||
|
||||
|
||||
QueueScript:: ; 31cd
|
||||
; Push pointer hl in the current bank to wQueuedScriptBank.
|
||||
ld a, [hROMBank]
|
||||
@ -489,7 +464,6 @@ FarQueueScript:: ; 31cf
|
||||
ret
|
||||
; 31db
|
||||
|
||||
|
||||
StringCmp:: ; 31db
|
||||
; Compare c bytes at de and hl.
|
||||
; Return z if they all match.
|
||||
@ -504,7 +478,6 @@ StringCmp:: ; 31db
|
||||
ret
|
||||
; 0x31e4
|
||||
|
||||
|
||||
CompareLong:: ; 31e4
|
||||
; Compare bc bytes at de and hl.
|
||||
; Return carry if they all match.
|
||||
@ -529,7 +502,6 @@ CompareLong:: ; 31e4
|
||||
ret
|
||||
; 31f3
|
||||
|
||||
|
||||
ClearBGPalettes:: ; 31f3
|
||||
call ClearPalettes
|
||||
WaitBGMap:: ; 31f6
|
||||
@ -560,14 +532,12 @@ WaitBGMap2:: ; 0x3200
|
||||
ret
|
||||
; 0x3218
|
||||
|
||||
|
||||
IsCGB:: ; 3218
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
ret
|
||||
; 321c
|
||||
|
||||
|
||||
ApplyTilemap:: ; 321c
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
@ -685,7 +655,6 @@ endr
|
||||
ret
|
||||
; 32f9
|
||||
|
||||
|
||||
SetPalettes:: ; 32f9
|
||||
; Inits the Palettes
|
||||
; depending on the system the monochromes palettes or color palettes
|
||||
@ -709,7 +678,6 @@ SetPalettes:: ; 32f9
|
||||
ret
|
||||
; 3317
|
||||
|
||||
|
||||
ClearPalettes:: ; 3317
|
||||
; Make all palettes white
|
||||
|
||||
@ -747,7 +715,6 @@ ClearPalettes:: ; 3317
|
||||
ret
|
||||
; 333e
|
||||
|
||||
|
||||
GetMemSGBLayout:: ; 333e
|
||||
ld b, SCGB_RAM
|
||||
GetSGBLayout:: ; 3340
|
||||
@ -765,7 +732,6 @@ GetSGBLayout:: ; 3340
|
||||
predef_jump Predef_LoadSGBLayout ; LoadSGBLayout
|
||||
; 334e
|
||||
|
||||
|
||||
SetHPPal:: ; 334e
|
||||
; Set palette for hp bar pixel length e at hl.
|
||||
call GetHPPal
|
||||
@ -773,7 +739,6 @@ SetHPPal:: ; 334e
|
||||
ret
|
||||
; 3353
|
||||
|
||||
|
||||
GetHPPal:: ; 3353
|
||||
; Get palette for hp bar pixel length e in d.
|
||||
|
||||
@ -788,7 +753,6 @@ GetHPPal:: ; 3353
|
||||
ret
|
||||
; 335f
|
||||
|
||||
|
||||
CountSetBits:: ; 0x335f
|
||||
; Count the number of set bits in b bytes starting from hl.
|
||||
; Return in a, c and [wd265].
|
||||
@ -815,7 +779,6 @@ CountSetBits:: ; 0x335f
|
||||
ret
|
||||
; 0x3376
|
||||
|
||||
|
||||
GetWeekday:: ; 3376
|
||||
ld a, [CurDay]
|
||||
.mod
|
||||
@ -825,10 +788,8 @@ GetWeekday:: ; 3376
|
||||
ret
|
||||
; 3380
|
||||
|
||||
|
||||
INCLUDE "home/pokedex_flags.asm"
|
||||
|
||||
|
||||
NamesPointers:: ; 33ab
|
||||
dba PokemonNames
|
||||
dba MoveNames
|
||||
@ -904,7 +865,6 @@ endr
|
||||
ret
|
||||
; 3411
|
||||
|
||||
|
||||
GetNthString:: ; 3411
|
||||
; Return the address of the
|
||||
; ath string starting from hl.
|
||||
@ -925,7 +885,6 @@ GetNthString:: ; 3411
|
||||
ret
|
||||
; 3420
|
||||
|
||||
|
||||
GetBasePokemonName:: ; 3420
|
||||
; Discards gender (Nidoran).
|
||||
|
||||
@ -951,7 +910,6 @@ GetBasePokemonName:: ; 3420
|
||||
|
||||
; 343b
|
||||
|
||||
|
||||
GetPokemonName:: ; 343b
|
||||
; Get Pokemon name wd265.
|
||||
|
||||
@ -991,7 +949,6 @@ endr
|
||||
ret
|
||||
; 3468
|
||||
|
||||
|
||||
GetItemName:: ; 3468
|
||||
; Get item name wd265.
|
||||
|
||||
@ -1016,7 +973,6 @@ GetItemName:: ; 3468
|
||||
ret
|
||||
; 3487
|
||||
|
||||
|
||||
GetTMHMName:: ; 3487
|
||||
; Get TM/HM name by item id wd265.
|
||||
|
||||
@ -1100,7 +1056,6 @@ GetTMHMName:: ; 3487
|
||||
db "@"
|
||||
; 34df
|
||||
|
||||
|
||||
IsHM:: ; 34df
|
||||
cp HM01
|
||||
jr c, .NotHM
|
||||
@ -1111,7 +1066,6 @@ IsHM:: ; 34df
|
||||
ret
|
||||
; 34e7
|
||||
|
||||
|
||||
IsHMMove:: ; 34e7
|
||||
ld hl, .HMMoves
|
||||
ld de, 1
|
||||
@ -1128,7 +1082,6 @@ IsHMMove:: ; 34e7
|
||||
db -1
|
||||
; 34f8
|
||||
|
||||
|
||||
GetMoveName:: ; 34f8
|
||||
push hl
|
||||
|
||||
@ -1145,7 +1098,6 @@ GetMoveName:: ; 34f8
|
||||
ret
|
||||
; 350c
|
||||
|
||||
|
||||
ScrollingMenu:: ; 350c
|
||||
call CopyMenuData2
|
||||
ld a, [hROMBank]
|
||||
@ -1212,7 +1164,6 @@ Function354b:: ; 354b joypad
|
||||
ret
|
||||
; 3567
|
||||
|
||||
|
||||
HandleStoneQueue:: ; 3567
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@ -1358,7 +1309,6 @@ endr
|
||||
ret
|
||||
; 3600
|
||||
|
||||
|
||||
CheckTrainerBattle2:: ; 3600
|
||||
|
||||
ld a, [hROMBank]
|
||||
@ -1373,7 +1323,6 @@ CheckTrainerBattle2:: ; 3600
|
||||
ret
|
||||
; 360d
|
||||
|
||||
|
||||
CheckTrainerBattle:: ; 360d
|
||||
; Check if any trainer on the map sees the player and wants to battle.
|
||||
|
||||
@ -1493,7 +1442,6 @@ LoadTrainer_continue:: ; 367e
|
||||
ret
|
||||
; 36a5
|
||||
|
||||
|
||||
FacingPlayerDistance_bc:: ; 36a5
|
||||
|
||||
push de
|
||||
@ -1504,7 +1452,6 @@ FacingPlayerDistance_bc:: ; 36a5
|
||||
ret
|
||||
; 36ad
|
||||
|
||||
|
||||
FacingPlayerDistance:: ; 36ad
|
||||
; Return carry if the sprite at bc is facing the player,
|
||||
; and its distance in d.
|
||||
@ -1575,7 +1522,6 @@ FacingPlayerDistance:: ; 36ad
|
||||
ret
|
||||
; 36f5
|
||||
|
||||
|
||||
CheckTrainerFlag:: ; 36f5
|
||||
push bc
|
||||
ld hl, OBJECT_MAP_OBJECT_INDEX
|
||||
@ -1601,7 +1547,6 @@ CheckTrainerFlag:: ; 36f5
|
||||
ret
|
||||
; 3718
|
||||
|
||||
|
||||
PrintWinLossText:: ; 3718
|
||||
ld a, [BattleType]
|
||||
cp BATTLETYPE_CANLOSE
|
||||
@ -1629,8 +1574,6 @@ PrintWinLossText:: ; 3718
|
||||
ret
|
||||
; 3741
|
||||
|
||||
|
||||
|
||||
IsAPokemon:: ; 3741
|
||||
; Return carry if species a is not a Pokemon.
|
||||
and a
|
||||
@ -1649,7 +1592,6 @@ IsAPokemon:: ; 3741
|
||||
ret
|
||||
; 3750
|
||||
|
||||
|
||||
DrawBattleHPBar:: ; 3750
|
||||
; Draw an HP bar d tiles long at hl
|
||||
; Fill it up to e pixels
|
||||
@ -1711,7 +1653,6 @@ DrawBattleHPBar:: ; 3750
|
||||
ret
|
||||
; 3786
|
||||
|
||||
|
||||
PrepMonFrontpic:: ; 3786
|
||||
ld a, $1
|
||||
ld [wBoxAlignment], a
|
||||
@ -1741,10 +1682,8 @@ _PrepMonFrontpic:: ; 378b
|
||||
ret
|
||||
; 37b6
|
||||
|
||||
|
||||
INCLUDE "home/cry.asm"
|
||||
|
||||
|
||||
PrintLevel:: ; 382d
|
||||
; Print TempMonLevel at hl
|
||||
|
||||
@ -1777,7 +1716,6 @@ Function3842:: ; 3842
|
||||
jp PrintNum
|
||||
; 384d
|
||||
|
||||
|
||||
Function384d:: ; 384d
|
||||
ld hl, wListMoves_MoveIndicesBuffer
|
||||
ld c, a
|
||||
@ -1787,7 +1725,6 @@ Function384d:: ; 384d
|
||||
ret
|
||||
; 3856
|
||||
|
||||
|
||||
GetBaseData:: ; 3856
|
||||
push bc
|
||||
push de
|
||||
@ -1845,7 +1782,6 @@ GetBaseData:: ; 3856
|
||||
ret
|
||||
; 389c
|
||||
|
||||
|
||||
GetCurNick:: ; 389c
|
||||
ld a, [CurPartyMon]
|
||||
ld hl, PartyMonNicknames
|
||||
@ -1871,7 +1807,6 @@ GetNick:: ; 38a2
|
||||
ret
|
||||
; 38bb
|
||||
|
||||
|
||||
PrintBCDNumber:: ; 38bb
|
||||
; function to print a BCD (Binary-coded decimal) number
|
||||
; de = address of BCD number
|
||||
@ -1973,7 +1908,6 @@ GetPartyLocation:: ; 3927
|
||||
jp AddNTimes
|
||||
; 392d
|
||||
|
||||
|
||||
Function392d:: ; 392d
|
||||
push hl
|
||||
ld a, b
|
||||
@ -1991,7 +1925,6 @@ Function392d:: ; 392d
|
||||
ret
|
||||
; 3945
|
||||
|
||||
|
||||
INCLUDE "home/battle.asm"
|
||||
|
||||
Function3b0c:: ; 3b0c
|
||||
@ -2015,8 +1948,6 @@ Function3b0c:: ; 3b0c
|
||||
ret
|
||||
; 3b2a
|
||||
|
||||
|
||||
|
||||
_InitSpriteAnimStruct:: ; 3b2a
|
||||
|
||||
ld [wSpriteAnimIDBuffer], a
|
||||
@ -2035,7 +1966,6 @@ _InitSpriteAnimStruct:: ; 3b2a
|
||||
ret
|
||||
; 3b3c
|
||||
|
||||
|
||||
ReinitSpriteAnimFrame:: ; 3b3c
|
||||
|
||||
ld [wSpriteAnimIDBuffer], a
|
||||
@ -2054,11 +1984,9 @@ ReinitSpriteAnimFrame:: ; 3b3c
|
||||
ret
|
||||
; 3b4e
|
||||
|
||||
|
||||
INCLUDE "home/audio.asm"
|
||||
INCLUDE "home/mobile.asm"
|
||||
|
||||
|
||||
Function3eea:: ; 3eea
|
||||
push hl
|
||||
push bc
|
||||
|
@ -397,7 +397,7 @@ EnterMapMusic:: ; 3d03
|
||||
push af
|
||||
|
||||
xor a
|
||||
ld [wc2c1], a
|
||||
ld [wDontPlayMapMusicOnReload], a
|
||||
ld de, MUSIC_BICYCLE
|
||||
ld a, [PlayerState]
|
||||
cp PLAYER_BIKE
|
||||
@ -422,7 +422,7 @@ EnterMapMusic:: ; 3d03
|
||||
; 3d2f
|
||||
|
||||
TryRestartMapMusic:: ; 3d2f
|
||||
ld a, [wc2c1]
|
||||
ld a, [wDontPlayMapMusicOnReload]
|
||||
and a
|
||||
jr z, RestartMapMusic
|
||||
xor a
|
||||
@ -431,7 +431,7 @@ TryRestartMapMusic:: ; 3d2f
|
||||
call PlayMusic
|
||||
call DelayFrame
|
||||
xor a
|
||||
ld [wc2c1], a
|
||||
ld [wDontPlayMapMusicOnReload], a
|
||||
ret
|
||||
; 3d47
|
||||
|
||||
|
@ -22,17 +22,17 @@ Reset:: ; 150
|
||||
|
||||
_Start:: ; 16e
|
||||
cp $11
|
||||
jr z, .asm_175
|
||||
jr z, .cgb
|
||||
xor a
|
||||
jr .asm_177
|
||||
jr .load
|
||||
|
||||
.asm_175
|
||||
.cgb
|
||||
ld a, $1
|
||||
|
||||
.asm_177
|
||||
.load
|
||||
ld [hCGB], a
|
||||
ld a, $1
|
||||
ld [$ffea], a
|
||||
ld [hFFEA], a
|
||||
; 17d
|
||||
|
||||
|
||||
@ -69,29 +69,29 @@ Init:: ; 17d
|
||||
ld [rLCDC], a
|
||||
|
||||
; Clear WRAM bank 0
|
||||
ld hl, $c000
|
||||
ld bc, $d000 - $c000
|
||||
.asm_1b1
|
||||
ld hl, wc000
|
||||
ld bc, wd000 - wc000
|
||||
.ByteFill
|
||||
ld [hl], 0
|
||||
inc hl
|
||||
dec bc
|
||||
ld a, b
|
||||
or c
|
||||
jr nz, .asm_1b1
|
||||
jr nz, .ByteFill
|
||||
|
||||
ld sp, Stack
|
||||
|
||||
; Clear HRAM
|
||||
ld a, [hCGB]
|
||||
push af
|
||||
ld a, [$ffea]
|
||||
ld a, [hFFEA]
|
||||
push af
|
||||
xor a
|
||||
ld hl, $ff80
|
||||
ld bc, $ffff - $ff80
|
||||
ld hl, HRAM_START
|
||||
ld bc, HRAM_END - HRAM_START
|
||||
call ByteFill
|
||||
pop af
|
||||
ld [$ffea], a
|
||||
ld [hFFEA], a
|
||||
pop af
|
||||
ld [hCGB], a
|
||||
|
||||
|
@ -20,10 +20,10 @@ DMATransfer:: ; 15d8
|
||||
|
||||
|
||||
UpdateBGMapBuffer:: ; 15e3
|
||||
; Copy [$ffdc] 16x8 tiles from BGMapBuffer
|
||||
; Copy [hFFDC] 16x8 tiles from BGMapBuffer
|
||||
; to bg map addresses in BGMapBufferPtrs.
|
||||
|
||||
; [$ffdc] must be even since this is done in pairs.
|
||||
; [hFFDC] must be even since this is done in pairs.
|
||||
|
||||
; Return carry on success.
|
||||
|
||||
@ -76,11 +76,11 @@ rept 2
|
||||
endr
|
||||
|
||||
; We've done 2 16x8 blocks
|
||||
ld a, [$ffdc]
|
||||
ld a, [hFFDC]
|
||||
rept 2
|
||||
dec a
|
||||
endr
|
||||
ld [$ffdc], a
|
||||
ld [hFFDC], a
|
||||
|
||||
jr nz, .next
|
||||
|
||||
|
9
hram.asm
9
hram.asm
@ -1,8 +1,9 @@
|
||||
HRAM_START EQU $ff80
|
||||
hPushOAM EQU $ff80
|
||||
|
||||
hROMBankBackup EQU $ff8a
|
||||
hBuffer EQU $ff8b
|
||||
|
||||
hFF8C EQU $ff8c
|
||||
hRTCDayHi EQU $ff8d
|
||||
hRTCDayLo EQU $ff8e
|
||||
hRTCHours EQU $ff8f
|
||||
@ -34,7 +35,7 @@ hInMenu EQU $ffaa
|
||||
|
||||
hPrinter EQU $ffac
|
||||
hFillBox EQU $ffad
|
||||
|
||||
hMoveMon EQU $ffae
|
||||
hMapObjectIndexBuffer EQU $ffaf
|
||||
hObjectStructIndexBuffer EQU $ffb0
|
||||
|
||||
@ -114,3 +115,7 @@ hCGB EQU $ffe6
|
||||
hSGB EQU $ffe7
|
||||
hDMATransfer EQU $ffe8
|
||||
hMobile EQU $ffe9
|
||||
hFFEA EQU $ffea
|
||||
hClockResetTrigger EQU $ffeb
|
||||
|
||||
HRAM_END EQU $ffff
|
||||
|
@ -1842,7 +1842,7 @@ HealHP_SFX_GFX: ; f1db (3:71db)
|
||||
ld bc, SCREEN_WIDTH * 2
|
||||
call AddNTimes
|
||||
ld a, $2
|
||||
ld [wd10a], a
|
||||
ld [wWhichHPBar], a
|
||||
predef_jump AnimateHPBar
|
||||
|
||||
UseItem_SelectMon: ; f1f9 (3:71f9)
|
||||
|
@ -618,9 +618,9 @@ startbattle: macro
|
||||
db startbattle_command
|
||||
endm
|
||||
|
||||
enum returnafterbattle_command
|
||||
returnafterbattle: macro
|
||||
db returnafterbattle_command
|
||||
enum reloadmapafterbattle_command
|
||||
reloadmapafterbattle: macro
|
||||
db reloadmapafterbattle_command
|
||||
endm
|
||||
|
||||
enum catchtutorial_command
|
||||
@ -833,9 +833,9 @@ playmapmusic: macro
|
||||
db playmapmusic_command
|
||||
endm
|
||||
|
||||
enum reloadmapmusic_command
|
||||
reloadmapmusic: macro
|
||||
db reloadmapmusic_command
|
||||
enum dontrestartmapmusic_command
|
||||
dontrestartmapmusic: macro
|
||||
db dontrestartmapmusic_command
|
||||
endm
|
||||
|
||||
enum cry_command
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user