Commit graph

26 commits

Author SHA1 Message Date
Andrei Alexeyev
8b37d1cbf2
src: the great #include massacre of 2024 2024-05-17 14:11:48 +02:00
Andrei Alexeyev
be7905d6a3
src: run upkeep 2024-05-17 04:58:47 +02:00
Andrei Alexeyev
b6978178b1
memory: use custom memory allocation wrappers
Introduces wrappers around memory allocation functions in `memory.h`
that should be used instead of the standard C ones.

These never return NULL and, with the exception of `mem_realloc()`,
zero-initialize the allocated memory like `calloc()` does.

All allocations made with the memory.h API must be deallocated with
`mem_free()`. Although standard `free()` will work on some platforms,
it's not portable (currently it won't work on Windows). Likewise,
`mem_free()` must not be used to free foreign allocations.

The standard C allocation functions are now diagnosed as deprecated.
They are, however, available with the `libc_` prefix in case interfacing
with foreign APIs is required. So far they are only used to implement
`memory.h`.

Perhaps the most important change is the introduction of the `ALLOC()`,
`ALLOC_ARRAY()`, and `ALLOC_FLEX()` macros. They take a type as a
parameter, and allocate enough memory with the correct alignment for
that type. That includes overaligned types as well. In most
circumstances you should prefer to use these macros. See the `memory.h`
header for some usage examples.
2023-01-18 13:23:22 +01:00
Andrei Alexeyev
659ed15e43
Fix some issues found by clang static analysis 2021-06-18 16:11:00 +03:00
Andrei Alexeyev
5a23fb95fc
make upkeep script preserve existing copyrights 2019-08-03 20:44:22 +03:00
Andrei Alexeyev
3055901998
update my email 2019-07-03 21:00:56 +03:00
Andrei Alexeyev
36c5d6974b
optimize and simplify object pools 2019-04-12 11:36:40 +03:00
Andrei Alexeyev
4159ea1249
'upkeep' target for maintenance tasks; back to include guards; happy new year! 2019-01-23 22:10:43 +02:00
Andrei Alexeyev
83a8961df6
use "anchored" lists for most game objects
these have a pointer to the last element, thus appending is fast
2018-06-01 21:40:18 +03:00
Andrei Alexeyev
59cf8f6300
Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
Andrei Alexeyev
48649b2c24
teach begin_draw_texture to draw an arbitrary fragment
this is a tiny intermediate step towards a more flexible sprite system

it also seems to improve performance a little bit, though that's moot
since we're going to rewrite this part later together with most of the
rendering code anyway.
2018-01-29 05:37:05 +02:00
Andrei Alexeyev
485c9a8ed6
Happy New Year! 2018-01-04 19:14:31 +02:00
laochailan
0ffb5d90ad
fix animation mirroring 2017-12-31 11:51:52 +01:00
laochailan
e2b5e0a006
remove the aniplayer object pool 2017-12-30 10:44:40 +01:00
Andrei Alexeyev
e355e57fb5
make the list api require less insane casts all over the place
by sealing the spirit of insanity in its header file, that is
2017-12-24 08:16:25 +02:00
Andrei Alexeyev
de31a20497
objectpool: dynamic extents and other improvements 2017-12-24 05:00:19 +02:00
Andrei Alexeyev
29acd5f58a meson: intel intrinsics, various improvements 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
abbc62b49c
object pools 2017-12-13 21:08:23 +02:00
Andrei Alexeyev
7b53d9e731
redesign list api 2017-11-21 16:45:01 +02:00
laochailan
a42abba060
new iku move 2017-10-29 11:06:15 +01:00
Andrei Alexeyev
f3ebc903a7
improved boss death effect (with sfx)
also moved some boss drawing code from stagedraw.c to boss.c
2017-10-17 00:50:02 +03:00
Andrei Alexeyev
9004133f4a
boss shadow tweaks 2017-10-10 09:35:03 +03:00
Andrei Alexeyev
7a592899ab
fix segfault in aniplayer code 2017-10-08 23:39:33 +03:00
laochailan
aaa6ad29e9
wriggle animation in stage 2 2017-10-04 19:31:22 +02:00
laochailan
0ef53b5915
guru guru hina guru 2017-10-03 20:09:34 +02:00
laochailan
c2b3747d95
Animation player manager Pro (tm) 2k17 2017-10-03 17:25:38 +02:00