nix: update to emscripten 3.1.64
Remove use of legacy GL_PERSPECTIVE_CORRECTION_HINT
Disable intro plugscreens for emscripten builds for now
Use stored background color instead of glGetFloatv() call that is slow in emscripten due to wasm<>javascript context switch
Co-authored-by: Thibault Lemaire <thibault.lemaire@protonmail.com>
This commit fixes the issue when ship guns remain in the position (angle and declination) of the latest shot - now guns slowly rotate to the initial position after battle.
Guns reset can be initiated simultaneously with ship alignment, but intentionally done sequentially - we align the ship, don't see any other target and only then turn guns back.
Make it a bit more explicit that we're ignoring some(many) warnings
`-w` ignored *all* warnings. Which is 1) not very sane and 2) easy to miss
`-Werror` will
1. ensure we don't add new categories of bugs in new code/refactors (some of the changes here are evidence that I, for one, leaned too much on "no compile error? No problem")
2. allow us to fix those warnings step by step
Some warnings are not attached to a category and thus cannot be disabled individually. Using `-Werror` turned those into errors, which forced me to fix them.
Note: Not tested with clang
Co-authored-by: Rafael Brune <mail@rbrune.de>
Fix windows redefine errors
Fix strict aliasing errors by using copies instead of casts
SDL keycodes correspond to the character that should be generated when
a key is pressed. It is unnecessary to convert this into a readable
key name to determine which key has been pressed. More than this, in
some cases it is incorrect -- the readable name for the space key, for
example, is "Space", and using the first character of this string to
determine what character to insert results in an 's', not a space!
This error would also cause function keys to insert an 'f', rather
than being ignored.
This commit also ignores any characters whose byte representation lies
outside the range from 0 to KEY_TOAL_KEYS, as we do not have a
character mapping for such keys.
Fixes#63.
These changes restore the original rgl vertex shading code. Instead of relying on opengl material and lighting code to generate vertex colors the internal CPU code path is used to calculate the vertex colors. This restores the original brightness of the shadowed side of meshes and the specular highlight on the nebulae. Probably also other things.
This has the unfortunate side effect of removing someone's previous attempt of modernizing the render path using VBOs (vertex buffers on the GPU). When we get to implement a completely alternate modern opengl render path that reimplements the CPU side vertex shading as GPU vertex and pixel shader we will return to gpu buffers but for the sake of correctness they have to go for now.