1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
|
#include "global.h"
#include "data.h"
#include "decompress.h"
#include "main.h"
#include "menu_specialized.h"
#include "mon_markings.h"
#include "pokenav.h"
#include "pokemon.h"
#include "pokemon_storage_system.h"
#include "sound.h"
#include "string_util.h"
#include "strings.h"
#include "text.h"
#include "constants/songs.h"
struct PokenavSub11
{
u32 monPal[3][0x20];
u8 fill[0x180];
u32 monPicGfx[3][MON_PIC_SIZE];
u8 searchMode;
s16 monIndex;
u32 (*callback)(struct PokenavSub11 *);
u8 fill2[0x6320 - 0x6308];
u8 searchLocBuffer[3][24];
u8 nameBuffer[3][64];
struct ConditionGraph conditionData;
u8 sheen[3];
u8 monMarks[3];
s8 mark;
s8 unk6787;
s8 unk6788;
s8 unk6789;
u8 state;
};
void InitPartyConditionListParameters(void);
void sub_81CD9F8(void);
u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr);
u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr);
u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr);
u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr);
u8 SwitchConditionSummaryIndex(u8 moveUp);
void CopyMonNameGenderLocation(s16 id, u8 arg1);
void GetMonConditionGraphData(s16 id, u8 arg1);
void ConditionGraphDrawMonPic(s16 id, u8 arg1);
// code
bool32 PokenavCallback_Init_PartyCondition(void)
{
struct PokenavSub11 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH, sizeof(struct PokenavSub11));
if (structPtr == NULL)
return FALSE;
InitConditionGraphData(&structPtr->conditionData);
InitPartyConditionListParameters();
gKeyRepeatStartDelay = 20;
structPtr->callback = HandlePartyConditionInput;
return TRUE;
}
bool32 PokenavCallback_Init_ConditionGraphFromSearch(void)
{
struct PokenavSub11 *structPtr = AllocSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH, sizeof(struct PokenavSub11));
if (structPtr == NULL)
return FALSE;
InitConditionGraphData(&structPtr->conditionData);
sub_81CD9F8();
gKeyRepeatStartDelay = 20;
structPtr->callback = HandlePartyConditionInput;
return TRUE;
}
u32 GetPartyConditionCallback(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->callback(structPtr);
}
u32 HandlePartyConditionInput(struct PokenavSub11 *structPtr)
{
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
u32 ret = ConditionGraphHandleDpadInput(structPtr);
if (ret == PARTY_CONDITION_FUNC_NONE)
{
if (JOY_NEW(B_BUTTON))
{
PlaySE(SE_SELECT);
structPtr->callback = GetConditionReturnCallback;
ret = PARTY_CONDITION_FUNC_RETURN;
}
else if (JOY_NEW(A_BUTTON))
{
if (structPtr->searchMode == 0)
{
if (monListPtr->currIndex == monListPtr->listCount - 1)
{
PlaySE(SE_SELECT);
structPtr->callback = GetConditionReturnCallback;
ret = PARTY_CONDITION_FUNC_RETURN;
}
}
else
{
PlaySE(SE_SELECT);
ret = PARTY_CONDITION_FUNC_ADD_MARKINGS;
structPtr->callback = ConditionMenu_OpenMarkingsMenu;
}
}
}
return ret;
}
u32 ConditionMenu_OpenMarkingsMenu(struct PokenavSub11 *structPtr)
{
struct PokenavSub18 *monListPtr;
u8 markings;
u32 ret = PARTY_CONDITION_FUNC_NONE, boxId, monId;
if (!HandleMonMarkingsMenuInput())
{
structPtr->monMarks[structPtr->mark] = GetMonMarkingsData();
monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
boxId = monListPtr->monData[monListPtr->currIndex].boxId;
monId = monListPtr->monData[monListPtr->currIndex].monId;
markings = structPtr->monMarks[structPtr->mark];
if (boxId == TOTAL_BOXES_COUNT)
SetMonData(&gPlayerParty[monId], MON_DATA_MARKINGS, &markings);
else
SetBoxMonDataAt(boxId, monId, MON_DATA_MARKINGS, &markings);
structPtr->callback = HandlePartyConditionInput;
ret = PARTY_CONDITION_FUNC_CLOSE_MARKINGS;
}
return ret;
}
u32 GetConditionReturnCallback(struct PokenavSub11 *structPtr)
{
if (structPtr->searchMode == 0)
return POKENAV_CONDITION_MENU;
else
return POKENAV_RETURN_CONDITION_SEARCH;
}
void FreePartyConditionSubstruct1(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
if (structPtr->searchMode == 0)
FreePokenavSubstruct(POKENAV_SUBSTRUCT_MON_LIST);
FreePokenavSubstruct(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
}
u8 ConditionGraphHandleDpadInput(struct PokenavSub11 *structPtr)
{
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
u8 ret = 0;
if (JOY_HELD(DPAD_UP))
{
if (structPtr->searchMode == 0 || monListPtr->currIndex != 0)
{
PlaySE(SE_SELECT);
ret = SwitchConditionSummaryIndex(1);
}
}
else if (JOY_HELD(DPAD_DOWN))
{
if (structPtr->searchMode == 0 || monListPtr->currIndex < monListPtr->listCount - 1)
{
PlaySE(SE_SELECT);
ret = SwitchConditionSummaryIndex(0);
}
}
return ret;
}
u8 SwitchConditionSummaryIndex(u8 moveUp)
{
u16 r7;
bool8 wasNotLastMon, isNotLastMon;
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
r7 = (moveUp) ? structPtr->unk6788 : structPtr->unk6787;
sub_81D1F84(&structPtr->conditionData, structPtr->conditionData.unk14[structPtr->mark], structPtr->conditionData.unk14[r7]);
wasNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1));
if (moveUp)
{
structPtr->unk6788 = structPtr->unk6787;
structPtr->unk6787 = structPtr->mark;
structPtr->mark = r7;
structPtr->unk6789 = structPtr->unk6788;
monListPtr->currIndex = (monListPtr->currIndex == 0) ? monListPtr->listCount - 1 : monListPtr->currIndex - 1;
structPtr->monIndex = (monListPtr->currIndex != 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1;
}
else
{
structPtr->unk6787 = structPtr->unk6788;
structPtr->unk6788 = structPtr->mark;
structPtr->mark = r7;
structPtr->unk6789 = structPtr->unk6787;
monListPtr->currIndex = (monListPtr->currIndex < monListPtr->listCount - 1) ? monListPtr->currIndex + 1 : 0;
structPtr->monIndex = (monListPtr->currIndex < monListPtr->listCount - 1) ? monListPtr->currIndex + 1 : 0;
}
isNotLastMon = (monListPtr->currIndex != ((IsConditionMenuSearchMode() != 0) ? monListPtr->listCount : monListPtr->listCount - 1));
if (!wasNotLastMon)
return PARTY_CONDITION_FUNC_NO_TRANSITION;
else if (!isNotLastMon)
return PARTY_CONDITION_FUNC_SLIDE_MON_OUT;
else
return PARTY_CONDITION_FUNC_SLIDE_MON_IN;
}
bool32 LoadPartyConditionMenuGfx(void)
{
s32 var;
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
switch (structPtr->state)
{
case 0:
CopyMonNameGenderLocation(monListPtr->currIndex, 0);
break;
case 1:
GetMonConditionGraphData(monListPtr->currIndex, 0);
break;
case 2:
ConditionGraphDrawMonPic(monListPtr->currIndex, 0);
break;
case 3:
if (monListPtr->listCount == 1)
{
structPtr->mark = 0;
structPtr->unk6787 = 0;
structPtr->unk6788 = 0;
structPtr->state = 0;
return TRUE;
}
else
{
structPtr->mark = 0;
structPtr->unk6787 = 1;
structPtr->unk6788 = 2;
}
break;
// These were probably ternaries just like cases 7-9, but couldn't match it any other way.
case 4:
var = monListPtr->currIndex + 1;
if (var >= monListPtr->listCount)
var = 0;
CopyMonNameGenderLocation(var, 1);
break;
case 5:
var = monListPtr->currIndex + 1;
if (var >= monListPtr->listCount)
var = 0;
GetMonConditionGraphData(var, 1);
break;
case 6:
var = monListPtr->currIndex + 1;
if (var >= monListPtr->listCount)
var = 0;
ConditionGraphDrawMonPic(var, 1);
break;
case 7:
CopyMonNameGenderLocation((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
break;
case 8:
GetMonConditionGraphData((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
break;
case 9:
ConditionGraphDrawMonPic((monListPtr->currIndex - 1 >= 0) ? monListPtr->currIndex - 1 : monListPtr->listCount - 1, 2);
structPtr->state = 0;
return TRUE;
}
structPtr->state++;
return FALSE;
}
bool32 SetConditionGraphData(u8 mode)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
switch (mode)
{
case 0:
CopyMonNameGenderLocation(structPtr->monIndex, structPtr->unk6789);
break;
case 1:
GetMonConditionGraphData(structPtr->monIndex, structPtr->unk6789);
break;
case 2:
ConditionGraphDrawMonPic(structPtr->monIndex, structPtr->unk6789);
return TRUE;
}
return FALSE;
}
u8 *CopyStringLeftAlignedToConditionData(u8 *dst, const u8 *src, s16 n)
{
while (*src != EOS)
*dst++ = *src++, n--;
while (n-- > 0)
*dst++ = CHAR_SPACE;
*dst = EOS;
return dst;
}
u8 *CopyMonConditionNameGender(u8 *str, u16 id, bool8 arg3)
{
u16 boxId, monId, gender, species, level, lvlDigits;
struct BoxPokemon *boxMon;
u8 *txtPtr, *str_;
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
boxId = monListPtr->monData[id].boxId;
monId = monListPtr->monData[id].monId;
*(str++) = EXT_CTRL_CODE_BEGIN;
*(str++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
*(str++) = TEXT_COLOR_BLUE;
*(str++) = TEXT_COLOR_TRANSPARENT;
*(str++) = TEXT_COLOR_LIGHT_BLUE;
if (GetBoxOrPartyMonData(boxId, monId, MON_DATA_IS_EGG, NULL))
return StringCopyPadded(str, gText_EggNickname, CHAR_SPACE, 12);
GetBoxOrPartyMonData(boxId, monId, MON_DATA_NICKNAME, str);
StringGetEnd10(str);
species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES, NULL);
if (boxId == TOTAL_BOXES_COUNT)
{
level = GetMonData(&gPlayerParty[monId], MON_DATA_LEVEL);
gender = GetMonGender(&gPlayerParty[monId]);
}
else
{
boxMon = GetBoxedMonPtr(boxId, monId);
gender = GetBoxMonGender(boxMon);
level = GetLevelFromBoxMonExp(boxMon);
}
if ((species == SPECIES_NIDORAN_F || species == SPECIES_NIDORAN_M) && !StringCompare(str, gSpeciesNames[species]))
gender = MON_GENDERLESS;
str_ = str; // For some reason, a variable is needed to match.
while (*str_ != EOS)
(str_++);
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_SKIP;
*(str_++) = 60;
switch (gender)
{
default:
*(str_++) = CHAR_GENDERLESS;
break;
case MON_MALE:
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_COLOR;
*(str_++) = TEXT_COLOR_RED;
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_SHADOW;
*(str_++) = TEXT_COLOR_LIGHT_RED;
*(str_++) = CHAR_MALE;
break;
case MON_FEMALE:
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_COLOR;
*(str_++) = TEXT_COLOR_GREEN;
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_SHADOW;
*(str_++) = TEXT_COLOR_LIGHT_GREEN;
*(str_++) = CHAR_FEMALE;
break;
}
*(str_++) = EXT_CTRL_CODE_BEGIN;
*(str_++) = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
*(str_++) = TEXT_COLOR_BLUE;
*(str_++) = TEXT_COLOR_TRANSPARENT;
*(str_++) = TEXT_COLOR_LIGHT_BLUE;
*(str_++) = CHAR_SLASH;
*(str_++) = CHAR_EXTRA_SYMBOL;
*(str_++) = CHAR_LV_2;
txtPtr = str_;
str_ = ConvertIntToDecimalStringN(str_, level, STR_CONV_MODE_LEFT_ALIGN, 3);
lvlDigits = str_ - txtPtr;
*(str_++) = CHAR_SPACE;
if (!arg3)
{
lvlDigits = 3 - lvlDigits;
while (lvlDigits-- != 0)
*(str_++) = CHAR_SPACE;
}
*str_ = EOS;
return str_;
}
void CopyMonNameGenderLocation(s16 id, u8 arg1)
{
u16 boxId, i;
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
if (id != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1))
{
CopyMonConditionNameGender(structPtr->nameBuffer[arg1], id, FALSE);
boxId = monListPtr->monData[id].boxId;
structPtr->searchLocBuffer[arg1][0] = EXT_CTRL_CODE_BEGIN;
structPtr->searchLocBuffer[arg1][1] = EXT_CTRL_CODE_COLOR_HIGHLIGHT_SHADOW;
structPtr->searchLocBuffer[arg1][2] = TEXT_COLOR_BLUE;
structPtr->searchLocBuffer[arg1][3] = TEXT_COLOR_TRANSPARENT;
structPtr->searchLocBuffer[arg1][4] = TEXT_COLOR_LIGHT_BLUE;
if (boxId == TOTAL_BOXES_COUNT)
CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], gText_InParty, 8);
else
CopyStringLeftAlignedToConditionData(&structPtr->searchLocBuffer[arg1][5], GetBoxNamePtr(boxId), 8);
}
else
{
for (i = 0; i < 12; i++)
structPtr->nameBuffer[arg1][i] = CHAR_SPACE;
structPtr->nameBuffer[arg1][i] = EOS;
for (i = 0; i < 8; i++)
structPtr->searchLocBuffer[arg1][i] = CHAR_SPACE;
structPtr->searchLocBuffer[arg1][i] = EOS;
}
}
void InitPartyConditionListParameters(void)
{
u16 i, count;
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
struct PokenavSub18 *monListPtr = AllocSubstruct(POKENAV_SUBSTRUCT_MON_LIST, sizeof(struct PokenavSub18));
structPtr->searchMode = 0;
for (i = 0, count = 0; i < CalculatePlayerPartyCount(); i++)
{
if (!GetMonData(&gPlayerParty[i], MON_DATA_IS_EGG))
{
monListPtr->monData[count].boxId = TOTAL_BOXES_COUNT;
monListPtr->monData[count].monId = i;
monListPtr->monData[count].data = 0;
count++;
}
}
monListPtr->monData[count].boxId = 0;
monListPtr->monData[count].monId = 0;
monListPtr->monData[count].data = 0;
monListPtr->currIndex = 0;
monListPtr->listCount = count + 1;
structPtr->state = 0;
}
void sub_81CD9F8(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
structPtr->searchMode = 1;
structPtr->state = 0;
}
void GetMonConditionGraphData(s16 id, u8 arg1)
{
u16 boxId, monId, i;
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
if (id != (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1))
{
boxId = monListPtr->monData[id].boxId;
monId = monListPtr->monData[id].monId;
structPtr->conditionData.stat[arg1][0] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_COOL, NULL);
structPtr->conditionData.stat[arg1][1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_TOUGH, NULL);
structPtr->conditionData.stat[arg1][2] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SMART, NULL);
structPtr->conditionData.stat[arg1][3] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_CUTE, NULL);
structPtr->conditionData.stat[arg1][4] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_BEAUTY, NULL);
structPtr->sheen[arg1] = (GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) != 255)
? GetBoxOrPartyMonData(boxId, monId, MON_DATA_SHEEN, NULL) / 29u
: 9;
structPtr->monMarks[arg1] = GetBoxOrPartyMonData(boxId, monId, MON_DATA_MARKINGS, NULL);
sub_81D2754(structPtr->conditionData.stat[arg1], structPtr->conditionData.unk14[arg1]);
}
else
{
for (i = 0; i < FLAVOR_COUNT; i++)
{
structPtr->conditionData.stat[arg1][i] = 0;
structPtr->conditionData.unk14[arg1][i].unk0 = 155;
structPtr->conditionData.unk14[arg1][i].unk2 = 91;
}
}
}
void ConditionGraphDrawMonPic(s16 index, u8 arg1)
{
u16 boxId, monId, species;
u32 personality, tid;
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
if (index == (IsConditionMenuSearchMode() != 0 ? monListPtr->listCount : monListPtr->listCount - 1))
return;
boxId = monListPtr->monData[index].boxId;
monId = monListPtr->monData[index].monId;
species = GetBoxOrPartyMonData(boxId, monId, MON_DATA_SPECIES2, NULL);
tid = GetBoxOrPartyMonData(boxId, monId, MON_DATA_OT_ID, NULL);
personality = GetBoxOrPartyMonData(boxId, monId, MON_DATA_PERSONALITY, NULL);
LoadSpecialPokePic(&gMonFrontPicTable[species], structPtr->monPicGfx[arg1], species, personality, TRUE);
LZ77UnCompWram(GetMonSpritePalFromSpeciesAndPersonality(species, tid, personality), structPtr->monPal[arg1]);
}
u16 GetMonListCount(void)
{
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
return monListPtr->listCount;
}
u16 GetConditionGraphCurrentMonIndex(void)
{
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
return monListPtr->currIndex;
}
struct ConditionGraph *GetConditionGraphDataPtr(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return &structPtr->conditionData;
}
u8 GetMonMarkIndex(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->mark;
}
u8 sub_81CDC9C(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->monIndex;
}
void *GetConditionMonPicGfx(u8 id)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->monPicGfx[id];
}
void *GetConditionMonPal(u8 id)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->monPal[id];
}
u8 sub_81CDCEC(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->unk6789;
}
u8 *GetConditionMonNameBuffer(u8 id)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->nameBuffer[id];
}
u8 *GetConditionMonLocationBuffer(u8 id)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->searchLocBuffer[id];
}
u16 GetConditionMonDataBuffer(void)
{
struct PokenavSub18 *monListPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_MON_LIST);
return monListPtr->monData[monListPtr->currIndex].data;
}
bool32 IsConditionMenuSearchMode(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
if (structPtr->searchMode == 1)
return TRUE;
else
return FALSE;
}
u8 TryGetMonMarkId(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
if (structPtr->searchMode == 1)
return structPtr->monMarks[structPtr->mark];
else
return 0;
}
u8 GetMonSheen(void)
{
struct PokenavSub11 *structPtr = GetSubstructPtr(POKENAV_SUBSTRUCT_CONDITION_GRAPH);
return structPtr->sheen[structPtr->mark];
}
|