Remove all address comments

This commit is contained in:
mid-kid
2018-06-24 16:09:41 +02:00
parent 131875d3e3
commit 1d9a68dbdd
616 changed files with 12133 additions and 20380 deletions

View File

@@ -1,12 +1,11 @@
; Replaces the functionality of sgb.asm to work with CGB hardware.
CheckCGB: ; 8d55
CheckCGB:
ld a, [hCGB]
and a
ret
; 8d59
LoadSGBLayoutCGB: ; 8d59
LoadSGBLayoutCGB:
ld a, b
cp SCGB_RAM
jr nz, .not_ram
@@ -26,13 +25,11 @@ LoadSGBLayoutCGB: ; 8d59
ld de, .ReturnFromJumpTable
push de
jp hl
; 8d79
.ReturnFromJumpTable: ; 8d79
.ReturnFromJumpTable:
ret
; 8d7a
.dw ; 8d7a
.dw
dw _CGB_BattleGrayscale
dw _CGB_BattleColors
dw _CGB_PokegearPals
@@ -64,9 +61,8 @@ LoadSGBLayoutCGB: ; 8d59
dw _CGB_TrainerOrMonFrontpicPals
dw _CGB_MysteryGift
dw _CGB1e
; 8db8
_CGB_BattleGrayscale: ; 8db8
_CGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale + 1
ld de, wBGPals1
ld c, 4
@@ -81,7 +77,7 @@ _CGB_BattleGrayscale: ; 8db8
call CopyPalettes
jr _CGB_FinishBattleScreenLayout
_CGB_BattleColors: ; 8ddb
_CGB_BattleColors:
ld de, wBGPals1
call GetBattlemonBackpicPalettePointer
push hl
@@ -115,7 +111,7 @@ _CGB_BattleColors: ; 8ddb
ld a, SCGB_BATTLE_COLORS
ld [wSGBPredef], a
call ApplyPals
_CGB_FinishBattleScreenLayout: ; 8e23
_CGB_FinishBattleScreenLayout:
call InitPartyMenuBGPal7
hlcoord 0, 0, wAttrMap
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
@@ -152,12 +148,11 @@ _CGB_FinishBattleScreenLayout: ; 8e23
call FarCopyWRAM
call ApplyAttrMap
ret
; 8e85
InitPartyMenuBGPal7: ; 8e85
InitPartyMenuBGPal7:
farcall Function100dc0
Mobile_InitPartyMenuBGPal7: ; 8e8b
Mobile_InitPartyMenuBGPal7:
ld hl, PartyMenuBGPalette
jr nc, .not_mobile
ld hl, PartyMenuBGMobilePalette
@@ -167,9 +162,8 @@ Mobile_InitPartyMenuBGPal7: ; 8e8b
ld a, BANK(wBGPals1)
call FarCopyWRAM
ret
; 8e9f
InitPartyMenuBGPal0: ; 8e9f
InitPartyMenuBGPal0:
farcall Function100dc0
ld hl, PartyMenuBGPalette
jr nc, .not_mobile
@@ -180,9 +174,8 @@ InitPartyMenuBGPal0: ; 8e9f
ld a, BANK(wBGPals1)
call FarCopyWRAM
ret
; 8eb9
_CGB_PokegearPals: ; 8eb9
_CGB_PokegearPals:
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, .male
@@ -200,9 +193,8 @@ _CGB_PokegearPals: ; 8eb9
ld a, $1
ld [hCGBPalUpdate], a
ret
; 8edb
_CGB_StatsScreenHPPals: ; 8edb
_CGB_StatsScreenHPPals:
ld de, wBGPals1
ld a, [wCurHPPal]
ld l, a
@@ -255,17 +247,14 @@ _CGB_StatsScreenHPPals: ; 8edb
ld a, $1
ld [hCGBPalUpdate], a
ret
; 8f52
StatsScreenPagePals: ; 8f52
StatsScreenPagePals:
INCLUDE "gfx/stats/pages.pal"
; 8f6a
StatsScreenPals: ; 8f6a
StatsScreenPals:
INCLUDE "gfx/stats/stats.pal"
; 8f70
_CGB_Pokedex: ; 8f70
_CGB_Pokedex:
ld de, wBGPals1
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
@@ -297,17 +286,14 @@ _CGB_Pokedex: ; 8f70
ld a, $1
ld [hCGBPalUpdate], a
ret
; 8fba
.PokedexQuestionMarkPalette: ; 8fba
.PokedexQuestionMarkPalette:
INCLUDE "gfx/pokedex/question_mark.pal"
; 8fc2
.PokedexCursorPalette: ; 8fc2
.PokedexCursorPalette:
INCLUDE "gfx/pokedex/cursor.pal"
; 8fca
_CGB_BillsPC: ; 8fca
_CGB_BillsPC:
ld de, wBGPals1
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
@@ -335,9 +321,8 @@ _CGB_BillsPC: ; 8fca
ld a, $1
ld [hCGBPalUpdate], a
ret
; 9009
.Function9009: ; 9009
.Function9009:
ld hl, .BillsPCOrangePalette
call LoadHLPaletteIntoDE
jr .asm_901a
@@ -358,13 +343,11 @@ _CGB_BillsPC: ; 8fca
ld a, $1
ld [hCGBPalUpdate], a
ret
; 9036
.BillsPCOrangePalette: ; 9036
.BillsPCOrangePalette:
INCLUDE "gfx/pc/orange.pal"
; 903e
_CGB_PokedexUnownMode: ; 903e
_CGB_PokedexUnownMode:
ld de, wBGPals1
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
@@ -383,9 +366,8 @@ _CGB_PokedexUnownMode: ; 903e
ld a, $1
ld [hCGBPalUpdate], a
ret
; 906e
_CGB_SlotMachine: ; 906e
_CGB_SlotMachine:
ld hl, SlotMachinePals
ld de, wBGPals1
ld bc, 16 palettes
@@ -437,9 +419,8 @@ _CGB_SlotMachine: ; 906e
ld a, $1
ld [hCGBPalUpdate], a
ret
; 90f8
_CGB06: ; 90f8
_CGB06:
ld hl, PalPacket_SCGB_06 + 1
call CopyFourPalettes
call WipeAttrMap
@@ -456,9 +437,8 @@ _CGB06: ; 90f8
ld a, $1
ld [hCGBPalUpdate], a
ret
; 9122
_CGB_GSIntro: ; 9122
_CGB_GSIntro:
ld b, 0
ld hl, .Jumptable
add hl, bc
@@ -467,15 +447,13 @@ _CGB_GSIntro: ; 9122
ld h, [hl]
ld l, a
jp hl
; 912d
.Jumptable: ; 912d
.Jumptable:
dw .ShellderLaprasScene
dw .JigglypuffPikachuScene
dw .StartersCharizardScene
; 9133
.ShellderLaprasScene: ; 9133
.ShellderLaprasScene:
ld hl, .ShellderLaprasBGPalette
ld de, wBGPals1
call LoadHLPaletteIntoDE
@@ -486,15 +464,14 @@ _CGB_GSIntro: ; 9122
call FarCopyWRAM
call WipeAttrMap
ret
; 914e
.ShellderLaprasBGPalette: ; 914e
.ShellderLaprasBGPalette:
RGB 19, 31, 19
RGB 18, 23, 31
RGB 11, 21, 28
RGB 04, 16, 24
.ShellderLaprasOBPals: ; 9156
.ShellderLaprasOBPals:
RGB 29, 29, 29
RGB 20, 19, 20
RGB 19, 06, 04
@@ -504,9 +481,8 @@ _CGB_GSIntro: ; 9122
RGB 31, 31, 31
RGB 31, 00, 00
RGB 03, 04, 06
; 9166
.JigglypuffPikachuScene: ; 9166
.JigglypuffPikachuScene:
ld de, wBGPals1
ld a, PREDEFPAL_GS_INTRO_JIGGLYPUFF_PIKACHU_BG
call GetPredefPal
@@ -518,9 +494,8 @@ _CGB_GSIntro: ; 9122
call LoadHLPaletteIntoDE
call WipeAttrMap
ret
; 9180
.StartersCharizardScene: ; 9180
.StartersCharizardScene:
ld hl, PalPacket_Pack + 1
call CopyFourPalettes
ld de, wOBPals1
@@ -529,9 +504,8 @@ _CGB_GSIntro: ; 9122
call LoadHLPaletteIntoDE
call WipeAttrMap
ret
; 9195
_CGB11: ; 9195
_CGB11:
ld hl, BetaPokerPals
ld de, wBGPals1
ld bc, 5 palettes
@@ -541,9 +515,8 @@ _CGB11: ; 9195
call WipeAttrMap
call ApplyAttrMap
ret
; 91ad
_CGB_Diploma: ; 91ad
_CGB_Diploma:
ld hl, DiplomaPalettes
ld de, wBGPals1
ld bc, 16 palettes
@@ -555,16 +528,14 @@ _CGB_Diploma: ; 91ad
call WipeAttrMap
call ApplyAttrMap
ret
; 91c8
_CGB_MapPals: ; 91c8
_CGB_MapPals:
call LoadMapPals
ld a, SCGB_MAPPALS
ld [wSGBPredef], a
ret
; 91d1
_CGB_PartyMenu: ; 91d1
_CGB_PartyMenu:
ld hl, PalPacket_PartyMenu + 1
call CopyFourPalettes
call InitPartyMenuBGPal0
@@ -572,9 +543,8 @@ _CGB_PartyMenu: ; 91d1
call InitPartyMenuOBPals
call ApplyAttrMap
ret
; 91e4
_CGB_Evolution: ; 91e4
_CGB_Evolution:
ld de, wBGPals1
ld a, c
and a
@@ -607,9 +577,8 @@ _CGB_Evolution: ; 91e4
ld a, $1
ld [hCGBPalUpdate], a
ret
; 9228
_CGB_GSTitleScreen: ; 9228
_CGB_GSTitleScreen:
ld hl, UnusedGSTitleBGPals
ld de, wBGPals1
ld bc, 5 palettes
@@ -626,17 +595,15 @@ _CGB_GSTitleScreen: ; 9228
ld a, $1
ld [hCGBPalUpdate], a
ret
; 9251
_CGB0d: ; 9251
_CGB0d:
ld hl, PalPacket_Diploma + 1
call CopyFourPalettes
call WipeAttrMap
call ApplyAttrMap
ret
; 925e
_CGB_UnownPuzzle: ; 925e
_CGB_UnownPuzzle:
ld hl, PalPacket_UnownPuzzle + 1
call CopyFourPalettes
ld de, wOBPals1
@@ -657,9 +624,8 @@ _CGB_UnownPuzzle: ; 925e
call WipeAttrMap
call ApplyAttrMap
ret
; 9289
_CGB_TrainerCard: ; 9289
_CGB_TrainerCard:
ld de, wBGPals1
xor a ; CHRIS
call GetTrainerPalettePointer
@@ -763,9 +729,8 @@ _CGB_TrainerCard: ; 9289
ld a, $1
ld [hCGBPalUpdate], a
ret
; 9373
_CGB_MoveList: ; 9373
_CGB_MoveList:
ld de, wBGPals1
ld a, PREDEFPAL_GOLDENROD
call GetPredefPal
@@ -788,9 +753,8 @@ _CGB_MoveList: ; 9373
ld a, $1
ld [hCGBPalUpdate], a
ret
; 93a6
_CGB_BetaPikachuMinigame: ; 93a6
_CGB_BetaPikachuMinigame:
ld hl, PalPacket_BetaPikachuMinigame + 1
call CopyFourPalettes
call WipeAttrMap
@@ -799,9 +763,8 @@ _CGB_BetaPikachuMinigame: ; 93a6
ld a, $1
ld [hCGBPalUpdate], a
ret
; 93ba
_CGB_PokedexSearchOption: ; 93ba
_CGB_PokedexSearchOption:
ld de, wBGPals1
ld a, PREDEFPAL_POKEDEX
call GetPredefPal
@@ -812,9 +775,8 @@ _CGB_PokedexSearchOption: ; 93ba
ld a, $1
ld [hCGBPalUpdate], a
ret
; 93d3
_CGB_PackPals: ; 93d3
_CGB_PackPals:
; pack pals
ld a, [wBattleType]
cp BATTLETYPE_TUTORIAL
@@ -861,17 +823,14 @@ _CGB_PackPals: ; 93d3
ld a, $1
ld [hCGBPalUpdate], a
ret
; 9439
.ChrisPackPals: ; 9439
.ChrisPackPals:
INCLUDE "gfx/pack/pack.pal"
; 9469
.KrisPackPals: ; 9469
.KrisPackPals:
INCLUDE "gfx/pack/pack_f.pal"
; 9499
_CGB_Pokepic: ; 9499
_CGB_Pokepic:
call _CGB_MapPals
ld de, SCREEN_WIDTH
hlcoord 0, 0, wAttrMap
@@ -904,9 +863,8 @@ _CGB_Pokepic: ; 9499
call FillBoxCGB
call ApplyAttrMap
ret
; 94d0
_CGB13: ; 94d0
_CGB13:
ld hl, PalPacket_SCGB_13 + 1
call CopyFourPalettes
call WipeAttrMap
@@ -923,9 +881,8 @@ _CGB13: ; 94d0
ld a, $1
ld [hCGBPalUpdate], a
ret
; 94fa
_CGB_GamefreakLogo: ; 94fa
_CGB_GamefreakLogo:
ld de, wBGPals1
ld a, PREDEFPAL_GAMEFREAK_LOGO
call GetPredefPal
@@ -940,13 +897,11 @@ _CGB_GamefreakLogo: ; 94fa
call ApplyAttrMap
call ApplyPals
ret
; 9521
.Palette: ; 9521
.Palette:
INCLUDE "gfx/splash/logo.pal"
; 9529
_CGB_PlayerOrMonFrontpicPals: ; 9529
_CGB_PlayerOrMonFrontpicPals:
ld de, wBGPals1
ld a, [wCurPartySpecies]
ld bc, wTempMonDVs
@@ -956,9 +911,8 @@ _CGB_PlayerOrMonFrontpicPals: ; 9529
call ApplyAttrMap
call ApplyPals
ret
; 9542
_CGB1e: ; 9542
_CGB1e:
ld de, wBGPals1
ld a, [wCurPartySpecies]
call GetMonPalettePointer_
@@ -966,9 +920,8 @@ _CGB1e: ; 9542
call WipeAttrMap
call ApplyAttrMap
ret
; 9555
_CGB_TradeTube: ; 9555
_CGB_TradeTube:
ld hl, PalPacket_TradeTube + 1
call CopyFourPalettes
ld hl, PartyMenuOBPals
@@ -982,9 +935,8 @@ _CGB_TradeTube: ; 9555
call LoadHLPaletteIntoDE
call WipeAttrMap
ret
; 9578
_CGB_TrainerOrMonFrontpicPals: ; 9578
_CGB_TrainerOrMonFrontpicPals:
ld de, wBGPals1
ld a, [wCurPartySpecies]
ld bc, wTempMonDVs
@@ -994,9 +946,8 @@ _CGB_TrainerOrMonFrontpicPals: ; 9578
call ApplyAttrMap
call ApplyPals
ret
; 9591
_CGB_MysteryGift: ; 9591
_CGB_MysteryGift:
ld hl, .Palettes
ld de, wBGPals1
ld bc, 2 palettes
@@ -1026,8 +977,6 @@ _CGB_MysteryGift: ; 9591
call FillBoxCGB
call ApplyAttrMap
ret
; 95e0
.Palettes: ; 95e0
.Palettes:
INCLUDE "gfx/mystery_gift/mystery_gift.pal"
; 95f0

View File

@@ -107,7 +107,7 @@ InitPartyMenuPalettes:
ret
; SGB layout for SCGB_PARTY_MENU_HP_PALS
SGB_ApplyPartyMenuHPPals: ; 8ade
SGB_ApplyPartyMenuHPPals:
ld hl, wHPPals
ld a, [wSGBPals]
ld e, a
@@ -648,7 +648,7 @@ ApplyAttrMap:
ret
; CGB layout for SCGB_PARTY_MENU_HP_PALS
CGB_ApplyPartyMenuHPPals: ; 96f3
CGB_ApplyPartyMenuHPPals:
ld hl, wHPPals
ld a, [wSGBPals]
ld e, a

View File

@@ -20,15 +20,13 @@ GetMysteryGift_MobileAdapterLayout: ; 4930f (mobile)
jp hl
.done
ret
; 49330 (12:5330)
.dw ; 49330
.dw
dw MG_Mobile_Layout00
dw MG_Mobile_Layout01
dw MG_Mobile_Layout02
; 49336
MG_Mobile_Layout_FillBox: ; 49336
MG_Mobile_Layout_FillBox:
.row
push bc
push hl
@@ -43,16 +41,15 @@ MG_Mobile_Layout_FillBox: ; 49336
dec b
jr nz, .row
ret
; 49346
MG_Mobile_Layout_WipeAttrMap: ; 49346 (12:5346)
MG_Mobile_Layout_WipeAttrMap:
hlcoord 0, 0, wAttrMap
ld bc, SCREEN_HEIGHT * SCREEN_WIDTH
xor a
call ByteFill
ret
MG_Mobile_Layout_LoadPals: ; 49351 (12:5351)
MG_Mobile_Layout_LoadPals:
ld de, wBGPals1
ld hl, Palette_MysteryGiftMobile
ld bc, 5 palettes
@@ -65,7 +62,7 @@ MG_Mobile_Layout_LoadPals: ; 49351 (12:5351)
call FarCopyWRAM
ret
MG_Mobile_Layout00: ; 4936e (12:536e)
MG_Mobile_Layout00:
call MG_Mobile_Layout_LoadPals
call MG_Mobile_Layout_WipeAttrMap
call MG_Mobile_Layout_CreatePalBoxes
@@ -73,7 +70,7 @@ MG_Mobile_Layout00: ; 4936e (12:536e)
farcall ApplyPals
ret
MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
MG_Mobile_Layout_CreatePalBoxes:
hlcoord 0, 0, wAttrMap
lb bc, 4, 1
ld a, $1
@@ -109,35 +106,30 @@ MG_Mobile_Layout_CreatePalBoxes: ; 49384 (12:5384)
ld a, $7
call ByteFill
ret
; 493e1 (12:53e1)
Palette_MysteryGiftMobile: ; 493e1
Palette_MysteryGiftMobile:
INCLUDE "gfx/mystery_gift/mg_mobile.pal"
; 49409
LoadOW_BGPal7:: ; 49409
LoadOW_BGPal7::
ld hl, Palette_TextBG7
ld de, wBGPals1 palette PAL_BG_TEXT
ld bc, 1 palettes
ld a, BANK(wBGPals1)
call FarCopyWRAM
ret
; 49418
Palette_TextBG7: ; 49418
Palette_TextBG7:
INCLUDE "gfx/font/bg_text.pal"
; 49420
Function49420:: ; 49420 (12:5420)
Function49420::
ld hl, MansionPalette1 + 8 palettes
ld de, wBGPals1 palette PAL_BG_ROOF
ld bc, 1 palettes
ld a, BANK(wBGPals1)
call FarCopyWRAM
ret
; 4942f (12:542f)
MG_Mobile_Layout01: ; 4942f
MG_Mobile_Layout01:
call MG_Mobile_Layout_LoadPals
ld de, wBGPals1 palette PAL_BG_TEXT
ld hl, .Palette_49478
@@ -168,16 +160,14 @@ MG_Mobile_Layout01: ; 4942f
ld a, $1
ld [hCGBPalUpdate], a
ret
; 49478
.Palette_49478: ; 49478
.Palette_49478:
RGB 31, 31, 31
RGB 26, 31, 00
RGB 20, 16, 03
RGB 00, 00, 00
; 49480
Function49480: ; 49480
Function49480:
hlcoord 0, 0, wAttrMap
lb bc, 4, SCREEN_WIDTH
ld a, $7
@@ -188,9 +178,8 @@ Function49480: ; 49480
hlcoord 19, 2, wAttrMap
ld [hl], a
ret
; 49496
Function49496: ; 49496
Function49496:
hlcoord 0, 0, wAttrMap
lb bc, 2, SCREEN_WIDTH
ld a, $7
@@ -201,11 +190,10 @@ Function49496: ; 49496
hlcoord 19, 1, wAttrMap
ld [hl], a
ret
; 494ac
INCLUDE "engine/tilesets/tileset_palettes.asm"
MG_Mobile_Layout02: ; 49706
MG_Mobile_Layout02:
ld hl, .Palette_49732
ld de, wBGPals1
ld bc, 1 palettes
@@ -220,23 +208,20 @@ MG_Mobile_Layout02: ; 49706
ld a, BANK(wOBPals1)
call FarCopyWRAM
ret
; 49732
.Palette_49732: ; 49732
.Palette_49732:
RGB 31, 31, 31
RGB 23, 16, 07
RGB 23, 07, 07
RGB 03, 07, 20
; 4973a
.Palette_4973a: ; 4973a
.Palette_4973a:
RGB 00, 00, 00
RGB 07, 05, 31
RGB 14, 18, 31
RGB 31, 31, 31
; 49742
Function49742: ; 49742
Function49742:
ld hl, .Palette_49757
ld de, wBGPals1
ld bc, 8 palettes
@@ -244,13 +229,11 @@ Function49742: ; 49742
call FarCopyWRAM
farcall ApplyPals
ret
; 49757
.Palette_49757: ; 49757
.Palette_49757:
INCLUDE "gfx/unknown/49757.pal"
; 49797
_InitMG_Mobile_LinkTradePalMap: ; 49797
_InitMG_Mobile_LinkTradePalMap:
hlcoord 0, 0, wAttrMap
lb bc, 16, 2
ld a, $4
@@ -300,9 +283,8 @@ _InitMG_Mobile_LinkTradePalMap: ; 49797
ld bc, 6
call ByteFill
ret
; 49811
LoadTradeRoomBGPals: ; 49811
LoadTradeRoomBGPals:
ld hl, TradeRoomPalette
ld de, wBGPals1 palette PAL_BG_GREEN
ld bc, 6 palettes
@@ -310,16 +292,13 @@ LoadTradeRoomBGPals: ; 49811
call FarCopyWRAM
farcall ApplyPals
ret
; 49826
TradeRoomPalette: ; 49826
TradeRoomPalette:
INCLUDE "gfx/trade/border.pal"
; 49856
InitMG_Mobile_LinkTradePalMap: ; 49856
InitMG_Mobile_LinkTradePalMap:
call _InitMG_Mobile_LinkTradePalMap
ret
; 4985a
; unused
INCLUDE "gfx/unknown/4985a.asm"

View File

@@ -1,4 +1,4 @@
HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000
HDMATransferAttrMapAndTileMapToWRAMBank3::
ld hl, .Function
jp CallInSafeGFXMode
@@ -18,9 +18,8 @@ HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000
ld hl, wScratchAttrMap
call HDMATransferToWRAMBank3
ret
; 10402d
HDMATransferTileMapToWRAMBank3:: ; 10402d
HDMATransferTileMapToWRAMBank3::
ld hl, .Function
jp CallInSafeGFXMode
@@ -33,9 +32,8 @@ HDMATransferTileMapToWRAMBank3:: ; 10402d
ld hl, wScratchTileMap
call HDMATransferToWRAMBank3
ret
; 104047
HDMATransferAttrMapToWRAMBank3: ; 104047
HDMATransferAttrMapToWRAMBank3:
ld hl, .Function
jp CallInSafeGFXMode
@@ -48,9 +46,8 @@ HDMATransferAttrMapToWRAMBank3: ; 104047
ld hl, wScratchAttrMap
call HDMATransferToWRAMBank3
ret
; 104061
ReloadMapPart:: ; 104061
ReloadMapPart::
ld hl, .Function
jp CallInSafeGFXMode
@@ -80,7 +77,7 @@ ReloadMapPart:: ; 104061
ret
Mobile_ReloadMapPart: ; 104099
Mobile_ReloadMapPart:
ld hl, ReloadMapPart ; useless
ld hl, .Function
jp CallInSafeGFXMode
@@ -110,7 +107,6 @@ Mobile_ReloadMapPart: ; 104099
ei
ret
; 1040d4
; unused
ld hl, .unreferenced_1040da
@@ -134,7 +130,6 @@ Mobile_ReloadMapPart: ; 104099
ld [hDMATransfer], a
call WaitDMATransfer
ret
; 1040fb
; unused
ld hl, .unreferenced_104101
@@ -148,9 +143,8 @@ Mobile_ReloadMapPart: ; 104099
ld hl, w3_d800
call HDMATransferToWRAMBank3
ret
; 104110
OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110
OpenAndCloseMenu_HDMATransferTileMapAndAttrMap::
; OpenText
ld hl, .Function
jp CallInSafeGFXMode
@@ -182,9 +176,8 @@ OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110
ld [rVBK], a
ei
ret
; 104148
Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148)
Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:
ld hl, .Function
jp CallInSafeGFXMode
@@ -209,9 +202,8 @@ Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148)
ld hl, wScratchTileMap
call HDMATransfer_Wait127Scanlines_toBGMap
ret
; 104177
CallInSafeGFXMode: ; 104177
CallInSafeGFXMode:
ld a, [hBGMapMode]
push af
ld a, [hMapAnims]
@@ -237,19 +229,17 @@ CallInSafeGFXMode: ; 104177
pop af
ld [hBGMapMode], a
ret
; 10419c
._hl_ ; 10419c
._hl_
jp hl
; 10419d
HDMATransferToWRAMBank3: ; 10419d (41:419d)
HDMATransferToWRAMBank3:
call _LoadHDMAParameters
ld a, $23
ld [hDMATransfer], a
WaitDMATransfer: ; 104a14
WaitDMATransfer:
.loop
call DelayFrame
ld a, [hDMATransfer]
@@ -257,7 +247,7 @@ WaitDMATransfer: ; 104a14
jr nz, .loop
ret
HDMATransfer_Wait127Scanlines_toBGMap: ; 1041ad (41:41ad)
HDMATransfer_Wait127Scanlines_toBGMap:
; HDMA transfer from hl to [hBGMapAddress]
; hBGMapAddress -> de
; 2 * SCREEN_HEIGHT -> c
@@ -268,7 +258,7 @@ HDMATransfer_Wait127Scanlines_toBGMap: ; 1041ad (41:41ad)
ld c, 2 * SCREEN_HEIGHT
jr HDMATransfer_Wait127Scanlines
HDMATransfer_Wait123Scanlines_toBGMap: ; 1041b7 (41:41b7)
HDMATransfer_Wait123Scanlines_toBGMap:
; HDMA transfer from hl to [hBGMapAddress]
; hBGMapAddress -> de
; 2 * SCREEN_HEIGHT -> c
@@ -279,9 +269,8 @@ HDMATransfer_Wait123Scanlines_toBGMap: ; 1041b7 (41:41b7)
ld e, a
ld c, 2 * SCREEN_HEIGHT
jr HDMATransfer_Wait123Scanlines
; 1041c1 (41:41c1)
HDMATransfer_NoDI: ; 1041c1
HDMATransfer_NoDI:
; HDMA transfer from hl to [hBGMapAddress]
; [hBGMapAddress] --> de
; 2 * SCREEN_HEIGHT --> c
@@ -339,7 +328,6 @@ HDMATransfer_NoDI: ; 1041c1
ld hl, rHDMA5
res 7, [hl]
ret
; 104205
HDMATransfer_Wait123Scanlines:
ld b, $7b
@@ -407,10 +395,9 @@ _continue_HDMATransfer:
ei
ret
; 10424e
_LoadHDMAParameters: ; 10424e (41:424e)
_LoadHDMAParameters:
ld a, h
ld [rHDMA1], a
ld a, l
@@ -422,14 +409,14 @@ _LoadHDMAParameters: ; 10424e (41:424e)
ld [rHDMA4], a
ret
PadTilemapForHDMATransfer: ; 10425f (41:425f)
PadTilemapForHDMATransfer:
ld c, " "
jr PadMapForHDMATransfer
PadAttrMapForHDMATransfer: ; 104263 (41:4263)
PadAttrMapForHDMATransfer:
ld c, $0
PadMapForHDMATransfer: ; 104265 (41:4265)
PadMapForHDMATransfer:
; pad a 20x18 map to 32x18 for HDMA transfer
; back up the padding value in c to hMapObjectIndexBuffer
ld a, [hMapObjectIndexBuffer]
@@ -467,7 +454,7 @@ PadMapForHDMATransfer: ; 104265 (41:4265)
ret
_Get2bpp:: ; 104284
_Get2bpp::
; 2bpp when [rLCDC] & $80
; switch to WRAM bank 6
ld a, [rSVBK]
@@ -510,9 +497,8 @@ _Get2bpp:: ; 104284
pop af
ld [rSVBK], a
ret
; 1042b2
_Get1bpp:: ; 1042b2
_Get1bpp::
; 1bpp when [rLCDC] & $80
.loop
ld a, c
@@ -537,9 +523,8 @@ _Get1bpp:: ; 1042b2
sub $10
ld c, a
jr .loop
; 1042d6
.bankswitch ; 1042d6
.bankswitch
ld a, [rSVBK]
push af
ld a, BANK(wScratchTileMap)
@@ -576,12 +561,10 @@ _Get1bpp:: ; 1042b2
pop af
ld [rSVBK], a
ret
; 104303
HDMATransfer_OnlyTopFourRows: ; 104303
HDMATransfer_OnlyTopFourRows:
ld hl, .Function
jp CallInSafeGFXMode
; 104309
.Function:
ld hl, wScratchTileMap
@@ -604,7 +587,7 @@ HDMATransfer_OnlyTopFourRows: ; 104303
call HDMATransfer_Wait127Scanlines
ret
.Copy: ; 10433a (41:433a)
.Copy:
ld b, 4
.outer_loop
ld c, SCREEN_WIDTH
@@ -623,4 +606,3 @@ HDMATransfer_OnlyTopFourRows: ; 104303
dec b
jr nz, .outer_loop
ret
; 104350

View File

@@ -5,22 +5,20 @@ INCLUDE "gfx/font.asm"
Unreferenced_fb434:
db 0
Unreferenced_Functionfb435: ; 4b435
Unreferenced_Functionfb435:
ld a, [Unreferenced_fb434]
and a
jp nz, Get1bpp_2
jp Get1bpp
; fb43f
Unreferenced_Functionfb43f: ; fb43f
Unreferenced_Functionfb43f:
ld a, [Unreferenced_fb434]
and a
jp nz, Get2bpp_2
jp Get2bpp
; End unreferenced block
; fb449
_LoadStandardFont:: ; fb449
_LoadStandardFont::
ld de, Font
ld hl, vTiles1
lb bc, BANK(Font), 128 ; "A" to "9"
@@ -45,9 +43,8 @@ _LoadStandardFont:: ; fb449
lb bc, BANK(Font), 32 ; "'" to "9"
call Get1bpp_2
ret
; fb48a
_LoadFontsExtra1:: ; fb48a
_LoadFontsExtra1::
ld de, FontsExtra_SolidBlackGFX
ld hl, vTiles2 tile "■" ; $60
lb bc, BANK(FontsExtra_SolidBlackGFX), 1
@@ -61,26 +58,23 @@ _LoadFontsExtra1:: ; fb48a
lb bc, BANK(FontExtra), 22 ; "<BOLD_D>" to "ぉ"
call Get2bpp_2
jr LoadFrame
; fb4b0
_LoadFontsExtra2:: ; fb4b0
_LoadFontsExtra2::
ld de, FontsExtra2_UpArrowGFX
ld hl, vTiles2 tile "▲" ; $61
ld b, BANK(FontsExtra2_UpArrowGFX)
ld c, 1
call Get2bpp_2
ret
; fb4be
_LoadFontsBattleExtra:: ; fb4be
_LoadFontsBattleExtra::
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
lb bc, BANK(FontBattleExtra), 25
call Get2bpp_2
jr LoadFrame
; fb4cc
LoadFrame: ; fb4cc
LoadFrame:
ld a, [wTextBoxFrame]
maskbits NUM_FRAMES
ld bc, 6 * LEN_1BPP_TILE
@@ -96,9 +90,8 @@ LoadFrame: ; fb4cc
lb bc, BANK(TextBoxSpaceGFX), 1
call Get1bpp_2
ret
; fb4f2
LoadBattleFontsHPBar: ; fb4f2
LoadBattleFontsHPBar:
ld de, FontBattleExtra
ld hl, vTiles2 tile $60
lb bc, BANK(FontBattleExtra), 12
@@ -109,7 +102,7 @@ LoadBattleFontsHPBar: ; fb4f2
call Get2bpp_2
call LoadFrame
LoadHPBar: ; fb50d
LoadHPBar:
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
lb bc, BANK(EnemyHPBarBorderGFX), 4
@@ -127,9 +120,8 @@ LoadHPBar: ; fb50d
lb bc, BANK(MobilePhoneTilesGFX), 2
call Get2bpp_2
ret
; fb53e
StatsScreen_LoadFont: ; fb53e
StatsScreen_LoadFont:
call _LoadFontsBattleExtra
ld de, EnemyHPBarBorderGFX
ld hl, vTiles2 tile $6c
@@ -147,10 +139,9 @@ StatsScreen_LoadFont: ; fb53e
ld hl, vTiles2 tile $55
lb bc, BANK(ExpBarGFX), 8
call Get2bpp_2
LoadStatsScreenPageTilesGFX: ; fb571
LoadStatsScreenPageTilesGFX:
ld de, StatsScreenPageTilesGFX
ld hl, vTiles2 tile $31
lb bc, BANK(StatsScreenPageTilesGFX), 17
call Get2bpp_2
ret
; fb57e

View File

@@ -1,4 +1,4 @@
LoadOverworldFont:: ; 106594
LoadOverworldFont::
ld de, .OverworldFontGFX
ld hl, vTiles1
lb bc, BANK(.OverworldFontGFX), $80
@@ -8,7 +8,6 @@ LoadOverworldFont:: ; 106594
lb bc, BANK(.OverworldFontSpaceGFX), 1
call Get2bpp
ret
; 1065ad
.OverworldFontGFX:
INCBIN "gfx/font/overworld.2bpp"

View File

@@ -1,4 +1,4 @@
GetUnownLetter: ; 51040
GetUnownLetter:
; Return Unown letter in wUnownLetter based on DVs at hl
; Take the middle 2 bits of each DV and place them in order:
@@ -48,7 +48,7 @@ GetUnownLetter: ; 51040
ld [wUnownLetter], a
ret
GetMonFrontpic: ; 51077
GetMonFrontpic:
ld a, [wCurPartySpecies]
ld [wCurSpecies], a
call IsAPokemon
@@ -60,7 +60,7 @@ GetMonFrontpic: ; 51077
ld [rSVBK], a
ret
GetAnimatedFrontpic: ; 5108b
GetAnimatedFrontpic:
ld a, [wCurPartySpecies]
ld [wCurSpecies], a
call IsAPokemon
@@ -75,7 +75,7 @@ GetAnimatedFrontpic: ; 5108b
ld [rSVBK], a
ret
_GetFrontpic: ; 510a5
_GetFrontpic:
push de
call GetBaseData
ld a, [wBasePicSize]
@@ -102,7 +102,7 @@ _GetFrontpic: ; 510a5
pop hl
ret
GetFrontpicPointer: ; 510d7
GetFrontpicPointer:
ld a, [wCurPartySpecies]
cp UNOWN
jr z, .unown
@@ -129,7 +129,7 @@ GetFrontpicPointer: ; 510d7
pop bc
ret
GetAnimatedEnemyFrontpic: ; 51103
GetAnimatedEnemyFrontpic:
ld a, BANK(vTiles3)
ld [rVBK], a
push hl
@@ -172,7 +172,7 @@ GetAnimatedEnemyFrontpic: ; 51103
ld [rVBK], a
ret
LoadFrontpicTiles: ; 5114f
LoadFrontpicTiles:
ld hl, wDecompressScratch
swap c
ld a, c
@@ -193,7 +193,7 @@ LoadFrontpicTiles: ; 5114f
jr nz, .loop
ret
GetMonBackpic: ; 5116c
GetMonBackpic:
ld a, [wCurPartySpecies]
call IsAPokemon
ret c
@@ -244,7 +244,7 @@ GetMonBackpic: ; 5116c
ld [rSVBK], a
ret
FixPicBank: ; 511c5
FixPicBank:
; This is a thing for some reason.
PICS_FIX EQU $36
@@ -262,7 +262,7 @@ GLOBAL PICS_FIX
pop hl
ret
.PicsBanks: ; 511d4
.PicsBanks:
db BANK("Pics 1") ; BANK("Pics 1") + 0
db BANK("Pics 2") ; BANK("Pics 1") + 1
db BANK("Pics 3") ; BANK("Pics 1") + 2
@@ -288,7 +288,7 @@ GLOBAL PICS_FIX
db BANK("Pics 23") ; BANK("Pics 1") + 22
db BANK("Pics 24") ; BANK("Pics 1") + 23
Function511ec: ; 511ec
Function511ec:
ld a, c
push de
ld hl, PokemonPicPointers
@@ -307,7 +307,7 @@ Function511ec: ; 511ec
call FarDecompress
ret
GetTrainerPic: ; 5120d
GetTrainerPic:
ld a, [wTrainerClass]
and a
ret z
@@ -349,7 +349,7 @@ GetTrainerPic: ; 5120d
ld [hBGMapMode], a
ret
DecompressGet2bpp: ; 5125d
DecompressGet2bpp:
; Decompress lz data from b:hl to scratch space at 6:d000, then copy it to address de.
ld a, [rSVBK]
@@ -373,7 +373,7 @@ DecompressGet2bpp: ; 5125d
ld [rSVBK], a
ret
FixBackpicAlignment: ; 5127c
FixBackpicAlignment:
push de
push bc
ld a, [wBoxAlignment]
@@ -409,7 +409,7 @@ FixBackpicAlignment: ; 5127c
pop de
ret
PadFrontpic: ; 512ab
PadFrontpic:
; pads frontpic to fill 7x7 box
ld a, b
cp 6
@@ -461,7 +461,7 @@ PadFrontpic: ; 512ab
jr nz, .Fill
ret
LoadOrientedFrontpic: ; 512f2
LoadOrientedFrontpic:
ld a, [wBoxAlignment]
and a
jr nz, .x_flip

View File

@@ -1,4 +1,4 @@
WriteOAMDMACodeToHRAM:: ; 4031
WriteOAMDMACodeToHRAM::
ld c, hTransferVirtualOAM - $ff00
ld b, .PushOAMEnd - .PushOAM
ld hl, .PushOAM
@@ -10,7 +10,7 @@ WriteOAMDMACodeToHRAM:: ; 4031
jr nz, .loop
ret
.PushOAM: ; 403f
.PushOAM:
ld a, HIGH(wVirtualOAM)
ld [rDMA], a
ld a, NUM_SPRITE_OAM_STRUCTS

View File

@@ -1,4 +1,4 @@
LoadOverworldMonIcon: ; 8e82b
LoadOverworldMonIcon:
ld a, e
call ReadMonMenuIcon
ld l, a
@@ -12,9 +12,8 @@ LoadOverworldMonIcon: ; 8e82b
ld b, BANK(Icons)
ld c, 8
ret
; 8e83f
LoadMenuMonIcon: ; 8e83f
LoadMenuMonIcon:
push hl
push de
push bc
@@ -23,9 +22,8 @@ LoadMenuMonIcon: ; 8e83f
pop de
pop hl
ret
; 8e849
.LoadIcon: ; 8e849
.LoadIcon:
ld d, 0
ld hl, .Jumptable
add hl, de
@@ -34,10 +32,9 @@ LoadMenuMonIcon: ; 8e83f
ld h, [hl]
ld l, a
jp hl
; 8e854
.Jumptable: ; 8e854 (23:6854)
.Jumptable:
dw PartyMenu_InitAnimatedMonIcon ; party menu
dw NamingScreen_InitAnimatedMonIcon ; naming screen
dw MoveList_InitAnimatedMonIcon ; moves (?)
@@ -46,13 +43,13 @@ LoadMenuMonIcon: ; 8e83f
dw Mobile_InitPartyMenuBGPal71 ; mobile
dw .GetPartyMenuMonIcon ; unused
.GetPartyMenuMonIcon: ; 8e862 (23:6862)
.GetPartyMenuMonIcon:
call InitPartyMenuIcon
call .GetPartyMonItemGFX
call SetPartyMonIconAnimSpeed
ret
.GetPartyMonItemGFX: ; 8e86c (23:686c)
.GetPartyMonItemGFX:
push bc
ld a, [hObjectStructIndexBuffer]
ld hl, wPartyMon1Item
@@ -83,7 +80,7 @@ LoadMenuMonIcon: ; 8e83f
ld [hl], a
ret
Mobile_InitAnimatedMonIcon: ; 8e898 (23:6898)
Mobile_InitAnimatedMonIcon:
call PartyMenu_InitAnimatedMonIcon
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
@@ -99,7 +96,7 @@ Mobile_InitAnimatedMonIcon: ; 8e898 (23:6898)
ld [hl], a
ret
Mobile_InitPartyMenuBGPal71: ; 8e8b1 (23:68b1)
Mobile_InitPartyMenuBGPal71:
call InitPartyMenuIcon
call SetPartyMonIconAnimSpeed
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
@@ -120,13 +117,13 @@ Mobile_InitPartyMenuBGPal71: ; 8e8b1 (23:68b1)
ld [wc608 + 1], a
ret
PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5)
PartyMenu_InitAnimatedMonIcon:
call InitPartyMenuIcon
call .SpawnItemIcon
call SetPartyMonIconAnimSpeed
ret
.SpawnItemIcon: ; 8e8df (23:68df)
.SpawnItemIcon:
push bc
ld a, [hObjectStructIndexBuffer]
ld hl, wPartyMon1Item
@@ -154,7 +151,7 @@ PartyMenu_InitAnimatedMonIcon: ; 8e8d5 (23:68d5)
ld [hl], a
ret
InitPartyMenuIcon: ; 8e908 (23:6908)
InitPartyMenuIcon:
ld a, [wCurIconTile]
push af
ld a, [hObjectStructIndexBuffer]
@@ -185,7 +182,7 @@ InitPartyMenuIcon: ; 8e908 (23:6908)
ld [hl], a
ret
SetPartyMonIconAnimSpeed: ; 8e936 (23:6936)
SetPartyMonIconAnimSpeed:
push bc
ld a, [hObjectStructIndexBuffer]
ld b, a
@@ -202,7 +199,7 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936)
ld [hl], a
ret
.getspeed ; 8e94c (23:694c)
.getspeed
farcall PlacePartymonHPBar
call GetHPPal
ld e, d
@@ -211,15 +208,13 @@ SetPartyMonIconAnimSpeed: ; 8e936 (23:6936)
add hl, de
ld b, [hl]
ret
; 8e95e (23:695e)
.speeds ; 8e95e
.speeds
db $00 ; HP_GREEN
db $40 ; HP_YELLOW
db $80 ; HP_RED
; 8e961
NamingScreen_InitAnimatedMonIcon: ; 8e961 (23:6961)
NamingScreen_InitAnimatedMonIcon:
ld a, [wd265]
call ReadMonMenuIcon
ld [wCurIcon], a
@@ -233,7 +228,7 @@ NamingScreen_InitAnimatedMonIcon: ; 8e961 (23:6961)
ld [hl], SPRITE_ANIM_SEQ_NULL
ret
MoveList_InitAnimatedMonIcon: ; 8e97d (23:697d)
MoveList_InitAnimatedMonIcon:
ld a, [wd265]
call ReadMonMenuIcon
ld [wCurIcon], a
@@ -248,7 +243,7 @@ MoveList_InitAnimatedMonIcon: ; 8e97d (23:697d)
ld [hl], SPRITE_ANIM_SEQ_NULL
ret
Trade_LoadMonIconGFX: ; 8e99a (23:699a)
Trade_LoadMonIconGFX:
ld a, [wd265]
call ReadMonMenuIcon
ld [wCurIcon], a
@@ -257,7 +252,7 @@ Trade_LoadMonIconGFX: ; 8e99a (23:699a)
call GetMemIconGFX
ret
GetSpeciesIcon: ; 8e9ac
GetSpeciesIcon:
; Load species icon into VRAM at tile a
push de
ld a, [wd265]
@@ -267,10 +262,9 @@ GetSpeciesIcon: ; 8e9ac
ld a, e
call GetIconGFX
ret
; 8e9bc
FlyFunction_GetMonIcon: ; 8e9bc (23:69bc)
FlyFunction_GetMonIcon:
push de
ld a, [wd265]
call ReadMonMenuIcon
@@ -279,9 +273,8 @@ FlyFunction_GetMonIcon: ; 8e9bc (23:69bc)
ld a, e
call GetIcon_a
ret
; 8e9cc (23:69cc)
Unreferenced_GetMonIcon2: ; 8e9cc
Unreferenced_GetMonIcon2:
push de
ld a, [wd265]
call ReadMonMenuIcon
@@ -289,11 +282,10 @@ Unreferenced_GetMonIcon2: ; 8e9cc
pop de
call GetIcon_de
ret
; 8e9db
GetMemIconGFX: ; 8e9db (23:69db)
GetMemIconGFX:
ld a, [wCurIconTile]
GetIconGFX: ; 8e9de
GetIconGFX:
call GetIcon_a
ld de, 8 tiles
add hl, de
@@ -308,20 +300,19 @@ GetIconGFX: ; 8e9de
HeldItemIcons:
INCBIN "gfx/icons/mail.2bpp"
INCBIN "gfx/icons/item.2bpp"
; 8ea17
GetIcon_de: ; 8ea17
GetIcon_de:
; Load icon graphics into VRAM starting from tile de.
ld l, e
ld h, d
jr GetIcon
GetIcon_a: ; 8ea1b
GetIcon_a:
; Load icon graphics into VRAM starting from tile a.
ld l, a
ld h, 0
GetIcon: ; 8ea1e
GetIcon:
; Load icon graphics into VRAM starting from tile hl.
; One tile is 16 bytes long.
@@ -352,16 +343,14 @@ endr
pop hl
ret
; 8ea3f
GetGFXUnlessMobile: ; 8ea3f
GetGFXUnlessMobile:
ld a, [wLinkMode]
cp LINK_MOBILE
jp nz, Request2bpp
jp Get2bpp_2
; 8ea4a
FreezeMonIcons: ; 8ea4a
FreezeMonIcons:
ld hl, wSpriteAnimationStructs
ld e, PARTY_LENGTH
ld a, [wMenuCursorY]
@@ -393,9 +382,8 @@ FreezeMonIcons: ; 8ea4a
dec e
jr nz, .loop
ret
; 8ea71
UnfreezeMonIcons: ; 8ea71
UnfreezeMonIcons:
ld hl, wSpriteAnimationStructs
ld e, PARTY_LENGTH
.loop
@@ -415,9 +403,8 @@ UnfreezeMonIcons: ; 8ea71
dec e
jr nz, .loop
ret
; 8ea8c (23:6a8c)
HoldSwitchmonIcon: ; 8ea8c
HoldSwitchmonIcon:
ld hl, wSpriteAnimationStructs
ld e, PARTY_LENGTH
ld a, [wSwitchMon]
@@ -448,7 +435,7 @@ HoldSwitchmonIcon: ; 8ea8c
jr nz, .loop
ret
ReadMonMenuIcon: ; 8eab3
ReadMonMenuIcon:
cp EGG
jr z, .egg
dec a
@@ -461,7 +448,6 @@ ReadMonMenuIcon: ; 8eab3
.egg
ld a, ICON_EGG
ret
; 8eac4
INCLUDE "data/pokemon/menu_icons.asm"

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +1,4 @@
PlaceGraphic: ; 2ef6e
PlaceGraphic:
; Fill wBoxAlignment-aligned box width b height c
; with iterating tile starting from hGraphicStartTile at hl.

View File

@@ -1,4 +1,4 @@
Unreferenced_Function88248: ; 88248
Unreferenced_Function88248:
ld c, CAL
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
@@ -10,17 +10,17 @@ Unreferenced_Function88248: ; 88248
ld [wTrainerClass], a
ret
MovePlayerPicRight: ; 88258
MovePlayerPicRight:
hlcoord 6, 4
ld de, 1
jr MovePlayerPic
MovePlayerPicLeft: ; 88260
MovePlayerPicLeft:
hlcoord 13, 4
ld de, -1
; fallthrough
MovePlayerPic: ; 88266
MovePlayerPic:
; Move player pic at hl by de * 7 tiles.
ld c, $8
.loop
@@ -55,7 +55,7 @@ MovePlayerPic: ; 88266
pop hl
jr .loop
ShowPlayerNamingChoices: ; 88297
ShowPlayerNamingChoices:
ld hl, ChrisNameMenuHeader
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
@@ -84,7 +84,7 @@ GetPlayerNameArray: ; 88318 This Function is never called
call InitName
ret
GetPlayerIcon: ; 8832c
GetPlayerIcon:
; Get the player icon corresponding to gender
; Male
@@ -102,7 +102,7 @@ GetPlayerIcon: ; 8832c
.done
ret
GetCardPic: ; 8833e
GetCardPic:
ld hl, ChrisCardPic
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
@@ -120,23 +120,23 @@ GetCardPic: ; 8833e
call FarCopyBytes
ret
ChrisCardPic: ; 88365
ChrisCardPic:
INCBIN "gfx/trainer_card/chris_card.2bpp"
KrisCardPic: ; 88595
KrisCardPic:
INCBIN "gfx/trainer_card/kris_card.2bpp"
CardGFX: ; 887c5
CardGFX:
INCBIN "gfx/trainer_card/trainer_card.2bpp"
GetPlayerBackpic: ; 88825
GetPlayerBackpic:
ld a, [wPlayerGender]
bit PLAYERGENDER_FEMALE_F, a
jr z, GetChrisBackpic
call GetKrisBackpic
ret
GetChrisBackpic: ; 88830
GetChrisBackpic:
ld hl, ChrisBackpic
ld b, BANK(ChrisBackpic)
ld de, vTiles2 tile $31
@@ -144,7 +144,7 @@ GetChrisBackpic: ; 88830
predef DecompressGet2bpp
ret
HOF_LoadTrainerFrontpic: ; 88840
HOF_LoadTrainerFrontpic:
call WaitBGMap
xor a
ld [hBGMapMode], a
@@ -173,7 +173,7 @@ HOF_LoadTrainerFrontpic: ; 88840
ld [hBGMapMode], a
ret
DrawIntroPlayerPic: ; 88874
DrawIntroPlayerPic:
; Draw the player pic at (6,4).
; Get class
@@ -206,13 +206,13 @@ DrawIntroPlayerPic: ; 88874
predef PlaceGraphic
ret
ChrisPic: ; 888a9
ChrisPic:
INCBIN "gfx/player/chris.2bpp"
KrisPic: ; 88bb9
KrisPic:
INCBIN "gfx/player/kris.2bpp"
GetKrisBackpic: ; 88ec9
GetKrisBackpic:
; Kris's backpic is uncompressed.
ld de, KrisBackpic
ld hl, vTiles2 tile $31
@@ -220,5 +220,5 @@ GetKrisBackpic: ; 88ec9
call Get2bpp
ret
KrisBackpic: ; 88ed6
KrisBackpic:
INCBIN "gfx/player/kris_back.2bpp"

View File

@@ -1,4 +1,4 @@
LoadSGBLayout: ; 864c
LoadSGBLayout:
call CheckCGB
jp nz, LoadSGBLayoutCGB
@@ -20,9 +20,8 @@ LoadSGBLayout: ; 864c
ld de, _LoadSGBLayout_ReturnFromJumpTable
push de
jp hl
; 866f
.Jumptable: ; 866f
.Jumptable:
dw .SGB_BattleGrayscale
dw .SGB_BattleColors
dw .SGB_PokegearPals
@@ -54,15 +53,13 @@ LoadSGBLayout: ; 864c
dw .SGB_TrainerOrMonFrontpicPals
dw .SGB_MysteryGift
dw .SGB1e
; 86ad
.SGB_BattleGrayscale: ; 86ad
.SGB_BattleGrayscale:
ld hl, PalPacket_BattleGrayscale
ld de, BlkPacket_Battle
ret
; 86b4
.SGB_BattleColors: ; 86b4
.SGB_BattleColors:
ld hl, BlkPacket_Battle
call PushSGBPals_
@@ -135,9 +132,8 @@ LoadSGBLayout: ; 864c
ld a, SCGB_BATTLE_COLORS
ld [wSGBPredef], a
ret
; 873c
.SGB_MoveList: ; 873c
.SGB_MoveList:
ld hl, PalPacket_9bd6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -154,15 +150,13 @@ LoadSGBLayout: ; 864c
ld hl, wSGBPals
ld de, BlkPacket_MoveList
ret
; 875c
.SGB_PokegearPals: ; 875c
.SGB_PokegearPals:
ld hl, PalPacket_Pokegear
ld de, BlkPacket_9a86
ret
; 8763
.SGB_StatsScreenHPPals: ; 8763
.SGB_StatsScreenHPPals:
ld hl, PalPacket_9ce6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -196,15 +190,13 @@ LoadSGBLayout: ; 864c
ld hl, wSGBPals
ld de, BlkPacket_StatsScreen
ret
; 87ab
.SGB_PartyMenu: ; 87ab
.SGB_PartyMenu:
ld hl, PalPacket_PartyMenu
ld de, wSGBPals + 1
ret
; 87b2
.SGB_Pokedex: ; 87b2
.SGB_Pokedex:
ld hl, PalPacket_9ce6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -230,9 +222,8 @@ LoadSGBLayout: ; 864c
ld hl, wSGBPals
ld de, BlkPacket_Pokedex_PC
ret
; 87e9
.SGB_BillsPC: ; 87e9
.SGB_BillsPC:
ld hl, PalPacket_9ce6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -259,15 +250,13 @@ LoadSGBLayout: ; 864c
ld hl, wSGBPals
ld de, BlkPacket_Pokedex_PC
ret
; 8823
.SGB_PokedexUnownMode: ; 8823
.SGB_PokedexUnownMode:
call .SGB_Pokedex
ld de, BlkPacket_PokedexUnownMode
ret
; 882a
.SGB_PokedexSearchOption: ; 882a
.SGB_PokedexSearchOption:
ld hl, PalPacket_9ce6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -283,34 +272,29 @@ LoadSGBLayout: ; 864c
ld hl, wSGBPals
ld de, BlkPacket_9a86
ret
; 884b
.SGB_PackPals: ; 884b
.SGB_PackPals:
ld hl, PalPacket_Pack
ld de, BlkPacket_9a86
ret
; 8852
.SGB_SlotMachine: ; 8852
.SGB_SlotMachine:
ld hl, PalPacket_SlotMachine
ld de, BlkPacket_SlotMachine
ret
; 8859
.SGB06: ; 8859
.SGB06:
ld hl, PalPacket_SCGB_06
ld de, BlkPacket_SCGB_06
ret
; 8860
.SGB_Diploma:
.SGB_MysteryGift: ; 8860
.SGB_MysteryGift:
ld hl, PalPacket_Diploma
ld de, BlkPacket_9a86
ret
; 8867
.SGB_GSIntro: ; 8867
.SGB_GSIntro:
ld b, 0
ld hl, .BlkPacketTable_GSIntro
rept 4
@@ -324,35 +308,30 @@ endr
ld h, [hl]
ld l, a
ret
; 8878
.BlkPacketTable_GSIntro: ; 8878
.BlkPacketTable_GSIntro:
dw BlkPacket_9a86, PalPacket_GSIntroShellderLapras
dw BlkPacket_GSIntroJigglypuffPikachu, PalPacket_GSIntroJigglypuffPikachu
dw BlkPacket_9a86, PalPacket_GSIntroStartersTransition
; 8884
.SGB_GSTitleScreen: ; 8884
.SGB_GSTitleScreen:
ld hl, PalPacket_GSTitleScreen
ld de, BlkPacket_GSTitleScreen
ld a, SCGB_DIPLOMA
ld [wSGBPredef], a
ret
; 8890
.SGB13: ; 8890
.SGB13:
ld hl, PalPacket_SCGB_13
ld de, BlkPacket_SCGB_13
ret
; 8897
.SGB_BetaPikachuMinigame: ; 8897
.SGB_BetaPikachuMinigame:
ld hl, PalPacket_BetaPikachuMinigame
ld de, BlkPacket_9a86
ret
; 889e
.SGB_BetaPoker: ; 889e
.SGB_BetaPoker:
ld hl, BlkPacket_9a86
ld de, wPlayerLightScreenCount ; ???
ld bc, PALPACKET_LENGTH
@@ -360,9 +339,8 @@ endr
ld hl, PalPacket_BetaPoker
ld de, BlkPacket_9a86
ret
; 88b1
.SGB_MapPals: ; 88b1
.SGB_MapPals:
ld hl, PalPacket_9bd6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -374,9 +352,8 @@ endr
ld a, SCGB_MAPPALS
ld [wSGBPredef], a
ret
; 88cd
.SGB_Evolution: ; 88cd
.SGB_Evolution:
push bc
ld hl, PalPacket_9ce6
ld de, wSGBPals
@@ -419,22 +396,19 @@ endr
ld hl, wSGBPals
ld de, BlkPacket_9a86
ret
; 891a
.SGB0d:
.SGB_TrainerCard: ; 891a
.SGB_TrainerCard:
ld hl, PalPacket_Diploma
ld de, BlkPacket_9a86
ret
; 8921
.SGB_UnownPuzzle: ; 8921
.SGB_UnownPuzzle:
ld hl, PalPacket_UnownPuzzle
ld de, BlkPacket_9a86
ret
; 8928
.SGB12: ; 8928
.SGB12:
ld hl, PalPacket_9bd6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -462,9 +436,8 @@ endr
ld hl, wSGBPals
ld de, wSGBPals + PALPACKET_LENGTH
ret
; 8969
.SGB1e: ; 8969
.SGB1e:
ld hl, PalPacket_9ce6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -495,15 +468,13 @@ endr
ld hl, wSGBPals
ld de, BlkPacket_9a86
ret
; 89a6
.SGB_GamefreakLogo: ; 89a6
.SGB_GamefreakLogo:
ld hl, PalPacket_GamefreakLogo
ld de, BlkPacket_9a86
ret
; 89ad
.SGB_PlayerOrMonFrontpicPals: ; 89ad
.SGB_PlayerOrMonFrontpicPals:
ld hl, PalPacket_9ce6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -522,15 +493,13 @@ endr
ld hl, wSGBPals
ld de, BlkPacket_9a86
ret
; 89d9
.SGB_TradeTube: ; 89d9
.SGB_TradeTube:
ld hl, PalPacket_TradeTube
ld de, BlkPacket_9a86
ret
; 89e0
.SGB_TrainerOrMonFrontpicPals: ; 89e0
.SGB_TrainerOrMonFrontpicPals:
ld hl, PalPacket_9ce6
ld de, wSGBPals
ld bc, PALPACKET_LENGTH
@@ -549,9 +518,8 @@ endr
ld hl, wSGBPals
ld de, BlkPacket_9a86
ret
; 8a0c
.GetMapPalsIndex: ; 8a0c
.GetMapPalsIndex:
ld a, [wTimeOfDayPal]
cp NITE_F
jr c, .morn_day
@@ -593,13 +561,11 @@ endr
.gate
ld a, PREDEFPAL_PEWTER
ret
; 8a45
INCLUDE "data/maps/sgb_roof_pal_inds.asm"
_LoadSGBLayout_ReturnFromJumpTable: ; 8a60
_LoadSGBLayout_ReturnFromJumpTable:
push de
call PushSGBPals_
pop hl
jp PushSGBPals_
; 8a68

View File

@@ -1,4 +1,4 @@
DoAnimFrame: ; 8d24b
DoAnimFrame:
ld hl, SPRITEANIMSTRUCT_ANIM_SEQ_ID
add hl, bc
ld e, [hl]
@@ -10,9 +10,8 @@ DoAnimFrame: ; 8d24b
ld h, [hl]
ld l, a
jp hl
; 8d25b
.Jumptable: ; 8d25b (23:525b)
.Jumptable:
; entries correspond to SPRITE_ANIM_SEQ_* constants
dw .Null
dw .PartyMon
@@ -50,10 +49,10 @@ DoAnimFrame: ; 8d24b
dw .IntroUnownF
dw .IntroSuicuneAway
.Null: ; 8d2a1 (23:52a1)
.Null:
ret
.PartyMon ; 8d2a2 (23:52a2)
.PartyMon
ld a, [wMenuCursorY]
ld hl, SPRITEANIMSTRUCT_INDEX
@@ -70,7 +69,7 @@ DoAnimFrame: ; 8d24b
ld [hl], $0
ret
.PartyMonSwitch ; 8d2b9 (23:52b9)
.PartyMonSwitch
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld [hl], 8 * 3
@@ -112,7 +111,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.PartyMonSelected ; 8d2ea (23:52ea)
.PartyMonSelected
ld a, [wMenuCursorY]
ld hl, SPRITEANIMSTRUCT_INDEX
@@ -131,17 +130,15 @@ DoAnimFrame: ; 8d24b
ld [hl], 8 * 3
ret
.GSTitleTrail ; 8d302 (23:5302)
.GSTitleTrail
call .AnonymousJumptable
jp hl
; 8d306 (23:5306)
; Anonymous dw (see .AnonymousJumptable)
dw .four_zero
dw .four_one
; 8d30a
.four_zero ; 8d30a
.four_zero
call .IncrementJumptableIndex
ld hl, SPRITEANIMSTRUCT_INDEX
@@ -159,7 +156,7 @@ DoAnimFrame: ; 8d24b
add hl, bc
ld [hl], a
.four_one ; 8d321
.four_one
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
@@ -200,9 +197,8 @@ DoAnimFrame: ; 8d24b
.asm_8d356
call DeinitializeSprite
ret
; 8d35a
.GSIntroHoOh ; 8d35a (23:535a)
.GSIntroHoOh
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -216,19 +212,19 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.NamingScreenCursor ; 8d36c (23:536c)
.NamingScreenCursor
callfar NamingScreen_AnimateCursor
ret
.MailCursor ; 8d373 (23:5373)
.MailCursor
callfar ComposeMail_AnimateCursor
ret
.GameFreakLogo: ; 8d37a (23:537a)
.GameFreakLogo:
callfar GameFreakLogoJumper
ret
.GSIntroStar ; 8d381 (23:5381)
.GSIntroStar
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -278,7 +274,7 @@ DoAnimFrame: ; 8d24b
call DeinitializeSprite
ret
.GSIntroSparkle ; 8d3c3 (23:53c3)
.GSIntroSparkle
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hli]
@@ -355,11 +351,11 @@ DoAnimFrame: ; 8d24b
call DeinitializeSprite
ret
.SlotsGolem: ; 8d422 (23:5422)
.SlotsGolem:
callfar Slots_AnimateGolem
ret
.SlotsChansey: ; 8d429 (23:5429)
.SlotsChansey:
callfar Slots_AnimateChansey
ld hl, wcf64
ld a, [hl]
@@ -370,7 +366,7 @@ DoAnimFrame: ; 8d24b
call _ReinitSpriteAnimFrame
ret
.SlotsChanseyEgg: ; 8d43e (23:543e)
.SlotsChanseyEgg:
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld a, [hl]
@@ -403,22 +399,21 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.UnusedCursor ; 8d46e (23:546e)
.UnusedCursor
callfar ret_e00ed
ret
.PokegearArrow ; 8d475 (23:5475)
.PokegearArrow
callfar AnimatePokegearModeIndicatorArrow
ret
.DummyGameCursor ; 8d47c (23:547c)
.DummyGameCursor
callfar DummyGame_InterpretJoypad_AnimateCursor
ret
.TradePokeBall ; 8d483 (23:5483)
.TradePokeBall
call .AnonymousJumptable
jp hl
; 8d487 (23:5487)
; Anonymous dw (see .AnonymousJumptable)
dw .TradePokeBall_zero
@@ -427,9 +422,8 @@ DoAnimFrame: ; 8d24b
dw .TradePokeBall_three
dw .TradePokeBall_four
dw .TradePokeBall_five
; 8d493
.TradePokeBall_zero ; 8d493
.TradePokeBall_zero
ld a, SPRITE_ANIM_FRAMESET_TRADE_POKE_BALL_WOBBLE
call _ReinitSpriteAnimFrame
@@ -441,9 +435,8 @@ DoAnimFrame: ; 8d24b
add hl, bc
ld [hl], $20
ret
; 8d4a5
.TradePokeBall_two ; 8d4a5
.TradePokeBall_two
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -459,7 +452,7 @@ DoAnimFrame: ; 8d24b
add hl, bc
ld [hl], $40
.TradePokeBall_three ; 8d4b8
.TradePokeBall_three
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -478,9 +471,8 @@ DoAnimFrame: ; 8d24b
ld de, SFX_GOT_SAFARI_BALLS
call PlaySFX
jr .TradePokeBall_five
; 8d4d5
.TradePokeBall_one ; 8d4d5
.TradePokeBall_one
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld [hl], $4
@@ -493,9 +485,8 @@ DoAnimFrame: ; 8d24b
add hl, bc
ld [hl], $24
ret
; 8d4e8
.TradePokeBall_four ; 8d4e8
.TradePokeBall_four
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld a, [hl]
@@ -541,12 +532,11 @@ DoAnimFrame: ; 8d24b
call .IncrementJumptableIndex
ret
.TradePokeBall_five ; 8d526
.TradePokeBall_five
call DeinitializeSprite
ret
; 8d52a
.TradeTubeBulge ; 8d52a (23:552a)
.TradeTubeBulge
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
@@ -564,11 +554,11 @@ DoAnimFrame: ; 8d24b
call DeinitializeSprite
ret
.TrademonInTube ; 8d543 (23:5543)
.TrademonInTube
callfar TradeAnim_AnimateTrademonInTube
ret
.RevealNewMon: ; 8d54a (23:554a)
.RevealNewMon:
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -605,11 +595,11 @@ DoAnimFrame: ; 8d24b
call DeinitializeSprite
ret
.RadioTuningKnob: ; 8d578 (23:5578)
.RadioTuningKnob:
callfar AnimateTuningKnob
ret
.CutLeaves ; 8d57f (23:557f)
.CutLeaves
ld hl, SPRITEANIMSTRUCT_0D
add hl, bc
ld e, [hl]
@@ -648,7 +638,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.FlyFrom: ; 8d5b0 (23:55b0)
.FlyFrom:
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
@@ -687,7 +677,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.FlyLeaf: ; 8d5e2 (23:55e2)
.FlyLeaf:
ld hl, SPRITEANIMSTRUCT_XCOORD
add hl, bc
ld a, [hl]
@@ -716,7 +706,7 @@ DoAnimFrame: ; 8d24b
call DeinitializeSprite
ret
.FlyTo: ; 8d607 (23:5607)
.FlyTo:
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
@@ -748,15 +738,15 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.MobileTradeSentPulse ; 8d630 (23:5630)
.MobileTradeSentPulse
farcall Function108bc7
ret
.MobileTradeOTPulse ; 8d637 (23:5637)
.MobileTradeOTPulse
farcall Function108be0
ret
.IntroSuicune ; 8d63e (23:563e)
.IntroSuicune
ld a, [wcf65]
and a
jr nz, .asm_8d645
@@ -783,7 +773,7 @@ DoAnimFrame: ; 8d24b
call _ReinitSpriteAnimFrame
ret
.IntroPichuWooper ; 8d666 (23:5666)
.IntroPichuWooper
ld hl, SPRITEANIMSTRUCT_0C
add hl, bc
ld a, [hl]
@@ -802,7 +792,7 @@ DoAnimFrame: ; 8d24b
.asm_8d67f
ret
.IntroUnown ; 8d680 (23:5680)
.IntroUnown
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
ld d, [hl]
@@ -829,7 +819,7 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.IntroUnownF ; 8d6a2 (23:56a2)
.IntroUnownF
ld a, [wcf64]
cp $40
ret nz
@@ -837,7 +827,7 @@ DoAnimFrame: ; 8d24b
call _ReinitSpriteAnimFrame
ret
.IntroSuicuneAway ; 8d6ae (23:56ae)
.IntroSuicuneAway
ld hl, SPRITEANIMSTRUCT_YCOORD
add hl, bc
ld a, [hl]
@@ -845,15 +835,15 @@ DoAnimFrame: ; 8d24b
ld [hl], a
ret
.EZChatCursor ; 8d6b7 (23:56b7)
.EZChatCursor
farcall AnimateEZChatCursor
ret
.Celebi ; 8d6be (23:56be)
.Celebi
farcall UpdateCelebiPosition
ret
.AnonymousJumptable: ; 8d6c5 (23:56c5)
.AnonymousJumptable:
ld hl, sp+$0
ld e, [hl]
inc hl
@@ -870,20 +860,17 @@ DoAnimFrame: ; 8d24b
ld h, [hl]
ld l, a
ret
; 8d6d8 (23:56d8)
.IncrementJumptableIndex: ; 8d6d8
.IncrementJumptableIndex:
ld hl, SPRITEANIMSTRUCT_JUMPTABLE_INDEX
add hl, bc
inc [hl]
ret
; 8d6de
.Sprites_Sine: ; 8d6de (23:56de)
.Sprites_Sine:
call Sprites_Sine
ret
.Sprites_Cosine: ; 8d6e2 (23:56e2)
.Sprites_Cosine:
call Sprites_Cosine
ret
; 8d6e6 (23:56e6)

View File

@@ -1,4 +1,4 @@
ClearSpriteAnims: ; 8cf53
ClearSpriteAnims:
ld hl, wSpriteAnimDict
ld bc, wSpriteAnimsEnd - wSpriteAnimDict
.loop
@@ -9,15 +9,13 @@ ClearSpriteAnims: ; 8cf53
or b
jr nz, .loop
ret
; 8cf62
PlaySpriteAnimationsAndDelayFrame: ; 8cf62
PlaySpriteAnimationsAndDelayFrame:
call PlaySpriteAnimations
call DelayFrame
ret
; 8cf69
PlaySpriteAnimations: ; 8cf69
PlaySpriteAnimations:
push hl
push de
push bc
@@ -32,9 +30,8 @@ PlaySpriteAnimations: ; 8cf69
pop de
pop hl
ret
; 8cf7a
DoNextFrameForAllSprites: ; 8cf7a
DoNextFrameForAllSprites:
ld hl, wSpriteAnimationStructs
ld e, NUM_SPRITE_ANIM_STRUCTS
@@ -72,9 +69,8 @@ DoNextFrameForAllSprites: ; 8cf7a
.done
ret
; 8cfa8
DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
DoNextFrameForFirst16Sprites:
ld hl, wSpriteAnimationStructs
ld e, NUM_SPRITE_ANIM_STRUCTS
@@ -113,7 +109,7 @@ DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
.done
ret
InitSpriteAnimStruct:: ; 8cfd6
InitSpriteAnimStruct::
; Initialize animation a at pixel x=e, y=d
; Find if there's any room in the wSpriteAnimationStructs array, which is 10x16
push de
@@ -208,18 +204,16 @@ endr
ld a, b
ld [wSpriteAnimAddrBackup + 1], a
ret
; 8d036
DeinitializeSprite: ; 8d036
DeinitializeSprite:
; Clear the index field of the struct in bc.
ld hl, SPRITEANIMSTRUCT_INDEX
add hl, bc
ld [hl], $0
ret
; 8d03d
DeinitializeAllSprites: ; 8d03d (23:503d)
DeinitializeAllSprites:
; Clear the index field of every struct in the wSpriteAnimationStructs array.
ld hl, wSpriteAnimationStructs
ld bc, SPRITEANIMSTRUCT_LENGTH
@@ -233,7 +227,7 @@ DeinitializeAllSprites: ; 8d03d (23:503d)
ret
UpdateAnimFrame: ; 8d04c
UpdateAnimFrame:
call InitSpriteAnimBuffer ; init WRAM
call GetSpriteAnimFrame ; read from a memory array
cp -3
@@ -319,9 +313,8 @@ UpdateAnimFrame: ; 8d04c
pop bc
scf
ret
; 8d0be
AddOrSubtractY: ; 8d0be
AddOrSubtractY:
push hl
ld a, [hl]
ld hl, wCurrSpriteAddSubFlags
@@ -335,9 +328,8 @@ AddOrSubtractY: ; 8d0be
.ok
pop hl
ret
; 8d0ce
AddOrSubtractX: ; 8d0ce
AddOrSubtractX:
push hl
ld a, [hl]
ld hl, wCurrSpriteAddSubFlags
@@ -351,9 +343,8 @@ AddOrSubtractX: ; 8d0ce
.ok
pop hl
ret
; 8d0de
GetSpriteOAMAttr: ; 8d0de
GetSpriteOAMAttr:
ld a, [wCurrSpriteAddSubFlags]
ld b, a
ld a, [hl]
@@ -364,9 +355,8 @@ GetSpriteOAMAttr: ; 8d0de
and $1f
or b
ret
; 8d0ec
InitSpriteAnimBuffer: ; 8d0ec
InitSpriteAnimBuffer:
xor a
ld [wCurrSpriteAddSubFlags], a
ld hl, SPRITEANIMSTRUCT_TILE_ID
@@ -382,9 +372,8 @@ InitSpriteAnimBuffer: ; 8d0ec
ld a, [hli]
ld [wCurrAnimYOffset], a
ret
; 8d109
GetSpriteAnimVTile: ; 8d109
GetSpriteAnimVTile:
; a = wSpriteAnimDict[a] if a in wSpriteAnimDict else 0
; vTiles offset
push hl
@@ -409,9 +398,8 @@ GetSpriteAnimVTile: ; 8d109
pop bc
pop hl
ret
; 8d120
_ReinitSpriteAnimFrame:: ; 8d120
_ReinitSpriteAnimFrame::
ld hl, SPRITEANIMSTRUCT_FRAMESET_ID
add hl, bc
ld [hl], a
@@ -422,10 +410,9 @@ _ReinitSpriteAnimFrame:: ; 8d120
add hl, bc
ld [hl], -1
ret
; 8d132
GetSpriteAnimFrame: ; 8d132
GetSpriteAnimFrame:
.loop
ld hl, SPRITEANIMSTRUCT_DURATION
add hl, bc
@@ -491,9 +478,8 @@ GetSpriteAnimFrame: ; 8d132
add hl, bc
ld [hl], a
jr .loop
; 8d189
.GetPointer: ; 8d189
.GetPointer:
; Get the data for the current frame for the current animation sequence
; SpriteAnimFrameData[SpriteAnim[SPRITEANIMSTRUCT_FRAMESET_ID]][SpriteAnim[SPRITEANIMSTRUCT_FRAME]]
@@ -514,9 +500,8 @@ GetSpriteAnimFrame: ; 8d132
add hl, hl
add hl, de
ret
; 8d1a2
GetFrameOAMPointer: ; 8d1a2
GetFrameOAMPointer:
; Load OAM data pointer
ld e, a
ld d, 0
@@ -525,9 +510,8 @@ GetFrameOAMPointer: ; 8d1a2
add hl, de
add hl, de
ret
; 8d1ac
Unreferenced_BrokenGetStdGraphics: ; 8d1ac
Unreferenced_BrokenGetStdGraphics:
push hl
ld l, a
ld h, 0
@@ -547,7 +531,6 @@ Unreferenced_BrokenGetStdGraphics: ; 8d1ac
call Request2bpp
pop bc
ret
; 8d1c4
INCLUDE "data/sprite_anims/sequences.asm"
@@ -573,19 +556,18 @@ BrokenStdGFXPointers:
dbbw 16, $21, .deleted
.deleted
; 8e72a (23:672a)
Sprites_Cosine: ; 8e72a
Sprites_Cosine:
; a = d * cos(a * pi/32)
add %010000 ; cos(x) = sin(x + pi/2)
; fallthrough
Sprites_Sine: ; 8e72c
Sprites_Sine:
; a = d * sin(a * pi/32)
calc_sine_wave
AnimateEndOfExpBar: ; 8e79d
AnimateEndOfExpBar:
ld a, [hSGB]
ld de, EndOfExpBarGFX
and a
@@ -609,9 +591,8 @@ AnimateEndOfExpBar: ; 8e79d
jr nz, .loop
call ClearSprites
ret
; 8e7c6
.AnimateFrame: ; 8e7c6
.AnimateFrame:
ld hl, wVirtualOAMSprite00
ld c, 8 ; number of animated circles
.anim_loop
@@ -648,14 +629,13 @@ AnimateEndOfExpBar: ; 8e79d
ld a, PAL_BATTLE_OB_BLUE
ld [hli], a ; attributes
jr .anim_loop
; 8e7f4
EndOfExpBarGFX: ; 8e7f4
EndOfExpBarGFX:
INCBIN "gfx/battle/expbarend.2bpp"
SGBEndOfExpBarGFX: ; 8e804
SGBEndOfExpBarGFX:
INCBIN "gfx/battle/expbarend_sgb.2bpp"
ClearSpriteAnims2: ; 8e814
ClearSpriteAnims2:
push hl
push de
push bc
@@ -674,4 +654,3 @@ ClearSpriteAnims2: ; 8e814
pop de
pop hl
ret
; 8e82b

View File

@@ -1,4 +1,4 @@
GetTrademonFrontpic: ; 4d7fd
GetTrademonFrontpic:
ld a, [wOTTrademonSpecies]
ld hl, wOTTrademonDVs
ld de, vTiles2
@@ -13,7 +13,7 @@ GetTrademonFrontpic: ; 4d7fd
predef GetAnimatedFrontpic
ret
AnimateTrademonFrontpic: ; 4d81e
AnimateTrademonFrontpic:
ld a, [wOTTrademonSpecies]
call IsAPokemon
ret c