Merge branch 'master' into sync-numtiles
This commit is contained in:
@@ -189,7 +189,7 @@ static const struct WindowTemplate sWindowTemplates[] = {
|
||||
}
|
||||
};
|
||||
|
||||
static const u8 sUnused_8453174[] = {16, 8, 4};
|
||||
static const u8 sUnused[] = {16, 8, 4};
|
||||
|
||||
static EWRAM_DATA u8 sOpenWindows[11] = {};
|
||||
|
||||
@@ -202,9 +202,9 @@ void InitBagWindows(void)
|
||||
else
|
||||
InitWindows(sDefaultBagWindowsDeposit);
|
||||
DeactivateAllTextPrinters();
|
||||
TextWindow_SetUserSelectedFrame(0, 0x64, 0xE0);
|
||||
TextWindow_LoadResourcesStdFrame0(0, 0x6D, 0xD0);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x81, 0xC0);
|
||||
LoadUserWindowGfx(0, 0x64, 0xE0);
|
||||
LoadMenuMessageWindowGfx(0, 0x6D, 0xD0);
|
||||
LoadStdWindowGfx(0, 0x81, 0xC0);
|
||||
LoadPalette(sBagWindowPalF, 0xF0, 0x20);
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
|
||||
+68
-43
@@ -28,9 +28,9 @@ struct BattleBackground
|
||||
static void CB2_unused(void);
|
||||
static u8 GetBattleTerrainOverride(void);
|
||||
|
||||
static const u8 gUnknown_824829C[] = {1, 2};
|
||||
static const u8 sUnused[] = {1, 2};
|
||||
|
||||
static const struct OamData gOamData_82482A0 = {
|
||||
static const struct OamData sVsLetter_V_OamData = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_DOUBLE,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -46,7 +46,7 @@ static const struct OamData gOamData_82482A0 = {
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const struct OamData gOamData_82482A8 = {
|
||||
static const struct OamData sVsLetter_S_OamData = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_DOUBLE,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -62,38 +62,38 @@ static const struct OamData gOamData_82482A8 = {
|
||||
.affineParam = 0
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_82482B0[] = {
|
||||
static const union AffineAnimCmd sVsLetterAffineAnimCmds0[] = {
|
||||
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_82482C0[] = {
|
||||
static const union AffineAnimCmd sVsLetterAffineAnimCmds1[] = {
|
||||
AFFINEANIMCMD_FRAME(0x80, 0x80, 0, 0),
|
||||
AFFINEANIMCMD_FRAME(0x18, 0x18, 0x0, 0x80),
|
||||
AFFINEANIMCMD_FRAME(0x18, 0x18, 0x0, 0x80),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const gAffineAnimTable_82482E0[] = {
|
||||
gUnknown_82482B0,
|
||||
gUnknown_82482C0
|
||||
static const union AffineAnimCmd *const sVsLetterAffineAnimTable[] = {
|
||||
sVsLetterAffineAnimCmds0,
|
||||
sVsLetterAffineAnimCmds1
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sVsLetter_V_SpriteTemplate = {
|
||||
.tileTag = TAG_VS_LETTERS,
|
||||
.paletteTag = TAG_VS_LETTERS,
|
||||
.oam = &gOamData_82482A0,
|
||||
.oam = &sVsLetter_V_OamData,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.affineAnims = gAffineAnimTable_82482E0,
|
||||
.affineAnims = sVsLetterAffineAnimTable,
|
||||
.callback = SpriteCB_VsLetterDummy
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sVsLetter_S_SpriteTemplate = {
|
||||
.tileTag = TAG_VS_LETTERS,
|
||||
.paletteTag = TAG_VS_LETTERS,
|
||||
.oam = &gOamData_82482A8,
|
||||
.oam = &sVsLetter_S_OamData,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.affineAnims = gAffineAnimTable_82482E0,
|
||||
.affineAnims = sVsLetterAffineAnimTable,
|
||||
.callback = SpriteCB_VsLetterDummy
|
||||
};
|
||||
|
||||
@@ -139,8 +139,8 @@ const struct BgTemplate gBattleBgTemplates[4] = {
|
||||
}
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
{
|
||||
static const struct WindowTemplate sStandardBattleWindowTemplates[] = {
|
||||
[B_WIN_MSG] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 15,
|
||||
@@ -148,7 +148,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x090
|
||||
}, {
|
||||
},
|
||||
[B_WIN_ACTION_PROMPT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 35,
|
||||
@@ -156,7 +157,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 4,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x1c0
|
||||
}, {
|
||||
},
|
||||
[B_WIN_ACTION_MENU] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 17,
|
||||
.tilemapTop = 35,
|
||||
@@ -164,7 +166,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x190
|
||||
}, {
|
||||
},
|
||||
[B_WIN_MOVE_NAME_1] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 55,
|
||||
@@ -172,7 +175,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x300
|
||||
}, {
|
||||
},
|
||||
[B_WIN_MOVE_NAME_2] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 55,
|
||||
@@ -180,7 +184,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x310
|
||||
}, {
|
||||
},
|
||||
[B_WIN_MOVE_NAME_3] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 57,
|
||||
@@ -188,7 +193,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x320
|
||||
}, {
|
||||
},
|
||||
[B_WIN_MOVE_NAME_4] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 57,
|
||||
@@ -196,7 +202,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x330
|
||||
}, {
|
||||
},
|
||||
[B_WIN_PP] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
@@ -204,7 +211,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x290
|
||||
}, {
|
||||
},
|
||||
[B_WIN_MOVE_TYPE] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 57,
|
||||
@@ -212,7 +220,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x296
|
||||
}, {
|
||||
},
|
||||
[B_WIN_PP_REMAINING] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 24,
|
||||
.tilemapTop = 55,
|
||||
@@ -220,7 +229,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x2a6
|
||||
}, {
|
||||
},
|
||||
[B_WIN_DUMMY] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 57,
|
||||
@@ -228,7 +238,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 0,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x2b0
|
||||
}, {
|
||||
},
|
||||
[B_WIN_SWITCH_PROMPT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 55,
|
||||
@@ -236,7 +247,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x2b0
|
||||
}, {
|
||||
},
|
||||
[B_WIN_LEVEL_UP_BOX] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 8,
|
||||
@@ -244,7 +256,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 11,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x100
|
||||
}, {
|
||||
},
|
||||
[B_WIN_LEVEL_UP_BANNER] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 18,
|
||||
.tilemapTop = 0,
|
||||
@@ -252,7 +265,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 3,
|
||||
.paletteNum = 6,
|
||||
.baseBlock = 0x16e
|
||||
}, {
|
||||
},
|
||||
[B_WIN_YESNO] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 25,
|
||||
.tilemapTop = 9,
|
||||
@@ -260,7 +274,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 4,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x100
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_PLAYER] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 3,
|
||||
@@ -268,7 +283,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x020
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_OPPONENT] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 3,
|
||||
@@ -276,7 +292,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x040
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_1] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 2,
|
||||
@@ -284,7 +301,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x020
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_2] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 2,
|
||||
@@ -292,7 +310,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x040
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_3] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 6,
|
||||
@@ -300,7 +319,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x060
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_MULTI_PLAYER_4] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 6,
|
||||
@@ -308,7 +328,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 5,
|
||||
.baseBlock = 0x080
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_OUTCOME_DRAW] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 11,
|
||||
.tilemapTop = 2,
|
||||
@@ -316,7 +337,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0a0
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_OUTCOME_LEFT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 4,
|
||||
.tilemapTop = 2,
|
||||
@@ -324,7 +346,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0a0
|
||||
}, {
|
||||
},
|
||||
[B_WIN_VS_OUTCOME_RIGHT] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 19,
|
||||
.tilemapTop = 2,
|
||||
@@ -332,7 +355,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 2,
|
||||
.paletteNum = 0,
|
||||
.baseBlock = 0x0b0
|
||||
}, {
|
||||
},
|
||||
[B_WIN_OAK_OLD_MAN] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
@@ -340,7 +364,8 @@ static const struct WindowTemplate gUnknown_8248330[] = {
|
||||
.height = 4,
|
||||
.paletteNum = 7,
|
||||
.baseBlock = 0x090
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
},
|
||||
DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const u32 sBattleTerrainPalette_Grass[] = INCBIN_U32("graphics/battle_terrain/grass/terrain.gbapal.lz");
|
||||
@@ -649,7 +674,7 @@ void BattleInitBgsAndWindows(void)
|
||||
{
|
||||
ResetBgsAndClearDma3BusyFlags(FALSE);
|
||||
InitBgsFromTemplates(0, gBattleBgTemplates, NELEMS(gBattleBgTemplates));
|
||||
InitWindows(gUnknown_8248330);
|
||||
InitWindows(sStandardBattleWindowTemplates);
|
||||
DeactivateAllTextPrinters();
|
||||
}
|
||||
|
||||
@@ -665,8 +690,8 @@ void InitBattleBgsVideo(void)
|
||||
|
||||
void LoadBattleMenuWindowGfx(void)
|
||||
{
|
||||
TextWindow_SetUserSelectedFrame(2, 0x012, 0x10);
|
||||
TextWindow_SetUserSelectedFrame(2, 0x022, 0x10);
|
||||
LoadUserWindowGfx(2, 0x012, 0x10);
|
||||
LoadUserWindowGfx(2, 0x022, 0x10);
|
||||
gPlttBufferUnfaded[0x5C] = RGB( 9, 9, 9);
|
||||
gPlttBufferUnfaded[0x5D] = RGB( 9, 9, 9);
|
||||
gPlttBufferUnfaded[0x5E] = RGB(31, 31, 31);
|
||||
@@ -675,7 +700,7 @@ void LoadBattleMenuWindowGfx(void)
|
||||
if (gBattleTypeFlags & (BATTLE_TYPE_FIRST_BATTLE | BATTLE_TYPE_POKEDUDE))
|
||||
{
|
||||
Menu_LoadStdPalAt(0x70);
|
||||
TextWindow_LoadResourcesStdFrame0(0, 0x030, 0x70);
|
||||
LoadMenuMessageWindowGfx(0, 0x030, 0x70);
|
||||
gPlttBufferUnfaded[0x76] = RGB( 0, 0, 0);
|
||||
CpuCopy16(&gPlttBufferUnfaded[0x76], &gPlttBufferFaded[0x76], 2);
|
||||
}
|
||||
|
||||
@@ -151,8 +151,8 @@ static void (*const sOpponentBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
OpponentCmdEnd
|
||||
};
|
||||
|
||||
// not used
|
||||
static const u8 gUnknown_8250B18[] = { 0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20 };
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = { 0xB0, 0xB0, 0xC8, 0x98, 0x28, 0x28, 0x28, 0x20 };
|
||||
|
||||
static void OpponentDummy(void)
|
||||
{
|
||||
|
||||
@@ -170,8 +170,8 @@ static void (*const sPlayerBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
|
||||
static const u8 sTargetIdentities[] = { B_POSITION_PLAYER_LEFT, B_POSITION_PLAYER_RIGHT, B_POSITION_OPPONENT_RIGHT, B_POSITION_OPPONENT_LEFT };
|
||||
|
||||
// not used
|
||||
static const u8 gUnknown_8250984[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
|
||||
void BattleControllerDummy(void)
|
||||
{
|
||||
|
||||
@@ -181,8 +181,8 @@ static void (*const sPokedudeBufferCommands[CONTROLLER_CMDS_COUNT])(void) =
|
||||
PokedudeCmdEnd,
|
||||
};
|
||||
|
||||
// not used
|
||||
static const u8 gUnknown_8479000[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = { 0x48, 0x48, 0x20, 0x5a, 0x50, 0x50, 0x50, 0x58 };
|
||||
|
||||
#define pdHealthboxPal1 simulatedInputState[0]
|
||||
#define pdHealthboxPal2 simulatedInputState[1]
|
||||
|
||||
+2
-2
@@ -479,8 +479,8 @@ void CopyBattlerSpriteToBg(s32 bgId, u8 x, u8 y, u8 battlerPosition, u8 palno, u
|
||||
LoadBgTilemap(bgId, tilemapDest, BG_SCREEN_SIZE, 0);
|
||||
}
|
||||
|
||||
// not used
|
||||
static void sub_80BCFCC(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7)
|
||||
// Unused
|
||||
static void DrawBattlerOnBgDMA(u8 arg0, u8 arg1, u8 battlerPosition, u8 arg3, u8 arg4, u16 arg5, u8 arg6, u8 arg7)
|
||||
{
|
||||
s32 i, j, offset;
|
||||
|
||||
|
||||
@@ -109,7 +109,7 @@ static void MainCB2_SetUp(void)
|
||||
break;
|
||||
case 3:
|
||||
LoadFrameGfxOnBg(3);
|
||||
LoadPalette(stdpal_get(0), 0xF0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(0), 0xF0, 0x20);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 4:
|
||||
|
||||
@@ -813,8 +813,8 @@ static const u8 sBallCatchBonuses[] =
|
||||
[ITEM_SAFARI_BALL - ITEM_ULTRA_BALL] = 15
|
||||
};
|
||||
|
||||
// not used
|
||||
static const u32 gUnknown_8250898 = 0xFF7EAE60;
|
||||
// unknown unused data
|
||||
static const u32 sUnused = 0xFF7EAE60;
|
||||
|
||||
static void Cmd_attackcanceler(void)
|
||||
{
|
||||
|
||||
+5
-5
@@ -390,20 +390,20 @@ void StartRegiBattle(void)
|
||||
IncrementGameStat(GAME_STAT_WILD_BATTLES);
|
||||
}
|
||||
|
||||
// not used
|
||||
static void sub_807FAF8(void)
|
||||
// Unused
|
||||
static void EndPokedudeBattle(void)
|
||||
{
|
||||
LoadPlayerParty();
|
||||
CB2_EndWildBattle();
|
||||
}
|
||||
|
||||
// not used
|
||||
static void sub_807FB08(void)
|
||||
// Unused
|
||||
static void StartPokedudeBattle(void)
|
||||
{
|
||||
LockPlayerFieldControls();
|
||||
FreezeObjectEvents();
|
||||
StopPlayerAvatar();
|
||||
gMain.savedCallback = sub_807FAF8;
|
||||
gMain.savedCallback = EndPokedudeBattle;
|
||||
SavePlayerParty();
|
||||
InitPokedudePartyAndOpponent();
|
||||
CreateBattleStartTask(GetWildBattleTransition(), 0);
|
||||
|
||||
+6
-5
@@ -41,13 +41,14 @@ static u16 GetCurrentBattleTowerWinStreak(u8 levelType);
|
||||
static void SetEReaderTrainerChecksum(struct BattleTowerEReaderTrainer * eReaderTrainer);
|
||||
static void PrintEReaderTrainerFarewellMessage(void);
|
||||
|
||||
const u8 unref_83FFAAC[] = {
|
||||
0x05, 0x04, 0x01, 0x10, 0x04, 0x02, 0x05, 0x06,
|
||||
0x03, 0x10, 0x06, 0x04, 0x00, 0x01, 0x02, 0x03,
|
||||
0x00, 0x02, 0x03
|
||||
// unknown unused data
|
||||
static const u8 sUnused[] = {
|
||||
5, 4, 1, 16, 4, 2, 5, 6,
|
||||
3, 16, 6, 4, 0, 1, 2, 3,
|
||||
0, 2, 3
|
||||
};
|
||||
|
||||
const u8 unref_83FFABF[] = _("100");
|
||||
static const u8 sText_100[] = _("100");
|
||||
|
||||
static const struct BattleTowerTrainer sBattleTowerTrainers[] =
|
||||
{
|
||||
|
||||
+4
-4
@@ -659,7 +659,7 @@ static const u32 sBg_Tilemap[] = INCBIN_U32("graphics/berry_crush/bg.bin.lz");
|
||||
|
||||
// Takes the number of players - 2 and a player id and returns the
|
||||
// index into sPlayerCoords where that player should be seated
|
||||
static const u8 gUnknown_846F280[MAX_RFU_PLAYERS - 1][MAX_RFU_PLAYERS] = {
|
||||
static const u8 sPlayerIdToPosId[MAX_RFU_PLAYERS - 1][MAX_RFU_PLAYERS] = {
|
||||
{1, 3},
|
||||
{0, 1, 3},
|
||||
{1, 3, 2, 4},
|
||||
@@ -3046,7 +3046,7 @@ static bool32 OpenResultsWindow(struct BerryCrushGame * game, struct BerryCrushG
|
||||
FillWindowPixelBuffer(spriteManager->resultsWindowId, PIXEL_FILL(0));
|
||||
break;
|
||||
case 2:
|
||||
TextWindow_SetStdFrame0_WithPal(spriteManager->resultsWindowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(spriteManager->resultsWindowId, 0x21D, 0xD0);
|
||||
DrawStdFrameWithCustomTileAndPalette(spriteManager->resultsWindowId, FALSE, 541, 13);
|
||||
break;
|
||||
case 3:
|
||||
@@ -3105,7 +3105,7 @@ static void Task_ShowBerryCrushRankings(u8 taskId)
|
||||
tWindowId = AddWindow(&sWindowTemplate_BerryCrushRankings);
|
||||
PutWindowTilemap(tWindowId);
|
||||
FillWindowPixelBuffer(tWindowId, PIXEL_FILL(0));
|
||||
TextWindow_SetStdFrame0_WithPal(tWindowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(tWindowId, 0x21D, 0xD0);
|
||||
DrawStdFrameWithCustomTileAndPalette(tWindowId, 0, 0x21D, 0xD);
|
||||
break;
|
||||
case 1:
|
||||
@@ -3221,7 +3221,7 @@ static void CreatePlayerNameWindows(struct BerryCrushGame * game)
|
||||
|
||||
for (i = 0; i < game->playerCount; ++i)
|
||||
{
|
||||
game->gfx.playerCoords[i] = &sPlayerCoords[gUnknown_846F280[game->playerCount - 2][i]];
|
||||
game->gfx.playerCoords[i] = &sPlayerCoords[sPlayerIdToPosId[game->playerCount - 2][i]];
|
||||
game->gfx.nameWindowIds[i] = AddWindow(&sWindowTemplates_PlayerNames[game->gfx.playerCoords[i]->playerId]);
|
||||
PutWindowTilemap(game->gfx.nameWindowIds[i]);
|
||||
FillWindowPixelBuffer(game->gfx.nameWindowIds[i], PIXEL_FILL(0));
|
||||
|
||||
+4
-4
@@ -1411,10 +1411,10 @@ static void BerryPouchInitWindows(void)
|
||||
u8 i;
|
||||
InitWindows(sWindowTemplates_Main);
|
||||
DeactivateAllTextPrinters();
|
||||
TextWindow_SetUserSelectedFrame(0, 0x001, 0xE0);
|
||||
TextWindow_LoadResourcesStdFrame0(0, 0x013, 0xD0);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x00A, 0xC0);
|
||||
LoadPalette(gTMCaseMainWindowPalette, 0xF0, 0x20);
|
||||
LoadUserWindowGfx(0, 0x001, 0xE0);
|
||||
LoadMenuMessageWindowGfx(0, 0x013, 0xD0);
|
||||
LoadStdWindowGfx(0, 0x00A, 0xC0);
|
||||
LoadPalette(gStandardMenuPalette, 0xF0, 0x20);
|
||||
for (i = 0; i < 3; i++)
|
||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||
PutWindowTilemap(0);
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ void DisplayBerryPowderVendorMenu(void)
|
||||
sBerryPowderVendorWindowId = AddWindow(&template);
|
||||
FillWindowPixelBuffer(sBerryPowderVendorWindowId, 0);
|
||||
PutWindowTilemap(sBerryPowderVendorWindowId);
|
||||
TextWindow_SetStdFrame0_WithPal(sBerryPowderVendorWindowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(sBerryPowderVendorWindowId, 0x21D, 0xD0);
|
||||
DrawPlayerPowderAmount(sBerryPowderVendorWindowId, 0x21D, 0xD, GetBerryPowder());
|
||||
}
|
||||
}
|
||||
|
||||
+5
-5
@@ -187,9 +187,9 @@ static void BikeTransition_MoveDirection(u8 direction)
|
||||
{
|
||||
|
||||
if (collision == COLLISION_COUNT)
|
||||
PlayerGoSpeed2(direction);
|
||||
PlayerWalkFast(direction);
|
||||
else if (PlayerIsMovingOnRockStairs(direction))
|
||||
PlayerGoSpeed2(direction);
|
||||
PlayerWalkFast(direction);
|
||||
else
|
||||
PlayerRideWaterCurrent(direction);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ static void BikeTransition_Downhill(u8 v)
|
||||
u8 collision = GetBikeCollision(DIR_SOUTH);
|
||||
|
||||
if (collision == COLLISION_NONE)
|
||||
PlayerGoSpeed4(DIR_SOUTH);
|
||||
PlayerWalkFaster(DIR_SOUTH);
|
||||
else if (collision == COLLISION_LEDGE_JUMP)
|
||||
PlayerJumpLedge(DIR_SOUTH);
|
||||
}
|
||||
@@ -209,7 +209,7 @@ static void BikeTransition_Downhill(u8 v)
|
||||
static void BikeTransition_Uphill(u8 direction)
|
||||
{
|
||||
if (GetBikeCollision(direction) == COLLISION_NONE)
|
||||
PlayerGoSpeed1(direction);
|
||||
PlayerWalkNormal(direction);
|
||||
}
|
||||
|
||||
static u8 GetBikeCollision(u8 direction)
|
||||
@@ -266,7 +266,7 @@ static bool8 MetatileBehaviorForbidsBiking(u8 metatileBehavior)
|
||||
return TRUE;
|
||||
if (!MetatileBehavior_IsFortreeBridge(metatileBehavior))
|
||||
return FALSE;
|
||||
if (PlayerGetZCoord() & 1)
|
||||
if (PlayerGetElevation() & 1)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+8
-4
@@ -4,7 +4,11 @@
|
||||
#include "text.h"
|
||||
#include "sound.h"
|
||||
|
||||
static const u8 gUnknown_846FB08[] = {1, 2, 4};
|
||||
static const u8 sScrollDistances[] = {
|
||||
[OPTIONS_TEXT_SPEED_SLOW] = 1,
|
||||
[OPTIONS_TEXT_SPEED_MID] = 2,
|
||||
[OPTIONS_TEXT_SPEED_FAST] = 4,
|
||||
};
|
||||
static const u16 sFont6BrailleGlyphs[] = INCBIN_U16("graphics/fonts/font6.fwjpnfont");
|
||||
|
||||
static void DecompressGlyphFont6(u16);
|
||||
@@ -163,15 +167,15 @@ u16 Font6Func(struct TextPrinter *textPrinter)
|
||||
case 4:
|
||||
if (textPrinter->scrollDistance)
|
||||
{
|
||||
if (textPrinter->scrollDistance < gUnknown_846FB08[gSaveBlock2Ptr->optionsTextSpeed])
|
||||
if (textPrinter->scrollDistance < sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed])
|
||||
{
|
||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, textPrinter->scrollDistance, PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||
textPrinter->scrollDistance = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, gUnknown_846FB08[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||
textPrinter->scrollDistance -= gUnknown_846FB08[gSaveBlock2Ptr->optionsTextSpeed];
|
||||
ScrollWindow(textPrinter->printerTemplate.windowId, 0, sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed], PIXEL_FILL(textPrinter->printerTemplate.bgColor));
|
||||
textPrinter->scrollDistance -= sScrollDistances[gSaveBlock2Ptr->optionsTextSpeed];
|
||||
}
|
||||
CopyWindowToVram(textPrinter->printerTemplate.windowId, COPYWIN_GFX);
|
||||
}
|
||||
|
||||
@@ -162,9 +162,9 @@ void BuyMenuInitWindows(bool32 isSellingTM)
|
||||
else
|
||||
InitWindows(sShopBuyMenuWindowTemplatesTM);
|
||||
DeactivateAllTextPrinters();
|
||||
TextWindow_SetUserSelectedFrame(0, 0x1, 0xD0);
|
||||
TextWindow_LoadResourcesStdFrame0(0, 0x13, 0xE0);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0xA, 0xF0);
|
||||
LoadUserWindowGfx(0, 0x1, 0xD0);
|
||||
LoadMenuMessageWindowGfx(0, 0x13, 0xE0);
|
||||
LoadStdWindowGfx(0, 0xA, 0xF0);
|
||||
PutWindowTilemap(0);
|
||||
PutWindowTilemap(4);
|
||||
PutWindowTilemap(5);
|
||||
|
||||
+2
-2
@@ -10,7 +10,7 @@
|
||||
// The trainer tower data exceeds SECTOR_DATA_SIZE. They're allowed to use the full save sector up to the counter field.
|
||||
STATIC_ASSERT(SEC30_SIZE + SEC31_SIZE <= SECTOR_COUNTER_OFFSET * 2, EReaderTrainerTowerSetFreeSpace);
|
||||
|
||||
u8 sub_815D654(void)
|
||||
static u8 GetTrainerHillUnkVal(void)
|
||||
{
|
||||
return (gSaveBlock1Ptr->trainerTower[0].unk9 + 1) % 256;
|
||||
}
|
||||
@@ -49,7 +49,7 @@ static bool32 CEReaderTool_SaveTrainerTower_r(struct EReaderTrainerTowerSet * tt
|
||||
|
||||
memset(buffer, 0, SECTOR_SIZE);
|
||||
memcpy(buffer, ttdata, SEC30_SIZE);
|
||||
buffer[1] = sub_815D654();
|
||||
buffer[1] = GetTrainerHillUnkVal();
|
||||
if (TryWriteSpecialSaveSector(SECTOR_ID_TRAINER_TOWER_1, buffer) != TRUE)
|
||||
return FALSE;
|
||||
memset(buffer, 0, SECTOR_SIZE);
|
||||
|
||||
@@ -101,8 +101,8 @@ static void Task_DrawClearSaveDataScreen(u8 taskId)
|
||||
SaveClearScreen_GpuInit();
|
||||
break;
|
||||
case 3:
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x001, 0xF0);
|
||||
TextWindow_SetStdFrame0_WithPal(1, 0x001, 0xF0);
|
||||
LoadStdWindowGfx(0, 0x001, 0xF0);
|
||||
LoadStdWindowGfx(1, 0x001, 0xF0);
|
||||
break;
|
||||
case 4:
|
||||
DrawStdFrameWithCustomTileAndPalette(1, TRUE, 0x001, 0xF);
|
||||
|
||||
+4
-3
@@ -49,14 +49,15 @@ bool8 RemoveCoins(u16 toSub)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void PrintCoinsString_Parameterized(u8 windowId, u32 coinAmount, u8 x, u8 y, u8 speed)
|
||||
static void PrintCoinsString_Parameterized(u8 windowId, u32 coinAmount, u8 x, u8 y, u8 speed)
|
||||
{
|
||||
ConvertIntToDecimalStringN(gStringVar1, coinAmount, STR_CONV_MODE_RIGHT_ALIGN, 4);
|
||||
StringExpandPlaceholders(gStringVar4, gText_Coins);
|
||||
AddTextPrinterParameterized(windowId, FONT_0, gStringVar4, x, y, speed, NULL);
|
||||
}
|
||||
|
||||
void sub_80D0674(u8 windowId, u16 tileStart, u8 palette, u32 coinAmount)
|
||||
// Unused
|
||||
static void ShowCoinsWindow_Parameterized(u8 windowId, u16 tileStart, u8 palette, u32 coinAmount)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, FALSE, tileStart, palette);
|
||||
AddTextPrinterParameterized(windowId, FONT_2, gText_Coins_2, 0, 0, 0xFF, 0);
|
||||
@@ -83,7 +84,7 @@ void ShowCoinsWindow(u32 coinAmount, u8 x, u8 y)
|
||||
sCoinsWindowId = AddWindow(&template);
|
||||
FillWindowPixelBuffer(sCoinsWindowId, 0);
|
||||
PutWindowTilemap(sCoinsWindowId);
|
||||
TextWindow_SetStdFrame0_WithPal(sCoinsWindowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(sCoinsWindowId, 0x21D, 0xD0);
|
||||
DrawStdFrameWithCustomTileAndPalette(sCoinsWindowId, FALSE, 0x21D, 0xD);
|
||||
AddTextPrinterParameterized(sCoinsWindowId, FONT_2, gText_Coins_2, 0, 0, 0xFF, 0);
|
||||
PrintCoinsString(coinAmount);
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ static const u32 sWindow2Map_Blastoise[] = INCBIN_U32("graphics/credits/unk_840F
|
||||
static const u32 sWindow1Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_8410198.bin.lz");
|
||||
static const u32 sWindow2Map_Pikachu[] = INCBIN_U32("graphics/credits/unk_84105B4.bin.lz");
|
||||
|
||||
static const u32 filler_8410AFC = 0xF0;
|
||||
static const u32 sUnused = 0xF0;
|
||||
|
||||
static const u16 sTheEndGfxPal[] = INCBIN_U16("graphics/credits/unk_8410B20.gbapal");
|
||||
static const u8 sTheEndGfxTiles[] = INCBIN_U8("graphics/credits/unk_8410B20.4bpp.lz");
|
||||
|
||||
@@ -134,7 +134,7 @@ static bool8 MovementType_CopyPlayer_Step2(struct ObjectEvent *objectEvent, stru
|
||||
static bool8 MovementType_Buried_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
static bool8 MovementType_WalkInPlace_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
static bool8 MovementType_MoveInPlace_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
static bool8 MovementType_WalkSlowlyInPlace_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
static bool8 MovementType_WalkInPlaceFast_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
static bool8 MovementType_MoveInPlace_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
static bool8 MovementType_JogInPlace_Step0(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
static bool8 MovementType_MoveInPlace_Step1(struct ObjectEvent *objectEvent, struct Sprite *sprite);
|
||||
@@ -580,8 +580,8 @@ u8 (*const gMovementTypeFuncs_WalkInPlace[])(struct ObjectEvent *, struct Sprite
|
||||
MovementType_MoveInPlace_Step1,
|
||||
};
|
||||
|
||||
u8 (*const gMovementTypeFuncs_WalkSlowlyInPlace[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkSlowlyInPlace_Step0,
|
||||
u8 (*const gMovementTypeFuncs_WalkInPlaceFast[])(struct ObjectEvent *, struct Sprite *) = {
|
||||
MovementType_WalkInPlaceFast_Step0,
|
||||
MovementType_MoveInPlace_Step1,
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,38 @@
|
||||
static const u8 sRegionMapSections_Kanto[LAYER_COUNT][MAP_HEIGHT][MAP_WIDTH] = {
|
||||
[LAYER_MAP] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_24, MAPSEC_ROUTE_25, MAPSEC_ROUTE_25, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_24, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_INDIGO_PLATEAU, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_4_POKECENTER, MAPSEC_ROUTE_4, MAPSEC_ROUTE_4, MAPSEC_ROUTE_4, MAPSEC_ROUTE_4, MAPSEC_ROUTE_4, MAPSEC_CERULEAN_CITY, MAPSEC_ROUTE_9, MAPSEC_ROUTE_9, MAPSEC_ROUTE_9, MAPSEC_ROUTE_10_POKECENTER, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_23, MAPSEC_NONE, MAPSEC_PEWTER_CITY, MAPSEC_ROUTE_3, MAPSEC_ROUTE_3, MAPSEC_ROUTE_3, MAPSEC_ROUTE_3, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_5, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_10, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_23, MAPSEC_NONE, MAPSEC_ROUTE_2, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_5, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_10, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_23, MAPSEC_NONE, MAPSEC_ROUTE_2, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_16, MAPSEC_ROUTE_16, MAPSEC_ROUTE_16, MAPSEC_ROUTE_16, MAPSEC_CELADON_CITY, MAPSEC_ROUTE_7, MAPSEC_ROUTE_7, MAPSEC_SAFFRON_CITY, MAPSEC_ROUTE_8, MAPSEC_ROUTE_8, MAPSEC_ROUTE_8, MAPSEC_LAVENDER_TOWN, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_23, MAPSEC_NONE, MAPSEC_ROUTE_2, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_17, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_6, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_12, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_22, MAPSEC_ROUTE_22, MAPSEC_VIRIDIAN_CITY, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_17, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_6, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_12, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_1, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_17, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_VERMILION_CITY, MAPSEC_ROUTE_11, MAPSEC_ROUTE_11, MAPSEC_ROUTE_11, MAPSEC_ROUTE_12, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_1, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_17, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_12, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_PALLET_TOWN, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_17, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_14, MAPSEC_ROUTE_13, MAPSEC_ROUTE_13, MAPSEC_ROUTE_12, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_21, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_18, MAPSEC_ROUTE_18, MAPSEC_ROUTE_18, MAPSEC_ROUTE_18, MAPSEC_ROUTE_18, MAPSEC_FUCHSIA_CITY, MAPSEC_ROUTE_15, MAPSEC_ROUTE_15, MAPSEC_ROUTE_14, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_21, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROUTE_19, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_CINNABAR_ISLAND, MAPSEC_ROUTE_20, MAPSEC_ROUTE_20, MAPSEC_ROUTE_20, MAPSEC_ROUTE_20, MAPSEC_ROUTE_20, MAPSEC_ROUTE_20, MAPSEC_ROUTE_20, MAPSEC_ROUTE_19, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
},
|
||||
[LAYER_DUNGEON] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MT_MOON, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_CERULEAN_CAVE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ROCK_TUNNEL, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_KANTO_VICTORY_ROAD, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_POWER_PLANT, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_DIGLETTS_CAVE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_VIRIDIAN_FOREST, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_POKEMON_TOWER, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_DIGLETTS_CAVE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_KANTO_SAFARI_ZONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_POKEMON_MANSION, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SEAFOAM_ISLANDS, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
static const u8 sRegionMapSections_Sevii123[LAYER_COUNT][MAP_HEIGHT][MAP_WIDTH] = {
|
||||
[LAYER_MAP] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_KINDLE_ROAD, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_KINDLE_ROAD, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_KINDLE_ROAD, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_KINDLE_ROAD, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_KINDLE_ROAD, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_CAPE_BRINK, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_ONE_ISLAND, MAPSEC_KINDLE_ROAD, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_CAPE_BRINK, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_TREASURE_BEACH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_TWO_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_TREASURE_BEACH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_BOND_BRIDGE, MAPSEC_BOND_BRIDGE, MAPSEC_BOND_BRIDGE, MAPSEC_BOND_BRIDGE, MAPSEC_THREE_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_THREE_ISLE_PORT, MAPSEC_THREE_ISLE_PORT, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE}
|
||||
},
|
||||
[LAYER_DUNGEON] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MT_EMBER, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_BERRY_FOREST, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
static const u8 sRegionMapSections_Sevii45[LAYER_COUNT][MAP_HEIGHT][MAP_WIDTH] = {
|
||||
[LAYER_MAP] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_FOUR_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NAVEL_ROCK, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_RESORT_GORGEOUS, MAPSEC_RESORT_GORGEOUS, MAPSEC_RESORT_GORGEOUS, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_WATER_LABYRINTH, MAPSEC_WATER_LABYRINTH, MAPSEC_WATER_LABYRINTH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_FIVE_ISLAND, MAPSEC_FIVE_ISLE_MEADOW, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_FIVE_ISLE_MEADOW, MAPSEC_MEMORIAL_PILLAR, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MEMORIAL_PILLAR, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_MEMORIAL_PILLAR, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE}
|
||||
},
|
||||
[LAYER_DUNGEON] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ICEFALL_CAVE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_LOST_CAVE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
static const u8 sRegionMapSections_Sevii67[LAYER_COUNT][MAP_HEIGHT][MAP_WIDTH] = {
|
||||
[LAYER_MAP] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_OUTCAST_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_OUTCAST_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_OUTCAST_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_GREEN_PATH, MAPSEC_GREEN_PATH, MAPSEC_GREEN_PATH, MAPSEC_WATER_PATH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_WATER_PATH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SIX_ISLAND, MAPSEC_WATER_PATH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_TRAINER_TOWER, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_WATER_PATH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_TRAINER_TOWER, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_RUIN_VALLEY, MAPSEC_RUIN_VALLEY, MAPSEC_WATER_PATH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SEVEN_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_RUIN_VALLEY, MAPSEC_RUIN_VALLEY, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_CANYON_ENTRANCE, MAPSEC_SEVAULT_CANYON, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SEVAULT_CANYON, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_SEVAULT_CANYON, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_TANOBY_RUINS, MAPSEC_TANOBY_RUINS, MAPSEC_TANOBY_RUINS, MAPSEC_TANOBY_RUINS, MAPSEC_TANOBY_RUINS, MAPSEC_TANOBY_RUINS, MAPSEC_TANOBY_RUINS, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_BIRTH_ISLAND, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE}
|
||||
},
|
||||
[LAYER_DUNGEON] =
|
||||
{
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_ALTERING_CAVE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_PATTERN_BUSH, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_DOTTED_HOLE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_TANOBY_CHAMBERS, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE},
|
||||
{MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE, MAPSEC_NONE}
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
{{ doNotModifyHeader }}
|
||||
#ifndef GUARD_DATA_REGION_MAP_REGION_MAP_ENTRIES_H
|
||||
#define GUARD_DATA_REGION_MAP_REGION_MAP_ENTRIES_H
|
||||
|
||||
## for map_section in map_sections
|
||||
{% if isEmptyString(getVar(map_section.name)) and not existsIn(map_section, "name_clone") %}{{ setVar(map_section.name, map_section.map_section) }}{% endif %}
|
||||
## endfor
|
||||
|
||||
static const u8 *const sMapNames[] = {
|
||||
## for map_section in map_sections
|
||||
[{{ map_section.map_section }} - MAPSECS_KANTO] = sMapsecName_{{ cleanString(map_section.name) }}{% if existsIn(map_section, "name_clone") %}_Clone{% endif %},
|
||||
## endfor
|
||||
};
|
||||
|
||||
static const u16 sMapSectionTopLeftCorners[MAPSEC_COUNT][2] = {
|
||||
## for map_section in map_sections
|
||||
[{{ map_section.map_section }} - MAPSECS_KANTO] = { {{ map_section.x }}, {{ map_section.y }} },
|
||||
## endfor
|
||||
};
|
||||
|
||||
static const u16 sMapSectionDimensions[MAPSEC_COUNT][2] = {
|
||||
## for map_section in map_sections
|
||||
[{{ map_section.map_section }} - MAPSECS_KANTO] = { {{ map_section.width }}, {{ map_section.height }} },
|
||||
## endfor
|
||||
};
|
||||
|
||||
#endif // GUARD_DATA_REGION_MAP_REGION_MAP_ENTRIES_H
|
||||
@@ -0,0 +1,880 @@
|
||||
{
|
||||
"map_sections": [
|
||||
{
|
||||
"map_section": "MAPSEC_PALLET_TOWN",
|
||||
"name": "PALLET TOWN",
|
||||
"x": 4,
|
||||
"y": 11,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_VIRIDIAN_CITY",
|
||||
"name": "VIRIDIAN CITY",
|
||||
"x": 4,
|
||||
"y": 8,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_PEWTER_CITY",
|
||||
"name": "PEWTER CITY",
|
||||
"x": 4,
|
||||
"y": 4,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_CERULEAN_CITY",
|
||||
"name": "CERULEAN CITY",
|
||||
"x": 14,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_LAVENDER_TOWN",
|
||||
"name": "LAVENDER TOWN",
|
||||
"x": 18,
|
||||
"y": 6,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_VERMILION_CITY",
|
||||
"name": "VERMILION CITY",
|
||||
"x": 14,
|
||||
"y": 9,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_CELADON_CITY",
|
||||
"name": "CELADON CITY",
|
||||
"x": 11,
|
||||
"y": 6,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_FUCHSIA_CITY",
|
||||
"name": "FUCHSIA CITY",
|
||||
"x": 12,
|
||||
"y": 12,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_CINNABAR_ISLAND",
|
||||
"name": "CINNABAR ISLAND",
|
||||
"x": 4,
|
||||
"y": 14,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_INDIGO_PLATEAU",
|
||||
"name": "INDIGO PLATEAU",
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SAFFRON_CITY",
|
||||
"name": "SAFFRON CITY",
|
||||
"x": 14,
|
||||
"y": 6,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_4_POKECENTER",
|
||||
"name": "ROUTE 4",
|
||||
"name_clone": true,
|
||||
"x": 8,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_10_POKECENTER",
|
||||
"name": "ROUTE 10",
|
||||
"name_clone": true,
|
||||
"x": 18,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_1",
|
||||
"name": "ROUTE 1",
|
||||
"x": 4,
|
||||
"y": 9,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_2",
|
||||
"name": "ROUTE 2",
|
||||
"x": 4,
|
||||
"y": 5,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_3",
|
||||
"name": "ROUTE 3",
|
||||
"x": 5,
|
||||
"y": 4,
|
||||
"width": 4,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_4",
|
||||
"name": "ROUTE 4",
|
||||
"x": 8,
|
||||
"y": 3,
|
||||
"width": 6,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_5",
|
||||
"name": "ROUTE 5",
|
||||
"x": 14,
|
||||
"y": 4,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_6",
|
||||
"name": "ROUTE 6",
|
||||
"x": 14,
|
||||
"y": 7,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_7",
|
||||
"name": "ROUTE 7",
|
||||
"x": 12,
|
||||
"y": 6,
|
||||
"width": 2,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_8",
|
||||
"name": "ROUTE 8",
|
||||
"x": 15,
|
||||
"y": 6,
|
||||
"width": 3,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_9",
|
||||
"name": "ROUTE 9",
|
||||
"x": 15,
|
||||
"y": 3,
|
||||
"width": 3,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_10",
|
||||
"name": "ROUTE 10",
|
||||
"x": 18,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_11",
|
||||
"name": "ROUTE 11",
|
||||
"x": 15,
|
||||
"y": 9,
|
||||
"width": 3,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_12",
|
||||
"name": "ROUTE 12",
|
||||
"x": 18,
|
||||
"y": 7,
|
||||
"width": 1,
|
||||
"height": 5
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_13",
|
||||
"name": "ROUTE 13",
|
||||
"x": 16,
|
||||
"y": 11,
|
||||
"width": 2,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_14",
|
||||
"name": "ROUTE 14",
|
||||
"x": 15,
|
||||
"y": 11,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_15",
|
||||
"name": "ROUTE 15",
|
||||
"x": 13,
|
||||
"y": 12,
|
||||
"width": 2,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_16",
|
||||
"name": "ROUTE 16",
|
||||
"x": 7,
|
||||
"y": 6,
|
||||
"width": 4,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_17",
|
||||
"name": "ROUTE 17",
|
||||
"x": 7,
|
||||
"y": 7,
|
||||
"width": 1,
|
||||
"height": 5
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_18",
|
||||
"name": "ROUTE 18",
|
||||
"x": 7,
|
||||
"y": 12,
|
||||
"width": 5,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_19",
|
||||
"name": "ROUTE 19",
|
||||
"x": 12,
|
||||
"y": 13,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_20",
|
||||
"name": "ROUTE 20",
|
||||
"x": 5,
|
||||
"y": 14,
|
||||
"width": 7,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_21",
|
||||
"name": "ROUTE 21",
|
||||
"x": 4,
|
||||
"y": 12,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_22",
|
||||
"name": "ROUTE 22",
|
||||
"x": 2,
|
||||
"y": 8,
|
||||
"width": 2,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_23",
|
||||
"name": "ROUTE 23",
|
||||
"x": 2,
|
||||
"y": 4,
|
||||
"width": 1,
|
||||
"height": 4
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_24",
|
||||
"name": "ROUTE 24",
|
||||
"x": 14,
|
||||
"y": 1,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROUTE_25",
|
||||
"name": "ROUTE 25",
|
||||
"x": 15,
|
||||
"y": 1,
|
||||
"width": 2,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_VIRIDIAN_FOREST",
|
||||
"name": "VIRIDIAN FOREST",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_MT_MOON",
|
||||
"name": "MT. MOON",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_S_S_ANNE",
|
||||
"name": "S.S. ANNE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_UNDERGROUND_PATH",
|
||||
"name": "UNDERGROUND PATH",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_UNDERGROUND_PATH_2",
|
||||
"name": "UNDERGROUND PATH",
|
||||
"name_clone": true,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_DIGLETTS_CAVE",
|
||||
"name": "DIGLETT'S CAVE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_KANTO_VICTORY_ROAD",
|
||||
"name": "VICTORY ROAD",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROCKET_HIDEOUT",
|
||||
"name": "ROCKET HIDEOUT",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SILPH_CO",
|
||||
"name": "SILPH CO.",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_POKEMON_MANSION",
|
||||
"name": "POKéMON MANSION",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_KANTO_SAFARI_ZONE",
|
||||
"name": "SAFARI ZONE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_POKEMON_LEAGUE",
|
||||
"name": "POKéMON LEAGUE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROCK_TUNNEL",
|
||||
"name": "ROCK TUNNEL",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEAFOAM_ISLANDS",
|
||||
"name": "SEAFOAM ISLANDS",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_POKEMON_TOWER",
|
||||
"name": "POKéMON TOWER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_CERULEAN_CAVE",
|
||||
"name": "CERULEAN CAVE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_POWER_PLANT",
|
||||
"name": "POWER PLANT",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ONE_ISLAND",
|
||||
"name": "ONE ISLAND",
|
||||
"x": 1,
|
||||
"y": 8,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_TWO_ISLAND",
|
||||
"name": "TWO ISLAND",
|
||||
"x": 9,
|
||||
"y": 9,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_THREE_ISLAND",
|
||||
"name": "THREE ISLAND",
|
||||
"x": 18,
|
||||
"y": 12,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_FOUR_ISLAND",
|
||||
"name": "FOUR ISLAND",
|
||||
"x": 3,
|
||||
"y": 4,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_FIVE_ISLAND",
|
||||
"name": "FIVE ISLAND",
|
||||
"x": 16,
|
||||
"y": 11,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVEN_ISLAND",
|
||||
"name": "SEVEN ISLAND",
|
||||
"x": 5,
|
||||
"y": 8,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SIX_ISLAND",
|
||||
"name": "SIX ISLAND",
|
||||
"x": 17,
|
||||
"y": 5,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_KINDLE_ROAD",
|
||||
"name": "KINDLE ROAD",
|
||||
"x": 2,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 6
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_TREASURE_BEACH",
|
||||
"name": "TREASURE BEACH",
|
||||
"x": 1,
|
||||
"y": 9,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_CAPE_BRINK",
|
||||
"name": "CAPE BRINK",
|
||||
"x": 9,
|
||||
"y": 7,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_BOND_BRIDGE",
|
||||
"name": "BOND BRIDGE",
|
||||
"x": 13,
|
||||
"y": 12,
|
||||
"width": 4,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_THREE_ISLE_PORT",
|
||||
"name": "THREE ISLE PORT",
|
||||
"x": 18,
|
||||
"y": 13,
|
||||
"width": 2,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVII_ISLE_6",
|
||||
"name": "SEVII ISLE 6",
|
||||
"x": 4,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVII_ISLE_7",
|
||||
"name": "SEVII ISLE 7",
|
||||
"x": 5,
|
||||
"y": 4,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVII_ISLE_8",
|
||||
"name": "SEVII ISLE 8",
|
||||
"x": 1,
|
||||
"y": 4,
|
||||
"width": 3,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVII_ISLE_9",
|
||||
"name": "SEVII ISLE 9",
|
||||
"x": 4,
|
||||
"y": 5,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_RESORT_GORGEOUS",
|
||||
"name": "RESORT GORGEOUS",
|
||||
"x": 16,
|
||||
"y": 9,
|
||||
"width": 3,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_WATER_LABYRINTH",
|
||||
"name": "WATER LABYRINTH",
|
||||
"x": 14,
|
||||
"y": 10,
|
||||
"width": 3,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_FIVE_ISLE_MEADOW",
|
||||
"name": "FIVE ISLE MEADOW",
|
||||
"x": 17,
|
||||
"y": 10,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_MEMORIAL_PILLAR",
|
||||
"name": "MEMORIAL PILLAR",
|
||||
"x": 18,
|
||||
"y": 12,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_OUTCAST_ISLAND",
|
||||
"name": "OUTCAST ISLAND",
|
||||
"x": 15,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_GREEN_PATH",
|
||||
"name": "GREEN PATH",
|
||||
"x": 15,
|
||||
"y": 3,
|
||||
"width": 3,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_WATER_PATH",
|
||||
"name": "WATER PATH",
|
||||
"x": 18,
|
||||
"y": 3,
|
||||
"width": 1,
|
||||
"height": 5
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_RUIN_VALLEY",
|
||||
"name": "RUIN VALLEY",
|
||||
"x": 16,
|
||||
"y": 7,
|
||||
"width": 2,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_TRAINER_TOWER",
|
||||
"name": "TRAINER TOWER",
|
||||
"x": 5,
|
||||
"y": 6,
|
||||
"width": 1,
|
||||
"height": 2
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_CANYON_ENTRANCE",
|
||||
"name": "CANYON ENTRANCE",
|
||||
"x": 5,
|
||||
"y": 9,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVAULT_CANYON",
|
||||
"name": "SEVAULT CANYON",
|
||||
"x": 6,
|
||||
"y": 9,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_TANOBY_RUINS",
|
||||
"name": "TANOBY RUINS",
|
||||
"x": 3,
|
||||
"y": 12,
|
||||
"width": 7,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVII_ISLE_22",
|
||||
"name": "SEVII ISLE 22",
|
||||
"x": 9,
|
||||
"y": 12,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVII_ISLE_23",
|
||||
"name": "SEVII ISLE 23",
|
||||
"x": 3,
|
||||
"y": 14,
|
||||
"width": 6,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SEVII_ISLE_24",
|
||||
"name": "SEVII ISLE 24",
|
||||
"x": 2,
|
||||
"y": 12,
|
||||
"width": 1,
|
||||
"height": 3
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_NAVEL_ROCK",
|
||||
"name": "NAVEL ROCK",
|
||||
"x": 10,
|
||||
"y": 8,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_MT_EMBER",
|
||||
"name": "MT. EMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_BERRY_FOREST",
|
||||
"name": "BERRY FOREST",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ICEFALL_CAVE",
|
||||
"name": "ICEFALL CAVE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ROCKET_WAREHOUSE",
|
||||
"name": "ROCKET WAREHOUSE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_TRAINER_TOWER_2",
|
||||
"name": "TRAINER TOWER",
|
||||
"name_clone": true,
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_DOTTED_HOLE",
|
||||
"name": "DOTTED HOLE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_LOST_CAVE",
|
||||
"name": "LOST CAVE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_PATTERN_BUSH",
|
||||
"name": "PATTERN BUSH",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_ALTERING_CAVE",
|
||||
"name": "ALTERING CAVE",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_TANOBY_CHAMBERS",
|
||||
"name": "TANOBY CHAMBERS",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_THREE_ISLE_PATH",
|
||||
"name": "THREE ISLE PATH",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_TANOBY_KEY",
|
||||
"name": "TANOBY KEY",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_BIRTH_ISLAND",
|
||||
"name": "BIRTH ISLAND",
|
||||
"x": 18,
|
||||
"y": 13,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_MONEAN_CHAMBER",
|
||||
"name": "MONEAN CHAMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_LIPTOO_CHAMBER",
|
||||
"name": "LIPTOO CHAMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_WEEPTH_CHAMBER",
|
||||
"name": "WEEPTH CHAMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_DILFORD_CHAMBER",
|
||||
"name": "DILFORD CHAMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SCUFIB_CHAMBER",
|
||||
"name": "SCUFIB CHAMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_RIXY_CHAMBER",
|
||||
"name": "RIXY CHAMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_VIAPOIS_CHAMBER",
|
||||
"name": "VIAPOIS CHAMBER",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_EMBER_SPA",
|
||||
"name": "EMBER SPA",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 1,
|
||||
"height": 1
|
||||
},
|
||||
{
|
||||
"map_section": "MAPSEC_SPECIAL_AREA",
|
||||
"name": "CELADON DEPT.",
|
||||
"x": 0,
|
||||
"y": 0,
|
||||
"width": 0,
|
||||
"height": 0
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{ doNotModifyHeader }}
|
||||
#ifndef GUARD_DATA_REGION_MAP_REGION_MAP_ENTRY_STRINGS_H
|
||||
#define GUARD_DATA_REGION_MAP_REGION_MAP_ENTRY_STRINGS_H
|
||||
|
||||
## for map_section in map_sections
|
||||
{% if isEmptyString(getVar(map_section.name)) and not existsIn(map_section, "name_clone") %}{{ setVar(map_section.name, map_section.map_section) }}{% endif %}
|
||||
## endfor
|
||||
|
||||
## for map_section in map_sections
|
||||
{% if getVar(map_section.name) == map_section.map_section %}
|
||||
static const u8 sMapsecName_{{ cleanString(map_section.name) }}[] = _("{{ map_section.name }}");
|
||||
{% endif %}
|
||||
{% if existsIn(map_section, "name_clone") %}
|
||||
static const u8 sMapsecName_{{ cleanString(map_section.name) }}_Clone[] = _("{{ map_section.name }}");
|
||||
{% endif %}
|
||||
## endfor
|
||||
|
||||
#endif // GUARD_DATA_REGION_MAP_REGION_MAP_ENTRY_STRINGS_H
|
||||
@@ -1,109 +0,0 @@
|
||||
const u8 gMapSecName_PalletTown[] = _("PALLET TOWN");
|
||||
const u8 gMapSecName_ViridianCity[] = _("VIRIDIAN CITY");
|
||||
const u8 gMapSecName_PewterCity[] = _("PEWTER CITY");
|
||||
const u8 gMapSecName_CeruleanCity[] = _("CERULEAN CITY");
|
||||
const u8 gMapSecName_LavenderTown[] = _("LAVENDER TOWN");
|
||||
const u8 gMapSecName_VermilionCity[] = _("VERMILION CITY");
|
||||
const u8 gMapSecName_CeladonCity[] = _("CELADON CITY");
|
||||
const u8 gMapSecName_FuchsiaCity[] = _("FUCHSIA CITY");
|
||||
const u8 gMapSecName_CinnabarIsland[] = _("CINNABAR ISLAND");
|
||||
const u8 gMapSecName_IndigoPlateau[] = _("INDIGO PLATEAU");
|
||||
const u8 gMapSecName_SaffronCity[] = _("SAFFRON CITY");
|
||||
const u8 gMapSecName_Route4[] = _("ROUTE 4");
|
||||
const u8 gMapSecName_Route10[] = _("ROUTE 10");
|
||||
const u8 gMapSecName_Route1[] = _("ROUTE 1");
|
||||
const u8 gMapSecName_Route2[] = _("ROUTE 2");
|
||||
const u8 gMapSecName_Route3[] = _("ROUTE 3");
|
||||
const u8 gMapSecName_Route4_2[] = _("ROUTE 4");
|
||||
const u8 gMapSecName_Route5[] = _("ROUTE 5");
|
||||
const u8 gMapSecName_Route6[] = _("ROUTE 6");
|
||||
const u8 gMapSecName_Route7[] = _("ROUTE 7");
|
||||
const u8 gMapSecName_Route8[] = _("ROUTE 8");
|
||||
const u8 gMapSecName_Route9[] = _("ROUTE 9");
|
||||
const u8 gMapSecName_Route10_2[] = _("ROUTE 10");
|
||||
const u8 gMapSecName_Route11[] = _("ROUTE 11");
|
||||
const u8 gMapSecName_Route12[] = _("ROUTE 12");
|
||||
const u8 gMapSecName_Route13[] = _("ROUTE 13");
|
||||
const u8 gMapSecName_Route14[] = _("ROUTE 14");
|
||||
const u8 gMapSecName_Route15[] = _("ROUTE 15");
|
||||
const u8 gMapSecName_Route16[] = _("ROUTE 16");
|
||||
const u8 gMapSecName_Route17[] = _("ROUTE 17");
|
||||
const u8 gMapSecName_Route18[] = _("ROUTE 18");
|
||||
const u8 gMapSecName_Route19[] = _("ROUTE 19");
|
||||
const u8 gMapSecName_Route20[] = _("ROUTE 20");
|
||||
const u8 gMapSecName_Route21[] = _("ROUTE 21");
|
||||
const u8 gMapSecName_Route22[] = _("ROUTE 22");
|
||||
const u8 gMapSecName_Route23[] = _("ROUTE 23");
|
||||
const u8 gMapSecName_Route24[] = _("ROUTE 24");
|
||||
const u8 gMapSecName_Route25[] = _("ROUTE 25");
|
||||
const u8 gMapSecName_ViridianForest[] = _("VIRIDIAN FOREST");
|
||||
const u8 gMapSecName_MtMoon[] = _("MT. MOON");
|
||||
const u8 gMapSecName_SSAnne[] = _("S.S. ANNE");
|
||||
const u8 gMapSecName_UndergroundPath[] = _("UNDERGROUND PATH");
|
||||
const u8 gMapSecName_UndergroundPath_2[] = _("UNDERGROUND PATH");
|
||||
const u8 gMapSecName_DiglettsCave[] = _("DIGLETT'S CAVE");
|
||||
const u8 gMapSecName_VictoryRoad[] = _("VICTORY ROAD");
|
||||
const u8 gMapSecName_RocketHideout[] = _("ROCKET HIDEOUT");
|
||||
const u8 gMapSecName_SilphCo[] = _("SILPH CO.");
|
||||
const u8 gMapSecName_PokemonMansion[] = _("POKéMON MANSION");
|
||||
const u8 gMapSecName_SafariZone[] = _("SAFARI ZONE");
|
||||
const u8 gMapSecName_PokemonLeague[] = _("POKéMON LEAGUE");
|
||||
const u8 gMapSecName_RockTunnel[] = _("ROCK TUNNEL");
|
||||
const u8 gMapSecName_SeafoamIslands[] = _("SEAFOAM ISLANDS");
|
||||
const u8 gMapSecName_PokemonTower[] = _("POKéMON TOWER");
|
||||
const u8 gMapSecName_CeruleanCave[] = _("CERULEAN CAVE");
|
||||
const u8 gMapSecName_PowerPlant[] = _("POWER PLANT");
|
||||
const u8 gMapSecName_OneIsland[] = _("ONE ISLAND");
|
||||
const u8 gMapSecName_TwoIsland[] = _("TWO ISLAND");
|
||||
const u8 gMapSecName_ThreeIsland[] = _("THREE ISLAND");
|
||||
const u8 gMapSecName_FourIsland[] = _("FOUR ISLAND");
|
||||
const u8 gMapSecName_FiveIsland[] = _("FIVE ISLAND");
|
||||
const u8 gMapSecName_SevenIsland[] = _("SEVEN ISLAND");
|
||||
const u8 gMapSecName_SixIsland[] = _("SIX ISLAND");
|
||||
const u8 gMapSecName_KindleRoad[] = _("KINDLE ROAD");
|
||||
const u8 gMapSecName_TreasureBeach[] = _("TREASURE BEACH");
|
||||
const u8 gMapSecName_CapeBrink[] = _("CAPE BRINK");
|
||||
const u8 gMapSecName_BondBridge[] = _("BOND BRIDGE");
|
||||
const u8 gMapSecName_ThreeIslePort[] = _("THREE ISLE PORT");
|
||||
const u8 gMapSecName_SeviiIsle6[] = _("SEVII ISLE 6");
|
||||
const u8 gMapSecName_SeviiIsle7[] = _("SEVII ISLE 7");
|
||||
const u8 gMapSecName_SeviiIsle8[] = _("SEVII ISLE 8");
|
||||
const u8 gMapSecName_SeviiIsle9[] = _("SEVII ISLE 9");
|
||||
const u8 gMapSecName_ResortGorgeous[] = _("RESORT GORGEOUS");
|
||||
const u8 gMapSecName_WaterLabyrinth[] = _("WATER LABYRINTH");
|
||||
const u8 gMapSecName_FiveIsleMeadow[] = _("FIVE ISLE MEADOW");
|
||||
const u8 gMapSecName_MemorialPillar[] = _("MEMORIAL PILLAR");
|
||||
const u8 gMapSecName_OutcastIsland[] = _("OUTCAST ISLAND");
|
||||
const u8 gMapSecName_GreenPath[] = _("GREEN PATH");
|
||||
const u8 gMapSecName_WaterPath[] = _("WATER PATH");
|
||||
const u8 gMapSecName_RuinValley[] = _("RUIN VALLEY");
|
||||
const u8 gMapSecName_TrainerTower[] = _("TRAINER TOWER");
|
||||
const u8 gMapSecName_CanyonEntrance[] = _("CANYON ENTRANCE");
|
||||
const u8 gMapSecName_SevaultCanyon[] = _("SEVAULT CANYON");
|
||||
const u8 gMapSecName_TanobyRuins[] = _("TANOBY RUINS");
|
||||
const u8 gMapSecName_SeviiIsle22[] = _("SEVII ISLE 22");
|
||||
const u8 gMapSecName_SeviiIsle23[] = _("SEVII ISLE 23");
|
||||
const u8 gMapSecName_SeviiIsle24[] = _("SEVII ISLE 24");
|
||||
const u8 gMapSecName_NavelRock[] = _("NAVEL ROCK");
|
||||
const u8 gMapSecName_MtEmber[] = _("MT. EMBER");
|
||||
const u8 gMapSecName_BerryForest[] = _("BERRY FOREST");
|
||||
const u8 gMapSecName_IcefallCave[] = _("ICEFALL CAVE");
|
||||
const u8 gMapSecName_RocketWarehouse[] = _("ROCKET WAREHOUSE");
|
||||
const u8 gMapSecName_TrainerTower_2[] = _("TRAINER TOWER");
|
||||
const u8 gMapSecName_DottedHole[] = _("DOTTED HOLE");
|
||||
const u8 gMapSecName_LostCave[] = _("LOST CAVE");
|
||||
const u8 gMapSecName_PatternBush[] = _("PATTERN BUSH");
|
||||
const u8 gMapSecName_AlteringCave[] = _("ALTERING CAVE");
|
||||
const u8 gMapSecName_TanobyChambers[] = _("TANOBY CHAMBERS");
|
||||
const u8 gMapSecName_ThreeIslePath[] = _("THREE ISLE PATH");
|
||||
const u8 gMapSecName_TanobyKey[] = _("TANOBY KEY");
|
||||
const u8 gMapSecName_BirthIsland[] = _("BIRTH ISLAND");
|
||||
const u8 gMapSecName_MoneanChamber[] = _("MONEAN CHAMBER");
|
||||
const u8 gMapSecName_LiptooChamber[] = _("LIPTOO CHAMBER");
|
||||
const u8 gMapSecName_WeepthChamber[] = _("WEEPTH CHAMBER");
|
||||
const u8 gMapSecName_DilfordChamber[] = _("DILFORD CHAMBER");
|
||||
const u8 gMapSecName_ScufibChamber[] = _("SCUFIB CHAMBER");
|
||||
const u8 gMapSecName_RixyChamber[] = _("RIXY CHAMBER");
|
||||
const u8 gMapSecName_ViapoisChamber[] = _("VIAPOIS CHAMBER");
|
||||
const u8 gMapSecName_EmberSpa[] = _("EMBER SPA");
|
||||
const u8 gMapSecName_CeladonDept[] = _("CELADON DEPT.");
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,748 @@
|
||||
const struct Tileset gTileset_General =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = FALSE,
|
||||
.tiles = gTilesetTiles_General,
|
||||
.palettes = gTilesetPalettes_General,
|
||||
.metatiles = gMetatiles_General,
|
||||
.metatileAttributes = gMetatileAttributes_General,
|
||||
.callback = InitTilesetAnim_General,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PalletTown =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PalletTown,
|
||||
.palettes = gTilesetPalettes_PalletTown,
|
||||
.metatiles = gMetatiles_PalletTown,
|
||||
.metatileAttributes = gMetatileAttributes_PalletTown,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_ViridianCity =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_ViridianCity,
|
||||
.palettes = gTilesetPalettes_ViridianCity,
|
||||
.metatiles = gMetatiles_ViridianCity,
|
||||
.metatileAttributes = gMetatileAttributes_ViridianCity,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PewterCity =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PewterCity,
|
||||
.palettes = gTilesetPalettes_PewterCity,
|
||||
.metatiles = gMetatiles_PewterCity,
|
||||
.metatileAttributes = gMetatileAttributes_PewterCity,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CeruleanCity =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CeruleanCity,
|
||||
.palettes = gTilesetPalettes_CeruleanCity,
|
||||
.metatiles = gMetatiles_CeruleanCity,
|
||||
.metatileAttributes = gMetatileAttributes_CeruleanCity,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_LavenderTown =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_LavenderTown,
|
||||
.palettes = gTilesetPalettes_LavenderTown,
|
||||
.metatiles = gMetatiles_LavenderTown,
|
||||
.metatileAttributes = gMetatileAttributes_LavenderTown,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_VermilionCity =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_VermilionCity,
|
||||
.palettes = gTilesetPalettes_VermilionCity,
|
||||
.metatiles = gMetatiles_VermilionCity,
|
||||
.metatileAttributes = gMetatileAttributes_VermilionCity,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CeladonCity =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CeladonCity,
|
||||
.palettes = gTilesetPalettes_CeladonCity,
|
||||
.metatiles = gMetatiles_CeladonCity,
|
||||
.metatileAttributes = gMetatileAttributes_CeladonCity,
|
||||
.callback = InitTilesetAnim_CeladonCity,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_FuchsiaCity =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_FuchsiaCity,
|
||||
.palettes = gTilesetPalettes_FuchsiaCity,
|
||||
.metatiles = gMetatiles_FuchsiaCity,
|
||||
.metatileAttributes = gMetatileAttributes_FuchsiaCity,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CinnabarIsland =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CinnabarIsland,
|
||||
.palettes = gTilesetPalettes_CinnabarIsland,
|
||||
.metatiles = gMetatiles_CinnabarIsland,
|
||||
.metatileAttributes = gMetatileAttributes_CinnabarIsland,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_IndigoPlateau =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_IndigoPlateau,
|
||||
.palettes = gTilesetPalettes_IndigoPlateau,
|
||||
.metatiles = gMetatiles_IndigoPlateau,
|
||||
.metatileAttributes = gMetatileAttributes_IndigoPlateau,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SaffronCity =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SaffronCity,
|
||||
.palettes = gTilesetPalettes_SaffronCity,
|
||||
.metatiles = gMetatiles_SaffronCity,
|
||||
.metatileAttributes = gMetatileAttributes_SaffronCity,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Building =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = FALSE,
|
||||
.tiles = gTilesetTiles_Building,
|
||||
.palettes = gTilesetPalettes_Building,
|
||||
.metatiles = gMetatiles_Building,
|
||||
.metatileAttributes = gMetatileAttributes_Building,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Mart =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Mart,
|
||||
.palettes = gTilesetPalettes_Mart,
|
||||
.metatiles = gMetatiles_Mart,
|
||||
.metatileAttributes = gMetatileAttributes_Mart,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PokemonCenter =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PokemonCenter,
|
||||
.palettes = gTilesetPalettes_PokemonCenter,
|
||||
.metatiles = gMetatiles_PokemonCenter,
|
||||
.metatileAttributes = gMetatileAttributes_PokemonCenter,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Cave =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Cave,
|
||||
.palettes = gTilesetPalettes_Cave,
|
||||
.metatiles = gMetatiles_Cave,
|
||||
.metatileAttributes = gMetatileAttributes_Cave,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Dummy1 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Dummy1,
|
||||
.palettes = gTilesetPalettes_Dummy1,
|
||||
.metatiles = gMetatiles_Dummy1,
|
||||
.metatileAttributes = gMetatileAttributes_Dummy1,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Museum =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Museum,
|
||||
.palettes = gTilesetPalettes_Museum,
|
||||
.metatiles = gMetatiles_Museum,
|
||||
.metatileAttributes = gMetatileAttributes_Museum,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CableClub =
|
||||
{
|
||||
.isCompressed = FALSE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CableClub,
|
||||
.palettes = gTilesetPalettes_CableClub,
|
||||
.metatiles = gMetatiles_CableClub,
|
||||
.metatileAttributes = gMetatileAttributes_CableClub,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_BikeShop =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_BikeShop,
|
||||
.palettes = gTilesetPalettes_BikeShop,
|
||||
.metatiles = gMetatiles_BikeShop,
|
||||
.metatileAttributes = gMetatileAttributes_BikeShop,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_GenericBuilding1 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_GenericBuilding1,
|
||||
.palettes = gTilesetPalettes_GenericBuilding1,
|
||||
.metatiles = gMetatiles_GenericBuilding1,
|
||||
.metatileAttributes = gMetatileAttributes_GenericBuilding1,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Lab =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Lab,
|
||||
.palettes = gTilesetPalettes_Lab,
|
||||
.metatiles = gMetatiles_Lab,
|
||||
.metatileAttributes = gMetatileAttributes_Lab,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_FuchsiaGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_FuchsiaGym,
|
||||
.palettes = gTilesetPalettes_FuchsiaGym,
|
||||
.metatiles = gMetatiles_FuchsiaGym,
|
||||
.metatileAttributes = gMetatileAttributes_FuchsiaGym,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_ViridianGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_ViridianGym,
|
||||
.palettes = gTilesetPalettes_ViridianGym,
|
||||
.metatiles = gMetatiles_ViridianGym,
|
||||
.metatileAttributes = gMetatileAttributes_ViridianGym,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_HoennBuilding =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_HoennBuilding,
|
||||
.palettes = gTilesetPalettes_HoennBuilding,
|
||||
.metatiles = gMetatiles_HoennBuilding,
|
||||
.metatileAttributes = gMetatileAttributes_HoennBuilding,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_GameCorner =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_GameCorner,
|
||||
.palettes = gTilesetPalettes_GameCorner,
|
||||
.metatiles = gMetatiles_GameCorner,
|
||||
.metatileAttributes = gMetatileAttributes_GameCorner,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PewterGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PewterGym,
|
||||
.palettes = gTilesetPalettes_PewterGym,
|
||||
.metatiles = gMetatiles_PewterGym,
|
||||
.metatileAttributes = gMetatileAttributes_PewterGym,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CeruleanGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CeruleanGym,
|
||||
.palettes = gTilesetPalettes_CeruleanGym,
|
||||
.metatiles = gMetatiles_CeruleanGym,
|
||||
.metatileAttributes = gMetatileAttributes_CeruleanGym,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_VermilionGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_VermilionGym,
|
||||
.palettes = gTilesetPalettes_VermilionGym,
|
||||
.metatiles = gMetatiles_VermilionGym,
|
||||
.metatileAttributes = gMetatileAttributes_VermilionGym,
|
||||
.callback = InitTilesetAnim_VermilionGym,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CeladonGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CeladonGym,
|
||||
.palettes = gTilesetPalettes_CeladonGym,
|
||||
.metatiles = gMetatiles_CeladonGym,
|
||||
.metatileAttributes = gMetatileAttributes_CeladonGym,
|
||||
.callback = InitTilesetAnim_CeladonGym,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SaffronGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SaffronGym,
|
||||
.palettes = gTilesetPalettes_SaffronGym,
|
||||
.metatiles = gMetatiles_SaffronGym,
|
||||
.metatileAttributes = gMetatileAttributes_SaffronGym,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CinnabarGym =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CinnabarGym,
|
||||
.palettes = gTilesetPalettes_CinnabarGym,
|
||||
.metatiles = gMetatiles_CinnabarGym,
|
||||
.metatileAttributes = gMetatileAttributes_CinnabarGym,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SSAnne =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SSAnne,
|
||||
.palettes = gTilesetPalettes_SSAnne,
|
||||
.metatiles = gMetatiles_SSAnne,
|
||||
.metatileAttributes = gMetatileAttributes_SSAnne,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Dummy2 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Dummy2,
|
||||
.palettes = gTilesetPalettes_Dummy2,
|
||||
.metatiles = gMetatiles_Dummy2,
|
||||
.metatileAttributes = gMetatileAttributes_Dummy2,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_ViridianForest =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_ViridianForest,
|
||||
.palettes = gTilesetPalettes_ViridianForest,
|
||||
.metatiles = gMetatiles_ViridianForest,
|
||||
.metatileAttributes = gMetatileAttributes_ViridianForest,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_UnusedGatehouse1 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_UnusedGatehouse1,
|
||||
.palettes = gTilesetPalettes_UnusedGatehouse1,
|
||||
.metatiles = gMetatiles_UnusedGatehouse1,
|
||||
.metatileAttributes = gMetatileAttributes_UnusedGatehouse1,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_RockTunnel =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_RockTunnel,
|
||||
.palettes = gTilesetPalettes_RockTunnel,
|
||||
.metatiles = gMetatiles_RockTunnel,
|
||||
.metatileAttributes = gMetatileAttributes_RockTunnel,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_DiglettsCave =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_DiglettsCave,
|
||||
.palettes = gTilesetPalettes_DiglettsCave,
|
||||
.metatiles = gMetatiles_DiglettsCave,
|
||||
.metatileAttributes = gMetatileAttributes_DiglettsCave,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SeafoamIslands =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SeafoamIslands,
|
||||
.palettes = gTilesetPalettes_SeafoamIslands,
|
||||
.metatiles = gMetatiles_SeafoamIslands,
|
||||
.metatileAttributes = gMetatileAttributes_SeafoamIslands,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_UnusedGatehouse2 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_UnusedGatehouse2,
|
||||
.palettes = gTilesetPalettes_UnusedGatehouse2,
|
||||
.metatiles = gMetatiles_UnusedGatehouse2,
|
||||
.metatileAttributes = gMetatileAttributes_UnusedGatehouse2,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_CeruleanCave =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_CeruleanCave,
|
||||
.palettes = gTilesetPalettes_CeruleanCave,
|
||||
.metatiles = gMetatiles_CeruleanCave,
|
||||
.metatileAttributes = gMetatileAttributes_CeruleanCave,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_DepartmentStore =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_DepartmentStore,
|
||||
.palettes = gTilesetPalettes_DepartmentStore,
|
||||
.metatiles = gMetatiles_DepartmentStore,
|
||||
.metatileAttributes = gMetatileAttributes_DepartmentStore,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_GenericBuilding2 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_GenericBuilding2,
|
||||
.palettes = gTilesetPalettes_GenericBuilding2,
|
||||
.metatiles = gMetatiles_GenericBuilding2,
|
||||
.metatileAttributes = gMetatileAttributes_GenericBuilding2,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PowerPlant =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PowerPlant,
|
||||
.palettes = gTilesetPalettes_PowerPlant,
|
||||
.metatiles = gMetatiles_PowerPlant,
|
||||
.metatileAttributes = gMetatileAttributes_PowerPlant,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SeaCottage =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SeaCottage,
|
||||
.palettes = gTilesetPalettes_SeaCottage,
|
||||
.metatiles = gMetatiles_SeaCottage,
|
||||
.metatileAttributes = gMetatileAttributes_SeaCottage,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SilphCo =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SilphCo,
|
||||
.palettes = gTilesetPalettes_SilphCo,
|
||||
.metatiles = gMetatiles_SilphCo,
|
||||
.metatileAttributes = gMetatileAttributes_SilphCo,
|
||||
.callback = InitTilesetAnim_SilphCo,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_UndergroundPath =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_UndergroundPath,
|
||||
.palettes = gTilesetPalettes_UndergroundPath,
|
||||
.metatiles = gMetatiles_UndergroundPath,
|
||||
.metatileAttributes = gMetatileAttributes_UndergroundPath,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PokemonTower =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PokemonTower,
|
||||
.palettes = gTilesetPalettes_PokemonTower,
|
||||
.metatiles = gMetatiles_PokemonTower,
|
||||
.metatileAttributes = gMetatileAttributes_PokemonTower,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SafariZoneBuilding =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SafariZoneBuilding,
|
||||
.palettes = gTilesetPalettes_SafariZoneBuilding,
|
||||
.metatiles = gMetatiles_SafariZoneBuilding,
|
||||
.metatileAttributes = gMetatileAttributes_SafariZoneBuilding,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PokemonMansion =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PokemonMansion,
|
||||
.palettes = gTilesetPalettes_PokemonMansion,
|
||||
.metatiles = gMetatiles_PokemonMansion,
|
||||
.metatileAttributes = gMetatileAttributes_PokemonMansion,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_RestaurantHotel =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_RestaurantHotel,
|
||||
.palettes = gTilesetPalettes_RestaurantHotel,
|
||||
.metatiles = gMetatiles_RestaurantHotel,
|
||||
.metatileAttributes = gMetatileAttributes_RestaurantHotel,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_School =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_School,
|
||||
.palettes = gTilesetPalettes_School,
|
||||
.metatiles = gMetatiles_School,
|
||||
.metatileAttributes = gMetatileAttributes_School,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_FanClubDaycare =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_FanClubDaycare,
|
||||
.palettes = gTilesetPalettes_FanClubDaycare,
|
||||
.metatiles = gMetatiles_FanClubDaycare,
|
||||
.metatileAttributes = gMetatileAttributes_FanClubDaycare,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Condominiums =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SilphCo,
|
||||
.palettes = gTilesetPalettes_SilphCo,
|
||||
.metatiles = gMetatiles_Condominiums,
|
||||
.metatileAttributes = gMetatileAttributes_Condominiums,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_BurgledHouse =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_BurgledHouse,
|
||||
.palettes = gTilesetPalettes_BurgledHouse,
|
||||
.metatiles = gMetatiles_BurgledHouse,
|
||||
.metatileAttributes = gMetatileAttributes_BurgledHouse,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Dummy3 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Dummy3,
|
||||
.palettes = gTilesetPalettes_Dummy3,
|
||||
.metatiles = gMetatiles_Dummy3,
|
||||
.metatileAttributes = gMetatileAttributes_Dummy3,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_Dummy4 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_Dummy4,
|
||||
.palettes = gTilesetPalettes_Dummy4,
|
||||
.metatiles = gMetatiles_Dummy4,
|
||||
.metatileAttributes = gMetatileAttributes_Dummy4,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_MtEmber =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_MtEmber,
|
||||
.palettes = gTilesetPalettes_MtEmber,
|
||||
.metatiles = gMetatiles_MtEmber,
|
||||
.metatileAttributes = gMetatileAttributes_MtEmber,
|
||||
.callback = InitTilesetAnim_MtEmber,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_BerryForest =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_BerryForest,
|
||||
.palettes = gTilesetPalettes_BerryForest,
|
||||
.metatiles = gMetatiles_BerryForest,
|
||||
.metatileAttributes = gMetatileAttributes_BerryForest,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_NavelRock =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_NavelRock,
|
||||
.palettes = gTilesetPalettes_NavelRock,
|
||||
.metatiles = gMetatiles_NavelRock,
|
||||
.metatileAttributes = gMetatileAttributes_NavelRock,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_TanobyRuins =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_TanobyRuins,
|
||||
.palettes = gTilesetPalettes_TanobyRuins,
|
||||
.metatiles = gMetatiles_TanobyRuins,
|
||||
.metatileAttributes = gMetatileAttributes_TanobyRuins,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SeviiIslands123 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SeviiIslands123,
|
||||
.palettes = gTilesetPalettes_SeviiIslands123,
|
||||
.metatiles = gMetatiles_SeviiIslands123,
|
||||
.metatileAttributes = gMetatileAttributes_SeviiIslands123,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SeviiIslands45 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SeviiIslands45,
|
||||
.palettes = gTilesetPalettes_SeviiIslands45,
|
||||
.metatiles = gMetatiles_SeviiIslands45,
|
||||
.metatileAttributes = gMetatileAttributes_SeviiIslands45,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_SeviiIslands67 =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_SeviiIslands67,
|
||||
.palettes = gTilesetPalettes_SeviiIslands67,
|
||||
.metatiles = gMetatiles_SeviiIslands67,
|
||||
.metatileAttributes = gMetatileAttributes_SeviiIslands67,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_TrainerTower =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_TrainerTower,
|
||||
.palettes = gTilesetPalettes_TrainerTower,
|
||||
.metatiles = gMetatiles_TrainerTower,
|
||||
.metatileAttributes = gMetatileAttributes_TrainerTower,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_IslandHarbor =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_IslandHarbor,
|
||||
.palettes = gTilesetPalettes_IslandHarbor,
|
||||
.metatiles = gMetatiles_IslandHarbor,
|
||||
.metatileAttributes = gMetatileAttributes_IslandHarbor,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_PokemonLeague =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_PokemonLeague,
|
||||
.palettes = gTilesetPalettes_PokemonLeague,
|
||||
.metatiles = gMetatiles_PokemonLeague,
|
||||
.metatileAttributes = gMetatileAttributes_PokemonLeague,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
const struct Tileset gTileset_HallOfFame =
|
||||
{
|
||||
.isCompressed = TRUE,
|
||||
.isSecondary = TRUE,
|
||||
.tiles = gTilesetTiles_HallOfFame,
|
||||
.palettes = gTilesetPalettes_HallOfFame,
|
||||
.metatiles = gMetatiles_HallOfFame,
|
||||
.metatileAttributes = gMetatileAttributes_HallOfFame,
|
||||
.callback = NULL,
|
||||
};
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
const u16 gMetatiles_General[] = INCBIN_U16("data/tilesets/primary/general/metatiles.bin");
|
||||
const u32 gMetatileAttributes_General[] = INCBIN_U32("data/tilesets/primary/general/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PalletTown[] = INCBIN_U16("data/tilesets/secondary/pallet_town/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PalletTown[] = INCBIN_U32("data/tilesets/secondary/pallet_town/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_ViridianCity[] = INCBIN_U16("data/tilesets/secondary/viridian_city/metatiles.bin");
|
||||
const u32 gMetatileAttributes_ViridianCity[] = INCBIN_U32("data/tilesets/secondary/viridian_city/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PewterCity[] = INCBIN_U16("data/tilesets/secondary/pewter_city/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PewterCity[] = INCBIN_U32("data/tilesets/secondary/pewter_city/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CeruleanCity[] = INCBIN_U16("data/tilesets/secondary/cerulean_city/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CeruleanCity[] = INCBIN_U32("data/tilesets/secondary/cerulean_city/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_LavenderTown[] = INCBIN_U16("data/tilesets/secondary/lavender_town/metatiles.bin");
|
||||
const u32 gMetatileAttributes_LavenderTown[] = INCBIN_U32("data/tilesets/secondary/lavender_town/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_VermilionCity[] = INCBIN_U16("data/tilesets/secondary/vermilion_city/metatiles.bin");
|
||||
const u32 gMetatileAttributes_VermilionCity[] = INCBIN_U32("data/tilesets/secondary/vermilion_city/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CeladonCity[] = INCBIN_U16("data/tilesets/secondary/celadon_city/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CeladonCity[] = INCBIN_U32("data/tilesets/secondary/celadon_city/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_FuchsiaCity[] = INCBIN_U16("data/tilesets/secondary/fuchsia_city/metatiles.bin");
|
||||
const u32 gMetatileAttributes_FuchsiaCity[] = INCBIN_U32("data/tilesets/secondary/fuchsia_city/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CinnabarIsland[] = INCBIN_U16("data/tilesets/secondary/cinnabar_island/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CinnabarIsland[] = INCBIN_U32("data/tilesets/secondary/cinnabar_island/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_IndigoPlateau[] = INCBIN_U16("data/tilesets/secondary/indigo_plateau/metatiles.bin");
|
||||
const u32 gMetatileAttributes_IndigoPlateau[] = INCBIN_U32("data/tilesets/secondary/indigo_plateau/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SaffronCity[] = INCBIN_U16("data/tilesets/secondary/saffron_city/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SaffronCity[] = INCBIN_U32("data/tilesets/secondary/saffron_city/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PewterGym[] = INCBIN_U16("data/tilesets/secondary/pewter_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PewterGym[] = INCBIN_U32("data/tilesets/secondary/pewter_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CeruleanGym[] = INCBIN_U16("data/tilesets/secondary/cerulean_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CeruleanGym[] = INCBIN_U32("data/tilesets/secondary/cerulean_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_VermilionGym[] = INCBIN_U16("data/tilesets/secondary/vermilion_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_VermilionGym[] = INCBIN_U32("data/tilesets/secondary/vermilion_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CeladonGym[] = INCBIN_U16("data/tilesets/secondary/celadon_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CeladonGym[] = INCBIN_U32("data/tilesets/secondary/celadon_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_FuchsiaGym[] = INCBIN_U16("data/tilesets/secondary/fuchsia_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_FuchsiaGym[] = INCBIN_U32("data/tilesets/secondary/fuchsia_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SaffronGym[] = INCBIN_U16("data/tilesets/secondary/saffron_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SaffronGym[] = INCBIN_U32("data/tilesets/secondary/saffron_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CinnabarGym[] = INCBIN_U16("data/tilesets/secondary/cinnabar_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CinnabarGym[] = INCBIN_U32("data/tilesets/secondary/cinnabar_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_ViridianGym[] = INCBIN_U16("data/tilesets/secondary/viridian_gym/metatiles.bin");
|
||||
const u32 gMetatileAttributes_ViridianGym[] = INCBIN_U32("data/tilesets/secondary/viridian_gym/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Building[] = INCBIN_U16("data/tilesets/primary/building/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Building[] = INCBIN_U32("data/tilesets/primary/building/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Dummy1[] = INCBIN_U16("data/tilesets/secondary/dummy_1/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Dummy1[] = INCBIN_U32("data/tilesets/secondary/dummy_1/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_HoennBuilding[] = INCBIN_U16("data/tilesets/secondary/hoenn_building/metatiles.bin");
|
||||
const u32 gMetatileAttributes_HoennBuilding[] = INCBIN_U32("data/tilesets/secondary/hoenn_building/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_BikeShop[] = INCBIN_U16("data/tilesets/secondary/bike_shop/metatiles.bin");
|
||||
const u32 gMetatileAttributes_BikeShop[] = INCBIN_U32("data/tilesets/secondary/bike_shop/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Mart[] = INCBIN_U16("data/tilesets/secondary/mart/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Mart[] = INCBIN_U32("data/tilesets/secondary/mart/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PokemonCenter[] = INCBIN_U16("data/tilesets/secondary/pokemon_center/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PokemonCenter[] = INCBIN_U32("data/tilesets/secondary/pokemon_center/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_GenericBuilding1[] = INCBIN_U16("data/tilesets/secondary/generic_building_1/metatiles.bin");
|
||||
const u32 gMetatileAttributes_GenericBuilding1[] = INCBIN_U32("data/tilesets/secondary/generic_building_1/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Cave[] = INCBIN_U16("data/tilesets/secondary/cave/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Cave[] = INCBIN_U32("data/tilesets/secondary/cave/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_GameCorner[] = INCBIN_U16("data/tilesets/secondary/game_corner/metatiles.bin");
|
||||
const u32 gMetatileAttributes_GameCorner[] = INCBIN_U32("data/tilesets/secondary/game_corner/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Lab[] = INCBIN_U16("data/tilesets/secondary/lab/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Lab[] = INCBIN_U32("data/tilesets/secondary/lab/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SSAnne[] = INCBIN_U16("data/tilesets/secondary/ss_anne/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SSAnne[] = INCBIN_U32("data/tilesets/secondary/ss_anne/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Dummy2[] = INCBIN_U16("data/tilesets/secondary/dummy_2/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Dummy2[] = INCBIN_U32("data/tilesets/secondary/dummy_2/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_ViridianForest[] = INCBIN_U16("data/tilesets/secondary/viridian_forest/metatiles.bin");
|
||||
const u32 gMetatileAttributes_ViridianForest[] = INCBIN_U32("data/tilesets/secondary/viridian_forest/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_UnusedGatehouse1[] = INCBIN_U16("data/tilesets/secondary/unused_gatehouse_1/metatiles.bin");
|
||||
const u32 gMetatileAttributes_UnusedGatehouse1[] = INCBIN_U32("data/tilesets/secondary/unused_gatehouse_1/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_RockTunnel[] = INCBIN_U16("data/tilesets/secondary/rock_tunnel/metatiles.bin");
|
||||
const u32 gMetatileAttributes_RockTunnel[] = INCBIN_U32("data/tilesets/secondary/rock_tunnel/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_DiglettsCave[] = INCBIN_U16("data/tilesets/secondary/digletts_cave/metatiles.bin");
|
||||
const u32 gMetatileAttributes_DiglettsCave[] = INCBIN_U32("data/tilesets/secondary/digletts_cave/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SeafoamIslands[] = INCBIN_U16("data/tilesets/secondary/seafoam_islands/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SeafoamIslands[] = INCBIN_U32("data/tilesets/secondary/seafoam_islands/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_UnusedGatehouse2[] = INCBIN_U16("data/tilesets/secondary/unused_gatehouse_2/metatiles.bin");
|
||||
const u32 gMetatileAttributes_UnusedGatehouse2[] = INCBIN_U32("data/tilesets/secondary/unused_gatehouse_2/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CeruleanCave[] = INCBIN_U16("data/tilesets/secondary/cerulean_cave/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CeruleanCave[] = INCBIN_U32("data/tilesets/secondary/cerulean_cave/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_DepartmentStore[] = INCBIN_U16("data/tilesets/secondary/department_store/metatiles.bin");
|
||||
const u32 gMetatileAttributes_DepartmentStore[] = INCBIN_U32("data/tilesets/secondary/department_store/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_GenericBuilding2[] = INCBIN_U16("data/tilesets/secondary/generic_building_2/metatiles.bin");
|
||||
const u32 gMetatileAttributes_GenericBuilding2[] = INCBIN_U32("data/tilesets/secondary/generic_building_2/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PowerPlant[] = INCBIN_U16("data/tilesets/secondary/power_plant/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PowerPlant[] = INCBIN_U32("data/tilesets/secondary/power_plant/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SeaCottage[] = INCBIN_U16("data/tilesets/secondary/sea_cottage/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SeaCottage[] = INCBIN_U32("data/tilesets/secondary/sea_cottage/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SilphCo[] = INCBIN_U16("data/tilesets/secondary/silph_co/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SilphCo[] = INCBIN_U32("data/tilesets/secondary/silph_co/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_UndergroundPath[] = INCBIN_U16("data/tilesets/secondary/underground_path/metatiles.bin");
|
||||
const u32 gMetatileAttributes_UndergroundPath[] = INCBIN_U32("data/tilesets/secondary/underground_path/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PokemonTower[] = INCBIN_U16("data/tilesets/secondary/pokemon_tower/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PokemonTower[] = INCBIN_U32("data/tilesets/secondary/pokemon_tower/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SafariZoneBuilding[] = INCBIN_U16("data/tilesets/secondary/safari_zone_building/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SafariZoneBuilding[] = INCBIN_U32("data/tilesets/secondary/safari_zone_building/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PokemonMansion[] = INCBIN_U16("data/tilesets/secondary/pokemon_mansion/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PokemonMansion[] = INCBIN_U32("data/tilesets/secondary/pokemon_mansion/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Museum[] = INCBIN_U16("data/tilesets/secondary/museum/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Museum[] = INCBIN_U32("data/tilesets/secondary/museum/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_CableClub[] = INCBIN_U16("data/tilesets/secondary/cable_club/metatiles.bin");
|
||||
const u32 gMetatileAttributes_CableClub[] = INCBIN_U32("data/tilesets/secondary/cable_club/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_RestaurantHotel[] = INCBIN_U16("data/tilesets/secondary/restaurant_hotel/metatiles.bin");
|
||||
const u32 gMetatileAttributes_RestaurantHotel[] = INCBIN_U32("data/tilesets/secondary/restaurant_hotel/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_School[] = INCBIN_U16("data/tilesets/secondary/school/metatiles.bin");
|
||||
const u32 gMetatileAttributes_School[] = INCBIN_U32("data/tilesets/secondary/school/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_FanClubDaycare[] = INCBIN_U16("data/tilesets/secondary/fan_club_daycare/metatiles.bin");
|
||||
const u32 gMetatileAttributes_FanClubDaycare[] = INCBIN_U32("data/tilesets/secondary/fan_club_daycare/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Condominiums[] = INCBIN_U16("data/tilesets/secondary/condominiums/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Condominiums[] = INCBIN_U32("data/tilesets/secondary/condominiums/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_BurgledHouse[] = INCBIN_U16("data/tilesets/secondary/burgled_house/metatiles.bin");
|
||||
const u32 gMetatileAttributes_BurgledHouse[] = INCBIN_U32("data/tilesets/secondary/burgled_house/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Dummy3[] = INCBIN_U16("data/tilesets/secondary/dummy_3/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Dummy3[] = INCBIN_U32("data/tilesets/secondary/dummy_3/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_Dummy4[] = INCBIN_U16("data/tilesets/secondary/dummy_4/metatiles.bin");
|
||||
const u32 gMetatileAttributes_Dummy4[] = INCBIN_U32("data/tilesets/secondary/dummy_4/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_MtEmber[] = INCBIN_U16("data/tilesets/secondary/mt_ember/metatiles.bin");
|
||||
const u32 gMetatileAttributes_MtEmber[] = INCBIN_U32("data/tilesets/secondary/mt_ember/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_BerryForest[] = INCBIN_U16("data/tilesets/secondary/berry_forest/metatiles.bin");
|
||||
const u32 gMetatileAttributes_BerryForest[] = INCBIN_U32("data/tilesets/secondary/berry_forest/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_NavelRock[] = INCBIN_U16("data/tilesets/secondary/navel_rock/metatiles.bin");
|
||||
const u32 gMetatileAttributes_NavelRock[] = INCBIN_U32("data/tilesets/secondary/navel_rock/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_TanobyRuins[] = INCBIN_U16("data/tilesets/secondary/tanoby_ruins/metatiles.bin");
|
||||
const u32 gMetatileAttributes_TanobyRuins[] = INCBIN_U32("data/tilesets/secondary/tanoby_ruins/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SeviiIslands123[] = INCBIN_U16("data/tilesets/secondary/sevii_islands_123/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SeviiIslands123[] = INCBIN_U32("data/tilesets/secondary/sevii_islands_123/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SeviiIslands45[] = INCBIN_U16("data/tilesets/secondary/sevii_islands_45/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SeviiIslands45[] = INCBIN_U32("data/tilesets/secondary/sevii_islands_45/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_SeviiIslands67[] = INCBIN_U16("data/tilesets/secondary/sevii_islands_67/metatiles.bin");
|
||||
const u32 gMetatileAttributes_SeviiIslands67[] = INCBIN_U32("data/tilesets/secondary/sevii_islands_67/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_TrainerTower[] = INCBIN_U16("data/tilesets/secondary/trainer_tower/metatiles.bin");
|
||||
const u32 gMetatileAttributes_TrainerTower[] = INCBIN_U32("data/tilesets/secondary/trainer_tower/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_IslandHarbor[] = INCBIN_U16("data/tilesets/secondary/island_harbor/metatiles.bin");
|
||||
const u32 gMetatileAttributes_IslandHarbor[] = INCBIN_U32("data/tilesets/secondary/island_harbor/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_PokemonLeague[] = INCBIN_U16("data/tilesets/secondary/pokemon_league/metatiles.bin");
|
||||
const u32 gMetatileAttributes_PokemonLeague[] = INCBIN_U32("data/tilesets/secondary/pokemon_league/metatile_attributes.bin");
|
||||
|
||||
const u16 gMetatiles_HallOfFame[] = INCBIN_U16("data/tilesets/secondary/hall_of_fame/metatiles.bin");
|
||||
const u32 gMetatileAttributes_HallOfFame[] = INCBIN_U32("data/tilesets/secondary/hall_of_fame/metatile_attributes.bin");
|
||||
+742
-2226
File diff suppressed because it is too large
Load Diff
@@ -24,8 +24,11 @@
|
||||
|
||||
|
||||
## for encounter in wild_encounter_group.encounters
|
||||
{% if contains(encounter.base_label, "LeafGreen") %}#ifdef LEAFGREEN
|
||||
{% else if contains(encounter.base_label, "FireRed") %}#ifdef FIRERED{% endif %}
|
||||
{% if contains(encounter.base_label, "LeafGreen") %}
|
||||
#ifdef LEAFGREEN
|
||||
{% else if contains(encounter.base_label, "FireRed") %}
|
||||
#ifdef FIRERED
|
||||
{% endif %}
|
||||
{% if existsIn(encounter, "land_mons") %}
|
||||
const struct WildPokemon {{ encounter.base_label }}_LandMons[] =
|
||||
{
|
||||
@@ -66,15 +69,20 @@ const struct WildPokemon {{ encounter.base_label }}_FishingMons[] =
|
||||
|
||||
const struct WildPokemonInfo {{ encounter.base_label }}_FishingMonsInfo = { {{encounter.fishing_mons.encounter_rate}}, {{ encounter.base_label }}_FishingMons };
|
||||
{% endif %}
|
||||
{% if contains(encounter.base_label, "FireRed") or contains(encounter.base_label, "LeafGreen") %}#endif{% endif %}
|
||||
{% if contains(encounter.base_label, "FireRed") or contains(encounter.base_label, "LeafGreen") %}
|
||||
#endif
|
||||
{% endif %}
|
||||
|
||||
## endfor
|
||||
|
||||
const struct WildPokemonHeader {{ wild_encounter_group.label }}[] =
|
||||
{
|
||||
## for encounter in wild_encounter_group.encounters
|
||||
{% if contains(encounter.base_label, "LeafGreen") %}#ifdef LEAFGREEN
|
||||
{% else if contains(encounter.base_label, "FireRed") %}#ifdef FIRERED{% endif %}
|
||||
{% if contains(encounter.base_label, "LeafGreen") %}
|
||||
#ifdef LEAFGREEN
|
||||
{% else if contains(encounter.base_label, "FireRed") %}
|
||||
#ifdef FIRERED
|
||||
{% endif %}
|
||||
{
|
||||
.mapGroup = {% if wild_encounter_group.for_maps %}MAP_GROUP({{ removePrefix(encounter.map, "MAP_") }}){% else %}0{% endif %},
|
||||
.mapNum = {% if wild_encounter_group.for_maps %}MAP_NUM({{ removePrefix(encounter.map, "MAP_") }}){% else %}{{ loop.index1 }}{% endif %},
|
||||
@@ -83,7 +91,9 @@ const struct WildPokemonHeader {{ wild_encounter_group.label }}[] =
|
||||
.rockSmashMonsInfo = {% if existsIn(encounter, "rock_smash_mons") %}&{{ encounter.base_label }}_RockSmashMonsInfo{% else %}NULL{% endif %},
|
||||
.fishingMonsInfo = {% if existsIn(encounter, "fishing_mons") %}&{{ encounter.base_label }}_FishingMonsInfo{% else %}NULL{% endif %},
|
||||
},
|
||||
{% if contains(encounter.base_label, "FireRed") or contains(encounter.base_label, "LeafGreen") %}#endif{% endif %}
|
||||
{% if contains(encounter.base_label, "FireRed") or contains(encounter.base_label, "LeafGreen") %}
|
||||
#endif
|
||||
{% endif %}
|
||||
## endfor
|
||||
{
|
||||
.mapGroup = MAP_GROUP(UNDEFINED),
|
||||
|
||||
+1
-1
@@ -1956,7 +1956,7 @@ static void CB2_EggHatch_1(void)
|
||||
case 9:
|
||||
if (!IsTextPrinterActive(sEggHatchData->windowId))
|
||||
{
|
||||
LoadUserWindowBorderGfx(sEggHatchData->windowId, 0x140, 0xE0);
|
||||
LoadUserWindowGfx2(sEggHatchData->windowId, 0x140, 0xE0);
|
||||
CreateYesNoMenu(&sYesNoWinTemplate, FONT_3, 0, 2, 0x140, 0xE, 0);
|
||||
sEggHatchData->CB2_state++;
|
||||
}
|
||||
|
||||
+1
-1
@@ -116,7 +116,7 @@ static void Unused_LZDecompressWramIndirect(const void **src, void *dest)
|
||||
LZ77UnCompWram(*src, dest);
|
||||
}
|
||||
|
||||
static void sub_800EDDC(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles)
|
||||
static void StitchObjectsOn8x8Canvas(s32 object_size, s32 object_count, u8 *src_tiles, u8 *dest_tiles)
|
||||
{
|
||||
/*
|
||||
This function appears to emulate behaviour found in the GB(C) versions regarding how the Pokemon images
|
||||
|
||||
@@ -3002,7 +3002,7 @@ static void PrintRecordsText(u8 windowId)
|
||||
recordNums[1] = gSaveBlock2Ptr->berryPick.bestScore;
|
||||
recordNums[2] = gSaveBlock2Ptr->berryPick.berriesPickedInRow;
|
||||
|
||||
TextWindow_SetStdFrame0_WithPal(windowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(windowId, 0x21D, 0xD0);
|
||||
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized(windowId, FONT_2, sRecordsTexts[0], 1, 1, TEXT_SKIP_DRAW, NULL);
|
||||
@@ -4160,13 +4160,13 @@ static void ResetBerryAndStatusBarSprites(void)
|
||||
|
||||
static void LoadWindowFrameGfx(u8 frameId)
|
||||
{
|
||||
LoadBgTiles(BG_INTERFACE, GetWindowFrameTilesPal(frameId)->tiles, 0x120, 1);
|
||||
LoadPalette(GetWindowFrameTilesPal(frameId)->palette, 0xA0, 0x20);
|
||||
LoadBgTiles(BG_INTERFACE, GetUserWindowGraphics(frameId)->tiles, 0x120, 1);
|
||||
LoadPalette(GetUserWindowGraphics(frameId)->palette, 0xA0, 0x20);
|
||||
}
|
||||
|
||||
static void LoadUserWindowFrameGfx(void)
|
||||
static void DBP_LoadStdWindowGfx(void)
|
||||
{
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0xA, 0xB0);
|
||||
LoadStdWindowGfx(0, 0xA, 0xB0);
|
||||
}
|
||||
|
||||
static void ResetGfxState(void)
|
||||
@@ -4341,7 +4341,7 @@ static void LoadGfx(void)
|
||||
break;
|
||||
case 4:
|
||||
LoadWindowFrameGfx(gSaveBlock2Ptr->optionsWindowFrameType);
|
||||
LoadUserWindowFrameGfx();
|
||||
DBP_LoadStdWindowGfx();
|
||||
sGfx->state++;
|
||||
break;
|
||||
default:
|
||||
@@ -4942,7 +4942,7 @@ static bool32 LoadBgGfx(void)
|
||||
return FALSE;
|
||||
break;
|
||||
case 5:
|
||||
LoadPalette(stdpal_get(3), 0xD0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(3), 0xD0, 0x20);
|
||||
break;
|
||||
default:
|
||||
sGfx->loadState = 0;
|
||||
|
||||
+2
-1
@@ -532,7 +532,8 @@ u8 GetSelectedGroupByIndex(u8 index)
|
||||
return sEasyChatSelectionData->groups[index];
|
||||
}
|
||||
|
||||
static u8 *unref_sub_80BDF6C(u8 *dest, u8 groupId, u16 totalChars)
|
||||
// Unused
|
||||
static u8 *BufferEasyChatWordGroupName(u8 *dest, u8 groupId, u16 totalChars)
|
||||
{
|
||||
u16 i;
|
||||
u8 *str = StringCopy(dest, sEasyChatGroupNamePointers[groupId]);
|
||||
|
||||
+1
-1
@@ -1284,7 +1284,7 @@ u8 GetECSelectWordNumRows(void)
|
||||
return sEasyChatScreen->selectWordNumRows;
|
||||
}
|
||||
|
||||
u8 unref_sub_80FFE60(void)
|
||||
static u8 UnusedDummy(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
+188
-172
@@ -9,6 +9,23 @@
|
||||
#include "strings.h"
|
||||
#include "text_window.h"
|
||||
|
||||
enum {
|
||||
GFXTAG_TRIANGLE_CURSOR,
|
||||
GFXTAG_RECTANGLE_CURSOR,
|
||||
GFXTAG_SCROLL_INDICATOR,
|
||||
GFXTAG_START_SELECT_BUTTONS,
|
||||
GFXTAG_MODE_WINDOW,
|
||||
GFXTAG_RS_INTERVIEW_FRAME,
|
||||
GFXTAG_BUTTON_WINDOW,
|
||||
};
|
||||
|
||||
enum {
|
||||
PALTAG_TRIANGLE_CURSOR,
|
||||
PALTAG_RECTANGLE_CURSOR,
|
||||
PALTAG_MISC_UI,
|
||||
PALTAG_RS_INTERVIEW_FRAME,
|
||||
};
|
||||
|
||||
struct ECWork
|
||||
{
|
||||
u16 state;
|
||||
@@ -134,63 +151,53 @@ static void UpdateStartSelectButtonSpriteVisibility(void);
|
||||
static void HideStartSelectButtonSprites(void);
|
||||
static void CreateFooterWindow(void);
|
||||
|
||||
static const u16 gUnknown_843F3B8[] = INCBIN_U16("graphics/link_rfu/unk_843F3F8.gbapal");
|
||||
static const u16 gUnknown_843F3D8[] = INCBIN_U16("graphics/link_rfu/unk_8E9BD28.gbapal");
|
||||
static const u16 sRightTriangleCursor_Tiles[] = INCBIN_U16("graphics/link_rfu/unk_843F3F8.4bpp");
|
||||
static const u16 sUpTriangleCursor_Tiles[] = INCBIN_U16("graphics/link_rfu/unk_843F418.4bpp");
|
||||
static const u16 sStartSelectButtons_Tiles[] = INCBIN_U16("graphics/link_rfu/unk_843F518.4bpp");
|
||||
static const u16 gUnknown_843F618[] = INCBIN_U16("graphics/link_rfu/unk_843F638.gbapal");
|
||||
static const u32 gUnknown_843F638[] = INCBIN_U32("graphics/link_rfu/unk_843F638.4bpp.lz");
|
||||
static const u16 gUnknown_843F76C[] = INCBIN_U16("graphics/link_rfu/unk_843F76C.gbapal");
|
||||
static const u16 gUnknown_843F78C[] = INCBIN_U16("graphics/link_rfu/unk_843F78C.gbapal");
|
||||
static const u32 gUnknown_843F7AC[] = INCBIN_U32("graphics/link_rfu/unk_843F7AC.4bpp.lz");
|
||||
|
||||
static const u16 gUnknown_843F874[] = {
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 0, 0, 0),
|
||||
RGB( 7, 25, 31),
|
||||
RGB(21, 21, 29)
|
||||
};
|
||||
|
||||
static const u16 gUnknown_843F87C[] = {
|
||||
RGB( 0, 0, 0),
|
||||
RGB(31, 31, 31),
|
||||
RGB(12, 12, 12),
|
||||
RGB(27, 26, 27),
|
||||
RGB( 8, 17, 9)
|
||||
};
|
||||
static const u16 sTriangleCursor_Pal[] = INCBIN_U16("graphics/easy_chat/triangle_cursor.gbapal");
|
||||
static const u16 sRectangleCursor_Pal[] = INCBIN_U16("graphics/easy_chat/rectangle_cursor.gbapal");
|
||||
static const u16 sTriangleCursor_Gfx[] = INCBIN_U16("graphics/easy_chat/triangle_cursor.4bpp");
|
||||
static const u16 sScrollIndicator_Gfx[] = INCBIN_U16("graphics/easy_chat/scroll_indicator.4bpp");
|
||||
static const u16 sStartSelectButtons_Gfx[] = INCBIN_U16("graphics/easy_chat/start_select_buttons.4bpp");
|
||||
// In Ruby/Sapphire Easy Chat screens had a black background, and when the player & interviewer were present
|
||||
// on screen the interview_frame gfx was shown behind them.
|
||||
// In FRLG all Easy Chat screens have a filled background, so these gfx go unused
|
||||
static const u16 sRSInterviewFrame_Pal[] = INCBIN_U16("graphics/easy_chat/interview_frame.gbapal");
|
||||
static const u32 sRSInterviewFrame_Gfx[] = INCBIN_U32("graphics/easy_chat/interview_frame.4bpp.lz");
|
||||
static const u16 sTextInputFrameOrange_Pal[] = INCBIN_U16("graphics/easy_chat/text_input_frame_orange.gbapal");
|
||||
static const u16 sTextInputFrameGreen_Pal[] = INCBIN_U16("graphics/easy_chat/text_input_frame_green.gbapal");
|
||||
static const u32 sTextInputFrame_Gfx[] = INCBIN_U32("graphics/easy_chat/text_input_frame.4bpp.lz");
|
||||
static const u16 sTitleText_Pal[] = INCBIN_U16("graphics/easy_chat/title_text.gbapal");
|
||||
static const u16 sText_Pal[] = INCBIN_U16("graphics/easy_chat/text.gbapal");
|
||||
|
||||
static const struct EasyChatPhraseFrameDimensions sPhraseFrameDimensions[] = {
|
||||
{
|
||||
.left = 0x03,
|
||||
.top = 0x04,
|
||||
.width = 0x18,
|
||||
.height = 0x04
|
||||
.left = 3,
|
||||
.top = 4,
|
||||
.width = 24,
|
||||
.height = 4
|
||||
}, {
|
||||
.left = 0x01,
|
||||
.top = 0x04,
|
||||
.width = 0x1b,
|
||||
.height = 0x04
|
||||
.left = 1,
|
||||
.top = 4,
|
||||
.width = 27,
|
||||
.height = 4
|
||||
}, {
|
||||
.left = 0x03,
|
||||
.top = 0x00,
|
||||
.width = 0x18,
|
||||
.height = 0x0a
|
||||
.left = 3,
|
||||
.top = 0,
|
||||
.width = 24,
|
||||
.height = 10
|
||||
}, {
|
||||
.left = 0x06,
|
||||
.top = 0x06,
|
||||
.width = 0x12,
|
||||
.height = 0x04
|
||||
.left = 6,
|
||||
.top = 6,
|
||||
.width = 18,
|
||||
.height = 4
|
||||
}, {
|
||||
.left = 0x10,
|
||||
.top = 0x04,
|
||||
.width = 0x09,
|
||||
.height = 0x02
|
||||
.left = 16,
|
||||
.top = 4,
|
||||
.width = 9,
|
||||
.height = 2
|
||||
}, {
|
||||
.left = 0x0e,
|
||||
.top = 0x04,
|
||||
.width = 0x12,
|
||||
.height = 0x04
|
||||
.left = 14,
|
||||
.top = 4,
|
||||
.width = 18,
|
||||
.height = 4
|
||||
}
|
||||
};
|
||||
|
||||
@@ -271,10 +278,10 @@ static const struct WindowTemplate sEasyChatYesNoWindowTemplate = {
|
||||
.baseBlock = 0x062
|
||||
};
|
||||
|
||||
static const u8 gUnknown_843F8D8[] = _("{UNDERSCORE}");
|
||||
static const u8 sText_Underscore[] = _("{UNDERSCORE}");
|
||||
static const u8 sText_Clear17[] = _("{CLEAR 17}");
|
||||
|
||||
static const u8 *const sEasyChatKeyboardText[] = {
|
||||
static const u8 *const sEasyChatKeyboardAlphabet[NUM_ALPHABET_ROWS] = {
|
||||
gText_EasyChatKeyboard_ABCDEFothers,
|
||||
gText_EasyChatKeyboard_GHIJKL,
|
||||
gText_EasyChatKeyboard_MNOPQRS,
|
||||
@@ -282,38 +289,30 @@ static const u8 *const sEasyChatKeyboardText[] = {
|
||||
};
|
||||
|
||||
static const struct SpriteSheet sEasyChatSpriteSheets[] = {
|
||||
{sRightTriangleCursor_Tiles, 0x0020, 0},
|
||||
{sUpTriangleCursor_Tiles, 0x0100, 2},
|
||||
{sStartSelectButtons_Tiles, 0x0100, 3},
|
||||
{.data = sTriangleCursor_Gfx, .size = 0x0020, .tag = GFXTAG_TRIANGLE_CURSOR},
|
||||
{.data = sScrollIndicator_Gfx, .size = 0x0100, .tag = GFXTAG_SCROLL_INDICATOR},
|
||||
{.data = sStartSelectButtons_Gfx, .size = 0x0100, .tag = GFXTAG_START_SELECT_BUTTONS},
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct SpritePalette sEasyChatSpritePalettes[] = {
|
||||
{gUnknown_843F3B8, 0},
|
||||
{gUnknown_843F3D8, 1},
|
||||
{gUnknown_8E99F24, 2},
|
||||
{gUnknown_843F618, 3},
|
||||
{.data = sTriangleCursor_Pal, .tag = PALTAG_TRIANGLE_CURSOR},
|
||||
{.data = sRectangleCursor_Pal, .tag = PALTAG_RECTANGLE_CURSOR},
|
||||
{.data = gEasyChatButtonWindow_Pal, .tag = PALTAG_MISC_UI}, // The palette is generated from the button window but used for various parts of the UI
|
||||
{.data = sRSInterviewFrame_Pal, .tag = PALTAG_RS_INTERVIEW_FRAME},
|
||||
{}
|
||||
};
|
||||
|
||||
static const struct CompressedSpriteSheet sEasyChatCompressedSpriteSheets[] = {
|
||||
{gUnknown_843F638, 0x0800, 5},
|
||||
{gEasyChatRedRectangularCursor_Tiles, 0x1000, 1},
|
||||
{gEasyChatSelectGroupHelp_Tiles, 0x0800, 6},
|
||||
{gEasyChatModeIcons_Tiles, 0x1000, 4}
|
||||
{.data = sRSInterviewFrame_Gfx, .size = 0x0800, .tag = GFXTAG_RS_INTERVIEW_FRAME},
|
||||
{.data = gEasyChatRectangleCursor_Gfx, .size = 0x1000, .tag = GFXTAG_RECTANGLE_CURSOR},
|
||||
{.data = gEasyChatButtonWindow_Gfx, .size = 0x0800, .tag = GFXTAG_BUTTON_WINDOW},
|
||||
{.data = gEasyChatMode_Gfx, .size = 0x1000, .tag = GFXTAG_MODE_WINDOW}
|
||||
};
|
||||
|
||||
static const u8 sECDisplay_AlphaModeXCoords[] = {
|
||||
0,
|
||||
12,
|
||||
24,
|
||||
56,
|
||||
68,
|
||||
80,
|
||||
92
|
||||
};
|
||||
static const u8 sAlphabetKeyboardColumnOffsets[NUM_ALPHABET_COLUMNS] = {0, 12, 24, 56, 68, 80, 92};
|
||||
|
||||
static const struct OamData sOamData_RightTriangleCursor = {
|
||||
static const struct OamData sOamData_TriangleCursor = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -328,17 +327,17 @@ static const struct OamData sOamData_RightTriangleCursor = {
|
||||
.paletteNum = 0
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_RightTriangleCursor = {
|
||||
.tileTag = 0,
|
||||
.paletteTag = 0,
|
||||
.oam = &sOamData_RightTriangleCursor,
|
||||
static const struct SpriteTemplate sSpriteTemplate_TriangleCursor = {
|
||||
.tileTag = GFXTAG_TRIANGLE_CURSOR,
|
||||
.paletteTag = PALTAG_TRIANGLE_CURSOR,
|
||||
.oam = &sOamData_TriangleCursor,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_BounceCursor
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_RedRectangularCursor = {
|
||||
static const struct OamData sOamData_RectangleCursor = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -353,44 +352,52 @@ static const struct OamData sOamData_RedRectangularCursor = {
|
||||
.paletteNum = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnimCmd_RectCursor_Wide[] = {
|
||||
static const union AnimCmd sAnim_RectangleCursor_OnGroup[] = {
|
||||
ANIMCMD_FRAME(0x00, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnimCmd_RectCursor_Norm[] = {
|
||||
static const union AnimCmd sAnim_RectangleCursor_OnButton[] = {
|
||||
ANIMCMD_FRAME(0x20, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnimCmd_RectCursor_NormTaller[] = {
|
||||
static const union AnimCmd sAnim_RectangleCursor_OnOthers[] = {
|
||||
ANIMCMD_FRAME(0x40, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnimCmd_RectCursor_Narrow[] = {
|
||||
static const union AnimCmd sAnim_RectangleCursor_OnLetter[] = {
|
||||
ANIMCMD_FRAME(0x60, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnimTable_RedRectangularCursor[] = {
|
||||
sAnimCmd_RectCursor_Wide,
|
||||
sAnimCmd_RectCursor_Norm,
|
||||
sAnimCmd_RectCursor_NormTaller,
|
||||
sAnimCmd_RectCursor_Narrow
|
||||
// Each anim changes the dimensions of the rectangle cursor to fit what it should be selecting
|
||||
enum {
|
||||
RECTCURSOR_ANIM_ON_GROUP,
|
||||
RECTCURSOR_ANIM_ON_BUTTON,
|
||||
RECTCURSOR_ANIM_ON_OTHERS,
|
||||
RECTCURSOR_ANIM_ON_LETTER,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_RedRectangularCursor = {
|
||||
.tileTag = 1,
|
||||
.paletteTag = 1,
|
||||
.oam = &sOamData_RedRectangularCursor,
|
||||
.anims = sAnimTable_RedRectangularCursor,
|
||||
static const union AnimCmd *const sAnims_RectangleCursor[] = {
|
||||
[RECTCURSOR_ANIM_ON_GROUP] = sAnim_RectangleCursor_OnGroup,
|
||||
[RECTCURSOR_ANIM_ON_BUTTON] = sAnim_RectangleCursor_OnButton,
|
||||
[RECTCURSOR_ANIM_ON_OTHERS] = sAnim_RectangleCursor_OnOthers,
|
||||
[RECTCURSOR_ANIM_ON_LETTER] = sAnim_RectangleCursor_OnLetter,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_RectangleCursor = {
|
||||
.tileTag = GFXTAG_RECTANGLE_CURSOR,
|
||||
.paletteTag = PALTAG_RECTANGLE_CURSOR,
|
||||
.oam = &sOamData_RectangleCursor,
|
||||
.anims = sAnims_RectangleCursor,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCB_BounceCursor
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_EasyChatModeIcons = {
|
||||
static const struct OamData sOamData_ModeWindow = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -405,53 +412,61 @@ static const struct OamData sOamData_EasyChatModeIcons = {
|
||||
.paletteNum = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_EasyChatModeIcon_Hidden[] = {
|
||||
ANIMCMD_FRAME(0x60, 0),
|
||||
static const union AnimCmd sAnim_ModeWindow_Hidden[] = {
|
||||
ANIMCMD_FRAME(0x60, 0), // Hidden frame
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_EasyChatModeIcon_ToGroupMode[] = {
|
||||
ANIMCMD_FRAME(0x40, 4),
|
||||
ANIMCMD_FRAME(0x20, 4),
|
||||
static const union AnimCmd sAnim_ModeWindow_ToGroup[] = {
|
||||
ANIMCMD_FRAME(0x40, 4), // Transition frame
|
||||
ANIMCMD_FRAME(0x20, 4), // 'Group' frame
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_EasyChatModeIcon_ToAlphaMode[] = {
|
||||
ANIMCMD_FRAME(0x40, 4),
|
||||
ANIMCMD_FRAME(0x00, 4),
|
||||
static const union AnimCmd sAnim_ModeWindow_ToAlphabet[] = {
|
||||
ANIMCMD_FRAME(0x40, 4), // Transition frame
|
||||
ANIMCMD_FRAME(0x00, 4), // 'A-Z' frame
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_EasyChatModeIcon_ToHidden[] = {
|
||||
ANIMCMD_FRAME(0x40, 4),
|
||||
ANIMCMD_FRAME(0x60, 0),
|
||||
static const union AnimCmd sAnim_ModeWindow_ToHidden[] = {
|
||||
ANIMCMD_FRAME(0x40, 4), // Transition frame
|
||||
ANIMCMD_FRAME(0x60, 0), // Hidden frame
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnim_EasyChatModeIcon_HoldSmall[] = {
|
||||
ANIMCMD_FRAME(0x40, 4),
|
||||
static const union AnimCmd sAnim_ModeWindow_Transition[] = {
|
||||
ANIMCMD_FRAME(0x40, 4), // Transition frame
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const sAnimTable_EasyChatModeIcons[] = {
|
||||
sAnim_EasyChatModeIcon_Hidden,
|
||||
sAnim_EasyChatModeIcon_ToGroupMode,
|
||||
sAnim_EasyChatModeIcon_ToAlphaMode,
|
||||
sAnim_EasyChatModeIcon_ToHidden,
|
||||
sAnim_EasyChatModeIcon_HoldSmall
|
||||
enum {
|
||||
MODEWINDOW_ANIM_HIDDEN,
|
||||
MODEWINDOW_ANIM_TO_GROUP,
|
||||
MODEWINDOW_ANIM_TO_ALPHABET,
|
||||
MODEWINDOW_ANIM_TO_HIDDEN,
|
||||
MODEWINDOW_ANIM_TRANSITION,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_EasyChatModeIcons = {
|
||||
.tileTag = 4,
|
||||
.paletteTag = 2,
|
||||
.oam = &sOamData_EasyChatModeIcons,
|
||||
.anims = sAnimTable_EasyChatModeIcons,
|
||||
static const union AnimCmd *const sAnims_ModeWindow[] = {
|
||||
[MODEWINDOW_ANIM_HIDDEN] = sAnim_ModeWindow_Hidden,
|
||||
[MODEWINDOW_ANIM_TO_GROUP] = sAnim_ModeWindow_ToGroup,
|
||||
[MODEWINDOW_ANIM_TO_ALPHABET] = sAnim_ModeWindow_ToAlphabet,
|
||||
[MODEWINDOW_ANIM_TO_HIDDEN] = sAnim_ModeWindow_ToHidden,
|
||||
[MODEWINDOW_ANIM_TRANSITION] = sAnim_ModeWindow_Transition,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_ModeWindow = {
|
||||
.tileTag = GFXTAG_MODE_WINDOW,
|
||||
.paletteTag = PALTAG_MISC_UI,
|
||||
.oam = &sOamData_ModeWindow,
|
||||
.anims = sAnims_ModeWindow,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_SelectGroupHelp = {
|
||||
static const struct OamData sOamData_ButtonWindow = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -466,17 +481,17 @@ static const struct OamData sOamData_SelectGroupHelp = {
|
||||
.paletteNum = 0
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_SelectGroupHelp = {
|
||||
.tileTag = 6,
|
||||
.paletteTag = 2,
|
||||
.oam = &sOamData_SelectGroupHelp,
|
||||
static const struct SpriteTemplate sSpriteTemplate_ButtonWindow = {
|
||||
.tileTag = GFXTAG_BUTTON_WINDOW,
|
||||
.paletteTag = PALTAG_MISC_UI,
|
||||
.oam = &sOamData_ButtonWindow,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct OamData gUnknown_843FA58 = {
|
||||
static const struct OamData sOamData_StartSelectButton = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -491,7 +506,7 @@ static const struct OamData gUnknown_843FA58 = {
|
||||
.paletteNum = 0
|
||||
};
|
||||
|
||||
static const struct OamData sOamData_UpTriangleCursor = {
|
||||
static const struct OamData sOamData_ScrollIndicator = {
|
||||
.y = 0,
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.objMode = ST_OAM_OBJ_NORMAL,
|
||||
@@ -506,36 +521,37 @@ static const struct OamData sOamData_UpTriangleCursor = {
|
||||
.paletteNum = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_843FA68[] = {
|
||||
static const union AnimCmd sAnim_Frame0[] = {
|
||||
ANIMCMD_FRAME(0, 0),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_843FA70[] = {
|
||||
static const union AnimCmd sAnim_Frame1[] = {
|
||||
ANIMCMD_FRAME(4, 0),
|
||||
ANIMCMD_END,
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_843FA78[] = {
|
||||
gUnknown_843FA68,
|
||||
gUnknown_843FA70,
|
||||
// Frame0 is Start button, Frame1 is Select button, both are identical for the scroll indicators
|
||||
static const union AnimCmd *const sAnims_TwoFrame[] = {
|
||||
sAnim_Frame0,
|
||||
sAnim_Frame1,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_StartSelectButtons = {
|
||||
.tileTag = 3,
|
||||
.paletteTag = 2,
|
||||
.oam = &gUnknown_843FA58,
|
||||
.anims = gUnknown_843FA78,
|
||||
.tileTag = GFXTAG_START_SELECT_BUTTONS,
|
||||
.paletteTag = PALTAG_MISC_UI,
|
||||
.oam = &sOamData_StartSelectButton,
|
||||
.anims = sAnims_TwoFrame,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_UpTriangleCursor = {
|
||||
.tileTag = 2,
|
||||
.paletteTag = 2,
|
||||
.oam = &sOamData_UpTriangleCursor,
|
||||
.anims = gUnknown_843FA78,
|
||||
static const struct SpriteTemplate sSpriteTemplate_ScrollIndicator = {
|
||||
.tileTag = GFXTAG_SCROLL_INDICATOR,
|
||||
.paletteTag = PALTAG_MISC_UI,
|
||||
.oam = &sOamData_ScrollIndicator,
|
||||
.anims = sAnims_TwoFrame,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy,
|
||||
@@ -573,7 +589,7 @@ bool8 LoadEasyChatGraphics(void)
|
||||
break;
|
||||
case 2:
|
||||
DrawECFrameInTilemapBuffer(sEasyChatGraphicsResources->bg1TilemapBuffer);
|
||||
DecompressAndLoadBgGfxUsingHeap(1, gUnknown_843F7AC, 0, 0, 0);
|
||||
DecompressAndLoadBgGfxUsingHeap(1, sTextInputFrame_Gfx, 0, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
break;
|
||||
case 3:
|
||||
@@ -695,7 +711,7 @@ static bool8 ECInterfaceCmd_02(void)
|
||||
{
|
||||
if (*ecWord == 0xFFFF)
|
||||
{
|
||||
stringWidth = GetStringWidth(FONT_1, gUnknown_843F8D8, 0) * 7;
|
||||
stringWidth = GetStringWidth(FONT_1, sText_Underscore, 0) * 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1303,13 +1319,13 @@ static void SetGpuRegsForEasyChatInit(void)
|
||||
static void LoadEasyChatPals(void)
|
||||
{
|
||||
ResetPaletteFade();
|
||||
LoadPalette(gEasyChatMode_Pal, 0, 32);
|
||||
LoadPalette(gUnknown_843F76C, 1 * 16, 32);
|
||||
LoadPalette(gUnknown_843F78C, 4 * 16, 32);
|
||||
LoadPalette(gUnknown_843F874, 10 * 16, 8);
|
||||
LoadPalette(gUnknown_843F87C, 11 * 16, 10);
|
||||
LoadPalette(gUnknown_843F87C, 15 * 16, 10);
|
||||
LoadPalette(gUnknown_843F87C, 3 * 16, 10);
|
||||
LoadPalette(gEasyChatWindow_Pal, 0, 32);
|
||||
LoadPalette(sTextInputFrameOrange_Pal, 1 * 16, 32);
|
||||
LoadPalette(sTextInputFrameGreen_Pal, 4 * 16, 32);
|
||||
LoadPalette(sTitleText_Pal, 10 * 16, 8);
|
||||
LoadPalette(sText_Pal, 11 * 16, 10);
|
||||
LoadPalette(sText_Pal, 15 * 16, 10);
|
||||
LoadPalette(sText_Pal, 3 * 16, 10);
|
||||
}
|
||||
|
||||
static void PrintTitleText(void)
|
||||
@@ -1347,7 +1363,7 @@ static void EC_AddTextPrinterParameterized2(u8 windowId, u8 fontId, const u8 *st
|
||||
static void PrintECInstructionsText(void)
|
||||
{
|
||||
FillBgTilemapBufferRect(0, 0, 0, 0, 32, 20, 17);
|
||||
TextWindow_SetUserSelectedFrame(1, 1, 0xE0);
|
||||
LoadUserWindowGfx(1, 1, 0xE0);
|
||||
DrawTextBorderOuter(1, 1, 14);
|
||||
PrintECInterfaceTextById(0);
|
||||
PutWindowTilemap(1);
|
||||
@@ -1579,8 +1595,8 @@ static void PrintEasyChatKeyboardText(void)
|
||||
{
|
||||
u32 i;
|
||||
|
||||
for (i = 0; i < NELEMS(sEasyChatKeyboardText); i++)
|
||||
EC_AddTextPrinterParameterized(2, FONT_1, sEasyChatKeyboardText[i], 10, 96 + i * 16, TEXT_SKIP_DRAW, NULL);
|
||||
for (i = 0; i < ARRAY_COUNT(sEasyChatKeyboardAlphabet); i++)
|
||||
EC_AddTextPrinterParameterized(2, FONT_1, sEasyChatKeyboardAlphabet[i], 10, 96 + i * 16, TEXT_SKIP_DRAW, NULL);
|
||||
}
|
||||
|
||||
static void PrintECWordsMenu(void)
|
||||
@@ -1930,7 +1946,7 @@ static void CreateSelectDestFieldCursorSprite(void)
|
||||
u8 frameId = GetEasyChatScreenFrameId();
|
||||
s16 x = sPhraseFrameDimensions[frameId].left * 8 + 13;
|
||||
s16 y = (sPhraseFrameDimensions[frameId].top + 1) * 8 + 1;
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_RightTriangleCursor, x, y, 2);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_TriangleCursor, x, y, 2);
|
||||
sEasyChatGraphicsResources->selectDestFieldCursorSprite = &gSprites[spriteId];
|
||||
gSprites[spriteId].data[1] = 1;
|
||||
}
|
||||
@@ -1970,11 +1986,11 @@ static void UnfreezeSelectDestFieldCursorSprite(void)
|
||||
|
||||
static void CreateRedRectangularCursorSpritePair(void)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_RedRectangularCursor, 0, 0, 3);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_RectangleCursor, 0, 0, 3);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight = &gSprites[spriteId];
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight->x2 = 32;
|
||||
|
||||
spriteId = CreateSprite(&sSpriteTemplate_RedRectangularCursor, 0, 0, 3);
|
||||
spriteId = CreateSprite(&sSpriteTemplate_RectangleCursor, 0, 0, 3);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft = &gSprites[spriteId];
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft->x2 = -32;
|
||||
|
||||
@@ -2009,21 +2025,21 @@ static void MoveCursor_Group(s8 x, s8 y)
|
||||
{
|
||||
if (x != -1)
|
||||
{
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteRight, 0);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteRight, RECTCURSOR_ANIM_ON_GROUP);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight->x = x * 84 + 58;
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight->y = y * 16 + 96;
|
||||
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteLeft, 0);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteLeft, RECTCURSOR_ANIM_ON_GROUP);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft->x = x * 84 + 58;
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft->y = y * 16 + 96;
|
||||
}
|
||||
else
|
||||
{
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteRight, 1);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteRight, RECTCURSOR_ANIM_ON_BUTTON);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight->x = 216;
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight->y = y * 16 + 112;
|
||||
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteLeft, 1);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteLeft, RECTCURSOR_ANIM_ON_BUTTON);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft->x = 216;
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft->y = y * 16 + 112;
|
||||
}
|
||||
@@ -2041,12 +2057,12 @@ static void MoveCursor_Alpha(s8 cursorX, s8 cursorY)
|
||||
if (cursorX == 6 && cursorY == 0)
|
||||
{
|
||||
x = 157;
|
||||
anim = 2;
|
||||
anim = RECTCURSOR_ANIM_ON_OTHERS;
|
||||
}
|
||||
else
|
||||
{
|
||||
x += sECDisplay_AlphaModeXCoords[cursorX < NELEMS(sECDisplay_AlphaModeXCoords) ? cursorX : 0];
|
||||
anim = 3;
|
||||
x += sAlphabetKeyboardColumnOffsets[cursorX < ARRAY_COUNT(sAlphabetKeyboardColumnOffsets) ? cursorX : 0];
|
||||
anim = RECTCURSOR_ANIM_ON_LETTER;
|
||||
}
|
||||
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteRight, anim);
|
||||
@@ -2059,11 +2075,11 @@ static void MoveCursor_Alpha(s8 cursorX, s8 cursorY)
|
||||
}
|
||||
else
|
||||
{
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteRight, 1);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteRight, RECTCURSOR_ANIM_ON_BUTTON);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight->x = 216;
|
||||
sEasyChatGraphicsResources->rectCursorSpriteRight->y = cursorY * 16 + 112;
|
||||
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteLeft, 1);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->rectCursorSpriteLeft, RECTCURSOR_ANIM_ON_BUTTON);
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft->x = 216;
|
||||
sEasyChatGraphicsResources->rectCursorSpriteLeft->y = cursorY * 16 + 112;
|
||||
}
|
||||
@@ -2071,7 +2087,7 @@ static void MoveCursor_Alpha(s8 cursorX, s8 cursorY)
|
||||
|
||||
static void CreateSelectWordCursorSprite(void)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_RightTriangleCursor, 0, 0, 4);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_TriangleCursor, 0, 0, 4);
|
||||
sEasyChatGraphicsResources->selectWordCursorSprite = &gSprites[spriteId];
|
||||
sEasyChatGraphicsResources->selectWordCursorSprite->callback = SpriteCB_SelectWordCursorSprite;
|
||||
sEasyChatGraphicsResources->selectWordCursorSprite->oam.priority = 2;
|
||||
@@ -2121,11 +2137,11 @@ static void DestroySelectWordCursorSprite(void)
|
||||
|
||||
static void CreateSelectGroupHelpSprite(void)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_SelectGroupHelp, 208, 128, 6);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_ButtonWindow, 208, 128, 6);
|
||||
sEasyChatGraphicsResources->selectGroupHelpSprite = &gSprites[spriteId];
|
||||
sEasyChatGraphicsResources->selectGroupHelpSprite->x2 = -64;
|
||||
|
||||
spriteId = CreateSprite(&sSpriteTemplate_EasyChatModeIcons, 208, 80, 5);
|
||||
spriteId = CreateSprite(&sSpriteTemplate_ModeWindow, 208, 80, 5);
|
||||
sEasyChatGraphicsResources->modeIconsSprite = &gSprites[spriteId];
|
||||
sEasyChatGraphicsResources->modeIconState = 0;
|
||||
}
|
||||
@@ -2142,9 +2158,9 @@ static bool8 AnimateSeletGroupModeAndHelpSpriteEnter(void)
|
||||
{
|
||||
sEasyChatGraphicsResources->selectGroupHelpSprite->x2 = 0;
|
||||
if (!IsEasyChatAlphaMode())
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, 1);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, MODEWINDOW_ANIM_TO_GROUP);
|
||||
else
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, 2);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, MODEWINDOW_ANIM_TO_ALPHABET);
|
||||
|
||||
sEasyChatGraphicsResources->modeIconState++;
|
||||
}
|
||||
@@ -2163,7 +2179,7 @@ static bool8 AnimateSeletGroupModeAndHelpSpriteEnter(void)
|
||||
static void StartModeIconHidingAnimation(void)
|
||||
{
|
||||
sEasyChatGraphicsResources->modeIconState = 0;
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, 3);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, MODEWINDOW_ANIM_TO_HIDDEN);
|
||||
}
|
||||
|
||||
static bool8 RunModeIconHidingAnimation(void)
|
||||
@@ -2194,15 +2210,15 @@ static bool8 RunModeIconHidingAnimation(void)
|
||||
|
||||
static void ShrinkModeIconsSprite(void)
|
||||
{
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, 4);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, MODEWINDOW_ANIM_TRANSITION);
|
||||
}
|
||||
|
||||
static void ShowModeIconsSprite(void)
|
||||
{
|
||||
if (!IsEasyChatAlphaMode())
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, 1);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, MODEWINDOW_ANIM_TO_GROUP);
|
||||
else
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, 2);
|
||||
StartSpriteAnim(sEasyChatGraphicsResources->modeIconsSprite, MODEWINDOW_ANIM_TO_ALPHABET);
|
||||
}
|
||||
|
||||
static bool8 ModeIconsSpriteAnimIsEnded(void)
|
||||
@@ -2212,11 +2228,11 @@ static bool8 ModeIconsSpriteAnimIsEnded(void)
|
||||
|
||||
static void CreateVerticalScrollArrowSprites(void)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_UpTriangleCursor, 96, 80, 0);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_ScrollIndicator, 96, 80, 0);
|
||||
if (spriteId != MAX_SPRITES)
|
||||
sEasyChatGraphicsResources->upTriangleCursorSprite = &gSprites[spriteId];
|
||||
|
||||
spriteId = CreateSprite(&sSpriteTemplate_UpTriangleCursor, 96, 156, 0);
|
||||
spriteId = CreateSprite(&sSpriteTemplate_ScrollIndicator, 96, 156, 0);
|
||||
if (spriteId != MAX_SPRITES)
|
||||
{
|
||||
sEasyChatGraphicsResources->downTriangleCursorSprite = &gSprites[spriteId];
|
||||
|
||||
+44
-33
@@ -5,6 +5,14 @@
|
||||
|
||||
static bool8 IsFlagOrVarStoredInQuestLog(u16 idx, u8 a1);
|
||||
|
||||
#define NUM_SPECIAL_FLAGS (SPECIAL_FLAGS_END - SPECIAL_FLAGS_START + 1)
|
||||
#define NUM_TEMP_FLAGS (TEMP_FLAGS_END - TEMP_FLAGS_START + 1)
|
||||
#define NUM_TEMP_VARS (TEMP_VARS_END - TEMP_VARS_START + 1)
|
||||
|
||||
#define SPECIAL_FLAGS_SIZE (NUM_SPECIAL_FLAGS / 8) // 8 flags per byte
|
||||
#define TEMP_FLAGS_SIZE (NUM_TEMP_FLAGS / 8)
|
||||
#define TEMP_VARS_SIZE (NUM_TEMP_VARS * 2) // 1/2 var per byte
|
||||
|
||||
EWRAM_DATA u16 gSpecialVar_0x8000 = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8001 = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8002 = 0;
|
||||
@@ -25,7 +33,7 @@ EWRAM_DATA u16 gSpecialVar_MonBoxPos = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_TextColor = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_PrevTextColor = 0;
|
||||
EWRAM_DATA u16 gSpecialVar_0x8014 = 0;
|
||||
EWRAM_DATA u8 sSpecialFlags[SPECIAL_FLAGS_COUNT] = {};
|
||||
EWRAM_DATA u8 sSpecialFlags[SPECIAL_FLAGS_SIZE] = {};
|
||||
|
||||
u16 gLastQuestLogStoredFlagOrVarIdx;
|
||||
|
||||
@@ -33,15 +41,15 @@ extern u16 *const gSpecialVars[];
|
||||
|
||||
void InitEventData(void)
|
||||
{
|
||||
memset(gSaveBlock1Ptr->flags, 0, NUM_FLAG_BYTES);
|
||||
memset(gSaveBlock1Ptr->vars, 0, VARS_COUNT * 2);
|
||||
memset(sSpecialFlags, 0, SPECIAL_FLAGS_COUNT);
|
||||
memset(gSaveBlock1Ptr->flags, 0, sizeof(gSaveBlock1Ptr->flags));
|
||||
memset(gSaveBlock1Ptr->vars, 0, sizeof(gSaveBlock1Ptr->vars));
|
||||
memset(sSpecialFlags, 0, sizeof(sSpecialFlags));
|
||||
}
|
||||
|
||||
void ClearTempFieldEventData(void)
|
||||
{
|
||||
memset(gSaveBlock1Ptr->flags, 0, 4);
|
||||
memset(gSaveBlock1Ptr->vars, 0, 16 * 2);
|
||||
memset(gSaveBlock1Ptr->flags + (TEMP_FLAGS_START / 8), 0, TEMP_FLAGS_SIZE);
|
||||
memset(gSaveBlock1Ptr->vars + ((TEMP_VARS_START - VARS_START) * 2), 0, TEMP_VARS_SIZE);
|
||||
FlagClear(FLAG_SYS_WHITE_FLUTE_ACTIVE);
|
||||
FlagClear(FLAG_SYS_BLACK_FLUTE_ACTIVE);
|
||||
FlagClear(FLAG_SYS_USE_STRENGTH);
|
||||
@@ -49,37 +57,41 @@ void ClearTempFieldEventData(void)
|
||||
FlagClear(FLAG_SYS_INFORMED_OF_LOCAL_WIRELESS_PLAYER);
|
||||
}
|
||||
|
||||
void sub_806E168(void) // Unused
|
||||
// Unused
|
||||
static void DisableNationalPokedex_RSE(void)
|
||||
{
|
||||
u16 *ptr = GetVarPointer(VAR_0x403C);
|
||||
gSaveBlock2Ptr->pokedex.nationalMagic = 0;
|
||||
gSaveBlock2Ptr->pokedex.unused = 0;
|
||||
*ptr = 0;
|
||||
FlagClear(FLAG_0x838);
|
||||
}
|
||||
|
||||
void sub_806E190(void)
|
||||
// The magic numbers used here (0xDA and 0x0302) correspond to those
|
||||
// used in RSE for enabling the national Pokedex
|
||||
void EnableNationalPokedex_RSE(void)
|
||||
{
|
||||
// Note: the var, struct member, and flag are never used
|
||||
u16 *ptr = GetVarPointer(VAR_0x403C);
|
||||
gSaveBlock2Ptr->pokedex.nationalMagic = 0xDA;
|
||||
gSaveBlock2Ptr->pokedex.unused = 0xDA;
|
||||
*ptr = 0x0302;
|
||||
FlagSet(FLAG_0x838);
|
||||
}
|
||||
|
||||
bool32 sub_806E1C0(void) // Unused
|
||||
// Unused
|
||||
static bool32 IsNationalPokedexEnabled_RSE(void)
|
||||
{
|
||||
if (gSaveBlock2Ptr->pokedex.nationalMagic != 0xDA)
|
||||
return FALSE;
|
||||
if (VarGet(VAR_0x403C) != 0x0302)
|
||||
return FALSE;
|
||||
if (!FlagGet(FLAG_0x838))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
if (gSaveBlock2Ptr->pokedex.unused == 0xDA
|
||||
&& VarGet(VAR_0x403C) == 0x0302
|
||||
&& FlagGet(FLAG_0x838))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void DisableNationalPokedex(void)
|
||||
{
|
||||
u16 *nationalDexVar = GetVarPointer(VAR_NATIONAL_DEX);
|
||||
gSaveBlock2Ptr->pokedex.unknown2 = 0;
|
||||
gSaveBlock2Ptr->pokedex.nationalMagic = 0;
|
||||
*nationalDexVar = 0;
|
||||
FlagClear(FLAG_SYS_NATIONAL_DEX);
|
||||
}
|
||||
@@ -87,20 +99,19 @@ void DisableNationalPokedex(void)
|
||||
void EnableNationalPokedex(void)
|
||||
{
|
||||
u16 *nationalDexVar = GetVarPointer(VAR_NATIONAL_DEX);
|
||||
gSaveBlock2Ptr->pokedex.unknown2 = 0xB9;
|
||||
gSaveBlock2Ptr->pokedex.nationalMagic = 0xB9;
|
||||
*nationalDexVar = 0x6258;
|
||||
FlagSet(FLAG_SYS_NATIONAL_DEX);
|
||||
}
|
||||
|
||||
bool32 IsNationalPokedexEnabled(void)
|
||||
{
|
||||
if (gSaveBlock2Ptr->pokedex.unknown2 != 0xB9)
|
||||
return FALSE;
|
||||
if (VarGet(VAR_NATIONAL_DEX) != 0x6258)
|
||||
return FALSE;
|
||||
if (!FlagGet(FLAG_SYS_NATIONAL_DEX))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
if (gSaveBlock2Ptr->pokedex.nationalMagic == 0xB9
|
||||
&& VarGet(VAR_NATIONAL_DEX) == 0x6258
|
||||
&& FlagGet(FLAG_SYS_NATIONAL_DEX))
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void DisableMysteryGift(void)
|
||||
@@ -153,21 +164,21 @@ void ResetMysteryEventVars(void)
|
||||
|
||||
void DisableResetRTC(void)
|
||||
{
|
||||
VarSet(VAR_0x4032, 0);
|
||||
FlagClear(FLAG_0x837);
|
||||
VarSet(VAR_RESET_RTC_ENABLE, 0);
|
||||
FlagClear(FLAG_SYS_RESET_RTC_ENABLE);
|
||||
}
|
||||
|
||||
void EnableResetRTC(void)
|
||||
{
|
||||
VarSet(VAR_0x4032, 0x0920);
|
||||
FlagSet(FLAG_0x837);
|
||||
VarSet(VAR_RESET_RTC_ENABLE, 0x0920);
|
||||
FlagSet(FLAG_SYS_RESET_RTC_ENABLE);
|
||||
}
|
||||
|
||||
bool32 CanResetRTC(void)
|
||||
{
|
||||
if (!FlagGet(FLAG_0x837))
|
||||
if (!FlagGet(FLAG_SYS_RESET_RTC_ENABLE))
|
||||
return FALSE;
|
||||
if (VarGet(VAR_0x4032) != 0x0920)
|
||||
if (VarGet(VAR_RESET_RTC_ENABLE) != 0x0920)
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+408
-450
File diff suppressed because it is too large
Load Diff
@@ -79,7 +79,7 @@ static const u16 sEvolutionSparkleMatrixScales[12] = {
|
||||
0x100
|
||||
};
|
||||
|
||||
static const s16 sUnref_841EF28[][2] = {
|
||||
static const s16 sUnused[][2] = {
|
||||
{-4, 0x10},
|
||||
{-3, 0x30},
|
||||
{-2, 0x50},
|
||||
|
||||
@@ -72,9 +72,9 @@ static const u16 sBgAnim_Pal[] = INCBIN_U16("graphics/evolution_scene/transition
|
||||
|
||||
static const u8 sText_ShedinjaJapaneseName[] = _("ヌケニン");
|
||||
|
||||
static const u8 unref_83F8445[] = _("{COLOR DARK_GRAY}{HIGHLIGHT WHITE}{SHADOW LIGHT_GRAY}");
|
||||
static const u8 sText_UnusedColors[] = _("{COLOR DARK_GRAY}{HIGHLIGHT WHITE}{SHADOW LIGHT_GRAY}");
|
||||
|
||||
static const u8 unref_83F844F[][10] = {
|
||||
static const u8 sText_UnusedArrows[][10] = {
|
||||
_("▶\n "),
|
||||
_(" \n▶"),
|
||||
_(" \n ")
|
||||
@@ -1331,7 +1331,7 @@ static void Task_TradeEvolutionScene(u8 taskId)
|
||||
case T_MVSTATE_PRINT_YES_NO:
|
||||
if (!IsTextPrinterActive(0) && !IsSEPlaying())
|
||||
{
|
||||
LoadUserWindowBorderGfx(0, 0xA8, 0xE0);
|
||||
LoadUserWindowGfx2(0, 0xA8, 0xE0);
|
||||
CreateYesNoMenu(&gTradeEvolutionSceneYesNoWindowTemplate, FONT_3, 0, 2, 0xA8, 0xE, 0);
|
||||
sEvoCursorPos = 0;
|
||||
gTasks[taskId].tLearnMoveState++;
|
||||
|
||||
+3
-3
@@ -530,7 +530,7 @@ static const struct SpriteTemplate sSpriteTemplate_SelectorCursor = {
|
||||
SPRITETAG_SELECTOR_CURSOR, SPRITETAG_SELECTOR_CURSOR, &sSelectorCursorOamData, sSelectorCursorAnims, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const u8 filler_845FC5C[8] = {}; // ???
|
||||
static const u8 sUnused[8] = {}; // ???
|
||||
|
||||
static const struct OamData sQuestionMarkTileOamData = {
|
||||
.shape = ST_OAM_V_RECTANGLE,
|
||||
@@ -667,7 +667,7 @@ static void MainCB2_LoadFameChecker(void)
|
||||
LoadPalette(gFameCheckerBgPals + 0x10, 0x10, 0x20);
|
||||
CopyToBgTilemapBufferRect(2, gFameCheckerBg2Tilemap, 0, 0, 32, 32);
|
||||
CopyToBgTilemapBufferRect_ChangePalette(1, sFameCheckerTilemap, 30, 0, 32, 32, 0x11);
|
||||
LoadPalette(stdpal_get(2), 0xF0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(2), 0xF0, 0x20);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 4:
|
||||
@@ -1104,7 +1104,7 @@ static bool8 CreateAllFlavorTextIcons(u8 who)
|
||||
{
|
||||
if ((gSaveBlock1Ptr->fameChecker[sFameCheckerData->unlockedPersons[who]].flavorTextFlags >> i) & 1)
|
||||
{
|
||||
sFameCheckerData->spriteIds[i] = sub_805EB44(
|
||||
sFameCheckerData->spriteIds[i] = CreateFameCheckerObject(
|
||||
sFameCheckerArrayNpcGraphicsIds[sFameCheckerData->unlockedPersons[who] * 6 + i],
|
||||
i,
|
||||
47 * (i % 3) + 0x72,
|
||||
|
||||
+6
-6
@@ -34,7 +34,7 @@ static void CameraPanningCB_PanAhead(void);
|
||||
static struct FieldCameraOffset sFieldCameraOffset;
|
||||
static s16 sHorizontalCameraPan;
|
||||
static s16 sVerticalCameraPan;
|
||||
static u8 gUnknown_3000E9C;
|
||||
static u8 sBikeCameraPanFlag;
|
||||
static void (*sFieldCameraPanningCallback)(void);
|
||||
|
||||
struct CameraObject gFieldCamera;
|
||||
@@ -225,7 +225,7 @@ void DrawDoorMetatileAt(int x, int y, const u16 *tiles)
|
||||
static void DrawMetatileAt(const struct MapLayout *mapLayout, u16 offset, int x, int y)
|
||||
{
|
||||
u16 metatileId = MapGridGetMetatileIdAt(x, y);
|
||||
u16 *metatiles;
|
||||
const u16 *metatiles;
|
||||
|
||||
if (metatileId > NUM_METATILES_TOTAL)
|
||||
metatileId = 0;
|
||||
@@ -513,7 +513,7 @@ void SetCameraPanning(s16 a, s16 b)
|
||||
void InstallCameraPanAheadCallback(void)
|
||||
{
|
||||
sFieldCameraPanningCallback = CameraPanningCB_PanAhead;
|
||||
gUnknown_3000E9C = 0;
|
||||
sBikeCameraPanFlag = FALSE;
|
||||
sHorizontalCameraPan = 0;
|
||||
sVerticalCameraPan = 32;
|
||||
}
|
||||
@@ -540,13 +540,13 @@ static void CameraPanningCB_PanAhead(void)
|
||||
// this code is never reached.
|
||||
if (gPlayerAvatar.tileTransitionState == 1)
|
||||
{
|
||||
gUnknown_3000E9C ^= 1;
|
||||
if (gUnknown_3000E9C == 0)
|
||||
sBikeCameraPanFlag ^= 1;
|
||||
if (sBikeCameraPanFlag == FALSE)
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
gUnknown_3000E9C = 0;
|
||||
sBikeCameraPanFlag = FALSE;
|
||||
}
|
||||
|
||||
var = GetPlayerMovementDirection();
|
||||
|
||||
+27
-27
@@ -197,7 +197,7 @@ int ProcessPlayerFieldInput(struct FieldInput *input)
|
||||
u16 metatileBehavior;
|
||||
u32 metatileAttributes;
|
||||
|
||||
ResetFacingNpcOrSignPostVars();
|
||||
ResetFacingNpcOrSignpostVars();
|
||||
playerDirection = GetPlayerFacingDirection();
|
||||
GetPlayerPosition(&position);
|
||||
metatileAttributes = MapGridGetMetatileAttributeAt(position.x, position.y, METATILE_ATTRIBUTES_ALL);
|
||||
@@ -345,7 +345,7 @@ static void Task_QuestLogPlayback_OpenStartMenu(u8 taskId)
|
||||
static void GetPlayerPosition(struct MapPosition *position)
|
||||
{
|
||||
PlayerGetDestCoords(&position->x, &position->y);
|
||||
position->height = PlayerGetZCoord();
|
||||
position->elevation = PlayerGetElevation();
|
||||
}
|
||||
|
||||
static void GetInFrontOfPlayerPosition(struct MapPosition *position)
|
||||
@@ -355,9 +355,9 @@ static void GetInFrontOfPlayerPosition(struct MapPosition *position)
|
||||
GetXYCoordsOneStepInFrontOfPlayer(&position->x, &position->y);
|
||||
PlayerGetDestCoords(&x, &y);
|
||||
if (MapGridGetElevationAt(x, y) != 0)
|
||||
position->height = PlayerGetZCoord();
|
||||
position->elevation = PlayerGetElevation();
|
||||
else
|
||||
position->height = 0;
|
||||
position->elevation = 0;
|
||||
}
|
||||
|
||||
static u16 GetPlayerCurMetatileBehavior(void)
|
||||
@@ -410,9 +410,9 @@ const u8 *GetInteractedLinkPlayerScript(struct MapPosition *position, u8 metatil
|
||||
s32 i;
|
||||
|
||||
if (!MetatileBehavior_IsCounter(MapGridGetMetatileBehaviorAt(position->x, position->y)))
|
||||
objectEventId = GetObjectEventIdByXYZ(position->x, position->y, position->height);
|
||||
objectEventId = GetObjectEventIdByPosition(position->x, position->y, position->elevation);
|
||||
else
|
||||
objectEventId = GetObjectEventIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height);
|
||||
objectEventId = GetObjectEventIdByPosition(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->elevation);
|
||||
|
||||
if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER)
|
||||
return NULL;
|
||||
@@ -434,14 +434,14 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8
|
||||
u8 objectEventId;
|
||||
const u8 *script;
|
||||
|
||||
objectEventId = GetObjectEventIdByXYZ(position->x, position->y, position->height);
|
||||
objectEventId = GetObjectEventIdByPosition(position->x, position->y, position->elevation);
|
||||
if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER)
|
||||
{
|
||||
if (MetatileBehavior_IsCounter(metatileBehavior) != TRUE)
|
||||
return NULL;
|
||||
|
||||
// Look for an object event on the other side of the counter.
|
||||
objectEventId = GetObjectEventIdByXYZ(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->height);
|
||||
objectEventId = GetObjectEventIdByPosition(position->x + gDirectionToVectors[direction].x, position->y + gDirectionToVectors[direction].y, position->elevation);
|
||||
if (objectEventId == OBJECT_EVENTS_COUNT || gObjectEvents[objectEventId].localId == OBJ_EVENT_ID_PLAYER)
|
||||
return NULL;
|
||||
}
|
||||
@@ -462,7 +462,7 @@ static const u8 *GetInteractedObjectEventScript(struct MapPosition *position, u8
|
||||
static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position, u8 metatileBehavior, u8 direction)
|
||||
{
|
||||
u8 signpostType;
|
||||
const struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - 7, position->y - 7, position->height);
|
||||
const struct BgEvent *bgEvent = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
|
||||
if (bgEvent == NULL)
|
||||
return NULL;
|
||||
@@ -507,7 +507,7 @@ static const u8 *GetInteractedBackgroundEventScript(struct MapPosition *position
|
||||
}
|
||||
|
||||
if (signpostType != SIGNPOST_NA)
|
||||
MsgSetSignPost();
|
||||
MsgSetSignpost();
|
||||
gSpecialVar_Facing = direction;
|
||||
return bgEvent->bgUnion.script;
|
||||
}
|
||||
@@ -577,22 +577,22 @@ static const u8 *GetInteractedMetatileScript(struct MapPosition *position, u8 me
|
||||
return CableClub_EventScript_ShowBattleRecords;
|
||||
if (MetatileBehavior_IsIndigoPlateauSign1(metatileBehavior) == TRUE)
|
||||
{
|
||||
MsgSetSignPost();
|
||||
MsgSetSignpost();
|
||||
return EventScript_Indigo_UltimateGoal;
|
||||
}
|
||||
if (MetatileBehavior_IsIndigoPlateauSign2(metatileBehavior) == TRUE)
|
||||
{
|
||||
MsgSetSignPost();
|
||||
MsgSetSignpost();
|
||||
return EventScript_Indigo_HighestAuthority;
|
||||
}
|
||||
if (MetatileBehavior_IsPlayerFacingPokeMartSign(metatileBehavior, direction) == TRUE)
|
||||
{
|
||||
MsgSetSignPost();
|
||||
MsgSetSignpost();
|
||||
return EventScript_PokemartSign;
|
||||
}
|
||||
if (MetatileBehavior_IsPlayerFacingPokemonCenterSign(metatileBehavior, direction) == TRUE)
|
||||
{
|
||||
MsgSetSignPost();
|
||||
MsgSetSignpost();
|
||||
return EventScript_PokecenterSign;
|
||||
}
|
||||
return NULL;
|
||||
@@ -632,7 +632,7 @@ static bool8 TryStartStepBasedScript(struct MapPosition *position, u16 metatileB
|
||||
|
||||
static bool8 TryStartCoordEventScript(struct MapPosition *position)
|
||||
{
|
||||
const u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - 7, position->y - 7, position->height);
|
||||
const u8 *script = GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
|
||||
if (script == NULL)
|
||||
return FALSE;
|
||||
@@ -809,12 +809,12 @@ static void SetUpWalkIntoSignScript(const u8 *script, u8 playerDirection)
|
||||
gSpecialVar_Facing = playerDirection;
|
||||
ScriptContext_SetupScript(script);
|
||||
SetWalkingIntoSignVars();
|
||||
MsgSetSignPost();
|
||||
MsgSetSignpost();
|
||||
}
|
||||
|
||||
static const u8 *GetSignpostScriptAtMapPosition(struct MapPosition * position)
|
||||
{
|
||||
const struct BgEvent * event = GetBackgroundEventAtPosition(&gMapHeader, position->x - 7, position->y - 7, position->height);
|
||||
const struct BgEvent * event = GetBackgroundEventAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
if (event == NULL)
|
||||
return NULL;
|
||||
if (event->bgUnion.script != NULL)
|
||||
@@ -889,7 +889,7 @@ static bool8 TryStartWarpEventScript(struct MapPosition *position, u16 metatileB
|
||||
if (MetatileBehavior_IsFallWarp(metatileBehavior) == TRUE)
|
||||
{
|
||||
ResetInitialPlayerAvatarState();
|
||||
ScriptContext_SetupScript(EventScript_1C1361);
|
||||
ScriptContext_SetupScript(EventScript_DoFallWarp);
|
||||
return TRUE;
|
||||
}
|
||||
DoWarp();
|
||||
@@ -959,7 +959,7 @@ static bool8 IsArrowWarpMetatileBehavior(u16 metatileBehavior, u8 direction)
|
||||
|
||||
static s8 GetWarpEventAtMapPosition(struct MapHeader *mapHeader, struct MapPosition *position)
|
||||
{
|
||||
return GetWarpEventAtPosition(mapHeader, position->x - 7, position->y - 7, position->height);
|
||||
return GetWarpEventAtPosition(mapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
}
|
||||
|
||||
static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPosition *position)
|
||||
@@ -968,7 +968,7 @@ static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPositi
|
||||
|
||||
warpEvent = &gMapHeader.events->warps[warpEventId];
|
||||
|
||||
if (warpEvent->mapNum == MAP_NUM(NONE))
|
||||
if (warpEvent->mapNum == MAP_NUM(DYNAMIC))
|
||||
{
|
||||
SetWarpDestinationToDynamicWarp(warpEvent->warpId);
|
||||
}
|
||||
@@ -979,7 +979,7 @@ static void SetupWarp(struct MapHeader *unused, s8 warpEventId, struct MapPositi
|
||||
SetWarpDestinationToMapWarp(warpEvent->mapGroup, warpEvent->mapNum, warpEvent->warpId);
|
||||
UpdateEscapeWarp(position->x, position->y);
|
||||
mapHeader = Overworld_GetMapHeaderByGroupAndId(warpEvent->mapGroup, warpEvent->mapNum);
|
||||
if (mapHeader->events->warps[warpEvent->warpId].mapNum == MAP_NUM(NONE))
|
||||
if (mapHeader->events->warps[warpEvent->warpId].mapNum == MAP_NUM(DYNAMIC))
|
||||
SetDynamicWarp(mapHeader->events->warps[warpEventId].warpId, gSaveBlock1Ptr->location.mapGroup, gSaveBlock1Ptr->location.mapNum, warpEventId);
|
||||
}
|
||||
}
|
||||
@@ -1083,7 +1083,7 @@ void HandleBoulderActivateVictoryRoadSwitch(u16 x, u16 y)
|
||||
{
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
if (events[i].x + 7 == x && events[i].y + 7 == y)
|
||||
if (events[i].x + MAP_OFFSET == x && events[i].y + MAP_OFFSET == y)
|
||||
{
|
||||
QuestLog_CutRecording();
|
||||
ScriptContext_SetupScript(events[i].script);
|
||||
@@ -1095,7 +1095,7 @@ void HandleBoulderActivateVictoryRoadSwitch(u16 x, u16 y)
|
||||
|
||||
const u8 *GetCoordEventScriptAtMapPosition(struct MapPosition *position)
|
||||
{
|
||||
return GetCoordEventScriptAtPosition(&gMapHeader, position->x - 7, position->y - 7, position->height);
|
||||
return GetCoordEventScriptAtPosition(&gMapHeader, position->x - MAP_OFFSET, position->y - MAP_OFFSET, position->elevation);
|
||||
}
|
||||
|
||||
static const struct BgEvent *GetBackgroundEventAtPosition(struct MapHeader *mapHeader, u16 x, u16 y, u8 elevation)
|
||||
@@ -1119,7 +1119,7 @@ bool8 dive_warp(struct MapPosition *position, u16 metatileBehavior)
|
||||
{
|
||||
if (gMapHeader.mapType == MAP_TYPE_UNDERWATER && !MetatileBehavior_IsUnableToEmerge(metatileBehavior))
|
||||
{
|
||||
if (SetDiveWarpEmerge(position->x - 7, position->y - 7))
|
||||
if (SetDiveWarpEmerge(position->x - MAP_OFFSET, position->y - MAP_OFFSET))
|
||||
{
|
||||
StoreInitialPlayerAvatarState();
|
||||
DoDiveWarp();
|
||||
@@ -1129,7 +1129,7 @@ bool8 dive_warp(struct MapPosition *position, u16 metatileBehavior)
|
||||
}
|
||||
else if (MetatileBehavior_IsDiveable(metatileBehavior) == TRUE)
|
||||
{
|
||||
if (SetDiveWarpDive(position->x - 7, position->y - 7))
|
||||
if (SetDiveWarpDive(position->x - MAP_OFFSET, position->y - MAP_OFFSET))
|
||||
{
|
||||
StoreInitialPlayerAvatarState();
|
||||
DoDiveWarp();
|
||||
@@ -1149,12 +1149,12 @@ static u8 TrySetDiveWarp(void)
|
||||
metatileBehavior = MapGridGetMetatileBehaviorAt(x, y);
|
||||
if (gMapHeader.mapType == MAP_TYPE_UNDERWATER && !MetatileBehavior_IsUnableToEmerge(metatileBehavior))
|
||||
{
|
||||
if (SetDiveWarpEmerge(x - 7, y - 7) == TRUE)
|
||||
if (SetDiveWarpEmerge(x - MAP_OFFSET, y - MAP_OFFSET) == TRUE)
|
||||
return 1;
|
||||
}
|
||||
else if (MetatileBehavior_IsDiveable(metatileBehavior) == TRUE)
|
||||
{
|
||||
if (SetDiveWarpDive(x - 7, y - 7) == TRUE)
|
||||
if (SetDiveWarpDive(x - MAP_OFFSET, y - MAP_OFFSET) == TRUE)
|
||||
return 2;
|
||||
}
|
||||
return 0;
|
||||
|
||||
+1
-1
@@ -1998,7 +1998,7 @@ static bool8 LavaridgeGym1FWarpEffect_2(struct Task *task, struct ObjectEvent *
|
||||
} else
|
||||
{
|
||||
task->data[1]++;
|
||||
ObjectEventSetHeldMovement(objectEvent, GetWalkInPlaceFastMovementAction(objectEvent->facingDirection));
|
||||
ObjectEventSetHeldMovement(objectEvent, GetWalkInPlaceFasterMovementAction(objectEvent->facingDirection));
|
||||
PlaySE(SE_LAVARIDGE_FALL_WARP);
|
||||
}
|
||||
}
|
||||
|
||||
+16
-16
@@ -331,7 +331,7 @@ void UpdateTallGrassFieldEffect(struct Sprite *sprite)
|
||||
if (sprite->animCmdIndex == 0)
|
||||
metatileBehavior = 4;
|
||||
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
UpdateGrassFieldEffectSubpriority(sprite, sprite->data[0], metatileBehavior);
|
||||
}
|
||||
}
|
||||
@@ -387,7 +387,7 @@ u32 FldEff_LongGrass(void)
|
||||
{
|
||||
sprite = &gSprites[spriteId];
|
||||
sprite->coordOffsetEnabled = TRUE;
|
||||
sprite->oam.priority = ZCoordToPriority(gFieldEffectArguments[2]);
|
||||
sprite->oam.priority = ElevationToPriority(gFieldEffectArguments[2]);
|
||||
sprite->data[0] = gFieldEffectArguments[2];
|
||||
sprite->data[1] = gFieldEffectArguments[0];
|
||||
sprite->data[2] = gFieldEffectArguments[1];
|
||||
@@ -434,7 +434,7 @@ void UpdateLongGrassFieldEffect(struct Sprite *sprite)
|
||||
{
|
||||
sprite->data[7] = TRUE;
|
||||
}
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
UpdateGrassFieldEffectSubpriority(sprite, sprite->data[0], 0);
|
||||
}
|
||||
}
|
||||
@@ -513,7 +513,7 @@ void UpdateShortGrassFieldEffect(struct Sprite *sprite)
|
||||
sprite->y2 = (graphicsInfo->height >> 1) - 8;
|
||||
sprite->subpriority = linkedSprite->subpriority - 1;
|
||||
sprite->oam.priority = linkedSprite->oam.priority;
|
||||
UpdateObjectEventSpriteVisibility(sprite, linkedSprite->invisible);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, linkedSprite->invisible);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -587,14 +587,14 @@ static void FadeFootprintsTireTracks_Step0(struct Sprite *sprite)
|
||||
if (++sprite->data[1] > 40)
|
||||
sprite->data[0] = 1;
|
||||
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
}
|
||||
|
||||
static void FadeFootprintsTireTracks_Step1(struct Sprite *sprite)
|
||||
{
|
||||
sprite->invisible ^= 1;
|
||||
sprite->data[1]++;
|
||||
UpdateObjectEventSpriteVisibility(sprite, sprite->invisible);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, sprite->invisible);
|
||||
if (sprite->data[1] > 56)
|
||||
{
|
||||
FieldEffectStop(sprite, sprite->data[7]);
|
||||
@@ -641,7 +641,7 @@ void UpdateSplashFieldEffect(struct Sprite *sprite)
|
||||
{
|
||||
sprite->x = gSprites[gObjectEvents[objectEventId].spriteId].x;
|
||||
sprite->y = gSprites[gObjectEvents[objectEventId].spriteId].y;
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -727,7 +727,7 @@ static void UpdateFeetInFlowingWaterFieldEffect(struct Sprite *sprite)
|
||||
sprite->x = linkedSprite->x;
|
||||
sprite->y = linkedSprite->y;
|
||||
sprite->subpriority = linkedSprite->subpriority;
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
if (objectEvent->currentCoords.x != sprite->data[3] || objectEvent->currentCoords.y != sprite->data[4])
|
||||
{
|
||||
sprite->data[3] = objectEvent->currentCoords.x;
|
||||
@@ -797,7 +797,7 @@ void UpdateHotSpringsWaterFieldEffect(struct Sprite *sprite)
|
||||
sprite->x = linkedSprite->x;
|
||||
sprite->y = (graphicsInfo->height >> 1) + linkedSprite->y - 8;
|
||||
sprite->subpriority = linkedSprite->subpriority - 1;
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ static void UpdateAshFieldEffect_Step1(struct Sprite *sprite)
|
||||
|
||||
static void UpdateAshFieldEffect_Step2(struct Sprite *sprite)
|
||||
{
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
if (sprite->animEnded)
|
||||
FieldEffectStop(sprite, FLDEFF_ASH);
|
||||
}
|
||||
@@ -1187,7 +1187,7 @@ void UpdateSandPileFieldEffect(struct Sprite *sprite)
|
||||
sprite->x = x;
|
||||
sprite->y = y;
|
||||
sprite->subpriority = gSprites[gObjectEvents[objectEventId].spriteId].subpriority;
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1212,7 +1212,7 @@ void UpdateBubblesFieldEffect(struct Sprite *sprite)
|
||||
sprite->data[0] += 0x80;
|
||||
sprite->data[0] &= 0x100;
|
||||
sprite->y -= sprite->data[0] >> 8;
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
if (sprite->invisible || sprite->animEnded)
|
||||
{
|
||||
FieldEffectStop(sprite, FLDEFF_BUBBLES);
|
||||
@@ -1380,8 +1380,8 @@ void UpdateJumpImpactEffect(struct Sprite *sprite)
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
SetObjectSubpriorityByZCoord(sprite->data[0], sprite, 0);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
SetObjectSubpriorityByElevation(sprite->data[0], sprite, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1390,7 +1390,7 @@ void WaitFieldEffectSpriteAnim(struct Sprite *sprite)
|
||||
if (sprite->animEnded)
|
||||
FieldEffectStop(sprite, sprite->data[0]);
|
||||
else
|
||||
UpdateObjectEventSpriteVisibility(sprite, FALSE);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
}
|
||||
|
||||
static void UpdateGrassFieldEffectSubpriority(struct Sprite *sprite, u8 z, u8 offset)
|
||||
@@ -1400,7 +1400,7 @@ static void UpdateGrassFieldEffectSubpriority(struct Sprite *sprite, u8 z, u8 of
|
||||
const struct ObjectEventGraphicsInfo * graphicsInfo; // Unused Variable
|
||||
struct Sprite *linkedSprite;
|
||||
|
||||
SetObjectSubpriorityByZCoord(z, sprite, offset);
|
||||
SetObjectSubpriorityByElevation(z, sprite, offset);
|
||||
for (i = 0; i < OBJECT_EVENTS_COUNT; i++)
|
||||
{
|
||||
struct ObjectEvent * objectEvent = &gObjectEvents[i];
|
||||
|
||||
@@ -616,7 +616,7 @@ static void DoPortholeWarp(void) // Unused
|
||||
LockPlayerFieldControls();
|
||||
WarpFadeOutScreen();
|
||||
CreateTask(Task_Teleport2Warp, 10);
|
||||
gFieldCallback = nullsub_60;
|
||||
gFieldCallback = FieldCB_ShowPortholeView;
|
||||
}
|
||||
|
||||
static void Task_CableClubWarp(u8 taskId)
|
||||
@@ -928,7 +928,7 @@ static void ExitStairsMovement(s16 *speedX, s16 *speedY, s16 *offsetX, s16 *offs
|
||||
direction = DIR_WEST;
|
||||
else
|
||||
direction = DIR_EAST;
|
||||
ObjectEventForceSetHeldMovement(&gObjectEvents[gPlayerAvatar.objectEventId], GetWalkInPlaceSlowMovementAction(direction));
|
||||
ObjectEventForceSetHeldMovement(&gObjectEvents[gPlayerAvatar.objectEventId], GetWalkInPlaceFastMovementAction(direction));
|
||||
GetStairsMovementDirection(metatileBehavior, speedX, speedY);
|
||||
*offsetX = *speedX * 16;
|
||||
*offsetY = *speedY * 16;
|
||||
|
||||
@@ -28,12 +28,12 @@ static void Task_DrawFieldMessageBox(u8 taskId)
|
||||
if (gQuestLogState == QL_STATE_PLAYBACK)
|
||||
{
|
||||
gTextFlags.autoScroll = TRUE;
|
||||
TextWindow_LoadTilesStdFrame1(0, 0x200);
|
||||
LoadQuestLogWindowTiles(0, 0x200);
|
||||
}
|
||||
else if (!IsMsgSignPost())
|
||||
else if (!IsMsgSignpost())
|
||||
LoadStdWindowFrameGfx();
|
||||
else
|
||||
LoadSignPostWindowFrameGfx();
|
||||
LoadSignpostWindowFrameGfx();
|
||||
task->data[0]++;
|
||||
break;
|
||||
case 1:
|
||||
|
||||
+42
-43
@@ -329,27 +329,27 @@ static u8 DoForcedMovementInCurrentDirection(MovementAction movementAction)
|
||||
|
||||
static bool8 ForcedMovement_Slip(void)
|
||||
{
|
||||
return DoForcedMovementInCurrentDirection(PlayerGoSpeed2);
|
||||
return DoForcedMovementInCurrentDirection(PlayerWalkFast);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_WalkSouth(void)
|
||||
{
|
||||
return DoForcedMovement(DIR_SOUTH, PlayerGoSpeed1);
|
||||
return DoForcedMovement(DIR_SOUTH, PlayerWalkNormal);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_WalkNorth(void)
|
||||
{
|
||||
return DoForcedMovement(DIR_NORTH, PlayerGoSpeed1);
|
||||
return DoForcedMovement(DIR_NORTH, PlayerWalkNormal);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_WalkWest(void)
|
||||
{
|
||||
return DoForcedMovement(DIR_WEST, PlayerGoSpeed1);
|
||||
return DoForcedMovement(DIR_WEST, PlayerWalkNormal);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_WalkEast(void)
|
||||
{
|
||||
return DoForcedMovement(DIR_EAST, PlayerGoSpeed1);
|
||||
return DoForcedMovement(DIR_EAST, PlayerWalkNormal);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_SpinRight(void)
|
||||
@@ -412,22 +412,22 @@ static u8 ForcedMovement_Slide(u8 direction, MovementAction movementAction)
|
||||
|
||||
static bool8 ForcedMovement_SlideSouth(void)
|
||||
{
|
||||
return ForcedMovement_Slide(DIR_SOUTH, PlayerGoSpeed2);
|
||||
return ForcedMovement_Slide(DIR_SOUTH, PlayerWalkFast);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_SlideNorth(void)
|
||||
{
|
||||
return ForcedMovement_Slide(DIR_NORTH, PlayerGoSpeed2);
|
||||
return ForcedMovement_Slide(DIR_NORTH, PlayerWalkFast);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_SlideWest(void)
|
||||
{
|
||||
return ForcedMovement_Slide(DIR_WEST, PlayerGoSpeed2);
|
||||
return ForcedMovement_Slide(DIR_WEST, PlayerWalkFast);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_SlideEast(void)
|
||||
{
|
||||
return ForcedMovement_Slide(DIR_EAST, PlayerGoSpeed2);
|
||||
return ForcedMovement_Slide(DIR_EAST, PlayerWalkFast);
|
||||
}
|
||||
|
||||
static bool8 ForcedMovement_MatJump(void)
|
||||
@@ -442,7 +442,7 @@ static bool8 ForcedMovement_MatSpin(void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void (*const gUnknown_835B814[])(u8, u16) = {
|
||||
static void (*const sPlayerNotOnBikeFuncs[])(u8, u16) = {
|
||||
PlayerNotOnBikeNotMoving,
|
||||
PlayerNotOnBikeTurningInPlace,
|
||||
PlayerNotOnBikeMoving
|
||||
@@ -450,7 +450,7 @@ static void (*const gUnknown_835B814[])(u8, u16) = {
|
||||
|
||||
void MovePlayerNotOnBike(u8 direction, u16 heldKeys)
|
||||
{
|
||||
gUnknown_835B814[CheckMovementInputNotOnBike(direction)](direction, heldKeys);
|
||||
sPlayerNotOnBikeFuncs[CheckMovementInputNotOnBike(direction)](direction, heldKeys);
|
||||
}
|
||||
|
||||
static u8 CheckMovementInputNotOnBike(u8 direction)
|
||||
@@ -508,8 +508,8 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
|
||||
|
||||
if (gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
||||
{
|
||||
// speed 2 is fast, same speed as running
|
||||
PlayerGoSpeed2(direction);
|
||||
// Same speed as running
|
||||
PlayerWalkFast(direction);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -526,9 +526,9 @@ static void PlayerNotOnBikeMoving(u8 direction, u16 heldKeys)
|
||||
else
|
||||
{
|
||||
if (PlayerIsMovingOnRockStairs(direction))
|
||||
PlayerGoSlow(direction);
|
||||
PlayerWalkSlow(direction);
|
||||
else
|
||||
PlayerGoSpeed1(direction);
|
||||
PlayerWalkNormal(direction);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ static bool8 CanStopSurfing(s16 x, s16 y, u8 direction)
|
||||
{
|
||||
if ((gPlayerAvatar.flags & PLAYER_AVATAR_FLAG_SURFING)
|
||||
&& MapGridGetElevationAt(x, y) == 3
|
||||
&& GetObjectEventIdByXYZ(x, y, 3) == OBJECT_EVENTS_COUNT)
|
||||
&& GetObjectEventIdByPosition(x, y, 3) == OBJECT_EVENTS_COUNT)
|
||||
{
|
||||
QuestLogRecordPlayerAvatarGfxTransitionWithDuration(sQuestLogSurfDismountActionIds[direction], 16);
|
||||
CreateStopSurfingTask(direction);
|
||||
@@ -610,9 +610,9 @@ static bool8 CanStopSurfing(s16 x, s16 y, u8 direction)
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 ShouldJumpLedge(s16 x, s16 y, u8 z)
|
||||
static bool8 ShouldJumpLedge(s16 x, s16 y, u8 direction)
|
||||
{
|
||||
if (GetLedgeJumpDirection(x, y, z) != 0)
|
||||
if (GetLedgeJumpDirection(x, y, direction) != DIR_NONE)
|
||||
return TRUE;
|
||||
else
|
||||
return FALSE;
|
||||
@@ -830,29 +830,29 @@ static void QL_TryRecordNPCStepWithDuration32(struct ObjectEvent * objectEvent,
|
||||
QuestLogRecordNPCStepWithDuration(objectEvent->localId, objectEvent->mapNum, objectEvent->mapGroup, movementAction, 32);
|
||||
}
|
||||
|
||||
void PlayerGoSlowest(u8 direction)
|
||||
void PlayerWalkSlower(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkSlowerMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
void PlayerGoSlow(u8 direction)
|
||||
void PlayerWalkSlow(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkSlowMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
void PlayerGoSpeed1(u8 direction)
|
||||
void PlayerWalkNormal(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkNormalMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
void PlayerGoSpeed2(u8 direction)
|
||||
void PlayerWalkFast(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkFastMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
void sub_805C134(u8 direction)
|
||||
void PlayerGlide(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(sub_8063FDC(direction), 2);
|
||||
PlayerSetAnimId(GetGlideMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
void PlayerRideWaterCurrent(u8 direction)
|
||||
@@ -860,10 +860,9 @@ void PlayerRideWaterCurrent(u8 direction)
|
||||
PlayerSetAnimId(GetRideWaterCurrentMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
// fastest speed (4 speed)
|
||||
void PlayerGoSpeed4(u8 direction)
|
||||
void PlayerWalkFaster(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkFastestMovementAction(direction), 2);
|
||||
PlayerSetAnimId(GetWalkFasterMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
void PlayerRun(u8 direction)
|
||||
@@ -885,7 +884,7 @@ void PlayerOnBikeCollide(u8 direction)
|
||||
void PlayerNotOnBikeCollide(u8 direction)
|
||||
{
|
||||
PlayCollisionSoundIfNotFacingWarp(direction);
|
||||
PlayerSetAnimId(GetStepInPlaceDelay32AnimId(direction), 2);
|
||||
PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
void PlayerFaceDirection(u8 direction)
|
||||
@@ -900,7 +899,7 @@ void PlayerFaceDirectionFast(u8 direction)
|
||||
|
||||
void PlayerTurnInPlace(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetWalkInPlaceSlowMovementAction(direction), 1);
|
||||
PlayerSetAnimId(GetWalkInPlaceFastMovementAction(direction), 1);
|
||||
}
|
||||
|
||||
void PlayerJumpLedge(u8 direction)
|
||||
@@ -965,13 +964,13 @@ static void PlayerStandingHoppingWheelie(u8 direction)
|
||||
static void PlayerMovingHoppingWheelie(u8 direction)
|
||||
{
|
||||
PlaySE(SE_BIKE_HOP);
|
||||
PlayerSetAnimId(GetAcroWheelieHopDirectionMovementAction(direction), 2);
|
||||
PlayerSetAnimId(GetAcroWheelieHopMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
static void PlayerLedgeHoppingWheelie(u8 direction)
|
||||
{
|
||||
PlaySE(SE_BIKE_HOP);
|
||||
PlayerSetAnimId(GetAcroWheelieJumpDirectionMovementAction(direction), 8);
|
||||
PlayerSetAnimId(GetAcroWheelieJumpMovementAction(direction), 8);
|
||||
}
|
||||
|
||||
static void PlayerAcroTurnJump(u8 direction)
|
||||
@@ -983,17 +982,17 @@ static void PlayerAcroTurnJump(u8 direction)
|
||||
static void PlayerAcroWheelieCollide(u8 direction)
|
||||
{
|
||||
PlaySE(SE_WALL_HIT);
|
||||
PlayerSetAnimId(GetAcroWheelieInPlaceDirectionMovementAction(direction), 2);
|
||||
PlayerSetAnimId(GetAcroWheelieInPlaceMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
static void PlayerAcroPopWheelie(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroPopWheelieMoveDirectionMovementAction(direction), 2);
|
||||
PlayerSetAnimId(GetAcroPopWheelieMoveMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
static void PlayerAcroWheelieMove(u8 direction)
|
||||
{
|
||||
PlayerSetAnimId(GetAcroWheelieMoveDirectionMovementAction(direction), 2);
|
||||
PlayerSetAnimId(GetAcroWheelieMoveMovementAction(direction), 2);
|
||||
}
|
||||
|
||||
static bool8 (*const sArrowWarpMetatileBehaviorChecks[])(u8) = {
|
||||
@@ -1090,7 +1089,7 @@ u8 GetPlayerMovementDirection(void)
|
||||
return gObjectEvents[gPlayerAvatar.objectEventId].movementDirection;
|
||||
}
|
||||
|
||||
u8 PlayerGetZCoord(void)
|
||||
u8 PlayerGetElevation(void)
|
||||
{
|
||||
return gObjectEvents[gPlayerAvatar.objectEventId].previousElevation;
|
||||
}
|
||||
@@ -1215,7 +1214,7 @@ bool8 IsPlayerFacingSurfableFishableWater(void)
|
||||
|
||||
MoveCoords(playerObjEvent->facingDirection, &x, &y);
|
||||
if (GetCollisionAtCoords(playerObjEvent, x, y, playerObjEvent->facingDirection) == COLLISION_ELEVATION_MISMATCH
|
||||
&& PlayerGetZCoord() == 3
|
||||
&& PlayerGetElevation() == 3
|
||||
&& MetatileAtCoordsIsWaterTile(x, y) == TRUE)
|
||||
return TRUE;
|
||||
else
|
||||
@@ -1294,12 +1293,12 @@ void InitPlayerAvatar(s16 x, s16 y, u8 direction, u8 gender)
|
||||
playerObjEventTemplate.graphicsId = GetPlayerAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_GFX_NORMAL, gender);
|
||||
playerObjEventTemplate.x = x - 7;
|
||||
playerObjEventTemplate.y = y - 7;
|
||||
playerObjEventTemplate.elevation = 0;
|
||||
playerObjEventTemplate.movementType = MOVEMENT_TYPE_PLAYER;
|
||||
playerObjEventTemplate.movementRangeX = 0;
|
||||
playerObjEventTemplate.movementRangeY = 0;
|
||||
playerObjEventTemplate.trainerType = TRAINER_TYPE_NONE;
|
||||
playerObjEventTemplate.trainerRange_berryTreeId = 0;
|
||||
playerObjEventTemplate.objUnion.normal.elevation = 0;
|
||||
playerObjEventTemplate.objUnion.normal.movementType = MOVEMENT_TYPE_PLAYER;
|
||||
playerObjEventTemplate.objUnion.normal.movementRangeX = 0;
|
||||
playerObjEventTemplate.objUnion.normal.movementRangeY = 0;
|
||||
playerObjEventTemplate.objUnion.normal.trainerType = TRAINER_TYPE_NONE;
|
||||
playerObjEventTemplate.objUnion.normal.trainerRange_berryTreeId = 0;
|
||||
playerObjEventTemplate.script = NULL;
|
||||
playerObjEventTemplate.flagId = 0;
|
||||
objectEventId = SpawnSpecialObjectEvent(&playerObjEventTemplate);
|
||||
@@ -1734,7 +1733,7 @@ static bool8 Fishing4(struct Task *task)
|
||||
{
|
||||
u32 randVal;
|
||||
|
||||
sub_80F7768(0, TRUE);
|
||||
LoadMessageBoxAndFrameGfx(0, TRUE);
|
||||
task->tStep++;
|
||||
task->tFrameCounter = 0;
|
||||
task->tNumDots = 0;
|
||||
|
||||
+54
-51
@@ -12,14 +12,14 @@
|
||||
#include "event_object_movement.h"
|
||||
#include "field_fadetransition.h"
|
||||
#include "event_scripts.h"
|
||||
#include "constants/heal_locations.h"
|
||||
#include "constants/maps.h"
|
||||
|
||||
static const u16 sFlashLevelPixelRadii[] = {
|
||||
0x00c8, 0x0048, 0x0038, 0x0028, 0x0018
|
||||
};
|
||||
static const u16 sFlashLevelToRadius[] = { 200, 72, 56, 40, 24 };
|
||||
const s32 gMaxFlashLevel = ARRAY_COUNT(sFlashLevelToRadius) - 1;
|
||||
|
||||
const s32 gMaxFlashLevel = NELEMS(sFlashLevelPixelRadii) - 1;
|
||||
|
||||
static const struct WindowTemplate gUnknown_83C68E4 = {
|
||||
static const struct WindowTemplate sWindowTemplate_WhiteoutText =
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0,
|
||||
.tilemapTop = 5,
|
||||
@@ -29,7 +29,7 @@ static const struct WindowTemplate gUnknown_83C68E4 = {
|
||||
.baseBlock = 1,
|
||||
};
|
||||
|
||||
static const u8 gUnknown_83C68EC[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY };
|
||||
static const u8 sWhiteoutTextColors[] = { TEXT_COLOR_TRANSPARENT, TEXT_COLOR_WHITE, TEXT_COLOR_DARK_GRAY };
|
||||
|
||||
static void Task_EnableScriptAfterMusicFade(u8 taskId);
|
||||
static void Task_BarnDoorWipeChild(u8 taskId);
|
||||
@@ -150,7 +150,7 @@ static void UpdateFlashLevelEffect(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_807EF7C(u8 taskId)
|
||||
static void Task_WaitForFlashUpdate(u8 taskId)
|
||||
{
|
||||
if (!FuncIsActiveTask(UpdateFlashLevelEffect))
|
||||
{
|
||||
@@ -159,13 +159,13 @@ static void sub_807EF7C(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_807EFA4(void)
|
||||
static void StartWaitForFlashUpdate(void)
|
||||
{
|
||||
if (!FuncIsActiveTask(sub_807EF7C))
|
||||
CreateTask(sub_807EF7C, 80);
|
||||
if (!FuncIsActiveTask(Task_WaitForFlashUpdate))
|
||||
CreateTask(Task_WaitForFlashUpdate, 80);
|
||||
}
|
||||
|
||||
static u8 sub_807EFC8(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 destFlashRadius, bool32 clearScanlineEffect, u8 delta)
|
||||
static u8 StartUpdateFlashLevelEffect(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 destFlashRadius, bool32 clearScanlineEffect, u8 delta)
|
||||
{
|
||||
u8 taskId = CreateTask(UpdateFlashLevelEffect, 80);
|
||||
s16 *data = gTasks[taskId].data;
|
||||
@@ -190,14 +190,15 @@ static u8 sub_807EFC8(s32 centerX, s32 centerY, s32 initialFlashRadius, s32 dest
|
||||
#undef tFlashRadiusDelta
|
||||
#undef tClearScanlineEffect
|
||||
|
||||
void AnimateFlash(u8 flashLevel)
|
||||
// A higher flash level is a smaller flash radius (more darkness). 0 is full brightness
|
||||
void AnimateFlash(u8 newFlashLevel)
|
||||
{
|
||||
u8 curFlashLevel = Overworld_GetFlashLevel();
|
||||
bool32 value = FALSE;
|
||||
if (!flashLevel)
|
||||
value = TRUE;
|
||||
sub_807EFC8(120, 80, sFlashLevelPixelRadii[curFlashLevel], sFlashLevelPixelRadii[flashLevel], value, 2);
|
||||
sub_807EFA4();
|
||||
bool32 fullBrightness = FALSE;
|
||||
if (newFlashLevel == 0)
|
||||
fullBrightness = TRUE;
|
||||
StartUpdateFlashLevelEffect(DISPLAY_WIDTH / 2, DISPLAY_HEIGHT / 2, sFlashLevelToRadius[curFlashLevel], sFlashLevelToRadius[newFlashLevel], fullBrightness, 2);
|
||||
StartWaitForFlashUpdate();
|
||||
LockPlayerFieldControls();
|
||||
}
|
||||
|
||||
@@ -205,7 +206,7 @@ void WriteFlashScanlineEffectBuffer(u8 flashLevel)
|
||||
{
|
||||
if (flashLevel)
|
||||
{
|
||||
SetFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], 120, 80, sFlashLevelPixelRadii[flashLevel]);
|
||||
SetFlashScanlineEffectWindowBoundaries(&gScanlineEffectRegBuffers[0][0], 120, 80, sFlashLevelToRadius[flashLevel]);
|
||||
CpuFastCopy(&gScanlineEffectRegBuffers[0], &gScanlineEffectRegBuffers[1], 240 * 8);
|
||||
}
|
||||
}
|
||||
@@ -283,15 +284,15 @@ void Task_BarnDoorWipe(u8 taskId)
|
||||
if (data[10] == 0)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, 0));
|
||||
SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE(240, 255));
|
||||
SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE(DISPLAY_WIDTH, 255));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(0, 255));
|
||||
SetGpuReg(REG_OFFSET_WIN1V, WIN_RANGE(0, 255));
|
||||
}
|
||||
else
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, 120));
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH / 2));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(0, 255));
|
||||
SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE(120, 255));
|
||||
SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE(DISPLAY_WIDTH / 2, 255));
|
||||
SetGpuReg(REG_OFFSET_WIN1V, WIN_RANGE(0, 255));
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
@@ -323,8 +324,8 @@ static void Task_BarnDoorWipeChild(u8 taskId)
|
||||
if (gTasks[parentTaskId].tDirection == DIR_WIPE_IN)
|
||||
{
|
||||
lhs = tChildOffset;
|
||||
rhs = 240 - tChildOffset;
|
||||
if (lhs > 120)
|
||||
rhs = DISPLAY_WIDTH - tChildOffset;
|
||||
if (lhs > DISPLAY_WIDTH / 2)
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
return;
|
||||
@@ -332,8 +333,8 @@ static void Task_BarnDoorWipeChild(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
lhs = 120 - tChildOffset;
|
||||
rhs = 120 + tChildOffset;
|
||||
lhs = DISPLAY_WIDTH / 2 - tChildOffset;
|
||||
rhs = DISPLAY_WIDTH / 2 + tChildOffset;
|
||||
if (lhs < 0)
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
@@ -341,15 +342,11 @@ static void Task_BarnDoorWipeChild(u8 taskId)
|
||||
}
|
||||
}
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, lhs));
|
||||
SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE(rhs, 240));
|
||||
if (lhs <= 89)
|
||||
{
|
||||
SetGpuReg(REG_OFFSET_WIN1H, WIN_RANGE(rhs, DISPLAY_WIDTH));
|
||||
if (lhs < 90)
|
||||
tChildOffset += 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
tChildOffset += 2;
|
||||
}
|
||||
}
|
||||
|
||||
#undef tState
|
||||
@@ -358,24 +355,28 @@ static void Task_BarnDoorWipeChild(u8 taskId)
|
||||
#undef DIR_WIPE_OUT
|
||||
#undef tChildOffset
|
||||
|
||||
#define tState data[0]
|
||||
#define tWindowId data[1]
|
||||
#define tPrintState data[2]
|
||||
|
||||
static bool8 PrintWhiteOutRecoveryMessage(u8 taskId, const u8 *text, u8 x, u8 y)
|
||||
{
|
||||
u8 windowId = gTasks[taskId].data[1];
|
||||
u8 windowId = gTasks[taskId].tWindowId;
|
||||
|
||||
switch (gTasks[taskId].data[2])
|
||||
switch (gTasks[taskId].tPrintState)
|
||||
{
|
||||
case 0:
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
|
||||
StringExpandPlaceholders(gStringVar4, text);
|
||||
AddTextPrinterParameterized4(windowId, FONT_2, x, y, 1, 0, gUnknown_83C68EC, 1, gStringVar4);
|
||||
AddTextPrinterParameterized4(windowId, FONT_2, x, y, 1, 0, sWhiteoutTextColors, 1, gStringVar4);
|
||||
gTextFlags.canABSpeedUpPrint = FALSE;
|
||||
gTasks[taskId].data[2] = 1;
|
||||
gTasks[taskId].tPrintState = 1;
|
||||
break;
|
||||
case 1:
|
||||
RunTextPrinters();
|
||||
if (!IsTextPrinterActive(windowId))
|
||||
{
|
||||
gTasks[taskId].data[2] = 0;
|
||||
gTasks[taskId].tPrintState = 0;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
@@ -388,48 +389,50 @@ static void Task_RushInjuredPokemonToCenter(u8 taskId)
|
||||
u8 windowId;
|
||||
const struct HealLocation *loc;
|
||||
|
||||
switch (gTasks[taskId].data[0])
|
||||
switch (gTasks[taskId].tState)
|
||||
{
|
||||
case 0:
|
||||
windowId = AddWindow(&gUnknown_83C68E4);
|
||||
gTasks[taskId].data[1] = windowId;
|
||||
windowId = AddWindow(&sWindowTemplate_WhiteoutText);
|
||||
gTasks[taskId].tWindowId = windowId;
|
||||
Menu_LoadStdPalAt(0xF0);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(0));
|
||||
PutWindowTilemap(windowId);
|
||||
CopyWindowToVram(windowId, COPYWIN_FULL);
|
||||
loc = GetHealLocation(1);
|
||||
|
||||
// Scene changes if last heal location was the player's house
|
||||
loc = GetHealLocation(SPAWN_PALLET_TOWN);
|
||||
if (gSaveBlock1Ptr->lastHealLocation.mapGroup == loc->group
|
||||
&& gSaveBlock1Ptr->lastHealLocation.mapNum == loc->map
|
||||
&& gSaveBlock1Ptr->lastHealLocation.warpId == -1
|
||||
&& gSaveBlock1Ptr->lastHealLocation.warpId == WARP_ID_NONE
|
||||
&& gSaveBlock1Ptr->lastHealLocation.x == loc->x
|
||||
&& gSaveBlock1Ptr->lastHealLocation.y == loc->y)
|
||||
gTasks[taskId].data[0] = 4;
|
||||
gTasks[taskId].tState = 4;
|
||||
else
|
||||
gTasks[taskId].data[0] = 1;
|
||||
gTasks[taskId].tState = 1;
|
||||
break;
|
||||
case 1:
|
||||
if (PrintWhiteOutRecoveryMessage(taskId, gText_PlayerScurriedToCenter, 2, 8))
|
||||
{
|
||||
ObjectEventTurn(&gObjectEvents[gPlayerAvatar.objectEventId], 2);
|
||||
++gTasks[taskId].data[0];
|
||||
ObjectEventTurn(&gObjectEvents[gPlayerAvatar.objectEventId], DIR_NORTH);
|
||||
gTasks[taskId].tState++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (PrintWhiteOutRecoveryMessage(taskId, gText_PlayerScurriedBackHome, 2, 8))
|
||||
{
|
||||
ObjectEventTurn(&gObjectEvents[gPlayerAvatar.objectEventId], 2);
|
||||
++gTasks[taskId].data[0];
|
||||
ObjectEventTurn(&gObjectEvents[gPlayerAvatar.objectEventId], DIR_NORTH);
|
||||
gTasks[taskId].tState++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
case 5:
|
||||
windowId = gTasks[taskId].data[1];
|
||||
windowId = gTasks[taskId].tWindowId;
|
||||
ClearWindowTilemap(windowId);
|
||||
CopyWindowToVram(windowId, COPYWIN_MAP);
|
||||
RemoveWindow(windowId);
|
||||
palette_bg_faded_fill_black();
|
||||
FadeInFromBlack();
|
||||
++gTasks[taskId].data[0];
|
||||
gTasks[taskId].tState++;
|
||||
break;
|
||||
case 3:
|
||||
if (FieldFadeTransitionBackgroundEffectIsFinished() == TRUE)
|
||||
@@ -455,5 +458,5 @@ void FieldCB_RushInjuredPokemonToCenter(void)
|
||||
LockPlayerFieldControls();
|
||||
palette_bg_faded_fill_black();
|
||||
taskId = CreateTask(Task_RushInjuredPokemonToCenter, 10);
|
||||
gTasks[taskId].data[0] = 0;
|
||||
gTasks[taskId].tState = 0;
|
||||
}
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
#include "global.h"
|
||||
|
||||
static u32 sub_80A0E78(void)
|
||||
static u32 FieldSpecialScene_Dummy0(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void nullsub_57(void)
|
||||
static void FieldSpecialScene_Dummy1(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void nullsub_58(void)
|
||||
static void FieldSpecialScene_Dummy2(void)
|
||||
{
|
||||
}
|
||||
|
||||
static void nullsub_59(void)
|
||||
static void FieldSpecialScene_Dummy3(void)
|
||||
{
|
||||
}
|
||||
|
||||
void nullsub_60(void)
|
||||
void FieldCB_ShowPortholeView(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -325,7 +325,7 @@ void SpawnCameraObject(void)
|
||||
void RemoveCameraObject(void)
|
||||
{
|
||||
CameraObjectSetFollowedObjectId(GetPlayerAvatarObjectId());
|
||||
RemoveObjectEventByLocalIdAndMap(127, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
RemoveObjectEventByLocalIdAndMap(OBJ_EVENT_ID_CAMERA, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
}
|
||||
|
||||
void BufferEReaderTrainerName(void)
|
||||
@@ -333,7 +333,8 @@ void BufferEReaderTrainerName(void)
|
||||
CopyEReaderTrainerName5(gStringVar1);
|
||||
}
|
||||
|
||||
static const u8 sUnused_83F5B04[] = {
|
||||
// Unused
|
||||
static const u8 sSlotMachineRandomSeeds[] = {
|
||||
13,
|
||||
14,
|
||||
15,
|
||||
@@ -752,7 +753,8 @@ static const u8 *const sFloorNamePointers[] = {
|
||||
gText_Rooftop
|
||||
};
|
||||
|
||||
static const u8 sUnused_83F5B84[] = {
|
||||
// Unused
|
||||
static const u8 sFloorNameWidthPadding[] = {
|
||||
26,
|
||||
26,
|
||||
26,
|
||||
@@ -1096,7 +1098,7 @@ void DrawElevatorCurrentFloorWindow(void)
|
||||
if (QuestLog_SchedulePlaybackCB(QLPlaybackCB_DestroyScriptMenuMonPicSprites) != TRUE)
|
||||
{
|
||||
sElevatorCurrentFloorWindowId = AddWindow(&sElevatorCurrentFloorWindowTemplate);
|
||||
TextWindow_SetStdFrame0_WithPal(sElevatorCurrentFloorWindowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(sElevatorCurrentFloorWindowId, 0x21D, 0xD0);
|
||||
DrawStdFrameWithCustomTileAndPalette(sElevatorCurrentFloorWindowId, FALSE, 0x21D, 0xD);
|
||||
AddTextPrinterParameterized(sElevatorCurrentFloorWindowId, FONT_2, gText_NowOn, 0, 2, 0xFF, NULL);
|
||||
floorname = sFloorNamePointers[gSpecialVar_0x8005];
|
||||
|
||||
+2
-1
@@ -288,7 +288,8 @@ static void CrackedFloorPerStepCallback(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_806ED38(void)
|
||||
// Unused
|
||||
static void SetHasPokedexAndPokemon(void)
|
||||
{
|
||||
FlagSet(FLAG_SYS_POKEDEX_GET);
|
||||
FlagSet(FLAG_SYS_POKEMON_GET);
|
||||
|
||||
+4
-4
@@ -431,7 +431,7 @@ void MapGridSetMetatileImpassabilityAt(s32 x, s32 y, bool32 impassable)
|
||||
|
||||
static u32 GetAttributeByMetatileIdAndMapLayout(const struct MapLayout *mapLayout, u16 metatile, u8 attributeType)
|
||||
{
|
||||
u32 * attributes;
|
||||
const u32 * attributes;
|
||||
|
||||
if (metatile < NUM_METATILES_IN_PRIMARY)
|
||||
{
|
||||
@@ -891,17 +891,17 @@ static void LoadTilesetPalette(struct Tileset const *tileset, u16 destOffset, u1
|
||||
if (tileset->isSecondary == FALSE)
|
||||
{
|
||||
LoadPalette(&black, destOffset, 2);
|
||||
LoadPalette(((u16 *)tileset->palettes) + 1, destOffset + 1, size - 2);
|
||||
LoadPalette(tileset->palettes[0] + 1, destOffset + 1, size - 2);
|
||||
ApplyGlobalTintToPaletteEntries(destOffset + 1, (size - 2) >> 1);
|
||||
}
|
||||
else if (tileset->isSecondary == TRUE)
|
||||
{
|
||||
LoadPalette(((u16 *)tileset->palettes) + (NUM_PALS_IN_PRIMARY * 16), destOffset, size);
|
||||
LoadPalette(tileset->palettes[NUM_PALS_IN_PRIMARY], destOffset, size);
|
||||
ApplyGlobalTintToPaletteEntries(destOffset, size >> 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
LoadCompressedPalette((u32 *)tileset->palettes, destOffset, size);
|
||||
LoadCompressedPalette((const u32 *)tileset->palettes, destOffset, size);
|
||||
ApplyGlobalTintToPaletteEntries(destOffset, size >> 1);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -145,7 +145,7 @@ bool8 SetUpFieldMove_Cut(void)
|
||||
for (j = 0; j < CUT_SIDE; j++)
|
||||
{
|
||||
x = gPlayerFacingPosition.x - 1 + j;
|
||||
if (MapGridGetElevationAt(x, y) == gPlayerFacingPosition.height)
|
||||
if (MapGridGetElevationAt(x, y) == gPlayerFacingPosition.elevation)
|
||||
{
|
||||
if (MetatileAtCoordsIsGrassTile(x, y) == TRUE)
|
||||
{
|
||||
@@ -214,7 +214,7 @@ bool8 FldEff_CutGrass(void)
|
||||
for (j = 0; j < CUT_SIDE; j++)
|
||||
{
|
||||
x = gPlayerFacingPosition.x - 1 + j;
|
||||
if (MapGridGetElevationAt(x, y) == gPlayerFacingPosition.height)
|
||||
if (MapGridGetElevationAt(x, y) == gPlayerFacingPosition.elevation)
|
||||
{
|
||||
if (MetatileAtCoordsIsGrassTile(x, y) == TRUE)
|
||||
{
|
||||
|
||||
@@ -28,8 +28,8 @@ bool8 CheckObjectGraphicsInFrontOfPlayer(u8 graphicsId)
|
||||
u8 mapObjId;
|
||||
|
||||
GetXYCoordsOneStepInFrontOfPlayer(&gPlayerFacingPosition.x, &gPlayerFacingPosition.y);
|
||||
gPlayerFacingPosition.height = PlayerGetZCoord();
|
||||
mapObjId = GetObjectEventIdByXYZ(gPlayerFacingPosition.x, gPlayerFacingPosition.y, gPlayerFacingPosition.height);
|
||||
gPlayerFacingPosition.elevation = PlayerGetElevation();
|
||||
mapObjId = GetObjectEventIdByPosition(gPlayerFacingPosition.x, gPlayerFacingPosition.y, gPlayerFacingPosition.elevation);
|
||||
if (gObjectEvents[mapObjId].graphicsId != graphicsId)
|
||||
return FALSE;
|
||||
gSpecialVar_LastTalked = gObjectEvents[mapObjId].localId;
|
||||
|
||||
+10
-10
@@ -1219,13 +1219,13 @@ const u32 gKantoTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card.4bpp.
|
||||
const u16 gHoennTrainerCard_Pal[] = INCBIN_U16("graphics/trainer_card/0star_em.gbapal");
|
||||
const u32 gHoennTrainerCard_Gfx[] = INCBIN_U32("graphics/trainer_card/card_em.4bpp.lz");
|
||||
|
||||
const u16 gEasyChatMode_Pal[] = INCBIN_U16("graphics/link_rfu/unk_8E99DAC.gbapal");
|
||||
const u32 gEasyChatWindow_Gfx[] = INCBIN_U32("graphics/link_rfu/unk_8E99DAC.4bpp.lz");
|
||||
const u32 gEasyChatWindow_Tilemap[] = INCBIN_U32("graphics/link_rfu/unk_8E99E74.bin.lz");
|
||||
const u16 gEasyChatWindow_Pal[] = INCBIN_U16("graphics/easy_chat/window.gbapal");
|
||||
const u32 gEasyChatWindow_Gfx[] = INCBIN_U32("graphics/easy_chat/window.4bpp.lz");
|
||||
const u32 gEasyChatWindow_Tilemap[] = INCBIN_U32("graphics/easy_chat/window.bin.lz");
|
||||
|
||||
const u16 gUnknown_8E99F24[] = INCBIN_U16("graphics/link_rfu/unk_8E9A168.gbapal");
|
||||
const u32 gEasyChatSelectGroupHelp_Tiles[] = INCBIN_U32("graphics/link_rfu/unk_8E99F44.4bpp.lz");
|
||||
const u32 gEasyChatModeIcons_Tiles[] = INCBIN_U32("graphics/link_rfu/unk_8E9A168.4bpp.lz");
|
||||
const u16 gEasyChatButtonWindow_Pal[] = INCBIN_U16("graphics/easy_chat/button_window.gbapal");
|
||||
const u32 gEasyChatButtonWindow_Gfx[] = INCBIN_U32("graphics/easy_chat/button_window.4bpp.lz");
|
||||
const u32 gEasyChatMode_Gfx[] = INCBIN_U32("graphics/easy_chat/mode.4bpp.lz");
|
||||
|
||||
const u32 gPokeSumBgTiles[] = INCBIN_U32("graphics/interface/trainer_memo.4bpp.lz");
|
||||
const u32 gTrainerMemoPal1[] = INCBIN_U32("graphics/interface/trainer_memo_pal1.gbapal");
|
||||
@@ -1242,11 +1242,11 @@ const u32 gBgTilemap_PokeSum_MovesListForDelete[] = INCBIN_U32("graphics/interfa
|
||||
const u32 gBgTilemap_PokeSum_MoveDetailsForDelete[] = INCBIN_U32("graphics/interface/trainer_memo_4.bin.lz");
|
||||
const u32 gBgTilemap_TrainerMemo_Egg[] = INCBIN_U32("graphics/interface/trainer_memo_5.bin.lz");
|
||||
|
||||
const u16 gUnknown_8E9BD08[] = INCBIN_U16("graphics/unknown/unknown_E9BD08.gbapal"); // might be an alternate unused palette of the link_rfu gfx below.
|
||||
const u16 gUnknown_8E9BD08[] = INCBIN_U16("graphics/unknown/unknown_E9BD08.gbapal");
|
||||
|
||||
const u32 gEasyChatRedRectangularCursor_Tiles[] = INCBIN_U32("graphics/interface/link_rfu_frame.4bpp.lz");
|
||||
const u16 gPokeSummary_StatusAilmentIconPals[] = INCBIN_U16("graphics/interface/link_rfu_frame.gbapal");
|
||||
const u32 gPokeSummary_StatusAilmentIconTiles[] = INCBIN_U32("graphics/interface/link_rfu_status.4bpp.lz");
|
||||
const u32 gEasyChatRectangleCursor_Gfx[] = INCBIN_U32("graphics/easy_chat/rectangle_cursor.4bpp.lz");
|
||||
const u16 gPokeSummary_StatusAilmentIconPals[] = INCBIN_U16("graphics/interface/status_ailment_icons.gbapal");
|
||||
const u32 gPokeSummary_StatusAilmentIconTiles[] = INCBIN_U32("graphics/interface/status_ailment_icons.4bpp.lz");
|
||||
|
||||
const u16 gDexScreen_TopMenuIconPals_AtoZ[] = INCBIN_U16("graphics/pokedex/cat_icon_abc.gbapal");
|
||||
const u32 gDexScreen_TopMenuIconTiles_AtoZ[] = INCBIN_U32("graphics/pokedex/cat_icon_abc.4bpp.lz");
|
||||
|
||||
+1
-1
@@ -620,7 +620,7 @@ static void Task_Hof_SpawnPlayerPic(u8 taskId)
|
||||
ShowBg(3);
|
||||
gTasks[taskId].data[4] = CreateTrainerPicSprite(PlayerGenderToFrontTrainerPicId_Debug(gSaveBlock2Ptr->playerGender, TRUE), TRUE, 0x78, 0x48, 6, 0xFFFF);
|
||||
AddWindow(&sWindowTemplate);
|
||||
TextWindow_SetStdFrame0_WithPal(1, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(1, 0x21D, 0xD0);
|
||||
gTasks[taskId].data[3] = 120;
|
||||
gTasks[taskId].func = Task_Hof_WaitAndPrintPlayerInfo;
|
||||
}
|
||||
|
||||
+20
-19
@@ -5,7 +5,7 @@
|
||||
|
||||
static EWRAM_DATA u8 sHelpMessageWindowId = 0;
|
||||
|
||||
const u8 gUnknown_84566A8[] = INCBIN_U8("graphics/unknown/unknown_84566a8.bin");
|
||||
const u8 gHelpMessageWindow_Gfx[] = INCBIN_U8("graphics/help_system/msg_window.4bpp");
|
||||
|
||||
static const struct WindowTemplate sHelpMessageWindowTemplate = {
|
||||
.bg = 0,
|
||||
@@ -19,12 +19,12 @@ static const struct WindowTemplate sHelpMessageWindowTemplate = {
|
||||
|
||||
void MapNamePopupWindowIdSetDummy(void)
|
||||
{
|
||||
sHelpMessageWindowId = 0xFF;
|
||||
sHelpMessageWindowId = WINDOW_NONE;
|
||||
}
|
||||
|
||||
u8 CreateHelpMessageWindow(void)
|
||||
{
|
||||
if (sHelpMessageWindowId == 0xFF)
|
||||
if (sHelpMessageWindowId == WINDOW_NONE)
|
||||
{
|
||||
sHelpMessageWindowId = AddWindow(&sHelpMessageWindowTemplate);
|
||||
PutWindowTilemap(sHelpMessageWindowId);
|
||||
@@ -34,7 +34,7 @@ u8 CreateHelpMessageWindow(void)
|
||||
|
||||
void DestroyHelpMessageWindow(u8 a0)
|
||||
{
|
||||
if (sHelpMessageWindowId != 0xFF)
|
||||
if (sHelpMessageWindowId != WINDOW_NONE)
|
||||
{
|
||||
FillWindowPixelBuffer(sHelpMessageWindowId, PIXEL_FILL(0));
|
||||
ClearWindowTilemap(sHelpMessageWindowId);
|
||||
@@ -43,17 +43,18 @@ void DestroyHelpMessageWindow(u8 a0)
|
||||
CopyWindowToVram(sHelpMessageWindowId, a0);
|
||||
|
||||
RemoveWindow(sHelpMessageWindowId);
|
||||
sHelpMessageWindowId = 0xFF;
|
||||
sHelpMessageWindowId = WINDOW_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8112F18(u8 windowId)
|
||||
// Creates the bottom bar window that displays help text for e.g. the options in the Start menu
|
||||
void DrawHelpMessageWindowTilesById(u8 windowId)
|
||||
{
|
||||
const u8 *ptr = gUnknown_84566A8;
|
||||
const u8 *ptr = gHelpMessageWindow_Gfx;
|
||||
u8 *buffer;
|
||||
u8 i, j;
|
||||
u8 width, height;
|
||||
u8 k;
|
||||
u8 tileId;
|
||||
|
||||
width = (u8)GetWindowAttribute(windowId, WINDOW_WIDTH);
|
||||
height = (u8)GetWindowAttribute(windowId, WINDOW_HEIGHT);
|
||||
@@ -66,15 +67,15 @@ void sub_8112F18(u8 windowId)
|
||||
{
|
||||
for (j = 0; j < width; j++)
|
||||
{
|
||||
if (i == 0)
|
||||
k = 0;
|
||||
else if (i == height - 1)
|
||||
k = 14;
|
||||
else
|
||||
k = 5;
|
||||
if (i == 0) // Top row
|
||||
tileId = 0;
|
||||
else if (i == height - 1) // Bottom row
|
||||
tileId = 14;
|
||||
else // Middle row
|
||||
tileId = 5;
|
||||
CpuCopy32(
|
||||
&ptr[k * 0x20],
|
||||
&buffer[(i * width + j) * 0x20],
|
||||
&ptr[tileId * 32],
|
||||
&buffer[(i * width + j) * 32],
|
||||
32
|
||||
);
|
||||
}
|
||||
@@ -84,9 +85,9 @@ void sub_8112F18(u8 windowId)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8112FD0(void)
|
||||
static void DrawHelpMessageWindowTiles(void)
|
||||
{
|
||||
sub_8112F18(sHelpMessageWindowId);
|
||||
DrawHelpMessageWindowTilesById(sHelpMessageWindowId);
|
||||
}
|
||||
|
||||
static const u8 sHelpMessageTextColors[3] = {TEXT_COLOR_TRANSPARENT, TEXT_DYNAMIC_COLOR_1, TEXT_COLOR_DARK_GRAY};
|
||||
@@ -98,7 +99,7 @@ static void PrintHelpMessageText(const u8 *text)
|
||||
|
||||
void PrintTextOnHelpMessageWindow(const u8 *text, u8 mode)
|
||||
{
|
||||
sub_8112FD0();
|
||||
DrawHelpMessageWindowTiles();
|
||||
PrintHelpMessageText(text);
|
||||
if (mode)
|
||||
CopyWindowToVram(sHelpMessageWindowId, mode);
|
||||
|
||||
+1
-1
@@ -1646,7 +1646,7 @@ static const u8 *const sHelpSystemSubmenuItemLists[HELPCONTEXT_COUNT * (TOPIC_CO
|
||||
NULL, NULL, NULL, NULL, NULL // HELPCONTEXT_UNUSED
|
||||
};
|
||||
|
||||
static const u16 unref_845BCB0[] = INCBIN_U16("graphics/help_system/unused.bin");
|
||||
static const u16 sUnused[] = INCBIN_U16("graphics/help_system/unused.bin");
|
||||
|
||||
static const u8 sHelpSystemContextTopicOrder[TOPIC_COUNT] = {
|
||||
TOPIC_ABOUT_GAME,
|
||||
|
||||
+1
-1
@@ -1662,7 +1662,7 @@ void Task_ReturnToBagFromContextMenu(u8 taskId)
|
||||
Task_RedrawArrowsAndReturnToBagMenuSelect(taskId);
|
||||
}
|
||||
|
||||
static void unref_sub_810A288(u8 taskId)
|
||||
static void Task_UnusedReturnToBag(u8 taskId)
|
||||
{
|
||||
s16 *data = gTasks[taskId].data;
|
||||
u16 itemsAbove;
|
||||
|
||||
+5
-5
@@ -1069,11 +1069,11 @@ static void ItemPc_InitWindows(void)
|
||||
|
||||
InitWindows(sWindowTemplates);
|
||||
DeactivateAllTextPrinters();
|
||||
TextWindow_SetUserSelectedFrame(0, 0x3C0, 0xE0);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x3A3, 0xC0);
|
||||
TextWindow_LoadResourcesStdFrame0(0, 0x3AC, 0xB0);
|
||||
LoadPalette(stdpal_get(2), 0xD0, 0x20);
|
||||
LoadPalette(gTMCaseMainWindowPalette, 0xF0, 0x20);
|
||||
LoadUserWindowGfx(0, 0x3C0, 0xE0);
|
||||
LoadStdWindowGfx(0, 0x3A3, 0xC0);
|
||||
LoadMenuMessageWindowGfx(0, 0x3AC, 0xB0);
|
||||
LoadPalette(GetTextWindowPalette(2), 0xD0, 0x20);
|
||||
LoadPalette(gStandardMenuPalette, 0xF0, 0x20);
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
FillWindowPixelBuffer(i, 0x00);
|
||||
|
||||
+4
-2
@@ -70,8 +70,10 @@ static void Task_UseFameCheckerFromField(u8 taskId);
|
||||
static void Task_BattleUse_StatBooster_DelayAndPrint(u8 taskId);
|
||||
static void Task_BattleUse_StatBooster_WaitButton_ReturnToBattle(u8 taskId);
|
||||
|
||||
// No clue what this is
|
||||
static const u8 sUnref_83E27B4[] = {
|
||||
// unknown unused data.
|
||||
// It's curiously about the size of an array of values indexed by species (including padding),
|
||||
// but the arrangement of values is not sensible (e.g., not giving all "old unown" the same value).
|
||||
static const u8 sUnused[] = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
+3
-3
@@ -104,7 +104,7 @@ static const union AffineAnimCmd *const sArrowAndStarSpriteAffineAnimTable[] = {
|
||||
sAffineAnim_Up
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_84647E4 = {
|
||||
static const struct SpriteTemplate sSpriteTemplate_ArrowAndStar = {
|
||||
.tileTag = ARROW_TILE_TAG,
|
||||
.paletteTag = 0xFFFF,
|
||||
.oam = &sArrowAndStarSpriteOamData,
|
||||
@@ -534,7 +534,7 @@ static void DestroyArrowAndStarTiles(void)
|
||||
|
||||
static void CreateArrowSprite(u8 animNum, u8 direction)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gUnknown_84647E4, 120, 76, 0);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_ArrowAndStar, 120, 76, 0);
|
||||
gSprites[spriteId].oam.paletteNum = 0;
|
||||
StartSpriteAnim(&gSprites[spriteId], animNum);
|
||||
gSprites[spriteId].spAnimNum = animNum;
|
||||
@@ -614,7 +614,7 @@ static void SpriteCallback_DestroyArrow(struct Sprite *sprite)
|
||||
|
||||
static u8 CreateStarSprite(void)
|
||||
{
|
||||
u8 spriteId = CreateSprite(&gUnknown_84647E4, 120, 76, 0);
|
||||
u8 spriteId = CreateSprite(&sSpriteTemplate_ArrowAndStar, 120, 76, 0);
|
||||
gSprites[spriteId].oam.paletteNum = 0;
|
||||
gSprites[spriteId].callback = SpriteCallback_Star;
|
||||
StartSpriteAnim(&gSprites[spriteId], 4);
|
||||
|
||||
+6
-6
@@ -326,7 +326,7 @@ static const struct WindowTemplate sWindowTemplates[9] = {
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_83FFA8C = {
|
||||
static const struct WindowTemplate sMoveRelearnerYesNoMenuTemplate = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 8,
|
||||
@@ -398,7 +398,7 @@ static void MoveRelearnerLoadBgGfx(void)
|
||||
FillWindowPixelBuffer(7, PIXEL_FILL(1));
|
||||
FillBgTilemapBufferRect(0, 0x000, 0, 0, 30, 20, 0xF);
|
||||
SetBgTilemapBuffer(1, sMoveRelearner->bg1TilemapBuffer);
|
||||
TextWindow_SetUserSelectedFrame(0, 1, 0xE0);
|
||||
LoadUserWindowGfx(0, 1, 0xE0);
|
||||
ListMenuLoadStdPalAt(0xD0, 1);
|
||||
LoadPalette(gUnknown_8E97DDC, 0x00, 0x20);
|
||||
DecompressAndLoadBgGfxUsingHeap(1, gUnknown_8E97DFC, 0, 0, 0);
|
||||
@@ -506,7 +506,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
MoveRelearnerMenuHandleInput();
|
||||
break;
|
||||
case MENU_STATE_PRINT_TEACH_MOVE_PROMPT:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_TEACH_MOVE_CONFIRM :
|
||||
@@ -531,7 +531,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
}
|
||||
break;
|
||||
case MENU_STATE_PRINT_GIVE_UP_PROMPT:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_GIVE_UP_CONFIRM:
|
||||
@@ -552,7 +552,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_WAIT_FOR_TRYING_TO_LEARN:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state = 18;
|
||||
break;
|
||||
case MENU_STATE_CONFIRM_DELETE_OLD_MOVE:
|
||||
@@ -573,7 +573,7 @@ static void MoveRelearnerStateMachine(void)
|
||||
sMoveRelearner->state++;
|
||||
break;
|
||||
case MENU_STATE_WAIT_FOR_STOP_TEACHING:
|
||||
CreateYesNoMenu(&gUnknown_83FFA8C, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
CreateYesNoMenu(&sMoveRelearnerYesNoMenuTemplate, FONT_3, 0, 2, 0x001, 0xE, 0);
|
||||
sMoveRelearner->state = 26;
|
||||
break;
|
||||
case MENU_STATE_CONFIRM_STOP_TEACHING:
|
||||
|
||||
+308
-456
File diff suppressed because it is too large
Load Diff
+47
-36
@@ -559,49 +559,60 @@ static bool8 RfuUnusedQueue_Enqueue(struct RfuUnusedQueue *queue, u8 *dest)
|
||||
}
|
||||
|
||||
// Unused
|
||||
static void sub_80FC9B8(u8 *q1, u8 mode)
|
||||
// Populates an array with a sequence of numbers (which numbers depends on the mode)
|
||||
// and sets the final element to the total of the other elements
|
||||
#define SEQ_ARRAY_MAX_SIZE 200
|
||||
static void PopulateArrayWithSequence(u8 *arr, u8 mode)
|
||||
{
|
||||
s32 i;
|
||||
u8 rval;
|
||||
u16 r5 = 0;
|
||||
u16 total = 0;
|
||||
static u8 counter;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case 0:
|
||||
for (i = 0; i < 200; i++)
|
||||
{
|
||||
q1[i] = i + 1;
|
||||
r5 += i + 1;
|
||||
}
|
||||
*((u16 *)(q1 + i)) = r5;
|
||||
break;
|
||||
case 1:
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
q1[i] = i + 1;
|
||||
r5 += i + 1;
|
||||
}
|
||||
*((u16 *)(q1 + 200)) = r5;
|
||||
break;
|
||||
case 2:
|
||||
for (i = 0; i < 200; i++)
|
||||
{
|
||||
rval = Random();
|
||||
q1[i] = rval;
|
||||
r5 += rval;
|
||||
}
|
||||
*((u16 *)(q1 + i)) = r5;
|
||||
break;
|
||||
case 3:
|
||||
for (i = 0; i < 200; i++)
|
||||
{
|
||||
q1[i] = i + 1 + counter;
|
||||
r5 += (i + 1 + counter) & 0xFF;
|
||||
}
|
||||
*((u16 *)(q1 + i)) = r5;
|
||||
counter++;
|
||||
break;
|
||||
case 0:
|
||||
// Populate with numbers 1-200
|
||||
// Total will be 20100
|
||||
for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++)
|
||||
{
|
||||
arr[i] = i + 1;
|
||||
total += i + 1;
|
||||
}
|
||||
*((u16 *)(arr + i)) = total;
|
||||
break;
|
||||
case 1:
|
||||
// Populate with numbers 1-100
|
||||
// Total will be 5050
|
||||
for (i = 0; i < 100; i++)
|
||||
{
|
||||
arr[i] = i + 1;
|
||||
total += i + 1;
|
||||
}
|
||||
*((u16 *)(arr + SEQ_ARRAY_MAX_SIZE)) = total;
|
||||
break;
|
||||
case 2:
|
||||
// Populate with random numbers 0-255
|
||||
// Total will be a number 0-51000
|
||||
for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++)
|
||||
{
|
||||
rval = Random();
|
||||
arr[i] = rval;
|
||||
total += rval;
|
||||
}
|
||||
*((u16 *)(arr + i)) = total;
|
||||
break;
|
||||
case 3:
|
||||
// Populate with numbers 1-200 + counter
|
||||
// Total will be a number 20100-51000
|
||||
for (i = 0; i < SEQ_ARRAY_MAX_SIZE; i++)
|
||||
{
|
||||
arr[i] = i + 1 + counter;
|
||||
total += (i + 1 + counter) & 0xFF;
|
||||
}
|
||||
*((u16 *)(arr + i)) = total;
|
||||
counter++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -91,7 +91,7 @@ u32 DoMysteryGiftListMenu(const struct WindowTemplate *windowTemplate, const str
|
||||
switch (arg2)
|
||||
{
|
||||
case 2:
|
||||
TextWindow_SetUserSelectedFrame(sMysteryGiftLinkMenu.windowId, tileNum, palNum);
|
||||
LoadUserWindowGfx(sMysteryGiftLinkMenu.windowId, tileNum, palNum);
|
||||
case 1:
|
||||
DrawTextBorderOuter(sMysteryGiftLinkMenu.windowId, tileNum, palNum / 16);
|
||||
break;
|
||||
|
||||
+21
-19
@@ -302,7 +302,7 @@ _081DD044:
|
||||
ldrb r0, [r4, o_SoundChannel_type]
|
||||
tst r0, 0x30
|
||||
beq _081DD068
|
||||
bl sub_81DC460
|
||||
bl SoundMainRAM_Unk1
|
||||
b _081DD228
|
||||
_081DD068:
|
||||
mov r10, r10, lsl 16
|
||||
@@ -465,8 +465,9 @@ _081DD25E:
|
||||
.pool
|
||||
thumb_func_end SoundMainRAM
|
||||
|
||||
arm_func_start sub_81DC460
|
||||
sub_81DC460:
|
||||
@ Not present in GBA SDK 3.0
|
||||
arm_func_start SoundMainRAM_Unk1
|
||||
SoundMainRAM_Unk1:
|
||||
ldr r6, [r4, o_SoundChannel_wav]
|
||||
ldrb r0, [r4, o_SoundChannel_status]
|
||||
tst r0, 0x20
|
||||
@@ -505,10 +506,10 @@ _081DD2B4:
|
||||
ldrb r0, [r4, o_SoundChannel_type]
|
||||
tst r0, 0x10
|
||||
bne _081DD3C0
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
add r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD308:
|
||||
ldr r6, [r5]
|
||||
@@ -534,11 +535,11 @@ _081DD310:
|
||||
b _081DD364
|
||||
_081DD358:
|
||||
add r3, r3, lr
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
_081DD364:
|
||||
add r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD370:
|
||||
adds r5, r5, 0x40000000
|
||||
@@ -565,10 +566,10 @@ _081DD3B0:
|
||||
b _081DD3B0
|
||||
_081DD3C0:
|
||||
sub r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
sub r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD3D8:
|
||||
ldr r6, [r5]
|
||||
@@ -594,11 +595,11 @@ _081DD3E0:
|
||||
b _081DD434
|
||||
_081DD428:
|
||||
sub r3, r3, lr
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
mov r0, r1
|
||||
_081DD434:
|
||||
sub r3, r3, 0x1
|
||||
bl sub_81DC71C
|
||||
bl SoundMainRAM_Unk2
|
||||
sub r1, r1, r0
|
||||
_081DD440:
|
||||
adds r5, r5, 0x40000000
|
||||
@@ -663,10 +664,11 @@ _081DD4F4:
|
||||
str r7, [r5, 0x630]
|
||||
str r6, [r5], 0x4
|
||||
pop {r8,r12,pc}
|
||||
arm_func_end sub_81DC460
|
||||
arm_func_end SoundMainRAM_Unk1
|
||||
|
||||
arm_func_start sub_81DC71C
|
||||
sub_81DC71C:
|
||||
@ Not present in GBA SDK 3.0
|
||||
arm_func_start SoundMainRAM_Unk2
|
||||
SoundMainRAM_Unk2:
|
||||
push {r0,r2,r5-r7,lr}
|
||||
mov r0, r3, lsr 6
|
||||
ldr r1, [r4, o_SoundChannel_xpi]
|
||||
@@ -678,7 +680,7 @@ sub_81DC71C:
|
||||
ldr r1, [r4, o_SoundChannel_wav]
|
||||
add r2, r2, r1
|
||||
add r2, r2, 0x10
|
||||
ldr r5, =gUnknown_030007B8
|
||||
ldr r5, =sDecodingBuffer
|
||||
ldr r6, =gDeltaEncodingTable
|
||||
mov r7, 0x40
|
||||
ldrb lr, [r2], 1
|
||||
@@ -699,12 +701,12 @@ _081DD57C:
|
||||
subs r7, r7, 2
|
||||
bgt _081DD568
|
||||
_081DD594:
|
||||
ldr r5, =gUnknown_030007B8
|
||||
ldr r5, =sDecodingBuffer
|
||||
and r0, r3, 0x3F
|
||||
ldrsb r1, [r5, r0]
|
||||
pop {r0,r2,r5-r7,pc}
|
||||
.pool
|
||||
arm_func_end sub_81DC71C
|
||||
arm_func_end SoundMainRAM_Unk2
|
||||
|
||||
thumb_func_start SoundMainBTM
|
||||
SoundMainBTM:
|
||||
@@ -1910,9 +1912,9 @@ _081DDD90:
|
||||
|
||||
.bss
|
||||
.align 3
|
||||
gUnknown_030007B8:
|
||||
sDecodingBuffer:
|
||||
.space 0x40
|
||||
.size gUnknown_030007B8, .-gUnknown_030007B8
|
||||
.size sDecodingBuffer, .-sDecodingBuffer
|
||||
|
||||
.global gMPlayTrack_BGM
|
||||
gMPlayTrack_BGM:
|
||||
|
||||
+1
-1
@@ -560,7 +560,7 @@ static bool8 DoInitMailView(void)
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 12:
|
||||
LoadPalette(stdpal_get(0), 0xF0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(0), 0xF0, 0x20);
|
||||
gPlttBufferUnfaded[15 * 16 + 10] = sGfxHeaders[sMailViewResources->mailType].textpals[0];
|
||||
gPlttBufferFaded[15 * 16 + 10] = sGfxHeaders[sMailViewResources->mailType].textpals[0];
|
||||
gPlttBufferUnfaded[15 * 16 + 11] = sGfxHeaders[sMailViewResources->mailType].textpals[1];
|
||||
|
||||
+3
-3
@@ -677,14 +677,14 @@ static void PrintBadgeCount(void)
|
||||
|
||||
static void LoadUserFrameToBg(u8 bgId)
|
||||
{
|
||||
LoadBgTiles(bgId, GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType)->tiles, 0x120, 0x1B1);
|
||||
LoadPalette(GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType)->palette, 0x20, 0x20);
|
||||
LoadBgTiles(bgId, GetUserWindowGraphics(gSaveBlock2Ptr->optionsWindowFrameType)->tiles, 0x120, 0x1B1);
|
||||
LoadPalette(GetUserWindowGraphics(gSaveBlock2Ptr->optionsWindowFrameType)->palette, 0x20, 0x20);
|
||||
MainMenu_EraseWindow(&sWindowTemplate[MAIN_MENU_WINDOW_ERROR]);
|
||||
}
|
||||
|
||||
static void SetStdFrame0OnBg(u8 bgId)
|
||||
{
|
||||
TextWindow_SetStdFrame0_WithPal(MAIN_MENU_WINDOW_NEWGAME_ONLY, 0x1B1, 0x20);
|
||||
LoadStdWindowGfx(MAIN_MENU_WINDOW_NEWGAME_ONLY, 0x1B1, 0x20);
|
||||
MainMenu_EraseWindow(&sWindowTemplate[MAIN_MENU_WINDOW_ERROR]);
|
||||
}
|
||||
|
||||
|
||||
@@ -172,13 +172,13 @@ static u16 MapNamePopupCreateWindow(bool32 palintoFadedBuffer)
|
||||
windowId = AddWindow(&windowTemplate);
|
||||
if (palintoFadedBuffer)
|
||||
{
|
||||
LoadPalette(stdpal_get(3), 0xd0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(3), 0xd0, 0x20);
|
||||
}
|
||||
else
|
||||
{
|
||||
CpuCopy16(stdpal_get(3), &gPlttBufferUnfaded[0xd0], 0x20);
|
||||
CpuCopy16(GetTextWindowPalette(3), &gPlttBufferUnfaded[0xd0], 0x20);
|
||||
}
|
||||
sub_814FF6C(windowId, r6);
|
||||
LoadStdWindowTiles(windowId, r6);
|
||||
DrawTextBorderOuter(windowId, r6, 0xD);
|
||||
PutWindowTilemap(windowId);
|
||||
MapNamePopupPrintMapNameOnWindow(windowId);
|
||||
|
||||
+1
-1
@@ -180,7 +180,7 @@ u8 CreateTopBarWindowLoadPalette(u8 bg, u8 width, u8 yPos, u8 palette, u16 baseT
|
||||
palette = 15 * 16;
|
||||
else
|
||||
palette *= 16;
|
||||
LoadPalette(stdpal_get(2), palette, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(2), palette, 0x20);
|
||||
return sTopBarWindowId;
|
||||
}
|
||||
|
||||
|
||||
+6
-1
@@ -3,6 +3,11 @@
|
||||
#include "task.h"
|
||||
#include "wild_encounter.h"
|
||||
|
||||
// Not actually "old" given these were introduced in Gen 3,
|
||||
// but they're used as equivalents here alongside the other OLD_UNOWN
|
||||
#define SPECIES_OLD_UNOWN_EMARK (NUM_SPECIES + 0)
|
||||
#define SPECIES_OLD_UNOWN_QMARK (NUM_SPECIES + 1)
|
||||
|
||||
static void Task_SmoothBlendLayers(u8 taskId);
|
||||
|
||||
static const u8 sMonSpriteAnchorCoords[][5] = {
|
||||
@@ -503,7 +508,7 @@ void Menu_PrintFormatIntlPlayerName(u8 windowId, const u8 * src, u16 x, u16 y)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_812E768(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
static void UnusedBlitBitmapRect(const struct Bitmap *src, struct Bitmap *dst, u16 srcX, u16 srcY, u16 dstX, u16 dstY, u16 width, u16 height)
|
||||
{
|
||||
s32 loopSrcY, loopDstY, loopSrcX, loopDstX, xEnd, yEnd, multiplierSrcY, multiplierDstY;
|
||||
u16 toOrr;
|
||||
|
||||
+1
-1
@@ -134,7 +134,7 @@ bool8 sub_80BF748(void)
|
||||
{
|
||||
if (MenuHelpers_CallLinkSomething() == TRUE)
|
||||
return TRUE;
|
||||
else if (LinkRecvQueueLengthMoreThan2() != TRUE)
|
||||
else if (IsLinkRecvQueueAtOverworldMax() != TRUE)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
|
||||
+2
-2
@@ -210,7 +210,7 @@ static u32 EReaderReceive(u8 * state_p, u16 * receiveDelay)
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
Link_StartSend5FFFwithParam(0);
|
||||
SetCloseLinkCallbackAndType(0);
|
||||
*state_p = 5;
|
||||
break;
|
||||
case 5:
|
||||
@@ -416,7 +416,7 @@ static void Task_EReaderComm(u8 taskId)
|
||||
break;
|
||||
case 15:
|
||||
data->initialSendResult = ValidateTrainerTowerData((struct EReaderTrainerTowerSet *)gDecompressionBuffer);
|
||||
Link_StartSend5FFFwithParam(data->initialSendResult);
|
||||
SetCloseLinkCallbackAndType(data->initialSendResult);
|
||||
data->state = 16;
|
||||
break;
|
||||
case 16:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "global.h"
|
||||
#include "mevent_server.h"
|
||||
|
||||
extern const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[];
|
||||
extern const struct mevent_server_cmd gServerScript_ClientCanceledCard[];
|
||||
|
||||
// Unreferenced
|
||||
const u8 gUnknown_84687A0[] = _("You have collected all STAMPs!\nWant to input a CARD as a prize?");
|
||||
@@ -148,7 +148,7 @@ const struct mevent_server_cmd gMEventSrvScript_AskClientToOverwriteCard[] = {
|
||||
SRV_RECV(0x13),
|
||||
SRV_READWORD,
|
||||
SRV_BRANCHIF(0x00, gMEventSrvScript_SendCardSuccess),
|
||||
SRV_BRANCH(gMEventSrvScript_OtherTrainerCanceled)
|
||||
SRV_BRANCH(gServerScript_ClientCanceledCard)
|
||||
};
|
||||
|
||||
const struct mevent_server_cmd gMEventSrvScript_OtherTrnHasCard[] = {
|
||||
|
||||
@@ -1,452 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "decompress.h"
|
||||
#include "menu.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "mystery_gift_menu.h"
|
||||
#include "mevent.h"
|
||||
#include "battle_anim.h"
|
||||
|
||||
struct MEventScreenMgr_02DC
|
||||
{
|
||||
u8 nDigits;
|
||||
u8 nameTxt[41];
|
||||
u8 numberTxt[4];
|
||||
};
|
||||
|
||||
struct MEventScreenMgr
|
||||
{
|
||||
/*0000*/ struct WonderCard wonderCard;
|
||||
/*014c*/ struct WonderCardMetadata buff3430Sub;
|
||||
/*0170*/ const struct UnkStruct_8467FB8 * bgSpec;
|
||||
/*0174*/ u8 state;
|
||||
/*0175*/ u8 recordIdx;
|
||||
/*0176*/ u16 windowIds[3];
|
||||
/*017C*/ u8 monIconId;
|
||||
/*017D*/ u8 cardIconAndShadowSprites[7][2];
|
||||
/*018B*/ u8 title[41];
|
||||
/*01B4*/ u8 subtitle[41];
|
||||
/*01DD*/ u8 unk_01DD[7];
|
||||
/*01E4*/ u8 mainMessageLines[4][41];
|
||||
/*0288*/ u8 instructionsLine1[41];
|
||||
/*02B1*/ u8 instructionsLine2[41];
|
||||
/*02DC*/ struct MEventScreenMgr_02DC recordStrings[8];
|
||||
/*045C*/ u8 buffer_045C[0x1000];
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct MEventScreenMgr * sMEventScreenData = NULL;
|
||||
|
||||
static void sub_8145A98(void);
|
||||
static void sub_8145D18(u8 whichWindow);
|
||||
static void sub_8146060(void);
|
||||
static void sub_81461D8(void);
|
||||
|
||||
static const u8 gUnknown_8467068[][3] = {
|
||||
{0, 2, 3},
|
||||
{0, 1, 2}
|
||||
};
|
||||
|
||||
static const u8 ALIGNED(4) sTextYCoords[3] = {7, 4, 7};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplates[] = {
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 1,
|
||||
.width = 25,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x29c},
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 6,
|
||||
.width = 28,
|
||||
.height = 8,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x1bc},
|
||||
{
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 14,
|
||||
.width = 28,
|
||||
.height = 5,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x130}
|
||||
};
|
||||
|
||||
static const u16 sCard0Pal[] = INCBIN_U16("graphics/mevent/pal_46708C.gbapal");
|
||||
const u16 gCard1Pal[] = INCBIN_U16("graphics/mevent/pal_4670AC.gbapal");
|
||||
const u16 gCard2Pal[] = INCBIN_U16("graphics/mevent/pal_4670CC.gbapal");
|
||||
const u16 gCard3Pal[] = INCBIN_U16("graphics/mevent/pal_4670EC.gbapal");
|
||||
const u16 gCard4Pal[] = INCBIN_U16("graphics/mevent/pal_46710C.gbapal");
|
||||
const u16 gCard5Pal[] = INCBIN_U16("graphics/mevent/pal_46712C.gbapal");
|
||||
static const u16 sCard6Pal[] = INCBIN_U16("graphics/mevent/pal_46714C.gbapal");
|
||||
static const u16 sCard7Pal[] = INCBIN_U16("graphics/mevent/pal_46716C.gbapal");
|
||||
static const u8 sCard0Gfx[] = INCBIN_U8("graphics/mevent/gfx_46718C.4bpp.lz");
|
||||
static const u8 sCard0Map[] = INCBIN_U8("graphics/mevent/tilemap_467288.bin.lz");
|
||||
static const u8 sCard1Gfx[] = INCBIN_U8("graphics/mevent/gfx_46737C.4bpp.lz");
|
||||
static const u8 sCard1Map[] = INCBIN_U8("graphics/mevent/tilemap_467470.bin.lz");
|
||||
static const u8 sCard2Gfx[] = INCBIN_U8("graphics/mevent/gfx_467558.4bpp.lz");
|
||||
static const u8 sCard2Map[] = INCBIN_U8("graphics/mevent/tilemap_46762C.bin.lz");
|
||||
static const u8 sCard6Gfx[] = INCBIN_U8("graphics/mevent/gfx_467700.4bpp.lz");
|
||||
static const u8 sCard6Map[] = INCBIN_U8("graphics/mevent/tilemap_467934.bin.lz");
|
||||
static const u8 sCard7Gfx[] = INCBIN_U8("graphics/mevent/gfx_467A7C.4bpp.lz");
|
||||
static const u8 sCard7Map[] = INCBIN_U8("graphics/mevent/tilemap_467CAC.bin.lz");
|
||||
static const u16 sUnknown_8467DF4[] = INCBIN_U16("graphics/mevent/pal_467DF4.gbapal");
|
||||
static const u16 sUnknown_8467E14[] = INCBIN_U16("graphics/mevent/pal_467E14.gbapal");
|
||||
static const u16 sUnknown_8467E34[] = INCBIN_U16("graphics/mevent/pal_467E34.gbapal");
|
||||
static const u16 sUnknown_8467E54[] = INCBIN_U16("graphics/mevent/pal_467E54.gbapal");
|
||||
static const u16 sUnknown_8467E74[] = INCBIN_U16("graphics/mevent/pal_467E74.gbapal");
|
||||
static const u16 sUnknown_8467E94[] = INCBIN_U16("graphics/mevent/pal_467E94.gbapal");
|
||||
static const u16 sUnknown_8467EB4[] = INCBIN_U16("graphics/mevent/pal_467EB4.gbapal");
|
||||
static const u16 sUnknown_8467ED4[] = INCBIN_U16("graphics/mevent/pal_467ED4.gbapal");
|
||||
static const u32 sUnknown_8467EF4[] = INCBIN_U32("graphics/mevent/gfx_467EF4.4bpp.lz");
|
||||
|
||||
static const struct CompressedSpriteSheet sShadowSpriteSheet = {
|
||||
sUnknown_8467EF4, 0x100, 0x8000
|
||||
};
|
||||
|
||||
static const struct SpritePalette sShadowSpritePalettes[] = {
|
||||
{sUnknown_8467DF4, 0x8000},
|
||||
{sUnknown_8467E14, 0x8000},
|
||||
{sUnknown_8467E34, 0x8000},
|
||||
{sUnknown_8467E54, 0x8000},
|
||||
{sUnknown_8467E74, 0x8000},
|
||||
{sUnknown_8467E94, 0x8000},
|
||||
{sUnknown_8467EB4, 0x8000},
|
||||
{sUnknown_8467ED4, 0x8000}
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sShadowSpriteTemplate = {
|
||||
0x8000, 0x8000, &gOamData_AffineOff_ObjNormal_32x16, gDummySpriteAnimTable, NULL, gDummySpriteAffineAnimTable, SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct UnkStruct_8467FB8 sCardGfxPtrs[8] = {
|
||||
{1, 0, 0, 0, sCard0Gfx, sCard0Map, sCard0Pal},
|
||||
{1, 0, 0, 1, sCard1Gfx, sCard1Map, gCard1Pal},
|
||||
{1, 0, 0, 2, sCard2Gfx, sCard2Map, gCard2Pal},
|
||||
{1, 0, 0, 3, sCard2Gfx, sCard2Map, gCard3Pal},
|
||||
{1, 0, 0, 4, sCard2Gfx, sCard2Map, gCard4Pal},
|
||||
{1, 0, 0, 5, sCard2Gfx, sCard2Map, gCard5Pal},
|
||||
{1, 0, 0, 6, sCard6Gfx, sCard6Map, sCard6Pal},
|
||||
{1, 0, 0, 7, sCard7Gfx, sCard7Map, sCard7Pal}
|
||||
};
|
||||
|
||||
bool32 InitWonderCardResources(struct WonderCard * card, struct WonderCardMetadata * b3430sub)
|
||||
{
|
||||
if (card == NULL || b3430sub == NULL)
|
||||
return FALSE;
|
||||
sMEventScreenData = AllocZeroed(sizeof(struct MEventScreenMgr));
|
||||
if (sMEventScreenData == NULL)
|
||||
return FALSE;
|
||||
sMEventScreenData->wonderCard = *card;
|
||||
sMEventScreenData->buff3430Sub = *b3430sub;
|
||||
if (sMEventScreenData->wonderCard.bgType >= NELEMS(sCardGfxPtrs))
|
||||
sMEventScreenData->wonderCard.bgType = 0;
|
||||
if (sMEventScreenData->wonderCard.type >= NELEMS(sTextYCoords))
|
||||
sMEventScreenData->wonderCard.type = 0;
|
||||
if (sMEventScreenData->wonderCard.maxStamps > NELEMS(sMEventScreenData->cardIconAndShadowSprites))
|
||||
sMEventScreenData->wonderCard.maxStamps = 0;
|
||||
sMEventScreenData->bgSpec = &sCardGfxPtrs[sMEventScreenData->wonderCard.bgType];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void DestroyWonderCardResources(void)
|
||||
{
|
||||
if (sMEventScreenData != NULL)
|
||||
{
|
||||
*sMEventScreenData = (struct MEventScreenMgr){};
|
||||
Free(sMEventScreenData);
|
||||
sMEventScreenData = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 FadeToWonderCardMenu(void)
|
||||
{
|
||||
if (sMEventScreenData == NULL)
|
||||
return -1;
|
||||
switch(sMEventScreenData->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
DecompressAndCopyTileDataToVram(2, sMEventScreenData->bgSpec->tiles, 0, 0x008, 0);
|
||||
sMEventScreenData->windowIds[0] = AddWindow(&sWindowTemplates[0]);
|
||||
sMEventScreenData->windowIds[1] = AddWindow(&sWindowTemplates[1]);
|
||||
sMEventScreenData->windowIds[2] = AddWindow(&sWindowTemplates[2]);
|
||||
break;
|
||||
case 3:
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return 0;
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(sMEventScreenData->bgSpec->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(sMEventScreenData->bgSpec->map, sMEventScreenData->buffer_045C);
|
||||
CopyRectToBgTilemapBufferRect(2, sMEventScreenData->buffer_045C, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 4:
|
||||
sub_8145A98();
|
||||
break;
|
||||
case 5:
|
||||
sub_8145D18(0);
|
||||
sub_8145D18(1);
|
||||
sub_8145D18(2);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
break;
|
||||
case 6:
|
||||
LoadMonIconPalettes();
|
||||
break;
|
||||
case 7:
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sub_8146060();
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sMEventScreenData->state = 0;
|
||||
return 1;
|
||||
}
|
||||
++sMEventScreenData->state;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 FadeOutFromWonderCard(bool32 flag)
|
||||
{
|
||||
if (sMEventScreenData == NULL)
|
||||
return -1;
|
||||
switch (sMEventScreenData->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(sMEventScreenData->windowIds[2]);
|
||||
RemoveWindow(sMEventScreenData->windowIds[1]);
|
||||
RemoveWindow(sMEventScreenData->windowIds[0]);
|
||||
break;
|
||||
case 4:
|
||||
sub_81461D8();
|
||||
FreeMonIconPalettes();
|
||||
break;
|
||||
case 5:
|
||||
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
|
||||
break;
|
||||
case 6:
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sMEventScreenData->state = 0;
|
||||
return 1;
|
||||
}
|
||||
++sMEventScreenData->state;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void sub_8145A98(void)
|
||||
{
|
||||
u16 i = 0;
|
||||
u16 r6;
|
||||
u16 sp0[3] = {0, 0, 0};
|
||||
|
||||
memcpy(sMEventScreenData->title, sMEventScreenData->wonderCard.titleText, 40);
|
||||
sMEventScreenData->title[40] = EOS;
|
||||
memcpy(sMEventScreenData->subtitle, sMEventScreenData->wonderCard.subtitleText, 40);
|
||||
sMEventScreenData->subtitle[40] = EOS;
|
||||
if (sMEventScreenData->wonderCard.idNumber > 999999)
|
||||
sMEventScreenData->wonderCard.idNumber = 999999;
|
||||
ConvertIntToDecimalStringN(sMEventScreenData->unk_01DD, sMEventScreenData->wonderCard.idNumber, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
memcpy(sMEventScreenData->mainMessageLines[i], sMEventScreenData->wonderCard.bodyText[i], 40);
|
||||
sMEventScreenData->mainMessageLines[i][40] = EOS;
|
||||
}
|
||||
memcpy(sMEventScreenData->instructionsLine1, sMEventScreenData->wonderCard.footerLine1Text, 40);
|
||||
sMEventScreenData->instructionsLine1[40] = EOS;
|
||||
switch (sMEventScreenData->wonderCard.type)
|
||||
{
|
||||
case 0:
|
||||
memcpy(sMEventScreenData->instructionsLine2, sMEventScreenData->wonderCard.footerLine2Text, 40);
|
||||
sMEventScreenData->instructionsLine2[40] = EOS;
|
||||
break;
|
||||
case 1:
|
||||
sMEventScreenData->instructionsLine2[00] = EOS;
|
||||
break;
|
||||
case 2:
|
||||
sMEventScreenData->instructionsLine2[00] = EOS;
|
||||
sp0[0] = sMEventScreenData->buff3430Sub.battlesWon < 999 ? sMEventScreenData->buff3430Sub.battlesWon : 999;
|
||||
sp0[1] = sMEventScreenData->buff3430Sub.battlesLost < 999 ? sMEventScreenData->buff3430Sub.battlesLost : 999;
|
||||
sp0[2] = sMEventScreenData->buff3430Sub.numTrades < 999 ? sMEventScreenData->buff3430Sub.numTrades : 999;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
memset(sMEventScreenData->recordStrings[i].numberTxt, EOS, 4);
|
||||
memset(sMEventScreenData->recordStrings[i].nameTxt, EOS, 41);
|
||||
}
|
||||
for (i = 0, r6 = 0; i < 40; i++)
|
||||
{
|
||||
if (sMEventScreenData->wonderCard.footerLine2Text[i] != CHAR_DYNAMIC_PLACEHOLDER)
|
||||
{
|
||||
sMEventScreenData->recordStrings[sMEventScreenData->recordIdx].nameTxt[r6] = sMEventScreenData->wonderCard.footerLine2Text[i];
|
||||
r6++;
|
||||
}
|
||||
else
|
||||
{
|
||||
u8 r3 = sMEventScreenData->wonderCard.footerLine2Text[i + 1];
|
||||
if (r3 > 2)
|
||||
{
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ConvertIntToDecimalStringN(sMEventScreenData->recordStrings[sMEventScreenData->recordIdx].numberTxt, sp0[r3], STR_CONV_MODE_LEADING_ZEROS, 3);
|
||||
sMEventScreenData->recordStrings[sMEventScreenData->recordIdx].nDigits = sMEventScreenData->wonderCard.footerLine2Text[i + 2];
|
||||
sMEventScreenData->recordIdx++;
|
||||
if (sMEventScreenData->recordIdx > 7)
|
||||
break;
|
||||
r6 = 0;
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8145D18(u8 whichWindow)
|
||||
{
|
||||
s8 sp0C = 0;
|
||||
s32 windowId = sMEventScreenData->windowIds[whichWindow];
|
||||
PutWindowTilemap(windowId);
|
||||
FillWindowPixelBuffer(windowId, 0);
|
||||
switch (whichWindow)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
s32 x;
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0, 1, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->title);
|
||||
x = 160 - GetStringWidth(FONT_3, sMEventScreenData->subtitle, GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING));
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, x, 17, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->subtitle);
|
||||
if (sMEventScreenData->wonderCard.idNumber != 0)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, FONT_2, 166, 17, gUnknown_8467068[sMEventScreenData->bgSpec->textPal1], 0, sMEventScreenData->unk_01DD);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
for (; sp0C < 4; sp0C++)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0, 16 * sp0C + 2, gUnknown_8467068[sMEventScreenData->bgSpec->textPal2], 0, sMEventScreenData->mainMessageLines[sp0C]);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0, sTextYCoords[sMEventScreenData->wonderCard.type], gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->instructionsLine1);
|
||||
if (sMEventScreenData->wonderCard.type != 2)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0, 16 + sTextYCoords[sMEventScreenData->wonderCard.type], gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->instructionsLine2);
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 x = 0;
|
||||
s32 y = sTextYCoords[sMEventScreenData->wonderCard.type] + 16;
|
||||
s32 spacing = GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING);
|
||||
for (; sp0C < sMEventScreenData->recordIdx; sp0C++)
|
||||
{
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, x, y, gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->recordStrings[sp0C].nameTxt);
|
||||
if (sMEventScreenData->recordStrings[sp0C].numberTxt[0] != EOS)
|
||||
{
|
||||
x += GetStringWidth(FONT_3, sMEventScreenData->recordStrings[sp0C].nameTxt, spacing);
|
||||
AddTextPrinterParameterized3(windowId, FONT_2, x, y, gUnknown_8467068[sMEventScreenData->bgSpec->textPal3], 0, sMEventScreenData->recordStrings[sp0C].numberTxt);
|
||||
x += GetStringWidth(FONT_3, sMEventScreenData->recordStrings[sp0C].numberTxt, spacing) + sMEventScreenData->recordStrings[sp0C].nDigits;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
CopyWindowToVram(windowId, COPYWIN_FULL);
|
||||
}
|
||||
|
||||
static void sub_8146060(void)
|
||||
{
|
||||
u8 r7 = 0;
|
||||
sMEventScreenData->monIconId = 0xFF;
|
||||
if (sMEventScreenData->buff3430Sub.iconSpecies != SPECIES_NONE)
|
||||
{
|
||||
sMEventScreenData->monIconId = CreateMonIcon_HandleDeoxys(MailSpeciesToIconSpecies(sMEventScreenData->buff3430Sub.iconSpecies), SpriteCallbackDummy, 0xDC, 0x14, 0, FALSE);
|
||||
gSprites[sMEventScreenData->monIconId].oam.priority = 2;
|
||||
}
|
||||
if (sMEventScreenData->wonderCard.maxStamps != 0 && sMEventScreenData->wonderCard.type == 1)
|
||||
{
|
||||
LoadCompressedSpriteSheetUsingHeap(&sShadowSpriteSheet);
|
||||
LoadSpritePalette(&sShadowSpritePalettes[sMEventScreenData->bgSpec->index]);
|
||||
for (; r7 < sMEventScreenData->wonderCard.maxStamps; r7++)
|
||||
{
|
||||
sMEventScreenData->cardIconAndShadowSprites[r7][0] = 0xFF;
|
||||
sMEventScreenData->cardIconAndShadowSprites[r7][1] = 0xFF;
|
||||
sMEventScreenData->cardIconAndShadowSprites[r7][0] = CreateSprite(&sShadowSpriteTemplate, 0xd8 - 32 * r7, 0x90, 8);
|
||||
if (sMEventScreenData->buff3430Sub.stampData[0][r7] != 0)
|
||||
{
|
||||
sMEventScreenData->cardIconAndShadowSprites[r7][1] = CreateMonIcon_HandleDeoxys(MailSpeciesToIconSpecies(sMEventScreenData->buff3430Sub.stampData[0][r7]), SpriteCallbackDummy, 0xd8 - 32 * r7, 0x88, 0, 0);
|
||||
gSprites[sMEventScreenData->cardIconAndShadowSprites[r7][1]].oam.priority = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_81461D8(void)
|
||||
{
|
||||
u8 r6 = 0;
|
||||
if (sMEventScreenData->monIconId != 0xFF)
|
||||
DestroyMonIcon(&gSprites[sMEventScreenData->monIconId]);
|
||||
if (sMEventScreenData->wonderCard.maxStamps != 0 && sMEventScreenData->wonderCard.type == 1)
|
||||
{
|
||||
for (; r6 < sMEventScreenData->wonderCard.maxStamps; r6++)
|
||||
{
|
||||
if (sMEventScreenData->cardIconAndShadowSprites[r6][0] != 0xFF)
|
||||
{
|
||||
DestroySprite(&gSprites[sMEventScreenData->cardIconAndShadowSprites[r6][0]]);
|
||||
// This might be a typo. Uncomment the next line, and comment the one that follows, to get the presumed intended behavior.
|
||||
// if (sMEventScreenData->cardIconAndShadowSprites[r6][1] != 0xFF)
|
||||
if (sMEventScreenData->cardIconAndShadowSprites[r6][0] != 0xFF)
|
||||
{
|
||||
DestroyMonIcon(&gSprites[sMEventScreenData->cardIconAndShadowSprites[r6][1]]);
|
||||
}
|
||||
}
|
||||
}
|
||||
FreeSpriteTilesByTag(0x8000);
|
||||
FreeSpritePaletteByTag(0x8000);
|
||||
}
|
||||
}
|
||||
@@ -1,357 +0,0 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "menu_indicators.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "mevent.h"
|
||||
#include "mystery_gift_menu.h"
|
||||
#include "menu.h"
|
||||
#include "link_rfu.h"
|
||||
|
||||
struct UnkStruct_203F3CC
|
||||
{
|
||||
/*0000*/ struct WonderNews wonderNews;
|
||||
/*01bc*/ const struct UnkStruct_8467FB8 * bgSpec;
|
||||
/*01c0*/ u8 verticalScrollDisabled:1;
|
||||
u8 state:7;
|
||||
/*01c1*/ u8 menuIndicatorsId;
|
||||
/*01c2*/ u8 unk_01C2_0:1;
|
||||
u8 unk_01C2_1:7;
|
||||
/*01c3*/ u8 scrollDirection:1;
|
||||
u8 unk_01C3_1:7;
|
||||
/*01c4*/ u16 numMails;
|
||||
/*01c6*/ u16 scrollOffset;
|
||||
/*01c8*/ u16 windowIds[2];
|
||||
/*01cc*/ u8 filler_01CC[2];
|
||||
/*01ce*/ u8 title[41];
|
||||
/*01f7*/ u8 messages[10][41];
|
||||
/*0394*/ struct ScrollArrowsTemplate scrollArrowsTemplate;
|
||||
/*03a4*/ u8 buffer_03A4[0x1000];
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct UnkStruct_203F3CC * sWork = NULL;
|
||||
|
||||
static void sub_8146980(void);
|
||||
static void sub_8146A30(void);
|
||||
static void sub_8146B58(void);
|
||||
|
||||
static const u8 sTextPals[][3] = {
|
||||
{0, 2, 3},
|
||||
{0, 1, 2}
|
||||
};
|
||||
static const struct WindowTemplate gUnknown_8468040[] = {
|
||||
{0, 1, 0, 28, 3, 15, 0x000},
|
||||
{2, 1, 3, 28, 20, 15, 0x000}
|
||||
};
|
||||
static const struct ScrollArrowsTemplate sScrollArrowsTemplate = {
|
||||
0x02, 0xe8, 0x18, 0x03, 0xe8, 0x98,
|
||||
0x0000, 0x0002, 0x1000, 0x1000, 0x0,
|
||||
};
|
||||
|
||||
static const u16 sNews1Pal[] = INCBIN_U16("graphics/mevent/pal_468060.gbapal");
|
||||
static const u16 sNews6Pal[] = INCBIN_U16("graphics/mevent/pal_468080.gbapal");
|
||||
static const u16 sNews7Pal[] = INCBIN_U16("graphics/mevent/pal_4680A0.gbapal");
|
||||
static const u8 sNews0Gfx[] = INCBIN_U8("graphics/mevent/gfx_4680C0.4bpp.lz");
|
||||
static const u8 sNews0Map[] = INCBIN_U8("graphics/mevent/tilemap_468140.bin.lz");
|
||||
static const u8 sNews1Gfx[] = INCBIN_U8("graphics/mevent/gfx_46821C.4bpp.lz");
|
||||
static const u8 sNews1Map[] = INCBIN_U8("graphics/mevent/tilemap_46824C.bin.lz");
|
||||
static const u8 sNews2Gfx[] = INCBIN_U8("graphics/mevent/gfx_46830C.4bpp.lz");
|
||||
static const u8 sNews2Map[] = INCBIN_U8("graphics/mevent/tilemap_46837C.bin.lz");
|
||||
static const u8 sNews6Gfx[] = INCBIN_U8("graphics/mevent/gfx_468448.4bpp.lz");
|
||||
static const u8 sNews6Map[] = INCBIN_U8("graphics/mevent/tilemap_4684D8.bin.lz");
|
||||
static const u8 sNews7Gfx[] = INCBIN_U8("graphics/mevent/gfx_4685B4.4bpp.lz");
|
||||
static const u8 sNews7Map[] = INCBIN_U8("graphics/mevent/tilemap_468644.bin.lz");
|
||||
|
||||
static const struct UnkStruct_8467FB8 sBgSpecs[] = {
|
||||
{1, 0, 0, 0, sNews0Gfx, sNews0Map, sNews1Pal},
|
||||
{1, 0, 0, 0, sNews1Gfx, sNews1Map, gCard1Pal},
|
||||
{1, 0, 0, 0, sNews2Gfx, sNews2Map, gCard2Pal},
|
||||
{1, 0, 0, 0, sNews2Gfx, sNews2Map, gCard3Pal},
|
||||
{1, 0, 0, 0, sNews2Gfx, sNews2Map, gCard4Pal},
|
||||
{1, 0, 0, 0, sNews2Gfx, sNews2Map, gCard5Pal},
|
||||
{1, 0, 0, 0, sNews6Gfx, sNews6Map, sNews6Pal},
|
||||
{1, 0, 0, 0, sNews7Gfx, sNews7Map, sNews7Pal}
|
||||
};
|
||||
|
||||
bool32 InitWonderNewsResources(const struct WonderNews * news)
|
||||
{
|
||||
if (news == NULL)
|
||||
return FALSE;
|
||||
sWork = AllocZeroed(sizeof(struct UnkStruct_203F3CC));
|
||||
if (sWork == NULL)
|
||||
return FALSE;
|
||||
sWork->wonderNews = *news;
|
||||
if (sWork->wonderNews.bgType >= NELEMS(sBgSpecs))
|
||||
sWork->wonderNews.bgType = 0;
|
||||
sWork->bgSpec = &sBgSpecs[sWork->wonderNews.bgType];
|
||||
sWork->menuIndicatorsId = 0xFF;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void DestroyWonderNewsResources(void)
|
||||
{
|
||||
if (sWork != NULL)
|
||||
{
|
||||
*sWork = (struct UnkStruct_203F3CC){};
|
||||
Free(sWork);
|
||||
sWork = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
s32 FadeToWonderNewsMenu(void)
|
||||
{
|
||||
if (sWork == NULL)
|
||||
return -1;
|
||||
|
||||
switch (sWork->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
ChangeBgY(0, 0, 0);
|
||||
ChangeBgY(1, 0, 0);
|
||||
ChangeBgY(2, 0, 0);
|
||||
ChangeBgY(3, 0, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, 240));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(26, 152));
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ);
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
DecompressAndCopyTileDataToVram(3, sWork->bgSpec->tiles, 0, 8, 0);
|
||||
sWork->windowIds[0] = AddWindow(&gUnknown_8468040[0]);
|
||||
sWork->windowIds[1] = AddWindow(&gUnknown_8468040[1]);
|
||||
break;
|
||||
case 3:
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return 0;
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(sWork->bgSpec->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(sWork->bgSpec->map, sWork->buffer_03A4);
|
||||
CopyRectToBgTilemapBufferRect(1, sWork->buffer_03A4, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0);
|
||||
CopyRectToBgTilemapBufferRect(3, sWork->buffer_03A4, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
break;
|
||||
case 4:
|
||||
sub_8146980();
|
||||
break;
|
||||
case 5:
|
||||
sub_8146A30();
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 6:
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
ShowBg(3);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sWork->menuIndicatorsId = AddScrollIndicatorArrowPair(&sWork->scrollArrowsTemplate, &sWork->scrollOffset);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sWork->state = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
++sWork->state;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 FadeOutFromWonderNews(bool32 flag)
|
||||
{
|
||||
if (sWork == NULL)
|
||||
return -1;
|
||||
switch (sWork->state)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
ChangeBgY(2, 0, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 24);
|
||||
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 24);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
break;
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(sWork->windowIds[1]);
|
||||
RemoveWindow(sWork->windowIds[0]);
|
||||
break;
|
||||
case 4:
|
||||
ChangeBgY(2, 0, 0);
|
||||
ChangeBgY(3, 0, 0);
|
||||
if (sWork->menuIndicatorsId != 0xFF)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(sWork->menuIndicatorsId);
|
||||
sWork->menuIndicatorsId = 0xFF;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, flag);
|
||||
break;
|
||||
case 6:
|
||||
MG_DrawCheckerboardPattern();
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sWork->state = 0;
|
||||
return 1;
|
||||
}
|
||||
++sWork->state;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void MENews_RemoveScrollIndicatorArrowPair(void)
|
||||
{
|
||||
if (!sWork->verticalScrollDisabled && sWork->menuIndicatorsId != 0xFF)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(sWork->menuIndicatorsId);
|
||||
sWork->menuIndicatorsId = 0xFF;
|
||||
sWork->verticalScrollDisabled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MENews_AddScrollIndicatorArrowPair(void)
|
||||
{
|
||||
if (sWork->verticalScrollDisabled)
|
||||
{
|
||||
sWork->menuIndicatorsId = AddScrollIndicatorArrowPair(&sWork->scrollArrowsTemplate, &sWork->scrollOffset);
|
||||
sWork->verticalScrollDisabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
u32 MENews_GetInput(u16 input)
|
||||
{
|
||||
if (sWork->unk_01C2_0)
|
||||
{
|
||||
sub_8146B58();
|
||||
return 0xFF;
|
||||
}
|
||||
switch (input)
|
||||
{
|
||||
case A_BUTTON:
|
||||
return 0;
|
||||
case B_BUTTON:
|
||||
return 1;
|
||||
case DPAD_UP:
|
||||
if (sWork->scrollOffset == 0)
|
||||
return 0xFF;
|
||||
if (sWork->verticalScrollDisabled)
|
||||
return 0xFF;
|
||||
sWork->scrollDirection = FALSE;
|
||||
break;
|
||||
case DPAD_DOWN:
|
||||
if (sWork->scrollOffset == sWork->numMails)
|
||||
return 0xFF;
|
||||
if (sWork->verticalScrollDisabled)
|
||||
return 0xFF;
|
||||
sWork->scrollDirection = TRUE;
|
||||
break;
|
||||
default:
|
||||
return 0xFF;
|
||||
}
|
||||
sWork->unk_01C2_0 = TRUE;
|
||||
sWork->unk_01C2_1 = 2;
|
||||
sWork->unk_01C3_1 = 0;
|
||||
if (sWork->scrollDirection == FALSE)
|
||||
return 2;
|
||||
else
|
||||
return 3;
|
||||
}
|
||||
|
||||
static void sub_8146980(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
memcpy(sWork->title, sWork->wonderNews.titleText, 40);
|
||||
sWork->title[40] = EOS;
|
||||
for (; i < 10; ++i)
|
||||
{
|
||||
memcpy(sWork->messages[i], sWork->wonderNews.bodyText[i], 40);
|
||||
sWork->messages[i][40] = EOS;
|
||||
if (i > 7 && sWork->messages[i][0] != EOS)
|
||||
++sWork->numMails;
|
||||
}
|
||||
sWork->scrollArrowsTemplate = sScrollArrowsTemplate;
|
||||
sWork->scrollArrowsTemplate.fullyDownThreshold = sWork->numMails;
|
||||
}
|
||||
|
||||
static void sub_8146A30(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
s32 x;
|
||||
PutWindowTilemap(sWork->windowIds[0]);
|
||||
PutWindowTilemap(sWork->windowIds[1]);
|
||||
FillWindowPixelBuffer(sWork->windowIds[0], 0);
|
||||
FillWindowPixelBuffer(sWork->windowIds[1], 0);
|
||||
x = (0xe0 - GetStringWidth(FONT_3, sWork->title, GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING))) / 2;
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(sWork->windowIds[0], FONT_3, x, 6, sTextPals[sWork->bgSpec->textPal1], 0, sWork->title);
|
||||
for (; i < 10; ++i)
|
||||
{
|
||||
AddTextPrinterParameterized3(sWork->windowIds[1], FONT_3, 0, 16 * i + 2, sTextPals[sWork->bgSpec->textPal2], 0, sWork->messages[i]);
|
||||
}
|
||||
CopyWindowToVram(sWork->windowIds[0], COPYWIN_FULL);
|
||||
CopyWindowToVram(sWork->windowIds[1], COPYWIN_FULL);
|
||||
}
|
||||
|
||||
static void sub_8146B58(void)
|
||||
{
|
||||
u16 r4 = sWork->unk_01C2_1;
|
||||
r4 <<= 8;
|
||||
if (sWork->scrollDirection)
|
||||
{
|
||||
ChangeBgY(2, r4, 1);
|
||||
ChangeBgY(3, r4, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeBgY(2, r4, 2);
|
||||
ChangeBgY(3, r4, 2);
|
||||
}
|
||||
sWork->unk_01C3_1 += sWork->unk_01C2_1;
|
||||
if (sWork->unk_01C3_1 > 15)
|
||||
{
|
||||
if (sWork->scrollDirection)
|
||||
++sWork->scrollOffset;
|
||||
else
|
||||
--sWork->scrollOffset;
|
||||
sWork->unk_01C2_0 = FALSE;
|
||||
sWork->unk_01C3_1 = 0;
|
||||
}
|
||||
}
|
||||
+5
-5
@@ -17,9 +17,9 @@ static void SpriteCB_Marking(struct Sprite *);
|
||||
static void SpriteCB_Cursor(struct Sprite *);
|
||||
static struct Sprite *CreateMarkingComboSprite(u16, u16, const u16 *, u16);
|
||||
|
||||
static const u16 sMonMarkingsPal[] = INCBIN_U16("graphics/misc/mon_markings.gbapal");
|
||||
static const u16 sMonMarkings_Pal[] = INCBIN_U16("graphics/misc/mon_markings.gbapal");
|
||||
static const u16 sMonMarkings_Gfx[] = INCBIN_U16("graphics/misc/mon_markings.4bpp");
|
||||
static const u8 sUnref_83EE828[] = {0x09, 0x50, 0x13, 0x02, 0xFF};
|
||||
static const u8 sUnused[] = {0x09, 0x50, 0x13, 0x02, 0xFF};
|
||||
|
||||
static const struct OamData sOamData_MenuWindow =
|
||||
{
|
||||
@@ -290,7 +290,7 @@ void InitMonMarkingsMenu(struct MonMarkingsMenu *ptr)
|
||||
|
||||
static void BufferMenuWindowTiles(void)
|
||||
{
|
||||
const struct TextWindowGraphics *frame = GetWindowFrameTilesPal(gSaveBlock2Ptr->optionsWindowFrameType);
|
||||
const struct TextWindowGraphics *frame = GetUserWindowGraphics(gSaveBlock2Ptr->optionsWindowFrameType);
|
||||
sMenu->frameTiles = frame->tiles;
|
||||
sMenu->framePalette = frame->palette;
|
||||
sMenu->tileLoadState = 0;
|
||||
@@ -558,7 +558,7 @@ static void SpriteCB_Cursor(struct Sprite *sprite)
|
||||
struct Sprite *CreateMonMarkingAllCombosSprite(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
{
|
||||
if (palette == NULL)
|
||||
palette = sMonMarkingsPal;
|
||||
palette = sMonMarkings_Pal;
|
||||
return CreateMarkingComboSprite(tileTag, paletteTag, palette, 1 << NUM_MON_MARKINGS);
|
||||
}
|
||||
|
||||
@@ -566,7 +566,7 @@ struct Sprite *CreateMonMarkingAllCombosSprite(u16 tileTag, u16 paletteTag, cons
|
||||
struct Sprite *CreateMonMarkingComboSprite(u16 tileTag, u16 paletteTag, const u16 *palette)
|
||||
{
|
||||
if (palette == NULL)
|
||||
palette = sMonMarkingsPal;
|
||||
palette = sMonMarkings_Pal;
|
||||
return CreateMarkingComboSprite(tileTag, paletteTag, palette, 1);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -124,7 +124,7 @@ void DrawMoneyBox(int amount, u8 x, u8 y)
|
||||
sMoneyBoxWindowId = AddWindow(&template);
|
||||
FillWindowPixelBuffer(sMoneyBoxWindowId, 0);
|
||||
PutWindowTilemap(sMoneyBoxWindowId);
|
||||
TextWindow_SetStdFrame0_WithPal(sMoneyBoxWindowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(sMoneyBoxWindowId, 0x21D, 0xD0);
|
||||
PrintMoneyAmountInMoneyBoxWithBorder(sMoneyBoxWindowId, 0x21D, 13, amount);
|
||||
}
|
||||
|
||||
|
||||
+17
-17
@@ -333,7 +333,7 @@ const struct ListMenuTemplate sListMenu_Receive = {
|
||||
.cursorKind = 0
|
||||
};
|
||||
|
||||
const u8 *const Unref_08366ED8[] = {
|
||||
static const u8 *const sUnusedMenuTexts[] = {
|
||||
gText_VarietyOfEventsImportedWireless,
|
||||
gText_WonderCardsInPossession,
|
||||
gText_ReadNewsThatArrived,
|
||||
@@ -344,8 +344,8 @@ ALIGNED(4) const u8 sMG_Ereader_TextColor_1[3] = { 0, 1, 2 };
|
||||
ALIGNED(4) const u8 sMG_Ereader_TextColor_1_Copy[3] = { 0, 1, 2 };
|
||||
ALIGNED(4) const u8 sMG_Ereader_TextColor_2[3] = { 1, 2, 3 };
|
||||
|
||||
const u8 gUnknown_8466EF3[] = _("テスト");
|
||||
const u8 gUnknown_8466EF7[] = _("むげんのチケット");
|
||||
static const u8 sText_Test[] = _("テスト");
|
||||
static const u8 sText_EonTicket[] = _("むげんのチケット");
|
||||
|
||||
void vblankcb_mystery_gift_e_reader_run(void)
|
||||
{
|
||||
@@ -390,8 +390,8 @@ bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader)
|
||||
SetBgTilemapBuffer(1, Alloc(0x800));
|
||||
SetBgTilemapBuffer(0, Alloc(0x800));
|
||||
|
||||
LoadUserWindowBorderGfx(0, 10, 0xE0);
|
||||
DrawWindowBorderWithStdpal3(0, 1, 0xF0);
|
||||
LoadUserWindowGfx2(0, 10, 0xE0);
|
||||
LoadStdWindowGfxOnBg(0, 1, 0xF0);
|
||||
DecompressAndLoadBgGfxUsingHeap(3, gUnkTextboxBorderGfx, 0x100, 0, 0);
|
||||
InitWindows(sMainWindows);
|
||||
DeactivateAllTextPrinters();
|
||||
@@ -403,7 +403,7 @@ bool32 HandleMysteryGiftOrEReaderSetup(s32 mg_or_ereader)
|
||||
break;
|
||||
case 1:
|
||||
LoadPalette(gUnkTextboxBorderPal, 0, 0x20);
|
||||
LoadPalette(stdpal_get(2), 0xd0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(2), 0xd0, 0x20);
|
||||
FillBgTilemapBufferRect(0, 0x000, 0, 0, 32, 32, 0x11);
|
||||
FillBgTilemapBufferRect(1, 0x000, 0, 0, 32, 32, 0x11);
|
||||
FillBgTilemapBufferRect(2, 0x000, 0, 0, 32, 32, 0x11);
|
||||
@@ -802,18 +802,18 @@ bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews)
|
||||
case 0:
|
||||
if (cardOrNews == 0)
|
||||
{
|
||||
InitWonderCardResources(GetSavedWonderCard(), sav1_get_mevent_buffer_2());
|
||||
WonderCard_Init(GetSavedWonderCard(), sav1_get_mevent_buffer_2());
|
||||
}
|
||||
else
|
||||
{
|
||||
InitWonderNewsResources(GetSavedWonderNews());
|
||||
WonderNews_Init(GetSavedWonderNews());
|
||||
}
|
||||
(*state)++;
|
||||
break;
|
||||
case 1:
|
||||
if (cardOrNews == 0)
|
||||
{
|
||||
v0 = FadeToWonderCardMenu();
|
||||
v0 = WonderCard_Enter();
|
||||
check:
|
||||
if (v0 != 0)
|
||||
{
|
||||
@@ -823,7 +823,7 @@ bool32 HandleLoadWonderCardOrNews(u8 * state, bool32 cardOrNews)
|
||||
}
|
||||
else
|
||||
{
|
||||
v0 = FadeToWonderNewsMenu();
|
||||
v0 = WonderNews_Enter();
|
||||
goto check;
|
||||
}
|
||||
done:
|
||||
@@ -851,9 +851,9 @@ bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1)
|
||||
{
|
||||
if (cardOrNews == 0)
|
||||
{
|
||||
if (FadeOutFromWonderCard(arg1) != 0)
|
||||
if (WonderCard_Exit(arg1) != 0)
|
||||
{
|
||||
DestroyWonderCardResources();
|
||||
WonderCard_Destroy();
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
@@ -863,9 +863,9 @@ bool32 TearDownCardOrNews_ReturnToTopMenu(bool32 cardOrNews, bool32 arg1)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (FadeOutFromWonderNews(arg1) != 0)
|
||||
if (WonderNews_Exit(arg1) != 0)
|
||||
{
|
||||
DestroyWonderNewsResources();
|
||||
WonderNews_Destroy();
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
@@ -1456,10 +1456,10 @@ void task00_mystery_gift(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (MENews_GetInput(gMain.newKeys))
|
||||
switch (WonderNews_GetInput(gMain.newKeys))
|
||||
{
|
||||
case 0:
|
||||
MENews_RemoveScrollIndicatorArrowPair();
|
||||
WonderNews_RemoveScrollIndicatorArrowPair();
|
||||
data->state = 21;
|
||||
break;
|
||||
case 1:
|
||||
@@ -1507,7 +1507,7 @@ void task00_mystery_gift(u8 taskId)
|
||||
case -2u:
|
||||
if (data->IsCardOrNews == 1)
|
||||
{
|
||||
MENews_AddScrollIndicatorArrowPair();
|
||||
WonderNews_AddScrollIndicatorArrowPair();
|
||||
}
|
||||
data->state = 20;
|
||||
break;
|
||||
|
||||
@@ -0,0 +1,518 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "decompress.h"
|
||||
#include "menu.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "pokemon_icon.h"
|
||||
#include "mystery_gift_menu.h"
|
||||
#include "mevent.h"
|
||||
#include "battle_anim.h"
|
||||
#include "constants/mystery_gift.h"
|
||||
|
||||
enum {
|
||||
WIN_HEADER,
|
||||
WIN_BODY,
|
||||
WIN_FOOTER,
|
||||
WIN_COUNT
|
||||
};
|
||||
|
||||
#define TAG_STAMP_SHADOW 0x8000
|
||||
|
||||
struct CardStatTextData
|
||||
{
|
||||
u8 width;
|
||||
u8 statText[WONDER_CARD_TEXT_LENGTH + 1];
|
||||
u8 statNumberText[4];
|
||||
};
|
||||
|
||||
struct WonderCardData
|
||||
{
|
||||
/*0000*/ struct WonderCard card;
|
||||
/*014c*/ struct WonderCardMetadata cardMetadata;
|
||||
/*0170*/ const struct WonderGraphics * gfx;
|
||||
/*0174*/ u8 enterExitState;
|
||||
/*0175*/ u8 recordIdx;
|
||||
/*0176*/ u16 windowIds[WIN_COUNT];
|
||||
/*017C*/ u8 monIconSpriteId;
|
||||
/*017D*/ u8 stampSpriteIds[MAX_STAMP_CARD_STAMPS][2]; // 2 sprites each, 1 for the shadow and 1 for the Pokémon
|
||||
/*018B*/ u8 titleText[WONDER_CARD_TEXT_LENGTH + 1];
|
||||
/*01B4*/ u8 subtitleText[WONDER_CARD_TEXT_LENGTH + 1];
|
||||
/*01DD*/ u8 idNumberText[7];
|
||||
/*01E4*/ u8 bodyText[WONDER_CARD_BODY_TEXT_LINES][WONDER_CARD_TEXT_LENGTH + 1];
|
||||
/*0288*/ u8 footerLine1Text[WONDER_CARD_TEXT_LENGTH + 1];
|
||||
/*02B1*/ u8 footerLine2Text[WONDER_CARD_TEXT_LENGTH + 1];
|
||||
/*02DC*/ struct CardStatTextData statTextData[8];
|
||||
/*045C*/ u8 bgTilemapBuffer[0x1000];
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct WonderCardData * sWonderCardData = NULL;
|
||||
|
||||
static void BufferCardText(void);
|
||||
static void DrawCardWindow(u8 whichWindow);
|
||||
static void CreateCardSprites(void);
|
||||
static void DestroyCardSprites(void);
|
||||
|
||||
static const u8 sTextColorTable[][3] = {
|
||||
{0, 2, 3},
|
||||
{0, 1, 2}
|
||||
};
|
||||
|
||||
static const u8 ALIGNED(4) sFooterTextOffsets[CARD_TYPE_COUNT] =
|
||||
{
|
||||
[CARD_TYPE_GIFT] = 7,
|
||||
[CARD_TYPE_STAMP] = 4,
|
||||
[CARD_TYPE_LINK_STAT] = 7
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sWindowTemplates[] = {
|
||||
[WIN_HEADER] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 1,
|
||||
.width = 25,
|
||||
.height = 4,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x29c
|
||||
},
|
||||
[WIN_BODY] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 6,
|
||||
.width = 28,
|
||||
.height = 8,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x1bc
|
||||
},
|
||||
[WIN_FOOTER] = {
|
||||
.bg = 1,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 14,
|
||||
.width = 28,
|
||||
.height = 5,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x130
|
||||
}
|
||||
};
|
||||
|
||||
static const u16 sCard0Pal[] = INCBIN_U16("graphics/wonder_card/bg0.gbapal");
|
||||
const u16 gCard1Pal[] = INCBIN_U16("graphics/wonder_card/bg1.gbapal");
|
||||
const u16 gCard2Pal[] = INCBIN_U16("graphics/wonder_card/bg2.gbapal");
|
||||
const u16 gCard3Pal[] = INCBIN_U16("graphics/wonder_card/bg3.gbapal");
|
||||
const u16 gCard4Pal[] = INCBIN_U16("graphics/wonder_card/bg4.gbapal");
|
||||
const u16 gCard5Pal[] = INCBIN_U16("graphics/wonder_card/bg5.gbapal");
|
||||
static const u16 sCard6Pal[] = INCBIN_U16("graphics/wonder_card/bg6.gbapal");
|
||||
static const u16 sCard7Pal[] = INCBIN_U16("graphics/wonder_card/bg7.gbapal");
|
||||
static const u8 sCard0Gfx[] = INCBIN_U8("graphics/wonder_card/bg0.4bpp.lz");
|
||||
static const u8 sCard0Map[] = INCBIN_U8("graphics/wonder_card/bg0.bin.lz");
|
||||
static const u8 sCard1Gfx[] = INCBIN_U8("graphics/wonder_card/bg1.4bpp.lz");
|
||||
static const u8 sCard1Map[] = INCBIN_U8("graphics/wonder_card/bg1.bin.lz");
|
||||
static const u8 sCard2Gfx[] = INCBIN_U8("graphics/wonder_card/bg2.4bpp.lz");
|
||||
static const u8 sCard2Map[] = INCBIN_U8("graphics/wonder_card/bg2.bin.lz");
|
||||
static const u8 sCard6Gfx[] = INCBIN_U8("graphics/wonder_card/bg6.4bpp.lz");
|
||||
static const u8 sCard6Map[] = INCBIN_U8("graphics/wonder_card/bg6.bin.lz");
|
||||
static const u8 sCard7Gfx[] = INCBIN_U8("graphics/wonder_card/bg7.4bpp.lz");
|
||||
static const u8 sCard7Map[] = INCBIN_U8("graphics/wonder_card/bg7.bin.lz");
|
||||
static const u16 sStampShadowPal0[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_0.gbapal");
|
||||
static const u16 sStampShadowPal1[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_1.gbapal");
|
||||
static const u16 sStampShadowPal2[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_2.gbapal");
|
||||
static const u16 sStampShadowPal3[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_3.gbapal");
|
||||
static const u16 sStampShadowPal4[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_4.gbapal");
|
||||
static const u16 sStampShadowPal5[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_5.gbapal");
|
||||
static const u16 sStampShadowPal6[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_6.gbapal");
|
||||
static const u16 sStampShadowPal7[] = INCBIN_U16("graphics/wonder_card/stamp_shadow_7.gbapal");
|
||||
static const u32 sStampShadowGfx[] = INCBIN_U32("graphics/wonder_card/stamp_shadow.4bpp.lz");
|
||||
|
||||
static const struct CompressedSpriteSheet sSpriteSheet_StampShadow = {
|
||||
sStampShadowGfx, 0x100, TAG_STAMP_SHADOW
|
||||
};
|
||||
|
||||
static const struct SpritePalette sSpritePalettes_StampShadow[] = {
|
||||
{sStampShadowPal0, TAG_STAMP_SHADOW},
|
||||
{sStampShadowPal1, TAG_STAMP_SHADOW},
|
||||
{sStampShadowPal2, TAG_STAMP_SHADOW},
|
||||
{sStampShadowPal3, TAG_STAMP_SHADOW},
|
||||
{sStampShadowPal4, TAG_STAMP_SHADOW},
|
||||
{sStampShadowPal5, TAG_STAMP_SHADOW},
|
||||
{sStampShadowPal6, TAG_STAMP_SHADOW},
|
||||
{sStampShadowPal7, TAG_STAMP_SHADOW}
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate sSpriteTemplate_StampShadow = {
|
||||
.tileTag = TAG_STAMP_SHADOW,
|
||||
.paletteTag = TAG_STAMP_SHADOW,
|
||||
.oam = &gOamData_AffineOff_ObjNormal_32x16,
|
||||
.anims = gDummySpriteAnimTable,
|
||||
.images = NULL,
|
||||
.affineAnims = gDummySpriteAffineAnimTable,
|
||||
.callback = SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct WonderGraphics sCardGraphics[NUM_WONDER_BGS] = {
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 0, .tiles = sCard0Gfx, .map = sCard0Map, .pal = sCard0Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 1, .tiles = sCard1Gfx, .map = sCard1Map, .pal = gCard1Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 2, .tiles = sCard2Gfx, .map = sCard2Map, .pal = gCard2Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 3, .tiles = sCard2Gfx, .map = sCard2Map, .pal = gCard3Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 4, .tiles = sCard2Gfx, .map = sCard2Map, .pal = gCard4Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 5, .tiles = sCard2Gfx, .map = sCard2Map, .pal = gCard5Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 6, .tiles = sCard6Gfx, .map = sCard6Map, .pal = sCard6Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .footerTextPal = 0, .stampShadowPal = 7, .tiles = sCard7Gfx, .map = sCard7Map, .pal = sCard7Pal}
|
||||
};
|
||||
|
||||
bool32 WonderCard_Init(struct WonderCard * card, struct WonderCardMetadata * metadata)
|
||||
{
|
||||
if (card == NULL || metadata == NULL)
|
||||
return FALSE;
|
||||
sWonderCardData = AllocZeroed(sizeof(*sWonderCardData));
|
||||
if (sWonderCardData == NULL)
|
||||
return FALSE;
|
||||
sWonderCardData->card = *card;
|
||||
sWonderCardData->cardMetadata = *metadata;
|
||||
if (sWonderCardData->card.bgType >= NUM_WONDER_BGS)
|
||||
sWonderCardData->card.bgType = 0;
|
||||
if (sWonderCardData->card.type >= CARD_TYPE_COUNT)
|
||||
sWonderCardData->card.type = 0;
|
||||
if (sWonderCardData->card.maxStamps > MAX_STAMP_CARD_STAMPS)
|
||||
sWonderCardData->card.maxStamps = 0;
|
||||
sWonderCardData->gfx = &sCardGraphics[sWonderCardData->card.bgType];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void WonderCard_Destroy(void)
|
||||
{
|
||||
if (sWonderCardData != NULL)
|
||||
{
|
||||
*sWonderCardData = (struct WonderCardData){};
|
||||
FREE_AND_SET_NULL(sWonderCardData);
|
||||
}
|
||||
}
|
||||
|
||||
s32 WonderCard_Enter(void)
|
||||
{
|
||||
if (sWonderCardData == NULL)
|
||||
return -1;
|
||||
switch(sWonderCardData->enterExitState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
DecompressAndCopyTileDataToVram(2, sWonderCardData->gfx->tiles, 0, 0x008, 0);
|
||||
sWonderCardData->windowIds[WIN_HEADER] = AddWindow(&sWindowTemplates[WIN_HEADER]);
|
||||
sWonderCardData->windowIds[WIN_BODY] = AddWindow(&sWindowTemplates[WIN_BODY]);
|
||||
sWonderCardData->windowIds[WIN_FOOTER] = AddWindow(&sWindowTemplates[WIN_FOOTER]);
|
||||
break;
|
||||
case 3:
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return 0;
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(sWonderCardData->gfx->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(sWonderCardData->gfx->map, sWonderCardData->bgTilemapBuffer);
|
||||
CopyRectToBgTilemapBufferRect(2, sWonderCardData->bgTilemapBuffer, 0, 0, 30, 20, 0, 0, 30, 20, 1, 0x008, 0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 4:
|
||||
BufferCardText();
|
||||
break;
|
||||
case 5:
|
||||
DrawCardWindow(WIN_HEADER);
|
||||
DrawCardWindow(WIN_BODY);
|
||||
DrawCardWindow(WIN_FOOTER);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
break;
|
||||
case 6:
|
||||
LoadMonIconPalettes();
|
||||
break;
|
||||
case 7:
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
CreateCardSprites();
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sWonderCardData->enterExitState = 0;
|
||||
return 1;
|
||||
}
|
||||
sWonderCardData->enterExitState++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 WonderCard_Exit(bool32 useCancel)
|
||||
{
|
||||
if (sWonderCardData == NULL)
|
||||
return -1;
|
||||
switch (sWonderCardData->enterExitState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(sWonderCardData->windowIds[WIN_FOOTER]);
|
||||
RemoveWindow(sWonderCardData->windowIds[WIN_BODY]);
|
||||
RemoveWindow(sWonderCardData->windowIds[WIN_HEADER]);
|
||||
break;
|
||||
case 4:
|
||||
DestroyCardSprites();
|
||||
FreeMonIconPalettes();
|
||||
break;
|
||||
case 5:
|
||||
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel);
|
||||
break;
|
||||
case 6:
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sWonderCardData->enterExitState = 0;
|
||||
return 1;
|
||||
}
|
||||
sWonderCardData->enterExitState++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void BufferCardText(void)
|
||||
{
|
||||
u16 i = 0;
|
||||
u16 charsUntilStat;
|
||||
u16 stats[3] = {0, 0, 0};
|
||||
|
||||
// Copy title/subtitle text
|
||||
memcpy(sWonderCardData->titleText, sWonderCardData->card.titleText, WONDER_CARD_TEXT_LENGTH);
|
||||
sWonderCardData->titleText[WONDER_CARD_TEXT_LENGTH] = EOS;
|
||||
memcpy(sWonderCardData->subtitleText, sWonderCardData->card.subtitleText, WONDER_CARD_TEXT_LENGTH);
|
||||
sWonderCardData->subtitleText[WONDER_CARD_TEXT_LENGTH] = EOS;
|
||||
|
||||
// Copy card id number
|
||||
if (sWonderCardData->card.idNumber > 999999)
|
||||
sWonderCardData->card.idNumber = 999999;
|
||||
ConvertIntToDecimalStringN(sWonderCardData->idNumberText, sWonderCardData->card.idNumber, STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
|
||||
// Copy body text
|
||||
for (i = 0; i < WONDER_CARD_BODY_TEXT_LINES; i++)
|
||||
{
|
||||
memcpy(sWonderCardData->bodyText[i], sWonderCardData->card.bodyText[i], WONDER_CARD_TEXT_LENGTH);
|
||||
sWonderCardData->bodyText[i][WONDER_CARD_TEXT_LENGTH] = EOS;
|
||||
}
|
||||
|
||||
// Copy footer line 1
|
||||
memcpy(sWonderCardData->footerLine1Text, sWonderCardData->card.footerLine1Text, WONDER_CARD_TEXT_LENGTH);
|
||||
sWonderCardData->footerLine1Text[WONDER_CARD_TEXT_LENGTH] = EOS;
|
||||
|
||||
// Copy footer line 2
|
||||
switch (sWonderCardData->card.type)
|
||||
{
|
||||
case CARD_TYPE_GIFT:
|
||||
memcpy(sWonderCardData->footerLine2Text, sWonderCardData->card.footerLine2Text, WONDER_CARD_TEXT_LENGTH);
|
||||
sWonderCardData->footerLine2Text[WONDER_CARD_TEXT_LENGTH] = EOS;
|
||||
break;
|
||||
case CARD_TYPE_STAMP:
|
||||
sWonderCardData->footerLine2Text[0] = EOS;
|
||||
break;
|
||||
case CARD_TYPE_LINK_STAT:
|
||||
sWonderCardData->footerLine2Text[0] = EOS;
|
||||
|
||||
// Load stats
|
||||
stats[0] = sWonderCardData->cardMetadata.battlesWon < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesWon : MAX_WONDER_CARD_STAT;
|
||||
stats[1] = sWonderCardData->cardMetadata.battlesLost < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.battlesLost : MAX_WONDER_CARD_STAT;
|
||||
stats[2] = sWonderCardData->cardMetadata.numTrades < MAX_WONDER_CARD_STAT ? sWonderCardData->cardMetadata.numTrades : MAX_WONDER_CARD_STAT;
|
||||
|
||||
// Init stat text arrays
|
||||
for (i = 0; i < ARRAY_COUNT(sWonderCardData->statTextData); i++)
|
||||
{
|
||||
memset(sWonderCardData->statTextData[i].statNumberText, EOS, sizeof(sWonderCardData->statTextData[i].statNumberText));
|
||||
memset(sWonderCardData->statTextData[i].statText, EOS, sizeof(sWonderCardData->statTextData[i].statText));
|
||||
}
|
||||
|
||||
// Copy stat texts
|
||||
for (i = 0, charsUntilStat = 0; i < WONDER_CARD_TEXT_LENGTH; i++)
|
||||
{
|
||||
if (sWonderCardData->card.footerLine2Text[i] != CHAR_DYNAMIC_PLACEHOLDER)
|
||||
{
|
||||
// Regular text, just copy as is
|
||||
sWonderCardData->statTextData[sWonderCardData->recordIdx].statText[charsUntilStat] = sWonderCardData->card.footerLine2Text[i];
|
||||
charsUntilStat++;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Dynamic char encountered
|
||||
// These are used to give the id of which stat to print
|
||||
u8 id = sWonderCardData->card.footerLine2Text[i + 1];
|
||||
if (id >= ARRAY_COUNT(stats))
|
||||
{
|
||||
// Invalid stat id, skip ahead
|
||||
i += 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Copy stat number
|
||||
ConvertIntToDecimalStringN(sWonderCardData->statTextData[sWonderCardData->recordIdx].statNumberText, stats[id], STR_CONV_MODE_LEADING_ZEROS, 3);
|
||||
sWonderCardData->statTextData[sWonderCardData->recordIdx].width = sWonderCardData->card.footerLine2Text[i + 2];
|
||||
sWonderCardData->recordIdx++;
|
||||
if (sWonderCardData->recordIdx >= ARRAY_COUNT(sWonderCardData->statTextData))
|
||||
break;
|
||||
charsUntilStat = 0;
|
||||
i += 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DrawCardWindow(u8 whichWindow)
|
||||
{
|
||||
s8 i = 0;
|
||||
s32 windowId = sWonderCardData->windowIds[whichWindow];
|
||||
PutWindowTilemap(windowId);
|
||||
FillWindowPixelBuffer(windowId, 0);
|
||||
switch (whichWindow)
|
||||
{
|
||||
case WIN_HEADER:
|
||||
{
|
||||
// Print card title/subtitle
|
||||
s32 x;
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0, 1, sTextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->titleText);
|
||||
x = 160 - GetStringWidth(FONT_3, sWonderCardData->subtitleText, GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING));
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, x, 17, sTextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->subtitleText);
|
||||
|
||||
// Print id number
|
||||
if (sWonderCardData->card.idNumber != 0)
|
||||
AddTextPrinterParameterized3(windowId, FONT_2, 166, 17, sTextColorTable[sWonderCardData->gfx->titleTextPal], 0, sWonderCardData->idNumberText);
|
||||
break;
|
||||
}
|
||||
case WIN_BODY:
|
||||
// Print body text
|
||||
for (; i < WONDER_CARD_BODY_TEXT_LINES; i++)
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0, 16 * i + 2, sTextColorTable[sWonderCardData->gfx->bodyTextPal], 0, sWonderCardData->bodyText[i]);
|
||||
break;
|
||||
case WIN_FOOTER:
|
||||
// Print footer line 1
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0,
|
||||
sFooterTextOffsets[sWonderCardData->card.type],
|
||||
sTextColorTable[sWonderCardData->gfx->footerTextPal],
|
||||
0, sWonderCardData->footerLine1Text);
|
||||
|
||||
// Print footer line 2
|
||||
if (sWonderCardData->card.type != CARD_TYPE_LINK_STAT)
|
||||
{
|
||||
// Print gift text
|
||||
// Odd that CARD_TYPE_STAMP is not ignored, it has empty text for this
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, 0,
|
||||
16 + sFooterTextOffsets[sWonderCardData->card.type],
|
||||
sTextColorTable[sWonderCardData->gfx->footerTextPal],
|
||||
0, sWonderCardData->footerLine2Text);
|
||||
}
|
||||
else
|
||||
{
|
||||
s32 x = 0;
|
||||
s32 y = sFooterTextOffsets[sWonderCardData->card.type] + 16;
|
||||
s32 spacing = GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING);
|
||||
for (; i < sWonderCardData->recordIdx; i++)
|
||||
{
|
||||
// Print stat text
|
||||
AddTextPrinterParameterized3(windowId, FONT_3, x, y, sTextColorTable[sWonderCardData->gfx->footerTextPal], 0, sWonderCardData->statTextData[i].statText);
|
||||
if (sWonderCardData->statTextData[i].statNumberText[0] != EOS)
|
||||
{
|
||||
// Print stat number
|
||||
x += GetStringWidth(FONT_3, sWonderCardData->statTextData[i].statText, spacing);
|
||||
AddTextPrinterParameterized3(windowId, FONT_2, x, y,
|
||||
sTextColorTable[sWonderCardData->gfx->footerTextPal],
|
||||
0, sWonderCardData->statTextData[i].statNumberText);
|
||||
x += GetStringWidth(FONT_3, sWonderCardData->statTextData[i].statNumberText, spacing) + sWonderCardData->statTextData[i].width;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
CopyWindowToVram(windowId, COPYWIN_FULL);
|
||||
}
|
||||
|
||||
static void CreateCardSprites(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
sWonderCardData->monIconSpriteId = SPRITE_NONE;
|
||||
|
||||
// Create icon sprite
|
||||
if (sWonderCardData->cardMetadata.iconSpecies != SPECIES_NONE)
|
||||
{
|
||||
sWonderCardData->monIconSpriteId = CreateMonIcon_HandleDeoxys(MailSpeciesToIconSpecies(sWonderCardData->cardMetadata.iconSpecies), SpriteCallbackDummy, 220, 20, 0, FALSE);
|
||||
gSprites[sWonderCardData->monIconSpriteId].oam.priority = 2;
|
||||
}
|
||||
|
||||
// Create stamp sprites
|
||||
if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP)
|
||||
{
|
||||
LoadCompressedSpriteSheetUsingHeap(&sSpriteSheet_StampShadow);
|
||||
LoadSpritePalette(&sSpritePalettes_StampShadow[sWonderCardData->gfx->stampShadowPal]);
|
||||
for (; i < sWonderCardData->card.maxStamps; i++)
|
||||
{
|
||||
sWonderCardData->stampSpriteIds[i][0] = SPRITE_NONE;
|
||||
sWonderCardData->stampSpriteIds[i][1] = SPRITE_NONE;
|
||||
sWonderCardData->stampSpriteIds[i][0] = CreateSprite(&sSpriteTemplate_StampShadow, 216 - 32 * i, 0x90, 8);
|
||||
if (sWonderCardData->cardMetadata.stampData[0][i] != 0)
|
||||
{
|
||||
sWonderCardData->stampSpriteIds[i][1] = CreateMonIcon_HandleDeoxys(MailSpeciesToIconSpecies(sWonderCardData->cardMetadata.stampData[0][i]), SpriteCallbackDummy, 216 - 32 * i, 136, 0, 0);
|
||||
gSprites[sWonderCardData->stampSpriteIds[i][1]].oam.priority = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void DestroyCardSprites(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
|
||||
// Destroy icon sprite
|
||||
if (sWonderCardData->monIconSpriteId != SPRITE_NONE)
|
||||
DestroyMonIcon(&gSprites[sWonderCardData->monIconSpriteId]);
|
||||
|
||||
// Destroy stamp sprites
|
||||
if (sWonderCardData->card.maxStamps != 0 && sWonderCardData->card.type == CARD_TYPE_STAMP)
|
||||
{
|
||||
for (; i < sWonderCardData->card.maxStamps; i++)
|
||||
{
|
||||
if (sWonderCardData->stampSpriteIds[i][0] != SPRITE_NONE)
|
||||
{
|
||||
DestroySprite(&gSprites[sWonderCardData->stampSpriteIds[i][0]]);
|
||||
#ifdef BUGFIX
|
||||
if (sWonderCardData->stampSpriteIds[i][1] != SPRITE_NONE)
|
||||
#else
|
||||
if (sWonderCardData->stampSpriteIds[i][0] != SPRITE_NONE)
|
||||
#endif
|
||||
DestroyMonIcon(&gSprites[sWonderCardData->stampSpriteIds[i][1]]);
|
||||
}
|
||||
}
|
||||
FreeSpriteTilesByTag(TAG_STAMP_SHADOW);
|
||||
FreeSpritePaletteByTag(TAG_STAMP_SHADOW);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,404 @@
|
||||
#include "global.h"
|
||||
#include "gflib.h"
|
||||
#include "menu_indicators.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "mevent.h"
|
||||
#include "mystery_gift_menu.h"
|
||||
#include "menu.h"
|
||||
#include "link_rfu.h"
|
||||
#include "list_menu.h"
|
||||
#include "constants/mystery_gift.h"
|
||||
|
||||
enum {
|
||||
WIN_TITLE,
|
||||
WIN_BODY,
|
||||
WIN_COUNT
|
||||
};
|
||||
|
||||
#define TAG_ARROWS 0x1000
|
||||
|
||||
struct WonderNewsData
|
||||
{
|
||||
struct WonderNews news;
|
||||
const struct WonderGraphics * gfx;
|
||||
bool8 verticalScrollDisabled:1;
|
||||
u8 enterExitState:7;
|
||||
u8 arrowTaskId;
|
||||
bool8 scrolling:1;
|
||||
u8 scrollIncrement:7;
|
||||
bool8 scrollingDown:1;
|
||||
u8 scrollTotal:7;
|
||||
u16 scrollEnd;
|
||||
u16 scrollOffset;
|
||||
u16 windowIds[WIN_COUNT];
|
||||
u8 unused[2];
|
||||
u8 titleText[WONDER_NEWS_TEXT_LENGTH + 1];
|
||||
u8 bodyText[WONDER_NEWS_BODY_TEXT_LINES][WONDER_NEWS_TEXT_LENGTH + 1];
|
||||
struct ScrollArrowsTemplate arrowsTemplate;
|
||||
u8 bgTilemapBuffer[0x1000];
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct WonderNewsData * sWonderNewsData = NULL;
|
||||
|
||||
static void BufferNewsText(void);
|
||||
static void DrawNewsWindows(void);
|
||||
static void UpdateNewsScroll(void);
|
||||
|
||||
static const u8 sTextColorTable[][3] = {
|
||||
{0, 2, 3},
|
||||
{0, 1, 2}
|
||||
};
|
||||
static const struct WindowTemplate sWindowTemplates[] = {
|
||||
[WIN_TITLE] = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 0,
|
||||
.width = 28,
|
||||
.height = 3,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x000
|
||||
},
|
||||
[WIN_BODY] = {
|
||||
.bg = 2,
|
||||
.tilemapLeft = 1,
|
||||
.tilemapTop = 3,
|
||||
.width = 28,
|
||||
.height = 20,
|
||||
.paletteNum = 15,
|
||||
.baseBlock = 0x000
|
||||
}
|
||||
};
|
||||
static const struct ScrollArrowsTemplate sArrowsTemplate = {
|
||||
.firstArrowType = SCROLL_ARROW_UP,
|
||||
.firstX = 232,
|
||||
.firstY = 24,
|
||||
.secondArrowType = SCROLL_ARROW_DOWN,
|
||||
.secondX = 232,
|
||||
.secondY = 152,
|
||||
.fullyUpThreshold = 0,
|
||||
.fullyDownThreshold = 2,
|
||||
.tileTag = TAG_ARROWS,
|
||||
.palTag = TAG_ARROWS,
|
||||
.palNum = 0
|
||||
};
|
||||
|
||||
static const u16 sNews0Pal[] = INCBIN_U16("graphics/wonder_news/bg0.gbapal");
|
||||
static const u16 sNews6Pal[] = INCBIN_U16("graphics/wonder_news/bg6.gbapal");
|
||||
static const u16 sNews7Pal[] = INCBIN_U16("graphics/wonder_news/bg7.gbapal");
|
||||
static const u8 sNews0Gfx[] = INCBIN_U8("graphics/wonder_news/bg0.4bpp.lz");
|
||||
static const u8 sNews0Map[] = INCBIN_U8("graphics/wonder_news/bg0.bin.lz");
|
||||
static const u8 sNews1Gfx[] = INCBIN_U8("graphics/wonder_news/bg1.4bpp.lz");
|
||||
static const u8 sNews1Map[] = INCBIN_U8("graphics/wonder_news/bg1.bin.lz");
|
||||
static const u8 sNews2Gfx[] = INCBIN_U8("graphics/wonder_news/bg2.4bpp.lz");
|
||||
static const u8 sNews2Map[] = INCBIN_U8("graphics/wonder_news/bg2.bin.lz");
|
||||
static const u8 sNews6Gfx[] = INCBIN_U8("graphics/wonder_news/bg6.4bpp.lz");
|
||||
static const u8 sNews6Map[] = INCBIN_U8("graphics/wonder_news/bg6.bin.lz");
|
||||
static const u8 sNews7Gfx[] = INCBIN_U8("graphics/wonder_news/bg7.4bpp.lz");
|
||||
static const u8 sNews7Map[] = INCBIN_U8("graphics/wonder_news/bg7.bin.lz");
|
||||
|
||||
static const struct WonderGraphics sNewsGraphics[NUM_WONDER_BGS] = {
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews0Gfx, .map = sNews0Map, .pal = sNews0Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews1Gfx, .map = sNews1Map, .pal = gCard1Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews2Gfx, .map = sNews2Map, .pal = gCard2Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews2Gfx, .map = sNews2Map, .pal = gCard3Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews2Gfx, .map = sNews2Map, .pal = gCard4Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews2Gfx, .map = sNews2Map, .pal = gCard5Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews6Gfx, .map = sNews6Map, .pal = sNews6Pal},
|
||||
{.titleTextPal = 1, .bodyTextPal = 0, .tiles = sNews7Gfx, .map = sNews7Map, .pal = sNews7Pal}
|
||||
};
|
||||
|
||||
bool32 WonderNews_Init(const struct WonderNews * news)
|
||||
{
|
||||
if (news == NULL)
|
||||
return FALSE;
|
||||
sWonderNewsData = AllocZeroed(sizeof(*sWonderNewsData));
|
||||
if (sWonderNewsData == NULL)
|
||||
return FALSE;
|
||||
sWonderNewsData->news = *news;
|
||||
if (sWonderNewsData->news.bgType >= NUM_WONDER_BGS)
|
||||
sWonderNewsData->news.bgType = 0;
|
||||
sWonderNewsData->gfx = &sNewsGraphics[sWonderNewsData->news.bgType];
|
||||
sWonderNewsData->arrowTaskId = TASK_NONE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void WonderNews_Destroy(void)
|
||||
{
|
||||
if (sWonderNewsData != NULL)
|
||||
{
|
||||
*sWonderNewsData = (struct WonderNewsData){};
|
||||
FREE_AND_SET_NULL(sWonderNewsData);
|
||||
}
|
||||
}
|
||||
|
||||
s32 WonderNews_Enter(void)
|
||||
{
|
||||
if (sWonderNewsData == NULL)
|
||||
return -1;
|
||||
|
||||
switch (sWonderNewsData->enterExitState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
ChangeBgY(0, 0, BG_COORD_SET);
|
||||
ChangeBgY(1, 0, BG_COORD_SET);
|
||||
ChangeBgY(2, 0, BG_COORD_SET);
|
||||
ChangeBgY(3, 0, BG_COORD_SET);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, WIN_RANGE(0, DISPLAY_WIDTH));
|
||||
SetGpuReg(REG_OFFSET_WIN0V, WIN_RANGE(26, 152));
|
||||
SetGpuReg(REG_OFFSET_WININ, WININ_WIN0_BG_ALL | WININ_WIN0_OBJ);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, WINOUT_WIN01_BG0 | WINOUT_WIN01_BG1 | WINOUT_WIN01_BG3 | WINOUT_WIN01_OBJ);
|
||||
SetGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 20);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
DecompressAndCopyTileDataToVram(3, sWonderNewsData->gfx->tiles, 0, 8, 0);
|
||||
sWonderNewsData->windowIds[WIN_TITLE] = AddWindow(&sWindowTemplates[WIN_TITLE]);
|
||||
sWonderNewsData->windowIds[WIN_BODY] = AddWindow(&sWindowTemplates[WIN_BODY]);
|
||||
break;
|
||||
case 3:
|
||||
if (FreeTempTileDataBuffersIfPossible())
|
||||
return 0;
|
||||
gPaletteFade.bufferTransferDisabled = TRUE;
|
||||
LoadPalette(sWonderNewsData->gfx->pal, 0x10, 0x20);
|
||||
LZ77UnCompWram(sWonderNewsData->gfx->map, sWonderNewsData->bgTilemapBuffer);
|
||||
CopyRectToBgTilemapBufferRect(1, sWonderNewsData->bgTilemapBuffer, 0, 0, 30, 3, 0, 0, 30, 3, 1, 8, 0);
|
||||
CopyRectToBgTilemapBufferRect(3, sWonderNewsData->bgTilemapBuffer, 0, 3, 30, 23, 0, 3, 30, 23, 1, 8, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
break;
|
||||
case 4:
|
||||
BufferNewsText();
|
||||
break;
|
||||
case 5:
|
||||
DrawNewsWindows();
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
break;
|
||||
case 6:
|
||||
ShowBg(1);
|
||||
ShowBg(2);
|
||||
ShowBg(3);
|
||||
gPaletteFade.bufferTransferDisabled = FALSE;
|
||||
sWonderNewsData->arrowTaskId = AddScrollIndicatorArrowPair(&sWonderNewsData->arrowsTemplate, &sWonderNewsData->scrollOffset);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
UpdatePaletteFade();
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sWonderNewsData->enterExitState = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
sWonderNewsData->enterExitState++;
|
||||
return 0;
|
||||
}
|
||||
|
||||
s32 WonderNews_Exit(bool32 useCancel)
|
||||
{
|
||||
if (sWonderNewsData == NULL)
|
||||
return -1;
|
||||
switch (sWonderNewsData->enterExitState)
|
||||
{
|
||||
case 0:
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 16, RGB_BLACK);
|
||||
break;
|
||||
case 1:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
ChangeBgY(2, 0, BG_COORD_SET);
|
||||
SetGpuReg(REG_OFFSET_WIN0H, 0);
|
||||
SetGpuReg(REG_OFFSET_WIN0V, 0);
|
||||
SetGpuReg(REG_OFFSET_WININ, 0);
|
||||
SetGpuReg(REG_OFFSET_WINOUT, 0);
|
||||
ClearGpuRegBits(REG_OFFSET_DISPCNT, DISPCNT_WIN0_ON);
|
||||
break;
|
||||
case 2:
|
||||
FillBgTilemapBufferRect_Palette0(0, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(1, 0x000, 0, 0, 30, 20);
|
||||
FillBgTilemapBufferRect_Palette0(2, 0x000, 0, 0, 30, 24);
|
||||
FillBgTilemapBufferRect_Palette0(3, 0x000, 0, 0, 30, 24);
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
CopyBgTilemapBufferToVram(2);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
break;
|
||||
case 3:
|
||||
HideBg(1);
|
||||
HideBg(2);
|
||||
RemoveWindow(sWonderNewsData->windowIds[WIN_BODY]);
|
||||
RemoveWindow(sWonderNewsData->windowIds[WIN_TITLE]);
|
||||
break;
|
||||
case 4:
|
||||
ChangeBgY(2, 0, BG_COORD_SET);
|
||||
ChangeBgY(3, 0, BG_COORD_SET);
|
||||
if (sWonderNewsData->arrowTaskId != TASK_NONE)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(sWonderNewsData->arrowTaskId);
|
||||
sWonderNewsData->arrowTaskId = TASK_NONE;
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
PrintMysteryGiftOrEReaderTopMenu(gGiftIsFromEReader, useCancel);
|
||||
break;
|
||||
case 6:
|
||||
MG_DrawCheckerboardPattern();
|
||||
CopyBgTilemapBufferToVram(0);
|
||||
CopyBgTilemapBufferToVram(3);
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 16, 0, RGB_BLACK);
|
||||
break;
|
||||
default:
|
||||
if (UpdatePaletteFade())
|
||||
return 0;
|
||||
sWonderNewsData->enterExitState = 0;
|
||||
return 1;
|
||||
}
|
||||
++sWonderNewsData->enterExitState;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void WonderNews_RemoveScrollIndicatorArrowPair(void)
|
||||
{
|
||||
if (!sWonderNewsData->verticalScrollDisabled && sWonderNewsData->arrowTaskId != TASK_NONE)
|
||||
{
|
||||
RemoveScrollIndicatorArrowPair(sWonderNewsData->arrowTaskId);
|
||||
sWonderNewsData->arrowTaskId = TASK_NONE;
|
||||
sWonderNewsData->verticalScrollDisabled = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void WonderNews_AddScrollIndicatorArrowPair(void)
|
||||
{
|
||||
if (sWonderNewsData->verticalScrollDisabled)
|
||||
{
|
||||
sWonderNewsData->arrowTaskId = AddScrollIndicatorArrowPair(&sWonderNewsData->arrowsTemplate, &sWonderNewsData->scrollOffset);
|
||||
sWonderNewsData->verticalScrollDisabled = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
u32 WonderNews_GetInput(u16 input)
|
||||
{
|
||||
if (sWonderNewsData->scrolling)
|
||||
{
|
||||
UpdateNewsScroll();
|
||||
return NEWS_INPUT_NONE;
|
||||
}
|
||||
switch (input)
|
||||
{
|
||||
case A_BUTTON:
|
||||
return NEWS_INPUT_A;
|
||||
case B_BUTTON:
|
||||
return NEWS_INPUT_B;
|
||||
case DPAD_UP:
|
||||
if (sWonderNewsData->scrollOffset == 0)
|
||||
return NEWS_INPUT_NONE;
|
||||
if (sWonderNewsData->verticalScrollDisabled)
|
||||
return NEWS_INPUT_NONE;
|
||||
sWonderNewsData->scrollingDown = FALSE;
|
||||
break;
|
||||
case DPAD_DOWN:
|
||||
if (sWonderNewsData->scrollOffset == sWonderNewsData->scrollEnd)
|
||||
return NEWS_INPUT_NONE;
|
||||
if (sWonderNewsData->verticalScrollDisabled)
|
||||
return NEWS_INPUT_NONE;
|
||||
sWonderNewsData->scrollingDown = TRUE;
|
||||
break;
|
||||
default:
|
||||
return NEWS_INPUT_NONE;
|
||||
}
|
||||
|
||||
// Init scroll
|
||||
sWonderNewsData->scrolling = TRUE;
|
||||
sWonderNewsData->scrollIncrement = 2;
|
||||
sWonderNewsData->scrollTotal = 0;
|
||||
if (!sWonderNewsData->scrollingDown)
|
||||
return NEWS_INPUT_SCROLL_UP;
|
||||
else
|
||||
return NEWS_INPUT_SCROLL_DOWN;
|
||||
}
|
||||
|
||||
static void BufferNewsText(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
|
||||
// Copy title text
|
||||
memcpy(sWonderNewsData->titleText, sWonderNewsData->news.titleText, WONDER_NEWS_TEXT_LENGTH);
|
||||
sWonderNewsData->titleText[WONDER_NEWS_TEXT_LENGTH] = EOS;
|
||||
|
||||
// Copy body text
|
||||
for (; i < WONDER_NEWS_BODY_TEXT_LINES; i++)
|
||||
{
|
||||
memcpy(sWonderNewsData->bodyText[i], sWonderNewsData->news.bodyText[i], WONDER_NEWS_TEXT_LENGTH);
|
||||
sWonderNewsData->bodyText[i][WONDER_NEWS_TEXT_LENGTH] = EOS;
|
||||
if (i > 7 && sWonderNewsData->bodyText[i][0] != EOS)
|
||||
sWonderNewsData->scrollEnd++;
|
||||
}
|
||||
sWonderNewsData->arrowsTemplate = sArrowsTemplate;
|
||||
sWonderNewsData->arrowsTemplate.fullyDownThreshold = sWonderNewsData->scrollEnd;
|
||||
}
|
||||
|
||||
static void DrawNewsWindows(void)
|
||||
{
|
||||
u8 i = 0;
|
||||
s32 x;
|
||||
PutWindowTilemap(sWonderNewsData->windowIds[WIN_TITLE]);
|
||||
PutWindowTilemap(sWonderNewsData->windowIds[WIN_BODY]);
|
||||
FillWindowPixelBuffer(sWonderNewsData->windowIds[WIN_TITLE], 0);
|
||||
FillWindowPixelBuffer(sWonderNewsData->windowIds[WIN_BODY], 0);
|
||||
|
||||
// Print title text
|
||||
x = (224 - GetStringWidth(FONT_3, sWonderNewsData->titleText, GetFontAttribute(FONT_3, FONTATTR_LETTER_SPACING))) / 2;
|
||||
if (x < 0)
|
||||
x = 0;
|
||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[WIN_TITLE], FONT_3, x, 6, sTextColorTable[sWonderNewsData->gfx->titleTextPal], 0, sWonderNewsData->titleText);
|
||||
|
||||
// Print body text
|
||||
for (; i < WONDER_NEWS_BODY_TEXT_LINES; ++i)
|
||||
{
|
||||
AddTextPrinterParameterized3(sWonderNewsData->windowIds[WIN_BODY], FONT_3, 0,
|
||||
16 * i + 2,
|
||||
sTextColorTable[sWonderNewsData->gfx->bodyTextPal],
|
||||
0, sWonderNewsData->bodyText[i]);
|
||||
}
|
||||
CopyWindowToVram(sWonderNewsData->windowIds[WIN_TITLE], COPYWIN_FULL);
|
||||
CopyWindowToVram(sWonderNewsData->windowIds[WIN_BODY], COPYWIN_FULL);
|
||||
}
|
||||
|
||||
static void UpdateNewsScroll(void)
|
||||
{
|
||||
u16 bgMove = sWonderNewsData->scrollIncrement;
|
||||
bgMove *= 256;
|
||||
if (sWonderNewsData->scrollingDown)
|
||||
{
|
||||
ChangeBgY(2, bgMove, BG_COORD_ADD);
|
||||
ChangeBgY(3, bgMove, BG_COORD_ADD);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChangeBgY(2, bgMove, BG_COORD_SUB);
|
||||
ChangeBgY(3, bgMove, BG_COORD_SUB);
|
||||
}
|
||||
sWonderNewsData->scrollTotal += sWonderNewsData->scrollIncrement;
|
||||
if (sWonderNewsData->scrollTotal > 15)
|
||||
{
|
||||
if (sWonderNewsData->scrollingDown)
|
||||
sWonderNewsData->scrollOffset++;
|
||||
else
|
||||
sWonderNewsData->scrollOffset--;
|
||||
sWonderNewsData->scrolling = FALSE;
|
||||
sWonderNewsData->scrollTotal = 0;
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -1393,7 +1393,7 @@ static void NamingScreen_CreatePlayerIcon(void)
|
||||
u8 spriteId;
|
||||
|
||||
rivalGfxId = GetRivalAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, sNamingScreen->monSpecies);
|
||||
spriteId = AddPseudoObjectEvent(rivalGfxId, SpriteCallbackDummy, 56, 37, 0);
|
||||
spriteId = CreateObjectGraphicsSprite(rivalGfxId, SpriteCallbackDummy, 56, 37, 0);
|
||||
gSprites[spriteId].oam.priority = 3;
|
||||
StartSpriteAnim(&gSprites[spriteId], ANIM_STD_GO_SOUTH);
|
||||
}
|
||||
@@ -1440,7 +1440,7 @@ static void NamingScreen_CreateRivalIcon(void)
|
||||
const struct SubspriteTable * tables_p;
|
||||
u8 spriteId;
|
||||
|
||||
MakeObjectTemplateFromObjectEventGraphicsInfo(OBJ_EVENT_GFX_RED_NORMAL, SpriteCallbackDummy, &template, &tables_p);
|
||||
CopyObjectGraphicsInfoToSpriteTemplate(OBJ_EVENT_GFX_RED_NORMAL, SpriteCallbackDummy, &template, &tables_p);
|
||||
|
||||
template.tileTag = sheet.tag;
|
||||
template.paletteTag = palette.tag;
|
||||
@@ -1874,7 +1874,7 @@ static void LoadPalettes(void)
|
||||
{
|
||||
LoadPalette(gNamingScreenMenu_Pal, 0, sizeof(gNamingScreenMenu_Pal));
|
||||
LoadPalette(gNamingScreenKeyboard_Pal, 0xA0, 0x20);
|
||||
LoadPalette(stdpal_get(2), 0xB0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(2), 0xB0, 0x20);
|
||||
}
|
||||
|
||||
static void DecompressToBgTilemapBuffer(u8 bg, const u32 *src)
|
||||
|
||||
+1
-1
@@ -130,7 +130,7 @@ void NewGameInitData(void)
|
||||
ClearPlayerLinkBattleRecords();
|
||||
InitHeracrossSizeRecord();
|
||||
InitMagikarpSizeRecord();
|
||||
sub_806E190();
|
||||
EnableNationalPokedex_RSE();
|
||||
gPlayerPartyCount = 0;
|
||||
ZeroPlayerPartyMons();
|
||||
ResetPokemonStorageSystem();
|
||||
|
||||
+35
-29
@@ -19,21 +19,26 @@ static EWRAM_DATA u16 sTempTileDataBufferCursor = {0};
|
||||
static EWRAM_DATA void *sTempTileDataBuffers[0x20] = {NULL};
|
||||
static EWRAM_DATA u8 sStartMenuWindowId = {0};
|
||||
|
||||
static const u16 gUnknown_841EF48[] = INCBIN_U16("graphics/unknown/unk_841EF48.4bpp");
|
||||
static const u16 sUnusedWindow_Gfx[] = INCBIN_U16("graphics/text_window/unused.4bpp");
|
||||
const u16 gMenuMessageWindow_Gfx[] = INCBIN_U16("graphics/text_window/menu_message.4bpp");
|
||||
|
||||
const u16 gUnknown_841F1C8[] = INCBIN_U16("graphics/text_window/unk_841F1C8.4bpp");
|
||||
const u16 gTMCaseMainWindowPalette[] = INCBIN_U16("graphics/tm_case/unk_841F408.gbapal");
|
||||
const u16 gStandardMenuPalette[] = INCBIN_U16("graphics/interface/std_menu.gbapal");
|
||||
|
||||
static const u8 gUnknown_841F428[] = { 8, 4, 1 };
|
||||
static const u8 sTextSpeedFrameDelays[] =
|
||||
{
|
||||
[OPTIONS_TEXT_SPEED_SLOW] = 8,
|
||||
[OPTIONS_TEXT_SPEED_MID] = 4,
|
||||
[OPTIONS_TEXT_SPEED_FAST] = 1
|
||||
};
|
||||
|
||||
static const struct WindowTemplate sStandardTextBox_WindowTemplates[] =
|
||||
{
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x2,
|
||||
.tilemapTop = 0xF,
|
||||
.width = 0x1A,
|
||||
.height = 0x4,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
.width = 26,
|
||||
.height = 4,
|
||||
.paletteNum = DLG_WINDOW_PALETTE_NUM,
|
||||
.baseBlock = 0x198,
|
||||
},
|
||||
@@ -43,10 +48,10 @@ static const struct WindowTemplate sStandardTextBox_WindowTemplates[] =
|
||||
static const struct WindowTemplate sYesNo_WindowTemplate =
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x15,
|
||||
.tilemapTop = 0x9,
|
||||
.width = 0x6,
|
||||
.height = 0x4,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 9,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = DLG_WINDOW_PALETTE_NUM,
|
||||
.baseBlock = 0x125,
|
||||
};
|
||||
@@ -455,14 +460,14 @@ void LoadStdWindowFrameGfx(void)
|
||||
if (gQuestLogState == QL_STATE_PLAYBACK)
|
||||
{
|
||||
gTextFlags.autoScroll = 1;
|
||||
TextWindow_LoadTilesStdFrame1(0, DLG_WINDOW_BASE_TILE_NUM);
|
||||
LoadQuestLogWindowTiles(0, DLG_WINDOW_BASE_TILE_NUM);
|
||||
}
|
||||
else
|
||||
{
|
||||
Menu_LoadStdPal();
|
||||
TextWindow_LoadResourcesStdFrame0(0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadMenuMessageWindowGfx(0, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
}
|
||||
TextWindow_SetUserSelectedFrame(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadUserWindowGfx(0, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM * 0x10);
|
||||
}
|
||||
|
||||
void DrawDialogueFrame(u8 windowId, bool8 copyToVram)
|
||||
@@ -522,7 +527,7 @@ static void WindowFunc_DrawStandardFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u
|
||||
|
||||
static void WindowFunc_DrawDialogueFrame(u8 bg, u8 tilemapLeft, u8 tilemapTop, u8 width, u8 height, u8 paletteNum)
|
||||
{
|
||||
if (!IsMsgSignPost() || gQuestLogState == QL_STATE_PLAYBACK)
|
||||
if (!IsMsgSignpost() || gQuestLogState == QL_STATE_PLAYBACK)
|
||||
{
|
||||
FillBgTilemapBufferRect(bg, DLG_WINDOW_BASE_TILE_NUM + 0, tilemapLeft - 2, tilemapTop - 1, 1, 1, DLG_WINDOW_PALETTE_NUM);
|
||||
FillBgTilemapBufferRect(bg, DLG_WINDOW_BASE_TILE_NUM + 1, tilemapLeft - 1, tilemapTop - 1, 1, 1, DLG_WINDOW_PALETTE_NUM);
|
||||
@@ -604,40 +609,41 @@ void SetStdWindowBorderStyle(u8 windowId, bool8 copyToVram)
|
||||
DrawStdFrameWithCustomTileAndPalette(windowId, copyToVram, STD_WINDOW_BASE_TILE_NUM, STD_WINDOW_PALETTE_NUM);
|
||||
}
|
||||
|
||||
void sub_80F7768(u8 windowId, bool8 copyToVram)
|
||||
void LoadMessageBoxAndFrameGfx(u8 windowId, bool8 copyToVram)
|
||||
{
|
||||
if (gQuestLogState == QL_STATE_PLAYBACK)
|
||||
{
|
||||
gTextFlags.autoScroll = 1;
|
||||
TextWindow_LoadTilesStdFrame1(0, DLG_WINDOW_BASE_TILE_NUM);
|
||||
LoadQuestLogWindowTiles(0, DLG_WINDOW_BASE_TILE_NUM);
|
||||
}
|
||||
else
|
||||
{
|
||||
TextWindow_LoadResourcesStdFrame0(windowId, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
LoadMenuMessageWindowGfx(windowId, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM * 0x10);
|
||||
}
|
||||
DrawDialogFrameWithCustomTileAndPalette(windowId, copyToVram, DLG_WINDOW_BASE_TILE_NUM, DLG_WINDOW_PALETTE_NUM);
|
||||
}
|
||||
|
||||
void Menu_LoadStdPal(void)
|
||||
{
|
||||
LoadPalette(gTMCaseMainWindowPalette, STD_WINDOW_PALETTE_NUM * 0x10, 0x14);
|
||||
LoadPalette(gStandardMenuPalette, STD_WINDOW_PALETTE_NUM * 0x10, 0x14);
|
||||
}
|
||||
|
||||
void Menu_LoadStdPalAt(u16 offset)
|
||||
{
|
||||
LoadPalette(gTMCaseMainWindowPalette, offset, 0x14);
|
||||
LoadPalette(gStandardMenuPalette, offset, 0x14);
|
||||
}
|
||||
|
||||
static const u16 *GetTmCaseMainWindowPalette(void)
|
||||
// Unused
|
||||
static const u16 *GetStdMenuPalette(void)
|
||||
{
|
||||
return gTMCaseMainWindowPalette;
|
||||
return gStandardMenuPalette;
|
||||
}
|
||||
|
||||
static u16 GetStdPalColor(u8 colorNum)
|
||||
{
|
||||
if (colorNum > 0xF)
|
||||
colorNum = 0;
|
||||
return gTMCaseMainWindowPalette[colorNum];
|
||||
return gStandardMenuPalette[colorNum];
|
||||
}
|
||||
|
||||
void DisplayItemMessageOnField(u8 taskId, u8 fontId, const u8 *string, TaskFunc callback)
|
||||
@@ -662,7 +668,7 @@ u8 GetTextSpeedSetting(void)
|
||||
u32 speed;
|
||||
if (gSaveBlock2Ptr->optionsTextSpeed > OPTIONS_TEXT_SPEED_FAST)
|
||||
gSaveBlock2Ptr->optionsTextSpeed = OPTIONS_TEXT_SPEED_MID;
|
||||
return gUnknown_841F428[gSaveBlock2Ptr->optionsTextSpeed];
|
||||
return sTextSpeedFrameDelays[gSaveBlock2Ptr->optionsTextSpeed];
|
||||
}
|
||||
|
||||
u8 CreateStartMenuWindow(u8 height)
|
||||
@@ -702,7 +708,7 @@ u16 GetStdWindowBaseTileNum(void)
|
||||
|
||||
void DrawHelpMessageWindowWithText(const u8 * text)
|
||||
{
|
||||
sub_814FE6C(CreateHelpMessageWindow(), DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
|
||||
LoadHelpMessageWindowGfx(CreateHelpMessageWindow(), DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
|
||||
PrintTextOnHelpMessageWindow(text, 2);
|
||||
}
|
||||
|
||||
@@ -711,11 +717,11 @@ void DestroyHelpMessageWindow_(void)
|
||||
DestroyHelpMessageWindow(2);
|
||||
}
|
||||
|
||||
void LoadSignPostWindowFrameGfx(void)
|
||||
void LoadSignpostWindowFrameGfx(void)
|
||||
{
|
||||
Menu_LoadStdPal();
|
||||
sub_814FEEC(0, DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
|
||||
TextWindow_SetUserSelectedFrame(0, STD_WINDOW_BASE_TILE_NUM, 0x10 * STD_WINDOW_PALETTE_NUM);
|
||||
LoadSignpostWindowGfx(0, DLG_WINDOW_BASE_TILE_NUM, 0x10 * DLG_WINDOW_PALETTE_NUM);
|
||||
LoadUserWindowGfx(0, STD_WINDOW_BASE_TILE_NUM, 0x10 * STD_WINDOW_PALETTE_NUM);
|
||||
}
|
||||
|
||||
void SetDefaultFontsPointer(void)
|
||||
|
||||
+4
-4
@@ -548,7 +548,7 @@ static void Task_OaksSpeech1(u8 taskId)
|
||||
InitTextBoxGfxAndPrinters();
|
||||
Menu_LoadStdPalAt(0xD0);
|
||||
LoadPalette(sHelpDocsPalette, 0x000, 0x080);
|
||||
LoadPalette(stdpal_get(2) + 15, 0x000, 0x002);
|
||||
LoadPalette(GetTextWindowPalette(2) + 15, 0x000, 0x002);
|
||||
break;
|
||||
case 5:
|
||||
sOakSpeechResources->textSpeed = GetTextSpeedSetting();
|
||||
@@ -629,7 +629,7 @@ static void Task_OakSpeech4(u8 taskId)
|
||||
}
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
}
|
||||
BeginNormalPaletteFade(0xFFFFDFFF, -1, 16, 0, stdpal_get(2)[15]);
|
||||
BeginNormalPaletteFade(0xFFFFDFFF, -1, 16, 0, GetTextWindowPalette(2)[15]);
|
||||
gTasks[taskId].func = Task_OaksSpeech2;
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ static void Task_OaksSpeech2(u8 taskId)
|
||||
gTasks[taskId].data[15] = 1;
|
||||
if (sOakSpeechResources->unk_0012 < 2)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFDFFF, -1, 0, 16, stdpal_get(2)[15]);
|
||||
BeginNormalPaletteFade(0xFFFFDFFF, -1, 0, 16, GetTextWindowPalette(2)[15]);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -650,7 +650,7 @@ static void Task_OaksSpeech2(u8 taskId)
|
||||
if (sOakSpeechResources->unk_0012 != 0)
|
||||
{
|
||||
gTasks[taskId].data[15] = -1;
|
||||
BeginNormalPaletteFade(0xFFFFDFFF, -1, 0, 16, stdpal_get(2)[15]);
|
||||
BeginNormalPaletteFade(0xFFFFDFFF, -1, 0, 16, GetTextWindowPalette(2)[15]);
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
+6
-6
@@ -337,17 +337,17 @@ static bool8 LoadOptionMenuPalette(void)
|
||||
switch (sOptionMenuPtr->loadPaletteState)
|
||||
{
|
||||
case 0:
|
||||
LoadBgTiles(1, GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA);
|
||||
LoadBgTiles(1, GetUserWindowGraphics(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA);
|
||||
break;
|
||||
case 1:
|
||||
LoadPalette(GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20);
|
||||
LoadPalette(GetUserWindowGraphics(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20);
|
||||
break;
|
||||
case 2:
|
||||
LoadPalette(sOptionMenuPalette, 0x10, 0x20);
|
||||
LoadPalette(stdpal_get(2), 0xF0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(2), 0xF0, 0x20);
|
||||
break;
|
||||
case 3:
|
||||
DrawWindowBorderWithStdpal3(1, 0x1B3, 0x30);
|
||||
LoadStdWindowGfxOnBg(1, 0x1B3, 0x30);
|
||||
break;
|
||||
default:
|
||||
return TRUE;
|
||||
@@ -381,8 +381,8 @@ static void Task_OptionMenu(u8 taskId)
|
||||
sOptionMenuPtr->loadState++;
|
||||
break;
|
||||
case 2:
|
||||
LoadBgTiles(1, GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA);
|
||||
LoadPalette(GetWindowFrameTilesPal(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20);
|
||||
LoadBgTiles(1, GetUserWindowGraphics(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->tiles, 0x120, 0x1AA);
|
||||
LoadPalette(GetUserWindowGraphics(sOptionMenuPtr->option[MENUITEM_FRAMETYPE])->palette, 0x20, 0x20);
|
||||
BufferOptionMenuString(sOptionMenuPtr->cursorPos);
|
||||
break;
|
||||
case 3:
|
||||
|
||||
+23
-22
@@ -48,6 +48,7 @@
|
||||
#include "vs_seeker.h"
|
||||
#include "wild_encounter.h"
|
||||
#include "constants/cable_club.h"
|
||||
#include "constants/event_objects.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/region_map_sections.h"
|
||||
#include "constants/songs.h"
|
||||
@@ -401,22 +402,22 @@ static void LoadObjEventTemplatesFromHeader(void)
|
||||
u8 i, j;
|
||||
for (i = 0, j = 0; i < gMapHeader.events->objectEventCount; i++)
|
||||
{
|
||||
if (gMapHeader.events->objectEvents[i].inConnection == 0xFF)
|
||||
if (gMapHeader.events->objectEvents[i].kind == OBJ_KIND_CLONE)
|
||||
{
|
||||
// load "in_connection" object from the connecting map
|
||||
u8 localId = gMapHeader.events->objectEvents[i].elevation;
|
||||
u8 mapNum = gMapHeader.events->objectEvents[i].trainerType;
|
||||
u8 mapGroup = gMapHeader.events->objectEvents[i].trainerRange_berryTreeId;
|
||||
// load target object from the connecting map
|
||||
u8 localId = gMapHeader.events->objectEvents[i].objUnion.clone.targetLocalId;
|
||||
u8 mapNum = gMapHeader.events->objectEvents[i].objUnion.clone.targetMapNum;
|
||||
u8 mapGroup = gMapHeader.events->objectEvents[i].objUnion.clone.targetMapGroup;
|
||||
const struct MapHeader * connectionMap = Overworld_GetMapHeaderByGroupAndId(mapGroup, mapNum);
|
||||
|
||||
gSaveBlock1Ptr->objectEventTemplates[j] = connectionMap->events->objectEvents[localId - 1];
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].localId = gMapHeader.events->objectEvents[i].localId;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].x = gMapHeader.events->objectEvents[i].x;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].y = gMapHeader.events->objectEvents[i].y;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].elevation = localId;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].trainerType = mapNum;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].trainerRange_berryTreeId = mapGroup;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].inConnection = 0xFF;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].objUnion.clone.targetLocalId = localId;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].objUnion.clone.targetMapNum = mapNum;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].objUnion.clone.targetMapGroup = mapGroup;
|
||||
gSaveBlock1Ptr->objectEventTemplates[j].kind = OBJ_KIND_CLONE;
|
||||
j++;
|
||||
}
|
||||
else
|
||||
@@ -464,7 +465,7 @@ void SetObjEventTemplateMovementType(u8 localId, u8 movementType)
|
||||
struct ObjectEventTemplate *objectEventTemplate = &savObjTemplates[i];
|
||||
if (objectEventTemplate->localId == localId)
|
||||
{
|
||||
objectEventTemplate->movementType = movementType;
|
||||
objectEventTemplate->objUnion.normal.movementType = movementType;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -806,7 +807,7 @@ static void LoadMapFromWarp(bool32 unused)
|
||||
InitMap();
|
||||
}
|
||||
|
||||
static void sub_80559A8(void)
|
||||
static void QL_LoadMapNormal(void)
|
||||
{
|
||||
bool8 isOutdoors;
|
||||
|
||||
@@ -2137,7 +2138,7 @@ static void InitObjectEventsLocal(void)
|
||||
|
||||
static void ReloadObjectsAndRunReturnToFieldMapScript(void)
|
||||
{
|
||||
ReloadMapObjectsWithOffset(0, 0);
|
||||
SpawnObjectEventsOnReturnToField(0, 0);
|
||||
RunOnReturnToFieldMapScript();
|
||||
}
|
||||
|
||||
@@ -2248,7 +2249,7 @@ static bool32 LoadMap_QLPlayback(u8 *state)
|
||||
else
|
||||
{
|
||||
gExitStairsMovementDisabled = TRUE;
|
||||
sub_80559A8();
|
||||
QL_LoadMapNormal();
|
||||
}
|
||||
(*state)++;
|
||||
break;
|
||||
@@ -3032,7 +3033,7 @@ static void LoadCableClubPlayer(s32 linkPlayerId, s32 myPlayerId, struct CableCl
|
||||
GetLinkPlayerCoords(linkPlayerId, &x, &y);
|
||||
player->pos.x = x;
|
||||
player->pos.y = y;
|
||||
player->pos.height = GetLinkPlayerElevation(linkPlayerId);
|
||||
player->pos.elevation = GetLinkPlayerElevation(linkPlayerId);
|
||||
player->metatileBehavior = MapGridGetMetatileBehaviorAt(x, y);
|
||||
}
|
||||
|
||||
@@ -3085,7 +3086,7 @@ static const u8 *TryInteractWithPlayer(struct CableClubPlayer *player)
|
||||
otherPlayerPos = player->pos;
|
||||
otherPlayerPos.x += gDirectionToVectors[player->facing].x;
|
||||
otherPlayerPos.y += gDirectionToVectors[player->facing].y;
|
||||
otherPlayerPos.height = 0;
|
||||
otherPlayerPos.elevation = 0;
|
||||
linkPlayerId = GetLinkPlayerIdAt(otherPlayerPos.x, otherPlayerPos.y);
|
||||
|
||||
if (linkPlayerId != 4)
|
||||
@@ -3295,7 +3296,7 @@ static void InitLinkPlayerObjectEventPos(struct ObjectEvent *objEvent, s16 x, s1
|
||||
objEvent->previousCoords.y = y;
|
||||
SetSpritePosToMapCoords(x, y, &objEvent->initialCoords.x, &objEvent->initialCoords.y);
|
||||
objEvent->initialCoords.x += 8;
|
||||
ObjectEventUpdateZCoord(objEvent);
|
||||
ObjectEventUpdateElevation(objEvent);
|
||||
}
|
||||
|
||||
static void SetLinkPlayerObjectRange(u8 linkPlayerId, u8 dir)
|
||||
@@ -3434,7 +3435,7 @@ static bool8 FacingHandler_DpadMovement(struct LinkPlayerObjectEvent *linkPlayer
|
||||
{
|
||||
objEvent->directionSequenceIndex = 16;
|
||||
ShiftObjectEventCoords(objEvent, x, y);
|
||||
ObjectEventUpdateZCoord(objEvent);
|
||||
ObjectEventUpdateElevation(objEvent);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
@@ -3514,13 +3515,13 @@ static void CreateLinkPlayerSprite(u8 linkPlayerId, u8 gameVersion)
|
||||
{
|
||||
if (gameVersion == VERSION_FIRE_RED || gameVersion == VERSION_LEAF_GREEN)
|
||||
{
|
||||
objEvent->spriteId = AddPseudoObjectEvent(
|
||||
objEvent->spriteId = CreateObjectGraphicsSprite(
|
||||
GetRivalAvatarGraphicsIdByStateIdAndGender(PLAYER_AVATAR_STATE_NORMAL, linkGender(objEvent)),
|
||||
SpriteCB_LinkPlayer, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
objEvent->spriteId = AddPseudoObjectEvent(GetRSAvatarGraphicsIdByGender(linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0);
|
||||
objEvent->spriteId = CreateObjectGraphicsSprite(GetRSAvatarGraphicsIdByGender(linkGender(objEvent)), SpriteCB_LinkPlayer, 0, 0, 0);
|
||||
}
|
||||
|
||||
sprite = &gSprites[objEvent->spriteId];
|
||||
@@ -3536,15 +3537,15 @@ static void SpriteCB_LinkPlayer(struct Sprite *sprite)
|
||||
struct ObjectEvent *objEvent = &gObjectEvents[linkPlayerObjEvent->objEventId];
|
||||
sprite->x = objEvent->initialCoords.x;
|
||||
sprite->y = objEvent->initialCoords.y;
|
||||
SetObjectSubpriorityByZCoord(objEvent->previousElevation, sprite, 1);
|
||||
sprite->oam.priority = ZCoordToPriority(objEvent->previousElevation);
|
||||
SetObjectSubpriorityByElevation(objEvent->previousElevation, sprite, 1);
|
||||
sprite->oam.priority = ElevationToPriority(objEvent->previousElevation);
|
||||
|
||||
if (!linkPlayerObjEvent->movementMode != MOVEMENT_MODE_FREE)
|
||||
StartSpriteAnim(sprite, GetFaceDirectionAnimNum(linkDirection(objEvent)));
|
||||
else
|
||||
StartSpriteAnimIfDifferent(sprite, GetMoveDirectionAnimNum(linkDirection(objEvent)));
|
||||
|
||||
UpdateObjectEventSpriteVisibility(sprite, 0);
|
||||
UpdateObjectEventSpriteInvisibility(sprite, FALSE);
|
||||
if (objEvent->triggerGroundEffectsOnMove)
|
||||
{
|
||||
sprite->invisible = ((sprite->data[7] & 4) >> 2);
|
||||
|
||||
+8
-8
@@ -2006,8 +2006,8 @@ static void Task_FirstBattleEnterParty_WaitFadeNormal(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
TextWindow_SetUserSelectedFrame(0, 0x4F, 0xD0);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x58, 0xF0);
|
||||
LoadUserWindowGfx(0, 0x4F, 0xD0);
|
||||
LoadStdWindowGfx(0, 0x58, 0xF0);
|
||||
if (gPartyMenu.action == PARTY_ACTION_USE_ITEM)
|
||||
DisplayPartyMenuStdMessage(PARTY_MSG_USE_ON_WHICH_MON);
|
||||
else
|
||||
@@ -2117,10 +2117,10 @@ static void InitPartyMenuWindows(u8 layout)
|
||||
DeactivateAllTextPrinters();
|
||||
for (i = 0; i < PARTY_SIZE; ++i)
|
||||
FillWindowPixelBuffer(i, PIXEL_FILL(0));
|
||||
TextWindow_SetUserSelectedFrame(0, 0x4F, 0xD0);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x58, 0xF0);
|
||||
LoadPalette(stdpal_get(2), 0xC0, 0x20);
|
||||
LoadPalette(stdpal_get(0), 0xE0, 0x20);
|
||||
LoadUserWindowGfx(0, 0x4F, 0xD0);
|
||||
LoadStdWindowGfx(0, 0x58, 0xF0);
|
||||
LoadPalette(GetTextWindowPalette(2), 0xC0, 0x20);
|
||||
LoadPalette(GetTextWindowPalette(0), 0xE0, 0x20);
|
||||
}
|
||||
|
||||
static void CreateCancelConfirmWindows(bool8 chooseMultiple)
|
||||
@@ -2603,7 +2603,7 @@ static bool8 FirstBattleEnterParty_CreateWindowAndMsg1Printer(void)
|
||||
{
|
||||
u8 windowId = AddWindow(&sWindowTemplate_FirstBattleOakVoiceover);
|
||||
|
||||
TextWindow_LoadResourcesStdFrame0(windowId, 0x4F, 0xE0);
|
||||
LoadMenuMessageWindowGfx(windowId, 0x4F, 0xE0);
|
||||
DrawDialogFrameWithCustomTileAndPalette(windowId, 1, 0x4F, 0xE);
|
||||
PartyMenu_Oak_PrintText(windowId, gText_OakImportantToGetToKnowPokemonThroughly);
|
||||
return windowId;
|
||||
@@ -2636,7 +2636,7 @@ static void ToggleFieldMoveDescriptionWindow(u8 action)
|
||||
{
|
||||
if (ptr->windowId[2] == WINDOW_NONE)
|
||||
ptr->windowId[2] = AddWindow(&sFieldMoveDescriptionWindowTemplate);
|
||||
sub_8112F18(ptr->windowId[2]);
|
||||
DrawHelpMessageWindowTilesById(ptr->windowId[2]);
|
||||
letterSpacing = GetFontAttribute(FONT_2, FONTATTR_LETTER_SPACING);
|
||||
AddTextPrinterParameterized4(ptr->windowId[2], FONT_2, 3, 6, letterSpacing, 0, sFontColorTable[5], 0, sFieldMoveDescriptionTable[action - CURSOR_OPTION_FIELD_MOVES]);
|
||||
PutWindowTilemap(ptr->windowId[2]);
|
||||
|
||||
@@ -9,14 +9,14 @@
|
||||
#include "event_data.h"
|
||||
#include "constants/moves.h"
|
||||
|
||||
static void sub_80BF97C(u8 taskId);
|
||||
static void Task_ChoosePartyMon(u8 taskId);
|
||||
|
||||
void ChoosePartyMon(void)
|
||||
{
|
||||
u8 taskId;
|
||||
|
||||
LockPlayerFieldControls();
|
||||
taskId = CreateTask(sub_80BF97C, 10);
|
||||
taskId = CreateTask(Task_ChoosePartyMon, 10);
|
||||
gTasks[taskId].data[0] = PARTY_MENU_TYPE_CHOOSE_SINGLE_MON;
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
@@ -26,12 +26,12 @@ void SelectMoveTutorMon(void)
|
||||
u8 taskId;
|
||||
|
||||
LockPlayerFieldControls();
|
||||
taskId = CreateTask(sub_80BF97C, 10);
|
||||
taskId = CreateTask(Task_ChoosePartyMon, 10);
|
||||
gTasks[taskId].data[0] = PARTY_MENU_TYPE_MOVE_RELEARNER;
|
||||
BeginNormalPaletteFade(PALETTES_ALL, 0, 0, 0x10, RGB_BLACK);
|
||||
}
|
||||
|
||||
static void sub_80BF97C(u8 taskId)
|
||||
static void Task_ChoosePartyMon(u8 taskId)
|
||||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
|
||||
+4
-4
@@ -88,8 +88,8 @@ static const struct MenuAction sMenuActions_TopMenu[] = {
|
||||
{gText_TurnOff, Task_PlayerPcTurnOff}
|
||||
};
|
||||
|
||||
static const u8 gUnknown_8402200[] = { 0, 1, 2 };
|
||||
static const u8 gUnknown_8402203[] = { 0, 1, 2 };
|
||||
static const u8 sItemOrder_BedroomPC[] = { 0, 1, 2 };
|
||||
static const u8 sItemOrder_PlayerPC[] = { 0, 1, 2 };
|
||||
|
||||
static const struct MenuAction sMenuActions_ItemPc[] = {
|
||||
{gText_WithdrawItem2, Task_PlayerPcWithdrawItem},
|
||||
@@ -154,7 +154,7 @@ void BedroomPC(void)
|
||||
|
||||
gPlayerPcMenuManager.notInRoom = FALSE;
|
||||
BackupHelpContext();
|
||||
sItemOrder = gUnknown_8402200;
|
||||
sItemOrder = sItemOrder_BedroomPC;
|
||||
sTopMenuItemCount = 3;
|
||||
taskId = CreateTask(TaskDummy, 0);
|
||||
DisplayItemMessageOnField(taskId, FONT_2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu);
|
||||
@@ -166,7 +166,7 @@ void PlayerPC(void)
|
||||
|
||||
gPlayerPcMenuManager.notInRoom = TRUE;
|
||||
BackupHelpContext();
|
||||
sItemOrder = gUnknown_8402203;
|
||||
sItemOrder = sItemOrder_PlayerPC;
|
||||
sTopMenuItemCount = 3;
|
||||
taskId = CreateTask(TaskDummy, 0);
|
||||
DisplayItemMessageOnField(taskId, FONT_2, gText_WhatWouldYouLikeToDo, Task_DrawPlayerPcTopMenu);
|
||||
|
||||
+36
-4
@@ -2,7 +2,8 @@
|
||||
#include "pokedex.h"
|
||||
#include "pokedex_screen.h"
|
||||
|
||||
const u8 *sub_8088E20(u16 dexNum)
|
||||
// Unused
|
||||
const u8 *GetPokedexCategoryName(u16 dexNum)
|
||||
{
|
||||
return gPokedexEntries[dexNum].categoryName;
|
||||
}
|
||||
@@ -47,6 +48,30 @@ u16 GetNationalPokedexCount(u8 caseID)
|
||||
return count;
|
||||
}
|
||||
|
||||
/*
|
||||
u16 GetHoennPokedexCount(u8 caseID)
|
||||
{
|
||||
u16 count = 0;
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < HOENN_DEX_COUNT; i++)
|
||||
{
|
||||
switch (caseID)
|
||||
{
|
||||
case FLAG_GET_SEEN:
|
||||
if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_SEEN))
|
||||
count++;
|
||||
break;
|
||||
case FLAG_GET_CAUGHT:
|
||||
if (GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
*/
|
||||
|
||||
u16 GetKantoPokedexCount(u8 caseID)
|
||||
{
|
||||
u16 count = 0;
|
||||
@@ -73,6 +98,7 @@ bool16 HasAllHoennMons(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
// -2 excludes Jirachi and Deoxys
|
||||
for (i = 0; i < HOENN_DEX_COUNT - 2; i++)
|
||||
{
|
||||
if (!GetSetPokedexFlag(HoennToNationalOrder(i + 1), FLAG_GET_CAUGHT))
|
||||
@@ -85,6 +111,7 @@ bool16 HasAllKantoMons(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
// -1 excludes Mew
|
||||
for (i = 0; i < KANTO_DEX_COUNT - 1; i++)
|
||||
{
|
||||
if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
|
||||
@@ -97,17 +124,22 @@ bool16 HasAllMons(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < NATIONAL_DEX_MEWTWO; i++)
|
||||
// -1 excludes Mew
|
||||
for (i = 0; i < KANTO_DEX_COUNT - 1; i++)
|
||||
{
|
||||
if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
|
||||
return FALSE;
|
||||
}
|
||||
for (i = NATIONAL_DEX_MEW; i < NATIONAL_DEX_TYRANITAR; i++)
|
||||
|
||||
// -3 excludes Lugia, Ho-Oh, and Celebi
|
||||
for (i = KANTO_DEX_COUNT; i < JOHTO_DEX_COUNT - 3; i++)
|
||||
{
|
||||
if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
|
||||
return FALSE;
|
||||
}
|
||||
for (i = NATIONAL_DEX_CELEBI; i < NATIONAL_DEX_RAYQUAZA; i++)
|
||||
|
||||
// -2 excludes Jirachi and Deoxys
|
||||
for (i = JOHTO_DEX_COUNT; i < NATIONAL_DEX_COUNT - 2; i++)
|
||||
{
|
||||
if (!GetSetPokedexFlag(i + 1, FLAG_GET_CAUGHT))
|
||||
return FALSE;
|
||||
|
||||
+5
-2
@@ -94,6 +94,9 @@ static const struct CombinedMove sCombinedMoves[2] =
|
||||
{0xFFFF, 0xFFFF, 0xFFFF}
|
||||
};
|
||||
|
||||
// NOTE: The order of the elements in the 3 arrays below is irrelevant.
|
||||
// To reorder the pokedex, see the values in include/constants/pokedex.h.
|
||||
|
||||
static const u16 sSpeciesToHoennPokedexNum[] = // Assigns all species to the Hoenn Dex Index (Summary No. for Hoenn Dex)
|
||||
{
|
||||
SPECIES_TO_HOENN(BULBASAUR),
|
||||
@@ -5008,7 +5011,7 @@ u16 GetEvolutionTargetSpecies(struct Pokemon *mon, u8 type, u16 evolutionItem)
|
||||
if (gEvolutionTable[species][i].param == heldItem)
|
||||
{
|
||||
targetSpecies = gEvolutionTable[species][i].targetSpecies;
|
||||
if (IsNationalPokedexEnabled() || targetSpecies <= 151)
|
||||
if (IsNationalPokedexEnabled() || targetSpecies <= KANTO_SPECIES_END)
|
||||
{
|
||||
heldItem = 0;
|
||||
SetMonData(mon, MON_DATA_HELD_ITEM, &heldItem);
|
||||
@@ -5664,7 +5667,7 @@ u16 SpeciesToPokedexNum(u16 species)
|
||||
{
|
||||
species = SpeciesToNationalPokedexNum(species);
|
||||
|
||||
if (!IsNationalPokedexEnabled() && species > 151)
|
||||
if (!IsNationalPokedexEnabled() && species > KANTO_SPECIES_END)
|
||||
return 0xFFFF;
|
||||
return species;
|
||||
}
|
||||
|
||||
+3
-3
@@ -3053,8 +3053,8 @@ static void LoadPokeJumpGfx(void)
|
||||
FillBgTilemapBufferRect_Palette0(BG_INTERFACE, 0, 0, 0, 0x20, 0x20);
|
||||
PrintScoreSuffixes();
|
||||
PrintScore(0);
|
||||
DrawWindowBorderWithStdpal3(0, 1, 0xE0);
|
||||
LoadUserWindowBorderGfx(0, 0x00A, 0xD0);
|
||||
LoadStdWindowGfxOnBg(0, 1, 0xE0);
|
||||
LoadUserWindowGfx2(0, 0x00A, 0xD0);
|
||||
CopyBgTilemapBufferToVram(BG_INTERFACE);
|
||||
CopyBgTilemapBufferToVram(BG_VENUSAUR);
|
||||
CopyBgTilemapBufferToVram(BG_BONUSES);
|
||||
@@ -4554,7 +4554,7 @@ static void PrintRecordsText(u16 windowId)
|
||||
recordNums[1] = records->bestJumpScore;
|
||||
recordNums[2] = records->excellentsInRow;
|
||||
|
||||
TextWindow_SetStdFrame0_WithPal(windowId, 0x21D, 0xD0);
|
||||
LoadStdWindowGfx(windowId, 0x21D, 0xD0);
|
||||
DrawTextBorderOuter(windowId, 0x21D, 0xD);
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(1));
|
||||
AddTextPrinterParameterized5(windowId, FONT_2, gText_PkmnJumpRecords, 0, 0, TEXT_SKIP_DRAW, NULL, 1, 0);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user