|
| 1 | +#include "macros/scrcmd.inc" |
| 2 | +#include "res/text/bank/pokedex_ratings.h" |
| 3 | + |
| 4 | + |
| 5 | + ScriptEntry PokedexRatings_CheckRowan @ 0x26DE |
| 6 | + ScriptEntry PokedexRatings_CheckPC @ 0x26DF |
| 7 | + ScriptEntry PokedexRatings_CheckOak @ 0x26E0 |
| 8 | + ScriptEntry PokedexRatings_CheckNationalDex @ 0x26E1 |
| 9 | + ScriptEntryEnd |
| 10 | + |
| 11 | +PokedexRatings_CheckRowan: |
| 12 | + BufferPlayerName 0 |
| 13 | + Message PokedexRatings_Text_RowanShowMeYourPokedex |
| 14 | + ShowYesNoMenu VAR_RESULT |
| 15 | + GoToIfEq VAR_RESULT, MENU_NO, PokedexRatings_CheckRowanDecline |
| 16 | + GoTo PokedexRatings_CheckRowanAccept |
| 17 | + End |
| 18 | + |
| 19 | +PokedexRatings_CheckRowanDecline: |
| 20 | + Message PokedexRatings_Text_RowanAfraidToShowMe |
| 21 | + WaitABXPadPress |
| 22 | + CloseMessage |
| 23 | + ReleaseAll |
| 24 | + ReturnCommonScript |
| 25 | + End |
| 26 | + |
| 27 | +PokedexRatings_CheckRowanAccept: |
| 28 | + Call PokedexRatings_RateLocalDex |
| 29 | + CloseMessage |
| 30 | + ReleaseAll |
| 31 | + ReturnCommonScript |
| 32 | + End |
| 33 | + |
| 34 | +PokedexRatings_CheckOak: |
| 35 | + BufferPlayerName 0 |
| 36 | + GetPlayerGender VAR_RESULT |
| 37 | + CallIfEq VAR_RESULT, GENDER_MALE, PokedexRatings_OakPromptMessageMale |
| 38 | + CallIfEq VAR_RESULT, GENDER_FEMALE, PokedexRatings_OakPromptMessageFemale |
| 39 | + ShowYesNoMenu VAR_RESULT |
| 40 | + GoToIfEq VAR_RESULT, MENU_NO, PokedexRatings_CheckOakDecline |
| 41 | + GoTo PokedexRatings_CheckNationalDex |
| 42 | + End |
| 43 | + |
| 44 | +PokedexRatings_OakPromptMessageMale: |
| 45 | + Message PokedexRatings_Text_OakShowMeYourPokedex_Male |
| 46 | + Return |
| 47 | + |
| 48 | +PokedexRatings_OakPromptMessageFemale: |
| 49 | + Message PokedexRatings_Text_OakShowMeYourPokedex_Female |
| 50 | + Return |
| 51 | + |
| 52 | +PokedexRatings_CheckOakDecline: |
| 53 | + Message PokedexRatings_Text_OakComeSeeMe |
| 54 | + WaitABXPadPress |
| 55 | + CloseMessage |
| 56 | + ReleaseAll |
| 57 | + ReturnCommonScript |
| 58 | + End |
| 59 | + |
| 60 | +PokedexRatings_CheckNationalDex: |
| 61 | + Call PokedexRatings_RateNationalDex |
| 62 | + CloseMessage |
| 63 | + ReleaseAll |
| 64 | + ReturnCommonScript |
| 65 | + End |
| 66 | + |
| 67 | +PokedexRatings_CheckPC: |
| 68 | + Call PokedexRatings_CheckPCNationalOrLocal |
| 69 | + ReturnCommonScript |
| 70 | + End |
| 71 | + |
| 72 | +PokedexRatings_CheckPCNationalOrLocal: |
| 73 | + GetNationalDexEnabled VAR_RESULT |
| 74 | + GoToIfEq VAR_RESULT, FALSE, PokedexRatings_CheckPCLocalDex |
| 75 | + GoToIfEq VAR_RESULT, TRUE, PokedexRatings_CheckPCNationalDex |
| 76 | + End |
| 77 | + |
| 78 | +PokedexRatings_CheckPCLocalDex: |
| 79 | + Message PokedexRatings_Text_AccessedProfessorRowansPC |
| 80 | + GoTo PokedexRatings_RateLocalDex |
| 81 | + |
| 82 | +PokedexRatings_CheckPCNationalDex: |
| 83 | + Message PokedexRatings_Text_AccessedProfessorOaksPC |
| 84 | + GoTo PokedexRatings_RateNationalDex |
| 85 | + |
| 86 | +PokedexRatings_RateLocalDex: |
| 87 | + GoToIfUnset FLAG_FIRST_ARRIVAL_ETERNA_CITY, PokedexRatings_JustRateLocalDex |
| 88 | + CheckLocalDexCompleted VAR_RESULT |
| 89 | + CallIfEq VAR_RESULT, TRUE, PokedexRatings_LocalDexCompleted |
| 90 | +PokedexRatings_JustRateLocalDex: |
| 91 | + GetLocalDexSeenCount VAR_0x8004 |
| 92 | + BufferNumber 0, VAR_0x8004 |
| 93 | + Message PokedexRatings_Text_PokemonSpottedInSinnoh |
| 94 | + LoadLocalDexRating VAR_RESULT |
| 95 | + BufferPlayerName 0 |
| 96 | + MessageVar VAR_RESULT |
| 97 | + WaitABPress |
| 98 | + Return |
| 99 | + |
| 100 | +PokedexRatings_LocalDexCompleted: |
| 101 | + SetFlag FLAG_SHOWN_COMPLETE_LOCAL_DEX |
| 102 | + Return |
| 103 | + |
| 104 | +PokedexRatings_RateNationalDex: |
| 105 | + GetNationalDexCaughtCount VAR_0x8004 |
| 106 | + GetPlayerGender VAR_0x8005 |
| 107 | + BufferNumber 0, VAR_0x8004 |
| 108 | + Message PokedexRatings_Text_PokemonCaughtSoFar |
| 109 | + LoadNationalDexRating VAR_RESULT |
| 110 | + BufferPlayerName 0 |
| 111 | + MessageVar VAR_RESULT |
| 112 | + WaitABPress |
| 113 | + Return |
| 114 | + |
| 115 | + .balign 4, 0 |
0 commit comments