From 32ab78b552cb4f213e99cc8afffee73235a5c4ee Mon Sep 17 00:00:00 2001 From: Cameron Cawley Date: Sat, 3 Jul 2021 17:45:16 +0100 Subject: [PATCH] Move the playground data files into a subdirectory --- tools/playground/CMakeLists.txt | 2 +- tools/playground/{ => files}/Bm437_IBM_BIOS.FON | Bin tools/playground/{ => files}/Bm437_IBM_BIOS.tga | Bin tools/playground/{ => files}/Bm437_IBM_VGA8.FON | Bin tools/playground/{ => files}/Bm437_IBM_VGA8.tga | Bin tools/playground/{ => files}/foobar.tga | Bin tools/playground/{ => files}/maze.tga | Bin tools/playground/{ => files}/teapot.dff | Bin tools/playground/font.cpp | 12 ++++++------ tools/playground/main.cpp | 6 +++--- 10 files changed, 10 insertions(+), 10 deletions(-) rename tools/playground/{ => files}/Bm437_IBM_BIOS.FON (100%) rename tools/playground/{ => files}/Bm437_IBM_BIOS.tga (100%) rename tools/playground/{ => files}/Bm437_IBM_VGA8.FON (100%) rename tools/playground/{ => files}/Bm437_IBM_VGA8.tga (100%) rename tools/playground/{ => files}/foobar.tga (100%) rename tools/playground/{ => files}/maze.tga (100%) rename tools/playground/{ => files}/teapot.dff (100%) diff --git a/tools/playground/CMakeLists.txt b/tools/playground/CMakeLists.txt index 3db9307..a560cfb 100644 --- a/tools/playground/CMakeLists.txt +++ b/tools/playground/CMakeLists.txt @@ -15,7 +15,7 @@ target_link_libraries(playground add_custom_command( TARGET playground POST_BUILD - COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/teapot.dff" "${CMAKE_CURRENT_SOURCE_DIR}/maze.tga" "${CMAKE_CURRENT_SOURCE_DIR}/Bm437_IBM_VGA8.FON" "${CMAKE_CURRENT_SOURCE_DIR}/Bm437_IBM_BIOS.FON" "$" + COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/files" "$/files" ) librw_platform_target(playground) diff --git a/tools/playground/Bm437_IBM_BIOS.FON b/tools/playground/files/Bm437_IBM_BIOS.FON similarity index 100% rename from tools/playground/Bm437_IBM_BIOS.FON rename to tools/playground/files/Bm437_IBM_BIOS.FON diff --git a/tools/playground/Bm437_IBM_BIOS.tga b/tools/playground/files/Bm437_IBM_BIOS.tga similarity index 100% rename from tools/playground/Bm437_IBM_BIOS.tga rename to tools/playground/files/Bm437_IBM_BIOS.tga diff --git a/tools/playground/Bm437_IBM_VGA8.FON b/tools/playground/files/Bm437_IBM_VGA8.FON similarity index 100% rename from tools/playground/Bm437_IBM_VGA8.FON rename to tools/playground/files/Bm437_IBM_VGA8.FON diff --git a/tools/playground/Bm437_IBM_VGA8.tga b/tools/playground/files/Bm437_IBM_VGA8.tga similarity index 100% rename from tools/playground/Bm437_IBM_VGA8.tga rename to tools/playground/files/Bm437_IBM_VGA8.tga diff --git a/tools/playground/foobar.tga b/tools/playground/files/foobar.tga similarity index 100% rename from tools/playground/foobar.tga rename to tools/playground/files/foobar.tga diff --git a/tools/playground/maze.tga b/tools/playground/files/maze.tga similarity index 100% rename from tools/playground/maze.tga rename to tools/playground/files/maze.tga diff --git a/tools/playground/teapot.dff b/tools/playground/files/teapot.dff similarity index 100% rename from tools/playground/teapot.dff rename to tools/playground/files/teapot.dff diff --git a/tools/playground/font.cpp b/tools/playground/font.cpp index 3ced5fb..b001250 100644 --- a/tools/playground/font.cpp +++ b/tools/playground/font.cpp @@ -109,8 +109,8 @@ printScreen(const char *s, float32 x, float32 y) void initFont(void) { - vga.tex = Texture::read("Bm437_IBM_VGA8", ""); - bios.tex = Texture::read("Bm437_IBM_BIOS", ""); + vga.tex = Texture::read("files/Bm437_IBM_VGA8", ""); + bios.tex = Texture::read("files/Bm437_IBM_BIOS", ""); /* FILE *foo = fopen("font.c", "w"); @@ -141,8 +141,8 @@ convertFont(void) int32 i, x, y; uint8 *px, *line, *glyph; // f = fopen("font0.bin", "rb"); - f = fopen("Bm437_IBM_VGA8.FON", "rb"); -// f = fopen("Bm437_IBM_BIOS.FON", "rb"); + f = fopen("files/Bm437_IBM_VGA8.FON", "rb"); +// f = fopen("files/Bm437_IBM_BIOS.FON", "rb"); if(f == nil) return; fseek(f, 0x65A, 0); @@ -175,7 +175,7 @@ fseek(f, 0x65A, 0); line += img->stride; } } -// writeTGA(img, "Bm437_IBM_BIOS.tga"); - writeTGA(img, "Bm437_IBM_VGA8.tga"); +// writeTGA(img, "files/Bm437_IBM_BIOS.tga"); + writeTGA(img, "files/Bm437_IBM_VGA8.tga"); } */ \ No newline at end of file diff --git a/tools/playground/main.cpp b/tools/playground/main.cpp index add7380..ba396b6 100644 --- a/tools/playground/main.cpp +++ b/tools/playground/main.cpp @@ -255,10 +255,10 @@ InitRW(void) foreground.blue = 255.0f; testfont->setColors(&foreground, &background); - tex = rw::Texture::read("maze", nil); - tex2 = rw::Texture::read("checkers", nil); + tex = rw::Texture::read("files/maze", nil); + tex2 = rw::Texture::read("files/checkers", nil); - const char *filename = "teapot.dff"; + const char *filename = "files/teapot.dff"; if(sk::args.argc > 1) filename = sk::args.argv[1]; rw::StreamFile in;