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
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
9fbc9e0f9a
use common integer type in shapes.c/shapes.h, for decreasing namespace pollution
2025-06-25 15:40:52 +02:00
6a1b4104cf
rework audio handling, since it was flawed
2025-06-25 15:40:52 +02:00
b446a43738
use tabs over spaces
2025-06-25 15:40:52 +02:00
7c20704990
rename window io
2025-06-25 15:39:23 +02:00
18243a23eb
clean up code
2025-06-18 15:43:38 +02:00
1ee8c69d1b
don't use exact integer types where it's not necessary
2025-04-17 09:45:27 +02:00
8bbcd29c56
add place sound effect
2025-03-25 12:02:02 +01:00
60ae11de10
synchronise with the template
...
- use the version of audio management which doesn't crash the
application if something goes wrong
- include colour32
- update error management to be more reflective of the one defined in
the template
- modify the renderer functions to be more reflective of the template
- modify the game functions to be more reflective of the template (& use
a more failproof method of initializing)
- add gametime
- remove set_gamestatus logic and just use a run boolean in gamedata
- remove emscripten preprocessors as those haven't really been used
2025-03-22 15:29:42 +01:00
7fb624311f
use new error files
2025-03-22 12:08:47 +01:00
2c5be9685c
fix: remove bitfield from union
2025-02-12 19:24:21 +01:00
e95e201116
fix: shape_ prefix to is_set
2025-02-11 21:54:23 +01:00
663e28f085
rename more typedefs to lowercase
2025-02-11 21:53:17 +01:00
8105d35272
add losing when the next shape overlaps the current one (just a basic quit)
2025-02-11 11:51:24 +01:00
3fd7806e5f
code cleanup:
...
- rename typedefs to a lowercase variant
- change variable names to shorter variants
2025-02-10 12:28:05 +01:00
94ca7e3d08
rename Colour8 to colour8
2025-02-10 11:58:00 +01:00
65bc44ef12
add score increasement
2025-02-04 15:20:20 +01:00
be09d57a27
use "const" where able to + random readability changes
2025-02-04 12:17:42 +01:00
c546f78c4c
use correct 8 bit colourspace instead of including alpha
2025-02-03 15:02:00 +01:00
df93300798
rework random shape selection
2025-02-03 14:05:53 +01:00
8209aa1855
fix: rows are now being cleared properly and should no longer have any problems.
2025-02-01 03:14:44 +01:00
bbd81b46c5
optimise row storage by just using one list
2025-02-01 01:10:30 +01:00
2d6649e700
fix: bottom row not being cleared in double row
2025-01-29 18:03:15 +01:00
8d7434af28
fix: not able to place towards the far left
2025-01-29 17:46:10 +01:00
48117451cd
make tetromino spawn in the centre
2025-01-29 17:20:11 +01:00
6115160095
fix: lines cleared yield in various errors
2025-01-29 16:51:34 +01:00
90031cf3da
set next block when placing a new block
2025-01-29 15:51:37 +01:00
3c2902baa6
code cleanup + call clear rows when placing a block
2025-01-29 15:41:29 +01:00
36ccb653ef
add rotation & make code a bit more readable
2025-01-29 15:37:49 +01:00
0856301c41
add collision
2025-01-29 13:09:06 +01:00
d3f89b0d10
rename tmp_ function to dbg_
2025-01-29 12:07:12 +01:00
d0ba27ee0f
optimize clearing lines by using pointers to define the row order
2025-01-29 11:56:07 +01:00
2fb10106f4
make set all generate also include all rotations of tetromino.
...
Reworked set_shape to take in id, instead of colour and shape.
2025-01-28 16:28:30 +01:00
398df2066b
add random rotation to random placement
2025-01-27 16:44:44 +01:00
92676d6474
fix: you need to take the square root of the size, not divide by two,
2025-01-27 16:44:02 +01:00
2dbdc5ac40
add colour selection based on ID
2025-01-27 16:19:07 +01:00
1097c6e09d
make shape data identifiable by ID and rotation
2025-01-27 16:16:23 +01:00
b698a0e3d1
add some temporary code for setting a random tetromino
2025-01-27 15:32:05 +01:00
7f00107c7f
split up the code a bit more
2025-01-27 00:26:36 +01:00