diff --git a/samples/pong/src/main.c b/samples/pong/src/main.c index 6f3baee..1c01b82 100644 --- a/samples/pong/src/main.c +++ b/samples/pong/src/main.c @@ -74,15 +74,15 @@ ORCA_EXPORT void OnInit(void) if(mg_image_is_nil(waterImage)) { - log_error("coulnd't load ball image\n"); + log_error("couldn't load water image\n"); } if(mg_image_is_nil(ballImage)) { - log_error("coulnd't load ball image\n"); + log_error("couldn't load ball image\n"); } if(mg_image_is_nil(paddleImage)) { - log_error("coulnd't load paddle image\n"); + log_error("couldn't load paddle image\n"); } str8 fontStr = loadFile(mem_scratch(), STR8("/Literata-SemiBoldItalic.ttf")); diff --git a/src/graphics/graphics_common.c b/src/graphics/graphics_common.c index b8b1c93..99f146a 100644 --- a/src/graphics/graphics_common.c +++ b/src/graphics/graphics_common.c @@ -1607,6 +1607,10 @@ mg_image mg_image_create_from_data(mg_surface surface, str8 data, bool flip) image = mg_image_create_from_rgba8(surface, width, height, pixels); free(pixels); } + else + { + log_error("stbi_load_from_memory() failed: %s\n", stbi_failure_reason()); + } return(image); } @@ -1626,6 +1630,10 @@ mg_image mg_image_create_from_file(mg_surface surface, str8 path, bool flip) image = mg_image_create_from_rgba8(surface, width, height, pixels); free(pixels); } + else + { + log_error("stbi_load() failed: %s\n", stbi_failure_reason()); + } return(image); } diff --git a/src/platform/orca_log.c b/src/platform/orca_log.c index 5bf1068..417d926 100644 --- a/src/platform/orca_log.c +++ b/src/platform/orca_log.c @@ -51,8 +51,8 @@ char* log_stbsp_callback(char const* buf, void* user, int len) void platform_log_push(log_output* output, log_level level, - str8 function, str8 file, + str8 function, int line, const char* fmt, va_list ap) @@ -68,7 +68,7 @@ void platform_log_push(log_output* output, str8 string = str8_list_join(scratch, ctx.list); - orca_log(level, str8_ip(function), str8_ip(file), line, str8_ip(string)); + orca_log(level, str8_ip(file), str8_ip(function), line, str8_ip(string)); mem_arena_scope_end(tmp); } diff --git a/src/platform/platform_log.c b/src/platform/platform_log.c index e595cc2..a2e1f04 100644 --- a/src/platform/platform_log.c +++ b/src/platform/platform_log.c @@ -28,8 +28,8 @@ void log_set_level(log_level level) void platform_log_push(log_output* output, log_level level, - str8 function, str8 file, + str8 function, int line, const char* fmt, va_list ap); @@ -50,7 +50,7 @@ void log_push(log_level level, { va_list ap; va_start(ap, fmt); - platform_log_push(__logConfig.output, level, function, file, line, fmt, ap); + platform_log_push(__logConfig.output, level, file, function, line, fmt, ap); va_end(ap); } } diff --git a/src/platform/std_log.c b/src/platform/std_log.c index 38d32a9..0920711 100644 --- a/src/platform/std_log.c +++ b/src/platform/std_log.c @@ -38,8 +38,8 @@ log_output* LOG_DEFAULT_OUTPUT = &_logDefaultOutput; void platform_log_push(log_output* output, log_level level, - str8 function, str8 file, + str8 function, int line, const char* fmt, va_list ap)