Document dodrio berry picking
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 395 B |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 310 B After Width: | Height: | Size: 310 B |
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 3.3 KiB |
Before Width: | Height: | Size: 195 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 71 B After Width: | Height: | Size: 71 B |
@ -1,7 +1,7 @@
|
||||
#ifndef GUARD_DODRIO_BERRY_PICKING_H
|
||||
#define GUARD_DODRIO_BERRY_PICKING_H
|
||||
|
||||
void StartDodrioBerryPicking(u16 a0, void (*callback)(void));
|
||||
void StartDodrioBerryPicking(u16 partyId, void (*exitCallback)(void));
|
||||
void IsDodrioInParty(void);
|
||||
void ShowDodrioBerryPickingRecords(void);
|
||||
|
||||
|
@ -262,7 +262,7 @@ bool8 LinkRfu_GetNameIfSerial7F7D(struct GFtgtGname *buff1, u8 *buff2, u8 idx);
|
||||
s32 sub_800E87C(u8 idx);
|
||||
void CreateTask_RfuIdle(void);
|
||||
void DestroyTask_RfuIdle(void);
|
||||
void sub_8011AC8(void);
|
||||
void ClearRecvCommands(void);
|
||||
void LinkRfu_FatalError(void);
|
||||
bool32 sub_8011A9C(void);
|
||||
void sub_80104B0(void);
|
||||
|
@ -1,6 +1,27 @@
|
||||
#ifndef GUARD_SOUND_H
|
||||
#define GUARD_SOUND_H
|
||||
|
||||
enum {
|
||||
FANFARE_LEVEL_UP,
|
||||
FANFARE_OBTAIN_ITEM,
|
||||
FANFARE_EVOLVED,
|
||||
FANFARE_OBTAIN_TMHM,
|
||||
FANFARE_HEAL,
|
||||
FANFARE_OBTAIN_BADGE,
|
||||
FANFARE_MOVE_DELETED,
|
||||
FANFARE_OBTAIN_BERRY,
|
||||
FANFARE_AWAKEN_LEGEND,
|
||||
FANFARE_SLOTS_JACKPOT,
|
||||
FANFARE_SLOTS_WIN,
|
||||
FANFARE_TOO_BAD,
|
||||
FANFARE_RG_POKE_FLUTE,
|
||||
FANFARE_RG_OBTAIN_KEY_ITEM,
|
||||
FANFARE_RG_DEX_RATING,
|
||||
FANFARE_OBTAIN_B_POINTS,
|
||||
FANFARE_OBTAIN_SYMBOL,
|
||||
FANFARE_REGISTER_MATCH_CALL,
|
||||
};
|
||||
|
||||
void InitMapMusic(void);
|
||||
void MapMusicMain(void);
|
||||
void ResetMapMusic(void);
|
||||
|
@ -2516,12 +2516,12 @@ void sub_80236B8(struct BerryCrushGame *r5)
|
||||
{
|
||||
if (r5->unk10 > 70)
|
||||
{
|
||||
sub_8011AC8();
|
||||
ClearRecvCommands();
|
||||
r5->unk10 = 0;
|
||||
}
|
||||
else if (r5->unk5C.unk02_3 == 0)
|
||||
{
|
||||
sub_8011AC8();
|
||||
ClearRecvCommands();
|
||||
r5->unk10 = 0;
|
||||
}
|
||||
}
|
||||
|
24
src/link.c
@ -168,7 +168,7 @@ static const u32 sWirelessLinkDisplayTilemap[] = INCBIN_U32("graphics/interface/
|
||||
static const u16 sLinkTestDigitsPal[] = INCBIN_U16("graphics/interface/link_test_digits.gbapal");
|
||||
static const u16 sLinkTestDigitsGfx[] = INCBIN_U16("graphics/interface/link_test_digits.4bpp");
|
||||
static const u8 sUnusedTransparentWhite[] = _("{HIGHLIGHT TRANSPARENT}{COLOR WHITE}");
|
||||
static const u16 s2BlankTilesGfx[] = INCBIN_U16("graphics/interface/blank_1x2.4bpp");
|
||||
static const u16 sCommErrorBg_Gfx[] = INCBIN_U16("graphics/interface/comm_error_bg.4bpp");
|
||||
static const struct BlockRequest sBlockRequests[] = {
|
||||
{gBlockSendBuffer, 200},
|
||||
{gBlockSendBuffer, 200},
|
||||
@ -1680,9 +1680,9 @@ void CB2_LinkError(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_800B080(void)
|
||||
static void ErrorMsg_MoveCloserToPartner(void)
|
||||
{
|
||||
LoadBgTiles(0, s2BlankTilesGfx, 0x20, 0);
|
||||
LoadBgTiles(0, sCommErrorBg_Gfx, 0x20, 0);
|
||||
DecompressAndLoadBgGfxUsingHeap(1, sWirelessLinkDisplayGfx, FALSE, 0, 0);
|
||||
CopyToBgTilemapBuffer(1, sWirelessLinkDisplayTilemap, 0, 0);
|
||||
CopyBgTilemapBufferToVram(1);
|
||||
@ -1697,9 +1697,9 @@ static void sub_800B080(void)
|
||||
CopyWindowToVram(2, 3);
|
||||
}
|
||||
|
||||
static void sub_800B138(void)
|
||||
static void ErrorMsg_CheckConnections(void)
|
||||
{
|
||||
LoadBgTiles(0, s2BlankTilesGfx, 0x20, 0);
|
||||
LoadBgTiles(0, sCommErrorBg_Gfx, 0x20, 0);
|
||||
FillWindowPixelBuffer(1, PIXEL_FILL(0));
|
||||
FillWindowPixelBuffer(2, PIXEL_FILL(0));
|
||||
AddTextPrinterParameterized3(1, 3, 2, 0, sTextColors, 0, gText_CommErrorCheckConnections);
|
||||
@ -1715,20 +1715,14 @@ static void CB2_PrintErrorMessage(void)
|
||||
{
|
||||
case 00:
|
||||
if (sLinkErrorBuffer.unk_06)
|
||||
{
|
||||
sub_800B080();
|
||||
}
|
||||
ErrorMsg_MoveCloserToPartner();
|
||||
else
|
||||
{
|
||||
sub_800B138();
|
||||
}
|
||||
ErrorMsg_CheckConnections();
|
||||
break;
|
||||
case 02:
|
||||
ShowBg(0);
|
||||
if (sLinkErrorBuffer.unk_06)
|
||||
{
|
||||
ShowBg(1);
|
||||
}
|
||||
break;
|
||||
case 30:
|
||||
PlaySE(SE_BOO);
|
||||
@ -1741,13 +1735,9 @@ static void CB2_PrintErrorMessage(void)
|
||||
break;
|
||||
case 130:
|
||||
if (gWirelessCommType == 2)
|
||||
{
|
||||
AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnTitleScreen);
|
||||
}
|
||||
else if (gWirelessCommType == 1)
|
||||
{
|
||||
AddTextPrinterParameterized3(0, 3, 2, 20, sTextColors, 0, gText_ABtnRegistrationCounter);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (gMain.state == 160)
|
||||
|
@ -2472,7 +2472,7 @@ void RfuVSync(void)
|
||||
rfu_LMAN_syncVBlank();
|
||||
}
|
||||
|
||||
void sub_8011AC8(void)
|
||||
void ClearRecvCommands(void)
|
||||
{
|
||||
CpuFill32(0, gRecvCmds, sizeof(gRecvCmds));
|
||||
}
|
||||
|
@ -4904,7 +4904,7 @@ void ItemUseCB_RareCandy(u8 taskId, TaskFunc task)
|
||||
else
|
||||
{
|
||||
gPartyMenuUseExitCallback = TRUE;
|
||||
PlayFanfareByFanfareNum(0);
|
||||
PlayFanfareByFanfareNum(FANFARE_LEVEL_UP);
|
||||
UpdateMonDisplayInfoAfterRareCandy(gPartyMenu.slotId, mon);
|
||||
RemoveBagItem(gSpecialVar_ItemId, 1);
|
||||
GetMonNickname(mon, gStringVar1);
|
||||
|
41
src/sound.c
@ -41,24 +41,24 @@ static void Task_DuckBGMForPokemonCry(u8 taskId);
|
||||
static void RestoreBGMVolumeAfterPokemonCry(void);
|
||||
|
||||
static const struct Fanfare sFanfares[] = {
|
||||
{ MUS_LEVEL_UP, 80 },
|
||||
{ MUS_OBTAIN_ITEM, 160 },
|
||||
{ MUS_EVOLVED, 220 },
|
||||
{ MUS_OBTAIN_TMHM, 220 },
|
||||
{ MUS_HEAL, 160 },
|
||||
{ MUS_OBTAIN_BADGE, 340 },
|
||||
{ MUS_MOVE_DELETED, 180 },
|
||||
{ MUS_OBTAIN_BERRY, 120 },
|
||||
{ MUS_AWAKEN_LEGEND, 710 },
|
||||
{ MUS_SLOTS_JACKPOT, 250 },
|
||||
{ MUS_SLOTS_WIN, 150 },
|
||||
{ MUS_TOO_BAD, 160 },
|
||||
{ MUS_RG_POKE_FLUTE, 450 },
|
||||
{ MUS_RG_OBTAIN_KEY_ITEM, 170 },
|
||||
{ MUS_RG_DEX_RATING, 196 },
|
||||
{ MUS_OBTAIN_B_POINTS, 313 },
|
||||
{ MUS_OBTAIN_SYMBOL, 318 },
|
||||
{ MUS_REGISTER_MATCH_CALL, 135 },
|
||||
[FANFARE_LEVEL_UP] = { MUS_LEVEL_UP, 80 },
|
||||
[FANFARE_OBTAIN_ITEM] = { MUS_OBTAIN_ITEM, 160 },
|
||||
[FANFARE_EVOLVED] = { MUS_EVOLVED, 220 },
|
||||
[FANFARE_OBTAIN_TMHM] = { MUS_OBTAIN_TMHM, 220 },
|
||||
[FANFARE_HEAL] = { MUS_HEAL, 160 },
|
||||
[FANFARE_OBTAIN_BADGE] = { MUS_OBTAIN_BADGE, 340 },
|
||||
[FANFARE_MOVE_DELETED] = { MUS_MOVE_DELETED, 180 },
|
||||
[FANFARE_OBTAIN_BERRY] = { MUS_OBTAIN_BERRY, 120 },
|
||||
[FANFARE_AWAKEN_LEGEND] = { MUS_AWAKEN_LEGEND, 710 },
|
||||
[FANFARE_SLOTS_JACKPOT] = { MUS_SLOTS_JACKPOT, 250 },
|
||||
[FANFARE_SLOTS_WIN] = { MUS_SLOTS_WIN, 150 },
|
||||
[FANFARE_TOO_BAD] = { MUS_TOO_BAD, 160 },
|
||||
[FANFARE_RG_POKE_FLUTE] = { MUS_RG_POKE_FLUTE, 450 },
|
||||
[FANFARE_RG_OBTAIN_KEY_ITEM] = { MUS_RG_OBTAIN_KEY_ITEM, 170 },
|
||||
[FANFARE_RG_DEX_RATING] = { MUS_RG_DEX_RATING, 196 },
|
||||
[FANFARE_OBTAIN_B_POINTS] = { MUS_OBTAIN_B_POINTS, 313 },
|
||||
[FANFARE_OBTAIN_SYMBOL] = { MUS_OBTAIN_SYMBOL, 318 },
|
||||
[FANFARE_REGISTER_MATCH_CALL] = { MUS_REGISTER_MATCH_CALL, 135 },
|
||||
};
|
||||
|
||||
#define CRY_VOLUME 120 // was 125 in R/S
|
||||
@ -212,6 +212,7 @@ bool8 WaitFanfare(bool8 stop)
|
||||
}
|
||||
}
|
||||
|
||||
// Unused
|
||||
void StopFanfareByFanfareNum(u8 fanfareNum)
|
||||
{
|
||||
m4aSongNumStop(sFanfares[fanfareNum].songNum);
|
||||
@ -220,7 +221,7 @@ void StopFanfareByFanfareNum(u8 fanfareNum)
|
||||
void PlayFanfare(u16 songNum)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; (u32)i < 18; i++)
|
||||
for (i = 0; (u32)i < ARRAY_COUNT(sFanfares); i++)
|
||||
{
|
||||
if (sFanfares[i].songNum == songNum)
|
||||
{
|
||||
@ -230,6 +231,8 @@ void PlayFanfare(u16 songNum)
|
||||
}
|
||||
}
|
||||
|
||||
// songNum is not in sFanfares
|
||||
// Play first fanfare in table instead
|
||||
PlayFanfareByFanfareNum(0);
|
||||
CreateFanfareTask();
|
||||
}
|
||||
|