mirror of
https://github.com/SAT-R/sa2.git
synced 2026-10-28 09:43:38 +00:00
Align gfx tool with SA2
This commit is contained in:
1 parent
770e5826ac
commit
d39f2c8e6f
2 files changed
+5
-2
No files matched your search
Vendored
+2
-1
@@ -1,6 +1,7 @@
|
||||
CC = gcc
|
||||
|
||||
CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
|
||||
# TODO: why does error-maybe-uninitialized appear on some peoples systems
|
||||
CFLAGS = -Wall -Wextra -Werror -Wno-sign-compare -Wno-maybe-uninitialized -Wno-unknown-warning-option -std=c11 -O2 -DPNG_SKIP_SETJMP_CHECK
|
||||
CFLAGS += $(shell pkg-config --cflags libpng)
|
||||
|
||||
LIBS = -lpng -lz
|
||||
|
||||
Vendored
+3
-1
@@ -4,6 +4,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <assert.h>
|
||||
#include <string.h> // memcpy
|
||||
#include "global.h"
|
||||
#include "gfx.h"
|
||||
@@ -415,7 +416,7 @@ void WriteImage(char *path, int numTiles, int bitDepth, int metatileWidth, int m
|
||||
/* Split image into shapes */
|
||||
struct OamShape* head = FindOamShapes(image->width, image->height);
|
||||
|
||||
#ifdef DEBUG
|
||||
#if 0
|
||||
/* Debug */
|
||||
printf("OAM Shapes (%d, %d):\n", image->width, image->height);
|
||||
struct OamShape* temp = head;
|
||||
@@ -444,6 +445,7 @@ void WriteImage(char *path, int numTiles, int bitDepth, int metatileWidth, int m
|
||||
|
||||
curr = curr->next;
|
||||
}
|
||||
assert(scratchBuffer != NULL);
|
||||
/* Copy the scratch buffer back into the original buffer */
|
||||
memcpy(buffer, scratchBuffer, bufferSize);
|
||||
|
||||
|
||||
Reference in new issue
Block a user