Commit Graph

161 Commits

Author SHA1 Message Date
4bba7bda9f rework error.h
added nonnull attributes, removed gamestatus and other integers which
don't need an exact type, added restrict to all the pointers.
2025-04-16 16:44:01 +02:00
86b1d9a617 make font loading not required for the application to execute. 2025-04-16 16:19:47 +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
271d4e47d4 semantic fix: include headers directly 2025-04-16 14:17:53 +02:00
0599b7e9fe fix: make gametime compillable for windows 2025-04-16 14:17:37 +02:00
ef527ec640 fix: memory leak due to not unloading the audio 2025-04-16 14:05:59 +02:00
1b384af8e9 improved safety of renderer 2025-04-16 11:54:06 +02:00
0df7730838 fix: include header file directly and remove unused include 2025-03-25 12:02:02 +01:00
646629adc1 fix: use the audio device's channels, rather than the source's channels
yes, I know this is dumb, I knew something was wrong when I had to do it
that way, but I was dumb. Now... I'm still dumb, just slightly more
knowledgable.
2025-03-25 12:02:02 +01:00
9d41a2a65b fix: move the S->MS conversion to the total bytesize, instead of it being the last operation.
due to if small audio fragments are divided trough integer division,
they'll evaluate to 0 miliseconds, which is inaccurate.
2025-03-25 12:02:02 +01:00
6aa4840777 improve comments for audio milliseconds computation 2025-03-25 12:02:02 +01:00
8bbcd29c56 add place sound effect 2025-03-25 12:02:02 +01:00
293a211d55 add "BUG:" comment 2025-03-25 12:02:02 +01:00
8a3245cd71 whitespace fix 2025-03-25 12:02:02 +01:00
77b0eb5a98 fix: use cvt.len_cvt for new length instead of cvt.len 2025-03-25 12:02:02 +01:00
a1dcb0a734 improve comments and error messages 2025-03-25 12:02:02 +01:00
54d3eb5785 fix: not checking SDL_BuildAduiCVT in case it failed 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
a46e48f603 add line number and file name to error log 2025-03-22 15:31:12 +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
595336ad0c touchups on the new error files 2025-03-22 12:08:47 +01:00
1abf9297ec add new error files
add the error files from sdl_template.
they are called 'error' instead of 'errors'.
'error' shall replace 'errors' in a following commit
2025-03-22 12:08:47 +01:00
bd904b5e32 some formatting fixes 2025-03-22 11:09:00 +01:00
25954afeea fix: not updating text entirely 2025-02-17 00:41:59 +01:00
f30b8182b1 optimise text drawing function by only creating a new texture when necessary 2025-02-16 23:44:27 +01:00
2c5be9685c fix: remove bitfield from union 2025-02-12 19:24:21 +01:00
0596f8d5d5 fix: forgot to rename renderdata to a lowercase variant 2025-02-12 17:29:34 +01:00
5ad9be7bcc fix: macros didn't have new struct name 2025-02-11 21:55:20 +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
4ed4e9522f fix: not using renderer and timer directly 2025-02-11 11:45:58 +01:00
ecfe6b1452 add hardware acceleration 2025-02-11 11:45:28 +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
95daac90dd update audio player to use a linked list instead of an array. 2025-02-11 10:45:18 +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
67e34a0cb0 add font 2025-02-06 14:33:54 +01:00
65bc44ef12 add score increasement 2025-02-04 15:20:20 +01:00
319282b7c8 draw score text 2025-02-04 14:53:31 +01:00
9dad1a2db4 got text working 2025-02-04 14:11:40 +01:00
628f69330e fix: rect pointers are not created from a newly initialized rect 2025-02-04 13:58:11 +01:00
6b17086936 code cleanup + add font support 2025-02-04 13:54:28 +01:00
be09d57a27 use "const" where able to + random readability changes 2025-02-04 12:17:42 +01:00