This commit is contained in:
Clément Le Bihan
2020-02-26 11:54:28 +01:00
5 changed files with 18 additions and 2 deletions
+1 -1
View File
@@ -198,7 +198,7 @@ add_executable(My3D
lib/xmlparser/src/xmlparser.c
lib/xmlparser/src/xmlproperties.c
src/game_loader.c
main.c)
main.c lib/gamacon/include/errors.h lib/gamacon/src/ui/button.c lib/gamacon/src/ui/setup_ui.c lib/gamacon/include/ui.h src/interface.c lib/gamacon/src/components/clickable_component.c lib/gamacon/include/components/clickable_component.h lib/gamacon/src/systems/clickable_system.c)
add_compile_options(-W -Wall -Wextra -Wshadow)
+1 -1
View File
@@ -23,7 +23,7 @@ CC = gcc
all: build
build: $(OBJ)
$(NAME): $(OBJ)
$(MAKE) -C lib/gamacon
$(MAKE) -C lib/my
$(MAKE) -C lib/xmlparser
+2
View File
@@ -1,9 +1,11 @@
<gc_scene>
<data>
<sprite src="assets/sprites/grass.png" />
<sprite name="button_background" src="assets/sprites/grass.png" />
<font src="assets/fonts/roboto.ttf" />
</data>
<gc_entities>
<button text="Lorem ipsum." x="75%" y="25%" click="test" />
<gc_entity>
<transform_component />
<renderer text="assets/sprites/grass.png" />
+4
View File
@@ -12,12 +12,16 @@
#include <SFML/System.h>
#include <SFML/Window.h>
void test(gc_engine *engine, int entity_id);
int register_customcmps(gc_engine *engine)
{
engine->finish_physics(engine);
engine->add_callback(engine, "test", &test);
return (0);
}
int create_game_scene(gc_engine *engine, const char *map)
{
gc_scene *scene;
+10
View File
@@ -0,0 +1,10 @@
//
// Created by anonymus-raccoon on 2/24/20.
//
#include "engine.h"
void test(gc_engine *engine, int entity_id)
{
printf("Test called.\n");
}