43ecb1e0e6
(micro)optimise downwards movement
2025-06-30 11:00:06 +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
dd8fc37494
re-implement shape dropping
2025-06-26 14:08:34 +02:00
378e5cfd22
fix: shuffle algorithm; was messing up the data
2025-06-26 13:23:34 +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
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
bf62a60710
remove broke option code
2025-06-18 15:43:38 +02:00
18243a23eb
clean up code
2025-06-18 15:43:38 +02:00
7ed37afdc5
add some options and loading logic
2025-04-23 16:53:15 +02:00
5145e43eaa
make rotation movement seperate from regular movement
...
rotation often happens too fast and regular movement often happens too
slow.
Hence the split
2025-04-17 09:59:30 +02:00
38cb8011ef
move timer data to static variables in the update function, rather than storing it in the gamedata.
2025-04-17 09:53:07 +02:00
17a7502003
don't store the rows on the heap; it works just fine on the stack
2025-04-16 14:28:31 +02:00
ef527ec640
fix: memory leak due to not unloading the audio
2025-04-16 14:05:59 +02:00
0df7730838
fix: include header file directly and remove unused include
2025-03-25 12:02:02 +01:00
8bbcd29c56
add place sound effect
2025-03-25 12:02:02 +01:00
fbcc2984e9
make inputs less sensitive
2025-03-25 12:02:02 +01:00
f72949dc38
use new time system rather than the badly written old one
2025-03-22 23:51:51 +01:00
14c62914f0
add memory safety check for when initializing the rows
2025-03-22 16:28:31 +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
663e28f085
rename more typedefs to lowercase
2025-02-11 21:53:17 +01:00
3b5b7bf15b
add game times
2025-02-11 11:45:19 +01:00
5db3519a87
add audio looping
2025-02-11 10:45:44 +01:00
9b98de0f89
increase memory safety of audio module & small optimisations
2025-02-10 17:21:29 +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
94ff2d200a
add game music (very rudimentary and hacky)
2025-02-06 21:41:02 +01:00
be09d57a27
use "const" where able to + random readability changes
2025-02-04 12:17:42 +01:00
9cd45c2f20
fix: next shape is still shuffled
2025-02-04 10:34:39 +01:00
bb8d9b47a2
fix: next shape is shuffled when shuffle is triggered
2025-02-04 10:15:55 +01:00
be800d2612
next block rendering
2025-02-03 16:24:12 +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
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
accfa715e5
fix: not initializing rand properly
2025-01-29 16:02:59 +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
1a342d764c
add selected shape drawing
2025-01-29 10:45:28 +01:00
16f5380ef4
allow for shape movement
2025-01-29 10:19:10 +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