diff options
| author | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-02-20 20:55:27 +0100 |
|---|---|---|
| committer | spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> | 2022-02-20 23:10:19 +0100 |
| commit | a2da2debfde1d44338d203aa4d56e485c4bb16ae (patch) | |
| tree | bcce13d2c63acfe4d9b1d72c1887130b29bb098f /examples/graphics/tilesasm | |
| parent | 72db767f5a5bdb958bb11bcb6fe6b9b332a2b195 (diff) | |
| download | psn00bsdk-a2da2debfde1d44338d203aa4d56e485c4bb16ae.tar.gz | |
Add psn00bsdk_target_incbin() CMake function
Diffstat (limited to 'examples/graphics/tilesasm')
| -rw-r--r-- | examples/graphics/tilesasm/CMakeLists.txt | 10 | ||||
| -rw-r--r-- | examples/graphics/tilesasm/data.s.template | 35 |
2 files changed, 3 insertions, 42 deletions
diff --git a/examples/graphics/tilesasm/CMakeLists.txt b/examples/graphics/tilesasm/CMakeLists.txt index 3384875..5b8de96 100644 --- a/examples/graphics/tilesasm/CMakeLists.txt +++ b/examples/graphics/tilesasm/CMakeLists.txt @@ -11,14 +11,10 @@ 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} - ${PROJECT_BINARY_DIR}/data.s -) +psn00bsdk_add_executable(tilesasm STATIC ${_sources}) #psn00bsdk_add_cd_image(tilesasm_iso tilesasm iso.xml DEPENDS tilesasm) +psn00bsdk_target_incbin(tilesasm PRIVATE tim_tileset tiles_256.tim) + install(FILES ${PROJECT_BINARY_DIR}/tilesasm.exe TYPE BIN) diff --git a/examples/graphics/tilesasm/data.s.template b/examples/graphics/tilesasm/data.s.template deleted file mode 100644 index bec0b84..0000000 --- a/examples/graphics/tilesasm/data.s.template +++ /dev/null @@ -1,35 +0,0 @@ -# -# 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: - .balign 4 # Required to correctly parse and load the image - .incbin "${PROJECT_SOURCE_DIR}/tiles_256.tim" |
