mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-08-25 10:55:40 -05:00
Pokémon Cry Documentation - Part 1
This commit is contained in:
@@ -779,7 +779,7 @@ void Pokemon_LoadLevelUpMovesOf(int monSpecies, int monForm, u16 *monLevelUpMove
|
||||
*
|
||||
* @param chatotCry Chatot cry data from the save block. Only used
|
||||
* if the Pokemon itself is Chatot.
|
||||
* @param crymod Modification to apply to the Pokemon's cry.
|
||||
* @param cryMod Modification to apply to the Pokemon's cry.
|
||||
* @param species
|
||||
* @param form
|
||||
* @param pan
|
||||
@@ -787,7 +787,7 @@ void Pokemon_LoadLevelUpMovesOf(int monSpecies, int monForm, u16 *monLevelUpMove
|
||||
* @param forceDefaultChatot If TRUE, force usage of Chatot's default cry.
|
||||
* @param heapID
|
||||
*/
|
||||
void Pokemon_PlayCry(ChatotCry *chatotCry, enum PokemonCryMod crymod, u16 species, int form, int pan, int volume, int forceDefaultChatot, int heapID);
|
||||
void Pokemon_PlayCry(ChatotCry *chatotCry, enum PokemonCryMod cryMod, u16 species, int form, int pan, int volume, int forceDefaultChatot, int heapID);
|
||||
|
||||
/**
|
||||
* @brief Play a Pokemon's cry, according to the given species and form number.
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef POKEPLATINUM_UNK_02005474_H
|
||||
#define POKEPLATINUM_UNK_02005474_H
|
||||
|
||||
#include "constants/sound.h"
|
||||
|
||||
BOOL sub_02005474(u16 param0);
|
||||
BOOL Sound_PlayBGM(u16 param0);
|
||||
BOOL sub_02005588(u8 param0, u16 param1);
|
||||
@@ -21,12 +23,12 @@ int Sound_IsEffectPlaying(u16 param0);
|
||||
int sub_020057E0();
|
||||
void sub_020057FC(u16 param0, u16 param1, int param2);
|
||||
void sub_02005818(int param0);
|
||||
BOOL sub_02005844(u16 param0, u8 param1);
|
||||
BOOL sub_0200590C(u16 param0, u8 param1, u8 param2);
|
||||
BOOL sub_02005844(u16 species, u8 form);
|
||||
BOOL sub_0200590C(u16 species, u8 delay, u8 form);
|
||||
void sub_0200592C(int param0);
|
||||
int sub_0200598C(void);
|
||||
BOOL Sound_PlayPokemonCry(int param0, u16 species, int param2, int param3, int heapID, u8 param5);
|
||||
void Sound_PlayDelayedPokemonCry(int param0, u16 param1, int param2, int param3, int heapID, u8 param5, u8 param6);
|
||||
BOOL Sound_PlayPokemonCry(enum PokemonCryMod cryMod, u16 species, int param2, int volume, int heapID, u8 form);
|
||||
void Sound_PlayDelayedPokemonCry(enum PokemonCryMod cryMod, u16 species, int param2, int volume, int heapID, u8 delay, u8 form);
|
||||
void sub_0200605C(void);
|
||||
BOOL sub_02006150(u16 param0);
|
||||
int sub_0200619C(void);
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
#ifndef POKEPLATINUM_UNK_02006224_H
|
||||
#define POKEPLATINUM_UNK_02006224_H
|
||||
|
||||
#include <nitro/spi.h>
|
||||
#include "constants/sound.h"
|
||||
|
||||
#include "struct_defs/chatot_cry.h"
|
||||
|
||||
BOOL CheckMicRecordingStatus(void);
|
||||
BOOL IsChatotCryStructReadyForProcessing(const ChatotCry *param0);
|
||||
BOOL ProcessAudioInput(const ChatotCry *param0, u32 param1, int param2, int param3);
|
||||
BOOL IsChatotCryStructReadyForProcessing(const ChatotCry *cry);
|
||||
BOOL ProcessAudioInput(const ChatotCry *cry, u32 param1, int volume, int pan);
|
||||
void ResetMicStatusFlags(void);
|
||||
MICResult StartMicSampling(void);
|
||||
MICResult StopMicSampling(void);
|
||||
void StoreMicDataInChatotCryStruct(ChatotCry *param0);
|
||||
void Sound_FlagDefaultChatotCry(u8 param0);
|
||||
void Sound_FlagDefaultChatotCry(u8 value);
|
||||
BOOL Sound_PlayChatotCry(ChatotCry *param0, u32 param1, int param2, int param3);
|
||||
BOOL Sound_PlayDelayedChatotCry(ChatotCry *param0, u32 param1, int param2, int param3, u8 param4);
|
||||
BOOL Sound_PlayDelayedChatotCry(ChatotCry *param0, u32 param1, int volume, int pan, u8 delay);
|
||||
int Sound_Chatter(ChatotCry *param0);
|
||||
BOOL Sound_CanPlayChatotCry(int param0);
|
||||
BOOL Sound_CanPlayChatotCry(enum PokemonCryMod cryMod);
|
||||
|
||||
#endif // POKEPLATINUM_UNK_02006224_H
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "struct_decls/struct_0205E884_decl.h"
|
||||
#include "struct_decls/struct_02061AB4_decl.h"
|
||||
#include "struct_defs/struct_02099F80.h"
|
||||
@@ -1116,7 +1118,7 @@ static BOOL ov6_0223EBDC(UnkStruct_ov6_0223EA98 *param0)
|
||||
Easy3DObject_SetPosition(¶m0->unk_24, param0->unk_E4.unk_00, v2, param0->unk_F4.unk_00);
|
||||
|
||||
if (v0[0] && v0[1]) {
|
||||
Sound_PlayPokemonCry(0, 480, 0, 100, HEAP_ID_FIELD, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, SPECIES_UXIE, 0, 100, HEAP_ID_FIELD, 0);
|
||||
param0->unk_18++;
|
||||
}
|
||||
break;
|
||||
@@ -1339,7 +1341,7 @@ static BOOL ov6_0223EE5C(UnkStruct_ov6_0223EA98 *param0)
|
||||
}
|
||||
|
||||
param0->unk_D0 = 0;
|
||||
Sound_PlayPokemonCry(0, 481, 0, 100, HEAP_ID_FIELD, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, SPECIES_MESPRIT, 0, 100, HEAP_ID_FIELD, 0);
|
||||
param0->unk_18++;
|
||||
break;
|
||||
case 16:
|
||||
@@ -1480,7 +1482,7 @@ static BOOL ov6_0223F744(UnkStruct_ov6_0223EA98 *param0)
|
||||
Easy3DObject_SetPosition(¶m0->unk_24, param0->unk_E4.unk_00, v2, param0->unk_F4.unk_00);
|
||||
|
||||
if (v0[0] && v0[1]) {
|
||||
Sound_PlayPokemonCry(0, 482, 0, 100, HEAP_ID_FIELD, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, SPECIES_AZELF, 0, 100, HEAP_ID_FIELD, 0);
|
||||
param0->unk_18++;
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "struct_decls/struct_020216E0_decl.h"
|
||||
#include "struct_decls/struct_02027860_decl.h"
|
||||
#include "struct_decls/struct_0205E884_decl.h"
|
||||
@@ -6719,7 +6721,7 @@ static void ov9_0224EA94(UnkStruct_ov101_021D5D90 *param0, void *param1)
|
||||
switch (v1->unk_2C) {
|
||||
case 0:
|
||||
if (v2->unk_07 == 1) {
|
||||
sub_02005844(487, 0);
|
||||
sub_02005844(SPECIES_GIRATINA, 0);
|
||||
} else if (v2->unk_07 == 2) {
|
||||
Sound_PlayEffect(1609);
|
||||
}
|
||||
@@ -8860,7 +8862,7 @@ static int ov9_02250918(UnkStruct_ov9_02249B04 *param0, FieldTask *param1, u16 *
|
||||
UnkStruct_ov9_02250918 *v0 = ov9_0224E37C(param0, sizeof(UnkStruct_ov9_02250918));
|
||||
v0->unk_20 = ov9_0224F0D4(param0, 579, (0x80 + 3));
|
||||
|
||||
sub_02005844(480, 0);
|
||||
sub_02005844(SPECIES_UXIE, 0);
|
||||
|
||||
v0->unk_04 = 1;
|
||||
*param2 = 1;
|
||||
@@ -8989,7 +8991,7 @@ static int ov9_02250AFC(UnkStruct_ov9_02249B04 *param0, FieldTask *param1, u16 *
|
||||
UnkStruct_ov9_02250AFC *v0 = ov9_0224E37C(param0, sizeof(UnkStruct_ov9_02250AFC));
|
||||
v0->unk_14 = ov9_0224F0D4(param0, 579, (0x80 + 4));
|
||||
|
||||
sub_02005844(482, 0);
|
||||
sub_02005844(SPECIES_AZELF, 0);
|
||||
|
||||
*param2 = 1;
|
||||
return 0;
|
||||
@@ -9154,7 +9156,7 @@ static int ov9_02250C14(UnkStruct_ov9_02249B04 *param0, FieldTask *param1, u16 *
|
||||
UnkStruct_ov9_02250C14 *v0 = ov9_0224E37C(param0, sizeof(UnkStruct_ov9_02250AFC));
|
||||
v0->unk_18 = ov9_0224F0D4(param0, 579, (0x80 + 5));
|
||||
|
||||
sub_02005844(481, 0);
|
||||
sub_02005844(SPECIES_MESPRIT, 0);
|
||||
*param2 = 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -3772,7 +3772,7 @@ static void ov12_022230CC(UnkStruct_ov12_0221FCDC *param0)
|
||||
|
||||
static void ov12_022230D4(UnkStruct_ov12_0221FCDC *param0)
|
||||
{
|
||||
int v0;
|
||||
enum PokemonCryMod cryMod;
|
||||
s16 v1;
|
||||
int v2;
|
||||
int v3;
|
||||
@@ -3780,7 +3780,7 @@ static void ov12_022230D4(UnkStruct_ov12_0221FCDC *param0)
|
||||
|
||||
param0->unk_18 += 1;
|
||||
|
||||
v0 = inline_ov12_022204C4(param0->unk_18);
|
||||
cryMod = inline_ov12_022204C4(param0->unk_18);
|
||||
param0->unk_18 += 1;
|
||||
|
||||
v1 = (s16)inline_ov12_022204C4(param0->unk_18);
|
||||
@@ -3793,7 +3793,7 @@ static void ov12_022230D4(UnkStruct_ov12_0221FCDC *param0)
|
||||
v3 = param0->unk_BC->unk_D8[param0->unk_BC->unk_14];
|
||||
v4 = param0->unk_BC->unk_E8[param0->unk_BC->unk_14];
|
||||
|
||||
Pokemon_PlayCry(param0->unk_BC->unk_10C, v0, v3, v4, v1, v2, param0->unk_BC->unk_118, param0->heapID);
|
||||
Pokemon_PlayCry(param0->unk_BC->unk_10C, cryMod, v3, v4, v1, v2, param0->unk_BC->unk_118, param0->heapID);
|
||||
}
|
||||
|
||||
static void ov12_02223134(UnkStruct_ov12_0221FCDC *param0)
|
||||
|
||||
@@ -225,7 +225,7 @@ static int ov21_021DE79C(UnkStruct_ov21_021E6A68 *param0, void *param1)
|
||||
switch (param0->unk_00) {
|
||||
case 0:
|
||||
if (v0->unk_1C == 1) {
|
||||
Sound_PlayPokemonCry(14, PokedexSort_CurrentSpecies(v0->unk_04), 0x1ff, 0x1ff, 0x1ff, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_POKEDEX, PokedexSort_CurrentSpecies(v0->unk_04), 0x1ff, 0x1ff, 0x1ff, 0);
|
||||
v0->unk_1C = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -142,7 +142,7 @@ static void ov21_021E530C(u32 param0, UnkStruct_ov21_021E4D90 *param1, UnkStruct
|
||||
static void ov21_021E537C(u32 param0, UnkStruct_ov21_021E4D90 *param1, UnkStruct_ov21_021E51DC *param2);
|
||||
static void ov21_021E545C(u32 param0, UnkStruct_ov21_021E4D90 *param1, UnkStruct_ov21_021E51DC *param2);
|
||||
static void ov21_021E5498(u32 param0, UnkStruct_ov21_021E4D90 *param1, UnkStruct_ov21_021E51DC *param2);
|
||||
static void ov21_021E5DE8(UnkStruct_ov21_021E51DC *param0, UnkStruct_ov21_021E4D90 *param1, int param2);
|
||||
static void ov21_021E5DE8(UnkStruct_ov21_021E51DC *param0, UnkStruct_ov21_021E4D90 *param1, int species);
|
||||
static void ov21_021E5E18(UnkStruct_ov21_021E51DC *param0);
|
||||
static void ov21_021E5E48(UnkStruct_ov21_021E51DC *param0, UnkStruct_ov21_021E4D90 *param1);
|
||||
static void ov21_021E5E78(UnkStruct_ov21_021E51DC *param0, BOOL param1);
|
||||
@@ -1255,11 +1255,11 @@ static void ov21_021E5D90(Sprite *param0, UnkStruct_ov21_021E5C80 *param1, BOOL
|
||||
}
|
||||
}
|
||||
|
||||
static void ov21_021E5DE8(UnkStruct_ov21_021E51DC *param0, UnkStruct_ov21_021E4D90 *param1, int param2)
|
||||
static void ov21_021E5DE8(UnkStruct_ov21_021E51DC *param0, UnkStruct_ov21_021E4D90 *param1, int species)
|
||||
{
|
||||
param0->unk_2C = 1;
|
||||
|
||||
Sound_PlayPokemonCry(13, param2, 0, 127, 0x1ff, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_POKEDEX_CHORUS, species, 0, 127, 0x1ff, 0);
|
||||
ov21_021E5F00(param0);
|
||||
}
|
||||
|
||||
|
||||
@@ -686,7 +686,7 @@ static void ov21_021E9828(SysTask *param0, void *param1)
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
v1 = Sound_PlayPokemonCry(14, v0->unk_220, 0x1ff, 0x1ff, 0x1ff, 0);
|
||||
v1 = Sound_PlayPokemonCry(POKECRY_POKEDEX, v0->unk_220, 0x1ff, 0x1ff, 0x1ff, 0);
|
||||
GF_ASSERT(v1);
|
||||
v0->unk_21C++;
|
||||
break;
|
||||
|
||||
@@ -59,7 +59,7 @@ static void ov70_0226D020(UnkStruct_ov70_0226CF38 *param0, u32 param1);
|
||||
static void ov70_0226D46C(UnkStruct_ov70_0226CF38 *param0, u32 param1);
|
||||
static void ov70_0226D0E8(UnkStruct_ov70_0226CF38 *param0, u32 param1, BOOL param2, BOOL param3, u32 param4);
|
||||
static void ov70_0226D24C(BOOL param0, BOOL param1, BOOL param2, u32 param3);
|
||||
static void ov70_0226D27C(BOOL param0, BOOL param1, BOOL param2, u32 param3);
|
||||
static void ov70_0226D27C(BOOL param0, BOOL param1, BOOL param2, u32 species);
|
||||
static BOOL ov70_0226D2A0(UnkStruct_ov70_0226D2A0 *param0, u32 param1, UnkStruct_ov70_02261E10 *param2, u32 param3);
|
||||
static BOOL ov70_0226D2D8(UnkStruct_ov70_0226D2A0 *param0, UnkStruct_ov70_02261E10 *param1, u32 param2);
|
||||
static void ov70_0226D31C(UnkStruct_ov70_0226D2A0 *param0, UnkStruct_ov70_02261E10 *param1, u32 param2);
|
||||
@@ -290,14 +290,14 @@ static void ov70_0226D24C(BOOL param0, BOOL param1, BOOL param2, u32 param3)
|
||||
}
|
||||
}
|
||||
|
||||
static void ov70_0226D27C(BOOL param0, BOOL param1, BOOL param2, u32 param3)
|
||||
static void ov70_0226D27C(BOOL param0, BOOL param1, BOOL param2, u32 species)
|
||||
{
|
||||
if (param0) {
|
||||
if (param1) {
|
||||
sub_02005844(param3, 0);
|
||||
sub_02005844(species, 0);
|
||||
}
|
||||
} else {
|
||||
sub_02005844(param3, 0);
|
||||
sub_02005844(species, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "struct_decls/struct_02015920_decl.h"
|
||||
#include "struct_defs/archived_sprite.h"
|
||||
#include "struct_defs/struct_02015958.h"
|
||||
@@ -1394,7 +1396,7 @@ static BOOL ov73_021D200C(UnkStruct_ov73_021D1058 *param0, int *param1)
|
||||
}
|
||||
} break;
|
||||
case 6:
|
||||
sub_02005844(427, 0);
|
||||
sub_02005844(SPECIES_BUNEARY, 0);
|
||||
v0 = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/screen.h"
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "struct_defs/struct_0207C690.h"
|
||||
#include "struct_defs/struct_02099F80.h"
|
||||
@@ -244,7 +245,7 @@ static int ov77_021D0E3C(OverlayManager *param0, int *param1)
|
||||
if (((gSystem.pressedKeys & PAD_BUTTON_A) == PAD_BUTTON_A) || ((gSystem.pressedKeys & PAD_BUTTON_START) == PAD_BUTTON_START)) {
|
||||
v0->unk_4E8 = 1;
|
||||
sub_0200564C(0, 60);
|
||||
sub_02005844(487, 1);
|
||||
sub_02005844(SPECIES_GIRATINA, 1);
|
||||
ov77_021D1D48(v0->unk_04, v0->unk_00);
|
||||
*param1 = 4;
|
||||
break;
|
||||
|
||||
@@ -679,14 +679,14 @@ static int ov79_021D2AE0(UnkStruct_ov79_021D2928 *param0, UnkStruct_ov79_021D29B
|
||||
|
||||
static int ov79_021D2AF0(UnkStruct_ov79_021D2928 *param0, UnkStruct_ov79_021D29B4 *param1)
|
||||
{
|
||||
u32 v0 = Pokemon_GetValue(param0->unk_30.unk_00, MON_DATA_FORM, NULL);
|
||||
u32 form = Pokemon_GetValue(param0->unk_30.unk_00, MON_DATA_FORM, NULL);
|
||||
|
||||
switch (param0->unk_30.unk_09) {
|
||||
case 1:
|
||||
Sound_PlayPokemonCry(11, param0->unk_30.unk_04, 0, 127, param0->heapId, v0);
|
||||
Sound_PlayPokemonCry(POKECRY_PINCH_NORMAL, param0->unk_30.unk_04, 0, 127, param0->heapId, form);
|
||||
break;
|
||||
default:
|
||||
Sound_PlayPokemonCry(0, param0->unk_30.unk_04, 0, 127, param0->heapId, v0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, param0->unk_30.unk_04, 0, 127, param0->heapId, form);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ static BOOL ov87_021D12C0(UnkStruct_ov87_021D106C *param0, int *param1)
|
||||
if (v1 == v0->unk_18) {
|
||||
Sprite_SetExplicitOAMMode(param0->unk_1C4[v1], GX_OAM_MODE_NORMAL);
|
||||
Sprite_SetPriority(param0->unk_1C4[v1], 0);
|
||||
Sound_FlagDefaultChatotCry(1);
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
|
||||
sub_02005844(v0->unk_20[v1].unk_10, v0->unk_20[v1].unk_13);
|
||||
} else {
|
||||
@@ -550,7 +550,7 @@ static void ov87_021D1970(UnkStruct_ov87_021D106C *param0)
|
||||
Graphics_LoadPalette(v1.archive, v1.palette, 1, v3 * 0x20, 0x20, 61);
|
||||
|
||||
if (v3 == v2->unk_18) {
|
||||
Sound_FlagDefaultChatotCry(1);
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
sub_02005844(v2->unk_20[v3].unk_10, v2->unk_20[v3].unk_13);
|
||||
Sprite_SetExplicitOAMMode(param0->unk_1C4[v3], GX_OAM_MODE_NORMAL);
|
||||
} else {
|
||||
|
||||
@@ -1496,7 +1496,7 @@ static const TouchScreenRect Unk_ov88_0223EE28[] = {
|
||||
|
||||
static void ov88_0223CE74(UnkStruct_02095E80 *param0)
|
||||
{
|
||||
u16 v0, v1;
|
||||
u16 species, form;
|
||||
int v2 = -1, v3;
|
||||
|
||||
if (param0->unk_88[0] >= 6) {
|
||||
@@ -1510,13 +1510,13 @@ static void ov88_0223CE74(UnkStruct_02095E80 *param0)
|
||||
return;
|
||||
}
|
||||
|
||||
v0 = param0->unk_6F4[param0->unk_88[0]].unk_00;
|
||||
v1 = param0->unk_6F4[param0->unk_88[0]].unk_06;
|
||||
species = param0->unk_6F4[param0->unk_88[0]].unk_00;
|
||||
form = param0->unk_6F4[param0->unk_88[0]].unk_06;
|
||||
|
||||
if (v0 == 441) {
|
||||
if (species == SPECIES_CHATOT) {
|
||||
Sound_PlayChatotCry(GetChatotCryDataFromSave(param0->unk_04), 0, 100, 0);
|
||||
} else {
|
||||
sub_02005844(v0, v1);
|
||||
sub_02005844(species, form);
|
||||
}
|
||||
|
||||
Sprite_SetAnimateFlag(param0->unk_464[v2], 1);
|
||||
|
||||
@@ -350,11 +350,11 @@ static int ov95_02247F04(UnkStruct_ov95_02247C6C *param0, int *param1)
|
||||
const BoxPokemon *v6 = ov95_02247634(param0->unk_00);
|
||||
|
||||
if (BoxPokemon_GetValue((BoxPokemon *)v6, MON_DATA_IS_EGG, NULL) == 0) {
|
||||
u8 v7;
|
||||
u8 delay;
|
||||
|
||||
sub_02007B98(param0->unk_10, 1);
|
||||
PokeSprite_LoadCryDelay(param0->unk_80, &v7, ov95_0224764C(param0->unk_00), 1);
|
||||
sub_0200590C(ov95_0224764C(param0->unk_00), v7, ov95_02247654(param0->unk_00));
|
||||
PokeSprite_LoadCryDelay(param0->unk_80, &delay, ov95_0224764C(param0->unk_00), 1);
|
||||
sub_0200590C(ov95_0224764C(param0->unk_00), delay, ov95_02247654(param0->unk_00));
|
||||
}
|
||||
|
||||
Window_FillTilemap(&(param0->unk_58), 0xf);
|
||||
|
||||
@@ -362,10 +362,10 @@ static int ov95_0224B71C(UnkStruct_ov95_0224B4D4 *param0, int *param1)
|
||||
const BoxPokemon *v0 = ov95_0224763C(param0->unk_00);
|
||||
|
||||
if (BoxPokemon_GetValue((BoxPokemon *)v0, MON_DATA_IS_EGG, NULL) == 0) {
|
||||
u8 v1;
|
||||
u8 delay;
|
||||
|
||||
PokeSprite_LoadCryDelay(param0->unk_84, &v1, ov95_02247660(param0->unk_00), 1);
|
||||
sub_0200590C(ov95_02247660(param0->unk_00), v1, ov95_02247668(param0->unk_00));
|
||||
PokeSprite_LoadCryDelay(param0->unk_84, &delay, ov95_02247660(param0->unk_00), 1);
|
||||
sub_0200590C(ov95_02247660(param0->unk_00), delay, ov95_02247668(param0->unk_00));
|
||||
sub_02007B98(param0->unk_14, 1);
|
||||
}
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ BOOL ov100_021D14A8(void *param0)
|
||||
}
|
||||
|
||||
if (v0->unk_04 == v2[v0->unk_08]) {
|
||||
Sound_PlayPokemonCry(0, v4[v0->unk_08], 0, 100, HEAP_ID_111, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, v4[v0->unk_08], 0, 100, HEAP_ID_111, 0);
|
||||
}
|
||||
|
||||
if ((++v0->unk_04) >= v1[v0->unk_08]) {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "overlay100/ov100_021D400C.h"
|
||||
#include "overlay100/ov100_021D44C0.h"
|
||||
#include "overlay100/ov100_021D46C8.h"
|
||||
@@ -513,11 +515,11 @@ BOOL ov100_021D2428(void *param0)
|
||||
}
|
||||
|
||||
if (v0->unk_04 == 15 + 25) {
|
||||
Sound_PlayPokemonCry(0, 483, -80, 40, HEAP_ID_111, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, SPECIES_DIALGA, -80, 40, HEAP_ID_111, 0);
|
||||
}
|
||||
|
||||
if (v0->unk_04 == 40 + 25) {
|
||||
Sound_PlayPokemonCry(0, 484, +80, 40, HEAP_ID_111, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, SPECIES_PALKIA, +80, 40, HEAP_ID_111, 0);
|
||||
}
|
||||
|
||||
if (v0->unk_04 < 15 + 25) {
|
||||
@@ -555,7 +557,7 @@ BOOL ov100_021D2428(void *param0)
|
||||
|
||||
Easy3DObject_SetVisibility(&v0->unk_1A0.unk_934[1].unk_00, 0);
|
||||
Easy3DObject_SetVisibility(&v0->unk_1A0.unk_934[2].unk_00, 1);
|
||||
Sound_PlayPokemonCry(2, 487, 0, 127, HEAP_ID_111, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_FIELD_EVENT, SPECIES_GIRATINA, 0, 127, HEAP_ID_111, 0);
|
||||
|
||||
v0->unk_04 = 0;
|
||||
v0->unk_00++;
|
||||
@@ -595,7 +597,7 @@ BOOL ov100_021D2428(void *param0)
|
||||
break;
|
||||
case 19:
|
||||
if ((++v0->unk_04) == 238) {
|
||||
Sound_PlayPokemonCry(2, 487, 0, 127, HEAP_ID_111, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_FIELD_EVENT, SPECIES_GIRATINA, 0, 127, HEAP_ID_111, 0);
|
||||
}
|
||||
|
||||
if (v0->unk_04 == 170) {
|
||||
|
||||
@@ -373,7 +373,7 @@ static void ov100_021D37F4(SysTask *param0, void *param1)
|
||||
break;
|
||||
case 1:
|
||||
if ((++v0->unk_04) >= NELEMS(v1)) {
|
||||
Sound_PlayPokemonCry(0, v0->unk_08, v0->unk_0C, 80, HEAP_ID_111, 0);
|
||||
Sound_PlayPokemonCry(POKECRY_NORMAL, v0->unk_08, v0->unk_0C, 80, HEAP_ID_111, 0);
|
||||
v0->unk_00++;
|
||||
} else {
|
||||
Easy3DObject_SetScale(&v0->unk_10->unk_00, FX32_CONST(v1[v0->unk_04]), FX32_CONST(1.00f), FX32_CONST(1.00f));
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "overlay101/const_ov101_021D94D8.h"
|
||||
#include "overlay101/const_ov101_021D94F0.h"
|
||||
#include "overlay101/const_ov101_021D9508.h"
|
||||
@@ -1346,7 +1348,7 @@ static int ov101_021D2A78(UnkStruct_ov101_021D13C8 *param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
sub_02005844(35, 0);
|
||||
sub_02005844(SPECIES_CLEFAIRY, 0);
|
||||
param0->unk_00 = 42;
|
||||
return 0;
|
||||
}
|
||||
@@ -3437,7 +3439,7 @@ static int ov101_021D4A30(UnkStruct_ov101_021D4764 *param0)
|
||||
if (param0->unk_10 >= 48) {
|
||||
param0->unk_10 = 0;
|
||||
param0->unk_04++;
|
||||
sub_02005844(35, 0);
|
||||
sub_02005844(SPECIES_CLEFAIRY, 0);
|
||||
ov101_021D679C(param0->unk_30, UnkEnum_ov101_021D679C_04);
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "overlay101/ov101_021D1A28.h"
|
||||
#include "overlay101/ov101_021D7E48.h"
|
||||
#include "overlay101/struct_ov101_021D13C8.h"
|
||||
@@ -1158,7 +1160,7 @@ static int ov101_021D6908(UnkStruct_ov101_021D66D0 *param0)
|
||||
param0->unk_14 = 0;
|
||||
param0->unk_08++;
|
||||
|
||||
sub_02005844(35, 0);
|
||||
sub_02005844(SPECIES_CLEFAIRY, 0);
|
||||
}
|
||||
|
||||
Sprite_SetAffineScale(param0->unk_24.unk_04, &v1);
|
||||
|
||||
@@ -124,12 +124,9 @@ static BOOL ov119_021D1930(UnkStruct_ov119_021D0FD0 *param0)
|
||||
if (v6 == 0) {
|
||||
ov119_021D18C0(param0);
|
||||
{
|
||||
int v7;
|
||||
int v8;
|
||||
|
||||
v7 = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_SPECIES, NULL);
|
||||
v8 = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_FORM, NULL);
|
||||
sub_02005844(v7, v8);
|
||||
int species = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_SPECIES, NULL);
|
||||
int form = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_FORM, NULL);
|
||||
sub_02005844(species, form);
|
||||
param0->unk_04.unk_08 = ov119_021D1158(¶m0->unk_04.unk_14[0], 0, param0->unk_00->unk_0C.unk_00, param0->unk_04.unk_0C);
|
||||
}
|
||||
param0->unk_60++;
|
||||
@@ -270,12 +267,9 @@ static BOOL ov119_021D1BD0(UnkStruct_ov119_021D0FD0 *param0)
|
||||
if (v2 == 0) {
|
||||
ov119_021D18C0(param0);
|
||||
{
|
||||
int v3;
|
||||
int v4;
|
||||
|
||||
v3 = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_SPECIES, NULL);
|
||||
v4 = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_FORM, NULL);
|
||||
sub_02005844(v3, v4);
|
||||
int species = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_SPECIES, NULL);
|
||||
int form = Pokemon_GetValue(param0->unk_00->unk_0C.unk_00, MON_DATA_FORM, NULL);
|
||||
sub_02005844(species, form);
|
||||
param0->unk_04.unk_08 = ov119_021D1158(¶m0->unk_04.unk_14[0], 0, param0->unk_00->unk_0C.unk_00, param0->unk_04.unk_0C);
|
||||
}
|
||||
|
||||
|
||||
@@ -4320,12 +4320,12 @@ void Pokemon_LoadLevelUpMovesOf(int monSpecies, int monForm, u16 *monLevelUpMove
|
||||
NARC_ReadWholeMemberByIndexPair(monLevelUpMoves, NARC_INDEX_POKETOOL__PERSONAL__WOTBL, monSpecies);
|
||||
}
|
||||
|
||||
void Pokemon_PlayCry(ChatotCry *chatotCry, enum PokemonCryMod crymod, u16 species, int form, int pan, int volume, int forceDefaultChatot, int heapID)
|
||||
void Pokemon_PlayCry(ChatotCry *chatotCry, enum PokemonCryMod cryMod, u16 species, int form, int pan, int volume, int forceDefaultChatot, int heapID)
|
||||
{
|
||||
if (species == SPECIES_CHATOT) {
|
||||
if (Sound_CanPlayChatotCry(crymod) == FALSE) {
|
||||
if (Sound_CanPlayChatotCry(cryMod) == FALSE) {
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
Sound_PlayPokemonCry(crymod, species, pan, volume, heapID, form);
|
||||
Sound_PlayPokemonCry(cryMod, species, pan, volume, heapID, form);
|
||||
} else {
|
||||
if (forceDefaultChatot) {
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
@@ -4337,15 +4337,15 @@ void Pokemon_PlayCry(ChatotCry *chatotCry, enum PokemonCryMod crymod, u16 specie
|
||||
return;
|
||||
}
|
||||
|
||||
Sound_PlayPokemonCry(crymod, species, pan, volume, heapID, form);
|
||||
Sound_PlayPokemonCry(cryMod, species, pan, volume, heapID, form);
|
||||
}
|
||||
|
||||
void Pokemon_PlayDelayedCry(ChatotCry *chatotCry, enum PokemonCryMod crymod, u16 species, int form, int pan, int volume, int forceDefaultChatot, int heapID, u8 delay)
|
||||
void Pokemon_PlayDelayedCry(ChatotCry *chatotCry, enum PokemonCryMod cryMod, u16 species, int form, int pan, int volume, int forceDefaultChatot, int heapID, u8 delay)
|
||||
{
|
||||
if (species == SPECIES_CHATOT) {
|
||||
if (Sound_CanPlayChatotCry(crymod) == FALSE) {
|
||||
if (Sound_CanPlayChatotCry(cryMod) == FALSE) {
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
Sound_PlayDelayedPokemonCry(crymod, species, pan, volume, heapID, delay, form);
|
||||
Sound_PlayDelayedPokemonCry(cryMod, species, pan, volume, heapID, delay, form);
|
||||
} else {
|
||||
if (forceDefaultChatot) {
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
@@ -4357,15 +4357,15 @@ void Pokemon_PlayDelayedCry(ChatotCry *chatotCry, enum PokemonCryMod crymod, u16
|
||||
return;
|
||||
}
|
||||
|
||||
Sound_PlayDelayedPokemonCry(crymod, species, pan, volume, heapID, delay, form);
|
||||
Sound_PlayDelayedPokemonCry(cryMod, species, pan, volume, heapID, delay, form);
|
||||
}
|
||||
|
||||
BOOL Pokemon_IsEligibleForAction(Pokemon *mon)
|
||||
{
|
||||
int monSpecies = Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL);
|
||||
int monForm = Pokemon_GetValue(mon, MON_DATA_FORM, NULL);
|
||||
int species = Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL);
|
||||
int form = Pokemon_GetValue(mon, MON_DATA_FORM, NULL);
|
||||
|
||||
return sub_02005844(monSpecies, monForm);
|
||||
return sub_02005844(species, form);
|
||||
}
|
||||
|
||||
void Pokemon_SetCatchData(Pokemon *mon, TrainerInfo *trainerInfo, int monPokeball, int metLocation, int metTerrain, enum HeapId heapId)
|
||||
|
||||
@@ -100,7 +100,6 @@ void sub_02003B60(ChatotCry *param0, Options *param1)
|
||||
|
||||
void UpdateSound(void)
|
||||
{
|
||||
int v0;
|
||||
UnkStruct_02003D54 *v1 = sub_02003D54();
|
||||
|
||||
if (sub_02003D28() == 0) {
|
||||
@@ -113,12 +112,12 @@ void UpdateSound(void)
|
||||
|
||||
CheckMicRecordingStatus();
|
||||
|
||||
for (v0 = 0; v0 < 2; v0++) {
|
||||
if (v1->unk_BCDD0[v0] != 0) {
|
||||
v1->unk_BCDD0[v0]--;
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (v1->unk_BCDD0[i] != 0) {
|
||||
v1->unk_BCDD0[i]--;
|
||||
|
||||
if (v1->unk_BCDD0[v0] == 0) {
|
||||
Sound_PlayPokemonCry(v1->unk_BCDAC[v0], v1->unk_BCDCC[v0], v1->unk_BCDB4[v0], v1->unk_BCDBC[v0], v1->unk_BCDC4[v0], 0);
|
||||
if (v1->unk_BCDD0[i] == 0) {
|
||||
Sound_PlayPokemonCry(v1->unk_BCDAC[i], v1->unk_BCDCC[i], v1->unk_BCDB4[i], v1->unk_BCDBC[i], v1->unk_BCDC4[i], 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1154,9 +1154,9 @@ void sub_02004F4C(int param0)
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_02004F68(int param0, u16 param1, int param2)
|
||||
void sub_02004F68(int param0, u16 param1, int pitch)
|
||||
{
|
||||
NNS_SndPlayerSetTrackPitch(sub_020040CC(param0), param1, param2);
|
||||
NNS_SndPlayerSetTrackPitch(sub_020040CC(param0), param1, pitch);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -43,16 +43,14 @@ int sub_020057E0(void);
|
||||
void sub_020057FC(u16 param0, u16 param1, int param2);
|
||||
void sub_02005818(int param0);
|
||||
static void sub_02005E4C(u16 param0, int param1, int param2);
|
||||
BOOL sub_02005844(u16 param0, u8 param1);
|
||||
BOOL sub_0200590C(u16 param0, u8 param1, u8 param2);
|
||||
void sub_0200592C(int param0);
|
||||
int sub_0200598C(void);
|
||||
void sub_02005E64(int param0, int heapID);
|
||||
static void sub_02005EB0(SysTask *param0, void *param1);
|
||||
void sub_02005F24(void);
|
||||
static BOOL sub_02006038(u16 param0, u8 param1);
|
||||
static BOOL sub_02006038(u16 species, u8 form);
|
||||
void sub_0200605C(void);
|
||||
static BOOL sub_020060EC(u16 param0, s8 param1, u8 param2);
|
||||
static BOOL sub_020060EC(u16 species, s8 pitch, u8 form);
|
||||
static BOOL sub_02006120(u16 param0, s8 param1, int param2, int param3, int heapID);
|
||||
BOOL sub_02006150(u16 param0);
|
||||
int sub_0200619C(void);
|
||||
@@ -379,29 +377,26 @@ void sub_02005818(int param0)
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL sub_02005844(u16 param0, u8 param1)
|
||||
BOOL sub_02005844(u16 species, u8 form)
|
||||
{
|
||||
u16 v0;
|
||||
int v1;
|
||||
u8 *v2 = sub_02003D5C(18);
|
||||
ChatotCry **v3 = sub_02003D5C(36);
|
||||
ChatotCry **chatotCry = sub_02003D5C(36);
|
||||
u8 *v4 = sub_02003D5C(53);
|
||||
|
||||
v0 = param0;
|
||||
|
||||
if (sub_02006038(v0, param1) == 1) {
|
||||
v0 = SPECIES_EGG;
|
||||
if (sub_02006038(species, form) == 1) {
|
||||
species = SPECIES_EGG;
|
||||
}
|
||||
|
||||
if (v0 != SPECIES_EGG) {
|
||||
if ((v0 > MAX_SPECIES) || (v0 == 0)) {
|
||||
v0 = 1;
|
||||
if (species != SPECIES_EGG) {
|
||||
if ((species > MAX_SPECIES) || (species == SPECIES_NONE)) {
|
||||
species = SPECIES_BULBASAUR;
|
||||
}
|
||||
}
|
||||
|
||||
if (v0 == SPECIES_CHATOT) {
|
||||
if (ProcessAudioInput(*v3, 0, 127, 0) == 1) {
|
||||
Sound_FlagDefaultChatotCry(0);
|
||||
if (species == SPECIES_CHATOT) {
|
||||
if (ProcessAudioInput(*chatotCry, 0, 127, 0) == TRUE) {
|
||||
Sound_FlagDefaultChatotCry(FALSE);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -411,14 +406,14 @@ BOOL sub_02005844(u16 param0, u8 param1)
|
||||
sub_0200592C(0);
|
||||
}
|
||||
|
||||
v1 = NNS_SndArcPlayerStartSeqEx(sub_020040CC(1), -1, v0, -1, 2);
|
||||
sub_02004AA0(v0, 1);
|
||||
v1 = NNS_SndArcPlayerStartSeqEx(sub_020040CC(1), -1, species, -1, 2);
|
||||
sub_02004AA0(species, 1);
|
||||
} else {
|
||||
v1 = NNS_SndArcPlayerStartSeqEx(sub_020040CC(8), -1, v0, -1, 2);
|
||||
sub_02004AA0(v0, 8);
|
||||
v1 = NNS_SndArcPlayerStartSeqEx(sub_020040CC(8), -1, species, -1, 2);
|
||||
sub_02004AA0(species, 8);
|
||||
}
|
||||
|
||||
Sound_FlagDefaultChatotCry(0);
|
||||
Sound_FlagDefaultChatotCry(FALSE);
|
||||
|
||||
if (v1 == 0) {
|
||||
(void)0;
|
||||
@@ -427,9 +422,9 @@ BOOL sub_02005844(u16 param0, u8 param1)
|
||||
return v1;
|
||||
}
|
||||
|
||||
BOOL sub_0200590C(u16 param0, u8 param1, u8 param2)
|
||||
BOOL sub_0200590C(u16 species, u8 delay, u8 form)
|
||||
{
|
||||
Sound_PlayDelayedPokemonCry(0, param0, 0, 127, HEAP_ID_FIELDMAP, param1, param2);
|
||||
Sound_PlayDelayedPokemonCry(POKECRY_NORMAL, species, 0, 127, HEAP_ID_FIELDMAP, delay, form);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -476,10 +471,9 @@ int sub_0200598C(void)
|
||||
return sub_02004B04(0);
|
||||
}
|
||||
|
||||
BOOL Sound_PlayPokemonCry(int param0, u16 species, int param2, int param3, int heapID, u8 param5)
|
||||
BOOL Sound_PlayPokemonCry(enum PokemonCryMod cryMod, u16 species, int param2, int volume, int heapID, u8 form)
|
||||
{
|
||||
int v0, v1;
|
||||
u16 v2;
|
||||
u16 v3;
|
||||
int v4, v5, v6, v7;
|
||||
u8 *v8 = sub_02003D5C(16);
|
||||
@@ -492,15 +486,14 @@ BOOL Sound_PlayPokemonCry(int param0, u16 species, int param2, int param3, int h
|
||||
v5 = 0;
|
||||
v6 = 0;
|
||||
v7 = 0;
|
||||
v2 = species;
|
||||
|
||||
if (sub_02006038(v2, param5) == 1) {
|
||||
v2 = SPECIES_EGG;
|
||||
if (sub_02006038(species, form) == 1) {
|
||||
species = SPECIES_EGG;
|
||||
}
|
||||
|
||||
if (v2 != SPECIES_EGG) {
|
||||
if ((v2 > MAX_SPECIES) || (v2 == 0)) {
|
||||
v2 = SPECIES_BULBASAUR;
|
||||
if (species != SPECIES_EGG) {
|
||||
if ((species > MAX_SPECIES) || (species == SPECIES_NONE)) {
|
||||
species = SPECIES_BULBASAUR;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -510,7 +503,7 @@ BOOL Sound_PlayPokemonCry(int param0, u16 species, int param2, int param3, int h
|
||||
v0 = 64 + (param2 / 2);
|
||||
}
|
||||
|
||||
v1 = param3 - 30;
|
||||
v1 = volume - 30;
|
||||
|
||||
if (v1 <= 0) {
|
||||
v1 = 1;
|
||||
@@ -529,141 +522,141 @@ BOOL Sound_PlayPokemonCry(int param0, u16 species, int param2, int param3, int h
|
||||
sub_02004C4C(15);
|
||||
}
|
||||
|
||||
if (v2 == SPECIES_CHATOT) {
|
||||
switch (param0) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 2:
|
||||
case 5:
|
||||
case 11:
|
||||
case 12:
|
||||
sub_02005844(441, param5);
|
||||
if (species == SPECIES_CHATOT) {
|
||||
switch (cryMod) {
|
||||
case POKECRY_NORMAL:
|
||||
case POKECRY_HALF_DURATION:
|
||||
case POKECRY_FIELD_EVENT:
|
||||
case POKECRY_FAINT:
|
||||
case POKECRY_PINCH_NORMAL:
|
||||
case POKECRY_PINCH_HALF_DURATION:
|
||||
sub_02005844(SPECIES_CHATOT, form);
|
||||
|
||||
if (*v11 == 0) {
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
} else {
|
||||
if (*v8 == 1) {
|
||||
sub_02004D14(14, v0);
|
||||
sub_02004D40(14, param3);
|
||||
sub_02004D40(14, volume);
|
||||
} else {
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
default:
|
||||
Sound_FlagDefaultChatotCry(1);
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch (param0) {
|
||||
case 0:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
switch (cryMod) {
|
||||
case POKECRY_NORMAL:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
break;
|
||||
case 1:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_HALF_DURATION:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02005E64(20, heapID);
|
||||
break;
|
||||
case 2:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_FIELD_EVENT:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02004F68(1, 0xffff, 64);
|
||||
v6 = sub_020060EC(v2, 20, param5);
|
||||
v6 = sub_020060EC(species, 20, form);
|
||||
sub_02004F94(8, 0xffff, param2);
|
||||
sub_02005E4C(v2, 8, v1);
|
||||
sub_02005E4C(species, 8, v1);
|
||||
break;
|
||||
case 3:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_MID_MOVE:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02005E64(30, heapID);
|
||||
sub_02004F68(1, 0xffff, 192);
|
||||
v6 = sub_020060EC(v2, 16, param5);
|
||||
v6 = sub_020060EC(species, 16, form);
|
||||
sub_02004F94(8, 0xffff, param2);
|
||||
sub_02005E4C(v2, 8, v1);
|
||||
sub_02005E4C(species, 8, v1);
|
||||
break;
|
||||
case 4:
|
||||
case POKECRY_HYPERVOICE_1:
|
||||
v5 = sub_02004BCC(14);
|
||||
v5 = sub_02004D78(v2, param3, v0, 14, heapID);
|
||||
v5 = sub_02004D78(species, volume, v0, 14, heapID);
|
||||
sub_02004D14(14, v0);
|
||||
sub_02005E64(15, heapID);
|
||||
sub_02004D2C(14, (32768 + 1536));
|
||||
v7 = sub_02006120(v2, -64, v1, v0, heapID);
|
||||
v7 = sub_02006120(species, -64, v1, v0, heapID);
|
||||
sub_02004D2C(15, (32768 + 1536));
|
||||
break;
|
||||
case 5:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_FAINT:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02004F68(1, 0xffff, -224);
|
||||
break;
|
||||
case 6:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_HYPERVOICE_2:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02004F68(1, 0xffff, 44);
|
||||
v6 = sub_020060EC(v2, -64, param5);
|
||||
v6 = sub_020060EC(species, -64, form);
|
||||
sub_02004F94(8, 0xffff, param2);
|
||||
sub_02005E4C(v2, 8, v1);
|
||||
sub_02005E4C(species, 8, v1);
|
||||
break;
|
||||
case 7:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_HOWL_1:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02005E64(11, heapID);
|
||||
sub_02004F68(1, 0xffff, -128);
|
||||
break;
|
||||
case 8:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_HOWL_2:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02005E64(60, heapID);
|
||||
sub_02004F68(1, 0xffff, 60);
|
||||
break;
|
||||
case 9:
|
||||
case POKECRY_UPROAR_1:
|
||||
v5 = sub_02004BCC(14);
|
||||
v5 = sub_02004D78(v2, param3, v0, 14, heapID);
|
||||
v5 = sub_02004D78(species, volume, v0, 14, heapID);
|
||||
sub_02004D14(14, v0);
|
||||
sub_02005E64(13, heapID);
|
||||
sub_02004D2C(14, (32768 - 6144));
|
||||
break;
|
||||
case 10:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_UPROAR_2:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02005E64(100, heapID);
|
||||
sub_02004F68(1, 0xffff, -44);
|
||||
break;
|
||||
case 11:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_PINCH_NORMAL:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02004F68(1, 0xffff, -96);
|
||||
break;
|
||||
case 12:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_PINCH_HALF_DURATION:
|
||||
v4 = sub_02005844(species, form);
|
||||
sub_02004F94(1, 0xffff, param2);
|
||||
sub_02005E4C(v2, 1, param3);
|
||||
sub_02005E4C(species, 1, volume);
|
||||
sub_02005E64(20, heapID);
|
||||
sub_02004F68(1, 0xffff, -96);
|
||||
break;
|
||||
case 13:
|
||||
sub_02005844(v2, param5);
|
||||
sub_02005E4C(v2, 1, 127);
|
||||
sub_020060EC(v2, 20, param5);
|
||||
case POKECRY_POKEDEX_CHORUS:
|
||||
sub_02005844(species, form);
|
||||
sub_02005E4C(species, 1, 127);
|
||||
sub_020060EC(species, 20, form);
|
||||
sub_02004F94(8, 0xffff, param2);
|
||||
sub_02004A54(8, param3, 0);
|
||||
sub_02004A54(8, volume, 0);
|
||||
break;
|
||||
case 14:
|
||||
v4 = sub_02005844(v2, param5);
|
||||
case POKECRY_POKEDEX:
|
||||
v4 = sub_02005844(species, form);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -756,9 +749,8 @@ void sub_02005F24()
|
||||
return;
|
||||
}
|
||||
|
||||
void Sound_PlayDelayedPokemonCry(int param0, u16 param1, int param2, int param3, int heapID, u8 param5, u8 param6)
|
||||
void Sound_PlayDelayedPokemonCry(enum PokemonCryMod cryMod, u16 species, int param2, int volume, int heapID, u8 delay, u8 form)
|
||||
{
|
||||
u16 v0;
|
||||
int *v1;
|
||||
u16 *v2;
|
||||
int *v3;
|
||||
@@ -788,44 +780,42 @@ void Sound_PlayDelayedPokemonCry(int param0, u16 param1, int param2, int param3,
|
||||
*v7 ^= 1;
|
||||
}
|
||||
|
||||
v0 = param1;
|
||||
|
||||
if (sub_02006038(v0, param6) == 1) {
|
||||
v0 = SPECIES_EGG;
|
||||
if (sub_02006038(species, form) == 1) {
|
||||
species = SPECIES_EGG;
|
||||
}
|
||||
|
||||
if (v0 == 0) {
|
||||
if (species == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (param5 == 0) {
|
||||
Sound_PlayPokemonCry(param0, v0, param2, param3, heapID, param6);
|
||||
if (delay == 0) {
|
||||
Sound_PlayPokemonCry(cryMod, species, param2, volume, heapID, form);
|
||||
return;
|
||||
}
|
||||
|
||||
*v1 = param0;
|
||||
*v2 = v0;
|
||||
*v1 = cryMod;
|
||||
*v2 = species;
|
||||
*v3 = param2;
|
||||
*v4 = param3;
|
||||
*v4 = volume;
|
||||
*v5 = heapID;
|
||||
*v6 = param5;
|
||||
*v6 = delay;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static BOOL sub_02006038(u16 param0, u8 param1)
|
||||
static BOOL sub_02006038(u16 species, u8 form)
|
||||
{
|
||||
if (param0 == 492) {
|
||||
if (param1 == 1) {
|
||||
return 1;
|
||||
if (species == SPECIES_SHAYMIN) {
|
||||
if (form == 1) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (param0 == SPECIES_EGG) {
|
||||
return 1;
|
||||
if (species == SPECIES_EGG) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void sub_0200605C(void)
|
||||
@@ -860,16 +850,16 @@ void sub_0200605C(void)
|
||||
return;
|
||||
}
|
||||
|
||||
static BOOL sub_020060EC(u16 param0, s8 param1, u8 param2)
|
||||
static BOOL sub_020060EC(u16 species, s8 pitch, u8 form)
|
||||
{
|
||||
int v0;
|
||||
u8 *v1 = sub_02003D5C(18);
|
||||
|
||||
*v1 = 1;
|
||||
|
||||
Sound_FlagDefaultChatotCry(1);
|
||||
v0 = sub_02005844(param0, param2);
|
||||
sub_02004F68(8, 0xffff, param1);
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
v0 = sub_02005844(species, form);
|
||||
sub_02004F68(8, 0xffff, pitch);
|
||||
|
||||
return v0;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
#include "unk_02006224.h"
|
||||
|
||||
#include <nitro.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "constants/species.h"
|
||||
|
||||
#include "struct_defs/chatot_cry.h"
|
||||
#include "struct_defs/struct_02004CB4.h"
|
||||
|
||||
@@ -11,17 +15,12 @@
|
||||
#include "unk_0202CC64.h"
|
||||
|
||||
BOOL CheckMicRecordingStatus(void);
|
||||
BOOL IsChatotCryStructReadyForProcessing(const ChatotCry *param0);
|
||||
BOOL ProcessAudioInput(const ChatotCry *param0, u32 param1, int param2, int param3);
|
||||
void ResetMicStatusFlags(void);
|
||||
MICResult StartMicSampling(void);
|
||||
MICResult StopMicSampling(void);
|
||||
void StoreMicDataInChatotCryStruct(ChatotCry *param0);
|
||||
void Sound_FlagDefaultChatotCry(u8 param0);
|
||||
BOOL Sound_PlayChatotCry(ChatotCry *param0, u32 param1, int param2, int param3);
|
||||
BOOL Sound_PlayDelayedChatotCry(ChatotCry *param0, u32 param1, int param2, int param3, u8 param4);
|
||||
int Sound_Chatter(ChatotCry *param0);
|
||||
BOOL Sound_CanPlayChatotCry(int param0);
|
||||
|
||||
BOOL CheckMicRecordingStatus(void)
|
||||
{
|
||||
@@ -48,36 +47,36 @@ BOOL IsChatotCryStructReadyForProcessing(const ChatotCry *cry)
|
||||
u8 *v0 = sub_02003D5C(31);
|
||||
u8 *v1 = sub_02003D5C(54);
|
||||
|
||||
if (IsChatotCryDataValid(cry) == 0) {
|
||||
return 0;
|
||||
if (IsChatotCryDataValid(cry) == FALSE) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (*v1 == 1) {
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (*v0 == 1) {
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
BOOL ProcessAudioInput(const ChatotCry *param0, u32 param1, int param2, int param3)
|
||||
BOOL ProcessAudioInput(const ChatotCry *cry, u32 param1, int volume, int pan)
|
||||
{
|
||||
u16 v0;
|
||||
int v1, v2;
|
||||
s8 *v3 = sub_02005014();
|
||||
u8 *v4 = sub_02003D5C(30);
|
||||
|
||||
if (IsChatotCryStructReadyForProcessing(param0) == 0) {
|
||||
return 0;
|
||||
if (IsChatotCryStructReadyForProcessing(cry) == FALSE) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (param3 < 0) {
|
||||
v2 = 64 + (param3 / 2);
|
||||
if (pan < 0) {
|
||||
v2 = 64 + (pan / 2);
|
||||
} else {
|
||||
v2 = 64 + (param3 / 2);
|
||||
v2 = 64 + (pan / 2);
|
||||
}
|
||||
|
||||
sub_0200592C(0);
|
||||
@@ -85,7 +84,7 @@ BOOL ProcessAudioInput(const ChatotCry *param0, u32 param1, int param2, int para
|
||||
sub_02004BCC(14);
|
||||
|
||||
v0 = (LCRNG_Next() % 8192);
|
||||
ProcessChatotCryAudioData(v3, GetChatotCryAudioBuffer(param0));
|
||||
ProcessChatotCryAudioData(v3, GetChatotCryAudioBuffer(cry));
|
||||
|
||||
{
|
||||
UnkStruct_02004CB4 v5;
|
||||
@@ -97,16 +96,16 @@ BOOL ProcessAudioInput(const ChatotCry *param0, u32 param1, int param2, int para
|
||||
v5.unk_10 = 0;
|
||||
v5.unk_14 = (2000 * 1);
|
||||
v5.unk_18 = 2000;
|
||||
v5.unk_1C = param2;
|
||||
v5.unk_1C = volume;
|
||||
v5.unk_20 = (32768 + v0);
|
||||
v5.unk_24 = v2;
|
||||
|
||||
v1 = sub_02004CB4(&v5, 14);
|
||||
sub_02004D40(14, param2);
|
||||
sub_02004D40(14, volume);
|
||||
}
|
||||
|
||||
*v4 = 1;
|
||||
Sound_FlagDefaultChatotCry(0);
|
||||
Sound_FlagDefaultChatotCry(FALSE);
|
||||
|
||||
return v1;
|
||||
}
|
||||
@@ -156,47 +155,47 @@ void StoreMicDataInChatotCryStruct(ChatotCry *param0)
|
||||
return;
|
||||
}
|
||||
|
||||
void Sound_FlagDefaultChatotCry(u8 param0)
|
||||
void Sound_FlagDefaultChatotCry(u8 value)
|
||||
{
|
||||
u8 *v0 = sub_02003D5C(31);
|
||||
|
||||
*v0 = param0;
|
||||
*v0 = value;
|
||||
return;
|
||||
}
|
||||
|
||||
BOOL Sound_PlayChatotCry(ChatotCry *param0, u32 param1, int param2, int param3)
|
||||
BOOL Sound_PlayChatotCry(ChatotCry *param0, u32 param1, int volume, int pan)
|
||||
{
|
||||
int v0;
|
||||
ChatotCry **v1 = sub_02003D5C(36);
|
||||
|
||||
if (param0 == NULL) {
|
||||
v0 = ProcessAudioInput(*v1, param1, param2, param3);
|
||||
v0 = ProcessAudioInput(*v1, param1, volume, pan);
|
||||
} else {
|
||||
v0 = ProcessAudioInput(param0, param1, param2, param3);
|
||||
v0 = ProcessAudioInput(param0, param1, volume, pan);
|
||||
}
|
||||
|
||||
if (v0 == 0) {
|
||||
Sound_FlagDefaultChatotCry(1);
|
||||
v0 = Sound_PlayPokemonCry(0, 441, param3, param2, HEAP_ID_FIELDMAP, 0);
|
||||
if (v0 == FALSE) {
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
v0 = Sound_PlayPokemonCry(POKECRY_NORMAL, SPECIES_CHATOT, pan, volume, HEAP_ID_FIELDMAP, 0);
|
||||
}
|
||||
|
||||
return v0;
|
||||
}
|
||||
|
||||
BOOL Sound_PlayDelayedChatotCry(ChatotCry *param0, u32 param1, int param2, int param3, u8 param4)
|
||||
BOOL Sound_PlayDelayedChatotCry(ChatotCry *param0, u32 param1, int volume, int pan, u8 delay)
|
||||
{
|
||||
int v0;
|
||||
ChatotCry **v1 = sub_02003D5C(36);
|
||||
|
||||
if (param0 == NULL) {
|
||||
v0 = ProcessAudioInput(*v1, param1, param2, param3);
|
||||
v0 = ProcessAudioInput(*v1, param1, volume, pan);
|
||||
} else {
|
||||
v0 = ProcessAudioInput(param0, param1, param2, param3);
|
||||
v0 = ProcessAudioInput(param0, param1, volume, pan);
|
||||
}
|
||||
|
||||
if (v0 == 0) {
|
||||
Sound_FlagDefaultChatotCry(1);
|
||||
Sound_PlayDelayedPokemonCry(0, 441, param3, param2, HEAP_ID_FIELDMAP, param4, 0);
|
||||
Sound_FlagDefaultChatotCry(TRUE);
|
||||
Sound_PlayDelayedPokemonCry(POKECRY_NORMAL, SPECIES_CHATOT, pan, volume, HEAP_ID_FIELDMAP, delay, 0);
|
||||
v0 = 1;
|
||||
}
|
||||
|
||||
@@ -226,16 +225,16 @@ int Sound_Chatter(ChatotCry *param0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL Sound_CanPlayChatotCry(int param0)
|
||||
BOOL Sound_CanPlayChatotCry(enum PokemonCryMod cryMod)
|
||||
{
|
||||
switch (param0) {
|
||||
case 0:
|
||||
case 1:
|
||||
case 5:
|
||||
case 11:
|
||||
case 12:
|
||||
return 1;
|
||||
switch (cryMod) {
|
||||
case POKECRY_NORMAL:
|
||||
case POKECRY_HALF_DURATION:
|
||||
case POKECRY_FAINT:
|
||||
case POKECRY_PINCH_NORMAL:
|
||||
case POKECRY_PINCH_HALF_DURATION:
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -32,9 +32,9 @@ ChatotCry *GetChatotCryDataFromSave(SaveData *param0)
|
||||
return (ChatotCry *)SaveData_SaveTable(param0, 22);
|
||||
}
|
||||
|
||||
BOOL IsChatotCryDataValid(const ChatotCry *param0)
|
||||
BOOL IsChatotCryDataValid(const ChatotCry *cry)
|
||||
{
|
||||
return param0->exists;
|
||||
return cry->exists;
|
||||
}
|
||||
|
||||
void ResetChatotCryDataStatus(ChatotCry *param0)
|
||||
|
||||
@@ -185,17 +185,17 @@ static BOOL ScriptContext_IsSoundFinished(ScriptContext *ctx)
|
||||
return sub_020061E4() == FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_059(ScriptContext *param0)
|
||||
BOOL ScrCmd_059(ScriptContext *ctx)
|
||||
{
|
||||
u16 *v0 = ScriptContext_GetVarPointer(param0);
|
||||
u16 *v0 = ScriptContext_GetVarPointer(ctx);
|
||||
|
||||
if (IsChatotCryStructReadyForProcessing(GetChatotCryDataFromSave(param0->fieldSystem->saveData)) == 1) {
|
||||
if (IsChatotCryStructReadyForProcessing(GetChatotCryDataFromSave(ctx->fieldSystem->saveData)) == TRUE) {
|
||||
*v0 = 1;
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*v0 = 0;
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_05A(ScriptContext *param0)
|
||||
|
||||
Reference in New Issue
Block a user