From 6f88094f1dd4a38954a8cd90c2e488f53dbfa7f0 Mon Sep 17 00:00:00 2001 From: shinyquagsire23 Date: Sun, 24 Jul 2016 14:03:22 -0700 Subject: [PATCH] Add OSScreen functions to coreinit --- include/coreinit/screen.h | 50 +++++++++++++++++++++++++++++++++++++++ rpl/libcoreinit/exports.h | 10 ++++++++ 2 files changed, 60 insertions(+) create mode 100644 include/coreinit/screen.h diff --git a/include/coreinit/screen.h b/include/coreinit/screen.h new file mode 100644 index 0000000..61f1d9a --- /dev/null +++ b/include/coreinit/screen.h @@ -0,0 +1,50 @@ +#pragma once +#include + +/** + * \defgroup coreinit_screen Screen + * \ingroup coreinit + * @{ + */ + +#ifdef __cplusplus +extern "C" { +#endif + +void +OSScreenInit(); + +unsigned int +OSScreenGetBufferSizeEx(unsigned int bufferNum); + +int +OSScreenSetBufferEx(unsigned int bufferNum, void * addr); + +int +OSScreenClearBufferEx(unsigned int bufferNum, + unsigned int temp); + +int +OSScreenFlipBuffersEx(unsigned int bufferNum); + +int +OSScreenPutFontEx(unsigned int bufferNum, + unsigned int posX, + unsigned int posY, + const char * buffer); + +void +OSScreenPutPixelEx(int bufferNum, + uint32_t posX, + uint32_t posY, + uint32_t colour); + +int +OSScreenEnableEx(unsigned int bufferNum, + int enable); + +#ifdef __cplusplus +} +#endif + +/** @} */ diff --git a/rpl/libcoreinit/exports.h b/rpl/libcoreinit/exports.h index bbe9cf9..9b782f4 100644 --- a/rpl/libcoreinit/exports.h +++ b/rpl/libcoreinit/exports.h @@ -203,6 +203,16 @@ EXPORT(OSInitRendezvous); EXPORT(OSWaitRendezvous); EXPORT(OSWaitRendezvousWithTimeout); +// coreinit/screen.h +EXPORT(OSScreenInit); +EXPORT(OSScreenGetBufferSizeEx); +EXPORT(OSScreenSetBufferEx); +EXPORT(OSScreenClearBufferEx); +EXPORT(OSScreenFlipBuffersEx); +EXPORT(OSScreenPutFontEx); +EXPORT(OSScreenPutPixelEx); +EXPORT(OSScreenEnableEx); + // coreinit/semaphore.h EXPORT(OSInitSemaphore); EXPORT(OSInitSemaphoreEx);