Commit graph

205 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
4ebd7ba14b
gl33: remove trailing [0] from array uniform names 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
8f8ca2beca
all: use min/max macros; avoid some unnecessary conversions 2023-09-28 17:43:14 +02:00
Andrei Alexeyev
c2810e228d
all: use re()/im() macros 2023-09-28 17:43:14 +02:00
Andrei Alexeyev
787e66f3fb
plrmodes/marisa_a: draw lasers on LAYER_PLAYER_SHOT_HIGH
Makes them appear under enemy bullets and not reflected in stage 1 water
2023-06-19 23:39:11 +02:00
Andrei Alexeyev
1406f13c49
plrmodes/marisa_a: halve laser dmg after first penetration 2023-06-01 03:45:32 +02:00
Andrei Alexeyev
e753ef9423
plrmodes/marisa_a: nerf base shot dmg; buff lasers 2023-06-01 03:38:24 +02:00
Andrei Alexeyev
c5f4a15ef8
plrmodes/marisa_b: nerf basic shot damage 2023-06-01 03:35:32 +02:00
Andrei Alexeyev
efe1c1ea67
plrmodes/youmu_b: reduce base spirit damage by 33%; increase by 50% when released 2023-06-01 03:20:04 +02:00
Andrei Alexeyev
6fd71081d1
plrmodes/youmu_a: nerf myon's damage a bit 2023-06-01 03:02:24 +02:00
Andrei Alexeyev
02e122c1bd
plrmodes/reimu_b: nerf ofudas, slightly buff needles 2023-06-01 02:59:26 +02:00
Andrei Alexeyev
34c151af4a
plrmodes/reimu_b: lower opacity of needle particles 2023-06-01 02:13:48 +02:00
Andrei Alexeyev
3f9848576b
plrmodes/youmu_a: adjust unfocused myon visuals 2023-05-30 03:55:12 +02:00
Andrei Alexeyev
cb16b36326
plrmodes/youmu_a: remove focused myon distance limit 2023-05-30 03:48:05 +02:00
Andrei Alexeyev
79b162b443
plrmodes/youmu_a: more responsive and precise myon controls 2023-05-30 03:14:25 +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
c10cab4776
plrmodes/reimu_b: fix -Wmaybe-uninitialized 2023-03-12 17:20:25 +01:00
Andrei Alexeyev
74c439fa83
plrmodes/reimu_a: fix move_towards deprecation warnings 2023-02-27 07:10:17 +01:00
Andrei Alexeyev
56bbe70329
plrmodes: fixup a bunch of particle effects 2023-02-18 14:09:14 +01:00
Andrei Alexeyev
e28f469131
plrmodes: fix -Wconversion warnings 2023-02-16 17:39:13 +01:00
Andrei Alexeyev
18676a1e96
plrmodes/reimu_a: minor particle effect fixes 2023-02-10 14:32:39 +01:00
Andrei Alexeyev
3c7283f1c7
player: refactor power handling
Separate concepts of "stored" and "effective" power.
2022-10-03 20:53:22 +02:00
Andrei Alexeyev
68173e811b
hashtable,plrmodes,stage1: fix minor warnings 2022-09-20 00:07:35 +02: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
659ed15e43
Fix some issues found by clang static analysis 2021-06-18 16:11:00 +03:00
Andrei Alexeyev
239bec95b0
plrmodes/youmu: fix unused variable 2021-06-10 13:27:47 +03:00
Andrei Alexeyev
f1f5a34a51
plrmodes: fix bomb-stacking exploits
When a bomb is used, cancel all previous bomb-related tasks just before
invoking new bomb tasks. This prevents the possibility of stacking
multiple bombs at the same time.

Also make sure to YIELD before starting the bomb logic loops, because
the bomb task will be scheduled in the same frame after the first yield,
due to the initial invocation being from an event handler.
2021-06-10 12:57:45 +03:00
laochailan
6d16d577ab
fix a replay desync in the reimu_b code between clang and gcc
The desync was caused by implementation specific behavior with complex numbers. Depending on the compiler, multiplying a complex-type number 1+0*I by -1 will either yield -1-0*I (gcc) or -1+0*I (clang). Complex functions with a branch cut along the negative real axis, such as carg will respond drastically to such a difference in zero sign.

In the case of carg, the difference incurred by this is exactly M_TAU, which is irrelevant in most applications. In reimu_b, however there was one instance where the branch cut of carg was not handled (carg(a/b) != carg(a) - carg(b)). Even without the zero-sign inconsistency, this was a bug causing bullets to be absorbed by gaps that should not have been.

This commit fixes said bug (and simplifies two instances of unproblematic but needlessly complicated math). The result is that (i) the gaps now function properly, and (ii) new replays do not desync between gcc and clang anymore. Note, that this change slightly breaks replay compatibility to older replays that showed the buggy behavior of the gaps.
2021-06-02 08:15:26 +02:00
Andrei Alexeyev
2957647c5f
MarisaA: fix deprecations 2021-02-22 01:03:37 +02:00
Andrei Alexeyev
b82baf8c4a
YoumuA: fix deprecations 2021-02-20 01:54:47 +02:00
Andrei Alexeyev
929987da41
reduce out-of-bounds lifetime of player bullets 2021-02-18 20:13:06 +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
9b5d515721
Cutscenes (#249)
* WIP cutscenes

* cutscene tweaks

* cutscene: erase background drawing under text

* Make text outlines thicker

* Prepare an interface for adding new cutscenes

* Basic progress tracking for cutscenes

* cutscene: support specifying scene name and BGM

* cutscene: exit with transition after scene ends

* Implement --cutscene ID and --list-cutscenes CLI flags

* fix progress_write_cmd_unlock_cutscenes

* Play intro cutscene before entering main menu for the first time

Also added --intro parameter in dev builds to force playing the intro
cutscene

* Add intro cutscene

* cutscenes: update opening/01 scene

* add Reimu Good End

* remove Bonus Data

* split up a bit of dialogue, revert an image change in intro

* small typo

* most cutscenes complete

* smartquotify

* finish Extra intros

* new cutscenes routed into main game

* fix ENDING_ID

* rough 'mediaroom' menu

* fix cutscene menu crash

* derp

* PR changes

* fixing imports

* more PR fixes

* PR fixes, including updating the script to #255

* add in newlines for readability

Co-authored-by: Alice D <alice@starwitch.productions>
2020-11-28 12:11:10 +02:00
Andrei Alexeyev
c4765c3c66
ReimuA: balance adjustments
* Homing shots are slower
* Homing shots do more damage, but fire less frequently (DPS is
preserved)
* Needle slaves are slightly closer together and rotate a bit faster
* More shift-spam abuse prevention
2020-11-24 10:56:14 +02:00
Andrei Alexeyev
173f64b330
YoumuB: fix incorrect myon dir and motion initialization
If entering a new stage while holding the shot button, myon never moves
away from the player until the player itself moves, and therefore never
initializes its .dir property. The initial value of .dir is 0.
All shots fired in this state have zero velocity, since .dir is supposed
to be a direction unit vector for them.

This patch initializes .dir to a sane value right away, and prevents
myon from getting stuck to the player in the first place.

Note that the original bug did not trigger when starting a new game,
only after a stage transition. The reason for that is currently unknown.
This does not seem to cause any replay inconsistencies, so the quirk is
probably on the user input layer.

fixes #252
2020-09-28 23:19:51 +03:00
Andrei Alexeyev
f329a9f016
Extended enemy properties
ENEMY_IMMUNE is now deprecated. Spawning an enemy with ENEMY_IMMUNE hp
sets up the new flags field to match old behavior. The hp value itself
has (almost) no special meaning anymore.
2020-07-09 15:25:57 +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
Andrei Alexeyev
d9ba91ecac
Fantasy Seal tweaks
- Remove movement speed penalty
- Make the balls go off a bit faster
2020-06-02 13:37:42 +03:00
Andrei Alexeyev
7072fe447d
Revamp screen shake system (#225) 2020-05-16 23:42:22 +03:00
Andrei Alexeyev
f7763fe6f4
tweak ReimuB bomb view shake 2020-05-10 19:07:18 +03:00
Andrei Alexeyev
54ca97587c
Rename cmplx32 into cmplxf for better consistency 2020-05-09 09:31:20 +03:00
Andrei Alexeyev
f5f8f9fb49
Get rid of custom min() and max() functions
Use the standard fmin() and fmax() for floating point values, and ours
imin(), imax(), umin(), umax() for integers.
2020-05-09 09:16:07 +03:00
Andrei Alexeyev
9f10dfef21
bunch of portrait and dialog-related shuffling around 2020-04-27 22:59:16 +03:00