Commit graph

470 commits

Author SHA1 Message Date
toaster
8bd3786895 S_UpdateSoundTest: Add a "dotracks" parameter
- 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.
2023-03-28 13:06:39 +01:00
toaster
4f4976024c S_UpdateSoundTest: Corrections
- Fix inverted skipnull condition for forward sequence traversal
- Remove comment stating we used a naive implementation. The author of this commit used a triple pointer in the last one, this is anything but naive
2023-03-28 12:42:22 +01:00
toaster
90d5cb3752 S_PopulateSoundTestSequence: Sound Test sequence system
- 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
2023-03-28 01:41:53 +01:00
toaster
3d40e83700 S_SoundTestPlay: Exit early into S_SoundTestStop if current entry is NULL 2023-03-28 01:31:39 +01:00
toaster
8f592c196f Stereo mode
- 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.
2023-03-25 23:37:07 +00:00
toaster
afff038e34 s_sound.c: Only call P_RestoreMusic in GS_LEVEL
This function isn't supposed to be called outside of it
2023-03-25 22:43:54 +00:00
toaster
a0fa45bcec S_PlaysimMusicDisabled
Simplifies/unifies conditions that except regular music play other sections of the game can modify
2023-03-25 22:16:58 +00:00
toaster
62a573090b musicdef_t: Permit multiple tracks (music lumps) associated with the same entry
- Now supports "Lump MENU2,MENU3".
- Automagically appends (A) and (B) instead of having to user-specify them as part of the track name.
2023-03-23 20:08:44 +00:00
toaster
cb4d9b527e musicdef_t: Add hash field
Slight optimisation for S_FindMusicDef, but will net us some big wins with our next feature.
2023-03-22 23:34:01 +00:00
James R
253489b75c Merge branch 'vol-cvar-defaults' into 'master'
Normalize all volume scales to 0-100

See merge request KartKrew/Kart!1030
2023-03-12 03:50:57 +00:00
Eidolon
901ebdb5b0 Implement musicdef volume in new mixer 2023-03-09 15:12:24 -06:00
Eidolon
610351b872 Normalize all volume scales to 0-100 2023-03-08 15:22:29 -06:00
Sally Coolatta
82313de499 Awayview cleanup
- Moved variables to awayview_t
- Arbritrary +20 is no longer added to z pos, it will use the thing position as the camera position directly.
2023-03-03 16:09:54 -05:00
toaster
3cc00ee095 Command_Tunes_f: Additional functionality
- `tunes -show` now shows music_name rather than mapmusname
- `tunes -showdefault` does the previous mapmusname behaviour
2023-02-25 23:11:09 +00:00
wolfy852
29663c23d6 Fix tunes -default to use stored RNG value 2023-02-20 23:40:13 -06:00
James R
6480aced64 S_SetSfxVolume/S_SetMusicVolume: update static copy of volume
blame c9ad926e7
2023-02-14 04:56:42 -08:00
James R
c9ad926e76 Do not set cvars with S_SetSfxVolume or S_SetMusicVolume
Don't do this because in sdl/i_video.cpp,
S_InitMusicVolume is called to unmute music when the
window is refocused. Because I_StartupGraphics is called
before those cvars are added and it is an error to try to
set a cvar before it is added.
2023-02-14 04:17:04 -08:00
wolfy852
2c162b50a3 mapmusrng variable, proper sync, cleanup 2023-02-11 08:16:37 -06:00
wolfy852
53d301112e musname_size variable
Should prevent errors when only 2 music entries are defined
2023-02-08 23:12:41 -06:00
wolfy852
4af4a4e59f Correct a blatant lie in m_random.c, fix RNG range 2023-02-08 22:38:51 -06:00
wolfy852
e1927b693f Correct shadowed declaration and missing include 2023-02-08 22:23:54 -06:00
wolfy852
276cba4641 Basic alt music
mapheaderinfo's musname field is now a 2 dimensional array, it can take up to 3 tracks and will randomly select between them on level load.
2023-02-08 22:11:37 -06:00
toaster
e67fea3b84 s_sound.c - Add exceptions for demo.rewinding and demo.title to all new music setter functions introduced with 2.2 merge 2023-02-04 17:11:46 +00:00
toaster
57b22f32d5 M_PlayMenuJam
Pre-emptive work for more complicated menu music behaviour, permitting consistent implementation of the cycling music.
2023-02-01 22:12:41 +00:00
toaster
b6be0ef6e8 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into music-debug
# Conflicts:
#	src/audio/xmp.cpp
#	src/audio/xmp_player.cpp
#	src/sdl/new_sound.cpp
2023-01-22 15:20:14 +00:00
Oni
90274359db Merge branch 'magician-spectator' into 'master'
Heavy Magician adjustment

See merge request KartKrew/Kart!876
2023-01-22 01:59:48 +00:00
toaster
0606fb50ba S_StartSoundAtVolume, K_PlayPainSound, K_PlayHitEmSound: Use user skin for sounds instead of mobj skin
So we'll always hear the clips we pick for Heavy Magician
2023-01-21 12:58:06 +00:00
James R
da60f6ac1d Fix playsoundsifunfocused callback
Just a minor bug. If playsoundsifunfocused was changed
from "Yes" to "Yes" while the window is unfocused, then
sounds would stop briefly.
2023-01-12 19:00:13 -08:00
James R
4e51ad6c78 Add devmode music
Song: <NOTHING>

        Song:    DEMOZ
      Format:      OGG
      Volume:   50/100
      Loop A: 00:00.65
      Loop B: 01:06.00
     Elapsed: 01:09.00
2023-01-12 03:29:43 -08:00
James R
49c5c785bf Remove musictype_t, S_MusicType and I_SongType return implementation string
Lua API change: S_MusicType now returns string instead of number
2023-01-12 02:50:02 -08:00
James R
eb8d03f479 Do not disable and reenable sounds entirely when window focus changes
Sounds are not started if the window is unfocused,
regardless of sound_disabled.

Fixes -nosound not working (sounds would always be
reenabled if window comes into focus).
2023-01-11 18:22:06 -08:00
toaster
2fdf5de545 SetChannelsNum: Remove now-unused iterator variable 2023-01-06 11:58:42 +00:00
toaster
3e9231f658 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into drmemory-cleanup 2023-01-06 11:53:58 +00:00
toaster
59d8c540d1 SetChannelsNum: Callocate sound channels, don't mallocate them 2023-01-05 22:14:31 +00:00
James R
24e7e4231d Print musicdef along with tunes -show 2023-01-04 23:38:59 -08:00
James R
0bf821447e Add S_FindMusicDef, function to find musicdef by name
Use this function wherever the musicdef list is walked.
2023-01-04 23:34:45 -08:00
toaster
17dd15b998 "Special Mode" (Sealed Stars) and "Versus Mode" (bosses) are now gametypes
* The existing structs are now exclusively for handling extra data.
    * `specialStage` has been renamed to `specialstageinfo`, to reflect that it is not the sole arbiter.
    * `specialstageinfo.valid` and `bossinfo.valid` are what must be checked before grabbing data from either struct.
        * These are turned on when the gametype extra data is successfully initialised, not on map start.
            * `K_InitBossHealthBar(...)` for `bossinfo.valid`
            * `K_InitSpecialStage(void)` for `specialstageinfo.valid`
        * `K_CanChangeRules(...)` no longer checks these
    * No longer uses duplicate encore information.
* The map command (and -warp) now guesses gametype using a general `G_GuessGametypeByTOL(UINT32)` function
    * Grabs the first gametype with an overlap between the requested TOL and the gametype's TOL.
* The cool Versus-specific intro is now checked via `K_CheckBossIntro()`.
2022-12-26 23:06:24 +00:00
toaster
ac423b3461 Further changes to musicdef based on discussion with Gunla
- 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
2022-12-17 17:36:44 +00:00
toaster
81fec17bb4 First Musicdef changes in preparation for music test
- Add `title` field, to permit seperation from `source`
- Store current displayed string as zone memory, to prevent repeated recalculation
2022-12-17 16:39:10 +00:00
James R
479f9e4d57 S_ReducedVFXSoundAtVolume: use player_t* 2022-11-27 17:27:22 -08:00
Sally Coolatta
e331910fe3 Reduce VFX toggle
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
2022-11-26 20:12:00 -05:00
toaster
ff629a4c78 Merge branch 'kill-nonet' into 'master'
Kill last of NONET, DJGPP (DOS), WATTCP (also DOS?), _WINDOWS (DirectDraw)

See merge request KartKrew/Kart!704
2022-09-26 17:02:55 +00:00
Sal
8850432c79 Merge branch 'big-large-map-markers' into 'master'
Long map markers

See merge request KartKrew/Kart!327
2022-09-25 17:02:13 +00:00
James R
d970c9198b Let S_StopSound, S_StopSoundByID, S_StopSoundByNum stop multiple sounds
Previously stopped only one, probably the first that
started playing.
2022-09-25 04:39:42 -07:00
James R
89abbd33b4 Kill last of DJGPP, WATTCP, _WINDOWS (ol' DirectDraw) 2022-09-24 19:43:44 -07:00
toaster
1a284ec7c6 Merge branch 'master' of https://git.do.srb2.org/KartKrew/Kart into big-large-map-markers
# Conflicts:
#	src/d_netcmd.c
2022-09-17 13:57:26 +01:00
VelocitOni
8a5707ad83 Merge branch 'master' into hostcode 2022-09-13 17:08:15 -04:00
Sal
94d7c497b0 Merge branch 'hooklib-port' into 'master'
Hooklib refactor ported and (mostly) squashed

See merge request KartKrew/Kart!662
2022-09-11 06:30:07 +00:00
Sally Coolatta
2fddc9f343 Merge branch 'master' into big-large-map-markers 2022-09-10 16:01:02 -04:00
James R
37c3a55dda Fix conflicts 522467a88 2022-09-05 11:56:30 -07:00