Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added water options to 'TopMenubar/Settings' menu. #3142

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Commits on Sep 1, 2024

  1. Configuration menu
    Copy the full SHA
    c5a8104 View commit details
    Browse the repository at this point in the history
  2. Codechange: Clarified HydraX module type config

    The module type isn't configurable, it's hardcoddd in hydrax setup - file 'HydraxWater.cpp', function `InitHydrax()`.
    
    The corresponding dummy line was removed from file 'HydraxDefault.hdx' and the check for it's presence was removed from file 'hydrax/Module.cpp'
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    359cfdc View commit details
    Browse the repository at this point in the history
  3. Bugfix: Hydrax - never set foam params on MAT_UNDERWATER

    Most occurences are long commented out, but this one slipped because nobody called that function until I started working on diag. UI.
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    b4e205d View commit details
    Browse the repository at this point in the history
  4. 🎮 Added hydrax settings to TopMenubar UI.

    This version is based on HydraX hardcoded defaults, but needs to be adjusted based on RoR's defaults.
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    9c79b06 View commit details
    Browse the repository at this point in the history
  5. 🎮 Adjusted Topmenubar water sliders to sensible values.

    Also cleaned up code and fixed a bug in Terrain.cpp - game would crash if other Water mode than HydraX was selected.
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    287178d View commit details
    Browse the repository at this point in the history
  6. 🎮 Water type + Waves are now selectable in top menubar.

    Codechanges:
    * DustPool.cpp - // Make sure water wasn't disabled in Top menubar - if yes, just drop the particle.
    * Water.cpp - just code cleanup actually - to clarify the water plane is the same with or without waves - so they can safely be toggled ad-hoc.
    * GUIUtils - DrawGCombo() now returns bool - true if value changed.
    * GUI_TopMenubar.cpp - change cvar `gfx_water_mode` and run `Terrain::reInitWater()`
    * Terrain - added function `reInitWater()`
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    b829e54 View commit details
    Browse the repository at this point in the history
  7. 🐛 Fixed Basic water glitching out under Debug

    uninitialized variable :/
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    ca1f6e0 View commit details
    Browse the repository at this point in the history
  8. Fixed basic water not appearing when toggled via TopMenubar.

    Uninitialized variables `m_cam_forced`* :/
    
    I cleaned up the variable init, using in-class initializers for all.
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    245e93e View commit details
    Browse the repository at this point in the history
  9. Water settings in top menu now work (except HydraX the 2nd time)

    Summary of changes:
    * introduced ✉️ `MSG_SIM_REINIT_WATER_REQUESTED` - Request restarting water subsystem based on cvar 'gfx_water_mode'; sent by TopMenubar UI, also accepted from scripts via `game.pushMessage()`.
    * HydraX resources are now loaded each time.
    * Removed all direct interaction with HydraX - both classic water (Water.cpp, `class Water`) and HydraX water (HydraxWater.cpp, `class HydraxWater`) are now controlled exclusively via interface `IWater` - see comments in file 'IWater.h'
    * Added 'active_water_mode' field to `IWater` - because the cvar 'gfx_water_mode' can now change anytime.
    ohlidalp committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    6d944bb View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    dc33d4c View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6c53409 View commit details
    Browse the repository at this point in the history