Theo Champion
|
f1697a6c73
|
dev: Improved memory management of sprites
|
2025-08-12 14:49:11 +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 |
|
|
|
98e0119c91
|
fix: prevent moving through walls in extreme lag situations
|
2025-08-12 12:16:57 +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
|
a0967d5f93
|
fix(sprite caster): Added a check for empty list of sprites to avoid SEGFAULTing
|
2025-08-08 11:56:45 +02:00 |
|
Theo Champion
|
c796d44b56
|
norme: finished norme for the sprites except in main.c
|
2025-08-07 13:45:01 +02:00 |
|
Theo Champion
|
cab1036359
|
dev: made a 'macro' for sprite to write less and more efficiently
|
2025-08-07 13:19:17 +02:00 |
|
Theo Champion
|
c8da6964d0
|
fix: moved almost all variables to the sprite structure
|
2025-08-07 12:59:43 +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
|
2e0fd93831
|
fix: changed size of test.xpm
|
2025-08-07 12:33:47 +02:00 |
|
Theo Champion
|
9a113374a6
|
norm: normed code (except sprites)
|
2025-08-06 14:47:29 +02:00 |
|
Theo Champion
|
258372bf09
|
feat: Added sprites
|
2025-08-06 14:06:52 +02:00 |
|
Theo Champion
|
7a1e8c18df
|
dev: moved my_mlx_get_pixel function in draw utils for easier access
|
2025-08-06 14:05:40 +02:00 |
|
Theo Champion
|
aed03e79c3
|
fix: changed transparency color for the texture
|
2025-08-06 14:03:27 +02:00 |
|
Theo Champion
|
134a6e14f0
|
wip: trying to render sprites
|
2025-08-06 14:01:29 +02:00 |
|
Theo Champion
|
d3ba05a36d
|
feat: Made a sprite structure and added a static sprite field in data
A static sprite is a sprite that is not supposed to move, it'll be
placed at the parsing part. The sprite struct is prone to change as I am
testing it
|
2025-08-06 14:01:29 +02:00 |
|
Theo Champion
|
07dc80ba6a
|
feat: added a poorly drawn mystery box texture
|
2025-08-06 14:01:29 +02:00 |
|
|
|
a18c115ef1
|
fix: prevent crash due to out-of-bounds when game lags
|
2025-08-06 11:49:48 +02:00 |
|
|
|
1d6d97ef25
|
feat: enhance minimap rendering
- add heading indicator
- center of player icon is player position
- player size is independent of map tile size
- reduce minimap size
|
2025-08-05 15:23:31 +02:00 |
|
|
|
a46fdff49a
|
fix: correct error exit code when texture has error
|
2025-08-05 15:12:29 +02:00 |
|
|
|
a4d85c3cbb
|
tests: add test for detecting wrong texture size
|
2025-08-05 15:08:28 +02:00 |
|
|
|
c4bb3efe3e
|
feat: floor and ceiling colors
|
2025-08-05 15:01:35 +02:00 |
|
|
|
c242df5b72
|
feat: texture rendering
|
2025-08-05 13:27:34 +02:00 |
|
|
|
c09ba88d90
|
feat: use t_img_data to store textures insted of void ptr
This allows for easier writing of future functions, see next pr comming soon
|
2025-08-05 13:20:26 +02:00 |
|
|
|
121db8bd3c
|
norm: fix a few norm errors
|
2025-08-05 12:53:52 +02:00 |
|
|
|
f21e1e56fb
|
fix: use t_cardinal_dir instead of an int to represent direction
|
2025-08-05 12:50:24 +02:00 |
|
|
|
c4a867b054
|
feat: load and destroy wall textures
|
2025-08-05 12:11:06 +02:00 |
|
|
|
184ecc7eb3
|
tests: make a map use the textures
|
2025-08-01 11:07:56 +02:00 |
|
|
|
12892a389a
|
feat: add bad textures
|
2025-08-01 11:07:56 +02:00 |
|
|
|
265714c952
|
feat: add bad textures
|
2025-08-01 11:05:28 +02:00 |
|
|
|
770f3d5ec0
|
feat: rotation via deltatime + fix deltatime calculation
|
2025-07-31 15:06:09 +02:00 |
|
Theo Champion
|
11ea82f935
|
fix: tweaked movement and rotation values to comply with delta
|
2025-07-31 14:46:02 +02:00 |
|
Theo Champion
|
59b79701d6
|
fix: Fixed get_milliseconds() calculation
|
2025-07-31 14:45:31 +02:00 |
|
Theo Champion
|
008a1f9dc8
|
feat: Improved movements with delta
|
2025-07-31 14:45:11 +02:00 |
|
Theo Champion
|
2bc214103b
|
feat: Added delta time variable
|
2025-07-31 14:12:53 +02:00 |
|
Theo Champion
|
02940e9ecf
|
fix: readded matrix allcation (oopsy daisy)
|
2025-07-31 14:05:30 +02:00 |
|
Theo Champion
|
05e24d19f9
|
cleanup: moved initialization code from main() to a separate file
|
2025-07-31 13:41:16 +02:00 |
|
Theo Champion
|
7b0d05532c
|
cleanup(raycast): renamed render.c to walls.c to not confuse it with the actual renderer
|
2025-07-31 13:40:38 +02:00 |
|
|
|
e625e254f7
|
feat: allocate screen_matrix on the heap
|
2025-07-31 13:38:49 +02:00 |
|
Theo Champion
|
8d0a6d841b
|
feat(README): Added warning regarding certain valgrind errors
|
2025-07-31 12:20:19 +02:00 |
|
|
|
ca5fa86d10
|
fix: prevent zero-division in rare cases
|
2025-07-31 11:59:17 +02:00 |
|
Theo Champion
|
6fe6eb0a9a
|
norm: removed unused code
|
2025-07-31 11:30:21 +02:00 |
|
Theo Champion
|
3cc73fc8ce
|
feat: added colors depending on cardinal facing
|
2025-07-31 11:25:09 +02:00 |
|
Theo Champion
|
fb57ef253a
|
docs: documented ray struct
|
2025-07-30 16:46:31 +02:00 |
|
Theo Champion
|
f21b8dc448
|
fix: fixed norme
|
2025-07-30 16:40:33 +02:00 |
|
Theo Champion
|
e28cd1c85b
|
feat: readded minimap
|
2025-07-30 16:35:39 +02:00 |
|