Commit graph

3684 commits

Author SHA1 Message Date
Andrei Alexeyev
9f4417b9ba
editorconfig: set indent style for .yml files 2023-04-12 07:32:28 +02:00
Andrei Alexeyev
58ee2cbf6f
lasers: s/double/real and use cdir in shape functions 2023-04-12 06:58:55 +02:00
Andrei Alexeyev
7d8e16037f
lasers: remove las_weird_sine 2023-04-12 06:58:55 +02:00
Andrei Alexeyev
0c73a2d9a9
menu: fix use-after-free due to unhandled transition cancel 2023-04-12 06:58:55 +02:00
Andrei Alexeyev
408f0ea705
ci: auto deploy emscripten builds of master 2023-04-11 05:36:55 +02:00
Andrei Alexeyev
7ac72d883d
boss: drop power items as damaged 2023-04-10 21:44:09 +02:00
Andrei Alexeyev
bde303b71b
item: increase power item value to 0.05 2023-04-10 21:43:48 +02:00
Alice D
38c334ebcc
dialog: Story/Dialogue Edits (#361)
Initial dialogue/story edits for 2023, since it's been a while since
this was all written.
2023-04-10 22:05:46 +03:00
Andrei Alexeyev
76c038570d
stageinfo: remove unused StageProcs 2023-04-10 06:59:24 +02:00
Andrei Alexeyev
00408b62d0
stagedraw: simplify copydepth pass via r_framebuffer_copy
On top of being less code, this is a tiny bit more efficient.
2023-04-10 06:47:55 +02:00
Andrei Alexeyev
b50b57803e
renderer: add r_framebuffer_copy 2023-04-10 06:47:55 +02:00
Andrei Alexeyev
3dc0faec9e
renderer/api: rename ClearBufferFlags to BufferKindFlags 2023-04-10 06:47:55 +02:00
Andrei Alexeyev
cc05fa5b64
build: update basis_universal 2023-04-10 06:47:55 +02:00
Andrei Alexeyev
57a08d4c7a
replay/demoplayer: automatic "demo" playback when idling in menus
Currently the game comes with no demos; place your own replays into
$userdir/resources/demos if you want to test this.
2023-04-07 16:08:50 +02:00
Andrei Alexeyev
71109fd253
transition: more robust handling of "canceled" transitions
Ensure callbacks are always called, but if a transition was overwritten
by another set_transition() call mid-transition, pass a non-NULL
argument as the result. This allows the callback to gracefully cancel
whatever it was meant to do, if needed.
2023-04-07 16:08:50 +02:00
Andrei Alexeyev
73af6ac9ce
stage: poll events while transitioning away 2023-04-07 16:08:50 +02:00
Andrei Alexeyev
b91c10b1f9
replay: add replay_load_vfspath 2023-04-07 16:08:50 +02:00
Andrei Alexeyev
27a1a6fc7a
transition: use the callchain system for callbacks 2023-04-07 16:08:49 +02:00
Andrei Alexeyev
886ba290a9
util/callchain: split from eventloop 2023-04-07 16:08:49 +02:00
Andrei Alexeyev
f0deb86937
events: fix events_unregister_handler()
It's still a stupid API, but at least it's possible to remove multiple
handlers that have the same callback address reliably.
2023-04-07 16:08:49 +02:00
Andrei Alexeyev
6242961ccc
resource/font: make possible to specify pos as cmplx in TextParams 2023-04-07 16:08:49 +02:00
Andrei Alexeyev
df6b97caf7
stageobjects,objectpool: simplify and reimplement on top of arenas
All pools now allocate from the same arena that is initialized once with
8MB of initial space and never deallocated, only reset between stages.
2023-04-07 16:08:49 +02:00
Andrei Alexeyev
66e5a886f0
lasers: implement rect packing for SDF texture 2023-04-03 01:53:36 +02:00
Andrei Alexeyev
b33bc192bf
lasers: optimize and simplify draw code (WIP)
There's an issue where partially out of bounds lasers will step over
neighbouring tiles, causing artifacts. Should be solved with a packing
algorithm.
2023-04-03 01:53:36 +02:00
Andrei Alexeyev
8b9602c402
util/rectpack: pool sections, support custom allocators 2023-04-03 01:53:36 +02:00
Andrei Alexeyev
9089a2f16e
memory/allocator: add ALLOC_VIA macros 2023-04-03 01:53:36 +02:00
Andrei Alexeyev
e555126854
memory: generic allocator interface 2023-04-03 01:53:36 +02:00
Andrei Alexeyev
8547f443b7
memory: basic arena allocator primitive 2023-04-03 01:53:36 +02:00
Andrei Alexeyev
bf7964926c
memory: move into subdir 2023-04-03 01:53:36 +02:00
Andrei Alexeyev
0d9c816fc3
build: workaround meson misdetecting posix_memalign as available on nx 2023-04-03 01:53:36 +02:00
Andrei Alexeyev
86cfceeb9c
stage1: fix stain particles 2023-04-01 05:45:38 +02:00
Andrei Alexeyev
571d2ac03f
thread: make thread_get_current() safe to call after thread_shutdown()
Was causing a use-after-free on shutdown
2023-03-31 03:25:16 +02:00
Andrei Alexeyev
bae08cd0a0
main: init coroutines before log
Without this cotask_active() is called before co_main is set, which
trips up ASan.
2023-03-31 03:25:16 +02:00
Andrei Alexeyev
f265f38adc
log: cotask support; rewrite console formatter 2023-03-30 04:37:57 +02:00
Andrei Alexeyev
10ecc9ff42
coroutine/cotask: add cotask_get_name() API 2023-03-30 04:31:22 +02:00
Andrei Alexeyev
a13e6ae7a3
coroutine/cotask: make cotask_active safe to call outside of task context
Returns NULL in main context. Still not entirely safe to call on
non-main thread.

The slightly faster "unsafe" version is available as cotask_active_unsafe.
The new cotask_active is currently not used by anything; it's intended
for a logging system update later.
2023-03-30 04:31:22 +02:00
Andrei Alexeyev
f5c5803b1a
util/strbuf: inline strbuf_cat 2023-03-30 03:38:07 +02:00
Andrei Alexeyev
a4717b996c
util/strbuf: make cat and ncat return number of chars written 2023-03-30 02:21:04 +02:00
Andrei Alexeyev
a78b67ad65
resource: set name before ires is put into the hashtable
This should fix a rare race condition in res_load_dependency where the
dep could make its way to ires_make_dependent_one without having the
name set yet, failing an assertion there.

It also gets rid of a name parameter to load_resource, since the name is
always known at that point.
2023-03-30 00:47:12 +02:00
Andrei Alexeyev
40758a5a8d
vfs/platform_paths: fix macOS build 2023-03-29 20:47:27 +02:00
Andrei Alexeyev
c197d224e7
log: log originating thread names 2023-03-29 20:47:27 +02:00
Andrei Alexeyev
e957f11790
thread: add over-engineered wrapper for thread management 2023-03-29 20:47:27 +02:00
Andrei Alexeyev
427d2ca32c
ci: trigger on *.m (objc) sources too 2023-03-29 19:31:26 +02:00
Andrei Alexeyev
3c0a538ae6
ci: run tests on staging branches 2023-03-28 23:09:02 +02:00
Andrei Alexeyev
beae2e0302
util/assert: fix static_assert 2023-03-26 14:06:05 +02:00
Andrei Alexeyev
ff532b0f33
taskmanager: introduce TAISEI_TASKMGR_NUM_THREADS env variable
Controls the number of worker threads spawned by the global task
manager. 0 for default (equal to number of CPU cores), -1 for max
(capped to number of CPU cores * 4)
2023-03-26 03:27:20 +02:00
Andrei Alexeyev
ce7159d630
resource: fix incorrect assumption in threaded loading 2023-03-26 03:26:19 +02:00
Andrei Alexeyev
15bdbc496b
util/compat: include assert(0) in UNREACHABLE macro
Stop overriding it in log.h
2023-03-26 03:14:07 +02:00
Andrei Alexeyev
6c30decd8e
util/miscmath: don't check for __GNUC__ 2023-03-26 03:12:01 +02:00
Andrei Alexeyev
277e003510
util/assert: don't check for __GNUC__ 2023-03-26 03:10:16 +02:00