Commit graph

52 commits

Author SHA1 Message Date
Andrei Alexeyev
7f570d2338
renderer/common/sprite_batch: remove string fields from SpriteParams 2024-09-22 21:18:31 +02:00
Andrei Alexeyev
cbdff3ca41
stage1: use correct depth function in background
It's a mystery that this worked in opengl…
2024-08-30 11:52:47 +02:00
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
c2810e228d
all: use re()/im() macros 2023-09-28 17:43:14 +02:00
Andrei Alexeyev
bd361067df
headers: isolate endings, remove stage.h inc. from plrmodes.h, fix resulting mess 2023-07-30 06:16:17 +02:00
laochailan
40589013dc stages: add missing bgm unlock trigger
in stage 6 one was actually double
2023-06-19 21:48:03 -04:00
laochailan
a6e29bdc56 preload: update all preloads
endings and extra spells are not completely tested yet.
2023-06-16 22:19:11 -04:00
Andrei Alexeyev
aeeab82f29
stage1: use summoning effects 2023-05-20 05:07:45 +02:00
Andrei Alexeyev
9dade8ad33
resource: lifetime management redesign (WIP) 2023-04-29 20:01:50 +02:00
Andrei Alexeyev
ad295005db
resource: more consistent API function names 2023-04-29 20:01:50 +02:00
Andrei Alexeyev
3dc0faec9e
renderer/api: rename ClearBufferFlags to BufferKindFlags 2023-04-10 06:47:55 +02:00
Andrei Alexeyev
86cfceeb9c
stage1: fix stain particles 2023-04-01 05:45:38 +02:00
Andrei Alexeyev
50e571e39a
shader: optimize and enhance water effects 2023-03-17 02:50:16 +01:00
Andrei Alexeyev
1c0c5ec336
stage1: fix -Wmaybe-uninitialized 2023-03-12 17:17:41 +01:00
Andrei Alexeyev
7544566aaa
stage1: fix move_towards deprecation warnings 2023-02-27 07:10:39 +01:00
Andrei Alexeyev
b916d62e39
boss,stages: remove rule from AttackInfo 2023-02-24 16:54:51 +01:00
Andrei Alexeyev
0fd66b6780
stage1: port benchmark spell to tasks 2023-02-24 16:54:51 +01:00
Andrei Alexeyev
e384b6e09a
stage1: fix -Wconversion warning and adjust perfect freeze pattern 2023-02-16 17:39:27 +01: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
c170fedc4f
stage1: fix Cirno's second boss non 2023-01-08 01:00:50 +01:00
Andrei Alexeyev
68173e811b
hashtable,plrmodes,stage1: fix minor warnings 2022-09-20 00:07:35 +02:00
Andrei Alexeyev
dcb630b37d
stageinfo,stage: implement stage hot-reloading
POSIX platforms only. Must be enabled via -Dstages_live_reload=true.
2022-02-05 17:58:42 +02:00
Andrei Alexeyev
a55355be0d
shaders: cleanup zbuf_fog; add combined fog+tonemap shader 2021-12-17 14:40:04 +02:00
Andrei Alexeyev
e88780ca32
stage1: use new stage3d pos functions 2021-10-29 16:11:47 +03:00
Andrei Alexeyev
9e297aa570
fix stupid gcc warnings 2021-08-31 23:34:48 +03:00
Andrei Alexeyev
8d2ee76710
replace include guards with #pragma once 2021-08-31 23:34:46 +03:00
Andrei Alexeyev
c49357ffef
fix deprecations 2021-08-31 23:33:16 +03:00
Andrei Alexeyev
f3fcec70f6
stage1: fix bg for "fast" and "minimal" postprocess modes 2021-08-30 18:58:13 +03:00
Andrei Alexeyev
4d1b4eb72a
lasers: new renderer based on signed distance fields (#317)
* lasers: new SDF-based renderer (WIP)

* lasers: tweak sdf_apply shader

* lasers: fix incorrect rendering at 'unlucky' resolutions

* lasers: optimize rendering of multiple lasers

Try to coalesce render passes as much as possible

* lasers: fix warning

* lasers: move rendering into a new file

* lasers: correct "time" coordinate mapping for texturing

* lasers: wrote a novel about laser rendering [skip ci]

* lasers: fux tpyo

* remove references to old laser shape shaders

* lasers: fix some rendering edge cases
2021-08-22 01:27:12 +03:00
Andrei Alexeyev
1840c85273
stages: add empty templates for custom entity types 2021-07-18 17:52:45 +03:00
Andrei Alexeyev
1db80d0905
boss: support custom task parameters via interface inheritance 2021-05-19 03:54:58 +03:00
Andrei Alexeyev
49deb2bd83
boss: rework attack scheduling internals; minor HUD fixes
`process_boss()` will no longer automatically start the next attack
after the current one ends. Instead, it will set the current attack to
NULL and signal the next attack's `initiated` event. The attack starts
when the event handler calls the `BEGIN_BOSS_ATTACK()` macro. This
allows the attack task to arbitrarily delay the attack phase activation.
Note that `BEGIN_BOSS_ATTACK()` still waits for the `started` event,
which is signaled after `BEGIN_BOSS_ATTACK()` plus an inherent attack
delay (ATTACK_START_DELAY etc.) For regular attacks that don't wish to
delay `BEGIN_BOSS_ATTACK()`, this change is effectively invisible.
2021-05-19 03:54:50 +03:00
Andrei Alexeyev
23f623a6a1
boss: misc cleanup; use events to identify attack state 2021-05-19 03:52:07 +03:00
laochailan
dd33bd0e4f
stage1: fix fairies not using attraction exponent 2021-05-05 21:06:42 +02:00
laochailan
b269ecde52
add attraction_exponent to move params 2021-05-02 21:10:51 +02:00
Andrei Alexeyev
4aa5d66c8a
stage1: fix deprecations 2021-02-22 15:26:48 +02:00
Andrei Alexeyev
d3e10d9d8d
benchmark: fix deprecation warnings (still needs to be a task) 2021-02-22 01:51:07 +02:00
laochailan
a633cec5ba stage1: linearize snow 2021-01-21 05:20:15 +02:00
Andrei Alexeyev
a19ac828eb stage1: fix background
Remove 45 degree uv rotation from the shader as it's not needed anymore.
Bring back the stretched perspective, because the background was
designed with it in mind, and looks wrong otherwise.
2021-01-21 05:20:15 +02:00
laochailan
7fa35409d8 stage3d: store fovy, aspect, near and far as parameters to the camera
this means glm_mat_proj_perspective is no longer meant to be called by the stage code. The parameters are set to sensible defaults of the pbr stages.

I found that the old stages use STAGE3D_DEFAULT_ASPECT which is somehow stretched. I did not change the behavior but added a FIXME comment to lines that should at some point just be deleted to use the correct default aspect.

I did not fix the extra stage code to avoid conflicts.
2021-01-21 05:20:15 +02:00
laochailan
b89145eac1 stage1_water: make wave_offset a vec2 2021-01-21 05:20:15 +02:00
Andrei Alexeyev
a98e4e82ff
stage1: balance adjustments 2020-12-29 05:38:52 +02:00
Alice D
778146ed60
More compiler warning fixes (#273)
* fix small compile issue with coroutine.c and gcc

* fix 'potential nullpointer dereference' warning

* fix more potential nullpointers

* fix more potential nullpointers - part 2

* a handful of small fixes to silence gcc compiler warnings, mostly potentiall null pointers and style deficiencies

* PR changes, bump meson to 0.53.0

* fix potential null error in YoumuB

* bump meson version, change initialization

* no longer version-splitting meson
2020-12-26 01:40:08 +02:00
Andrei Alexeyev
12c93ac02a
stage1: less chonky circle fairies 2020-12-10 11:26:04 +02:00
Andrei Alexeyev
48f0a21e81
Stage 2 revamp (#229)
* stage2: remake wriggle non

* stage2: coroutinize first enemy

* stage2: coroutinize small_spin_circle (renamed redwall_fairy)

* stage2: remake aimshot fairies

* stage2: remove dead code

* stage2: blind-coroutinize flea-shooting fairy; not tested at all

* stage2: some hina nonspell shenanigans

* stage2: coroutinize amulet of harm (very lazily)

* stage2: lame hina nons (no balance)

* stage2: remake wheel of fortune (lunatic tuning only for now)

* stage2: Add raz's Hina nonspell

* coroutinize bad pick

* bad pick tweaks

* coroutinize and remake Monty Hall Danmaku

* stage2: coroutinize turning fairies

* it's big brain time

* look ma, i'm doing level design!

* stage2 second half (WIP)

* stage2: use new enemy spawners

* stage2: remove dead code

* stage2: fix post-midboss turning fairies

* stage2: swap post-midboss red/blue aimshot fairies order

* stage2: amulet of harm redesign prototype

* Amulet of Harm tweaks:

	* Less erratic boss movement
	* Improved "amulet" visuals

* stage2: very bare-bones difficulty scaling (enemies only)

* stage2: wheel of fortune balance tweaks

* stage2: amulet of harm difficulty balancing

* stage2: add hina spin animation to amulet of harm

* stage2: remove dead code
2020-12-01 19:25:00 +02:00
Andrei Alexeyev
f5da2cc976
Stage 1 balance pass (#254)
* stage1: attempt to make Easy easier; misc tweaks

* stage1: buff health of boss nons

* stage1: use new enemy spawners

* stage1: Normal balance; some Easy tweaks

* stage1: tweak Hard version of Perfect Freeze

* stage1: simplify a common_charge
2020-10-10 05:00:50 +03:00
Andrei Alexeyev
31ce18129a
Icicle Cascade tweaks
Make it shoot roughly from Cirno's hands, and change color of turned
icicles.
2020-09-29 19:34:16 +03:00
Andrei Alexeyev
8480d41b7b
Audio rewrite (#236)
This replaces SDL_mixer with an internal streaming and mixing system,
relying only on basic SDL audio support. It's also a partial refactor of
the audio API, most notably BGM-related. The BGM metadata resource type
is gone, as well as the `.bgm` files. The metadata is now stored inside
the `.opus` files directly, using standard Opus tags.
2020-06-22 17:41:03 +03:00
Andrei Alexeyev
89ecc0c55e
Establish more-or-less consistent resource getter functions
Deprecate old ad-hoc stuff like get_sprite, r_texture_get, etc.
2020-06-09 04:33:22 +03:00