Commit graph

2466 commits

Author SHA1 Message Date
Andrei Alexeyev
6b3b1fd3e0
document ProjFlags 2019-03-28 19:05:35 +02:00
Andrei Alexeyev
990f7cfda2
remove legacy PFLAG_GRAZESPAM flag 2019-03-28 18:48:48 +02:00
Andrei Alexeyev
3f70efb8b5
use more convenional naming for ProjType enum 2019-03-28 18:42:07 +02:00
Andrei Alexeyev
080b8f12fd
retire FakeProj 2019-03-28 18:40:04 +02:00
Andrei Alexeyev
7a7291970d
if a projectile self-destructs, don't run collision in its death frame 2019-03-28 18:25:55 +02:00
Andrei Alexeyev
df3427d09a
powersurge: rebalance charge/bonus gain in favor of neg. charge maintenance 2019-03-28 17:56:06 +02:00
Andrei Alexeyev
30ac83e2ea
correct logic fps counter 2019-03-27 11:12:03 +02:00
Andrei Alexeyev
8e227e353a
don't clear lasers that haven't been activated yet 2019-03-27 10:39:41 +02:00
Andrei Alexeyev
5e542896be
get rid of marisa_laser_think 2019-03-27 10:26:59 +02:00
Andrei Alexeyev
2a102a2070
master spark tweaks; damage comes from the beam now 2019-03-26 20:35:29 +02:00
Andrei Alexeyev
55b660e9b3
smooth out Wriggle's first appearance 2019-03-26 18:43:14 +02:00
Andrei Alexeyev
30e2b93253
fix non-pch build 2019-03-26 18:32:50 +02:00
Andrei Alexeyev
dc88572167
YoumuB bomb tweaks, some laser fixups 2019-03-26 17:58:38 +02:00
Andrei Alexeyev
4e7c37976f
Fantasy Seal dmg buff and minor adjustments 2019-03-26 13:57:01 +02:00
Andrei Alexeyev
bf2d1a81aa
shaderc bullshit 2019-03-25 12:35:40 +02:00
Andrei Alexeyev
98b0a0a740
fix shaderc dependency lookup 2019-03-23 15:24:32 +02:00
Andrei Alexeyev
96631afbbc
add shaderc wrap fallback 2019-03-22 07:30:35 +02:00
Andrei Alexeyev
1079c519fa
switch sdl2 wrap branch to meson-2.0.9-emscripten-fixes 2019-03-21 02:05:19 +02:00
Andrei Alexeyev
d3b15948b2
Make all RWops wrappers handle NULL gracefully
This indirectly fixes a bug in vfs_ro_open
2019-03-20 09:49:52 +02:00
Andrei Alexeyev
da13f70815
update default build options for sdl 2019-03-20 09:35:29 +02:00
Andrei Alexeyev
98f9a05e10
sdl2mixer: print info about audio drivers when initializing 2019-03-20 09:35:06 +02:00
Andrei Alexeyev
52742d8d99
workaround to make SDL behave with latest emscripten 2019-03-20 09:33:57 +02:00
Andrei Alexeyev
cc68cca430
display exact no. of bomb fragments; minor HUD improvements 2019-03-19 04:51:45 +02:00
Andrei Alexeyev
9c003f0ff8
add sdl2_mixer/ogg/vorbis fallback wraps 2019-03-19 03:01:09 +02:00
Andrei Alexeyev
9d260f59ba
add sdl2 wrap fallback 2019-03-18 08:05:10 +02:00
Andrei Alexeyev
c7ff531a63
fixup includes 2019-03-18 06:41:12 +02:00
Andrei Alexeyev
4a4c174285
add libwebpdecoder wrap fallback 2019-03-17 22:58:15 +02:00
Andrei Alexeyev
24866d89df
add freetype wrap fallback 2019-03-17 21:05:32 +02:00
Andrei Alexeyev
aeae3ca534
add libpng wrap fallback; fix subprojects .gitignore 2019-03-17 20:02:45 +02:00
Andrei Alexeyev
571d058b52
add zlib wrap fallback; point libzip wrap to a versioned branch 2019-03-17 19:01:17 +02:00
Andrei Alexeyev
4443c3358b
Add libzip wrap fallback 2019-03-17 07:06:47 +02:00
Andrei Alexeyev
cc6514151a
Implement seeking in zip files without reading everything to memory
In particular, this greatly reduces memory usage for music tracks.
2019-03-16 22:11:37 +02:00
Andrei Alexeyev
c23c1239fe
vfs: improve read-only guarantees 2019-03-16 00:17:42 +02:00
Andrei Alexeyev
a82375993a
shut up warning 2019-03-15 23:45:18 +02:00
Andrei Alexeyev
3ee8ec3c42
options: finer volume step 2019-03-15 23:03:06 +02:00
Andrei Alexeyev
4755d566ff
fix buffer overflow 2019-03-15 22:24:31 +02:00
Andrei Alexeyev
b9766fcf59
music room improvements: allow playing locked tracks with confirmation 2019-03-15 22:19:49 +02:00
Andrei Alexeyev
bd5bcf7b03
Lower minimum meson version back to 0.45.0
Note that some configurations (e.g. an emscripten build) will definitely
fail on this version. The minimum recommended version is 0.48.0, and a
warning will be printed if using something older.
2019-03-12 02:05:35 +02:00
Andrei Alexeyev
f2b11c19f8
remove sha256 endianness check, it actually works fine on big endian
i am an idiot i'm sorry
2019-03-12 01:56:30 +02:00
Andrei Alexeyev
c2c1794c14
fix bogus sort stabilization 2019-03-11 19:20:38 +02:00
Andrei Alexeyev
620651a128
optimize prefix_get_sprite and prefix_get_tex 2019-03-11 17:45:15 +02:00
Andrei Alexeyev
add8469b06
refactor crazy memory allocations in events 2019-03-11 17:45:15 +02:00
Andrei Alexeyev
82a9a0223b
refactor crazy memory allocations in 3d background code 2019-03-11 17:08:54 +02:00
Andrei Alexeyev
53b97d5230
fix warning 2019-03-11 13:18:35 +02:00
Andrei Alexeyev
78edef358b
oops! 2019-03-11 12:43:12 +02:00
Andrei Alexeyev
a63e8f4a69
Add a basic music room 2019-03-11 01:21:43 +02:00
Andrei Alexeyev
b314cbd7d7
Enable gamepad input by default 2019-03-10 17:28:45 +02:00
Andrei Alexeyev
75ee08535b
fix a few memory leaks 2019-03-09 23:58:42 +02:00
Andrei Alexeyev
ef6b0fd944
fix non-pch build 2019-03-09 23:24:54 +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