summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bg.h23
-rw-r--r--include/gba/multiboot.h26
-rw-r--r--include/gpu_regs.h6
-rw-r--r--include/menu.h2
-rw-r--r--include/multiboot.h2
-rw-r--r--include/text.h4
-rw-r--r--include/unknown_task.h11
-rw-r--r--include/window.h2
8 files changed, 56 insertions, 20 deletions
diff --git a/include/bg.h b/include/bg.h
new file mode 100644
index 000000000..444d3f3c2
--- /dev/null
+++ b/include/bg.h
@@ -0,0 +1,23 @@
+#ifndef GUARD_bg_H
+#define GUARD_bg_H
+
+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);
+void InitBgsFromTemplates(u8, const struct BgTemplate *, u8);
+u32 ChangeBgX(u8, u32, u8);
+u32 ChangeBgY(u8, u32, u8);
+void FillBgTilemapBufferRect_Palette0(u8 bg, u16 tileNum, u8 x, u8 y, u8 width, u8 height);
+void ShowBg(u8);
+void HideBg(u8);
+void CopyBgTilemapBufferToVram(u8);
+
+#endif //GUARD_bg_H
diff --git a/include/gba/multiboot.h b/include/gba/multiboot.h
index e88b43a19..14b6594b2 100644
--- a/include/gba/multiboot.h
+++ b/include/gba/multiboot.h
@@ -8,19 +8,19 @@
struct MultiBootParam
{
- u32 system_work[5];
- u8 handshake_data;
- u8 padding;
- u16 handshake_timeout;
- u8 probe_count;
- u8 client_data[MULTIBOOT_NCHILD];
- u8 palette_data;
- u8 response_bit;
- u8 client_bit;
- u8 reserved1;
- u8 *boot_srcp;
- u8 *boot_endp;
- u8 *masterp;
+ u32 system_work[5]; // 00
+ u8 handshake_data; // 14
+ u8 padding; // 15
+ u16 handshake_timeout; // 16
+ u8 probe_count; // 18
+ u8 client_data[MULTIBOOT_NCHILD]; // 19
+ u8 palette_data; // 1c
+ u8 response_bit; // 1d
+ u8 client_bit; // 1e
+ u8 reserved1; // 1f
+ const u8 *boot_srcp; // 20
+ const u8 *boot_endp; // 24
+ const u8 *masterp;
u8 *reserved2[MULTIBOOT_NCHILD];
u32 system_work2[4];
u8 sendflag;
diff --git a/include/gpu_regs.h b/include/gpu_regs.h
index 28b97fb6e..1039b618f 100644
--- a/include/gpu_regs.h
+++ b/include/gpu_regs.h
@@ -1,6 +1,3 @@
-//
-// Created by scott on 9/15/2017.
-//
#ifndef GUARD_GPU_REGS_H
#define GUARD_GPU_REGS_H
@@ -10,6 +7,9 @@
// Exported RAM declarations
// Exported ROM declarations
+void DisableInterrupts(u16);
+void EnableInterrupts(u16);
+void SetGpuReg(u8, u16);
void ClearGpuRegBits(u8 regOffset, u16 mask);
#endif //GUARD_GPU_REGS_H
diff --git a/include/menu.h b/include/menu.h
index c8aafcb30..9a23401e0 100644
--- a/include/menu.h
+++ b/include/menu.h
@@ -15,4 +15,6 @@ struct MenuAction2
void (*func)(u8);
};
+void box_print(u8, u8, u8, u8, const void *, s8, const u8 *);
+
#endif // GUARD_MENU_H
diff --git a/include/multiboot.h b/include/multiboot.h
index 950c853d0..d4700ff4e 100644
--- a/include/multiboot.h
+++ b/include/multiboot.h
@@ -15,7 +15,7 @@
void MultiBootInit(struct MultiBootParam *mp);
int MultiBootMain(struct MultiBootParam *mp);
void MultiBootStartProbe(struct MultiBootParam *mp);
-void MultiBootStartMaster(struct MultiBootParam *mp, u8 *srcp, int length, u8 palette_color, s8 palette_speed);
+void MultiBootStartMaster(struct MultiBootParam *mp, const u8 *srcp, int length, u8 palette_color, s8 palette_speed);
int MultiBootCheckComplete(struct MultiBootParam *mp);
#endif // GUARD_MULTIBOOT_H
diff --git a/include/text.h b/include/text.h
index 73e6e5437..c61f6cc98 100644
--- a/include/text.h
+++ b/include/text.h
@@ -186,9 +186,9 @@ bool8 TextPrinterWaitWithDownArrow(struct TextPrinter *textPrinter);
bool8 TextPrinterWait(struct TextPrinter *textPrinter);
void DrawDownArrow(u8 windowId, u16 x, u16 y, u8 bgColor, bool8 drawArrow, u8 *counter, u8 *yCoordIndex);
u16 RenderText(struct TextPrinter *textPrinter);
-u32 GetStringWidthFixedWidthFont(u8 *str, u8 fontId, u8 letterSpacing);
+u32 GetStringWidthFixedWidthFont(const u8 *str, u8 fontId, u8 letterSpacing);
u32 (*GetFontWidthFunc(u8 glyphId))(u16, bool32);
-s32 GetStringWidth(u8 fontId, u8 *str, s16 letterSpacing);
+u32 GetStringWidth(u8 fontId, const u8 *str, s16 letterSpacing);
u8 RenderTextFont9(u8 *pixels, u8 fontId, u8 *str);
u8 DrawKeypadIcon(u8 windowId, u8 keypadIconId, u16 x, u16 y);
u8 GetKeypadIconTileOffset(u8 keypadIconId);
diff --git a/include/unknown_task.h b/include/unknown_task.h
new file mode 100644
index 000000000..f59ca9ac3
--- /dev/null
+++ b/include/unknown_task.h
@@ -0,0 +1,11 @@
+#ifndef GUARD_unknown_task_H
+#define GUARD_unknown_task_H
+
+// Exported type declarations
+
+// Exported RAM declarations
+
+// Exported ROM declarations
+void remove_some_task(void);
+
+#endif //GUARD_unknown_task_H
diff --git a/include/window.h b/include/window.h
index 36a71a1e0..20e5fefa3 100644
--- a/include/window.h
+++ b/include/window.h
@@ -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);