Merge d3music module into Descent3

Simplify project layout, minor cleanup.
This commit is contained in:
Azamat H. Hackimov 2024-07-27 23:28:25 +03:00
parent e93a8bfc0e
commit 73d4853505
6 changed files with 6 additions and 23 deletions

View File

@ -191,7 +191,6 @@ add_subdirectory(2dlib)
add_subdirectory(AudioEncode)
add_subdirectory(bitmap)
add_subdirectory(cfile)
add_subdirectory(d3music)
add_subdirectory(ddebug)
if(BUILD_EDITOR AND CMAKE_SYSTEM_NAME STREQUAL "Windows")

View File

@ -220,6 +220,7 @@ set(CPPS
multi_save_setting.cpp
multi_server.cpp
multi_ui.cpp
d3music.cpp
NewPyroGauges.cpp
newui.cpp
newui_core.cpp
@ -296,7 +297,7 @@ file(GLOB_RECURSE INCS "../lib/*.h")
add_executable(Descent3 WIN32 ${HEADERS} ${CPPS} ${INCS} ${MANIFEST})
target_link_libraries(Descent3 PRIVATE
2dlib AudioEncode bitmap cfile d3music dd_video ddebug ddio libmve libacm
2dlib AudioEncode bitmap cfile dd_video ddebug ddio libmve libacm
fix grtext manage mem misc model module movie stream_audio linux SDL2::SDL2
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
${PLATFORM_LIBS})

View File

@ -18,16 +18,6 @@
#include "d3music.h"
#include "music.h"
#include "Macros.h"
#include <limits>
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
// generic constants
#define MUSIC_IDLE_TIME 240.0f // how many seconds before background music silences.
@ -150,7 +140,7 @@ void D3MusicDoFrame(tMusicSeqInfo *music_info) {
// toggle music system.
void D3MusicToggle() {
Music_on = (!Music_on && Allow_music && Music_volume > 0.0f) ? true : false;
Music_on = (!Music_on && Allow_music && Music_volume > 0.0f);
if (Music_on) {
Music_seq.Start();
MusicAI.was_toggled_on = true;

View File

@ -74,7 +74,7 @@
#ifndef D3MUSIC_H
#define D3MUSIC_H
#include "pstypes.h"
#include <cstdint>
// register constants for the sequencer
#define MUSICREG_TRIGGER_VALUE 1 // trigger value set by calling app to sequencer

View File

@ -1,8 +0,0 @@
set(HEADERS)
set(CPPS
musicapi.cpp)
add_library(d3music STATIC ${HEADERS} ${CPPS})
target_link_libraries(d3music PRIVATE
music
)

View File

@ -366,6 +366,7 @@ set(SOURCE
../descent3/multi_save_setting.cpp
../descent3/multi_server.cpp
../descent3/multi_ui.cpp
../Descent3/d3music.cpp
../descent3/NewPyroGauges.cpp
../descent3/newui.cpp
../descent3/newui_core.cpp
@ -573,7 +574,7 @@ target_compile_definitions(Descent3Editor PUBLIC _AFXDLL EDITOR)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_STANDARD} /Zc:forScope-")
target_link_libraries(Descent3Editor PRIVATE
2dlib AudioEncode bitmap cfile d3music dd_video ddebug ddio libmve libacm
2dlib AudioEncode bitmap cfile dd_video ddebug ddio libmve libacm
fix grtext manage mem misc model module movie stream_audio
music networking physics renderer rtperformance sndlib ui unzip vecmat md5
${PLATFORM_LIBS})