taking notes

pull/1/head
cosmonaut 2022-07-19 17:44:03 -07:00
parent c5c7df6c91
commit d9059a5797
1 changed files with 6 additions and 6 deletions

View File

@ -83,8 +83,8 @@ typedef struct Cram_Image
{ {
const char *name; const char *name;
Rect rect; Rect rect;
uint8_t duplicate; uint8_t duplicate; /* FIXME: is there a better way to do this? */
uint8_t *pixels; // will be NULL if duplicate! uint8_t *pixels; /* Will be NULL if duplicate! */
size_t hash; size_t hash;
} Cram_Image; } Cram_Image;
@ -268,7 +268,7 @@ void Cram_AddFile(Cram_Context *context, const char *path)
topTrim = 0; topTrim = 0;
for (i = 0; i < height; i += 1) 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; topTrim = i;
break; break;
@ -278,7 +278,7 @@ void Cram_AddFile(Cram_Context *context, const char *path)
leftTrim = 0; leftTrim = 0;
for (i = 0; i < width; i += 1) 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; leftTrim = i;
break; break;
@ -288,7 +288,7 @@ void Cram_AddFile(Cram_Context *context, const char *path)
bottomTrim = height; bottomTrim = height;
for (i = height - 1; i >= topTrim; i -= 1) 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; bottomTrim = i + 1;
break; break;
@ -298,7 +298,7 @@ void Cram_AddFile(Cram_Context *context, const char *path)
rightTrim = width; rightTrim = width;
for (i = width - 1; i >= leftTrim; i -= 1) 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; rightTrim = i + 1;
break; break;