Commit Graph

230 Commits

Author SHA1 Message Date
fef5885293 full removal of SDL 2025-09-10 11:59:38 +02:00
2309bd86eb add GLAD "library" 2025-09-10 11:38:02 +02:00
2e36c53d4e rewrite makefile
dropping `SDL2` requirement, opting for `glfw3` instead.
2025-09-10 11:38:02 +02:00
baf680ee3c differentiate between out-of-bounds intersection and regular intersection. 2025-09-10 11:38:02 +02:00
a827c84223 add a tad more documentation about how we encode our data. 2025-09-10 11:38:02 +02:00
f8eb814a4a fix: stored I tetrominos read as empty. 2025-09-10 11:38:02 +02:00
42b9e9b10c fix: add out of bounds checks to tetris_intersect 2025-09-10 11:38:02 +02:00
7ccc679d54 fix: rotation mask incorrect 2025-09-10 11:38:02 +02:00
e9226e4a39 rework shape handelling, placement and play field management 2025-09-10 11:38:02 +02:00
d471c42388 rework error script 2025-09-10 11:38:02 +02:00
a9be2c06a6 remove needless headers 2025-09-09 16:28:12 +02:00
fa32d78ed7 rework attributes.h as atrb.h 2025-09-09 16:27:44 +02:00
fed9333642 rename types.h to intdef.h, and make some minor changes 2025-09-09 16:26:57 +02:00
cfad7f6fdc update pointer alignment rule 2025-09-09 16:17:15 +02:00
c339accedc rework clear rows function to be more efficient, and shorter. 2025-09-08 12:51:44 +02:00
7583da2ad3 remove TODOs 2025-07-07 10:57:02 +02:00
507066d1a9 close window when loss 2025-07-03 13:51:04 +02:00
9cafbedad8 rename TETROMINO_* fields to TET*, to be shorter
constants like `TETROMINO_COUNT`, `TETROMINO_ROTATED_90` were too long,
and took up too much horizontal space.
2025-07-03 13:33:54 +02:00
baf59fa84e refactor: comments and small semantic fixes 2025-07-03 13:33:54 +02:00
ede32b4ff7 function name changes for clairity 2025-07-03 13:33:39 +02:00
c889dee588 execute new formatter 2025-07-03 09:56:50 +02:00
ffd423331a add error handling for debugging when id is invalid with shape acquisition 2025-07-03 09:49:19 +02:00
b89fc62513 remove the lookup table / binary-encoded logic. 2025-07-03 09:48:59 +02:00
6a807b59d7 implement logic-based function in placing 2025-07-03 09:44:59 +02:00
3cbb090a29 implement logic-based function in rendering 2025-07-03 09:38:16 +02:00
edcd5d30d3 reduce memory footprint of tetromino plock location data 2025-07-03 01:02:11 +02:00
af43c9162a implement logic-based function in collision 2025-07-03 00:15:43 +02:00
13e21cb79d write function for the new logic-based tetromino shape definitions 2025-07-03 00:15:43 +02:00
fb280c1359 rewrite clang-format 2025-07-03 00:06:54 +02:00
84439a56f6 remove comments from clang-format 2025-07-03 00:06:54 +02:00
27cacb055c fix: S and Z shapes were inverted 2025-07-02 22:38:03 +02:00
b5b51ae555 fix: input dropping sometimes 2025-07-02 15:12:14 +02:00
97f7f05a5c refactor comments 2025-07-02 10:30:59 +02:00
00db0cda7e fix: double input issue 2025-07-01 12:04:30 +02:00
f124076037 code cleanup 2025-07-01 11:44:06 +02:00
9d7d82a9b6 fix: rotation feels rather funky. 2025-07-01 10:45:47 +02:00
43ecb1e0e6 (micro)optimise downwards movement 2025-06-30 11:00:06 +02:00
1ae6d936eb seperate rotation timeout 2025-06-30 10:59:28 +02:00
63f8260140 add input timeout and input keypresses 2025-06-27 13:01:28 +02:00
d42e5c25f4 (re)add placing sound effect 2025-06-27 12:40:48 +02:00
21aca01cba rework audio system to be able to call it from anywhere, rather than having to have access to the audio data. 2025-06-27 12:39:04 +02:00
c4905f2da3 fix: i8vec2 is 4 bytes wide, rather than 2. 2025-06-27 12:35:44 +02:00
7b3b09ebe7 fix: a tetromino can't appear twice in a row, and rotation is no longer preserved
Tetrominos can now appear twice in a row, and rotation is no longer
preserved for each shape.
(if you rotated a specific shape 90°, now whenever you encounter this
shape, it spawns with a 90° rotation, and so forth)
2025-06-27 12:30:11 +02:00
699bc7a547 add comments to pdat 2025-06-26 14:13:00 +02:00
dd8fc37494 re-implement shape dropping 2025-06-26 14:08:34 +02:00
d852eb2283 add capability of VI keybindings 2025-06-26 13:33:51 +02:00
378e5cfd22 fix: shuffle algorithm; was messing up the data 2025-06-26 13:23:34 +02:00
402ef330de optimise Y axis updating 2025-06-26 12:08:21 +02:00
f41f5d3a6e don't use vectorised addition in the parameter; it's not necessary 2025-06-26 11:50:07 +02:00
0f4c9411b0 write constants VX, VY, to make vector component selection more readable 2025-06-26 11:48:15 +02:00