Using xml

This commit is contained in:
AnonymusRaccoon
2019-12-09 12:11:10 +01:00
parent afa481e5b2
commit cffa7693be
7 changed files with 42 additions and 22 deletions

View File

@@ -11,11 +11,12 @@ SRC = main.c \
OBJ = $(SRC:%.c=%.o)
INCLUDE = -I ./include -I lib/gamacon/include
INCLUDE = -I ./include -I lib/gamacon/include -I lib/gamacon/lib/xmlparser/include
CFLAGS = $(INCLUDE) -Wall -Wshadow -Wextra
LDFLAGS = -L lib/gamacon -lgamacon -L lib/my -lmy -lcsfml-system -lcsfml-graphics
LDFLAGS = -L lib/gamacon -L lib/my -L lib/xmlparser \
-lgamacon -lxmlparser -lmy -lcsfml-system -lcsfml-graphics
NAME = my_runner
@@ -26,11 +27,13 @@ all: build
build: $(OBJ)
$(MAKE) -C lib/gamacon
$(MAKE) -C lib/my
$(MAKE) -C lib/xmlparser
$(CC) -o $(NAME) $(OBJ) $(LDFLAGS)
clean:
$(MAKE) -C lib/gamacon clean
$(MAKE) -C lib/my clean
$(MAKE) -C lib/xmlparser clean
$(RM) $(OBJ)
fclean: clean
@@ -39,6 +42,7 @@ fclean: clean
ffclean: fclean
$(MAKE) -C lib/my fclean
$(MAKE) -C lib/gamacon fclean
$(MAKE) -C lib/xmlparser fclean
re: fclean all
@@ -46,6 +50,7 @@ dbg: CFLAGS += -g
dbg: clean $(OBJ)
$(MAKE) -C lib/gamacon dbg
$(MAKE) -C lib/my
$(MAKE) -C lib/xmlparser
$(CC) -o $(NAME) $(OBJ) $(LDFLAGS)
.PHONY: all build clean fclean ffclean

View File

@@ -8,6 +8,8 @@
int count_valid_queens_placements(int n);
char *my_strchr(const char *str, char c);
int my_compute_power_it(int n, int p);
int my_compute_power_rec(int n, int p);

Submodule lib/gamacon updated: 83a9b8f9ef...ee89f69e7a

View File

@@ -8,6 +8,8 @@
int count_valid_queens_placements(int n);
char *my_strchr(const char *str, char c);
int my_compute_power_it(int n, int p);
int my_compute_power_rec(int n, int p);

17
lib/my/my_strchr.c Normal file
View File

@@ -0,0 +1,17 @@
/*
** EPITECH PROJECT, 2019
** MUL_my_runner_2019
** File description:
** my_strchr
*/
#include "stddef.h"
char *my_strchr(char *str, char c)
{
for (int i = 0; str[i]; i++) {
if (str[i] == c)
return (&str[i]);
}
return (NULL);
}

1
lib/xmlparser Submodule

Submodule lib/xmlparser added at 48beb9a721

View File

@@ -1,19 +1,12 @@
Entity
0:
PositionComponent 0,0 800 600
TextureRenderer assets/sprites/bck_layer4.png
Entity
0:
PositionComponent 0,0 800 600
TextureRenderer assets/sprites/bck_layer3.png
Entity
0:
PositionComponent 0,0 800 600
TextureRenderer assets/sprites/bck_layer2.png
Entity
0:
PositionComponent 0,0 800 600
TextureRenderer assets/sprites/bck_layer1.png
<gc_group>
<gc_entity>
<TransformComponent>
<Position x="0" y="0" />
<Size x="800" y="600" />
</TransformComponent>
<TextureRenderer src="assets/sprites/bck_layer4.png">
<Rect height="auto" width="auto" top="0" left="0" />
</TextureRenderer>
<ParallaxComponent speed="0.1" />
</gc_entity>
</gc_group>