Commit graph

66 commits

Author SHA1 Message Date
Theo Champion
79e94190c1 fix: Fixed crash when invalid texture 2025-10-03 19:51:23 +02:00
Theo Champion
94fd8779e2 feat: finished payed doors 2025-10-01 17:40:20 +02:00
Theo Champion
13b1f7a88c fix: Fixed memory leak for the door texture 2025-10-01 13:58:19 +02:00
Theo Champion
d34d4404e0 fix: Decreased the number of barricades 2025-09-22 17:22:02 +02:00
Theo Champion
43f1ab6090 norme: Fixed norme issues 2025-09-18 12:52:18 +02:00
Theo Champion
66c3bda4df dev: Added a registry for weapons
The registry is for storing weapons structs as they are closer to actual
objects than simple data.
2025-09-18 12:25:10 +02:00
Theo Champion
4048f5d1e3 dev: allocated weapon on the heap 2025-09-17 16:59:32 +02:00
Theo Champion
0b00f5608c feat: Added a cheat for ammos 2025-09-17 16:46:47 +02:00
Theo Champion
6cee6643e4 fix: Fixed memory leak for shooting texture 2025-09-16 16:09:20 +02:00
Theo Champion
37bb56733e feat: Made zombies killable
Code is almost normed I will make a function to handle sprites
interractions
2025-09-15 15:46:06 +02:00
Theo Champion
27af850525 norme: Fixed norme errors 2025-09-15 13:11:59 +02:00
Theo Champion
d7781f44d2 feat: Added shooting event 2025-09-14 17:42:48 +02:00
Theo Champion
b0ac26a7f6 wip: Adding weapon class and usage 2025-09-11 23:41:00 +02:00
Theo Champion
87c0a8a991 fix: fixed texture leakage 2025-09-10 15:19:30 +02:00
Theo Champion
a0f20b396c norme: fixed norme issues 2025-09-08 17:34:35 +02:00
Theo Champion
f407f5b7ce fix: fixed textures leaks 2025-09-08 17:11:58 +02:00
Theo Champion
f80eb125f5 feat: Added the round counter on the hud 2025-09-03 18:39:30 +02:00
Theo Champion
82d7941e81 feat: Added a little 'cheat' for the points 2025-09-03 16:41:51 +02:00
Theo Champion
c4e5ff619a fix: Initialized textures and perk orders to none for the player 2025-09-03 16:41:32 +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
70f6a36aad dev: Added width and height texture information 2025-08-20 16:39:39 +02:00
5242679d95
feat: load zombie sprites from map 2025-08-18 13:58:24 +02:00
92770f44f8 fix: segfault & leak with missing sprite image 2025-08-18 13:18:12 +02:00
Theo Champion
4568124d3f fix: git merge conflict again 2025-08-18 13:13:42 +02:00
Theo Champion
5c7cc77419 dev: improved how sprites are detected in maps 2025-08-18 13:07:08 +02:00
Theo Champion
541bc9ccf8 dev: Added sprite types and gave 'base' sprites their types 2025-08-14 21:47:21 +02:00
Theo Champion
0ac6ee9394 norme: Fixed little oopsie 2025-08-14 21:47:00 +02:00
Theo Champion
3511b6aaf8 norme: Fixed little oopsie 2025-08-14 21:45:39 +02:00
Theo Champion
01f0ac21df feat: Made a little sprite interaction for perk type sprites
It's more for the sake of the demo but it shows we can make interactions
with sprites. Although it's badly integrated.
2025-08-14 21:41:35 +02:00
Theo Champion
ee329812fd dev: Added sprite types and gave 'base' sprites their types 2025-08-14 21:41:33 +02:00
Theo Champion
0d6cc4063a dev: changed the c var in place_base_sprites to a counter in data struct 2025-08-14 21:38:49 +02:00
Theo Champion
4a70e44697 fix: Added a check for the sprites, to avoid segfaults and/or invalid writes 2025-08-14 21:27:53 +02:00
Theo Champion
dafe94804e norme: normed everything 2025-08-12 16:15:02 +02:00
Theo Champion
00e8a73d14 dev: improved sprites by creating a create_sprite function 2025-08-12 15:57:27 +02:00
Theo Champion
09ff569a31 feat: made sprites be placed in map file 2025-08-12 15:41:42 +02:00
Theo Champion
2eb1d635d4 norme: Fixed little norm error 2025-08-12 14:49:11 +02:00
Theo Champion
f1697a6c73 dev: Improved memory management of sprites 2025-08-12 14:49:11 +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
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
a46fdff49a
fix: correct error exit code when texture has error 2025-08-05 15:12:29 +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
c4a867b054
feat: load and destroy wall textures 2025-08-05 12:11:06 +02:00
Theo Champion
59b79701d6 fix: Fixed get_milliseconds() calculation 2025-07-31 14:45:31 +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
e625e254f7
feat: allocate screen_matrix on the heap 2025-07-31 13:38:49 +02:00
Theo Champion
788f248c5e fix: norme compliance 2025-07-29 20:13:43 +02:00
Theo Champion
e46f199606 fix: forgot to add header file 2025-07-29 15:03:10 +02:00