diff options
| author | John "Lameguy" Wilbert Villamor <lameguy64@gmail.com> | 2021-11-22 14:40:59 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-22 14:40:59 +0800 |
| commit | 45123e1b968d1883fed9b8526157ce2c4bffc4a7 (patch) | |
| tree | d20c80fbd4f5a5d1d3972669625972cea6b3684d /examples/system | |
| parent | 538f28cfbbbb8163ab8a96de77d6887123856c81 (diff) | |
| parent | 9b00e5f7ff163a8fc6f341dbf237d90c61dadddc (diff) | |
| download | psn00bsdk-45123e1b968d1883fed9b8526157ce2c4bffc4a7.tar.gz | |
Merge pull request #43 from spicyjpeg/cmake
Even more CMake fixes, submodules, pads example
Diffstat (limited to 'examples/system')
| -rw-r--r-- | examples/system/childexec/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | examples/system/console/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | examples/system/dynlink/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | examples/system/dynlink/display.c | 8 | ||||
| -rw-r--r-- | examples/system/dynlink/library/balls.c | 2 | ||||
| -rw-r--r-- | examples/system/dynlink/library/cube.c | 2 | ||||
| -rw-r--r-- | examples/system/dynlink/library/dll_common.h | 1 | ||||
| -rw-r--r-- | examples/system/dynlink/main.c | 3 | ||||
| -rw-r--r-- | examples/system/timer/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | examples/system/tty/CMakeLists.txt | 4 |
10 files changed, 20 insertions, 16 deletions
diff --git a/examples/system/childexec/CMakeLists.txt b/examples/system/childexec/CMakeLists.txt index c9983c4..88168e0 100644 --- a/examples/system/childexec/CMakeLists.txt +++ b/examples/system/childexec/CMakeLists.txt @@ -1,7 +1,7 @@ # PSn00bSDK example CMake script # (C) 2021 spicyjpeg - MPL licensed -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.20) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{PSN00BSDK_LIBS}) set(CMAKE_TOOLCHAIN_FILE $ENV{PSN00BSDK_LIBS}/cmake/sdk.cmake) @@ -38,4 +38,4 @@ target_link_options(child PRIVATE -Ttext=0x80030000) # embedded via child_exe.s). add_dependencies(parent child) -install(FILES ${PROJECT_BINARY_DIR}/parent.exe DESTINATION .) +install(FILES ${PROJECT_BINARY_DIR}/parent.exe TYPE BIN) diff --git a/examples/system/console/CMakeLists.txt b/examples/system/console/CMakeLists.txt index acae08f..6dc6154 100644 --- a/examples/system/console/CMakeLists.txt +++ b/examples/system/console/CMakeLists.txt @@ -1,7 +1,7 @@ # PSn00bSDK example CMake script # (C) 2021 spicyjpeg - MPL licensed -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.20) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{PSN00BSDK_LIBS}) set(CMAKE_TOOLCHAIN_FILE $ENV{PSN00BSDK_LIBS}/cmake/sdk.cmake) @@ -19,4 +19,4 @@ file(GLOB _sources *.c) psn00bsdk_add_executable(console STATIC ${_sources}) #psn00bsdk_add_cd_image(console_iso console iso.xml DEPENDS console) -install(FILES ${PROJECT_BINARY_DIR}/console.exe DESTINATION .) +install(FILES ${PROJECT_BINARY_DIR}/console.exe TYPE BIN) diff --git a/examples/system/dynlink/CMakeLists.txt b/examples/system/dynlink/CMakeLists.txt index 3af5d4b..5834647 100644 --- a/examples/system/dynlink/CMakeLists.txt +++ b/examples/system/dynlink/CMakeLists.txt @@ -1,7 +1,7 @@ # PSn00bSDK example CMake script # (C) 2021 spicyjpeg - MPL licensed -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.20) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{PSN00BSDK_LIBS}) set(CMAKE_TOOLCHAIN_FILE $ENV{PSN00BSDK_LIBS}/cmake/sdk.cmake) @@ -28,5 +28,5 @@ install( FILES ${PROJECT_BINARY_DIR}/dynlink.bin ${PROJECT_BINARY_DIR}/dynlink.cue - DESTINATION . + TYPE BIN ) diff --git a/examples/system/dynlink/display.c b/examples/system/dynlink/display.c index d8ad3ed..573f17c 100644 --- a/examples/system/dynlink/display.c +++ b/examples/system/dynlink/display.c @@ -10,6 +10,10 @@ #define SCREEN_XRES 320 #define SCREEN_YRES 240 +#define BGCOLOR_R 48 +#define BGCOLOR_G 24 +#define BGCOLOR_B 0 + /* Display/GPU context utilities */ void init_context(CONTEXT *ctx) { @@ -23,14 +27,14 @@ void init_context(CONTEXT *ctx) { db = &(ctx->db[0]); SetDefDispEnv(&(db->disp), 0, 0, SCREEN_XRES, SCREEN_YRES); SetDefDrawEnv(&(db->draw), SCREEN_XRES, 0, SCREEN_XRES, SCREEN_YRES); - setRGB0(&(db->draw), 63, 0, 127); + setRGB0(&(db->draw), BGCOLOR_R, BGCOLOR_G, BGCOLOR_B); db->draw.isbg = 1; db->draw.dtd = 1; db = &(ctx->db[1]); SetDefDispEnv(&(db->disp), SCREEN_XRES, 0, SCREEN_XRES, SCREEN_YRES); SetDefDrawEnv(&(db->draw), 0, 0, SCREEN_XRES, SCREEN_YRES); - setRGB0(&(db->draw), 63, 0, 127); + setRGB0(&(db->draw), BGCOLOR_R, BGCOLOR_G, BGCOLOR_B); db->draw.isbg = 1; db->draw.dtd = 1; diff --git a/examples/system/dynlink/library/balls.c b/examples/system/dynlink/library/balls.c index 2a4d9f4..ef6993e 100644 --- a/examples/system/dynlink/library/balls.c +++ b/examples/system/dynlink/library/balls.c @@ -3,7 +3,7 @@ * (C) 2021 spicyjpeg - MPL licensed */ -#include <sys/types.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <psxgpu.h> diff --git a/examples/system/dynlink/library/cube.c b/examples/system/dynlink/library/cube.c index 57f3e56..84fe552 100644 --- a/examples/system/dynlink/library/cube.c +++ b/examples/system/dynlink/library/cube.c @@ -3,7 +3,7 @@ * (C) 2021 spicyjpeg - MPL licensed */ -#include <sys/types.h> +#include <stdint.h> #include <stdio.h> #include <psxgpu.h> #include <psxgte.h> diff --git a/examples/system/dynlink/library/dll_common.h b/examples/system/dynlink/library/dll_common.h index 4f9314b..315a993 100644 --- a/examples/system/dynlink/library/dll_common.h +++ b/examples/system/dynlink/library/dll_common.h @@ -6,6 +6,7 @@ #ifndef __DLL_COMMON_H #define __DLL_COMMON_H +#include <stdint.h> #include <psxgpu.h> /* Common structures shared by the main executable and DLLs */ diff --git a/examples/system/dynlink/main.c b/examples/system/dynlink/main.c index 33f6f44..6d93e71 100644 --- a/examples/system/dynlink/main.c +++ b/examples/system/dynlink/main.c @@ -36,12 +36,11 @@ * as plugins/mods/patches stored on a memory card. */ -#include <sys/types.h> +#include <stdint.h> #include <stdarg.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <malloc.h> #include <dlfcn.h> #include <psxapi.h> #include <psxetc.h> diff --git a/examples/system/timer/CMakeLists.txt b/examples/system/timer/CMakeLists.txt index 189bf87..58daf9b 100644 --- a/examples/system/timer/CMakeLists.txt +++ b/examples/system/timer/CMakeLists.txt @@ -1,7 +1,7 @@ # PSn00bSDK example CMake script # (C) 2021 spicyjpeg - MPL licensed -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.20) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{PSN00BSDK_LIBS}) set(CMAKE_TOOLCHAIN_FILE $ENV{PSN00BSDK_LIBS}/cmake/sdk.cmake) @@ -19,4 +19,4 @@ file(GLOB _sources *.c) psn00bsdk_add_executable(timer STATIC ${_sources}) #psn00bsdk_add_cd_image(timer_iso timer iso.xml DEPENDS timer) -install(FILES ${PROJECT_BINARY_DIR}/timer.exe DESTINATION .) +install(FILES ${PROJECT_BINARY_DIR}/timer.exe TYPE BIN) diff --git a/examples/system/tty/CMakeLists.txt b/examples/system/tty/CMakeLists.txt index 024ccd4..4e0ca36 100644 --- a/examples/system/tty/CMakeLists.txt +++ b/examples/system/tty/CMakeLists.txt @@ -1,7 +1,7 @@ # PSn00bSDK example CMake script # (C) 2021 spicyjpeg - MPL licensed -cmake_minimum_required(VERSION 3.21) +cmake_minimum_required(VERSION 3.20) if(NOT DEFINED CMAKE_TOOLCHAIN_FILE AND DEFINED ENV{PSN00BSDK_LIBS}) set(CMAKE_TOOLCHAIN_FILE $ENV{PSN00BSDK_LIBS}/cmake/sdk.cmake) @@ -19,4 +19,4 @@ file(GLOB _sources *.c) psn00bsdk_add_executable(tty STATIC ${_sources}) #psn00bsdk_add_cd_image(tty_iso tty iso.xml DEPENDS tty) -install(FILES ${PROJECT_BINARY_DIR}/tty.exe DESTINATION .) +install(FILES ${PROJECT_BINARY_DIR}/tty.exe TYPE BIN) |
