summaryrefslogtreecommitdiff
path: root/arm9/lib/include/gx.h
diff options
context:
space:
mode:
authorAkira Akashi <rubenru09@aol.com>2021-06-10 22:42:30 +0100
committerGitHub <noreply@github.com>2021-06-10 22:42:30 +0100
commite8d0b49a6864d6077a5d7b1c123c49481fe14bfe (patch)
treed9c489014e94856bc94273499ea7b5eca66ac0dc /arm9/lib/include/gx.h
parent68013d52ebaf7094a782260d97888e9cb6b1d172 (diff)
parentbf8b0b7a9f33de9de350927b5c4001909da3c889 (diff)
Merge pull request #401 from PikalaxALT/pikalax_work
[LEAK-INFORMED] Match and document funcs in unk_02016B94.c
Diffstat (limited to 'arm9/lib/include/gx.h')
-rw-r--r--arm9/lib/include/gx.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/arm9/lib/include/gx.h b/arm9/lib/include/gx.h
index acd23b39..cce14e57 100644
--- a/arm9/lib/include/gx.h
+++ b/arm9/lib/include/gx.h
@@ -186,4 +186,44 @@ static inline void GX_SetMasterBrightness(int brightness)
GXx_SetMasterBrightness_(&reg_GX_MASTER_BRIGHT, brightness);
}
+static inline void GX_SetVisiblePlane(int plane)
+{
+ reg_GX_DISPCNT = (u32)((reg_GX_DISPCNT & ~REG_GX_DISPCNT_DISPLAY_MASK) | (plane << REG_GX_DISPCNT_DISPLAY_SHIFT));
+}
+
+static inline void GXS_SetVisiblePlane(int plane)
+{
+ reg_GXS_DB_DISPCNT = (u32)((reg_GXS_DB_DISPCNT & ~REG_GXS_DB_DISPCNT_DISPLAY_MASK) | (plane << REG_GXS_DB_DISPCNT_DISPLAY_SHIFT));
+}
+
+static inline void GXS_DispOn(void)
+{
+ reg_GXS_DB_DISPCNT |= REG_GXS_DB_DISPCNT_MODE_MASK;
+}
+
+static inline void GX_SetDispSelect(GXDispSelect sel)
+{
+ reg_GX_POWCNT = (u16)((reg_GX_POWCNT & ~REG_GX_POWCNT_DSEL_MASK) | (sel << REG_GX_POWCNT_DSEL_SHIFT));
+}
+
+static inline void GX_SetBGScrOffset(GXBGScrOffset offset)
+{
+ reg_GX_DISPCNT = (u32)((reg_GX_DISPCNT & ~REG_GX_DISPCNT_BGSCREENOFFSET_MASK) | (offset << REG_GX_DISPCNT_BGSCREENOFFSET_SHIFT));
+}
+
+static inline void GX_SetBGCharOffset(GXBGCharOffset offset)
+{
+ reg_GX_DISPCNT = (u32)((reg_GX_DISPCNT & ~REG_GX_DISPCNT_BGCHAROFFSET_MASK) | (offset << REG_GX_DISPCNT_BGCHAROFFSET_SHIFT));
+}
+
+static inline void GX_SetVisibleWnd(int window)
+{
+ reg_GX_DISPCNT = (u32)((reg_GX_DISPCNT & ~(REG_GX_DISPCNT_W0_MASK | REG_GX_DISPCNT_W1_MASK | REG_GX_DISPCNT_OW_MASK)) | (window << REG_GX_DISPCNT_W0_SHIFT));
+}
+
+static inline void GXS_SetVisibleWnd(int window)
+{
+ reg_GXS_DB_DISPCNT = (u32)((reg_GXS_DB_DISPCNT & ~(REG_GXS_DB_DISPCNT_W0_MASK | REG_GXS_DB_DISPCNT_W1_MASK | REG_GXS_DB_DISPCNT_OW_MASK)) | (window << REG_GXS_DB_DISPCNT_W0_SHIFT));
+}
+
#endif //GUARD_GX_H