From 4abb242204e117edfec86a24bbecc689ace6a9a7 Mon Sep 17 00:00:00 2001 From: 0scar Date: Tue, 15 Aug 2023 09:09:14 +0200 Subject: Update the _DEBUG macro test to something more standard --- src/rendering.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/rendering.c') diff --git a/src/rendering.c b/src/rendering.c index 580be9e..e62e746 100644 --- a/src/rendering.c +++ b/src/rendering.c @@ -22,7 +22,7 @@ i32 drawcall_len = 0; /* Clear the screen, * To be used inbetween draw calls */ void render_begin(Window *w) { -#ifdef DAW_BUILD_DEBUG +#ifdef _DEBUG SDL_SetRenderDrawColor(w->renderer, 0x10, 0x0a, 0x33, 0x00); #else SDL_SetRenderDrawColor(w->renderer, 0x00, 0x00, 0x00, 0x00); @@ -42,7 +42,7 @@ void render_present(Window *w) { break; case RenderDrawCallType_Sprite: { -#ifdef DAW_BUILD_DEBUG +#ifdef _DEBUG if (dc.data.sprite.sprite == NULL) { __asm__("int3;"); WARN("Sprite %lx in drawcall %d/%d had NULL reference", dc.data.sprite.sprite, i, drawcall_len); @@ -110,7 +110,7 @@ void engine_draw_uitree(UITree *t) { void engine_draw_sprite(Sprite *s, v2_i32 *pos, f32 scale) { if (drawcall_len + 1 >= drawcall_limit) return; -#ifdef DAW_BUILD_DEBUG +#ifdef _DEBUG if (s == NULL) __asm__("int3;"); #endif drawcalls[drawcall_len++] = (RenderDrawCall){ @@ -127,7 +127,7 @@ void engine_draw_sprite(Sprite *s, v2_i32 *pos, f32 scale) { void engine_draw_sprite_ex(Sprite *s, v2_i32 *pos, f32 scale, Engine_color colormod) { if (drawcall_len + 1 >= drawcall_limit) return; -#ifdef DAW_BUILD_DEBUG +#ifdef _DEBUG if (s == NULL) __asm__("int3;"); #endif drawcalls[drawcall_len++] = (RenderDrawCall){ -- cgit v1.3