The source project of this merge request has been removed.
Expose most of the music handler to Lua
This exposes several music functions to Lua, while also enabling modders to add their own custom tune IDs.
Music system changes
Tunes can now be added via the Music_AddTune function. A set of tune flags can be passed to the function to assign various values on creation of a tune:
TN_LOOPINGTN_INCLUSIVEFADETN_USEMAPVOLUMETN_SYNCMUSICTN_MUSICCREDTN_VAPESTN_NIGHTCOREABLE-
TN_CHANGEPITCH(combination ofTN_VAPESandTN_NIGHTCOREABLE)
A Music_SetFadeIn function has been added to the music framework, allowing for an easy way to set a tune's fade-in.
Example
I've created a Lua file that serves as a basic test for the music functions, playing existing base-game music.
Everything has been tested in a Windows build. Both the Developer and Release presets have been used.
Edited by Cheariisan