804 Commits

Author SHA1 Message Date
32ea89ce46 Fix fqFilterE used for speech sound effects and increase fqeffects readability 2024-10-02 21:28:40 +00:00
f3ab31c8f6 macOS: Fixing build 2024-09-30 14:38:00 +02:00
7bbe0cb38f Remove redefines to fix windows build 2024-09-25 21:28:55 +02:00
aa9ac1e1f3 fix: Game hangs on quit 2024-09-25 20:42:56 +00:00
2b4f4a3091 Restore handling of repeat key presses 2024-09-25 22:17:34 +02:00
84a4a782e1 Fix background blending without using slow glGetFloat 2024-09-24 23:33:05 +02:00
4591a17a1b feat: ci: Deploy to Gitlab Pages 🚀 2024-09-22 16:26:41 +02:00
38dda1fb92 feat: Add wasm32 (web browser) build 🎆
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>
2024-09-17 19:02:51 +02:00
edda6ec769 macOS: Fixing type casting 2024-09-10 08:12:08 +02:00
1482c9e8f5 Fix statscript compiler issues 2024-08-26 20:42:55 +00:00
eb0455c148 Fix sound bank header id assignment 2024-08-26 20:42:55 +00:00
0d08248d9d fix: #85: Crash on Bentusi trading offer accepted 2024-08-09 20:06:23 +02:00
9032a2756e MacOS: Fixing Build due to lack of header 2024-07-26 00:41:22 +02:00
fdc190fb87 Add switch for vanilla guns behavior, which in turn depends on the global vanillaMode switch 2024-07-24 20:19:06 +00:00
a06cf25ee5 Fix infinite loop in render initialization, if antialiasing isn't active and render doesn't support it 2024-07-24 20:19:06 +00:00
ed6670affb Slowly reset guns to the initial position after the end of attack
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.
2024-07-24 20:19:06 +00:00
8646f9c3c5 Ongoing code cleanups and prototype warnings 2024-07-24 07:49:33 +02:00
6bbefcfb0a meson: Start treating warnings as errors
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
2024-07-15 19:37:50 +02:00
80474901ca Fix key lookup when entering text
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.
2024-06-27 11:30:55 -07:00
0d4fd183ae Stop plugscreen task from continue running 2024-06-20 13:23:04 +02:00
897d64eee6 Remove references to deleted file from Linux build
Commit 712824e997 removed
src/Game/KNITransform.c, but not references to it in autotools-based
build files, leading to compilation errors.
2024-06-18 10:08:20 -07:00
a6460c12c6 Add missing include paths for Linux build
Commit 4857514dbb added the stb_image
library, but did not update include paths in the autotools-based build
files, leading to compilation errors.
2024-06-18 10:08:20 -07:00
2266cd4387 Ensure mouse clipping is off for pieplate movement 2024-06-18 17:00:20 +00:00
94a95fb618 Fix movement pieplate 2024-06-18 17:00:20 +00:00
cef910cef4 Fix crash when using heavy corvette burst fire attack 2024-06-13 23:12:04 +02:00
e1d2697af3 Apply 1 suggestion(s) to 1 file(s)
Co-authored-by: Thibault Lemaire <thibault.lemaire@protonmail.com>
2024-06-08 20:41:16 +00:00
70e2dcd0b8 Disable dbgWarning print of weird pointers in release build 2024-06-08 20:41:16 +00:00
55645ff167 Enable vsync to limit issues with too high framerates 2024-06-06 22:08:59 +02:00
26a1731fb4 Prevent ping sounds from being emitted for many frames in a row on vsync off high Hz monitor systems 2024-06-01 22:07:28 +02:00
82c02ef6f0 Disable memory clears for both retail and debug builds to prevent broken mesh pointers 2024-05-29 22:30:37 +02:00
93917c4347 Enable bink video playback 2024-05-17 22:21:07 +00:00
b509b8fe86 Catch more invalid mesh pointers 2024-05-14 23:53:05 +02:00
5097787571 Restore original btg rendering without alpha blending to fix btg rendering in mission 12 2024-05-03 20:33:59 +00:00
4857514dbb Remove SDL2 image and use stb_image instead 2024-05-02 18:58:53 +00:00
0eb31e67cf Fix float to int conversion in statistic code used for AI ship creation 2024-05-02 18:58:12 +00:00
6587273012 Revert "Added UV interpolation in morphed mesh rendering"
This reverts merge request !68
2024-05-02 18:49:32 +00:00
7f6ea47747 Restore original rgl shading code to fix gas/nebulae rendering and lighting
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.
2024-04-25 07:43:16 +00:00
8fe987a6af Revert NIS letter boxing to original behaviour and extend to modern monitor aspect ratios 2024-04-25 07:40:27 +00:00
185d600790 Fix accidentally overriding texture filtering of non particle textures 2024-04-17 21:25:19 +00:00
0a54e99bf0 Fix: Defense fighter nozzle flash effect accessing freed laser bullet 2024-04-17 18:11:52 +02:00
91fdfb890c Small refactorings to debug segfaults on defense lasers 2024-04-17 18:11:51 +02:00
a3c38907ec Allow forcing some debug asserts in non-debug builds 2024-04-17 18:11:51 +02:00
7e3488c1ac fix: Clear memory at alloc & free on release builds
The logic for swapping these defines around is the following:
- We want the most stable code in release builds, so it's okay to sacrifice (theoretical) speed
- We want to catch logic errors in debug builds
2024-04-17 18:11:51 +02:00
ac0c9d957f Fall back to old style of texture allocation to prevent rendering issues 2024-04-12 08:18:32 +00:00
78e4395489 Added UV interpolation in morphed mesh rendering
The meshMorphedObjectRender() takes two frames of an animation (based on different meshes and textures) interpolates between them and renders them. This requires a certain set of requirements to be met such as the two meshes having the same amount of vertices+polygons and the vertex indices of the polygons matching. The code also mandates that the UV coordinates at the vertices match and leverages that by just using the UV coordinates of the base mesh (first frame of animation).

Turns out the ion beam (bulletionray.ebg) has 4 frames defined:

```
label(beamMesh)
   morphAnimDWORD(ETG\meshes\misc\beamRibbon.geo, 0)
   morphAnimDWORD(ETG\meshes\misc\beamRibbon01.geo, 1)
   morphAnimDWORD(ETG\meshes\misc\beamRibbon01.geo, 0)
   morphAnimDWORD(ETG\meshes\misc\beamRibbon01.geo, 2)
```

The 0,1,2 at the end define flags. 2 meaning the end of a loop, 1 beginning of a loop. Effectively the animation only iterates through frames 1,2,3 and never uses frame 0. The ebg file also sets the start frame to 1 skipping 0 completely. But frame 0 is still loaded as the base mesh.

Now it turns out that beamRibbon.geo and beamRibbon01.geo do not have matching UVs - and since the rendering code relies on the UVs of the base mesh we have the weird rendering of tip of the ion beam were the UVs diverge. It looks like the ion beam animation was changed at one point to start at frame 1, probably because it looked very weird with the tip of the beam flickering due to the UV mismatch.

Now one could either fix this by correcting the content. Either through modified .ebg files (there are multiple beams with the same issue). By editing the geometry files to match the UVs - or by making the mesh morph rendering code use the actual UVs from the animated meshes and not use the static base mesh just for them.

This is what this MR does: UVs are now interpolated between animation frames in the same way as vertices and normals are. This fixes the rendering and makes the system a little bit more correct and powerful.

In principle this should not cause any new issues (hopefully there are no completely broken particle meshes).
2024-04-07 21:03:08 +00:00
3b21410b26 bool to bool32 cleanup 2024-04-05 20:56:49 +00:00
796bad79f1 Increase universe update rate to 64 from 16 2024-03-03 10:57:52 +00:00
0627675f42 fix: Crash when opening the Launch Manager
(with sanitizers)

Fixes #56
2024-02-23 10:46:27 +01:00
2faaf8141d removing sdl big folder and file - #62 2024-02-03 09:55:29 +00:00
1cc440d5e0 Fix mouse cursor jumps in sensor manager 2024-01-30 00:03:49 +01:00