diff --git a/src/cram.c b/src/cram.c index 07169a9..b44fb52 100644 --- a/src/cram.c +++ b/src/cram.c @@ -83,8 +83,8 @@ typedef struct Cram_Image { const char *name; Rect rect; - uint8_t duplicate; - uint8_t *pixels; // will be NULL if duplicate! + uint8_t duplicate; /* FIXME: is there a better way to do this? */ + uint8_t *pixels; /* Will be NULL if duplicate! */ size_t hash; } Cram_Image; @@ -268,7 +268,7 @@ void Cram_AddFile(Cram_Context *context, const char *path) topTrim = 0; for (i = 0; i < height; i += 1) { - if (!Cram_Internal_IsRowClear(pixels, i, width)) + if (!Cram_Internal_IsRowClear((uint32_t*) pixels, i, width)) { topTrim = i; break; @@ -278,7 +278,7 @@ void Cram_AddFile(Cram_Context *context, const char *path) leftTrim = 0; for (i = 0; i < width; i += 1) { - if (!Cram_Internal_IsColumnClear(pixels, i, width, height)) + if (!Cram_Internal_IsColumnClear((uint32_t*) pixels, i, width, height)) { leftTrim = i; break; @@ -288,7 +288,7 @@ void Cram_AddFile(Cram_Context *context, const char *path) bottomTrim = height; for (i = height - 1; i >= topTrim; i -= 1) { - if (!Cram_Internal_IsRowClear(pixels, i, width)) + if (!Cram_Internal_IsRowClear((uint32_t*) pixels, i, width)) { bottomTrim = i + 1; break; @@ -298,7 +298,7 @@ void Cram_AddFile(Cram_Context *context, const char *path) rightTrim = width; for (i = width - 1; i >= leftTrim; i -= 1) { - if (!Cram_Internal_IsColumnClear(pixels, i, width, height)) + if (!Cram_Internal_IsColumnClear((uint32_t*) pixels, i, width, height)) { rightTrim = i + 1; break;