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.
* 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
* 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
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.
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
* 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)
* 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>
* 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
This is a partial cherry-pick of commits:
eccec37982009f7196c6aeec9bd0ac94d4b8e1fd (#222)
415c263592e9ce23fbc5080f15fde19ebec5702a (#223)
With extra stage related stuff removed
* WIP compressed textures, swizzles, sRGB sampling, ...
* refactor texture type info & fix random bugs
* fix preprocessing of sRGB textures
* handle y-flipped basis textures
* glcommon: better WebGL compat for compressed format detection
* missed WEBGL_compressed_texture_pvrtc
* implement compressed texture xcoding and uploading
* Add basis_universal submodule
* Reorganize texture loader code
Clean up some code
Isolate Basis Universal loader into a separate module
* Add wrapper script for encoding .basis textures
* basisu: honor custom metadata written by the mkbasis.py script
* mkbasis.py: add --incredibly-slow and --dry-run
* Move pixmap code from util/ to pixmap/
* Add an on-disk transcode cache for basis textures to speed up loads
* Compress texture cache with zlib
* Use readable format names for basisu cache filenames
* basisu: mip bias test code
* basisu: small caching cleanup
* add TAISEI_BASISU_MIP_BIAS env variable
* Improve OpenGL format matching heuristics
* Document considerations for compressed format priority
* Remove dead code
* Enable two forgotten formats, BC3_RGBA and ATC_RGBA
Also prefer BC7 over BC1/BC3
* Recognize GL_ANGLE_compressed_texture_etc for ETC2 textures
* Default depth buffers to 24-bit; remove ANGLE hack
* Fix glcommon_check_extension for GLES2/legacy gl
* Add renderer feature bit for texture swizzle masks
* glcommon: Fixup internal formats for GLES2
Sized internal formats are not allowed in GLES2
* Fix emscripten compile errors
* Update basis_universal
* remove more dead code
* revert irrelevant stage4 change
* shut up UBSan
* basisu: shut up some debug spam
* Add normalmap sampling helper to util.glslh
* basisu: add a gray-alpha mode
* mkbasis.py: Abort if image dimansions aren't multiples of 4
* Add basic Basis Universal encoding documentation (WIP)
* doc/basisu: Add paragraph about modes; minor tweaks
* basisu: workarounds for GL texture size requirements
* gles20: fix uncompressed sRGB formats
* Partial workaround for missing swizzles in gles2 and webgl
* remove invalid assertion
* New renderer API to expose glDrawBuffers-like functionality
* stagedraw: disable all color outputs for copy_depth pass
required for WebGL compatibility
* support GL_ANGLE_request_extension
* emscripten: include *.basis in gfx package
Also fix a potential problem when more than one .pkgdir is used to
construct emscripten packages
* Don't rely on emscripten runtime to enable webgl extensions
This extension is unimportant, and actually severely degrades ANGLE
performance over Direct3D to unacceptable levels. This also removes the
alternative sprite batching codepath making use of this functionality.
The renderer API hasn't changed yet; attempting to use the extension
will trigger an assertion failure.
This commit also regenerates glad with a new version. Apparently the old
one had a bug and ended up pulling a lot of unrequested functionality,
which is now removed.
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.