Some frontier field_specials documentation

This commit is contained in:
GriffinR 2019-09-13 17:03:43 -04:00 committed by huderlem
parent aac9658a8e
commit 3dbd375779
12 changed files with 297 additions and 216 deletions

View File

@ -3,12 +3,12 @@ BattleFrontier_BattlePointExchangeServiceCorner_MapScripts:: @ 825F070
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F071:: @ 825F071 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F071:: @ 825F071
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F7FA, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25F7FA, MSGBOX_DEFAULT
special sub_813A958 special ShowBattlePointsWindow
return return
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D:: @ 825F07D BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F07D:: @ 825F07D
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FF12, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FF12, MSGBOX_DEFAULT
special sub_813A988 special CloseBattlePointsWindow
release release
end end
@ -41,7 +41,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F0E5:: @ 825F0E5
copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8004, VAR_0x8008
special TakeFrontierBattlePoints special TakeFrontierBattlePoints
givedecoration VAR_0x8009 givedecoration VAR_0x8009
special sub_813A8FC special UpdateBattlePointsWindow
playse SE_REGI playse SE_REGI
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE45, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE45, MSGBOX_DEFAULT
compare VAR_TEMP_2, 0 compare VAR_TEMP_2, 0
@ -51,7 +51,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F0E5:: @ 825F0E5
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F11D:: @ 825F11D BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F11D:: @ 825F11D
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FEB9, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FEB9, MSGBOX_DEFAULT
special sub_813A988 special CloseBattlePointsWindow
release release
end end
@ -62,7 +62,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F12A:: @ 825F12A
copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8004, VAR_0x8008
special TakeFrontierBattlePoints special TakeFrontierBattlePoints
giveitem VAR_0x8009, 1 giveitem VAR_0x8009, 1
special sub_813A8FC special UpdateBattlePointsWindow
playse SE_REGI playse SE_REGI
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE72, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FE72, MSGBOX_DEFAULT
compare VAR_TEMP_2, 2 compare VAR_TEMP_2, 2
@ -72,7 +72,7 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F12A:: @ 825F12A
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F166:: @ 825F166 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F166:: @ 825F166
msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FEE3, MSGBOX_DEFAULT msgbox BattleFrontier_BattlePointExchangeServiceCorner_Text_25FEE3, MSGBOX_DEFAULT
special sub_813A988 special CloseBattlePointsWindow
release release
end end
@ -86,10 +86,10 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F173:: @ 825F173
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185:: @ 825F185 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F185:: @ 825F185
setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1 setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1
special sub_813AA18 special ShowFrontierExchangeCornerItemIconWindow
special ShowScrollableMultichoice special ShowScrollableMultichoice
waitstate waitstate
special sub_813AA44 special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F21E case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F21E
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F241 case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F241
@ -205,10 +205,10 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F37C:: @ 825F37C
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E:: @ 825F38E BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F38E:: @ 825F38E
setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2 setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2
special sub_813AA18 special ShowFrontierExchangeCornerItemIconWindow
special ShowScrollableMultichoice special ShowScrollableMultichoice
waitstate waitstate
special sub_813AA44 special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F3F0 case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F3F0
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F413 case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F413
@ -274,10 +274,10 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F49F:: @ 825F49F
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1:: @ 825F4B1 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F4B1:: @ 825F4B1
setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR
special sub_813AA18 special ShowFrontierExchangeCornerItemIconWindow
special ShowScrollableMultichoice special ShowScrollableMultichoice
waitstate waitstate
special sub_813AA44 special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F51E case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F51E
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F541 case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F541
@ -353,10 +353,10 @@ BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F5F0:: @ 825F5F0
BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602:: @ 825F602 BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F602:: @ 825F602
setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR setvar VAR_0x8004, SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR
special sub_813AA18 special ShowFrontierExchangeCornerItemIconWindow
special ShowScrollableMultichoice special ShowScrollableMultichoice
waitstate waitstate
special sub_813AA44 special CloseFrontierExchangeCornerItemIconWindow
switch VAR_RESULT switch VAR_RESULT
case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F690 case 0, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F690
case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6B3 case 1, BattleFrontier_BattlePointExchangeServiceCorner_EventScript_25F6B3

View File

@ -40,7 +40,7 @@ BattleFrontier_Lounge2_EventScript_26066D:: @ 826066D
call_if_le BattleFrontier_Lounge2_EventScript_2606F8 call_if_le BattleFrontier_Lounge2_EventScript_2606F8
compare VAR_FRONTIER_MANIAC_FACILITY, 4 compare VAR_FRONTIER_MANIAC_FACILITY, 4
call_if_ge BattleFrontier_Lounge2_EventScript_260701 call_if_ge BattleFrontier_Lounge2_EventScript_260701
special sub_8139F20 special ShowFrontierManiacMessage
waitmessage waitmessage
waitbuttonpress waitbuttonpress
release release

View File

@ -14,7 +14,7 @@ BattleFrontier_Lounge3_EventScript_261D83:: @ 8261D83
end end
BattleFrontier_Lounge3_EventScript_261DAF:: @ 8261DAF BattleFrontier_Lounge3_EventScript_261DAF:: @ 8261DAF
special sub_813A820 special ShowFrontierGamblerLookingMessage
waitmessage waitmessage
waitbuttonpress waitbuttonpress
msgbox BattleFrontier_Lounge3_Text_262A60, MSGBOX_YESNO msgbox BattleFrontier_Lounge3_Text_262A60, MSGBOX_YESNO
@ -25,7 +25,7 @@ BattleFrontier_Lounge3_EventScript_261DAF:: @ 8261DAF
goto_if_eq BattleFrontier_Lounge3_EventScript_261FA5 goto_if_eq BattleFrontier_Lounge3_EventScript_261FA5
message BattleFrontier_Lounge3_Text_262B42 message BattleFrontier_Lounge3_Text_262B42
waitmessage waitmessage
special sub_813A958 special ShowBattlePointsWindow
goto BattleFrontier_Lounge3_EventScript_261DE9 goto BattleFrontier_Lounge3_EventScript_261DE9
end end
@ -33,10 +33,10 @@ BattleFrontier_Lounge3_EventScript_261DE9:: @ 8261DE9
multichoice 20, 4, 87, 0 multichoice 20, 4, 87, 0
copyvar VAR_FRONTIER_GAMBLER_AMOUNT_BET, VAR_RESULT copyvar VAR_FRONTIER_GAMBLER_AMOUNT_BET, VAR_RESULT
switch VAR_RESULT switch VAR_RESULT
case 0, BattleFrontier_Lounge3_EventScript_261E30 case FRONTIER_GAMBLER_BET_5, BattleFrontier_Lounge3_EventScript_261E30
case 1, BattleFrontier_Lounge3_EventScript_261E3B case FRONTIER_GAMBLER_BET_10, BattleFrontier_Lounge3_EventScript_261E3B
case 2, BattleFrontier_Lounge3_EventScript_261E46 case FRONTIER_GAMBLER_BET_15, BattleFrontier_Lounge3_EventScript_261E46
case 3, BattleFrontier_Lounge3_EventScript_261FAF case FRONTIER_GAMBLER_BET_CANCEL, BattleFrontier_Lounge3_EventScript_261FAF
case 127, BattleFrontier_Lounge3_EventScript_261FAF case 127, BattleFrontier_Lounge3_EventScript_261FAF
end end
@ -68,18 +68,18 @@ BattleFrontier_Lounge3_EventScript_261E51:: @ 8261E51
BattleFrontier_Lounge3_EventScript_261E75:: @ 8261E75 BattleFrontier_Lounge3_EventScript_261E75:: @ 8261E75
copyvar VAR_0x8004, VAR_0x8008 copyvar VAR_0x8004, VAR_0x8008
special TakeFrontierBattlePoints special TakeFrontierBattlePoints
setvar VAR_FRONTIER_GAMBLER_PLACED_BET_F, 1 setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET
special sub_813A8FC special UpdateBattlePointsWindow
playse SE_REGI playse SE_REGI
msgbox BattleFrontier_Lounge3_Text_262BE0, MSGBOX_DEFAULT msgbox BattleFrontier_Lounge3_Text_262BE0, MSGBOX_DEFAULT
goto BattleFrontier_Lounge3_EventScript_261E96 goto BattleFrontier_Lounge3_EventScript_261E96
end end
BattleFrontier_Lounge3_EventScript_261E96:: @ 8261E96 BattleFrontier_Lounge3_EventScript_261E96:: @ 8261E96
special sub_813A854 special ShowFrontierGamblerGoMessage
waitmessage waitmessage
waitbuttonpress waitbuttonpress
special sub_813A988 special CloseBattlePointsWindow
release release
end end
@ -105,37 +105,37 @@ BattleFrontier_Lounge3_EventScript_261EEB:: @ 8261EEB
BattleFrontier_Lounge3_EventScript_261EF9:: @ 8261EF9 BattleFrontier_Lounge3_EventScript_261EF9:: @ 8261EF9
msgbox BattleFrontier_Lounge3_Text_26346B, MSGBOX_DEFAULT msgbox BattleFrontier_Lounge3_Text_26346B, MSGBOX_DEFAULT
compare VAR_FRONTIER_GAMBLER_PLACED_BET_F, 1 compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET
goto_if_ge BattleFrontier_Lounge3_EventScript_261F12 goto_if_ge BattleFrontier_Lounge3_EventScript_261F12
goto BattleFrontier_Lounge3_EventScript_261DAF goto BattleFrontier_Lounge3_EventScript_261DAF
end end
BattleFrontier_Lounge3_EventScript_261F12:: @ 8261F12 BattleFrontier_Lounge3_EventScript_261F12:: @ 8261F12
compare VAR_FRONTIER_GAMBLER_PLACED_BET_F, 1 compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_PLACED_BET
goto_if_eq BattleFrontier_Lounge3_EventScript_261F9E goto_if_eq BattleFrontier_Lounge3_EventScript_261F9E
compare VAR_FRONTIER_GAMBLER_PLACED_BET_F, 2 compare VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON
goto_if_eq BattleFrontier_Lounge3_EventScript_261F2E goto_if_eq BattleFrontier_Lounge3_EventScript_261F2E
goto BattleFrontier_Lounge3_EventScript_261F71 goto BattleFrontier_Lounge3_EventScript_261F71
end end
BattleFrontier_Lounge3_EventScript_261F2E:: @ 8261F2E BattleFrontier_Lounge3_EventScript_261F2E:: @ 8261F2E
msgbox BattleFrontier_Lounge3_Text_263334, MSGBOX_DEFAULT msgbox BattleFrontier_Lounge3_Text_263334, MSGBOX_DEFAULT
compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, 0 compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_5
call_if_eq BattleFrontier_Lounge3_EventScript_261F80 call_if_eq BattleFrontier_Lounge3_EventScript_261F80
compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, 1 compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_10
call_if_eq BattleFrontier_Lounge3_EventScript_261F8A call_if_eq BattleFrontier_Lounge3_EventScript_261F8A
compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, 2 compare VAR_FRONTIER_GAMBLER_AMOUNT_BET, FRONTIER_GAMBLER_BET_15
call_if_eq BattleFrontier_Lounge3_EventScript_261F94 call_if_eq BattleFrontier_Lounge3_EventScript_261F94
msgbox BattleFrontier_Lounge3_Text_2633D4, 9 msgbox BattleFrontier_Lounge3_Text_2633D4, 9
special GiveFrontierBattlePoints special GiveFrontierBattlePoints
msgbox BattleFrontier_Lounge3_Text_2633F2, MSGBOX_DEFAULT msgbox BattleFrontier_Lounge3_Text_2633F2, MSGBOX_DEFAULT
setvar VAR_FRONTIER_GAMBLER_PLACED_BET_F, 0 setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WAITING
release release
end end
BattleFrontier_Lounge3_EventScript_261F71:: @ 8261F71 BattleFrontier_Lounge3_EventScript_261F71:: @ 8261F71
msgbox BattleFrontier_Lounge3_Text_263298, MSGBOX_DEFAULT msgbox BattleFrontier_Lounge3_Text_263298, MSGBOX_DEFAULT
setvar VAR_FRONTIER_GAMBLER_PLACED_BET_F, 0 setvar VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WAITING
release release
end end
@ -155,7 +155,7 @@ BattleFrontier_Lounge3_EventScript_261F94:: @ 8261F94
return return
BattleFrontier_Lounge3_EventScript_261F9E:: @ 8261F9E BattleFrontier_Lounge3_EventScript_261F9E:: @ 8261F9E
special sub_813A854 special ShowFrontierGamblerGoMessage
waitmessage waitmessage
waitbuttonpress waitbuttonpress
release release
@ -167,7 +167,7 @@ BattleFrontier_Lounge3_EventScript_261FA5:: @ 8261FA5
end end
BattleFrontier_Lounge3_EventScript_261FAF:: @ 8261FAF BattleFrontier_Lounge3_EventScript_261FAF:: @ 8261FAF
special sub_813A988 special CloseBattlePointsWindow
goto BattleFrontier_Lounge3_EventScript_261FA5 goto BattleFrontier_Lounge3_EventScript_261FA5
end end

View File

@ -16,7 +16,7 @@ BattleFrontier_Lounge5_EventScript_2645C6:: @ 82645C6
specialvar VAR_RESULT, ScriptGetPartyMonSpecies specialvar VAR_RESULT, ScriptGetPartyMonSpecies
compare VAR_RESULT, SPECIES_EGG compare VAR_RESULT, SPECIES_EGG
goto_if_eq BattleFrontier_Lounge5_EventScript_264603 goto_if_eq BattleFrontier_Lounge5_EventScript_264603
special sub_813A7B8 special ShowNatureGirlMessage
waitmessage waitmessage
waitbuttonpress waitbuttonpress
release release

View File

@ -19,7 +19,7 @@ BattleFrontier_Lounge7_EventScript_265276:: @ 8265276
BattleFrontier_Lounge7_EventScript_265284:: @ 8265284 BattleFrontier_Lounge7_EventScript_265284:: @ 8265284
message BattleFrontier_Lounge7_Text_2658EF message BattleFrontier_Lounge7_Text_2658EF
waitmessage waitmessage
special sub_813A958 special ShowBattlePointsWindow
setvar VAR_TEMP_E, 0 setvar VAR_TEMP_E, 0
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_1 setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_1
setvar VAR_0x8006, 0 setvar VAR_0x8006, 0
@ -133,7 +133,7 @@ BattleFrontier_Lounge7_EventScript_265466:: @ 8265466
BattleFrontier_Lounge7_EventScript_265474:: @ 8265474 BattleFrontier_Lounge7_EventScript_265474:: @ 8265474
message BattleFrontier_Lounge7_Text_2658EF message BattleFrontier_Lounge7_Text_2658EF
waitmessage waitmessage
special sub_813A958 special ShowBattlePointsWindow
setvar VAR_TEMP_E, 1 setvar VAR_TEMP_E, 1
setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2 setvar VAR_0x8004, SCROLL_MULTI_BF_MOVE_TUTOR_2
setvar VAR_0x8006, 0 setvar VAR_0x8006, 0
@ -231,7 +231,7 @@ BattleFrontier_Lounge7_EventScript_26562A:: @ 826562A
BattleFrontier_Lounge7_EventScript_265635:: @ 8265635 BattleFrontier_Lounge7_EventScript_265635:: @ 8265635
special sub_813ADB8 special sub_813ADB8
special sub_813A988 special CloseBattlePointsWindow
msgbox BattleFrontier_Lounge7_Text_265A0E, MSGBOX_DEFAULT msgbox BattleFrontier_Lounge7_Text_265A0E, MSGBOX_DEFAULT
release release
end end
@ -263,7 +263,7 @@ BattleFrontier_Lounge7_EventScript_265696:: @ 8265696
msgbox BattleFrontier_Lounge7_Text_26595A, MSGBOX_DEFAULT msgbox BattleFrontier_Lounge7_Text_26595A, MSGBOX_DEFAULT
special sub_813AEB4 special sub_813AEB4
fadescreen 1 fadescreen 1
special sub_813A988 special CloseBattlePointsWindow
special sub_813ADB8 special sub_813ADB8
special sub_81B892C special sub_81B892C
waitstate waitstate

View File

@ -450,7 +450,7 @@ gSpecials:: @ 81DBA64
def_special sub_80F9160 def_special sub_80F9160
def_special ShowRankingHallRecordsWindow def_special ShowRankingHallRecordsWindow
def_special ScrollRankingHallRecordsWindow def_special ScrollRankingHallRecordsWindow
def_special sub_8139F20 def_special ShowFrontierManiacMessage
def_special sub_80F9134 def_special sub_80F9134
def_special sub_80F9154 def_special sub_80F9154
def_special sub_80B3028 def_special sub_80B3028
@ -462,22 +462,22 @@ gSpecials:: @ 81DBA64
def_special sub_81B95E0 def_special sub_81B95E0
def_special sub_81B9620 def_special sub_81B9620
def_special sub_813A76C def_special sub_813A76C
def_special sub_813A7B8 def_special ShowNatureGirlMessage
def_special sub_813A958 def_special ShowBattlePointsWindow
def_special sub_813A8FC def_special UpdateBattlePointsWindow
def_special sub_813A988 def_special CloseBattlePointsWindow
def_special GiveFrontierBattlePoints def_special GiveFrontierBattlePoints
def_special TakeFrontierBattlePoints def_special TakeFrontierBattlePoints
def_special GetFrontierBattlePoints def_special GetFrontierBattlePoints
def_special sub_813AA18 def_special ShowFrontierExchangeCornerItemIconWindow
def_special sub_813AA44 def_special CloseFrontierExchangeCornerItemIconWindow
def_special DisplayBerryPowderVendorMenu def_special DisplayBerryPowderVendorMenu
def_special RemoveBerryPowderVendorMenu def_special RemoveBerryPowderVendorMenu
def_special HasEnoughBerryPowder def_special HasEnoughBerryPowder
def_special TakeBerryPowder def_special TakeBerryPowder
def_special PrintPlayerBerryPowderAmount def_special PrintPlayerBerryPowderAmount
def_special sub_813A820 def_special ShowFrontierGamblerLookingMessage
def_special sub_813A854 def_special ShowFrontierGamblerGoMessage
def_special sub_813B7D8 def_special sub_813B7D8
def_special sub_81C72A4 def_special sub_81C72A4
def_special sp106_CreateStartMenu def_special sp106_CreateStartMenu

View File

@ -41,4 +41,33 @@
#define DEPT_STORE_FLOORNUM_11F 14 #define DEPT_STORE_FLOORNUM_11F 14
#define DEPT_STORE_FLOORNUM_ROOFTOP 15 #define DEPT_STORE_FLOORNUM_ROOFTOP 15
// Frontier Maniac
#define FRONTIER_MANIAC_BATTLE_TOWER_SINGLES 0
#define FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES 1
#define FRONTIER_MANIAC_BATTLE_TOWER_MULTIS 2
#define FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS 3
#define FRONTIER_MANIAC_BATTLE_DOME 4
#define FRONTIER_MANIAC_BATTLE_FACTORY 5
#define FRONTIER_MANIAC_BATTLE_PALACE 6
#define FRONTIER_MANIAC_BATTLE_ARENA 7
#define FRONTIER_MANIAC_BATTLE_PIKE 8
#define FRONTIER_MANIAC_BATTLE_PYRAMID 9
#define FRONTIER_MANIAC_FACILITY_COUNT 10
#define FRONTIER_MANIAC_MESSAGE_COUNT 3
// Frontier Gambler
#define FRONTIER_GAMBLER_WAITING 0
#define FRONTIER_GAMBLER_PLACED_BET 1
#define FRONTIER_GAMBLER_WON 2
#define FRONTIER_GAMBLER_LOST 3
#define FRONTIER_GAMBLER_BET_5 0
#define FRONTIER_GAMBLER_BET_10 1
#define FRONTIER_GAMBLER_BET_15 2
#define FRONTIER_GAMBLER_BET_CANCEL 3
#define FRONTIER_GAMBLER_CHALLENGE_COUNT 12
#endif // GUARD_CONSTANTS_FIELD_SPECIALS_H #endif // GUARD_CONSTANTS_FIELD_SPECIALS_H

View File

@ -61,10 +61,10 @@
#define VAR_0x402E 0x402E #define VAR_0x402E 0x402E
#define VAR_FRONTIER_MANIAC_FACILITY 0x402F #define VAR_FRONTIER_MANIAC_FACILITY 0x402F
#define VAR_FRONTIER_GAMBLER_FACILITY 0x4030 #define VAR_FRONTIER_GAMBLER_CHALLENGE 0x4030
#define VAR_FRONTIER_GAMBLER_SET_FACILITY_F 0x4031 #define VAR_FRONTIER_GAMBLER_SET_CHALLENGE 0x4031
#define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032 #define VAR_FRONTIER_GAMBLER_AMOUNT_BET 0x4032
#define VAR_FRONTIER_GAMBLER_PLACED_BET_F 0x4033 #define VAR_FRONTIER_GAMBLER_STATE 0x4033
#define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034 #define VAR_DEOXYS_ROCK_STEP_COUNT 0x4034
#define VAR_DEOXYS_ROCK_LEVEL 0x4035 #define VAR_DEOXYS_ROCK_LEVEL 0x4035

View File

@ -20,7 +20,7 @@ bool32 ShouldDoRivalRayquazaCall(void);
bool32 CountSSTidalStep(u16 delta); bool32 CountSSTidalStep(u16 delta);
u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y); u8 GetSSTidalLocation(s8 *mapGroup, s8 *mapNum, s16 *x, s16 *y);
void ShowScrollableMultichoice(void); void ShowScrollableMultichoice(void);
void sub_813A878(u8 a0); void FrontierGamblerSetWonOrLost(bool8 won);
u8 sub_813BADC(u8 a0); u8 sub_813BADC(u8 a0);
bool8 InPokemonCenter(void); bool8 InPokemonCenter(void);
void SetShoalItemFlag(u16 v0); void SetShoalItemFlag(u16 v0);

View File

@ -1,4 +1,4 @@
static const u16 sBFExchangeCorner_Decor1[] = static const u16 sFrontierExchangeCorner_Decor1[] =
{ {
DECOR_KISS_POSTER, DECOR_KISS_POSTER,
DECOR_KISS_CUSHION, DECOR_KISS_CUSHION,
@ -13,7 +13,7 @@ static const u16 sBFExchangeCorner_Decor1[] =
0xFFFF 0xFFFF
}; };
static const u16 sBFExchangeCorner_Decor2[] = static const u16 sFrontierExchangeCorner_Decor2[] =
{ {
DECOR_LAPRAS_DOLL, DECOR_LAPRAS_DOLL,
DECOR_SNORLAX_DOLL, DECOR_SNORLAX_DOLL,
@ -23,7 +23,7 @@ static const u16 sBFExchangeCorner_Decor2[] =
0xFFFF 0xFFFF
}; };
static const u16 sBFExchangeCorner_Vitamins[] = static const u16 sFrontierExchangeCorner_Vitamins[] =
{ {
ITEM_PROTEIN, ITEM_PROTEIN,
ITEM_CALCIUM, ITEM_CALCIUM,
@ -34,7 +34,7 @@ static const u16 sBFExchangeCorner_Vitamins[] =
0xFFFF 0xFFFF
}; };
static const u16 sBFExchangeCorner_HoldItems[] = static const u16 sFrontierExchangeCorner_HoldItems[] =
{ {
ITEM_LEFTOVERS, ITEM_LEFTOVERS,
ITEM_WHITE_HERB, ITEM_WHITE_HERB,
@ -48,7 +48,7 @@ static const u16 sBFExchangeCorner_HoldItems[] =
0xFFFF 0xFFFF
}; };
static const u8 *const sBFExchangeCorner_Decor1Descriptions[] = static const u8 *const sFrontierExchangeCorner_Decor1Descriptions[] =
{ {
BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA, BattleFrontier_BattlePointExchangeServiceCorner_Text_2601AA,
BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0, BattleFrontier_BattlePointExchangeServiceCorner_Text_2601D0,
@ -63,7 +63,7 @@ static const u8 *const sBFExchangeCorner_Decor1Descriptions[] =
gText_Exit, gText_Exit,
}; };
static const u8 *const sBFExchangeCorner_Decor2Descriptions[] = static const u8 *const sFrontierExchangeCorner_Decor2Descriptions[] =
{ {
BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C, BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C, BattleFrontier_BattlePointExchangeServiceCorner_Text_26036C,
@ -73,7 +73,7 @@ static const u8 *const sBFExchangeCorner_Decor2Descriptions[] =
gText_Exit gText_Exit
}; };
static const u8 *const sBFExchangeCorner_VitaminsDescriptions[] = static const u8 *const sFrontierExchangeCorner_VitaminsDescriptions[] =
{ {
BattleFrontier_BattlePointExchangeServiceCorner_Text_260397, BattleFrontier_BattlePointExchangeServiceCorner_Text_260397,
BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE, BattleFrontier_BattlePointExchangeServiceCorner_Text_2603BE,
@ -84,7 +84,7 @@ static const u8 *const sBFExchangeCorner_VitaminsDescriptions[] =
gText_Exit gText_Exit
}; };
static const u8 *const sBFExchangeCorner_HoldItemsDescriptions[] = static const u8 *const sFrontierExchangeCorner_HoldItemsDescriptions[] =
{ {
BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A, BattleFrontier_BattlePointExchangeServiceCorner_Text_26047A,
BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC, BattleFrontier_BattlePointExchangeServiceCorner_Text_2604AC,

View File

@ -66,15 +66,15 @@ EWRAM_DATA u8 gBikeCollisions = 0;
static EWRAM_DATA u32 gBikeCyclingTimer = 0; static EWRAM_DATA u32 gBikeCyclingTimer = 0;
static EWRAM_DATA u8 gUnknown_0203AB5C = 0; static EWRAM_DATA u8 gUnknown_0203AB5C = 0;
static EWRAM_DATA u8 sPetalburgGymSlidingDoorFrameCounter = 0; static EWRAM_DATA u8 sPetalburgGymSlidingDoorFrameCounter = 0;
static EWRAM_DATA u8 gUnknown_0203AB5E = 0; static EWRAM_DATA u8 gTutorMoveAndElevatorWindowId = 0;
static EWRAM_DATA u16 gLilycoveDeptStore_NeverRead = 0; static EWRAM_DATA u16 gLilycoveDeptStore_NeverRead = 0;
static EWRAM_DATA u16 gLilycoveDeptStore_DefaultFloorChoice = 0; static EWRAM_DATA u16 gLilycoveDeptStore_DefaultFloorChoice = 0;
static EWRAM_DATA struct ListMenuItem *gUnknown_0203AB64 = NULL; static EWRAM_DATA struct ListMenuItem *gUnknown_0203AB64 = NULL;
static EWRAM_DATA u16 gUnknown_0203AB68 = 0; static EWRAM_DATA u16 gUnknown_0203AB68 = 0;
static EWRAM_DATA u16 gUnknown_0203AB6A = 0; static EWRAM_DATA u16 gFrontierExchangeCorner_NeverRead = 0;
static EWRAM_DATA u8 gScrollableMultichoiceSprite = 0; static EWRAM_DATA u8 gScrollableMultichoiceSprite = 0;
static EWRAM_DATA u8 gUnknown_0203AB6D = 0; static EWRAM_DATA u8 gBattlePointsWindowId = 0;
static EWRAM_DATA u8 gUnknown_0203AB6E = 0; static EWRAM_DATA u8 gFrontierExchangeCornerItemIconWindowId = 0;
static EWRAM_DATA u8 gUnknown_0203AB6F = 0; static EWRAM_DATA u8 gUnknown_0203AB6F = 0;
static EWRAM_DATA u32 gUnknown_0203AB70 = 0; static EWRAM_DATA u32 gUnknown_0203AB70 = 0;
@ -105,19 +105,19 @@ static void sub_8139AF4(u8 taskId);
static void sub_8139C2C(u16 a1, bool8 descending); static void sub_8139C2C(u16 a1, bool8 descending);
static void MoveElevatorWindowLights(u8 taskId); static void MoveElevatorWindowLights(u8 taskId);
static void sub_813A2DC(u8 taskId); static void sub_813A2DC(u8 taskId);
static void sub_813AA60(u16 menu, u16 selection); static void FillFrontierExchangeCornerWindow(u16 menu, u16 selection);
static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection); static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection);
static void sub_813A42C(void); static void sub_813A42C(void);
static void sub_813A4EC(u8 taskId); static void sub_813A4EC(u8 taskId);
static void sub_813A694(u8 taskId); static void sub_813A694(u8 taskId);
static void sub_813A46C(s32 itemIndex, bool8 onInit, struct ListMenu *list); static void sub_813A46C(s32 itemIndex, bool8 onInit, struct ListMenu *list);
static void sub_813AC44(u16 menu, u16 selection); static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused);
static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection); static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection);
static void sub_813A570(u8 taskId); static void sub_813A570(u8 taskId);
static void sub_813A738(u8 taskId); static void sub_813A738(u8 taskId);
static void sub_813A600(u8 taskId); static void sub_813A600(u8 taskId);
static void sub_813A664(u8 taskId); static void sub_813A664(u8 taskId);
static void ScrollMulti_ShowItemIcon(u16 item); static void ShowFrontierExchangeCornerItemIcon(u16 item);
static void Task_DeoxysRockInteraction(u8 taskId); static void Task_DeoxysRockInteraction(u8 taskId);
static void ChangeDeoxysRockLevel(u8 a0); static void ChangeDeoxysRockLevel(u8 a0);
static void WaitForDeoxysRockMovement(u8 taskId); static void WaitForDeoxysRockMovement(u8 taskId);
@ -1886,23 +1886,23 @@ void sub_8139B60(void)
{ {
int xPos; int xPos;
gUnknown_0203AB5E = AddWindow(&gElevatorFloor_WindowTemplate); gTutorMoveAndElevatorWindowId = AddWindow(&gElevatorFloor_WindowTemplate);
SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0); SetStandardWindowBorderStyle(gTutorMoveAndElevatorWindowId, 0);
xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64); xPos = GetStringCenterAlignXOffset(1, gText_ElevatorNowOn, 64);
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL); AddTextPrinterParameterized(gTutorMoveAndElevatorWindowId, 1, gText_ElevatorNowOn, xPos, 1, TEXT_SPEED_FF, NULL);
xPos = GetStringCenterAlignXOffset(1, gDeptStoreFloorNames[gSpecialVar_0x8005], 64); xPos = GetStringCenterAlignXOffset(1, gDeptStoreFloorNames[gSpecialVar_0x8005], 64);
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL); AddTextPrinterParameterized(gTutorMoveAndElevatorWindowId, 1, gDeptStoreFloorNames[gSpecialVar_0x8005], xPos, 17, TEXT_SPEED_FF, NULL);
PutWindowTilemap(gUnknown_0203AB5E); PutWindowTilemap(gTutorMoveAndElevatorWindowId);
CopyWindowToVram(gUnknown_0203AB5E, 3); CopyWindowToVram(gTutorMoveAndElevatorWindowId, 3);
} }
void sub_8139C10(void) void sub_8139C10(void)
{ {
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB5E, TRUE); ClearStdWindowAndFrameToTransparent(gTutorMoveAndElevatorWindowId, TRUE);
RemoveWindow(gUnknown_0203AB5E); RemoveWindow(gTutorMoveAndElevatorWindowId);
} }
static void sub_8139C2C(u16 a1, bool8 descending) static void sub_8139C2C(u16 a1, bool8 descending)
@ -2051,57 +2051,110 @@ void UpdateFrontierManiac(u16 daysSince)
{ {
u16 *var = GetVarPointer(VAR_FRONTIER_MANIAC_FACILITY); u16 *var = GetVarPointer(VAR_FRONTIER_MANIAC_FACILITY);
*var += daysSince; *var += daysSince;
*var %= 10; *var %= FRONTIER_MANIAC_FACILITY_COUNT;
} }
void sub_8139F20(void) void ShowFrontierManiacMessage(void)
{ {
static const u8 *const gUnknown_085B2C50[][3] = static const u8 *const sFrontierManiacMessages[][FRONTIER_MANIAC_MESSAGE_COUNT] =
{ {
{ BattleFrontier_Lounge2_Text_260971, BattleFrontier_Lounge2_Text_260A1E, BattleFrontier_Lounge2_Text_260AE7 }, [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] =
{ BattleFrontier_Lounge2_Text_2619AC, BattleFrontier_Lounge2_Text_261A91, BattleFrontier_Lounge2_Text_261B0C }, {
{ BattleFrontier_Lounge2_Text_261B95, BattleFrontier_Lounge2_Text_261B95, BattleFrontier_Lounge2_Text_261B95 }, BattleFrontier_Lounge2_Text_260971,
{ BattleFrontier_Lounge2_Text_261C1A, BattleFrontier_Lounge2_Text_261C1A, BattleFrontier_Lounge2_Text_261C1A }, BattleFrontier_Lounge2_Text_260A1E,
{ BattleFrontier_Lounge2_Text_260BC4, BattleFrontier_Lounge2_Text_260C6D, BattleFrontier_Lounge2_Text_260D3A }, BattleFrontier_Lounge2_Text_260AE7
{ BattleFrontier_Lounge2_Text_260E1E, BattleFrontier_Lounge2_Text_260EC7, BattleFrontier_Lounge2_Text_260F74 }, },
{ BattleFrontier_Lounge2_Text_2614E6, BattleFrontier_Lounge2_Text_261591, BattleFrontier_Lounge2_Text_26166F }, [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] =
{ BattleFrontier_Lounge2_Text_261282, BattleFrontier_Lounge2_Text_261329, BattleFrontier_Lounge2_Text_261403 }, {
{ BattleFrontier_Lounge2_Text_261026, BattleFrontier_Lounge2_Text_2610CC, BattleFrontier_Lounge2_Text_261194 }, BattleFrontier_Lounge2_Text_2619AC,
{ BattleFrontier_Lounge2_Text_26174D, BattleFrontier_Lounge2_Text_2617F9, BattleFrontier_Lounge2_Text_2618C4 }, BattleFrontier_Lounge2_Text_261A91,
BattleFrontier_Lounge2_Text_261B0C
},
[FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] =
{
BattleFrontier_Lounge2_Text_261B95,
BattleFrontier_Lounge2_Text_261B95,
BattleFrontier_Lounge2_Text_261B95
},
[FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS] =
{
BattleFrontier_Lounge2_Text_261C1A,
BattleFrontier_Lounge2_Text_261C1A,
BattleFrontier_Lounge2_Text_261C1A
},
[FRONTIER_MANIAC_BATTLE_DOME] =
{
BattleFrontier_Lounge2_Text_260BC4,
BattleFrontier_Lounge2_Text_260C6D,
BattleFrontier_Lounge2_Text_260D3A
},
[FRONTIER_MANIAC_BATTLE_FACTORY] =
{
BattleFrontier_Lounge2_Text_260E1E,
BattleFrontier_Lounge2_Text_260EC7,
BattleFrontier_Lounge2_Text_260F74
},
[FRONTIER_MANIAC_BATTLE_PALACE] =
{
BattleFrontier_Lounge2_Text_2614E6,
BattleFrontier_Lounge2_Text_261591,
BattleFrontier_Lounge2_Text_26166F
},
[FRONTIER_MANIAC_BATTLE_ARENA] =
{
BattleFrontier_Lounge2_Text_261282,
BattleFrontier_Lounge2_Text_261329,
BattleFrontier_Lounge2_Text_261403
},
[FRONTIER_MANIAC_BATTLE_PIKE] =
{
BattleFrontier_Lounge2_Text_261026,
BattleFrontier_Lounge2_Text_2610CC,
BattleFrontier_Lounge2_Text_261194
},
[FRONTIER_MANIAC_BATTLE_PYRAMID] =
{
BattleFrontier_Lounge2_Text_26174D,
BattleFrontier_Lounge2_Text_2617F9,
BattleFrontier_Lounge2_Text_2618C4
},
}; };
static const u8 gUnknown_085B2CC8[][2] = static const u8 sFrontierManiacStreakThresholds[][FRONTIER_MANIAC_MESSAGE_COUNT - 1] =
{ {
{ 0x15, 0x38 }, [FRONTIER_MANIAC_BATTLE_TOWER_SINGLES] = { 21, 56 },
{ 0x15, 0x23 }, [FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES] = { 21, 35 },
{ 0xff, 0xff }, [FRONTIER_MANIAC_BATTLE_TOWER_MULTIS] = { 255, 255 },
{ 0xff, 0xff }, [FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS] = { 255, 255 },
{ 0x02, 0x04 }, [FRONTIER_MANIAC_BATTLE_DOME] = { 2, 4 },
{ 0x07, 0x15 }, [FRONTIER_MANIAC_BATTLE_FACTORY] = { 7, 21 },
{ 0x07, 0x15 }, [FRONTIER_MANIAC_BATTLE_PALACE] = { 7, 21 },
{ 0x0e, 0x1c }, [FRONTIER_MANIAC_BATTLE_ARENA] = { 14, 28 },
{ 0x0d, 0x70 }, [FRONTIER_MANIAC_BATTLE_PIKE] = { 13, 112 }, //BUG: 112 (0x70) is probably a mistake; the Pike Queen is battled twice well before that
{ 0x07, 0x38 } [FRONTIER_MANIAC_BATTLE_PYRAMID] = { 7, 56 }
}; };
u8 i; u8 i;
u16 winStreak = 0; u16 winStreak = 0;
u16 var = VarGet(VAR_FRONTIER_MANIAC_FACILITY); u16 facility = VarGet(VAR_FRONTIER_MANIAC_FACILITY);
switch (var) switch (facility)
{ {
case 0 ... 3: case FRONTIER_MANIAC_BATTLE_TOWER_SINGLES:
if (gSaveBlock2Ptr->frontier.towerWinStreaks[var][FRONTIER_LVL_50] case FRONTIER_MANIAC_BATTLE_TOWER_DOUBLES:
>= gSaveBlock2Ptr->frontier.towerWinStreaks[var][FRONTIER_LVL_OPEN]) case FRONTIER_MANIAC_BATTLE_TOWER_MULTIS:
case FRONTIER_MANIAC_BATTLE_TOWER_LINK_MULTIS:
if (gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50]
>= gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN])
{ {
winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[var][FRONTIER_LVL_50]; winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_50];
} }
else else
{ {
winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[var][FRONTIER_LVL_OPEN]; winStreak = gSaveBlock2Ptr->frontier.towerWinStreaks[facility][FRONTIER_LVL_OPEN];
} }
break; break;
case 4: case FRONTIER_MANIAC_BATTLE_DOME:
if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] if (gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]
>= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) >= gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN])
{ {
@ -2112,7 +2165,7 @@ void sub_8139F20(void)
winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; winStreak = gSaveBlock2Ptr->frontier.domeWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN];
} }
break; break;
case 5: case FRONTIER_MANIAC_BATTLE_FACTORY:
if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] if (gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]
>= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) >= gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN])
{ {
@ -2123,7 +2176,7 @@ void sub_8139F20(void)
winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; winStreak = gSaveBlock2Ptr->frontier.factoryWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN];
} }
break; break;
case 6: case FRONTIER_MANIAC_BATTLE_PALACE:
if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50] if (gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_50]
>= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]) >= gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN])
{ {
@ -2134,7 +2187,7 @@ void sub_8139F20(void)
winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN]; winStreak = gSaveBlock2Ptr->frontier.palaceWinStreaks[FRONTIER_MODE_SINGLES][FRONTIER_LVL_OPEN];
} }
break; break;
case 7: case FRONTIER_MANIAC_BATTLE_ARENA:
if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50] if (gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_50]
>= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]) >= gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN])
{ {
@ -2145,7 +2198,7 @@ void sub_8139F20(void)
winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN]; winStreak = gSaveBlock2Ptr->frontier.arenaWinStreaks[FRONTIER_LVL_OPEN];
} }
break; break;
case 8: case FRONTIER_MANIAC_BATTLE_PIKE:
if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50] if (gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_50]
>= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]) >= gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN])
{ {
@ -2156,7 +2209,7 @@ void sub_8139F20(void)
winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN]; winStreak = gSaveBlock2Ptr->frontier.pikeWinStreaks[FRONTIER_LVL_OPEN];
} }
break; break;
case 9: case FRONTIER_MANIAC_BATTLE_PYRAMID:
if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50] if (gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_50]
>= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN]) >= gSaveBlock2Ptr->frontier.pyramidWinStreaks[FRONTIER_LVL_OPEN])
{ {
@ -2169,16 +2222,16 @@ void sub_8139F20(void)
break; break;
} }
for (i = 0; i < 2 && gUnknown_085B2CC8[var][i] < winStreak; i++); for (i = 0; i < FRONTIER_MANIAC_MESSAGE_COUNT - 1 && sFrontierManiacStreakThresholds[facility][i] < winStreak; i++);
ShowFieldMessage(gUnknown_085B2C50[var][i]); ShowFieldMessage(sFrontierManiacMessages[facility][i]);
} }
// gSpecialVar_0x8005 and 0x8006 here are used by ShakeScreenInElevator // gSpecialVar_0x8005 and 0x8006 here are used by ShakeScreenInElevator
void sub_813A080(void) void sub_813A080(void)
{ {
static const u16 gUnknown_085B2CDC[] = { static const u16 sBattleTowerStreakThresholds[] = {
0x0007, 0x000e, 0x0015, 0x001c, 0x0023, 0x0031, 0x003f, 0x004d, 0x005b, 0x0000 7, 14, 21, 28, 35, 49, 63, 77, 91, 0
}; };
u8 i; u8 i;
@ -2192,9 +2245,9 @@ void sub_813A080(void)
return; return;
} }
for (i = 0; i < ARRAY_COUNT(gUnknown_085B2CDC) - 1; i++) for (i = 0; i < ARRAY_COUNT(sBattleTowerStreakThresholds) - 1; i++)
{ {
if (gUnknown_085B2CDC[i] > gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode]) if (sBattleTowerStreakThresholds[i] > gSaveBlock2Ptr->frontier.towerWinStreaks[battleMode][lvlMode])
{ {
gSpecialVar_0x8005 = 4; gSpecialVar_0x8005 = 4;
gSpecialVar_0x8006 = i + 5; gSpecialVar_0x8006 = i + 5;
@ -2521,10 +2574,10 @@ static void sub_813A2DC(u8 taskId)
ScriptContext2_Enable(); ScriptContext2_Enable();
gUnknown_0203AB68 = 0; gUnknown_0203AB68 = 0;
gScrollableMultichoiceSprite = MAX_SPRITES; gScrollableMultichoiceSprite = MAX_SPRITES;
sub_813AA60(task->data[11], 0); FillFrontierExchangeCornerWindow(task->data[11], 0);
ShowBattleFrontierTutorWindow(task->data[11], 0); ShowBattleFrontierTutorWindow(task->data[11], 0);
gUnknown_0203AB64 = AllocZeroed(task->data[1] * 8); gUnknown_0203AB64 = AllocZeroed(task->data[1] * 8);
gUnknown_0203AB6A = 0; gFrontierExchangeCorner_NeverRead = 0;
sub_813A42C(); sub_813A42C();
for (unk1 = 0, i = 0; i < task->data[1]; i++) for (unk1 = 0, i = 0; i < task->data[1]; i++)
@ -2599,10 +2652,10 @@ static void sub_813A46C(s32 itemIndex, bool8 onInit, struct ListMenu *list)
ListMenuGetScrollAndRow(task->data[14], &selection, NULL); ListMenuGetScrollAndRow(task->data[14], &selection, NULL);
gUnknown_0203AB68 = selection; gUnknown_0203AB68 = selection;
ListMenuGetCurrentItemArrayId(task->data[14], &selection); ListMenuGetCurrentItemArrayId(task->data[14], &selection);
sub_813AC44(task->data[11], gUnknown_0203AB6A); HideFrontierExchangeCornerItemIcon(task->data[11], gFrontierExchangeCorner_NeverRead);
sub_813AA60(task->data[11], selection); FillFrontierExchangeCornerWindow(task->data[11], selection);
ShowBattleFrontierTutorMoveDescription(task->data[11], selection); ShowBattleFrontierTutorMoveDescription(task->data[11], selection);
gUnknown_0203AB6A = selection; gFrontierExchangeCorner_NeverRead = selection;
} }
} }
@ -2646,7 +2699,7 @@ static void sub_813A570(u8 taskId)
u16 array; u16 array;
struct Task *task = &gTasks[taskId]; struct Task *task = &gTasks[taskId];
ListMenuGetCurrentItemArrayId(task->data[14], &array); ListMenuGetCurrentItemArrayId(task->data[14], &array);
sub_813AC44(task->data[11], array); HideFrontierExchangeCornerItemIcon(task->data[11], array);
sub_813A738(taskId); sub_813A738(taskId);
DestroyListMenuTask(task->data[14], NULL, NULL); DestroyListMenuTask(task->data[14], NULL, NULL);
Free(gUnknown_0203AB64); Free(gUnknown_0203AB64);
@ -2769,34 +2822,34 @@ void sub_813A76C(void)
} }
} }
void sub_813A7B8(void) void ShowNatureGirlMessage(void)
{ {
static const u8 *const gUnknown_085B3040[] = { static const u8 *const sNatureGirlMessages[] = {
BattleFrontier_Lounge5_Text_26468D, [NATURE_HARDY] = BattleFrontier_Lounge5_Text_26468D,
BattleFrontier_Lounge5_Text_2646E5, [NATURE_LONELY] = BattleFrontier_Lounge5_Text_2646E5,
BattleFrontier_Lounge5_Text_264741, [NATURE_BRAVE] = BattleFrontier_Lounge5_Text_264741,
BattleFrontier_Lounge5_Text_2647A4, [NATURE_ADAMANT] = BattleFrontier_Lounge5_Text_2647A4,
BattleFrontier_Lounge5_Text_2647FC, [NATURE_NAUGHTY] = BattleFrontier_Lounge5_Text_2647FC,
BattleFrontier_Lounge5_Text_264858, [NATURE_BOLD] = BattleFrontier_Lounge5_Text_264858,
BattleFrontier_Lounge5_Text_2648BE, [NATURE_DOCILE] = BattleFrontier_Lounge5_Text_2648BE,
BattleFrontier_Lounge5_Text_264916, [NATURE_RELAXED] = BattleFrontier_Lounge5_Text_264916,
BattleFrontier_Lounge5_Text_264972, [NATURE_IMPISH] = BattleFrontier_Lounge5_Text_264972,
BattleFrontier_Lounge5_Text_2649D5, [NATURE_LAX] = BattleFrontier_Lounge5_Text_2649D5,
BattleFrontier_Lounge5_Text_264A3F, [NATURE_TIMID] = BattleFrontier_Lounge5_Text_264A3F,
BattleFrontier_Lounge5_Text_264A9B, [NATURE_HASTY] = BattleFrontier_Lounge5_Text_264A9B,
BattleFrontier_Lounge5_Text_264AF3, [NATURE_SERIOUS] = BattleFrontier_Lounge5_Text_264AF3,
BattleFrontier_Lounge5_Text_264B5D, [NATURE_JOLLY] = BattleFrontier_Lounge5_Text_264B5D,
BattleFrontier_Lounge5_Text_2648BE, [NATURE_NAIVE] = BattleFrontier_Lounge5_Text_2648BE,
BattleFrontier_Lounge5_Text_264BC3, [NATURE_MODEST] = BattleFrontier_Lounge5_Text_264BC3,
BattleFrontier_Lounge5_Text_264C36, [NATURE_MILD] = BattleFrontier_Lounge5_Text_264C36,
BattleFrontier_Lounge5_Text_2648BE, [NATURE_QUIET] = BattleFrontier_Lounge5_Text_2648BE,
BattleFrontier_Lounge5_Text_264C95, [NATURE_BASHFUL] = BattleFrontier_Lounge5_Text_264C95,
BattleFrontier_Lounge5_Text_264D01, [NATURE_RASH] = BattleFrontier_Lounge5_Text_264D01,
BattleFrontier_Lounge5_Text_264D6B, [NATURE_CALM] = BattleFrontier_Lounge5_Text_264D6B,
BattleFrontier_Lounge5_Text_264DD7, [NATURE_GENTLE] = BattleFrontier_Lounge5_Text_264DD7,
BattleFrontier_Lounge5_Text_264E33, [NATURE_SASSY] = BattleFrontier_Lounge5_Text_264E33,
BattleFrontier_Lounge5_Text_264E8F, [NATURE_CAREFUL] = BattleFrontier_Lounge5_Text_264E8F,
BattleFrontier_Lounge5_Text_2648BE, [NATURE_QUIRKY] = BattleFrontier_Lounge5_Text_2648BE,
}; };
u8 nature; u8 nature;
@ -2807,19 +2860,19 @@ void sub_813A7B8(void)
} }
nature = GetNature(&gPlayerParty[gSpecialVar_0x8004]); nature = GetNature(&gPlayerParty[gSpecialVar_0x8004]);
ShowFieldMessage(gUnknown_085B3040[nature]); ShowFieldMessage(sNatureGirlMessages[nature]);
} }
void UpdateFrontierGambler(u16 a0) void UpdateFrontierGambler(u16 daysSince)
{ {
u16 *var = GetVarPointer(VAR_FRONTIER_GAMBLER_FACILITY); u16 *var = GetVarPointer(VAR_FRONTIER_GAMBLER_CHALLENGE);
*var += a0; *var += daysSince;
*var %= 12; *var %= FRONTIER_GAMBLER_CHALLENGE_COUNT;
} }
void sub_813A820(void) void ShowFrontierGamblerLookingMessage(void)
{ {
static const u8 *const gUnknown_085B30A4[] = static const u8 *const sFrontierGamblerLookingMessages[] =
{ {
BattleFrontier_Lounge3_Text_262261, BattleFrontier_Lounge3_Text_262261,
BattleFrontier_Lounge3_Text_26230D, BattleFrontier_Lounge3_Text_26230D,
@ -2835,14 +2888,14 @@ void sub_813A820(void)
BattleFrontier_Lounge3_Text_2629BC, BattleFrontier_Lounge3_Text_2629BC,
}; };
u16 var = VarGet(VAR_FRONTIER_GAMBLER_FACILITY); u16 challenge = VarGet(VAR_FRONTIER_GAMBLER_CHALLENGE);
ShowFieldMessage(gUnknown_085B30A4[var]); ShowFieldMessage(sFrontierGamblerLookingMessages[challenge]);
VarSet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F, var); VarSet(VAR_FRONTIER_GAMBLER_SET_CHALLENGE, challenge);
} }
void sub_813A854(void) void ShowFrontierGamblerGoMessage(void)
{ {
static const u8 *const gUnknown_085B30D4[] = static const u8 *const sFrontierGamblerGoMessages[] =
{ {
BattleFrontier_Lounge3_Text_262C04, BattleFrontier_Lounge3_Text_262C04,
BattleFrontier_Lounge3_Text_262C90, BattleFrontier_Lounge3_Text_262C90,
@ -2858,10 +2911,10 @@ void sub_813A854(void)
BattleFrontier_Lounge3_Text_263211, BattleFrontier_Lounge3_Text_263211,
}; };
ShowFieldMessage(gUnknown_085B30D4[VarGet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F)]); ShowFieldMessage(sFrontierGamblerGoMessages[VarGet(VAR_FRONTIER_GAMBLER_SET_CHALLENGE)]);
} }
void sub_813A878(u8 a0) void FrontierGamblerSetWonOrLost(bool8 won)
{ {
static const u16 sFrontierChallenges[] = static const u16 sFrontierChallenges[] =
{ {
@ -2880,37 +2933,37 @@ void sub_813A878(u8 a0)
}; };
u16 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE); u16 battleMode = VarGet(VAR_FRONTIER_BATTLE_MODE);
u16 challenge = VarGet(VAR_FRONTIER_GAMBLER_SET_FACILITY_F); u16 challenge = VarGet(VAR_FRONTIER_GAMBLER_SET_CHALLENGE);
u16 frontierFacilityId = VarGet(VAR_FRONTIER_FACILITY); u16 frontierFacilityId = VarGet(VAR_FRONTIER_FACILITY);
if (VarGet(VAR_FRONTIER_GAMBLER_PLACED_BET_F) == 1) if (VarGet(VAR_FRONTIER_GAMBLER_STATE) == FRONTIER_GAMBLER_PLACED_BET)
{ {
if (sFrontierChallenges[challenge] == FRONTIER_CHALLENGE(frontierFacilityId, battleMode)) if (sFrontierChallenges[challenge] == FRONTIER_CHALLENGE(frontierFacilityId, battleMode))
{ {
if (a0 != 0) if (won != FALSE)
{ {
VarSet(VAR_FRONTIER_GAMBLER_PLACED_BET_F, 2); VarSet(VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_WON);
} }
else else
{ {
VarSet(VAR_FRONTIER_GAMBLER_PLACED_BET_F, 3); VarSet(VAR_FRONTIER_GAMBLER_STATE, FRONTIER_GAMBLER_LOST);
} }
} }
} }
} }
void sub_813A8FC(void) void UpdateBattlePointsWindow(void)
{ {
u8 string[32]; u8 string[32];
u32 x; u32 x;
StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.battlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP); StringCopy(ConvertIntToDecimalStringN(string, gSaveBlock2Ptr->frontier.battlePoints, STR_CONV_MODE_RIGHT_ALIGN, 4), gText_BP);
x = GetStringRightAlignXOffset(1, string, 48); x = GetStringRightAlignXOffset(1, string, 48);
AddTextPrinterParameterized(gUnknown_0203AB6D, 1, string, x, 1, 0, NULL); AddTextPrinterParameterized(gBattlePointsWindowId, 1, string, x, 1, 0, NULL);
} }
void sub_813A958(void) void ShowBattlePointsWindow(void)
{ {
static const struct WindowTemplate gUnknown_085B311C = { static const struct WindowTemplate sBattlePoints_WindowTemplate = {
.bg = 0, .bg = 0,
.tilemapLeft = 1, .tilemapLeft = 1,
.tilemapTop = 1, .tilemapTop = 1,
@ -2920,16 +2973,16 @@ void sub_813A958(void)
.baseBlock = 8, .baseBlock = 8,
}; };
gUnknown_0203AB6D = AddWindow(&gUnknown_085B311C); gBattlePointsWindowId = AddWindow(&sBattlePoints_WindowTemplate);
SetStandardWindowBorderStyle(gUnknown_0203AB6D, 0); SetStandardWindowBorderStyle(gBattlePointsWindowId, 0);
sub_813A8FC(); UpdateBattlePointsWindow();
CopyWindowToVram(gUnknown_0203AB6D, 2); CopyWindowToVram(gBattlePointsWindowId, 2);
} }
void sub_813A988(void) void CloseBattlePointsWindow(void)
{ {
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB6D, TRUE); ClearStdWindowAndFrameToTransparent(gBattlePointsWindowId, TRUE);
RemoveWindow(gUnknown_0203AB6D); RemoveWindow(gBattlePointsWindowId);
} }
void TakeFrontierBattlePoints(void) void TakeFrontierBattlePoints(void)
@ -2961,9 +3014,9 @@ u16 GetFrontierBattlePoints(void)
return gSaveBlock2Ptr->frontier.battlePoints; return gSaveBlock2Ptr->frontier.battlePoints;
} }
void sub_813AA18(void) void ShowFrontierExchangeCornerItemIconWindow(void)
{ {
static const struct WindowTemplate gUnknown_085B3124 = { static const struct WindowTemplate sFrontierExchangeCornerItemIcon_WindowTemplate = {
.bg = 0, .bg = 0,
.tilemapLeft = 2, .tilemapLeft = 2,
.tilemapTop = 9, .tilemapTop = 9,
@ -2973,18 +3026,18 @@ void sub_813AA18(void)
.baseBlock = 20, .baseBlock = 20,
}; };
gUnknown_0203AB6E = AddWindow(&gUnknown_085B3124); gFrontierExchangeCornerItemIconWindowId = AddWindow(&sFrontierExchangeCornerItemIcon_WindowTemplate);
SetStandardWindowBorderStyle(gUnknown_0203AB6E, 0); SetStandardWindowBorderStyle(gFrontierExchangeCornerItemIconWindowId, 0);
CopyWindowToVram(gUnknown_0203AB6E, 2); CopyWindowToVram(gFrontierExchangeCornerItemIconWindowId, 2);
} }
void sub_813AA44(void) void CloseFrontierExchangeCornerItemIconWindow(void)
{ {
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB6E, TRUE); ClearStdWindowAndFrameToTransparent(gFrontierExchangeCornerItemIconWindowId, TRUE);
RemoveWindow(gUnknown_0203AB6E); RemoveWindow(gFrontierExchangeCornerItemIconWindowId);
} }
static void sub_813AA60(u16 menu, u16 selection) static void FillFrontierExchangeCornerWindow(u16 menu, u16 selection)
{ {
#include "data/battle_frontier/battle_frontier_exchange_corner.h" #include "data/battle_frontier/battle_frontier_exchange_corner.h"
@ -2994,44 +3047,44 @@ static void sub_813AA60(u16 menu, u16 selection)
switch (menu) switch (menu)
{ {
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1: case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_1:
AddTextPrinterParameterized2(0, 1, sBFExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3); AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor1Descriptions[selection], 0, NULL, 2, 1, 3);
if (sBFExchangeCorner_Decor1[selection] == 0xFFFF) if (sFrontierExchangeCorner_Decor1[selection] == 0xFFFF)
{ {
ScrollMulti_ShowItemIcon(sBFExchangeCorner_Decor1[selection]); ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor1[selection]);
} }
else else
{ {
FreeSpriteTilesByTag(5500); FreeSpriteTilesByTag(5500);
FreeSpritePaletteByTag(5500); FreeSpritePaletteByTag(5500);
gScrollableMultichoiceSprite = AddDecorationIconObject(sBFExchangeCorner_Decor1[selection], 33, 88, 0, 5500, 5500); gScrollableMultichoiceSprite = AddDecorationIconObject(sFrontierExchangeCorner_Decor1[selection], 33, 88, 0, 5500, 5500);
} }
break; break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2: case SCROLL_MULTI_BF_EXCHANGE_CORNER_DECOR_VENDOR_2:
AddTextPrinterParameterized2(0, 1, sBFExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3); AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_Decor2Descriptions[selection], 0, NULL, 2, 1, 3);
if (sBFExchangeCorner_Decor2[selection] == 0xFFFF) if (sFrontierExchangeCorner_Decor2[selection] == 0xFFFF)
{ {
ScrollMulti_ShowItemIcon(sBFExchangeCorner_Decor2[selection]); ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Decor2[selection]);
} }
else else
{ {
FreeSpriteTilesByTag(5500); FreeSpriteTilesByTag(5500);
FreeSpritePaletteByTag(5500); FreeSpritePaletteByTag(5500);
gScrollableMultichoiceSprite = AddDecorationIconObject(sBFExchangeCorner_Decor2[selection], 33, 88, 0, 5500, 5500); gScrollableMultichoiceSprite = AddDecorationIconObject(sFrontierExchangeCorner_Decor2[selection], 33, 88, 0, 5500, 5500);
} }
break; break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR: case SCROLL_MULTI_BF_EXCHANGE_CORNER_VITAMIN_VENDOR:
AddTextPrinterParameterized2(0, 1, sBFExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3); AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_VitaminsDescriptions[selection], 0, NULL, 2, 1, 3);
ScrollMulti_ShowItemIcon(sBFExchangeCorner_Vitamins[selection]); ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_Vitamins[selection]);
break; break;
case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR: case SCROLL_MULTI_BF_EXCHANGE_CORNER_HOLD_ITEM_VENDOR:
AddTextPrinterParameterized2(0, 1, sBFExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3); AddTextPrinterParameterized2(0, 1, sFrontierExchangeCorner_HoldItemsDescriptions[selection], 0, NULL, 2, 1, 3);
ScrollMulti_ShowItemIcon(sBFExchangeCorner_HoldItems[selection]); ShowFrontierExchangeCornerItemIcon(sFrontierExchangeCorner_HoldItems[selection]);
break; break;
} }
} }
} }
static void ScrollMulti_ShowItemIcon(u16 item) static void ShowFrontierExchangeCornerItemIcon(u16 item)
{ {
FreeSpriteTilesByTag(5500); FreeSpriteTilesByTag(5500);
FreeSpritePaletteByTag(5500); FreeSpritePaletteByTag(5500);
@ -3045,8 +3098,7 @@ static void ScrollMulti_ShowItemIcon(u16 item)
} }
} }
// selection is unused static void HideFrontierExchangeCornerItemIcon(u16 menu, u16 unused)
static void sub_813AC44(u16 menu, u16 selection)
{ {
if (gScrollableMultichoiceSprite != MAX_SPRITES) if (gScrollableMultichoiceSprite != MAX_SPRITES)
{ {
@ -3120,8 +3172,8 @@ static void ShowBattleFrontierTutorWindow(u8 menu, u16 selection)
{ {
if (gSpecialVar_0x8006 == 0) if (gSpecialVar_0x8006 == 0)
{ {
gUnknown_0203AB5E = AddWindow(&sBattleFrontierTutor_WindowTemplate); gTutorMoveAndElevatorWindowId = AddWindow(&sBattleFrontierTutor_WindowTemplate);
SetStandardWindowBorderStyle(gUnknown_0203AB5E, 0); SetStandardWindowBorderStyle(gTutorMoveAndElevatorWindowId, 0);
} }
ShowBattleFrontierTutorMoveDescription(menu, selection); ShowBattleFrontierTutorMoveDescription(menu, selection);
} }
@ -3161,22 +3213,22 @@ static void ShowBattleFrontierTutorMoveDescription(u8 menu, u16 selection)
if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_1 || menu == SCROLL_MULTI_BF_MOVE_TUTOR_2) if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_1 || menu == SCROLL_MULTI_BF_MOVE_TUTOR_2)
{ {
FillWindowPixelRect(gUnknown_0203AB5E, PIXEL_FILL(1), 0, 0, 96, 48); FillWindowPixelRect(gTutorMoveAndElevatorWindowId, PIXEL_FILL(1), 0, 0, 96, 48);
if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_2) if (menu == SCROLL_MULTI_BF_MOVE_TUTOR_2)
{ {
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL); AddTextPrinterParameterized(gTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions2[selection], 0, 1, 0, NULL);
} }
else else
{ {
AddTextPrinterParameterized(gUnknown_0203AB5E, 1, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL); AddTextPrinterParameterized(gTutorMoveAndElevatorWindowId, 1, sBattleFrontier_TutorMoveDescriptions1[selection], 0, 1, 0, NULL);
} }
} }
} }
void sub_813ADB8(void) void sub_813ADB8(void)
{ {
ClearStdWindowAndFrameToTransparent(gUnknown_0203AB5E, TRUE); ClearStdWindowAndFrameToTransparent(gTutorMoveAndElevatorWindowId, TRUE);
RemoveWindow(gUnknown_0203AB5E); RemoveWindow(gTutorMoveAndElevatorWindowId);
} }
void sub_813ADD4(void) void sub_813ADD4(void)

View File

@ -794,15 +794,15 @@ static void sub_81A17A0(void)
case 0: case 0:
break; break;
case 1: case 1:
sub_813A878(0); FrontierGamblerSetWonOrLost(FALSE);
VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8); VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8);
break; break;
case 4: case 4:
sub_813A878(0); FrontierGamblerSetWonOrLost(FALSE);
VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8); VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8);
break; break;
case 3: case 3:
sub_813A878(1); FrontierGamblerSetWonOrLost(TRUE);
VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8); VarSet(VAR_TEMP_0, gSaveBlock2Ptr->frontier.field_CA8);
break; break;
case 2: case 2: