Skip to main content

Town Map Spots

These structures are used to describe the Town Map selectable structures in Heart Gold and Soul Silver as they appear baked into Overlay 101. See Editing the Town Map for more information.


GearMapTownOverlay Struct Description

struct GearMapTownOverlay
{
/* 0x0 */ u16 mapHeader;
/* 0x2 */ u16 gateAppearance; // not sure
/* 0x4 */ u8 entry; // maybe
/* 0x5 */ u8 entry2; // maybe
/* 0x6 */ u8 redX;
/* 0x7 */ u8 redY;
/* 0x8 */ u8 grayX;
/* 0x9 */ u8 grayY;
/* 0xA */ u8 townDimY:4; // msn
u8 townDimX:4; // lsn
/* 0xB */ u8 replacementDimY:4; // msn
u8 replacementDimX:4; // lsn
/* 0xC */ u8 offsetY:4; // msn
u8 offsetX:4; // lsn
/* 0xD */ u8 padding;
}; // entry size = 0xE
Field NameDescriptionData Type
mapHeaderthe map header that the entry describesu16
gateAppearancethe map header that describes gates for the entryu16
entrythe entry in this table (maybe?)u8
entry2the entry in recorded visit (has player visited entry?)u8
redXthe base x coordinate for the red blocks (shifted right one)u8
redYthe base y coordinate for the red blocks (shifted up one)u8
grayXthe base x coordinate for the gray block on the imageu8
grayYthe base y coordinate for the gray block on the imageu8
townDimYthe amount of matrix chunks the town spans up and downu8:4 (4 bits)
townDimXthe amount of matrix chunks the town spans left and rightu8:4 (4 bits)
offsetYy offset within the replacement block of the actual townu8:4 (4 bits)
offsetXx offset within the replacement block of the actual townu8:4 (4 bits)
paddingunused (ensures next entry is 2-byte aligned)u8

GearMapTownSelectionOverlay Struct Description

struct GearMapTownSelectionOverlay
{
/* 0x0 */ u16 mapHeader;
/* 0x2 */ u8 baseX; // in poke gear position
/* 0x3 */ u8 baseY; // in poke gear position
/* 0x4 */ u8 dimY:4; // msn
u8 dimX:4; // lsn
/* 0x5 */ u8 flags;
/* 0x6 */ u8 textEntry; // in a027 file 273
/* 0x7 */ u8 flySpot;
/* 0x8 */ u32 padding;
/* 0xC */ u8 orangeBaseX; // in image
/* 0xD */ u8 orangeBaseY; // in image
/* 0xE */ u8 orangeDimX; // in image
/* 0xF */ u8 orangeDimY; // in image
}; // size = 0x10
Field NameDescriptionData Type
mapHeaderthe map header that the entry describesu16
baseXbase x position in PokéGearu8
baseYbase y position in PokéGearu8
dimYy dimension of selection overlay in tilesu8:4 (4 bits)
dimXx dimension of selection overlay in tilesu8:4 (4 bits)
flagsflags that seemingly control when/how things are shownu8
textEntrytext entry to use from a027 file 273 for the blurbu8
flySpottowns with a fly spot have this nonzerou8
paddingunused fieldu32
orangeBaseXbase x position in image of the orange overlay blocku8
orangeBaseYbase y position in image of the orange overlay blocku8
orangeDimXx dimension in image of the orange overlay blocku8
orangeDimYy dimension in image of the orange overlay blocku8