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.
* Smarter generic entity macros
The list of "core" entities is now defined in one macro, and hardcoded
_Generic dispatch tables are eliminated
* Get rid of "custom" entities
All entities are now "first-class". The list of known entity types has
been moved to known_entities.h. The system no longer needs to know the
definition of all entity structs.
* Refactor guts of ENT_BOX/ENT_UNBOX
Made the functions inline, Box::ent is now a proper pointer type (but
please don't use it directly), ENT_UNBOX returns NULL if the box is
"empty" (references NULL entity)
* Merge TASK_BIND_UNBOXED with TASK_BIND
* s/YoumuMyon/YoumuAMyon for consistency
* new difficult mode suggestions (more within the theme of 'knowledge')
* cleaning up new difficulty descriptions, also changing character select titles to match the STORY.txt
* better transparency mask on Easy
* ran optimize-all-img.sh script
* consistency
* (hopefully) got rid of some half-transparent pixels, especially on Normal.webp
* playermode descriptions! (for real this time)
* Reimu shot description changes (as per PR)
* modify ReimuB description
This also introduces `float32`, `float64`, and `real` typedefs to be
used in place of `float` and `double` later. `real` is for game code and
other places where we don't particularly care about the precision and
format of the underlying type, and is currently defined to `double`.
`float32` and `float64` should replace `float` and `double` respectively
This replaces the r_mat_foo functions with specialized r_mat_{mv,tex,proj}_foo counterparts that operate explicitly on the modelview, texture, and projection matrix stacks respectively.
* implement player spellcard declarations on bomb
* stagedraw: move "bottom text" to a separate (higher) layer
* update boss spell declaration effect
* import afensorm's character portrait art
* improve dialog visuals
* acknowledge afensorm in credits and COPYING
* 'alphamap' functionality; effects for wriggle and youmu portraits
* update afens art
* add cirno alphamap
* dialog: draw active speaker above other other
* charselect: use r_draw_sprite
* WIP some projectile effects
* fix segfault
* Laser smoothing and glow via post-processing blur magic
TODO: make it optional
* fix memory corruption
* fix memory corruption for realsies now
* fix color_get_hsl for out-of-range colors
* some more bullet flare tweaks
* some lame clear effect workarounds
* spawn bullet flares after frame 0; looks better and fixes some problems
* New baryon explosion; fix petal_explosion; leanify everything
* Add missing bullet flare sprite, rebuild main atlas
* improve batching efficiency with bullet spawn flares
* forgot git add
* Group projectiles/particles by shader where possible
* Another take on baryon explosion; make fg framebuffers 16bit
* WIP some settings for toasters
* remove stupid debug log
* microoptimization that probably does nothing anyway
* somewhat more intuitive quality settings
* Whitelist more particles (MarisaB is on hold)
* Whitelist (and fix) some more stage6 particles (mostly ToE)
* Add a spell name background
* Experimental radial healthbar for bosses
* healthbar tweaks
* thiccer healthbars in response to feedback
* remove healthbar survival timer; just fade out on survivals
* Add linear healthbars option; WIP other boss HUD tweaks
* Use the proper spell card name format
* New font and some random garbage to go along with it
* Generate static font outlines for use in text shaders
* Use outlines in overlay text shader
* Complete boss HUD/healthbar fading logic
* fix boss timer limit
* stage5 bombs explosion effect
* split PFLAG_NOSPAWNZOOM into PFLAG_NOSPAWNFLARE and PFLAG_NOSPAWNFADE;
introduce PFLAG_NOSPAWNEFFECTS which disables both (it's just the two
values OR'd together)
simplify vampiric vapor bullet spawning effect
* Remove spawn fade-in from super-fast stage5 fairy projectiles (limiters)
* lower particle density in v.vapor in minimal mode
* graze effect tweaks
* fix text shortening, tweak replay menu layout
* stupid debug spam
* revisit grazing effects again
* dumb debug spam again
* improve boss attack timer
* overlay effect for boss deaths (similar to the player one)
* spice up spellcard declaration (HUD)
* don't spawn boss death overlay if fleed
* modify Exo2 font to use tabular figures
* adjust replay menu for the font change
* draw timer & power with standard font (phasing out the numbers font)
* WIP new HUD; random fixes/tweaks
* hud: move difficulty indicator
* hud: move debug stuff around
* preloads, mostly
* fix youmuA batching conflict
* shitty workaround for the shitty screenshake shit
* remove extraspell lag by stopping to draw stagebg sooner
which is possible because extra spells have a different spellcard_intro timing. Fun fact of the day: the duration of spellcard_intro is always ATTACK_START_DELAY_EXTRA even for normal spells!
* new stain particle
* i disabled background rendering…
* "batch" marisa_b masterspark draws
* remove these once a new atlas is generated
* make toe quick again
* hopefully fix all occurences of changed stain and ScaleFade behavior
* tweaking reimu_a and toe boson launch effects
* make lhc fast again
* softer involnerability effect
* fix stage 1 snow on the water bug (and improve performance)
translated the time to the future a bit because it only seemed to be an issue for small time values
* remove unnecessary spawnflare from toe
* tone down extra spell start effect
* experimental ReimuB gap shader optimization
* fix python3 shebangs
* generate simple blur shaders w/ hardcoded kernels
* New loading screen
* lasers: fix incorrect draw hook registration
* add webp support for atlas generator
* Use ImageMagick for atlas composition (adds 16-bit support)
* Atlas maintenance
* make the vampiric vapor bullets less prone to invisibility
* Revert a few particles to the quadratic fade curve
* experimental baryon effect
* improve baryon sprites
* disable the baryon effect on minimal postprocessing setting
* Reimu (#101)
* add the reimu
* Add Reimu story
* account for various blunders
* add reimu dialog picture
* Reimu: WIP yin-yang orbs
* reimu: fix up indents
* Reimu: swap the shotmode names to match the kanji order in her Japanese name
* Reimu: compatibility with the latest system
* WIP ReimuA crap
* ReimuA homing trails
* more ReimuA stuff
* more ReimuA adjustments + enhanced DPS stats
* Reimu: stubs for new player animation sequences
* Reimu: occupy the 0th character slot
* Reimu: tweak needle sprite
* Reimu: buff movement speed to better match Touhou
* Reimu: fixup for the recent projectile changes
* ReimuA: make homing shots a bit smaller; give them custom effect on collision
* Reimu: add intermediate frames; move some loose sprites to the atlas
* Reimu: fix compile errors
* replace DBL_MAX by INFINITY
* Don’t draw reimu orbs twice
fixes #127
* add new reimu dialog pic
* ReimuA adjustments (mostly homing); it's still OP
* wip ReimuB gaps
* still not sure where i'm going with these gaps
* meh
* Reimu: premultiplied alpha fixups after rebase
* reimuB shot pattern with basic power scaling (not balanced at all)
* reimuB: some lame-ass particle effects
* ReimuB bomb effect prototype
* reimuA bomb prototype
* fix reimu shots for the new damage system
* Reimu: use the new player_is_bomb_active() function, add placeholder BG for ReimuB
* some reimuB bomb projectiles
* ReimuB bomb bg and some framebuffer utils required to support it.
Might reuse this at least in part for ReimuA unless we come up with
something better.
* hack to fix ReimuB bomb fade; refactoring needed
* reimuA damaging bombs
* fix ub
* prevent nan when reimuA bombs without enemies present
* add a bomb_bg to reimuA
* ...
* various fantasy seal tweaks
* Reimu: placeholder bomb sounds; slight fantasy seal buff
* fix null pointer dereference
* Reimu "balance" adjustments; minor fixes
* putting bandaids over gunshot wounds
* Add aoe damage and bullet cancel to ReimuB's bomb
* more exorcism porn
* make reimu bomb bg runes better visible on dark backgrounds
* More ReimuA shot changes
* WIP premultiplied alpha
* WIP color API rework (doesn't build yet; lots of things left to convert)
* convert everything remaining to new Color api except stage*_event.c files
* convert the stages to new Color api. builds & runs now; still many rendering errors
* fix the bullet shader for premultiplied alpha
* fix masterspark, graphs and stage 1 fog clouds
* fix marisa_b and most of spellcards
* Add deprecation warnings for BLEND_ADD and PFLAG_DRAWADD
* fix a segfault in stage 6
undo accidental earlier change
* fix text_hud.frag.glsl
* fix scuttle bg and remaining stage3 BLEND_ADDs
* fix marisa laser opacity
* hacky fix for myon
The old implementation relied on alpha being stored inside p->color. In
premul alpha this doesn’t work and functions like color_set_opacity
can’t solve this i think.
So I tried messing around with it until it looked somewhat similar.
* fix marisa_b stars
* remove color_set_opacity i overlooked
* more plrmode blending changes
* fixup additive blending in stage 1
* various premultiplied alpha fixups for bosses and enemies
* stage 2 premul alpha fixups
* stage 4 premul alpha fixups
* stage 5 premul alpha fixups
* stage 6 premul alpha fixups
* make lasers also use the PMA blend mode
* remove PFLAG_DRAWADD and PFLAG_DRAWSUB
* fix remaining PMA issues in menus
* lame extraspell bg workaround
* fix item alpha
* make marisaA lasers look somewhat like in master
* fix marisaA bomb background fadeout
* fixup various r_color4 calls
* fix myon
* remove dead code
* fix use of BLEND_ADD in player death effect
* fix myon shot trails (broken on master as well)
* fix myon shot fade-in
* extend the sprite shaders custom parameter to a vec4
* fix youmuB stuff and make it look somewhat better.
the code looks even worse though.
The only case of t==0 being skipped is if the projectile was somehow
created after the projectile processing loop for this frame has been
finished. Currently that is only possible if a particle spawns a
non-particle projectile, which, ideally, should never happen. The same
problem exists with other types of entities. For example, if you have a
funny projectile rule that spawns an Enemy, that Enemy will have the 0th
frame skipped. One way to fix this is to maintain a list of all entities
in the game and process them all in a single loop, where newly spawned
entities would be appended to the tail of the list. This is also
probably the only good way to fix this, too.
Handling of all projectile events has been made mandatory to facilitate
easier debugging of subtle and/or hard to track bugs. If t<0, then the
projectile rule MUST return ACTION_ACK, signifying that it acknowledged
the event and handled it appropriately. Otherwise, it SHOULD return
ACTION_NONE or ACTION_DESTROY. In a perfect world, those just wouldn't
be conflated in the same function with update logic.
I've also cleaned up the stage_logic routine a bit. Moved most of the
dialog handling into dialog.c and gave higher priority to boss
processing. The later is currently necessary to let boss-spawned
projectiles and particles to get called with t==0.
* wip projectile prototypes
* Partial fix for replay desyncs
* some YoumuA fixes
* fix various ToE problems
* fix MarisaB
* fix master spark
* fix iku slave particle position
* this timeout was somehow halved during the changes
* remove some v1.2 compat hacks
I would've preferred to just go with 4-spaces for indent and no tabs,
but lao is a bit conservative about it. :^)
Still, this is a ton better than mixing different styles all over the
place, especially within the same file.