Skip to content

Commit

Permalink
Merge pull request #142 from adrienntindall/master
Browse files Browse the repository at this point in the history
Add Compiler Warnings
  • Loading branch information
red031000 committed May 29, 2023
2 parents 34ab060 + 3695578 commit 1f63e3d
Show file tree
Hide file tree
Showing 129 changed files with 847 additions and 201 deletions.
3 changes: 2 additions & 1 deletion common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,8 @@ XMAP := $(NEF).xMAP

EXCCFLAGS := -Cpp_exceptions off

MWCFLAGS = $(DEFINES) $(OPTFLAGS) -enum int -lang c99 $(EXCCFLAGS) -gccext,on -proc $(PROC) -msgstyle gcc -gccinc -i ./include -i ./include/library -i $(WORK_DIR)/files -I$(WORK_DIR)/lib/include -ipa file -interworking -inline on,noauto -char signed #-W all -W noimpl_signedunsigned
MWCFLAGS = $(DEFINES) $(OPTFLAGS) -enum int -lang c99 $(EXCCFLAGS) -gccext,on -proc $(PROC) -msgstyle gcc -gccinc -i ./include -i ./include/library -i $(WORK_DIR)/files -I$(WORK_DIR)/lib/include -ipa file -interworking -inline on,noauto -char signed -W all -W nopedantic -W noimpl_signedunsigned -W noimplicitconv -W nounusedarg -W nomissingreturn -W error

MWASFLAGS = $(DEFINES) -proc $(PROC_S) -gccinc -i . -i ./include -i $(WORK_DIR)/asm/include -i $(WORK_DIR)/files -i $(WORK_DIR)/lib/asm/include -i $(WORK_DIR)/lib/NitroDWC/asm/include -i $(WORK_DIR)/lib/NitroSDK/asm/include -i $(WORK_DIR)/lib/syscall/asm/include -I$(WORK_DIR)/lib/include -DSDK_ASM
MWLDFLAGS := -w off -proc $(PROC) -nopic -nopid -interworking -map closure,unused -symtab sort -m _start -msgstyle gcc
ARFLAGS := rcS
Expand Down
3 changes: 3 additions & 0 deletions include/battle_arcade_game_board.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,8 @@ typedef struct BATTLE_ARCADE_OBJECT {
BOOL BattleArcadeGameBoard_InitOverlay(OVY_MANAGER *man, int *state);
BOOL BattleArcadeGameBoard_Main(OVY_MANAGER *man, int *state);
BOOL ov84_0223DFF0(OVY_MANAGER *man, int *state);
void ov84_0223ED34(int a0, int size, void *data, void *_work);
void ov84_0223EDA8(int a0, int size, void *data, void *_work);
void ov84_0223EE08(int a0, int size, void *data, void *_work);

#endif
242 changes: 242 additions & 0 deletions include/battle_command.h

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions include/battle_setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "player_data.h"
#include "trainer_data.h"

typedef struct BattleSetupStruct {
struct BATTLE_SETUP { //declared in trainer_data.h
u32 flags;
PARTY *party[4];
u32 winFlag;
Expand Down Expand Up @@ -61,12 +61,18 @@ typedef struct BattleSetupStruct {
u8 unk1CD;
u8 unk1CE;
u8 unk1CF;
} BATTLE_SETUP;
};

BOOL IsBattleResultWin(u32 a0);
int sub_02052564(u32 a0);
int sub_02052574(u32 a0);
void BattleSetup_Delete(BATTLE_SETUP *setup);
BATTLE_SETUP *sub_02051AAC(HeapID heapId, FieldSystem *fsys);
void sub_02052444(BATTLE_SETUP *setup, FieldSystem *fsys);
void BattleSetup_InitFromFsys(BATTLE_SETUP *setup, FieldSystem *fsys);
BATTLE_SETUP *BattleSetup_New(HeapID heapId, u32 battleFlags);
void sub_020522F0(BATTLE_SETUP *setup, FieldSystem *fsys, void *a1);
void sub_02051F2C(BATTLE_SETUP *setup, FieldSystem *fsys, int level);
void sub_020520B0(BATTLE_SETUP *setup, FieldSystem *fsys, PARTY *party, void *a4);

#endif //POKEHEARTGOLD_BATTLE_SETUP_H
2 changes: 2 additions & 0 deletions include/battle_system.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ SOUND_CHATOT *BattleSys_GetChatotVoice(BattleSystem *bsys, int battlerId);
int BattleSys_GetChatotVoiceParam(BattleSystem *bsys, int battlerId);
int BattleSys_GetBattlerIdPartner(BattleSystem *bsys, int battlerId);
int BattleSys_GetTrainerIndex(BattleSystem *bsys, int battlerId);
BOOL Link_QueueNotEmpty(BATTLECONTEXT *ctx);
BOOL BattleSys_AreBattleAnimationsOn(BattleSystem *bsys);

#endif
3 changes: 2 additions & 1 deletion include/bug_contest.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ void BugContest_RestoreParty_RetrieveCaughtPokemon(BUGCONTEST *bugContest);
BOOL BugContest_ContestantIsRegisteredN(BUGCONTEST *bugContest, u8 id, u8 n);
void BugContest_InitOpponents(BUGCONTEST *bugContest);
void BugContest_InitEncounters(BUGCONTEST *bugContest);
u16 BugContest_JudgePlayerMon(BUGCONTEST *bugContest, Pokemon *mon);
u16 BugContest_JudgePlayerMon(BUGCONTEST *bugContest, Pokemon *pokemon);
ENC_SLOT *BugContest_GetEncounterSlot(BUGCONTEST *bugContest, HeapID heapId);

#endif //POKEHEARTGOLD_BUG_CONTEST_H
4 changes: 2 additions & 2 deletions include/constants/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -403,12 +403,12 @@ typedef enum BaseStat {
BASE_DEF,
BASE_SPEED,
BASE_SPATK,
BASE_SPDEF,
BASE_SPDEF, //5
BASE_TYPE1,
BASE_TYPE2,
BASE_CATCH_RATE,
BASE_EXP_YIELD,
BASE_HP_YIELD,
BASE_HP_YIELD, //10
BASE_ATK_YIELD,
BASE_DEF_YIELD,
BASE_SPEED_YIELD,
Expand Down
2 changes: 2 additions & 0 deletions include/easy_chat.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,7 @@ ECWORD WallpaperPasswordBank_GetWordI(struct WallpaperPasswordBank *pwdBank, int
s16 WallpaperPasswordBank_GetIndexOfWord(struct WallpaperPasswordBank *unk, int value);
s32 GetDuplicateWordNum(ECWORD a0);
ECWORD RemapDuplicateWord(ECWORD a0, s32 a1);
ECMAN *EasyChatManager_new(HeapID heapId);
struct WallpaperPasswordBank *WallpaperPasswordBank_Create(HeapID heapId);

#endif //POKEHEARTGOLD_EASY_CHAT_H
5 changes: 4 additions & 1 deletion include/encounter.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ void SetupAndStartTutorialBattle(TaskManager *taskManager);
void SetupAndStartTrainerBattle(TaskManager *taskManager, u32 opponentTrainer1, u32 opponentTrainer2, u32 followerTrainerNum, u32 a4, u32 a5, HeapID heapId, u32 *winFlag);
void sub_02050B90(FieldSystem *fsys, TaskManager *taskManager, BATTLE_SETUP *setup);
void sub_0205239C(BATTLE_SETUP *setup, FieldSystem *fsys);
BATTLE_SETUP *BattleSetup_New(HeapID heapId, int battleType);
void sub_02050AAC(TaskManager *man, BATTLE_SETUP *setup, int effect, int bgm, u32 *winFlag);
void sub_020511F8(FieldSystem *fsys, BATTLE_SETUP *setup);
void sub_020515FC(FieldSystem *fsys, PARTY *party, int battleFlags);
void sub_02051598(FieldSystem *fsys, void *a1, int battleFlags);
void sub_020514A4(TaskManager *man, int target, int maxLevel, int flag);

#endif //POKEHEARTGOLD_ENCOUNTER_H
Loading

0 comments on commit 1f63e3d

Please sign in to comment.