mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Various labels
This commit is contained in:
parent
893b3a217e
commit
adf2fe712d
@ -613,6 +613,7 @@ FadeMusic: ; e8358
|
|||||||
jr z, .novolume
|
jr z, .novolume
|
||||||
dec a
|
dec a
|
||||||
jr .updatevolume
|
jr .updatevolume
|
||||||
|
|
||||||
.novolume
|
.novolume
|
||||||
; make sure volume is off
|
; make sure volume is off
|
||||||
xor a
|
xor a
|
||||||
@ -660,6 +661,7 @@ FadeMusic: ; e8358
|
|||||||
ld hl, MusicFade
|
ld hl, MusicFade
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.fadein
|
.fadein
|
||||||
; are we done?
|
; are we done?
|
||||||
cp a, $07
|
cp a, $07
|
||||||
|
@ -8463,7 +8463,7 @@ Function3f4dd: ; 3f4dd
|
|||||||
ld [TempBattleMonSpecies], a
|
ld [TempBattleMonSpecies], a
|
||||||
ld [wd0d2], a
|
ld [wd0d2], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
callba PlayBattleMusic
|
callba PlayBattleMusic
|
||||||
callba ShowLinkBattleParticipants
|
callba ShowLinkBattleParticipants
|
||||||
callba FindFirstAliveMon
|
callba FindFirstAliveMon
|
||||||
@ -8783,7 +8783,7 @@ endr
|
|||||||
|
|
||||||
Function3f759: ; 3f759
|
Function3f759: ; 3f759
|
||||||
callba MobileFn_1060df
|
callba MobileFn_1060df
|
||||||
callba Function106187
|
callba BackupMobileEventIndex
|
||||||
ld a, [CurOTMon]
|
ld a, [CurOTMon]
|
||||||
ld hl, OTPartyMon1Status
|
ld hl, OTPartyMon1Status
|
||||||
call GetPartyLocation
|
call GetPartyLocation
|
||||||
@ -8827,7 +8827,7 @@ Function3f77c: ; 3f77c
|
|||||||
.asm_3f7c3
|
.asm_3f7c3
|
||||||
hlcoord 6, 8
|
hlcoord 6, 8
|
||||||
call PlaceString
|
call PlaceString
|
||||||
callba Function106187
|
callba BackupMobileEventIndex
|
||||||
ld c, $c8
|
ld c, $c8
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, BANK(sLinkBattleStats)
|
ld a, BANK(sLinkBattleStats)
|
||||||
@ -9370,7 +9370,7 @@ Function3fb6c: ; 3fb6c
|
|||||||
call Function3ed9f
|
call Function3ed9f
|
||||||
call Function3fbd6
|
call Function3fbd6
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
ld a, $90
|
ld a, $90
|
||||||
ld [hWY], a
|
ld [hWY], a
|
||||||
|
@ -252,7 +252,7 @@ MapSetupCommands: ; 15440
|
|||||||
dba FadeOutMapAndMusic ; 06
|
dba FadeOutMapAndMusic ; 06
|
||||||
dba EnterMapMusic ; 07
|
dba EnterMapMusic ; 07
|
||||||
dba ForceMapMusic ; 08
|
dba ForceMapMusic ; 08
|
||||||
dba CrankUpTheVolume ; 09
|
dba FadeInMusic ; 09
|
||||||
dba LoadBlockData ; 0a
|
dba LoadBlockData ; 0a
|
||||||
dba LoadNeighboringBlockData ; 0b
|
dba LoadNeighboringBlockData ; 0b
|
||||||
dba SaveScreen ; 0c
|
dba SaveScreen ; 0c
|
||||||
@ -300,13 +300,13 @@ DontScrollText: ; 154ca
|
|||||||
|
|
||||||
ActivateMapAnims: ; 154cf
|
ActivateMapAnims: ; 154cf
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ret
|
ret
|
||||||
; 154d3
|
; 154d3
|
||||||
|
|
||||||
SuspendMapAnims: ; 154d3
|
SuspendMapAnims: ; 154d3
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ret
|
ret
|
||||||
; 154d7
|
; 154d7
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ Pokedex: ; 40000
|
|||||||
ld [hInMenu], a
|
ld [hInMenu], a
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
call InitPokedex
|
call InitPokedex
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ Function14a58: ; 14a58
|
|||||||
call Function14e13
|
call Function14e13
|
||||||
call SaveBackupPokemonData
|
call SaveBackupPokemonData
|
||||||
call SaveBackupChecksum
|
call SaveBackupChecksum
|
||||||
callba Function44725
|
callba BackupScratchmons
|
||||||
callba Function1406a
|
callba Function1406a
|
||||||
call ClearWRAMStateAfterSave
|
call ClearWRAMStateAfterSave
|
||||||
ret
|
ret
|
||||||
@ -106,8 +106,8 @@ Function14ad5: ; 14ad5
|
|||||||
call SaveBackupPlayerData
|
call SaveBackupPlayerData
|
||||||
call SaveBackupPokemonData
|
call SaveBackupPokemonData
|
||||||
call SaveBackupChecksum
|
call SaveBackupChecksum
|
||||||
callba Function44725
|
callba BackupScratchmons
|
||||||
callba Function106187
|
callba BackupMobileEventIndex
|
||||||
callba Function1406a
|
callba Function1406a
|
||||||
call LoadBox
|
call LoadBox
|
||||||
call ClearWRAMStateAfterSave
|
call ClearWRAMStateAfterSave
|
||||||
@ -284,8 +284,8 @@ SaveGameData_: ; 14c10
|
|||||||
call SaveBackupPokemonData
|
call SaveBackupPokemonData
|
||||||
call SaveBackupChecksum
|
call SaveBackupChecksum
|
||||||
call UpdateStackTop
|
call UpdateStackTop
|
||||||
callba Function44725
|
callba BackupScratchmons
|
||||||
callba Function106187
|
callba BackupMobileEventIndex
|
||||||
callba Function1406a
|
callba Function1406a
|
||||||
ld a, BANK(s1_be45)
|
ld a, BANK(s1_be45)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
@ -630,8 +630,8 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
|
|||||||
call LoadPlayerData
|
call LoadPlayerData
|
||||||
call LoadPokemonData
|
call LoadPokemonData
|
||||||
call LoadBox
|
call LoadBox
|
||||||
callba Function44745
|
callba RestoreScratchmons
|
||||||
callba Function10619d
|
callba RestoreMobileEventIndex
|
||||||
callba Function1050ea
|
callba Function1050ea
|
||||||
call ValidateBackupSave
|
call ValidateBackupSave
|
||||||
call SaveBackupOptions
|
call SaveBackupOptions
|
||||||
@ -647,8 +647,8 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
|
|||||||
call LoadBackupPlayerData
|
call LoadBackupPlayerData
|
||||||
call LoadBackupPokemonData
|
call LoadBackupPokemonData
|
||||||
call LoadBox
|
call LoadBox
|
||||||
callba Function44745
|
callba RestoreScratchmons
|
||||||
callba Function10619d
|
callba RestoreMobileEventIndex
|
||||||
callba Function1050ea
|
callba Function1050ea
|
||||||
call ValidateSave
|
call ValidateSave
|
||||||
call SaveOptions
|
call SaveOptions
|
||||||
|
@ -1222,7 +1222,7 @@ ApplyPersonFacing: ; 0x9728b
|
|||||||
; 0x972bc
|
; 0x972bc
|
||||||
|
|
||||||
.DisableTextTiles: ; 0x972bc
|
.DisableTextTiles: ; 0x972bc
|
||||||
call Function217a
|
call LoadMapPart
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
.loop
|
.loop
|
||||||
|
@ -124,7 +124,7 @@ SpecialsPointers:: ; c029
|
|||||||
add_special ProfOaksPCBoot
|
add_special ProfOaksPCBoot
|
||||||
add_special SpecialGameboyCheck
|
add_special SpecialGameboyCheck
|
||||||
add_special SpecialTrainerHouse
|
add_special SpecialTrainerHouse
|
||||||
add_special Function16dc7
|
add_special PhotoStudio
|
||||||
add_special InitRoamMons
|
add_special InitRoamMons
|
||||||
add_special Functionc48f
|
add_special Functionc48f
|
||||||
add_special Functionc49f
|
add_special Functionc49f
|
||||||
|
22
home.asm
22
home.asm
@ -99,7 +99,7 @@ Function2ecb:: ; 2ecb
|
|||||||
DisableSpriteUpdates:: ; 0x2ed3
|
DisableSpriteUpdates:: ; 0x2ed3
|
||||||
; disables overworld sprite updating?
|
; disables overworld sprite updating?
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld a, [VramState]
|
ld a, [VramState]
|
||||||
res 0, a
|
res 0, a
|
||||||
ld [VramState], a
|
ld [VramState], a
|
||||||
@ -115,7 +115,7 @@ EnableSpriteUpdates:: ; 2ee4
|
|||||||
set 0, a
|
set 0, a
|
||||||
ld [VramState], a
|
ld [VramState], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ret
|
ret
|
||||||
; 2ef6
|
; 2ef6
|
||||||
|
|
||||||
@ -427,13 +427,13 @@ PrintNum:: ; 3198
|
|||||||
; 31a4
|
; 31a4
|
||||||
|
|
||||||
|
|
||||||
Function31a4:: ; 31a4
|
MobilePrintNum:: ; 31a4
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
ld a, BANK(Function1061ef)
|
ld a, BANK(_MobilePrintNum)
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call Function1061ef
|
call _MobilePrintNum
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
@ -609,10 +609,10 @@ Function3246:: ; 3246
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
ld a, [$ffde]
|
ld a, [hMapAnims]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
|
|
||||||
.wait
|
.wait
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
@ -636,7 +636,7 @@ Function3246:: ; 3246
|
|||||||
ei
|
ei
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
pop af
|
pop af
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
ret
|
ret
|
||||||
@ -650,7 +650,7 @@ Function327b:: ; 327b
|
|||||||
ld h, a
|
ld h, a
|
||||||
ld l, 0
|
ld l, 0
|
||||||
ld a, SCREEN_HEIGHT
|
ld a, SCREEN_HEIGHT
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
ld b, 1 << 1 ; not in v/hblank
|
ld b, 1 << 1 ; not in v/hblank
|
||||||
ld c, rSTAT % $100
|
ld c, rSTAT % $100
|
||||||
|
|
||||||
@ -671,9 +671,9 @@ endr
|
|||||||
|
|
||||||
ld de, $20 - SCREEN_WIDTH
|
ld de, $20 - SCREEN_WIDTH
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [$ffd3]
|
ld a, [hTilesPerCycle]
|
||||||
dec a
|
dec a
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
|
|
||||||
ld a, [hSPBuffer]
|
ld a, [hSPBuffer]
|
||||||
|
@ -312,13 +312,13 @@ VolumeOff:: ; 3ca3
|
|||||||
ret
|
ret
|
||||||
; 3ca8
|
; 3ca8
|
||||||
|
|
||||||
Function3ca8:: ; 3ca8
|
FadeOutMusic:: ; 3ca8
|
||||||
ld a, 4
|
ld a, 4
|
||||||
ld [MusicFade], a
|
ld [MusicFade], a
|
||||||
ret
|
ret
|
||||||
; 3cae
|
; 3cae
|
||||||
|
|
||||||
CrankUpTheVolume:: ; 3cae
|
FadeInMusic:: ; 3cae
|
||||||
ld a, 4 | 1 << 7
|
ld a, 4 | 1 << 7
|
||||||
ld [MusicFade], a
|
ld [MusicFade], a
|
||||||
ret
|
ret
|
||||||
@ -326,11 +326,12 @@ CrankUpTheVolume:: ; 3cae
|
|||||||
|
|
||||||
SkipMusic:: ; 3cb4
|
SkipMusic:: ; 3cb4
|
||||||
; Skip a frames of music.
|
; Skip a frames of music.
|
||||||
|
.loop
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
dec a
|
dec a
|
||||||
call UpdateSound
|
call UpdateSound
|
||||||
jr SkipMusic
|
jr .loop
|
||||||
; 3cbc
|
; 3cbc
|
||||||
|
|
||||||
FadeToMapMusic:: ; 3cbc
|
FadeToMapMusic:: ; 3cbc
|
||||||
|
@ -232,10 +232,10 @@ Request2bpp:: ; eba
|
|||||||
ld a, b
|
ld a, b
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
ld a, [$ffd3]
|
ld a, [hTilesPerCycle]
|
||||||
push af
|
push af
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
|
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp LINK_MOBILE
|
cp LINK_MOBILE
|
||||||
@ -244,7 +244,7 @@ Request2bpp:: ; eba
|
|||||||
and a
|
and a
|
||||||
jr nz, .NotMobile
|
jr nz, .NotMobile
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
|
|
||||||
.NotMobile
|
.NotMobile
|
||||||
ld a, e
|
ld a, e
|
||||||
@ -257,7 +257,7 @@ Request2bpp:: ; eba
|
|||||||
ld [Requested2bppDest + 1], a
|
ld [Requested2bppDest + 1], a
|
||||||
.loop
|
.loop
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, $ffd3
|
ld hl, hTilesPerCycle
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nc, .iterate
|
jr nc, .iterate
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ Request2bpp:: ; eba
|
|||||||
jr nz, .wait
|
jr nz, .wait
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
@ -279,7 +279,7 @@ Request2bpp:: ; eba
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.iterate
|
.iterate
|
||||||
ld a, [$ffd3]
|
ld a, [hTilesPerCycle]
|
||||||
ld [Requested2bpp], a
|
ld [Requested2bpp], a
|
||||||
|
|
||||||
.wait2
|
.wait2
|
||||||
@ -289,7 +289,7 @@ Request2bpp:: ; eba
|
|||||||
jr nz, .wait2
|
jr nz, .wait2
|
||||||
|
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, $ffd3
|
ld hl, hTilesPerCycle
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld c, a
|
ld c, a
|
||||||
jr .loop
|
jr .loop
|
||||||
@ -297,6 +297,7 @@ Request2bpp:: ; eba
|
|||||||
|
|
||||||
|
|
||||||
Request1bpp:: ; f1e
|
Request1bpp:: ; f1e
|
||||||
|
; Load 1bpp at b:de to occupy c tiles of hl.
|
||||||
ld a, [hBGMapMode]
|
ld a, [hBGMapMode]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
@ -307,11 +308,11 @@ Request1bpp:: ; f1e
|
|||||||
ld a, b
|
ld a, b
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
ld a, [$ffd3]
|
ld a, [hTilesPerCycle]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp LINK_MOBILE
|
cp LINK_MOBILE
|
||||||
jr nz, .NotMobile
|
jr nz, .NotMobile
|
||||||
@ -319,7 +320,7 @@ Request1bpp:: ; f1e
|
|||||||
and a
|
and a
|
||||||
jr nz, .NotMobile
|
jr nz, .NotMobile
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
|
|
||||||
.NotMobile
|
.NotMobile
|
||||||
ld a, e
|
ld a, e
|
||||||
@ -332,7 +333,7 @@ Request1bpp:: ; f1e
|
|||||||
ld [Requested1bppDest + 1], a
|
ld [Requested1bppDest + 1], a
|
||||||
.loop
|
.loop
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, $ffd3
|
ld hl, hTilesPerCycle
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nc, .iterate
|
jr nc, .iterate
|
||||||
|
|
||||||
@ -344,7 +345,7 @@ Request1bpp:: ; f1e
|
|||||||
jr nz, .wait
|
jr nz, .wait
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [$ffd3], a
|
ld [hTilesPerCycle], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
@ -354,7 +355,7 @@ Request1bpp:: ; f1e
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.iterate
|
.iterate
|
||||||
ld a, [$ffd3]
|
ld a, [hTilesPerCycle]
|
||||||
ld [Requested1bpp], a
|
ld [Requested1bpp], a
|
||||||
|
|
||||||
.wait2
|
.wait2
|
||||||
@ -364,7 +365,7 @@ Request1bpp:: ; f1e
|
|||||||
jr nz, .wait2
|
jr nz, .wait2
|
||||||
|
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, $ffd3
|
ld hl, hTilesPerCycle
|
||||||
sub [hl]
|
sub [hl]
|
||||||
ld c, a
|
ld c, a
|
||||||
jr .loop
|
jr .loop
|
||||||
|
@ -2,7 +2,7 @@ Reset:: ; 150
|
|||||||
di
|
di
|
||||||
call SoundRestart
|
call SoundRestart
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
xor a
|
xor a
|
||||||
ld [rIF], a
|
ld [rIF], a
|
||||||
@ -109,7 +109,7 @@ Init:: ; 17d
|
|||||||
call LoadPushOAM
|
call LoadPushOAM
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld [hSCX], a
|
ld [hSCX], a
|
||||||
ld [hSCY], a
|
ld [hSCY], a
|
||||||
ld [rJOYP], a
|
ld [rJOYP], a
|
||||||
|
36
home/map.asm
36
home/map.asm
@ -96,19 +96,19 @@ GetMapTrigger:: ; 2147
|
|||||||
; 2173
|
; 2173
|
||||||
|
|
||||||
Function2173:: ; 2173
|
Function2173:: ; 2173
|
||||||
call Function217a
|
call LoadMapPart
|
||||||
call FarCallSwapTextboxPalettes
|
call FarCallSwapTextboxPalettes
|
||||||
ret
|
ret
|
||||||
; 217a
|
; 217a
|
||||||
|
|
||||||
Function217a:: ; 217a
|
LoadMapPart:: ; 217a
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, [TilesetBlocksBank]
|
ld a, [TilesetBlocksBank]
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
call Function2198
|
call LoadMetatiles
|
||||||
ld a, $60
|
ld a, $60
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
@ -123,36 +123,38 @@ Function217a:: ; 217a
|
|||||||
ret
|
ret
|
||||||
; 2198
|
; 2198
|
||||||
|
|
||||||
Function2198:: ; 2198
|
LoadMetatiles:: ; 2198
|
||||||
ld a, [wd194]
|
ld a, [wd194]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wd195]
|
ld a, [wd195]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld hl, wEnemyMoveStruct
|
ld hl, wMisc
|
||||||
ld b, $5
|
ld b, 5 ; SCREEN_WIDTH / 4
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld c, $6
|
ld c, 6 ; SCREEN_HEIGHT / 3
|
||||||
|
|
||||||
.loop2
|
.loop2
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_21b2
|
jr nz, .ok
|
||||||
ld a, [MapBorderBlock]
|
ld a, [MapBorderBlock]
|
||||||
|
|
||||||
.asm_21b2
|
.ok
|
||||||
ld e, l
|
ld e, l
|
||||||
ld d, h
|
ld d, h
|
||||||
|
; double a, load hl <- a, multiply hl by 8
|
||||||
add a
|
add a
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, 0
|
ld h, 0
|
||||||
rept 3
|
rept 3
|
||||||
add hl,hl
|
add hl,hl
|
||||||
endr
|
endr
|
||||||
|
; hl <- hl + [TilesetBlocksAddress]
|
||||||
ld a, [TilesetBlocksAddress]
|
ld a, [TilesetBlocksAddress]
|
||||||
add l
|
add l
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -168,7 +170,7 @@ rept 4
|
|||||||
endr
|
endr
|
||||||
|
|
||||||
ld a, e
|
ld a, e
|
||||||
add 20
|
add 5 * 4
|
||||||
ld e, a
|
ld e, a
|
||||||
jr nc, .next\@
|
jr nc, .next\@
|
||||||
inc d
|
inc d
|
||||||
@ -182,24 +184,24 @@ rept 4
|
|||||||
endr
|
endr
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
ld de, $0004
|
ld de, 4
|
||||||
add hl, de
|
add hl, de
|
||||||
pop de
|
pop de
|
||||||
inc de
|
inc de
|
||||||
dec c
|
dec c
|
||||||
jp nz, .loop2
|
jp nz, .loop2
|
||||||
pop hl
|
pop hl
|
||||||
ld de, $0060
|
ld de, $60
|
||||||
add hl, de
|
add hl, de
|
||||||
pop de
|
pop de
|
||||||
ld a, [MapWidth]
|
ld a, [MapWidth]
|
||||||
add $6
|
add 6
|
||||||
add e
|
add e
|
||||||
ld e, a
|
ld e, a
|
||||||
jr nc, .asm_2225
|
jr nc, .ok2
|
||||||
inc d
|
inc d
|
||||||
|
|
||||||
.asm_2225
|
.ok2
|
||||||
dec b
|
dec b
|
||||||
jp nz, .loop
|
jp nz, .loop
|
||||||
ret
|
ret
|
||||||
@ -2001,7 +2003,7 @@ Function2b74:: ; 0x2b74
|
|||||||
call ClearSprites
|
call ClearSprites
|
||||||
call Function2bae
|
call Function2bae
|
||||||
hlcoord 0, 12
|
hlcoord 0, 12
|
||||||
ld bc, $0412
|
lb bc, 4, 18
|
||||||
call TextBox
|
call TextBox
|
||||||
ld hl, VramState
|
ld hl, VramState
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
@ -2013,7 +2015,7 @@ Function2b74:: ; 0x2b74
|
|||||||
call UpdateTimePals
|
call UpdateTimePals
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
pop af
|
pop af
|
||||||
ret
|
ret
|
||||||
; 0x2bae
|
; 0x2bae
|
||||||
|
@ -449,7 +449,7 @@ endr
|
|||||||
AnimateTileset:: ; 17d3
|
AnimateTileset:: ; 17d3
|
||||||
; Only call during the first fifth of VBlank
|
; Only call during the first fifth of VBlank
|
||||||
|
|
||||||
ld a, [$ffde]
|
ld a, [hMapAnims]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
|
6
hram.asm
6
hram.asm
@ -60,6 +60,9 @@ hPrintNum4 EQU $ffb6
|
|||||||
hPrintNum5 EQU $ffb7
|
hPrintNum5 EQU $ffb7
|
||||||
hPrintNum6 EQU $ffb8
|
hPrintNum6 EQU $ffb8
|
||||||
hPrintNum7 EQU $ffb9
|
hPrintNum7 EQU $ffb9
|
||||||
|
hPrintNum8 EQU $ffba
|
||||||
|
hPrintNum9 EQU $ffbb
|
||||||
|
hPrintNum10 EQU $ffbc
|
||||||
|
|
||||||
hUsedSpriteIndex EQU $ffbd
|
hUsedSpriteIndex EQU $ffbd
|
||||||
hUsedSpriteTile EQU $ffbe
|
hUsedSpriteTile EQU $ffbe
|
||||||
@ -74,7 +77,7 @@ hSCX EQU $ffcf
|
|||||||
hSCY EQU $ffd0
|
hSCY EQU $ffd0
|
||||||
hWX EQU $ffd1
|
hWX EQU $ffd1
|
||||||
hWY EQU $ffd2
|
hWY EQU $ffd2
|
||||||
|
hTilesPerCycle EQU $ffd3
|
||||||
hBGMapMode EQU $ffd4
|
hBGMapMode EQU $ffd4
|
||||||
hBGMapThird EQU $ffd5
|
hBGMapThird EQU $ffd5
|
||||||
hBGMapAddress EQU $ffd6
|
hBGMapAddress EQU $ffd6
|
||||||
@ -84,6 +87,7 @@ hSPBuffer EQU $ffd9
|
|||||||
|
|
||||||
hBGMapUpdate EQU $ffdb
|
hBGMapUpdate EQU $ffdb
|
||||||
|
|
||||||
|
hMapAnims EQU $ffde
|
||||||
hTileAnimFrame EQU $ffdf
|
hTileAnimFrame EQU $ffdf
|
||||||
|
|
||||||
hLastTalked EQU $ffe0
|
hLastTalked EQU $ffe0
|
||||||
|
@ -13,7 +13,7 @@ FishingGuruScript_0x9e0e0:
|
|||||||
iffalse UnknownScript_0x9e0f3
|
iffalse UnknownScript_0x9e0f3
|
||||||
writetext UnknownText_0x9e142
|
writetext UnknownText_0x9e142
|
||||||
closetext
|
closetext
|
||||||
special Function16dc7
|
special PhotoStudio
|
||||||
closetext
|
closetext
|
||||||
loadmovesprites
|
loadmovesprites
|
||||||
end
|
end
|
||||||
|
@ -63,7 +63,7 @@ Function100063: ; 100063
|
|||||||
ld a, [rIE]
|
ld a, [rIE]
|
||||||
ld [BGMapBuffer], a
|
ld [BGMapBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld [hLCDStatCustom], a
|
ld [hLCDStatCustom], a
|
||||||
ret
|
ret
|
||||||
; 100082
|
; 100082
|
||||||
@ -80,7 +80,7 @@ Function100082: ; 100082
|
|||||||
ld a, 1 << VBLANK + 1 << LCD_STAT + 1 << TIMER + 1 << SERIAL
|
ld a, 1 << VBLANK + 1 << LCD_STAT + 1 << TIMER + 1 << SERIAL
|
||||||
ld [rIE], a
|
ld [rIE], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld [hLCDStatCustom], a
|
ld [hLCDStatCustom], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [$ffc9], a
|
ld [$ffc9], a
|
||||||
@ -5403,7 +5403,7 @@ Function102423: ; 102423
|
|||||||
ret nc
|
ret nc
|
||||||
callba Function14a58
|
callba Function14a58
|
||||||
callba MobileFn_1060af
|
callba MobileFn_1060af
|
||||||
callba Function106187
|
callba BackupMobileEventIndex
|
||||||
ld hl, wcd4b
|
ld hl, wcd4b
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
ld a, $0
|
ld a, $0
|
||||||
|
@ -67,10 +67,10 @@ Function10805b: ; 10805b
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld a, [$ffde]
|
ld a, [hMapAnims]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld hl, VramState
|
ld hl, VramState
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
@ -88,7 +88,7 @@ Function10805b: ; 10805b
|
|||||||
pop af
|
pop af
|
||||||
ld [VramState], a
|
ld [VramState], a
|
||||||
pop af
|
pop af
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ret
|
ret
|
||||||
; 108089
|
; 108089
|
||||||
|
|
||||||
@ -97,10 +97,10 @@ Function108089: ; 108089
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld a, [$ffde]
|
ld a, [hMapAnims]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld hl, VramState
|
ld hl, VramState
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
@ -118,7 +118,7 @@ Function108089: ; 108089
|
|||||||
pop af
|
pop af
|
||||||
ld [VramState], a
|
ld [VramState], a
|
||||||
pop af
|
pop af
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ret
|
ret
|
||||||
; 1080b7
|
; 1080b7
|
||||||
|
|
||||||
|
@ -5862,7 +5862,7 @@ Function11ac51: ; 11ac51
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hInMenu], a
|
ld [hInMenu], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [hMapAnims], a
|
||||||
ld [wcd49], a
|
ld [wcd49], a
|
||||||
ld [wcd4a], a
|
ld [wcd4a], a
|
||||||
ld [wcd4c], a
|
ld [wcd4c], a
|
||||||
@ -7919,7 +7919,7 @@ Function11b98f: ; 11b98f
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, "@"
|
ld a, "@"
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, s0_a600
|
ld hl, sPartyScratch1
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH - 1
|
ld bc, PARTYMON_STRUCT_LENGTH - 1
|
||||||
ld a, [wcd2a]
|
ld a, [wcd2a]
|
||||||
.loop5
|
.loop5
|
||||||
|
@ -993,7 +993,7 @@ endr
|
|||||||
dw Function170881 ; 0x08
|
dw Function170881 ; 0x08
|
||||||
dw Function17089a ; 0x09
|
dw Function17089a ; 0x09
|
||||||
dw Function1708b1 ; 0x0a
|
dw Function1708b1 ; 0x0a
|
||||||
dw Function1708b9 ; 0x0b
|
dw CheckMobileEventIndex ; 0x0b
|
||||||
dw Function1708c8 ; 0x0c
|
dw Function1708c8 ; 0x0c
|
||||||
dw Function1708f0 ; 0x0d
|
dw Function1708f0 ; 0x0d
|
||||||
dw Function17093c ; 0x0e
|
dw Function17093c ; 0x0e
|
||||||
@ -1302,10 +1302,10 @@ Function1708b1: ; 1708b1 (5c:48b1)
|
|||||||
call MaxVolume
|
call MaxVolume
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1708b9: ; 1708b9 (5c:48b9) something to do with GS Ball
|
CheckMobileEventIndex: ; 1708b9 (5c:48b9) something to do with GS Ball
|
||||||
ld a, BANK(s1_be3c)
|
ld a, BANK(sMobileEventIndex)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld a, [s1_be3c]
|
ld a, [sMobileEventIndex]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
|
@ -3123,7 +3123,7 @@ Function17e3c3: ; 17e3c3
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
callba MobileFn_106155
|
callba MobileFn_106155
|
||||||
callba Function106187
|
callba BackupMobileEventIndex
|
||||||
pop af
|
pop af
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ret
|
ret
|
||||||
@ -3855,7 +3855,7 @@ endr
|
|||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcd57]
|
ld a, [wcd57]
|
||||||
ld c, a
|
ld c, a
|
||||||
call Function31a4
|
call MobilePrintNum
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wcd52], a
|
ld [wcd52], a
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -4246,7 +4246,7 @@ Function17f2cb: ; 17f2cb
|
|||||||
ld b, $1
|
ld b, $1
|
||||||
ld a, [wcd54]
|
ld a, [wcd54]
|
||||||
ld c, a
|
ld c, a
|
||||||
call Function31a4
|
call MobilePrintNum
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wcd52], a
|
ld [wcd52], a
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -4562,7 +4562,7 @@ endr
|
|||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcd58]
|
ld a, [wcd58]
|
||||||
ld c, a
|
ld c, a
|
||||||
call Function31a4
|
call MobilePrintNum
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wcd52], a
|
ld [wcd52], a
|
||||||
ld a, h
|
ld a, h
|
||||||
|
10
sram.asm
10
sram.asm
@ -9,8 +9,8 @@ sScratch::
|
|||||||
|
|
||||||
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
|
SECTION "SRAM Bank 0", SRAM [$a600], BANK [0]
|
||||||
|
|
||||||
s0_a600:: ds 6 * (SCRATCHMON_STRUCT_LENGTH)
|
sPartyScratch1:: ds 6 * (SCRATCHMON_STRUCT_LENGTH)
|
||||||
s0_a71a:: ds 6 * (SCRATCHMON_STRUCT_LENGTH)
|
sPartyScratch2:: ds 6 * (SCRATCHMON_STRUCT_LENGTH)
|
||||||
s0_a834:: ds 1
|
s0_a834:: ds 1
|
||||||
s0_a835:: ds 10 * (SCRATCHMON_STRUCT_LENGTH)
|
s0_a835:: ds 10 * (SCRATCHMON_STRUCT_LENGTH)
|
||||||
s0_aa0b:: ds 1
|
s0_aa0b:: ds 1
|
||||||
@ -87,18 +87,18 @@ sLinkBattleStats:: ; b260
|
|||||||
sLinkBattleWins:: ds 2
|
sLinkBattleWins:: ds 2
|
||||||
sLinkBattleLosses:: ds 2
|
sLinkBattleLosses:: ds 2
|
||||||
sLinkBattleDraws:: ds 2
|
sLinkBattleDraws:: ds 2
|
||||||
ds $5a
|
ds 90
|
||||||
sLinkBattleStatsEnd::
|
sLinkBattleStatsEnd::
|
||||||
|
|
||||||
sHallOfFame:: ; b2c0
|
sHallOfFame:: ; b2c0
|
||||||
ds HOF_LENGTH * NUM_HOF_TEAMS
|
ds HOF_LENGTH * NUM_HOF_TEAMS
|
||||||
sHallOfFameEnd::
|
sHallOfFameEnd::
|
||||||
|
|
||||||
s1_be3c:: ds 1
|
sMobileEventIndex:: ds 1
|
||||||
|
|
||||||
sCrystalData::
|
sCrystalData::
|
||||||
ds wCrystalDataEnd - wCrystalData
|
ds wCrystalDataEnd - wCrystalData
|
||||||
s1_be44:: ds 1
|
sMobileEventIndexBackup:: ds 1
|
||||||
s1_be45:: ds 1
|
s1_be45:: ds 1
|
||||||
|
|
||||||
; data of the BattleTower must be in SRAM because you can save and leave between battles
|
; data of the BattleTower must be in SRAM because you can save and leave between battles
|
||||||
|
14
wram.asm
14
wram.asm
@ -972,14 +972,23 @@ wca84:: ds 1
|
|||||||
wca85:: ds 1
|
wca85:: ds 1
|
||||||
wca86:: ds 1
|
wca86:: ds 1
|
||||||
wca87:: ds 1
|
wca87:: ds 1
|
||||||
|
|
||||||
|
; Gameboy Printer
|
||||||
wca88:: ds 1
|
wca88:: ds 1
|
||||||
wca89:: ds 1
|
wca89::
|
||||||
|
; bit 7: set if error 1
|
||||||
|
; bit 6: set if error 4
|
||||||
|
; bit 5: set if error 3
|
||||||
|
ds 1
|
||||||
|
|
||||||
wca8a:: ds 1
|
wca8a:: ds 1
|
||||||
wca8b:: ds 1
|
wca8b:: ds 1
|
||||||
wca8c:: ds 1
|
wca8c:: ds 1
|
||||||
wca8d:: ds 1
|
wca8d:: ds 1
|
||||||
wca8e:: ds 1
|
wca8e:: ds 1
|
||||||
wca8f:: ds 1
|
wca8f:: ds 1
|
||||||
|
|
||||||
|
; tilemap backup?
|
||||||
wca90:: ds 16
|
wca90:: ds 16
|
||||||
wcaa0:: ds 3
|
wcaa0:: ds 3
|
||||||
wcaa3:: ds 2
|
wcaa3:: ds 2
|
||||||
@ -1014,6 +1023,7 @@ wcb84:: ds 100
|
|||||||
wcbe8:: ds 1
|
wcbe8:: ds 1
|
||||||
wcbe9:: ds 1
|
wcbe9:: ds 1
|
||||||
wcbea:: ds 14
|
wcbea:: ds 14
|
||||||
|
|
||||||
wcbf8:: ds 2
|
wcbf8:: ds 2
|
||||||
wcbfa:: ds 1
|
wcbfa:: ds 1
|
||||||
wcbfb:: ds 79
|
wcbfb:: ds 79
|
||||||
@ -1183,6 +1193,7 @@ MonType:: ; cf5f
|
|||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
CurSpecies:: ; cf60
|
CurSpecies:: ; cf60
|
||||||
|
CurMove::
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wNamedObjectTypeBuffer:: ds 1
|
wNamedObjectTypeBuffer:: ds 1
|
||||||
@ -1510,6 +1521,7 @@ wd0df:: ds 1
|
|||||||
wd0e0:: ds 1
|
wd0e0:: ds 1
|
||||||
wd0e1:: ds 1
|
wd0e1:: ds 1
|
||||||
wd0e2:: ds 1
|
wd0e2:: ds 1
|
||||||
|
wMoveSwapBuffer::
|
||||||
wd0e3:: ds 1
|
wd0e3:: ds 1
|
||||||
wd0e4:: ds 4
|
wd0e4:: ds 4
|
||||||
wQueuedScriptBank:: ds 1
|
wQueuedScriptBank:: ds 1
|
||||||
|
Loading…
Reference in New Issue
Block a user