summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2018-04-23 23:00:25 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2018-04-23 23:00:25 -0400
commit33bb43db0de5d7d60ab8eff6db0ac305d403474f (patch)
tree41e89824643d61d307a13dbc3449b25c51742133
parent9b650159461c2538fc366364465f54c938ff79cc (diff)
Decompile some data objects
-rw-r--r--data/pokedex_area_screen.s26
-rw-r--r--include/region_map_sections.h141
-rw-r--r--ld_script.txt1
-rw-r--r--src/pokedex_area_screen.c171
4 files changed, 182 insertions, 157 deletions
diff --git a/data/pokedex_area_screen.s b/data/pokedex_area_screen.s
index 6d52e30a5..0742ef5a4 100644
--- a/data/pokedex_area_screen.s
+++ b/data/pokedex_area_screen.s
@@ -3,32 +3,6 @@
.section .rodata
-gUnknown_083F8418:: @ 83F8418
- .incbin "graphics/pokedex/area_glow.gbapal"
-
-gUnknown_083F8438:: @ 83F8438
- .incbin "graphics/pokedex/area_glow.4bpp.lz"
-
- .align 1
-gUnknown_083F856C:: @ 83F856C
- .2byte 360
-
- .align 1
-gUnknown_083F856E:: @ 83F856E
- .2byte 328, 0, 34
- .2byte 412, 0, 0
-
- .align 1
-gUnknown_083F857A:: @ 83F857A
- .2byte 85, 2142 @ FLAG_LANDMARK_SKY_PILLAR
- .2byte 68, 2119 @ FLAG_LANDMARK_SEAFLOOR_CAVERN
- .2byte 88, 0
-
-@ XXX: what is this?
- .align 2
-gUnknown_083F8588::
- .4byte gSharedMem
-
.align 2
gUnknown_083F858C:: @ 83F858C
obj_tiles AreaMarkerTiles, 0x80, 2
diff --git a/include/region_map_sections.h b/include/region_map_sections.h
index a3bd60b59..e606c2a5f 100644
--- a/include/region_map_sections.h
+++ b/include/region_map_sections.h
@@ -3,58 +3,95 @@
enum
{
- MAPSEC_LittlerootTown, // 0x00
- MAPSEC_OldaleTown, // 0x01
- MAPSEC_DewfordTown, // 0x02
- MAPSEC_LavaridgeTown, // 0x03
- MAPSEC_FallarborTown, // 0x04
- MAPSEC_VerdanturfTown, // 0x05
- MAPSEC_PacifidlogTown, // 0x06
- MAPSEC_PetalburgCity, // 0x07
- MAPSEC_SlateportCity, // 0x08
- MAPSEC_MauvilleCity, // 0x09
- MAPSEC_RustboroCity, // 0x0A
- MAPSEC_FortreeCity, // 0x0B
- MAPSEC_LilycoveCity, // 0x0C
- MAPSEC_MossdeepCity, // 0x0D
- MAPSEC_SootopolisCity, // 0x0E
- MAPSEC_EverGrandeCity, // 0x0F
- MAPSEC_Route101, // 0x10
- MAPSEC_Route102, // 0x11
- MAPSEC_Route103, // 0x12
- MAPSEC_Route104, // 0x13
- MAPSEC_Route105, // 0x14
- MAPSEC_Route106, // 0x15
- MAPSEC_Route107, // 0x16
- MAPSEC_Route108, // 0x17
- MAPSEC_Route109, // 0x18
- MAPSEC_Route110, // 0x19
- MAPSEC_Route111, // 0x1A
- MAPSEC_Route112, // 0x1B
- MAPSEC_Route113, // 0x1C
- MAPSEC_Route114, // 0x1D
- MAPSEC_Route115, // 0x1E
- MAPSEC_Route116, // 0x1F
- MAPSEC_Route117, // 0x20
- MAPSEC_Route118, // 0x21
- MAPSEC_Route119, // 0x22
- MAPSEC_Route120, // 0x23
- MAPSEC_Route121, // 0x24
- MAPSEC_Route122, // 0x25
- MAPSEC_Route123, // 0x26
- MAPSEC_Route124, // 0x27
- MAPSEC_Route125, // 0x28
- MAPSEC_Route126, // 0x29
- MAPSEC_Route127, // 0x2A
- MAPSEC_Route128, // 0x2B
- MAPSEC_Route129, // 0x2C
- MAPSEC_Route130, // 0x2D
- MAPSEC_Route131, // 0x2E
- MAPSEC_Route132, // 0x2F
- MAPSEC_Route133, // 0x30
- MAPSEC_Route134, // 0x31
- MAPSEC_MtChimney = 0x38, // 0x38
- MAPSEC_Nothing = 0x58, // 0x58
+ MAPSEC_LittlerootTown, // 0x00
+ MAPSEC_OldaleTown, // 0x01
+ MAPSEC_DewfordTown, // 0x02
+ MAPSEC_LavaridgeTown, // 0x03
+ MAPSEC_FallarborTown, // 0x04
+ MAPSEC_VerdanturfTown, // 0x05
+ MAPSEC_PacifidlogTown, // 0x06
+ MAPSEC_PetalburgCity, // 0x07
+ MAPSEC_SlateportCity, // 0x08
+ MAPSEC_MauvilleCity, // 0x09
+ MAPSEC_RustboroCity, // 0x0A
+ MAPSEC_FortreeCity, // 0x0B
+ MAPSEC_LilycoveCity, // 0x0C
+ MAPSEC_MossdeepCity, // 0x0D
+ MAPSEC_SootopolisCity, // 0x0E
+ MAPSEC_EverGrandeCity, // 0x0F
+ MAPSEC_Route101, // 0x10
+ MAPSEC_Route102, // 0x11
+ MAPSEC_Route103, // 0x12
+ MAPSEC_Route104, // 0x13
+ MAPSEC_Route105, // 0x14
+ MAPSEC_Route106, // 0x15
+ MAPSEC_Route107, // 0x16
+ MAPSEC_Route108, // 0x17
+ MAPSEC_Route109, // 0x18
+ MAPSEC_Route110, // 0x19
+ MAPSEC_Route111, // 0x1A
+ MAPSEC_Route112, // 0x1B
+ MAPSEC_Route113, // 0x1C
+ MAPSEC_Route114, // 0x1D
+ MAPSEC_Route115, // 0x1E
+ MAPSEC_Route116, // 0x1F
+ MAPSEC_Route117, // 0x20
+ MAPSEC_Route118, // 0x21
+ MAPSEC_Route119, // 0x22
+ MAPSEC_Route120, // 0x23
+ MAPSEC_Route121, // 0x24
+ MAPSEC_Route122, // 0x25
+ MAPSEC_Route123, // 0x26
+ MAPSEC_Route124, // 0x27
+ MAPSEC_Route125, // 0x28
+ MAPSEC_Route126, // 0x29
+ MAPSEC_Route127, // 0x2A
+ MAPSEC_Route128, // 0x2B
+ MAPSEC_Route129, // 0x2C
+ MAPSEC_Route130, // 0x2D
+ MAPSEC_Route131, // 0x2E
+ MAPSEC_Route132, // 0x2F
+ MAPSEC_Route133, // 0x30
+ MAPSEC_Route134, // 0x31
+ MAPSEC_Underwater124, // 0x32
+ MAPSEC_Underwater125, // 0x33
+ MAPSEC_Underwater126, // 0x34
+ MAPSEC_Underwater127, // 0x35
+ MAPSEC_UnderwaterSootopolis, // 0x36
+ MAPSEC_GraniteCave, // 0x37
+ MAPSEC_MtChimney, // 0x38
+ MAPSEC_SafariZone, // 0x39
+ MAPSEC_BattleFrontier, // 0x3A
+ MAPSEC_PetalburgWoods, // 0x3B
+ MAPSEC_RusturfTunnel, // 0x3C
+ MAPSEC_AbandonedShip, // 0x3D
+ MAPSEC_NewMauville, // 0x3E
+ MAPSEC_MeteorFalls, // 0x3F
+ MAPSEC_MeteorFalls2, // 0x40
+ MAPSEC_MtPyre, // 0x41
+ MAPSEC_AquaHideoutOld, // 0x42
+ MAPSEC_ShoalCave, // 0x43
+ MAPSEC_SeafloorCavern, // 0x44
+ MAPSEC_Underwater128, // 0x45
+ MAPSEC_VictoryRoad, // 0x46
+ MAPSEC_MirageIsland, // 0x47
+ MAPSEC_CaveOfOrigin, // 0x48
+ MAPSEC_SouthernIsland, // 0x49
+ MAPSEC_FieryPath, // 0x4A
+ MAPSEC_FieryPath2, // 0x4B
+ MAPSEC_JaggedPass, // 0x4C
+ MAPSEC_JaggedPass2, // 0x4D
+ MAPSEC_SealedChamber, // 0x4E
+ MAPSEC_UnderwaterSealedChamber, // 0x4F
+ MAPSEC_ScorchedSlab, // 0x50
+ MAPSEC_IslandCave, // 0x51
+ MAPSEC_DesertRuins, // 0x52
+ MAPSEC_AncientTomb, // 0x53
+ MAPSEC_InsideOfTruck, // 0x54
+ MAPSEC_SkyPillar, // 0x55
+ MAPSEC_SecretBase, // 0x56
+ MAPSEC_Dynamic, // 0x57
+ MAPSEC_Nothing // 0x58
};
#endif // GUARD_REGIONMAPSEC_H
diff --git a/ld_script.txt b/ld_script.txt
index 382feba7c..047638fd7 100644
--- a/ld_script.txt
+++ b/ld_script.txt
@@ -633,6 +633,7 @@ SECTIONS {
src/time_events.o(.rodata);
src/field_specials.o(.rodata);
src/battle/battle_records.o(.rodata);
+ src/pokedex_area_screen.o(.rodata);
data/pokedex_area_screen.o(.rodata);
src/evolution_scene.o(.rodata);
data/roulette.o(.rodata);
diff --git a/src/pokedex_area_screen.c b/src/pokedex_area_screen.c
index 1e910b76c..b42477a79 100644
--- a/src/pokedex_area_screen.c
+++ b/src/pokedex_area_screen.c
@@ -69,19 +69,32 @@ void sub_8111288(void);
// .rodata
-extern const u16 gUnknown_083F8418[];
-extern const u8 gUnknown_083F8438[];
-extern const u16 gUnknown_083F856C[];
-extern const u16 gUnknown_083F856E[][3];
-extern const u16 gUnknown_083F857A[][2];
+const u16 gUnknown_083F8418[] = INCBIN_U16("graphics/pokedex/area_glow.gbapal");
+
+const u8 gUnknown_083F8438[] = INCBIN_U8("graphics/pokedex/area_glow.4bpp.lz");
+
+const u16 gUnknown_083F856C[] = {SPECIES_WYNAUT};
+
+const u16 gUnknown_083F856E[][3] = {
+ {SPECIES_FEEBAS, MAP_GROUP(ROUTE119), MAP_NUM(ROUTE119)},
+ {NUM_SPECIES}
+};
+
+const u16 gUnknown_083F857A[][2] = {
+ {MAPSEC_SkyPillar, FLAG_LANDMARK_SKY_PILLAR},
+ {MAPSEC_SeafloorCavern, FLAG_LANDMARK_SEAFLOOR_CAVERN},
+ {MAPSEC_Nothing}
+};
+
+struct PokedexAreaScreenEwramStruct *const gUnknown_083F8588 = &ePokedexAreaScreen;
// .text
void UnusedPokedexAreaScreen(u16 a0, u32 a1, u32 a2)
{
- ePokedexAreaScreen.unk0004 = a1;
- ePokedexAreaScreen.unk0008 = a2;
- ePokedexAreaScreen.unk000E = a0;
+ gUnknown_083F8588->unk0004 = a1;
+ gUnknown_083F8588->unk0008 = a2;
+ gUnknown_083F8588->unk000E = a0;
SetMainCallback2(CB2_UnusedPokedexAreaScreen);
}
@@ -105,8 +118,8 @@ void CB2_UnusedPokedexAreaScreen(void)
REG_BG3VOFS = 0;
break;
case 1:
- InitRegionMap(&ePokedexAreaScreen.unk06E8, FALSE);
- StringFill(ePokedexAreaScreen.unk0F68, CHAR_SPACE, 16);
+ InitRegionMap(&gUnknown_083F8588->unk06E8, FALSE);
+ StringFill(gUnknown_083F8588->unk0F68, CHAR_SPACE, 16);
break;
case 2:
sub_8110824();
@@ -145,7 +158,7 @@ void sub_81107DC(void)
void sub_81107F0(void)
{
- ePokedexAreaScreen.unk0000();
+ gUnknown_083F8588->unk0000();
sub_8111110();
AnimateSprites();
BuildOamBuffer();
@@ -154,21 +167,21 @@ void sub_81107F0(void)
void sub_8110814(void (*func)(void))
{
- ePokedexAreaScreen.unk0000 = func;
- ePokedexAreaScreen.unk000C = 0;
+ gUnknown_083F8588->unk0000 = func;
+ gUnknown_083F8588->unk000C = 0;
}
void sub_8110824(void)
{
- ePokedexAreaScreen.unk0114 = 0;
+ gUnknown_083F8588->unk0114 = 0;
}
bool8 DrawAreaGlow(void)
{
- switch (ePokedexAreaScreen.unk0114)
+ switch (gUnknown_083F8588->unk0114)
{
case 0:
- FindMapsWithMon(ePokedexAreaScreen.unk000E);
+ FindMapsWithMon(gUnknown_083F8588->unk000E);
break;
case 1:
BuildAreaGlowTilemap();
@@ -177,19 +190,19 @@ bool8 DrawAreaGlow(void)
LZ77UnCompVram(gUnknown_083F8438, BG_CHAR_ADDR(3));
break;
case 3:
- DmaCopy16(3, ePokedexAreaScreen.unk0116, BG_SCREEN_ADDR(30), 0x500);
+ DmaCopy16(3, gUnknown_083F8588->unk0116, BG_SCREEN_ADDR(30), 0x500);
break;
case 4:
LoadPalette(gUnknown_083F8418, 0, 32);
break;
case 5:
REG_BG0CNT = BGCNT_PRIORITY(1) | BGCNT_CHARBASE(3) | BGCNT_16COLOR | BGCNT_SCREENBASE(30) | BGCNT_TXT256x256;
- ePokedexAreaScreen.unk0114++;
+ gUnknown_083F8588->unk0114++;
return FALSE;
default:
return FALSE;
}
- ePokedexAreaScreen.unk0114++;
+ gUnknown_083F8588->unk0114++;
return TRUE;
}
@@ -200,8 +213,8 @@ void FindMapsWithMon(u16 mon)
if (mon != ROAMER_SPECIES)
{
- ePokedexAreaScreen.unk0110 = 0;
- ePokedexAreaScreen.unk0112 = 0;
+ gUnknown_083F8588->unk0110 = 0;
+ gUnknown_083F8588->unk0112 = 0;
for (i = 0; i < 1; i++)
{
if (gUnknown_083F856C[i] == mon)
@@ -242,27 +255,27 @@ void FindMapsWithMon(u16 mon)
}
else
{
- ePokedexAreaScreen.unk0112 = 0;
+ gUnknown_083F8588->unk0112 = 0;
roamer = &gSaveBlock1.roamer;
if (roamer->active)
{
- GetRoamerLocation(&ePokedexAreaScreen.unk0010[0].mapGroup, &ePokedexAreaScreen.unk0010[0].mapNum);
- ePokedexAreaScreen.unk0010[0].regionMapSectionId = Overworld_GetMapHeaderByGroupAndId(ePokedexAreaScreen.unk0010[0].mapGroup, ePokedexAreaScreen.unk0010[0].mapNum)->regionMapSectionId;
- ePokedexAreaScreen.unk0110 = 1;
+ GetRoamerLocation(&gUnknown_083F8588->unk0010[0].mapGroup, &gUnknown_083F8588->unk0010[0].mapNum);
+ gUnknown_083F8588->unk0010[0].regionMapSectionId = Overworld_GetMapHeaderByGroupAndId(gUnknown_083F8588->unk0010[0].mapGroup, gUnknown_083F8588->unk0010[0].mapNum)->regionMapSectionId;
+ gUnknown_083F8588->unk0110 = 1;
}
else
- ePokedexAreaScreen.unk0110 = 0;
+ gUnknown_083F8588->unk0110 = 0;
}
}
void SetAreaHasMon(u16 mapGroup, u16 mapNum)
{
- if (ePokedexAreaScreen.unk0110 < 0x40)
+ if (gUnknown_083F8588->unk0110 < 0x40)
{
- ePokedexAreaScreen.unk0010[ePokedexAreaScreen.unk0110].mapGroup = mapGroup;
- ePokedexAreaScreen.unk0010[ePokedexAreaScreen.unk0110].mapNum = mapNum;
- ePokedexAreaScreen.unk0010[ePokedexAreaScreen.unk0110].regionMapSectionId = sub_80FBA04(Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum)->regionMapSectionId);
- ePokedexAreaScreen.unk0110++;
+ gUnknown_083F8588->unk0010[gUnknown_083F8588->unk0110].mapGroup = mapGroup;
+ gUnknown_083F8588->unk0010[gUnknown_083F8588->unk0110].mapNum = mapNum;
+ gUnknown_083F8588->unk0010[gUnknown_083F8588->unk0110].regionMapSectionId = sub_80FBA04(Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum)->regionMapSectionId);
+ gUnknown_083F8588->unk0110++;
}
}
@@ -271,7 +284,7 @@ void SetSpecialMapHasMon(u16 mapGroup, u16 mapNum)
const struct MapHeader *mapHeader;
u16 i;
- if (ePokedexAreaScreen.unk0112 < 0x20)
+ if (gUnknown_083F8588->unk0112 < 0x20)
{
mapHeader = Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum);
if (mapHeader->regionMapSectionId < MAPSEC_Nothing)
@@ -281,15 +294,15 @@ void SetSpecialMapHasMon(u16 mapGroup, u16 mapNum)
if (mapHeader->regionMapSectionId == gUnknown_083F857A[i][0] && !FlagGet(gUnknown_083F857A[i][1]))
return;
}
- for (i = 0; i < ePokedexAreaScreen.unk0112; i++)
+ for (i = 0; i < gUnknown_083F8588->unk0112; i++)
{
- if (ePokedexAreaScreen.unk0620[i] == mapHeader->regionMapSectionId)
+ if (gUnknown_083F8588->unk0620[i] == mapHeader->regionMapSectionId)
break;
}
- if (i == ePokedexAreaScreen.unk0112)
+ if (i == gUnknown_083F8588->unk0112)
{
- ePokedexAreaScreen.unk0620[i] = mapHeader->regionMapSectionId;
- ePokedexAreaScreen.unk0112++;
+ gUnknown_083F8588->unk0620[i] = mapHeader->regionMapSectionId;
+ gUnknown_083F8588->unk0112++;
}
}
}
@@ -334,18 +347,18 @@ void BuildAreaGlowTilemap(void)
u32 r3;
for (gUnknown_02039260 = 0; gUnknown_02039260 < 0x280; gUnknown_02039260++)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] = 0;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] = 0;
- for (gUnknown_02039260 = 0; gUnknown_02039260 < ePokedexAreaScreen.unk0110; gUnknown_02039260++)
+ for (gUnknown_02039260 = 0; gUnknown_02039260 < gUnknown_083F8588->unk0110; gUnknown_02039260++)
{
gUnknown_02039266 = 0;
for (gUnknown_02039264 = 0; gUnknown_02039264 < 20; gUnknown_02039264++)
{
for (gUnknown_02039262 = 0; gUnknown_02039262 < 32; gUnknown_02039262++)
{
- if (GetRegionMapSectionAt_(gUnknown_02039262, gUnknown_02039264) == ePokedexAreaScreen.unk0010[gUnknown_02039260].regionMapSectionId)
+ if (GetRegionMapSectionAt_(gUnknown_02039262, gUnknown_02039264) == gUnknown_083F8588->unk0010[gUnknown_02039260].regionMapSectionId)
{
- ePokedexAreaScreen.unk0116[gUnknown_02039266] = 0xFFFF;
+ gUnknown_083F8588->unk0116[gUnknown_02039266] = 0xFFFF;
}
gUnknown_02039266++;
}
@@ -357,24 +370,24 @@ void BuildAreaGlowTilemap(void)
{
for (gUnknown_02039262 = 0; gUnknown_02039262 < 32; gUnknown_02039262++)
{
- if (ePokedexAreaScreen.unk0116[gUnknown_02039266] == 0xFFFF)
+ if (gUnknown_083F8588->unk0116[gUnknown_02039266] == 0xFFFF)
{
- if (gUnknown_02039262 != 0 && ePokedexAreaScreen.unk0116[gUnknown_02039266 - 1] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 - 1] |= 0x02;
- if (gUnknown_02039262 != 31 && ePokedexAreaScreen.unk0116[gUnknown_02039266 + 1] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 + 1] |= 0x01;
- if (gUnknown_02039264 != 0 && ePokedexAreaScreen.unk0116[gUnknown_02039266 - 32] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 - 32] |= 0x08;
- if (gUnknown_02039264 != 19 && ePokedexAreaScreen.unk0116[gUnknown_02039266 + 32] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 + 32] |= 0x04;
- if (gUnknown_02039262 != 0 && gUnknown_02039264 != 0 && ePokedexAreaScreen.unk0116[gUnknown_02039266 - 33] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 - 33] |= 0x10;
- if (gUnknown_02039262 != 31 && gUnknown_02039264 != 0 && ePokedexAreaScreen.unk0116[gUnknown_02039266 - 31] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 - 31] |= 0x40;
- if (gUnknown_02039262 != 0 && gUnknown_02039264 != 19 && ePokedexAreaScreen.unk0116[gUnknown_02039266 + 31] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 + 31] |= 0x20;
- if (gUnknown_02039262 != 31 && gUnknown_02039264 != 19 && ePokedexAreaScreen.unk0116[gUnknown_02039266 + 33] != 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039266 + 33] |= 0x80;
+ if (gUnknown_02039262 != 0 && gUnknown_083F8588->unk0116[gUnknown_02039266 - 1] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 - 1] |= 0x02;
+ if (gUnknown_02039262 != 31 && gUnknown_083F8588->unk0116[gUnknown_02039266 + 1] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 + 1] |= 0x01;
+ if (gUnknown_02039264 != 0 && gUnknown_083F8588->unk0116[gUnknown_02039266 - 32] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 - 32] |= 0x08;
+ if (gUnknown_02039264 != 19 && gUnknown_083F8588->unk0116[gUnknown_02039266 + 32] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 + 32] |= 0x04;
+ if (gUnknown_02039262 != 0 && gUnknown_02039264 != 0 && gUnknown_083F8588->unk0116[gUnknown_02039266 - 33] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 - 33] |= 0x10;
+ if (gUnknown_02039262 != 31 && gUnknown_02039264 != 0 && gUnknown_083F8588->unk0116[gUnknown_02039266 - 31] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 - 31] |= 0x40;
+ if (gUnknown_02039262 != 0 && gUnknown_02039264 != 19 && gUnknown_083F8588->unk0116[gUnknown_02039266 + 31] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 + 31] |= 0x20;
+ if (gUnknown_02039262 != 31 && gUnknown_02039264 != 19 && gUnknown_083F8588->unk0116[gUnknown_02039266 + 33] != 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039266 + 33] |= 0x80;
}
gUnknown_02039266++;
}
@@ -382,36 +395,36 @@ void BuildAreaGlowTilemap(void)
for (gUnknown_02039260 = 0; gUnknown_02039260 < 0x280; gUnknown_02039260++) // Register difference on induction: expected r3, got r1
{
- if (ePokedexAreaScreen.unk0116[gUnknown_02039260] == 0xFFFF)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] = 0x10;
- else if (ePokedexAreaScreen.unk0116[gUnknown_02039260] != 0)
+ if (gUnknown_083F8588->unk0116[gUnknown_02039260] == 0xFFFF)
+ gUnknown_083F8588->unk0116[gUnknown_02039260] = 0x10;
+ else if (gUnknown_083F8588->unk0116[gUnknown_02039260] != 0)
{
- if (ePokedexAreaScreen.unk0116[gUnknown_02039260] & 0x02)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] &= 0xFFCF;
- if (ePokedexAreaScreen.unk0116[gUnknown_02039260] & 0x01)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] &= 0xFF3F;
- if (ePokedexAreaScreen.unk0116[gUnknown_02039260] & 0x08)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] &= 0xFFAF;
- if (ePokedexAreaScreen.unk0116[gUnknown_02039260] & 0x04)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] &= 0xFF5F;
- gUnknown_02039268 = ePokedexAreaScreen.unk0116[gUnknown_02039260] & 0x0F;
- gUnknown_0203926A = ePokedexAreaScreen.unk0116[gUnknown_02039260] & 0xF0;
+ if (gUnknown_083F8588->unk0116[gUnknown_02039260] & 0x02)
+ gUnknown_083F8588->unk0116[gUnknown_02039260] &= 0xFFCF;
+ if (gUnknown_083F8588->unk0116[gUnknown_02039260] & 0x01)
+ gUnknown_083F8588->unk0116[gUnknown_02039260] &= 0xFF3F;
+ if (gUnknown_083F8588->unk0116[gUnknown_02039260] & 0x08)
+ gUnknown_083F8588->unk0116[gUnknown_02039260] &= 0xFFAF;
+ if (gUnknown_083F8588->unk0116[gUnknown_02039260] & 0x04)
+ gUnknown_083F8588->unk0116[gUnknown_02039260] &= 0xFF5F;
+ gUnknown_02039268 = gUnknown_083F8588->unk0116[gUnknown_02039260] & 0x0F;
+ gUnknown_0203926A = gUnknown_083F8588->unk0116[gUnknown_02039260] & 0xF0;
if (gUnknown_0203926A)
{
- ePokedexAreaScreen.unk0116[gUnknown_02039260] &= 0x0F;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] &= 0x0F;
switch (gUnknown_02039268)
{
case 0:
if (gUnknown_0203926A != 0)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] += (gUnknown_0203926A >> 4) + 0x10;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] += (gUnknown_0203926A >> 4) + 0x10;
break;
case 2:
if (gUnknown_0203926A != 0)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] += (gUnknown_0203926A >> 4) + 0x1E;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] += (gUnknown_0203926A >> 4) + 0x1E;
break;
case 1:
if (gUnknown_0203926A != 0)
- ePokedexAreaScreen.unk0116[gUnknown_02039260] += (gUnknown_0203926A >> 6) + 0x20;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] += (gUnknown_0203926A >> 6) + 0x20;
break;
case 8:
if (gUnknown_0203926A != 0)
@@ -421,7 +434,7 @@ void BuildAreaGlowTilemap(void)
r3 |= 1;
if (gUnknown_0203926A & 0x20)
r3 |= 2;
- ePokedexAreaScreen.unk0116[gUnknown_02039260] += r3 + 0x20;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] += r3 + 0x20;
}
break;
case 4:
@@ -432,16 +445,16 @@ void BuildAreaGlowTilemap(void)
r3 |= 1;
if (gUnknown_0203926A & 0x10)
r3 |= 2;
- ePokedexAreaScreen.unk0116[gUnknown_02039260] += r3 + 0x21;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] += r3 + 0x21;
}
break;
case 5:
case 6:
- ePokedexAreaScreen.unk0116[gUnknown_02039260] += 0x27;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] += 0x27;
break;
case 9:
case 10:
- ePokedexAreaScreen.unk0116[gUnknown_02039260] += 0x25;
+ gUnknown_083F8588->unk0116[gUnknown_02039260] += 0x25;
break;
}
}