diff --git a/Makefile b/Makefile index 9afcc99e6..b60bf12fd 100644 --- a/Makefile +++ b/Makefile @@ -100,6 +100,7 @@ else ifeq ($(VERSION),gc-eu-mq-dbg) CPP_DEFINES += -DTEXT_LANGUAGE=TEXT_LANG_EU -DOOT_MQ HACKEROOT := 0 else ifeq ($(VERSION),hackeroot-mq) + DEBUG := 1 CPP_DEFINES += -DTEXT_LANGUAGE=TEXT_LANG_EU -DOOT_MQ HACKEROOT := 1 else @@ -215,7 +216,7 @@ INC := -Iinclude -Iinclude/libc -Isrc -I$(BUILD_DIR) -I. -I$(EXTRACTED_DIR) # Check code syntax with host compiler CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces -CHECK_WARNINGS += -Werror=implicit-function-declaration +CHECK_WARNINGS += -Werror=implicit-function-declaration -Werror=incompatible-pointer-types -Werror=int-conversion # The `cpp` command behaves differently on macOS (it behaves as if # `-traditional-cpp` was passed) so we use `gcc -E` instead. diff --git a/src/code/graph.c b/src/code/graph.c index f5fac1b83..5bfce664c 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -499,6 +499,7 @@ void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size) { #if IS_DEBUG void Graph_OpenDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, int line) { +#if GBI_DEBUG dispRefs[0] = gfxCtx->polyOpa.p; dispRefs[1] = gfxCtx->polyXlu.p; dispRefs[2] = gfxCtx->overlay.p; @@ -506,9 +507,11 @@ void Graph_OpenDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, gDPNoOpOpenDisp(gfxCtx->polyOpa.p++, file, line); gDPNoOpOpenDisp(gfxCtx->polyXlu.p++, file, line); gDPNoOpOpenDisp(gfxCtx->overlay.p++, file, line); +#endif } void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, int line) { +#if GBI_DEBUG if (dispRefs[0] + 1 == gfxCtx->polyOpa.p) { gfxCtx->polyOpa.p = dispRefs[0]; } else { @@ -526,5 +529,6 @@ void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, } else { gDPNoOpCloseDisp(gfxCtx->overlay.p++, file, line); } +#endif } #endif