Solving some warning

This commit is contained in:
AnonymusRaccoon
2020-03-12 21:05:46 +01:00
parent bccfcab6c8
commit 9cec01cf28
5 changed files with 8 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ OBJ = $(SRC:%.c=%.o)
INCLUDE = -I ./include -I lib/gamacon/include -I lib/gamacon/lib/xmlparser/include
CFLAGS = $(INCLUDE) -Wall -Wshadow -Wextra
CFLAGS = $(INCLUDE) -Wall -Wshadow -Wextra -Wno-unused-parameter
LDFLAGS = -L lib/gamacon -L lib/my -L lib/xmlparser -L lib/quadtree\
-lgamacon -lxmlparser -lquadtree -lmy -lcsfml-system -lcsfml-graphics -lcsfml-audio -lcsfml-window -lm

View File

@@ -12,12 +12,12 @@ typedef enum display_type
HAPPINESS_DISPLAY,
STUPIDITY_DISPLAY,
SELECT_TILE_DISPLAY
} display_type;
} display_type_enum;
struct game_display
{
gc_component base;
display_type type;
display_type_enum type;
};
const struct game_display game_display;

View File

@@ -18,7 +18,7 @@ static void ctr(void *component, va_list args)
{
struct game_display *cmp = (struct game_display *)component;
cmp->type = va_arg(args, display_type);
cmp->type = va_arg(args, display_type_enum);
}
static void fdctr(gc_entity *entity, gc_scene *scene, void *component, node *n)

View File

@@ -17,6 +17,7 @@
#include "components/game_manager.h"
#include "systems/game_manager_system.h"
#include "map_interactions.h"
#include "my.h"
const struct callback callbacks[] = {
{"start_button", &start_button},
@@ -57,7 +58,8 @@ int register_customcmps(gc_engine *engine)
engine->add_system(engine, &teams_system);
engine->finish_physics(engine);
for (int i = 0; callbacks[i].func; i++)
engine->add_callback(engine, callbacks[i].name, callbacks[i].func);
engine->add_callback(engine, my_strdup(callbacks[i].name), \
callbacks[i].func);
return (0);
}