- GetMonFrontpic → GetEnemyMonFrontpic
- GetMonBackpic → GetBattleMonBackpic
- FrontpicPredef → GetAnimatedFrontpicPredef
- GetFrontpic → GetMonFrontpic
- GetBackpic → GetMonBackpic
- CutAndPasteMap → PadMapForHDMATransfer
This commit is contained in:
Remy Oukaour 2017-12-24 15:03:20 -05:00
parent 4e5fd7a521
commit 9973e43d5a
21 changed files with 71 additions and 70 deletions

View File

@ -932,7 +932,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld hl, BattleMonDVs ; BattleMonDVs
predef GetUnownLetter
ld de, VTiles0 tile $00
predef GetFrontpic
predef GetMonFrontpic
jr .done
.player
@ -941,7 +941,7 @@ BattleAnimCmd_Transform: ; cc5dc (33:45dc)
ld hl, EnemyMonDVs ; EnemyMonDVs
predef GetUnownLetter
ld de, VTiles0 tile $00
predef GetBackpic
predef GetMonBackpic
.done
pop af
@ -1159,14 +1159,14 @@ BattleAnimCmd_BeatUp: ; cc776 (33:4776)
ld hl, BattleMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $00
predef GetFrontpic
predef GetMonFrontpic
jr .done
.player
ld hl, EnemyMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $31
predef GetBackpic
predef GetMonBackpic
.done
pop af

View File

@ -3689,7 +3689,7 @@ Function_SetEnemyPkmnAndSendOutAnimation: ; 3d7c7
ld a, OTPARTYMON
ld [MonType], a
predef CopyPkmnToTempMon
call GetMonFrontpic
call GetEnemyMonFrontpic
xor a
ld [wNumHits], a
@ -4176,7 +4176,7 @@ SendOutPlayerMon: ; 3db5f
call WaitBGMap
xor a
ld [hBGMapMode], a
call GetMonBackpic
call GetBattleMonBackpic
xor a
ld [hGraphicStartTile], a
ld [wBattleMenuCursorBuffer], a
@ -5185,8 +5185,8 @@ BattleMenu_Pack: ; 3e1c7
call ClearPalettes
call DelayFrame
call _LoadBattleFontsHPBar
call GetMonBackpic
call GetMonFrontpic
call GetBattleMonBackpic
call GetEnemyMonFrontpic
call ExitMenu
call WaitBGMap
call FinishBattleAnim
@ -5218,10 +5218,10 @@ BattleMenu_Pack: ; 3e1c7
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .tutorial2
call GetMonBackpic
call GetBattleMonBackpic
.tutorial2
call GetMonFrontpic
call GetEnemyMonFrontpic
ld a, $1
ld [wMenuCursorY], a
call ExitMenu
@ -8269,17 +8269,17 @@ PlaceExpBar: ; 3f41c
ret
; 3f43d
GetMonBackpic: ; 3f43d
GetBattleMonBackpic: ; 3f43d
ld a, [PlayerSubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
jr nz, GetBackpic_DoAnim ; substitute
jr nz, GetBattleMonBackpic_DoAnim ; substitute
DropPlayerSub: ; 3f447
ld a, [wPlayerMinimized]
and a
ld hl, BattleAnimCmd_MinimizeOpp
jr nz, GetBackpic_DoAnim
jr nz, GetBattleMonBackpic_DoAnim
ld a, [CurPartySpecies]
push af
ld a, [BattleMonSpecies]
@ -8287,13 +8287,13 @@ DropPlayerSub: ; 3f447
ld hl, BattleMonDVs
predef GetUnownLetter
ld de, VTiles2 tile $31
predef GetBackpic
predef GetMonBackpic
pop af
ld [CurPartySpecies], a
ret
; 3f46f
GetBackpic_DoAnim: ; 3f46f
GetBattleMonBackpic_DoAnim: ; 3f46f
ld a, [hBattleTurn]
push af
xor a
@ -8305,17 +8305,17 @@ GetBackpic_DoAnim: ; 3f46f
ret
; 3f47c
GetMonFrontpic: ; 3f47c
GetEnemyMonFrontpic: ; 3f47c
ld a, [EnemySubStatus4]
bit SUBSTATUS_SUBSTITUTE, a
ld hl, BattleAnimCmd_RaiseSub
jr nz, GetFrontpic_DoAnim
jr nz, GetEnemyMonFrontpic_DoAnim
DropEnemySub: ; 3f486
ld a, [wEnemyMinimized]
and a
ld hl, BattleAnimCmd_MinimizeOpp
jr nz, GetFrontpic_DoAnim
jr nz, GetEnemyMonFrontpic_DoAnim
ld a, [CurPartySpecies]
push af
@ -8326,13 +8326,13 @@ DropEnemySub: ; 3f486
ld hl, EnemyMonDVs
predef GetUnownLetter
ld de, VTiles2
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
pop af
ld [CurPartySpecies], a
ret
; 3f4b4
GetFrontpic_DoAnim: ; 3f4b4
GetEnemyMonFrontpic_DoAnim: ; 3f4b4
ld a, [hBattleTurn]
push af
call SetEnemyTurn
@ -8532,7 +8532,7 @@ InitEnemyWildmon: ; 3f607
ld [wFirstUnownSeen], a
.skip_unown
ld de, VTiles2
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
xor a
ld [TrainerClass], a
ld [hGraphicStartTile], a

View File

@ -6299,11 +6299,11 @@ BattleCommand_Curl: ; 365a7
BattleCommand_RaiseSubNoAnim: ; 365af
ld hl, GetMonBackpic
ld hl, GetBattleMonBackpic
ld a, [hBattleTurn]
and a
jr z, .PlayerTurn
ld hl, GetMonFrontpic
ld hl, GetEnemyMonFrontpic
.PlayerTurn:
xor a
ld [hBGMapMode], a

View File

@ -1108,7 +1108,7 @@ PCMonInfo: ; e2ac6 (38:6ac6)
predef GetUnownLetter
call GetBaseData
ld de, VTiles2 tile $00
predef GetFrontpic
predef GetMonFrontpic
xor a
ld [wBillsPC_MonHasMail], a
ld a, [CurPartySpecies]

View File

@ -649,7 +649,7 @@ GetEggFrontpic: ; 17224 (5:7224)
ld hl, BattleMonDVs
predef GetUnownLetter
pop de
predef_jump GetFrontpic
predef_jump GetMonFrontpic
GetHatchlingFrontpic: ; 1723c (5:723c)
push de
@ -659,7 +659,7 @@ GetHatchlingFrontpic: ; 1723c (5:723c)
ld hl, BattleMonDVs
predef GetUnownLetter
pop de
predef_jump FrontpicPredef
predef_jump GetAnimatedFrontpicPredef
Hatch_UpdateFrontpicBGMapCenter: ; 17254 (5:7254)
push af

View File

@ -315,7 +315,7 @@ Function81adb: ; 81adb
hlcoord 12, 3
call _PrepMonFrontpic
ld de, VTiles2 tile $31
predef GetBackpic
predef GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 2, 4

View File

@ -5,10 +5,10 @@ HDMATransferAttrMapAndTileMapToWRAMBank3:: ; 104000
.Function:
decoord 0, 0, AttrMap
ld hl, wScratchAttrMap
call CutAndPasteAttrMap
call PadAttrMapForHDMATransfer
decoord 0, 0
ld hl, wScratchTileMap
call CutAndPasteTilemap
call PadTilemapForHDMATransfer
ld a, $0
ld [rVBK], a
ld hl, wScratchTileMap
@ -27,7 +27,7 @@ HDMATransferTileMapToWRAMBank3:: ; 10402d
.Function:
decoord 0, 0
ld hl, wScratchTileMap
call CutAndPasteTilemap
call PadTilemapForHDMATransfer
ld a, $0
ld [rVBK], a
ld hl, wScratchTileMap
@ -42,7 +42,7 @@ HDMATransferAttrMapToWRAMBank3: ; 104047
.Function:
decoord 0, 0, AttrMap
ld hl, wScratchAttrMap
call CutAndPasteAttrMap
call PadAttrMapForHDMATransfer
ld a, $1
ld [rVBK], a
ld hl, wScratchAttrMap
@ -57,10 +57,10 @@ ReloadMapPart:: ; 104061
.Function:
decoord 0, 0, AttrMap
ld hl, wScratchAttrMap
call CutAndPasteAttrMap
call PadAttrMapForHDMATransfer
decoord 0, 0
ld hl, wScratchTileMap
call CutAndPasteTilemap
call PadTilemapForHDMATransfer
call DelayFrame
di
@ -88,10 +88,10 @@ Mobile_ReloadMapPart: ; 104099
.Function:
decoord 0, 0, AttrMap
ld hl, wScratchAttrMap
call CutAndPasteAttrMap
call PadAttrMapForHDMATransfer
decoord 0, 0
ld hl, wScratchTileMap
call CutAndPasteTilemap
call PadTilemapForHDMATransfer
call DelayFrame
di
@ -161,10 +161,10 @@ OpenAndCloseMenu_HDMATransferTileMapAndAttrMap:: ; 104110
; Fill vBGTiles with " "
decoord 0, 0, AttrMap
ld hl, wScratchAttrMap
call CutAndPasteAttrMap
call PadAttrMapForHDMATransfer
decoord 0, 0
ld hl, wScratchTileMap
call CutAndPasteTilemap
call PadTilemapForHDMATransfer
call DelayFrame
di
@ -194,11 +194,11 @@ Mobile_OpenAndCloseMenu_HDMATransferTileMapAndAttrMap: ; 104148 (41:4148)
; Fill vBGTiles with $ff
decoord 0, 0, AttrMap
ld hl, wScratchAttrMap
call CutAndPasteAttrMap
call PadAttrMapForHDMATransfer
ld c, $ff
decoord 0, 0
ld hl, wScratchTileMap
call CutAndPasteMap
call PadMapForHDMATransfer
ld a, $1
ld [rVBK], a
@ -422,15 +422,16 @@ _LoadHDMAParameters: ; 10424e (41:424e)
ld [rHDMA4], a
ret
CutAndPasteTilemap: ; 10425f (41:425f)
PadTilemapForHDMATransfer: ; 10425f (41:425f)
ld c, " "
jr CutAndPasteMap
jr PadMapForHDMATransfer
CutAndPasteAttrMap: ; 104263 (41:4263)
PadAttrMapForHDMATransfer: ; 104263 (41:4263)
ld c, $0
CutAndPasteMap: ; 104265 (41:4265)
; back up the value of c to hMapObjectIndexBuffer
PadMapForHDMATransfer: ; 104265 (41:4265)
; pad a 20x18 map to 32x18 for HDMA transfer
; back up the padding value in c to hMapObjectIndexBuffer
ld a, [hMapObjectIndexBuffer]
push af
ld a, c
@ -449,7 +450,7 @@ CutAndPasteMap: ; 104265 (41:4265)
dec b
jr nz, .loop2
; load the original value of c into hl 12 times
; load the original padding value of c into hl for 32 - 20 = 12 rows
ld a, [hMapObjectIndexBuffer]
ld b, BG_MAP_WIDTH - SCREEN_WIDTH
.loop3

View File

@ -168,7 +168,7 @@ EvolutionAnimation: ; 4e5e1
ld a, $1
ld [wBoxAlignment], a
ld de, VTiles2
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
xor a
ld [wBoxAlignment], a
ret

View File

@ -2403,7 +2403,7 @@ Pokedex_LoadSelectedMonTiles: ; 4143b
ld [CurPartySpecies], a
call GetBaseData
ld de, VTiles2
predef GetFrontpic
predef GetMonFrontpic
ret
.QuestionMark:
@ -2556,7 +2556,7 @@ Pokedex_LoadUnownFrontpicTiles: ; 41a58 (10:5a58)
ld [CurPartySpecies], a
call GetBaseData
ld de, VTiles2 tile $00
predef GetFrontpic
predef GetMonFrontpic
pop af
ld [UnownLetter], a
ret
@ -2586,7 +2586,7 @@ _NewPokedexEntry: ; 41a7f
call WaitBGMap
call GetBaseData
ld de, VTiles2
predef GetFrontpic
predef GetMonFrontpic
ld a, SCGB_POKEDEX
call Pokedex_GetSGBLayout
ld a, [CurPartySpecies]

View File

@ -12,7 +12,7 @@ Pokepic:: ; 244e3
ld [CurSpecies], a
call GetBaseData
ld de, VTiles1
predef GetFrontpic
predef GetMonFrontpic
ld a, [wMenuBorderTopCoord]
inc a
ld b, a

View File

@ -54,8 +54,8 @@ PredefPointers:: ; 856b
add_predef UpdateEnemyHUD
add_predef StartBattle
add_predef FillInExpBar
add_predef GetMonBackpic ; $18
add_predef GetMonFrontpic
add_predef GetBattleMonBackpic ; $18
add_predef GetEnemyMonFrontpic
add_predef LearnLevelMoves
add_predef FillMoves
add_predef EvolveAfterBattle
@ -90,9 +90,9 @@ PredefPointers:: ; 856b
add_predef Predef39
add_predef Predef3A
add_predef PartyMonItemName
add_predef GetFrontpic
add_predef GetBackpic
add_predef FrontpicPredef
add_predef GetMonFrontpic
add_predef GetMonBackpic
add_predef GetAnimatedFrontpicPredef
add_predef GetTrainerPic
add_predef DecompressPredef ; $40
add_predef CheckTypeMatchup

View File

@ -866,7 +866,7 @@ StatsScreen_PlaceFrontpic: ; 4e226 (13:6226)
ret c
call StatsScreen_LoadTextBoxSpaceGFX
ld de, VTiles2 tile $00
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
hlcoord 0, 0
ld d, $0
ld e, ANIM_MON_MENU
@ -1071,7 +1071,7 @@ StatsScreen_AnimateEgg: ; 4e497 (13:6497)
ld [wBoxAlignment], a
call StatsScreen_LoadTextBoxSpaceGFX
ld de, VTiles2 tile $00
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
pop de
hlcoord 0, 0
ld d, $0

View File

@ -877,7 +877,7 @@ TradeAnim_GetFrontpic: ; 29491
ld [CurSpecies], a
call GetBaseData
pop de
predef GetFrontpic
predef GetMonFrontpic
ret
; 294a9

View File

@ -10,7 +10,7 @@ GetTrademonFrontpic: ; 4d7fd
ld [CurSpecies], a
call GetBaseData
pop de
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
ret
AnimateTrademonFrontpic: ; 4d81e

View File

@ -250,7 +250,7 @@ AnimateHOFMonEntrance: ; 865b5
ld a, " "
call ByteFill
ld de, VTiles2 tile $31
predef GetBackpic
predef GetMonBackpic
ld a, $31
ld [hGraphicStartTile], a
hlcoord 6, 6

View File

@ -140,7 +140,7 @@ UnownPrinter: ; 16be4
xor a
ld [wBoxAlignment], a
ld de, VTiles2
predef GetFrontpic
predef GetMonFrontpic
call .Load2bppToSRAM
hlcoord 1, 6
xor a

View File

@ -48,7 +48,7 @@ GetUnownLetter: ; 51040
ld [UnownLetter], a
ret
GetFrontpic: ; 51077
GetMonFrontpic: ; 51077
ld a, [CurPartySpecies]
ld [CurSpecies], a
call IsAPokemon
@ -60,7 +60,7 @@ GetFrontpic: ; 51077
ld [rSVBK], a
ret
FrontpicPredef: ; 5108b
GetAnimatedFrontpicPredef: ; 5108b
ld a, [CurPartySpecies]
ld [CurSpecies], a
call IsAPokemon
@ -195,7 +195,7 @@ LoadFrontpicTiles: ; 5114f
jr nz, .loop
ret
GetBackpic: ; 5116c
GetMonBackpic: ; 5116c
ld a, [CurPartySpecies]
call IsAPokemon
ret c

View File

@ -1121,7 +1121,7 @@ HOF_AnimateFrontpic: ; d066e Predef 49
push bc
push hl
ld de, VTiles2
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
pop hl
pop bc
ld d, 0

View File

@ -1075,7 +1075,7 @@ _PrepMonFrontpic:: ; 378b
push hl
ld de, VTiles2
predef GetFrontpic
predef GetMonFrontpic
pop hl
xor a
ld [hGraphicStartTile], a

View File

@ -197,13 +197,13 @@ _ReturnToBattle_UseBall: ; 2715c
ld a, [BattleType]
cp BATTLETYPE_TUTORIAL
jr z, .gettutorialbackpic
farcall GetMonBackpic
farcall GetBattleMonBackpic
jr .continue
.gettutorialbackpic
farcall GetTrainerBackpic
.continue
farcall GetMonFrontpic
farcall GetEnemyMonFrontpic
farcall _LoadBattleFontsHPBar
call GetMemSGBLayout
call CloseWindow

View File

@ -296,7 +296,7 @@ MobileTradeAnim_GetFrontpic: ; 1081e9
ld [CurSpecies], a
call GetBaseData
pop de
predef GetFrontpic
predef GetMonFrontpic
ret
; 108201
@ -309,7 +309,7 @@ Function108201: ; 108201
ld [CurSpecies], a
call GetBaseData
pop de
predef FrontpicPredef
predef GetAnimatedFrontpicPredef
ret
; 108219