replaced PRINT_LOG and PRINT_ERR

Signed-off-by: h4570 <sandro.sobczynski@gmail.com>
This commit is contained in:
h4570
2021-05-26 19:36:59 +02:00
parent d8458b98e0
commit fafc66d35c
21 changed files with 136 additions and 272 deletions
+2 -10
View File
@@ -38,12 +38,7 @@ void BmpLoader::load(Texture &o_texture, char *t_subfolder, char *t_name, char *
delete[] path_part1;
delete[] path_part2;
FILE *file = fopen(path, "rb");
if (file == NULL)
{
PRINT_ERR("Failed to load .bmp file!");
return;
}
assertMsg(file != NULL, "Failed to load .bmp file!");
unsigned char header[54];
fread(header, sizeof(unsigned char), 54, file);
@@ -53,10 +48,7 @@ void BmpLoader::load(Texture &o_texture, char *t_subfolder, char *t_name, char *
u32 bits = (u32)header[28];
u32 dataOffset = (u32)header[10];
if (bits != 24)
{
PRINT_ERR("Invalid bits per pixel in .bmp file - expected 24!");
}
assertMsg(bits == 24, "Invalid bits per pixel in .bmp file - expected 24!");
o_texture.setSize(width, height, TEX_TYPE_RGB);
printf("BMPLoader - width: %d | height: %d | bits: %d\n", width, height, bits);