Merge branch 'master' into sync-ai
This commit is contained in:
@@ -10,17 +10,18 @@
|
||||
#include "menu.h"
|
||||
#include "money.h"
|
||||
#include "bag.h"
|
||||
#include "strings.h"
|
||||
|
||||
extern const u8 gText_DepositItem[];
|
||||
static const u16 sBagWindowPalF[] = INCBIN_U16("data/bag/bag_window_pal.gbapal");
|
||||
|
||||
const u16 gUnknown_8453098[] = INCBIN_U16("data/bag/bag_window_pal.gbapal");
|
||||
const u8 gUnknown_84530B8[][3] = {
|
||||
static const u8 sTextColors[][3] = {
|
||||
{0, 1, 2},
|
||||
{0, 2, 3},
|
||||
{0, 3, 2},
|
||||
{0, 8, 9}
|
||||
};
|
||||
const struct WindowTemplate gUnknown_84530C4[] = {
|
||||
|
||||
static const struct WindowTemplate sDefaultBagWindowsStd[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x0b,
|
||||
@@ -47,7 +48,8 @@ const struct WindowTemplate gUnknown_84530C4[] = {
|
||||
.baseBlock = 0x01f8
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
const struct WindowTemplate gUnknown_84530E4[] = {
|
||||
|
||||
static const struct WindowTemplate sDefaultBagWindowsDeposit[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 0x0b,
|
||||
@@ -74,7 +76,8 @@ const struct WindowTemplate gUnknown_84530E4[] = {
|
||||
.baseBlock = 0x01f8
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
const struct WindowTemplate gUnknown_8453104[] = {
|
||||
|
||||
static const struct WindowTemplate sWindowTemplates[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 24,
|
||||
@@ -99,122 +102,114 @@ const struct WindowTemplate gUnknown_8453104[] = {
|
||||
.height = 3,
|
||||
.paletteNum = 0xC,
|
||||
.baseBlock = 0x272
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 23,
|
||||
.tilemapTop = 15,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x28a
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 9,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x28a
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
.width = 26,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x2a2
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 6,
|
||||
.tilemapTop = 15,
|
||||
.width = 14,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.baseBlock = 0x2a2
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 6,
|
||||
.tilemapTop = 15,
|
||||
.width = 15,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.baseBlock = 0x2da
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 6,
|
||||
.tilemapTop = 15,
|
||||
.width = 16,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.baseBlock = 0x316
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 6,
|
||||
.tilemapTop = 15,
|
||||
.width = 23,
|
||||
.height = 4,
|
||||
.paletteNum = 0xC,
|
||||
.baseBlock = 0x356
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 22,
|
||||
.tilemapTop = 17,
|
||||
.width = 7,
|
||||
.height = 2,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x20a
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 22,
|
||||
.tilemapTop = 15,
|
||||
.width = 7,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x20a
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 22,
|
||||
.tilemapTop = 13,
|
||||
.width = 7,
|
||||
.height = 6,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x20a
|
||||
}, {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 22,
|
||||
.tilemapTop = 11,
|
||||
.width = 7,
|
||||
.height = 8,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x20a
|
||||
}
|
||||
};
|
||||
|
||||
const struct WindowTemplate gUnknown_845311C = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 23,
|
||||
.tilemapTop = 15,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x28a
|
||||
};
|
||||
static const u8 sUnused_8453174[] = {16, 8, 4};
|
||||
|
||||
const struct WindowTemplate gUnknown_8453124 = {
|
||||
.bg = 0,
|
||||
.tilemapLeft = 21,
|
||||
.tilemapTop = 9,
|
||||
.width = 6,
|
||||
.height = 4,
|
||||
.paletteNum = 0xF,
|
||||
.baseBlock = 0x28a
|
||||
};
|
||||
static EWRAM_DATA u8 sOpenWindows[11] = {};
|
||||
|
||||
const struct WindowTemplate gUnknown_845312C[] = {
|
||||
{
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x02,
|
||||
.tilemapTop = 0x0f,
|
||||
.width = 0x1a,
|
||||
.height = 0x04,
|
||||
.paletteNum = 0x0f,
|
||||
.baseBlock = 0x02a2
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x06,
|
||||
.tilemapTop = 0x0f,
|
||||
.width = 0x0e,
|
||||
.height = 0x04,
|
||||
.paletteNum = 0x0c,
|
||||
.baseBlock = 0x02a2
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x06,
|
||||
.tilemapTop = 0x0f,
|
||||
.width = 0x0f,
|
||||
.height = 0x04,
|
||||
.paletteNum = 0x0c,
|
||||
.baseBlock = 0x02da
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x06,
|
||||
.tilemapTop = 0x0f,
|
||||
.width = 0x10,
|
||||
.height = 0x04,
|
||||
.paletteNum = 0x0c,
|
||||
.baseBlock = 0x0316
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x06,
|
||||
.tilemapTop = 0x0f,
|
||||
.width = 0x17,
|
||||
.height = 0x04,
|
||||
.paletteNum = 0x0c,
|
||||
.baseBlock = 0x0356
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x16,
|
||||
.tilemapTop = 0x11,
|
||||
.width = 0x07,
|
||||
.height = 0x02,
|
||||
.paletteNum = 0x0f,
|
||||
.baseBlock = 0x020a
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x16,
|
||||
.tilemapTop = 0x0f,
|
||||
.width = 0x07,
|
||||
.height = 0x04,
|
||||
.paletteNum = 0x0f,
|
||||
.baseBlock = 0x020a
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x16,
|
||||
.tilemapTop = 0x0d,
|
||||
.width = 0x07,
|
||||
.height = 0x06,
|
||||
.paletteNum = 0x0f,
|
||||
.baseBlock = 0x020a
|
||||
}, {
|
||||
.bg = 0x00,
|
||||
.tilemapLeft = 0x16,
|
||||
.tilemapTop = 0x0b,
|
||||
.width = 0x07,
|
||||
.height = 0x08,
|
||||
.paletteNum = 0x0f,
|
||||
.baseBlock = 0x020a
|
||||
}
|
||||
};
|
||||
|
||||
const u8 gUnknown_8453174[] = {16, 8, 4};
|
||||
|
||||
EWRAM_DATA u8 gUnknown_203AD34[11] = {};
|
||||
|
||||
void sub_810B858(void)
|
||||
void InitBagWindows(void)
|
||||
{
|
||||
u8 i;
|
||||
|
||||
if (gUnknown_203ACFC.location != 3)
|
||||
InitWindows(gUnknown_84530C4);
|
||||
if (gBagMenuState.location != 3)
|
||||
InitWindows(sDefaultBagWindowsStd);
|
||||
else
|
||||
InitWindows(gUnknown_84530E4);
|
||||
InitWindows(sDefaultBagWindowsDeposit);
|
||||
DeactivateAllTextPrinters();
|
||||
TextWindow_SetUserSelectedFrame(0, 0x64, 0xE0);
|
||||
TextWindow_LoadResourcesStdFrame0(0, 0x6D, 0xD0);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 0x81, 0xC0);
|
||||
LoadPalette(gUnknown_8453098, 0xF0, 0x20);
|
||||
LoadPalette(sBagWindowPalF, 0xF0, 0x20);
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
FillWindowPixelBuffer(i, 0x00);
|
||||
@@ -223,22 +218,22 @@ void sub_810B858(void)
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
for (i = 0; i < 11; i++)
|
||||
{
|
||||
gUnknown_203AD34[i] = 0xFF;
|
||||
sOpenWindows[i] = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_810B8F0(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, s8 speed, u8 colorIdx)
|
||||
void BagPrintTextOnWindow(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 letterSpacing, u8 lineSpacing, u8 speed, u8 colorIdx)
|
||||
{
|
||||
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, gUnknown_84530B8[colorIdx], speed, str);
|
||||
AddTextPrinterParameterized4(windowId, fontId, x, y, letterSpacing, lineSpacing, sTextColors[colorIdx], speed, str);
|
||||
}
|
||||
|
||||
void sub_810B958(const u8 * str)
|
||||
void BagPrintTextOnWin1CenteredColor0(const u8 * str, u8 unused)
|
||||
{
|
||||
u32 x = 0x48 - GetStringWidth(1, str, 0);
|
||||
AddTextPrinterParameterized3(2, 1, x / 2, 1, gUnknown_84530B8[0], 0, str);
|
||||
AddTextPrinterParameterized3(2, 1, x / 2, 1, sTextColors[0], 0, str);
|
||||
}
|
||||
|
||||
void sub_810B994(void)
|
||||
void BagDrawDepositItemTextBox(void)
|
||||
{
|
||||
u32 x;
|
||||
DrawStdFrameWithCustomTileAndPalette(2, FALSE, 0x081, 0x0C);
|
||||
@@ -246,77 +241,76 @@ void sub_810B994(void)
|
||||
AddTextPrinterParameterized(2, 0, gText_DepositItem, x / 2, 1, 0, NULL);
|
||||
}
|
||||
|
||||
u8 sub_810B9DC(u8 a0, u8 a1)
|
||||
u8 ShowBagWindow(u8 whichWindow, u8 nItems)
|
||||
{
|
||||
if (gUnknown_203AD34[a0] == 0xFF)
|
||||
if (sOpenWindows[whichWindow] == 0xFF)
|
||||
{
|
||||
gUnknown_203AD34[a0] = AddWindow(&gUnknown_8453104[a0 + a1]);
|
||||
if (a0 != 6)
|
||||
sOpenWindows[whichWindow] = AddWindow(&sWindowTemplates[whichWindow + nItems]);
|
||||
if (whichWindow != 6)
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(gUnknown_203AD34[a0], FALSE, 0x064, 0x0E);
|
||||
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x064, 0xE);
|
||||
}
|
||||
else
|
||||
{
|
||||
DrawStdFrameWithCustomTileAndPalette(gUnknown_203AD34[a0], FALSE, 0x081, 0x0C);
|
||||
DrawStdFrameWithCustomTileAndPalette(sOpenWindows[whichWindow], FALSE, 0x081, 0xC);
|
||||
}
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
}
|
||||
return gUnknown_203AD34[a0];
|
||||
return sOpenWindows[whichWindow];
|
||||
}
|
||||
|
||||
void sub_810BA3C(u8 a0)
|
||||
void HideBagWindow(u8 whichWindow)
|
||||
{
|
||||
ClearStdWindowAndFrameToTransparent(gUnknown_203AD34[a0], FALSE);
|
||||
ClearWindowTilemap(gUnknown_203AD34[a0]);
|
||||
RemoveWindow(gUnknown_203AD34[a0]);
|
||||
ClearStdWindowAndFrameToTransparent(sOpenWindows[whichWindow], FALSE);
|
||||
ClearWindowTilemap(sOpenWindows[whichWindow]);
|
||||
RemoveWindow(sOpenWindows[whichWindow]);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gUnknown_203AD34[a0] = 0xFF;
|
||||
sOpenWindows[whichWindow] = 0xFF;
|
||||
}
|
||||
|
||||
u8 sub_810BA70(u8 a0)
|
||||
u8 OpenBagWindow(u8 whichWindow)
|
||||
{
|
||||
if (gUnknown_203AD34[a0] == 0xFF)
|
||||
if (sOpenWindows[whichWindow] == 0xFF)
|
||||
{
|
||||
gUnknown_203AD34[a0] = AddWindow(&gUnknown_8453104[a0]);
|
||||
sOpenWindows[whichWindow] = AddWindow(&sWindowTemplates[whichWindow]);
|
||||
}
|
||||
return gUnknown_203AD34[a0];
|
||||
return sOpenWindows[whichWindow];
|
||||
}
|
||||
|
||||
void sub_810BA9C(u8 a0)
|
||||
void CloseBagWindow(u8 whichWindow)
|
||||
{
|
||||
if (gUnknown_203AD34[a0] != 0xFF)
|
||||
if (sOpenWindows[whichWindow] != 0xFF)
|
||||
{
|
||||
ClearDialogWindowAndFrameToTransparent(gUnknown_203AD34[a0], FALSE);
|
||||
ClearWindowTilemap(gUnknown_203AD34[a0]);
|
||||
RemoveWindow(gUnknown_203AD34[a0]);
|
||||
ClearDialogWindowAndFrameToTransparent(sOpenWindows[whichWindow], FALSE);
|
||||
ClearWindowTilemap(sOpenWindows[whichWindow]);
|
||||
RemoveWindow(sOpenWindows[whichWindow]);
|
||||
PutWindowTilemap(1);
|
||||
ScheduleBgCopyTilemapToVram(0);
|
||||
gUnknown_203AD34[a0] = 0xFF;
|
||||
|
||||
sOpenWindows[whichWindow] = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
u8 sub_810BAD8(u8 a0)
|
||||
u8 GetBagWindow(u8 whichWindow)
|
||||
{
|
||||
return gUnknown_203AD34[a0];
|
||||
return sOpenWindows[whichWindow];
|
||||
}
|
||||
|
||||
void sub_810BAE8(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||
void BagCreateYesNoMenuBottomRight(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||
{
|
||||
CreateYesNoMenuWithCallbacks(taskId, &gUnknown_845311C, 2, 0, 2, 0x64, 0x0E, ptrs);
|
||||
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[3], 2, 0, 2, 0x064, 0x0E, ptrs);
|
||||
}
|
||||
|
||||
void sub_810BB14(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||
void BagCreateYesNoMenuTopRight(u8 taskId, const struct YesNoFuncTable * ptrs)
|
||||
{
|
||||
CreateYesNoMenuWithCallbacks(taskId, &gUnknown_8453124, 2, 0, 2, 0x064, 0x0E, ptrs);
|
||||
CreateYesNoMenuWithCallbacks(taskId, &sWindowTemplates[4], 2, 0, 2, 0x064, 0x0E, ptrs);
|
||||
}
|
||||
|
||||
void sub_810BB40(void)
|
||||
void BagPrintMoneyAmount(void)
|
||||
{
|
||||
PrintMoneyAmountInMoneyBoxWithBorder(sub_810B9DC(2, 0), 0x081, 0x0C, GetMoney(&gSaveBlock1Ptr->money));
|
||||
PrintMoneyAmountInMoneyBoxWithBorder(ShowBagWindow(2, 0), 0x081, 0x0C, GetMoney(&gSaveBlock1Ptr->money));
|
||||
}
|
||||
|
||||
void sub_810BB74(u8 windowId)
|
||||
void BagDrawTextBoxOnWindow(u8 windowId)
|
||||
{
|
||||
DrawTextBorderOuter(windowId, 0x064, 0x0E);
|
||||
}
|
||||
|
||||
@@ -379,9 +379,9 @@ static void OpenBagAndChooseItem(void)
|
||||
nullsub_44();
|
||||
FreeAllWindowBuffers();
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_FIRST_BATTLE)
|
||||
sub_8107ECC();
|
||||
CB2_BagMenuFromBattle();
|
||||
else
|
||||
sub_810AF74();
|
||||
InitOldManBag();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1330,7 +1330,7 @@ static void OpenBagAndChooseItem(void)
|
||||
gBattlerControllerFuncs[gActiveBattler] = CompleteWhenChoseItem;
|
||||
nullsub_44();
|
||||
FreeAllWindowBuffers();
|
||||
sub_8107ECC();
|
||||
CB2_BagMenuFromBattle();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "battle_interface.h"
|
||||
#include "battle_message.h"
|
||||
#include "reshow_battle_screen.h"
|
||||
#include "teachy_tv.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/items.h"
|
||||
#include "constants/moves.h"
|
||||
@@ -733,15 +734,15 @@ static void OpenBagAndChooseItem(void)
|
||||
FreeAllWindowBuffers();
|
||||
switch (gSpecialVar_0x8004)
|
||||
{
|
||||
case 1:
|
||||
case TTVSCR_STATUS:
|
||||
default:
|
||||
callbackId = 7;
|
||||
callbackId = ITEMMENULOCATION_TTVSCR_STATUS;
|
||||
break;
|
||||
case 3:
|
||||
callbackId = 8;
|
||||
case TTVSCR_CATCHING:
|
||||
callbackId = ITEMMENULOCATION_TTVSCR_CATCHING;
|
||||
break;
|
||||
}
|
||||
sub_810B108(callbackId);
|
||||
InitPokedudeBag(callbackId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -86,7 +86,7 @@ static u8 CreateNPCTrainerParty(struct Pokemon *party, u16 trainerNum);
|
||||
static void CB2_HandleStartBattle(void);
|
||||
static void TryCorrectShedinjaLanguage(struct Pokemon *mon);
|
||||
static void BattleMainCB1(void);
|
||||
static void CB2_QuitPokeDudeBattle(void);
|
||||
static void CB2_QuitPokedudeBattle(void);
|
||||
static void sub_80111FC(struct Sprite *sprite);
|
||||
static void sub_8011B94(void);
|
||||
static void sub_8011BB0(void);
|
||||
@@ -1438,7 +1438,7 @@ void BattleMainCB2(void)
|
||||
gSpecialVar_Result = gBattleOutcome = B_OUTCOME_DREW;
|
||||
ResetPaletteFadeControl();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 0x10, RGB_BLACK);
|
||||
SetMainCallback2(CB2_QuitPokeDudeBattle);
|
||||
SetMainCallback2(CB2_QuitPokedudeBattle);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1454,7 +1454,7 @@ void FreeRestoreBattleData(void)
|
||||
FreeBattleResources();
|
||||
}
|
||||
|
||||
static void CB2_QuitPokeDudeBattle(void)
|
||||
static void CB2_QuitPokedudeBattle(void)
|
||||
{
|
||||
UpdatePaletteFade();
|
||||
if (!gPaletteFade.active)
|
||||
|
||||
@@ -463,7 +463,7 @@ const u8 *const gPokeblockWasTooXStringTable[] = {
|
||||
|
||||
static const u8 sText_PlayerUsedItem[] = _("{B_PLAYER_NAME} used\n{B_LAST_ITEM}!");
|
||||
static const u8 sText_OldManUsedItem[] = _("The old man used\n{B_LAST_ITEM}!");
|
||||
static const u8 sText_PokeDudeUsedItem[] = _("The POKé DUDE used\n{B_LAST_ITEM}!");
|
||||
static const u8 sText_PokedudeUsedItem[] = _("The POKé DUDE used\n{B_LAST_ITEM}!");
|
||||
static const u8 sText_Trainer1UsedItem[] = _("{B_TRAINER1_CLASS} {B_TRAINER1_NAME}\nused {B_LAST_ITEM}!");
|
||||
static const u8 sText_TrainerBlockedBall[] = _("The TRAINER blocked the BALL!");
|
||||
static const u8 sText_DontBeAThief[] = _("Don't be a thief!");
|
||||
@@ -876,7 +876,7 @@ const u8 *const gBattleStringsTable[] = {
|
||||
Text_1A5D31,
|
||||
Text_1A5D6E,
|
||||
Text_1A5DB1,
|
||||
sText_PokeDudeUsedItem,
|
||||
sText_PokedudeUsedItem,
|
||||
gUnknown_83FDA4D,
|
||||
gUnknown_83FDA7A,
|
||||
gUnknown_83FDA8C,
|
||||
|
||||
+2
-2
@@ -978,7 +978,7 @@ const u8 *BattleSetup_GetScriptAddrAfterBattle(void)
|
||||
if (sTrainerBattleEndScript != NULL)
|
||||
return sTrainerBattleEndScript;
|
||||
else
|
||||
return EventScript_1C555B;
|
||||
return Test_EventScript_Sign;
|
||||
}
|
||||
|
||||
const u8 *BattleSetup_GetTrainerPostBattleScript(void)
|
||||
@@ -986,7 +986,7 @@ const u8 *BattleSetup_GetTrainerPostBattleScript(void)
|
||||
if (sTrainerABattleScriptRetAddr != NULL)
|
||||
return sTrainerABattleScriptRetAddr;
|
||||
else
|
||||
return EventScript_1C555B;
|
||||
return Test_EventScript_Sign;
|
||||
}
|
||||
|
||||
void ScrSpecial_ShowTrainerNonBattlingSpeech(void)
|
||||
|
||||
+3
-3
@@ -1269,7 +1269,7 @@ static void Task_ContextMenu_Sell(u8 taskId)
|
||||
{
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat);
|
||||
DisplayItemMessageInBerryPouch(taskId, sub_80BF8E4(), gStringVar4, Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu);
|
||||
DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_BerryPouch_DestroyDialogueWindowAndRefreshListMenu);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1285,7 +1285,7 @@ static void Task_ContextMenu_Sell(u8 taskId)
|
||||
data[2] = 99;
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell);
|
||||
DisplayItemMessageInBerryPouch(taskId, sub_80BF8E4(), gStringVar4, Task_Sell_PrintSelectMultipleUI);
|
||||
DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_Sell_PrintSelectMultipleUI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1295,7 +1295,7 @@ static void Task_AskSellMultiple(u8 taskId)
|
||||
s16 * data = gTasks[taskId].data;
|
||||
ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_BERRY_POUCH, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay);
|
||||
DisplayItemMessageInBerryPouch(taskId, sub_80BF8E4(), gStringVar4, Task_SellMultiple_CreateYesNoMenu);
|
||||
DisplayItemMessageInBerryPouch(taskId, GetDialogBoxFontId(), gStringVar4, Task_SellMultiple_CreateYesNoMenu);
|
||||
}
|
||||
|
||||
static void Task_SellMultiple_CreateYesNoMenu(u8 taskId)
|
||||
|
||||
+2
-2
@@ -920,7 +920,7 @@ static s32 RollCredits(void)
|
||||
case CREDITSSCRCMD_MON:
|
||||
sCreditsMgr->mainseqno = CREDITSSCENE_MON_DESTROY_ASSETS;
|
||||
sCreditsMgr->whichMon = sCreditsScript[sCreditsMgr->scrcmdidx].param;
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
break;
|
||||
case CREDITSSCRCMD_THEENDGFX:
|
||||
sCreditsMgr->mainseqno = CREDITSSCENE_THEEND_DESTROY_ASSETS;
|
||||
@@ -1342,7 +1342,7 @@ static s32 RollCredits(void)
|
||||
"\tstrb r0, [r2, 0x9]\n"
|
||||
"\tmovs r0, 0x1\n"
|
||||
"\tmovs r1, 0\n"
|
||||
"\tbl fade_screen\n"
|
||||
"\tbl FadeScreen\n"
|
||||
"\tb _080F3E94\n"
|
||||
"\t.align 2, 0\n"
|
||||
"_080F3E50: .4byte sCreditsMgr\n"
|
||||
|
||||
+5
-5
@@ -60,12 +60,12 @@ const struct SpriteFrameImage gTrainerBackPicTable_Leaf[] =
|
||||
gTrainerBackPic_Leaf + 0x2000, 0x0800,
|
||||
};
|
||||
|
||||
const struct SpriteFrameImage gTrainerBackPicTable_PokeDude[] =
|
||||
const struct SpriteFrameImage gTrainerBackPicTable_Pokedude[] =
|
||||
{
|
||||
gTrainerBackPic_PokeDude, 0x0800,
|
||||
gTrainerBackPic_PokeDude + 0x0800, 0x0800,
|
||||
gTrainerBackPic_PokeDude + 0x1000, 0x0800,
|
||||
gTrainerBackPic_PokeDude + 0x1800, 0x0800,
|
||||
gTrainerBackPic_Pokedude, 0x0800,
|
||||
gTrainerBackPic_Pokedude + 0x0800, 0x0800,
|
||||
gTrainerBackPic_Pokedude + 0x1000, 0x0800,
|
||||
gTrainerBackPic_Pokedude + 0x1800, 0x0800,
|
||||
};
|
||||
|
||||
const struct SpriteFrameImage gTrainerBackPicTable_OldMan[] =
|
||||
|
||||
@@ -16,7 +16,7 @@ static const union AnimCmd sAnimCmd_Leaf_1[] = {
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd sAnimCmd_PokeDude_1[] = {
|
||||
static const union AnimCmd sAnimCmd_Pokedude_1[] = {
|
||||
ANIMCMD_FRAME(1, 24),
|
||||
ANIMCMD_FRAME(2, 9),
|
||||
ANIMCMD_FRAME(3, 24),
|
||||
@@ -60,9 +60,9 @@ const union AnimCmd *const sBackAnims_Leaf[] = {
|
||||
sAnimCmd_Leaf_1
|
||||
};
|
||||
|
||||
const union AnimCmd *const sBackAnims_PokeDude[] = {
|
||||
const union AnimCmd *const sBackAnims_Pokedude[] = {
|
||||
sAnim_GeneralFrame0,
|
||||
sAnimCmd_PokeDude_1
|
||||
sAnimCmd_Pokedude_1
|
||||
};
|
||||
|
||||
const union AnimCmd *const sBackAnims_OldMan[] = {
|
||||
@@ -85,6 +85,6 @@ const union AnimCmd *const *const gTrainerBackAnimsPtrTable[] = {
|
||||
sBackAnims_Leaf,
|
||||
sBackAnims_RSBrendan,
|
||||
sBackAnims_RSMay,
|
||||
sBackAnims_PokeDude,
|
||||
sBackAnims_Pokedude,
|
||||
sBackAnims_OldMan
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ const struct CompressedSpriteSheet gTrainerBackPicTable[] = {
|
||||
{ (const u32 *)gTrainerBackPic_Leaf, 0x2800, 1 },
|
||||
{ (const u32 *)gTrainerBackPic_RSBrendan, 0x2000, 2 },
|
||||
{ (const u32 *)gTrainerBackPic_RSMay, 0x2000, 3 },
|
||||
{ (const u32 *)gTrainerBackPic_PokeDude, 0x2000, 4 },
|
||||
{ (const u32 *)gTrainerBackPic_Pokedude, 0x2000, 4 },
|
||||
{ (const u32 *)gTrainerBackPic_OldMan, 0x2000, 5 }
|
||||
};
|
||||
|
||||
@@ -21,6 +21,6 @@ const struct CompressedSpritePalette gTrainerBackPicPaletteTable[] = {
|
||||
{ gTrainerPalette_LeafBackPic, 1 },
|
||||
{ gTrainerPalette_RSBrendan1, 2 },
|
||||
{ gTrainerPalette_RSMay1, 3 },
|
||||
{ gTrainerPalette_PokeDudeBackPic, 4 },
|
||||
{ gTrainerPalette_PokedudeBackPic, 4 },
|
||||
{ gTrainerPalette_OldManBackPic, 5 }
|
||||
};
|
||||
|
||||
+113
-122
@@ -37,9 +37,11 @@
|
||||
#include "naming_screen.h"
|
||||
#include "help_system.h"
|
||||
#include "field_fadetransition.h"
|
||||
#include "constants/daycare.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/region_map.h"
|
||||
|
||||
#define EGG_MOVES_ARRAY_COUNT 10
|
||||
#define EGG_LVL_UP_MOVES_ARRAY_COUNT 50
|
||||
// Combination of RSE's Day-Care (re-used on Four Island), FRLG's Day-Care, and egg_hatch.c
|
||||
|
||||
struct EggHatchData
|
||||
{
|
||||
@@ -119,7 +121,7 @@ static const struct ListMenuItem sLevelMenuItems[] =
|
||||
{
|
||||
{gExpandedPlaceholder_Empty, 0},
|
||||
{gExpandedPlaceholder_Empty, 1},
|
||||
{gOtherText_Exit, 5}
|
||||
{gOtherText_Exit, DAYCARE_LEVEL_MENU_EXIT}
|
||||
};
|
||||
|
||||
static const struct ListMenuTemplate sDaycareListMenuLevelTemplate =
|
||||
@@ -372,7 +374,7 @@ static const s16 sEggShardVelocities[][2] =
|
||||
|
||||
// code
|
||||
|
||||
u8 *GetMonNick(struct Pokemon *mon, u8 *dest)
|
||||
static u8 *DayCare_GetMonNickname(struct Pokemon *mon, u8 *dest)
|
||||
{
|
||||
u8 nickname[POKEMON_NAME_LENGTH * 2];
|
||||
|
||||
@@ -380,7 +382,7 @@ u8 *GetMonNick(struct Pokemon *mon, u8 *dest)
|
||||
return StringCopy10(dest, nickname);
|
||||
}
|
||||
|
||||
u8 *GetBoxMonNick(struct BoxPokemon *mon, u8 *dest)
|
||||
static u8 *DayCare_GetBoxMonNickname(struct BoxPokemon *mon, u8 *dest)
|
||||
{
|
||||
u8 nickname[POKEMON_NAME_LENGTH * 2];
|
||||
|
||||
@@ -450,7 +452,7 @@ static void StorePokemonInDaycare(struct Pokemon *mon, struct DaycareMon *daycar
|
||||
u8 mailId;
|
||||
|
||||
StringCopy(daycareMon->mail.OT_name, gSaveBlock2Ptr->playerName);
|
||||
GetMonNick(mon, daycareMon->mail.monName);
|
||||
DayCare_GetMonNickname(mon, daycareMon->mail.monName);
|
||||
// StripExtCtrlCodes(daycareMon->mail.monName);
|
||||
// daycareMon->mail.gameLanguage = LANGUAGE_ENGLISH;
|
||||
// daycareMon->mail.monLanguage = GetMonData(mon, MON_DATA_LANGUAGE);
|
||||
@@ -483,8 +485,8 @@ void StoreSelectedPokemonInDaycare(void)
|
||||
static void ShiftDaycareSlots(struct DayCare *daycare)
|
||||
{
|
||||
// This condition is only satisfied when the player takes out the first pokemon from the daycare.
|
||||
if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != 0
|
||||
&& GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) == 0)
|
||||
if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != SPECIES_NONE
|
||||
&& GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) == SPECIES_NONE)
|
||||
{
|
||||
daycare->mons[0].mon = daycare->mons[1].mon;
|
||||
ZeroBoxMonData(&daycare->mons[1].mon);
|
||||
@@ -512,11 +514,8 @@ static void ApplyDaycareExperience(struct Pokemon *mon)
|
||||
while ((learnedMove = MonTryLearningNewMove(mon, firstMove)) != 0)
|
||||
{
|
||||
firstMove = FALSE;
|
||||
if (learnedMove == 0xFFFF)
|
||||
{
|
||||
// Mon already knows 4 moves.
|
||||
if (learnedMove == MON_HAS_MAX_MOVES)
|
||||
DeleteFirstMoveAndGiveMoveToMon(mon, gMoveToLearn);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -535,7 +534,7 @@ static u16 TakeSelectedPokemonFromDaycare(struct DaycareMon *daycareMon)
|
||||
u32 experience;
|
||||
struct Pokemon pokemon;
|
||||
|
||||
GetBoxMonNick(&daycareMon->mon, gStringVar1);
|
||||
DayCare_GetBoxMonNickname(&daycareMon->mon, gStringVar1);
|
||||
species = GetBoxMonData(&daycareMon->mon, MON_DATA_SPECIES);
|
||||
BoxMonToMon(&daycareMon->mon, &pokemon);
|
||||
|
||||
@@ -595,7 +594,7 @@ static u8 GetNumLevelsGainedForDaycareMon(struct DaycareMon *daycareMon)
|
||||
{
|
||||
u8 numLevelsGained = GetNumLevelsGainedFromSteps(daycareMon);
|
||||
ConvertIntToDecimalStringN(gStringVar2, numLevelsGained, STR_CONV_MODE_LEFT_ALIGN, 2);
|
||||
GetBoxMonNick(&daycareMon->mon, gStringVar1);
|
||||
DayCare_GetBoxMonNickname(&daycareMon->mon, gStringVar1);
|
||||
return numLevelsGained;
|
||||
}
|
||||
|
||||
@@ -604,7 +603,7 @@ static u32 GetDaycareCostForSelectedMon(struct DaycareMon *daycareMon)
|
||||
u32 cost;
|
||||
|
||||
u8 numLevelsGained = GetNumLevelsGainedFromSteps(daycareMon);
|
||||
GetBoxMonNick(&daycareMon->mon, gStringVar1);
|
||||
DayCare_GetBoxMonNickname(&daycareMon->mon, gStringVar1);
|
||||
cost = 100 + 100 * numLevelsGained;
|
||||
ConvertIntToDecimalStringN(gStringVar2, cost, STR_CONV_MODE_LEFT_ALIGN, 5);
|
||||
return cost;
|
||||
@@ -639,7 +638,7 @@ static void ClearDaycareMonMail(struct DayCareMail *mail)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < PLAYER_NAME_LENGTH; i++)
|
||||
for (i = 0; i < PLAYER_NAME_LENGTH/* + 1*/; i++)
|
||||
mail->OT_name[i] = 0;
|
||||
for (i = 0; i < POKEMON_NAME_LENGTH + 1; i++)
|
||||
mail->monName[i] = 0;
|
||||
@@ -777,7 +776,7 @@ static void _TriggerPendingDaycareEgg(struct DayCare *daycare)
|
||||
|
||||
static void _TriggerPendingDaycareMaleEgg(struct DayCare *daycare)
|
||||
{
|
||||
daycare->offspringPersonality = (Random()) | (0x8000);
|
||||
daycare->offspringPersonality = (Random()) | (EGG_GENDER_MALE);
|
||||
FlagSet(FLAG_PENDING_DAYCARE_EGG);
|
||||
}
|
||||
|
||||
@@ -815,7 +814,7 @@ static void RemoveIVIndexFromList(u8 *ivs, u8 selectedIv)
|
||||
static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare)
|
||||
{
|
||||
u8 i;
|
||||
u8 selectedIvs[3];
|
||||
u8 selectedIvs[INHERITED_IV_COUNT];
|
||||
u8 availableIVs[NUM_STATS];
|
||||
u8 whichParent[ARRAY_COUNT(selectedIvs)];
|
||||
u8 iv;
|
||||
@@ -829,17 +828,15 @@ static void InheritIVs(struct Pokemon *egg, struct DayCare *daycare)
|
||||
// Select the 3 IVs that will be inherited.
|
||||
for (i = 0; i < ARRAY_COUNT(selectedIvs); i++)
|
||||
{
|
||||
// Randomly pick an IV from the available list.
|
||||
// Randomly pick an IV from the available list and stop from being chosen again.
|
||||
selectedIvs[i] = availableIVs[Random() % (NUM_STATS - i)];
|
||||
|
||||
// Remove the selected IV index from the available IV indices.
|
||||
RemoveIVIndexFromList(availableIVs, selectedIvs[i]);
|
||||
}
|
||||
|
||||
// Determine which parent each of the selected IVs should inherit from.
|
||||
for (i = 0; i < ARRAY_COUNT(selectedIvs); i++)
|
||||
{
|
||||
whichParent[i] = Random() % 2;
|
||||
whichParent[i] = Random() % DAYCARE_MON_COUNT;
|
||||
}
|
||||
|
||||
// Set each of inherited IVs on the egg mon.
|
||||
@@ -921,14 +918,14 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
|
||||
numSharedParentMoves = 0;
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
sHatchedEggMotherMoves[i] = 0;
|
||||
sHatchedEggFatherMoves[i] = 0;
|
||||
sHatchedEggFinalMoves[i] = 0;
|
||||
sHatchedEggMotherMoves[i] = MOVE_NONE;
|
||||
sHatchedEggFatherMoves[i] = MOVE_NONE;
|
||||
sHatchedEggFinalMoves[i] = MOVE_NONE;
|
||||
}
|
||||
for (i = 0; i < EGG_MOVES_ARRAY_COUNT; i++)
|
||||
sHatchedEggEggMoves[i] = 0;
|
||||
sHatchedEggEggMoves[i] = MOVE_NONE;
|
||||
for (i = 0; i < EGG_LVL_UP_MOVES_ARRAY_COUNT; i++)
|
||||
sHatchedEggLevelUpMoves[i] = 0;
|
||||
sHatchedEggLevelUpMoves[i] = MOVE_NONE;
|
||||
|
||||
numLevelUpMoves = GetLevelUpMovesBySpecies(GetMonData(egg, MON_DATA_SPECIES), sHatchedEggLevelUpMoves);
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
@@ -947,7 +944,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
|
||||
{
|
||||
if (sHatchedEggFatherMoves[i] == sHatchedEggEggMoves[j])
|
||||
{
|
||||
if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == 0xFFFF)
|
||||
if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == MON_HAS_MAX_MOVES)
|
||||
DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]);
|
||||
break;
|
||||
}
|
||||
@@ -966,7 +963,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
|
||||
{
|
||||
if (sHatchedEggFatherMoves[i] == ItemIdToBattleMoveId(ITEM_TM01/*_FOCUS_PUNCH*/ + j) && CanMonLearnTMHM(egg, j))
|
||||
{
|
||||
if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == 0xFFFF)
|
||||
if (GiveMoveToMon(egg, sHatchedEggFatherMoves[i]) == MON_HAS_MAX_MOVES)
|
||||
DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFatherMoves[i]);
|
||||
}
|
||||
}
|
||||
@@ -991,7 +988,7 @@ static void BuildEggMoveset(struct Pokemon *egg, struct BoxPokemon *father, stru
|
||||
{
|
||||
if (sHatchedEggLevelUpMoves[j] != MOVE_NONE && sHatchedEggFinalMoves[i] == sHatchedEggLevelUpMoves[j])
|
||||
{
|
||||
if (GiveMoveToMon(egg, sHatchedEggFinalMoves[i]) == 0xFFFF)
|
||||
if (GiveMoveToMon(egg, sHatchedEggFinalMoves[i]) == MON_HAS_MAX_MOVES)
|
||||
DeleteFirstMoveAndGiveMoveToMon(egg, sHatchedEggFinalMoves[i]);
|
||||
break;
|
||||
}
|
||||
@@ -1036,7 +1033,7 @@ static void AlterEggSpeciesWithIncenseItem(u16 *species, struct DayCare *daycare
|
||||
|
||||
if (motherItem == ITEM_LIGHT_BALL || fatherItem == ITEM_LIGHT_BALL)
|
||||
{
|
||||
if (GiveMoveToMon(mon, MOVE_VOLT_TACKLE) == 0xFFFF)
|
||||
if (GiveMoveToMon(mon, MOVE_VOLT_TACKLE) == MON_HAS_MAX_MOVES)
|
||||
DeleteFirstMoveAndGiveMoveToMon(mon, MOVE_VOLT_TACKLE);
|
||||
}
|
||||
}*/
|
||||
@@ -1044,13 +1041,13 @@ static void AlterEggSpeciesWithIncenseItem(u16 *species, struct DayCare *daycare
|
||||
static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parentSlots)
|
||||
{
|
||||
u16 i;
|
||||
u16 species[2];
|
||||
u16 species[DAYCARE_MON_COUNT];
|
||||
u16 eggSpecies;
|
||||
|
||||
// Determine which of the daycare mons is the mother and father of the egg.
|
||||
// The 0th index of the parentSlots array is considered the mother slot, and the
|
||||
// 1st index is the father slot.
|
||||
for (i = 0; i < 2; i++)
|
||||
for (i = 0; i < DAYCARE_MON_COUNT; i++)
|
||||
{
|
||||
species[i] = GetBoxMonData(&daycare->mons[i].mon, MON_DATA_SPECIES);
|
||||
if (species[i] == SPECIES_DITTO)
|
||||
@@ -1066,11 +1063,11 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
|
||||
}
|
||||
|
||||
eggSpecies = GetEggSpecies(species[parentSlots[0]]);
|
||||
if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & 0x8000)
|
||||
if (eggSpecies == SPECIES_NIDORAN_F && daycare->offspringPersonality & EGG_GENDER_MALE)
|
||||
{
|
||||
eggSpecies = SPECIES_NIDORAN_M;
|
||||
}
|
||||
if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & 0x8000)
|
||||
if (eggSpecies == SPECIES_ILLUMISE && daycare->offspringPersonality & EGG_GENDER_MALE)
|
||||
{
|
||||
eggSpecies = SPECIES_VOLBEAT;
|
||||
}
|
||||
@@ -1078,19 +1075,19 @@ static u16 DetermineEggSpeciesAndParentSlots(struct DayCare *daycare, u8 *parent
|
||||
// Make Ditto the "mother" slot if the other daycare mon is male.
|
||||
if (species[parentSlots[1]] == SPECIES_DITTO && GetBoxMonGender(&daycare->mons[parentSlots[0]].mon) != MON_FEMALE)
|
||||
{
|
||||
u8 temp = parentSlots[1];
|
||||
u8 ditto = parentSlots[1];
|
||||
parentSlots[1] = parentSlots[0];
|
||||
parentSlots[0] = temp;
|
||||
parentSlots[0] = ditto;
|
||||
}
|
||||
|
||||
return eggSpecies;
|
||||
}
|
||||
|
||||
static void _GiveEggFromDaycare(struct DayCare *daycare) // give_egg
|
||||
static void _GiveEggFromDaycare(struct DayCare *daycare)
|
||||
{
|
||||
struct Pokemon egg;
|
||||
u16 species;
|
||||
u8 parentSlots[2]; // 0th index is "mother" daycare slot, 1st is "father"
|
||||
u8 parentSlots[DAYCARE_MON_COUNT];
|
||||
bool8 isEgg;
|
||||
|
||||
species = DetermineEggSpeciesAndParentSlots(daycare, parentSlots);
|
||||
@@ -1118,7 +1115,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
|
||||
u8 metLocation;
|
||||
u8 isEgg;
|
||||
|
||||
CreateMon(mon, species, EGG_HATCH_LEVEL, 0x20, FALSE, 0, FALSE, 0);
|
||||
CreateMon(mon, species, EGG_HATCH_LEVEL, 32, FALSE, 0, OT_ID_PLAYER_ID, 0);
|
||||
metLevel = 0;
|
||||
ball = ITEM_POKE_BALL;
|
||||
language = LANGUAGE_JAPANESE;
|
||||
@@ -1129,7 +1126,7 @@ void CreateEgg(struct Pokemon *mon, u16 species, bool8 setHotSpringsLocation)
|
||||
SetMonData(mon, MON_DATA_LANGUAGE, &language);
|
||||
if (setHotSpringsLocation)
|
||||
{
|
||||
metLocation = 253; // hot springs; see PokemonSummaryScreen_PrintEggTrainerMemo
|
||||
metLocation = METLOC_SPECIAL_EGG;
|
||||
SetMonData(mon, MON_DATA_MET_LOCATION, &metLocation);
|
||||
}
|
||||
|
||||
@@ -1145,7 +1142,7 @@ static void SetInitialEggData(struct Pokemon *mon, u16 species, struct DayCare *
|
||||
u8 language;
|
||||
|
||||
personality = daycare->offspringPersonality | (Random() << 16);
|
||||
CreateMon(mon, species, EGG_HATCH_LEVEL, 0x20, TRUE, personality, FALSE, 0);
|
||||
CreateMon(mon, species, EGG_HATCH_LEVEL, 32, TRUE, personality, OT_ID_PLAYER_ID, 0);
|
||||
metLevel = 0;
|
||||
ball = ITEM_POKE_BALL;
|
||||
language = LANGUAGE_JAPANESE;
|
||||
@@ -1161,7 +1158,7 @@ void GiveEggFromDaycare(void)
|
||||
_GiveEggFromDaycare(&gSaveBlock1Ptr->daycare);
|
||||
}
|
||||
|
||||
static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
|
||||
static bool8 TryProduceOrHatchEgg(struct DayCare *daycare)
|
||||
{
|
||||
u32 i, validEggs = 0;
|
||||
|
||||
@@ -1171,15 +1168,16 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
|
||||
daycare->mons[i].steps++, validEggs++;
|
||||
}
|
||||
|
||||
// try to trigger poke sex
|
||||
if (daycare->offspringPersonality == 0 && validEggs == 2 && (daycare->mons[1].steps & 0xFF) == 0xFF)
|
||||
// Check if an egg should be produced
|
||||
if (daycare->offspringPersonality == 0 && validEggs == DAYCARE_MON_COUNT && (daycare->mons[1].steps & 0xFF) == 0xFF)
|
||||
{
|
||||
u8 loveScore = GetDaycareCompatibilityScore(daycare);
|
||||
if (loveScore > (Random() * 100u) / USHRT_MAX)
|
||||
u8 compatability = GetDaycareCompatibilityScore(daycare);
|
||||
if (compatability > (Random() * 100u) / USHRT_MAX)
|
||||
TriggerPendingDaycareEgg();
|
||||
}
|
||||
|
||||
if (++daycare->stepCounter == 255) // hatch an egg
|
||||
// Hatch Egg
|
||||
if (++daycare->stepCounter == 255)
|
||||
{
|
||||
u32 steps;
|
||||
|
||||
@@ -1191,10 +1189,9 @@ static bool8 _DoEggActions_CheckHatch(struct DayCare *daycare)
|
||||
continue;
|
||||
|
||||
steps = GetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP);
|
||||
if (steps != 0) // subtract needed steps
|
||||
if (steps != 0)
|
||||
{
|
||||
steps -= 1;
|
||||
|
||||
SetMonData(&gPlayerParty[i], MON_DATA_FRIENDSHIP, &steps);
|
||||
}
|
||||
else // hatch the egg
|
||||
@@ -1212,7 +1209,7 @@ bool8 ShouldEggHatch(void)
|
||||
{
|
||||
if (GetBoxMonData(&gSaveBlock1Ptr->route5DayCareMon.mon, MON_DATA_SANITY_HAS_SPECIES))
|
||||
gSaveBlock1Ptr->route5DayCareMon.steps++;
|
||||
return _DoEggActions_CheckHatch(&gSaveBlock1Ptr->daycare);
|
||||
return TryProduceOrHatchEgg(&gSaveBlock1Ptr->daycare);
|
||||
}
|
||||
|
||||
static bool8 IsEggPending(struct DayCare *daycare)
|
||||
@@ -1226,22 +1223,22 @@ static bool8 IsEggPending(struct DayCare *daycare)
|
||||
static void _GetDaycareMonNicknames(struct DayCare *daycare)
|
||||
{
|
||||
u8 text[12];
|
||||
if (GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) != 0)
|
||||
if (GetBoxMonData(&daycare->mons[0].mon, MON_DATA_SPECIES) != SPECIES_NONE)
|
||||
{
|
||||
GetBoxMonNick(&daycare->mons[0].mon, gStringVar1);
|
||||
DayCare_GetBoxMonNickname(&daycare->mons[0].mon, gStringVar1);
|
||||
GetBoxMonData(&daycare->mons[0].mon, MON_DATA_OT_NAME, text);
|
||||
StringCopy(gStringVar3, text);
|
||||
}
|
||||
|
||||
if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != 0)
|
||||
if (GetBoxMonData(&daycare->mons[1].mon, MON_DATA_SPECIES) != SPECIES_NONE)
|
||||
{
|
||||
GetBoxMonNick(&daycare->mons[1].mon, gStringVar2);
|
||||
DayCare_GetBoxMonNickname(&daycare->mons[1].mon, gStringVar2);
|
||||
}
|
||||
}
|
||||
|
||||
u16 GetSelectedMonNickAndSpecies(void)
|
||||
u16 GetSelectedMonNicknameAndSpecies(void)
|
||||
{
|
||||
GetBoxMonNick(&gPlayerParty[GetCursorSelectionMonId()].box, gStringVar1);
|
||||
DayCare_GetBoxMonNickname(&gPlayerParty[GetCursorSelectionMonId()].box, gStringVar1);
|
||||
return GetBoxMonData(&gPlayerParty[GetCursorSelectionMonId()].box, MON_DATA_SPECIES);
|
||||
}
|
||||
|
||||
@@ -1252,26 +1249,19 @@ void GetDaycareMonNicknames(void)
|
||||
|
||||
u8 GetDaycareState(void)
|
||||
{
|
||||
// The daycare can be in 4 possible states:
|
||||
// 0: default state--no deposited mons, no egg
|
||||
// 1: there is an egg waiting for the player to pick it up
|
||||
// 2: there is a single pokemon in the daycare
|
||||
// 3: there are two pokemon in the daycare, no egg
|
||||
|
||||
u8 numMons;
|
||||
if (IsEggPending(&gSaveBlock1Ptr->daycare))
|
||||
{
|
||||
// There is an Egg waiting for the player.
|
||||
return 1;
|
||||
return DAYCARE_EGG_WAITING;
|
||||
}
|
||||
|
||||
numMons = CountPokemonInDaycare(&gSaveBlock1Ptr->daycare);
|
||||
if (numMons != 0)
|
||||
{
|
||||
return numMons + 1;
|
||||
return numMons + 1; // DAYCARE_ONE_MON or DAYCARE_TWO_MONS
|
||||
}
|
||||
|
||||
return 0;
|
||||
return DAYCARE_NO_MONS;
|
||||
}
|
||||
|
||||
u8 GetDaycarePokemonCount(void)
|
||||
@@ -1283,15 +1273,15 @@ u8 GetDaycarePokemonCount(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Determine if the two given egg group lists contain any of the
|
||||
// same egg groups.
|
||||
static bool8 EggGroupsOverlap(u16 *eggGroups1, u16 *eggGroups2)
|
||||
{
|
||||
// Determine if the two given egg group lists contain any of the
|
||||
// same egg groups.
|
||||
s32 i, j;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
for (i = 0; i < EGG_GROUPS_PER_MON; i++)
|
||||
{
|
||||
for (j = 0; j < 2; j++)
|
||||
for (j = 0; j < EGG_GROUPS_PER_MON; j++)
|
||||
{
|
||||
if (eggGroups1[i] == eggGroups2[j])
|
||||
return TRUE;
|
||||
@@ -1304,12 +1294,12 @@ static bool8 EggGroupsOverlap(u16 *eggGroups1, u16 *eggGroups2)
|
||||
static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
|
||||
{
|
||||
u32 i;
|
||||
u16 eggGroups[2][2];
|
||||
u16 species[2];
|
||||
u32 trainerIds[2];
|
||||
u32 genders[2];
|
||||
u16 eggGroups[DAYCARE_MON_COUNT][EGG_GROUPS_PER_MON];
|
||||
u16 species[DAYCARE_MON_COUNT];
|
||||
u32 trainerIds[DAYCARE_MON_COUNT];
|
||||
u32 genders[DAYCARE_MON_COUNT];
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
for (i = 0; i < DAYCARE_MON_COUNT; i++)
|
||||
{
|
||||
u32 personality;
|
||||
|
||||
@@ -1323,41 +1313,42 @@ static u8 GetDaycareCompatibilityScore(struct DayCare *daycare)
|
||||
|
||||
// check unbreedable egg group
|
||||
if (eggGroups[0][0] == EGG_GROUP_UNDISCOVERED || eggGroups[1][0] == EGG_GROUP_UNDISCOVERED)
|
||||
return 0;
|
||||
return PARENTS_INCOMPATIBLE;
|
||||
// two Ditto can't breed
|
||||
if (eggGroups[0][0] == EGG_GROUP_DITTO && eggGroups[1][0] == EGG_GROUP_DITTO)
|
||||
return 0;
|
||||
return PARENTS_INCOMPATIBLE;
|
||||
|
||||
// now that we checked, one ditto can breed with any other mon
|
||||
// one parent is Ditto
|
||||
if (eggGroups[0][0] == EGG_GROUP_DITTO || eggGroups[1][0] == EGG_GROUP_DITTO)
|
||||
{
|
||||
if (trainerIds[0] == trainerIds[1]) // same trainer
|
||||
return 20;
|
||||
if (trainerIds[0] == trainerIds[1])
|
||||
return PARENTS_LOW_COMPATIBILITY;
|
||||
|
||||
return 50; // different trainers, more chance of poke sex
|
||||
return PARENTS_MED_COMPATABILITY;
|
||||
}
|
||||
// neither parent is Ditto
|
||||
else
|
||||
{
|
||||
if (genders[0] == genders[1]) // no homo
|
||||
return 0;
|
||||
if (genders[0] == genders[1])
|
||||
return PARENTS_INCOMPATIBLE;
|
||||
if (genders[0] == MON_GENDERLESS || genders[1] == MON_GENDERLESS)
|
||||
return 0;
|
||||
if (!EggGroupsOverlap(eggGroups[0], eggGroups[1])) // not compatible with each other
|
||||
return 0;
|
||||
return PARENTS_INCOMPATIBLE;
|
||||
if (!EggGroupsOverlap(eggGroups[0], eggGroups[1]))
|
||||
return PARENTS_INCOMPATIBLE;
|
||||
|
||||
if (species[0] == species[1]) // same species
|
||||
if (species[0] == species[1])
|
||||
{
|
||||
if (trainerIds[0] == trainerIds[1]) // same species and trainer
|
||||
return 50;
|
||||
if (trainerIds[0] == trainerIds[1])
|
||||
return PARENTS_MED_COMPATABILITY; // same species, same trainer
|
||||
|
||||
return 70; // different trainers, same species
|
||||
return PARENTS_MAX_COMPATABILITY; // same species, different trainers
|
||||
}
|
||||
else
|
||||
{
|
||||
if (trainerIds[0] != trainerIds[1]) // different trainers, different species
|
||||
return 50;
|
||||
if (trainerIds[0] != trainerIds[1])
|
||||
return PARENTS_MED_COMPATABILITY; // different species, different trainers
|
||||
|
||||
return 20; // different species, same trainer
|
||||
return PARENTS_LOW_COMPATIBILITY; // different species, same trainer
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1374,13 +1365,13 @@ void SetDaycareCompatibilityString(void)
|
||||
|
||||
relationshipScore = GetDaycareCompatibilityScoreFromSave();
|
||||
whichString = 0;
|
||||
if (relationshipScore == 0)
|
||||
if (relationshipScore == PARENTS_INCOMPATIBLE)
|
||||
whichString = 3;
|
||||
if (relationshipScore == 20)
|
||||
if (relationshipScore == PARENTS_LOW_COMPATIBILITY)
|
||||
whichString = 2;
|
||||
if (relationshipScore == 50)
|
||||
if (relationshipScore == PARENTS_MED_COMPATABILITY)
|
||||
whichString = 1;
|
||||
if (relationshipScore == 70)
|
||||
if (relationshipScore == PARENTS_MAX_COMPATABILITY)
|
||||
whichString = 0;
|
||||
|
||||
StringCopy(gStringVar4, sCompatibilityMessages[whichString]);
|
||||
@@ -1389,20 +1380,20 @@ void SetDaycareCompatibilityString(void)
|
||||
bool8 NameHasGenderSymbol(const u8 *name, u8 genderRatio)
|
||||
{
|
||||
u8 i;
|
||||
u8 symbolsCount[2]; // male, female
|
||||
symbolsCount[0] = symbolsCount[1] = 0;
|
||||
u8 symbolsCount[GENDER_COUNT];
|
||||
symbolsCount[MALE] = symbolsCount[FEMALE] = 0;
|
||||
|
||||
for (i = 0; name[i] != EOS; i++)
|
||||
{
|
||||
if (name[i] == CHAR_MALE)
|
||||
symbolsCount[0]++;
|
||||
symbolsCount[MALE]++;
|
||||
if (name[i] == CHAR_FEMALE)
|
||||
symbolsCount[1]++;
|
||||
symbolsCount[FEMALE]++;
|
||||
}
|
||||
|
||||
if (genderRatio == MON_MALE && symbolsCount[0] != 0 && symbolsCount[1] == 0)
|
||||
if (genderRatio == MON_MALE && symbolsCount[MALE] != 0 && symbolsCount[FEMALE] == 0)
|
||||
return TRUE;
|
||||
if (genderRatio == MON_FEMALE && symbolsCount[1] != 0 && symbolsCount[0] == 0)
|
||||
if (genderRatio == MON_FEMALE && symbolsCount[FEMALE] != 0 && symbolsCount[MALE] == 0)
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
@@ -1431,13 +1422,13 @@ static u8 *AppendMonGenderSymbol(u8 *name, struct BoxPokemon *boxMon)
|
||||
|
||||
static void GetDaycareLevelMenuText(struct DayCare *daycare, u8 *dest)
|
||||
{
|
||||
u8 monNames[2][20];
|
||||
u8 monNames[DAYCARE_MON_COUNT][20];
|
||||
u8 i;
|
||||
|
||||
*dest = EOS;
|
||||
for (i = 0; i < 2; i++)
|
||||
for (i = 0; i < DAYCARE_MON_COUNT; i++)
|
||||
{
|
||||
GetBoxMonNick(&daycare->mons[i].mon, monNames[i]);
|
||||
DayCare_GetBoxMonNickname(&daycare->mons[i].mon, monNames[i]);
|
||||
AppendMonGenderSymbol(monNames[i], &daycare->mons[i].mon);
|
||||
}
|
||||
|
||||
@@ -1455,7 +1446,7 @@ static void GetDaycareLevelMenuLevelText(struct DayCare *daycare, u8 *dest)
|
||||
u8 text[20];
|
||||
|
||||
*dest = EOS;
|
||||
for (i = 0; i < 2; i++)
|
||||
for (i = 0; i < DAYCARE_MON_COUNT; i++)
|
||||
{
|
||||
StringAppend(dest, gText_Lv);
|
||||
level = GetLevelAfterDaycareSteps(&daycare->mons[i].mon, daycare->mons[i].steps);
|
||||
@@ -1487,13 +1478,13 @@ static void DaycareAddTextPrinter(u8 windowId, const u8 *text, u32 x, u32 y)
|
||||
AddTextPrinter(&printer, 0xFF, NULL);
|
||||
}
|
||||
|
||||
static void DaycarePrintMonNick(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
|
||||
static void DaycarePrintMonNickname(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
|
||||
{
|
||||
u8 nick[POKEMON_NAME_LENGTH * 2];
|
||||
u8 nickname[POKEMON_NAME_LENGTH * 2];
|
||||
|
||||
GetBoxMonNick(&daycare->mons[daycareSlotId].mon, nick);
|
||||
AppendMonGenderSymbol(nick, &daycare->mons[daycareSlotId].mon);
|
||||
DaycareAddTextPrinter(windowId, nick, 8, y);
|
||||
DayCare_GetBoxMonNickname(&daycare->mons[daycareSlotId].mon, nickname);
|
||||
AppendMonGenderSymbol(nickname, &daycare->mons[daycareSlotId].mon);
|
||||
DaycareAddTextPrinter(windowId, nickname, 8, y);
|
||||
}
|
||||
|
||||
static void DaycarePrintMonLvl(struct DayCare *daycare, u8 windowId, u32 daycareSlotId, u32 y)
|
||||
@@ -1519,7 +1510,7 @@ static void DaycarePrintMonInfo(u8 windowId, s32 daycareSlotId, u8 y)
|
||||
{
|
||||
if (daycareSlotId < (unsigned) DAYCARE_MON_COUNT)
|
||||
{
|
||||
DaycarePrintMonNick(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
|
||||
DaycarePrintMonNickname(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
|
||||
DaycarePrintMonLvl(&gSaveBlock1Ptr->daycare, windowId, daycareSlotId, y);
|
||||
}
|
||||
}
|
||||
@@ -1539,8 +1530,8 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
|
||||
case 1:
|
||||
gSpecialVar_Result = input;
|
||||
break;
|
||||
case 5:
|
||||
gSpecialVar_Result = 2;
|
||||
case DAYCARE_LEVEL_MENU_EXIT:
|
||||
gSpecialVar_Result = DAYCARE_EXITED_LEVEL_MENU;
|
||||
break;
|
||||
}
|
||||
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
|
||||
@@ -1551,7 +1542,7 @@ static void Task_HandleDaycareLevelMenuInput(u8 taskId)
|
||||
}
|
||||
else if (gMain.newKeys & B_BUTTON)
|
||||
{
|
||||
gSpecialVar_Result = 2;
|
||||
gSpecialVar_Result = DAYCARE_EXITED_LEVEL_MENU;
|
||||
DestroyListMenuTask(gTasks[taskId].tMenuListTaskId, NULL, NULL);
|
||||
ClearStdWindowAndFrame(gTasks[taskId].tWindowId, TRUE);
|
||||
RemoveWindow(gTasks[taskId].tWindowId);
|
||||
@@ -1697,7 +1688,7 @@ static void AddHatchedMonToParty(u8 id)
|
||||
GetSetPokedexFlag(pokeNum, FLAG_SET_SEEN);
|
||||
GetSetPokedexFlag(pokeNum, FLAG_SET_CAUGHT);
|
||||
|
||||
GetMonNick(mon, gStringVar1);
|
||||
DayCare_GetMonNickname(mon, gStringVar1);
|
||||
|
||||
ball = ITEM_POKE_BALL;
|
||||
SetMonData(mon, MON_DATA_POKEBALL, &ball);
|
||||
@@ -1722,7 +1713,7 @@ static bool8 sub_8046E34(struct DayCare *daycare, u8 daycareId)
|
||||
u8 nick[0x20];
|
||||
struct DaycareMon *daycareMon = &daycare->mons[daycareId];
|
||||
|
||||
GetBoxMonNick(&daycareMon->mon, nick);
|
||||
DayCare_GetBoxMonNickname(&daycareMon->mon, nick);
|
||||
if (daycareMon->mail.message.itemId != 0
|
||||
&& (StringCompare(nick, daycareMon->mail.monName) != 0
|
||||
|| StringCompare(gSaveBlock2Ptr->playerName, daycareMon->mail.OT_name) != 0))
|
||||
@@ -1963,7 +1954,7 @@ static void CB2_EggHatch_1(void)
|
||||
}
|
||||
break;
|
||||
case 5:
|
||||
GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
|
||||
DayCare_GetMonNickname(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_HatchedFromEgg);
|
||||
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 3, 0xFF);
|
||||
PlayFanfare(MUS_FANFA5);
|
||||
@@ -1980,7 +1971,7 @@ static void CB2_EggHatch_1(void)
|
||||
sEggHatchData->CB2_state++;
|
||||
break;
|
||||
case 8:
|
||||
GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
|
||||
DayCare_GetMonNickname(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_NickHatchPrompt);
|
||||
EggHatchPrintMessage(sEggHatchData->windowId, gStringVar4, 0, 2, 1);
|
||||
sEggHatchData->CB2_state++;
|
||||
@@ -1997,7 +1988,7 @@ static void CB2_EggHatch_1(void)
|
||||
switch (Menu_ProcessInputNoWrapClearOnChoose())
|
||||
{
|
||||
case 0:
|
||||
GetMonNick(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3);
|
||||
DayCare_GetMonNickname(&gPlayerParty[sEggHatchData->eggPartyID], gStringVar3);
|
||||
species = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_SPECIES);
|
||||
gender = GetMonGender(&gPlayerParty[sEggHatchData->eggPartyID]);
|
||||
personality = GetMonData(&gPlayerParty[sEggHatchData->eggPartyID], MON_DATA_PERSONALITY, 0);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
bool8 walkrun_is_standing_still(void)
|
||||
{
|
||||
if (gPlayerAvatar.running1 == 1)
|
||||
if (gPlayerAvatar.tileTransitionState == 1)
|
||||
return FALSE;
|
||||
else
|
||||
return TRUE;
|
||||
|
||||
+11
-11
@@ -56,12 +56,12 @@ void pal_fill_for_maplights(void)
|
||||
{
|
||||
case 0:
|
||||
palette_bg_faded_fill_black();
|
||||
fade_screen(0, 0);
|
||||
FadeScreen(0, 0);
|
||||
palette_bg_faded_fill_black();
|
||||
break;
|
||||
case 1:
|
||||
palette_bg_faded_fill_white();
|
||||
fade_screen(2, 0);
|
||||
FadeScreen(2, 0);
|
||||
palette_bg_faded_fill_white();
|
||||
break;
|
||||
}
|
||||
@@ -73,12 +73,12 @@ static void sub_807DBAC(void)
|
||||
{
|
||||
case 0:
|
||||
palette_bg_faded_fill_black();
|
||||
fade_screen(0, 3);
|
||||
FadeScreen(0, 3);
|
||||
palette_bg_faded_fill_black();
|
||||
break;
|
||||
case 1:
|
||||
palette_bg_faded_fill_white();
|
||||
fade_screen(2, 3);
|
||||
FadeScreen(2, 3);
|
||||
palette_bg_faded_fill_white();
|
||||
break;
|
||||
}
|
||||
@@ -87,7 +87,7 @@ static void sub_807DBAC(void)
|
||||
void sub_807DC00(void)
|
||||
{
|
||||
palette_bg_faded_fill_black();
|
||||
fade_screen(0, 0);
|
||||
FadeScreen(0, 0);
|
||||
palette_bg_faded_fill_black();
|
||||
}
|
||||
|
||||
@@ -95,16 +95,16 @@ void sub_807DC18(void)
|
||||
{
|
||||
const struct MapHeader *header = warp1_get_mapheader();
|
||||
if (header->regionMapSectionId != gMapHeader.regionMapSectionId && sub_80F8110(header->regionMapSectionId, FALSE))
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
else
|
||||
{
|
||||
switch (sub_80C9D7C(GetCurrentMapType(), header->mapType))
|
||||
{
|
||||
case 0:
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
break;
|
||||
case 1:
|
||||
fade_screen(3, 0);
|
||||
FadeScreen(3, 0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -115,10 +115,10 @@ static void sub_807DC70(void)
|
||||
switch (sub_80C9D7C(GetCurrentMapType(), warp1_get_mapheader()->mapType))
|
||||
{
|
||||
case 0:
|
||||
fade_screen(1, 3);
|
||||
FadeScreen(1, 3);
|
||||
break;
|
||||
case 1:
|
||||
fade_screen(3, 3);
|
||||
FadeScreen(3, 3);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -654,7 +654,7 @@ static void sub_807E678(u8 taskId)
|
||||
{
|
||||
case 0:
|
||||
ClearLinkCallback_2();
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
sub_8055F88();
|
||||
PlaySE(SE_KAIDAN);
|
||||
data[0]++;
|
||||
|
||||
@@ -1816,7 +1816,7 @@ static const struct {
|
||||
{MAP_GROUP(ROCKET_HIDEOUT_B1F), MAP_NUM(ROCKET_HIDEOUT_B1F), MAP_GROUP(CELADON_CITY_GAME_CORNER), MAP_NUM(CELADON_CITY_GAME_CORNER)},
|
||||
{MAP_GROUP(SAFARI_ZONE_CENTER), MAP_NUM(SAFARI_ZONE_CENTER), MAP_GROUP(FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE), MAP_NUM(FUCHSIA_CITY_SAFARI_ZONE_ENTRANCE)},
|
||||
{MAP_GROUP(FUCHSIA_CITY_GYM), MAP_NUM(FUCHSIA_CITY_GYM), MAP_GROUP(FUCHSIA_CITY), MAP_NUM(FUCHSIA_CITY)},
|
||||
{MAP_GROUP(FUCHSIA_CITY_BUILDING1), MAP_NUM(FUCHSIA_CITY_BUILDING1), MAP_GROUP(FUCHSIA_CITY), MAP_NUM(FUCHSIA_CITY)},
|
||||
{MAP_GROUP(FUCHSIA_CITY_WARDENS_HOUSE), MAP_NUM(FUCHSIA_CITY_WARDENS_HOUSE), MAP_GROUP(FUCHSIA_CITY), MAP_NUM(FUCHSIA_CITY)},
|
||||
{MAP_GROUP(SAFFRON_CITY_DOJO), MAP_NUM(SAFFRON_CITY_DOJO), MAP_GROUP(SAFFRON_CITY), MAP_NUM(SAFFRON_CITY)},
|
||||
{MAP_GROUP(SAFFRON_CITY_GYM), MAP_NUM(SAFFRON_CITY_GYM), MAP_GROUP(SAFFRON_CITY), MAP_NUM(SAFFRON_CITY)},
|
||||
{MAP_GROUP(SILPH_CO_1F), MAP_NUM(SILPH_CO_1F), MAP_GROUP(SAFFRON_CITY), MAP_NUM(SAFFRON_CITY)},
|
||||
|
||||
+2400
File diff suppressed because it is too large
Load Diff
+76
-72
@@ -5,14 +5,14 @@
|
||||
#include "malloc.h"
|
||||
#include "constants/items.h"
|
||||
|
||||
static EWRAM_DATA u8 gUnknown_2039878[12] = {0};
|
||||
EWRAM_DATA void * gUnknown_2039884 = NULL;
|
||||
static EWRAM_DATA void * gUnknown_2039888 = NULL;
|
||||
static EWRAM_DATA u8 sItemMenuIconSpriteIds[12] = {0};
|
||||
static EWRAM_DATA void * sItemIconTilesBuffer = NULL;
|
||||
static EWRAM_DATA void * sItemIconTilesBufferPadded = NULL;
|
||||
|
||||
static void sub_8098560(struct Sprite * sprite);
|
||||
static void sub_80985BC(struct Sprite * sprite);
|
||||
|
||||
static const struct OamData gUnknown_83D416C = {
|
||||
static const struct OamData sOamData_BagOrSatchel = {
|
||||
.affineMode = ST_OAM_AFFINE_NORMAL,
|
||||
.shape = ST_OAM_SQUARE,
|
||||
.size = 3,
|
||||
@@ -20,36 +20,36 @@ static const struct OamData gUnknown_83D416C = {
|
||||
.paletteNum = 0
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_83D4174[] = {
|
||||
static const union AnimCmd sAnim_BagOrSatchel_OpenItemPocket[] = {
|
||||
ANIMCMD_FRAME( 0, 5),
|
||||
ANIMCMD_FRAME(0x40, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_83D4180[] = {
|
||||
static const union AnimCmd sAnim_BagOrSatchel_OpenKeyItemPocket[] = {
|
||||
ANIMCMD_FRAME( 0, 5),
|
||||
ANIMCMD_FRAME(0x80, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_83D418C[] = {
|
||||
static const union AnimCmd sAnim_BagOrSatchel_OpenPokeBallsPocket[] = {
|
||||
ANIMCMD_FRAME( 0, 5),
|
||||
ANIMCMD_FRAME(0xc0, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_83D4198[] = {
|
||||
gUnknown_83D4180,
|
||||
gUnknown_83D418C,
|
||||
gUnknown_83D4174
|
||||
static const union AnimCmd *const sAnimTable_BagOrSatchel[] = {
|
||||
sAnim_BagOrSatchel_OpenKeyItemPocket,
|
||||
sAnim_BagOrSatchel_OpenPokeBallsPocket,
|
||||
sAnim_BagOrSatchel_OpenItemPocket
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D41A4[] = {
|
||||
static const union AffineAnimCmd sAffineAnim_Idle[] = {
|
||||
AFFINEANIMCMD_FRAME(0x100, 0x100, 0, 0),
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd gUnknown_83D41B4[] = {
|
||||
static const union AffineAnimCmd sAffineAnim_Wobble[] = {
|
||||
AFFINEANIMCMD_FRAME(0, 0, -2, 2),
|
||||
AFFINEANIMCMD_FRAME(0, 0, 2, 4),
|
||||
AFFINEANIMCMD_FRAME(0, 0, -2, 4),
|
||||
@@ -57,35 +57,35 @@ static const union AffineAnimCmd gUnknown_83D41B4[] = {
|
||||
AFFINEANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AffineAnimCmd *const gUnknown_83D41DC[] = {
|
||||
gUnknown_83D41A4,
|
||||
gUnknown_83D41B4
|
||||
static const union AffineAnimCmd *const sAffineAnimTable_BagOrSatchel[] = {
|
||||
sAffineAnim_Idle,
|
||||
sAffineAnim_Wobble
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gUnknown_83D41E4 = {
|
||||
const struct CompressedSpriteSheet gSpriteSheet_Backpack = {
|
||||
gUnknown_8E8362C,
|
||||
0x2000,
|
||||
100
|
||||
};
|
||||
|
||||
const struct CompressedSpriteSheet gUnknown_83D41EC = {
|
||||
const struct CompressedSpriteSheet gSpriteSheet_Satchel = {
|
||||
gUnknown_8E83DBC,
|
||||
0x2000,
|
||||
100
|
||||
};
|
||||
|
||||
const struct CompressedSpritePalette gUnknown_83D41F4 = {
|
||||
const struct CompressedSpritePalette gSpritePalette_BagOrSatchel = {
|
||||
gUnknown_8E84560,
|
||||
100
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_83D41FC = {
|
||||
static const struct SpriteTemplate sSpriteTemplate_BagOrSatchel = {
|
||||
100,
|
||||
100,
|
||||
&gUnknown_83D416C,
|
||||
gUnknown_83D4198,
|
||||
&sOamData_BagOrSatchel,
|
||||
sAnimTable_BagOrSatchel,
|
||||
NULL,
|
||||
gUnknown_83D41DC,
|
||||
sAffineAnimTable_BagOrSatchel,
|
||||
SpriteCallbackDummy
|
||||
};
|
||||
|
||||
@@ -139,7 +139,7 @@ static const struct SpriteTemplate gUnknown_83D4250 = {
|
||||
SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const struct OamData gUnknown_83D4268 = {
|
||||
static const struct OamData sOamData_ItemIcon = {
|
||||
.affineMode = ST_OAM_AFFINE_OFF,
|
||||
.shape = ST_OAM_SQUARE,
|
||||
.size = 2,
|
||||
@@ -147,26 +147,26 @@ static const struct OamData gUnknown_83D4268 = {
|
||||
.paletteNum = 2
|
||||
};
|
||||
|
||||
static const union AnimCmd gUnknown_83D4270[] = {
|
||||
static const union AnimCmd sAnim_ItemIcon_0[] = {
|
||||
ANIMCMD_FRAME(0, 0),
|
||||
ANIMCMD_END
|
||||
};
|
||||
|
||||
static const union AnimCmd *const gUnknown_83D4278[] = {
|
||||
gUnknown_83D4270
|
||||
static const union AnimCmd *const sAnimTable_ItemIcon[] = {
|
||||
sAnim_ItemIcon_0
|
||||
};
|
||||
|
||||
static const struct SpriteTemplate gUnknown_83D427C = {
|
||||
static const struct SpriteTemplate sSpriteTemplate_ItemIcon = {
|
||||
102,
|
||||
102,
|
||||
&gUnknown_83D4268,
|
||||
gUnknown_83D4278,
|
||||
&sOamData_ItemIcon,
|
||||
sAnimTable_ItemIcon,
|
||||
NULL,
|
||||
gDummySpriteAffineAnimTable,
|
||||
SpriteCallbackDummy
|
||||
};
|
||||
|
||||
static const void *const gUnknown_83D4294[][2] = {
|
||||
static const void *const sItemIconGfxPtrs[][2] = {
|
||||
{gFile_graphics_items_icons_question_mark_sheet, gFile_graphics_items_icon_palettes_question_mark_palette},
|
||||
{gFile_graphics_items_icons_master_ball_sheet, gFile_graphics_items_icon_palettes_master_ball_palette},
|
||||
{gFile_graphics_items_icons_ultra_ball_sheet, gFile_graphics_items_icon_palettes_ultra_ball_palette},
|
||||
@@ -549,19 +549,19 @@ void ResetItemMenuIconState(void)
|
||||
{
|
||||
u16 i;
|
||||
|
||||
for (i = 0; i < NELEMS(gUnknown_2039878); i++)
|
||||
gUnknown_2039878[i] = 0xFF;
|
||||
for (i = 0; i < NELEMS(sItemMenuIconSpriteIds); i++)
|
||||
sItemMenuIconSpriteIds[i] = 0xFF;
|
||||
}
|
||||
|
||||
void sub_80984FC(u8 animNum)
|
||||
void CreateBagOrSatchelSprite(u8 animNum)
|
||||
{
|
||||
gUnknown_2039878[0] = CreateSprite(&gUnknown_83D41FC, 40, 68, 0);
|
||||
sItemMenuIconSpriteIds[0] = CreateSprite(&sSpriteTemplate_BagOrSatchel, 40, 68, 0);
|
||||
sub_8098528(animNum);
|
||||
}
|
||||
|
||||
void sub_8098528(u8 animNum)
|
||||
{
|
||||
struct Sprite * sprite = &gSprites[gUnknown_2039878[0]];
|
||||
struct Sprite * sprite = &gSprites[sItemMenuIconSpriteIds[0]];
|
||||
sprite->pos2.y = -5;
|
||||
sprite->callback = sub_8098560;
|
||||
StartSpriteAnim(sprite, animNum);
|
||||
@@ -577,7 +577,7 @@ static void sub_8098560(struct Sprite * sprite)
|
||||
|
||||
void sub_8098580(void)
|
||||
{
|
||||
struct Sprite * sprite = &gSprites[gUnknown_2039878[0]];
|
||||
struct Sprite * sprite = &gSprites[sItemMenuIconSpriteIds[0]];
|
||||
if (sprite->affineAnimEnded)
|
||||
{
|
||||
StartSpriteAffineAnim(sprite, 1);
|
||||
@@ -594,40 +594,44 @@ static void sub_80985BC(struct Sprite * sprite)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80985E4(void)
|
||||
void ItemMenuIcons_CreateInsertIndicatorBarHidden(void)
|
||||
{
|
||||
u8 i;
|
||||
u8 * ptr = &gUnknown_2039878[1];
|
||||
u8 * ptr = &sItemMenuIconSpriteIds[1];
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
ptr[i] = CreateSprite(&gUnknown_83D4250, i * 16 + 0x60, 7, 0);
|
||||
if (i != 0)
|
||||
switch (i)
|
||||
{
|
||||
if (i == 8)
|
||||
StartSpriteAnim(&gSprites[ptr[i]], 2);
|
||||
else
|
||||
StartSpriteAnim(&gSprites[ptr[i]], 1);
|
||||
case 0:
|
||||
break;
|
||||
case 8:
|
||||
StartSpriteAnim(&gSprites[ptr[i]], 2);
|
||||
break;
|
||||
default:
|
||||
StartSpriteAnim(&gSprites[ptr[i]], 1);
|
||||
break;
|
||||
}
|
||||
gSprites[ptr[i]].invisible = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_8098660(u8 flag)
|
||||
void ItemMenuIcons_ToggleInsertIndicatorBarVisibility(bool8 invisible)
|
||||
{
|
||||
u8 i;
|
||||
u8 * ptr = &gUnknown_2039878[1];
|
||||
u8 * ptr = &sItemMenuIconSpriteIds[1];
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
gSprites[ptr[i]].invisible = flag;
|
||||
gSprites[ptr[i]].invisible = invisible;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_80986A8(s16 x, u16 y)
|
||||
void ItemMenuIcons_MoveInsertIndicatorBar(s16 x, u16 y)
|
||||
{
|
||||
u8 i;
|
||||
u8 * ptr = &gUnknown_2039878[1];
|
||||
u8 * ptr = &sItemMenuIconSpriteIds[1];
|
||||
|
||||
for (i = 0; i < 9; i++)
|
||||
{
|
||||
@@ -636,15 +640,15 @@ void sub_80986A8(s16 x, u16 y)
|
||||
}
|
||||
}
|
||||
|
||||
static bool8 sub_80986EC(void)
|
||||
static bool8 TryAllocItemIconTilesBuffers(void)
|
||||
{
|
||||
void ** ptr1, ** ptr2;
|
||||
|
||||
ptr1 = &gUnknown_2039884;
|
||||
ptr1 = &sItemIconTilesBuffer;
|
||||
*ptr1 = Alloc(0x120);
|
||||
if (*ptr1 == NULL)
|
||||
return FALSE;
|
||||
ptr2 = &gUnknown_2039888;
|
||||
ptr2 = &sItemIconTilesBufferPadded;
|
||||
*ptr2 = AllocZeroed(0x200);
|
||||
if (*ptr2 == NULL)
|
||||
{
|
||||
@@ -671,27 +675,27 @@ u8 AddItemIconObject(u16 tilesTag, u16 paletteTag, u16 itemId)
|
||||
struct CompressedSpritePalette spritePalette;
|
||||
u8 spriteId;
|
||||
|
||||
if (!sub_80986EC())
|
||||
if (!TryAllocItemIconTilesBuffers())
|
||||
return MAX_SPRITES;
|
||||
|
||||
LZDecompressWram(sub_8098974(itemId, 0), gUnknown_2039884);
|
||||
CopyItemIconPicTo4x4Buffer(gUnknown_2039884, gUnknown_2039888);
|
||||
spriteSheet.data = gUnknown_2039888;
|
||||
LZDecompressWram(GetItemIconGfxPtr(itemId, 0), sItemIconTilesBuffer);
|
||||
CopyItemIconPicTo4x4Buffer(sItemIconTilesBuffer, sItemIconTilesBufferPadded);
|
||||
spriteSheet.data = sItemIconTilesBufferPadded;
|
||||
spriteSheet.size = 0x200;
|
||||
spriteSheet.tag = tilesTag;
|
||||
LoadSpriteSheet(&spriteSheet);
|
||||
|
||||
spritePalette.data = sub_8098974(itemId, 1);
|
||||
spritePalette.data = GetItemIconGfxPtr(itemId, 1);
|
||||
spritePalette.tag = paletteTag;
|
||||
LoadCompressedSpritePalette(&spritePalette);
|
||||
|
||||
CpuCopy16(&gUnknown_83D427C, &template, sizeof(struct SpriteTemplate));
|
||||
CpuCopy16(&sSpriteTemplate_ItemIcon, &template, sizeof(struct SpriteTemplate));
|
||||
template.tileTag = tilesTag;
|
||||
template.paletteTag = paletteTag;
|
||||
spriteId = CreateSprite(&template, 0, 0, 0);
|
||||
|
||||
Free(gUnknown_2039884);
|
||||
Free(gUnknown_2039888);
|
||||
Free(sItemIconTilesBuffer);
|
||||
Free(sItemIconTilesBufferPadded);
|
||||
return spriteId;
|
||||
}
|
||||
|
||||
@@ -702,17 +706,17 @@ u8 AddItemIconObjectWithCustomObjectTemplate(const struct SpriteTemplate * origT
|
||||
struct CompressedSpritePalette spritePalette;
|
||||
u8 spriteId;
|
||||
|
||||
if (!sub_80986EC())
|
||||
if (!TryAllocItemIconTilesBuffers())
|
||||
return MAX_SPRITES;
|
||||
|
||||
LZDecompressWram(sub_8098974(itemId, 0), gUnknown_2039884);
|
||||
CopyItemIconPicTo4x4Buffer(gUnknown_2039884, gUnknown_2039888);
|
||||
spriteSheet.data = gUnknown_2039888;
|
||||
LZDecompressWram(GetItemIconGfxPtr(itemId, 0), sItemIconTilesBuffer);
|
||||
CopyItemIconPicTo4x4Buffer(sItemIconTilesBuffer, sItemIconTilesBufferPadded);
|
||||
spriteSheet.data = sItemIconTilesBufferPadded;
|
||||
spriteSheet.size = 0x200;
|
||||
spriteSheet.tag = tilesTag;
|
||||
LoadSpriteSheet(&spriteSheet);
|
||||
|
||||
spritePalette.data = sub_8098974(itemId, 1);
|
||||
spritePalette.data = GetItemIconGfxPtr(itemId, 1);
|
||||
spritePalette.tag = paletteTag;
|
||||
LoadCompressedSpritePalette(&spritePalette);
|
||||
|
||||
@@ -721,14 +725,14 @@ u8 AddItemIconObjectWithCustomObjectTemplate(const struct SpriteTemplate * origT
|
||||
template.paletteTag = paletteTag;
|
||||
spriteId = CreateSprite(&template, 0, 0, 0);
|
||||
|
||||
Free(gUnknown_2039884);
|
||||
Free(gUnknown_2039888);
|
||||
Free(sItemIconTilesBuffer);
|
||||
Free(sItemIconTilesBufferPadded);
|
||||
return spriteId;
|
||||
}
|
||||
|
||||
void CreateItemMenuIcon(u16 itemId, u8 idx)
|
||||
{
|
||||
u8 * ptr = &gUnknown_2039878[10];
|
||||
u8 * ptr = &sItemMenuIconSpriteIds[10];
|
||||
u8 spriteId;
|
||||
|
||||
if (ptr[idx] == 0xFF)
|
||||
@@ -747,7 +751,7 @@ void CreateItemMenuIcon(u16 itemId, u8 idx)
|
||||
|
||||
void DestroyItemMenuIcon(u8 idx)
|
||||
{
|
||||
u8 * ptr = &gUnknown_2039878[10];
|
||||
u8 * ptr = &sItemMenuIconSpriteIds[10];
|
||||
|
||||
if (ptr[idx] != 0xFF)
|
||||
{
|
||||
@@ -756,16 +760,16 @@ void DestroyItemMenuIcon(u8 idx)
|
||||
}
|
||||
}
|
||||
|
||||
const void * sub_8098974(u16 itemId, u8 attrId)
|
||||
const void * GetItemIconGfxPtr(u16 itemId, u8 attrId)
|
||||
{
|
||||
if (itemId > ITEM_N_A)
|
||||
itemId = ITEM_NONE;
|
||||
return gUnknown_83D4294[itemId][attrId];
|
||||
return sItemIconGfxPtrs[itemId][attrId];
|
||||
}
|
||||
|
||||
void sub_80989A0(u16 itemId, u8 idx)
|
||||
{
|
||||
u8 * ptr = &gUnknown_2039878[10];
|
||||
u8 * ptr = &sItemMenuIconSpriteIds[10];
|
||||
u8 spriteId;
|
||||
|
||||
if (ptr[idx] == 0xFF)
|
||||
|
||||
+7
-7
@@ -348,7 +348,7 @@ static bool8 ItemPc_DoGfxSetup(void)
|
||||
gMain.state++;
|
||||
break;
|
||||
case 14:
|
||||
sub_80985E4();
|
||||
ItemMenuIcons_CreateInsertIndicatorBarHidden();
|
||||
gMain.state++;
|
||||
break;
|
||||
case 15:
|
||||
@@ -780,8 +780,8 @@ static void ItemPc_MoveItemModeInit(u8 taskId, s16 pos)
|
||||
StringExpandPlaceholders(gStringVar4, gOtherText_WhereShouldTheStrVar1BePlaced);
|
||||
FillWindowPixelBuffer(1, 0x00);
|
||||
ItemPc_AddTextPrinterParameterized(1, 2, gStringVar4, 0, 3, 2, 3, 0, 0);
|
||||
sub_80986A8(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
||||
sub_8098660(0);
|
||||
ItemMenuIcons_MoveInsertIndicatorBar(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
||||
ItemMenuIcons_ToggleInsertIndicatorBarVisibility(FALSE);
|
||||
ItemPc_PrintOrRemoveCursor(data[0], 2);
|
||||
gTasks[taskId].func = Task_ItemPcMoveItemModeRun;
|
||||
}
|
||||
@@ -792,7 +792,7 @@ static void Task_ItemPcMoveItemModeRun(u8 taskId)
|
||||
|
||||
ListMenu_ProcessInput(data[0]);
|
||||
ListMenuGetScrollAndRow(data[0], &sListMenuState.scroll, &sListMenuState.row);
|
||||
sub_80986A8(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
||||
ItemMenuIcons_MoveInsertIndicatorBar(-32, ListMenuGetYCoordForPrintingArrowCursor(data[0]));
|
||||
if (JOY_NEW(A_BUTTON | SELECT_BUTTON))
|
||||
{
|
||||
PlaySE(SE_SELECT);
|
||||
@@ -814,13 +814,13 @@ static void ItemPc_InsertItemIntoNewSlot(u8 taskId, u32 pos)
|
||||
ItemPc_MoveItemModeCancel(taskId, pos);
|
||||
else
|
||||
{
|
||||
ItemMenu_MoveItemSlotToNewPositionInArray(gSaveBlock1Ptr->pcItems, data[1], pos);
|
||||
MoveItemSlotInList(gSaveBlock1Ptr->pcItems, data[1], pos);
|
||||
DestroyListMenuTask(data[0], &sListMenuState.scroll, &sListMenuState.row);
|
||||
if (data[1] < pos)
|
||||
sListMenuState.row--;
|
||||
ItemPc_BuildListMenuTemplate();
|
||||
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sListMenuState.scroll, sListMenuState.row);
|
||||
sub_8098660(1);
|
||||
ItemMenuIcons_ToggleInsertIndicatorBarVisibility(TRUE);
|
||||
gTasks[taskId].func = Task_ItemPcMain;
|
||||
}
|
||||
}
|
||||
@@ -834,7 +834,7 @@ static void ItemPc_MoveItemModeCancel(u8 taskId, u32 pos)
|
||||
sListMenuState.row--;
|
||||
ItemPc_BuildListMenuTemplate();
|
||||
data[0] = ListMenuInit(&gMultiuseListMenuTemplate, sListMenuState.scroll, sListMenuState.row);
|
||||
sub_8098660(1);
|
||||
ItemMenuIcons_ToggleInsertIndicatorBarVisibility(TRUE);
|
||||
gTasks[taskId].func = Task_ItemPcMain;
|
||||
}
|
||||
|
||||
|
||||
+22
-22
@@ -154,7 +154,7 @@ static void sub_80A0FBC(u8 taskId)
|
||||
{
|
||||
ItemMenu_SetExitCallback(gUnknown_83E2954[itemType]);
|
||||
if (itemType == 1)
|
||||
sub_8108CB4();
|
||||
Bag_BeginCloseWin0Animation();
|
||||
ItemMenu_StartFadeToExitCallback(taskId);
|
||||
}
|
||||
}
|
||||
@@ -188,7 +188,7 @@ static void sub_80A10C4(u8 taskId, bool8 a1, u8 a2, const u8 * str)
|
||||
{
|
||||
StringExpandPlaceholders(gStringVar4, str);
|
||||
if (a1 == FALSE)
|
||||
DisplayItemMessageInBag(taskId, a2, gStringVar4, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, a2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||
else
|
||||
DisplayItemMessageOnField(taskId, a2, gStringVar4, sub_80A112C);
|
||||
}
|
||||
@@ -345,7 +345,7 @@ void FieldUseFunc_CoinCase(u8 taskId)
|
||||
StringExpandPlaceholders(gStringVar4, gUnknown_8416537);
|
||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
||||
if (gTasks[taskId].data[3] == 0)
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||
else
|
||||
DisplayItemMessageOnField(taskId, 2, gStringVar4, sub_80A112C);
|
||||
}
|
||||
@@ -356,7 +356,7 @@ void FieldUseFunc_PowderJar(u8 taskId)
|
||||
StringExpandPlaceholders(gStringVar4, gUnknown_8416644);
|
||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
||||
if (gTasks[taskId].data[3] == 0)
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||
else
|
||||
DisplayItemMessageOnField(taskId, 2, gStringVar4, sub_80A112C);
|
||||
}
|
||||
@@ -384,7 +384,7 @@ void FieldUseFunc_PokeFlute(u8 taskId)
|
||||
{
|
||||
// Now that's a catchy tune!
|
||||
if (gTasks[taskId].data[3] == 0)
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_841665C, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_841665C, Task_ReturnToBagFromContextMenu);
|
||||
else
|
||||
DisplayItemMessageOnField(taskId, 2, gUnknown_841665C, sub_80A112C);
|
||||
}
|
||||
@@ -401,7 +401,7 @@ static void sub_80A1674(u8 taskId)
|
||||
if (WaitFanfare(FALSE))
|
||||
{
|
||||
if (gTasks[taskId].data[3] == 0)
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_84166A7, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_84166A7, Task_ReturnToBagFromContextMenu);
|
||||
else
|
||||
DisplayItemMessageOnField(taskId, 2, gUnknown_84166A7, sub_80A112C);
|
||||
}
|
||||
@@ -458,7 +458,7 @@ void FieldUseFunc_TmCase(u8 taskId)
|
||||
else
|
||||
{
|
||||
StopPokemonLeagueLightingEffectTask();
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = Task_InitTMCaseFromField;
|
||||
}
|
||||
}
|
||||
@@ -489,7 +489,7 @@ void FieldUseFunc_BerryPouch(u8 taskId)
|
||||
else
|
||||
{
|
||||
StopPokemonLeagueLightingEffectTask();
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = Task_InitBerryPouchFromField;
|
||||
}
|
||||
}
|
||||
@@ -518,7 +518,7 @@ void BattleUseFunc_BerryPouch(u8 taskId)
|
||||
|
||||
static void InitBerryPouchFromBattle(void)
|
||||
{
|
||||
InitBerryPouch(BERRYPOUCH_FROMBATTLE, sub_8107ECC, 0);
|
||||
InitBerryPouch(BERRYPOUCH_FROMBATTLE, CB2_BagMenuFromBattle, 0);
|
||||
}
|
||||
|
||||
void FieldUseFunc_TeachyTv(u8 taskId)
|
||||
@@ -532,7 +532,7 @@ void FieldUseFunc_TeachyTv(u8 taskId)
|
||||
else
|
||||
{
|
||||
StopPokemonLeagueLightingEffectTask();
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = Task_InitTeachyTvFromField;
|
||||
}
|
||||
}
|
||||
@@ -562,7 +562,7 @@ void FieldUseFunc_SuperRepel(u8 taskId)
|
||||
}
|
||||
else
|
||||
// An earlier repel is still in effect
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_841659E, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_841659E, Task_ReturnToBagFromContextMenu);
|
||||
}
|
||||
|
||||
static void sub_80A19E8(u8 taskId)
|
||||
@@ -572,15 +572,15 @@ static void sub_80A19E8(u8 taskId)
|
||||
ItemUse_SetQuestLogEvent(QL_EVENT_USED_ITEM, NULL, gSpecialVar_ItemId, 0xFFFF);
|
||||
VarSet(VAR_REPEL_STEP_COUNT, ItemId_GetHoldEffectParam(gSpecialVar_ItemId));
|
||||
sub_80A1A44();
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_80A1A44(void)
|
||||
{
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
sub_8108DC8(ItemId_GetPocket(gSpecialVar_ItemId));
|
||||
sub_81089F4(ItemId_GetPocket(gSpecialVar_ItemId));
|
||||
Pocket_CalculateNItemsAndMaxShowed(ItemId_GetPocket(gSpecialVar_ItemId));
|
||||
PocketCalculateInitialCursorPosAndItemsAbove(ItemId_GetPocket(gSpecialVar_ItemId));
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar2);
|
||||
StringExpandPlaceholders(gStringVar4, gUnknown_841658C);
|
||||
}
|
||||
@@ -613,7 +613,7 @@ static void sub_80A1B48(u8 taskId)
|
||||
if (++gTasks[taskId].data[8] > 7)
|
||||
{
|
||||
PlaySE(SE_BIDORO);
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gStringVar4, Task_ReturnToBagFromContextMenu);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -662,7 +662,7 @@ void FieldUseFunc_TownMap(u8 taskId)
|
||||
else
|
||||
{
|
||||
StopPokemonLeagueLightingEffectTask();
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = sub_80A1CC0;
|
||||
}
|
||||
}
|
||||
@@ -694,7 +694,7 @@ void FieldUseFunc_FameChecker(u8 taskId)
|
||||
else
|
||||
{
|
||||
StopPokemonLeagueLightingEffectTask();
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = sub_80A1D68;
|
||||
}
|
||||
}
|
||||
@@ -745,18 +745,18 @@ void BattleUseFunc_PokeBallEtc(u8 taskId)
|
||||
if (!IsPlayerPartyAndPokemonStorageFull())
|
||||
{
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
sub_8108CB4();
|
||||
Bag_BeginCloseWin0Animation();
|
||||
ItemMenu_StartFadeToExitCallback(taskId);
|
||||
}
|
||||
else
|
||||
{
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_8416631, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gUnknown_8416631, Task_ReturnToBagFromContextMenu);
|
||||
}
|
||||
}
|
||||
|
||||
void BattleUseFunc_PokeFlute(u8 taskId)
|
||||
{
|
||||
sub_8108CB4();
|
||||
Bag_BeginCloseWin0Animation();
|
||||
ItemMenu_StartFadeToExitCallback(taskId);
|
||||
}
|
||||
|
||||
@@ -764,7 +764,7 @@ void BattleUseFunc_GuardSpec(u8 taskId)
|
||||
{
|
||||
if (ExecuteTableBasedItemEffect(&gPlayerParty[gBattlerPartyIndexes[gBattlerInMenuId]], gSpecialVar_ItemId, gBattlerPartyIndexes[gBattlerInMenuId], 0))
|
||||
{
|
||||
DisplayItemMessageInBag(taskId, 2, gText_WontHaveEffect, sub_810A1F8);
|
||||
DisplayItemMessageInBag(taskId, 2, gText_WontHaveEffect, Task_ReturnToBagFromContextMenu);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -790,7 +790,7 @@ static void Task_BattleUse_StatBooster_WaitButton_ReturnToBattle(u8 taskId)
|
||||
{
|
||||
if (JOY_NEW(A_BUTTON) || JOY_NEW(B_BUTTON))
|
||||
{
|
||||
sub_8108CB4();
|
||||
Bag_BeginCloseWin0Animation();
|
||||
ItemMenu_StartFadeToExitCallback(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1917,7 +1917,7 @@ void ClearAndInitHostRFUtgtGname(void)
|
||||
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, 0, 0, 0);
|
||||
}
|
||||
|
||||
void sub_80FAF58(u8 a0, u32 a1, u32 a2)
|
||||
void SetHostRFUtgtGname(u8 a0, u32 a1, u32 a2)
|
||||
{
|
||||
InitHostRFUtgtGname(&gHostRFUtgtGnameBuffer, a0, a2, a1);
|
||||
}
|
||||
@@ -1944,7 +1944,7 @@ void sub_80FAFE0(u8 a0)
|
||||
void sub_80FB008(u8 a0, u32 a1, u32 a2)
|
||||
{
|
||||
if (a0)
|
||||
sub_80FAF58(a0, a1, a2);
|
||||
SetHostRFUtgtGname(a0, a1, a2);
|
||||
rfu_REQ_configGameData(0, 2, (void *)&gHostRFUtgtGnameBuffer, gHostRFUtgtUnameBuffer);
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -603,7 +603,7 @@ static u8 GetConnectedChildStrength(u8 maxFlags)
|
||||
}
|
||||
#endif
|
||||
|
||||
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 r9, bool32 r2, s32 r3)
|
||||
void InitHostRFUtgtGname(struct GFtgtGname *data, u8 activity, bool32 r2, s32 r3)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@@ -617,7 +617,7 @@ void InitHostRFUtgtGname(struct GFtgtGname *data, u8 r9, bool32 r2, s32 r3)
|
||||
r3 >>= 8;
|
||||
}
|
||||
data->playerGender = gSaveBlock2Ptr->playerGender;
|
||||
data->unk_0a_0 = r9;
|
||||
data->unk_0a_0 = activity;
|
||||
data->unk_0a_7 = r2;
|
||||
data->unk_00.unk_00_0 = GAME_LANGUAGE;
|
||||
data->unk_00.unk_01_2 = GAME_VERSION;
|
||||
@@ -681,7 +681,7 @@ bool8 sub_80FCCF4(struct GFtgtGname *gname, u8 *uname, u8 idx)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
void sub_80FCD50(struct GFtgtGname *gname, u8 *uname)
|
||||
void LinkRfu3_SetGnameUnameFromStaticBuffers(struct GFtgtGname *gname, u8 *uname)
|
||||
{
|
||||
memcpy(gname, &gHostRFUtgtGnameBuffer, RFU_GAME_NAME_LENGTH);
|
||||
memcpy(uname, gHostRFUtgtUnameBuffer, RFU_USER_NAME_LENGTH);
|
||||
@@ -929,7 +929,7 @@ void RecordMixTrainerNames(void)
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_80FD338(u16 id, u8 *name)
|
||||
bool32 PlayerHasMetTrainerBefore(u16 id, u8 *name)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
||||
+2
-2
@@ -107,7 +107,7 @@ bool8 itemid_link_can_give_berry(u16 itemId)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 itemid_80BF6D8_mail_related(u16 itemId)
|
||||
bool8 CanWriteMailHere(u16 itemId)
|
||||
{
|
||||
if (IsUpdateLinkStateCBActive() != TRUE && InUnionRoom() != TRUE)
|
||||
return TRUE;
|
||||
@@ -242,7 +242,7 @@ bool8 AdjustQuantityAccordingToDPadInput(s16 *arg0, u16 arg1)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u8 sub_80BF8E4(void)
|
||||
u8 GetDialogBoxFontId(void)
|
||||
{
|
||||
if (!ContextNpcGetTextColor())
|
||||
return 4;
|
||||
|
||||
+2
-2
@@ -652,7 +652,7 @@ void BlankMEventBuffer2(void)
|
||||
gSaveBlock1Ptr->mysteryEventBuffers.buffer_310.crc = 0;
|
||||
}
|
||||
|
||||
u16 sub_81440E8(void)
|
||||
u16 GetWonderCardFlagId(void)
|
||||
{
|
||||
if (ValidateReceivedWonderCard())
|
||||
return gSaveBlock1Ptr->mysteryEventBuffers.mecard.data.unk_00;
|
||||
@@ -674,7 +674,7 @@ bool32 sub_8144124(u16 a0)
|
||||
|
||||
bool32 CheckReceivedGiftFromWonderCard(void)
|
||||
{
|
||||
u16 value = sub_81440E8();
|
||||
u16 value = GetWonderCardFlagId();
|
||||
if (!sub_8144124(value))
|
||||
return FALSE;
|
||||
if (FlagGet(gUnknown_8466F00[value - 1000]) == TRUE)
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ void ResetMenuAndMonGlobals(void)
|
||||
gDifferentSaveFile = FALSE;
|
||||
ZeroPlayerPartyMons();
|
||||
ZeroEnemyPartyMons();
|
||||
sub_81089BC();
|
||||
ResetBagCursorPositions();
|
||||
ResetTMCaseCursorPos();
|
||||
BerryPouch_CursorResetToTop();
|
||||
ResetQuestLog();
|
||||
|
||||
+7
-7
@@ -3451,7 +3451,7 @@ static void CursorCB_Give(u8 taskId)
|
||||
|
||||
void CB2_SelectBagItemToGive(void)
|
||||
{
|
||||
GoToBagMenu(1, 3, CB2_GiveHoldItem);
|
||||
GoToBagMenu(ITEMMENULOCATION_PARTY, OPEN_BAG_LAST, CB2_GiveHoldItem);
|
||||
}
|
||||
|
||||
void CB2_GiveHoldItem(void)
|
||||
@@ -4283,12 +4283,12 @@ void CB2_ShowPartyMenuForItemUse(void)
|
||||
|
||||
static void CB2_ReturnToBagMenu(void)
|
||||
{
|
||||
GoToBagMenu(11, 3, NULL);
|
||||
GoToBagMenu(ITEMMENULOCATION_LAST, OPEN_BAG_LAST, NULL);
|
||||
}
|
||||
|
||||
static void CB2_ReturnToTMCaseMenu(void)
|
||||
{
|
||||
InitTMCase(5, NULL, 0xFF);
|
||||
InitTMCase(TMCASE_NA, NULL, 0xFF);
|
||||
}
|
||||
|
||||
static void CB2_ReturnToBerryPouchMenu(void)
|
||||
@@ -5818,7 +5818,7 @@ static void Task_ContinueChoosingHalfParty(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void sub_81277F4(u8 menuType, MainCallback callback)
|
||||
void ChooseMonForTradingBoard(u8 menuType, MainCallback callback)
|
||||
{
|
||||
InitPartyMenu(menuType,
|
||||
PARTY_LAYOUT_SINGLE,
|
||||
@@ -5904,7 +5904,7 @@ void OpenPartyMenuInBattle(void)
|
||||
|
||||
void ChooseMonForInBattleItem(void)
|
||||
{
|
||||
InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE, GetPartyLayoutFromBattleType(), PARTY_ACTION_REUSABLE_ITEM, FALSE, PARTY_MSG_USE_ON_WHICH_MON, sub_8120FCC, sub_8107ECC);
|
||||
InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE, GetPartyLayoutFromBattleType(), PARTY_ACTION_REUSABLE_ITEM, FALSE, PARTY_MSG_USE_ON_WHICH_MON, sub_8120FCC, CB2_BagMenuFromBattle);
|
||||
nullsub_44();
|
||||
UpdatePartyToBattleOrder();
|
||||
}
|
||||
@@ -5919,7 +5919,7 @@ void sub_81279E0(void)
|
||||
FALSE,
|
||||
PARTY_MSG_NONE,
|
||||
sub_8120C3C,
|
||||
sub_8107ECC);
|
||||
CB2_BagMenuFromBattle);
|
||||
sub_80EB2F4(8);
|
||||
}
|
||||
else
|
||||
@@ -5929,7 +5929,7 @@ void sub_81279E0(void)
|
||||
if (GetPocketByItemId(gSpecialVar_ItemId) == POCKET_BERRY_POUCH)
|
||||
callback = CB2_ReturnToBerryPouchMenu;
|
||||
else
|
||||
callback = sub_8107ECC;
|
||||
callback = CB2_BagMenuFromBattle;
|
||||
InitPartyMenu(PARTY_MENU_TYPE_IN_BATTLE,
|
||||
GetPartyLayoutFromBattleType(),
|
||||
PARTY_ACTION_USE_ITEM,
|
||||
|
||||
+5
-5
@@ -322,7 +322,7 @@ static void Task_DepositItem_WaitFadeAndGoToBag(u8 taskId)
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
GoToBagMenu(3, POCKET_ITEMS - 1, CB2_ReturnToField);
|
||||
GoToBagMenu(ITEMMENULOCATION_ITEMPC, OPEN_BAG_ITEMS, CB2_ReturnToField);
|
||||
gFieldCallback = CB2_ReturnFromDepositMenu;
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
@@ -331,7 +331,7 @@ static void Task_DepositItem_WaitFadeAndGoToBag(u8 taskId)
|
||||
static void Task_PlayerPcDepositItem(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].func = Task_DepositItem_WaitFadeAndGoToBag;
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
}
|
||||
|
||||
static void Task_ReturnToItemStorageSubmenu(u8 taskId)
|
||||
@@ -394,7 +394,7 @@ static void Task_WithdrawItemBeginFade(u8 taskId)
|
||||
{
|
||||
gTasks[taskId].func = Task_WithdrawItem_WaitFadeAndGoToItemStorage;
|
||||
ItemPc_SetInitializedFlag(0);
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
}
|
||||
|
||||
static void Task_PlayerPcCancel(u8 taskId)
|
||||
@@ -556,7 +556,7 @@ static void Task_MailSubmenuHandleInput(u8 taskId)
|
||||
|
||||
static void Task_PlayerPcReadMail(u8 taskId)
|
||||
{
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = Task_WaitFadeAndReadSelectedMail;
|
||||
}
|
||||
|
||||
@@ -663,7 +663,7 @@ static void Task_PlayerPcGiveMailToMon(u8 taskId)
|
||||
}
|
||||
else
|
||||
{
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = Task_WaitFadeAndGoToPartyMenu;
|
||||
}
|
||||
}
|
||||
|
||||
+26
-26
@@ -1547,7 +1547,7 @@ const struct SpriteTemplate gUnknown_825DF50[] =
|
||||
.paletteTag = 0,
|
||||
.oam = &gOamData_824F018,
|
||||
.anims = NULL,
|
||||
.images = gTrainerBackPicTable_PokeDude,
|
||||
.images = gTrainerBackPicTable_Pokedude,
|
||||
.affineAnims = gSpriteAffineAnimTable_82348C8,
|
||||
.callback = sub_80120C4,
|
||||
},
|
||||
@@ -3982,49 +3982,49 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
retVal = FALSE;
|
||||
}
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_ATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ATK] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
break;
|
||||
// in-battle stat boosting effects?
|
||||
case 1:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_DEF] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_DEF] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_DEF] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPEED] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_SPEED] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPEED] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
break;
|
||||
// more stat boosting effects?
|
||||
case 2:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ACC] += (itemEffect[cmdIndex] & 0xF0) >> 4;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_ACC] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_ACC] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12)
|
||||
{
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] = 12;
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPATK] += itemEffect[cmdIndex] & 0xF;
|
||||
if (gBattleMons[gActiveBattler].statStages[STAT_SPATK] > 12)
|
||||
gBattleMons[gActiveBattler].statStages[STAT_SPATK] = 12;
|
||||
retVal = FALSE;
|
||||
}
|
||||
break;
|
||||
@@ -4496,25 +4496,25 @@ bool8 PokemonItemUseNoEffect(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mo
|
||||
&& !(gBattleMons[gActiveBattler].status2 & STATUS2_FOCUS_ENERGY))
|
||||
retVal = FALSE;
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ATK] < 12)
|
||||
retVal = FALSE;
|
||||
break;
|
||||
// in-battle stat boosting effects?
|
||||
case 1:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_DEF] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_DEF] < 12)
|
||||
retVal = FALSE;
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPEED] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPEED] < 12)
|
||||
retVal = FALSE;
|
||||
break;
|
||||
// more stat boosting effects?
|
||||
case 2:
|
||||
if ((itemEffect[cmdIndex] & 0xF0)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_ACC] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_ACC] < 12)
|
||||
retVal = FALSE;
|
||||
if ((itemEffect[cmdIndex] & 0xF)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_STAGE_SPATK] < 12)
|
||||
&& gBattleMons[gActiveBattler].statStages[STAT_SPATK] < 12)
|
||||
retVal = FALSE;
|
||||
break;
|
||||
case 3:
|
||||
|
||||
+2
-2
@@ -1049,7 +1049,7 @@ static void sub_811175C(u8 sceneNum, struct UnkStruct_203AE98 * a1)
|
||||
|
||||
static void sub_81118F4(s8 a0)
|
||||
{
|
||||
fade_screen(1, a0);
|
||||
FadeScreen(1, a0);
|
||||
sQuestLogCB = QuestLog_AdvancePlayhead;
|
||||
}
|
||||
|
||||
@@ -1309,7 +1309,7 @@ static void QuestLog_CloseTextWindow(void)
|
||||
|
||||
static void QuestLog_SkipToEndOfPlayback(s8 a0)
|
||||
{
|
||||
fade_screen(1, a0);
|
||||
FadeScreen(1, a0);
|
||||
sQuestLogCB = QuestLog_WaitFadeAndCancelPlayback;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,663 @@
|
||||
#include "global.h"
|
||||
#include "event_data.h"
|
||||
#include "event_object_movement.h"
|
||||
#include "event_object_80688E4.h"
|
||||
#include "event_object_8097404.h"
|
||||
#include "field_player_avatar.h"
|
||||
#include "fieldmap.h"
|
||||
#include "rfu_union_tool.h"
|
||||
#include "script.h"
|
||||
#include "task.h"
|
||||
#include "constants/flags.h"
|
||||
#include "constants/event_object_movement.h"
|
||||
#include "constants/object_events.h"
|
||||
|
||||
static EWRAM_DATA struct UnionObj * UnionObjWork = NULL;
|
||||
static EWRAM_DATA u32 sUnionObjRefreshTimer = 0;
|
||||
|
||||
static u8 StartUnionObjAnimTask(void);
|
||||
static u32 sub_811BBC8(u32 playerIdx, u32 arg1);
|
||||
static void sub_811C008(s32 arg0, s32 arg1, u8 arg2);
|
||||
|
||||
static const u8 sUnionObjectEventGfxIds[][10] = {
|
||||
[MALE] = {
|
||||
OBJECT_EVENT_GFX_COOLTRAINER_M,
|
||||
OBJECT_EVENT_GFX_BLACKBELT,
|
||||
OBJECT_EVENT_GFX_CAMPER,
|
||||
OBJECT_EVENT_GFX_YOUNGSTER,
|
||||
OBJECT_EVENT_GFX_BOY,
|
||||
OBJECT_EVENT_GFX_BUG_CATCHER,
|
||||
OBJECT_EVENT_GFX_MAN,
|
||||
OBJECT_EVENT_GFX_ROCKER
|
||||
},
|
||||
[FEMALE] = {
|
||||
OBJECT_EVENT_GFX_COOLTRAINER_F,
|
||||
OBJECT_EVENT_GFX_CHANNELER,
|
||||
OBJECT_EVENT_GFX_PICNICKER,
|
||||
OBJECT_EVENT_GFX_LASS,
|
||||
OBJECT_EVENT_GFX_WOMAN_1,
|
||||
OBJECT_EVENT_GFX_BATTLE_GIRL,
|
||||
OBJECT_EVENT_GFX_WOMAN_2,
|
||||
OBJECT_EVENT_GFX_BEAUTY
|
||||
}
|
||||
};
|
||||
|
||||
static const s16 sUnionPartnerCoords[][2] = {
|
||||
{ 4, 6},
|
||||
{13, 8},
|
||||
{10, 6},
|
||||
{ 1, 8},
|
||||
{13, 4},
|
||||
{ 7, 4},
|
||||
{ 1, 4},
|
||||
{ 7, 8}
|
||||
};
|
||||
|
||||
static const s8 sFacingDirectionOffsets[][2] = {
|
||||
[DIR_NONE] = { 0, 0},
|
||||
[DIR_SOUTH] = { 1, 0},
|
||||
[DIR_NORTH] = { 0, -1},
|
||||
[DIR_WEST] = {-1, 0},
|
||||
[DIR_EAST] = { 0, 1}
|
||||
};
|
||||
|
||||
static const u8 sOppositeFacingDirection[] = {
|
||||
[DIR_NONE] = DIR_NONE,
|
||||
[DIR_SOUTH] = DIR_NORTH,
|
||||
[DIR_NORTH] = DIR_SOUTH,
|
||||
[DIR_WEST] = DIR_EAST,
|
||||
[DIR_EAST] = DIR_WEST
|
||||
};
|
||||
|
||||
static const u8 gUnknown_845711B[] = {
|
||||
1,
|
||||
3,
|
||||
1,
|
||||
4,
|
||||
2
|
||||
};
|
||||
|
||||
static const u8 sUnionRoomLocalIds[] = {
|
||||
9,
|
||||
8,
|
||||
7,
|
||||
2,
|
||||
6,
|
||||
5,
|
||||
4,
|
||||
3
|
||||
};
|
||||
|
||||
static const u16 sUnref_8457128[] = {
|
||||
0x63,
|
||||
0x64,
|
||||
0x65,
|
||||
0x66,
|
||||
0x67,
|
||||
0x68,
|
||||
0x69,
|
||||
0x6A
|
||||
};
|
||||
|
||||
static bool32 is_walking_or_running(void)
|
||||
{
|
||||
if (gPlayerAvatar.tileTransitionState == 2 || gPlayerAvatar.tileTransitionState == 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static u8 GetUnionRoomPlayerGraphicsId(u32 gender, u32 id)
|
||||
{
|
||||
return sUnionObjectEventGfxIds[gender][id % 8];
|
||||
}
|
||||
|
||||
static void GetUnionRoomPlayerFacingCoords(u32 id, u32 dirn, s32 * xp, s32 * yp)
|
||||
{
|
||||
*xp = sUnionPartnerCoords[id][0] + sFacingDirectionOffsets[dirn][0] + 7;
|
||||
*yp = sUnionPartnerCoords[id][1] + sFacingDirectionOffsets[dirn][1] + 7;
|
||||
}
|
||||
|
||||
static bool32 sub_811B58C(u32 id, u32 dirn, s32 x, s32 y)
|
||||
{
|
||||
if (sUnionPartnerCoords[id][0] + sFacingDirectionOffsets[dirn][0] + 7 != x)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else if (sUnionPartnerCoords[id][1] + sFacingDirectionOffsets[dirn][1] + 7 != y)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static bool32 IsUnionRoomPlayerHidden(u32 player_idx)
|
||||
{
|
||||
return FlagGet(FLAG_HIDE_UNION_ROOM_PLAYER_1 + player_idx);
|
||||
}
|
||||
|
||||
static void HideUnionRoomPlayer(u32 player_idx)
|
||||
{
|
||||
FlagSet(FLAG_HIDE_UNION_ROOM_PLAYER_1 + player_idx);
|
||||
}
|
||||
|
||||
static void ShowUnionRoomPlayer(u32 player_idx)
|
||||
{
|
||||
FlagClear(FLAG_HIDE_UNION_ROOM_PLAYER_1 + player_idx);
|
||||
}
|
||||
|
||||
static void SetUnionRoomPlayerGfx(u32 playerIdx, u32 gfxId)
|
||||
{
|
||||
VarSet(VAR_OBJ_GFX_ID_0 + playerIdx, gfxId);
|
||||
}
|
||||
|
||||
static void CreateUnionRoomPlayerObjectEvent(u32 playerIdx)
|
||||
{
|
||||
TrySpawnObjectEvent(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
}
|
||||
|
||||
static void RemoveUnionRoomPlayerObjectEvent(u32 playerIdx)
|
||||
{
|
||||
RemoveObjectEventByLocalIdAndMap(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
}
|
||||
|
||||
static bool32 SetUnionRoomPlayerEnterExitMovement(u32 playerIdx, const u8 * movement)
|
||||
{
|
||||
u8 objectId;
|
||||
struct ObjectEvent * object;
|
||||
if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
object = &gObjectEvents[objectId];
|
||||
if (ObjectEventIsMovementOverridden(object))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (ObjectEventSetHeldMovement(object, *movement))
|
||||
{
|
||||
AGB_ASSERT_EX(0, ABSPATH("rfu_union_tool.c"), 387);
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
static bool32 TryReleaseUnionRoomPlayerObjectEvent(u32 playerIdx)
|
||||
{
|
||||
u8 objectId;
|
||||
struct ObjectEvent * object;
|
||||
if (TryGetObjectEventIdByLocalIdAndMap(sUnionRoomLocalIds[playerIdx], gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, &objectId))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
object = &gObjectEvents[objectId];
|
||||
if (!ObjectEventClearHeldMovementIfFinished(object))
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
if (!ScriptContext2_IsEnabled())
|
||||
{
|
||||
UnfreezeObjectEvent(object);
|
||||
}
|
||||
else
|
||||
{
|
||||
FreezeObjectEvent(object);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u8 ZeroUnionObjWork(struct UnionObj * ptr)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
sUnionObjRefreshTimer = 0;
|
||||
UnionObjWork = ptr;
|
||||
AGB_ASSERT_EX(UnionObjWork != NULL, ABSPATH("rfu_union_tool.c"), 442)
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
ptr[i].state = 0;
|
||||
ptr[i].gfxId = 0;
|
||||
ptr[i].animState = 0;
|
||||
ptr[i].schedAnim = 0;
|
||||
}
|
||||
return StartUnionObjAnimTask();
|
||||
}
|
||||
|
||||
static const u8 sMovement_UnionPlayerExit[2] = {
|
||||
MOVEMENT_ACTION_FLY_UP,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static bool32 AnimateUnionRoomPlayerDespawn(s8 * a0, u32 playerIdx, struct UnionObj * ptr)
|
||||
{
|
||||
switch (*a0)
|
||||
{
|
||||
case 0:
|
||||
if (SetUnionRoomPlayerEnterExitMovement(playerIdx, sMovement_UnionPlayerExit) == TRUE)
|
||||
{
|
||||
HideUnionRoomPlayer(playerIdx);
|
||||
(*a0)++;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (TryReleaseUnionRoomPlayerObjectEvent(playerIdx))
|
||||
{
|
||||
RemoveUnionRoomPlayerObjectEvent(playerIdx);
|
||||
HideUnionRoomPlayer(playerIdx);
|
||||
*a0 = 0;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static const u8 sMovement_UnionPlayerEnter[2] = {
|
||||
MOVEMENT_ACTION_FLY_DOWN,
|
||||
MOVEMENT_ACTION_STEP_END
|
||||
};
|
||||
|
||||
static bool32 AnimateUnionRoomPlayerSpawn(s8 * a0, u32 playerIdx, struct UnionObj * ptr)
|
||||
{
|
||||
s16 x, y;
|
||||
|
||||
switch (*a0)
|
||||
{
|
||||
case 0:
|
||||
if (!is_walking_or_running())
|
||||
{
|
||||
break;
|
||||
}
|
||||
PlayerGetDestCoords(&x, &y);
|
||||
if (sub_811B58C(playerIdx, 0, x, y) == TRUE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
player_get_pos_including_state_based_drift(&x, &y);
|
||||
if (sub_811B58C(playerIdx, 0, x, y) == TRUE)
|
||||
{
|
||||
break;
|
||||
}
|
||||
SetUnionRoomPlayerGfx(playerIdx, ptr->gfxId);
|
||||
CreateUnionRoomPlayerObjectEvent(playerIdx);
|
||||
ShowUnionRoomPlayer(playerIdx);
|
||||
(*a0)++;
|
||||
// fallthrough
|
||||
case 3: // incorrect?
|
||||
if (SetUnionRoomPlayerEnterExitMovement(playerIdx, sMovement_UnionPlayerEnter) == 1)
|
||||
{
|
||||
(*a0)++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if (TryReleaseUnionRoomPlayerObjectEvent(playerIdx))
|
||||
{
|
||||
*a0 = 0;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool32 sub_811B8BC(u32 playerIdx, u32 a1, u32 a2)
|
||||
{
|
||||
struct UnionObj * ptr = &UnionObjWork[playerIdx];
|
||||
AGB_ASSERT_EX(UnionObjWork != NULL, ABSPATH("rfu_union_tool.c"), 561)
|
||||
ptr->schedAnim = 1;
|
||||
ptr->gfxId = GetUnionRoomPlayerGraphicsId(a1, a2);
|
||||
if (ptr->state == 0)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static bool32 sub_811B90C(u32 playerIdx)
|
||||
{
|
||||
struct UnionObj * ptr = &UnionObjWork[playerIdx];
|
||||
AGB_ASSERT_EX(UnionObjWork != NULL, ABSPATH("rfu_union_tool.c"), 577)
|
||||
ptr->schedAnim = 2;
|
||||
if (ptr->state == 1)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
static void AnimateUnionObj(u32 playerIdx, struct UnionObj * ptr)
|
||||
{
|
||||
switch (ptr->state)
|
||||
{
|
||||
case 0:
|
||||
if (ptr->schedAnim == 1)
|
||||
{
|
||||
ptr->state = 2;
|
||||
ptr->animState = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
case 2:
|
||||
if (!sub_811BBC8(playerIdx, 0) && ptr->schedAnim == 2)
|
||||
{
|
||||
ptr->state = 0;
|
||||
ptr->animState = 0;
|
||||
RemoveUnionRoomPlayerObjectEvent(playerIdx);
|
||||
HideUnionRoomPlayer(playerIdx);
|
||||
}
|
||||
else if (AnimateUnionRoomPlayerSpawn(&ptr->animState, playerIdx, ptr) == TRUE)
|
||||
{
|
||||
ptr->state = 1;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (ptr->schedAnim == 2)
|
||||
{
|
||||
ptr->state = 3;
|
||||
ptr->animState = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
case 3:
|
||||
if (AnimateUnionRoomPlayerDespawn(&ptr->animState, playerIdx, ptr) == TRUE)
|
||||
{
|
||||
ptr->state = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
ptr->schedAnim = 0;
|
||||
}
|
||||
|
||||
static void Task_AnimateUnionObjs(u8 taskId)
|
||||
{
|
||||
s32 i;
|
||||
AGB_ASSERT_EX(UnionObjWork != NULL, ABSPATH("rfu_union_tool.c"), 643)
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
AnimateUnionObj(i, &UnionObjWork[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static u8 StartUnionObjAnimTask(void)
|
||||
{
|
||||
if (FuncIsActiveTask(Task_AnimateUnionObjs) == TRUE)
|
||||
{
|
||||
AGB_ASSERT_EX(0, ABSPATH("rfu_union_tool.c"), 655)
|
||||
return NUM_TASKS;
|
||||
}
|
||||
else
|
||||
{
|
||||
return CreateTask(Task_AnimateUnionObjs, 5);
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_811BA5C(void)
|
||||
{
|
||||
u8 taskId = FindTaskIdByFunc(Task_AnimateUnionObjs);
|
||||
if (taskId < NUM_TASKS)
|
||||
{
|
||||
DestroyTask(taskId);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_811BA78(void)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
if (!IsUnionRoomPlayerHidden(i))
|
||||
{
|
||||
RemoveUnionRoomPlayerObjectEvent(i);
|
||||
HideUnionRoomPlayer(i);
|
||||
}
|
||||
}
|
||||
UnionObjWork = NULL;
|
||||
sub_811BA5C();
|
||||
}
|
||||
|
||||
void sub_811BAAC(u8 * sp8, s32 r9)
|
||||
{
|
||||
s32 r7;
|
||||
|
||||
for (r7 = 0; r7 < 5; r7++)
|
||||
{
|
||||
s32 r5 = 5 * r9 + r7;
|
||||
sp8[r5] = sprite_new(OBJECT_EVENT_GFX_MAN, r5 - 0x38, sUnionPartnerCoords[r9][0] + sFacingDirectionOffsets[r7][0], sUnionPartnerCoords[r9][1] + sFacingDirectionOffsets[r7][1], 3, 1);
|
||||
sub_8069124(r5 - 0x38, TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_811BB40(u8 * r5)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < 40; i++)
|
||||
{
|
||||
DestroySprite(&gSprites[r5[i]]);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_811BB68(void)
|
||||
{
|
||||
s32 i, j, x, y;
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
for (j = 0; j < 5; j++)
|
||||
{
|
||||
GetUnionRoomPlayerFacingCoords(i, j, &x, &y);
|
||||
sub_8059024(x, y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static u8 sub_811BBA0(u32 r1, u32 unused, struct GFtgtGname * r2)
|
||||
{
|
||||
if (r1 != 0)
|
||||
{
|
||||
return gUnknown_845711B[r1];
|
||||
}
|
||||
else if (r2->unk_0a_0 == 0x45)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
}
|
||||
|
||||
static u32 sub_811BBC8(u32 a0, u32 a1)
|
||||
{
|
||||
return sub_806916C(5 * a0 + a1 - 0x38);
|
||||
}
|
||||
|
||||
static void sub_811BBE0(u32 r5, u32 r6, u8 r8, struct GFtgtGname * r9)
|
||||
{
|
||||
s32 x, y;
|
||||
s32 r7 = 5 * r5 + r6;
|
||||
if (sub_811BBC8(r5, r6) == 1)
|
||||
{
|
||||
sub_8069124(r7 - 0x38, FALSE);
|
||||
sub_80691A4(r7 - 0x38, 1);
|
||||
}
|
||||
sub_8069094(r7 - 0x38, r8);
|
||||
sub_811C008(r6, r5, sub_811BBA0(r6, r5, r9));
|
||||
GetUnionRoomPlayerFacingCoords(r5, r6, &x, &y);
|
||||
sub_8059024(x, y, 1);
|
||||
}
|
||||
|
||||
static void sub_811BC68(u32 a0, u32 a1)
|
||||
{
|
||||
s32 x, y;
|
||||
sub_80691A4(5 * a0 + a1 - 0x38, 2);
|
||||
GetUnionRoomPlayerFacingCoords(a0, a1, &x, &y);
|
||||
sub_8059024(x, y, 0);
|
||||
}
|
||||
|
||||
static void sub_811BCA0(u32 r7, struct GFtgtGname * r8)
|
||||
{
|
||||
s16 x, y, x2, y2;
|
||||
s32 i;
|
||||
|
||||
PlayerGetDestCoords(&x, &y);
|
||||
player_get_pos_including_state_based_drift(&x2, &y2);
|
||||
if (sub_806916C(5 * r7 - 0x38) == 1)
|
||||
{
|
||||
if (sub_811B58C(r7, 0, x, y) == TRUE || sub_811B58C(r7, 0, x2, y2) == TRUE)
|
||||
{
|
||||
return;
|
||||
}
|
||||
sub_811BBE0(r7, 0, GetUnionRoomPlayerGraphicsId(r8->playerGender, r8->unk_00.playerTrainerId[0]), r8);
|
||||
}
|
||||
for (i = 1; i < 5; i++)
|
||||
{
|
||||
if (r8->unk_04[i - 1] == 0)
|
||||
{
|
||||
sub_811BC68(r7, i);
|
||||
}
|
||||
else if (sub_811B58C(r7, i, x, y) == FALSE && sub_811B58C(r7, i, x2, y2) == FALSE)
|
||||
{
|
||||
sub_811BBE0(r7, i, GetUnionRoomPlayerGraphicsId((r8->unk_04[i - 1] >> 3) & 1, r8->unk_04[i - 1] & 7), r8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_811BDA8(u32 r5, struct GFtgtGname * r4)
|
||||
{
|
||||
u32 i;
|
||||
switch (r4->unk_0a_0)
|
||||
{
|
||||
case 0x40:
|
||||
case 0x54:
|
||||
sub_811B8BC(r5, r4->playerGender, r4->unk_00.playerTrainerId[0]);
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
sub_811BC68(r5, i);
|
||||
}
|
||||
break;
|
||||
case 0x41:
|
||||
case 0x44:
|
||||
case 0x45:
|
||||
case 0x48:
|
||||
case 0x51:
|
||||
case 0x52:
|
||||
case 0x53:
|
||||
sub_811B90C(r5);
|
||||
sub_811BCA0(r5, r4);
|
||||
break;
|
||||
default:
|
||||
AGB_ASSERT_EX(0, ABSPATH("rfu_union_tool.c"), 979)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_811BE6C(u32 r5, struct GFtgtGname * unused)
|
||||
{
|
||||
s32 i;
|
||||
sub_811B90C(r5);
|
||||
for (i = 0; i < 5; i++)
|
||||
{
|
||||
sub_811BC68(r5, i);
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateUnionRoomPlayerSprites(struct UnkStruct_URoom *r0)
|
||||
{
|
||||
s32 i;
|
||||
struct UnkStruct_x20 * r4;
|
||||
sUnionObjRefreshTimer = 0;
|
||||
for (i = 0, r4 = r0->field_0->arr; i < 8; i++)
|
||||
{
|
||||
if (r4[i].field_1A_0 == 1)
|
||||
{
|
||||
sub_811BDA8(i, &r4[i].unk.gname);
|
||||
}
|
||||
else if (r4[i].field_1A_0 == 2)
|
||||
{
|
||||
sub_811BE6C(i, &r4[i].unk.gname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void sub_811BECC(struct UnkStruct_URoom *unused)
|
||||
{
|
||||
sUnionObjRefreshTimer = 300;
|
||||
}
|
||||
|
||||
void sub_811BEDC(struct UnkStruct_URoom *r2)
|
||||
{
|
||||
if (++sUnionObjRefreshTimer > 300)
|
||||
{
|
||||
UpdateUnionRoomPlayerSprites(r2);
|
||||
}
|
||||
}
|
||||
|
||||
bool32 sub_811BF00(struct UnkStruct_Main0 *arg0, s16 *arg1, s16 *arg2, u8 *arg3)
|
||||
{
|
||||
s16 x, y;
|
||||
s32 i, j;
|
||||
struct UnkStruct_x20 * r4;
|
||||
if (!is_walking_or_running())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
GetXYCoordsOneStepInFrontOfPlayer(&x, &y);
|
||||
for (i = 0, r4 = arg0->arr; i < 8; i++)
|
||||
{
|
||||
for (j = 0; j < 5; j++)
|
||||
{
|
||||
s32 r3 = 5 * i + j;
|
||||
if (x != sUnionPartnerCoords[i][0] + sFacingDirectionOffsets[j][0] + 7)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (y != sUnionPartnerCoords[i][1] + sFacingDirectionOffsets[j][1] + 7)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (sub_806916C(r3 - 0x38) != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (sub_8069294(r3 - 0x38) != 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (r4[i].field_1A_0 != 1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
sub_811C008(j, i, sOppositeFacingDirection[GetPlayerFacingDirection()]);
|
||||
*arg1 = j;
|
||||
*arg2 = i;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void sub_811C008(s32 arg0, s32 arg1, u8 arg2)
|
||||
{
|
||||
sub_8069058(5 * arg1 - 0x38 + arg0, arg2);
|
||||
}
|
||||
|
||||
void sub_811C028(u32 arg0, u32 arg1, struct UnkStruct_Main0 *arg2)
|
||||
{
|
||||
return sub_811C008(arg0, arg1, sub_811BBA0(arg0, arg1, &arg2->arr[arg1].unk.gname));
|
||||
}
|
||||
+4
-4
@@ -47,7 +47,7 @@ bool8 SafariZoneTakeStep(void)
|
||||
gSafariZoneStepCounter--;
|
||||
if (gSafariZoneStepCounter == 0)
|
||||
{
|
||||
ScriptContext1_SetupScript(EventScript_SafariTimesUp);
|
||||
ScriptContext1_SetupScript(SafariZone_EventScript_TimesUp);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
@@ -55,7 +55,7 @@ bool8 SafariZoneTakeStep(void)
|
||||
|
||||
void SafariZoneRetirePrompt(void)
|
||||
{
|
||||
ScriptContext1_SetupScript(EventScript_SafariRetire);
|
||||
ScriptContext1_SetupScript(SafariZone_EventScript_RetirePrompt);
|
||||
}
|
||||
|
||||
void CB2_EndSafariBattle(void)
|
||||
@@ -66,14 +66,14 @@ void CB2_EndSafariBattle(void)
|
||||
}
|
||||
else if (gBattleOutcome == B_OUTCOME_NO_SAFARI_BALLS)
|
||||
{
|
||||
ScriptContext2_RunNewScript(EventScript_SafariWarpOut);
|
||||
ScriptContext2_RunNewScript(SafariZone_EventScript_OutOfBallsMidBattle);
|
||||
WarpIntoMap();
|
||||
gFieldCallback = sub_807E3EC;
|
||||
SetMainCallback2(CB2_LoadMap);
|
||||
}
|
||||
else if (gBattleOutcome == B_OUTCOME_CAUGHT)
|
||||
{
|
||||
ScriptContext1_SetupScript(EventScript_SafariOutOfBalls);
|
||||
ScriptContext1_SetupScript(SafariZone_EventScript_OutOfBalls);
|
||||
ScriptContext1_Stop();
|
||||
SetMainCallback2(CB2_ReturnToFieldContinueScriptPlayMapMusic);
|
||||
}
|
||||
|
||||
+4
-4
@@ -630,7 +630,7 @@ static bool8 IsPaletteNotActive(void)
|
||||
|
||||
bool8 ScrCmd_fadescreen(struct ScriptContext *ctx)
|
||||
{
|
||||
fade_screen(ScriptReadByte(ctx), 0);
|
||||
FadeScreen(ScriptReadByte(ctx), 0);
|
||||
SetupNativeScript(ctx, IsPaletteNotActive);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -640,7 +640,7 @@ bool8 ScrCmd_fadescreenspeed(struct ScriptContext *ctx)
|
||||
u8 mode = ScriptReadByte(ctx);
|
||||
u8 speed = ScriptReadByte(ctx);
|
||||
|
||||
fade_screen(mode, speed);
|
||||
FadeScreen(mode, speed);
|
||||
SetupNativeScript(ctx, IsPaletteNotActive);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -1064,7 +1064,7 @@ bool8 ScrCmd_addobject(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 objectId = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
show_sprite(objectId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
TrySpawnObjectEvent(objectId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -1074,7 +1074,7 @@ bool8 ScrCmd_addobject_at(struct ScriptContext *ctx)
|
||||
u8 mapGroup = ScriptReadByte(ctx);
|
||||
u8 mapNum = ScriptReadByte(ctx);
|
||||
|
||||
show_sprite(objectId, mapNum, mapGroup);
|
||||
TrySpawnObjectEvent(objectId, mapNum, mapGroup);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
+30
-29
@@ -565,36 +565,37 @@ const struct MultichoiceListStruct gScriptMultiChoiceMenus[] = {
|
||||
{ sScriptMultiChoiceMenu_TrainerTowerMode, NELEMS(sScriptMultiChoiceMenu_TrainerTowerMode) }
|
||||
};
|
||||
|
||||
// From Cool to Berries goes unused
|
||||
const u8 *const gStdStringPtrs[] = {
|
||||
gText_Cool,
|
||||
gText_Beauty,
|
||||
gText_Cute,
|
||||
gText_Smart,
|
||||
gText_Tough,
|
||||
gText_Cool_2,
|
||||
gText_Beauty_2,
|
||||
gText_Cute_2,
|
||||
gText_Smart_2,
|
||||
gText_Tough_2,
|
||||
gText_Items,
|
||||
gText_KeyItems,
|
||||
gText_PokeBalls,
|
||||
gText_TMsAndHMs,
|
||||
gText_Berries,
|
||||
gText_Boulderbadge,
|
||||
gText_Cascadebadge,
|
||||
gText_Thunderbadge,
|
||||
gText_Rainbowbadge,
|
||||
gText_Soulbadge,
|
||||
gText_Marshbadge,
|
||||
gText_Volcanobadge,
|
||||
gText_Earthbadge,
|
||||
gText_Coins_2,
|
||||
gText_ItemsPocket,
|
||||
gText_KeyItemsPocket,
|
||||
gText_PokeBallsPocket,
|
||||
gText_TmCase,
|
||||
gText_BerryPouch_2
|
||||
[STDSTRING_COOL] = gText_Cool,
|
||||
[STDSTRING_BEAUTY] = gText_Beauty,
|
||||
[STDSTRING_CUTE] = gText_Cute,
|
||||
[STDSTRING_SMART] = gText_Smart,
|
||||
[STDSTRING_TOUGH] = gText_Tough,
|
||||
[STDSTRING_COOL2] = gText_Cool_2,
|
||||
[STDSTRING_BEAUTY2] = gText_Beauty_2,
|
||||
[STDSTRING_CUTE2] = gText_Cute_2,
|
||||
[STDSTRING_SMART2] = gText_Smart_2,
|
||||
[STDSTRING_TOUGH2] = gText_Tough_2,
|
||||
[STDSTRING_ITEMS] = gText_Items,
|
||||
[STDSTRING_KEY_ITEMS] = gText_KeyItems,
|
||||
[STDSTRING_POKEBALLS] = gText_PokeBalls,
|
||||
[STDSTRING_TMHMS] = gText_TMsAndHMs,
|
||||
[STDSTRING_BERRIES] = gText_Berries,
|
||||
[STDSTRING_BOULDER_BADGE] = gText_Boulderbadge,
|
||||
[STDSTRING_CASCADE_BADGE] = gText_Cascadebadge,
|
||||
[STDSTRING_THUNDER_BADGE] = gText_Thunderbadge,
|
||||
[STDSTRING_RAINBOW_BADGE] = gText_Rainbowbadge,
|
||||
[STDSTRING_SOUL_BADGE] = gText_Soulbadge,
|
||||
[STDSTRING_MARSH_BADGE] = gText_Marshbadge,
|
||||
[STDSTRING_VOLCANO_BADGE] = gText_Volcanobadge,
|
||||
[STDSTRING_EARTH_BADGE] = gText_Earthbadge,
|
||||
[STDSTRING_COINS] = gText_Coins_2,
|
||||
[STDSTRING_ITEMS_POCKET] = gText_ItemsPocket,
|
||||
[STDSTRING_KEY_ITEMS_POCKET] = gText_KeyItemsPocket,
|
||||
[STDSTRING_POKEBALLS_POCKET] = gText_PokeBallsPocket,
|
||||
[STDSTRING_TM_CASE] = gText_TmCase,
|
||||
[STDSTRING_BERRY_POUCH] = gText_BerryPouch_2
|
||||
};
|
||||
|
||||
static const u8 *const sDescriptionPtrs_CableClub_TradeBattleCancel[] = {
|
||||
|
||||
+3
-3
@@ -294,20 +294,20 @@ static void Task_ShopMenu(u8 taskId)
|
||||
static void Task_HandleShopMenuBuy(u8 taskId)
|
||||
{
|
||||
SetWordTaskArg(taskId, 0xE, (u32)CB2_InitBuyMenu);
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = Task_GoToBuyOrSellMenu;
|
||||
}
|
||||
|
||||
static void Task_HandleShopMenuSell(u8 taskId)
|
||||
{
|
||||
SetWordTaskArg(taskId, 0xE, (u32)CB2_GoToSellMenu);
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
gTasks[taskId].func = Task_GoToBuyOrSellMenu;
|
||||
}
|
||||
|
||||
static void CB2_GoToSellMenu(void)
|
||||
{
|
||||
GoToBagMenu(2, POCKET_POKE_BALLS, CB2_ReturnToField);
|
||||
GoToBagMenu(ITEMMENULOCATION_SHOP, OPEN_BAG_LAST, CB2_ReturnToField);
|
||||
gFieldCallback = MapPostLoadHook_ReturnToShopMenu;
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -446,7 +446,7 @@ static void StartMenu_FadeScreenIfLeavingOverworld(void)
|
||||
&& sStartMenuCallback != StartMenuSafariZoneRetireCallback)
|
||||
{
|
||||
StopPokemonLeagueLightingEffectTask();
|
||||
fade_screen(1, 0);
|
||||
FadeScreen(1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -554,7 +554,7 @@ static bool8 StartMenuLinkPlayerCallback(void)
|
||||
{
|
||||
PlayRainStoppingSoundEffect();
|
||||
CleanupOverworldWindowsAndTilemaps();
|
||||
ShowTrainerCardInLink(gUnknown_300502C, CB2_ReturnToFieldWithOpenMenu);
|
||||
ShowTrainerCardInLink(gLocalLinkPlayerId, CB2_ReturnToFieldWithOpenMenu);
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
|
||||
+3
-13
@@ -34,16 +34,6 @@
|
||||
#include "fieldmap.h"
|
||||
#include "strings.h"
|
||||
|
||||
enum TeachyTvScript
|
||||
{
|
||||
TTVSCR_BATTLE,
|
||||
TTVSCR_STATUS,
|
||||
TTVSCR_MATCHUPS,
|
||||
TTVSCR_CATCHING,
|
||||
TTVSCR_TMS,
|
||||
TTVSCR_REGISTER
|
||||
};
|
||||
|
||||
struct TeachyTvCtrlBlk
|
||||
{
|
||||
MainCallback callback;
|
||||
@@ -805,7 +795,7 @@ static void TTVcmd_NpcMoveAndSetupTextPrinter(u8 taskId)
|
||||
if (spriteAddr->pos2.x == 0x78)
|
||||
{
|
||||
StartSpriteAnim(&gSprites[data[1]], 0);
|
||||
TeachyTvInitTextPrinter(gTeachyTvText_PokeDudeSaysHello);
|
||||
TeachyTvInitTextPrinter(gTeachyTvText_PokedudeSaysHello);
|
||||
data[2] = 0;
|
||||
++data[3];
|
||||
}
|
||||
@@ -1103,9 +1093,9 @@ static void TTVcmd_TaskBattleOrFadeByOptionChosen(u8 taskId)
|
||||
static void TeachyTvSetupBagItemsByOptionChosen(void)
|
||||
{
|
||||
if (sStaticResources.whichScript == TTVSCR_TMS)
|
||||
sub_810B108(10);
|
||||
InitPokedudeBag(ITEMMENULOCATION_TTVSCR_TMS);
|
||||
else
|
||||
sub_810B108(9);
|
||||
InitPokedudeBag(ITEMMENULOCATION_TTVSCR_REGISTER);
|
||||
}
|
||||
|
||||
static void TeachyTvPostBattleFadeControl(u8 taskId)
|
||||
|
||||
+17
-17
@@ -67,7 +67,7 @@ struct UnkStruct_203B11C
|
||||
|
||||
static EWRAM_DATA struct UnkStruct_203B10C sTMCaseStaticResources = {};
|
||||
static EWRAM_DATA struct UnkStruct_203B118 * sTMCaseDynamicResources = NULL;
|
||||
static EWRAM_DATA struct UnkStruct_203B11C * sPokeDudePackBackup = NULL;
|
||||
static EWRAM_DATA struct UnkStruct_203B11C * sPokedudePackBackup = NULL;
|
||||
static EWRAM_DATA void * sTilemapBuffer = NULL; // tilemap buffer
|
||||
static EWRAM_DATA struct ListMenuItem * sListMenuItemsBuffer = NULL;
|
||||
static EWRAM_DATA u8 (* sListMenuStringsBuffer)[29] = NULL;
|
||||
@@ -977,7 +977,7 @@ static void Task_SelectTMAction_FromSellMenu(u8 taskId)
|
||||
{
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_OhNoICantBuyThat);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, sub_80BF8E4(), gStringVar4, Subtask_CloseContextMenuAndReturnToMain);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Subtask_CloseContextMenuAndReturnToMain);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -993,7 +993,7 @@ static void Task_SelectTMAction_FromSellMenu(u8 taskId)
|
||||
data[2] = 99;
|
||||
CopyItemName(gSpecialVar_ItemId, gStringVar1);
|
||||
StringExpandPlaceholders(gStringVar4, gText_HowManyWouldYouLikeToSell);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, sub_80BF8E4(), gStringVar4, Task_InitQuantitySelectUI);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_InitQuantitySelectUI);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1004,7 +1004,7 @@ static void Task_AskConfirmSaleWithAmount(u8 taskId)
|
||||
|
||||
ConvertIntToDecimalStringN(gStringVar3, itemid_get_market_price(BagGetItemIdByPocketPosition(POCKET_TM_CASE, data[1])) / 2 * data[8], STR_CONV_MODE_LEFT_ALIGN, 6);
|
||||
StringExpandPlaceholders(gStringVar4, gText_ICanPayThisMuch_WouldThatBeOkay);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, sub_80BF8E4(), gStringVar4, Task_PlaceYesNoBox);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, GetDialogBoxFontId(), gStringVar4, Task_PlaceYesNoBox);
|
||||
}
|
||||
|
||||
static void Task_PlaceYesNoBox(u8 taskId)
|
||||
@@ -1133,13 +1133,13 @@ static void Task_AfterSale_ReturnToList(u8 taskId)
|
||||
}
|
||||
}
|
||||
|
||||
void PokeDude_InitTMCase(void)
|
||||
void Pokedude_InitTMCase(void)
|
||||
{
|
||||
sPokeDudePackBackup = AllocZeroed(sizeof(*sPokeDudePackBackup));
|
||||
memcpy(sPokeDudePackBackup->bagPocket_TMHM, gSaveBlock1Ptr->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM));
|
||||
memcpy(sPokeDudePackBackup->bagPocket_KeyItems, gSaveBlock1Ptr->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems));
|
||||
sPokeDudePackBackup->unk_160 = sTMCaseStaticResources.selectedRow;
|
||||
sPokeDudePackBackup->unk_162 = sTMCaseStaticResources.scrollOffset;
|
||||
sPokedudePackBackup = AllocZeroed(sizeof(*sPokedudePackBackup));
|
||||
memcpy(sPokedudePackBackup->bagPocket_TMHM, gSaveBlock1Ptr->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM));
|
||||
memcpy(sPokedudePackBackup->bagPocket_KeyItems, gSaveBlock1Ptr->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems));
|
||||
sPokedudePackBackup->unk_160 = sTMCaseStaticResources.selectedRow;
|
||||
sPokedudePackBackup->unk_162 = sTMCaseStaticResources.scrollOffset;
|
||||
ClearItemSlots(gSaveBlock1Ptr->bagPocket_TMHM, NELEMS(gSaveBlock1Ptr->bagPocket_TMHM));
|
||||
ClearItemSlots(gSaveBlock1Ptr->bagPocket_KeyItems, NELEMS(gSaveBlock1Ptr->bagPocket_KeyItems));
|
||||
ResetTMCaseCursorPos();
|
||||
@@ -1234,7 +1234,7 @@ static void Task_TMCaseDude_Playback(u8 taskId)
|
||||
break;
|
||||
case 8:
|
||||
FillBG2RowWithPalette_2timesNplus1(1);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, 4, gPokeDudeText_TMTypes, 0);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, 4, gPokedudeText_TMTypes, 0);
|
||||
gTasks[taskId].func = Task_TMCaseDude_Playback;
|
||||
data[8]++;
|
||||
break;
|
||||
@@ -1256,7 +1256,7 @@ static void Task_TMCaseDude_Playback(u8 taskId)
|
||||
break;
|
||||
case 18:
|
||||
FillBG2RowWithPalette_2timesNplus1(1);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, 4, gPokeDudeText_ReadTMDescription, NULL);
|
||||
TMCase_PrintMessageWithFollowupTask(taskId, 4, gPokedudeText_ReadTMDescription, NULL);
|
||||
gTasks[taskId].func = Task_TMCaseDude_Playback; // this function
|
||||
data[8]++;
|
||||
break;
|
||||
@@ -1267,12 +1267,12 @@ static void Task_TMCaseDude_Playback(u8 taskId)
|
||||
case 21:
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_TMHM, sPokeDudePackBackup->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM));
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_KeyItems, sPokeDudePackBackup->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems));
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_TMHM, sPokedudePackBackup->bagPocket_TMHM, sizeof(gSaveBlock1Ptr->bagPocket_TMHM));
|
||||
memcpy(gSaveBlock1Ptr->bagPocket_KeyItems, sPokedudePackBackup->bagPocket_KeyItems, sizeof(gSaveBlock1Ptr->bagPocket_KeyItems));
|
||||
DestroyListMenuTask(data[0], NULL, NULL);
|
||||
sTMCaseStaticResources.selectedRow = sPokeDudePackBackup->unk_160;
|
||||
sTMCaseStaticResources.scrollOffset = sPokeDudePackBackup->unk_162;
|
||||
Free(sPokeDudePackBackup);
|
||||
sTMCaseStaticResources.selectedRow = sPokedudePackBackup->unk_160;
|
||||
sTMCaseStaticResources.scrollOffset = sPokedudePackBackup->unk_162;
|
||||
Free(sPokedudePackBackup);
|
||||
CpuFastCopy(gPlttBufferFaded, gPlttBufferUnfaded, 0x400);
|
||||
CB2_SetUpReshowBattleScreenAfterMenu();
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, -2, 0, 16, 0);
|
||||
|
||||
+1
-1
@@ -2443,7 +2443,7 @@ static void CreateInGameTradePokemonInternal(u8 playerSlot, u8 inGameTradeIdx)
|
||||
const struct InGameTrade * inGameTrade = &sInGameTrades[inGameTradeIdx];
|
||||
u8 level = GetMonData(&gPlayerParty[playerSlot], MON_DATA_LEVEL);
|
||||
struct MailStruct mail;
|
||||
u8 metLocation = MAPSEC_IN_GAME_TRADE;
|
||||
u8 metLocation = METLOC_IN_GAME_TRADE;
|
||||
struct Pokemon * tradeMon = &gEnemyParty[0];
|
||||
u8 mailNum;
|
||||
CreateMon(tradeMon, inGameTrade->species, level, 32, TRUE, inGameTrade->personality, TRUE, inGameTrade->otId);
|
||||
|
||||
+4607
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,225 @@
|
||||
#include "global.h"
|
||||
#include "bg.h"
|
||||
#include "battle.h"
|
||||
#include "gpu_regs.h"
|
||||
#include "link.h"
|
||||
#include "malloc.h"
|
||||
#include "menu.h"
|
||||
#include "new_menu_helpers.h"
|
||||
#include "overworld.h"
|
||||
#include "palette.h"
|
||||
#include "party_menu.h"
|
||||
#include "strings.h"
|
||||
#include "text_window.h"
|
||||
#include "union_room.h"
|
||||
#include "window.h"
|
||||
|
||||
struct UnkStruct_203B08C
|
||||
{
|
||||
s16 a0;
|
||||
};
|
||||
|
||||
static EWRAM_DATA struct UnkStruct_203B08C * gUnknown_203B08C = NULL;
|
||||
|
||||
static const struct BgTemplate gUnknown_8457194[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.charBaseIndex = 3,
|
||||
.mapBaseIndex = 31
|
||||
}
|
||||
};
|
||||
|
||||
static const struct WindowTemplate gUnknown_8457198[] = {
|
||||
{
|
||||
.bg = 0,
|
||||
.tilemapLeft = 2,
|
||||
.tilemapTop = 15,
|
||||
.width = 26,
|
||||
.height = 4,
|
||||
.paletteNum = 14,
|
||||
.baseBlock = 0x014
|
||||
}, DUMMY_WIN_TEMPLATE
|
||||
};
|
||||
|
||||
static const u8 gUnknown_84571A8[] = {1, 2, 3};
|
||||
|
||||
static void sub_811C04C(void)
|
||||
{
|
||||
s32 i;
|
||||
sub_81173C0(BATTLE_TYPE_LINK | BATTLE_TYPE_TRAINER);
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
gEnemyParty[i] = gPlayerParty[gSelectedOrderFromParty[i] - 1];
|
||||
}
|
||||
for (i = 0; i < PARTY_SIZE; i++)
|
||||
{
|
||||
ZeroMonData(&gPlayerParty[i]);
|
||||
}
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
gPlayerParty[i] = gEnemyParty[i];
|
||||
}
|
||||
IncrementGameStat(GAME_STAT_NUM_UNION_ROOM_BATTLES);
|
||||
CalculatePlayerPartyCount();
|
||||
gTrainerBattleOpponent_A = TRAINER_OPPONENT_C00;
|
||||
SetMainCallback2(CB2_InitBattle);
|
||||
}
|
||||
|
||||
static void sub_811C0E0(u8 windowId, const u8 * str, u8 x, u8 y, s32 speed)
|
||||
{
|
||||
s32 letterSpacing = 1;
|
||||
s32 lineSpacing = 1;
|
||||
FillWindowPixelBuffer(windowId, PIXEL_FILL(gUnknown_84571A8[0]));
|
||||
AddTextPrinterParameterized4(windowId, 3, x, y, letterSpacing, lineSpacing, gUnknown_84571A8, speed, str);
|
||||
}
|
||||
|
||||
static bool32 sub_811C150(s16 * state, const u8 * str, s32 speed)
|
||||
{
|
||||
switch (*state)
|
||||
{
|
||||
case 0:
|
||||
DrawTextBorderOuter(0, 0x001, 0xD);
|
||||
sub_811C0E0(0, str, 0, 2, speed);
|
||||
PutWindowTilemap(0);
|
||||
CopyWindowToVram(0, 3);
|
||||
(*state)++;
|
||||
break;
|
||||
case 1:
|
||||
if (!IsTextPrinterActive(0))
|
||||
{
|
||||
*state = 0;
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void sub_811C1B4(void)
|
||||
{
|
||||
LoadOam();
|
||||
ProcessSpriteCopyRequests();
|
||||
TransferPlttBuffer();
|
||||
}
|
||||
|
||||
void sub_811C1C8(void)
|
||||
{
|
||||
switch (gMain.state)
|
||||
{
|
||||
case 0:
|
||||
SetGpuReg(REG_OFFSET_DISPCNT, 0x0000);
|
||||
gUnknown_203B08C = AllocZeroed(sizeof(struct UnkStruct_203B08C));
|
||||
ResetSpriteData();
|
||||
FreeAllSpritePalettes();
|
||||
ResetTasks();
|
||||
ResetBgsAndClearDma3BusyFlags(0);
|
||||
InitBgsFromTemplates(0, gUnknown_8457194, 1);
|
||||
ResetTempTileDataBuffers();
|
||||
if (!InitWindows(gUnknown_8457198))
|
||||
{
|
||||
return;
|
||||
}
|
||||
DeactivateAllTextPrinters();
|
||||
ClearWindowTilemap(0);
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(0, PIXEL_FILL(1));
|
||||
FillBgTilemapBufferRect(0, 0, 0, 0, 30, 20, 0xF);
|
||||
TextWindow_SetStdFrame0_WithPal(0, 1, 0xD0);
|
||||
Menu_LoadStdPal();
|
||||
SetVBlankCallback(sub_811C1B4);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 1:
|
||||
if (sub_811C150(&gUnknown_203B08C->a0, gText_CommStandbyAwaitingOtherPlayer, 0))
|
||||
{
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 16, 0, RGB_BLACK);
|
||||
ShowBg(0);
|
||||
gMain.state++;
|
||||
break;
|
||||
case 3:
|
||||
if (!UpdatePaletteFade())
|
||||
{
|
||||
memset(gBlockSendBuffer, 0, 0x20);
|
||||
if (gSelectedOrderFromParty[0] == -gSelectedOrderFromParty[1])
|
||||
{
|
||||
gBlockSendBuffer[0] = 0x52;
|
||||
}
|
||||
else
|
||||
{
|
||||
gBlockSendBuffer[0] = 0x51;
|
||||
}
|
||||
SendBlock(0, gBlockSendBuffer, 0x20);
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
if (GetBlockReceivedStatus() == 3)
|
||||
{
|
||||
if (gBlockRecvBuffer[0][0] == 0x51 && gBlockRecvBuffer[1][0] == 0x51)
|
||||
{
|
||||
BeginNormalPaletteFade(0xFFFFFFFF, 0, 0, 16, RGB_BLACK);
|
||||
gMain.state = 50;
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_800AAC0();
|
||||
if (gBlockRecvBuffer[GetMultiplayerId()][0] == 0x52)
|
||||
{
|
||||
gMain.state = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
gMain.state = 8;
|
||||
}
|
||||
}
|
||||
ResetBlockReceivedFlags();
|
||||
}
|
||||
break;
|
||||
case 50:
|
||||
if (!UpdatePaletteFade())
|
||||
{
|
||||
sub_800AB9C();
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
case 51:
|
||||
if (IsLinkTaskFinished())
|
||||
{
|
||||
SetMainCallback2(sub_811C04C);
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if (sub_811C150(&gUnknown_203B08C->a0, gText_RefusedBattle, 1))
|
||||
{
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
if (gReceivedRemoteLinkPlayers == 0)
|
||||
{
|
||||
gMain.state++;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
if (sub_811C150(&gUnknown_203B08C->a0, gText_BattleWasRefused, 1))
|
||||
{
|
||||
SetMainCallback2(CB2_ReturnToField);
|
||||
}
|
||||
break;
|
||||
}
|
||||
RunTasks();
|
||||
RunTextPrinters();
|
||||
AnimateSprites();
|
||||
BuildOamBuffer();
|
||||
UpdatePaletteFade();
|
||||
}
|
||||
@@ -0,0 +1,543 @@
|
||||
#include "global.h"
|
||||
#include "union_room_message.h"
|
||||
#include "mevent_server.h"
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84571AC[] = _("");
|
||||
ALIGNED(4) const u8 gUnknown_84571B0[] = _(":");
|
||||
ALIGNED(4) const u8 gUnknown_84571B4[] = _("{EXTRA 7}");
|
||||
ALIGNED(4) const u8 gUnknown_84571B8[] = _("Please start over from the beginning.");
|
||||
ALIGNED(4) const u8 gUnknown_84571E0[] = _("The WIRELESS COMMUNICATION\nSYSTEM search has been canceled.");
|
||||
ALIGNED(4) const u8 gUnref_845721C[] = _("ともだちからの れんらくを\nまっています");
|
||||
ALIGNED(4) const u8 gUnknown_8457234[] = _("{STR_VAR_1}! Awaiting\ncommunication from another player.");
|
||||
ALIGNED(4) const u8 gUnknown_8457264[] = _("{STR_VAR_1}! Awaiting link!\nPress START when everyone's ready.");
|
||||
|
||||
ALIGNED(4) const u8 gJPText_SingleBattle[] = _("シングルバトルを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_DoubleBattle[] = _("ダブルバトルを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_MultiBattle[] = _("マルチバトルを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_TradePokemon[] = _("ポケモンこうかんを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_Chat[] = _("チャットを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_DistWonderCard[] = _("ふしぎなカードをくばる");
|
||||
ALIGNED(4) const u8 gJPText_DistWonderNews[] = _("ふしぎなニュースをくばる");
|
||||
ALIGNED(4) const u8 unref_text_union_room_1[] = _("ふしぎなできごとを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_HoldPokemonJump[] = _("なわとびを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_HoldBerryCrush[] = _("きのみマッシャーを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_HoldBerryPicking[] = _("きのみどりを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_HoldSpinTrade[] = _("ぐるぐるこうかんを かいさいする");
|
||||
ALIGNED(4) const u8 gJPText_HoldSpinShop[] = _("ぐるぐるショップを かいさいする");
|
||||
|
||||
const u8 *const unref_text_ptrs_union_room_0[] = {
|
||||
gJPText_SingleBattle,
|
||||
gJPText_DoubleBattle,
|
||||
gJPText_MultiBattle,
|
||||
gJPText_TradePokemon,
|
||||
gJPText_Chat,
|
||||
gJPText_DistWonderCard,
|
||||
gJPText_DistWonderNews,
|
||||
gJPText_DistWonderCard,
|
||||
gJPText_HoldPokemonJump,
|
||||
gJPText_HoldBerryCrush,
|
||||
gJPText_HoldBerryPicking,
|
||||
gJPText_HoldBerryPicking,
|
||||
gJPText_HoldSpinTrade,
|
||||
gJPText_HoldSpinShop
|
||||
};
|
||||
|
||||
const u8 gText_1PlayerNeeded[] = _("1 player\nneeded.");
|
||||
const u8 gText_2PlayersNeeded[] = _("2 players\nneeded.");
|
||||
const u8 gText_3PlayersNeeded[] = _("3 players\nneeded.");
|
||||
const u8 gText_4PlayersNeeded[] = _("あと4にん\nひつよう");
|
||||
const u8 gText_2PlayerMode[] = _("2-PLAYER\nMODE");
|
||||
const u8 gText_3PlayerMode[] = _("3-PLAYER\nMODE");
|
||||
const u8 gText_4PlayerMode[] = _("4-PLAYER\nMODE");
|
||||
const u8 gText_5PlayerMode[] = _("5-PLAYER\nMODE");
|
||||
|
||||
const u8 *const gUnknown_845742C[][5] = {
|
||||
{
|
||||
gText_1PlayerNeeded,
|
||||
gText_2PlayerMode
|
||||
}, {
|
||||
gText_3PlayersNeeded,
|
||||
gText_2PlayersNeeded,
|
||||
gText_1PlayerNeeded,
|
||||
gText_4PlayerMode
|
||||
}, {
|
||||
gText_1PlayerNeeded,
|
||||
gText_2PlayerMode,
|
||||
gText_3PlayerMode,
|
||||
gText_4PlayerMode,
|
||||
gText_5PlayerMode
|
||||
}, {
|
||||
gText_2PlayersNeeded,
|
||||
gText_1PlayerNeeded,
|
||||
gText_3PlayerMode,
|
||||
gText_4PlayerMode,
|
||||
gText_5PlayerMode
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_845747C[] = _("{B_BUTTON}CANCEL");
|
||||
ALIGNED(4) const u8 unref_text_union_room_2[] = _("ため\nさんかしゃ ぼしゅうちゅう です!");
|
||||
ALIGNED(4) const u8 gUnknown_84574A0[] = _("{STR_VAR_2} contacted you for\n{STR_VAR_1}. Accept?");
|
||||
ALIGNED(4) const u8 gUnknown_84574C4[] = _("{STR_VAR_2} contacted you.\nWill you share {STR_VAR_1}?");
|
||||
ALIGNED(4) const u8 gUnknown_84574EC[] = _("{STR_VAR_2} contacted you.\nAdd to the members?");
|
||||
ALIGNED(4) const u8 gUnknown_8457514[] = _("{STR_VAR_1}!\nAre these members OK?");
|
||||
ALIGNED(4) const u8 gUnknown_8457530[] = _("Cancel {STR_VAR_1} MODE\nwith these members?");
|
||||
ALIGNED(4) const u8 gUnknown_8457554[] = _("An “OK” was sent\nto {STR_VAR_1}.");
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_845756C[] = _("The other TRAINER doesn't appear\nto be available now…\p");
|
||||
ALIGNED(4) const u8 gUnknown_84575A4[] = _("You can't transmit with a TRAINER\nwho is too far away.\p");
|
||||
ALIGNED(4) const u8 gUnknown_84575DC[] = _("The other TRAINER(S) is/are not\nready yet.\p");
|
||||
|
||||
const u8 *const gUnknown_8457608[] = {
|
||||
gUnknown_84575A4,
|
||||
gUnknown_84575DC
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457610[] = _("The {STR_VAR_1} MODE with\nthese members will be canceled.{PAUSE 90}");
|
||||
ALIGNED(4) const u8 gUnknown_8457644[] = _("There is a member who can no\nlonger remain available.\p");
|
||||
|
||||
const u8 *const gUnknown_845767C[] = {
|
||||
gUnknown_845756C,
|
||||
gUnknown_8457644
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457684[] = _("The other TRAINER appears\nunavailable…\p");
|
||||
ALIGNED(4) const u8 gUnknown_84576AC[] = _("{STR_VAR_1} sent back an “OK”!");
|
||||
ALIGNED(4) const u8 gUnknown_84576C4[] = _("{STR_VAR_1} OK'd your registration as\na member.");
|
||||
ALIGNED(4) const u8 gUnknown_84576EC[] = _("{STR_VAR_1} replied, “No…”\p");
|
||||
ALIGNED(4) const u8 gUnknown_8457700[] = _("{STR_VAR_1}!\nAwaiting other members!");
|
||||
ALIGNED(4) const u8 gUnknown_845771C[] = _("Quit being a member?");
|
||||
ALIGNED(4) const u8 gUnknown_8457734[] = _("You stopped being a member.\p");
|
||||
|
||||
const u8 *const gUnknown_8457754[] = {
|
||||
NULL,
|
||||
gUnknown_8457644,
|
||||
gUnknown_8457684,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
gUnknown_84576EC,
|
||||
NULL,
|
||||
NULL,
|
||||
gUnknown_8457734
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_845777C[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been established.");
|
||||
ALIGNED(4) const u8 gUnknown_84577BC[] = _("The WIRELESS COMMUNICATION\nSYSTEM link has been dropped…");
|
||||
ALIGNED(4) const u8 gUnknown_84577F8[] = _("The link with your friend has been\ndropped…");
|
||||
ALIGNED(4) const u8 gUnknown_8457824[] = _("{STR_VAR_1} replied, “No…”");
|
||||
|
||||
const u8 *const gUnknown_8457838[] = {
|
||||
NULL,
|
||||
gUnknown_84577F8,
|
||||
gUnknown_84577F8,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
gUnknown_8457824,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457860[] = _("Do you want the {STR_VAR_2}\nMODE?");
|
||||
ALIGNED(4) const u8 gUnknown_845787C[] = _("Do you want the {STR_VAR_2}\nMODE?");
|
||||
|
||||
const u8 *const gUnknown_8457898[] = {
|
||||
gUnknown_8457860,
|
||||
gUnknown_845787C
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84578A0[] = _("はなしかけています…\nしょうしょう おまちください");
|
||||
ALIGNED(4) const u8 gUnknown_84578BC[] = _("Awaiting {STR_VAR_1}'s response about\nthe trade…");
|
||||
ALIGNED(4) const u8 gUnknown_84578E4[] = _("Communicating{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.");
|
||||
ALIGNED(4) const u8 gUnknown_8457950[] = _("Communicating with {STR_VAR_1}{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.");
|
||||
ALIGNED(4) const u8 gUnknown_84579BC[] = _("Please wait a while{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.\n{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.{PAUSE 15}.");
|
||||
|
||||
const u8 *const gUnknown_8457A34[] = {
|
||||
gUnknown_84578E4,
|
||||
gUnknown_8457950,
|
||||
gUnknown_84579BC
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457A40[] = _("Hiya! Is there something that you\nwanted to do?");
|
||||
ALIGNED(4) const u8 gUnknown_8457A70[] = _("Hello!\nWould you like to do something?");
|
||||
ALIGNED(4) const u8 gUnknown_8457A98[] = _("{STR_VAR_1}: Hiya, we meet again!\nWhat are you up for this time?");
|
||||
ALIGNED(4) const u8 gUnknown_8457AD0[] = _("{STR_VAR_1}: Oh! {PLAYER}, hello!\nWould you like to do something?");
|
||||
|
||||
const u8 *const gUnknown_8457B04[][2] = {
|
||||
{
|
||||
gUnknown_8457A40,
|
||||
gUnknown_8457A70
|
||||
}, {
|
||||
gUnknown_8457A98,
|
||||
gUnknown_8457AD0
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457B14[] = _("Want to do something?");
|
||||
ALIGNED(4) const u8 gUnknown_8457B2C[] = _("Would you like to do something?");
|
||||
ALIGNED(4) const u8 gUnknown_8457B4C[] = _("{STR_VAR_1}: What would you like to\ndo now?");
|
||||
ALIGNED(4) const u8 gUnknown_8457B70[] = _("{STR_VAR_1}‘また なにかする?");
|
||||
|
||||
const u8 *const gUnknown_8457B80[] = {
|
||||
gUnknown_8457B14,
|
||||
gUnknown_8457B2C,
|
||||
gUnknown_8457B4C,
|
||||
gUnknown_8457B4C
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457B90[] = _("Somebody has contacted you.{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_8457BA0[] = _("{STR_VAR_1} has contacted you.{PAUSE 60}");
|
||||
|
||||
const u8 *const gUnknown_8457BCC[] = {
|
||||
gUnknown_8457B90,
|
||||
gUnknown_8457BA0
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457BD4[] = _("Awaiting a response from\nthe other TRAINER…");
|
||||
ALIGNED(4) const u8 gUnknown_8457C00[] = _("Awaiting a response from\n{STR_VAR_1}…");
|
||||
|
||||
const u8 *const gUnknown_8457C20[] = {
|
||||
gUnknown_8457BD4,
|
||||
gUnknown_8457C00
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457C28[] = _("あいての ていあんを まっています\nビーボタンで キャンセル");
|
||||
ALIGNED(4) const u8 gUnknown_8457C48[] = _("The other TRAINER showed\nyou their TRAINER CARD.\pWould you like to show your\nTRAINER CARD?");
|
||||
ALIGNED(4) const u8 gUnknown_8457CA4[] = _("The other TRAINER challenges you\nto battle.\pWill you accept the battle\nchallenge?");
|
||||
ALIGNED(4) const u8 gUnknown_8457CF8[] = _("The other TRAINER invites you\nto chat.\pWill you accept the chat\ninvitation?");
|
||||
ALIGNED(4) const u8 gUnknown_8457D44[] = _("There is an offer to trade your\nregistered Lv. {DYNAMIC 0} {DYNAMIC 1}\pin exchange for a\nLv. {DYNAMIC 2} {DYNAMIC 3}.\pWill you accept this trade\noffer?");
|
||||
ALIGNED(4) const u8 gUnknown_8457DB8[] = _("There is an offer to trade your\nregistered EGG.\lWill you accept this trade offer?");
|
||||
ALIGNED(4) const u8 gUnknown_8457E0C[] = _("The chat has been dropped.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8457E28[] = _("You declined the offer.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8457E44[] = _("You declined the offer.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8457E60[] = _("The chat was ended.\p");
|
||||
|
||||
const u8 *const gUnknown_8457E78[] = {
|
||||
gUnknown_8457C48,
|
||||
gUnknown_8457CA4,
|
||||
gUnknown_8457CF8,
|
||||
gUnknown_8457D44
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457E88[] = _("Oh, hey! We're in a chat right now.\nWant to join us?");
|
||||
ALIGNED(4) const u8 gUnknown_8457EC0[] = _("{STR_VAR_1}: Hey, {PLAYER}!\nWe're having a chat right now.\lWant to join us?");
|
||||
ALIGNED(4) const u8 gUnknown_8457F00[] = _("Oh, hi! We're having a chat now.\nWould you like to join us?");
|
||||
ALIGNED(4) const u8 gUnknown_8457F3C[] = _("{STR_VAR_1}: Oh, hi, {PLAYER}!\nWe're having a chat now.\lWould you like to join us?");
|
||||
|
||||
const u8 *const gUnknown_8457F80[][2] = {
|
||||
{
|
||||
gUnknown_8457E88,
|
||||
gUnknown_8457F00
|
||||
}, {
|
||||
gUnknown_8457EC0,
|
||||
gUnknown_8457F3C
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8457F90[] = _("……\nThe TRAINER appears to be busy…\p");
|
||||
ALIGNED(4) const u8 gUnknown_8457FB4[] = _("A battle, huh?\nAll right, just give me some time.");
|
||||
ALIGNED(4) const u8 gUnknown_8457FE8[] = _("You want to chat, huh?\nSure, just wait a little.");
|
||||
ALIGNED(4) const u8 gUnknown_845801C[] = _("Sure thing! As my “Greetings,”\nhere's my TRAINER CARD.");
|
||||
ALIGNED(4) const u8 gUnknown_8458054[] = _("A battle? Of course, but I need\ntime to get ready.");
|
||||
ALIGNED(4) const u8 gUnknown_8458088[] = _("Did you want to chat?\nOkay, but please wait a moment.");
|
||||
ALIGNED(4) const u8 gUnknown_84580C0[] = _("As my introduction, I'll show you\nmy TRAINER CARD.");
|
||||
|
||||
const u8 *const gUnknown_84580F4[][4] = {
|
||||
{
|
||||
gUnknown_8457FB4,
|
||||
gUnknown_8457FE8,
|
||||
NULL,
|
||||
gUnknown_845801C
|
||||
}, {
|
||||
gUnknown_8458054,
|
||||
gUnknown_8458088,
|
||||
NULL,
|
||||
gUnknown_84580C0
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnref_8458104[] = _("チャットだね!\nわかった ちょっと まってて!");
|
||||
ALIGNED(4) const u8 gUnknown_845812C[] = _("Thanks for waiting!\nLet's get our battle started!{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_8458164[] = _("All right!\nLet's chat!{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_8458180[] = _("Sorry I made you wait!\nLet's get started!{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_84581B0[] = _("Sorry I made you wait!\nLet's chat.{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_84581D8[] = _("The trade will be started.{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_84581F8[] = _("The battle will be started.{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_8458218[] = _("Entering the chat…{PAUSE 60}");
|
||||
|
||||
const u8 *const gUnknown_8458230[][2][3] = {
|
||||
{
|
||||
{
|
||||
gUnknown_84581F8,
|
||||
gUnknown_8458218,
|
||||
gUnknown_84581D8
|
||||
}, {
|
||||
gUnknown_84581F8,
|
||||
gUnknown_8458218,
|
||||
gUnknown_84581D8
|
||||
}
|
||||
}, {
|
||||
{
|
||||
gUnknown_845812C,
|
||||
gUnknown_8458164,
|
||||
gUnknown_84581D8
|
||||
}, {
|
||||
gUnknown_8458180,
|
||||
gUnknown_84581B0,
|
||||
gUnknown_84581D8
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8458260[] = _("Sorry! My POKéMON don't seem to\nbe feeling too well right now.\lLet me battle you another time.\p");
|
||||
ALIGNED(4) const u8 gUnknown_84582C0[] = _("I'm terribly sorry, but my POKéMON\naren't feeling well…\pLet's battle another time.\p");
|
||||
|
||||
const u8 *const gUnknown_8458314[] = {
|
||||
gUnknown_8458260,
|
||||
gUnknown_84582C0
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_845831C[] = _("Huh? My TRAINER CARD…\nWhere'd it go now?\lSorry! I'll show you another time!\p");
|
||||
ALIGNED(4) const u8 gUnknown_845836C[] = _("Oh? Now where did I put my\nTRAINER CARD?…\lSorry! I'll show you later!\p");
|
||||
|
||||
const u8 *const gUnknown_84583B4[] = {
|
||||
gUnknown_845831C,
|
||||
gUnknown_845836C
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84583BC[] = _("If you want to do something with\nme, just give me a shout!\p");
|
||||
ALIGNED(4) const u8 gUnknown_84583F8[] = _("If you want to do something with\nme, don't be shy.\p");
|
||||
|
||||
const u8 *const gUnknown_845842C[] = {
|
||||
gUnknown_84583BC,
|
||||
gUnknown_84583F8
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8458434[] = _("Whoops! Sorry, but I have to do\nsomething else.\lAnother time, okay?\p");
|
||||
ALIGNED(4) const u8 gUnknown_845847C[] = _("If you want to battle, you need\ntwo POKéMON that are below\lLv. 30.\p");
|
||||
ALIGNED(4) const u8 gUnknown_84584C0[] = _("For a battle, you need two\nPOKéMON that are below Lv. 30.\p");
|
||||
ALIGNED(4) const u8 gUnknown_84584FC[] = _("Oh, all right.\nCome see me anytime, okay?\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458528[] = _("Oh…\nPlease come by anytime.\p");
|
||||
|
||||
const u8 *const gUnknown_8458548[] = {
|
||||
gUnknown_84584FC,
|
||||
gUnknown_8458528
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8458550[] = _("Oh, sorry!\nI just can't right this instant.\lLet's chat another time.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458598[] = _("Oh, I'm sorry.\nI have too much to do right now.\lLet's chat some other time.\p");
|
||||
|
||||
const u8 *const gUnknown_84585E8[] = {
|
||||
gUnknown_8458550,
|
||||
gUnknown_8458598
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84585F0[] = _("Whoa!\nI can tell you're pretty tough!\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458618[] = _("You used that move?\nThat's good strategy!\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458644[] = _("Way to go!\nThat was an eye-opener!\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458668[] = _("Oh! How could you use that\nPOKéMON in that situation?\p");
|
||||
ALIGNED(4) const u8 gUnknown_84586A0[] = _("That POKéMON…\nIt's been raised really well!\p");
|
||||
ALIGNED(4) const u8 gUnknown_84586D0[] = _("That's it!\nThis is the right move now!\p");
|
||||
ALIGNED(4) const u8 gUnknown_84586F8[] = _("That's awesome!\nYou can battle that way?\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458724[] = _("You have exquisite timing for\nswitching POKéMON!\p");
|
||||
|
||||
const u8 *const gUnknown_8458758[][4] = {
|
||||
{
|
||||
gUnknown_84585F0,
|
||||
gUnknown_8458618,
|
||||
gUnknown_8458644,
|
||||
gUnknown_8458668
|
||||
}, {
|
||||
gUnknown_84586A0,
|
||||
gUnknown_84586D0,
|
||||
gUnknown_84586F8,
|
||||
gUnknown_8458724
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8458778[] = _("Oh, I see!\nThis is educational!\p");
|
||||
ALIGNED(4) const u8 gUnknown_845879C[] = _("Don't say anything funny anymore!\nI'm sore from laughing!\p");
|
||||
ALIGNED(4) const u8 gUnknown_84587D8[] = _("Oh?\nSomething like that happened.\p");
|
||||
ALIGNED(4) const u8 gUnknown_84587FC[] = _("Hmhm… What?\nSo is this what you're saying?\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458828[] = _("Is that right?\nI didn't know that.\p");
|
||||
ALIGNED(4) const u8 gUnknown_845884C[] = _("Ahaha!\nWhat is that about?\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458868[] = _("Yes, that's exactly it!\nThat's what I meant.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458898[] = _("In other words…\nYes! That's right!\p");
|
||||
|
||||
const u8 *const gUnknown_84588BC[][4] = {
|
||||
{
|
||||
gUnknown_8458778,
|
||||
gUnknown_845879C,
|
||||
gUnknown_84587D8,
|
||||
gUnknown_84587FC
|
||||
}, {
|
||||
gUnknown_8458828,
|
||||
gUnknown_845884C,
|
||||
gUnknown_8458868,
|
||||
gUnknown_8458898
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84588DC[] = _("I'm just showing my TRAINER CARD\nas my way of greeting.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458918[] = _("I hope I get to know you better!\p");
|
||||
ALIGNED(4) const u8 gUnknown_845893C[] = _("We're showing each other our\nTRAINER CARDS to get acquainted.\p");
|
||||
ALIGNED(4) const u8 gUnknown_845897C[] = _("Glad to meet you.\nPlease don't be a stranger!\p");
|
||||
|
||||
const u8 *const gUnknown_84589AC[][2] = {
|
||||
{
|
||||
gUnknown_84588DC,
|
||||
gUnknown_8458918
|
||||
}, {
|
||||
gUnknown_845893C,
|
||||
gUnknown_845897C
|
||||
}
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84589BC[] = _("Yeahah!\nI really wanted this POKéMON!\p");
|
||||
ALIGNED(4) const u8 gUnknown_84589E4[] = _("Finally, a trade got me that\nPOKéMON I'd wanted a long time.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458A24[] = _("I'm trading POKéMON right now.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458A44[] = _("I finally got that POKéMON I\nwanted in a trade!\p");
|
||||
|
||||
const u8 *const gUnknown_8458A78[][4] = {
|
||||
{
|
||||
gUnknown_84589BC,
|
||||
gUnknown_84589E4
|
||||
}, {
|
||||
gUnknown_8458A24,
|
||||
gUnknown_8458A44
|
||||
}
|
||||
};
|
||||
|
||||
const u8 gUnknown_8458A98[] = _("{STR_VAR_1} checked the\nTRADING BOARD.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458AB8[] = _("Welcome to the TRADING BOARD.\pYou may register your POKéMON\nand offer it up for a trade.\pWould you like to register one of\nyour POKéMON?");
|
||||
ALIGNED(4) const u8 gUnknown_8458B44[] = _("This TRADING BOARD is used for\noffering a POKéMON for a trade.\pAll you need to do is register a\nPOKéMON for a trade.\pAnother TRAINER may offer a party\nPOKéMON in return for the trade.\pWe hope you will register POKéMON\nand trade them with many, many\lother TRAINERS.\pWould you like to register one of\nyour POKéMON?");
|
||||
ALIGNED(4) const u8 gUnref_ThankYouForComing_JP[] = _("こうかんけいじばん の とうろくが\nかんりょう しました\pごりよう ありがとう\nございました!\p");
|
||||
ALIGNED(4) const u8 gUnref_NoOneRegisteredMon[] = _("けいじばんに だれも ポケモンを\nとうろく していません\p\n");
|
||||
ALIGNED(4) const u8 gUnknown_8458CD4[] = _("Please choose the type of POKéMON\nthat you would like in the trade.\n");
|
||||
ALIGNED(4) const u8 gUnknown_8458D1C[] = _("Which of your party POKéMON will\nyou offer in trade?\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458D54[] = _("Registration has been canceled.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458D78[] = _("Registration has been completed.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458D9C[] = _("The trade has been canceled.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458DBC[] = _("Cancel the registration of your\nLv. {STR_VAR_2} {STR_VAR_1}?");
|
||||
ALIGNED(4) const u8 gUnknown_8458DE8[] = _("Cancel the registration of your\nEGG?");
|
||||
ALIGNED(4) const u8 gUnknown_8458E10[] = _("The registration has been canceled.\p");
|
||||
ALIGNED(4) const u8 gUnref_ShowPeopleWhoLikeYou_JP[] = _("こうかんを きぼうしているひとを\nひょうじします");
|
||||
ALIGNED(4) const u8 gUnref_PleaseChooseTrainerYouWant[] = _("こうかん したい トレーナーを\nえらんで ください");
|
||||
ALIGNED(4) const u8 gUnknown_8458E70[] = _("Would you like to ask {STR_VAR_1} to\nmake a trade?");
|
||||
ALIGNED(4) const u8 gUnref_ImWaitingForAnswer[] = _("……\nあいての へんじを まっています");
|
||||
ALIGNED(4) const u8 gUnref_MonSentOutIsNotRegistered[] = _("あなたが こうかんにだす\nポケモンが とうろくされていません\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458ED0[] = _("You don't have a {STR_VAR_2}-type\nPOKéMON that {STR_VAR_1} wants.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458F04[] = _("You don't have an EGG that\n{STR_VAR_1} wants.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458F2C[] = _("{STR_VAR_1} can't make a trade for\nyour POKéMON right now.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458F60[] = _("You can't make a trade for\n{STR_VAR_1}'s POKéMON right now.\p");
|
||||
|
||||
const u8 *const gUnknown_8458F94[] = {
|
||||
gUnknown_8458F2C,
|
||||
gUnknown_8458F60
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8458F9C[] = _("Your trade offer was rejected.\p");
|
||||
ALIGNED(4) const u8 gUnknown_8458FBC[] = _("EGG TRADE");
|
||||
ALIGNED(4) const u8 gUnknown_8458FC8[] = _("{DPAD_UPDOWN}CHOOSE {A_BUTTON}JOIN {B_BUTTON}CANCEL");
|
||||
ALIGNED(4) const u8 gUnknown_8458FE4[] = _("Please choose a TRAINER.");
|
||||
ALIGNED(4) const u8 gUnknown_8459000[] = _("Please choose a TRAINER for\na SINGLE BATTLE.");
|
||||
ALIGNED(4) const u8 gUnknown_8459030[] = _("Please choose a TRAINER for\na DOUBLE BATTLE.");
|
||||
ALIGNED(4) const u8 gUnknown_8459060[] = _("Please choose the LEADER\nfor a MULTI BATTLE.");
|
||||
ALIGNED(4) const u8 gUnknown_8459090[] = _("Please choose the TRAINER to\ntrade with.");
|
||||
ALIGNED(4) const u8 gUnknown_84590BC[] = _("Please choose the TRAINER who is\nsharing WONDER CARDS.");
|
||||
ALIGNED(4) const u8 gUnknown_84590F4[] = _("Please choose the TRAINER who is\nsharing WONDER NEWS.");
|
||||
ALIGNED(4) const u8 gUnknown_845912C[] = _("Jump with mini POKéMON!\nPlease choose the LEADER.");
|
||||
ALIGNED(4) const u8 gUnknown_8459160[] = _("BERRY CRUSH!\nPlease choose the LEADER.");
|
||||
ALIGNED(4) const u8 gUnknown_8459188[] = _("DODRIO BERRY-PICKING!\nPlease choose the LEADER.");
|
||||
|
||||
const u8 *const gUnknown_84591B8[] = {
|
||||
gUnknown_8459000,
|
||||
gUnknown_8459030,
|
||||
gUnknown_8459060,
|
||||
gUnknown_8459090,
|
||||
gUnknown_845912C,
|
||||
gUnknown_8459160,
|
||||
gUnknown_8459188,
|
||||
gUnknown_84590BC,
|
||||
gUnknown_84590F4
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84591DC[] = _("Searching for a WIRELESS\nCOMMUNICATION SYSTEM. Wait...");
|
||||
ALIGNED(4) const u8 gUnref_NeedAtLeast2InDblBtl[] = _("ダブルバトルでは 2ひき いじょうの\nポケモンが ひつようです\p");
|
||||
ALIGNED(4) const u8 gUnknown_8459238[] = _("Awaiting {STR_VAR_1}'s response…");
|
||||
ALIGNED(4) const u8 gUnknown_8459250[] = _("{STR_VAR_1} has been asked to register\nyou as a member. Please wait.");
|
||||
ALIGNED(4) const u8 gUnknown_845928C[] = _("Awaiting a response from the\nWIRELESS COMMUNICATION SYSTEM.");
|
||||
ALIGNED(4) const u8 gUnref_PlsWaitLittleWHile[] = _("ほかの さんかしゃが そろうまで\nしょうしょう おまちください");
|
||||
ALIGNED(4) const u8 gUnknown_84592E8[] = _("No CARDS appear to be shared \nright now.");
|
||||
ALIGNED(4) const u8 gUnknown_8459314[] = _("No NEWS appears to be shared\nright now.");
|
||||
|
||||
const u8 *const gUnknown_845933C[] = {
|
||||
gUnknown_84592E8,
|
||||
gUnknown_8459314
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8459344[] = _("BATTLE");
|
||||
ALIGNED(4) const u8 gUnknown_845934C[] = _("CHAT");
|
||||
ALIGNED(4) const u8 gUnknown_8459354[] = _("GREETINGS");
|
||||
ALIGNED(4) const u8 gUnknown_8459360[] = _("EXIT");
|
||||
ALIGNED(4) const u8 gUnknown_8459368[] = _("EXIT");
|
||||
ALIGNED(4) const u8 gUnknown_8459370[] = _("INFO");
|
||||
ALIGNED(4) const u8 gUnknown_8459378[] = _("NAME{CLEAR_TO 0x3C}WANTED{CLEAR_TO 0x6E}OFFER{CLEAR_TO 0xC6}LV.");
|
||||
ALIGNED(4) const u8 gUnknown_8459394[] = _("SINGLE BATTLE");
|
||||
ALIGNED(4) const u8 gUnknown_84593A4[] = _("DOUBLE BATTLE");
|
||||
ALIGNED(4) const u8 gUnknown_84593B4[] = _("MULTI BATTLE");
|
||||
ALIGNED(4) const u8 gUnknown_84593C4[] = _("POKéMON TRADES");
|
||||
ALIGNED(4) const u8 gUnknown_84593D4[] = _("CHAT");
|
||||
ALIGNED(4) const u8 gUnknown_84593DC[] = _("CARDS");
|
||||
ALIGNED(4) const u8 gUnknown_84593E4[] = _("WONDER CARDS");
|
||||
ALIGNED(4) const u8 gUnknown_84593F4[] = _("WONDER NEWS");
|
||||
ALIGNED(4) const u8 gUnknown_8459400[] = _("POKéMON JUMP");
|
||||
ALIGNED(4) const u8 gUnknown_8459410[] = _("BERRY CRUSH");
|
||||
ALIGNED(4) const u8 gUnknown_845941C[] = _("BERRY-PICKING");
|
||||
ALIGNED(4) const u8 gUnknown_845942C[] = _("SEARCH");
|
||||
ALIGNED(4) const u8 gUnknown_8459434[] = _("ぐるぐるこうかん");
|
||||
ALIGNED(4) const u8 gUnknown_8459440[] = _("アイテムトレード");
|
||||
ALIGNED(4) const u8 gUnknown_845944C[] = _("It's a NORMAL CARD.");
|
||||
ALIGNED(4) const u8 gUnknown_8459460[] = _("It's a BRONZE CARD!");
|
||||
ALIGNED(4) const u8 gUnknown_8459474[] = _("It's a COPPER CARD!");
|
||||
ALIGNED(4) const u8 gUnknown_8459488[] = _("It's a SILVER CARD!");
|
||||
ALIGNED(4) const u8 gUnknown_845949C[] = _("It's a GOLD CARD!");
|
||||
|
||||
const u8 *const gUnknown_84594B0[] = {
|
||||
gUnknown_845944C,
|
||||
gUnknown_8459460,
|
||||
gUnknown_8459474,
|
||||
gUnknown_8459488,
|
||||
gUnknown_845949C
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_84594C4[] = _("This is {SPECIAL_F7 0x00} {SPECIAL_F7 0x01}'s\nTRAINER CARD…\l{SPECIAL_F7 0x02}\pPOKéDEX: {SPECIAL_F7 0x03}\nTIME: {SPECIAL_F7 0x04}:{SPECIAL_F7 0x05}\p");
|
||||
ALIGNED(4) const u8 gUnknown_8459504[] = _("BATTLES: {SPECIAL_F7 0x00} WINS {SPECIAL_F7 0x02} LOSSES\nTRADES: {SPECIAL_F7 0x03} TIMES\p“{SPECIAL_F7 0x04} {SPECIAL_F7 0x05}\n{SPECIAL_F7 0x06} {SPECIAL_F7 0x07}”\p");
|
||||
ALIGNED(4) const u8 gUnknown_8459544[] = _("{SPECIAL_F7 0x01}: Glad to have met you!{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_8459564[] = _("{SPECIAL_F7 0x01}: Glad to meet you!{PAUSE 60}");
|
||||
|
||||
const u8 *const gUnknown_8459580[] = {
|
||||
gUnknown_8459544,
|
||||
gUnknown_8459564
|
||||
};
|
||||
|
||||
ALIGNED(4) const u8 gUnknown_8459588[] = _("Finished checking {SPECIAL_F7 0x01}'s\nTRAINER CARD.{PAUSE 60}");
|
||||
ALIGNED(4) const u8 gUnknown_84595B0[] = _("Canceled reading the Card.");
|
||||
|
||||
const struct mevent_client_cmd gUnknown_84595CC[] = {
|
||||
CLI_RECEIVE(0x15),
|
||||
CLI_RECVBUF,
|
||||
CLI_SENDALL,
|
||||
CLI_RETURN(0x0e)
|
||||
};
|
||||
|
||||
const struct mevent_server_cmd gMEventSrvScript_OtherTrainerCanceled[] = {
|
||||
SRV_SEND(0x20, gUnknown_84595CC),
|
||||
SRV_WAITSND,
|
||||
SRV_SENDSTR(0x1b, gUnknown_84595B0),
|
||||
SRV_WAITSND,
|
||||
SRV_RECV(0x14),
|
||||
SRV_RETURN(0x09)
|
||||
};
|
||||
+1
-1
@@ -1273,7 +1273,7 @@ static u8 GetRematchableTrainerLocalId(void)
|
||||
|
||||
static void StartTrainerObjectMovementScript(struct VsSeekerTrainerInfo * trainerInfo, const u8 * script)
|
||||
{
|
||||
npc_sync_anim_pause_bits(&gObjectEvents[trainerInfo->objectEventId]);
|
||||
UnfreezeObjectEvent(&gObjectEvents[trainerInfo->objectEventId]);
|
||||
ScriptMovement_StartObjectMovementScript(trainerInfo->localId, gSaveBlock1Ptr->location.mapNum, gSaveBlock1Ptr->location.mapGroup, script);
|
||||
}
|
||||
|
||||
|
||||
@@ -364,7 +364,7 @@ void sub_814F65C(u8 windowId, u8 fontId, const u8 * str, u8 x, u8 y, u8 palIdx)
|
||||
|
||||
u32 sub_814F714(struct UnkStruct_x20 * unk20, u32 * arg1)
|
||||
{
|
||||
u32 r8 = unk20->unk.field_0.unk_0a_0;
|
||||
u32 r8 = unk20->unk.gname.unk_0a_0;
|
||||
s32 i, j, k;
|
||||
|
||||
for (i = 0; i < NELEMS(gUnknown_846FAC0); i++)
|
||||
@@ -376,7 +376,7 @@ u32 sub_814F714(struct UnkStruct_x20 * unk20, u32 * arg1)
|
||||
k = 0;
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
if (unk20->unk.field_0.unk_04[j] != 0) k++;
|
||||
if (unk20->unk.gname.unk_04[j] != 0) k++;
|
||||
}
|
||||
k++;
|
||||
arg1[gUnknown_846FAC0[i][1]] += k;
|
||||
|
||||
Reference in New Issue
Block a user