Compare commits
No commits in common. "02b8c4aa0642575332e904f25cdfc7badccf86e3" and "e370ea5b3177302aafd751028c4c6213b8aa59b5" have entirely different histories.
02b8c4aa06
...
e370ea5b31
2
.ccls
2
.ccls
|
|
@ -7,4 +7,4 @@ gcc
|
|||
|
||||
# Macros
|
||||
-DASSET_FILE_NAME="$(make print-ASSET_OUTPUT)"
|
||||
-DDEBUG=2
|
||||
-DDEBUG=1
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"type": "gdb",
|
||||
"request": "launch",
|
||||
"target": "${workspaceFolder}/build/2D_Engine",
|
||||
"cwd": "${workspaceFolder}/build",
|
||||
"cwd": "${workspaceFolder}",
|
||||
"valuesFormatting": "parseText",
|
||||
"preLaunchTask": "Build"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 7f66cb41728fdea5e1f71b8a8f7212e54088f81c
|
||||
Subproject commit 4dbee83e8d89c965714fc521fa324e237dd35129
|
||||
|
|
@ -11,7 +11,7 @@ SRC_CC = gcc
|
|||
ifeq ($(RELEASE), 1)
|
||||
SRC_CFLAGS = --std=c17 --pedantic -O3 # RELEASE
|
||||
else
|
||||
SRC_CFLAGS = --std=c17 --pedantic -O0 -g -DDEBUG=2 \
|
||||
SRC_CFLAGS = --std=c17 --pedantic -O0 -g \
|
||||
-Wall -Wno-missing-braces -Wextra -Wno-missing-field-initializers \
|
||||
-Wformat=2 -Wswitch-default -Wswitch-enum -Wcast-align \
|
||||
-Wpointer-arith -Wbad-function-cast -Wstrict-overflow=5 \
|
||||
|
|
|
|||
|
|
@ -2,12 +2,7 @@
|
|||
#define DRAW(PREFIX) PREFIX##_draw
|
||||
#define NO_DRAW(...) NULL
|
||||
|
||||
#if DEBUG >= 2
|
||||
COMPONENT(TRANSFORM_COMPONENT, transform_component, DRAW)
|
||||
#else
|
||||
COMPONENT(TRANSFORM_COMPONENT, transform_component, NO_DRAW)
|
||||
#endif // DEBUG >= 2
|
||||
|
||||
COMPONENT(SPRITE_COMPONENT, sprite_component, DRAW)
|
||||
COMPONENT(ANIMATION_SYSTEM, animation_system, NO_DRAW)
|
||||
COMPONENT(PLAYER_SYSTEM, player_system, NO_DRAW)
|
||||
|
|
|
|||
|
|
@ -14,10 +14,6 @@ int transform_component_init(component_t *component);
|
|||
|
||||
int transform_component_update(component_t *component);
|
||||
|
||||
#if DEBUG >= 2
|
||||
int transform_component_draw(component_t *component);
|
||||
#endif
|
||||
|
||||
int transform_component_destroy(component_t *component);
|
||||
|
||||
#endif // TRANSFORM_COMPONENT_H
|
||||
|
|
@ -34,30 +34,6 @@ int transform_component_update(component_t *component)
|
|||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
#if DEBUG >= 2
|
||||
#include "display.h"
|
||||
#include "errors.h"
|
||||
|
||||
int transform_component_draw(component_t *component)
|
||||
{
|
||||
transform_component_data_t *component_data = component->component_data;
|
||||
|
||||
if(!SDL_SetRenderDrawColor(renderer, C_BLUE))
|
||||
{
|
||||
error_printf("Failed to change renderer draw color : %s", SDL_GetError());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if(!SDL_RenderRect(renderer, &component_data->bounds))
|
||||
{
|
||||
error_printf("Failed to draw rectangle to renderer : %s", SDL_GetError());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif // DEBUG >= 2
|
||||
|
||||
inline int transform_component_destroy(component_t *component)
|
||||
{
|
||||
transform_component_data_t *component_data = component->component_data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue