This repository was archived by the owner on Nov 20, 2025. It is now read-only.
uilayer: Wire up ui.bg.opacity setting#90
Closed
combolek wants to merge 364 commits into
Closed
Conversation
Fix the Chinese display issue on the loading page
Fix the Chinese display issue for the text below 'Did you know?' on the loading page
Update vcpkg version
Optimize and simplify Camera.cpp
Fix DXIL IMPORTED_LOCATION path
Remove not needed buffer unbinds
refactor: replace per-pixel Python renderer RGBA copying with memcpy
Small code optimizations that results with 3x faster main loop
…, menu bar 'windows' options
Undo/Redo system, hierarchy for models in scene, uuid for basic_nodes, menu bar 'windows' options
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
…rganization Co-authored-by: Hirek193 <23196899+Hirek193@users.noreply.github.com>
Consolidates platform-specific config-directory logic (APPDATA on Windows,
~/Library/Application Support on macOS, ~/.config on Linux) into a single
user_config_path(filename) function in utilities/utilities.{cpp,h}, removing
copy-pasted #ifdef blocks from application.cpp, editor/editorSettings.cpp,
input/{keyboard,gamepad,drivermouse,uart}input.cpp.
refactor: extract user_config_path() helper
The dumb3d->glm / utilities-simplification refactor replaced the old custom clamp() (which tolerated Lo>Hi, returning the upper bound) with std::clamp, where inverted bounds are undefined behaviour. Only a few sites were patched afterwards, by hand, with std::minmax plumbing (incl. a stray `static` inside a per-axle loop). Others silently produced wrong results in the AI braking / acceleration path. Add a safe_clamp() helper (normalizes inverted bounds) and use it ONLY where Lo<=Hi cannot be proven at compile time (config min/max pairs, sign-dependent expressions, container underflow). Sites with constant bounds or [0, x>=0] keep std::clamp. Remove the manual std::minmax workarounds and rewrite the damaged-track jolt code value-first.
std::uniform_real/int_distribution has UB when min>max. The old "fancy Random" used interpolate(a,b,t) which tolerated a>b; the migration to std::uniform_real_distribution did not, and only one inverted call site was fixed by hand. Swap the bounds inside Random()/Random(int)/LocalRandom() so every call site is safe, and reorder the two inverted literal calls in Driver.cpp (fActionTime buzzer / departure delay) for readability.
Network client will overwrite the seed if necessary.
Since gamma factor is used, we need more than 256 steps to make the gradient smooth.
Otherwise the screen stays empty when the game is launched paused.
Loading screen improvements
Initialize random seed early in the init sequence
drivermode: Make sure to draw the first frame before pausing
Hotfix/std clamp
Enabling GLM_FORCE_DEFAULT_ALIGNED_GENTYPES makes glm::vec3 16 bytes (padded), but the listener orientation was passed to alListenerfv as reinterpret_cast<ALfloat const *>(glm::vec3[2]). With the padding the six floats OpenAL reads are at.x, at.y, at.z, PAD, up.x, up.y - the 'up' vector is taken from padding garbage, corrupting the listener basis (right = at x up) and swapping left/right of every positional sound. Build the 6 floats explicitly instead of reinterpreting a padded vec3 array.
OpenAL does not re-route on its own, so unplugging the active output device (e.g. headphones) mid-game left the sim silent until restart. Poll ALC_CONNECTED (ALC_EXT_disconnect) at ~1 Hz and, when the device is lost, reopen playback on the current default output via alcReopenDeviceSOFT, preserving the context and all sources. Tokens are declared locally since the bundled AL headers ship no alext.h; the entry point is resolved at runtime, so this is a no-op (with a log warning) on OpenAL Soft builds too old to provide ALC_SOFT_reopen_device.
ALC_MAJOR/MINOR_VERSION only report the OpenAL API spec level (always 1.1), which is misleading. Additionally log alGetString(AL_VERSION) (e.g. "1.1 ALSOFT 1.24.2") once a context is current, and relabel the spec line.
Refresh ref/openal with current OpenAL Soft headers: adds alext.h (ALC_SOFT extensions incl. reopen_device / system_events, ALC_CONNECTED, the EFX presets) and efx*.h, and updates al.h/alc.h. Enables the audio device-change following to build against native tokens instead of local fallbacks.
…nts) Replace the ~1 Hz poll (which relied on alcGetString(DEFAULT_ALL_DEVICES), whose value OpenAL caches and does not refresh on re-plug) with an alcEventCallbackSOFT handler for DEFAULT_DEVICE_CHANGED / DEVICE_REMOVED. The callback (possibly off-thread) just flags the change; update() reopens playback on the new default on the main thread. Now both unplugging and re-plugging the output are followed. Falls back to the ALC_CONNECTED poll when system_events is unavailable, and only chases the default when no device is pinned.
Now that ref/openal ships a current alext.h, include it and use the real LPALC*SOFT / ALCEVENTPROCTYPESOFT typedefs instead of hand-rolled function pointer types and #define'd ALC_* tokens. The event callback is marked ALC_APIENTRY + noexcept to match ALCEVENTPROCTYPESOFT. No behaviour change.
…ion-alignment Fix/audio listener orientation alignment
combolek
force-pushed
the
background-opacity
branch
from
July 6, 2026 00:20
fabc229 to
ad3e064
Compare
Embedded CPython builds sys.path from PYTHONHOME only. Unlike the python CLI it does not prepend the working directory, and unlike Windows' getpathp.c it does not add the executable's directory either, so on POSIX "from scripts import ..." (the asset-side scripts package used by texture and screen renderers) fails to import. Insert "." at the front of sys.path after interpreter init, matching how the engine resolves every other asset (relative to CWD). Idempotent and harmless on Windows.
scripting: make CWD-local packages importable in embedded Python
This is setting was available in the config file but it did not do anything. Wire it up to the window background opacity in uilayer.cpp. Also, change the default from 0.65f to 0.94f to match the previously hardcoded value.
combolek
force-pushed
the
background-opacity
branch
from
July 7, 2026 16:24
ad3e064 to
5fcf4c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is setting was available in the config file but it did not do anything. Wire it up to the window background opacity in uilayer.cpp.
Also, change the default from 0.65f to 0.94f to match the previously hardcoded value.