Move the playground data files into a subdirectory

This commit is contained in:
Cameron Cawley 2021-07-03 17:45:16 +01:00
parent b2ceadc9f2
commit 32ab78b552
10 changed files with 10 additions and 10 deletions

View File

@ -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" "$<TARGET_FILE_DIR:playground>"
COMMAND "${CMAKE_COMMAND}" -E copy_directory "${CMAKE_CURRENT_SOURCE_DIR}/files" "$<TARGET_FILE_DIR:playground>/files"
)
librw_platform_target(playground)

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

View File

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

@ -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");
}
*/

View File

@ -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;