Break up engine/sprites.asm; address yenatch's comments

This commit is contained in:
PikalaxALT 2015-12-01 21:54:11 -05:00
parent ffbf2c0f5d
commit 92a8c491c3
114 changed files with 2610 additions and 2634 deletions

1436
data/sprite_engine.asm Executable file

File diff suppressed because it is too large Load Diff

View File

@ -699,7 +699,7 @@ Function1728f: ; 1728f (5:728f)
ld bc, $20
ld a, BANK(EggHatchGFX)
call FarCopyBytes
callba Function8cf53
callba ClearSpriteAnims
ld de, VTiles2 tile $00
ld a, [wJumptableIndex]
call Function1723c
@ -806,7 +806,7 @@ INCBIN "gfx/unknown/017393.2bpp"
; 173b3
Function173b3: ; 173b3 (5:73b3)
callba Function8cf53
callba ClearSpriteAnims
ld hl, .SpriteData
.loop
ld a, [hli]

View File

@ -129,7 +129,7 @@ INCBIN "gfx/icon/mail2.2bpp"
and a
ret
.exit_mail
callab Function8cf53
callab ClearSpriteAnims
call ClearSprites
xor a
ld [hSCX], a

View File

@ -96,7 +96,7 @@ Functione45e8: ; e45e8
pop af
ld [rSVBK], a
callba Function8cf53
callba ClearSpriteAnims
depixel 10, 11, 4, 0
ld a, SPRITE_ANIM_INDEX_03
call _InitSpriteAnimStruct
@ -125,7 +125,7 @@ Functione45e8: ; e45e8
; e465e
Functione465e: ; e465e
callba Function8cf53
callba ClearSpriteAnims
call ClearTileMap
call ClearSprites
ld c, 16
@ -540,7 +540,7 @@ IntroScene1: ; e495b (39:495b)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
call Functione549e
xor a
ld [wIntroSceneFrameCounter], a
@ -678,7 +678,7 @@ IntroScene5: ; e4a7a (39:4a7a)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
call Functione549e
xor a
ld [wcf64], a
@ -776,7 +776,7 @@ IntroScene7: ; e4b3f (39:4b3f)
ld a, $90
ld [hWY], a
call Functione5516
callba Function8cf53
callba ClearSpriteAnims
depixel 13, 27, 4, 0
ld a, SPRITE_ANIM_INDEX_26
call _InitSpriteAnimStruct
@ -925,7 +925,7 @@ IntroScene11: ; e4c86 (39:4c86)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
call Functione549e
xor a
ld [wIntroSceneFrameCounter], a
@ -1050,7 +1050,7 @@ IntroScene13: ; e4d6d (39:4d6d)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
depixel 13, 11, 4, 0
ld a, SPRITE_ANIM_INDEX_26
call _InitSpriteAnimStruct
@ -1160,7 +1160,7 @@ IntroScene15: ; e4e40 (39:4e40)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
call Functione549e
depixel 8, 5
ld a, SPRITE_ANIM_INDEX_2A
@ -1233,7 +1233,7 @@ IntroScene17: ; e4ef5 (39:4ef5)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
call Functione549e
xor a
ld [wcf64], a
@ -1308,7 +1308,7 @@ IntroScene19: ; e4f7e (39:4f7e)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
ld hl, wc300
xor a
ld [hli], a
@ -1475,7 +1475,7 @@ IntroScene26: ; e50bb (39:50bb)
ld [hWX], a
ld a, $90
ld [hWY], a
callba Function8cf53
callba ClearSpriteAnims
call Functione549e
xor a
ld [wcf64], a

View File

@ -10,7 +10,7 @@ Functione1e67: ; e1e67 (38:5e67)
call DisableLCD
ld b, SCGB_08
call GetSGBLayout
callab Function8cf53
callab ClearSpriteAnims
ld hl, LZ_e2221
ld de, VTiles2 tile $00
call Decompress

View File

@ -142,7 +142,7 @@ RandomEncounter:: ; 97cc0
; 97cf9
WildBattleScript: ; 97cf9
setup_random_encounter
randomwildmon
startbattle
returnafterbattle
end

View File

@ -36,7 +36,7 @@ _EvolutionAnimation: ; 4e607
ld de, MUSIC_NONE
call PlayMusic
callba Function8cf53
callba ClearSpriteAnims
ld de, EvolutionGFX
ld hl, VTiles0
@ -107,7 +107,7 @@ _EvolutionAnimation: ; 4e607
ld c, $0
call .GetSGBLayout
call Function4e7a6
callba Function8cf53
callba ClearSpriteAnims
call Function4e794
jr c, .asm_4e6de
@ -144,7 +144,7 @@ _EvolutionAnimation: ; 4e607
ld c, $0
call .GetSGBLayout
call Function4e7a6
callba Function8cf53
callba ClearSpriteAnims
call Function4e794
ret c

View File

@ -474,7 +474,7 @@ Function283b2: ; 283b2
ld b, $a
.asm_283b7
call DelayFrame
call LinkCommunicationsSignalDataReceived
call LinkDataReceived
dec b
jr nz, .asm_283b7
xor a
@ -2295,9 +2295,9 @@ Special_WaitForLinkedFriend: ; 29d11
jr .asm_29d39
.asm_29d79
call LinkCommunicationsSignalDataReceived
call LinkDataReceived
call DelayFrame
call LinkCommunicationsSignalDataReceived
call LinkDataReceived
ld c, $32
call DelayFrames
ld a, $1
@ -2426,7 +2426,7 @@ Function29e47: ; 29e47
ld b, $a
.asm_29e49
call DelayFrame
call LinkCommunicationsSignalDataReceived
call LinkDataReceived
dec b
jr nz, .asm_29e49
ret
@ -2467,9 +2467,9 @@ Special_CheckBothSelectedSameRoom: ; 29e82
ld a, [wd265]
call Function29f17
push af
call LinkCommunicationsSignalDataReceived
call LinkDataReceived
call DelayFrame
call LinkCommunicationsSignalDataReceived
call LinkDataReceived
pop af
ld b, a
ld a, [wd265]

View File

@ -443,7 +443,7 @@ Function4484a: ; 0x4484a
dec a
ld b, a
call ReadMailMessage
jp ReturnToCallingMenu
jp CloseSubmenu
; 0x44877
.PutInPack ; 0x44877
@ -539,7 +539,7 @@ Function4484a: ; 0x4484a
call PrintText
.exit2
jp ReturnToCallingMenu
jp CloseSubmenu
; 0x4493c
.HoldingMailText ; 0x4493c

View File

@ -252,7 +252,7 @@ MapSetupCommands: ; 15440
dba RotatePalettesRightMapAndMusic ; 06
dba EnterMapMusic ; 07
dba ForceMapMusic ; 08
dba RotatePalettesLeftMusic ; 09
dba FadeInMusic ; 09
dba LoadBlockData ; 0a
dba LoadNeighboringBlockData ; 0b
dba SaveScreen ; 0c

View File

@ -377,7 +377,7 @@ BuyMenu: ; 15c62
.loop
call BuyMenuLoop ; menu loop
jr nc, .loop
call ReturnToCallingMenu
call CloseSubmenu
ret
; 15c7d

View File

@ -345,7 +345,7 @@ Function11915: ; 11915
ret
.asm_11930
callab Function8cf53
callab ClearSpriteAnims
call ClearSprites
xor a
ld [hSCX], a
@ -866,7 +866,7 @@ Function11c11: ; 11c11 (4:5c11)
Function11c51: ; 11c51
call ClearSprites
callab Function8cf53
callab ClearSpriteAnims
call LoadStandardFont
call LoadFontsExtra

View File

@ -41,7 +41,7 @@ Function5003f: ; 5003f
LoadPartyMenuGFX: ; 5004f
call LoadFontsBattleExtra
callab Function8ad1 ; engine/color.asm
callab ClearSpriteAnims
callab ClearSpriteAnims2
ret
; 5005f

View File

@ -140,7 +140,7 @@ HallOfFamePC: ; 1569a
call PC_PlayChoosePCSound
call FadeToMenu
callba _HallOfFamePC
call ReturnToCallingMenu
call CloseSubmenu
and a
ret
; 156ab
@ -323,7 +323,7 @@ KrisWithdrawItemMenu: ; 0x157d1
jr .asm_157da
.asm_157e4
call ReturnToCallingMenu
call CloseSubmenu
xor a
ret
; 0x157e9
@ -403,7 +403,7 @@ KrisTossItemMenu: ; 0x1585f
jr .asm_15868
.asm_15878
call ReturnToCallingMenu
call CloseSubmenu
xor a
ret
; 0x1587d
@ -442,7 +442,7 @@ KrisDepositItemMenu: ; 0x1588b
jr .asm_1589c
.asm_158b3
call ReturnToCallingMenu
call CloseSubmenu
.asm_158b6
xor a

View File

@ -59,7 +59,7 @@ Function90bea: ; 90bea (24:4bea)
ld a, $7
ld [hWX], a
call Function90c4e
callba Function8cf53
callba ClearSpriteAnims
call Function90d32
ld a, 8
call SkipMusic
@ -1944,7 +1944,7 @@ _FlyMap: ; 91af3
ld [hl], $1
xor a
ld [hBGMapMode], a
callba Function8cf53
callba ClearSpriteAnims
call Function91ff2
ld de, GFX_922e1
ld hl, VTiles2 tile $30
@ -2866,7 +2866,7 @@ Function92311: ; unreferenced
ld [hl], $1
xor a
ld [hBGMapMode], a
callba Function8cf53
callba ClearSpriteAnims
call Function91ff2
ld de, GFX_922e1
ld hl, VTiles2 tile $30

View File

@ -163,10 +163,10 @@ ENDC
dw Script_interpretmenu
dw Script_interpretmenu2
dw Script_loadpikachudata
dw Script_setup_random_encounter
dw Script_memtrainerdata
dw Script_scriptedpokedata
dw Script_scriptedtrainerdata
dw Script_randomwildmon
dw Script_loadmemtrainer
dw Script_loadwildmon
dw Script_loadtrainer
dw Script_startbattle
dw Script_returnafterbattle
dw Script_catchtutorial
@ -1482,7 +1482,7 @@ Script_loadpikachudata: ; 973f0
ret
; 973fb
Script_setup_random_encounter: ; 973fb
Script_randomwildmon: ; 973fb
; script command 0x5b
xor a
@ -1490,19 +1490,19 @@ Script_setup_random_encounter: ; 973fb
ret
; 97400
Script_memtrainerdata: ; 97400
Script_loadmemtrainer: ; 97400
; script command 0x5c
ld a, (1 << 7) | 1
ld [wBattleScriptFlags], a
ld a, [WalkingDirection]
ld a, [wTempTrainerClass]
ld [OtherTrainerClass], a
ld a, [FacingDirection]
ld a, [wTempTrainerID]
ld [OtherTrainerID], a
ret
; 97412
Script_scriptedpokedata: ; 97412
Script_loadwildmon: ; 97412
; script command 0x5d
; parameters:
; pokemon (PokemonParam)
@ -1517,7 +1517,7 @@ Script_scriptedpokedata: ; 97412
ret
; 97424
Script_scriptedtrainerdata: ; 97424
Script_loadtrainer: ; 97424
; script command 0x5e
; parameters:
; trainer_group (TrainerGroupParam)
@ -1655,7 +1655,7 @@ ScriptCall: ; 974cb
ld e, [hl]
inc [hl]
ld d, $0
ld hl, wScriptStackBA1
ld hl, wScriptStack
rept 3
add hl, de
endr
@ -3166,7 +3166,7 @@ ExitScriptSubroutine: ; 97b9a
dec [hl]
ld e, [hl]
ld d, $0
ld hl, wScriptStackBA1
ld hl, wScriptStack
rept 3
add hl,de
endr

View File

@ -158,7 +158,7 @@ UseRegisteredItem: ; 133c3
call ResetWindow
call FadeToMenu
call DoItemEffect
call ReturnToCallingMenu
call CloseSubmenu
call CloseText
and a
ret

View File

@ -32,7 +32,7 @@ Function926f7: ; 926f7 (24:66f7)
call ByteFill
ld b, SCGB_05
call GetSGBLayout
callab Function8cf53
callab ClearSpriteAnims
ld hl, wc6d0
ld bc, $48
xor a
@ -101,7 +101,7 @@ Function927af: ; 927af (24:67af)
call Function92b0f
xor a
ld [wc3b5], a
callab Function8cfa8
callab DoNextFrameForFirst16Sprites
call Function927f8
call Function927d3
call DelayFrame

View File

@ -126,7 +126,7 @@ SpecialsPointers:: ; c029
add_special SpecialTrainerHouse
add_special PhotoStudio
add_special InitRoamMons
add_special Special_RotatePalettesRightMusic
add_special Special_FadeOutMusic
add_special Diploma
add_special PrintDiploma
@ -616,7 +616,7 @@ SpecialGameboyCheck: ; c478
ret
Special_RotatePalettesRightMusic: ; c48f
Special_FadeOutMusic: ; c48f
ld a, MUSIC_NONE % $100
ld [MusicFadeIDLo], a
ld a, MUSIC_NONE / $100

818
engine/sprite_anims.asm Executable file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More