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

Angelscript audio bindings #3027

Merged
merged 8 commits into from
May 3, 2023

Commits on Mar 20, 2023

  1. AngelScript: initial soundscript bindings: enums + SoundScriptTemplate

    Currently dummy, just tested to build and run OK.
    ohlidalp committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    740e2de View commit details
    Browse the repository at this point in the history
  2. AngelScript: added SoundClass binding

    Still dummy, just tested to build + run OK
    ohlidalp committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    67bbb72 View commit details
    Browse the repository at this point in the history
  3. Codechange: soundscripts - removed dead argument in createInstance()

    The argument was used by 'TerrainObjectManager.cpp' but had no effect and the positioning and starting of the sound is done there anyway.
    
    Also clarified what happens with `actor_id` attribute if the sound isn't created for an actor.
    ohlidalp committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    855bbeb View commit details
    Browse the repository at this point in the history
  4. AngelScript: added SoundScriptInstanceClass binding

    Still dummy, just tested to build + run OK
    ohlidalp committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    ecfb928 View commit details
    Browse the repository at this point in the history
  5. AngelScript: working audio bindings + demo script 🔉

    New objects: `SoundClass`, `SoundScriptTemplateClass`, `SoundScriptInstanceClass`
    New enums: `SoundTrigger`, `ModulationSource`
    
    The principal interface is in the `GameScriptClass` (global object `game`):
    
    ```
    array<SoundScriptTemplateClass@>@ getAllSoundScriptTemplates()
    SoundScriptTemplateClassPtr@ getSoundScriptTemplate(const string &in)
    array<SoundScriptInstanceClass@>@ getAllSoundScriptInstances()
    SoundClassPtr@ createSoundFromResource(const string &in filename, const string &in rg_name = string())
    SoundScriptInstanceClassPtr@ createSoundScriptInstance(const string &in template, int actor_instance_id = -1)
    ```
    ohlidalp committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    7fc0bb7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    ecf0cae View commit details
    Browse the repository at this point in the history
  7. AngelScript audio bindings: finishing touches

    - Fixed script audio not being audible after returning to menu
    - Fixed SoundClass and SoundScriptInstanceClass having different functions to set position/velocity.
    - Fixed 'demo_script.as' always playing sounds/soundscripts at <0 0 0> corner of the map
    - Added "sound follows player" checkbox to 'demo_script.as'
    ohlidalp committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    a36f4cb View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    94c1cd9 View commit details
    Browse the repository at this point in the history