pokeemerald/include/main.h
Hedara 2b92ba315a Merge commit '59d315734d8c5f5b3b2f16f3299355aa99f5f483' into pret-merge
Conflicts:
	include/battle_anim.h
	include/battle_controllers.h
	include/battle_gfx_sfx_util.h
	include/battle_interface.h
	include/battle_main.h
	include/battle_script_commands.h
	include/battle_util.h
	include/easy_chat.h
	include/event_object_movement.h
	include/field_effect.h
	include/field_effect_helpers.h
	include/field_player_avatar.h
	include/intro.h
	include/item_use.h
	include/metatile_behavior.h
	include/move_relearner.h
	include/pokedex.h
	include/pokemon.h
	include/pokemon_icon.h
	include/roamer.h
	include/script_pokemon_util.h
	include/sprite.h
	include/text.h
	include/wild_encounter.h
	src/battle_controllers.c
2025-05-24 20:38:21 +02:00

77 lines
2.4 KiB
C

#ifndef GUARD_MAIN_H
#define GUARD_MAIN_H
typedef void (*MainCallback)(void);
typedef void (*IntrCallback)(void);
typedef void (*IntrFunc)(void);
struct Main
{
/*0x000*/ MainCallback callback1;
/*0x004*/ MainCallback callback2;
/*0x008*/ MainCallback savedCallback;
/*0x00C*/ IntrCallback vblankCallback;
/*0x010*/ IntrCallback hblankCallback;
/*0x014*/ IntrCallback vcountCallback;
/*0x018*/ IntrCallback serialCallback;
/*0x01C*/ vu16 intrCheck;
/*0x020*/ u32 vblankCounter1;
/*0x024*/ u32 vblankCounter2;
/*0x028*/ u16 heldKeysRaw; // held keys without L=A remapping
/*0x02A*/ u16 newKeysRaw; // newly pressed keys without L=A remapping
/*0x02C*/ u16 heldKeys; // held keys with L=A remapping
/*0x02E*/ u16 newKeys; // newly pressed keys with L=A remapping
/*0x030*/ u16 newAndRepeatedKeys; // newly pressed keys plus key repeat
/*0x032*/ u16 keyRepeatCounter; // counts down to 0, triggering key repeat
/*0x034*/ bool16 watchedKeysPressed; // whether one of the watched keys was pressed
/*0x036*/ u16 watchedKeysMask; // bit mask for watched keys
/*0x038*/ struct OamData oamBuffer[128];
/*0x438*/ u8 state;
/*0x439*/ u8 oamLoadDisabled:1;
/*0x439*/ u8 inBattle:1;
/*0x439*/ u8 anyLinkBattlerHasFrontierPass:1;
};
#define GAME_CODE_LENGTH 4
extern const u8 gGameVersion;
extern const u8 gGameLanguage;
extern const u8 RomHeaderGameCode[GAME_CODE_LENGTH];
extern const u8 RomHeaderSoftwareVersion;
extern u16 gKeyRepeatStartDelay;
extern bool8 gLinkTransferringData;
extern struct Main gMain;
extern u16 gKeyRepeatContinueDelay;
extern bool8 gSoftResetDisabled;
extern IntrFunc gIntrTable[];
extern u8 gLinkVSyncDisabled;
extern s8 gPcmDmaCounter;
void AgbMain(void);
void AgbMainLoop(void);
void SetMainCallback2(MainCallback callback);
void InitKeys(void);
void SetVBlankCallback(IntrCallback callback);
void SetHBlankCallback(IntrCallback callback);
void SetVCountCallback(IntrCallback callback);
void SetSerialCallback(IntrCallback callback);
void InitFlashTimer(void);
void SetTrainerHillVBlankCounter(u32 *counter);
void ClearTrainerHillVBlankCounter(void);
void DoSoftReset(void);
void ClearPokemonCrySongs(void);
void RestoreSerialTimer3IntrHandlers(void);
void StartTimer1(void);
void SeedRngAndSetTrainerId(void);
u16 GetGeneratedTrainerIdLower(void);
#endif // GUARD_MAIN_H