From 2cf9a4a6261bfcfa5846a922206440a474f91eb3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 18 Dec 2019 22:32:09 +0100 Subject: [PATCH] - removed leftpver music calls as well. The code should now be free of the old audio backend. --- source/CMakeLists.txt | 25 ------------------------- source/blood/src/blood.cpp | 4 ---- source/blood/src/demo.cpp | 2 -- source/blood/src/sound.cpp | 1 - source/duke3d/src/duke3d.h | 1 - source/duke3d/src/premap.cpp | 2 -- source/duke3d/src/screens.cpp | 2 -- source/rr/src/duke3d.h | 1 - source/rr/src/game.cpp | 1 - source/rr/src/premap.cpp | 2 -- source/rr/src/screens.cpp | 8 ++------ source/sw/src/anim.cpp | 1 - source/sw/src/d_menu.cpp | 1 - source/sw/src/game.cpp | 1 - source/sw/src/menus.cpp | 1 - source/sw/src/player.cpp | 6 +++--- source/sw/src/save.cpp | 2 -- source/sw/src/setup.cpp | 1 - source/sw/src/sounds.cpp | 2 -- 19 files changed, 5 insertions(+), 59 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 88d0b8e1c..0a0b9de86 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -476,7 +476,6 @@ endif() # Start defining source files for Demolition set( PLAT_WIN32_SOURCES - audiolib/src/driver_directsound.cpp glad/src/glad_wgl.c platform/win32/winbits.cpp platform/win32/i_specialpaths.cpp @@ -489,8 +488,6 @@ set( PLAT_WIN32_SOURCES ) set( PLAT_POSIX_SOURCES - #audiolib/src/driver_sdl.cpp - #audiolib/src/sdlmusic.cpp #platform/gtk/startgtk.game.cpp ) @@ -605,8 +602,6 @@ add_definitions(-DOPNMIDI_DISABLE_GX_EMULATOR) # Project files should be aware of the header files. We can GLOB these since # there's generally a new cpp for every header so this file will get changed file( GLOB HEADER_FILES - audiolib/include/*.h - audiolib/src/*.h build/include/*.h glad/include/glad/*.h glad/include/Khr/*.h @@ -666,22 +661,6 @@ set( FASTMATH_SOURCES set (PCH_SOURCES - audiolib/src/drivers.cpp - audiolib/src/driver_adlib.cpp - audiolib/src/driver_sdl.cpp - audiolib/src/driver_winmm.cpp - audiolib/src/formats.cpp - audiolib/src/fx_man.cpp - audiolib/src/gmtimbre.cpp - audiolib/src/midi.cpp - audiolib/src/mix.cpp - audiolib/src/mixst.cpp - audiolib/src/multivoc.cpp - audiolib/src/music.cpp - audiolib/src/opl3.cpp - audiolib/src/pitch.cpp - audiolib/src/vorbis.cpp - glbackend/gl_hwtexture.cpp glbackend/gl_samplers.cpp glbackend/gl_shader.cpp @@ -887,7 +866,6 @@ target_link_libraries( demolition ${DEMOLITION_LIBS} gdtoa lzma duke3d blood rr include_directories( ${CMAKE_CURRENT_SOURCE_DIR} build/include - audiolib/include glad/include libxmp-lite/include libxmp-lite/include/libxmp-lite @@ -1019,9 +997,6 @@ source_group("Code\\Sound" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/comm source_group("Code\\Sound\\Backend" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/sound/backend/.+") source_group("Code\\DObject" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/dobject/.+") source_group("Code\\Menu" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/common/menu/.+") -source_group("Utility\\Audiolib" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/audiolib/.+") -source_group("Utility\\Audiolib Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/audiolib/include/.+") -source_group("Utility\\Audiolib Sources" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/audiolib/src/.+") source_group("Utility\\Glad" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/glad/.+") source_group("Utility\\Glad Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/glad/include/glad/.+") source_group("Utility\\Glad Khr Headers" REGULAR_EXPRESSION "^${CMAKE_CURRENT_SOURCE_DIR}/glad/include/Khr/.+") diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 7961b6b20..1873485cb 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -49,7 +49,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "loadsave.h" #include "gamemenu.h" #include "mirrors.h" -#include "music.h" #include "network.h" #include "osdcmds.h" #include "replace.h" @@ -402,8 +401,6 @@ void PreloadCache(void) if (r_precache) PrecacheHardwareTextures(i); #endif - MUSIC_Update(); - if ((++cnt & 7) == 0) gameHandleEvents(); @@ -1249,7 +1246,6 @@ RESTART: { handleevents(); netUpdate(); - MUSIC_Update(); inputState.SetBindsEnabled(gInputMode == kInputGame); switch (gInputMode) { diff --git a/source/blood/src/demo.cpp b/source/blood/src/demo.cpp index 2d50af750..52291ce88 100644 --- a/source/blood/src/demo.cpp +++ b/source/blood/src/demo.cpp @@ -39,7 +39,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "levels.h" #include "messages.h" #include "misc.h" -#include "music.h" #include "network.h" #include "player.h" #include "screen.h" @@ -310,7 +309,6 @@ _DEMOPLAYBACK: while (at1 && !gQuitGame) { handleevents(); - MUSIC_Update(); while (totalclock >= gNetFifoClock && !gQuitGame) { if (!v4) diff --git a/source/blood/src/sound.cpp b/source/blood/src/sound.cpp index 0e7b6e10c..4a8d9a0c3 100644 --- a/source/blood/src/sound.cpp +++ b/source/blood/src/sound.cpp @@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "build.h" #include "compat.h" -#include "music.h" #include "common_game.h" #include "config.h" #include "levels.h" diff --git a/source/duke3d/src/duke3d.h b/source/duke3d/src/duke3d.h index fb1fd4005..d8c4dc5de 100644 --- a/source/duke3d/src/duke3d.h +++ b/source/duke3d/src/duke3d.h @@ -118,7 +118,6 @@ EDUKE32_STATIC_ASSERT(7 <= MAXTILES-MAXUSERTILES); #include "global.h" #include "inv.h" #include "macros.h" -#include "music.h" #include "namesdyn.h" #include "network.h" #include "player.h" diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index 62a75daa4..9955543d4 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -468,8 +468,6 @@ void G_CacheMapData(void) if (r_precache) PrecacheHardwareTextures(i); #endif - MUSIC_Update(); - if ((++cnt & 7) == 0) gameHandleEvents(); } diff --git a/source/duke3d/src/screens.cpp b/source/duke3d/src/screens.cpp index 8be60fbb5..f1fc6e59e 100644 --- a/source/duke3d/src/screens.cpp +++ b/source/duke3d/src/screens.cpp @@ -2055,7 +2055,6 @@ void G_BonusScreen(int32_t bonusonly) while (totalclock < TICRATE*10) { gameHandleEvents(); - MUSIC_Update(); if (G_FPSLimit()) { @@ -2099,7 +2098,6 @@ void G_BonusScreen(int32_t bonusonly) int32_t yy = 0, zz; gameHandleEvents(); - MUSIC_Update(); if (G_FPSLimit()) { diff --git a/source/rr/src/duke3d.h b/source/rr/src/duke3d.h index ec950d659..b5b3eed2d 100644 --- a/source/rr/src/duke3d.h +++ b/source/rr/src/duke3d.h @@ -122,7 +122,6 @@ END_RR_NS #include "global.h" #include "inv.h" #include "macros.h" -#include "music.h" #include "namesdyn.h" #include "net.h" #include "player.h" diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index aaecbfdba..f5afca3d9 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -7568,7 +7568,6 @@ MAIN_LOOP_RESTART: else #endif { - MUSIC_Update(); G_HandleLocalKeys(); } diff --git a/source/rr/src/premap.cpp b/source/rr/src/premap.cpp index ad24d7475..bbaea8ba2 100644 --- a/source/rr/src/premap.cpp +++ b/source/rr/src/premap.cpp @@ -629,8 +629,6 @@ void G_CacheMapData(void) } else continue; - MUSIC_Update(); - if ((j&7) == 0) G_HandleAsync(); diff --git a/source/rr/src/screens.cpp b/source/rr/src/screens.cpp index 946f581c8..29ddccd1a 100644 --- a/source/rr/src/screens.cpp +++ b/source/rr/src/screens.cpp @@ -2074,7 +2074,6 @@ void G_BonusScreen(int32_t bonusonly) while (totalclock < TICRATE*10) { G_HandleAsync(); - MUSIC_Update(); if (G_FPSLimit()) { @@ -2139,7 +2138,6 @@ void G_BonusScreen(int32_t bonusonly) int32_t yy = 0, zz; G_HandleAsync(); - MUSIC_Update(); if (G_FPSLimit()) { @@ -2619,7 +2617,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) if ((ud.eog == 0 || ud.volume_number != 1) && ud.volume_number <= 1) { showMap = 1; - MUSIC_StopSong(); + Mus_Stop(); inputState.keyFlushChars(); P_SetGamePalette(g_player[myconnectindex].ps, BASEPAL, 8+2+1); @@ -2658,7 +2656,6 @@ void G_BonusScreenRRRA(int32_t bonusonly) while (totalclock < TICRATE*10) { G_HandleAsync(); - MUSIC_Update(); if (G_FPSLimit()) { @@ -2709,7 +2706,6 @@ void G_BonusScreenRRRA(int32_t bonusonly) int32_t yy = 0, zz; G_HandleAsync(); - MUSIC_Update(); if (G_FPSLimit()) { @@ -2726,7 +2722,7 @@ void G_BonusScreenRRRA(int32_t bonusonly) if (bonuscnt == 7) { bonuscnt++; - MUSIC_StopSong(); + Mus_Stop(); G_PlayMapAnim(); break; } diff --git a/source/sw/src/anim.cpp b/source/sw/src/anim.cpp index ef19588c6..7c17b2dba 100644 --- a/source/sw/src/anim.cpp +++ b/source/sw/src/anim.cpp @@ -30,7 +30,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "keys.h" #include "mytypes.h" -#include "music.h" #include "gamedefs.h" #include "config.h" diff --git a/source/sw/src/d_menu.cpp b/source/sw/src/d_menu.cpp index 80b2c9ce2..f725c8d8c 100644 --- a/source/sw/src/d_menu.cpp +++ b/source/sw/src/d_menu.cpp @@ -43,7 +43,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. #include "gamedefs.h" #include "config.h" #include "network.h" -#include "music.h" #include "text.h" #include "version.h" #include "network.h" diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 4068507d3..1e9a738cc 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -84,7 +84,6 @@ Things required to make savegames work: #include "track.h" #include "jsector.h" #include "text.h" -#include "music.h" #include "common.h" #include "common_game.h" diff --git a/source/sw/src/menus.cpp b/source/sw/src/menus.cpp index eb1c71ec0..81e11b632 100644 --- a/source/sw/src/menus.cpp +++ b/source/sw/src/menus.cpp @@ -49,7 +49,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "gamedefs.h" #include "config.h" #include "network.h" -#include "music.h" #include "text.h" #include "version.h" #include "network.h" diff --git a/source/sw/src/player.cpp b/source/sw/src/player.cpp index bb05c60da..02d4d3940 100644 --- a/source/sw/src/player.cpp +++ b/source/sw/src/player.cpp @@ -59,12 +59,12 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "sector.h" #include "actor.h" #include "colormap.h" -#include "music.h" #include "vis.h" #include "track.h" #include "interp.h" #include "menu/menu.h" #include "gstrings.h" +#include "z_music.h" BEGIN_SW_NS @@ -7856,14 +7856,14 @@ void PauseMultiPlay(void) SavePrediction = PredictionOn; PredictionOn = FALSE; - MUSIC_Pause(); + Mus_SetPaused(true); } else { PredictionOn = SavePrediction; - MUSIC_Continue(); TRAVERSE_CONNECT(p) pClearTextLine(Player + p, 100); + Mus_SetPaused(false); } } } diff --git a/source/sw/src/save.cpp b/source/sw/src/save.cpp index 830ea5463..d9093e1a3 100644 --- a/source/sw/src/save.cpp +++ b/source/sw/src/save.cpp @@ -48,8 +48,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms //#define FILE_TYPE 1 #include "mfile.h" -#include "music.h" - #include "weapon.h" #include "cache.h" #include "colormap.h" diff --git a/source/sw/src/setup.cpp b/source/sw/src/setup.cpp index 824c57412..fe8e17c1d 100644 --- a/source/sw/src/setup.cpp +++ b/source/sw/src/setup.cpp @@ -30,7 +30,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "game.h" #include "mytypes.h" -#include "music.h" #include "gamedefs.h" #include "config.h" diff --git a/source/sw/src/sounds.cpp b/source/sw/src/sounds.cpp index ebb5afed0..e72945245 100644 --- a/source/sw/src/sounds.cpp +++ b/source/sw/src/sounds.cpp @@ -32,8 +32,6 @@ Prepared for public release: 03/28/2005 - Charlie Wiederhold, 3D Realms #include "names2.h" #include "mytypes.h" -#include "music.h" -#include "al_midi.h" #include "gamedefs.h" #include "config.h"