Commit graph

74 commits

Author SHA1 Message Date
Theo Champion
baccf93ac3 fix: changed ifs to else ifs for the perk hud code 2025-09-08 13:58:03 +02:00
Theo Champion
416b7a833d Added weapon hud 2025-09-08 10:36:52 +02:00
Theo Champion
f80eb125f5 feat: Added the round counter on the hud 2025-09-03 18:39:30 +02:00
Theo Champion
77a532a223 feat: Added perk logos to the left of the HUD 2025-09-03 16:38:38 +02:00
Theo Champion
cd7d0ddcfc fix: Fixed position of points 2025-09-03 16:37:28 +02:00
Theo Champion
761d126ba2 feat(points): Finished point counter on the right of the screen
Some things are temporary, like the load single image function that
still has comments. I'll make a function like this to restore the
original code (almost). I'll also pass the pathes as constants for the
sake of maintainabilty and try to avoid some of the magic values in the
code for the same purpose.
2025-08-20 17:09:56 +02:00
Theo Champion
792d8fc37a feat: Added point counter at the right of the screen (basic) 2025-08-20 15:49:31 +02:00
Theo Champion
4a2b4eb287 fix: Changed the fps counter, switched from a DMA to a static memory allocation 2025-08-20 15:32:57 +02:00
fb4680e4bd
feat: close window and exit on window close event 2025-08-20 13:53:18 +02:00
Theo Champion
b680e49ef9 feat: Added some credits 2025-08-18 20:05:50 +02:00
8445f240a2
feat: basic zombie movement (very bad) 2025-08-18 13:42:47 +02:00
Theo Champion
3230a60c9f fix: Fixed memory leak 2025-08-12 14:49:09 +02:00
Theo Champion
aae5e42b13 fix(main): Bumped calloc for sprites from 3 to MAX_SPRITES and moved it 2025-08-12 14:48:41 +02:00
Theo Champion
b7d56363ab removal(main): Removed sprites initialization in main function 2025-08-12 14:48:15 +02:00
fcb08f6447
fix: various rendering issues
- Correct rendering on whole window if window is not square
- Multiple crashes eliminated
- Sprites no longer lag behind player movement/rotation
2025-08-12 14:34:49 +02:00
Theo Champion
b9b164e32d norm: Fixed norm errors except for comments in main function 2025-08-11 11:03:51 +02:00
Theo Champion
4564db6f2f feat: Added fps counter 2025-08-11 10:50:59 +02:00
Theo Champion
10576f5751 feat: Made sprites dynamic in memory and allocated in heap 2025-08-07 12:36:22 +02:00
Theo Champion
258372bf09 feat: Added sprites 2025-08-06 14:06:52 +02:00
Theo Champion
134a6e14f0 wip: trying to render sprites 2025-08-06 14:01:29 +02:00
770f3d5ec0
feat: rotation via deltatime + fix deltatime calculation 2025-07-31 15:06:09 +02:00
Theo Champion
2bc214103b feat: Added delta time variable 2025-07-31 14:12:53 +02:00
Theo Champion
05e24d19f9 cleanup: moved initialization code from main() to a separate file 2025-07-31 13:41:16 +02:00
e625e254f7
feat: allocate screen_matrix on the heap 2025-07-31 13:38:49 +02:00
Theo Champion
6fe6eb0a9a norm: removed unused code 2025-07-31 11:30:21 +02:00
Theo Champion
e28cd1c85b feat: readded minimap 2025-07-30 16:35:39 +02:00
Theo Champion
5281fe6abd feat: made 3d... for the cub3d 2025-07-30 16:25:41 +02:00
Theo Champion
faf5127829 feat(player): redid all the movement code more details in desc
- had to tamper at init with the map pointer to allow player to move
- tweaked movement speed
- allowed for multiple keys to be pressed at the same time
- added collisions
- had to modify minimap code because it segfaulted due to old code
2025-07-29 15:01:31 +02:00
Theo Champion
ac94e9e937 fix(player init): deleted old init_player function in favor of the new
one
2025-07-29 13:33:58 +02:00
Theo Champion
1626b1d9da fix(hooks): Reworked keypresses events
Keypresses (along with keyreleases) events are now using booleans, a
function in the game loop will apply various changes as the key are
pressed. By default every boolean are set to false
2025-07-29 12:33:58 +02:00
Theo Champion
6c5a15915f removal: commented old raycaster loop 2025-07-29 12:13:05 +02:00
d856a10ffc
feat: calculate distance to first horizontal line 2025-07-29 12:02:25 +02:00
76fba8fd8a
feat: player coordinate are at the center of a tile 2025-07-29 12:01:39 +02:00
15de3cc857
feat: add utility function to convert coordinates from global to local space 2025-07-29 10:32:01 +02:00
b53fa93377 feat: separate utility functions for cardinal and intercardinal directions 2025-07-28 15:28:26 +02:00
8fd70cb18a feat: utility func to get cardinal direction from angle 2025-07-28 15:26:28 +02:00
dd82d902a5 feat: draw view cone (without DDA) 2025-07-28 15:26:28 +02:00
b6ac8867e5 feat: send single ray 2025-07-28 15:26:28 +02:00
c19b4087b9 feat: draw view cone (without DDA) 2025-07-28 15:17:04 +02:00
805ddbab0b feat: send single ray 2025-07-28 15:17:04 +02:00
Theo Champion
ff07c5cea1 feat(player init): Set the right angle depending on the letter on the map 2025-07-28 11:58:34 +02:00
Theo Champion
6f25b4e530 feat: added angle support 2025-07-25 15:06:06 +02:00
7449450c52
style: use constants for window width and height 2025-07-22 12:51:07 +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
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