Alchemy
Loading...
Searching...
No Matches

system.h

Go to the documentation of this file.
1#ifndef ALCHEMY_SYSTEM_H
2#define ALCHEMY_SYSTEM_H
3
4/// @file
5/// The system's routines and globals: interrupts, BIOS sound bias, random
6/// numbers and sleep.
7
8#include "types.h"
9#include "mem.h"
10#include "edition.h"
11#include "farcall.h"
12
16extern u32 gRandomState;
17
18extern u16 gSleepActive;
19
20#include "types.h"
21#include "edition.h"
22
23struct FlashType;
24struct FlashSetupInfo;
26extern const struct FlashSetupInfo gFlash_ChipUnknown;
27extern u32 gFlash_Handler1;
29#ifndef OWN_Flash_Handler4
30extern u16 *gFlash_Handler4;
31#endif
32#ifndef OWN_gFlash
33extern const struct FlashType *gFlash;
34#endif
35#ifndef OWN_gFlashSavedIme
36extern u16 gFlashSavedIme;
37#endif
38#ifndef OWN_gFlashTimeoutFlag
40#endif
41extern u8 gFlashTimerNum;
43extern u8 gNumberTextHexEnd[];
45extern void *Resource_DirectoryTable[];
48extern const u16 gUi_WindowPalette[];
49#ifndef OWN_CountRemainingErasedFlashBytes
51#endif
53#ifndef OWN_StartFlashTimer
54void StartFlashTimer(u8 index);
55#endif
56
57struct AnimationEntry;
58struct AnimationObject;
59struct SelectionNode;
60struct T;
61
62struct S {
67 u8 pad10[32];
72 u8 pad40[16];
73 struct T *f50;
74};
76#ifndef OWN_Flash_Handler0
77extern u32 gFlash_Handler0;
78#endif
79extern struct AnimationEntry *gAnimationObjects[];
80extern u16 *gDebugTextCursor;
82#ifndef OWN_gFlashNumRemainingBytes
84#endif
85extern u8 gSaveBuffer[];
86extern s16 gSaveSlot;
87extern u8 IwramCodeRecords[];
88extern u8 LoadedRuntime_Size[];
89extern const u16 gMath_ArcTanTable[];
90extern const u8 gObject_ShadowTiles[];
91extern const u8 Render_BuildOamListKernel[];
92extern const u8 Resource_ExecuteTransfer[];
93extern const u8 Resource_PatchThumbBranch[];
94extern const u8 gRom_LanguageCode;
95extern u8 gRom_UnknownBytes[];
96extern const u32 BattleFx_Max4Reverse[];
97extern const u32 BattleFx_Max4Forward[];
98extern const u32 BattleFx_MaxReverse[];
99extern const u32 BattleFx_MaxForward[];
100extern const u32 BattleFx_ColorReverse[];
101extern const u32 BattleFx_ColorForward[];
102extern const u32 BattleFx_AdditiveReverse[];
103extern const u32 BattleFx_AdditiveForward[];
104extern const u32 BattleFx_Mask[];
105extern const u32 BattleFx_Transparent8Reverse[];
106extern const u32 BattleFx_Transparent8Forward[];
107extern const u32 BattleFx_TransparentReverse[];
108extern const u32 BattleFx_TransparentForward[];
109extern const u32 BattleFx_CopyReverse[];
110extern const u32 BattleFx_CopyForward[];
111extern const u8 gSystem_BasicColorPalette[];
112extern u8 Tile_CopyStrided[];
115void _call_via_r2(s32 arg0, s32 arg1, s32 target);
116void IwramHalt(void);
118
119#endif
u16 gFlashNumRemainingBytes
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
Public interfaces to the engine's code banks.
u16 gFlashSavedIme
u32 gEraseFlashSector
u32 gFlash_Handler1
u8 gFlashTimerNum
u16 * gFlash_Handler4
void StartFlashTimer(u8 timingIndex)
Starts the selected operation timeout, saving the interrupt-enable state.
Definition flash.c:119
u8 gFlashTimeoutFlag
u32 gFlash_Handler0
const struct FlashType * gFlash
struct FlashSetupInfo gFlash_ChipAtmel
const struct FlashSetupInfo gFlash_ChipUnknown
The heaps: allocating and freeing blocks.
s32 RunFlashEraseVerifier(u8 *ptr, s32(*verify)(u8 *))
Converts a nonzero erased-byte remainder into the flash verification error.
Definition sst.c:191
s32 CountRemainingErasedFlashBytes(u8 *ptr)
Returns how many bytes remain when the first non-erased byte is found.
Definition sst.c:180
One animation layer of a sprite: its animation id, frames, running script and timer.
Definition animspr.h:37
An animated sprite: its image and shadow, scale, rotation, size and up to four animation layers.
Definition animspr.h:108
Settings for each flash chip model (44 bytes), in flash_setup's field order from flashset....
Definition flash_data.h:29
Flash chip type (the 24-byte record pointed to by gFlash).
Definition flash_data.h:20
Definition system.h:62
s32 f08
Definition system.h:65
s32 f3c
Definition system.h:71
u8 pad40[16]
Definition system.h:72
s32 f0c
Definition system.h:66
s32 f34
Definition system.h:69
s32 f30
Definition system.h:68
u8 pad10[32]
Definition system.h:67
s32 f38
Definition system.h:70
struct T * f50
Definition system.h:73
s32 f04
Definition system.h:64
s32 f00
Definition system.h:63
An icon of the selection screen: its list links, the entry it shows, its place and its slide toward a...
Definition select.h:31
Definition field.h:93
u8 gRom_UnknownBytes[]
u8 TransferCommandExecutor_Size[]
const u32 BattleFx_Max4Forward[]
const u32 BattleFx_ColorForward[]
const u8 gRom_LanguageCode
const u8 gSystem_BasicColorPalette[]
u8 LoadedRuntime_Size[]
u16 gSleepActive
const u32 BattleFx_AdditiveReverse[]
void System_WaitForFrameInterrupt(void)
u8 IwramSoundPresetCode[]
const u32 BattleFx_TransparentForward[]
const u32 BattleFx_AdditiveForward[]
void Bios_SoundBiasOn(void)
u8 gResourceSlot_ConversionTables[][256]
const u8 gObject_ShadowTiles[]
u8 IwramCodeRecords[]
const u32 BattleFx_MaxReverse[]
const u16 gUi_WindowPalette[]
const u32 BattleFx_TransparentReverse[]
const u32 BattleFx_Max4Reverse[]
void * Resource_DirectoryTable[]
u8 gDebugTextEnabled
struct AnimationEntry * gAnimationObjects[]
const u8 Render_BuildOamListKernel[]
u8 gNumberTextHexEnd[]
const u32 BattleFx_Transparent8Forward[]
u8 Tile_CopyStridedCodeSize[]
const u16 gMath_ArcTanTable[]
const u8 Resource_ExecuteTransfer[]
void Bios_SoundBiasOff(void)
const u32 BattleFx_Transparent8Reverse[]
void _call_via_r2(s32 arg0, s32 arg1, s32 target)
u8 gLink_TimeLabelString[]
const u32 BattleFx_Mask[]
const u32 BattleFx_CopyReverse[]
u8 Tile_CopyStrided[]
u16 * gDebugTextCursor
s16 gSaveSlot
u8 Resource_PatchThumbBranchCodeSize[]
const u32 BattleFx_MaxForward[]
u8 gNumberTextDecimalEnd[]
const u8 Resource_PatchThumbBranch[]
void SoundDriver_EnterMixer(void)
const u32 BattleFx_CopyForward[]
u32 gRandomState
const u32 BattleFx_ColorReverse[]
void IwramHalt(void)
u8 gSaveBuffer[]
The integer types, TRUE, UNUSED and the fixed-address macros.
signed int s32
Definition types.h:14
unsigned int u32
Definition types.h:15
signed short s16
Definition types.h:12
unsigned short u16
Definition types.h:13
unsigned char u8
Definition types.h:11