From fc36464c5563bc2edd9ec67f7ac7522ad064a582 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 20 Jun 2018 16:16:16 +0200 Subject: [PATCH] Stop rely on wut for building the WUPS library --- Makefile | 6 +----- src/overlay.c | 11 ++++++++++- wups_include/common.h | 1 + wups_include/hooks.h | 5 ++--- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 4027a67..7771362 100644 --- a/Makefile +++ b/Makefile @@ -7,10 +7,6 @@ ifeq ($(strip $(DEVKITPPC)),) $(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC) endif -ifeq ($(strip $(WUT_ROOT)),) -$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC) -endif - export PATH := $(DEVKITPPC)/bin:$(PORTLIBS)/bin:$(PATH) export PORTLIBS := $(DEVKITPRO)/portlibs/ppc @@ -64,7 +60,7 @@ LIBS := # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- -LIBDIRS := $(WUT_ROOT) +LIBDIRS := #--------------------------------------------------------------------------------- # no real need to edit anything past this point unless you need to add additional diff --git a/src/overlay.c b/src/overlay.c index 4812f76..7104e54 100644 --- a/src/overlay.c +++ b/src/overlay.c @@ -10,7 +10,16 @@ #include #include #include -#include + +extern void (*OSScreenInit)(void); +extern void (*OSScreenShutdown)(void); +extern uint32_t (*OSScreenGetBufferSizeEx)(uint32_t bufferNum); +extern int32_t (*OSScreenSetBufferEx)(uint32_t bufferNum, void * addr); +extern int32_t (*OSScreenClearBufferEx)(uint32_t bufferNum, uint32_t temp); +extern int32_t (*OSScreenFlipBuffersEx)(uint32_t bufferNum); +extern int32_t (*OSScreenPutFontEx)(uint32_t bufferNum, uint32_t posX, uint32_t posY, const char * buffer); +extern int32_t (*OSScreenEnableEx)(uint32_t bufferNum, int32_t enable); +extern uint32_t (*OSScreenPutPixelEx)(uint32_t bufferNum, uint32_t posX, uint32_t posY, uint32_t color); static void * overlayfunction_ptr __attribute__((section(".data"))) = NULL; diff --git a/wups_include/common.h b/wups_include/common.h index bd4e896..dc7908d 100644 --- a/wups_include/common.h +++ b/wups_include/common.h @@ -33,6 +33,7 @@ #include #include #include +#include #ifdef __cplusplus extern "C" { diff --git a/wups_include/hooks.h b/wups_include/hooks.h index 0416664..afcdef3 100644 --- a/wups_include/hooks.h +++ b/wups_include/hooks.h @@ -18,7 +18,6 @@ #ifndef WUPS_HOOKS_DEF_H_ #define WUPS_HOOKS_DEF_H_ -#include #include "common.h" #ifdef __cplusplus @@ -78,8 +77,8 @@ typedef struct wups_loader_init_fs_args_t { typedef struct wups_loader_app_started_args_t { - BOOL sd_mounted; - BOOL usb_mounted; + bool sd_mounted; + bool usb_mounted; } wups_loader_app_started_args_t;