fix battle transition conflicts

This commit is contained in:
DizzyEggg
2018-01-14 22:19:26 +01:00
806 changed files with 26595 additions and 2758 deletions

View File

@@ -1,6 +1,23 @@
#ifndef GUARD_CONFIG_H
#define GUARD_CONFIG_H
// In the Generation 3 games, Asserts were used in various debug builds.
// Ruby/Sapphire and Emerald do not have these asserts while Fire Red
// still has them in the ROM. This is because the developers forgot
// to define NDEBUG before release, however this has been changed as
// Ruby's actual debug build does not use the AGBPrint features.
#define NDEBUG
// To enable print debugging, comment out "#define NDEBUG". This allows
// the various AGBPrint functions to be used. (See include/gba/isagbprint.h).
// Some emulators support a debug console window: uncomment NoCashGBAPrint()
// and NoCashGBAPrintf() in libisagbprn.c to use no$gba's own proprietary
// printing system. Use NoCashGBAPrint() and NoCashGBAPrintf() like you
// would normally use AGBPrint() and AGBPrintf().
// NOTE: Don't try to enable assert right now as many pointers
// still exist in defines and WILL likely result in a broken ROM.
#define ENGLISH
#ifdef ENGLISH

View File

@@ -3,8 +3,8 @@
void ClearDma3Requests(void);
void ProcessDma3Requests(void);
int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
s16 RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
s16 RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
int CheckForSpaceForDma3Request(s16 index);
#endif // GUARD_DMA3_H

View File

@@ -25,5 +25,6 @@ extern u16 gUnknown_03005DE8;
void DrawWholeMapView(void);
void CurrentMapDrawMetatileAt(int x, int y);
void sub_8089C08(s16 *a0, s16 *a1);
void DrawDoorMetatileAt(int x, int y, u16 *arr);
#endif //GUARD_FIELD_CAMERA_H

View File

@@ -1,6 +1,21 @@
#ifndef GUARD_FIELDDOOR_H
#define GUARD_FIELDDOOR_H
struct DoorGraphics
{
u16 metatileNum;
u8 sound;
u8 size;
const void *tiles;
const void *palette;
};
struct DoorAnimFrame
{
u8 time;
u16 offset;
};
void FieldSetDoorOpened(u32, u32);
void FieldSetDoorClosed(u32, u32);
s8 FieldAnimateDoorClose(u32, u32);

View File

@@ -76,5 +76,7 @@ bool8 FieldEffectActiveListContains(u8 id);
void sub_80B69DC(void);
void FieldEffectStop(struct Sprite *sprite, u8 id);
u8 CreateTrainerSprite(u8 trainerSpriteID, s16 x, s16 y, u8 subpriority, u8 *buffer);
void sub_80B7FC8(void);
void FieldEffectActiveListRemove(u8 id);
#endif //GUARD_FIELD_EFFECTS_H

View File

@@ -0,0 +1,7 @@
#ifndef GUARD_FLDEFF_TELEPORT_H
#define GUARD_FLDEFF_TELEPORT_H
void hm_teleport_run_dp02scr(void);
void sub_817C94C(void);
#endif // GUARD_FLDEFF_TELEPORT_H

View File

@@ -7,5 +7,6 @@
#include "gba/multiboot.h"
#include "gba/syscall.h"
#include "gba/macro.h"
#include "gba/isagbprint.h"
#endif // GUARD_GBA_GBA_H

50
include/gba/isagbprint.h Executable file
View File

@@ -0,0 +1,50 @@
#ifndef GUARD_GBA_ISAGBPRINT_H
#define GUARD_GBA_ISAGBPRINT_H
#ifdef NDEBUG
#define AGBPrintInit()
#define AGBPutc(cChr)
#define AGBPrint(pBuf)
#define AGBPrintf(pBuf, ...)
#define AGBPrintFlush1Block()
#define AGBPrintFlush()
#define AGBAssert(pFile, nLine, pExpression, nStopProgram)
#else
void AGBPrintInit(void);
void AGBPutc(const char cChr);
void AGBPrint(const char *pBuf);
void AGBPrintf(const char *pBuf, ...);
void AGBPrintFlush1Block(void);
void AGBPrintFlush(void);
void AGBAssert(const char *pFile, int nLine, const char *pExpression, int nStopProgram);
#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
// 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);
#endif
#endif // GUARD_GBA_ISAGBPRINT_H

View File

@@ -1,8 +1,8 @@
#ifndef GUARD_GLOBAL_H
#define GUARD_GLOBAL_H
#include "config.h" // we need to define config before gba headers as print stuff needs the functions nulled before defines.
#include "gba/gba.h"
#include "config.h"
// Prevent cross-jump optimization.
#define BLOCK_CROSS_JUMP asm("");
@@ -31,6 +31,8 @@ char* strcpy(char *dst0, const char *src0);
#define POKEMON_NAME_LENGTH 10
#define OT_NAME_LENGTH 7
#define HEAP_SIZE 0x1C000
extern u8 gStringVar1[];
extern u8 gStringVar2[];
extern u8 gStringVar3[];

View File

@@ -42,6 +42,9 @@ void sub_8084EBC(s16, s16);
void player_avatar_init_params_reset(void);
bool8 Overworld_MapTypeAllowsTeleportAndFly(u8 mapType);
void Overworld_ResetStateAfterTeleport(void);
void Overworld_SetFlashLevel(s32 a1);
//u8 Overworld_GetFlashLevel(void);
void sub_8085524(u16);

View File

@@ -16,5 +16,7 @@ void sub_81B58A8(void);
void DoWallyTutorialBagMenu(void);
u8 pokemon_ailments_get_primary(u32 status);
u8 *GetMonNickname(struct Pokemon *mon, u8 *dst);
u8 GetCursorSelectionMonId(void);
bool8 FieldCallback_Teleport(void);
#endif // GUARD_PARTY_MENU_H

View File

@@ -11,5 +11,6 @@ void UpdateBirchState(u16 days);
void UpdateFrontierManiac(u16 days);
void UpdateFrontierGambler(u16 days);
void SetShoalItemFlag(u16 days);
u8 oei_task_add(void);
#endif //GUARD_ROM6_H