diff --git a/10x.10x b/10x.10x index 3d042a1..c9a8e5e 100644 --- a/10x.10x +++ b/10x.10x @@ -8,7 +8,7 @@ true false false - remedybg.exe stop-debugging && build_desktop_debug.bat codegen + build_desktop_debug.bat codegen diff --git a/codegen.c b/codegen.c index b194296..71a1315 100644 --- a/codegen.c +++ b/codegen.c @@ -184,12 +184,11 @@ int main(int argc, char **argv) } if (MD_S8Match(node->first_tag->string, MD_S8Lit("image"), 0)) { MD_String8 variable_name = MD_S8Fmt(cg_arena, "image_%.*s", MD_S8VArg(node->string)); - Log("New image variable %.*s\n", MD_S8VArg(variable_name)); + //Log("New image variable %.*s\n", MD_S8VArg(variable_name)); MD_String8 filepath = ChildValue(node, MD_S8Lit("filepath")); filepath = asset_file_path(filepath); assert(filepath.str != 0); // , MD_S8Fmt(cg_arena, "No filepath specified for image '%.*s'", MD_S8VArg(node->string))); - FILE *asset_file = fopen(nullterm(filepath), "r"); - + FILE *asset_file = fopen(nullterm(filepath), "rb"); assert(asset_file); // , MD_S8Fmt(cg_arena, "Could not open filepath %.*s for asset '%.*s'", MD_S8VArg(filepath), MD_S8VArg(node->string))); fclose(asset_file); diff --git a/main.c b/main.c index dfe2d2b..fd57743 100644 --- a/main.c +++ b/main.c @@ -948,7 +948,7 @@ Mesh load_mesh(MD_Arena *arena, MD_String8 binary_file, MD_String8 mesh_name) to_return.image = load_image(MD_S8Fmt(scratch.arena, "assets/exported_3d/%.*s", MD_S8VArg(image_filename))); ser_MD_u64(&ser, &to_return.num_vertices); - Log("Mesh %.*s has %llu vertices and image filename '%.*s'\n", MD_S8VArg(mesh_name), to_return.num_vertices, MD_S8VArg(image_filename)); + //Log("Mesh %.*s has %llu vertices and image filename '%.*s'\n", MD_S8VArg(mesh_name), to_return.num_vertices, MD_S8VArg(image_filename)); to_return.vertices = MD_ArenaPush(arena, sizeof(*to_return.vertices) * to_return.num_vertices); for(MD_u64 i = 0; i < to_return.num_vertices; i++) @@ -1117,7 +1117,7 @@ Armature load_armature(MD_Arena *arena, MD_String8 binary_file, MD_String8 armat MD_u64 frames_in_anim; ser_MD_u64(&ser, &frames_in_anim); - Log("There are %llu animation frames in animation '%.*s'\n", frames_in_anim, MD_S8VArg(new_anim->name)); + //Log("There are %llu animation frames in animation '%.*s'\n", frames_in_anim, MD_S8VArg(new_anim->name)); for(MD_u64 i = 0; i < to_return.bones_length; i++) { @@ -1307,7 +1307,7 @@ ThreeDeeLevel load_level(MD_Arena *arena, MD_String8 binary_file) if(!mesh_found) { MD_String8 to_load_filepath = MD_S8Fmt(scratch.arena, "assets/exported_3d/%.*s.bin", MD_S8VArg(new_placed->name)); - Log("Loading mesh '%.*s'...\n", MD_S8VArg(to_load_filepath)); + //Log("Loading mesh '%.*s'...\n", MD_S8VArg(to_load_filepath)); MD_String8 binary_mesh_file = MD_LoadEntireFile(scratch.arena, to_load_filepath); if(!binary_mesh_file.str) {