You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Remove all address comments
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
; Audio interfaces.
|
||||
|
||||
MapSetup_Sound_Off:: ; 3b4e
|
||||
MapSetup_Sound_Off::
|
||||
|
||||
push hl
|
||||
push de
|
||||
@@ -24,10 +24,9 @@ MapSetup_Sound_Off:: ; 3b4e
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3b6a
|
||||
|
||||
|
||||
UpdateSound:: ; 3b6a
|
||||
UpdateSound::
|
||||
|
||||
push hl
|
||||
push de
|
||||
@@ -51,10 +50,9 @@ UpdateSound:: ; 3b6a
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3b86
|
||||
|
||||
|
||||
_LoadMusicByte:: ; 3b86
|
||||
_LoadMusicByte::
|
||||
; wCurMusicByte = [a:de]
|
||||
GLOBAL LoadMusicByte
|
||||
|
||||
@@ -68,10 +66,9 @@ GLOBAL LoadMusicByte
|
||||
ld [hROMBank], a
|
||||
ld [MBC3RomBank], a
|
||||
ret
|
||||
; 3b97
|
||||
|
||||
|
||||
PlayMusic:: ; 3b97
|
||||
PlayMusic::
|
||||
; Play music de.
|
||||
|
||||
push hl
|
||||
@@ -104,10 +101,9 @@ PlayMusic:: ; 3b97
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3bbc
|
||||
|
||||
|
||||
PlayMusic2:: ; 3bbc
|
||||
PlayMusic2::
|
||||
; Stop playing music, then play music de.
|
||||
|
||||
push hl
|
||||
@@ -138,10 +134,9 @@ PlayMusic2:: ; 3bbc
|
||||
pop hl
|
||||
ret
|
||||
|
||||
; 3be3
|
||||
|
||||
|
||||
PlayCry:: ; 3be3
|
||||
PlayCry::
|
||||
; Play cry de.
|
||||
|
||||
push hl
|
||||
@@ -191,10 +186,9 @@ endr
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3c23
|
||||
|
||||
|
||||
PlaySFX:: ; 3c23
|
||||
PlaySFX::
|
||||
; Play sound effect de.
|
||||
; Sound effects are ordered by priority (highest to lowest)
|
||||
|
||||
@@ -233,17 +227,15 @@ PlaySFX:: ; 3c23
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3c4e
|
||||
|
||||
|
||||
WaitPlaySFX:: ; 3c4e
|
||||
WaitPlaySFX::
|
||||
call WaitSFX
|
||||
call PlaySFX
|
||||
ret
|
||||
; 3c55
|
||||
|
||||
|
||||
WaitSFX:: ; 3c55
|
||||
WaitSFX::
|
||||
; infinite loop until sfx is done playing
|
||||
|
||||
push hl
|
||||
@@ -264,9 +256,8 @@ WaitSFX:: ; 3c55
|
||||
|
||||
pop hl
|
||||
ret
|
||||
; 3c74
|
||||
|
||||
IsSFXPlaying:: ; 3c74
|
||||
IsSFXPlaying::
|
||||
; Return carry if no sound effect is playing.
|
||||
; The inverse of CheckSFX.
|
||||
push hl
|
||||
@@ -292,39 +283,33 @@ IsSFXPlaying:: ; 3c74
|
||||
pop hl
|
||||
and a
|
||||
ret
|
||||
; 3c97
|
||||
|
||||
MaxVolume:: ; 3c97
|
||||
MaxVolume::
|
||||
ld a, MAX_VOLUME
|
||||
ld [wVolume], a
|
||||
ret
|
||||
; 3c9d
|
||||
|
||||
LowVolume:: ; 3c9d
|
||||
LowVolume::
|
||||
ld a, $33 ; 40%
|
||||
ld [wVolume], a
|
||||
ret
|
||||
; 3ca3
|
||||
|
||||
VolumeOff:: ; 3ca3
|
||||
VolumeOff::
|
||||
xor a
|
||||
ld [wVolume], a
|
||||
ret
|
||||
; 3ca8
|
||||
|
||||
Unused_FadeOutMusic:: ; 3ca8
|
||||
Unused_FadeOutMusic::
|
||||
ld a, 4
|
||||
ld [wMusicFade], a
|
||||
ret
|
||||
; 3cae
|
||||
|
||||
FadeInMusic:: ; 3cae
|
||||
FadeInMusic::
|
||||
ld a, 4 | (1 << MUSIC_FADE_IN_F)
|
||||
ld [wMusicFade], a
|
||||
ret
|
||||
; 3cb4
|
||||
|
||||
SkipMusic:: ; 3cb4
|
||||
SkipMusic::
|
||||
; Skip a frames of music.
|
||||
.loop
|
||||
and a
|
||||
@@ -332,9 +317,8 @@ SkipMusic:: ; 3cb4
|
||||
dec a
|
||||
call UpdateSound
|
||||
jr .loop
|
||||
; 3cbc
|
||||
|
||||
FadeToMapMusic:: ; 3cbc
|
||||
FadeToMapMusic::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -360,9 +344,8 @@ FadeToMapMusic:: ; 3cbc
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3cdf
|
||||
|
||||
PlayMapMusic:: ; 3cdf
|
||||
PlayMapMusic::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -388,9 +371,8 @@ PlayMapMusic:: ; 3cdf
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3d03
|
||||
|
||||
EnterMapMusic:: ; 3d03
|
||||
EnterMapMusic::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -419,9 +401,8 @@ EnterMapMusic:: ; 3d03
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3d2f
|
||||
|
||||
TryRestartMapMusic:: ; 3d2f
|
||||
TryRestartMapMusic::
|
||||
ld a, [wDontPlayMapMusicOnReload]
|
||||
and a
|
||||
jr z, RestartMapMusic
|
||||
@@ -433,9 +414,8 @@ TryRestartMapMusic:: ; 3d2f
|
||||
xor a
|
||||
ld [wDontPlayMapMusicOnReload], a
|
||||
ret
|
||||
; 3d47
|
||||
|
||||
RestartMapMusic:: ; 3d47
|
||||
RestartMapMusic::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -452,9 +432,8 @@ RestartMapMusic:: ; 3d47
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 3d62
|
||||
|
||||
SpecialMapMusic:: ; 3d62
|
||||
SpecialMapMusic::
|
||||
ld a, [wPlayerState]
|
||||
cp PLAYER_SURF
|
||||
jr z, .surf
|
||||
@@ -493,16 +472,14 @@ SpecialMapMusic:: ; 3d62
|
||||
ld de, MUSIC_BUG_CATCHING_CONTEST_RANKING
|
||||
scf
|
||||
ret
|
||||
; 3d97
|
||||
|
||||
GetMapMusic_MaybeSpecial:: ; 3d97
|
||||
GetMapMusic_MaybeSpecial::
|
||||
call SpecialMapMusic
|
||||
ret c
|
||||
call GetMapMusic
|
||||
ret
|
||||
; 3d9f
|
||||
|
||||
Unreferenced_Function3d9f:: ; 3d9f
|
||||
Unreferenced_Function3d9f::
|
||||
; Places a BCD number at the
|
||||
; upper center of the screen.
|
||||
ld a, 4 * TILE_WIDTH
|
||||
@@ -536,9 +513,8 @@ Unreferenced_Function3d9f:: ; 3d9f
|
||||
ld [wVirtualOAMSprite38TileID], a
|
||||
ld [wVirtualOAMSprite39TileID], a
|
||||
ret
|
||||
; 3dde
|
||||
|
||||
CheckSFX:: ; 3dde
|
||||
CheckSFX::
|
||||
; Return carry if any SFX channels are active.
|
||||
ld a, [wChannel5Flags1]
|
||||
bit 0, a
|
||||
@@ -557,9 +533,8 @@ CheckSFX:: ; 3dde
|
||||
.playing
|
||||
scf
|
||||
ret
|
||||
; 3dfe
|
||||
|
||||
TerminateExpBarSound:: ; 3dfe
|
||||
TerminateExpBarSound::
|
||||
xor a
|
||||
ld [wChannel5Flags1], a
|
||||
ld [wSoundInput], a
|
||||
@@ -569,10 +544,9 @@ TerminateExpBarSound:: ; 3dfe
|
||||
ld [rNR13], a
|
||||
ld [rNR14], a
|
||||
ret
|
||||
; 3e10
|
||||
|
||||
|
||||
ChannelsOff:: ; 3e10
|
||||
ChannelsOff::
|
||||
; Quickly turn off music channels
|
||||
xor a
|
||||
ld [wChannel1Flags1], a
|
||||
@@ -581,9 +555,8 @@ ChannelsOff:: ; 3e10
|
||||
ld [wChannel4Flags1], a
|
||||
ld [wSoundInput], a
|
||||
ret
|
||||
; 3e21
|
||||
|
||||
SFXChannelsOff:: ; 3e21
|
||||
SFXChannelsOff::
|
||||
; Quickly turn off sound effect channels
|
||||
xor a
|
||||
ld [wChannel5Flags1], a
|
||||
@@ -592,4 +565,3 @@ SFXChannelsOff:: ; 3e21
|
||||
ld [wChannel8Flags1], a
|
||||
ld [wSoundInput], a
|
||||
ret
|
||||
; 3e32
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
UserPartyAttr:: ; 3945
|
||||
UserPartyAttr::
|
||||
push af
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
@@ -8,10 +8,9 @@ UserPartyAttr:: ; 3945
|
||||
.ot
|
||||
pop af
|
||||
jr OTPartyAttr
|
||||
; 3951
|
||||
|
||||
|
||||
OpponentPartyAttr:: ; 3951
|
||||
OpponentPartyAttr::
|
||||
push af
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
@@ -21,10 +20,9 @@ OpponentPartyAttr:: ; 3951
|
||||
.ot
|
||||
pop af
|
||||
jr OTPartyAttr
|
||||
; 395d
|
||||
|
||||
|
||||
BattlePartyAttr:: ; 395d
|
||||
BattlePartyAttr::
|
||||
; Get attribute a from the party struct of the active battle mon.
|
||||
push bc
|
||||
ld c, a
|
||||
@@ -35,10 +33,9 @@ BattlePartyAttr:: ; 395d
|
||||
call GetPartyLocation
|
||||
pop bc
|
||||
ret
|
||||
; 396d
|
||||
|
||||
|
||||
OTPartyAttr:: ; 396d
|
||||
OTPartyAttr::
|
||||
; Get attribute a from the party struct of the active enemy mon.
|
||||
push bc
|
||||
ld c, a
|
||||
@@ -49,49 +46,43 @@ OTPartyAttr:: ; 396d
|
||||
call GetPartyLocation
|
||||
pop bc
|
||||
ret
|
||||
; 397d
|
||||
|
||||
|
||||
ResetDamage:: ; 397d
|
||||
ResetDamage::
|
||||
xor a
|
||||
ld [wCurDamage], a
|
||||
ld [wCurDamage + 1], a
|
||||
ret
|
||||
; 3985
|
||||
|
||||
SetPlayerTurn:: ; 3985
|
||||
SetPlayerTurn::
|
||||
xor a
|
||||
ld [hBattleTurn], a
|
||||
ret
|
||||
; 3989
|
||||
|
||||
SetEnemyTurn:: ; 3989
|
||||
SetEnemyTurn::
|
||||
ld a, 1
|
||||
ld [hBattleTurn], a
|
||||
ret
|
||||
; 398e
|
||||
|
||||
|
||||
UpdateOpponentInParty:: ; 398e
|
||||
UpdateOpponentInParty::
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, UpdateEnemyMonInParty
|
||||
jr UpdateBattleMonInParty
|
||||
; 3995
|
||||
|
||||
UpdateUserInParty:: ; 3995
|
||||
UpdateUserInParty::
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, UpdateBattleMonInParty
|
||||
jr UpdateEnemyMonInParty
|
||||
; 399c
|
||||
|
||||
UpdateBattleMonInParty:: ; 399c
|
||||
UpdateBattleMonInParty::
|
||||
; Update level, status, current HP
|
||||
|
||||
ld a, [wCurBattleMon]
|
||||
|
||||
UpdateBattleMon:: ; 399f
|
||||
UpdateBattleMon::
|
||||
ld hl, wPartyMon1Level
|
||||
call GetPartyLocation
|
||||
|
||||
@@ -100,9 +91,8 @@ UpdateBattleMon:: ; 399f
|
||||
ld hl, wBattleMonLevel
|
||||
ld bc, wBattleMonMaxHP - wBattleMonLevel
|
||||
jp CopyBytes
|
||||
; 39b0
|
||||
|
||||
UpdateEnemyMonInParty:: ; 39b0
|
||||
UpdateEnemyMonInParty::
|
||||
; Update level, status, current HP
|
||||
|
||||
; No wildmons.
|
||||
@@ -119,27 +109,24 @@ UpdateEnemyMonInParty:: ; 39b0
|
||||
ld hl, wEnemyMonLevel
|
||||
ld bc, wEnemyMonMaxHP - wEnemyMonLevel
|
||||
jp CopyBytes
|
||||
; 39c9
|
||||
|
||||
|
||||
RefreshBattleHuds:: ; 39c9
|
||||
RefreshBattleHuds::
|
||||
call UpdateBattleHuds
|
||||
ld c, 3
|
||||
call DelayFrames
|
||||
jp WaitBGMap
|
||||
; 39d4
|
||||
|
||||
UpdateBattleHuds:: ; 39d4
|
||||
UpdateBattleHuds::
|
||||
farcall UpdatePlayerHUD
|
||||
farcall UpdateEnemyHUD
|
||||
ret
|
||||
; 39e1
|
||||
|
||||
|
||||
INCLUDE "home/battle_vars.asm"
|
||||
|
||||
|
||||
FarCopyRadioText:: ; 3a90
|
||||
FarCopyRadioText::
|
||||
inc hl
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@@ -161,10 +148,9 @@ FarCopyRadioText:: ; 3a90
|
||||
ld [hROMBank], a
|
||||
ld [MBC3RomBank], a
|
||||
ret
|
||||
; 3ab2
|
||||
|
||||
|
||||
MobileTextBorder:: ; 3ab2
|
||||
MobileTextBorder::
|
||||
|
||||
CELL_PHONE_TOP EQU $5e
|
||||
CELL_PHONE_BOTTOM EQU $5f
|
||||
@@ -181,10 +167,9 @@ CELL_PHONE_BOTTOM EQU $5f
|
||||
hlcoord 19, 13
|
||||
ld [hl], CELL_PHONE_BOTTOM
|
||||
ret
|
||||
; 3ac3
|
||||
|
||||
|
||||
BattleTextBox:: ; 3ac3
|
||||
BattleTextBox::
|
||||
; Open a textbox and print text at hl.
|
||||
push hl
|
||||
call SpeechTextBox
|
||||
@@ -194,10 +179,9 @@ BattleTextBox:: ; 3ac3
|
||||
pop hl
|
||||
call PrintTextBoxText
|
||||
ret
|
||||
; 3ad5
|
||||
|
||||
|
||||
StdBattleTextBox:: ; 3ad5
|
||||
StdBattleTextBox::
|
||||
; Open a textbox and print battle text at 20:hl.
|
||||
|
||||
ld a, [hROMBank]
|
||||
@@ -211,9 +195,8 @@ StdBattleTextBox:: ; 3ad5
|
||||
pop af
|
||||
rst Bankswitch
|
||||
ret
|
||||
; 3ae1
|
||||
|
||||
GetBattleAnimPointer:: ; 3ae1
|
||||
GetBattleAnimPointer::
|
||||
|
||||
ld a, BANK(BattleAnimations)
|
||||
rst Bankswitch
|
||||
@@ -227,9 +210,8 @@ GetBattleAnimPointer:: ; 3ae1
|
||||
rst Bankswitch
|
||||
|
||||
ret
|
||||
; 3af0
|
||||
|
||||
GetBattleAnimByte:: ; 3af0
|
||||
GetBattleAnimByte::
|
||||
|
||||
push hl
|
||||
push de
|
||||
@@ -258,4 +240,3 @@ GetBattleAnimByte:: ; 3af0
|
||||
|
||||
ld a, [wBattleAnimByte]
|
||||
ret
|
||||
; 3b0c
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
GetBattleVar:: ; 39e1
|
||||
GetBattleVar::
|
||||
; Preserves hl.
|
||||
push hl
|
||||
call GetBattleVarAddr
|
||||
pop hl
|
||||
ret
|
||||
; 39e7
|
||||
|
||||
GetBattleVarAddr:: ; 39e7
|
||||
GetBattleVarAddr::
|
||||
; Get variable from pair a, depending on whose turn it is.
|
||||
; There are 21 variable pairs.
|
||||
|
||||
@@ -110,4 +109,3 @@ BattleVarLocations:
|
||||
dw wCurPlayerMove, wCurEnemyMove
|
||||
dw wLastPlayerCounterMove, wLastEnemyCounterMove
|
||||
dw wLastPlayerMove, wLastEnemyMove
|
||||
; 3a90
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ClearSprites:: ; 300b
|
||||
ClearSprites::
|
||||
; Erase OAM data
|
||||
ld hl, wVirtualOAM
|
||||
ld b, wVirtualOAMEnd - wVirtualOAM
|
||||
@@ -8,9 +8,8 @@ ClearSprites:: ; 300b
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 3016
|
||||
|
||||
HideSprites:: ; 3016
|
||||
HideSprites::
|
||||
; Set all OAM y-positions to 160 to hide them offscreen
|
||||
ld hl, wVirtualOAMSprite00YCoord
|
||||
ld de, SPRITEOAMSTRUCT_LENGTH
|
||||
@@ -22,4 +21,3 @@ HideSprites:: ; 3016
|
||||
dec b
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 3026
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; Functions to copy data from ROM.
|
||||
|
||||
|
||||
Get2bpp_2:: ; dc9
|
||||
Get2bpp_2::
|
||||
ld a, [rLCDC]
|
||||
bit rLCDC_ENABLE, a
|
||||
jp z, Copy2bpp
|
||||
@@ -9,9 +9,8 @@ Get2bpp_2:: ; dc9
|
||||
homecall _Get2bpp
|
||||
|
||||
ret
|
||||
; ddc
|
||||
|
||||
Get1bpp_2:: ; ddc
|
||||
Get1bpp_2::
|
||||
ld a, [rLCDC]
|
||||
bit rLCDC_ENABLE, a
|
||||
jp z, Copy1bpp
|
||||
@@ -19,9 +18,8 @@ Get1bpp_2:: ; ddc
|
||||
homecall _Get1bpp
|
||||
|
||||
ret
|
||||
; def
|
||||
|
||||
FarCopyBytesDouble_DoubleBankSwitch:: ; def
|
||||
FarCopyBytesDouble_DoubleBankSwitch::
|
||||
ld [hBuffer], a
|
||||
ld a, [hROMBank]
|
||||
push af
|
||||
@@ -33,9 +31,8 @@ FarCopyBytesDouble_DoubleBankSwitch:: ; def
|
||||
pop af
|
||||
rst Bankswitch
|
||||
ret
|
||||
; dfd
|
||||
|
||||
OldDMATransfer:: ; dfd
|
||||
OldDMATransfer::
|
||||
dec c
|
||||
ld a, [hBGMapMode]
|
||||
push af
|
||||
@@ -96,41 +93,35 @@ OldDMATransfer:: ; dfd
|
||||
pop af
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
; e4a
|
||||
|
||||
|
||||
|
||||
ReplaceKrisSprite:: ; e4a
|
||||
ReplaceKrisSprite::
|
||||
farcall _ReplaceKrisSprite
|
||||
ret
|
||||
; e51
|
||||
|
||||
|
||||
|
||||
LoadStandardFont:: ; e51
|
||||
LoadStandardFont::
|
||||
farcall _LoadStandardFont
|
||||
ret
|
||||
; e58
|
||||
|
||||
LoadFontsBattleExtra:: ; e58
|
||||
LoadFontsBattleExtra::
|
||||
farcall _LoadFontsBattleExtra
|
||||
ret
|
||||
; e5f
|
||||
|
||||
|
||||
|
||||
LoadFontsExtra:: ; e5f
|
||||
LoadFontsExtra::
|
||||
farcall _LoadFontsExtra1
|
||||
farcall _LoadFontsExtra2
|
||||
ret
|
||||
; e6c
|
||||
|
||||
LoadFontsExtra2:: ; e6c
|
||||
LoadFontsExtra2::
|
||||
farcall _LoadFontsExtra2
|
||||
ret
|
||||
; e73
|
||||
|
||||
DecompressRequest2bpp:: ; e73
|
||||
DecompressRequest2bpp::
|
||||
push de
|
||||
ld a, BANK(sScratch)
|
||||
call GetSRAMBank
|
||||
@@ -147,11 +138,10 @@ DecompressRequest2bpp:: ; e73
|
||||
call Request2bpp
|
||||
call CloseSRAM
|
||||
ret
|
||||
; e8d
|
||||
|
||||
|
||||
|
||||
FarCopyBytes:: ; e8d
|
||||
FarCopyBytes::
|
||||
; copy bc bytes from a:hl to de
|
||||
|
||||
ld [hBuffer], a
|
||||
@@ -168,7 +158,7 @@ FarCopyBytes:: ; e8d
|
||||
; 0xe9b
|
||||
|
||||
|
||||
FarCopyBytesDouble:: ; e9b
|
||||
FarCopyBytesDouble::
|
||||
; Copy bc bytes from a:hl to bc*2 bytes at de,
|
||||
; doubling each byte in the process.
|
||||
|
||||
@@ -207,7 +197,7 @@ FarCopyBytesDouble:: ; e9b
|
||||
; 0xeba
|
||||
|
||||
|
||||
Request2bpp:: ; eba
|
||||
Request2bpp::
|
||||
; Load 2bpp at b:de to occupy c tiles of hl.
|
||||
ld a, [hBGMapMode]
|
||||
push af
|
||||
@@ -280,10 +270,9 @@ Request2bpp:: ; eba
|
||||
sub [hl]
|
||||
ld c, a
|
||||
jr .loop
|
||||
; f1e
|
||||
|
||||
|
||||
Request1bpp:: ; f1e
|
||||
Request1bpp::
|
||||
; Load 1bpp at b:de to occupy c tiles of hl.
|
||||
ld a, [hBGMapMode]
|
||||
push af
|
||||
@@ -356,15 +345,14 @@ Request1bpp:: ; f1e
|
||||
sub [hl]
|
||||
ld c, a
|
||||
jr .loop
|
||||
; f82
|
||||
|
||||
|
||||
Get2bpp:: ; f82
|
||||
Get2bpp::
|
||||
ld a, [rLCDC]
|
||||
bit rLCDC_ENABLE, a
|
||||
jp nz, Request2bpp
|
||||
|
||||
Copy2bpp:: ; f89
|
||||
Copy2bpp::
|
||||
; copy c 2bpp tiles from b:de to hl
|
||||
|
||||
push hl
|
||||
@@ -387,15 +375,14 @@ Copy2bpp:: ; f89
|
||||
pop af
|
||||
|
||||
jp FarCopyBytes
|
||||
; f9d
|
||||
|
||||
|
||||
Get1bpp:: ; f9d
|
||||
Get1bpp::
|
||||
ld a, [rLCDC]
|
||||
bit rLCDC_ENABLE, a
|
||||
jp nz, Request1bpp
|
||||
|
||||
Copy1bpp:: ; fa4
|
||||
Copy1bpp::
|
||||
; copy c 1bpp tiles from b:de to hl
|
||||
|
||||
push de
|
||||
@@ -418,4 +405,3 @@ Copy1bpp:: ; fa4
|
||||
|
||||
pop hl
|
||||
jp FarCopyBytesDouble
|
||||
; fb6
|
||||
|
||||
@@ -92,7 +92,7 @@ GetFarHalfword:: ; 0x305d
|
||||
ret
|
||||
; 0x306b
|
||||
|
||||
FarCopyWRAM:: ; 306b
|
||||
FarCopyWRAM::
|
||||
ld [hBuffer], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -104,9 +104,8 @@ FarCopyWRAM:: ; 306b
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 307b
|
||||
|
||||
GetFarWRAMByte:: ; 307b
|
||||
GetFarWRAMByte::
|
||||
ld [hBuffer], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -118,9 +117,8 @@ GetFarWRAMByte:: ; 307b
|
||||
ld [rSVBK], a
|
||||
ld a, [hBuffer]
|
||||
ret
|
||||
; 308d
|
||||
|
||||
GetFarWRAMWord:: ; 308d
|
||||
GetFarWRAMWord::
|
||||
ld [hBuffer], a
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -132,4 +130,3 @@ GetFarWRAMWord:: ; 308d
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 309d
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
CopyName1:: ; 30d6
|
||||
CopyName1::
|
||||
; Copies the name from de to wStringBuffer2
|
||||
ld hl, wStringBuffer2
|
||||
|
||||
CopyName2:: ; 30d9
|
||||
CopyName2::
|
||||
; Copies the name from de to hl
|
||||
.loop
|
||||
ld a, [de]
|
||||
@@ -11,4 +11,3 @@ CopyName2:: ; 30d9
|
||||
cp "@"
|
||||
jr nz, .loop
|
||||
ret
|
||||
; 30e1
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
LoadTileMapToTempTileMap:: ; 309d
|
||||
LoadTileMapToTempTileMap::
|
||||
; Load wTileMap into wTempTileMap
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -11,18 +11,16 @@ LoadTileMapToTempTileMap:: ; 309d
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 30b4
|
||||
|
||||
Call_LoadTempTileMapToTileMap:: ; 30b4
|
||||
Call_LoadTempTileMapToTileMap::
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
call LoadTempTileMapToTileMap
|
||||
ld a, 1
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
; 30bf
|
||||
|
||||
LoadTempTileMapToTileMap:: ; 30bf
|
||||
LoadTempTileMapToTileMap::
|
||||
; Load wTempTileMap into wTileMap
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
@@ -35,4 +33,3 @@ LoadTempTileMapToTileMap:: ; 30bf
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 30d6
|
||||
|
||||
21
home/cry.asm
21
home/cry.asm
@@ -1,4 +1,4 @@
|
||||
PlayStereoCry:: ; 37b6
|
||||
PlayStereoCry::
|
||||
push af
|
||||
ld a, 1
|
||||
ld [wStereoPanningMask], a
|
||||
@@ -6,9 +6,8 @@ PlayStereoCry:: ; 37b6
|
||||
call _PlayMonCry
|
||||
call WaitSFX
|
||||
ret
|
||||
; 37c4
|
||||
|
||||
PlayStereoCry2:: ; 37c4
|
||||
PlayStereoCry2::
|
||||
; Don't wait for the cry to end.
|
||||
; Used during pic animations.
|
||||
push af
|
||||
@@ -16,15 +15,13 @@ PlayStereoCry2:: ; 37c4
|
||||
ld [wStereoPanningMask], a
|
||||
pop af
|
||||
jp _PlayMonCry
|
||||
; 37ce
|
||||
|
||||
PlayMonCry:: ; 37ce
|
||||
PlayMonCry::
|
||||
call PlayMonCry2
|
||||
call WaitSFX
|
||||
ret
|
||||
; 37d5
|
||||
|
||||
PlayMonCry2:: ; 37d5
|
||||
PlayMonCry2::
|
||||
; Don't wait for the cry to end.
|
||||
push af
|
||||
xor a
|
||||
@@ -33,9 +30,8 @@ PlayMonCry2:: ; 37d5
|
||||
pop af
|
||||
call _PlayMonCry
|
||||
ret
|
||||
; 37e2
|
||||
|
||||
_PlayMonCry:: ; 37e2
|
||||
_PlayMonCry::
|
||||
push hl
|
||||
push de
|
||||
push bc
|
||||
@@ -52,9 +48,8 @@ _PlayMonCry:: ; 37e2
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
; 37f3
|
||||
|
||||
LoadCry:: ; 37f3
|
||||
LoadCry::
|
||||
; Load cry bc.
|
||||
|
||||
call GetCryIndex
|
||||
@@ -88,9 +83,8 @@ endr
|
||||
rst Bankswitch
|
||||
and a
|
||||
ret
|
||||
; 381e
|
||||
|
||||
GetCryIndex:: ; 381e
|
||||
GetCryIndex::
|
||||
and a
|
||||
jr z, .no
|
||||
cp NUM_POKEMON + 1
|
||||
@@ -105,4 +99,3 @@ GetCryIndex:: ; 381e
|
||||
.no
|
||||
scf
|
||||
ret
|
||||
; 382d
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FarDecompress:: ; b40
|
||||
FarDecompress::
|
||||
; Decompress graphics data from a:hl to de.
|
||||
|
||||
ld [wLZBank], a
|
||||
@@ -12,10 +12,9 @@ FarDecompress:: ; b40
|
||||
pop af
|
||||
rst Bankswitch
|
||||
ret
|
||||
; b50
|
||||
|
||||
|
||||
Decompress:: ; b50
|
||||
Decompress::
|
||||
; Pokemon Crystal uses an lz variant for compression.
|
||||
; This is mainly (but not necessarily) used for graphics.
|
||||
|
||||
@@ -340,4 +339,3 @@ LZ_LONG_HI EQU %00000011
|
||||
.next
|
||||
inc hl
|
||||
jp .Main
|
||||
; c2f
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
DelayFrame:: ; 45a
|
||||
DelayFrame::
|
||||
; Wait for one frame
|
||||
ld a, 1
|
||||
ld [wVBlankOccurred], a
|
||||
@@ -10,13 +10,11 @@ DelayFrame:: ; 45a
|
||||
and a
|
||||
jr nz, .halt
|
||||
ret
|
||||
; 468
|
||||
|
||||
|
||||
DelayFrames:: ; 468
|
||||
DelayFrames::
|
||||
; Wait c frames
|
||||
call DelayFrame
|
||||
dec c
|
||||
jr nz, DelayFrames
|
||||
ret
|
||||
; 46f
|
||||
|
||||
@@ -5,20 +5,18 @@
|
||||
; and double speed at any time, but LCD output
|
||||
; collapses during the switch.
|
||||
|
||||
DoubleSpeed:: ; 2fef
|
||||
DoubleSpeed::
|
||||
ld hl, rKEY1
|
||||
bit 7, [hl]
|
||||
jr z, SwitchSpeed
|
||||
ret
|
||||
; 2ff7
|
||||
|
||||
NormalSpeed:: ; 2ff7
|
||||
NormalSpeed::
|
||||
ld hl, rKEY1
|
||||
bit 7, [hl]
|
||||
ret z
|
||||
; 2ffd
|
||||
|
||||
SwitchSpeed:: ; 2ffd
|
||||
SwitchSpeed::
|
||||
set 0, [hl]
|
||||
xor a
|
||||
ld [rIF], a
|
||||
@@ -27,4 +25,3 @@ SwitchSpeed:: ; 2ffd
|
||||
ld [rJOYP], a
|
||||
stop ; rgbasm adds a nop after this instruction by default
|
||||
ret
|
||||
; 300b
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; Functions to fade the screen in and out.
|
||||
|
||||
|
||||
Unreferenced_Function48c:: ; 48c
|
||||
Unreferenced_Function48c::
|
||||
; TimeOfDayFade
|
||||
ld a, [wTimeOfDayPal]
|
||||
ld b, a
|
||||
@@ -20,10 +20,9 @@ Unreferenced_Function48c:: ; 48c
|
||||
ld a, [hli]
|
||||
ld [rOBP1], a
|
||||
ret
|
||||
; 4a3
|
||||
|
||||
|
||||
RotateFourPalettesRight:: ; 4a3
|
||||
RotateFourPalettesRight::
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .dmg
|
||||
@@ -35,9 +34,8 @@ RotateFourPalettesRight:: ; 4a3
|
||||
ld hl, IncGradGBPalTable_08
|
||||
ld b, 4
|
||||
jr RotatePalettesRight
|
||||
; 4b6
|
||||
|
||||
RotateThreePalettesRight:: ; 4b6
|
||||
RotateThreePalettesRight::
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .dmg
|
||||
@@ -48,7 +46,7 @@ RotateThreePalettesRight:: ; 4b6
|
||||
.dmg
|
||||
ld hl, IncGradGBPalTable_13
|
||||
ld b, 3
|
||||
RotatePalettesRight:: ; 4c7
|
||||
RotatePalettesRight::
|
||||
; Rotate palettes to the right and fill with loaded colors from the left
|
||||
; If we're already at the leftmost color, fill with the leftmost color
|
||||
push de
|
||||
@@ -65,9 +63,8 @@ RotatePalettesRight:: ; 4c7
|
||||
dec b
|
||||
jr nz, RotatePalettesRight
|
||||
ret
|
||||
; 4dd
|
||||
|
||||
RotateFourPalettesLeft:: ; 4dd
|
||||
RotateFourPalettesLeft::
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .dmg
|
||||
@@ -79,9 +76,8 @@ RotateFourPalettesLeft:: ; 4dd
|
||||
ld hl, IncGradGBPalTable_12 - 1
|
||||
ld b, 4
|
||||
jr RotatePalettesLeft
|
||||
; 4f0
|
||||
|
||||
RotateThreePalettesLeft:: ; 4f0
|
||||
RotateThreePalettesLeft::
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
jr z, .dmg
|
||||
@@ -92,7 +88,7 @@ RotateThreePalettesLeft:: ; 4f0
|
||||
.dmg
|
||||
ld hl, IncGradGBPalTable_15 - 1
|
||||
ld b, 3
|
||||
RotatePalettesLeft:: ; 501
|
||||
RotatePalettesLeft::
|
||||
; Rotate palettes to the left and fill with loaded colors from the right
|
||||
; If we're already at the rightmost color, fill with the rightmost color
|
||||
push de
|
||||
@@ -109,10 +105,8 @@ RotatePalettesLeft:: ; 501
|
||||
dec b
|
||||
jr nz, RotatePalettesLeft
|
||||
ret
|
||||
; 517
|
||||
|
||||
|
||||
; 517
|
||||
IncGradGBPalTable_00:: db %11111111, %11111111, %11111111
|
||||
IncGradGBPalTable_01:: db %11111110, %11111110, %11111110
|
||||
IncGradGBPalTable_02:: db %11111001, %11111001, %11111001
|
||||
@@ -134,4 +128,3 @@ IncGradGBPalTable_13:: db %10010000, %10000000, %10010000
|
||||
IncGradGBPalTable_14:: db %01000000, %01000000, %01000000
|
||||
|
||||
IncGradGBPalTable_15:: db %00000000, %00000000, %00000000
|
||||
; 547
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
FarCall_de:: ; 2d54
|
||||
FarCall_de::
|
||||
; Call a:de.
|
||||
; Preserves other registers.
|
||||
|
||||
@@ -13,10 +13,9 @@ FarCall_de:: ; 2d54
|
||||
.de
|
||||
push de
|
||||
ret
|
||||
; 2d63
|
||||
|
||||
|
||||
FarCall_hl:: ; 2d63
|
||||
FarCall_hl::
|
||||
; Call a:hl.
|
||||
; Preserves other registers.
|
||||
|
||||
@@ -26,9 +25,8 @@ FarCall_hl:: ; 2d63
|
||||
ld a, [hBuffer]
|
||||
rst Bankswitch
|
||||
call FarJump_hl
|
||||
; 2d6e
|
||||
|
||||
ReturnFarCall:: ; 2d6e
|
||||
ReturnFarCall::
|
||||
; We want to retain the contents of f.
|
||||
; To do this, we can pop to bc instead of af.
|
||||
|
||||
@@ -47,8 +45,6 @@ ReturnFarCall:: ; 2d6e
|
||||
ld a, [wFarCallBCBuffer + 1]
|
||||
ld c, a
|
||||
ret
|
||||
; 2d82
|
||||
|
||||
FarJump_hl:: ; 2d82
|
||||
FarJump_hl::
|
||||
jp hl
|
||||
; 2d83
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
ResetMapBufferEventFlags:: ; 2e50
|
||||
ResetMapBufferEventFlags::
|
||||
xor a
|
||||
ld hl, wEventFlags
|
||||
ld [hli], a
|
||||
ret
|
||||
; 2e56
|
||||
|
||||
ResetBikeFlags:: ; 2e56
|
||||
ResetBikeFlags::
|
||||
xor a
|
||||
ld hl, wBikeFlags
|
||||
ld [hli], a
|
||||
ld [hl], a
|
||||
ret
|
||||
; 2e5d
|
||||
|
||||
ResetFlashIfOutOfCave:: ; 2e5d
|
||||
ResetFlashIfOutOfCave::
|
||||
ld a, [wEnvironment]
|
||||
cp ROUTE
|
||||
jr z, .outdoors
|
||||
@@ -25,7 +23,6 @@ ResetFlashIfOutOfCave:: ; 2e5d
|
||||
ld hl, wStatusFlags
|
||||
res STATUSFLAGS_FLASH_F, [hl]
|
||||
ret
|
||||
; 2e6f
|
||||
|
||||
|
||||
EventFlagAction:: ; 0x2e6f
|
||||
@@ -102,11 +99,10 @@ FlagAction:: ; 0x2e76
|
||||
; 0x2ead
|
||||
|
||||
|
||||
CheckReceivedDex:: ; 2ead
|
||||
CheckReceivedDex::
|
||||
ld de, ENGINE_POKEDEX
|
||||
ld b, CHECK_FLAG
|
||||
farcall EngineFlagAction
|
||||
ld a, c
|
||||
and a
|
||||
ret
|
||||
; 2ebb
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
ResetGameTime:: ; 208a
|
||||
ResetGameTime::
|
||||
xor a
|
||||
ld [wGameTimeCap], a
|
||||
ld [wGameTimeHours], a
|
||||
@@ -7,10 +7,9 @@ ResetGameTime:: ; 208a
|
||||
ld [wGameTimeSeconds], a
|
||||
ld [wGameTimeFrames], a
|
||||
ret
|
||||
; 209e
|
||||
|
||||
|
||||
GameTimer:: ; 209e
|
||||
GameTimer::
|
||||
|
||||
nop
|
||||
|
||||
@@ -24,10 +23,9 @@ GameTimer:: ; 209e
|
||||
pop af
|
||||
ld [rSVBK], a
|
||||
ret
|
||||
; 20ad
|
||||
|
||||
|
||||
UpdateGameTimer:: ; 20ad
|
||||
UpdateGameTimer::
|
||||
; Increment the game timer by one frame.
|
||||
; The game timer is capped at 999:59:59.00.
|
||||
|
||||
@@ -128,4 +126,3 @@ UpdateGameTimer:: ; 20ad
|
||||
ld a, l
|
||||
ld [wGameTimeHours + 1], a
|
||||
ret
|
||||
; 210f
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
PrinterReceive:: ; 2057
|
||||
PrinterReceive::
|
||||
homecall _PrinterReceive
|
||||
|
||||
ret
|
||||
; 2063
|
||||
|
||||
AskSerial:: ; 2063
|
||||
AskSerial::
|
||||
; send out a handshake while serial int is off
|
||||
ld a, [wPrinterConnectionOpen]
|
||||
bit 0, a
|
||||
@@ -41,4 +40,3 @@ AskSerial:: ; 2063
|
||||
ld [rSC], a
|
||||
|
||||
ret
|
||||
; 208a
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
; HM moves can't be forgotten
|
||||
|
||||
IsHM:: ; 34df
|
||||
IsHM::
|
||||
cp HM01
|
||||
jr c, .NotHM
|
||||
scf
|
||||
@@ -8,14 +8,13 @@ IsHM:: ; 34df
|
||||
.NotHM:
|
||||
and a
|
||||
ret
|
||||
; 34e7
|
||||
|
||||
IsHMMove:: ; 34e7
|
||||
IsHMMove::
|
||||
ld hl, .HMMoves
|
||||
ld de, 1
|
||||
jp IsInArray
|
||||
|
||||
.HMMoves: ; 34f0
|
||||
.HMMoves:
|
||||
db CUT
|
||||
db FLY
|
||||
db SURF
|
||||
@@ -24,4 +23,3 @@ IsHMMove:: ; 34e7
|
||||
db WATERFALL
|
||||
db WHIRLPOOL
|
||||
db -1 ; end
|
||||
; 34f8
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
SetHPPal:: ; 334e
|
||||
SetHPPal::
|
||||
; Set palette for hp bar pixel length e at hl.
|
||||
call GetHPPal
|
||||
ld [hl], d
|
||||
ret
|
||||
; 3353
|
||||
|
||||
GetHPPal:: ; 3353
|
||||
GetHPPal::
|
||||
; Get palette for hp bar pixel length e in d.
|
||||
ld d, HP_GREEN
|
||||
ld a, e
|
||||
@@ -16,4 +15,3 @@ GetHPPal:: ; 3353
|
||||
ret nc
|
||||
inc d ; HP_RED
|
||||
ret
|
||||
; 335f
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Reset:: ; 150
|
||||
Reset::
|
||||
di
|
||||
call MapSetup_Sound_Off
|
||||
xor a
|
||||
@@ -17,10 +17,9 @@ Reset:: ; 150
|
||||
call DelayFrames
|
||||
|
||||
jr Init
|
||||
; 16e
|
||||
|
||||
|
||||
_Start:: ; 16e
|
||||
_Start::
|
||||
cp $11
|
||||
jr z, .cgb
|
||||
xor a
|
||||
@@ -33,10 +32,9 @@ _Start:: ; 16e
|
||||
ld [hCGB], a
|
||||
ld a, $1
|
||||
ld [hSystemBooted], a
|
||||
; 17d
|
||||
|
||||
|
||||
Init:: ; 17d
|
||||
Init::
|
||||
|
||||
di
|
||||
|
||||
@@ -172,10 +170,9 @@ Init:: ; 17d
|
||||
xor a
|
||||
ld [wMapMusic], a
|
||||
jp GameInit
|
||||
; 245
|
||||
|
||||
|
||||
ClearVRAM:: ; 245
|
||||
ClearVRAM::
|
||||
; Wipe VRAM banks 0 and 1
|
||||
|
||||
ld a, 1
|
||||
@@ -190,9 +187,8 @@ ClearVRAM:: ; 245
|
||||
xor a
|
||||
call ByteFill
|
||||
ret
|
||||
; 25a
|
||||
|
||||
ClearWRAM:: ; 25a
|
||||
ClearWRAM::
|
||||
; Wipe swappable WRAM banks (1-7)
|
||||
; Assumes CGB or AGB
|
||||
|
||||
@@ -209,9 +205,8 @@ ClearWRAM:: ; 25a
|
||||
cp 8
|
||||
jr nc, .bank_loop ; Should be jr c
|
||||
ret
|
||||
; 270
|
||||
|
||||
ClearsScratch:: ; 270
|
||||
ClearsScratch::
|
||||
; Wipe the first 32 bytes of sScratch
|
||||
|
||||
ld a, BANK(sScratch)
|
||||
@@ -222,4 +217,3 @@ ClearsScratch:: ; 270
|
||||
call ByteFill
|
||||
call CloseSRAM
|
||||
ret
|
||||
; 283
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user