Split pokedex area markers

This commit is contained in:
PikalaxALT
2019-10-04 15:57:16 -04:00
parent 7e8bff29bb
commit 13416f5109
11 changed files with 38 additions and 5 deletions
+19
View File
@@ -0,0 +1,19 @@
JASC-PAL
0100
16
0 0 0
255 197 115
255 139 57
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
0 0 0
Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 B

+14
View File
@@ -501,3 +501,17 @@ $(TITLESCREENGFXDIR)/unk_8ead608.4bpp: %.4bpp: %.png
$(CREDITSGFXDIR)/unk_8EAE548.4bpp: %.4bpp: %.png
$(GFX) $< $@ -num_tiles 77
POKEDEXAREAMARKERSDATADIR := data/pokedex_area_markers
POKEDEXAREAMARKERFILES := \
$(POKEDEXAREAMARKERSDATADIR)/marker_0.4bpp \
$(POKEDEXAREAMARKERSDATADIR)/marker_1.4bpp \
$(POKEDEXAREAMARKERSDATADIR)/marker_2.4bpp \
$(POKEDEXAREAMARKERSDATADIR)/marker_3.4bpp \
$(POKEDEXAREAMARKERSDATADIR)/marker_4.4bpp \
$(POKEDEXAREAMARKERSDATADIR)/marker_5.4bpp \
$(POKEDEXAREAMARKERSDATADIR)/marker_6.4bpp
$(POKEDEXAREAMARKERSDATADIR)/marker.4bpp: $(POKEDEXAREAMARKERFILES)
cat $^ > $@
+5 -5
View File
@@ -26,7 +26,7 @@ static s32 CountRoamerNests(u16 species, struct Subsprite * subsprites);
static bool32 PokemonInAnyEncounterTableInMap(const struct WildPokemonHeader * data, s32 species);
static bool32 PokemonInEncounterTable(const struct WildPokemonInfo * pokemon, s32 species, s32 count);
static u16 GetMapSecIdFromWildMonHeader(const struct WildPokemonHeader * header);
static bool32 TryGetMapSecPokedexAreaEntry(u16 mapSecId, const u16 (*lut)[2], s32 count, s32 * lut_i_p, u16 * table_idx_p);
static bool32 TryGetMapSecPokedexAreaEntry(u16 mapSecId, const u16 (*lut)[2], s32 count, s32 * lutIdx_p, u16 * tableIdx_p);
static const u16 sDexAreas_Kanto[][2] = {
{ MAPSEC_PALLET_TOWN, 1 },
@@ -292,15 +292,15 @@ static u16 GetMapSecIdFromWildMonHeader(const struct WildPokemonHeader * header)
return get_mapheader_by_bank_and_number(header->mapGroup, header->mapNum)->regionMapSectionId;
}
static bool32 TryGetMapSecPokedexAreaEntry(u16 mapSecId, const u16 (*lut)[2], s32 count, s32 * lut_i_p, u16 * table_idx_p)
static bool32 TryGetMapSecPokedexAreaEntry(u16 mapSecId, const u16 (*lut)[2], s32 count, s32 * lutIdx_p, u16 * tableIdx_p)
{
s32 i;
for (i = *lut_i_p; i < count; i++)
for (i = *lutIdx_p; i < count; i++)
{
if (lut[i][0] == mapSecId)
{
*table_idx_p = lut[i][1];
*lut_i_p = i + 1;
*tableIdx_p = lut[i][1];
*lutIdx_p = i + 1;
return TRUE;
}
}