summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rwxr-xr-xengine/breeding/egg.asm2
-rwxr-xr-xengine/link.asm28
-rwxr-xr-xengine/mail.asm190
-rwxr-xr-xengine/mart.asm2
-rwxr-xr-xengine/pokecenter_pc.asm10
-rw-r--r--engine/save.asm12
-rwxr-xr-xengine/selectmenu.asm2
-rw-r--r--engine/specials.asm16
-rwxr-xr-xengine/startmenu.asm71
-rwxr-xr-xengine/trainer_card.asm90
10 files changed, 311 insertions, 112 deletions
diff --git a/engine/breeding/egg.asm b/engine/breeding/egg.asm
index 8798233a1..f007fde6a 100755
--- a/engine/breeding/egg.asm
+++ b/engine/breeding/egg.asm
@@ -192,7 +192,7 @@ OverworldHatchEgg:: ; 16f5e
call ResetWindow
call LoadStandardMenuDataHeader
call Function16f70
- call Function2b4d
+ call ExitAllMenus
call RestartMapMusic
jp LoadMoveSprites
; 16f70
diff --git a/engine/link.asm b/engine/link.asm
index 27a9ebcc4..6d6e0f403 100755
--- a/engine/link.asm
+++ b/engine/link.asm
@@ -834,9 +834,9 @@ Function28595: ; 28595
ld de, wc9f4
ld a, $20
call Function28682
- ld a, BANK(sPartyScratch1)
+ ld a, BANK(sPartyMail)
call GetSRAMBank
- ld hl, sPartyScratch1
+ ld hl, sPartyMail
ld b, PARTY_LENGTH
.loop2
push bc
@@ -847,7 +847,7 @@ Function28595: ; 28595
pop bc
dec b
jr nz, .loop2
- ld hl, sPartyScratch1
+ ld hl, sPartyMail
ld b, PARTY_LENGTH
.loop3
push bc
@@ -859,7 +859,7 @@ Function28595: ; 28595
dec b
jr nz, .loop3
ld b, PARTY_LENGTH
- ld de, sPartyScratch1
+ ld de, sPartyMail
ld hl, wc9f9
.loop4
push bc
@@ -883,7 +883,7 @@ Function28595: ; 28595
.next
pop de
- ld hl, SCRATCHMON_STRUCT_LENGTH
+ ld hl, MAIL_STRUCT_LENGTH
add hl, de
ld d, h
ld e, l
@@ -1744,15 +1744,15 @@ Function28b87: ; 28b87
jp Function28ea3
.asm_28c7b
- ld hl, sPartyScratch1
+ ld hl, sPartyMail
ld a, [wd002]
- ld bc, SCRATCHMON_STRUCT_LENGTH
+ ld bc, MAIL_STRUCT_LENGTH
call AddNTimes
- ld a, BANK(sPartyScratch1)
+ ld a, BANK(sPartyMail)
call GetSRAMBank
ld d, h
ld e, l
- ld bc, SCRATCHMON_STRUCT_LENGTH
+ ld bc, MAIL_STRUCT_LENGTH
add hl, bc
ld a, [wd002]
ld c, a
@@ -1762,24 +1762,24 @@ Function28b87: ; 28b87
cp $6
jr z, .asm_28ca6
push bc
- ld bc, SCRATCHMON_STRUCT_LENGTH
+ ld bc, MAIL_STRUCT_LENGTH
call CopyBytes
pop bc
jr .asm_28c96
.asm_28ca6
- ld hl, sPartyScratch1
+ ld hl, sPartyMail
ld a, [PartyCount]
dec a
- ld bc, SCRATCHMON_STRUCT_LENGTH
+ ld bc, MAIL_STRUCT_LENGTH
call AddNTimes
push hl
ld hl, wc9f4
ld a, [wd003]
- ld bc, SCRATCHMON_STRUCT_LENGTH
+ ld bc, MAIL_STRUCT_LENGTH
call AddNTimes
pop de
- ld bc, SCRATCHMON_STRUCT_LENGTH
+ ld bc, MAIL_STRUCT_LENGTH
call CopyBytes
call CloseSRAM
ld hl, PlayerName
diff --git a/engine/mail.asm b/engine/mail.asm
new file mode 100755
index 000000000..e3b7a5fab
--- /dev/null
+++ b/engine/mail.asm
@@ -0,0 +1,190 @@
+SendMailToPC: ; 4456e
+ ld a, MON_ITEM
+ call GetPartyParamLocation
+ ld d, [hl]
+ callba ItemIsMail
+ jr nc, .full
+ call GetMailboxCount
+ cp MAILBOX_CAPACITY
+ jr nc, .full
+ ld bc, MAIL_STRUCT_LENGTH
+ ld hl, sMailbox
+ call AddNTimes
+ ld d, h
+ ld e, l
+ ld a, [CurPartyMon]
+ ld bc, MAIL_STRUCT_LENGTH
+ ld hl, sPartyMail
+ call AddNTimes
+ push hl
+ ld a, BANK(sMailboxCount)
+ call GetSRAMBank
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+ pop hl
+ xor a
+ ld bc, MAIL_STRUCT_LENGTH
+ call ByteFill
+ ld a, MON_ITEM
+ call GetPartyParamLocation
+ ld [hl], $0
+ ld hl, sMailboxCount
+ inc [hl]
+ call CloseSRAM
+ xor a
+ ret
+
+.full
+ scf
+ ret
+; 445c0
+
+Function445c0: ; 445c0 (11:45c0)
+ ld a, BANK(sMailboxCount)
+ call GetSRAMBank
+ ld a, b
+ push bc
+ ld hl, sMailbox
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ push hl
+ add hl, bc
+ pop de
+ pop bc
+.loop
+ ld a, b
+ cp $9
+ jr z, .done
+ push bc
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+ pop bc
+ inc b
+ jr .loop
+.done
+ ld h, d
+ ld l, e
+ xor a
+ ld bc, MAIL_STRUCT_LENGTH
+ call ByteFill
+ ld hl, sMailboxCount
+ dec [hl]
+ jp CloseSRAM
+; 445f4 (11:45f4)
+
+ReadMailMessage: ; 445f4
+ ld a, b
+ ld hl, sMailbox
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ ld d, h
+ ld e, l
+ callba ReadAnyMail
+ ret
+
+Function44607: ; 44607
+ ld a, BANK(sMailboxCount)
+ call GetSRAMBank
+ push bc
+ ld a, b
+ ld bc, MAIL_STRUCT_LENGTH
+ ld hl, sMailbox
+ call AddNTimes
+ push hl
+ ld a, [CurPartyMon]
+ ld bc, MAIL_STRUCT_LENGTH
+ ld hl, sPartyMail
+ call AddNTimes
+ ld d, h
+ ld e, l
+ pop hl
+ push hl
+ ld bc, MAIL_STRUCT_LENGTH
+ call CopyBytes
+ pop hl
+ ld de, PARTYMON_STRUCT_LENGTH - MON_MOVES
+ add hl, de
+ ld d, [hl]
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1Item
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ ld [hl], d
+ call CloseSRAM
+ pop bc
+ jp Function445c0
+; 44648 (11:4648)
+
+GetMailboxCount: ; 44648
+ ld a, BANK(sMailboxCount)
+ call GetSRAMBank
+ ld a, [sMailboxCount]
+ ld c, a
+ jp CloseSRAM
+; 44654
+
+Function44654:: ; 44654
+ push bc
+ push de
+ callba SelectMonFromParty
+ ld a, $2
+ jr c, .asm_446c6
+ ld a, [CurPartyMon]
+ ld hl, PartyMon1Item
+ ld bc, PARTYMON_STRUCT_LENGTH
+ call AddNTimes
+ ld d, [hl]
+ callba ItemIsMail
+ ld a, $3
+ jr nc, .asm_446c6
+ ld a, BANK(sPartyMail)
+ call GetSRAMBank
+ ld a, [CurPartyMon]
+ ld hl, sPartyMail
+ ld bc, MAIL_STRUCT_LENGTH
+ call AddNTimes
+ ld d, h
+ ld e, l
+ pop hl
+ pop bc
+
+ ld a, $20
+ ld [wd265], a
+.asm_44691
+ ld a, [de]
+ ld c, a
+ ld a, b
+ call GetFarByte
+ cp "@"
+ jr z, .asm_446ab
+ cp c
+ ld a, $0
+ jr nz, .asm_446c1
+ inc hl
+ inc de
+ ld a, [wd265]
+ dec a
+ ld [wd265], a
+ jr nz, .asm_44691
+
+.asm_446ab
+ callba CheckCurPartyMonFainted
+ ld a, $4
+ jr c, .asm_446c1
+ xor a
+ ld [wPokemonWithdrawDepositParameter], a
+ callba Functione039
+ ld a, $1
+
+.asm_446c1
+ call CloseSRAM
+ jr .asm_446c8
+
+.asm_446c6
+ pop de
+ pop bc
+
+.asm_446c8
+ ld [ScriptVar], a
+ ret
+; 446cc
diff --git a/engine/mart.asm b/engine/mart.asm
index 8fa7888c2..2aa410760 100755
--- a/engine/mart.asm
+++ b/engine/mart.asm
@@ -377,7 +377,7 @@ BuyMenu: ; 15c62
.loop
call BuyMenuLoop ; menu loop
jr nc, .loop
- call Function2b3c
+ call ReturnToCallingMenu
ret
; 15c7d
diff --git a/engine/pokecenter_pc.asm b/engine/pokecenter_pc.asm
index 7d76d07d3..4d31109ac 100755
--- a/engine/pokecenter_pc.asm
+++ b/engine/pokecenter_pc.asm
@@ -140,7 +140,7 @@ HallOfFamePC: ; 1569a
call PC_PlayChoosePCSound
call FadeToMenu
callba _HallOfFamePC
- call Function2b3c
+ call ReturnToCallingMenu
and a
ret
; 156ab
@@ -323,7 +323,7 @@ KrisWithdrawItemMenu: ; 0x157d1
jr .asm_157da
.asm_157e4
- call Function2b3c
+ call ReturnToCallingMenu
xor a
ret
; 0x157e9
@@ -403,7 +403,7 @@ KrisTossItemMenu: ; 0x1585f
jr .asm_15868
.asm_15878
- call Function2b3c
+ call ReturnToCallingMenu
xor a
ret
; 0x1587d
@@ -442,7 +442,7 @@ KrisDepositItemMenu: ; 0x1588b
jr .asm_1589c
.asm_158b3
- call Function2b3c
+ call ReturnToCallingMenu
.asm_158b6
xor a
@@ -450,7 +450,7 @@ KrisDepositItemMenu: ; 0x1588b
; 0x158b8
Function158b8: ; 0x158b8
- callba Function129d5
+ callba HasNoItems
ret nc
ld hl, UnknownText_0x158c7
call MenuTextBoxBackup
diff --git a/engine/save.asm b/engine/save.asm
index 8bccd932c..4c20c83a4 100644
--- a/engine/save.asm
+++ b/engine/save.asm
@@ -1,4 +1,4 @@
-Function14a1a: ; 14a1a
+SaveMenu: ; 14a1a
call LoadStandardMenuDataHeader
callba Function5e9a
call SpeechTextBox
@@ -30,7 +30,7 @@ Function14a58: ; 14a58
call Function14e13
call SaveBackupPokemonData
call SaveBackupChecksum
- callba BackupScratchmons
+ callba BackupPartyMonMail
callba Function1406a
call ClearWRAMStateAfterSave
ret
@@ -106,7 +106,7 @@ Function14ad5: ; 14ad5
call SaveBackupPlayerData
call SaveBackupPokemonData
call SaveBackupChecksum
- callba BackupScratchmons
+ callba BackupPartyMonMail
callba BackupMobileEventIndex
callba Function1406a
call LoadBox
@@ -284,7 +284,7 @@ SaveGameData_: ; 14c10
call SaveBackupPokemonData
call SaveBackupChecksum
call UpdateStackTop
- callba BackupScratchmons
+ callba BackupPartyMonMail
callba BackupMobileEventIndex
callba Function1406a
ld a, BANK(s1_be45)
@@ -630,7 +630,7 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
call LoadPlayerData
call LoadPokemonData
call LoadBox
- callba RestoreScratchmons
+ callba RestorePartyMonMail
callba RestoreMobileEventIndex
callba Function1050ea
call ValidateBackupSave
@@ -647,7 +647,7 @@ TryLoadSaveFile: ; 14ea5 (5:4ea5)
call LoadBackupPlayerData
call LoadBackupPokemonData
call LoadBox
- callba RestoreScratchmons
+ callba RestorePartyMonMail
callba RestoreMobileEventIndex
callba Function1050ea
call ValidateSave
diff --git a/engine/selectmenu.asm b/engine/selectmenu.asm
index e73f397a5..916e48b3c 100755
--- a/engine/selectmenu.asm
+++ b/engine/selectmenu.asm
@@ -158,7 +158,7 @@ UseRegisteredItem: ; 133c3
call ResetWindow
call FadeToMenu
call DoItemEffect
- call Function2b3c
+ call ReturnToCallingMenu
call LoadMoveSprites
and a
ret
diff --git a/engine/specials.asm b/engine/specials.asm
index 82281d600..68ad47aa4 100644
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -216,7 +216,7 @@ Special_GameCornerPrizeMonCheckDex: ; c230
ld a, [ScriptVar]
ld [wd265], a
callba Functionfb877
- call Function2b4d
+ call ExitAllMenus
ret
; c252
@@ -288,21 +288,21 @@ SpecialNameRater: ; c2b9
Special_TownMap: ; c2c0
call FadeToMenu
callba _TownMap
- call Function2b4d
+ call ExitAllMenus
ret
; c2cd
Special_UnownPrinter: ; c2cd
call FadeToMenu
callba UnownPrinter
- call Function2b4d
+ call ExitAllMenus
ret
; c2da
Special_DisplayLinkRecord: ; c2da
call FadeToMenu
callba DisplayLinkRecord
- call Function2b4d
+ call ExitAllMenus
ret
; c2e7
@@ -383,7 +383,7 @@ Special_UnownPuzzle: ; c360
callba Functione1190
ld a, [wd0ec]
ld [ScriptVar], a
- call Function2b4d
+ call ExitAllMenus
ret
; c373
@@ -425,7 +425,7 @@ Special_StartGameCornerGame: ; c39a
ld l, a
pop af
rst FarCall
- call Function2b4d
+ call ExitAllMenus
ret
; c3ae
@@ -629,14 +629,14 @@ Special_FadeOutMusic: ; c48f
Diploma: ; c49f
call FadeToMenu
callba _Diploma
- call Function2b4d
+ call ExitAllMenus
ret
; c4ac
PrintDiploma: ; c4ac
call FadeToMenu
callba _PrintDiploma
- call Function2b4d
+ call ExitAllMenus
ret
; c4b9
diff --git a/engine/startmenu.asm b/engine/startmenu.asm
index efb6c817a..ae6358014 100755
--- a/engine/startmenu.asm
+++ b/engine/startmenu.asm
@@ -422,7 +422,7 @@ StartMenu_Quit: ; 128f0
; Retire from the bug catching contest.
ld hl, .EndTheContestText
- call Function12cf5
+ call StartMenuYesNo
jr c, .DontEndContest
ld a, BANK(BugCatchingContestReturnToGateScript)
ld hl, BugCatchingContestReturnToGateScript
@@ -444,7 +444,7 @@ StartMenu_Save: ; 1290b
; Save the game.
call BufferScreen
- callba Function14a1a
+ callba SaveMenu
jr nc, .asm_12919
ld a, 0
ret
@@ -468,8 +468,8 @@ StartMenu_Status: ; 12928
; Player status.
call FadeToMenu
- callba Function25105
- call Function2b3c
+ callba TrainerCard
+ call ReturnToCallingMenu
ld a, 0
ret
; 12937
@@ -483,7 +483,7 @@ StartMenu_Pokedex: ; 12937
call FadeToMenu
callba Pokedex
- call Function2b3c
+ call ReturnToCallingMenu
.asm_12949
ld a, 0
@@ -495,7 +495,7 @@ StartMenu_Pokegear: ; 1294c
call FadeToMenu
callba PokeGear
- call Function2b3c
+ call ReturnToCallingMenu
ld a, 0
ret
; 1295b
@@ -507,12 +507,13 @@ StartMenu_Pack: ; 1295b
callba Pack
ld a, [wcf66]
and a
- jr nz, .asm_12970
- call Function2b3c
+ jr nz, .used_item
+ call ReturnToCallingMenu
ld a, 0
ret
-.asm_12970
- call Function2b4d
+
+.used_item
+ call ExitAllMenus
ld a, 4
ret
; 12976
@@ -556,19 +557,19 @@ StartMenu_Pokemon: ; 12976
jr z, .quit
.return
- call Function2b3c
+ call ReturnToCallingMenu
ld a, 0
ret
.quit
ld a, b
push af
- call Function2b4d
+ call ExitAllMenus
pop af
ret
; 129d5
-Function129d5: ; 129d5
+HasNoItems: ; 129d5
ld a, [NumItems]
and a
ret nz
@@ -580,15 +581,15 @@ Function129d5: ; 129d5
ret nz
ld hl, TMsHMs
ld b, NUM_TMS + NUM_HMS
-.asm_129e9
+.loop
ld a, [hli]
and a
- jr nz, .asm_129f2
+ jr nz, .done
dec b
- jr nz, .asm_129e9
+ jr nz, .loop
scf
ret
-.asm_129f2
+.done
and a
ret
@@ -882,7 +883,7 @@ Function12bd9: ; 12bd9
jr .asm_12c08
.asm_12bf4
- call Function12cea
+ call GiveItemToPokemon
ld hl, MadeHoldText
call MenuTextBoxBackup
call GivePartyItem
@@ -897,17 +898,17 @@ Function12bd9: ; 12bd9
ld [wd265], a
call GetItemName
ld hl, SwitchAlreadyHoldingText
- call Function12cf5
+ call StartMenuYesNo
jr c, .asm_12c4b
- call Function12cea
+ call GiveItemToPokemon
ld a, [wd265]
push af
ld a, [CurItem]
ld [wd265], a
pop af
ld [CurItem], a
- call Function12cdf
+ call ReceiveItemFromPokemon
jr nc, .asm_12c3c
ld hl, TookAndMadeHoldText
@@ -920,7 +921,7 @@ Function12bd9: ; 12bd9
.asm_12c3c
ld a, [wd265]
ld [CurItem], a
- call Function12cdf
+ call ReceiveItemFromPokemon
ld hl, ItemStorageIsFullText
call MenuTextBoxBackup
@@ -953,7 +954,7 @@ TakePartyItem: ; 12c60
jr z, .asm_12c8c
ld [CurItem], a
- call Function12cdf
+ call ReceiveItemFromPokemon
jr nc, .asm_12c94
callba ItemIsMail
@@ -1045,7 +1046,7 @@ GetPartyItemLocation: ; 12cd7
; 12cdf
-Function12cdf: ; 12cdf
+ReceiveItemFromPokemon: ; 12cdf
ld a, $1
ld [wItemQuantityChangeBuffer], a
ld hl, NumItems
@@ -1053,13 +1054,13 @@ Function12cdf: ; 12cdf
; 12cea
-Function12cea: ; 12cea (4:6cea)
+GiveItemToPokemon: ; 12cea (4:6cea)
ld a, $1
ld [wItemQuantityChangeBuffer], a
ld hl, NumItems
jp TossItem
-Function12cf5: ; 12cf5
+StartMenuYesNo: ; 12cf5
call MenuTextBox
call YesNoBox
jp ExitMenu
@@ -1071,7 +1072,7 @@ Function12cfe: ; 12cfe (4:6cfe)
callba Function11e75
ld hl, PlayerName
ld de, wd023
- ld bc, $a
+ ld bc, NAME_LENGTH - 1
call CopyBytes
ld hl, PlayerID
ld bc, $2
@@ -1082,14 +1083,14 @@ Function12cfe: ; 12cfe (4:6cfe)
ld a, [CurItem]
ld [de], a
ld a, [CurPartyMon]
- ld hl, sPartyScratch1
- ld bc, SCRATCHMON_STRUCT_LENGTH
+ ld hl, sPartyMail
+ ld bc, MAIL_STRUCT_LENGTH
call AddNTimes
ld d, h
ld e, l
ld hl, wd002
- ld bc, SCRATCHMON_STRUCT_LENGTH
- ld a, BANK(sPartyScratch1)
+ ld bc, MAIL_STRUCT_LENGTH
+ ld a, BANK(sPartyMail)
call GetSRAMBank
call CopyBytes
call CloseSRAM
@@ -1127,11 +1128,11 @@ MonMailAction: ; 12d45
.take
ld hl, .sendmailtopctext
- call Function12cf5
+ call StartMenuYesNo
jr c, .RemoveMailToBag
ld a, [CurPartyMon]
ld b, a
- callba Function4456e
+ callba SendMailToPC
jr c, .MailboxFull
ld hl, .sentmailtopctext
call MenuTextBoxBackup
@@ -1144,12 +1145,12 @@ MonMailAction: ; 12d45
.RemoveMailToBag
ld hl, .mailwilllosemessagetext
- call Function12cf5
+ call StartMenuYesNo
jr c, .done
call GetPartyItemLocation
ld a, [hl]
ld [CurItem], a
- call Function12cdf
+ call ReceiveItemFromPokemon
jr nc, .BagIsFull
call GetPartyItemLocation
ld [hl], $0
diff --git a/engine/trainer_card.asm b/engine/trainer_card.asm
index 53acdbf53..076e13fec 100755
--- a/engine/trainer_card.asm
+++ b/engine/trainer_card.asm
@@ -1,4 +1,4 @@
-Function25105: ; 25105
+TrainerCard: ; 25105
ld a, [VramState]
push af
xor a
@@ -211,16 +211,18 @@ Function25279: ; 25279 (9:5279)
ld hl, hJoyLast
ld a, [hl]
and D_LEFT
- jr nz, .asm_2528d
+ jr nz, .left
ld a, [hl]
and D_RIGHT
- jr nz, .asm_25293
+ jr nz, .right
ret
-.asm_2528d
+
+.left
ld a, $2
ld [wJumptableIndex], a
ret
-.asm_25293
+
+.right
ld a, $0
ld [wJumptableIndex], a
ret
@@ -466,24 +468,26 @@ Function25438: ; 25438 (9:5438)
jr Function25448
Function25448: ; 25448 (9:5448)
+; copy flag array pointer
ld a, [hli]
ld e, a
ld a, [hli]
+; get flag array
ld d, a
ld a, [de]
ld c, a
ld de, Sprites
ld b, 8
-.asm_25453
+.loop
srl c
push bc
- jr nc, .asm_25472
+ jr nc, .skip_badge
push hl
- ld a, [hli]
+ ld a, [hli] ; y
ld b, a
- ld a, [hli]
+ ld a, [hli] ; x
ld c, a
- ld a, [hli]
+ ld a, [hli] ; pal
ld [wcf66], a
ld a, [wcf64]
add l
@@ -495,60 +499,64 @@ Function25448: ; 25448 (9:5448)
ld [wcf65], a
call Function2547b
pop hl
-.asm_25472
- ld bc, $b
+.skip_badge
+ ld bc, $b ; 3 + 2 * 4
add hl, bc
pop bc
dec b
- jr nz, .asm_25453
+ jr nz, .loop
ret
Function2547b: ; 2547b (9:547b)
ld a, [wcf65]
and $80
- jr nz, .asm_25487
- ld hl, Unknown_254a7
- jr .asm_2548a
-.asm_25487
- ld hl, Unknown_254b8
-.asm_2548a
+ jr nz, .xflip
+ ld hl, .facing1
+ jr .loop
+.xflip
+ ld hl, .facing2
+.loop
ld a, [hli]
cp $ff
ret z
add b
ld [de], a
inc de
+
ld a, [hli]
add c
ld [de], a
inc de
+
ld a, [wcf65]
and $7f
add [hl]
ld [de], a
inc hl
inc de
+
ld a, [wcf66]
add [hl]
ld [de], a
inc hl
inc de
- jr .asm_2548a
+ jr .loop
; 254a7 (9:54a7)
-Unknown_254a7: ; 254a7
- db $00, $00, $00, $00
- db $00, $08, $01, $00
- db $08, $00, $02, $00
- db $08, $08, $03, $00
- db $ff
-
-Unknown_254b8: ; 254b8
- db $00, $00, $01, $20
- db $00, $08, $00, $20
- db $08, $00, $03, $20
- db $08, $08, $02, $20
- db $ff
+.facing1: ; 254a7
+ ; y, x, tile, OAM attributes
+ db 0, 0, 0, 0
+ db 0, 8, 1, 0
+ db 8, 0, 2, 0
+ db 8, 8, 3, 0
+ db -1
+
+.facing2: ; 254b8
+ db 0, 0, 1, X_FLIP
+ db 0, 8, 0, X_FLIP
+ db 8, 0, 3, X_FLIP
+ db 8, 8, 2, X_FLIP
+ db -1
Unknown_254c9: ; 254c9
; Template OAM data for each badge on the trainer card.
@@ -560,43 +568,43 @@ Unknown_254c9: ; 254c9
dw JohtoBadges
; Zephyrbadge
- db $68, $18, $00
+ db $68, $18, 0
db $00, $20, $24, $20 | $80
db $00, $20, $24, $20 | $80
; Hivebadge
- db $68, $38, $00
+ db $68, $38, 0
db $04, $20, $24, $20 | $80
db $04, $20, $24, $20 | $80
; Plainbadge
- db $68, $58, $00
+ db $68, $58, 0
db $08, $20, $24, $20 | $80
db $08, $20, $24, $20 | $80
; Fogbadge
- db $68, $78, $00
+ db $68, $78, 0
db $0c, $20, $24, $20 | $80
db $0c, $20, $24, $20 | $80
; Mineralbadge
- db $80, $38, $00
+ db $80, $38, 0
db $10, $20, $24, $20 | $80
db $10, $20, $24, $20 | $80
; Stormbadge
- db $80, $18, $00
+ db $80, $18, 0
db $14, $20, $24, $20 | $80
db $14, $20, $24, $20 | $80
; Glacierbadge
- db $80, $58, $00
+ db $80, $58, 0
db $18, $20, $24, $20 | $80
db $18, $20, $24, $20 | $80
; Risingbadge
; X-flips on alternate cycles.
- db $80, $78, $00
+ db $80, $78, 0
db $1c, $20, $24, $20 | $80
db $1c | $80, $20, $24, $20 | $80
; 25523