Commit graph

236 commits

Author SHA1 Message Date
Theo Champion
38feba022f fix: added angle.c to the compilation chain 2025-07-25 15:06:06 +02:00
Theo Champion
ca82add75f fix: created angle.c and moved part of the movement to comply with norme 2025-07-25 15:06:06 +02:00
Theo Champion
6f25b4e530 feat: added angle support 2025-07-25 15:06:06 +02:00
Theo Champion
300f5c2e19 chore: added libmath to compilation command 2025-07-25 15:06:06 +02:00
Theo Champion
bcb7f5dcd6 doc: added some documentation for angles 2025-07-25 15:06:06 +02:00
3c12c1594e fix: give error for trailing chars after map
https://www.notion.so/Pas-d-erreur-detect-pour-une-map-avec-des-characters-apres-la-map-239551de06f480bc8f07e3fbe844ecd7?v=233551de06f480718417000cf26e3225&source=copy_link
2025-07-25 15:06:06 +02:00
3543807548 fix: give error for trailing chars after map
https://www.notion.so/Pas-d-erreur-detect-pour-une-map-avec-des-characters-apres-la-map-239551de06f480bc8f07e3fbe844ecd7?v=233551de06f480718417000cf26e3225&source=copy_link
2025-07-24 12:42:06 +02:00
2d3d614ab3 tests: add a script to quickly run the program through all bad maps
https://www.notion.so/Tests-automatique-pour-les-bad-maps-239551de06f48087a5d3da952ddfc296?v=233551de06f480718417000cf26e3225&source=copy_link
2025-07-23 13:20:35 +02:00
Theo Champion
4b861f77ea fix: Used the right free function for the split
My bad I used free_map() but I should've used free_tab() I must've been
tired or something.
2025-07-23 12:27:49 +02:00
Theo Champion
279d155701 fix: removed useless NULL checks as demanded 2025-07-23 12:27:49 +02:00
Theo Champion
af8b63b0ca fix(texture setting): Fixed leak when map starts before all textures are set 2025-07-23 12:27:49 +02:00
Theo Champion
a67010b929 fix(setters): added a tiny bit of security when freeing data 2025-07-23 12:27:49 +02:00
7449450c52
style: use constants for window width and height 2025-07-22 12:51:07 +02:00
6aecc3ba6e
style: use a constant for error message length
relates to, but does not full resolve:

https://www.notion.so/Constante-Magique-dans-le-code-233551de06f480ef9687fa3d711db137?v=233551de06f480718417000cf26e3225&source=copy_link
2025-07-22 12:39:29 +02:00
Theo Champion
d7ca150c74 fix: Changed return type of set_color() and converted types for colors 2025-07-22 12:21:57 +02:00
Theo Champion
4b2f671107 norm: fixed all the norme issues in the perform_color_checks() function 2025-07-22 12:12:07 +02:00
Theo Champion
c495547a70 fix: redid all the checks for the color
- checks if it has less or more than 3 fields
- checks if it's only digits
- checks if it's between 0 and 255
2025-07-21 17:26:14 +02:00
Theo Champion
ea8d3e085a fix: fixed malformed test map file 2025-07-21 15:57:58 +02:00
8d3746dd53
feat(map parsing): show error if same texture directive is given twice
https://www.notion.so/Logic-error-leak-when-multiple-identical-texture-directives-are-given-233551de06f4806f8552ce4877a7757d?v=233551de06f480718417000cf26e3225&source=copy_link
2025-07-21 15:30:53 +02:00
3e28da1fcf
refactor: put all populate_map related code in that file 2025-07-21 15:30:53 +02:00
Theo Champion
b564311851 fix(Makefile): fixed rule to make the MinilibX compile 2025-07-21 13:47:43 +02:00
Theo Champion
141db7ab2d test: Added a bad map where a color is missing 2025-07-21 13:38:16 +02:00
Theo Champion
3d9559088a fix(parser): Added message when there is no player in map 2025-07-21 13:36:31 +02:00
40e0673425
fix: allow empty lines between texture definitions 2025-07-21 13:03:41 +02:00
5b9c293503
tests: add good map with texture and colors mixed 2025-07-21 13:03:41 +02:00
62943e5675
tests: add bad map with empty lines between declarations and duplicated declarations 2025-07-21 13:03:41 +02:00
Theo Champion
e2746efe48 chore: added color related bad maps
- if letters are present in the color description. ie 124,34,qwe
- if there is too many colors in the first line. ie 1,2,3,4
- if there is too many colors in the second line. ie 1,2,3,4
2025-07-21 12:47:53 +02:00
Theo Champion
cb3df61edd chore: added a bad map where no player can spawn 2025-07-21 12:36:02 +02:00
2c7eef8f6c
fix: free map when parsing fails
https://www.notion.so/Leak-quand-fichier-n-est-pas-cub-233551de06f480d69d6cc79fa0a1837a?v=233551de06f480718417000cf26e3225&source=copy_link
2025-07-21 11:51:38 +02:00
c5f15dbf11
fix: check that mlx initialized succesfully before using
https://www.notion.so/Segfault-when-DISPLAY-is-invalid-233551de06f480b28d8ec14cd4b23d47?source=copy_link
2025-07-21 11:43:53 +02:00
8259ef238d
todos: remove in-project todo file
all tasks have been imported into notion
2025-07-18 10:29:15 +02:00
4a2ad1fa58
build: overhaul Makefile 2025-07-17 16:20:53 +02:00
6322d05b22
style: split structs.h header into multiple, remove from central dir 2025-07-17 15:57:59 +02:00
38a05423dd
style: move consts header to src folder 2025-07-17 14:57:09 +02:00
7000634228
style: remove maputils header from central includes folder 2025-07-17 14:56:50 +02:00
8ec3f2e11c
style: remove cub3d header from central includes folder 2025-07-17 14:35:31 +02:00
4ffc52b462
style: remove mlx & libft headers from central includes folder 2025-07-17 14:19:02 +02:00
d7efc43f12
fix: potential leak with gnl due to non-exhaustion 2025-07-17 14:09:07 +02:00
085a51ca6d
todo: add todos from first review of the existing code 2025-07-17 13:27:19 +02:00
3dcfd09cff
fix: make it build on nixos 2025-07-17 13:17:29 +02:00
Theo Champion
be6c44c24b transforming markdown stuff into plain text streams 2025-07-17 13:12:44 +02:00
Theo Champion
621c38573c transforming markdown stuff into plain text streams 2025-07-17 11:54:49 +02:00
Theo Champion
aa9f9bf6de normed + finished movements 2025-07-15 10:33:25 +02:00
Theo Champion
cc12b7554a sort of finished movements 2025-07-10 12:04:17 +02:00
Theo Champion
4f573baf23 Added a real rendering 2025-07-09 17:30:16 +02:00
Theo Champion
3b495f213f added keyrelease event 2025-07-09 17:12:10 +02:00
Theo Champion
a58783350d added movement vector movement core 2025-07-09 17:08:01 +02:00
Theo Champion
ba42e0d3e1 restarted movement core 2025-07-09 16:45:13 +02:00
Theo Champion
a8abe903cb ??? 2025-07-07 14:40:37 +02:00
Theo Champion
83fc0d7d35 removed useless define, added PHONY rule 2025-07-02 15:45:00 +02:00