minor bugfixes #38
|
@ -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"));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue