Merge pull request #79 from ccawley2011/playground-files

Move the playground data files into a subdirectory
This commit is contained in:
aap 2021-07-05 14:53:54 +02:00 committed by GitHub
commit 8d6392670b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 10 additions and 10 deletions

View File

@ -15,7 +15,7 @@ target_link_libraries(playground
add_custom_command( add_custom_command(
TARGET playground POST_BUILD 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) 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 void
initFont(void) initFont(void)
{ {
vga.tex = Texture::read("Bm437_IBM_VGA8", ""); vga.tex = Texture::read("files/Bm437_IBM_VGA8", "");
bios.tex = Texture::read("Bm437_IBM_BIOS", ""); bios.tex = Texture::read("files/Bm437_IBM_BIOS", "");
/* /*
FILE *foo = fopen("font.c", "w"); FILE *foo = fopen("font.c", "w");
@ -141,8 +141,8 @@ convertFont(void)
int32 i, x, y; int32 i, x, y;
uint8 *px, *line, *glyph; uint8 *px, *line, *glyph;
// f = fopen("font0.bin", "rb"); // f = fopen("font0.bin", "rb");
f = fopen("Bm437_IBM_VGA8.FON", "rb"); f = fopen("files/Bm437_IBM_VGA8.FON", "rb");
// f = fopen("Bm437_IBM_BIOS.FON", "rb"); // f = fopen("files/Bm437_IBM_BIOS.FON", "rb");
if(f == nil) if(f == nil)
return; return;
fseek(f, 0x65A, 0); fseek(f, 0x65A, 0);
@ -175,7 +175,7 @@ fseek(f, 0x65A, 0);
line += img->stride; line += img->stride;
} }
} }
// writeTGA(img, "Bm437_IBM_BIOS.tga"); // writeTGA(img, "files/Bm437_IBM_BIOS.tga");
writeTGA(img, "Bm437_IBM_VGA8.tga"); writeTGA(img, "files/Bm437_IBM_VGA8.tga");
} }
*/ */

View File

@ -255,10 +255,10 @@ InitRW(void)
foreground.blue = 255.0f; foreground.blue = 255.0f;
testfont->setColors(&foreground, &background); testfont->setColors(&foreground, &background);
tex = rw::Texture::read("maze", nil); tex = rw::Texture::read("files/maze", nil);
tex2 = rw::Texture::read("checkers", nil); tex2 = rw::Texture::read("files/checkers", nil);
const char *filename = "teapot.dff"; const char *filename = "files/teapot.dff";
if(sk::args.argc > 1) if(sk::args.argc > 1)
filename = sk::args.argv[1]; filename = sk::args.argv[1];
rw::StreamFile in; rw::StreamFile in;