summaryrefslogtreecommitdiff
path: root/arm9/lib/include/gx.h
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2021-06-04 18:37:08 -0400
committerPikalaxALT <pikalaxalt@gmail.com>2021-06-04 18:37:08 -0400
commite29c9e21ba9b64c86ac677b2bf4a69e92e8ac34b (patch)
tree961f150c6ccef7e09990f8e1f5d7cc0c37c8d031 /arm9/lib/include/gx.h
parent1b5cf67f5f3585ea1a50dc2d487e6897dd7e6f55 (diff)
Port more inlines from gx lib
Diffstat (limited to 'arm9/lib/include/gx.h')
-rw-r--r--arm9/lib/include/gx.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/arm9/lib/include/gx.h b/arm9/lib/include/gx.h
index acd23b39..7ba8d1f3 100644
--- a/arm9/lib/include/gx.h
+++ b/arm9/lib/include/gx.h
@@ -186,4 +186,34 @@ 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));
+}
+
#endif //GUARD_GX_H