summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2020-04-13 08:42:31 -0400
committerGriffinR <griffin.g.richards@gmail.com>2020-04-13 08:42:31 -0400
commitdde4a0416c8dfb1177d04a309edd74546fb9c5fe (patch)
tree3336007b7f0d1d1f66804a3e49b938818e2c0a7f /src
parent8a317787336453de51becf840bad5603e015d69e (diff)
Label GCN link flags field
Diffstat (limited to 'src')
-rw-r--r--src/new_game.c2
-rw-r--r--src/save_location.c21
2 files changed, 12 insertions, 11 deletions
diff --git a/src/new_game.c b/src/new_game.c
index 464da6414..290c0c2bb 100644
--- a/src/new_game.c
+++ b/src/new_game.c
@@ -162,7 +162,7 @@ void NewGameInitData(void)
ClearSav1();
ClearMailData();
gSaveBlock2Ptr->specialSaveWarpFlags = 0;
- gSaveBlock2Ptr->field_A8 = 0;
+ gSaveBlock2Ptr->gcnLinkFlags = 0;
InitPlayerTrainerId();
PlayTimeCounter_Reset();
ClearPokedexFlags();
diff --git a/src/save_location.c b/src/save_location.c
index 6bf5eceb0..aa56d7b16 100644
--- a/src/save_location.c
+++ b/src/save_location.c
@@ -118,17 +118,18 @@ void TrySetMapSaveWarpStatus(void)
sub_81AFD5C();
}
-// Called when receiving the Pokedex
-// Only place field_A8 is written (aside from clearing on new game), never read
-void sub_81AFDA0(void)
+// In FRLG, only 0x1, 0x10, and 0x20 are set when the pokedex is received
+// 0x2, 0x4, 0x8, and 0x8000 are instead set by SetPostgameFlags
+// These flags are read by Pokemon Colosseum/XD for linking. XD Additionally requires FLAG_SYS_GAME_CLEAR
+void SetUnlockedPokedexFlags(void)
{
- gSaveBlock2Ptr->field_A8 |= 0x8000;
- gSaveBlock2Ptr->field_A8 |= 0x1;
- gSaveBlock2Ptr->field_A8 |= 0x2;
- gSaveBlock2Ptr->field_A8 |= 0x4;
- gSaveBlock2Ptr->field_A8 |= 0x10;
- gSaveBlock2Ptr->field_A8 |= 0x20;
- gSaveBlock2Ptr->field_A8 |= 0x8;
+ gSaveBlock2Ptr->gcnLinkFlags |= 0x8000;
+ gSaveBlock2Ptr->gcnLinkFlags |= 0x1;
+ gSaveBlock2Ptr->gcnLinkFlags |= 0x2;
+ gSaveBlock2Ptr->gcnLinkFlags |= 0x4;
+ gSaveBlock2Ptr->gcnLinkFlags |= 0x10;
+ gSaveBlock2Ptr->gcnLinkFlags |= 0x20;
+ gSaveBlock2Ptr->gcnLinkFlags |= 0x8;
}
void SetChampionSaveWarp(void)