add important headers, const ptrs and egg hatch start
This commit is contained in:
43
include/bg.h
Normal file
43
include/bg.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#ifndef GUARD_BG_H
|
||||
#define GUARD_BG_H
|
||||
|
||||
enum
|
||||
{
|
||||
BG_CTRL_ATTR_VISIBLE = 1,
|
||||
BG_CTRL_ATTR_CHARBASEINDEX = 2,
|
||||
BG_CTRL_ATTR_MAPBASEINDEX = 3,
|
||||
BG_CTRL_ATTR_SCREENSIZE = 4,
|
||||
BG_CTRL_ATTR_PALETTEMODE = 5,
|
||||
BG_CTRL_ATTR_PRIORITY = 6,
|
||||
BG_CTRL_ATTR_MOSAIC = 7,
|
||||
BG_CTRL_ATTR_WRAPAROUND = 8,
|
||||
};
|
||||
|
||||
struct BgTemplate
|
||||
{
|
||||
u32 bg:2;
|
||||
u32 charBaseIndex:2;
|
||||
u32 mapBaseIndex:5;
|
||||
u32 screenSize:2;
|
||||
u32 paletteMode:1;
|
||||
u32 priority:2;
|
||||
u32 baseTile:10;
|
||||
};
|
||||
|
||||
void ResetBgsAndClearDma3BusyFlags(u32 leftoverFireRedLeafGreenVariable);
|
||||
void InitBgsFromTemplates(u8 bgMode, const struct BgTemplate *templates, u8 numTemplates);
|
||||
void SetBgAttribute(u8 bg, u8 attributeId, u8 value);
|
||||
u16 GetBgAttribute(u8 bg, u8 attributeId);
|
||||
u32 ChangeBgX(u8 bg, u32 value, u8 op);
|
||||
u32 GetBgX(u8 bg);
|
||||
u32 ChangeBgY(u8 bg, u32 value, u8 op);
|
||||
u32 ChangeBgY_ScreenOff(u8 bg, u32 value, u8 op);
|
||||
u32 GetBgY(u8 bg);
|
||||
void SetBgAffine(u8 bg, u32 srcCenterX, u32 srcCenterY, s16 dispCenterX, s16 dispCenterY, s16 scaleX, s16 scaleY, u16 rotationAngle);
|
||||
void SetBgTilemapBuffer(u8 bg, void *tilemap);
|
||||
void UnsetBgTilemapBuffer(u8 bg);
|
||||
void CopyToBgTilemapBuffer(u8 bg, const void *src, u16 mode, u16 destOffset);
|
||||
void CopyBgTilemapBufferToVram(u8 bg);
|
||||
u16 LoadBgTiles(u8 bg, const void* src, u16 size, u16 destOffset);
|
||||
|
||||
#endif // GUARD_BG_H
|
||||
@@ -6,7 +6,7 @@ extern u8 gDma3RequestCursor;
|
||||
|
||||
struct DmaRequestsStruct
|
||||
{
|
||||
/* 0x00 */ u8 *src;
|
||||
/* 0x00 */ const u8 *src;
|
||||
/* 0x04 */ u8 *dest;
|
||||
/* 0x08 */ u16 size;
|
||||
/* 0x0A */ u16 mode;
|
||||
@@ -17,7 +17,7 @@ extern struct DmaRequestsStruct gDma3Requests[128];
|
||||
|
||||
void ClearDma3Requests(void);
|
||||
void ProcessDma3Requests(void);
|
||||
int RequestDma3Copy(void *src, void *dest, u16 size, u8 mode);
|
||||
int RequestDma3Copy(const void *src, void *dest, u16 size, u8 mode);
|
||||
int RequestDma3Fill(s32 value, void *dest, u16 size, u8 mode);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -639,7 +639,8 @@ struct DaycareMon
|
||||
struct MailStruct mail;
|
||||
u8 OT_name[OT_NAME_LENGTH + 1];
|
||||
u8 monName[11];
|
||||
u8 language;
|
||||
u8 language_maybe : 4;
|
||||
u8 unknown : 4;
|
||||
u32 stepsTaken;
|
||||
};
|
||||
|
||||
|
||||
12
include/gpu_regs.h
Normal file
12
include/gpu_regs.h
Normal file
@@ -0,0 +1,12 @@
|
||||
#ifndef GUARD_GPU_REGS_H
|
||||
#define GUARD_GPU_REGS_H
|
||||
|
||||
void SetGpuReg(u8 regOffset, u16 value);
|
||||
void SetGpuReg_ForcedBlank(u8 regOffset, u16 value);
|
||||
u16 GetGpuReg(u8 regOffset);
|
||||
void SetGpuRegBits(u8 regOffset, u16 mask);
|
||||
void ClearGpuRegBits(u8 regOffset, u16 mask);
|
||||
void EnableInterrupts(u16 mask);
|
||||
void DisableInterrupts(u16 mask);
|
||||
|
||||
#endif // GUARD_GPU_REGS_H
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "gba/m4a_internal.h"
|
||||
|
||||
void m4aSoundVSync(void);
|
||||
void m4aSoundVSyncOn(void);
|
||||
|
||||
void m4aSoundInit(void);
|
||||
void m4aSoundMain(void);
|
||||
|
||||
@@ -155,7 +155,7 @@ extern u8 gStringVar3[];
|
||||
extern u8 gStringVar4[];
|
||||
|
||||
void SetFontsPointer(const struct FontInfo *fonts);
|
||||
void DeactivateAllTextPrinters (void);
|
||||
void DeactivateAllTextPrinters(void);
|
||||
u16 PrintTextOnWindow(u8 windowId, u8 fontId, u8 *str, u8 x, u8 y, u8 speed, void (*callback)(struct TextSubPrinter *, u16));
|
||||
bool16 AddTextPrinter(struct TextSubPrinter *textSubPrinter, u8 speed, void (*callback)(struct TextSubPrinter *, u16));
|
||||
void RunTextPrinters(void);
|
||||
|
||||
@@ -30,7 +30,7 @@ struct Window
|
||||
u8 *tileData;
|
||||
};
|
||||
|
||||
bool16 InitWindows(struct WindowTemplate *templates);
|
||||
bool16 InitWindows(const struct WindowTemplate *templates);
|
||||
u16 AddWindow(const struct WindowTemplate *template);
|
||||
int AddWindowWithoutTileMap(struct WindowTemplate *template);
|
||||
void RemoveWindow(u8 windowId);
|
||||
|
||||
Reference in New Issue
Block a user