217 Commits

Author SHA1 Message Date
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
390ca02172 fix: inverted rotation/movement 2025-06-26 11:27:58 +02:00
dba2e102ab fix: moving into collisions, rather than preventing them 2025-06-26 11:27:22 +02:00
7af2bb0050 fix: update roll caused SEGV, also optimised it using XOR 2025-06-26 11:26:22 +02:00
29b190e0f5 simplify movement logic a bit further 2025-06-26 11:09:01 +02:00
0a0e03a769 fix: not initialising TTF module 2025-06-26 11:04:55 +02:00
c1d7f71a02 make window freeing more manual 2025-06-26 11:02:14 +02:00
a94e2d147b fix: memory leak on exit 2025-06-26 10:55:02 +02:00
d7989c5918 fix: wasn't initialising the window properly 2025-06-26 10:54:52 +02:00
937ecedfe3 implement new code, and remove deprecated old code. Overal optimisation.
this code is currently broken, but this'll be fixed in a subsequent
commit
2025-06-25 16:58:58 +02:00
a202442853 write some TODO comments 2025-06-25 15:44:17 +02:00
94cfbdcaad write code for a timing 2025-06-25 15:41:58 +02:00
a7d5f1bb2a write code for input handling 2025-06-25 15:41:49 +02:00
046f7affaf write code for window handling 2025-06-25 15:41:44 +02:00