resolve implicit declarations and enforce warnings as errors

This commit is contained in:
ProjectRevoTPP
2017-03-05 07:35:03 +00:00
parent d12fd5c5ce
commit 4df1842682
19 changed files with 457 additions and 257 deletions

View File

@@ -1,3 +1,6 @@
#include GUARD_BATTLE_H
#define GUARD_BATTLE_H
#define BATTLE_TYPE_DOUBLE 0x0001
#define BATTLE_TYPE_LINK 0x0002
#define BATTLE_TYPE_WILD 0x0004
@@ -21,4 +24,6 @@
#define AI_ACTION_UNK5 0x0010
#define AI_ACTION_UNK6 0x0020
#define AI_ACTION_UNK7 0x0040
#define AI_ACTION_UNK8 0x0080
#define AI_ACTION_UNK8 0x0080
#endif

23
include/dma3.h Normal file
View File

@@ -0,0 +1,23 @@
#ifndef GUARD_DMA3_H
#define GUARD_DMA3_H
extern u8 gDma3ManagerLocked;
extern u8 gDma3RequestCursor;
struct DmaRequestsStruct
{
/* 0x00 */ u8 *src;
/* 0x04 */ u8 *dest;
/* 0x08 */ u16 size;
/* 0x0A */ u16 mode;
/* 0x0C */ u32 value;
};
extern struct DmaRequestsStruct gDma3Requests[128];
void ClearDma3Requests(void);
void ProcessDma3Requests(void);
int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode);
int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
#endif

18
include/m4a.h Normal file
View File

@@ -0,0 +1,18 @@
#ifndef GUARD_M4A_H
#define GUARD_M4A_H
#include "gba/m4a_internal.h"
void m4aSoundVSync(void);
void m4aSoundInit(void);
void m4aSoundMain(void);
void m4aSongNumStart(u16);
void m4aSongNumStop(u16 n);
void m4aMPlayContinue(struct MusicPlayerInfo *mplayInfo);
void m4aMPlayFadeOut(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayFadeOutTemporarily(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayFadeIn(struct MusicPlayerInfo *mplayInfo, u16 speed);
void m4aMPlayImmInit(struct MusicPlayerInfo *mplayInfo);
#endif //GUARD_M4A_H

48
include/rtc.h Normal file
View File

@@ -0,0 +1,48 @@
#ifndef GUARD_RTC_UTIL_H
#define GUARD_RTC_UTIL_H
#include "siirtc.h"
#define RTC_INIT_ERROR 0x0001
#define RTC_INIT_WARNING 0x0002
#define RTC_ERR_12HOUR_CLOCK 0x0010
#define RTC_ERR_POWER_FAILURE 0x0020
#define RTC_ERR_INVALID_YEAR 0x0040
#define RTC_ERR_INVALID_MONTH 0x0080
#define RTC_ERR_INVALID_DAY 0x0100
#define RTC_ERR_INVALID_HOUR 0x0200
#define RTC_ERR_INVALID_MINUTE 0x0400
#define RTC_ERR_INVALID_SECOND 0x0800
#define RTC_ERR_FLAG_MASK 0x0FF0
extern struct Time gLocalTime;
void RtcDisableInterrupts(void);
void RtcRestoreInterrupts(void);
u32 ConvertBcdToBinary(u8 bcd);
bool8 IsLeapYear(u8 year);
u16 ConvertDateToDayCount(u8 year, u8 month, u8 day);
u16 RtcGetDayCount(struct SiiRtcInfo *rtc);
void RtcInit(void);
u16 RtcGetErrorStatus(void);
void RtcGetInfo(struct SiiRtcInfo *rtc);
void RtcGetDateTime(struct SiiRtcInfo *rtc);
void RtcGetStatus(struct SiiRtcInfo *rtc);
void RtcGetRawInfo(struct SiiRtcInfo *rtc);
u16 RtcCheckInfo(struct SiiRtcInfo *rtc);
void RtcReset(void);
void FormatDecimalTime(u8 *dest, s32 hour, s32 minute, s32 second);
void FormatHexTime(u8 *dest, s32 hour, s32 minute, s32 second);
void FormatHexRtcTime(u8 *dest);
void FormatDecimalDate(u8 *dest, s32 year, s32 month, s32 day);
void FormatHexDate(u8 *dest, s32 year, s32 month, s32 day);
void RtcCalcTimeDifference(struct SiiRtcInfo *rtc, struct Time *result, struct Time *t);
void RtcCalcLocalTime(void);
void RtcInitLocalTimeOffset(s32 hour, s32 minute);
void RtcCalcLocalTimeOffset(s32 days, s32 hours, s32 minutes, s32 seconds);
void CalcTimeDifference(struct Time *result, struct Time *t1, struct Time *t2);
u32 RtcGetMinuteCount(void);
#endif // GUARD_RTC_UTIL_H