Skip to content

Commit d52148d

Browse files
pokeplat review changes pt. 1
1 parent 521ca40 commit d52148d

File tree

3 files changed

+155
-156
lines changed

3 files changed

+155
-156
lines changed

include/struct_defs/struct_02090800.h

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,22 @@
77
#include "pokemon.h"
88
#include "string_template.h"
99

10-
// Each string in the notepad and which line it starts on.
11-
typedef struct MemoNotepad {
12-
int natureLine;
13-
Strbuf *nature;
14-
int dateLocationMetLine;
15-
Strbuf *dateLocationMet;
16-
int characteristicLine;
17-
Strbuf *characteristic;
18-
int flavorPreferenceLine;
19-
Strbuf *flavorPreference;
20-
int eggWatchLine;
21-
Strbuf *eggWatch;
22-
} MemoNotepad;
10+
typedef struct MemoNotepadString {
11+
int line;
12+
Strbuf *string;
13+
} MemoNotepadString;
2314

24-
typedef struct {
25-
int heapID;
15+
typedef struct PokemonInfoDisplayStruct {
16+
enum HeapId heapID;
2617
MessageLoader *msgData;
2718
StringTemplate *msgFmt;
2819
Pokemon *mon;
2920
BOOL isMine;
30-
MemoNotepad notepad;
21+
MemoNotepadString nature;
22+
MemoNotepadString metDateAndLocation;
23+
MemoNotepadString characteristic;
24+
MemoNotepadString flavorPreference;
25+
MemoNotepadString eggWatch;
3126
} PokemonInfoDisplayStruct;
3227

3328
#endif // POKEPLATINUM_STRUCT_02090800_H

src/applications/pokemon_summary_screen/window.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1098,24 +1098,24 @@ static void PrintTrainerMemo(Window *window, Pokemon *mon, BOOL monOTMatches)
10981098
{
10991099
PokemonInfoDisplayStruct *infoDisplay = sub_02092494(mon, monOTMatches, HEAP_ID_POKEMON_SUMMARY_SCREEN);
11001100

1101-
if (infoDisplay->notepad.nature != NULL) {
1102-
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.nature, 0, (infoDisplay->notepad.natureLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
1101+
if (infoDisplay->nature.string != NULL) {
1102+
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->nature.string, 0, (infoDisplay->nature.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
11031103
}
11041104

1105-
if (infoDisplay->notepad.dateLocationMet != NULL) {
1106-
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.dateLocationMet, 0, (infoDisplay->notepad.dateLocationMetLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
1105+
if (infoDisplay->metDateAndLocation.string != NULL) {
1106+
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->metDateAndLocation.string, 0, (infoDisplay->metDateAndLocation.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
11071107
}
11081108

1109-
if (infoDisplay->notepad.characteristic != NULL) {
1110-
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.characteristic, 0, (infoDisplay->notepad.characteristicLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
1109+
if (infoDisplay->characteristic.string != NULL) {
1110+
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->characteristic.string, 0, (infoDisplay->characteristic.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
11111111
}
11121112

1113-
if (infoDisplay->notepad.flavorPreference != NULL) {
1114-
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.flavorPreference, 0, (infoDisplay->notepad.flavorPreferenceLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
1113+
if (infoDisplay->flavorPreference.string != NULL) {
1114+
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->flavorPreference.string, 0, (infoDisplay->flavorPreference.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
11151115
}
11161116

1117-
if (infoDisplay->notepad.eggWatch != NULL) {
1118-
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->notepad.eggWatch, 0, (infoDisplay->notepad.eggWatchLine - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
1117+
if (infoDisplay->eggWatch.string != NULL) {
1118+
Text_AddPrinterWithParamsAndColor(window, FONT_SYSTEM, infoDisplay->eggWatch.string, 0, (infoDisplay->eggWatch.line - 1) * 16, TEXT_SPEED_NO_TRANSFER, SUMMARY_TEXT_BLACK, NULL);
11191119
}
11201120

11211121
sub_0209282C(infoDisplay);

0 commit comments

Comments
 (0)