mirror of
https://github.com/pret/pmd-red.git
synced 2026-04-25 07:28:17 -05:00
Stuff
This commit is contained in:
parent
5efcc1a036
commit
31a8737dd4
|
|
@ -1,27 +0,0 @@
|
|||
#ifndef GUARD_CODE_8024458_H
|
||||
#define GUARD_CODE_8024458_H
|
||||
|
||||
#include "structs/menu.h"
|
||||
#include "structs/str_text.h"
|
||||
#include "pokemon_summary_window.h"
|
||||
|
||||
struct unkStruct_203B2AC
|
||||
{
|
||||
MenuInputStruct input;
|
||||
u32 unk34[3];
|
||||
u8 unk40[0x48 - 0x40];
|
||||
s16 speciesNum;
|
||||
struct MonSummaryInfo unk4C;
|
||||
struct UnkInfoTabStruct unkB0;
|
||||
u32 unkE0;
|
||||
WindowTemplate *unkE4;
|
||||
WindowTemplates unkE8;
|
||||
WindowHeader unk148;
|
||||
};
|
||||
|
||||
bool8 sub_8024458(s16 speciesNum, s32);
|
||||
u32 sub_80244E4(void);
|
||||
void sub_802452C(void);
|
||||
void sub_802453C(void);
|
||||
|
||||
#endif // GUARD_CODE_8024458_H
|
||||
|
|
@ -9,11 +9,11 @@
|
|||
typedef struct DungeonInfo
|
||||
{
|
||||
/* 0x0 */ s16 mapID1; // See enum "GroundMapID". -1 if nothing
|
||||
/* 0x2 */ s16 mapID2; // See enum "GroundMapID". -1 if nothing
|
||||
/* 0x4 */ s16 mapID3; // See enum "GroundMapID". -1 if nothing
|
||||
/* 0x2 */ s16 mapID2; // See enum "GroundMapID". -1 if nothing. Success map?
|
||||
/* 0x4 */ s16 mapID3; // See enum "GroundMapID". -1 if nothing. Failure map?
|
||||
/* 0x6 */ s16 scriptID1; // See enum "ScriptID". -1 if nothing
|
||||
/* 0x8 */ s16 scriptID2; // See enum "ScriptID". -1 if nothing
|
||||
/* 0xA */ s16 scriptID3; // See enum "ScriptID"
|
||||
/* 0xA */ s16 scriptID3; // See enum "ScriptID". Exit script?
|
||||
/* 0xC */ u8 dungeonID; // See enum "DungeonID"
|
||||
/* 0xE */ s16 rescueDungeonID; // See enum "RescueDungeonId"
|
||||
/* 0x10 */ u8 unk10; // Always 1
|
||||
|
|
|
|||
|
|
@ -123,4 +123,8 @@ enum DungeonMusicID
|
|||
DUNGEON_MUS_STORMY_SEA_B40F // same as Tiny Woods
|
||||
};
|
||||
|
||||
#endif //GUARD_CONSTANTS_BG_MUSIC_H
|
||||
#define STOP_SOUND_EFFECT 997
|
||||
#define STOP_FANFARE 998
|
||||
#define STOP_BGM 999
|
||||
|
||||
#endif // GUARD_CONSTANTS_BG_MUSIC_H
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ Entity * sub_8069660(Entity *target);
|
|||
Entity * sub_80696A8(Entity *target);
|
||||
Entity * sub_80696FC(Entity *target);
|
||||
Entity * sub_806977C(Entity *target);
|
||||
void SetMonSummaryInfoFromEntity(struct MonSummaryInfo *param_1, Entity *target);
|
||||
void SetMonSummaryInfoFromEntity(MonSummaryInfo *param_1, Entity *target);
|
||||
bool8 sub_8069D18(DungeonPos *pos,Entity *entity);
|
||||
void sub_8069D4C(struct unkStruct_8069D4C *r0, Entity *target);
|
||||
void TargetTileInFront(Entity *pokemon);
|
||||
|
|
|
|||
|
|
@ -1,56 +1,14 @@
|
|||
#ifndef GUARD_EFFECT_DATA_H
|
||||
#define GUARD_EFFECT_DATA_H
|
||||
|
||||
typedef struct unkStruct_80B9CC4
|
||||
{
|
||||
// size: 0x24
|
||||
u32 animType;
|
||||
s32 effectId;
|
||||
s32 unk8;
|
||||
s32 animId;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
u8 unk18;
|
||||
// padding: 3 bytes
|
||||
s32 unk1c;
|
||||
s8 unk20;
|
||||
s8 loop;
|
||||
// padding: 2 bytes
|
||||
} unkStruct_80B9CC4;
|
||||
|
||||
typedef struct unkStruct_80BDBC4
|
||||
{
|
||||
// size: 0x24
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
// When true, apply a sine wobble to traveling effects (arcing look)
|
||||
u8 useSineWobble;
|
||||
u8 unk9;
|
||||
s32 unkC;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
s32 soundEffectId;
|
||||
s32 unk1C; // Amount of gUnknown_80C183C entries to scan
|
||||
s32 unk20; // Index into gUnknown_80C183C
|
||||
} unkStruct_80BDBC4;
|
||||
|
||||
typedef struct unkStruct_80C183C
|
||||
{
|
||||
// size: 0xc
|
||||
s16 species;
|
||||
s16 unk2;
|
||||
s32 unk4;
|
||||
s32 soundEffectId;
|
||||
} unkStruct_80C183C;
|
||||
#include "structs/effect_data.h"
|
||||
|
||||
const unkStruct_80B9CC4 *sub_800ECA4(s32 param_1);
|
||||
const unkStruct_80BDBC4 *sub_800ECB8(u16 moveId);
|
||||
const unkStruct_80C183C *sub_800ECD0(s32 param_1);
|
||||
s16 sub_800ECE4(u8 param_1);
|
||||
s16 GetTrapEffect(u8 trapID);
|
||||
s16 sub_800ECF8(u8 param_1);
|
||||
s16 sub_800ED0C(u8 param_1);
|
||||
s32 sub_800ED20(u16 moveId);
|
||||
|
||||
#endif
|
||||
#endif // GUARD_EFFECT_DATA_H
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ void sub_800DC14(s32 param_1);
|
|||
s32 sub_800DC9C(s32 a0);
|
||||
s32 sub_800E308(struct UnkStruct_8040094 *a0, DungeonPos *a1);
|
||||
void sub_800E3AC(s32 a0, DungeonPos *pos, s32 a2);
|
||||
s32 sub_800E448(u8 a0, DungeonPos *pos);
|
||||
s32 sub_800E448(u8 trapID, DungeonPos *pos);
|
||||
s32 sub_800E49C(u8 a0, DungeonPos *pos, DungeonPos posArray[4], bool8 a3, s32 a4);
|
||||
s32 sub_800E52C(struct UnkStruct_8040094 *a0);
|
||||
s32 sub_800E6D8(s32 a0);
|
||||
|
|
|
|||
|
|
@ -5,12 +5,12 @@ void sub_800ED38(s32 r0);
|
|||
void sub_800ED64(void);
|
||||
void sub_800ED80(void);
|
||||
void sub_800EE5C(s32 r0);
|
||||
void sub_800EEC8(u16 r0);
|
||||
void sub_800EEE0(u16 r0);
|
||||
void sub_800EEF8(u16 r0);
|
||||
void sub_800EF10(u16 r0);
|
||||
void sub_800EF28(u8 r0);
|
||||
void sub_800EF40(u8 r0, bool8 r1);
|
||||
void sub_800EEC8(u16 moveID);
|
||||
void sub_800EEE0(u16 moveID);
|
||||
void sub_800EEF8(u16 moveID);
|
||||
void sub_800EF10(u16 moveID);
|
||||
void sub_800EF28(u8 trapID);
|
||||
void sub_800EF40(u8 itemID, bool8 r1);
|
||||
void sub_800EF64(void);
|
||||
|
||||
#endif // GUARD_EFFECT_SUB_1_H
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef GUARD_EFFECT_SUB_2_H
|
||||
#define GUARD_EFFECT_SUB_2_H
|
||||
|
||||
#include "structs/effect_data.h"
|
||||
#include "structs/str_file_system.h"
|
||||
#include "effect_data.h"
|
||||
|
||||
void sub_800F034(void);
|
||||
void sub_800F078(void);
|
||||
|
|
@ -10,7 +10,7 @@ void sub_800F094(void);
|
|||
s32 sub_800F0F4(s32 animType, s32 effectID);
|
||||
void sub_800F13C(s32 index, OpenedFile *file, const unkStruct_80B9CC4 *r2);
|
||||
void sub_800F15C(s32 effectID);
|
||||
struct unkStruct_800F18C *sub_800F18C(s32 index);
|
||||
unkStruct_800F18C *sub_800F18C(s32 index);
|
||||
s32 sub_800F19C(s32 index);
|
||||
|
||||
#endif // GUARD_EFFECT_SUB_2_H
|
||||
|
|
|
|||
|
|
@ -3,14 +3,24 @@
|
|||
|
||||
#include "structs/str_file_system.h"
|
||||
|
||||
enum FileSystemUnk
|
||||
{
|
||||
FILESYSTEM_UNK_0,
|
||||
FILESYSTEM_UNK_1,
|
||||
FILESYSTEM_UNK_2,
|
||||
FILESYSTEM_UNK_3,
|
||||
FILESYSTEM_UNK_4,
|
||||
};
|
||||
|
||||
OpenedFile *Call_OpenFileAndGetFileDataPtr(const u8 *filename, const FileArchive *arc);
|
||||
void CloseFile(OpenedFile *openedFile);
|
||||
const u8 *GetFileDataPtr(OpenedFile *openedFile, s32 unused);
|
||||
void InitFileSystem(void);
|
||||
OpenedFile *OpenFile(const u8 *filename, const FileArchive *arc);
|
||||
OpenedFile *OpenFileAndGetFileDataPtr(const u8 *filename, const FileArchive *arc);
|
||||
|
||||
u32 sub_800A8F8(u32 value);
|
||||
// value: See enum "FileSystemUnk"
|
||||
// Return: See enum "FileSystemUnk"
|
||||
u32 SetFileSystemUnk(u32 value);
|
||||
|
||||
#define CLOSE_FILE_AND_SET_NULL(filePtr) \
|
||||
{ \
|
||||
|
|
@ -20,4 +30,4 @@ u32 sub_800A8F8(u32 value);
|
|||
|
||||
#define TRY_CLOSE_FILE_AND_SET_NULL(filePtr) if (filePtr != NULL) CLOSE_FILE_AND_SET_NULL(filePtr)
|
||||
|
||||
#endif //GUARD_FILE_SYSTEM_H
|
||||
#endif // GUARD_FILE_SYSTEM_H
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
#include "structs/str_dungeon_setup.h"
|
||||
|
||||
// startMode: See enum "StartModeVal"
|
||||
u32 xxx_script_related_8098468(s32 startMode);
|
||||
u32 xxx_script_related_8098468_Async(s32 startMode);
|
||||
void sub_8098C58(void);
|
||||
void sub_8098CC8(void);
|
||||
bool8 GroundMainGroundRequest(s32 r0, s32 r1, s32 r2);
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ bool8 GroundScript_ExecutePP(Action *action, ActionUnkIds *param_2, ScriptInfoSm
|
|||
bool8 ExecutePredefinedScript(Action *param_1, ActionUnkIds *param_2, s16 index, const DebugLocation *debug);
|
||||
bool8 GroundScript_Cancel(Action *r0);
|
||||
bool8 GroundScriptNotify(Action *param_1, s32 param_2);
|
||||
void GroundScriptLockJumpZero(s16 index);
|
||||
void GroundScriptLock(s16 index, s32 r1);
|
||||
void GroundScriptLockJumpZero(s32 index);
|
||||
void GroundScriptLock(s32 index, s32 unlockVal);
|
||||
// Return value is enum "ESC_RetID"
|
||||
s16 HandleAction(Action *action, const DebugLocation *debug);
|
||||
void GroundScript_Unlock(void);
|
||||
|
|
|
|||
|
|
@ -3,9 +3,17 @@
|
|||
|
||||
#include "personality_test1.h"
|
||||
|
||||
enum MainLoopsUnk
|
||||
{
|
||||
MAINLOOPS_UNK_0,
|
||||
MAINLOOPS_UNK_1,
|
||||
MAINLOOPS_UNK_2,
|
||||
};
|
||||
|
||||
void GameLoop_Async(void);
|
||||
void nullsub_3(s32 yPos, s32 a1);
|
||||
s32 sub_8000728(void);
|
||||
// Return: See enum "MainLoopsUnk"
|
||||
s32 GetMainLoopsUnk(void);
|
||||
void ReadTeamBasicInfo(TeamBasicInfo *dst);
|
||||
void WriteTeamBasicInfo(TeamBasicInfo *src);
|
||||
void sub_8001064(void);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,24 @@
|
|||
#ifndef GUARD_MEMORY_H
|
||||
#define GUARD_MEMORY_H
|
||||
|
||||
enum MemAllocGroup
|
||||
{
|
||||
// Only used for the Title Menu file
|
||||
MEMALLOC_GROUP_0,
|
||||
// Used for quicksave and save
|
||||
MEMALLOC_GROUP_5 = 5,
|
||||
// Used for "ground" and script files?
|
||||
MEMALLOC_GROUP_6,
|
||||
// Used for the dungeon loading?
|
||||
MEMALLOC_GROUP_7,
|
||||
// Used for menus and credits?
|
||||
MEMALLOC_GROUP_8,
|
||||
// Used for "effect" files?
|
||||
MEMALLOC_GROUP_11 = 11,
|
||||
// Only used for dungeon mon sprites
|
||||
MEMALLOC_GROUP_12,
|
||||
};
|
||||
|
||||
void InitHeap(void);
|
||||
|
||||
void MemoryClear8(void *dest, s32 size);
|
||||
|
|
@ -10,6 +28,7 @@ void MemoryFill16(u16 *dest, u16 value, s32 size);
|
|||
void MemoryCopy8(void *dest, const void *src, s32 size);
|
||||
void MemoryCopy32(u32 *dest, const u32 *src, s32 size);
|
||||
|
||||
// group: See enum "MemAllocGroup"
|
||||
void *MemoryAlloc(s32 size, s32 group);
|
||||
void MemoryFree(void *a);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef GUARD_MENU_INPUT_H
|
||||
#define GUARD_MENU_INPUT_H
|
||||
|
||||
#include "constants/input.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/str_text.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -7,12 +7,10 @@
|
|||
#define NUM_SOUND_EFFECTS 639
|
||||
#define SOUND_EFFECTS_START_INDEX 300
|
||||
|
||||
#define STOP_SOUND_EFFECT 997
|
||||
#define STOP_FANFARE 998
|
||||
#define STOP_BGM 999
|
||||
|
||||
#define MAX_VOLUME 256
|
||||
|
||||
#include "constants/bg_music.h"
|
||||
|
||||
enum MusicPlayerIndex
|
||||
{
|
||||
INDEX_BGM,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,18 @@
|
|||
#ifndef GUARD_MUSIC_UTIL_H
|
||||
#define GUARD_MUSIC_UTIL_H
|
||||
|
||||
enum MenuSFXID
|
||||
{
|
||||
MENU_SFX_ACCEPT,
|
||||
MENU_SFX_BACK,
|
||||
MENU_SFX_FAIL,
|
||||
MENU_SFX_NAVIGATE,
|
||||
MENU_SFX_INFO,
|
||||
MENU_SFX_SORT,
|
||||
MENU_SFX_TOGGLE,
|
||||
MENU_SFX_COUNT
|
||||
};
|
||||
|
||||
void ResetSoundEffectCounters(void);
|
||||
void StopBGMResetSoundEffectCounters(void);
|
||||
void StartBGMusic(void);
|
||||
|
|
@ -18,7 +30,8 @@ void PlaySound(u16 songIndex);
|
|||
void StopSound(u16 songIndex);
|
||||
void FadeOutSound(u16 songIndex, u16 speed);
|
||||
bool8 IsSoundPlaying(u16 songIndex);
|
||||
void PlayMenuSoundEffect(u32 arrId);
|
||||
// id: See enum "MenuSFXID"
|
||||
void PlayMenuSoundEffect(u32 id);
|
||||
void PlayDialogueTextSound(void);
|
||||
|
||||
#endif // GUARD_MUSIC_UTIL_H
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ void WritePoke1Bits(DataSerializer *, Pokemon *pokemon);
|
|||
void ReadPoke1Bits(DataSerializer *, Pokemon *);
|
||||
s32 SavePoke2s(u8* buffer, s32 size);
|
||||
s32 RestorePoke2s(u8* a1, s32 size);
|
||||
void ReadPoke1LevelBits(DataSerializer* a1, struct unkPokeSubStruct_C* unkC);
|
||||
void WritePoke1LevelBits(DataSerializer* a1, struct unkPokeSubStruct_C* unkC);
|
||||
void ReadPoke1LevelBits(DataSerializer* a1, unkPokeSubStruct_C* unkC);
|
||||
void WritePoke1LevelBits(DataSerializer* a1, unkPokeSubStruct_C* unkC);
|
||||
|
||||
#endif // GUARD_POKEMON_3_H
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ typedef struct EvolveStatus
|
|||
/* 0x6 */ s16 targetEvolveSpecies;
|
||||
} EvolveStatus;
|
||||
|
||||
void SetMonEvolveStatus(struct Pokemon *pokemon, EvolveStatus *evolveStatus,bool8 param_3);
|
||||
void SetMonEvolveStatus(Pokemon *pokemon, EvolveStatus *evolveStatus,bool8 param_3);
|
||||
s32 GetMonSummaryScreenEvoStringId(Pokemon *pokemon);
|
||||
Pokemon *sub_808F734(Pokemon *pokemon, s16 _species);
|
||||
Pokemon *sub_808F798(Pokemon *pokemon, s16 _species);
|
||||
|
|
|
|||
|
|
@ -1,62 +1,63 @@
|
|||
#ifndef GUARD_POKEMON_SUMMARY_WINDOW_H
|
||||
#define GUARD_POKEMON_SUMMARY_WINDOW_H
|
||||
|
||||
#include "structs/str_dungeon_location.h"
|
||||
#include "structs/str_pokemon.h"
|
||||
|
||||
enum
|
||||
enum MonSummarySubWindow
|
||||
{
|
||||
SUB_WINDOW_NONE,
|
||||
SUB_WINDOW_STATUS,
|
||||
SUB_WINDOW_STATS,
|
||||
SUB_WINDOW_FEATUERS,
|
||||
SUB_WINDOW_FEATURES,
|
||||
SUB_WINDOW_IQ,
|
||||
SUB_WINDOW_INFO,
|
||||
};
|
||||
|
||||
#define MON_SUMMARY_UNK58_COUNT 12
|
||||
|
||||
struct MonSummaryInfo
|
||||
// Size: R=0x64 | B=?
|
||||
typedef struct MonSummaryInfo
|
||||
{
|
||||
// size: 0x64
|
||||
s16 species;
|
||||
u8 nameBuffer[0x14];
|
||||
u8 types[2]; // 0x16
|
||||
u8 abilities[2]; // 0x18
|
||||
u8 fill1A[0x1C - 0x1A];
|
||||
DungeonLocation dungeonLocation; // 0x1C
|
||||
Item item; // 0x20
|
||||
s32 HP1;
|
||||
s32 HP2;
|
||||
s32 level;
|
||||
u32 exp;
|
||||
Offense offense;
|
||||
bool8 isTeamLeader;
|
||||
u8 atkBoost;
|
||||
u8 spAtkBoost;
|
||||
u8 defBoost;
|
||||
u8 spDefBoost;
|
||||
u8 fill3D;
|
||||
s16 IQ; // 0x3E
|
||||
s16 unk40;
|
||||
s16 fill42;
|
||||
struct unkPokeSubStruct_C unk44[2];
|
||||
u8 evoStringId;
|
||||
u8 fill4D[3];
|
||||
IqSkillFlags IQSkills; // 0x50
|
||||
u8 tactic;
|
||||
u8 fill55[1];
|
||||
s16 unk56;
|
||||
u8 unk58[MON_SUMMARY_UNK58_COUNT];
|
||||
};
|
||||
/* R=0x00 | B=0x00 */ s16 species;
|
||||
/* R=0x02 | B=0x02 */ u8 nameBuffer[20];
|
||||
/* R=0x16 | B=0x16 */ u8 types[2];
|
||||
/* R=0x18 | B=0x18 */ u8 abilities[2];
|
||||
/* R=0x1A | B=???? */ u8 fill1A[0x1C - 0x1A];
|
||||
/* R=0x1C | B=???? */ DungeonLocation dungeonLocation;
|
||||
/* R=0x20 | B=???? */ Item item;
|
||||
/* R=0x24 | B=???? */ s32 HP1;
|
||||
/* R=0x28 | B=???? */ s32 HP2;
|
||||
/* R=0x2C | B=???? */ s32 level;
|
||||
/* R=0x30 | B=???? */ u32 exp;
|
||||
/* R=0x34 | B=???? */ Offense offense;
|
||||
/* R=0x38 | B=???? */ bool8 isTeamLeader;
|
||||
/* R=0x39 | B=???? */ u8 atkBoost;
|
||||
/* R=0x3A | B=???? */ u8 spAtkBoost;
|
||||
/* R=0x3B | B=???? */ u8 defBoost;
|
||||
/* R=0x3C | B=???? */ u8 spDefBoost;
|
||||
/* R=0x3D | B=???? */ u8 fill3D;
|
||||
/* R=0x3E | B=???? */ s16 IQ;
|
||||
/* R=0x40 | B=???? */ s16 unk40;
|
||||
/* R=0x42 | B=???? */ s16 fill42;
|
||||
/* R=0x44 | B=???? */ unkPokeSubStruct_C unk44[2];
|
||||
/* R=0x4C | B=???? */ u8 evoStringId;
|
||||
/* R=0x4D | B=???? */ u8 fill4D[3];
|
||||
/* R=0x50 | B=???? */ IqSkillFlags IQSkills;
|
||||
/* R=0x54 | B=???? */ u8 tactic;
|
||||
/* R=0x55 | B=???? */ u8 fill55;
|
||||
/* R=0x56 | B=???? */ s16 unk56;
|
||||
/* R=0x58 | B=???? */ u8 unk58[MON_SUMMARY_UNK58_COUNT];
|
||||
} MonSummaryInfo;
|
||||
|
||||
struct UnkInfoTabStruct
|
||||
// Size: 0x30
|
||||
typedef struct UnkInfoTabStruct
|
||||
{
|
||||
u8 unk0[0xC];
|
||||
u8 unk0[12];
|
||||
s32 unkC[9];
|
||||
};
|
||||
} UnkInfoTabStruct;
|
||||
|
||||
void ShowPokemonSummaryWindow(s32 which, s32 currSubWindowId, struct MonSummaryInfo *monInfo, struct UnkInfoTabStruct *param_4, u32 windowId);
|
||||
void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool8 unlockedEvolutions);
|
||||
// which: See enum "MonSummarySubWindow"
|
||||
void ShowPokemonSummaryWindow(s32 which, s32 currSubWindowId, MonSummaryInfo *monInfo, UnkInfoTabStruct *param_4, u32 windowId);
|
||||
void SetMonSummaryInfo(MonSummaryInfo *dst, Pokemon *pokemon, bool8 unlockedEvolutions);
|
||||
|
||||
#endif // GUARD_POKEMON_SUMMARY_WINDOW_H
|
||||
|
|
|
|||
18
include/recruited_mon_summary_menu.h
Normal file
18
include/recruited_mon_summary_menu.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef GUARD_RECRUITED_MON_SUMMARY_MENU_H
|
||||
#define GUARD_RECRUITED_MON_SUMMARY_MENU_H
|
||||
|
||||
enum RecruitedMonSummaryMenuInputRet
|
||||
{
|
||||
RecruitedMonSummaryMenu_INPUTRET_NONE,
|
||||
RecruitedMonSummaryMenu_INPUTRET_LEFTRIGHT,
|
||||
RecruitedMonSummaryMenu_INPUTRET_BACK,
|
||||
RecruitedMonSummaryMenu_INPUTRET_ACCEPT,
|
||||
};
|
||||
|
||||
bool8 RecruitedMonSummaryMenu_Create(s32 speciesNum, s32 windowID);
|
||||
// Return: See enum "RecruitedMonSummaryMenuInputRet"
|
||||
u32 RecruitedMonSummaryMenu_Input(void);
|
||||
void RecruitedMonSummaryMenu_SetupAndShowWindows(void);
|
||||
void RecruitedMonSummaryMenu_Destroy(void);
|
||||
|
||||
#endif // GUARD_RECRUITED_MON_SUMMARY_MENU_H
|
||||
52
include/structs/effect_data.h
Normal file
52
include/structs/effect_data.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#ifndef GUARD_STRUCTS_EFFECT_DATA_H
|
||||
#define GUARD_STRUCTS_EFFECT_DATA_H
|
||||
|
||||
// Size: 0x8
|
||||
typedef struct unkStruct_800F18C
|
||||
{
|
||||
/* 0x0 */ s32 effectID;
|
||||
/* 0x4 */ u32 counter;
|
||||
} unkStruct_800F18C;
|
||||
|
||||
// Size: R=0x24 | B=?
|
||||
typedef struct unkStruct_80B9CC4
|
||||
{
|
||||
/* 0x00 */ u32 animType;
|
||||
/* 0x04 */ s32 effectId;
|
||||
/* 0x08 */ s32 unk8;
|
||||
/* 0x0C */ s32 animId;
|
||||
/* 0x10 */ s32 unk10;
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ u8 unk18;
|
||||
/* 0x1C */ s32 unk1c;
|
||||
/* 0x20 */ s8 unk20;
|
||||
/* 0x21 */ s8 loop;
|
||||
} unkStruct_80B9CC4;
|
||||
|
||||
// Size: 0x24
|
||||
typedef struct unkStruct_80BDBC4
|
||||
{
|
||||
/* 0x00 */ s16 unk0;
|
||||
/* 0x02 */ s16 unk2;
|
||||
/* 0x04 */ s16 unk4;
|
||||
/* 0x06 */ s16 unk6;
|
||||
/* 0x08 */ u8 useSineWobble; // When true, apply a sine wobble to traveling effects (arcing look)
|
||||
/* 0x09 */ u8 unk9;
|
||||
/* 0x0C */ s32 unkC;
|
||||
/* 0x10 */ s32 unk10;
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ s32 soundEffectId;
|
||||
/* 0x1C */ s32 unk1C; // Amount of gUnknown_80C183C entries to scan
|
||||
/* 0x20 */ s32 unk20; // Index into gUnknown_80C183C
|
||||
} unkStruct_80BDBC4;
|
||||
|
||||
// Size: 0xC
|
||||
typedef struct unkStruct_80C183C
|
||||
{
|
||||
/* 0x0 */ s16 species;
|
||||
/* 0x2 */ s16 unk2;
|
||||
/* 0x4 */ s32 unk4;
|
||||
/* 0x8 */ s32 soundEffectId;
|
||||
} unkStruct_80C183C;
|
||||
|
||||
#endif // GUARD_STRUCTS_EFFECT_DATA_H
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef GUARD_STR_DUNGEON_H
|
||||
#define GUARD_STR_DUNGEON_H
|
||||
|
||||
#include "constants/bg_music.h"
|
||||
#include "constants/monster.h"
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "file_system.h"
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ typedef struct WindowHeader
|
|||
/* 0x0 */ u8 count; // How many headers there are, it's used for windows which can be scrolled left/right
|
||||
/* 0x1 */ u8 currId; // Id of the current header
|
||||
/* 0x2 */ u8 width;
|
||||
/* 0x3 */ u8 f3;
|
||||
/* 0x3 */ u8 f3; // Always set to 0?
|
||||
} WindowHeader;
|
||||
|
||||
// size: 0x18
|
||||
|
|
|
|||
|
|
@ -59,8 +59,8 @@ bool8 ScriptSpecialTextHandler2(s32 kind, u32 a1, MonOrStrPtr_Arg monOrStr);
|
|||
// kind: See enum "SpecialTextKind"
|
||||
bool8 ScriptSpecialTextHandler(s32 kind, u32 a1, s32 a2, MonOrStrPtr_Arg monOrStr);
|
||||
bool8 sub_809B260(s32 *a0);
|
||||
void sub_809B474(void);
|
||||
void sub_809B57C(void);
|
||||
void sub_809B474_Async(void);
|
||||
void sub_809B57C_Async(void);
|
||||
void sub_809B614(void);
|
||||
void sub_809B638(void);
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ SECTIONS {
|
|||
src/code_80227B8.o(.text);
|
||||
src/code_8023144.o(.text);
|
||||
src/friend_list.o(.text);
|
||||
src/code_8024458.o(.text);
|
||||
src/recruited_mon_summary_menu.o(.text);
|
||||
src/luminous_cave.o(.text);
|
||||
src/friend_list_menu.o(.text);
|
||||
src/party_list_menu.o(.text);
|
||||
|
|
@ -507,7 +507,7 @@ SECTIONS {
|
|||
src/code_80227B8.o(.rodata);
|
||||
src/code_8023144.o(.rodata);
|
||||
src/friend_list.o(.rodata);
|
||||
src/code_8024458.o(.rodata);
|
||||
src/recruited_mon_summary_menu.o(.rodata);
|
||||
src/luminous_cave.o(.rodata);
|
||||
src/friend_list_menu.o(.rodata);
|
||||
src/party_list_menu.o(.rodata);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ static void sub_8032084();
|
|||
|
||||
bool8 CreateAdventureLogScreen(u32 kind)
|
||||
{
|
||||
sAdventureLog = MemoryAlloc(sizeof(*sAdventureLog), 8);
|
||||
sAdventureLog = MemoryAlloc(sizeof(*sAdventureLog), MEMALLOC_GROUP_8);
|
||||
sAdventureLog->m.menuWinId = kind;
|
||||
sAdventureLog->m.menuWindow = &sAdventureLog->m.windows.id[kind];
|
||||
RestoreSavedWindows(&sAdventureLog->m.windows);
|
||||
|
|
@ -45,10 +45,10 @@ u32 HandleAdventureLogInput(bool8 a0)
|
|||
|
||||
switch (GetKeyPress(&sAdventureLog->m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
default:
|
||||
if (MenuCursorUpdateOnlyLeftRight(&sAdventureLog->m.input)) {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ bool8 sub_8015080(u8 *buffer, const MenuItem *menuItems)
|
|||
{
|
||||
s32 index;
|
||||
|
||||
gUnknown_203B1F8 = MemoryAlloc(sizeof(struct unkStruct_203B1F8), 8);
|
||||
gUnknown_203B1F8 = MemoryAlloc(sizeof(struct unkStruct_203B1F8), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B1F8->menuAction = 0;
|
||||
|
||||
for(index = 0; index < MAX_WINDOWS; index++)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ static void sub_801B2D8(void);
|
|||
|
||||
bool8 sub_801AFA4(u32 index)
|
||||
{
|
||||
sUnknown_203B22C = MemoryAlloc(sizeof(unkStruct_203B22C), 8);
|
||||
sUnknown_203B22C = MemoryAlloc(sizeof(unkStruct_203B22C), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B22C->teamItemIndex = index;
|
||||
sUnknown_203B22C->id = gTeamInventoryRef->teamItems[index].id;
|
||||
sUnknown_203B22C->moveID = GetItemMoveID(sUnknown_203B22C->id);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ static void sub_801B590(void);
|
|||
bool8 InitItemDescriptionWindow(Item *item)
|
||||
{
|
||||
ResetSprites(TRUE);
|
||||
sUnknown_203B230 = MemoryAlloc(sizeof(unkStruct_203B230), 8);
|
||||
sUnknown_203B230 = MemoryAlloc(sizeof(unkStruct_203B230), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B230->item = *item;
|
||||
ResetTouchScreenMenuInput(&sUnknown_203B230->unk88);
|
||||
sUnknown_203B230->unk24 = 0;
|
||||
|
|
@ -105,7 +105,7 @@ static void sub_801B51C(void)
|
|||
|
||||
switch (sub_8012A64(&sUnknown_203B230->unk88, sUnknown_203B230->unk24)) {
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
|
||||
if (sUnknown_203B230->unkC != 0) {
|
||||
sUnknown_203B230->unk8 = 0;
|
||||
|
|
@ -115,7 +115,7 @@ static void sub_801B51C(void)
|
|||
sub_801B46C(3);
|
||||
break;
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
sub_801B46C(2);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -134,7 +134,7 @@ static void sub_801B590(void)
|
|||
|
||||
switch (sub_8012A64(&sUnknown_203B230->unk88,sUnknown_203B230->unk24)) {
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
|
||||
sUnknown_203B230->unk8++;
|
||||
if (sUnknown_203B230->unk8 < sUnknown_203B230->unkC)
|
||||
|
|
@ -143,7 +143,7 @@ static void sub_801B590(void)
|
|||
sub_801B46C(0);
|
||||
break;
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
sub_801B46C(2);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ static void sub_801BEC8(void);
|
|||
|
||||
bool8 sub_801B60C(u32 r0, u8 id, u8 quantity)
|
||||
{
|
||||
sUnknown_203B234 = MemoryAlloc(sizeof(unkStruct_203B234), 8);
|
||||
sUnknown_203B234 = MemoryAlloc(sizeof(unkStruct_203B234), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B234->menuAction = 0;
|
||||
sUnknown_203B234->unk0 = r0;
|
||||
sUnknown_203B234->unk10.id = id;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include "text_2.h"
|
||||
#include "text_3.h"
|
||||
|
||||
// This file might be the kangaskhan storage "store" menu
|
||||
|
||||
EWRAM_INIT static struct unkStruct_203B244 *sUnknown_203B244 = { NULL };
|
||||
EWRAM_INIT static u32 sUnknown_203B248 = {0};
|
||||
EWRAM_INIT static u16 sUnknown_203B24C = {0};
|
||||
|
|
@ -26,7 +28,7 @@ bool8 sub_801C8C4(s32 a0, s32 a1, DungeonPos *a2, u32 a3)
|
|||
return FALSE;
|
||||
|
||||
if (sUnknown_203B244 == NULL)
|
||||
sUnknown_203B244 = MemoryAlloc(sizeof(struct unkStruct_203B244), 8);
|
||||
sUnknown_203B244 = MemoryAlloc(sizeof(struct unkStruct_203B244), MEMALLOC_GROUP_8);
|
||||
|
||||
sUnknown_203B244->unk0 = a0;
|
||||
sub_801CF94();
|
||||
|
|
@ -68,10 +70,10 @@ u32 sub_801CA08(bool8 a0)
|
|||
|
||||
switch (GetKeyPress(&sUnknown_203B244->unk4B4.m.input)) {
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case 5:
|
||||
case 6:
|
||||
|
|
@ -82,17 +84,17 @@ u32 sub_801CA08(bool8 a0)
|
|||
temp = sub_801CFE0(index);
|
||||
flag = FALSE;
|
||||
if (temp != 0 || (flag = (INVENTORY_SIZE > GetNumberOfFilledInventorySlots() + sub_801CFB8())) || flag) {
|
||||
PlayMenuSoundEffect(6);
|
||||
PlayMenuSoundEffect(MENU_SFX_TOGGLE);
|
||||
sUnknown_203B244->unkF4[index] = sUnknown_203B244->unkF4[index] ^ 1;
|
||||
MenuCursorUpdate(&sUnknown_203B244->unk4B4.m.input,0);
|
||||
sub_801CCD8();
|
||||
return 1;
|
||||
}
|
||||
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
goto _0801CAF2;
|
||||
case 4:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
default:
|
||||
_0801CAF2:
|
||||
|
|
|
|||
|
|
@ -5,14 +5,13 @@
|
|||
#include "code_800D090.h"
|
||||
#include "code_801D014.h"
|
||||
#include "code_80227B8.h"
|
||||
#include "friend_list.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_80958E8.h"
|
||||
#include "common_strings.h"
|
||||
#include "def_filearchives.h"
|
||||
#include "event_flag.h"
|
||||
#include "friend_area.h"
|
||||
#include "friend_area_action_menu.h"
|
||||
#include "friend_list.h"
|
||||
#include "friend_list_menu.h"
|
||||
#include "ground_lives.h"
|
||||
#include "ground_main.h"
|
||||
|
|
@ -23,6 +22,7 @@
|
|||
#include "menu_input.h"
|
||||
#include "options_menu1.h"
|
||||
#include "party_list_menu.h"
|
||||
#include "recruited_mon_summary_menu.h"
|
||||
#include "rescue_team_info.h"
|
||||
#include "string_format.h"
|
||||
#include "text_1.h"
|
||||
|
|
@ -75,7 +75,7 @@ bool8 sub_801D014(Pokemon *a0)
|
|||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
|
||||
sUnknown_203B250 = MemoryAlloc(sizeof(struct unk_203B250), 8);
|
||||
sUnknown_203B250 = MemoryAlloc(sizeof(struct unk_203B250), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B250->menuAction = sUnknown_203B254;
|
||||
sUnknown_203B250->pokeStruct = a0;
|
||||
|
||||
|
|
@ -278,7 +278,7 @@ static void sub_801D3A8(void)
|
|||
CreateFriendListMenu(1);
|
||||
break;
|
||||
case 8:
|
||||
sub_8024458(sUnknown_203B250->index, 2);
|
||||
RecruitedMonSummaryMenu_Create(sUnknown_203B250->index, 2);
|
||||
break;
|
||||
case 9:
|
||||
CreateIQSkillMenu(sUnknown_203B250->index);
|
||||
|
|
@ -495,16 +495,18 @@ static void sub_801D7CC(void)
|
|||
|
||||
static void sub_801D808(void)
|
||||
{
|
||||
switch (sub_80244E4()) {
|
||||
case 0:
|
||||
case 1:
|
||||
default:
|
||||
switch (RecruitedMonSummaryMenu_Input()) {
|
||||
case RecruitedMonSummaryMenu_INPUTRET_NONE:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_LEFTRIGHT:
|
||||
default: {
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sub_802453C();
|
||||
}
|
||||
case RecruitedMonSummaryMenu_INPUTRET_BACK:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_ACCEPT: {
|
||||
RecruitedMonSummaryMenu_Destroy();
|
||||
sub_801D208(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
#include "text_2.h"
|
||||
#include "text_util.h"
|
||||
|
||||
// This is a gulpin menu
|
||||
|
||||
EWRAM_INIT unkStruct_203B270 *gUnknown_203B270 = { NULL };
|
||||
|
||||
const WindowTemplate gUnknown_80DC240 = WIN_TEMPLATE_DUMMY;
|
||||
|
|
@ -52,7 +54,7 @@ u8 sub_801EE10(u32 param_1, s16 species, Move *moves, u32 param_4, const u8 *tex
|
|||
|
||||
species_s32 = species;
|
||||
param_4_u8 = param_4;
|
||||
gUnknown_203B270 = MemoryAlloc(sizeof(unkStruct_203B270), 8);
|
||||
gUnknown_203B270 = MemoryAlloc(sizeof(unkStruct_203B270), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B270->unk4 = param_4_u8;
|
||||
gUnknown_203B270->unk5 = 1;
|
||||
gUnknown_203B270->unk6 = 1;
|
||||
|
|
@ -111,26 +113,26 @@ u32 sub_801EF38(char param_1)
|
|||
}
|
||||
switch(GetKeyPress(&gUnknown_203B270->input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case INPUT_START_BUTTON:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
case INPUT_DPAD_DOWN:
|
||||
index = gUnknown_203B270->input.menuIndex;
|
||||
sub_8013780(&gUnknown_203B270->input, unk_FindMoveEnabledForAIAfter8_v2(gUnknown_203B270->moves, index));
|
||||
if (index != gUnknown_203B270->input.menuIndex) {
|
||||
PlayMenuSoundEffect(3);
|
||||
PlayMenuSoundEffect(MENU_SFX_NAVIGATE);
|
||||
}
|
||||
break;
|
||||
case INPUT_DPAD_UP:
|
||||
index = gUnknown_203B270->input.menuIndex;
|
||||
sub_8013780(&gUnknown_203B270->input,unk_FindMoveEnabledForAIBefore8_v2(gUnknown_203B270->moves,index));
|
||||
if (index != gUnknown_203B270->input.menuIndex) {
|
||||
PlayMenuSoundEffect(3);
|
||||
PlayMenuSoundEffect(MENU_SFX_NAVIGATE);
|
||||
}
|
||||
break;
|
||||
case INPUT_R_DPAD_DOWN_BUTTONS:
|
||||
|
|
@ -138,7 +140,7 @@ u32 sub_801EF38(char param_1)
|
|||
moveIndex = gUnknown_203B270->input.menuIndex;
|
||||
newIndex = gUnknown_203B270->input.menuIndex = unk_SetMoveToLastInLinkedSequence8_v2(gUnknown_203B270->moves, moveIndex);
|
||||
if (moveIndex != newIndex) {
|
||||
PlayMenuSoundEffect(3);
|
||||
PlayMenuSoundEffect(MENU_SFX_NAVIGATE);
|
||||
}
|
||||
else {
|
||||
goto _134;
|
||||
|
|
@ -150,11 +152,11 @@ u32 sub_801EF38(char param_1)
|
|||
moveIndex = gUnknown_203B270->input.menuIndex;
|
||||
newIndex = gUnknown_203B270->input.menuIndex = unk_SetMoveToFirstInLinkedSequence8_v2(gUnknown_203B270->moves,moveIndex);
|
||||
if (moveIndex != newIndex) {
|
||||
PlayMenuSoundEffect(3);
|
||||
PlayMenuSoundEffect(MENU_SFX_NAVIGATE);
|
||||
}
|
||||
else {
|
||||
_134:
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
}
|
||||
sub_801F280(TRUE);
|
||||
return 1;
|
||||
|
|
@ -163,20 +165,20 @@ _134:
|
|||
if ((gTeamInventoryRef->teamMoney > 0x95) && (sub_8093318(gUnknown_203B270->input.menuIndex,gUnknown_203B270->moves)))
|
||||
{
|
||||
TryLinkMovesAfter(gUnknown_203B270->input.menuIndex,gUnknown_203B270->moves);
|
||||
PlayMenuSoundEffect(6);
|
||||
PlayMenuSoundEffect(MENU_SFX_TOGGLE);
|
||||
flag = TRUE;
|
||||
if (!gUnknown_203B270->unk4) {
|
||||
gUnknown_203B270->unk4 = TRUE;
|
||||
PlaySound(0x14c);
|
||||
PlaySound(332); // money sound
|
||||
}
|
||||
break;
|
||||
}
|
||||
else if (UnlinkMovesAfter(gUnknown_203B270->input.menuIndex,gUnknown_203B270->moves)) {
|
||||
PlayMenuSoundEffect(6);
|
||||
PlayMenuSoundEffect(MENU_SFX_TOGGLE);
|
||||
goto _ret;
|
||||
}
|
||||
else {
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
@ -185,20 +187,20 @@ _134:
|
|||
if (gUnknown_203B270->unk7 != 0) {
|
||||
if (gUnknown_203B270->isTeamLeader) {
|
||||
if (!ToggleSetMove(gUnknown_203B270->input.menuIndex,gUnknown_203B270->moves)) {
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
break;
|
||||
}
|
||||
else {
|
||||
PlayMenuSoundEffect(6);
|
||||
PlayMenuSoundEffect(MENU_SFX_TOGGLE);
|
||||
goto _ret;
|
||||
}
|
||||
}
|
||||
else if (ToggleMoveEnabled(gUnknown_203B270->input.menuIndex,gUnknown_203B270->moves)) {
|
||||
PlayMenuSoundEffect(6);
|
||||
PlayMenuSoundEffect(MENU_SFX_TOGGLE);
|
||||
goto _ret;
|
||||
}
|
||||
else {
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ void sub_801F700(void);
|
|||
bool8 sub_801F428(s16 index, s32 param_2)
|
||||
{
|
||||
s32 index_s32 = index;
|
||||
gUnknown_203B274 = MemoryAlloc(sizeof(struct unkStruct_203B274), 0x8);
|
||||
gUnknown_203B274 = MemoryAlloc(sizeof(struct unkStruct_203B274), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B274->pokeStruct = &gRecruitedPokemonRef->pokemon[index_s32];
|
||||
gUnknown_203B274->unk4 = &gUnknown_203B274->unk8;
|
||||
gUnknown_203B274->s348.m.menuWinId = param_2;
|
||||
|
|
@ -80,13 +80,13 @@ u32 sub_801F520(u8 param_1)
|
|||
switch(GetKeyPress(&gUnknown_203B274->s348.m.input))
|
||||
{
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case 4:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ bool8 sub_801F808(u16 *moveIDs)
|
|||
s32 index;
|
||||
|
||||
ResetSprites(TRUE);
|
||||
gUnknown_203B278 = MemoryAlloc(sizeof(struct unkStruct_203B278), 8);
|
||||
gUnknown_203B278 = MemoryAlloc(sizeof(struct unkStruct_203B278), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B278->unk5C = 0;
|
||||
gUnknown_203B278->unk60 = &gUnknown_203B278->windows.id[0];
|
||||
sub_80140B4(&gUnknown_203B278->windows);
|
||||
|
|
@ -165,7 +165,7 @@ static void sub_801FA58(void)
|
|||
switch(sub_8012A64(&gUnknown_203B278->unkC8, gUnknown_203B278->unk5C))
|
||||
{
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
if(gUnknown_203B278->unk10 != 0)
|
||||
{
|
||||
gUnknown_203B278->unkC = 0;
|
||||
|
|
@ -177,7 +177,7 @@ static void sub_801FA58(void)
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
sub_801F918(2);
|
||||
break;
|
||||
default:
|
||||
|
|
@ -201,7 +201,7 @@ static void sub_801FAD4(void)
|
|||
switch(sub_8012A64(&gUnknown_203B278->unkC8, gUnknown_203B278->unk5C))
|
||||
{
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
gUnknown_203B278->unkC++;
|
||||
if(gUnknown_203B278->unkC < gUnknown_203B278->unk10)
|
||||
{
|
||||
|
|
@ -212,7 +212,7 @@ static void sub_801FAD4(void)
|
|||
}
|
||||
break;
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
sub_801F918(2);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ bool8 sub_80227B8(Pokemon *pkmn)
|
|||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
|
||||
sUnknown_203B294 = MemoryAlloc(sizeof(unkStruct_203B294), 8);
|
||||
sUnknown_203B294 = MemoryAlloc(sizeof(unkStruct_203B294), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B294->menuAction = 0;
|
||||
sUnknown_203B294->pokeStruct = pkmn;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ bool8 sub_8023144(s32 a0, s32 index, DungeonPos *sub, u32 a3)
|
|||
return FALSE;
|
||||
|
||||
if (gUnknown_3001B5C == NULL)
|
||||
gUnknown_3001B5C = MemoryAlloc(sizeof(unkStruct_3001B5C), 8);
|
||||
gUnknown_3001B5C = MemoryAlloc(sizeof(unkStruct_3001B5C), MEMALLOC_GROUP_8);
|
||||
|
||||
gUnknown_3001B5C->unk0 = param_1_u8;
|
||||
gUnknown_3001B5C->unk4 = gUnknown_203B298;
|
||||
|
|
@ -78,13 +78,13 @@ u32 sub_8023278(bool8 a0)
|
|||
|
||||
switch (GetKeyPress(&gUnknown_3001B5C->s35C.m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case INPUT_SELECT_BUTTON:
|
||||
PlayMenuSoundEffect(5);
|
||||
PlayMenuSoundEffect(MENU_SFX_SORT);
|
||||
if (temp = gUnknown_3001B5C->unk4, iVar3 = 1, temp < 2)
|
||||
iVar3 = temp + 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,102 +0,0 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "constants/input.h"
|
||||
#include "music_util.h"
|
||||
#include "code_8024458.h"
|
||||
#include "event_flag.h"
|
||||
#include "input.h"
|
||||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_summary_window.h"
|
||||
#include "text_1.h"
|
||||
|
||||
static EWRAM_INIT struct unkStruct_203B2AC *sUnknown_203B2AC = {NULL};
|
||||
|
||||
#include "data/code_8024458.h"
|
||||
|
||||
static void sub_8024588(void);
|
||||
static void sub_80245D0(void);
|
||||
static void sub_8024604(void);
|
||||
|
||||
bool8 sub_8024458(s16 speciesNum, s32 a1)
|
||||
{
|
||||
s32 speciesNum_s32 = speciesNum;
|
||||
|
||||
sUnknown_203B2AC = MemoryAlloc(sizeof(struct unkStruct_203B2AC), 8);
|
||||
sUnknown_203B2AC->speciesNum = speciesNum_s32;
|
||||
sUnknown_203B2AC->unkE0 = a1;
|
||||
sUnknown_203B2AC->unkE4 = &sUnknown_203B2AC->unkE8.id[a1];
|
||||
RestoreSavedWindows(&sUnknown_203B2AC->unkE8);
|
||||
sUnknown_203B2AC->unkE8.id[sUnknown_203B2AC->unkE0] = sUnknown_80DC9C8;
|
||||
sUnknown_203B2AC->unkE4->header = &sUnknown_203B2AC->unk148;
|
||||
sUnknown_203B2AC->unk148.width = 10;
|
||||
sub_8024604();
|
||||
sub_802452C();
|
||||
MenuUpdatePagesData(&sUnknown_203B2AC->input);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
u32 sub_80244E4(void)
|
||||
{
|
||||
switch (GetKeyPress(&sUnknown_203B2AC->input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
return 3;
|
||||
default:
|
||||
if (MenuCursorUpdateOnlyLeftRight(&sUnknown_203B2AC->input)) {
|
||||
sub_802452C();
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
void sub_802452C(void)
|
||||
{
|
||||
sub_8024588();
|
||||
sub_80245D0();
|
||||
}
|
||||
|
||||
void sub_802453C(void)
|
||||
{
|
||||
if (sUnknown_203B2AC != NULL) {
|
||||
sUnknown_203B2AC->unkE8.id[sUnknown_203B2AC->unkE0] = sUnknown_80DC9B0;
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(&sUnknown_203B2AC->unkE8, TRUE, TRUE);
|
||||
MemoryFree(sUnknown_203B2AC);
|
||||
sUnknown_203B2AC = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static void sub_8024588(void)
|
||||
{
|
||||
sUnknown_203B2AC->unk148.count = sUnknown_203B2AC->input.pagesCount;
|
||||
sUnknown_203B2AC->unk148.currId = sUnknown_203B2AC->input.currPage;
|
||||
sUnknown_203B2AC->unk148.f3 = 0;
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(&sUnknown_203B2AC->unkE8, TRUE, TRUE);
|
||||
}
|
||||
|
||||
static void sub_80245D0(void)
|
||||
{
|
||||
ShowPokemonSummaryWindow(sUnknown_203B2AC->unk34[sUnknown_203B2AC->input.currPage], sUnknown_203B2AC->input.currPage, &sUnknown_203B2AC->unk4C, &sUnknown_203B2AC->unkB0, sUnknown_203B2AC->unkE0);
|
||||
}
|
||||
|
||||
static void sub_8024604(void)
|
||||
{
|
||||
Pokemon *pokeStruct;
|
||||
struct MonSummaryInfo *iVar3;
|
||||
|
||||
sUnknown_203B2AC->unk34[0] = 2;
|
||||
sUnknown_203B2AC->unk34[1] = 3;
|
||||
sUnknown_203B2AC->unk34[2] = 5;
|
||||
|
||||
CreateMenuOnWindow(&sUnknown_203B2AC->input, 3, 1, sUnknown_203B2AC->unkE0);
|
||||
iVar3 = &sUnknown_203B2AC->unk4C;
|
||||
pokeStruct = &gRecruitedPokemonRef->pokemon[sUnknown_203B2AC->speciesNum];
|
||||
SetMonSummaryInfo(iVar3, pokeStruct, CheckQuest(QUEST_UNLOCKED_EVOLUTIONS));
|
||||
}
|
||||
|
|
@ -34,7 +34,7 @@ bool8 sub_802DB28(u8 jobSlotIndex, u8 dungeon)
|
|||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
|
||||
sUnknown_203B2FC = MemoryAlloc(sizeof(struct unkStruct_203B2FC), 8);
|
||||
sUnknown_203B2FC = MemoryAlloc(sizeof(struct unkStruct_203B2FC), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B2FC->jobSlotIndex = jobSlotIndex;
|
||||
sUnknown_203B2FC->jobInfo = GetJobSlotInfo(jobSlotIndex);
|
||||
sub_8096EEC(sUnknown_203B2FC->jobInfo);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ static void sub_802DF88(void);
|
|||
|
||||
bool8 sub_802DE84(unkStruct_802C39C *mail)
|
||||
{
|
||||
sUnknown_203B300 = MemoryAlloc(sizeof(struct unkStruct_203B300), 8);
|
||||
sUnknown_203B300 = MemoryAlloc(sizeof(struct unkStruct_203B300), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B300->mail = mail;
|
||||
ResetTouchScreenMenuInput(&sUnknown_203B300->unk0);
|
||||
sUnknown_203B300->unk10 = sUnknown_203B300->mail->unk0[0];
|
||||
|
|
@ -33,10 +33,10 @@ u32 sub_802DEE0(void)
|
|||
{
|
||||
switch (sub_8012A64(&sUnknown_203B300->unk0, sUnknown_203B300->unk10)) {
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ void DrawSOSPasswordScreen(void);
|
|||
|
||||
bool8 sub_8031D70(u32 mailIndex, s32 param_2)
|
||||
{
|
||||
gUnknown_203B334 = MemoryAlloc(sizeof(struct unkStruct_203B334),8);
|
||||
gUnknown_203B334 = MemoryAlloc(sizeof(struct unkStruct_203B334), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B334->mailIndex = mailIndex;
|
||||
ResetTouchScreenMenuInput(&gUnknown_203B334->unk4);
|
||||
gUnknown_203B334->unk10 = param_2;
|
||||
|
|
@ -72,10 +72,10 @@ u32 sub_8031DCC(void)
|
|||
switch(sub_8012A64(&gUnknown_203B334->unk4, gUnknown_203B334->unk10))
|
||||
{
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
default:
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ bool8 sub_803B050(void)
|
|||
s32 count;
|
||||
s32 max;
|
||||
|
||||
gUnknown_203B3FC = MemoryAlloc(sizeof(unkStruct_203B3FC), 8);
|
||||
gUnknown_203B3FC = MemoryAlloc(sizeof(unkStruct_203B3FC), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B3FC->mh.m.menuWinId = 3;
|
||||
gUnknown_203B3FC->mh.m.menuWindow = &gUnknown_203B3FC->mh.m.windows.id[gUnknown_203B3FC->mh.m.menuWinId];
|
||||
RestoreSavedWindows(&gUnknown_203B3FC->mh.m.windows);
|
||||
|
|
@ -169,7 +169,7 @@ u32 sub_803B120(void)
|
|||
{
|
||||
switch (GetKeyPress(&gUnknown_203B3FC->mh.m.input)) {
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case 1:
|
||||
return 3;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ u32 CreateConfirmNameMenu(u32 mode, u8 *name)
|
|||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
|
||||
sConfirmMenu = MemoryAlloc(sizeof(struct ConfirmMenuStruct), 8);
|
||||
sConfirmMenu = MemoryAlloc(sizeof(struct ConfirmMenuStruct), MEMALLOC_GROUP_8);
|
||||
sConfirmMenu->unk0 = mode;
|
||||
sConfirmMenu->pokeName = name;
|
||||
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ bool8 DrawCredits(s32 creditsCategoryIndex, s32 param_2)
|
|||
u8 curChar;
|
||||
u8 buffer[128];
|
||||
|
||||
sCredits1Work = MemoryAlloc(sizeof(Credits1Work), 8);
|
||||
sCredits1Work = MemoryAlloc(sizeof(Credits1Work), MEMALLOC_GROUP_8);
|
||||
sCredits1Work->unk60 = 0;
|
||||
sCredits1Work->unk64 = param_2;
|
||||
sCredits1Work->creditsCategoryIndex = creditsCategoryIndex;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ static EWRAM_INIT Credits2Work *sCredits2Work = {NULL};
|
|||
|
||||
bool8 sub_8035678(void)
|
||||
{
|
||||
sCredits2Work = MemoryAlloc(sizeof(Credits2Work), 8);
|
||||
sCredits2Work = MemoryAlloc(sizeof(Credits2Work), MEMALLOC_GROUP_8);
|
||||
sCredits2Work->state = 0;
|
||||
sCredits2Work->unk4 = 0;
|
||||
ClearScriptVarArray(NULL, EVENT_LOCAL);
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
static const WindowTemplate sUnknown_80DC9B0 = {
|
||||
0,
|
||||
3,
|
||||
0, 0,
|
||||
0, 0,
|
||||
0, 0,
|
||||
NULL
|
||||
};
|
||||
|
||||
static const WindowTemplate sUnknown_80DC9C8 = {
|
||||
0,
|
||||
6,
|
||||
2, 2,
|
||||
18, 14,
|
||||
18, 2,
|
||||
NULL
|
||||
};
|
||||
13
src/data/recruited_mon_summary_menu.h
Normal file
13
src/data/recruited_mon_summary_menu.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
static const WindowTemplate sDummyWinTemplate = WIN_TEMPLATE_DUMMY;
|
||||
|
||||
static const WindowTemplate sSummaryWinTemplate =
|
||||
{
|
||||
.flags = WINTEMPLATE_FLAG_NONE,
|
||||
.type = WINDOW_TYPE_WITH_HEADER,
|
||||
.pos = { .x = 2, .y = 2 },
|
||||
.width = 18,
|
||||
.height = 14,
|
||||
.totalHeight = 18,
|
||||
.unk12 = 2,
|
||||
.header = NULL
|
||||
};
|
||||
|
|
@ -35,7 +35,7 @@ static void PrintCurrentPageText(void);
|
|||
|
||||
bool8 DebugFieldMapWindow_Init(void)
|
||||
{
|
||||
sDebugWindow = MemoryAlloc(sizeof(*sDebugWindow), 8);
|
||||
sDebugWindow = MemoryAlloc(sizeof(*sDebugWindow), MEMALLOC_GROUP_8);
|
||||
sDebugWindow->m.menuWinId = WINDOW_ID_DEBUG;
|
||||
sDebugWindow->m.menuWindow = &sDebugWindow->m.windows.id[WINDOW_ID_DEBUG];
|
||||
RestoreSavedWindows(&sDebugWindow->m.windows);
|
||||
|
|
@ -61,7 +61,7 @@ u32 DebugFieldMapWindow_GetInput(void)
|
|||
{
|
||||
switch (GetKeyPress(&sDebugWindow->m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return MENU_INPUT_B_PRESS;
|
||||
case INPUT_A_BUTTON:
|
||||
return MENU_INPUT_A_PRESS;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ void CreateDebugMenu(void)
|
|||
s32 i;
|
||||
|
||||
if (sDebugMenu == NULL) {
|
||||
sDebugMenu = MemoryAlloc(sizeof(struct DebugMenu), 8);
|
||||
sDebugMenu = MemoryAlloc(sizeof(struct DebugMenu), MEMALLOC_GROUP_8);
|
||||
MemoryFill8(sDebugMenu, 0, sizeof(struct DebugMenu));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ UNUSED static bool8 sub_803A45C(void)
|
|||
{
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
sUnknown_203B3F0 = MemoryAlloc(sizeof(unkStruct_203B3F0), 8);
|
||||
sUnknown_203B3F0 = MemoryAlloc(sizeof(unkStruct_203B3F0), MEMALLOC_GROUP_8);
|
||||
sub_803A504(0);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ UNUSED static bool8 sub_803A888(void)
|
|||
{
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
sUnknown_203B3F4 = MemoryAlloc(sizeof(unkStruct_203B3F4), 8);
|
||||
sUnknown_203B3F4 = MemoryAlloc(sizeof(unkStruct_203B3F4), MEMALLOC_GROUP_8);
|
||||
sub_803A924(0);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ static void sub_803B034(void);
|
|||
|
||||
UNUSED static bool8 sub_803AC24(void)
|
||||
{
|
||||
sUnknown_203B3F8 = MemoryAlloc(sizeof(unkStruct_203B3F8), 8);
|
||||
sUnknown_203B3F8 = MemoryAlloc(sizeof(unkStruct_203B3F8), MEMALLOC_GROUP_8);
|
||||
sub_803ACD0(0);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1141,7 +1141,7 @@ void sub_8042390(Entity *entity, Item *item)
|
|||
|
||||
if (sub_8042768(entity)) {
|
||||
id = !ItemSticky(item) ? item->id : ITEM_NOTHING;
|
||||
sub_800EF40(id, 0);
|
||||
sub_800EF40(id, FALSE);
|
||||
sub_800EF64();
|
||||
DungeonWaitFrames_Async(4,0x42);
|
||||
local_14.x = (entity->pixelPos).x / 256;
|
||||
|
|
@ -1538,7 +1538,7 @@ static void sub_8042B34(s32 a0, s32 a1, s32 a2)
|
|||
s32 i;
|
||||
s32 r8 = 0;
|
||||
Entity *leader = CutsceneGetLeader();
|
||||
gUnknown_203B414 = MemoryAlloc(sizeof(*gUnknown_203B414), 7);
|
||||
gUnknown_203B414 = MemoryAlloc(sizeof(*gUnknown_203B414), MEMALLOC_GROUP_7);
|
||||
|
||||
gUnknown_203B414->unk0 = a0;
|
||||
gUnknown_203B414->unk8 = (a1 + 1) * 4;
|
||||
|
|
|
|||
|
|
@ -647,7 +647,7 @@ void HandleBossFaint_Async(Entity *entity, u8 monsterBehavior, bool8 transformed
|
|||
}
|
||||
|
||||
if (!transformedIntoFriend && gDungeon->unk2 != DUNGEON_UNK2_0)
|
||||
DungeonStartNewBGM(999);
|
||||
DungeonStartNewBGM(STOP_BGM);
|
||||
}
|
||||
|
||||
void sub_8085140_Async(void)
|
||||
|
|
|
|||
|
|
@ -656,7 +656,7 @@ static bool8 HandleDealingDamageInternal_Async(Entity *attacker, Entity *target,
|
|||
ZeroOutItem(&targetData->heldItem);
|
||||
}
|
||||
if (targetData->bossFlag) {
|
||||
gDungeon->unk644.bossSongIndex = 999;
|
||||
gDungeon->unk644.bossSongIndex = STOP_BGM;
|
||||
}
|
||||
|
||||
// Give exp
|
||||
|
|
|
|||
|
|
@ -2562,7 +2562,7 @@ u32 BufferDungeonRequirementsText(u8 dungeonIndex, s32 speciesId_, u8 *buffer, b
|
|||
sp_0xf0 = 0;
|
||||
|
||||
for (i = 0; i < NUM_MONSTERS; i++) {
|
||||
struct Pokemon *mon = &gRecruitedPokemonRef->pokemon[i];
|
||||
Pokemon *mon = &gRecruitedPokemonRef->pokemon[i];
|
||||
if (PokemonExists(mon) && PokemonIsOnTeam(mon)) {
|
||||
if (mon->heldItem.id != 0) {
|
||||
sp_0xf0++;
|
||||
|
|
@ -2606,7 +2606,7 @@ u32 BufferDungeonRequirementsText(u8 dungeonIndex, s32 speciesId_, u8 *buffer, b
|
|||
}
|
||||
bodySize = GetBodySize(speciesId);
|
||||
for (i = 0; i < NUM_MONSTERS; i++) {
|
||||
struct Pokemon *mon = &gRecruitedPokemonRef->pokemon[i];
|
||||
Pokemon *mon = &gRecruitedPokemonRef->pokemon[i];
|
||||
|
||||
if (PokemonExists(mon) && PokemonIsOnTeam(mon)){
|
||||
bodySize += GetBodySize(mon->speciesNum);
|
||||
|
|
@ -2650,7 +2650,7 @@ u32 BufferDungeonRequirementsText(u8 dungeonIndex, s32 speciesId_, u8 *buffer, b
|
|||
|
||||
if (otherSpeciesId == NUM_MONSTERS) {
|
||||
for (otherSpeciesId = 0; otherSpeciesId < NUM_MONSTERS; otherSpeciesId++) {
|
||||
struct Pokemon *mon = &gRecruitedPokemonRef->pokemon[otherSpeciesId];
|
||||
Pokemon *mon = &gRecruitedPokemonRef->pokemon[otherSpeciesId];
|
||||
|
||||
if (PokemonExists(mon) && PokemonIsOnTeam(mon)
|
||||
&& (GetPokemonType(mon->speciesNum,0) == TYPE_WATER || GetPokemonType(mon->speciesNum,1) == TYPE_WATER))
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ bool8 DungeonListMenu_Init(u32 windowId, DungeonPos *winPos, s32 perPageCount, b
|
|||
return FALSE;
|
||||
|
||||
if (sDungeonListMenu == NULL)
|
||||
sDungeonListMenu = MemoryAlloc(sizeof(struct DungeonListMenu), 8);
|
||||
sDungeonListMenu = MemoryAlloc(sizeof(struct DungeonListMenu), MEMALLOC_GROUP_8);
|
||||
|
||||
sDungeonListMenu->showIcons = showIcons;
|
||||
sDungeonListMenu->m.m.menuWinId = windowId;
|
||||
|
|
@ -112,10 +112,10 @@ u32 DungeonListMenu_GetInput(u8 arrowType)
|
|||
else {
|
||||
switch (GetKeyPress(&sDungeonListMenu->m.m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return MENU_INPUT_B_PRESS;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return MENU_INPUT_A_PRESS;
|
||||
default:
|
||||
if (MenuCursorUpdate(&sDungeonListMenu->m.m.input, TRUE)) {
|
||||
|
|
|
|||
|
|
@ -634,8 +634,8 @@ static void PrintMonTactics(s32 firstId, u8 *tacticIds, EntityInfo *mon, s32 win
|
|||
void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq)
|
||||
{
|
||||
s32 subWindowIds[6];
|
||||
struct MonSummaryInfo monSummaryInfo;
|
||||
struct UnkInfoTabStruct unkInfoTabStruct;
|
||||
MonSummaryInfo monSummaryInfo;
|
||||
UnkInfoTabStruct unkInfoTabStruct;
|
||||
WindowTemplates windows = {
|
||||
.id = {
|
||||
[0] = {
|
||||
|
|
@ -684,7 +684,7 @@ void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 showIq)
|
|||
else {
|
||||
subWindowIds[0] = SUB_WINDOW_STATS;
|
||||
subWindowIds[1] = SUB_WINDOW_STATUS;
|
||||
subWindowIds[2] = SUB_WINDOW_FEATUERS;
|
||||
subWindowIds[2] = SUB_WINDOW_FEATURES;
|
||||
subWindowIds[3] = SUB_WINDOW_INFO;
|
||||
subWindowIds[4] = SUB_WINDOW_NONE;
|
||||
subWindowIds[5] = SUB_WINDOW_NONE;
|
||||
|
|
|
|||
|
|
@ -786,7 +786,7 @@ Entity * sub_806977C(Entity *target)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
void SetMonSummaryInfoFromEntity(struct MonSummaryInfo *param_1, Entity *target)
|
||||
void SetMonSummaryInfoFromEntity(MonSummaryInfo *param_1, Entity *target)
|
||||
{
|
||||
s32 index;
|
||||
u8 *atkPtr;
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ static void LoadStatusGraphics(s32 graphicIndex, bool8 queueLoad)
|
|||
void InitDungeonPokemonSprites(void)
|
||||
{
|
||||
if (sDungeonPokemonSprites == NULL) {
|
||||
sDungeonPokemonSprites = MemoryAlloc(sizeof(DungeonPokemonSprites),12);
|
||||
sDungeonPokemonSprites = MemoryAlloc(sizeof(DungeonPokemonSprites), MEMALLOC_GROUP_12);
|
||||
MemoryClear8(sDungeonPokemonSprites,sizeof(DungeonPokemonSprites));
|
||||
}
|
||||
sDungeonPokemonSprites->frame = 0;
|
||||
|
|
|
|||
|
|
@ -375,8 +375,8 @@ static void sub_8067F00(u8 a0, Pokemon **a1, s32 a2_, s32 a3, s32 a4)
|
|||
|
||||
static void ShowPokemonSummary(Pokemon *a0)
|
||||
{
|
||||
struct MonSummaryInfo unkStruct;
|
||||
struct UnkInfoTabStruct var_C8;
|
||||
MonSummaryInfo unkStruct;
|
||||
UnkInfoTabStruct var_C8;
|
||||
WindowTemplates winTemplates = {0};
|
||||
s32 r7;
|
||||
|
||||
|
|
@ -402,7 +402,7 @@ static void ShowPokemonSummary(Pokemon *a0)
|
|||
|
||||
while (TRUE) {
|
||||
bool32 loopBreak = FALSE;
|
||||
s32 spF8[4] = {2, 3, 4, 5};
|
||||
s32 spF8[4] = { SUB_WINDOW_STATS, SUB_WINDOW_FEATURES, SUB_WINDOW_IQ, SUB_WINDOW_INFO };
|
||||
|
||||
sReleaseMenuWinHeader.count = 4;
|
||||
sReleaseMenuWinHeader.currId = r7;
|
||||
|
|
|
|||
9504
src/effect_data.c
9504
src/effect_data.c
File diff suppressed because it is too large
Load Diff
|
|
@ -42,7 +42,7 @@ struct unkStruct_203B0CC_sub
|
|||
s32 unk40;
|
||||
s32 unk44;
|
||||
s32 unk48;
|
||||
u32 unk4C;
|
||||
u32 unk4C; // Some sound
|
||||
s32 unk50;
|
||||
u8 unk54;
|
||||
u8 unk55;
|
||||
|
|
@ -72,12 +72,6 @@ struct unkStruct_203B0CC
|
|||
|
||||
static EWRAM_INIT struct unkStruct_203B0CC *gUnknown_203B0CC = NULL;
|
||||
|
||||
struct unkStruct_800F18C
|
||||
{
|
||||
s32 effectID;
|
||||
u32 counter;
|
||||
};
|
||||
|
||||
extern s16 gUnknown_2026E4E;
|
||||
|
||||
static s32 sub_800E900(s32 a0);
|
||||
|
|
@ -100,7 +94,7 @@ void sub_800DAC0(u32 fileSelection)
|
|||
if (gUnknown_203B0CC != NULL) {
|
||||
sub_800DB7C();
|
||||
}
|
||||
gUnknown_203B0CC = MemoryAlloc(sizeof(struct unkStruct_203B0CC), 0xb);
|
||||
gUnknown_203B0CC = MemoryAlloc(sizeof(struct unkStruct_203B0CC), MEMALLOC_GROUP_11);
|
||||
MemoryClear8(gUnknown_203B0CC, sizeof(struct unkStruct_203B0CC));
|
||||
gUnknown_203B0CC->fileSelection = fileSelection;
|
||||
for (i = 0, ptr = &gUnknown_203B0CC->unk0[i]; i < UNK_203B0CC_ARR_COUNT; i++, ptr++) {
|
||||
|
|
@ -173,7 +167,7 @@ void sub_800DC14(s32 param_1)
|
|||
struct unkStruct_203B0CC_sub *ptr = &gUnknown_203B0CC->unk0[index1];
|
||||
if (ptr->unk34 == 4) {
|
||||
sub_8009BE4();
|
||||
if (sub_8000728() == 1) {
|
||||
if (GetMainLoopsUnk() == MAINLOOPS_UNK_1) {
|
||||
LoadDungeonMapPalette();
|
||||
sub_803EAF0(0, NULL);
|
||||
sub_800CD64(0x8000,0);
|
||||
|
|
@ -182,7 +176,7 @@ void sub_800DC14(s32 param_1)
|
|||
if (ptr->unk34 == 3) {
|
||||
s32 i;
|
||||
for (i = 0; i < 2; i = i + 1) {
|
||||
struct unkStruct_800F18C *piVar3 = sub_800F18C(i);
|
||||
unkStruct_800F18C *piVar3 = sub_800F18C(i);
|
||||
if (piVar3->effectID == ptr->effectID) {
|
||||
piVar3->counter--;
|
||||
break;
|
||||
|
|
@ -190,7 +184,7 @@ void sub_800DC14(s32 param_1)
|
|||
}
|
||||
}
|
||||
else {
|
||||
struct unkStruct_800F18C *puVar4 = sub_800F18C(1);
|
||||
unkStruct_800F18C *puVar4 = sub_800F18C(1);
|
||||
puVar4->counter = 0;
|
||||
puVar4->effectID = -1;
|
||||
}
|
||||
|
|
@ -216,7 +210,7 @@ static void sub_800DCA8(struct unkStruct_203B0CC_sub *param_1)
|
|||
static void sub_800DCD0(struct unkStruct_203B0CC_sub *param_1)
|
||||
{
|
||||
if (param_1->unk4C != -1 && param_1->unk50 == 0) {
|
||||
if (sub_8000728() != 2) {
|
||||
if (GetMainLoopsUnk() != MAINLOOPS_UNK_2) {
|
||||
PlaySound(param_1->unk4C);
|
||||
}
|
||||
param_1->unk4C = -1;
|
||||
|
|
@ -238,7 +232,7 @@ static bool8 sub_800DD0C(struct unkStruct_203B0CC_sub *param_1, DungeonPos *posA
|
|||
if (param_1->unk34 == 3) {
|
||||
s32 i;
|
||||
for (i = 0; i < 2; i++) {
|
||||
struct unkStruct_800F18C *puVar4 = sub_800F18C(i);
|
||||
unkStruct_800F18C *puVar4 = sub_800F18C(i);
|
||||
if (puVar4->effectID == param_1->effectID) {
|
||||
puVar4->counter--;
|
||||
break;
|
||||
|
|
@ -464,7 +458,7 @@ static bool8 sub_800DE38(struct unkStruct_203B0CC_sub *a1)
|
|||
sub_800DCA8(a1);
|
||||
if (a1->unk34 == 3) {
|
||||
for (i = 0; i < 2; i++) {
|
||||
struct unkStruct_800F18C *strPtr = sub_800F18C(i);
|
||||
unkStruct_800F18C *strPtr = sub_800F18C(i);
|
||||
if (strPtr->effectID == a1->effectID) {
|
||||
strPtr->counter--;
|
||||
break;
|
||||
|
|
@ -535,11 +529,11 @@ static bool8 sub_800DE8C(struct unkStruct_203B0CC_sub *a0, DungeonPos *unused)
|
|||
}
|
||||
}
|
||||
else {
|
||||
struct unkStruct_800F18C *strPtr;
|
||||
unkStruct_800F18C *strPtr;
|
||||
|
||||
sub_8009BE4();
|
||||
sub_800DCA8(a0);
|
||||
if (sub_8000728() == 1) {
|
||||
if (GetMainLoopsUnk() == MAINLOOPS_UNK_1) {
|
||||
LoadDungeonMapPalette();
|
||||
sub_803EAF0(0, 0);
|
||||
sub_800CD64(0x8000, FALSE);
|
||||
|
|
@ -732,10 +726,10 @@ void sub_800E3AC(s32 a0, DungeonPos *pos, s32 a2)
|
|||
ptr->unkC.unk18 = a2;
|
||||
}
|
||||
|
||||
s32 sub_800E448(u8 a0, DungeonPos *pos)
|
||||
s32 sub_800E448(u8 trapID, DungeonPos *pos)
|
||||
{
|
||||
unkStruct_80416E0 sp = {
|
||||
.unk0 = sub_800ECE4(a0),
|
||||
.unk0 = GetTrapEffect(trapID),
|
||||
.unk4 = 0,
|
||||
.dir = -1,
|
||||
.pos1 = *pos,
|
||||
|
|
|
|||
|
|
@ -1,65 +1,67 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "bg_control.h"
|
||||
#include "code_800C9CC.h"
|
||||
#include "code_8099360.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "dungeon_vram.h"
|
||||
#include "effect_anim_file.h"
|
||||
#include "effect_data.h"
|
||||
#include "effect_sub_1.h"
|
||||
#include "effect_sub_2.h"
|
||||
#include "bg_control.h"
|
||||
#include "structs/axdata.h"
|
||||
#include "graphics_memory.h"
|
||||
#include "code_800C9CC.h"
|
||||
#include "effect_data.h"
|
||||
#include "dungeon_vram.h"
|
||||
#include "dungeon_message.h"
|
||||
#include "file_system.h"
|
||||
#include "main_loops.h"
|
||||
#include "memory.h"
|
||||
#include "sprite.h"
|
||||
#include "text_2.h"
|
||||
#include "effect_anim_file.h"
|
||||
|
||||
struct unkStruct_203B0D0_sub
|
||||
#define NUM_SUBS 2
|
||||
|
||||
// Size: 0x24
|
||||
typedef struct EffectSub1Work_sub
|
||||
{
|
||||
// size: 0x24
|
||||
u32 unk0;
|
||||
OpenedFile *file;
|
||||
const EfoFileData *fileData;
|
||||
u32 unkC;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
s32 unk18;
|
||||
s32 unk1C;
|
||||
const RGB_Struct *ramp;
|
||||
};
|
||||
/* 0x00 */ u32 unk0;
|
||||
/* 0x04 */ OpenedFile *file;
|
||||
/* 0x08 */ const EfoFileData *fileData;
|
||||
/* 0x0C */ u32 unkC;
|
||||
/* 0x10 */ s32 unk10;
|
||||
/* 0x14 */ s32 unk14;
|
||||
/* 0x18 */ s32 unk18;
|
||||
/* 0x1C */ s32 unk1C;
|
||||
/* 0x20 */ const RGB_Struct *ramp;
|
||||
} EffectSub1Work_sub;
|
||||
|
||||
struct unkStruct_203B0D0 {
|
||||
// size: 0x4C
|
||||
u32 unk0;
|
||||
struct unkStruct_203B0D0_sub unk4[2];
|
||||
};
|
||||
// Size: 0x4C
|
||||
typedef struct EffectSub1Work
|
||||
{
|
||||
/* 0x0 */ u32 unk0;
|
||||
/* 0x4 */ EffectSub1Work_sub unk4[NUM_SUBS];
|
||||
} EffectSub1Work;
|
||||
|
||||
static EWRAM_INIT struct unkStruct_203B0D0 *gUnknown_203B0D0 = NULL;
|
||||
static EWRAM_INIT EffectSub1Work *sWork = NULL;
|
||||
|
||||
void sub_800ED38(s32 r0)
|
||||
{
|
||||
if (gUnknown_203B0D0 == NULL) {
|
||||
gUnknown_203B0D0 = MemoryAlloc(sizeof(struct unkStruct_203B0D0), 0xB);
|
||||
MemoryClear8(gUnknown_203B0D0, sizeof(struct unkStruct_203B0D0));
|
||||
if (sWork == NULL) {
|
||||
sWork = MemoryAlloc(sizeof(EffectSub1Work), MEMALLOC_GROUP_11);
|
||||
MemoryClear8(sWork, sizeof(EffectSub1Work));
|
||||
}
|
||||
gUnknown_203B0D0->unk0 = r0;
|
||||
sWork->unk0 = r0;
|
||||
}
|
||||
|
||||
void sub_800ED64(void)
|
||||
{
|
||||
TRY_FREE_AND_SET_NULL(gUnknown_203B0D0);
|
||||
TRY_FREE_AND_SET_NULL(sWork);
|
||||
}
|
||||
|
||||
void sub_800ED80(void)
|
||||
{
|
||||
s32 index;
|
||||
s32 i;
|
||||
|
||||
gUnknown_203B0D0->unk0 = 0;
|
||||
for (index = 0; index < 2; index++) {
|
||||
struct unkStruct_203B0D0_sub *sub = &gUnknown_203B0D0->unk4[index];
|
||||
sWork->unk0 = 0;
|
||||
|
||||
for (i = 0; i < NUM_SUBS; i++) {
|
||||
EffectSub1Work_sub *sub = &sWork->unk4[i];
|
||||
|
||||
sub->unk0 = 0;
|
||||
sub->file = NULL;
|
||||
|
|
@ -67,25 +69,26 @@ void sub_800ED80(void)
|
|||
}
|
||||
}
|
||||
|
||||
static bool8 sub_800EDB0(struct unkStruct_203B0D0_sub *r0)
|
||||
static bool8 sub_800EDB0(EffectSub1Work_sub *dst)
|
||||
{
|
||||
s32 index;
|
||||
s32 i;
|
||||
|
||||
for (index = 0; index < 2; index++) {
|
||||
if (gUnknown_203B0D0->unk4[index].unk0 == 0) {
|
||||
gUnknown_203B0D0->unk4[index] = *r0;
|
||||
for (i = 0; i < NUM_SUBS; i++) {
|
||||
if (sWork->unk4[i].unk0 == 0) {
|
||||
sWork->unk4[i] = *dst;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static void sub_800EDF0(u32 r0, OpenedFile *file)
|
||||
{
|
||||
struct unkStruct_203B0D0_sub stack;
|
||||
EffectSub1Work_sub stack;
|
||||
|
||||
switch (r0) {
|
||||
case 0:
|
||||
case 0: {
|
||||
stack.unk0 = 3;
|
||||
stack.unkC = 0xE;
|
||||
stack.unk10 = -1;
|
||||
|
|
@ -94,17 +97,20 @@ static void sub_800EDF0(u32 r0, OpenedFile *file)
|
|||
stack.unk14 = -1;
|
||||
stack.file = file;
|
||||
break;
|
||||
case 1:
|
||||
}
|
||||
case 1: {
|
||||
stack.unk0 = 4;
|
||||
stack.unkC = 0xE;
|
||||
stack.unk10 = 0xF00;
|
||||
stack.unk18 = -1;
|
||||
stack.unk1C = -1;
|
||||
stack.unk14 = (sub_8000728() != 2) ? 2 : 0;
|
||||
stack.unk14 = (GetMainLoopsUnk() != MAINLOOPS_UNK_2) ? 2 : 0;
|
||||
stack.file = file;
|
||||
break;
|
||||
}
|
||||
}
|
||||
stack.fileData = (void *) file->data;
|
||||
|
||||
stack.fileData = (void *)file->data;
|
||||
stack.ramp = NULL;
|
||||
sub_800EDB0(&stack);
|
||||
}
|
||||
|
|
@ -126,75 +132,77 @@ void sub_800EE5C(s32 r0)
|
|||
CloseEffectFile(file);
|
||||
return;
|
||||
}
|
||||
else if(ret2 != -2) {
|
||||
|
||||
if (ret2 != -2) {
|
||||
sub_800F13C(ret2, file, ret);
|
||||
sub_800EDF0(ret2, file);
|
||||
}
|
||||
else {
|
||||
CloseEffectFile(file);
|
||||
}
|
||||
|
||||
sub_800F15C(ret->effectId);
|
||||
}
|
||||
}
|
||||
|
||||
void sub_800EEC8(u16 r0)
|
||||
void sub_800EEC8(u16 moveID)
|
||||
{
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(r0);
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(moveID);
|
||||
sub_800EE5C(ret->unk0);
|
||||
}
|
||||
|
||||
void sub_800EEE0(u16 r0)
|
||||
void sub_800EEE0(u16 moveID)
|
||||
{
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(r0);
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(moveID);
|
||||
sub_800EE5C(ret->unk4);
|
||||
}
|
||||
|
||||
void sub_800EEF8(u16 r0)
|
||||
void sub_800EEF8(u16 moveID)
|
||||
{
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(r0);
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(moveID);
|
||||
sub_800EE5C(ret->unk2);
|
||||
}
|
||||
|
||||
void sub_800EF10(u16 r0)
|
||||
void sub_800EF10(u16 moveID)
|
||||
{
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(r0);
|
||||
const unkStruct_80BDBC4 *ret = sub_800ECB8(moveID);
|
||||
sub_800EE5C(ret->unk6);
|
||||
}
|
||||
|
||||
void sub_800EF28(u8 r0)
|
||||
void sub_800EF28(u8 trapID)
|
||||
{
|
||||
sub_800EE5C(sub_800ECE4(r0));
|
||||
sub_800EE5C(GetTrapEffect(trapID));
|
||||
}
|
||||
|
||||
void sub_800EF40(u8 r0, bool8 r1)
|
||||
void sub_800EF40(u8 itemID, bool8 r1)
|
||||
{
|
||||
s32 ret;
|
||||
if (r1) {
|
||||
ret = sub_800ECF8(r0);
|
||||
}
|
||||
else {
|
||||
ret = sub_800ED0C(r0);
|
||||
}
|
||||
|
||||
if (r1)
|
||||
ret = sub_800ECF8(itemID);
|
||||
else
|
||||
ret = sub_800ED0C(itemID);
|
||||
|
||||
sub_800EE5C(ret);
|
||||
}
|
||||
|
||||
void sub_800EF64(void)
|
||||
{
|
||||
s32 i;
|
||||
struct unkStruct_203B0D0_sub *sub;
|
||||
EffectSub1Work_sub *sub;
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
if (gUnknown_203B0D0->unk4[i].unk0 == 0)
|
||||
for (i = 0; i < NUM_SUBS; i++) {
|
||||
if (sWork->unk4[i].unk0 == 0)
|
||||
continue;
|
||||
|
||||
sub = &gUnknown_203B0D0->unk4[i];
|
||||
sub = &sWork->unk4[i];
|
||||
switch (sub->unk0) {
|
||||
case 1:
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
sub_8005674(sub->fileData, sub->unk18);
|
||||
switch (gUnknown_203B0D0->unk0) {
|
||||
switch (sWork->unk0) {
|
||||
case 1: {
|
||||
const RGB_Struct *pal = sub->fileData->pal;
|
||||
sub_809971C((sub->unkC + 16) * 16, (RGB_Array*)pal, 0x10);
|
||||
|
|
@ -211,7 +219,7 @@ void sub_800EF64(void)
|
|||
}
|
||||
break;
|
||||
case 4:
|
||||
if (sub_8000728() == 1) {
|
||||
if (GetMainLoopsUnk() == MAINLOOPS_UNK_1) {
|
||||
sub_800CD64(0, TRUE);
|
||||
sub_8052210(0);
|
||||
sub_803EAF0(5, NULL);
|
||||
|
|
|
|||
|
|
@ -5,15 +5,9 @@
|
|||
#include "memory.h"
|
||||
#include "file_system.h"
|
||||
|
||||
struct unkStruct_800F18C
|
||||
{
|
||||
s32 effectID;
|
||||
u32 counter;
|
||||
};
|
||||
|
||||
struct unkStruct_203B0D4
|
||||
{
|
||||
struct unkStruct_800F18C unk0[2];
|
||||
unkStruct_800F18C unk0[2];
|
||||
};
|
||||
|
||||
static EWRAM_INIT struct unkStruct_203B0D4 *gUnknown_203B0D4 = NULL;
|
||||
|
|
@ -22,7 +16,7 @@ void sub_800F034(void)
|
|||
{
|
||||
s32 index;
|
||||
if (gUnknown_203B0D4 == NULL) {
|
||||
gUnknown_203B0D4 = MemoryAlloc(sizeof(struct unkStruct_203B0D4), 0xB);
|
||||
gUnknown_203B0D4 = MemoryAlloc(sizeof(struct unkStruct_203B0D4), MEMALLOC_GROUP_11);
|
||||
MemoryClear8(gUnknown_203B0D4, sizeof(struct unkStruct_203B0D4));
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +82,7 @@ void sub_800F15C(s32 effectID)
|
|||
}
|
||||
}
|
||||
|
||||
struct unkStruct_800F18C *sub_800F18C(s32 index)
|
||||
unkStruct_800F18C *sub_800F18C(s32 index)
|
||||
{
|
||||
return &gUnknown_203B0D4->unk0[index];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ bool8 CreateFelicityBank(s32 mode)
|
|||
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
sFelicityBankWork = MemoryAlloc(sizeof(FelicityBankWork), 8);
|
||||
sFelicityBankWork = MemoryAlloc(sizeof(FelicityBankWork), MEMALLOC_GROUP_8);
|
||||
sFelicityBankWork->menuAction = 0;
|
||||
sFelicityBankWork->mode = mode;
|
||||
CopyYellowMonsterNametoBuffer(gSpeakerNameBuffer, MONSTER_PERSIAN);
|
||||
|
|
|
|||
|
|
@ -3,10 +3,10 @@
|
|||
#include "decompress_sir.h"
|
||||
#include "file_system.h"
|
||||
|
||||
EWRAM_DATA u32 gUnknown_202D2A4 = {0};
|
||||
EWRAM_DATA OpenedFile gFileCache[64] = {0};
|
||||
static EWRAM_DATA u32 sFileSystemUnk = { FILESYSTEM_UNK_0 };
|
||||
EWRAM_DATA OpenedFile gFileCache[64] = { 0 };
|
||||
|
||||
static EWRAM_INIT u32 sFileCacheCursorPosition = {0};
|
||||
static EWRAM_INIT u32 sFileCacheCursorPosition = { 0 };
|
||||
|
||||
void InitFileSystem(void)
|
||||
{
|
||||
|
|
@ -18,13 +18,13 @@ void InitFileSystem(void)
|
|||
}
|
||||
|
||||
sFileCacheCursorPosition = 0;
|
||||
gUnknown_202D2A4 = 1;
|
||||
sFileSystemUnk = FILESYSTEM_UNK_1;
|
||||
}
|
||||
|
||||
u32 sub_800A8F8(u32 value)
|
||||
u32 SetFileSystemUnk(u32 value)
|
||||
{
|
||||
u32 oldValue = gUnknown_202D2A4;
|
||||
gUnknown_202D2A4 = value;
|
||||
u32 oldValue = sFileSystemUnk;
|
||||
sFileSystemUnk = value;
|
||||
return oldValue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,11 +4,10 @@
|
|||
#include "code_801B3C0.h"
|
||||
#include "code_801EE10.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "friend_list.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8099360.h"
|
||||
#include "common_strings.h"
|
||||
#include "event_flag.h"
|
||||
#include "friend_list.h"
|
||||
#include "friend_area_action_menu.h"
|
||||
#include "input.h"
|
||||
#include "iq_skill_menu.h"
|
||||
|
|
@ -19,6 +18,7 @@
|
|||
#include "moves.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "recruited_mon_summary_menu.h"
|
||||
#include "sprite.h"
|
||||
#include "string_format.h"
|
||||
#include "text_1.h"
|
||||
|
|
@ -59,7 +59,7 @@ void sub_8027EB8(void);
|
|||
u32 sub_8027074(void)
|
||||
{
|
||||
ResetSprites(FALSE);
|
||||
sUnknown_203B2BC = MemoryAlloc(sizeof(struct unkStruct_203B2BC), 8);
|
||||
sUnknown_203B2BC = MemoryAlloc(sizeof(struct unkStruct_203B2BC), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B2BC->menuAction1 = 0;
|
||||
sUnknown_203B2BC->menuAction2 = 0;
|
||||
sUnknown_203B2BC->menuAction3 = 0;
|
||||
|
|
@ -183,7 +183,7 @@ void sub_8027274(void)
|
|||
sub_8012D60(&sUnknown_203B2BC->unk7C, sUnknown_203B2BC->menuItems, 0, sUnknown_203B2BC->unk16C, sUnknown_203B2BC->menuAction1, 2);
|
||||
break;
|
||||
case FRIEND_AREA_ACTION_MENU_SUMMARY:
|
||||
sub_8024458(sUnknown_203B2BC->targetPoke, 2);
|
||||
RecruitedMonSummaryMenu_Create(sUnknown_203B2BC->targetPoke, 2);
|
||||
break;
|
||||
case FRIEND_AREA_ACTION_MENU_CHECK_IQ:
|
||||
CreateIQSkillMenu(sUnknown_203B2BC->targetPoke);
|
||||
|
|
@ -478,16 +478,17 @@ void sub_80278B4(void)
|
|||
|
||||
void sub_8027A40(void)
|
||||
{
|
||||
switch(sub_80244E4())
|
||||
{
|
||||
case 2:
|
||||
case 3:
|
||||
sub_802453C();
|
||||
switch (RecruitedMonSummaryMenu_Input()) {
|
||||
case RecruitedMonSummaryMenu_INPUTRET_BACK:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_ACCEPT: {
|
||||
RecruitedMonSummaryMenu_Destroy();
|
||||
SetFriendAreaActionMenuState(FRIEND_AREA_ACTION_MENU_MAIN_2);
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
}
|
||||
case RecruitedMonSummaryMenu_INPUTRET_NONE:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_LEFTRIGHT: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ bool8 FriendList_Init(u32 r5, u32 windowId, DungeonPos *pos, u32 r10)
|
|||
}
|
||||
|
||||
if (sFriendList == NULL) {
|
||||
sFriendList = MemoryAlloc(sizeof(*sFriendList), 8);
|
||||
sFriendList = MemoryAlloc(sizeof(*sFriendList), MEMALLOC_GROUP_8);
|
||||
}
|
||||
|
||||
sFriendList->unk0 = r5;
|
||||
|
|
@ -130,16 +130,16 @@ u32 FriendList_HandleInput(bool8 a0)
|
|||
|
||||
switch (GetKeyPress(&sFriendList->unk358.m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_START_BUTTON:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case INPUT_SELECT_BUTTON:
|
||||
PlayMenuSoundEffect(5);
|
||||
PlayMenuSoundEffect(MENU_SFX_SORT);
|
||||
sFriendList->sortMethod = (sFriendList->sortMethod < 3) ? sFriendList->sortMethod + 1 : 1;
|
||||
sub_8023F8C();
|
||||
SetUpWindowHeader();
|
||||
|
|
|
|||
|
|
@ -1,17 +1,15 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "friend_list_menu.h"
|
||||
#include "constants/dungeon.h"
|
||||
#include "music_util.h"
|
||||
#include "confirm_name_menu.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_801EE10.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "friend_list.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_8099360.h"
|
||||
#include "common_strings.h"
|
||||
#include "confirm_name_menu.h"
|
||||
#include "event_flag.h"
|
||||
#include "friend_list.h"
|
||||
#include "friend_list_menu.h"
|
||||
#include "ground_map.h"
|
||||
#include "input.h"
|
||||
#include "iq_skill_menu.h"
|
||||
|
|
@ -20,8 +18,10 @@
|
|||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
#include "moves.h"
|
||||
#include "music_util.h"
|
||||
#include "pokemon.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "recruited_mon_summary_menu.h"
|
||||
#include "string_format.h"
|
||||
#include "text_1.h"
|
||||
#include "text_2.h"
|
||||
|
|
@ -120,7 +120,7 @@ bool8 CreateFriendListMenu(s32 param_1)
|
|||
return FALSE;
|
||||
}
|
||||
else {
|
||||
gUnknown_203B2B4 = MemoryAlloc(sizeof(unkStruct_203B2B4),8);
|
||||
gUnknown_203B2B4 = MemoryAlloc(sizeof(unkStruct_203B2B4), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B2B4->menuAction1 = 0;
|
||||
gUnknown_203B2B4->unk0 = param_1;
|
||||
gUnknown_203B2B4->unkC = MapIdToFriendAreaId(GetGroundMapID());
|
||||
|
|
@ -259,7 +259,7 @@ static void sub_8025518(void)
|
|||
sub_8012D60(&gUnknown_203B2B4->unk78,gUnknown_203B2B4->unkC8,0,gUnknown_203B2B4->unk108,gUnknown_203B2B4->menuAction1,2);
|
||||
break;
|
||||
case FRIEND_LIST_MENU_STATE_SUMMARY:
|
||||
sub_8024458(gUnknown_203B2B4->species,2);
|
||||
RecruitedMonSummaryMenu_Create(gUnknown_203B2B4->species,2);
|
||||
break;
|
||||
case FRIEND_LIST_MENU_STATE_CHECK_IQ:
|
||||
CreateIQSkillMenu(gUnknown_203B2B4->species);
|
||||
|
|
@ -511,16 +511,17 @@ static void sub_8025A84(void)
|
|||
|
||||
static void sub_8025BCC(void)
|
||||
{
|
||||
switch(sub_80244E4())
|
||||
{
|
||||
case 2:
|
||||
case 3:
|
||||
sub_802453C();
|
||||
switch (RecruitedMonSummaryMenu_Input()) {
|
||||
case RecruitedMonSummaryMenu_INPUTRET_BACK:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_ACCEPT: {
|
||||
RecruitedMonSummaryMenu_Destroy();
|
||||
SetFriendListMenuState(2);
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
}
|
||||
case RecruitedMonSummaryMenu_INPUTRET_NONE:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_LEFTRIGHT: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,22 +4,22 @@
|
|||
#include "constants/monster.h"
|
||||
#include "constants/wonder_mail.h"
|
||||
#include "code_800D090.h"
|
||||
#include "music_util.h"
|
||||
#include "code_801B3C0.h"
|
||||
#include "code_801C8C4.h"
|
||||
#include "friend_list.h"
|
||||
#include "code_8024458.h"
|
||||
#include "code_802F204.h"
|
||||
#include "code_8094F88.h"
|
||||
#include "cpu.h"
|
||||
#include "friend_list.h"
|
||||
#include "friend_rescue.h"
|
||||
#include "input.h"
|
||||
#include "items.h"
|
||||
#include "main_menu1.h"
|
||||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
#include "music_util.h"
|
||||
#include "other_menus2.h"
|
||||
#include "pokemon.h"
|
||||
#include "recruited_mon_summary_menu.h"
|
||||
#include "rescue_password_menu.h"
|
||||
#include "save_write.h"
|
||||
#include "string_format.h"
|
||||
|
|
@ -589,7 +589,7 @@ u32 CreateFriendRescueMenu(void)
|
|||
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
gUnknown_203B33C = MemoryAlloc(sizeof(WonderMailStruct_203B33C), 8);
|
||||
gUnknown_203B33C = MemoryAlloc(sizeof(WonderMailStruct_203B33C), MEMALLOC_GROUP_8);
|
||||
MemoryFill8(gUnknown_203B33C, 0, sizeof(WonderMailStruct_203B33C));
|
||||
gUnknown_203B33C->unk530 = 0;
|
||||
gUnknown_203B33C->unk218 = -1;
|
||||
|
|
@ -965,7 +965,7 @@ void CleanFriendRescueMenu(void)
|
|||
sub_801CBB8();
|
||||
sub_802F2C0();
|
||||
sub_8030DE4();
|
||||
sub_802453C();
|
||||
RecruitedMonSummaryMenu_Destroy();
|
||||
FreeItemDescriptionWindow();
|
||||
}
|
||||
}
|
||||
|
|
@ -2150,7 +2150,7 @@ void sub_803418C(void)
|
|||
RestoreSavedWindows(&gUnknown_203B33C->unk3BC);
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
sub_8024458(gUnknown_203B33C->speciesNum, 0);
|
||||
RecruitedMonSummaryMenu_Create(gUnknown_203B33C->speciesNum, 0);
|
||||
SetFriendRescueMenuState(0x28);
|
||||
break;
|
||||
}
|
||||
|
|
@ -2175,7 +2175,7 @@ void sub_8034254(void)
|
|||
RestoreSavedWindows(&gUnknown_203B33C->unk3BC);
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
sub_8024458(gUnknown_203B33C->speciesNum, 0);
|
||||
RecruitedMonSummaryMenu_Create(gUnknown_203B33C->speciesNum, 0);
|
||||
SetFriendRescueMenuState(0x28);
|
||||
break;
|
||||
case 5:
|
||||
|
|
@ -2189,14 +2189,14 @@ void sub_8034254(void)
|
|||
|
||||
void sub_8034310(void)
|
||||
{
|
||||
switch(sub_80244E4())
|
||||
{
|
||||
case 1:
|
||||
sub_802452C();
|
||||
switch (RecruitedMonSummaryMenu_Input()) {
|
||||
case RecruitedMonSummaryMenu_INPUTRET_LEFTRIGHT: {
|
||||
RecruitedMonSummaryMenu_SetupAndShowWindows();
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
sub_802453C();
|
||||
}
|
||||
case RecruitedMonSummaryMenu_INPUTRET_BACK:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_ACCEPT: {
|
||||
RecruitedMonSummaryMenu_Destroy();
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(&gUnknown_203B33C->unk3BC, TRUE, TRUE);
|
||||
sub_8023B7C(1);
|
||||
|
|
@ -2208,8 +2208,10 @@ void sub_8034310(void)
|
|||
else
|
||||
SetFriendRescueMenuState(gUnknown_203B33C->fallbackState);
|
||||
break;
|
||||
default:
|
||||
}
|
||||
default: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@ void GroundBg_Init(GroundBg *groundBg, const SubStruct_52C *a1)
|
|||
s32 i;
|
||||
|
||||
groundBg->unk52C = *a1;
|
||||
groundBg->tileMappings = MemoryAlloc(groundBg->unk52C.unk8 * 18, 6);
|
||||
groundBg->tileMappings = MemoryAlloc(groundBg->unk52C.unk8 * 18, MEMALLOC_GROUP_6);
|
||||
for (id = 0; id < groundBg->unk52C.numLayers; id++) {
|
||||
groundBg->bgTilemaps[id] = &gBgTilemaps[2 + groundBg->unk52C.unkA + id][0][0];
|
||||
groundBg->chunkMappings[id] = MemoryAlloc(groundBg->unk52C.unk10 * 128, 6);
|
||||
groundBg->chunkMappings[id] = MemoryAlloc(groundBg->unk52C.unk10 * 128, MEMALLOC_GROUP_6);
|
||||
}
|
||||
for (; id < NUM_LAYERS; id++) {
|
||||
groundBg->bgTilemaps[id] = NULL;
|
||||
|
|
@ -54,7 +54,7 @@ void GroundBg_Init(GroundBg *groundBg, const SubStruct_52C *a1)
|
|||
}
|
||||
|
||||
if (groundBg->unk52C.unk14 != NULL) {
|
||||
groundBg->unk544 = MemoryAlloc(groundBg->unk52C.unkE * 256, 6);
|
||||
groundBg->unk544 = MemoryAlloc(groundBg->unk52C.unkE * 256, MEMALLOC_GROUP_6);
|
||||
}
|
||||
else {
|
||||
groundBg->unk544 = NULL;
|
||||
|
|
@ -132,7 +132,7 @@ void sub_80A2D88(GroundBg *groundBg)
|
|||
{
|
||||
if (groundBg->unk52C.unk14 != NULL) {
|
||||
BmaHeader *bmaHeader = &groundBg->bmaHeader;
|
||||
groundBg->unk544 = MemoryAlloc(groundBg->unk52C.unkE * 256, 6);
|
||||
groundBg->unk544 = MemoryAlloc(groundBg->unk52C.unkE * 256, MEMALLOC_GROUP_6);
|
||||
groundBg->unk52C.unk14(groundBg->unk544, groundBg->decompressedBMAData, bmaHeader, groundBg->unk52C.unkE);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ void AllocGroundEffects(void)
|
|||
s32 index;
|
||||
GroundEffect* current;
|
||||
|
||||
gGroundEffects = MemoryAlloc(NUM_GROUND_EFFECTS * sizeof(GroundEffect), 6);
|
||||
gGroundEffects = MemoryAlloc(NUM_GROUND_EFFECTS * sizeof(GroundEffect), MEMALLOC_GROUP_6);
|
||||
current = gGroundEffects;
|
||||
for (index = 0; index < NUM_GROUND_EFFECTS; index = (s16) (index + 0x1), current++) {
|
||||
current->kind = -1;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#include "memory.h"
|
||||
#include "ground_script_file.h"
|
||||
|
||||
#define NUM_GROUND_EVENTS 32
|
||||
|
||||
typedef struct GroundEvent
|
||||
{
|
||||
s16 unk0;
|
||||
|
|
@ -26,14 +28,14 @@ static void GroundEvent_Delete(s32 id);
|
|||
|
||||
void AllocGroundEvents(void)
|
||||
{
|
||||
s32 ind;
|
||||
s32 i;
|
||||
GroundEvent *ptr;
|
||||
gGroundEvents = MemoryAlloc(sizeof(GroundEvent) * 0x20, 0x6);
|
||||
gGroundEvents = MemoryAlloc(sizeof(GroundEvent) * NUM_GROUND_EVENTS, MEMALLOC_GROUP_6);
|
||||
|
||||
for(ind = 0, ptr = &gGroundEvents[ind]; ind < 0x20; ind = (s16)(ind + 1), ptr++)
|
||||
{
|
||||
for (i = 0, ptr = &gGroundEvents[i]; i < NUM_GROUND_EVENTS; i = (s16)(i + 1), ptr++) {
|
||||
ptr->unk2 |= -1;
|
||||
}
|
||||
|
||||
DeleteGroundEvents();
|
||||
}
|
||||
|
||||
|
|
@ -43,7 +45,7 @@ void DeleteGroundEvents(void)
|
|||
GroundEvent* current;
|
||||
|
||||
current = &gGroundEvents[0];
|
||||
for (v1 = 0; v1 < 0x20; v1 = (s16) (v1 + 0x1), current++) {
|
||||
for (v1 = 0; v1 < NUM_GROUND_EVENTS; v1 = (s16) (v1 + 0x1), current++) {
|
||||
if(current->unk2 != -1)
|
||||
GroundEvent_Delete(v1);
|
||||
}
|
||||
|
|
@ -56,15 +58,6 @@ void FreeGroundEvents(void)
|
|||
gGroundEvents = NULL;
|
||||
}
|
||||
|
||||
ALIGNED(4) static const char sFileName[] = "../ground/ground_event.c";
|
||||
ALIGNED(4) static const char sFuncName[] = "GroundEvent_Select";
|
||||
|
||||
static const DebugLocation sGroundEvent_DebugLoc = {
|
||||
.file = sFileName,
|
||||
.line = 160, // Nice, the line here is 63...
|
||||
.func = sFuncName,
|
||||
};
|
||||
|
||||
void GroundEvent_Select(s32 scriptID, s32 group, s32 sector)
|
||||
{
|
||||
const struct GroundScriptHeader *scriptPtr;
|
||||
|
|
@ -81,17 +74,18 @@ void GroundEvent_Select(s32 scriptID, s32 group, s32 sector)
|
|||
scriptID_s32 = (s16)scriptID;
|
||||
group_s32 = (s16)group;
|
||||
sector_s32 = (s8)sector;
|
||||
scriptPtr = GetGroundScript(scriptID_s32, &sGroundEvent_DebugLoc);
|
||||
Log('\0',"GroundEvent Select %3d %3d %3d", scriptID_s32, group_s32, sector_s32);
|
||||
scriptPtr = GetGroundScript(scriptID_s32, DEBUG_LOC_PTR("../ground/ground_event.c", 160, "GroundEvent_Select"));
|
||||
|
||||
Log(0, "GroundEvent Select %3d %3d %3d",
|
||||
scriptID_s32, group_s32, sector_s32);
|
||||
|
||||
groupPtr = &scriptPtr->groups[group_s32];
|
||||
sectorPtr = &groupPtr->sectors[sector_s32];
|
||||
eventData = sectorPtr->events;
|
||||
|
||||
size = sectorPtr->nEvents;
|
||||
for (i = 0; i < size; i++, eventData++)
|
||||
{
|
||||
GroundEvent_Add(-1,eventData,group_s32,sector_s32);
|
||||
for (i = 0; i < size; i++, eventData++) {
|
||||
GroundEvent_Add(-1, eventData, group_s32, sector_s32);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -103,13 +97,14 @@ void GroundEvent_Cancel(s32 scriptID, s32 sector)
|
|||
s32 scriptID_s32;
|
||||
|
||||
scriptID_s32 = (s16)scriptID;
|
||||
sector_s32 = (s8) sector;
|
||||
sector_s32 = (s8)sector;
|
||||
|
||||
Log('\0',"GroundEvent Cancel %3d %3d", scriptID_s32, sector_s32);
|
||||
Log(0, "GroundEvent Cancel %3d %3d",
|
||||
scriptID_s32, sector_s32);
|
||||
|
||||
index = 0;
|
||||
ptr = &gGroundEvents[0];
|
||||
for(; index < 0x20; index = (s16)(index + 1), ptr++)
|
||||
for(; index < NUM_GROUND_EVENTS; index = (s16)(index + 1), ptr++)
|
||||
{
|
||||
if((ptr->unk2 != -1) && (ptr->unk4 == scriptID_s32))
|
||||
if(sector_s32 < 0 || ptr->unk6 == sector_s32)
|
||||
|
|
@ -134,7 +129,7 @@ static s32 GroundEvent_Add(s32 id, const GroundEventData *eventData, s32 group,
|
|||
|
||||
if (scriptID_s32 < 0) {
|
||||
ptr = &gGroundEvents[0];
|
||||
for (i = 0; i < 0x20; i = (s16)(i + 1), ptr++) {
|
||||
for (i = 0; i < NUM_GROUND_EVENTS; i = (s16)(i + 1), ptr++) {
|
||||
if (ptr->unk2 == -1) {
|
||||
scriptID_s32 = i;
|
||||
break;
|
||||
|
|
@ -148,7 +143,8 @@ static s32 GroundEvent_Add(s32 id, const GroundEventData *eventData, s32 group,
|
|||
ptr = &gGroundEvents[scriptID_s32];
|
||||
}
|
||||
|
||||
Log(0, "GroundEvent Add id %3d kind %3d group %3d sector %3d script %p\0", scriptID_s32, script->id, group_s32, sector_s32, eventData->script->script);
|
||||
Log(0, "GroundEvent Add id %3d kind %3d group %3d sector %3d script %p\0",
|
||||
scriptID_s32, script->id, group_s32, sector_s32, eventData->script->script);
|
||||
|
||||
ptr->unk0 = scriptID_s32;
|
||||
ptr->unk2 = script->id;
|
||||
|
|
@ -182,9 +178,10 @@ static s32 GroundEvent_Add(s32 id, const GroundEventData *eventData, s32 group,
|
|||
|
||||
static void GroundEvent_Delete(s32 id)
|
||||
{
|
||||
s32 scriptID_s32 = (s16) id;
|
||||
s32 scriptID_s32 = (s16)id;
|
||||
GroundEvent *ptr = &gGroundEvents[scriptID_s32];
|
||||
Log(0, "GroundEvent Delete id %3d\0", scriptID_s32);
|
||||
Log(0, "GroundEvent Delete id %3d\0",
|
||||
scriptID_s32);
|
||||
ptr->unk2 = -1;
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +206,7 @@ s16 FindGroundEvent(u32 flags, PixelPos *arg1, PixelPos *arg2)
|
|||
{
|
||||
s32 i;
|
||||
GroundEvent *ptr = &gGroundEvents[0];
|
||||
for (i = 0; i < 0x20; i = (s16)(i + 1), ptr++) {
|
||||
for (i = 0; i < NUM_GROUND_EVENTS; i = (s16)(i + 1), ptr++) {
|
||||
if (ptr->unk2 != -1
|
||||
&& (ptr->unk8 & flags)
|
||||
&& ptr->unkC.x < arg2->x
|
||||
|
|
@ -228,7 +225,7 @@ UNUSED static s16 UnusedFindGroundEvent(u32 flags, PixelPos *arg1, PixelPos *arg
|
|||
{
|
||||
s32 i;
|
||||
GroundEvent *ptr = &gGroundEvents[0];
|
||||
for (i = 0; i < 0x20; i = (s16)(i + 1), ptr++) {
|
||||
for (i = 0; i < NUM_GROUND_EVENTS; i = (s16)(i + 1), ptr++) {
|
||||
if (ptr->unk2 != -1 && (ptr->unk8 & flags)) {
|
||||
PixelPos resultPos = {0};
|
||||
resultPos.x = (ptr->unkC.x + ptr->unk14.x) / 2;
|
||||
|
|
@ -246,4 +243,6 @@ UNUSED static s16 UnusedFindGroundEvent(u32 flags, PixelPos *arg1, PixelPos *arg
|
|||
return -1;
|
||||
}
|
||||
|
||||
void nullsub_124(void) {}
|
||||
void nullsub_124(void)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -200,8 +200,8 @@ void AllocGroundLives(void)
|
|||
s32 index;
|
||||
struct GroundLive *ptr;
|
||||
|
||||
gGroundLivesMeta = MemoryAlloc(sizeof(*gGroundLivesMeta),6);
|
||||
gGroundLives = MemoryAlloc(sizeof(*gGroundLives),6);
|
||||
gGroundLivesMeta = MemoryAlloc(sizeof(*gGroundLivesMeta), MEMALLOC_GROUP_6);
|
||||
gGroundLives = MemoryAlloc(sizeof(*gGroundLives), MEMALLOC_GROUP_6);
|
||||
|
||||
for (index = 0, ptr = &gGroundLives->array[index]; index < UNK_3001B84_ARR_COUNT; index = (s16)(index + 1), ptr++) {
|
||||
ptr->unk2 = -1;
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ static EWRAM_DATA s32 sUnknown_20398AC = { 0 };
|
|||
static EWRAM_DATA u32 sUnknown_20398B0 = { 0 };
|
||||
static EWRAM_DATA u32 sUnknown_20398B4 = { STARTMODE_NEW_GAME }; // See enum "StartModeVal"
|
||||
static EWRAM_DATA bool8 sUnknown_20398B8 = { FALSE };
|
||||
static EWRAM_DATA bool8 sUnknown_20398B9 = { FALSE };
|
||||
static EWRAM_DATA bool8 sUnknown_20398B9 = { FALSE }; // Music-related
|
||||
static EWRAM_DATA bool8 sScriptMode = { FALSE };
|
||||
UNUSED static EWRAM_DATA u8 sUnused1 = { 0 };
|
||||
static EWRAM_DATA u16 sUnknown_20398BC = { MAP_SQUARE }; // See enum "GroundMapID". Set but never read
|
||||
|
|
@ -72,7 +72,7 @@ static EWRAM_DATA u8 sUnknown_2039950 = 0; // Related to DUNGEON_ENTER_INDEX
|
|||
static EWRAM_INIT bool8 sUnknown_203B49C = { FALSE };
|
||||
static EWRAM_INIT bool8 sUnknown_203B49D = { FALSE };
|
||||
|
||||
static s16 sub_8098FCC(u32 unused);
|
||||
static s16 GetReturnMap(u32 unusedStartMode);
|
||||
|
||||
UNUSED static const u8 sUnusedConstData[154] = {
|
||||
0, 0, 0, 0,
|
||||
|
|
@ -116,7 +116,7 @@ UNUSED static const u8 sUnusedConstData[154] = {
|
|||
0, 0
|
||||
};
|
||||
|
||||
u32 xxx_script_related_8098468(s32 startMode)
|
||||
u32 xxx_script_related_8098468_Async(s32 startMode)
|
||||
{
|
||||
s32 scriptID;
|
||||
s32 varE;
|
||||
|
|
@ -225,7 +225,7 @@ u32 xxx_script_related_8098468(s32 startMode)
|
|||
UpdateScriptVarWithImmediate(0,DUNGEON_ENTER_FREQUENCY,1,2);
|
||||
scriptVar13 = (s16)GetScriptVarValue(NULL,DUNGEON_ENTER);
|
||||
if (scriptVar13 != -1) {
|
||||
s32 var;
|
||||
s32 returnMapID;
|
||||
const DungeonInfo *dungInfo;
|
||||
if (scriptVar13 == 81) {
|
||||
dungInfo = GetScriptDungeonInfo((s16)GetScriptVarValue(NULL,DUNGEON_ENTER_INDEX));
|
||||
|
|
@ -237,9 +237,9 @@ u32 xxx_script_related_8098468(s32 startMode)
|
|||
if (sUnknown_20398B4 == STARTMODE_DUNGEON_WON) {
|
||||
SetScriptVarArrayValue(NULL,DUNGEON_CLEAR_LIST,(u16) scriptVar13,1);
|
||||
}
|
||||
var = sub_8098FCC(sUnknown_20398B4);
|
||||
if (var != -1) {
|
||||
sUnknown_20398BE = var;
|
||||
returnMapID = GetReturnMap(sUnknown_20398B4);
|
||||
if (returnMapID != -1) {
|
||||
sUnknown_20398BE = returnMapID;
|
||||
sUnknown_20398C0 = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -340,7 +340,7 @@ u32 xxx_script_related_8098468(s32 startMode)
|
|||
GroundObject_Action();
|
||||
GroundEffect_Action();
|
||||
nullsub_105();
|
||||
sub_809B474();
|
||||
sub_809B474_Async();
|
||||
GroundScript_Unlock();
|
||||
sub_809D25C();
|
||||
sub_80A59DC();
|
||||
|
|
@ -454,7 +454,7 @@ u32 xxx_script_related_8098468(s32 startMode)
|
|||
|
||||
UNUSED static void sub_8098BDC(void)
|
||||
{
|
||||
sub_809B57C();
|
||||
sub_809B57C_Async();
|
||||
GroundScript_Unlock();
|
||||
sub_809D25C();
|
||||
sub_80A59DC();
|
||||
|
|
@ -539,7 +539,7 @@ void sub_8098CC8(void)
|
|||
// r0: enum "GroundMapID"
|
||||
bool8 GroundMainGroundRequest(s32 r0, s32 r1, s32 r2)
|
||||
{
|
||||
s32 temp = (s16) r0; // force a asr shift
|
||||
s32 temp = (s16)r0;
|
||||
|
||||
if (sUnknown_20398A8 == Unk_20398A8_UNK0) {
|
||||
Log(0, "GroundMain ground request %3d %3d", temp, r2);
|
||||
|
|
@ -684,7 +684,7 @@ const char *GetCurrentGroundPlaceName(void)
|
|||
}
|
||||
|
||||
// Returns an enum GroundMapID
|
||||
static s16 sub_8098FCC(u32 unused)
|
||||
static s16 GetReturnMap(u32 unusedStartMode)
|
||||
{
|
||||
s32 scriptDungeon;
|
||||
s32 scriptDungeon__;
|
||||
|
|
@ -728,7 +728,7 @@ static s16 sub_8098FCC(u32 unused)
|
|||
|
||||
UNUSED static const char *sub_80990B8(void)
|
||||
{
|
||||
s16 index = sub_8098FCC(11);
|
||||
s16 index = GetReturnMap(STARTMODE_11);
|
||||
if (index != -1) {
|
||||
return GetGroundPlaceName(gGroundMapConversionTable[index].groundPlaceId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ static const struct MapToDungeonStruct sMapToDungeonTable[] = {
|
|||
|
||||
void AllocGroundMapAction(void)
|
||||
{
|
||||
gGroundMapAction = MemoryAlloc(sizeof(GroundMapAction), 6);
|
||||
gGroundMapAction = MemoryAlloc(sizeof(GroundMapAction), MEMALLOC_GROUP_6);
|
||||
gGroundMapAction->groundMapId = -1;
|
||||
InitActionWithParams(&gGroundMapAction->action, &sGroundScriptNullCallbacks, 0, -1, -1);
|
||||
sub_80A5E8C(0);
|
||||
|
|
@ -394,7 +394,7 @@ void GroundMap_Select(s32 mapId_)
|
|||
GroundBg_FreeAll(gGroundMapDungeon_3001B70);
|
||||
FREE_AND_SET_NULL(gGroundMapDungeon_3001B70);
|
||||
}
|
||||
gGroundMapDungeon_3001B70 = MemoryAlloc(sizeof(*gGroundMapDungeon_3001B70),6);
|
||||
gGroundMapDungeon_3001B70 = MemoryAlloc(sizeof(*gGroundMapDungeon_3001B70), MEMALLOC_GROUP_6);
|
||||
gGroundMapAction->groundMapId = mapId;
|
||||
if (mapId == -1) {
|
||||
GroundBg_Init(gGroundMapDungeon_3001B70, &gUnknown_8117324);
|
||||
|
|
@ -508,7 +508,7 @@ void GroundMap_SelectDungeon(s32 mapId_, const DungeonLocation *loc, u32 param_2
|
|||
FREE_AND_SET_NULL(gGroundMapDungeon_3001B70);
|
||||
}
|
||||
|
||||
gGroundMapDungeon_3001B70 = MemoryAlloc(sizeof(*gGroundMapDungeon_3001B70),6);
|
||||
gGroundMapDungeon_3001B70 = MemoryAlloc(sizeof(*gGroundMapDungeon_3001B70), MEMALLOC_GROUP_6);
|
||||
gGroundMapAction->groundMapId = mapId;
|
||||
if (mapId == -1 || loc->id == DUNGEON_INVALID) {
|
||||
GroundBg_Init(gGroundMapDungeon_3001B70, &gUnknown_8117324);
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ void AllocGroundObjects(void)
|
|||
GroundObject *ptr;
|
||||
s32 index;
|
||||
|
||||
gGroundObjects = MemoryAlloc(sizeof(GroundObject) * NUM_GROUND_OBJECTS, 6);
|
||||
gGroundObjects = MemoryAlloc(sizeof(GroundObject) * NUM_GROUND_OBJECTS, MEMALLOC_GROUP_6);
|
||||
|
||||
for (index = 0, ptr = &gGroundObjects[index]; index < NUM_GROUND_OBJECTS; index = (s16)(index + 1), ptr++) {
|
||||
ptr->kind = -1;
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@
|
|||
static EWRAM_DATA s16 gCurrentMap = 0;
|
||||
static EWRAM_DATA s16 gUnknown_2039A32 = 0; // See enum "GroundMapID"
|
||||
static EWRAM_DATA s16 gUnknown_2039A34 = 0; // See enum "GroundMapID"
|
||||
static EWRAM_DATA u8 gAnyScriptLocked = 0;
|
||||
static EWRAM_DATA bool8 gAnyScriptLocked = FALSE;
|
||||
// Hard to say why the arrays are larger than SCRIPT_LOCKS_ARR_COUNT. Could be unused EWRAM variables or special case indexes.
|
||||
static ALIGNED(4) EWRAM_DATA u8 gScriptLocks[SCRIPT_LOCKS_ARR_COUNT + 7] = { 0 };
|
||||
static ALIGNED(4) EWRAM_DATA u8 gScriptLockConds[SCRIPT_LOCKS_ARR_COUNT + 7] = { 0 };
|
||||
static ALIGNED(4) EWRAM_DATA bool8 gScriptLocks[SCRIPT_LOCKS_ARR_COUNT + 7] = { FALSE };
|
||||
static ALIGNED(4) EWRAM_DATA bool8 gScriptLockConds[SCRIPT_LOCKS_ARR_COUNT + 7] = { FALSE };
|
||||
static EWRAM_DATA u32 gUnlockBranchLabels[SCRIPT_LOCKS_ARR_COUNT + 1] = { 0 };
|
||||
static EWRAM_DATA MenuItem gChoices[9] = { 0 };
|
||||
static EWRAM_DATA u8 sPokeNameBuffer[POKEMON_NAME_LENGTH + 2] = { 0 };
|
||||
|
|
@ -115,6 +115,7 @@ static const ScriptCommand gUnknown_81164E4[] = {
|
|||
|
||||
static s32 ExecuteScriptCommand(Action *action);
|
||||
static const ScriptCommand *FindLabel(Action *action, s32 labelNum);
|
||||
static u32 GroundScriptModifyBGM(u16 bgm);
|
||||
static const ScriptCommand *ResolveJump(Action *action, s32 r1);
|
||||
|
||||
static s32 sub_80A14E8(Action *action, u8 idx, u32 r2, s32 r3);
|
||||
|
|
@ -123,12 +124,11 @@ static void sub_80A252C(s32 param_1, ActionUnkIds *param_2);
|
|||
static void sub_80A2558(s32 param_1, ActionUnkIds *param_2);
|
||||
static void sub_80A2584(s16 r0, s16 r1);
|
||||
static void sub_80A2598(s16 r0, s16 r1);
|
||||
static u32 sub_80A25AC(u16 param_1);
|
||||
|
||||
void sub_809D490(void)
|
||||
{
|
||||
UNUSED void *oldPtr = gUnknown_203B4B0; // Needed to match
|
||||
gUnknown_203B4B0 = MemoryAlloc(BUF_LEN, 6);
|
||||
gUnknown_203B4B0 = MemoryAlloc(BUF_LEN, MEMALLOC_GROUP_6);
|
||||
sub_809D4B0();
|
||||
}
|
||||
|
||||
|
|
@ -139,10 +139,10 @@ void sub_809D4B0(void)
|
|||
gCurrentMap = -1;
|
||||
gUnknown_2039A32 = -1;
|
||||
gUnknown_2039A34 = -1;
|
||||
gAnyScriptLocked = 0;
|
||||
gAnyScriptLocked = FALSE;
|
||||
for (i = 0; i < SCRIPT_LOCKS_ARR_COUNT; i++) {
|
||||
gScriptLocks[i] = 0;
|
||||
gScriptLockConds[i] = 0;
|
||||
gScriptLocks[i] = FALSE;
|
||||
gScriptLockConds[i] = FALSE;
|
||||
gUnlockBranchLabels[i] = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -410,7 +410,7 @@ static bool8 GroundScriptCheckLockCondition(Action *param_1, s16 param_2)
|
|||
else {
|
||||
param_1->scriptData.unk22 = param_2_s32;
|
||||
param_1->scriptData.savedState = ESC_RET_02;
|
||||
gAnyScriptLocked = 1;
|
||||
gAnyScriptLocked = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
|
@ -453,20 +453,20 @@ bool8 GroundScriptNotify(Action *param_1, s32 param_2)
|
|||
return ret;
|
||||
}
|
||||
|
||||
void GroundScriptLockJumpZero(s16 index)
|
||||
void GroundScriptLockJumpZero(s32 index)
|
||||
{
|
||||
s32 index_s16 = index;
|
||||
gScriptLocks[index_s16] = 1;
|
||||
gUnlockBranchLabels[index_s16] = 0;
|
||||
gAnyScriptLocked = 1;
|
||||
s32 index_ = (s16)index;
|
||||
gScriptLocks[index_] = TRUE;
|
||||
gUnlockBranchLabels[index_] = 0;
|
||||
gAnyScriptLocked = TRUE;
|
||||
}
|
||||
|
||||
void GroundScriptLock(s16 index, s32 r1)
|
||||
void GroundScriptLock(s32 index, s32 unlockVal)
|
||||
{
|
||||
s32 index_s16 = index;
|
||||
gScriptLocks[index_s16] = 1;
|
||||
gUnlockBranchLabels[index_s16] = r1;
|
||||
gAnyScriptLocked = 1;
|
||||
s32 index_ = (s16)index;
|
||||
gScriptLocks[index_] = TRUE;
|
||||
gUnlockBranchLabels[index_] = unlockVal;
|
||||
gAnyScriptLocked = TRUE;
|
||||
}
|
||||
|
||||
static bool8 GroundScriptLockCond(Action *param_1, s16 index, s32 param_3)
|
||||
|
|
@ -481,11 +481,11 @@ static bool8 GroundScriptLockCond(Action *param_1, s16 index, s32 param_3)
|
|||
}
|
||||
else {
|
||||
param_1->scriptData.unk22 = index_s32 | 0x80;
|
||||
gScriptLocks[index_s32] = 1;
|
||||
gScriptLockConds[index_s32] = 1;
|
||||
gScriptLocks[index_s32] = TRUE;
|
||||
gScriptLockConds[index_s32] = TRUE;
|
||||
}
|
||||
param_1->scriptData.savedState = ESC_RET_02;
|
||||
gAnyScriptLocked = 1;
|
||||
gAnyScriptLocked = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
@ -2183,8 +2183,8 @@ static s32 ExecuteScriptCommand(Action *action)
|
|||
break;
|
||||
}
|
||||
case CMD_BYTE_44: {
|
||||
u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1;
|
||||
if (id != 999)
|
||||
u16 id = curCmd.argByte == 0 ? GroundScriptModifyBGM((u16)curCmd.arg1) : curCmd.arg1;
|
||||
if (id != STOP_BGM)
|
||||
StartNewBGM_(id);
|
||||
else
|
||||
StopBGMusic();
|
||||
|
|
@ -2192,8 +2192,8 @@ static s32 ExecuteScriptCommand(Action *action)
|
|||
break;
|
||||
}
|
||||
case CMD_BYTE_45: {
|
||||
u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1;
|
||||
if (id != 999)
|
||||
u16 id = curCmd.argByte == 0 ? GroundScriptModifyBGM((u16)curCmd.arg1) : curCmd.arg1;
|
||||
if (id != STOP_BGM)
|
||||
FadeInNewBGM_(id, curCmd.argShort);
|
||||
else
|
||||
StopBGMusic();
|
||||
|
|
@ -2201,8 +2201,8 @@ static s32 ExecuteScriptCommand(Action *action)
|
|||
break;
|
||||
}
|
||||
case CMD_BYTE_46: {
|
||||
u16 id = curCmd.argByte == 0 ? sub_80A25AC((u16)curCmd.arg1) : curCmd.arg1;
|
||||
if (id != 999)
|
||||
u16 id = curCmd.argByte == 0 ? GroundScriptModifyBGM((u16)curCmd.arg1) : curCmd.arg1;
|
||||
if (id != STOP_BGM)
|
||||
QueueBGM_((u16)id);
|
||||
|
||||
break;
|
||||
|
|
@ -4132,29 +4132,32 @@ void GroundScript_Unlock(void)
|
|||
s32 index;
|
||||
bool8 cond;
|
||||
|
||||
if (gAnyScriptLocked == 0) return;
|
||||
if (!gAnyScriptLocked)
|
||||
return;
|
||||
|
||||
gAnyScriptLocked = 0;
|
||||
gAnyScriptLocked = FALSE;
|
||||
index = 0;
|
||||
for (index = 0; index < SCRIPT_LOCKS_ARR_COUNT; index++) {
|
||||
if (gScriptLocks[index] != 0) {
|
||||
Log(1, "GroundScript unlock %3d", index);
|
||||
if (gScriptLocks[index]) {
|
||||
Log(1, "GroundScript unlock %3d",
|
||||
index);
|
||||
cond = GroundMapNotifyAll((s16) index);
|
||||
cond |= GroundLivesNotifyAll((s16) index);
|
||||
cond |= GroundObjectsNotifyAll((s16) index);
|
||||
cond |= GroundEffectsNotifyAll((s16) index);
|
||||
|
||||
if (gScriptLockConds[index] != 0) {
|
||||
if (gScriptLockConds[index]) {
|
||||
if (cond) {
|
||||
GroundMapNotifyAll((s16) (index | 0x80));
|
||||
GroundLivesNotifyAll((s16) (index | 0x80));
|
||||
GroundObjectsNotifyAll((s16) (index | 0x80));
|
||||
GroundEffectsNotifyAll((s16) (index | 0x80));
|
||||
gScriptLocks[index] = gScriptLockConds[index] = 0;
|
||||
gScriptLockConds[index] = FALSE;
|
||||
gScriptLocks[index] = FALSE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
gScriptLocks[index] = 0;
|
||||
gScriptLocks[index] = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -4255,18 +4258,18 @@ static void sub_80A2598(s16 r0, s16 r1)
|
|||
sub_809AC18(iVar1, iVar2);
|
||||
}
|
||||
|
||||
static u32 sub_80A25AC(u16 param_1)
|
||||
static u32 GroundScriptModifyBGM(u16 bgm)
|
||||
{
|
||||
if (sub_8098F88())
|
||||
return param_1;
|
||||
if (param_1 == 50)
|
||||
return 50;
|
||||
return bgm;
|
||||
if (bgm == MUS_BLANK_50)
|
||||
return MUS_BLANK_50;
|
||||
if (!CheckQuest(QUEST_UNK12))
|
||||
return 999;
|
||||
return STOP_BGM;
|
||||
if (CheckQuest(QUEST_IN_WORLD_CALAMITY))
|
||||
return 19;
|
||||
if (param_1 != 1)
|
||||
return param_1;
|
||||
return MUS_WORLD_CALAMITY;
|
||||
if (bgm != 1)
|
||||
return bgm;
|
||||
GetScriptVarValue(NULL, BASE_LEVEL); // wut???
|
||||
return 1;
|
||||
return MUS_RESCUE_TEAM_BASE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ void sub_80A62F0(void)
|
|||
unkStruct_3001B7C_sub108 *sub108;
|
||||
s32 r6;
|
||||
|
||||
gUnknown_3001B7C = MemoryAlloc(sizeof(unkStruct_3001B7C), 6);
|
||||
gUnknown_3001B7C = MemoryAlloc(sizeof(unkStruct_3001B7C), MEMALLOC_GROUP_6);
|
||||
gUnknown_203B4B4 = OpenFileAndGetFileDataPtr("etcfonta", &gDungeonFileArchive);
|
||||
|
||||
sub_800DAC0(1);
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static const SubStruct_52C gUnknown_8117784 = {
|
|||
|
||||
void sub_80A5E8C(bool8 param_1)
|
||||
{
|
||||
gUnknown_3001B74 = MemoryAlloc(sizeof(unkStruct_3001B74), 6);
|
||||
gUnknown_3001B74 = MemoryAlloc(sizeof(unkStruct_3001B74), MEMALLOC_GROUP_6);
|
||||
gUnknown_3001B74->unk0 = -1;
|
||||
gUnknown_3001B74->unk2 = 0;
|
||||
sub_80A5EDC(param_1);
|
||||
|
|
@ -67,7 +67,7 @@ void sub_80A5EDC(bool8 param_1)
|
|||
}
|
||||
|
||||
if (param_1) {
|
||||
gUnknown_3001B78 = MemoryAlloc(sizeof(GroundBg), 6);
|
||||
gUnknown_3001B78 = MemoryAlloc(sizeof(GroundBg), MEMALLOC_GROUP_6);
|
||||
GroundBg_Init(gUnknown_3001B78, &gUnknown_8117784);
|
||||
sub_80A2FBC(gUnknown_3001B78, -1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ bool8 CreateGulpinShop(u32 mode, s16 pokeSpecies, Move *moves)
|
|||
|
||||
species_32 = pokeSpecies; // dumb cast needed to get lsr/asr combo
|
||||
|
||||
sGulpinShopWork = MemoryAlloc(sizeof(GulpinShopWork), 8);
|
||||
sGulpinShopWork = MemoryAlloc(sizeof(GulpinShopWork), MEMALLOC_GROUP_8);
|
||||
sGulpinShopWork->mode = mode;
|
||||
sGulpinShopWork->speciesNum = species_32;
|
||||
sGulpinShopWork->moves = moves;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,10 @@
|
|||
#include "global.h"
|
||||
#include "globaldata.h"
|
||||
#include "music_util.h"
|
||||
#include "code_801EE10.h"
|
||||
#include "code_801EE10_mid.h"
|
||||
#include "friend_list.h"
|
||||
#include "code_8024458.h"
|
||||
#include "common_strings.h"
|
||||
#include "felicity_bank.h"
|
||||
#include "friend_list.h"
|
||||
#include "gulpin_shop.h"
|
||||
#include "gulpin_shop_801FB50.h"
|
||||
#include "input.h"
|
||||
|
|
@ -14,8 +12,10 @@
|
|||
#include "memory.h"
|
||||
#include "menu_input.h"
|
||||
#include "moves.h"
|
||||
#include "music_util.h"
|
||||
#include "pokemon_3.h"
|
||||
#include "pokemon.h"
|
||||
#include "recruited_mon_summary_menu.h"
|
||||
#include "string_format.h"
|
||||
#include "text_1.h"
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ bool8 sub_801FB50(u32 mode)
|
|||
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
gUnknown_203B27C = MemoryAlloc(sizeof(unkStruct_203B27C), 0x8);
|
||||
gUnknown_203B27C = MemoryAlloc(sizeof(unkStruct_203B27C), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B27C->menuAction2 = 0;
|
||||
gUnknown_203B27C->menuAction3 = 0;
|
||||
gUnknown_203B27C->menuAction4 = 0;
|
||||
|
|
@ -315,7 +315,7 @@ static void sub_801FF28(void)
|
|||
sub_8012D60(&gUnknown_203B27C->unkCC,gUnknown_203B27C->unk7C,0,gUnknown_203B27C->unkBC,gUnknown_203B27C->menuAction2,2);
|
||||
break;
|
||||
case 0x12:
|
||||
sub_8024458(gUnknown_203B27C->speciesNum,2);
|
||||
RecruitedMonSummaryMenu_Create(gUnknown_203B27C->speciesNum,2);
|
||||
break;
|
||||
case 0x13:
|
||||
CreateIQSkillMenu(gUnknown_203B27C->speciesNum);
|
||||
|
|
@ -754,16 +754,17 @@ static void sub_8020B38(void)
|
|||
|
||||
static void sub_8020C2C(void)
|
||||
{
|
||||
switch(sub_80244E4())
|
||||
{
|
||||
case 2:
|
||||
case 3:
|
||||
sub_802453C();
|
||||
sub_801FDA8(0x10);
|
||||
switch (RecruitedMonSummaryMenu_Input()) {
|
||||
case RecruitedMonSummaryMenu_INPUTRET_BACK:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_ACCEPT: {
|
||||
RecruitedMonSummaryMenu_Destroy();
|
||||
sub_801FDA8(16);
|
||||
break;
|
||||
case 0:
|
||||
case 1:
|
||||
}
|
||||
case RecruitedMonSummaryMenu_INPUTRET_NONE:
|
||||
case RecruitedMonSummaryMenu_INPUTRET_LEFTRIGHT: {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -945,7 +946,7 @@ static void sub_8020EB4(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
sub_801FDA8(0x1F);
|
||||
}
|
||||
break;
|
||||
|
|
@ -962,19 +963,19 @@ static void sub_8020EB4(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
}
|
||||
sub_801FDA8(0x1F);
|
||||
break;
|
||||
case LINK_ACTION:
|
||||
if(gTeamInventoryRef->teamMoney < 150)
|
||||
{
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
sub_801FDA8(0x3);
|
||||
}
|
||||
else if(!sub_8093318(gUnknown_203B27C->moveIndex, gUnknown_203B27C->moves))
|
||||
{
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
sub_801FDA8(0x4);
|
||||
}
|
||||
else
|
||||
|
|
@ -995,7 +996,7 @@ static void sub_8020EB4(void)
|
|||
case DE_LINK_ACTION:
|
||||
if(!sub_809333C(gUnknown_203B27C->moveIndex, gUnknown_203B27C->moves))
|
||||
{
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
sub_801FDA8(0x5);
|
||||
}
|
||||
else
|
||||
|
|
@ -1012,7 +1013,7 @@ static void sub_8020EB4(void)
|
|||
case FORGET_ACTION:
|
||||
if(!IsAnyMoveLinked(gUnknown_203B27C->moveIndex, gUnknown_203B27C->moves))
|
||||
{
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
sub_801FDA8(0x6);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ static void sub_801E594(void);
|
|||
bool8 sub_801E3F0(u32 a0)
|
||||
{
|
||||
if (sUnknown_203B264 == NULL)
|
||||
sUnknown_203B264 = MemoryAlloc(sizeof(*sUnknown_203B264), 8);
|
||||
sUnknown_203B264 = MemoryAlloc(sizeof(*sUnknown_203B264), MEMALLOC_GROUP_8);
|
||||
|
||||
sUnknown_203B264->menuWinId = a0;
|
||||
sUnknown_203B264->menuWindow = &sUnknown_203B264->windows.id[a0];
|
||||
|
|
@ -46,13 +46,13 @@ u32 sub_801E474(bool8 a0)
|
|||
switch(GetKeyPress(&sUnknown_203B264->input))
|
||||
{
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case 4:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
default:
|
||||
if(MenuCursorUpdate(&sUnknown_203B264->input, 1))
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ static void sub_801E76C(void);
|
|||
|
||||
bool8 CreateHintDisplayScreen(u32 index)
|
||||
{
|
||||
sUnknown_203B268 = MemoryAlloc(sizeof(MenuHeaderWindow), 8);
|
||||
sUnknown_203B268 = MemoryAlloc(sizeof(MenuHeaderWindow), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B268->m.menuWinId = 0;
|
||||
sUnknown_203B268->m.menuWindow = &sUnknown_203B268->m.windows.id[0];
|
||||
RestoreSavedWindows(&sUnknown_203B268->m.windows);
|
||||
|
|
@ -39,10 +39,10 @@ u32 HandleHintDisplayScreenInput(void)
|
|||
{
|
||||
switch (GetKeyPress(&sUnknown_203B268->m.input)) {
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
default:
|
||||
if (MenuCursorUpdateOnlyLeftRight(&sUnknown_203B268->m.input)) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ bool8 CreateIQSkillInfoMenu(u8 iqSkill)
|
|||
{
|
||||
ResetSprites(TRUE);
|
||||
|
||||
sIQSkillInfoMenu = MemoryAlloc(sizeof(struct IQSkillInfoMenu), 8);
|
||||
sIQSkillInfoMenu = MemoryAlloc(sizeof(struct IQSkillInfoMenu), MEMALLOC_GROUP_8);
|
||||
sIQSkillInfoMenu->chosenIQSkill = iqSkill;
|
||||
ResetTouchScreenMenuInput(&sIQSkillInfoMenu->unk88);
|
||||
sIQSkillInfoMenu->unk24 = 0;
|
||||
|
|
@ -116,7 +116,7 @@ static void sub_801C7D4(void)
|
|||
|
||||
switch (sub_8012A64(&sIQSkillInfoMenu->unk88, sIQSkillInfoMenu->unk24)) {
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
|
||||
if (sIQSkillInfoMenu->unkC != 0) {
|
||||
sIQSkillInfoMenu->unk8 = 0;
|
||||
|
|
@ -126,7 +126,7 @@ static void sub_801C7D4(void)
|
|||
SetIQSkillInfoMenuState(IQ_SKILL_INFO_MENU_EXIT);
|
||||
break;
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
SetIQSkillInfoMenuState(2);
|
||||
break;
|
||||
}
|
||||
|
|
@ -143,7 +143,7 @@ static void sub_801C848(void)
|
|||
|
||||
switch (sub_8012A64(&sIQSkillInfoMenu->unk88, sIQSkillInfoMenu->unk24)) {
|
||||
case 1:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
sIQSkillInfoMenu->unk8++;
|
||||
|
||||
if (sIQSkillInfoMenu->unk8 < sIQSkillInfoMenu->unkC)
|
||||
|
|
@ -152,7 +152,7 @@ static void sub_801C848(void)
|
|||
SetIQSkillInfoMenuState(IQ_SKILL_INFO_MENU_INIT);
|
||||
break;
|
||||
case 2:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
SetIQSkillInfoMenuState(2);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ bool8 CreateIQSkillListMenu(s16 species, u32 index, u32 a2)
|
|||
return FALSE;
|
||||
|
||||
if (sIQSkillListMenu == NULL)
|
||||
sIQSkillListMenu = MemoryAlloc(sizeof(struct IQSkillListMenu), 8);
|
||||
sIQSkillListMenu = MemoryAlloc(sizeof(struct IQSkillListMenu), MEMALLOC_GROUP_8);
|
||||
|
||||
sIQSkillListMenu->species = species_s32;
|
||||
sIQSkillListMenu->pokeStruct = &gRecruitedPokemonRef->pokemon[species_s32];
|
||||
|
|
@ -53,13 +53,13 @@ u32 HandleIQSkillListMenuInput(bool8 a0)
|
|||
|
||||
switch (GetKeyPress(&sIQSkillListMenu->s24.m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case INPUT_START_BUTTON:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
default:
|
||||
if (MenuCursorUpdate(&sIQSkillListMenu->s24.m.input, 1) != 0) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ bool8 CreateIQSkillMenu(s16 species)
|
|||
if (HasNoAvailIQSkills(species_s32))
|
||||
return FALSE;
|
||||
|
||||
sIQSkillMenu = MemoryAlloc(sizeof(struct IQSkillMenu), 8);
|
||||
sIQSkillMenu = MemoryAlloc(sizeof(struct IQSkillMenu), MEMALLOC_GROUP_8);
|
||||
sIQSkillMenu->menuAction = 0;
|
||||
sIQSkillMenu->species = species_s32;
|
||||
sIQSkillMenu->pokeStruct = &gRecruitedPokemonRef->pokemon[species_s32];
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ bool8 CreateKangaskhanStorage(u32 mode)
|
|||
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
gKangaskhanStorageWork = MemoryAlloc(sizeof(struct KangaskhanStorageWork), 8);
|
||||
gKangaskhanStorageWork = MemoryAlloc(sizeof(struct KangaskhanStorageWork), MEMALLOC_GROUP_8);
|
||||
gKangaskhanStorageWork->menuAction1 = 0;
|
||||
gKangaskhanStorageWork->menuAction2 = 0;
|
||||
gKangaskhanStorageWork->menuAction3 = 0;
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ bool8 sub_8017E1C(void)
|
|||
{
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
sUnknown_203B20C = MemoryAlloc(sizeof(unkStruct_203B20C), 8);
|
||||
sUnknown_203B20C = MemoryAlloc(sizeof(unkStruct_203B20C), MEMALLOC_GROUP_8);
|
||||
sUnknown_203B20C->menuAction1 = 0;
|
||||
sUnknown_203B20C->menuAction2 = 0;
|
||||
sUnknown_203B20C->menuAction3 = 0;
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ bool8 CreateKecleonBros(u32 mode)
|
|||
u8 *monName;
|
||||
OpenedFile *faceFile;
|
||||
|
||||
sKecleonBrosWork1 = MemoryAlloc(sizeof(KecleonBrosWork1), 8);
|
||||
sKecleonBrosWork1 = MemoryAlloc(sizeof(KecleonBrosWork1), MEMALLOC_GROUP_8);
|
||||
sKecleonBrosWork1->menuAction1 = 0;
|
||||
sKecleonBrosWork1->menuAction2 = 0;
|
||||
sKecleonBrosWork1->menuAction3 = 0;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ bool8 sub_8019E40(u32 r0)
|
|||
if (CountKecleonShopItems() == 0)
|
||||
return FALSE;
|
||||
|
||||
gUnknown_203B214 = MemoryAlloc(sizeof(*gUnknown_203B214), 8);
|
||||
gUnknown_203B214 = MemoryAlloc(sizeof(*gUnknown_203B214), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B214->m.menuWinId = r0;
|
||||
gUnknown_203B214->m.menuWindow = &gUnknown_203B214->m.windows.id[gUnknown_203B214->m.menuWinId];
|
||||
RestoreSavedWindows(&gUnknown_203B214->m.windows);
|
||||
|
|
@ -54,7 +54,7 @@ u32 sub_8019EDC(bool8 r0)
|
|||
|
||||
switch (GetKeyPress(&gUnknown_203B214->m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
item = GetKecleonShopItem(sub_8019FB0());
|
||||
|
|
@ -62,12 +62,12 @@ u32 sub_8019EDC(bool8 r0)
|
|||
slot.quantity = item->quantity;
|
||||
|
||||
if (GetActualBuyPrice(&slot) > gTeamInventoryRef->teamMoney)
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
else
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case INPUT_START_BUTTON:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
default:
|
||||
if (MenuCursorUpdate(&gUnknown_203B214->m.input, 1) != FALSE) {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ bool8 sub_801A20C(u32 r0)
|
|||
if (CountKecleonWareItems() == 0)
|
||||
return FALSE;
|
||||
|
||||
gUnknown_203B21C = MemoryAlloc(sizeof(*gUnknown_203B21C), 8);
|
||||
gUnknown_203B21C = MemoryAlloc(sizeof(*gUnknown_203B21C), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B21C->m.menuWinId = r0;
|
||||
gUnknown_203B21C->m.menuWindow = &gUnknown_203B21C->m.windows.id[gUnknown_203B21C->m.menuWinId];
|
||||
RestoreSavedWindows(&gUnknown_203B21C->m.windows);
|
||||
|
|
@ -53,7 +53,7 @@ u32 sub_801A2A8(bool8 r0)
|
|||
|
||||
switch (GetKeyPress(&gUnknown_203B21C->m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
item = GetKecleonWareItem(sub_801A37C());
|
||||
|
|
@ -62,12 +62,12 @@ u32 sub_801A2A8(bool8 r0)
|
|||
slot.quantity = item->quantity;
|
||||
|
||||
if (GetActualBuyPrice(&slot) > gTeamInventoryRef->teamMoney)
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
else
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
return 3;
|
||||
case INPUT_START_BUTTON:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
default:
|
||||
if (MenuCursorUpdate(&gUnknown_203B21C->m.input, 1) != 0) {
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
#include "text_1.h"
|
||||
#include "text_2.h"
|
||||
|
||||
// This file seems to be the kecleon "sell" menu
|
||||
|
||||
// size: R=0xF4 | B=0xF0
|
||||
typedef struct unkStruct_203B224
|
||||
{
|
||||
|
|
@ -42,7 +44,7 @@ bool8 sub_801A5D8(u32 param_1, s32 param_2, DungeonPos *param_3, u32 param_4)
|
|||
return FALSE;
|
||||
|
||||
if (gUnknown_203B224 == NULL)
|
||||
gUnknown_203B224 = MemoryAlloc(sizeof(unkStruct_203B224), 8);
|
||||
gUnknown_203B224 = MemoryAlloc(sizeof(unkStruct_203B224), MEMALLOC_GROUP_8);
|
||||
|
||||
gUnknown_203B224->unk0 = param_1;
|
||||
FillInventoryGaps();
|
||||
|
|
@ -82,7 +84,7 @@ u32 sub_801A6E8(bool8 param_1)
|
|||
|
||||
switch (GetKeyPress(&gUnknown_203B224->unk54.m.input)) {
|
||||
case INPUT_B_BUTTON:
|
||||
PlayMenuSoundEffect(1);
|
||||
PlayMenuSoundEffect(MENU_SFX_BACK);
|
||||
return 2;
|
||||
case INPUT_A_BUTTON:
|
||||
switch (gUnknown_203B224->unk0) {
|
||||
|
|
@ -90,31 +92,31 @@ u32 sub_801A6E8(bool8 param_1)
|
|||
case 1:
|
||||
case 2:
|
||||
if (gUnknown_203B224->unk4[sub_801A8AC()] != 0)
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
else
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
break;
|
||||
case 3:
|
||||
if (sub_801AEA8() != 0 || sub_801ADA0(sub_801A8AC()))
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
else
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
break;
|
||||
case 4:
|
||||
item = gTeamInventoryRef->teamItems[sub_801A8AC()];
|
||||
|
||||
if (IsShoppableItem(item.id) && GetActualSellPrice(&item) + gTeamInventoryRef->teamMoney <= MAX_TEAM_MONEY)
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
else
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
break;
|
||||
case 5:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
break;
|
||||
}
|
||||
return 3;
|
||||
case INPUT_START_BUTTON:
|
||||
PlayMenuSoundEffect(4);
|
||||
PlayMenuSoundEffect(MENU_SFX_INFO);
|
||||
return 4;
|
||||
case INPUT_L_BUTTON:
|
||||
case INPUT_R_BUTTON:
|
||||
|
|
@ -123,18 +125,18 @@ u32 sub_801A6E8(bool8 param_1)
|
|||
|
||||
index = sub_801A8AC();
|
||||
if (gUnknown_203B224->unk4[index] != 0 || sub_801ADA0(index)) {
|
||||
PlayMenuSoundEffect(6);
|
||||
PlayMenuSoundEffect(MENU_SFX_TOGGLE);
|
||||
gUnknown_203B224->unk4[index] ^= 1;
|
||||
MenuCursorUpdate(&gUnknown_203B224->unk54.m.input, 0);
|
||||
sub_801A9E0();
|
||||
return 1;
|
||||
}
|
||||
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
goto _0801A87C;
|
||||
case INPUT_SELECT_BUTTON:
|
||||
if (gUnknown_203B224->unk0 != 2) {
|
||||
PlayMenuSoundEffect(5);
|
||||
PlayMenuSoundEffect(MENU_SFX_SORT);
|
||||
SortInventoryItems();
|
||||
sub_801A9E0();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ void CreateLoadScreen(u32 currMenu)
|
|||
s32 i;
|
||||
|
||||
if (gLoadScreen == NULL) {
|
||||
gLoadScreen = MemoryAlloc(sizeof(struct LoadScreen), 8);
|
||||
gLoadScreen = MemoryAlloc(sizeof(struct LoadScreen), MEMALLOC_GROUP_8);
|
||||
MemoryFill8(gLoadScreen, 0, sizeof(struct LoadScreen));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ u32 sub_802465C(void)
|
|||
|
||||
ResetUnusedInputStruct();
|
||||
ShowWindows(NULL, TRUE, TRUE);
|
||||
sLuminousCaveWork = MemoryAlloc(sizeof(LuminousCaveWork), 8);
|
||||
sLuminousCaveWork = MemoryAlloc(sizeof(LuminousCaveWork), MEMALLOC_GROUP_8);
|
||||
sLuminousCaveWork->menuAction1 = 0;
|
||||
sLuminousCaveWork->menuAction2 = 0;
|
||||
sLuminousCaveWork->menuAction3 = 0;
|
||||
|
|
@ -597,7 +597,7 @@ static void sub_8025058(void)
|
|||
UpdateLuminousCaveState(0xD);
|
||||
}
|
||||
else
|
||||
PlayMenuSoundEffect(2);
|
||||
PlayMenuSoundEffect(MENU_SFX_FAIL);
|
||||
break;
|
||||
case 4:
|
||||
sLuminousCaveWork->chosenItem = gTeamInventoryRef->teamItems[sub_801A8AC()];
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ void CreateMailAcceptedStatusBox(u32);
|
|||
|
||||
u8 sub_802DFB0(void)
|
||||
{
|
||||
gUnknown_203B304 = MemoryAlloc(sizeof(struct unkStruct_203B304), 8);
|
||||
gUnknown_203B304 = MemoryAlloc(sizeof(struct unkStruct_203B304), MEMALLOC_GROUP_8);
|
||||
gUnknown_203B304->menuAction1 = 0;
|
||||
gUnknown_203B304->menuAction2 = 0;
|
||||
SetMailboxState(INITIALIZE_MAILBOX);
|
||||
|
|
@ -450,7 +450,7 @@ void HandleMailActionMenu(void)
|
|||
|
||||
// Read
|
||||
case 7:
|
||||
PlayMenuSoundEffect(0);
|
||||
PlayMenuSoundEffect(MENU_SFX_ACCEPT);
|
||||
mail = GetMailboxSlotInfo(gUnknown_203B304->mailboxIndex);
|
||||
gUnknown_203B304->mailIndex = mail->dungeonSeed.location.floor;
|
||||
gUnknown_203B304->fallbackState = MAIL_MENU_1;
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ static EWRAM_DATA s32 sTitleBrightness = 0; // NDS=210FAC0
|
|||
// TODO: I think there's a 2nd s32 here for the bottom screen TitleBrightness.
|
||||
|
||||
static EWRAM_INIT OpenedFile *sTitlePaletteFile = NULL;
|
||||
static EWRAM_INIT u32 sUnknown_203B03C = 0;
|
||||
static EWRAM_INIT u32 sMainLoopsUnk = MAINLOOPS_UNK_0;
|
||||
static EWRAM_INIT TeamBasicInfo sTeamBasicInfo_203B040 = {
|
||||
.unk0 = 0,
|
||||
.StarterID = MONSTER_CHARMANDER,
|
||||
|
|
@ -108,7 +108,7 @@ static void NDS_LoadOverlay_GroundMain();
|
|||
static void RemoveAllMoneyAndItems(void);
|
||||
static void RemoveMoneyAndRandomItems(void);
|
||||
static u32 RunGameMode_Async(u32 param_1);
|
||||
static u32 xxx_script_related_8001334(u32 startMode);
|
||||
static u32 xxx_script_related_8001334_Async(u32 startMode);
|
||||
static u8 sub_8001170(void);
|
||||
static void sub_80011CC(DungeonSetupSubstruct *info, u8 dungId);
|
||||
static void sub_80011E8(DungeonSetupSubstruct *info);
|
||||
|
|
@ -149,17 +149,17 @@ void GameLoop_Async(void)
|
|||
if (ReadSaveFromPak(&tmp))
|
||||
ThoroughlyResetScriptVars();
|
||||
|
||||
xxx_script_related_8001334(STARTMODE_14);
|
||||
xxx_script_related_8001334(STARTMODE_15);
|
||||
xxx_script_related_8001334_Async(STARTMODE_14);
|
||||
xxx_script_related_8001334_Async(STARTMODE_15);
|
||||
ClearScriptVarArray(NULL, EVENT_LOCAL);
|
||||
xxx_script_related_8001334(STARTMODE_16);
|
||||
xxx_script_related_8001334_Async(STARTMODE_16);
|
||||
|
||||
if (GetScriptVarValue(NULL, EVENT_LOCAL) == 0)
|
||||
xxx_script_related_8001334(STARTMODE_17);
|
||||
xxx_script_related_8001334_Async(STARTMODE_17);
|
||||
|
||||
while (TRUE) {
|
||||
sUnknown_203B03C = 0;
|
||||
sub_800A8F8(2);
|
||||
sMainLoopsUnk = MAINLOOPS_UNK_0;
|
||||
SetFileSystemUnk(FILESYSTEM_UNK_2);
|
||||
ResetSprites(TRUE);
|
||||
UpdateFadeInTile(0);
|
||||
InitFontPalette();
|
||||
|
|
@ -309,7 +309,7 @@ static void LoadTitleScreen(void)
|
|||
const u8 * renPal[3] = {"titlen0p", "titlen1p", "titlen2p"};
|
||||
OpenedFile *bgFile;
|
||||
s32 i, j;
|
||||
TitleMenuFile *stru = MemoryAlloc(sizeof(TitleMenuFile), 0);
|
||||
TitleMenuFile *stru = MemoryAlloc(sizeof(TitleMenuFile), MEMALLOC_GROUP_0);
|
||||
s32 rnd = RandInt(3);
|
||||
|
||||
sTitlePaletteFile = OpenFileAndGetFileDataPtr(renPal[rnd], &gTitleMenuFileArchive);
|
||||
|
|
@ -335,9 +335,9 @@ static void LoadTitleScreen(void)
|
|||
#include "data/main_loops.h"
|
||||
|
||||
// arm9.bin::0200ED08
|
||||
s32 sub_8000728(void)
|
||||
s32 GetMainLoopsUnk(void)
|
||||
{
|
||||
return sUnknown_203B03C;
|
||||
return sMainLoopsUnk;
|
||||
}
|
||||
|
||||
// arm9.bin::0200DB58
|
||||
|
|
@ -571,7 +571,7 @@ static u32 RunGameMode_Async(u32 a0)
|
|||
if (mode == STARTMODE_FRIEND_AREAS) {
|
||||
u8 friendAreaId = MapIdToFriendAreaId(GetScriptVarValue(NULL,GROUND_ENTER));
|
||||
|
||||
friendAreasSetup.friendAreasMapPtr = MemoryAlloc(sizeof(*friendAreasSetup.friendAreasMapPtr),8);
|
||||
friendAreasSetup.friendAreasMapPtr = MemoryAlloc(sizeof(*friendAreasSetup.friendAreasMapPtr), MEMALLOC_GROUP_8);
|
||||
friendAreasSetup.startingFriendAreaId = friendAreaId;
|
||||
friendAreasSetup.unk5 = CheckQuest(QUEST_CAN_DEPOSIT_PARTNER);
|
||||
ShowFriendAreasMap_Async(&friendAreasSetup);
|
||||
|
|
@ -625,7 +625,7 @@ static u32 RunGameMode_Async(u32 a0)
|
|||
break;
|
||||
}
|
||||
|
||||
worldMapSetup.worldMap = MemoryAlloc(sizeof(*worldMapSetup.worldMap), 8);
|
||||
worldMapSetup.worldMap = MemoryAlloc(sizeof(*worldMapSetup.worldMap), MEMALLOC_GROUP_8);
|
||||
ShowWorldMap_Async(&worldMapSetup);
|
||||
MemoryFree(worldMapSetup.worldMap);
|
||||
if (!worldMapSetup.dungeonEntered) {
|
||||
|
|
@ -633,9 +633,9 @@ static u32 RunGameMode_Async(u32 a0)
|
|||
continue;
|
||||
}
|
||||
SetScriptVarValue(NULL, DUNGEON_ENTER, scriptDungeonId);
|
||||
sUnknown_203B03C = 2;
|
||||
sub_800A8F8(4);
|
||||
r5 = xxx_script_related_8001334(STARTMODE_DUNGEON_FROM_WORLD_MAP);
|
||||
sMainLoopsUnk = MAINLOOPS_UNK_2;
|
||||
SetFileSystemUnk(FILESYSTEM_UNK_4);
|
||||
r5 = xxx_script_related_8001334_Async(STARTMODE_DUNGEON_FROM_WORLD_MAP);
|
||||
}
|
||||
else if (mode == STARTMODE_8) {
|
||||
r5 = 0;
|
||||
|
|
@ -650,9 +650,9 @@ static u32 RunGameMode_Async(u32 a0)
|
|||
else if (mode == STARTMODE_DUNGEON_LOST) {
|
||||
RemoveMoneyAndRandomItems();
|
||||
}
|
||||
sUnknown_203B03C = 2;
|
||||
sub_800A8F8(4);
|
||||
r5 = xxx_script_related_8001334(mode);
|
||||
sMainLoopsUnk = MAINLOOPS_UNK_2;
|
||||
SetFileSystemUnk(FILESYSTEM_UNK_4);
|
||||
r5 = xxx_script_related_8001334_Async(mode);
|
||||
if (r5 == 14) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -806,8 +806,8 @@ static u32 RunGameMode_Async(u32 a0)
|
|||
}
|
||||
}
|
||||
|
||||
sUnknown_203B03C = 1;
|
||||
sub_800A8F8(3);
|
||||
sMainLoopsUnk = MAINLOOPS_UNK_1;
|
||||
SetFileSystemUnk(FILESYSTEM_UNK_3);
|
||||
dungeonSetup.unk0 = 1;
|
||||
sub_80011E8(&dungeonSetup.info.sub0);
|
||||
LoadAndRunQuickSaveDungeon_Async(&dungeonSetup);
|
||||
|
|
@ -861,14 +861,14 @@ static void LoadAndRunQuickSaveDungeon_Async(DungeonSetupStruct *setupStr)
|
|||
s32 dungeonStructSize; // sizeof(Dungeon)
|
||||
|
||||
quickSaveValid = TRUE;
|
||||
sUnknown_203B03C = 1;
|
||||
sMainLoopsUnk = MAINLOOPS_UNK_1;
|
||||
|
||||
sub_800A8F8(3);
|
||||
SetFileSystemUnk(FILESYSTEM_UNK_3);
|
||||
ResetDialogueBox();
|
||||
sub_8043D50(&local_1c, &dungeonStructSize);
|
||||
|
||||
setupStr->info.unk74 = MemoryAlloc(local_1c, 7); // size: 0x4800
|
||||
setupStr->info.dungeon = MemoryAlloc(dungeonStructSize, 7); // size: sizeof(Dungeon)
|
||||
setupStr->info.unk74 = MemoryAlloc(local_1c, MEMALLOC_GROUP_7); // size: 0x4800
|
||||
setupStr->info.dungeon = MemoryAlloc(dungeonStructSize, MEMALLOC_GROUP_7); // size: sizeof(Dungeon)
|
||||
|
||||
if (setupStr->info.sub0.unk4) {
|
||||
PrepareQuickSaveRead(setupStr->info.unk74, local_1c);
|
||||
|
|
@ -1093,9 +1093,9 @@ static void nullsub_2(DungeonSetupStruct *r0)
|
|||
|
||||
// arm9.bin::0200CAD0
|
||||
// startMode: See enum "StartModeVal"
|
||||
static u32 xxx_script_related_8001334(u32 startMode)
|
||||
static u32 xxx_script_related_8001334_Async(u32 startMode)
|
||||
{
|
||||
return xxx_script_related_8098468(startMode);
|
||||
return xxx_script_related_8098468_Async(startMode);
|
||||
}
|
||||
|
||||
// arm9.bin::0200CA1C
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ static s32 sub_8035DB4(u32 currMenu);
|
|||
void InitMainMenu(void)
|
||||
{
|
||||
if (sMainMenu == NULL) {
|
||||
sMainMenu = MemoryAlloc(sizeof(MainMenu1Work), 8);
|
||||
sMainMenu = MemoryAlloc(sizeof(MainMenu1Work), MEMALLOC_GROUP_8);
|
||||
MemoryFill8(sMainMenu, 0, sizeof(MainMenu1Work));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ void DrawMainMenu(void)
|
|||
s32 i;
|
||||
|
||||
if (sUnknown_203B34C == NULL) {
|
||||
sUnknown_203B34C = MemoryAlloc(sizeof(MainMenu2Work), 8);
|
||||
sUnknown_203B34C = MemoryAlloc(sizeof(MainMenu2Work), MEMALLOC_GROUP_8);
|
||||
MemoryFill8(sUnknown_203B34C, 0, sizeof(MainMenu2Work));
|
||||
}
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user