Merge branch 'master' of https://github.com/pret/pokeemerald into ui-standardize
This commit is contained in:
@@ -67,11 +67,8 @@
|
||||
#define DISPLAY_WIDTH 240
|
||||
#define DISPLAY_HEIGHT 160
|
||||
|
||||
#define PLTT_SIZEOF(n) ((n) * sizeof(u16))
|
||||
#define PLTT_SIZE_4BPP PLTT_SIZEOF(16)
|
||||
#define PLTT_SIZE_8BPP PLTT_SIZEOF(256)
|
||||
|
||||
#define PLTT_OFFSET_4BPP(n) ((n) * PLTT_SIZE_4BPP)
|
||||
#define DISPLAY_TILE_WIDTH (DISPLAY_WIDTH / 8)
|
||||
#define DISPLAY_TILE_HEIGHT (DISPLAY_HEIGHT / 8)
|
||||
|
||||
#define TILE_SIZE_4BPP 32
|
||||
#define TILE_SIZE_8BPP 64
|
||||
@@ -81,4 +78,10 @@
|
||||
|
||||
#define TOTAL_OBJ_TILE_COUNT 1024
|
||||
|
||||
#define PLTT_SIZEOF(n) ((n) * sizeof(u16))
|
||||
#define PLTT_SIZE_4BPP PLTT_SIZEOF(16)
|
||||
#define PLTT_SIZE_8BPP PLTT_SIZEOF(256)
|
||||
|
||||
#define PLTT_OFFSET_4BPP(n) ((n) * PLTT_SIZE_4BPP)
|
||||
|
||||
#endif // GUARD_GBA_DEFINES_H
|
||||
|
||||
@@ -1,50 +1,68 @@
|
||||
#ifndef GUARD_GBA_ISAGBPRINT_H
|
||||
#define GUARD_GBA_ISAGBPRINT_H
|
||||
|
||||
#include "gba/types.h"
|
||||
|
||||
#define MGBA_LOG_FATAL (0)
|
||||
#define MGBA_LOG_ERROR (1)
|
||||
#define MGBA_LOG_WARN (2)
|
||||
#define MGBA_LOG_INFO (3)
|
||||
#define MGBA_LOG_DEBUG (4)
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define DebugPrintf(pBuf, ...)
|
||||
#define DebugPrintfLevel(level, pBuf, ...)
|
||||
#define MgbaOpen()
|
||||
#define MgbaClose()
|
||||
#define AGBPrintInit()
|
||||
#define AGBPutc(cChr)
|
||||
#define AGBPrint(pBuf)
|
||||
#define AGBPrintf(pBuf, ...)
|
||||
#define AGBPrintFlush1Block()
|
||||
#define AGBPrintFlush()
|
||||
#define AGBAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#else
|
||||
void AGBPrintInit(void);
|
||||
void AGBPutc(const char cChr);
|
||||
void AGBPrint(const char *pBuf);
|
||||
|
||||
bool32 MgbaOpen(void);
|
||||
void MgbaClose(void);
|
||||
void MgbaPrintf(s32 level, const char *pBuf, ...);
|
||||
void MgbaAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram);
|
||||
void NoCashGBAPrintf(const char *pBuf, ...);
|
||||
void NoCashGBAAssert(const char *pFile, s32 nLine, const char *pExpression, bool32 nStopProgram);
|
||||
void AGBPrintf(const char *pBuf, ...);
|
||||
void AGBPrintFlush1Block(void);
|
||||
void AGBPrintFlush(void);
|
||||
void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopProgram);
|
||||
void AGBPrintInit(void);
|
||||
|
||||
#if (LOG_HANDLER == LOG_HANDLER_MGBA_PRINT)
|
||||
|
||||
#define DebugPrintf(pBuf, ...) MgbaPrintf(MGBA_LOG_INFO, pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) MgbaAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) MgbaPrintf(level, pBuf, ## __VA_ARGS__)
|
||||
|
||||
#elif (LOG_HANDLER == LOG_HANDLER_NOCASH_PRINT)
|
||||
|
||||
#define DebugPrintf(pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) NoCashGBAAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) NoCashGBAPrintf(pBuf, ## __VA_ARGS__)
|
||||
|
||||
#else // Default to AGBPrint
|
||||
|
||||
#define DebugPrintf(pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||
#define DebugAssert(pFile, nLine, pExpression, nStopProgram) AGBAssert(pFile, nLine, pExpression, nStopProgram)
|
||||
#define DebugPrintfLevel(level, pBuf, ...) AGBPrintf(pBuf, ## __VA_ARGS__)
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#undef AGB_ASSERT
|
||||
#ifdef NDEBUG
|
||||
|
||||
#define AGB_ASSERT(exp)
|
||||
#else
|
||||
#define AGB_ASSERT(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 1);
|
||||
#endif
|
||||
|
||||
#undef AGB_WARNING
|
||||
#ifdef NDEBUG
|
||||
#define AGB_WARNING(exp)
|
||||
#else
|
||||
#define AGB_WARNING(exp) (exp) ? ((void *)0) : AGBAssert(__FILE__, __LINE__, #exp, 0);
|
||||
#endif
|
||||
#define AGB_ASSERT_EX(exp, file, line)
|
||||
#define AGB_WARNING_EX(exp, file, line)
|
||||
|
||||
// for matching purposes
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define AGB_ASSERT_EX(exp, file, line)
|
||||
#else
|
||||
#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 1);
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
#define AGB_WARNING_EX(exp, file, line)
|
||||
#else
|
||||
#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : AGBAssert(file, line, #exp, 0);
|
||||
#define AGB_ASSERT(exp) (exp) ? ((void*)0) : DebugAssert(__FILE__, __LINE__, #exp, TRUE)
|
||||
#define AGB_WARNING(exp) (exp) ? ((void*)0) : DebugAssert(__FILE__, __LINE__, #exp, FALSE)
|
||||
|
||||
#define AGB_WARNING_EX(exp, file, line) (exp) ? ((void *)0) : DebugAssert(file, line, #exp, FALSE);
|
||||
#define AGB_ASSERT_EX(exp, file, line) (exp) ? ((void *)0) : DebugAssert(file, line, #exp, TRUE);
|
||||
#endif
|
||||
|
||||
#endif // GUARD_GBA_ISAGBPRINT_H
|
||||
|
||||
@@ -10,7 +10,7 @@ struct MultiBootParam
|
||||
{
|
||||
u32 system_work[5]; // 00
|
||||
u8 handshake_data; // 14
|
||||
u8 padding; // 15
|
||||
//u8 padding; // 15
|
||||
u16 handshake_timeout; // 16
|
||||
u8 probe_count; // 18
|
||||
u8 client_data[MULTIBOOT_NCHILD]; // 19
|
||||
|
||||
Reference in New Issue
Block a user