aboutsummaryrefslogtreecommitdiff
path: root/examples/graphics
diff options
context:
space:
mode:
authorJohn "Lameguy" Wilbert Villamor <lameguy64@gmail.com>2022-01-18 08:31:14 +0800
committerGitHub <noreply@github.com>2022-01-18 08:31:14 +0800
commit05d44488bd5587786f4bd0286fc0f555c79aa46a (patch)
tree5740f396d10a9580c3a39ca536544436898ff1b6 /examples/graphics
parent08de895e8582dbc70b639ae5f511ab9ebfb4d68a (diff)
parente9475e283a82665fe6c19bebc3318b5084f15a2e (diff)
downloadpsn00bsdk-05d44488bd5587786f4bd0286fc0f555c79aa46a.tar.gz
Merge pull request #44 from spicyjpeg/actions
GitHub Actions CI, psxcd and libc fixes, new examples
Diffstat (limited to 'examples/graphics')
-rw-r--r--examples/graphics/balls/CMakeLists.txt4
-rw-r--r--examples/graphics/billboard/CMakeLists.txt4
-rw-r--r--examples/graphics/fpscam/CMakeLists.txt4
-rw-r--r--examples/graphics/gte/CMakeLists.txt4
-rw-r--r--examples/graphics/hdtv/CMakeLists.txt4
-rw-r--r--examples/graphics/render2tex/CMakeLists.txt4
-rw-r--r--examples/graphics/rgb24/CMakeLists.txt4
-rw-r--r--examples/graphics/tilesasm/CMakeLists.txt12
-rw-r--r--examples/graphics/tilesasm/data.s.template (renamed from examples/graphics/tilesasm/data.s)69
9 files changed, 41 insertions, 68 deletions
diff --git a/examples/graphics/balls/CMakeLists.txt b/examples/graphics/balls/CMakeLists.txt
index 5886484..f5297c3 100644
--- a/examples/graphics/balls/CMakeLists.txt
+++ b/examples/graphics/balls/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
balls
LANGUAGES C
diff --git a/examples/graphics/billboard/CMakeLists.txt b/examples/graphics/billboard/CMakeLists.txt
index 8cd31a9..1b417d2 100644
--- a/examples/graphics/billboard/CMakeLists.txt
+++ b/examples/graphics/billboard/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
billboard
LANGUAGES C ASM
diff --git a/examples/graphics/fpscam/CMakeLists.txt b/examples/graphics/fpscam/CMakeLists.txt
index 791f6c2..cb0c086 100644
--- a/examples/graphics/fpscam/CMakeLists.txt
+++ b/examples/graphics/fpscam/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
fpscam
LANGUAGES C
diff --git a/examples/graphics/gte/CMakeLists.txt b/examples/graphics/gte/CMakeLists.txt
index 85b2942..f95c5ff 100644
--- a/examples/graphics/gte/CMakeLists.txt
+++ b/examples/graphics/gte/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
gte
LANGUAGES C
diff --git a/examples/graphics/hdtv/CMakeLists.txt b/examples/graphics/hdtv/CMakeLists.txt
index f92faeb..804b096 100644
--- a/examples/graphics/hdtv/CMakeLists.txt
+++ b/examples/graphics/hdtv/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
hdtv
LANGUAGES C
diff --git a/examples/graphics/render2tex/CMakeLists.txt b/examples/graphics/render2tex/CMakeLists.txt
index 360840d..70e489e 100644
--- a/examples/graphics/render2tex/CMakeLists.txt
+++ b/examples/graphics/render2tex/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
render2tex
LANGUAGES C ASM
diff --git a/examples/graphics/rgb24/CMakeLists.txt b/examples/graphics/rgb24/CMakeLists.txt
index bf8a8fa..449981a 100644
--- a/examples/graphics/rgb24/CMakeLists.txt
+++ b/examples/graphics/rgb24/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
rgb24
LANGUAGES C ASM
diff --git a/examples/graphics/tilesasm/CMakeLists.txt b/examples/graphics/tilesasm/CMakeLists.txt
index 59ef665..3384875 100644
--- a/examples/graphics/tilesasm/CMakeLists.txt
+++ b/examples/graphics/tilesasm/CMakeLists.txt
@@ -3,10 +3,6 @@
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)
-endif()
-
project(
tilesasm
LANGUAGES C ASM
@@ -15,8 +11,14 @@ project(
HOMEPAGE_URL "http://lameguy64.net/?page=psn00bsdk"
)
+configure_file(data.s.template data.s)
+
file(GLOB _sources *.s *.c)
-psn00bsdk_add_executable(tilesasm STATIC ${_sources})
+psn00bsdk_add_executable(
+ tilesasm STATIC
+ ${_sources}
+ ${PROJECT_BINARY_DIR}/data.s
+)
#psn00bsdk_add_cd_image(tilesasm_iso tilesasm iso.xml DEPENDS tilesasm)
install(FILES ${PROJECT_BINARY_DIR}/tilesasm.exe TYPE BIN)
diff --git a/examples/graphics/tilesasm/data.s b/examples/graphics/tilesasm/data.s.template
index c64ebbc..1c4b01e 100644
--- a/examples/graphics/tilesasm/data.s
+++ b/examples/graphics/tilesasm/data.s.template
@@ -1,35 +1,34 @@
-#
-# LibPSn00b Example Programs
-#
-# Drawing Tile-maps with Assembler Routines
-# 2022 Meido-Tek Productions / PSn00bSDK Project
-#
-# Example by John "Lameguy" Wilbert Villamor (Lameguy64)
-#
-# This assembler file is used to include the file tiles.tim as an array named
-# 'tim_tileset' for use in this example program. Note how the variable name
-# itself is leading with an underscore (_) in this file. This is because
-# GNU C requires leading underscores for global variables, perhaps to prevent
-# function names and variable names from mixing up during the linking stage.
-
-# Tell assembler that the contents that follow must be in the .data section
-.section .data
-
-# This directive define the 'tim_tileset' label as a global symbol so that
-# main.c and other program modules can see this symbol during linking
-.global tim_tileset
-
-# This directive is not really required, but its best to define symbols
-# not pointing to program code as an object to help identify it as a
-# variable in debuggers
-.type tim_tileset, @object
-
-# The following line defines the variable 'tim_tileset' itself filled with the
-# contents of the file 'tiles.tim' by using the .incbin directive
-#
-# Remember the variable type of a symbol is always governed by how it is
-# declared in the C code
-#
-tim_tileset:
- .incbin "../tiles_256.tim"
- \ No newline at end of file
+#
+# LibPSn00b Example Programs
+#
+# Drawing Tile-maps with Assembler Routines
+# 2022 Meido-Tek Productions / PSn00bSDK Project
+#
+# Example by John "Lameguy" Wilbert Villamor (Lameguy64)
+#
+# This assembler file is used to include the file tiles.tim as an array named
+# 'tim_tileset' for use in this example program. Note how the variable name
+# itself is leading with an underscore (_) in this file. This is because
+# GNU C requires leading underscores for global variables, perhaps to prevent
+# function names and variable names from mixing up during the linking stage.
+
+# Tell assembler that the contents that follow must be in the .data section
+.section .data
+
+# This directive define the 'tim_tileset' label as a global symbol so that
+# main.c and other program modules can see this symbol during linking
+.global tim_tileset
+
+# This directive is not really required, but its best to define symbols
+# not pointing to program code as an object to help identify it as a
+# variable in debuggers
+.type tim_tileset, @object
+
+# The following line defines the variable 'tim_tileset' itself filled with the
+# contents of the file 'tiles.tim' by using the .incbin directive
+#
+# Remember the variable type of a symbol is always governed by how it is
+# declared in the C code
+#
+tim_tileset:
+ .incbin "${PROJECT_SOURCE_DIR}/tiles_256.tim"