emote2ss

Animated webp to spritesheets converting tool
git clone git://bsandro.tech/emote2ss
Log | Files | Refs

commit eb91be48e11464c04fb173a70cc9d63f8004117f
parent 567246aa23201c1cc237439516d864c31025bff4
Author: bsandro <[email protected]>
Date:   Wed,  5 Jul 2023 23:48:50 +0300

i386 compatibility fixes

Diffstat:
MMakefile | 2+-
Msrc/main.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile @@ -2,7 +2,7 @@ NAME=$(shell basename ${PWD}) SRC=$(wildcard *.c src/*.c) DEPS:=$(wildcard *.h src/*.h) OBJ:=$(SRC:.c=.o) -LIBS:=libwebp libwebpdecoder libwebpdemux +LIBS:=libwebp libwebpdemux CFLAGS=-Og -g -std=c99 -Werror -Wall -Wextra -I. -I./src/ ${shell pkg-config --cflags $(LIBS)} LDFLAGS=-lc ${shell pkg-config --libs $(LIBS)} diff --git a/src/main.c b/src/main.c @@ -45,7 +45,7 @@ void alloc_image(AnimatedImage *img, uint32_t frame_count) { assert(img_size == (size_t)img_size); assert(frames_size == (size_t)frames_size); - printf("img mem: %lu\nframes mem: %lu\n", img_size, frames_size); + printf("img mem: %" PRIu64 "\nframes mem: %" PRIu64 "\n", img_size, frames_size); mem = malloc(img_size); frames = malloc(frames_size); @@ -170,7 +170,7 @@ void write_webp(const char *fname, AnimatedImage *img, int cols, int rows) { } int stride = img->width * sizeof(uint32_t) * img->frame_count; size_t encoded = WebPEncodeLosslessRGBA(merged, img->width * img->frame_count, img->height, stride, &out); - printf("size: %lu, encoded: %lu\n", img->width*img->height*sizeof(uint32_t), encoded); + printf("size: %" PRIu32 ", encoded: %zu\n", img->width*img->height*sizeof(uint32_t), encoded); assert(encoded!=0); size_t written = fwrite(out, sizeof(uint8_t), encoded, fp); assert(written==encoded);