-
Notifications
You must be signed in to change notification settings - Fork 138
Document Poketch Link Searcher (Overlay 52) #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
res/text/poketch_link_searcher.json
Outdated
| }, | ||
| { | ||
| "id": "pl_msg_00000461_00009", | ||
| "id": "LinkSearcher_Text_OtherRooms", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| "id": "LinkSearcher_Text_OtherRooms", | |
| "id": "LinkSearcher_Text_OtherLinks", |
|
|
||
| static void PrintDontMoveError(LinkSearcherGraphics *graphics) | ||
| { | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: remove empty line
| }; | ||
| static const u8 sOtherLinks[] = { | ||
| 0, 6, 8, 11, 12, 14, 16, 27, 28, 30, 31, 32 | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use more specific names for these consts
| switch (appData->subState) { | ||
| case 0: | ||
| if (ScreenIsPressed(appData)) { | ||
| if (CommStateIdle(appData)) { | ||
| FieldSystem *fieldSystem = PoketchSystem_GetFieldSystem(appData->poketchSys); | ||
|
|
||
| PoketchLinkSearcherGraphics_StartTask(appData->graphics, LINK_SEARCHER_GRAPHICS_SEARCHING); | ||
|
|
||
| if (MapHeader_IsPokemonCenter2(fieldSystem->location->mapId)) { | ||
| ChangeState(appData, STATE_UNUSABLE_ERROR); | ||
| } else { | ||
| ChangeState(appData, STATE_SHOW_RESULTS); | ||
| } | ||
| } else { | ||
| PoketchSystem_PlaySoundEffect(SEQ_SE_DP_BEEP); | ||
| } | ||
| } | ||
| break; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question: Does this match if you change the switch to if (appData->subState == 0)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does
The link searcher makes use of a handful of undocumented functions, but based on the rest of the app I was able to guess functionality well enough to document the app fully. This app uses messages pulled from text banks much more than previous apps that I have seen, but otherwise doesn't have anything too exciting.
One interesting bit is the arrays in
UpdateLinkSearchResults(). I assume the array contents are some sort of link type ID, with the arrays breaking them down into categories. If these IDs are enumerated or documented anywhere, I couldn't find them.