More menu stuff

This commit is contained in:
PikalaxALT 2015-12-17 22:31:16 -05:00
parent fe4ef4e595
commit d644406f61
39 changed files with 764 additions and 763 deletions

View File

@ -5342,7 +5342,7 @@ BattleMenuPKMN_Loop:
callba FreezeMonIcons callba FreezeMonIcons
call .GetMenu call .GetMenu
jr c, .PressedB jr c, .PressedB
call Function1bee call PlaceHollowCursor
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
cp $1 ; SWITCH cp $1 ; SWITCH
jp z, TryPlayerSwitch jp z, TryPlayerSwitch

View File

@ -52,7 +52,7 @@ GiveOddEgg: ; 1fb4b6
ld a, 1 ld a, 1
ld [wItemQuantityChangeBuffer], a ld [wItemQuantityChangeBuffer], a
ld a, -1 ld a, -1
ld [ItemCountBuffer], a ld [CurItemQuantity], a
ld hl, NumItems ld hl, NumItems
call TossItem call TossItem

View File

@ -2323,7 +2323,7 @@ _ChangeBox: ; e35aa (38:75aa)
hlcoord 0, 4 hlcoord 0, 4
lb bc, 8, 9 lb bc, 8, 9
call TextBox call TextBox
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuJoypad] ld a, [wMenuJoypad]
cp B_BUTTON cp B_BUTTON
jr z, .done jr z, .done

View File

@ -11,16 +11,16 @@ _KrisDecorationMenu: ; 0x2675c
ld hl, .MenuDataHeader ld hl, .MenuDataHeader
call LoadMenuDataHeader call LoadMenuDataHeader
xor a xor a
ld [wd1ee], a ld [Buffer5], a
ld a, $1 ld a, $1
ld [wd1ef], a ld [Buffer6], a
.top_loop .top_loop
ld a, [wd1ef] ld a, [Buffer6]
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
call .FindCategoriesWithOwnedDecos call .FindCategoriesWithOwnedDecos
call DoNthMenu call DoNthMenu
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
ld [wd1ef], a ld [Buffer6], a
jr c, .exit_menu jr c, .exit_menu
ld a, [MenuSelection] ld a, [MenuSelection]
ld hl, .pointers ld hl, .pointers
@ -31,7 +31,7 @@ _KrisDecorationMenu: ; 0x2675c
call ExitMenu call ExitMenu
pop af pop af
ld [wcf76], a ld [wcf76], a
ld a, [wd1ee] ld a, [Buffer5]
ld c, a ld c, a
ret ret
; 0x2679a ; 0x2679a
@ -400,7 +400,7 @@ PopulateDecoCategoryMenu: ; 2695b
call InitScrollingMenu call InitScrollingMenu
xor a xor a
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuJoypad] ld a, [wMenuJoypad]
cp 2 cp 2
jr z, .no_action_2 jr z, .no_action_2
@ -803,7 +803,7 @@ DecoAction_TrySetItUp: ; 26d2d
call DecoAction_SetItUp call DecoAction_SetItUp
jr c, .failed jr c, .failed
ld a, 1 ld a, 1
ld [wd1ee], a ld [Buffer5], a
pop hl pop hl
ld a, [MenuSelection] ld a, [MenuSelection]
ld [hl], a ld [hl], a
@ -865,7 +865,7 @@ DecoAction_TryPutItAway: ; 26d86
jr z, .nothingthere jr z, .nothingthere
; Put it away. ; Put it away.
ld a, $1 ld a, $1
ld [wd1ee], a ld [Buffer5], a
ld a, [Buffer1] ld a, [Buffer1]
ld [MenuSelection], a ld [MenuSelection], a
ld hl, StringBuffer3 ld hl, StringBuffer3
@ -889,7 +889,7 @@ DecoAction_setupornament: ; 26db3
call DecoAction_SetItUp_Ornament call DecoAction_SetItUp_Ornament
jr c, .cancel jr c, .cancel
ld a, $1 ld a, $1
ld [wd1ee], a ld [Buffer5], a
jr DecoAction_FinishUp_Ornament jr DecoAction_FinishUp_Ornament
.cancel .cancel
@ -981,7 +981,7 @@ DecoAction_PutItAway_Ornament: ; 26e46
ld hl, StringBuffer3 ld hl, StringBuffer3
call GetDecorationName call GetDecorationName
ld a, $1 ld a, $1
ld [wd1ee], a ld [Buffer5], a
xor a xor a
ld [wd1ec], a ld [wd1ec], a
ld hl, DecoText_PutAwayTheDeco ld hl, DecoText_PutAwayTheDeco

View File

@ -545,7 +545,7 @@ Continue_LoadMenuHeader: ; 5ebf
ld hl, .MenuDataHeader_NoDex ld hl, .MenuDataHeader_NoDex
.pokedex_header .pokedex_header
call Function1e35 call _OffsetMenuDataHeader
call MenuBox call MenuBox
call PlaceVerticalMenuItems call PlaceVerticalMenuItems
ret ret

View File

@ -1271,7 +1271,7 @@ Function28835: ; 28835
jp nz, Function2891c jp nz, Function2891c
xor a xor a
ld [MonType], a ld [MonType], a
call Function1bf7 call HideCursor
push hl push hl
push bc push bc
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
@ -1333,7 +1333,7 @@ Function288c5: ; 288c5
jp nz, Function2891c jp nz, Function2891c
ld a, $1 ld a, $1
ld [MonType], a ld [MonType], a
call Function1bf7 call HideCursor
push hl push hl
push bc push bc
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
@ -1353,7 +1353,7 @@ Function288c5: ; 288c5
ld a, [PartyCount] ld a, [PartyCount]
cp b cp b
jr nz, Function2891c jr nz, Function2891c
call Function1bf7 call HideCursor
push hl push hl
push bc push bc
ld bc, NAME_LENGTH ld bc, NAME_LENGTH
@ -1463,7 +1463,7 @@ Function28926: ; 28926
jp Function2888b jp Function2888b
.asm_289fe .asm_289fe
call Function1bee call PlaceHollowCursor
pop af pop af
ld [wMenuCursorY], a ld [wMenuCursorY], a
dec a dec a
@ -1552,7 +1552,7 @@ Function28ac9: ; 28ac9
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
cp $1 cp $1
jp nz, Function2891c jp nz, Function2891c
call Function1bf7 call HideCursor
push hl push hl
push bc push bc
ld bc, NAME_LENGTH ld bc, NAME_LENGTH

View File

@ -399,7 +399,7 @@ MailboxPC: ; 0x44806
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [OBPals + 8 * 6] ld a, [OBPals + 8 * 6]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [OBPals + 8 * 6], a ld [OBPals + 8 * 6], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]

View File

@ -530,7 +530,7 @@ endr
Function4a098: ; 4a098 (12:6098) Function4a098: ; 4a098 (12:6098)
ld a, $2 ld a, $2
call MenuClickSound call MenuClickSound
call Function1bee call PlaceHollowCursor
call WaitBGMap call WaitBGMap
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
callba Function89de0 callba Function89de0
@ -749,7 +749,7 @@ Function4a28a: ; 4a28a (12:628a)
lb bc, 6, 1 lb bc, 6, 1
ld a, " " ld a, " "
call Function4a6d8 call Function4a6d8
call Function1bee call PlaceHollowCursor
call WaitBGMap call WaitBGMap
call LoadStandardMenuDataHeader call LoadStandardMenuDataHeader
ld a, $5 ld a, $5
@ -786,7 +786,7 @@ Function4a28a: ; 4a28a (12:628a)
scf scf
ret ret
.asm_4a2f0 .asm_4a2f0
call Function1bee call PlaceHollowCursor
ld hl, UnknownText_0x4a358 ld hl, UnknownText_0x4a358
call PrintText call PrintText
hlcoord 14, 7 hlcoord 14, 7

View File

@ -470,7 +470,7 @@ endr
BuyMenuLoop: ; 15cef BuyMenuLoop: ; 15cef
callba PlaceMoneyTopRightOW callba PlaceMoneyTopRight
call UpdateSprites call UpdateSprites
ld hl, MenuDataHeader_Buy ld hl, MenuDataHeader_Buy
call CopyMenuDataHeader call CopyMenuDataHeader
@ -478,7 +478,7 @@ BuyMenuLoop: ; 15cef
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wd045 + 1] ld a, [wd045 + 1]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wd045 + 1], a ld [wd045 + 1], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -875,7 +875,7 @@ Function15ee0: ; 15ee0
.okay_to_sell .okay_to_sell
ld hl, Text_Mart_SellHowMany ld hl, Text_Mart_SellHowMany
call PrintText call PrintText
callba PlaceMoneyTopRightMenu callba PlaceMoneyAtTopLeftOfTextbox
callba SelectQuantityToSell callba SelectQuantityToSell
call ExitMenu call ExitMenu
jr c, .declined jr c, .declined
@ -899,7 +899,7 @@ Function15ee0: ; 15ee0
ld hl, Text_Mart_SoldForAmount ld hl, Text_Mart_SoldForAmount
call PrintTextBoxText call PrintTextBoxText
call PlayTransactionSound call PlayTransactionSound
callba PlaceMoneyBottomLeftOW callba PlaceMoneyBottomLeft
call JoyWaitAorB call JoyWaitAorB
.declined .declined

View File

@ -69,7 +69,7 @@ Pack: ; 10000
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wItemsPocketScrollPosition] ld a, [wItemsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wItemsPocketScrollPosition], a ld [wItemsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -97,7 +97,7 @@ Pack: ; 10000
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wKeyItemsPocketScrollPosition] ld a, [wKeyItemsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wKeyItemsPocketScrollPosition], a ld [wKeyItemsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -230,7 +230,7 @@ Pack: ; 10000
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wBallsPocketScrollPosition] ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wBallsPocketScrollPosition], a ld [wBallsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -528,7 +528,7 @@ TossMenu: ; 10364
pop af pop af
jr c, .finish jr c, .finish
ld hl, NumItems ld hl, NumItems
ld a, [ItemCountBuffer] ld a, [CurItemQuantity]
call TossItem call TossItem
call Pack_GetItemName call Pack_GetItemName
ld hl, Text_ThrewAway ld hl, Text_ThrewAway
@ -577,7 +577,7 @@ RegisterItem: ; 103c2
rrca rrca
and $c0 and $c0
ld b, a ld b, a
ld a, [ItemCountBuffer] ld a, [CurItemQuantity]
inc a inc a
and $3f and $3f
or b or b
@ -734,7 +734,7 @@ BattlePack: ; 10493
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wItemsPocketScrollPosition] ld a, [wItemsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wItemsPocketScrollPosition], a ld [wItemsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -762,7 +762,7 @@ BattlePack: ; 10493
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wKeyItemsPocketScrollPosition] ld a, [wKeyItemsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wKeyItemsPocketScrollPosition], a ld [wKeyItemsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -813,7 +813,7 @@ BattlePack: ; 10493
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wBallsPocketScrollPosition] ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wBallsPocketScrollPosition], a ld [wBallsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -1018,7 +1018,7 @@ DepositSellPack: ; 106be
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wItemsPocketScrollPosition] ld a, [wItemsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wItemsPocketScrollPosition], a ld [wItemsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -1034,7 +1034,7 @@ DepositSellPack: ; 106be
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wKeyItemsPocketScrollPosition] ld a, [wKeyItemsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wKeyItemsPocketScrollPosition], a ld [wKeyItemsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -1059,7 +1059,7 @@ DepositSellPack: ; 106be
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wBallsPocketScrollPosition] ld a, [wBallsPocketScrollPosition]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wBallsPocketScrollPosition], a ld [wBallsPocketScrollPosition], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -1243,7 +1243,7 @@ TutorialPack: ; 107bb
call InitPocket call InitPocket
pop hl pop hl
call CopyMenuDataHeader call CopyMenuDataHeader
call HandleScrollingMenu call ScrollingMenu
ret ret
Pack_JumptableNext: ; 10866 (4:4866) Pack_JumptableNext: ; 10866 (4:4866)

View File

@ -739,7 +739,7 @@ PartyMenuAttributes: ; 5044f
PartyMenuSelect: ; 0x50457 PartyMenuSelect: ; 0x50457
; sets carry if exitted menu. ; sets carry if exitted menu.
call StaticMenuJoypad call StaticMenuJoypad
call Function1bee call PlaceHollowCursor
ld a, [PartyCount] ld a, [PartyCount]
inc a inc a
ld b, a ld b, a

View File

@ -591,7 +591,7 @@ Function15985: ; 0x15985
ld [wMenuCursorBuffer], a ld [wMenuCursorBuffer], a
ld a, [wd0dd] ld a, [wd0dd]
ld [wMenuScrollPosition], a ld [wMenuScrollPosition], a
call HandleScrollingMenu call ScrollingMenu
ld a, [wMenuScrollPosition] ld a, [wMenuScrollPosition]
ld [wd0dd], a ld [wd0dd], a
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
@ -636,7 +636,7 @@ Function15985: ; 0x15985
.asm_159fb .asm_159fb
callba Function24706 callba Function24706
call Function1bee call PlaceHollowCursor
and a and a
ret ret

View File

@ -2385,7 +2385,7 @@ Script_takeitem: ; 977f0
call GetScriptByte call GetScriptByte
ld [wItemQuantityChangeBuffer], a ld [wItemQuantityChangeBuffer], a
ld a, -1 ld a, -1
ld [ItemCountBuffer], a ld [CurItemQuantity], a
ld hl, NumItems ld hl, NumItems
call TossItem call TossItem
ret nc ret nc

544
engine/scrolling_menu.asm Executable file

File diff suppressed because it is too large Load Diff

View File

@ -101,7 +101,7 @@ SpecialsPointers:: ; c029
add_special SpecialCheckPokerus add_special SpecialCheckPokerus
add_special Special_DisplayCoinCaseBalance add_special Special_DisplayCoinCaseBalance
add_special Special_DisplayMoneyAndCoinBalance add_special Special_DisplayMoneyAndCoinBalance
add_special PlaceMoneyTopRightOW add_special PlaceMoneyTopRight
add_special Special_CheckForLuckyNumberWinners add_special Special_CheckForLuckyNumberWinners
add_special Special_CheckLuckyNumberShowFlag add_special Special_CheckLuckyNumberShowFlag
add_special Special_ResetLuckyNumberShowFlag add_special Special_ResetLuckyNumberShowFlag

View File

@ -42,7 +42,7 @@ StartMenu:: ; 125cd
ld a, [wMenuCursorBuffer] ld a, [wMenuCursorBuffer]
ld [wd0d2], a ld [wd0d2], a
call PlayClickSFX call PlayClickSFX
call Function1bee call PlaceHollowCursor
call .OpenMenu call .OpenMenu
; Menu items have different return functions. ; Menu items have different return functions.
@ -1671,7 +1671,7 @@ MoveScreenLoop: ; 12fd5
jr nz, .place_move jr nz, .place_move
ld a, [wMenuCursorY] ld a, [wMenuCursorY]
ld [wMoveSwapBuffer], a ld [wMoveSwapBuffer], a
call Function1bee call PlaceHollowCursor
jp .moving_move jp .moving_move
.place_move .place_move

View File

@ -145,7 +145,7 @@ Function249d1: ; 249d1 (9:49d1)
inc hl inc hl
pop af pop af
ld [hl], a ld [hl], a
ld hl, wMenuData2Addr ld hl, wMenuData2_ItemsPointerAddr
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
@ -199,7 +199,7 @@ Function24a4d: ; 24a4d (9:4a4d)
Function24a5c: ; 24a5c (9:4a5c) Function24a5c: ; 24a5c (9:4a5c)
push af push af
call Function24a80 call Function24a80
ld hl, wMenuData2Addr ld hl, wMenuData2_ItemsPointerAddr
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a

View File

@ -5,11 +5,11 @@ TMHMPocket: ; 2c76f (b:476f)
ld a, $0 ld a, $0
ld [hInMenu], a ld [hInMenu], a
ret nc ret nc
call Function1bee call PlaceHollowCursor
call WaitBGMap call WaitBGMap
ld a, [CurItem] ld a, [CurItem]
dec a dec a
ld [ItemCountBuffer], a ld [CurItemQuantity], a
ld hl, TMsHMs ld hl, TMsHMs
ld c, a ld c, a
ld b, 0 ld b, 0

View File

@ -18,12 +18,12 @@ _BasementKey: ; 507b4
; Let's use the Basement Key ; Let's use the Basement Key
ld hl, .BasementKeyScript ld hl, .BasementKeyScript
call QueueScript call QueueScript
ld a, 1 ld a, TRUE
ld [wItemEffectSucceeded], a ld [wItemEffectSucceeded], a
ret ret
.nope .nope
ld a, $0 ld a, FALSE
ld [wItemEffectSucceeded], a ld [wItemEffectSucceeded], a
ret ret
; 507e1 ; 507e1

View File

@ -1,29 +1,29 @@
Function8b1e1: ; 8b1e1 CheckForMobileBattleRules: ; 8b1e1
ld de, Unknown_8b1ed ld de, .PointerTables
call Function8b25b call BattleTower_ExecuteJumptable
ret z ret z
call Function8b231 call BattleTower_PleaseReturnWhenReady
scf scf
ret ret
; 8b1ed ; 8b1ed
Unknown_8b1ed: ; 8b1ed .PointerTables: ; 8b1ed
db 2 db 2
dw Unknown_8b1f2 dw .Functions
dw Unknown_8b1f6 dw .TextPointers
Unknown_8b1f2: ; 8b1f2 .Functions: ; 8b1f2
dw Function8b2bb dw BattleTower_CheckPartyLengthIs3
dw Function8b2c1 dw BattleTower_CheckPartyHasThreeMonsThatAreNotEggs
; 8b1f6 ; 8b1f6
Unknown_8b1f6: ; 8b1f6 .TextPointers: ; 8b1f6
dw UnknownText_0x8b1fc dw .ExcuseMeText
dw UnknownText_0x8b23d dw JumpText_NeedAtLeastThreeMon
dw UnknownText_0x8b242 dw JumpText_EggDoesNotQualify
; 8b1fc ; 8b1fc
UnknownText_0x8b1fc: ; 0x8b1fc .ExcuseMeText: ; 0x8b1fc
; Excuse me! ; Excuse me!
text_jump UnknownText_0x1c5937 text_jump UnknownText_0x1c5937
db "@" db "@"
@ -34,27 +34,27 @@ CheckForBattleTowerRules: ; 8b201
ld [hl], "3" ld [hl], "3"
inc hl inc hl
ld [hl], "@" ld [hl], "@"
ld de, CheckForBattleTowerRules_FunctionsText ld de, .PointerTables
call Function8b25b call BattleTower_ExecuteJumptable
ret z ret z
call Function8b231 call BattleTower_PleaseReturnWhenReady
scf scf
ret ret
; 8b215 ; 8b215
CheckForBattleTowerRules_FunctionsText: ; 8b215 .PointerTables: ; 8b215
db 4 db 4
dw CheckForBattleTowerRules_Functions dw .Functions
dw CheckForBattleTowerRules_Text dw .TextPointers
CheckForBattleTowerRules_Functions: ; 8b21a .Functions: ; 8b21a
dw Function_PartyCountEq3 dw Function_PartyCountEq3
dw Function_PartySpeciesAreUnique dw Function_PartySpeciesAreUnique
dw Function_PartyItemsAreUnique dw Function_PartyItemsAreUnique
dw Function_HasPartyAnEgg dw Function_HasPartyAnEgg
; 8b222 ; 8b222
CheckForBattleTowerRules_Text: ; 8b222 .TextPointers: ; 8b222
dw JumpText_ExcuseMeYoureNotReady dw JumpText_ExcuseMeYoureNotReady
dw JumpText_OnlyThreePkmnMayBeEntered dw JumpText_OnlyThreePkmnMayBeEntered
dw JumpText_ThePkmnMustAllBeDifferentKinds dw JumpText_ThePkmnMustAllBeDifferentKinds
@ -68,25 +68,25 @@ JumpText_ExcuseMeYoureNotReady: ; 0x8b22c
db "@" db "@"
; 0x8b231 ; 0x8b231
Function8b231: ; 8b231 BattleTower_PleaseReturnWhenReady: ; 8b231
ld hl, UnknownText_0x8b238 ld hl, .PleaseReturnWhenReady
call PrintText call PrintText
ret ret
; 8b238 ; 8b238
UnknownText_0x8b238: ; 0x8b238 .PleaseReturnWhenReady: ; 0x8b238
; Please return when you're ready. ; Please return when you're ready.
text_jump UnknownText_0x1c5962 text_jump UnknownText_0x1c5962
db "@" db "@"
; 0x8b23d ; 0x8b23d
UnknownText_0x8b23d: ; 0x8b23d JumpText_NeedAtLeastThreeMon: ; 0x8b23d
; You need at least three #MON. ; You need at least three #MON.
text_jump UnknownText_0x1c5983 text_jump UnknownText_0x1c5983
db "@" db "@"
; 0x8b242 ; 0x8b242
UnknownText_0x8b242: ; 0x8b242 JumpText_EggDoesNotQualify: ; 0x8b242
; Sorry, an EGG doesn't qualify. ; Sorry, an EGG doesn't qualify.
text_jump UnknownText_0x1c59a3 text_jump UnknownText_0x1c59a3
db "@" db "@"
@ -116,22 +116,22 @@ JumpText_YouCantTakeAnEgg: ; 0x8b256
db "@" db "@"
; 0x8b25b ; 0x8b25b
Function8b25b: ; 8b25b BattleTower_ExecuteJumptable: ; 8b25b
ld bc, 0 ld bc, 0
.asm_8b25e .loop
call Function8b26c call .DoJumptableFunction
call c, Function8b28e call c, .PrintFailureText
call Function8b276 call .Next_CheckReachedEnd
jr nz, .asm_8b25e jr nz, .loop
ld a, b ld a, b
and a and a
ret ret
; 8b26c ; 8b26c
Function8b26c: ; 8b26c .DoJumptableFunction: ; 8b26c
push de push de
push bc push bc
call Function8b27a call .GetFunctionPointer
ld a, c ld a, c
rst JumpTable rst JumpTable
pop bc pop bc
@ -139,14 +139,14 @@ Function8b26c: ; 8b26c
ret ret
; 8b276 ; 8b276
Function8b276: ; 8b276 .Next_CheckReachedEnd: ; 8b276
inc c inc c
ld a, [de] ld a, [de]
cp c cp c
ret ret
; 8b27a ; 8b27a
Function8b27a: ; 8b27a .GetFunctionPointer: ; 8b27a
inc de inc de
ld a, [de] ld a, [de]
ld l, a ld l, a
@ -156,7 +156,7 @@ Function8b27a: ; 8b27a
ret ret
; 8b281 ; 8b281
Function8b281: ; 8b281 .GetTextPointers: ; 8b281
rept 3 rept 3
inc de inc de
endr endr
@ -168,38 +168,38 @@ endr
ret ret
; 8b28a ; 8b28a
Function8b28a: ; 8b28a .LoadTextPointer: ; 8b28a
ld a, [hli] ld a, [hli]
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ret ret
; 8b28e ; 8b28e
Function8b28e: ; 8b28e .PrintFailureText: ; 8b28e
push de push de
push bc push bc
ld a, b ld a, b
and a and a
call z, Function8b29d call z, .PrintFirstText
pop bc pop bc
call Function8b2a9 call .PrintNthText
ld b, $1 ld b, $1
pop de pop de
ret ret
; 8b29d ; 8b29d
Function8b29d: ; 8b29d .PrintFirstText: ; 8b29d
push de push de
call Function8b281 call .GetTextPointers
call Function8b28a call .LoadTextPointer
call PrintText call PrintText
pop de pop de
ret ret
; 8b2a9 ; 8b2a9
Function8b2a9: ; 8b2a9 .PrintNthText: ; 8b2a9
push bc push bc
call Function8b281 call .GetTextPointers
rept 2 rept 2
inc hl inc hl
endr endr
@ -207,32 +207,32 @@ endr
rept 2 rept 2
add hl, bc add hl, bc
endr endr
call Function8b28a call .LoadTextPointer
call PrintText call PrintText
pop bc pop bc
ret ret
; 8b2bb ; 8b2bb
Function8b2bb: ; 8b2bb BattleTower_CheckPartyLengthIs3: ; 8b2bb
ld a, [PartyCount] ld a, [PartyCount]
cp 3 cp 3
ret ret
; 8b2c1 ; 8b2c1
Function8b2c1: ; 8b2c1 BattleTower_CheckPartyHasThreeMonsThatAreNotEggs: ; 8b2c1
ld hl, PartyCount ld hl, PartyCount
ld a, [hli] ld a, [hli]
ld b, $0 ld b, $0
ld c, a ld c, a
.asm_8b2c8 .loop
ld a, [hli] ld a, [hli]
cp EGG cp EGG
jr z, .asm_8b2ce jr z, .egg
inc b inc b
.asm_8b2ce .egg
dec c dec c
jr nz, .asm_8b2c8 jr nz, .loop
ld a, [PartyCount] ld a, [PartyCount]
cp b cp b
ret z ret z

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