This commit is contained in:
Kermalis 2023-09-09 19:53:10 -04:00
parent 48cc64847d
commit 955fac34cb
52 changed files with 209 additions and 206 deletions

View File

@ -15,7 +15,7 @@ typedef struct AdventureLog
} AdventureLog;
void CleanAdventureLogScreen(void);
bool8 CreateAdventureLogScreen(u32);
bool8 CreateAdventureLogScreen(u32 kind);
u32 HandleAdventureLogInput(u8);
#endif // GUARD_ADVENTURE_LOG_H

View File

@ -2,8 +2,8 @@
#define GUARD_BG_PALETTE_BUFFER_H
void InitBGPaletteBuffer(void);
void nullsub_4(s32, u8 *, s32, u8 *);
void SetBGPaletteBufferColorArray(s32, u8 *);
void SetBGPaletteBufferColorRGB(s32, u8 *, s32, u8 *);
void nullsub_4(s32 index, u8 *colorArray, s32, u8 *);
void SetBGPaletteBufferColorArray(s32 index, u8 *colorArray);
void SetBGPaletteBufferColorRGB(s32 index, u8 *colorArray, s32, u8 *);
#endif // GUARD_BG_PALETTE_BUFFER_H

View File

@ -21,9 +21,9 @@ void nullsub_12(void);
void nullsub_13(void);
void nullsub_14(void);
void sub_8005610(OpenedFile *, s32, s32, u8 *);
void sub_8005770(s32, u8 *, s32, u8 *);
void sub_8005770(s32, u8 *colorArray, s32, u8 *);
void sub_80057E8(void);
void sub_8005838(s32 *, u8);
void sub_8005838(s32 *, u8 kind);
void sub_80060EC(void);
#endif // GUARD_CODE_800558C_H

View File

@ -22,7 +22,7 @@ typedef struct unkStruct_203B22C
/* 0x64 */ MenuItem menuItems[8];
} unkStruct_203B22C;
bool8 sub_801AFA4(u32);
bool8 sub_801AFA4(u32 index);
u32 sub_801B00C(void);
void sub_801B048(void);

View File

@ -23,7 +23,7 @@ typedef struct unkStruct_203B234
UnkTextStruct2 unkF4[4];
} unkStruct_203B234;
bool8 sub_801B60C(u32, u8, u8);
bool8 sub_801B60C(u32, u8 id, u8 quantity);
u32 sub_801B6AC(void);
void sub_801B72C(void);

View File

@ -3,11 +3,11 @@
#include "text.h"
bool8 sub_801BEEC(s16);
bool8 sub_801BEEC(s16 species);
u32 sub_801BF48(void);
void sub_801BF98(void);
bool8 sub_801C8C4(s32, s32, UnkTextStruct2_sub *, u32);
extern u32 sub_801CA08(bool8);
u32 sub_801CA08(bool8);
u8 sub_801CB24(void);
void sub_801CB5C(bool8);
void sub_801CBB8(void);
@ -16,6 +16,6 @@ bool8 sub_801CF14(s32);
bool8 sub_801CF50(s32);
void sub_801CF94(void);
s32 sub_801CFB8(void);
u32 sub_801CFE0(u8);
u32 sub_801CFE0(u8 index);
#endif // GUARD_CODE_801C620_H

View File

@ -26,7 +26,7 @@ typedef struct unkStruct_203B270
const u8 *text;
} unkStruct_203B270;
u8 sub_801EE10(u32, s16, Move *, u32, const u8 *, u32);
u8 sub_801EE10(u32, s16 species, Move *moves, u32, const u8 *text, u32);
// code_801EE10.s
extern u32 sub_801EF38(u32);

View File

@ -1,7 +1,7 @@
#ifndef GUARD_CODE_801EE10_1_H
#define GUARD_CODE_801EE10_1_H
bool8 sub_8024458(s16, s32);
bool8 sub_8024458(s16 speciesNum, s32);
void sub_802453C(void);
// code_801EE10_1.s

View File

@ -1,13 +1,13 @@
#ifndef GUARD_CODE_801EE10_MID_H
#define GUARD_CODE_801EE10_MID_H
bool8 sub_801F428(s16, s32);
bool8 sub_801F428(s16 index, s32);
u32 sub_801F520(u8);
u16 sub_801F5B4(void);
void sub_801F5F0(bool8);
void sub_801F63C(void);
void sub_801F700(void);
bool8 sub_801F808(u16 *);
bool8 sub_801F808(u16 *moveIDs);
u32 sub_801F890(void);
void sub_801F8D0(void);

View File

@ -18,6 +18,6 @@ typedef struct unkStruct_80E9F8C
/* 0x8 */ u8 *text2;
} unkStruct_80E9F8C;
void sub_803B6B0(s32, s32, u8, u32);
void sub_803B6B0(s32 x, s32 y, u8 index, u32);
#endif // GUARD_CODE_803B050_H

View File

@ -7,7 +7,7 @@ void CloseAllSpriteFiles(void);
void sub_8068768(void);
void sub_80687AC(void);
extern OpenedFile *sub_80687D0(s16);
void sub_8068838(s16, bool32);
OpenedFile *sub_80687D0(s16 species);
void sub_8068838(s16 id, bool32);
#endif // GUARD_CODE_805D8C8_H

View File

@ -5,18 +5,18 @@
void sub_806CC10(void);
void sub_806CC70(void);
void sub_806CCB4(Entity *, u8);
void sub_806CCB4(Entity *entity, u8);
void sub_806CD90(void);
void sub_806CDD4(Entity *, u8, u32);
void sub_806CDFC(Entity *, u8, u32);
void sub_806CE34(Entity *, u32);
void sub_806CE68(Entity *, u32);
void sub_806CE94(Entity *, u32);
u8 sub_806CEBC(Entity *);
void sub_806CEFC(Entity *, u32);
void sub_806CF18(Entity *);
u8 sub_806CF54(Entity *);
void sub_806CDD4(Entity *entity, u8, u32);
void sub_806CDFC(Entity *entity, u8, u32);
void sub_806CE34(Entity *entity, u32 newDir);
void sub_806CE68(Entity *entity, u32 newDir);
void sub_806CE94(Entity *entity, u32 newDir);
u8 sub_806CEBC(Entity *entity);
void sub_806CEFC(Entity *entity, u32 newDir);
void sub_806CF18(Entity *entity);
u8 sub_806CF54(Entity *entity);
void sub_806CF60(void);
u32 sub_806CF98(Entity *);
u32 sub_806CF98(Entity *entity);
#endif // GUARD_CODE_806CD90_H

View File

@ -3,7 +3,8 @@
#include "dungeon_entity.h"
struct unkStruct_202F3D0
// size: 0x8
typedef struct unkStruct_202F3D0
{
u8 unk0;
u8 unk1;
@ -11,10 +12,10 @@ struct unkStruct_202F3D0
u8 unk3;
u8 unk4;
u8 unk5;
};
} unkStruct_202F3D0;
void SpriteLookAroundEffect(Entity *);
void SpriteShockEffect(Entity *);
void SpriteLookAroundEffect(Entity *entity);
void SpriteShockEffect(Entity *entity);
void sub_8086448(void);
void sub_8086500(void);
@ -23,18 +24,18 @@ void sub_8086598(void);
void sub_80865E8(void);
void sub_808663C(void);
void sub_8086690(void);
void sub_80866C4(const u8 *);
void sub_80866C4(const u8 *dialogue);
void sub_8086738(void);
void sub_8086764(void);
void sub_8086794(void);
void sub_80867F4(void);
void sub_808680C(void);
void sub_808682C(void);
void sub_8086838(u8, u8, u8);
void sub_8086848(u8, u8);
void sub_8086838(u8 entity, u8, u8);
void sub_8086848(u8 entity, u8);
void sub_8086854(void);
void sub_80868F4(Entity *);
void sub_8086910(Entity *);
void sub_80868F4(Entity *entity);
void sub_8086910(Entity *entity);
void sub_808692C(void);
void sub_80869E4(Entity *, s32, u8, s8);

View File

@ -10,11 +10,12 @@ typedef struct unkStruct_8094924
u32 unkC;
} unkStruct_8094924;
void xxx_init_struct_8094924_save_809486C(unkStruct_8094924 *, u8 *, s32);
void nullsub_102(unkStruct_8094924 *);
void SaveIntegerBits(unkStruct_8094924 *, void *, s32);
void xxx_init_struct_8094924_restore_809485C(unkStruct_8094924 *, u8 *, s32);
void sub_80948E4(unkStruct_8094924 *, u8 *, s32);
void RestoreIntegerBits(unkStruct_8094924 *, void *, s32);
void RestoreIntegerBits(unkStruct_8094924 *, void *, s32 size);
void SaveIntegerBits(unkStruct_8094924 *, void *, s32 size);
void xxx_init_struct_8094924_restore_809485C(unkStruct_8094924 *, u8 *, s32 size);
void xxx_init_struct_8094924_save_809486C(unkStruct_8094924 *, u8 *, s32 size);
void sub_80948E4(unkStruct_8094924 *, u8 *, s32 size);
#endif // GUARD_CODE_8092334_H

View File

@ -62,18 +62,18 @@ void sub_8095118(void);
s32 FindOpenMailSlot(void);
bool8 sub_80951BC(unkStruct_203B480 *mail);
bool8 sub_80951FC(unkStruct_203B480 *);
unkStruct_203B480 * GetMailatIndex(u8);
void DeleteMailAtIndex(u8);
unkStruct_203B480 * GetMailatIndex(u8 index);
void DeleteMailAtIndex(u8 index);
void sub_8095274(u32);
bool8 sub_8095298(s32);
void sub_80952C4(void);
bool8 HasMail(u8, u32);
s32 CountMailType(u8);
bool8 HasMail(u8 mailType, u32);
s32 CountMailType(u8 mailType);
u32 CountAllMail(void);
s32 sub_8095374(void);
s32 GetMailIndex(u8, u32);
s32 GetFirstIndexofMailType(u8);
void sub_8095824(struct unkStruct_8094924 *, unkStruct_203B480 *);
void sub_8095774(struct unkStruct_8094924 *, unkStruct_203B480 *);
s32 GetMailIndex(u8 mailType, u32);
s32 GetFirstIndexofMailType(u8 mailType);
void sub_8095824(struct unkStruct_8094924 *a, unkStruct_203B480 *b);
void sub_8095774(struct unkStruct_8094924 *a, unkStruct_203B480 *b);
#endif // GUARD_CODE_8094F88_H

View File

@ -11,11 +11,11 @@ typedef struct MissionText
u8 unk7;
} MissionText;
const u8 *GetCurrentMissionText(s16);
const u8 *GetCurrentMissionText(s16 index);
// TODO: this should probably be bool8 but can't get a match just yet
bool32 IsMazeCompleted(s16 mazeIndex);
bool8 sub_8097504(s16);
bool8 sub_8097504(s16 mazeIndex);
const u8 *sub_80975DC(u32);
// These two are definitely bool8 but can't get them to match with it yet

View File

@ -1,6 +1,7 @@
#ifndef GUARD_CODE_8098BDC_H
#define GUARD_CODE_8098BDC_H
// code_8098DBC.s
extern void sub_80993D8(void);
extern void sub_80993E4(void);
extern void sub_8099690(u32);

View File

@ -23,20 +23,20 @@ void sub_80A2558(s32, s16 *);
void sub_80A2584(s16, s16);
void sub_80A2598(s16, s16);
u32 sub_80A25AC(u16);
const unkStruct_80A2608 *sub_80A2608(s16);
const unkStruct_80A2608 *sub_80A2620(s16);
s16 sub_80A2654(s16);
const unkStruct_80A2608 *sub_80A2608(s16 index);
const unkStruct_80A2608 *sub_80A2620(s16 index);
s16 sub_80A2654(s16 index);
s16 sub_80A2668(u32);
s16 sub_80A2688(u8);
s16 sub_80A26B8(s16);
s16 sub_80A26CC(s16);
u8 sub_80A270C(s16);
u8 sub_80A2728(s16);
u8 sub_80A2740(s32);
u8 sub_80A270C(s16 index);
u8 sub_80A2728(s16 index);
u8 sub_80A2740(s32 index);
s16 sub_80A2750(s16);
bool8 sub_80A27CC(s16);
bool8 sub_80A2824(u8);
bool8 sub_80A28F0(u8);
bool8 sub_80A2824(u8 index);
bool8 sub_80A28F0(u8 index);
s32 sub_80A29B0(u8 *);
const u8 *sub_80A2B18(s16);

View File

@ -11,7 +11,7 @@ typedef struct DebugLocation
/* 0x8 */ u8 *func;
} DebugLocation;
void Log(u8, const u8 *, ...);
void Log(u8 num, const u8 *text, ...);
void NDS_DebugInit(void);
void nullsub_25(void);
void nullsub_26(void);
@ -23,10 +23,10 @@ void nullsub_31(void);
void nullsub_32(void);
void nullsub_137(void);
void nullsub_199(void);
void PrintFuncFileLine(u8 *, DebugLocation *, const u8 *);
void PrintMessageWithFuncFileLine(u8 *, DebugLocation *, const u8 *, ...);
void PrintFuncFileLine(u8 *buf, DebugLocation *loc, const u8 *prefix);
void PrintMessageWithFuncFileLine(u8 *buffer, DebugLocation *debug, const u8 *text, ...);
void sub_8011B08(void);
void sub_8011B88(const u8 *, ...);
void sub_8011B88(const u8 *text, ...);
u32 sub_8011BA4(void);
u32 sub_8011BA8(void);
const u8 *sub_8011BAC(void);

View File

@ -3,12 +3,12 @@
#include "file_system.h"
u32 DecompressAT(u8 *, s32, const u8 *);
u32 DecompressATFile(u8 *, s32, OpenedFile *);
u32 DecompressATGlobalFile(u32 *, s32, OpenedFile *);
u8 *GetSiroPtr(OpenedFile *);
u32 DecompressAT(u8 *result, s32 resultLength, const u8 *compressedData);
u32 DecompressATFile(u8 *result, s32 resultLength, OpenedFile *file);
u32 DecompressATGlobalFile(u32 *result, s32 resultLength, OpenedFile *file);
u8 *GetSiroPtr(OpenedFile *openedFile);
void nullsub_16(void);
bool8 sub_800B2D4(char *, char *, s32);
bool8 sub_800B2D4(char *, char *, s32 length);
#endif // GUARD_DECOMPRESS_H

View File

@ -35,14 +35,16 @@ typedef struct DungeonDataEntry
extern DungeonDataEntry gDungeons[];
extern DungeonName gDungeonNames[];
s32 GetDungeonFloorCount(u8 dungeon);
const u8 *GetDungeonName1(u8 dungeon);
u32 sub_80908D8(DungeonLocation *dungeon);
u8 sub_8090910(DungeonLocation *dungeon, u32 param_2);
bool8 sub_809095C(u8 dungeon);
u32 GetMaxItemsAllowed(u8 dungeon);
s8 GetRescuesAllowed(u8 dungeon);
bool8 HasCheckpoint(u8 dungeon);
s32 GetDungeonFloorCount(u8 dungeon);
void PrintYellowDungeonNametoBuffer(u8 *, DungeonLocation *);
void PrintYellowDungeonNametoBuffer(u8 *buffer, DungeonLocation *dungeonLocation);
#endif //GUARD_DUNGEON_H
u32 sub_80908D8(DungeonLocation *dungeon);
u8 sub_8090910(DungeonLocation *dungeon, u32 param_2);
bool8 sub_809095C(u8 dungeon);
#endif // GUARD_DUNGEON_H

View File

@ -3,7 +3,7 @@
#include "dungeon_entity.h"
Entity* GetLeader();
Entity* GetLeader(void);
EntityInfo* GetLeaderInfo(void);
#endif
#endif // GUARD_DUNGEON_LEADER_H

View File

@ -37,13 +37,13 @@ typedef struct UnkFileStruct
/* 0x4 */ u32 unk4;
} UnkFileStruct;
OpenedFile *Call_OpenFileAndGetFileDataPtr(const u8 *, const FileArchive *);
void CloseFile(OpenedFile *);
u8 *GetFileDataPtr(OpenedFile *, s32);
OpenedFile *Call_OpenFileAndGetFileDataPtr(const u8 *filename, const FileArchive *arc);
void CloseFile(OpenedFile *openedFile);
u8 *GetFileDataPtr(OpenedFile *openedFile, s32 unused);
void InitFileSystem(void);
OpenedFile *OpenFile(const u8 *, const FileArchive *);
OpenedFile *OpenFileAndGetFileDataPtr(const u8 *, const FileArchive *);
OpenedFile *OpenFile(const u8 *filename, const FileArchive *arc);
OpenedFile *OpenFileAndGetFileDataPtr(const u8 *filename, const FileArchive *arc);
u32 sub_800A8F8(u32);
u32 sub_800A8F8(u32 value);
#endif //GUARD_FILE_SYSTEM_H

View File

@ -1,23 +1,6 @@
#ifndef GUARD_GAME_OPTIONS_H
#define GUARD_GAME_OPTIONS_H
typedef struct GameOptions
{
// TODO: find where Controls/Touch Screen are in this structure in PMD Blue
/* 0x0 */ u8 dungeonSpeed;
/* 0x1 */ u8 FarOffPals;
/* 0x2 */ bool8 damageTurn;
/* 0x3 */ bool8 gridEnable;
/* 0x4 */ u8 mapOption;
/* 0x5 */ u8 fill5[3];
/* 0x8 */ u8 windowColor;
/* 0x9 */ u8 unk9; // maybe Controls?
/* 0xA */ u8 unkA; // maybe Touch Screen?
/* 0xB */ u8 playerGender;
/* 0xC */ u8 unkC;
} GameOptions;
enum DungeonSpeed
{
DUNGEON_SPEED_SLOW,
@ -59,10 +42,26 @@ enum windowColor
NUM_WINDOW_COLORS,
};
typedef struct GameOptions
{
// TODO: find where Controls/Touch Screen are in this structure in PMD Blue
/* 0x0 */ u8 dungeonSpeed;
/* 0x1 */ u8 FarOffPals;
/* 0x2 */ bool8 damageTurn;
/* 0x3 */ bool8 gridEnable;
/* 0x4 */ u8 mapOption;
/* 0x5 */ u8 fill5[3];
/* 0x8 */ u8 windowColor;
/* 0x9 */ u8 unk9; // maybe Controls?
/* 0xA */ u8 unkA; // maybe Touch Screen?
/* 0xB */ u8 playerGender;
/* 0xC */ u8 unkC;
} GameOptions;
void LoadGameOptions(void);
GameOptions * GetGameOptions(void);
void InitializeGameOptions(bool8 initializeGender);
bool8 GameOptionsNotChange(GameOptions *r0);
bool8 GameOptionsNotChange(GameOptions *);
#endif
#endif // GUARD_GAME_OPTIONS_H

View File

@ -2,10 +2,10 @@
#define GUARD_GROUND_MAP_1_H
void GroundMap_ExecuteEnter(s16);
void GroundMap_ExecuteEvent(s16, u32);
void GroundMap_ExecuteEvent(s16 scriptIndex, u32);
void GroundMap_ExecuteStation(s16, s16, s8, u32);
bool8 sub_80A4D2C(s16);
bool8 sub_80A4D48(s16);
bool8 sub_80A4D48(s16 index);
#endif // GUARD_GROUND_MAP_1_H

View File

@ -51,6 +51,6 @@ typedef struct GroundScript_ExecutePP_1
u8 fillE8[0x110 - 0xE8];
} GroundScript_ExecutePP_1;
bool8 GroundScript_ExecutePP(GroundScript_ExecutePP_1 *, s32 *, GroundScript_ExecutePP_3 *, const DebugLocation *);
bool8 GroundScript_ExecutePP(GroundScript_ExecutePP_1 *, s32 *, GroundScript_ExecutePP_3 *, const DebugLocation *unused);
#endif // GUARD_GROUND_SCRIPT_H

View File

@ -44,7 +44,7 @@ typedef struct unkStruct_203B27C
UnkTextStruct2 unk180[4];
} unkStruct_203B27C;
bool8 sub_801FB50(u32);
bool8 sub_801FB50(u32 mode);
u32 sub_801FC40(void);
void sub_801FD7C(void);

View File

@ -109,7 +109,7 @@ u32 GetItemActionType(u8 id);
u32 GetSpawnAmountRange(u8 id, u32 r1);
u8 *GetItemDescription(u8 id);
bool8 GetItemAIFlag(u8 id, u32 r1);
void BufferItemName(u8 *, u8, unkStruct_8090F58 *);
void BufferItemName(u8 *, u8 id, unkStruct_8090F58 *);
void sub_8090E14(u8 *ext_buffer, Item *slot, unkStruct_8090F58 *);
bool8 AddItemToInventory(const Item* slot);
void ConvertMoneyItemToMoney();
@ -148,15 +148,15 @@ void RestoreHeldItem(unkStruct_8094924 *, BulkItem *);
void SaveHeldItem(unkStruct_8094924 *, BulkItem *);
void RestoreItemSlot(unkStruct_8094924 *, Item *);
void SaveItemSlot(unkStruct_8094924 *, Item *);
s32 RestoreTeamInventory(u8 *, u32);
s32 SaveTeamInventory(u8 *, u32);
s32 RestoreTeamInventory(u8 *, u32 size);
s32 SaveTeamInventory(u8 *, u32 size);
s32 sub_8090FEC(s32, u8 *, u8);
u32 sub_80913E0(Item *, u32, struct subStruct_203B240 **);
s32 sub_8090FEC(s32, u8 *strbuf, u8);
u32 sub_80913E0(Item *slot, u32, struct subStruct_203B240 **);
#endif // GUARD_ITEMS_H

View File

@ -15,7 +15,7 @@ typedef struct unkStruct_203B214
} unkStruct_203B214;
bool8 sub_8019E40(u32);
u32 sub_8019EDC(u8);
u32 sub_8019EDC(bool8);
u8 sub_8019FB0(void);
void sub_8019FCC(bool8);
void sub_801A010(void);

View File

@ -15,9 +15,9 @@ typedef struct unkStruct_203B21C
} unkStruct_203B21C;
u8 sub_801A20C(u32);
u32 sub_801A2A8(u8);
u32 sub_801A2A8(bool8);
u8 sub_801A37C(void);
void sub_801A398(u8);
void sub_801A398(bool8);
void sub_801A3DC(void);
void sub_801A4A4(void);

View File

@ -27,7 +27,7 @@ void sub_801AD34(u32);
bool8 sub_801ADA0(s32);
void sub_801AE84(void);
s32 sub_801AEA8(void);
s32 sub_801AED0(s32);
void sub_801AEE4(s32, s32);
s32 sub_801AED0(s32 index);
void sub_801AEE4(s32 index, s32 value);
#endif // GUARD_KECLEON_BROS4_H

View File

@ -41,7 +41,7 @@ typedef struct MakuhitaDojoWork1
} MakuhitaDojoWork1;
void MakuhitaDojo_Delete(void);
bool8 MakuhitaDojo_New(u32);
bool8 MakuhitaDojo_New(u32 mode);
u32 sub_802FE58(void);
s16 sub_802FED0(void);

View File

@ -22,71 +22,71 @@ typedef struct MoveDataFile
} MoveDataFile;
bool8 CanBeSnatched(u16 moveID);
void CopyAndResetMoves(Move *, Move *);
void CopyBareMoveData(Move *, Move *);
void CopyAndResetMoves(Move *destMoves, Move *srcMoves);
void CopyBareMoveData(Move *destMoves, Move *srcMoves);
bool8 DoesMoveCharge(u16 move);
bool8 FailsWhileMuzzled(u16 moveID);
const u8 *GetHMTMMoves(s16 species);
const u8 *GetLevelUpMoves(s16 species);
s32 GetLinkedSequence(s32, Move *, u16 *);
s32 GetLinkedSequence(s32 index, Move *moves, u16 *sequenceMoveIDs);
s32 GetMoveAccuracyOrAIChance(Move *move, u32 accuracyType);
u8 GetMoveAIWeight(Move *);
s32 GetMoveBasePower(Move *);
u32 GetMoveBasePP(Move *);
u32 GetMoveCritChance(Move *);
u32 GetMoveMaxUpgradeLevel(Move *);
u32 GetMoveNumberOfChainedHits(Move *);
u8 GetMoveAIWeight(Move *move);
s32 GetMoveBasePower(Move *move);
u32 GetMoveBasePP(Move *move);
u32 GetMoveCritChance(Move *move);
u32 GetMoveMaxUpgradeLevel(Move *move);
u32 GetMoveNumberOfChainedHits(Move *move);
s16 GetMoveTargetAndRange(Move *move, bool32 isAI);
u8 *GetMoveUseText(u16 moveID);
u8 GetMoveType(Move *);
u8 GetMoveType(Move *move);
void InitPokemonMove(Move *move, u16 moveID);
void InitZeroedPPPokemonMove(Move *move, u16 moveID);
bool8 IsAnyMoveLinked(s32, Move *);
bool8 IsAnyMoveLinked(s32 unused, Move *moves);
bool8 IsMoveEnabled(s32 index, Move *moves);
bool8 IsMoveSet(s32 index, Move *moves);
bool8 IsNextMoveLinked(s32 index, Move *moves);
bool8 IsReflectedByMagicCoat(u16 moveID);
bool8 IsSoundMove(Move *);
bool8 IsSoundMove(Move *move);
void LoadWazaParameters(void);
bool8 MoveCannotHitFrozen(Move *);
bool8 MoveIgnoresTaunted(Move *);
void RemoveLinkSequenceFromMoves8(Move *, s32);
void RestorePokemonMoves(struct unkStruct_8094924 *, Move *);
void SavePokemonMoves(struct unkStruct_8094924 *, Move *);
bool8 MoveCannotHitFrozen(Move *move);
bool8 MoveIgnoresTaunted(Move *move);
void RemoveLinkSequenceFromMoves8(Move *moves, s32 index);
void RestorePokemonMoves(struct unkStruct_8094924 *, Move *moveSet);
void SavePokemonMoves(struct unkStruct_8094924 *, Move *moveSet);
bool8 ToggleMoveEnabled(s32 index, Move *moves);
bool8 ToggleSetMove(s32 index, Move *moves);
bool8 TryLinkMovesAfter(s32 index, Move *moves);
void unk_CopyMoves4To8(Move *, Move *);
void unk_CopyMoves4To8AndClearFlag2Unk4(Move *, Move *);
s32 unk_FindMoveEnabledForAIAfter4(Move *, s32);
s32 unk_FindMoveEnabledForAIAfter8(Move *, s32);
s32 unk_FindMoveEnabledForAIAfter8_v2(Move *, s32);
s32 unk_FindMoveEnabledForAIBefore8(Move *, s32);
s32 unk_FindMoveEnabledForAIBefore8_v2(Move *, s32);
void unk_FixLinkedMovesSetEnabled4(Move *);
void unk_FixLinkedMovesSetEnabled8(Move *);
void unk_FixLinkedMovesSetEnabled8_v2(Move *);
s32 unk_MoveIDPrintMoveDescription(s32, u16, s32, struct subStruct_203B240 **);
s32 unk_PrintMoveDescription(s32, Move *, s32, struct subStruct_203B240 **);
s32 unk_SetMoveToFirstInLinkedSequence4(Move *, s32);
s32 unk_SetMoveToFirstInLinkedSequence8_v2(Move *, s32);
s32 unk_SetMoveToLastInLinkedSequence4(Move *, s32);
s32 unk_SetMoveToLastInLinkedSequence8_v2(Move *, s32);
void unk_CopyMoves4To8(Move *destMoves, Move *srcMoves);
void unk_CopyMoves4To8AndClearFlag2Unk4(Move *destMoves, Move *srcMoves);
s32 unk_FindMoveEnabledForAIAfter4(Move *moves, s32 index);
s32 unk_FindMoveEnabledForAIAfter8(Move *moves, s32 index);
s32 unk_FindMoveEnabledForAIAfter8_v2(Move *moves, s32 index);
s32 unk_FindMoveEnabledForAIBefore8(Move *moves, s32 index);
s32 unk_FindMoveEnabledForAIBefore8_v2(Move *moves, s32 index);
void unk_FixLinkedMovesSetEnabled4(Move *moves);
void unk_FixLinkedMovesSetEnabled8(Move *moves);
void unk_FixLinkedMovesSetEnabled8_v2(Move *moves);
s32 unk_MoveIDPrintMoveDescription(s32, u16 moveID, s32, struct subStruct_203B240 **);
s32 unk_PrintMoveDescription(s32 x, Move *move, s32, struct subStruct_203B240 **);
s32 unk_SetMoveToFirstInLinkedSequence4(Move *moves, s32 index);
s32 unk_SetMoveToFirstInLinkedSequence8_v2(Move *moves, s32 index);
s32 unk_SetMoveToLastInLinkedSequence4(Move *moves, s32 index);
s32 unk_SetMoveToLastInLinkedSequence8_v2(Move *moves, s32 index);
bool8 UnlinkMovesAfter(s32 index, Move *moves);
void UnSetMove(s32 index, Move *moves);
u8 sub_809287C(Move *);
void sub_80928A0(u8 *, Move *, const unkStruct_80928C0 *);
void sub_80928C0(u8 *, Move *, const unkStruct_80928C0 *);
void sub_8092AA8(Move *, u16);
void sub_8092C84(u8 *, u16);
s32 sub_8092DB8(Move *, s32);
s32 sub_8092F4C(Move *, s32);
bool8 sub_8093318(s32, Move *);
bool8 sub_809333C(s32, Move *);
s32 sub_80935B8(Move *, s32);
void sub_8094060(Move *, Move *);
u8 sub_809287C(Move *move);
void sub_80928A0(u8 *buffer, Move *move, const unkStruct_80928C0 *);
void sub_80928C0(u8 *buffer, Move *move, const unkStruct_80928C0 *);
void sub_8092AA8(Move *move, u16 moveID);
void sub_8092C84(u8 *buffer, u16 moveID);
s32 sub_8092DB8(Move *moves, s32 index);
s32 sub_8092F4C(Move *moves, s32 index);
bool8 sub_8093318(s32, Move *moves);
bool8 sub_809333C(s32, Move *moves);
s32 sub_80935B8(Move *moves, s32 index);
void sub_8094060(Move *srcMoves, Move *destMoves);
void sub_8094184(struct unkStruct_8094924 *, struct unkStruct_8094184 *);
void sub_80941FC(struct unkStruct_8094924 *, struct unkStruct_8094184 *);
#endif // GUARD_MOVES_H
#endif // GUARD_MOVES_H

View File

@ -203,7 +203,7 @@ void CopyYellowMonsterNametoBuffer(u8 *buffer, s16 index);
void PrintColoredPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon, s32 colorNum);
void sub_808D930(u8 *buffer, s32 index);
void sub_808D9DC(u8 *buffer, PokemonStruct2 *, s32 colorNum);
void sub_808DA0C(u8 *, PokemonStruct2 *);
void sub_808DA0C(u8 *buffer, PokemonStruct2 *);
void PeekPokemonItem(s16 index_, BulkItem* item);
void GivePokemonItem(s16 index_, BulkItem* item);
bool8 IsPokemonRenamed(PokemonStruct1* pokemon);
@ -240,11 +240,11 @@ OpenedFile *OpenPokemonDialogueSpriteFile(s16 index);
OpenedFile *GetDialogueSpriteDataPtr(s16 index);
s32 GetUnownIndex(s16 index);
void sub_808E6F4(unkStruct_808E6F4 *);
s32 GetEvolutionSequence(PokemonStruct1 *, EvolveStage *);
s32 GetEvolutionSequence(PokemonStruct1 *pokemon, EvolveStage *);
void xxx_pokemonstruct_to_pokemon2_808DE50(PokemonStruct2 *, PokemonStruct1 *, s32);
void SavePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *);
void SavePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *pokemon);
void RestorePokemonStruct(unkStruct_8094924 *, PokemonStruct1 *);
s32 sub_808E218(unkStruct_808E218_arg *, PokemonStruct1 *);
s32 sub_808E218(unkStruct_808E218_arg *, PokemonStruct1 *pokemon);
// pokemon.s
extern PokemonStruct1 *GetPlayerPokemonStruct(void);

View File

@ -3,7 +3,7 @@
#include "pokemon.h"
void PrintPokeNameToBuffer(u8 *, PokemonStruct1 *);
void PrintPokeNameToBuffer(u8 *buffer, PokemonStruct1 *pokemon);
bool8 sub_808DA44(s32, u32);

View File

@ -18,7 +18,7 @@ typedef struct PostOfficeWork
} PostOfficeWork;
void CleanHelperPelipper(void);
bool8 CreateHelperPelipperMenu(s16);
bool8 CreateHelperPelipperMenu(s16 speciesID);
u32 HelperPelipperCallback(void);
#endif // GUARD_POST_OFFICE_GUIDE1_H

View File

@ -15,7 +15,7 @@ typedef struct unkStruct_203B330
UnkTextStruct2 unk18[4];
} unkStruct_203B330;
bool8 sub_80319A4(u8, u8, s32);
bool8 sub_80319A4(u8, u8 dungeon, s32);
u32 sub_80319F8(void);
void sub_8031A3C(void);

View File

@ -12,7 +12,7 @@ typedef struct QuickSaveRead
void FinishQuickSaveRead(void);
bool8 IsQuickSaveValid(void);
void PrepareQuickSaveRead(u8 *, u32);
void PrepareQuickSaveRead(u8 *dest, u32 size);
bool8 ReadQuickSave(void);
#endif // GUARD_QUICK_SAVE_READ_H

View File

@ -98,7 +98,7 @@ u32 WriteSaveSector(s32 *a, u8 *src, s32 size);
void CalculateChecksum(u8 *out, u32 size);
bool8 ValidateChecksum(u8 *in, u32 size);
s32 sub_80121D4(s32 *, u8 *, s32);
s32 sub_80121D4(s32 *a, u8 *src, s32 size);
u32 sub_80121E0(u32);
#endif // GUARD_SAVE_H

View File

@ -22,7 +22,7 @@ typedef struct SavePakWrite
void FinishWriteSavePak(void);
u32 GetSavePakStatus(void);
void PrepareSavePakWrite(s16);
void PrepareSavePakWrite(s16 pokemonID);
bool8 WriteSavePak(void);
#endif // GUARD_SAVE_WRITE_H

View File

@ -82,6 +82,6 @@ enum WonderMailRescueStates
extern unkStruct_203B2F4 *gUnknown_203B2F4;
extern unkStruct_203B2F8 *gUnknown_203B2F8;
u32 sub_802D098(unkSubStruct_203B2F8 *);
u32 sub_802D098(unkSubStruct_203B2F8 *mail);
#endif // GUARD_WONDER_MAIL_3_H

View File

@ -70,7 +70,7 @@ void InitBGPaletteBuffer(void)
#ifndef NONMATCHING
NAKED
#endif
void SetBGPaletteBufferColorRGB(s32 index, u8 *RGBArray, s32 a1, u8 *a2)
void SetBGPaletteBufferColorRGB(s32 index, u8 *colorArray, s32 a1, u8 *a2)
{
#ifdef NONMATCHING
if (a1 < 0) {
@ -81,11 +81,11 @@ void SetBGPaletteBufferColorRGB(s32 index, u8 *RGBArray, s32 a1, u8 *a2)
}
gBGPaletteUsed[index / 16] = 1;
if (!a2) {
gBGPaletteBuffer[index] = ((RGBArray[2] * a1 / 256 & 0x1F) << 10) | ((RGBArray[1] * a1 / 256 & 0x1F) << 5) | (RGBArray[0] * a1 / 256 & 0x1F);
gBGPaletteBuffer[index] = ((colorArray[2] * a1 / 256 & 0x1F) << 10) | ((colorArray[1] * a1 / 256 & 0x1F) << 5) | (colorArray[0] * a1 / 256 & 0x1F);
}
else
{
gBGPaletteBuffer[index] = ((a2[4 * RGBArray[2] + 2] * a1 / 256 & 0x1F) << 10) | ((a2[4 * RGBArray[1] + 1] * a1 / 256 & 0x1F) << 5) | (a2[4 * RGBArray[0]] * a1 / 256 & 0x1F);
gBGPaletteBuffer[index] = ((a2[4 * colorArray[2] + 2] * a1 / 256 & 0x1F) << 10) | ((a2[4 * colorArray[1] + 1] * a1 / 256 & 0x1F) << 5) | (a2[4 * colorArray[0]] * a1 / 256 & 0x1F);
}
#else
asm_unified("\tpush {r4-r7,lr}\n"
@ -211,7 +211,7 @@ void SetBGPaletteBufferColor(s32 index, u16 *color)
gBGPaletteBuffer[index] = *color;
}
void nullsub_4(s32 index, u8 *RGBArray, s32 a1, u8 *a2)
void nullsub_4(s32 index, u8 *colorArray, s32 a1, u8 *a2)
{
}
void nullsub_5(void)

View File

@ -158,12 +158,12 @@ UNUSED static void sub_8005764(s32 a0, OpenedFile *file, s32 a2, u8 *a3)
sub_8005770(a0, file->data, a2, a3);
}
void sub_8005770(s32 param_1, u8 *RGBArray, s32 a1, u8 *a2)
void sub_8005770(s32 param_1, u8 *colorArray, s32 a1, u8 *a2)
{
s32 i;
for (i = 0; i < 16; i++)
SetBGPaletteBufferColorRGB((param_1 + 0x10) * 0x10 + i, &RGBArray[i * 4], a1, a2);
SetBGPaletteBufferColorRGB((param_1 + 0x10) * 0x10 + i, &colorArray[i * 4], a1, a2);
}
// Maybe Position

View File

@ -7,6 +7,7 @@
#include "constants/weather.h"
#include "dungeon_global_data.h"
#include "dungeon_entity.h"
#include "dungeon_leader.h"
#include "dungeon_map_access.h"
#include "dungeon_music.h"
#include "dungeon_random.h"
@ -385,7 +386,6 @@ extern u8 sub_80860A8(u32);
extern void sub_8049ED4();
extern void sub_8052D44(s16 *, Entity *, Entity *);
extern void SetMessageArgument(u8 *, Entity *, u32);
extern Entity *GetLeader();
extern void sub_80421C0(Entity *, u32);
extern void sub_8046D20();
extern void sub_808B1CC(u8);

View File

@ -100,7 +100,7 @@ void sub_8068838(s16 id, bool32 a1)
s32 id_s32 = id;
bool8 param_2 = a1;
if (param_2 == 0 &&
if (!param_2 &&
(id_s32 == MONSTER_DEOXYS_NORMAL || id_s32 == MONSTER_DEOXYS_ATTACK || id_s32 == MONSTER_DEOXYS_DEFENSE || id_s32 == MONSTER_DEOXYS_SPEED)) {
sub_80688B0();
}

View File

@ -11,7 +11,7 @@
// ???
extern u32 gUnknown_202EDC8;
EWRAM_DATA struct unkStruct_202F3D0 gUnknown_202F3D0;
EWRAM_DATA unkStruct_202F3D0 gUnknown_202F3D0 = {0};
// data_8107010.s
extern u32 gUnknown_8107314[];

View File

@ -1,12 +1,11 @@
#include "global.h"
#include "dungeon_leader.h"
#include "dungeon_global_data.h"
#include "dungeon_leader.h"
#include "dungeon_util.h"
extern Entity *gLeaderPointer;
Entity* GetLeader()
Entity* GetLeader(void)
{
Entity *leader = gLeaderPointer;
if (leader == NULL)

View File

@ -414,7 +414,7 @@ static void sub_8090F58(u8* a1, u8 *a2, Item *slot, struct unkStruct_8090F58* a4
}
}
s32 sub_8090FEC(s32 a1, u8* strbuf, u8 a3)
s32 sub_8090FEC(s32 a1, u8 *strbuf, u8 a3)
{
s32 i, count;
s32 cond = 0;

View File

@ -317,7 +317,7 @@ static void UpdateKecleonStoreDialogue(void)
if (sKecleonBrosWork1->isKecleonItemShop)
sub_8019FCC(TRUE);
else
sub_801A398(1);
sub_801A398(TRUE);
sub_801AD34(0);
DrawTeamMoneyBox(1);
@ -685,9 +685,9 @@ static void sub_80199CC(void)
BulkItem *item;
if (sKecleonBrosWork1->isKecleonItemShop)
menuAction = sub_8019EDC(1);
menuAction = sub_8019EDC(TRUE);
else
menuAction = sub_801A2A8(1);
menuAction = sub_801A2A8(TRUE);
switch (menuAction) {
case 3:
@ -771,9 +771,9 @@ static void sub_8019BBC(void)
menuAction = 0;
if (sKecleonBrosWork1->isKecleonItemShop)
sub_8019EDC(0);
sub_8019EDC(FALSE);
else
sub_801A2A8(0);
sub_801A2A8(FALSE);
if (sub_8012FD8(&sKecleonBrosWork1->menu) == 0 && (sub_8013114(&sKecleonBrosWork1->menu, &menuAction), menuAction != 1))
sKecleonBrosWork1->menuAction3 = menuAction;

View File

@ -37,12 +37,12 @@ bool8 sub_8019E40(u32 r0)
return TRUE;
}
u32 sub_8019EDC(u8 r0)
u32 sub_8019EDC(bool8 r0)
{
Item slot;
BulkItem *item;
if (r0 == 0) {
if (!r0) {
sub_8013660(&gUnknown_203B214->input);
return 0;
}

View File

@ -37,12 +37,12 @@ u8 sub_801A20C(u32 r0)
return TRUE;
}
u32 sub_801A2A8(u8 r0)
u32 sub_801A2A8(bool8 r0)
{
Item slot;
BulkItem *item;
if (r0 == 0) {
if (!r0) {
sub_8013660(&gUnknown_203B21C->input);
return 0;
}
@ -80,7 +80,7 @@ u8 sub_801A37C(void)
return (gUnknown_203B21C->input.unk1E * gUnknown_203B21C->input.unk1C) + gUnknown_203B21C->input.menuIndex;
}
void sub_801A398(u8 r0)
void sub_801A398(bool8 r0)
{
ResetUnusedInputStruct();
sub_800641C(gUnknown_203B21C->unk3C, FALSE, FALSE);

View File

@ -727,30 +727,30 @@ bool8 IsMoveEnabled(s32 index, Move *moves)
return FALSE;
}
bool8 sub_8093318(s32 param_1, Move *src_struct)
bool8 sub_8093318(s32 param_1, Move *moves)
{
Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(Move) * MAX_MON_MOVES * 2);
MemoryCopy8((void *)dest_struct, (void *)moves, sizeof(Move) * MAX_MON_MOVES * 2);
return TryLinkMovesAfter(param_1, dest_struct);
}
bool8 sub_809333C(s32 param_1, Move *src_struct)
bool8 sub_809333C(s32 param_1, Move *moves)
{
Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(Move) * MAX_MON_MOVES * 2);
MemoryCopy8((void *)dest_struct, (void *)moves, sizeof(Move) * MAX_MON_MOVES * 2);
return UnlinkMovesAfter(param_1, dest_struct);
}
UNUSED static bool8 sub_8093360(s32 param_1, Move *src_struct)
UNUSED static bool8 sub_8093360(s32 param_1, Move *moves)
{
Move dest_struct[MAX_MON_MOVES * 2];
MemoryCopy8((void *)dest_struct, (void *)src_struct, sizeof(Move) * MAX_MON_MOVES * 2);
MemoryCopy8((void *)dest_struct, (void *)moves, sizeof(Move) * MAX_MON_MOVES * 2);
return sub_80933D8(param_1, dest_struct);
}
UNUSED static bool8 IsMoveNotSet(s32 index, Move* struct_ptr)
UNUSED static bool8 IsMoveNotSet(s32 index, Move* moves)
{
if (struct_ptr[index].moveFlags & MOVE_FLAG_SET)
if (moves[index].moveFlags & MOVE_FLAG_SET)
return FALSE;
return TRUE;
}