mirror of
https://github.com/zoriya/My3D.git
synced 2025-12-06 06:26:14 +00:00
Solving some warning
This commit is contained in:
2
Makefile
2
Makefile
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Submodule lib/gamacon updated: b85b7918c3...d66d6e7924
@@ -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)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user