Commit graph

75 commits

Author SHA1 Message Date
Martin Herkt
f60e0b1df3
Update email 2020-04-02 18:40:55 +02:00
Andrei Alexeyev
39a5f7d209
credits: Add Adam, Haru; retime; allow skip if any ending achieved 2020-03-04 22:26:53 +02:00
Alice
ed065eb38e
New story and dialogue (main story complete!) (#186)
* new story doc for Taisei Project

* more romanization fixes

* new Reimu script, yay

* accidentally stomped on some dashes

* typo in iku's dialogue

* marisa dialogue, complete!

* formatting fixes, and some timing changes

* youmu script! all three routes complete!

* youmu typoes

* remove trailing whitespaces, use smartquotes, move a couple of words around

* good/bad endings complete!

* remove unneccesary whitespaces

* revert --

* story doc typo

* formatting issues, a couple of word changes

* smart-quotes

* typoes and minor grammar changes to dialogue/story/endings

* one last typo in Marisa's dialogue

* correct smartquotes on STORY.txt
2020-03-04 22:26:50 +02:00
Andrei Alexeyev
8aad971114
clear up some ancient 3D confusion 2020-02-22 08:56:41 +02:00
Andrei Alexeyev
3bd884cd1b
Stage3D improvements
* More consistent function names
* No need to register models, just pass what you want to draw to
stage3d_draw()
* Optimize vector math
2020-02-01 03:24:17 +02:00
Andrei Alexeyev
49dcd7c8d7
Remove Lalasa's contributions (by request)
This replaces the story and dialogue contents with stubs, as well as
removes Lalasa's entry from the credits, by her own request.

Fixes #179
2019-10-31 13:04:30 +02:00
Andrei Alexeyev
9d3bf87559
Refactor matrix stack API to get rid of matrix mode (#177)
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.
2019-10-12 15:02:15 +03:00
Andrei Alexeyev
f79f8574a9
update FOSS acknowledgements 2019-09-24 15:58:49 +03:00
Andrei Alexeyev
31ea0d409c
replace Yukkuri Reimu with Yukkuri Kyouko 2019-08-22 23:00:13 +03:00
Andrei Alexeyev
5a23fb95fc
make upkeep script preserve existing copyrights 2019-08-03 20:44:22 +03:00
Andrei Alexeyev
3055901998
update my email 2019-07-03 21:00:56 +03:00
Andrei Alexeyev
c2cd91463c
New character art by Afensorm + other visual tweaks (#170)
* 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
2019-07-03 20:50:43 +03:00
Andrei Alexeyev
b0856ce07d
Switch audio assets to Opus (#167)
* Switch BGMs to Opus

* Switch SFX to Opus; use floating-point mixing

* opus sfx: support resampling via SDL_AudioStream

* bump SDL2 version requirement to 2.0.6

2.0.5 doesn't have the SDL_AudioStream API, and is ancient anyway.
2019-05-11 09:46:26 +03:00
Andrei Alexeyev
2cdc06b941
fix credits 2019-04-24 11:43:31 +03:00
Andrei Alexeyev
d5e66f9a06
fix a bunch of missing preloads 2019-04-23 00:09:58 +03:00
Andrei Alexeyev
82a9a0223b
refactor crazy memory allocations in 3d background code 2019-03-11 17:08:54 +02:00
Andrei Alexeyev
a63e8f4a69
Add a basic music room 2019-03-11 01:21:43 +02:00
Andrei Alexeyev
180f9e3856
Emscripten compatibility (#161)
* 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
2019-03-09 21:32:32 +02:00
Andrei Alexeyev
fa802dbd94
Some refactoring
* 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
2019-01-24 22:24:43 +02:00
Andrei Alexeyev
4159ea1249
'upkeep' target for maintenance tasks; back to include guards; happy new year! 2019-01-23 22:10:43 +02:00
Andrei Alexeyev
235e2e0783
allow to skip credits if the game has been cleared at least once
closes #154
2019-01-05 23:40:50 +02:00
Andrei Alexeyev
cb79cbfb57
fix a terrifying credits bug 2018-11-03 00:27:51 +02:00
Andrei Alexeyev
b4f94e7371
Some minor text revisions 2018-11-03 00:26:12 +02:00
Andrei Alexeyev
9b3779ebb4
Some renderer refactoring (mostly API and GLES preparations) (#144)
* Refacor uniforms API:

    - More complete and consistent
    - Type-safety
    - Usage correctess assertions missing for now, planned

* Redesign texturing API: texunits gone, assign textures to sampler uniforms directly

r_texture_create now allocates memory and returns an opaque Texture
pointer; similar changes to the other renderer APIs will follow.

* Framebuffers: make _create return an opaque pointer, add debug label APIs (unused for now)

* opaque pointers and debug label APIs for vertex arrays and buffers

* fix null renderer

* Refactor glsl preprocessing into an independent module

* Separate shader resource management from renderer backend

This makes it possible to add more shading languages and/or include a
transpiler, which will be useful for the GLES backend.

* refactor r_clear into a stateless API

* add r_texture_clear API; fix gl33_framebuffer_clear

* Replace deprecated glsl_objects with objects in all *.prog files

* fix missing texture_clear implementation in null renderer

* remove some dead code in null renderer

* fix GLES segfault

* GLES 3.0 actually has glVertexAttribDivisor

* Query GL for supported GLSL versions (preparing to add shader transcompilation)
2018-09-14 10:37:20 +03:00
Andrei Alexeyev
8490576810
Premultiplied alpha (#133)
* 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.
2018-07-23 20:07:59 +03:00
Andrei Alexeyev
322edd0dce
Text rendering rewrite and optimizations; some refactoring (#129)
* 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
2018-06-30 00:36:51 +03:00
Andrei Alexeyev
fd06ad3026
fix some of the set_ortho/draw_fbo madness 2018-04-26 02:50:48 +03:00
Andrei Alexeyev
59cf8f6300
Rendering system rewrite, tons of refactoring, optimizations, and other cool stuff (#116) 2018-04-12 17:08:48 +03:00
Andrei Alexeyev
a9561d7baf
Sprites and texture atlases; upgrade most graphics to a higher resolution (optimized for 1600x1200) (#113) 2018-02-06 08:19:25 +02:00
Andrei Alexeyev
4eabee70a7
change vnutriya to InsideI by request 2018-01-21 19:35:26 +02:00
Andrei Alexeyev
ea4e651e76
fix font_line_spacing to account for quality and have the expected semantics 2018-01-14 13:50:57 +02:00
laochailan
cb310dce26
fix tower intersection in stage 6 and text intersection in credits 2018-01-14 12:33:35 +01:00
Andrei Alexeyev
513d613387
Consistent indentation: indent with tabs, align with spaces (#104)
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.
2018-01-12 20:26:07 +02:00
Andrei Alexeyev
5790dfb685
fix credits layout; support non-looping BGMs 2018-01-09 01:32:52 +02:00
Andrei Alexeyev
4308c963e7
credits: fix crash, remove obsolete code 2018-01-08 23:40:41 +02:00
Andrei Alexeyev
485c9a8ed6
Happy New Year! 2018-01-04 19:14:31 +02:00
Andrei Alexeyev
013a205a92
credits: bgm, updates, other improvements 2017-12-28 05:49:37 +02:00
Andrei Alexeyev
48b13cd83a
frameskip option for slow GPUs 2017-12-26 13:07:40 +02:00
Andrei Alexeyev
d66793a117
add option to swap buffers after waiting for next frame
also restructured loop_at_fps a bit. it now handles FPS counter updates
and buffer swaps.
2017-12-26 10:56:21 +02:00
Andrei Alexeyev
29acd5f58a meson: intel intrinsics, various improvements 2017-12-21 03:58:54 +01:00
Andrei Alexeyev
4b53d65c23
enable GL_TEXTURE_2D by default to reduce API calls 2017-11-22 02:05:42 +02:00
Andrei Alexeyev
36f4182829
update stage bg state separately from drawing 2017-11-15 05:45:41 +02:00
Andrei Alexeyev
6eac178c39
use a shared 3D context for all stages (and credits) 2017-11-14 03:41:08 +02:00
Andrei Alexeyev
6e78958d94
typo 2017-10-23 23:13:09 +03:00
Andrei Alexeyev
bd910c3444
update credits, fix stuff 2017-10-23 13:48:30 +03:00
Andrei Alexeyev
05478cd543
another desperate attempt at an accurate fps limiter 2017-10-04 08:07:04 +03:00
laochailan
a2b16380c7
update credits 2017-10-03 18:10:11 +02:00
Andrei Alexeyev
0d9f88b2a1
drop the bgm_ prefix 2017-10-02 05:34:51 +03:00
Andrei Alexeyev
ef67a16867
WIP event system rewrite. text input missing 2017-10-01 00:43:18 +03:00
laochailan
df203fb86a repair credits perspective 2017-09-24 12:21:46 +02:00