Moving sketches resources into their own shared folder separate from the runtime's resource folder
This commit is contained in:
parent
686b50e481
commit
c097af08e0
|
@ -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);
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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);
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -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];
|
||||||
|
|
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 209 KiB After Width: | Height: | Size: 209 KiB |
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue