Identified Map Event Flags

This commit is contained in:
h2o-DS 2024-10-22 22:27:40 -04:00
parent b7b9298e21
commit 9d444917dc
11 changed files with 274 additions and 272 deletions

View File

@ -4,11 +4,13 @@
#include "overlay021/struct_ov21_021D0F60_decl.h"
#include "overlay021/struct_ov21_021E68F4.h"
#define TERMINALVALUE 0xffff
#define POKEDEXMAPXSCALE 5
#define POKEDEXMAPYSCALE 5
#define POKEDEXMAPHEIGHT 30
#define POKEDEXMAPWIDTH 30
#define POKEDEXMAPNUMCELLS (POKEDEXMAPHEIGHT * POKEDEXMAPWIDTH)
#define NUMDUNGEONS 22
void ov21_021DC9BC(UnkStruct_ov21_021E68F4 *param0, UnkStruct_ov21_021D0F60 *param1, int heapID);
void ov21_021DCA14(UnkStruct_ov21_021E68F4 *param0);

View File

@ -4,7 +4,7 @@
typedef struct {
u8 xCoordinate;
u8 yCoordinate;
u8 unk_02;
u8 isMtCoronet;
u8 unused;
} dungeonCoordinates;

View File

@ -10,10 +10,10 @@ typedef struct {
const PokedexData *unk_00;
const TrainerInfo *unk_04;
int timeOfDay;
BOOL pokedexSFlag_1;
BOOL pokedexSFlag_2;
BOOL pokedexSFlag_3;
BOOL pokedexSFlag_4;
BOOL fullmoonIslandVisible;
BOOL newmoonIslandVisible;
BOOL springPathVisible;
BOOL seabreakPathVisible;
UnkStruct_0209ACBC *unk_1C;
} UnkStruct_ov21_021D0D80;

View File

@ -9,10 +9,10 @@ typedef struct {
const PokedexData *dexData;
const TrainerInfo *unk_04;
int timeOfDay;
BOOL pokedexSFlag_1;
BOOL pokedexSFlag_2;
BOOL pokedexSFlag_3;
BOOL pokedexSFlag_4;
BOOL fullmoonIslandVisible;
BOOL newmoonIslandVisible;
BOOL springPathVisible;
BOOL seabreakPathVisible;
u32 unk_1C;
u32 unk_20;
} UnkStruct_ov21_021D3208;

View File

@ -24,10 +24,10 @@ typedef struct {
int unk_1758;
u16 unk_175C;
u16 unk_175E;
BOOL pokedexSFlag_1; // VarsFlags->vars[54]
BOOL pokedexSFlag_2; // VarsFlags->vars[55]
BOOL pokedexSFlag_3; // VarsFlags->vars[56]
BOOL pokedexSFlag_4; // VarsFlags->vars[57]
BOOL fullmoonIslandVisible;
BOOL newmoonIslandVisible;
BOOL springPathVisible;
BOOL seabreakPathVisible;
} pokedexStatus;
#endif // POKEPLATINUM_STRUCT_POKEDEXSTATUS_H

View File

@ -959,10 +959,10 @@ static BOOL FieldMenu_Pokedex(TaskManager *taskMan)
v2->unk_00 = v3;
v2->unk_04 = v4;
v2->timeOfDay = sub_02055BA8(fieldSystem);
v2->pokedexSFlag_1 = sub_0206B1F0(v5, 0); // VarsFlags->vars[54]
v2->pokedexSFlag_2 = sub_0206B1F0(v5, 1); // VarsFlags->vars[55]
v2->pokedexSFlag_3 = sub_0206B1F0(v5, 2); // VarsFlags->vars[56]
v2->pokedexSFlag_4 = sub_0206B1F0(v5, 3); // VarsFlags->vars[57]
v2->fullmoonIslandVisible = sub_0206B1F0(v5, 0); // VarsFlags->vars[54] Fullmoon Island
v2->newmoonIslandVisible = sub_0206B1F0(v5, 1); // VarsFlags->vars[55] Newmoon Island
v2->springPathVisible = sub_0206B1F0(v5, 2); // VarsFlags->vars[56] Spring Path
v2->seabreakPathVisible = sub_0206B1F0(v5, 3); // VarsFlags->vars[57] Seabreak Path
v2->unk_1C = fieldSystem->unk_B4;
sub_0203E0AC(fieldSystem, v2);

View File

@ -154,10 +154,10 @@ int ov21_021D0D80(OverlayManager *param0, int *param1)
v2.unk_00 = v1->unk_00;
v2.unk_04 = v1->unk_04;
v2.timeOfDay = v1->timeOfDay;
v2.pokedexSFlag_1 = v1->pokedexSFlag_1;
v2.pokedexSFlag_4 = v1->pokedexSFlag_4;
v2.pokedexSFlag_2 = v1->pokedexSFlag_2;
v2.pokedexSFlag_3 = v1->pokedexSFlag_3;
v2.fullmoonIslandVisible = v1->fullmoonIslandVisible;
v2.seabreakPathVisible = v1->seabreakPathVisible;
v2.newmoonIslandVisible = v1->newmoonIslandVisible;
v2.springPathVisible = v1->springPathVisible;
v2.unk_1C = v1->unk_1C;
v0->unk_00 = ov21_021D0F60(37, &v2);
@ -322,10 +322,10 @@ UnkStruct_ov21_021D0F60 *ov21_021D0F60(int param0, const UnkStruct_ov21_021D0D80
v2.dexData = param1->unk_00;
v2.unk_04 = param1->unk_04;
v2.timeOfDay = param1->timeOfDay;
v2.pokedexSFlag_1 = param1->pokedexSFlag_1;
v2.pokedexSFlag_2 = param1->pokedexSFlag_2;
v2.pokedexSFlag_3 = param1->pokedexSFlag_3;
v2.pokedexSFlag_4 = param1->pokedexSFlag_4;
v2.fullmoonIslandVisible = param1->fullmoonIslandVisible;
v2.newmoonIslandVisible = param1->newmoonIslandVisible;
v2.springPathVisible = param1->springPathVisible;
v2.seabreakPathVisible = param1->seabreakPathVisible;
v2.unk_1C = sub_0209ACE4(param1->unk_1C);
v2.unk_20 = sub_0209ACEC(param1->unk_1C);

View File

@ -109,23 +109,23 @@ void ov21_021D58C0(u8 *mapFieldCellMatrix, u8 mapHeight, u8 mapWidth, const fiel
}
}
u32 ov21_021D5948(u8 *mapFieldCellMatrix, int mapHeight, int mapWidth, const fieldCoordinates *fieldCoordArray, const mapsEncounteredOn *mapsEncOn, const u8 *mapArray, u32 mapArrayLength)
u32 ov21_021D5948(u8 *mapFieldCellMatrix, int mapHeight, int mapWidth, const fieldCoordinates *fieldCoordArray, const mapsEncounteredOn *mapsEncOn, const u8 *fieldIDArray, u32 fieldIDArrayLength)
{
int index;
int mapArrayIndex;
int fieldIndex;
int fieldIDArrayIndex;
u32 v2 = 0;
for (index = 0; index < mapsEncOn->numMapsEncounteredOn - 1; index++) {
GF_ASSERT(mapsEncOn->mapsEncounteredOnArray[index]);
for (fieldIndex = 0; fieldIndex < mapsEncOn->numMapsEncounteredOn - 1; fieldIndex++) {
GF_ASSERT(mapsEncOn->mapsEncounteredOnArray[fieldIndex]);
for (mapArrayIndex = 0; mapArrayIndex < mapArrayLength; mapArrayIndex++) {
if (mapsEncOn->mapsEncounteredOnArray[index] == mapArray[mapArrayIndex]) {
for (fieldIDArrayIndex = 0; fieldIDArrayIndex < fieldIDArrayLength; fieldIDArrayIndex++) {
if (mapsEncOn->mapsEncounteredOnArray[fieldIndex] == fieldIDArray[fieldIDArrayIndex]) {
break;
}
}
if (mapArrayIndex >= mapArrayLength) {
ov21_021D58C0(mapFieldCellMatrix, mapHeight, mapWidth, &fieldCoordArray[mapsEncOn->mapsEncounteredOnArray[index]]);
if (fieldIDArrayIndex >= fieldIDArrayLength) {
ov21_021D58C0(mapFieldCellMatrix, mapHeight, mapWidth, &fieldCoordArray[mapsEncOn->mapsEncounteredOnArray[fieldIndex]]);
v2++;
}
}
@ -144,37 +144,37 @@ void ov21_021D59D8(CellActor *actor, int xOffset, int yOffset, int xScale, int y
CellActor_SetPosition(actor, &position);
if (dungeonCoords->unk_02) {
if (dungeonCoords->isMtCoronet) {
CellActor_SetAnim(actor, animID_2);
} else {
CellActor_SetAnim(actor, animID_1);
}
}
int ov21_021D5A20(CellActor **cellActorArray, int initialNumDungeons, int param2, int xOffset, int yOffset, int xScale, int yScale, const dungeonCoordinates *dungeonCoordinatesArray, const mapsEncounteredOn *mapsEncOn, int animID_1, int animID_2, const u8 *mapArray, u32 mapArrayLength, u32 *param13)
int ov21_021D5A20(CellActor **cellActorArray, int initialNumDungeons, int maxNumDungeons, int xOffset, int yOffset, int xScale, int yScale, const dungeonCoordinates *dungeonCoordinatesArray, const mapsEncounteredOn *dungeonsEncounteredOn, int animID_1, int animID_2, const u8 *dungeonsToSkip, u32 numDungeonsToSkip, u32 *param13)
{
int index, mapArrayIndex;
int dungeonIndex, dungeonsToSkipIndex;
int numDungeons = initialNumDungeons;
int v3 = 0;
int DungeonCount = 0;
for (index = 0; index < mapsEncOn->numMapsEncounteredOn - 1; index++) {
GF_ASSERT(mapsEncOn->mapsEncounteredOnArray[index]);
GF_ASSERT(numDungeons < param2);
for (dungeonIndex = 0; dungeonIndex < dungeonsEncounteredOn->numMapsEncounteredOn - 1; dungeonIndex++) {
GF_ASSERT(dungeonsEncounteredOn->mapsEncounteredOnArray[dungeonIndex]);
GF_ASSERT(numDungeons < maxNumDungeons);
for (mapArrayIndex = 0; mapArrayIndex < mapArrayLength; mapArrayIndex++) {
if (mapsEncOn->mapsEncounteredOnArray[index] == mapArray[mapArrayIndex]) {
for (dungeonsToSkipIndex = 0; dungeonsToSkipIndex < numDungeonsToSkip; dungeonsToSkipIndex++) {
if (dungeonsEncounteredOn->mapsEncounteredOnArray[dungeonIndex] == dungeonsToSkip[dungeonsToSkipIndex]) {
break;
}
}
if (mapArrayIndex >= mapArrayLength) {
ov21_021D59D8(cellActorArray[numDungeons], xOffset, yOffset, xScale, yScale, &dungeonCoordinatesArray[mapsEncOn->mapsEncounteredOnArray[index]], animID_1, animID_2);
if (dungeonsToSkipIndex >= numDungeonsToSkip) {
ov21_021D59D8(cellActorArray[numDungeons], xOffset, yOffset, xScale, yScale, &dungeonCoordinatesArray[dungeonsEncounteredOn->mapsEncounteredOnArray[dungeonIndex]], animID_1, animID_2);
numDungeons++;
v3++;
DungeonCount++;
}
}
*param13 = v3;
*param13 = DungeonCount;
return numDungeons;
}

View File

@ -39,37 +39,37 @@
#include "unk_02018340.h"
#include "unk_0201F834.h"
static const u16 extraFieldsStructFlag_1[] = {
0xffff
static const u16 fullmoonIslandFields[] = {
TERMINALVALUE
};
static const u16 Unk_ov21_021E9D76[] = {
0xffff
static const u16 fullmoonIslandDungeons[] = {
TERMINALVALUE
};
static const u16 extraFieldsStructFlag_4[] = {
0xffff
static const u16 seabreakPathFields[] = {
TERMINALVALUE
};
static const u16 Unk_ov21_021E9D72[] = {
0xffff
static const u16 seabreakPathDungeons[] = {
TERMINALVALUE
};
static const u16 extraFieldsStructFlag_2[] = {
0xffff
static const u16 newmoonIslandFields[] = {
TERMINALVALUE
};
static const u16 Unk_ov21_021E9D6E[] = {
0xffff
static const u16 newmoonIslandDungeons[] = {
TERMINALVALUE
};
static const u16 extraFieldsStructFlag_3[] = {
0xffff
static const u16 springPathFields[] = {
TERMINALVALUE
};
static const u16 Unk_ov21_021E9D7A[] = {
0xA,
0xffff
static const u16 springPathDungeons[] = {
10,
TERMINALVALUE
};
enum EncounterTime {
@ -94,10 +94,10 @@ typedef struct {
typedef struct {
int encounterTime;
u8 *extraFields;
u8 *extraDungeons;
u32 numExtraFields;
u32 numExtraDungeons;
u8 *invisibleFields;
u8 *invisibleDungeons;
u32 numInvisibleFields;
u32 numInvisibleDungeons;
mapsEncounteredOn dungeonsEncounteredOn;
mapsEncounteredOn fieldsEncounteredOn;
mapsEncounteredOn dungeonSpecialEncounters;
@ -106,7 +106,7 @@ typedef struct {
typedef struct {
int encounterTime;
CellActor *cellActorArray[44];
CellActor *cellActorArray[NUMDUNGEONS * 2];
SpriteResource *unk_B4[4];
int numDungeons;
CellActor *unk_C8;
@ -135,7 +135,7 @@ static UnkStruct_ov21_021DCAE0 *ov21_021DCAA0(int param0, UnkStruct_ov21_021D0F6
static void ov21_021DCACC(UnkStruct_ov21_021DCACC *param0);
static void ov21_021DCAE0(UnkStruct_ov21_021DCAE0 *param0);
static int ov21_021DCAF4(void);
static int ov21_021DCAF8(UnkStruct_ov21_021E6A68 *param0, void *param1);
static int PokedexEncounters_PopulateEncounterCollection(UnkStruct_ov21_021E6A68 *param0, void *param1);
static int ov21_021DCB6C(UnkStruct_ov21_021E6A68 *param0, void *param1);
static int ov21_021DCBA8(UnkStruct_ov21_021E6A68 *param0, void *param1);
static int ov21_021DCBD8(void *param0, UnkStruct_ov21_021E6B20 *param1, const void *param2, const UnkStruct_ov21_021E6A68 *param3);
@ -155,7 +155,7 @@ static void ov21_021DD668(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0
static void ov21_021DD6C0(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1);
static void ov21_021DCFC8(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, int param2);
static void ov21_021DD114(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1);
static void ov21_021DD1A8(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, int param2);
static void ov21_021DD1A8(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, int heapID);
static void ov21_021DD2B8(PokedexMapDisplay *mapDisplay);
static void ov21_021DD2E0(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, const UnkStruct_ov21_021DCACC *param2, int param3);
static void ov21_021DD3FC(PokedexMapDisplay *mapDisplay);
@ -164,13 +164,13 @@ static void ov21_021DDA48(PokedexMapDisplay *mapDisplay, int param1);
static void ov21_021DDA80(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, const UnkStruct_ov21_021DCACC *param2, const encounterCollection *enCollection, int param4);
static void ov21_021DD710(PokedexMapDisplay *mapDisplay, const UnkStruct_ov21_021DCACC *param1, const encounterCollection *enCollection, int param3);
static void ov21_021DD8B4(PokedexMapDisplay *mapDisplay);
static u8 *ov21_021DD900(u32 heapID, const UnkStruct_ov21_021DCACC *param1, u32 *param2);
static u8 *ov21_021DD908(u32 param0, const UnkStruct_ov21_021DCACC *param1, u32 *param2);
static u8 *PokedexEncounters_InvisibleFields(u32 heapID, const UnkStruct_ov21_021DCACC *param1, u32 *param2);
static u8 *PokedexEncounters_InvisibleDungeons(u32 param0, const UnkStruct_ov21_021DCACC *param1, u32 *param2);
static void ov21_021DD964(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1);
static void ov21_021DDB8C(PokedexMapDisplay *mapDisplay);
static void ov21_021DDBCC(PokedexMapDisplay *mapDisplay);
static void ov21_021DDC14(PokedexMapDisplay *mapDisplay);
static void ov21_021DDABC(encounterCollection *enCollection, UnkStruct_ov21_021DCACC *param1, int heapID);
static void PokedexEncounters_PopulateCategories(encounterCollection *enCollection, UnkStruct_ov21_021DCACC *param1, int heapID);
static void ov21_021DDB68(encounterCollection *enCollection);
void ov21_021DC9BC(UnkStruct_ov21_021E68F4 *param0, UnkStruct_ov21_021D0F60 *param1, int heapID)
@ -185,7 +185,7 @@ void ov21_021DC9BC(UnkStruct_ov21_021E68F4 *param0, UnkStruct_ov21_021D0F60 *par
param0->unk_04 = v1;
param0->unk_20 = NULL;
param0->unk_24 = ov21_021DCAF4();
param0->unk_08[0] = ov21_021DCAF8;
param0->unk_08[0] = PokedexEncounters_PopulateEncounterCollection;
param0->unk_08[1] = ov21_021DCB6C;
param0->unk_08[2] = ov21_021DCBA8;
param0->unk_14[0] = ov21_021DCBD8;
@ -280,7 +280,7 @@ static int ov21_021DCAF4(void)
return 0;
}
static int ov21_021DCAF8(UnkStruct_ov21_021E6A68 *param0, void *param1)
static int PokedexEncounters_PopulateEncounterCollection(UnkStruct_ov21_021E6A68 *param0, void *param1)
{
UnkStruct_ov21_021DCACC *v0 = param1;
encounterCollection *encCollection;
@ -302,10 +302,10 @@ static int ov21_021DCAF8(UnkStruct_ov21_021E6A68 *param0, void *param1)
}
}
encCollection->extraFields = ov21_021DD900(param0->heapID, v0, &encCollection->numExtraFields);
encCollection->extraDungeons = ov21_021DD908(param0->heapID, v0, &encCollection->numExtraDungeons);
encCollection->invisibleFields = PokedexEncounters_InvisibleFields(param0->heapID, v0, &encCollection->numInvisibleFields);
encCollection->invisibleDungeons = PokedexEncounters_InvisibleDungeons(param0->heapID, v0, &encCollection->numInvisibleDungeons);
ov21_021DDABC(encCollection, v0, param0->heapID);
PokedexEncounters_PopulateCategories(encCollection, v0, param0->heapID);
encCollection->encounterTime = v0->encounterTime;
@ -327,7 +327,7 @@ static int ov21_021DCB6C(UnkStruct_ov21_021E6A68 *param0, void *param1)
if (encCollection->encounterTime != v0->encounterTime) {
ov21_021DDB68(encCollection);
ov21_021DDABC(encCollection, v0, param0->heapID);
PokedexEncounters_PopulateCategories(encCollection, v0, param0->heapID);
encCollection->encounterTime = v0->encounterTime;
}
@ -338,12 +338,12 @@ static int ov21_021DCBA8(UnkStruct_ov21_021E6A68 *param0, void *param1)
{
encounterCollection *enCollection = param0->unk_08;
if (enCollection->extraFields) {
Heap_FreeToHeap(enCollection->extraFields);
if (enCollection->invisibleFields) {
Heap_FreeToHeap(enCollection->invisibleFields);
}
if (enCollection->extraDungeons) {
Heap_FreeToHeap(enCollection->extraDungeons);
if (enCollection->invisibleDungeons) {
Heap_FreeToHeap(enCollection->invisibleDungeons);
}
ov21_021DDB68(enCollection);
@ -472,13 +472,13 @@ static int ov21_021DCD04(void *param0, UnkStruct_ov21_021E6B20 *param1, const vo
return 0;
}
static void ov21_021DCDD0(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, const UnkStruct_ov21_021DCACC *param2, const encounterCollection *enCollection, int param4)
static void ov21_021DCDD0(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, const UnkStruct_ov21_021DCACC *param2, const encounterCollection *enCollection, int heapID)
{
ov21_021DCE40(param1, param2, param4);
ov21_021DD668(mapDisplay, param1, param4);
ov21_021DCFC8(mapDisplay, param1, param4);
ov21_021DD1A8(mapDisplay, param1, param4);
ov21_021DD2E0(mapDisplay, param1, param2, param4);
ov21_021DCE40(param1, param2, heapID);
ov21_021DD668(mapDisplay, param1, heapID);
ov21_021DCFC8(mapDisplay, param1, heapID);
ov21_021DD1A8(mapDisplay, param1, heapID);
ov21_021DD2E0(mapDisplay, param1, param2, heapID);
ov21_021DDA48(mapDisplay, param2->encounterTime);
ov21_021DDCF4(param1, param2);
}
@ -503,28 +503,28 @@ static void ov21_021DCE40(UnkStruct_ov21_021DCAE0 *param0, const UnkStruct_ov21_
sub_020198C0(param0->unk_00->unk_00, 3, v1->rawData, 0, 0, v1->screenWidth / 8, v1->screenHeight / 8);
Heap_FreeToHeap(v0);
if (param1->dexStatus->pokedexSFlag_2) {
if (param1->dexStatus->newmoonIslandVisible) {
v0 = ov21_021D27B8(param0->unk_00, 65, 1, &v1, param2);
sub_020198C0(param0->unk_00->unk_00, 3, v1->rawData, 13, 8, v1->screenWidth / 8, v1->screenHeight / 8);
Heap_FreeToHeap(v0);
}
if (param1->dexStatus->pokedexSFlag_4) {
if (param1->dexStatus->seabreakPathVisible) {
v0 = ov21_021D27B8(param0->unk_00, 66, 1, &v1, param2);
sub_020198C0(param0->unk_00->unk_00, 3, v1->rawData, 28, 7, v1->screenWidth / 8, v1->screenHeight / 8);
Heap_FreeToHeap(v0);
}
if (param1->dexStatus->pokedexSFlag_1) {
if (param1->dexStatus->fullmoonIslandVisible) {
v0 = ov21_021D27B8(param0->unk_00, 67, 1, &v1, param2);
sub_020198C0(param0->unk_00->unk_00, 3, v1->rawData, 11, 8, v1->screenWidth / 8, v1->screenHeight / 8);
Heap_FreeToHeap(v0);
}
if (param1->dexStatus->pokedexSFlag_3) {
if (param1->dexStatus->springPathVisible) {
v0 = ov21_021D27B8(param0->unk_00, 68, 1, &v1, param2);
sub_020198C0(param0->unk_00->unk_00, 3, v1->rawData, 25, 16, v1->screenWidth / 8, v1->screenHeight / 8);
@ -576,7 +576,7 @@ static void ov21_021DD114(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0
SpriteResourceCollection_Remove(v0->unk_13C[3], mapDisplay->unk_D0[3]);
}
static void ov21_021DD1A8(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, int param2)
static void ov21_021DD1A8(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1, int heapID)
{
CellActorResourceData v0;
CellActorInitParams v1;
@ -589,7 +589,7 @@ static void ov21_021DD1A8(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0
v1.resourceData = &v0;
v1.priority = 31;
v1.vramType = NNS_G2D_VRAM_TYPE_2DMAIN;
v1.heapID = param2;
v1.heapID = heapID;
v1.position.x = 160 * FX32_ONE;
v1.position.y = 96 * FX32_ONE;
@ -602,11 +602,11 @@ static void ov21_021DD1A8(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0
v1.resourceData = &v0;
v1.priority = 31;
v1.vramType = NNS_G2D_VRAM_TYPE_2DMAIN;
v1.heapID = param2;
v1.heapID = heapID;
v1.position.x = 0;
v1.position.y = 0;
for (v3 = 0; v3 < (22 * 2); v3++) {
for (v3 = 0; v3 < (NUMDUNGEONS * 2); v3++) {
mapDisplay->cellActorArray[v3] = CellActorCollection_Add(&v1);
CellActor_SetDrawFlag(mapDisplay->cellActorArray[v3], 0);
CellActor_SetExplicitOAMMode(mapDisplay->cellActorArray[v3], GX_OAM_MODE_XLU);
@ -620,7 +620,7 @@ static void ov21_021DD2B8(PokedexMapDisplay *mapDisplay)
CellActor_Delete(mapDisplay->unk_C8);
mapDisplay->unk_C8 = NULL;
for (v0 = 0; v0 < (22 * 2); v0++) {
for (v0 = 0; v0 < (NUMDUNGEONS * 2); v0++) {
CellActor_Delete(mapDisplay->cellActorArray[v0]);
mapDisplay->cellActorArray[v0] = NULL;
}
@ -836,23 +836,23 @@ static void ov21_021DD710(PokedexMapDisplay *mapDisplay, const UnkStruct_ov21_02
int xOffset, yOffset;
int species;
u8 *combinedMapArray;
int numMaps;
int numCombinedMaps;
ov21_021DD8B4(mapDisplay);
mapDisplay->unk_838 = ov21_021D5948(mapDisplay->mapFieldCellMatrix_1, POKEDEXMAPHEIGHT, POKEDEXMAPWIDTH, mapDisplay->fieldCoordinatesArray, &enCollection->fieldsEncounteredOn, enCollection->extraFields, enCollection->numExtraFields);
numMaps = (enCollection->fieldsEncounteredOn.numMapsEncounteredOn - 1) + enCollection->numExtraFields;
combinedMapArray = Heap_AllocFromHeapAtEnd(heapID, numMaps);
mapDisplay->unk_838 = ov21_021D5948(mapDisplay->mapFieldCellMatrix_1, POKEDEXMAPHEIGHT, POKEDEXMAPWIDTH, mapDisplay->fieldCoordinatesArray, &enCollection->fieldsEncounteredOn, enCollection->invisibleFields, enCollection->numInvisibleFields);
numCombinedMaps = (enCollection->fieldsEncounteredOn.numMapsEncounteredOn - 1) + enCollection->numInvisibleFields;
combinedMapArray = Heap_AllocFromHeapAtEnd(heapID, numCombinedMaps);
for (index = 0; index < numMaps; index++) {
if (index < enCollection->numExtraFields) {
combinedMapArray[index] = enCollection->extraFields[index];
for (index = 0; index < numCombinedMaps; index++) {
if (index < enCollection->numInvisibleFields) {
combinedMapArray[index] = enCollection->invisibleFields[index];
} else {
combinedMapArray[index] = enCollection->fieldsEncounteredOn.mapsEncounteredOnArray[index - enCollection->numExtraFields];
combinedMapArray[index] = enCollection->fieldsEncounteredOn.mapsEncounteredOnArray[index - enCollection->numInvisibleFields];
}
}
mapDisplay->unk_840 = ov21_021D5948(mapDisplay->mapFieldCellMatrix_2, POKEDEXMAPHEIGHT, POKEDEXMAPWIDTH, mapDisplay->fieldCoordinatesArray, &enCollection->fieldSpecialEncounters, combinedMapArray, numMaps);
mapDisplay->unk_840 = ov21_021D5948(mapDisplay->mapFieldCellMatrix_2, POKEDEXMAPHEIGHT, POKEDEXMAPWIDTH, mapDisplay->fieldCoordinatesArray, &enCollection->fieldSpecialEncounters, combinedMapArray, numCombinedMaps);
Heap_FreeToHeap(combinedMapArray);
MapFieldCellMatrix_SmoothCells(mapDisplay->mapFieldCellMatrix_1, POKEDEXMAPHEIGHT, POKEDEXMAPWIDTH);
@ -873,20 +873,20 @@ static void ov21_021DD710(PokedexMapDisplay *mapDisplay, const UnkStruct_ov21_02
}
mapDisplay->numDungeons = 0;
mapDisplay->numDungeons = ov21_021D5A20(mapDisplay->cellActorArray, mapDisplay->numDungeons, (22 * 2), xOffset, yOffset, POKEDEXMAPXSCALE, POKEDEXMAPYSCALE, mapDisplay->dungeonCoordinatesArray, &enCollection->dungeonsEncounteredOn, 2, v2, enCollection->extraDungeons, enCollection->numExtraDungeons, &mapDisplay->unk_834);
mapDisplay->numDungeons = ov21_021D5A20(mapDisplay->cellActorArray, mapDisplay->numDungeons, (NUMDUNGEONS * 2), xOffset, yOffset, POKEDEXMAPXSCALE, POKEDEXMAPYSCALE, mapDisplay->dungeonCoordinatesArray, &enCollection->dungeonsEncounteredOn, 2, v2, enCollection->invisibleDungeons, enCollection->numInvisibleDungeons, &mapDisplay->unk_834);
numMaps = (enCollection->dungeonsEncounteredOn.numMapsEncounteredOn - 1) + enCollection->numExtraDungeons;
combinedMapArray = Heap_AllocFromHeapAtEnd(heapID, numMaps);
numCombinedMaps = (enCollection->dungeonsEncounteredOn.numMapsEncounteredOn - 1) + enCollection->numInvisibleDungeons;
combinedMapArray = Heap_AllocFromHeapAtEnd(heapID, numCombinedMaps);
for (index = 0; index < numMaps; index++) {
if (index < enCollection->numExtraDungeons) {
combinedMapArray[index] = enCollection->extraDungeons[index];
for (index = 0; index < numCombinedMaps; index++) {
if (index < enCollection->numInvisibleDungeons) {
combinedMapArray[index] = enCollection->invisibleDungeons[index];
} else {
combinedMapArray[index] = enCollection->dungeonsEncounteredOn.mapsEncounteredOnArray[index - enCollection->numExtraDungeons];
combinedMapArray[index] = enCollection->dungeonsEncounteredOn.mapsEncounteredOnArray[index - enCollection->numInvisibleDungeons];
}
}
mapDisplay->numDungeons = ov21_021D5A20(mapDisplay->cellActorArray, mapDisplay->numDungeons, (22 * 2), xOffset, yOffset, POKEDEXMAPXSCALE, POKEDEXMAPYSCALE, mapDisplay->dungeonCoordinatesArray, &enCollection->dungeonSpecialEncounters, 3, v3, combinedMapArray, numMaps, &mapDisplay->unk_83C);
mapDisplay->numDungeons = ov21_021D5A20(mapDisplay->cellActorArray, mapDisplay->numDungeons, (NUMDUNGEONS * 2), xOffset, yOffset, POKEDEXMAPXSCALE, POKEDEXMAPYSCALE, mapDisplay->dungeonCoordinatesArray, &enCollection->dungeonSpecialEncounters, 3, v3, combinedMapArray, numCombinedMaps, &mapDisplay->unk_83C);
Heap_FreeToHeap(combinedMapArray);
}
@ -905,198 +905,198 @@ static void ov21_021DD8B4(PokedexMapDisplay *mapDisplay)
mapDisplay->numDungeons = 0;
}
static u8 *ov21_021DD900(u32 heapID, const UnkStruct_ov21_021DCACC *param1, u32 *numExtraFields)
static u8 *PokedexEncounters_InvisibleFields(u32 heapID, const UnkStruct_ov21_021DCACC *param1, u32 *numInvisibleFields)
{
u32 extraFieldCount;
u32 fieldCount;
int index;
u8 *extraFields;
u8 *invisibleFields;
extraFieldCount = 0;
fieldCount = 0;
if (param1->dexStatus->pokedexSFlag_1 == 0) {
if (param1->dexStatus->fullmoonIslandVisible == 0) {
index = 0;
while (extraFieldsStructFlag_1[index] != 0xffff) {
extraFieldCount++;
while (fullmoonIslandFields[index] != TERMINALVALUE) {
fieldCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_4 == 0) {
if (param1->dexStatus->seabreakPathVisible == 0) {
index = 0;
while (extraFieldsStructFlag_4[index] != 0xffff) {
extraFieldCount++;
while (seabreakPathFields[index] != TERMINALVALUE) {
fieldCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_2 == 0) {
if (param1->dexStatus->newmoonIslandVisible == 0) {
index = 0;
while (extraFieldsStructFlag_2[index] != 0xffff) {
extraFieldCount++;
while (newmoonIslandFields[index] != TERMINALVALUE) {
fieldCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_3 == 0) {
if (param1->dexStatus->springPathVisible == 0) {
index = 0;
while (extraFieldsStructFlag_3[index] != 0xffff) {
extraFieldCount++;
while (springPathFields[index] != TERMINALVALUE) {
fieldCount++;
index++;
}
}
if (extraFieldCount > 0) {
extraFields = Heap_AllocFromHeap(heapID, sizeof(u8) * extraFieldCount);
if (fieldCount > 0) {
invisibleFields = Heap_AllocFromHeap(heapID, sizeof(u8) * fieldCount);
} else {
extraFields = NULL;
invisibleFields = NULL;
}
*numExtraFields = extraFieldCount;
*numInvisibleFields = fieldCount;
extraFieldCount = 0;
fieldCount = 0;
if (param1->dexStatus->pokedexSFlag_1 == 0) {
if (param1->dexStatus->fullmoonIslandVisible == 0) {
index = 0;
while (extraFieldsStructFlag_1[index] != 0xffff) {
extraFields[extraFieldCount] = extraFieldsStructFlag_1[index];
extraFieldCount++;
while (fullmoonIslandFields[index] != TERMINALVALUE) {
invisibleFields[fieldCount] = fullmoonIslandFields[index];
fieldCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_4 == 0) {
if (param1->dexStatus->seabreakPathVisible == 0) {
index = 0;
while (extraFieldsStructFlag_4[index] != 0xffff) {
extraFields[extraFieldCount] = extraFieldsStructFlag_4[index];
extraFieldCount++;
while (seabreakPathFields[index] != TERMINALVALUE) {
invisibleFields[fieldCount] = seabreakPathFields[index];
fieldCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_2 == 0) {
if (param1->dexStatus->newmoonIslandVisible == 0) {
index = 0;
while (extraFieldsStructFlag_2[index] != 0xffff) {
extraFields[extraFieldCount] = extraFieldsStructFlag_2[index];
extraFieldCount++;
while (newmoonIslandFields[index] != TERMINALVALUE) {
invisibleFields[fieldCount] = newmoonIslandFields[index];
fieldCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_3 == 0) {
if (param1->dexStatus->springPathVisible == 0) {
index = 0;
while (extraFieldsStructFlag_3[index] != 0xffff) {
extraFields[extraFieldCount] = extraFieldsStructFlag_3[index];
extraFieldCount++;
while (springPathFields[index] != TERMINALVALUE) {
invisibleFields[fieldCount] = springPathFields[index];
fieldCount++;
index++;
}
}
return extraFields;
return invisibleFields;
}
static u8 *ov21_021DD908(u32 param0, const UnkStruct_ov21_021DCACC *param1, u32 *numExtraDungeons)
static u8 *PokedexEncounters_InvisibleDungeons(u32 param0, const UnkStruct_ov21_021DCACC *param1, u32 *numInvisibleDungeons)
{
u32 extraDungeonCount;
u32 dungeonCount;
int index;
u8 *extraDungeons;
u8 *invisibleDungeons;
extraDungeonCount = 0;
dungeonCount = 0;
if (param1->dexStatus->pokedexSFlag_1 == 0) {
if (param1->dexStatus->fullmoonIslandVisible == 0) {
index = 0;
while (Unk_ov21_021E9D76[index] != 0xffff) {
extraDungeonCount++;
while (fullmoonIslandDungeons[index] != TERMINALVALUE) {
dungeonCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_4 == 0) {
if (param1->dexStatus->seabreakPathVisible == 0) {
index = 0;
while (Unk_ov21_021E9D72[index] != 0xffff) {
extraDungeonCount++;
while (seabreakPathDungeons[index] != TERMINALVALUE) {
dungeonCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_2 == 0) {
if (param1->dexStatus->newmoonIslandVisible == 0) {
index = 0;
while (Unk_ov21_021E9D6E[index] != 0xffff) {
extraDungeonCount++;
while (newmoonIslandDungeons[index] != TERMINALVALUE) {
dungeonCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_3 == 0) {
if (param1->dexStatus->springPathVisible == 0) {
index = 0;
while (Unk_ov21_021E9D7A[index] != 0xffff) {
extraDungeonCount++;
while (springPathDungeons[index] != TERMINALVALUE) {
dungeonCount++;
index++;
}
}
if (extraDungeonCount > 0) {
extraDungeons = Heap_AllocFromHeap(param0, sizeof(u8) * extraDungeonCount);
if (dungeonCount > 0) {
invisibleDungeons = Heap_AllocFromHeap(param0, sizeof(u8) * dungeonCount);
} else {
extraDungeons = NULL;
invisibleDungeons = NULL;
}
*numExtraDungeons = extraDungeonCount;
*numInvisibleDungeons = dungeonCount;
extraDungeonCount = 0;
dungeonCount = 0;
if (param1->dexStatus->pokedexSFlag_1 == 0) {
if (param1->dexStatus->fullmoonIslandVisible == 0) {
index = 0;
while (Unk_ov21_021E9D76[index] != 0xffff) {
extraDungeons[extraDungeonCount] = Unk_ov21_021E9D76[index];
extraDungeonCount++;
while (fullmoonIslandDungeons[index] != TERMINALVALUE) {
invisibleDungeons[dungeonCount] = fullmoonIslandDungeons[index];
dungeonCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_4 == 0) {
if (param1->dexStatus->seabreakPathVisible == 0) {
index = 0;
while (Unk_ov21_021E9D72[index] != 0xffff) {
extraDungeons[extraDungeonCount] = Unk_ov21_021E9D72[index];
extraDungeonCount++;
while (seabreakPathDungeons[index] != TERMINALVALUE) {
invisibleDungeons[dungeonCount] = seabreakPathDungeons[index];
dungeonCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_2 == 0) {
if (param1->dexStatus->newmoonIslandVisible == 0) {
index = 0;
while (Unk_ov21_021E9D6E[index] != 0xffff) {
extraDungeons[extraDungeonCount] = Unk_ov21_021E9D6E[index];
extraDungeonCount++;
while (newmoonIslandDungeons[index] != TERMINALVALUE) {
invisibleDungeons[dungeonCount] = newmoonIslandDungeons[index];
dungeonCount++;
index++;
}
}
if (param1->dexStatus->pokedexSFlag_3 == 0) {
if (param1->dexStatus->springPathVisible == 0) {
index = 0;
while (Unk_ov21_021E9D7A[index] != 0xffff) {
extraDungeons[extraDungeonCount] = Unk_ov21_021E9D7A[index];
extraDungeonCount++;
while (springPathDungeons[index] != TERMINALVALUE) {
invisibleDungeons[dungeonCount] = springPathDungeons[index];
dungeonCount++;
index++;
}
}
return extraDungeons;
return invisibleDungeons;
}
static void ov21_021DD964(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0 *param1)
@ -1144,7 +1144,7 @@ static void ov21_021DDA80(PokedexMapDisplay *mapDisplay, UnkStruct_ov21_021DCAE0
}
}
static void ov21_021DDABC(encounterCollection *enCollection, UnkStruct_ov21_021DCACC *param1, int heapID)
static void PokedexEncounters_PopulateCategories(encounterCollection *enCollection, UnkStruct_ov21_021DCACC *param1, int heapID)
{
int dungeonCategory;
int fieldCategory;

View File

@ -98,10 +98,10 @@ void Pokedex_Sort_PopulatepokedexStatus(pokedexStatus *dexStatus, UnkStruct_ov21
Pokedex_HeightWeightData_Load(dexStatus->HWData, 1, heapID);
}
dexStatus->pokedexSFlag_1 = param1->pokedexSFlag_1;
dexStatus->pokedexSFlag_2 = param1->pokedexSFlag_2;
dexStatus->pokedexSFlag_3 = param1->pokedexSFlag_3;
dexStatus->pokedexSFlag_4 = param1->pokedexSFlag_4;
dexStatus->fullmoonIslandVisible = param1->fullmoonIslandVisible;
dexStatus->newmoonIslandVisible = param1->newmoonIslandVisible;
dexStatus->springPathVisible = param1->springPathVisible;
dexStatus->seabreakPathVisible = param1->seabreakPathVisible;
}
void pokedexstatus(pokedexStatus *dexStatus)

View File

@ -27,7 +27,7 @@ static BOOL sub_0206AFE0(VarsFlags *param0, u16 param1, u16 param2)
{
u16 *v0 = VarsFlags_GetVarAddress(param0, param1);
if ((param1 < 0x4000) || (param1 > 0x8000)) {
if ((param1 < VARS_START) || (param1 > SPECIAL_VARS_START)) {
GF_ASSERT(FALSE);
return 0;
}
@ -53,28 +53,28 @@ static u16 sub_0206B010(VarsFlags *param0, u16 param1)
BOOL sub_0206B024(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (15 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (15 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B034(VarsFlags *param0)
{
return sub_0206B010(param0, (15 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (15 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B044(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (0 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (0 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B054(VarsFlags *param0)
{
return sub_0206B010(param0, (0 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (0 + (((0 + VARS_START) + 32) + 16)));
}
u16 sub_0206B064(VarsFlags *param0)
{
u16 v0;
u16 v1 = sub_0206B010(param0, (0 + (((0 + 0x4000) + 32) + 16)));
u16 v1 = sub_0206B010(param0, (0 + (((0 + VARS_START) + 32) + 16)));
if (v1 == 387) {
v0 = 390;
@ -90,7 +90,7 @@ u16 sub_0206B064(VarsFlags *param0)
u16 sub_0206B08C(VarsFlags *param0)
{
u16 v0;
u16 v1 = sub_0206B010(param0, (0 + (((0 + 0x4000) + 32) + 16)));
u16 v1 = sub_0206B010(param0, (0 + (((0 + VARS_START) + 32) + 16)));
if (v1 == 387) {
v0 = 393;
@ -105,12 +105,12 @@ u16 sub_0206B08C(VarsFlags *param0)
u16 sub_0206B0B4(VarsFlags *param0)
{
return sub_0206B010(param0, (5 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (5 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B0C4(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (5 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (5 + (((0 + VARS_START) + 32) + 16)), param1);
}
void VsSeeker_Reset(VarsFlags *param0)
@ -121,22 +121,22 @@ void VsSeeker_Reset(VarsFlags *param0)
u16 VsSeeker_GetBattery(VarsFlags *param0)
{
return sub_0206B010(param0, (3 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (3 + (((0 + VARS_START) + 32) + 16)));
}
BOOL VsSeeker_SetBattery(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (3 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (3 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 VsSeeker_GetActiveStepCount(VarsFlags *param0)
{
return sub_0206B010(param0, (4 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (4 + (((0 + VARS_START) + 32) + 16)));
}
BOOL VsSeeker_SetActiveStepCount(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (4 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (4 + (((0 + VARS_START) + 32) + 16)), param1);
}
static int sub_0206B128(int param0)
@ -154,12 +154,12 @@ static int sub_0206B128(int param0)
void sub_0206B144(VarsFlags *param0, int param1)
{
sub_0206AFE0(param0, (19 + (((0 + 0x4000) + 32) + 16)) + param1, sub_0206B128(param1));
sub_0206AFE0(param0, (19 + (((0 + VARS_START) + 32) + 16)) + param1, sub_0206B128(param1));
}
BOOL sub_0206B16C(VarsFlags *param0, int param1)
{
if (sub_0206B010(param0, (19 + (((0 + 0x4000) + 32) + 16)) + param1) == sub_0206B128(param1)) {
if (sub_0206B010(param0, (19 + (((0 + VARS_START) + 32) + 16)) + param1) == sub_0206B128(param1)) {
return 1;
} else {
return 0;
@ -169,10 +169,10 @@ BOOL sub_0206B16C(VarsFlags *param0, int param1)
static int sub_0206B194(int param0)
{
static const u16 v0[] = {
0x208,
0x229,
0x312,
0x1028,
520,
553,
786,
4136,
};
GF_ASSERT(0 <= param0 && param0 < 4);
@ -181,17 +181,17 @@ static int sub_0206B194(int param0)
void sub_0206B1B0(VarsFlags *param0, int param1)
{
sub_0206AFE0(param0, (6 + (((0 + 0x4000) + 32) + 16)) + param1, sub_0206B194(param1));
sub_0206AFE0(param0, (6 + (((0 + VARS_START) + 32) + 16)) + param1, sub_0206B194(param1));
}
void sub_0206B1D8(VarsFlags *param0, int param1)
{
sub_0206AFE0(param0, (6 + (((0 + 0x4000) + 32) + 16)) + param1, 0);
sub_0206AFE0(param0, (6 + (((0 + VARS_START) + 32) + 16)) + param1, 0);
}
BOOL sub_0206B1F0(VarsFlags *param0, int param1)
{
if (sub_0206B010(param0, (6 + (((0 + 0x4000) + 32) + 16)) + param1) == sub_0206B194(param1)) {
if (sub_0206B010(param0, (6 + (((0 + VARS_START) + 32) + 16)) + param1) == sub_0206B194(param1)) {
return 1;
} else {
return 0;
@ -200,19 +200,19 @@ BOOL sub_0206B1F0(VarsFlags *param0, int param1)
BOOL sub_0206B218(VarsFlags *param0)
{
return sub_0206AFE0(param0, (10 + (((0 + 0x4000) + 32) + 16)), 0);
return sub_0206AFE0(param0, (10 + (((0 + VARS_START) + 32) + 16)), 0);
}
u16 sub_0206B228(VarsFlags *param0)
{
return sub_0206B010(param0, (10 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (10 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B238(VarsFlags *param0)
{
u16 v0;
v0 = sub_0206B010(param0, (10 + (((0 + 0x4000) + 32) + 16)));
v0 = sub_0206B010(param0, (10 + (((0 + VARS_START) + 32) + 16)));
if (v0 < 10000) {
v0++;
@ -220,17 +220,17 @@ BOOL sub_0206B238(VarsFlags *param0)
v0 = 10000;
}
return sub_0206AFE0(param0, (10 + (((0 + 0x4000) + 32) + 16)), v0);
return sub_0206AFE0(param0, (10 + (((0 + VARS_START) + 32) + 16)), v0);
}
u16 sub_0206B260(VarsFlags *param0)
{
return sub_0206B010(param0, (11 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (11 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B270(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (11 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (11 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B280(VarsFlags *param0, u32 param1)
@ -239,16 +239,16 @@ void sub_0206B280(VarsFlags *param0, u32 param1)
v1 = (param1 >> 16) & 0xffff;
v0 = param1 & 0xffff;
sub_0206AFE0(param0, (12 + (((0 + 0x4000) + 32) + 16)), v0);
sub_0206AFE0(param0, (12 + (((0 + 0x4000) + 32) + 16)), v1);
sub_0206AFE0(param0, (12 + (((0 + VARS_START) + 32) + 16)), v0);
sub_0206AFE0(param0, (12 + (((0 + VARS_START) + 32) + 16)), v1);
}
u32 sub_0206B2A4(VarsFlags *param0)
{
u16 v0, v1;
v0 = sub_0206B010(param0, (12 + (((0 + 0x4000) + 32) + 16)));
v1 = sub_0206B010(param0, (13 + (((0 + 0x4000) + 32) + 16)));
v0 = sub_0206B010(param0, (12 + (((0 + VARS_START) + 32) + 16)));
v1 = sub_0206B010(param0, (13 + (((0 + VARS_START) + 32) + 16)));
return (v1 << 16) | v0;
}
@ -276,12 +276,12 @@ void sub_0206B2E4(SaveData *param0, u16 param1)
u16 sub_0206B314(VarsFlags *param0)
{
return sub_0206B010(param0, (17 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (17 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B324(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (17 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (17 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B334(SaveData *param0)
@ -297,46 +297,46 @@ u16 sub_0206B354(VarsFlags *param0)
{
u16 v0;
v0 = sub_0206B010(param0, (14 + (((0 + 0x4000) + 32) + 16)));
v0 = sub_0206B010(param0, (14 + (((0 + VARS_START) + 32) + 16)));
return v0;
}
BOOL sub_0206B364(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (14 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (14 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B374(VarsFlags *param0)
{
u16 v0;
v0 = sub_0206B010(param0, (25 + (((0 + 0x4000) + 32) + 16)));
v0 = sub_0206B010(param0, (25 + (((0 + VARS_START) + 32) + 16)));
return v0;
}
BOOL sub_0206B384(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (25 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (25 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B394(VarsFlags *param0)
{
u16 v0;
v0 = sub_0206B010(param0, (16 + (((0 + 0x4000) + 32) + 16)));
v0 = sub_0206B010(param0, (16 + (((0 + VARS_START) + 32) + 16)));
return v0;
}
BOOL sub_0206B3A4(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (16 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (16 + (((0 + VARS_START) + 32) + 16)), param1);
}
BOOL sub_0206B3B4(VarsFlags *param0)
{
u16 v0;
v0 = sub_0206B010(param0, (18 + (((0 + 0x4000) + 32) + 16)));
v0 = sub_0206B010(param0, (18 + (((0 + VARS_START) + 32) + 16)));
if (v0 < 10000) {
v0++;
@ -344,67 +344,67 @@ BOOL sub_0206B3B4(VarsFlags *param0)
v0 = 10000;
}
return sub_0206AFE0(param0, (18 + (((0 + 0x4000) + 32) + 16)), v0);
return sub_0206AFE0(param0, (18 + (((0 + VARS_START) + 32) + 16)), v0);
}
u16 sub_0206B3DC(VarsFlags *param0)
{
return sub_0206B010(param0, (18 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (18 + (((0 + VARS_START) + 32) + 16)));
}
u16 sub_0206B3EC(VarsFlags *param0)
{
return sub_0206B010(param0, (36 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (36 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B3FC(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (36 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (36 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B40C(VarsFlags *param0)
{
return sub_0206B010(param0, (23 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (23 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B41C(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (23 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (23 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B42C(VarsFlags *param0)
{
return sub_0206B010(param0, (24 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (24 + (((0 + VARS_START) + 32) + 16)));
}
BOOL sub_0206B43C(VarsFlags *param0, u16 param1)
{
return sub_0206AFE0(param0, (24 + (((0 + 0x4000) + 32) + 16)), param1);
return sub_0206AFE0(param0, (24 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B44C(VarsFlags *param0)
{
return sub_0206B010(param0, (26 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (26 + (((0 + VARS_START) + 32) + 16)));
}
void sub_0206B45C(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (26 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (26 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B46C(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (27 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (27 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B47C(VarsFlags *param0)
{
return sub_0206B010(param0, (27 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (27 + (((0 + VARS_START) + 32) + 16)));
}
void sub_0206B48C(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (29 + (((0 + 0x4000) + 32) + 16)), (param1 + 1));
sub_0206AFE0(param0, (29 + (((0 + VARS_START) + 32) + 16)), (param1 + 1));
}
static const u8 Unk_020EFA70[] = {
@ -468,88 +468,88 @@ void sub_0206B514(SaveData *param0)
void sub_0206B558(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (30 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (42 + (((0 + 0x4000) + 32) + 16)), (LCRNG_Next() % 5));
sub_0206AFE0(param0, (30 + (((0 + VARS_START) + 32) + 16)), param1);
sub_0206AFE0(param0, (42 + (((0 + VARS_START) + 32) + 16)), (LCRNG_Next() % 5));
}
u16 sub_0206B588(VarsFlags *param0)
{
return sub_0206B010(param0, (32 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (32 + (((0 + VARS_START) + 32) + 16)));
}
u16 sub_0206B598(VarsFlags *param0)
{
return sub_0206B010(param0, (33 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (33 + (((0 + VARS_START) + 32) + 16)));
}
u16 sub_0206B5A8(VarsFlags *param0)
{
return sub_0206B010(param0, (34 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (34 + (((0 + VARS_START) + 32) + 16)));
}
u16 sub_0206B5B8(VarsFlags *param0)
{
return sub_0206B010(param0, (35 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (35 + (((0 + VARS_START) + 32) + 16)));
}
u16 sub_0206B5C8(VarsFlags *param0)
{
return sub_0206B010(param0, (31 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (31 + (((0 + VARS_START) + 32) + 16)));
}
u16 sub_0206B5D8(VarsFlags *param0)
{
return sub_0206B010(param0, (37 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (37 + (((0 + VARS_START) + 32) + 16)));
}
void sub_0206B5E8(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (37 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (37 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B5F8(VarsFlags *param0)
{
return sub_0206B010(param0, (38 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (38 + (((0 + VARS_START) + 32) + 16)));
}
void sub_0206B608(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (38 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (38 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B618(VarsFlags *param0)
{
return sub_0206B010(param0, (39 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (39 + (((0 + VARS_START) + 32) + 16)));
}
void sub_0206B628(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (39 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (39 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B638(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (40 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (40 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B648(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (41 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (41 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B658(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (46 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (46 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B668(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (47 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (47 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B678(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (48 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (48 + (((0 + VARS_START) + 32) + 16)), param1);
}
void sub_0206B688(VarsFlags *param0, u16 param1, u16 param2)
@ -577,15 +577,15 @@ void sub_0206B688(VarsFlags *param0, u16 param1, u16 param2)
u16 sub_0206B6DC(VarsFlags *param0)
{
return sub_0206B010(param0, (43 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (43 + (((0 + VARS_START) + 32) + 16)));
}
void sub_0206B6EC(VarsFlags *param0, u16 param1)
{
sub_0206AFE0(param0, (43 + (((0 + 0x4000) + 32) + 16)), param1);
sub_0206AFE0(param0, (43 + (((0 + VARS_START) + 32) + 16)), param1);
}
u16 sub_0206B6FC(VarsFlags *param0)
{
return sub_0206B010(param0, (52 + (((0 + 0x4000) + 32) + 16)));
return sub_0206B010(param0, (52 + (((0 + VARS_START) + 32) + 16)));
}