- cursongcredit behaves the same as before
- Always compose song credit string
- g_realsongcredit always stores the song credit for the
current music, even if no song credit is displayed on
the HUD
Master volume should control after-mixing gain; the idea is the mixed
output of sfx and music's amplitude should never exceed
`cv_mastervolume`. Setting each submixer's gain independently will
still allow the master mixer to exceed that preferred volume, which was
the main issue with the SDL_Mixer backend. So, instead we use a separate
gain control that is applied after everything is mixed.
- POSITION!! music and the standard course track is always visible.
- Alt Music is hidden behind the relevant SECRET_ALTMUSIC.
- Associated music requires you to beat the level to listen.
This basically came to me in a dream, who am I to look the horse in its mouth
- Press to start a shuffled sequence, losing your current position in the autosequence.
- Press again to disable, but keep your current track.
- Adjust horizontal offset of Stereo buttons slightly.
- More judiciously comment Sound Test functionality, to assist future maintainers.
- No need to call CV_RegisterVar
- Cvar definitions live in only one file, easier to locate
- Organized into sections -- netvars, cheats, etc.
- Use builder pattern to initialize cvars
- Still need to extern if you want to read the cvar value
(This commit does not compile. Sound test and tunes
command code needs to be ported after this.)
This is a big one. Here's the rundown:
The old music system was very direct, much of the time
just a proxy to the real sound API in i_sound.h.
You could change the music on command, but there wasn't
a consistent way to prevent some music from playing over
others. P_RestoreMusic is one example of needing to
address this problem. The jingles system was intended as
another solution. Furthermore, sound test (Stereo) has its
own needs.
I am removing all of that. Music handling in general is
now a very deliberate system, kind of similar to jingles.
In the new system, "tunes" are registered. The tune stores
info such as whether it should loop or fade out. Most of
the configuration is intended to be initialized only ONCE.
Tunes can be mapped to an actual music lump. They can be
remapped at any time too.
Tunes are also configured with a priority number. This
determines which tune is heard, if multiple are supposed
to be playing at a time. You can even tell a tune how long
it should play, so it's unnecessary to track this with
bespoke timers.
- Introduce comments to make flow understandable.
- Abstract the number of seconds in the fade out (previously handled across multiple places) into SOUNDTEST_FADEOUTSECONDS.
- Make all next/conclude song cases for autosequence and non-looping track handled in one place.
- Fixes the case where a non-looping track could stop the Sound Test even in autosequence mode.
- Shown on the menu
- soundtest.autosequence
- Plays all songs in sequence, skipping over the soundtest entry.
- Plays each looping song twice (and fades out if it's the last one in the musicdef's tracks)
- Plays non-looping songs once with no fade ever
- Disabled when S_SoundTestStop called
- Songs that end outside of autosequence will now stop the visible Playing.
- Use LSTitleHighString at the top of the menu for the music's title/Sound Test
- Only show Track for relevant entries
- Show cv_soundtest.value in hex for that Classic Sonic soundtest flavour
- Buttons have been implemented.
- They push down when you press an input.
- FUTURE WORK: Back doesn't get the opportunity to do so. Delay the exit of this menu?
- Certain ones have special properties.
- PLAY locks down when playing and not paused
- PAUSE locks down when playing and paused
- TRACK is a wheel/slidery thing
- BACK should get pressed when you're exiting (see previous FUTURE WORK)
- FUTURE WORK: The detection of these currently uses magic numbers.
- The Stereo itself is now drawn.
- FUTURE WORK: The screen's contents are still the testing visuals.
musicdef -volume <volume> changes the volume of the
currently playing song. The change persists through song
changes and is visible with devmode music.
musicdef -show prints all changed musicdef volumes.
The intention of this command is to allow editing music
volumes quickly in game, without having to quit, edit
music.pk3, and reopen the game.
- Integrates the maps with multiple tracks into the Next/Prev sequence, if true.
- For testing, currently active - but I may add features later that would be more fitting.
- Called on game start and file add
- Creates a seperate linked list sequence for map-related order
- All tracks without associated map in level order
- All tracks with maps in a cup in cup order
- All tracks with maps in Lost and Found
- Minimum viable implementation
- New horizontal menu
- FUTURE WORK: visuals are extremely basic
- Accessible from both Extras and in-game Pause if SECRET_SOUNDTEST is unlocked
- Rather than the Shadow-the-Hedgehog style free select of SRB2's Sound Test, it's a Best Of The Hacks And Fan Music Sega CD player.
- Back
- Exit menu
- Stop
- Stops Stereo music entirely
- Pause
- Pauses Stereo music without losing place in sequence
- FUTURE WORK: This should probably just pause the actual player ala minimised viewport
- Play
- Begins Stereo music on non-NULL musicdef entry
- Track
- For NULL soundtest entry:
- Switches between sfx
- For musicdefs with multiple tracks:
- Switches between them
- Prev and Next
- Changes musicdef entry
- FUTURE WORK: This is extremely naive and doesn't respect the following
- Cup order
- Unlocks
- Overrides all game-requested music changes when in Play or Pause mode
- This makes it an actual fun in-game feature as a menuification of the `tunes` command, not just a pure novelty.
- Add "author" and "originalcomposers" fields
- "author" is for remixes and original compositions, can be ommitted
- "originalcomposers" will not be visible mid-game, but will be visible in music test. Stores original sound team info
- Store all strings as Zone memory instead of static arrays, since not every field will be relevant for every track
All typedefs for structs that were present in other header
files have been moved to here. (Except node_t because the
renderer and netcode both define node_t LOL.)
Can be used to disable VFX, so it can only appear if its owner is a display player. If no owner is provided, then it will be removed entirely.
Applied to most things that Ivo asked for
commit 8d382e49fb3411cad1a3ef5ee1e546030c3a9d93
Author: James R <justsomejames2@gmail.com>
Date: Tue Nov 17 04:14:45 2020 -0800
Big Large Lua Hooklib Refactor
* Hooks are no longer a mess of lua boiler plate. Helper functions reduce hooks
to, at the most basic level, only two calls.
* Lua tables (the array part) are used to index hooks. Such tables contain only
hooks of the same type.
* Hook types are defined in one place so you no longer need to sync up the enum
and name array.
commit 3f7c2ae0b0c450cb8993ffe7664ead05fd9f5000
Author: James R <justsomejames2@gmail.com>
Date: Thu Dec 10 05:39:53 2020 -0800
Avoid using multiple tables to fetch hook
String hooks still use a table to fetch the id, but the id indexes a C array.
Also I fixed a missing call in the MusicChange hook.
commit dbd8903a538e7b87061795ce27ec5c72c26743af
Author: James R <justsomejames2@gmail.com>
Date: Thu Dec 10 08:50:23 2020 -0800
Use ref for pushing error handler
commit 9ddeb5f5896de0407b2b6fce8c949295a9e6d5e4
Author: James R <justsomejames2@gmail.com>
Date: Sat Dec 12 02:05:21 2020 -0800
Resolve GameQuit hook conflicts
commit 93e4f43e4b3a24fc2d8032e8730cbf427e75b297
Author: James R <justsomejames2@gmail.com>
Date: Sat Dec 12 03:06:57 2020 -0800
Hooklib macros names -> uppercase + documentation
commit 80fe39bbd1433c91131d2cdb36ba709f37d3b5f3
Author: Steel Titanium <steeltitanium1@gmail.com>
Date: Mon May 3 01:40:02 2021 -0400
Fix MusicChange hook not returning some values correctly
commit 46ca9613c68422a26910cbb034a9f3e004a967c3
Author: James R <justsomejames2@gmail.com>
Date: Thu Jun 10 18:09:39 2021 -0700
Pop hook id fetched from table
commit a75d4a1c360874a3c301a494e38ea49cd89b6616
Author: James R <justsomejames2@gmail.com>
Date: Tue Jul 6 18:42:08 2021 -0700
Automatically count hook values
commit 331329306cad257d52f84e47a92d9214d9eaa8d3
Author: James R <justsomejames2@gmail.com>
Date: Tue Jul 6 19:12:47 2021 -0700
Refactor hook ref allocation
commit ae57b6ca8664e00ff4d9544339dbf29a41138040
Author: James R <justsomejames2@gmail.com>
Date: Tue Jul 6 20:23:38 2021 -0700
MORE MACROS
I just can't stop myself!
commit b4fa98d2fbab180f487ce3efedb8ab715e5f3390
Author: James R <justsomejames2@gmail.com>
Date: Wed Jul 7 00:23:51 2021 -0700
Refactor hudlib hooks to hooklib
HUD hooks now meet the standard of hooklib. HUD registry
magic numbers are gone.
HUD hooks may also be added using addHook.
addHook('HUD', fn[, type])
hud.add still exists, but the intention is to remove it
eventually.
commit cb619fad5d762ba8d8dd20e9a979a04ced7c943f
Author: SMS Alfredo <65426124+SMS-Alfredo@users.noreply.github.com>
Date: Wed Jul 7 19:57:28 2021 -0500
Rebase on !1307
commit f271f88c7f3084523a03ca7f47060d6527724796
Author: LJ Sonic <lamr@free.fr>
Date: Sun Dec 5 17:59:33 2021 +0100
Fix MusicChange hook crashing when called
BRUH MOMENT BRUH MOMENT
PREPARE THE HALL OF SHAME
commit 0a0c17da7c793ec29e80c5bdaa66b02da0884078
Author: James R <justsomejames2@gmail.com>
Date: Tue Feb 1 02:27:27 2022 -0800
PARANOIA: I_Error if mobj hook is called with MT_NULL
commit 86336d6bed80bee6f8168078aa8856109091e50f
Author: katsy <katmint@live.com>
Date: Mon Mar 7 18:33:15 2022 -0600
remove MODID check from hooklib to fix compile issue