This commit is contained in:
SavaletDev
2023-12-12 14:25:31 +01:00
parent 936fa139c0
commit 7a6bb591ad
4 changed files with 31 additions and 3 deletions

View File

@@ -7,7 +7,8 @@
NAME = my_radar
SRCS = src/main.c
SRCS = src/main.c \
src/utils/print_usages.c
CC = gcc

View File

@@ -13,4 +13,6 @@
#include <stdbool.h>
#include <stdlib.h>
#include "../lib/my/lib.h"
void print_usages(void);
#endif /* RADAR_H */

View File

@@ -1,6 +1,6 @@
/*
** EPITECH PROJECT, 2023
** B-CPE-110-REN-1-1-organized-nathan.barbet
** B-MUL-100-REN-1-1-myradar-savinien.petitjean
** File description:
** main.c
*/
@@ -9,8 +9,13 @@
#include <SFML/Audio.h>
#include <SFML/Graphics.h>
#include <stdlib.h>
int main()
int main(int ac, char **av)
{
if (ac == 2 && my_strcmp(av[1], "-h") == 0) {
print_usages();
return (0);
}
sfVideoMode mode = {1920, 1080, 32};
sfRenderWindow* window;
sfEvent event;

20
src/utils/print_usages.c Normal file
View File

@@ -0,0 +1,20 @@
/*
** EPITECH PROJECT, 2023
** B-MUL-100-REN-1-1-myradar-savinien.petitjean
** File description:
** print_usages.c
*/
#include "../../include/radar.h"
void print_usages(void)
{
my_putstr("USAGE\n");
my_putstr(" ./my_radar [OPTIONS] path_to_script\n");
my_putstr("path_to_script The path to the script file.\n");
my_putstr(" OPTIONS\n");
my_putstr(" -h print the usage and quit.\n");
my_putstr(" USER INTERACTIONS\n");
my_putstr("L key enable/disable hitboxes and areas.\n");
my_putstr("S key enable/disable sprites.\n");
}