From d9059a5797687b0e8a3c70d6bac967c07daf827a Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Tue, 19 Jul 2022 17:44:03 -0700 Subject: [PATCH] taking notes --- src/cram.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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;