Commit graph

3018 commits

Author SHA1 Message Date
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
b257f665f6
boss: rework the 'grace period' mechanic
The damage protection now applies to non-spells as well. Total immunity
lasts for 1 second, then the damage multiplier linearly climbs to 1 over
the next 4 seconds.
2020-11-25 07:26:29 +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
01cc9b1a2b
build: refuse to use broken glslang for validation
See #237, KhronosGroup/glslang#2206
2020-11-24 05:52:02 +02:00
Andrei Alexeyev
bb3a809117
Asynchronous logging (#260)
* Implement asynchronous logging

Put all log messages into a queue. A background thread will format and
dispatch the messages to loggers in a first-in-first-out fashion. This
is mostly useful for windows/wine, or in cases *very* spammy logging.
This adds some malloc overhead, however.

Can be disabled with TAISEI_LOG_ASYNC=0

* log: unfuck memory management

* log: add TAISEI_LOG_ASYNC_FAST_SHUTDOWN env variable

If true, don't wait for the logging queue to process every message
before shutting down.

* strbuf: fix off-by-one error

* log: sync queue before crashing on assertion failure

* docs/ENVIRON: update logging docs
2020-11-24 05:31:51 +02:00
Andrei Alexeyev
0b067d99f6
shaders: streamline control flow to avoid ANGLE/D3D11 bugs
The SPIR-V optimizer tends to transform early function returns into
awful switch/break abominations. ANGLE's D3D backend mistranslates such
code, leading to a bad case of blackscreenitis.

This commit fixes a few known affected shaders (reimu_gap, fxaa,
boss_zoom), but I expect there to be more undiscovered cases.

Fixes #241
Fixes #242
2020-11-23 10:10:05 +02:00
Andrei Alexeyev
103079496e
GameMode integration (#258) 2020-11-19 01:12:51 +02:00
Andrei Alexeyev
6a44aa433a
enemy_classes: fix incorrect superfairy visual 2020-11-11 21:08:50 +02:00
Andrei Alexeyev
a27e0a5339
emscripten: remove legacy --no-heap-copy packer flag 2020-11-10 08:13:24 +02:00
Andrei Alexeyev
f3dab68e76
emscripten: remove .full_path() hack 2020-11-10 08:12:06 +02:00
Andrei Alexeyev
875d841c52
Emscripten fixes 2020-11-10 07:36:57 +02:00
Andrei Alexeyev
4bffcfcc15
gen-atlas: align bin dimensions to multiples of 4 2020-11-08 10:04:40 +02:00
Andrei Alexeyev
cb32aca7af
texture_loader: remove leftover debug code 2020-11-06 15:32:31 +02:00
Andrei Alexeyev
8e9363cbca
Dither, downscale, and merge atlas/gray16 into atlas/common 2020-11-05 16:41:54 +02:00
Andrei Alexeyev
3f550e75c5
Sexier bullet flares 2020-11-05 10:18:19 +02:00
Andrei Alexeyev
cecedbb740
common_tasks: charge effect visual tweaks 2020-11-04 17:59:43 +02:00
Andrei Alexeyev
7e61f5dbb9
resources: Convert most textures into Basis Universal format
Some textures that have been replaced in the pbr_bg branch are untouched
for now.
2020-11-01 01:40:57 +02:00
Andrei Alexeyev
627afee6b9
Update koishi 2020-10-19 13:58:34 +03:00
Andrei Alexeyev
6415217a25
Improve coroutine scheduler shutdown sequence
Before canceling tasks, find all events with subscribers and cancel
them. This wakes the subscribers, allowing them to run additional
cleanup code if necessary.

Coroutines are also taken down earlier in the stage shutdown sequence,
before removing any entities. This avoids the problem of entity removal
code waking up coroutines by cancelling events, which in turn may spawn
more entities. This issue sometimes caused the elusive "%i entities were
not properly unregistered" bug.
2020-10-10 09:41:44 +03:00
Andrei Alexeyev
e95964754d
update dpstest stages 2020-10-10 05:55:42 +03: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
Alice D
d8d03a5699
More minor dialogue edits (#255)
* more small edits for flow, punctuation, etc

* missing quote

* fix commit

* marisa dialogue changes

* reimu dialog changes

* youmu dialogue improvements

* smartquotes

* code-review changes

* final PR review
2020-10-09 01:11:13 +03:00
Andrei Alexeyev
afdc640663
Update mailmap 2020-10-08 08:52:29 +03:00
Andrei Alexeyev
51cdbc6987
Update .gitattributes
Inform github about generated files, hopefully avoiding annoying PR
diffs. Also use the C/C++ diff pattern for C sources.
2020-10-08 08:52:29 +03:00
Andrei Alexeyev
40425c346b
Enemy system extensions (#256)
* Add red fairies; tweaks to blue fairies and circles

* Add more fairies and a simple enemy archetype system

Note that existing stages not utilizing the new enemy spawning system
will have a visual regression - fairies will not have their magic
circles and particle effects visible. These are no longer implemented by
the enemy visual rules and require additional setup from the new spawner
wrappers. All stages should be converted to the new system.

Also improved old fairy sprites

* enemy_classes: rebalance HP

* enemy_classes: add EnemySpawner typedef

* items: add ITEMS() shortcut macro for use with enemy spawners
2020-10-08 05:00:52 +03:00
Andrei Alexeyev
738e1cb437
scripts/gen-atlas: parallelize pack algo bruteforcer 2020-10-06 03:58:42 +03:00
Andrei Alexeyev
f60b49a628
miscmath: add cabs2() and cabs2f()
Returns the squared absolute value of a complex number
2020-10-01 02:31:52 +03:00
Andrei Alexeyev
2bc7d52369
Add a simpler synchronous interface to common_charge 2020-09-30 03:44:58 +03:00
Andrei Alexeyev
6ed03317b6
stage: delay BGM start up by 1 frame
This workaround is needed to avoid music synchronization issues due to
loading times. BGMs are typically started on the very first frame of the
stage, which often has to wait for resources to finish loading.
2020-09-29 20:56:59 +03:00
Andrei Alexeyev
3e7282460e
audio: move static globals into static struct 2020-09-29 20:53:07 +03:00
Andrei Alexeyev
fdc00bb906
Improve charge effect appearance 2020-09-29 20:45:11 +03:00
Andrei Alexeyev
6671aa6ecd
Add ENT_ARRAY_COMPACT(array_ptr) macro
Removes all dead references from the array. This operation may move
elements around.
2020-09-29 20:11:36 +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
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
0e25c3a06b
Fix some #ifs that should be #ifdefs 2020-09-12 21:19:49 +03:00
Samuel P
5238f4080d
Switch port fixes (#251)
* switch: fix es-shaders being packed before transpilation

* switch: build fixes and glsl debug logs

* switch: fix crash on shutdown

shutdown is now done before __libc_fini_array is called, which avoids
freeing the gl context resources twice (in __libc_fini_array, and in SDL_GL_DeleteContext)
2020-09-01 16:31:35 +03:00
Andrei Alexeyev
4326d6a6f1
Fix laser collision
The last tested segment was not properly intitialized, which sometimes
resulted in unfair and very unexpected deaths to "nothing".

Fixes #234
2020-08-31 15:22:57 +03:00
Andrei Alexeyev
2ae5e25b00
Workaround a visual glitch in boss_zoom.frag on some systems
Fixes #239
2020-08-31 13:18:00 +03:00
Andrei Alexeyev
25c2576149
run upkeep 2020-08-31 12:55:36 +03:00
Alice D
8f515e0f38
Stage 5 Restructure (#247)
* initial commit (basic structure, does not compile)

* it compiles now

* moving some stuff around

* move spells/nonspells over to their own files, and retab the whole directory

* retab meson file (oops)

* newline shuffling

* clean up some imports, move functions to spellcards

* Update src/stages/stage5/background_anim.c

Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>

* Apply suggestions from code review

Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>

* code review changes

* change cloud_common to spawn_cloud

* move explosion survival to spells

* add missing timeline imports (oops)

* add missing comma

Co-authored-by: Andrei Alexeyev <akari@taisei-project.org>
2020-08-29 02:09:10 +03:00
Alice D
8f3b3fa0bc
Stage 6 Restructure (#248)
* basic stage 6 structure (nothing here yet)

* it compiles and runs (needs testing)

* reindent

* missing import

* fix baryons

* import cleanups

* moving spells from elly.c to their spellcard sources

* code review changes, and some additional cleanup

* more PR changes, removing more dead code

* clean up some imports, move functions to spellcards

* remove dual initalization
2020-08-28 09:08:30 +03:00
Andrei Alexeyev
f899370fa6
Restructure stage 2 into multiple files
Cherry-pick from #229 (ba2187f54fdb1fb43846f85c8cddcf920932e3c7)
2020-08-25 05:03:00 +03:00
Andrei Alexeyev
4c38f1b0ba
Hide coroutine stats when no coroutines are active 2020-08-25 04:56:22 +03:00
Andrei Alexeyev
52baad241a
Disable CO_TASK_STATS_STACK by default 2020-08-25 04:56:22 +03:00
Andrei Alexeyev
4ac5f346ca
Disable SPRITE_BATCH_STATS by default 2020-08-25 04:56:22 +03:00
Alice D
93741f5c18 fixing typo 2020-08-22 13:06:07 -04:00
Andrei Alexeyev
db792ebdc0
prune dead spritedef 2020-08-22 10:03:02 +03:00
Alice D
bf3c7fef05
Backport dialogue edits from yumemi branch
This is a partial cherry-pick of commits:
	eccec37982009f7196c6aeec9bd0ac94d4b8e1fd (#222)
	415c263592e9ce23fbc5080f15fde19ebec5702a (#223)

With extra stage related stuff removed
2020-08-22 09:36:25 +03:00
Samuel P
0600ebaea6
video: don't create windowed-mode windows under fullscreen-only drivers (#246) 2020-08-16 21:16:01 +03:00
Andrei Alexeyev
51a8340efd
update koishi 2020-08-16 14:12:34 +03:00