* 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 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.
* Major refactoring of the main loop(s) and control flow (WIP)
run_at_fps() is gone 🦀
Instead of nested blocking event loops, there is now an eventloop API
that manages an explicit stack of scenes. This makes Taisei a lot more
portable to async environments where spinning a loop forever without
yielding control simply is not an option, and that is the entire point
of this change.
A prime example of such an environment is the Web (via emscripten).
Taisei was able to run there through a terrible hack: inserting
emscripten_sleep calls into the loop, which would yield to the browser.
This has several major drawbacks: first of all, every function that
could possibly call emscripten_sleep must be compiled into a special
kind of bytecode, which then has to be interpreted at runtime, *much*
slower than JITed WebAssembly. And that includes *everything* down the
call stack, too! For more information, see
https://emscripten.org/docs/porting/emterpreter.html
Even though that method worked well enough for experimenting, despite
suboptimal performance, there is another obvious drawback:
emscripten_sleep is implemented via setTimeout(), which can be very
imprecise and is generally not reliable for fluid animation. Browsers
actually have an API specifically for that use case:
window.requestAnimationFrame(), but Taisei's original blocking control
flow style is simply not compatible with it. Emscripten exposes this API
with its emscripten_set_main_loop(), which the eventloop backend now
uses on that platform.
Unfortunately, C is still C, with no fancy closures or coroutines.
With blocking calls into menu/scene loops gone, the control flow is
reimplemented via so-called (pun intended) "call chains". That is
basically an euphemism for callback hell. With manual memory management
and zero type-safety. Not that the menu system wasn't shitty enough
already. I'll just keep telling myself that this is all temporary and
will be replaced with scripts in v1.4.
* improve build system for emscripten + various fixes
* squish menu bugs
* improve emscripten event loop; disable EMULATE_FUNCTION_POINTER_CASTS
Note that stock freetype does not work without
EMULATE_FUNCTION_POINTER_CASTS; use a patched version from the
"emscripten" branch here:
https://github.com/taisei-project/freetype2/tree/emscripten
* Enable -Wcast-function-type
Calling functions through incompatible pointers is nasal demons and
doesn't work in WASM.
* webgl: workaround a crash on some browsers
* emscripten improvements:
* Persist state (config, progress, replays, ...) in local IndexDB
* Simpler HTML shell (temporary)
* Enable more optimizations
* fix build if validate_glsl=false
* emscripten: improve asset packaging, with local cache
Note that even though there are rules to build audio bundles, audio
does *not* work yet. It looks like SDL2_mixer can not work without
threads, which is a problem. Yet another reason to write an OpenAL
backend - emscripten supports that natively.
* emscripten: customize the html shell
* emscripten: force "show log" checkbox unchecked initially
* emscripten: remove quit shortcut from main menu (since there's no quit)
* emscripten: log area fixes
* emscripten/webgl: workaround for fullscreen viewport issue
* emscripten: implement frameskip
* emscripter: improve framerate limiter
* align List to at least 8 bytes (shut up warnings)
* fix non-emscripten builds
* improve fullscreen handling, mainly for emscripten
* Workaround to make audio work in chromium
emscripten-core/emscripten#6511
* emscripten: better vsync handling; enable vsync & disable fxaa by default
* Added (and fixed) a few useful warnings
* Removed some dead code
* Cleaned up the build system files a bit
* Once again separated ZIP support from data packaging
* Converted macOS cross-compilation options into cross-file properties
* 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.
* Renderer: rename render targets to framebuffers
* Refactor framebuffer pair helper and some of the video API
* Remove hardcoded dimensions from draw_framebuffer_tex
* Make viewport a per-framebuffer property rather than a global one
* Handle config updates via the events system. React to viewport fg/bg quality change requests.
* wip font rendering stuff; hashtable monstrosity is temporary
* various text rendering fixes/improvements
* HashTables™ 3.0
* Add some comments to aid navigating the hashtable macro maze
* overhaul text rendering API; add default and example shaders
* text: implement text_render for spellcard effect; misc fixes
* README: update dependencies
Bye SDL_ttf, hello freetype2.
* text_draw: fix resolution/scale-dependent bugs
* make text_draw fallback to the current shader, fix hud and stagetext
* repair the bgm loading
* fix spell practice mode
* fix walloftext
forgot one site of text_draw earlier
* fix wrapped text rendering
* fix and simplify the hud text shader
* dynamic glyph cache
* implement font size change on window resize/quality setting change/etc.
* rename text shaders for consistency
* preloads for fonts and text shaders
* make the stagetext shader look somewhat better
* text_render: attempt to normalize height
* small improvement for stagetext