Moving sketches resources into their own shared folder separate from the runtime's resource folder

This commit is contained in:
Martin Fouilleul 2023-08-09 19:04:59 +02:00
parent 686b50e481
commit c097af08e0
10 changed files with 16 additions and 16 deletions

View File

@ -49,8 +49,8 @@ int main()
mg_rect_atlas* atlas = mg_rect_atlas_create(&permanentArena, 16000, 16000); mg_rect_atlas* atlas = mg_rect_atlas_create(&permanentArena, 16000, 16000);
mg_image atlasImage = mg_image_create(surface, 16000, 16000); mg_image atlasImage = mg_image_create(surface, 16000, 16000);
str8 path1 = path_executable_relative(mem_scratch(), STR8("../resources/triceratops.png")); str8 path1 = path_executable_relative(mem_scratch(), STR8("../../sketches/resources/triceratops.png"));
str8 path2 = path_executable_relative(mem_scratch(), STR8("../resources/Top512.png")); str8 path2 = path_executable_relative(mem_scratch(), STR8("../../sketches/resources/Top512.png"));
mg_image_region image1 = mg_image_atlas_alloc_from_file(atlas, atlasImage, path1, false); mg_image_region image1 = mg_image_atlas_alloc_from_file(atlas, atlasImage, path1, false);
mg_image_region image2 = mg_image_atlas_alloc_from_file(atlas, atlasImage, path2, false); mg_image_region image2 = mg_image_atlas_alloc_from_file(atlas, atlasImage, path2, false);

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
BINDIR=../../bin BINDIR=../../build/bin
RESDIR=../../resources
SRCDIR=../../src SRCDIR=../../src
EXTDIR=../../ext
INCLUDES="-I$SRCDIR -I$SRCDIR/util -I$SRCDIR/platform -I$SRCDIR/app" INCLUDES="-I$SRCDIR -I$EXTDIR"
LIBS="-L$BINDIR -lmilepost" LIBS="-L$BINDIR -lmilepost"
FLAGS="-mmacos-version-min=10.15.4 -DDEBUG -DLOG_COMPILE_DEBUG" FLAGS="-mmacos-version-min=10.15.4 -DDEBUG -DLOG_COMPILE_DEBUG"

View File

@ -44,11 +44,11 @@ int main()
} }
//NOTE: create image //NOTE: create image
str8 imagePath = path_executable_relative(mem_scratch(), STR8("../resources/triceratops.png")); str8 imagePath = path_executable_relative(mem_scratch(), STR8("../../sketches/resources/triceratops.png"));
mg_image image = mg_image_create_from_file(surface, imagePath, false); mg_image image = mg_image_create_from_file(surface, imagePath, false);
vec2 imageSize = mg_image_size(image); vec2 imageSize = mg_image_size(image);
str8 imagePath2 = path_executable_relative(mem_scratch(), STR8("../resources/Top512.png")); str8 imagePath2 = path_executable_relative(mem_scratch(), STR8("../../sketches/resources/Top512.png"));
mg_image image2 = mg_image_create_from_file(surface, imagePath2, false); mg_image image2 = mg_image_create_from_file(surface, imagePath2, false);
vec2 imageSize2 = mg_image_size(image2); vec2 imageSize2 = mg_image_size(image2);

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
BINDIR=../../bin BINDIR=../../build/bin
RESDIR=../../resources
SRCDIR=../../src SRCDIR=../../src
EXTDIR=../../ext
INCLUDES="-I$SRCDIR -I$SRCDIR/util -I$SRCDIR/platform -I$SRCDIR/app -I$SRCDIR/graphics" INCLUDES="-I$SRCDIR -I$EXTDIR"
LIBS="-L$BINDIR -lmilepost" LIBS="-L$BINDIR -lmilepost"
FLAGS="-O2 -mmacos-version-min=10.15.4" FLAGS="-O2 -mmacos-version-min=10.15.4"

View File

@ -117,9 +117,9 @@ int main()
mg_canvas canvas = mg_canvas_create(); mg_canvas canvas = mg_canvas_create();
int fontIndex = 0; int fontIndex = 0;
mg_font fonts[FONT_COUNT] = {create_font("../resources/OpenSansLatinSubset.ttf"), mg_font fonts[FONT_COUNT] = {create_font("../../resources/OpenSansLatinSubset.ttf"),
create_font("../resources/CMUSerif-Roman.ttf"), create_font("../../sketches/resources/CMUSerif-Roman.ttf"),
create_font("../resources/Courier.ttf")}; create_font("../../sketches/resources/Courier.ttf")};
mg_font_extents extents[FONT_COUNT]; mg_font_extents extents[FONT_COUNT];
f32 fontScales[FONT_COUNT]; f32 fontScales[FONT_COUNT];

View File

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View File

Before

Width:  |  Height:  |  Size: 209 KiB

After

Width:  |  Height:  |  Size: 209 KiB

View File

@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
BINDIR=../../bin BINDIR=../../build/bin
RESDIR=../../resources
SRCDIR=../../src SRCDIR=../../src
EXTDIR=../../ext
INCLUDES="-I$SRCDIR -I$SRCDIR/util -I$SRCDIR/platform -I$SRCDIR/app" INCLUDES="-I$SRCDIR -I$EXTDIR"
LIBS="-L$BINDIR -lmilepost" LIBS="-L$BINDIR -lmilepost"
FLAGS="-mmacos-version-min=10.15.4 -DDEBUG -DLOG_COMPILE_DEBUG" FLAGS="-mmacos-version-min=10.15.4 -DDEBUG -DLOG_COMPILE_DEBUG"