mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-17 01:21:12 +00:00
Remove DOGG compile time option.
Having OGG optional only complicates things and is unnecessary now that the dependencies to libvorbis and libogg are gone.
This commit is contained in:
parent
c4bdea4321
commit
0264c6d946
16 changed files with 5 additions and 75 deletions
|
@ -37,7 +37,6 @@ string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
|
|||
|
||||
# yquake2 compilation options
|
||||
option(ZIP_SUPPORT "ZIP support" ON)
|
||||
option(OGG_SUPPORT "OGG Vorbis playback support (Music)" ON)
|
||||
option(OPENAL_SUPPORT "OpenAL support" ON)
|
||||
option(SYSTEMWIDE_SUPPORT "Enable systemwide installation of game assets" OFF)
|
||||
|
||||
|
@ -102,10 +101,6 @@ if(${ZIP_SUPPORT})
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(${OGG_SUPPORT})
|
||||
add_definitions(-DOGG)
|
||||
endif()
|
||||
|
||||
if(${OPENAL_SUPPORT})
|
||||
find_package(OpenAL)
|
||||
|
||||
|
|
12
Makefile
12
Makefile
|
@ -25,10 +25,6 @@
|
|||
# User configurable options
|
||||
# -------------------------
|
||||
|
||||
# Enables OGG/Vorbis support. OGG/Vorbis files can be
|
||||
# used as a substitute of CD audio playback.
|
||||
WITH_OGG:=yes
|
||||
|
||||
# Enables the optional OpenAL sound system.
|
||||
# To use it your system needs libopenal.so.1
|
||||
# or openal32.dll (we recommend openal-soft)
|
||||
|
@ -337,10 +333,6 @@ build/client/%.o: %.c
|
|||
${Q}mkdir -p $(@D)
|
||||
${Q}$(CC) -c $(CFLAGS) $(SDLCFLAGS) $(INCLUDE) -o $@ $<
|
||||
|
||||
ifeq ($(WITH_OGG),yes)
|
||||
release/yquake2.exe : CFLAGS += -DOGG
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OPENAL),yes)
|
||||
release/yquake2.exe : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"openal32.dll"' -DDLOPEN_OPENAL
|
||||
endif
|
||||
|
@ -372,10 +364,6 @@ endif
|
|||
|
||||
release/quake2 : CFLAGS += -Wno-unused-result
|
||||
|
||||
ifeq ($(WITH_OGG),yes)
|
||||
release/quake2 : CFLAGS += -DOGG
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_OPENAL),yes)
|
||||
ifeq ($(DLOPEN_OPENAL),yes)
|
||||
ifeq ($(YQ2_OSTYPE), OpenBSD)
|
||||
|
|
|
@ -630,9 +630,7 @@ SCR_PlayCinematic(char *arg)
|
|||
In_FlushQueue();
|
||||
|
||||
/* make sure background music is not playing */
|
||||
#ifdef OGG
|
||||
OGG_Stop();
|
||||
#endif
|
||||
|
||||
cl.cinematicframe = 0;
|
||||
dot = strstr(arg, ".");
|
||||
|
|
|
@ -906,9 +906,8 @@ CL_Shutdown(void)
|
|||
|
||||
Key_WriteConsoleHistory();
|
||||
|
||||
#ifdef OGG
|
||||
OGG_Stop();
|
||||
#endif
|
||||
|
||||
S_Shutdown();
|
||||
IN_Shutdown();
|
||||
VID_Shutdown();
|
||||
|
|
|
@ -321,9 +321,7 @@ CL_Disconnect(void)
|
|||
|
||||
SCR_StopCinematic();
|
||||
|
||||
#ifdef OGG
|
||||
OGG_Stop();
|
||||
#endif
|
||||
|
||||
if (cls.demorecording)
|
||||
{
|
||||
|
|
|
@ -1078,7 +1078,6 @@ CL_ParseConfigString(void)
|
|||
{
|
||||
CL_SetLightstyle(i - CS_LIGHTS);
|
||||
}
|
||||
#ifdef OGG
|
||||
else if (i == CS_CDTRACK)
|
||||
{
|
||||
if (cl.refresh_prepped)
|
||||
|
@ -1086,7 +1085,6 @@ CL_ParseConfigString(void)
|
|||
OGG_PlayTrack((int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
else if ((i >= CS_MODELS) && (i < CS_MODELS + MAX_MODELS))
|
||||
{
|
||||
if (cl.refresh_prepped)
|
||||
|
|
|
@ -567,9 +567,8 @@ SCR_BeginLoadingPlaque(void)
|
|||
{
|
||||
S_StopAllSounds();
|
||||
cl.sound_prepped = false; /* don't play ambients */
|
||||
#ifdef OGG
|
||||
|
||||
OGG_Stop();
|
||||
#endif
|
||||
|
||||
if (cls.disable_screen)
|
||||
{
|
||||
|
|
|
@ -361,10 +361,9 @@ CL_PrepRefresh(void)
|
|||
cl.refresh_prepped = true;
|
||||
cl.force_refdef = true; /* make sure we have a valid refdef */
|
||||
|
||||
#if defined(OGG)
|
||||
/* start the cd track */
|
||||
int track = (int)strtol(cl.configstrings[CS_CDTRACK], (char **)NULL, 10);
|
||||
|
||||
/* start the cd track */
|
||||
if (Cvar_VariableValue("ogg_shuffle"))
|
||||
{
|
||||
OGG_PlayTrack(track);
|
||||
|
@ -373,7 +372,6 @@ CL_PrepRefresh(void)
|
|||
{
|
||||
OGG_PlayTrack(track);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
float
|
||||
|
|
|
@ -1053,11 +1053,9 @@ static menulist_s s_options_lookstrafe_box;
|
|||
static menulist_s s_options_crosshair_box;
|
||||
static menuslider_s s_options_sfxvolume_slider;
|
||||
static menuslider_s s_options_haptic_slider;
|
||||
#if defined(OGG)
|
||||
static menulist_s s_options_oggshuffle_box;
|
||||
static menuslider_s s_options_oggvolume_slider;
|
||||
static menulist_s s_options_oggenable_box;
|
||||
#endif
|
||||
static menulist_s s_options_quality_list;
|
||||
static menulist_s s_options_console_action;
|
||||
|
||||
|
@ -1117,8 +1115,6 @@ static void
|
|||
ControlsSetMenuItemValues(void)
|
||||
{
|
||||
s_options_sfxvolume_slider.curvalue = Cvar_VariableValue("s_volume") * 10;
|
||||
|
||||
#if defined(OGG)
|
||||
s_options_oggshuffle_box.curvalue = (Cvar_VariableValue("ogg_shuffle") != 0);
|
||||
s_options_oggvolume_slider.curvalue = Cvar_VariableValue("ogg_volume") * 10;
|
||||
s_options_oggenable_box.curvalue = (Cvar_VariableValue("ogg_enable") != 0);
|
||||
|
@ -1134,7 +1130,6 @@ ControlsSetMenuItemValues(void)
|
|||
{
|
||||
s_options_oggshuffle_box.curvalue = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
s_options_quality_list.curvalue = (Cvar_VariableValue("s_loadas8bit") == 0);
|
||||
s_options_sensitivity_slider.curvalue = sensitivity->value * 2;
|
||||
|
@ -1174,7 +1169,6 @@ UpdateVolumeFunc(void *unused)
|
|||
Cvar_SetValue("s_volume", s_options_sfxvolume_slider.curvalue / 10);
|
||||
}
|
||||
|
||||
#if defined(OGG)
|
||||
static void
|
||||
OGGShuffleFunc(void *unused)
|
||||
{
|
||||
|
@ -1223,7 +1217,6 @@ EnableOGGMusic(void *unused)
|
|||
OGG_Shutdown();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
extern void Key_ClearTyping(void);
|
||||
|
||||
|
@ -1280,8 +1273,6 @@ UpdateSoundQualityFunc(void *unused)
|
|||
static void
|
||||
Options_MenuInit(void)
|
||||
{
|
||||
|
||||
#ifdef OGG
|
||||
static const char *ogg_music_items[] =
|
||||
{
|
||||
"disabled",
|
||||
|
@ -1295,7 +1286,6 @@ Options_MenuInit(void)
|
|||
"enabled",
|
||||
0
|
||||
};
|
||||
#endif
|
||||
|
||||
static const char *quality_items[] =
|
||||
{
|
||||
|
@ -1334,7 +1324,6 @@ Options_MenuInit(void)
|
|||
s_options_sfxvolume_slider.minvalue = 0;
|
||||
s_options_sfxvolume_slider.maxvalue = 10;
|
||||
|
||||
#ifdef OGG
|
||||
s_options_oggvolume_slider.generic.type = MTYPE_SLIDER;
|
||||
s_options_oggvolume_slider.generic.x = 0;
|
||||
s_options_oggvolume_slider.generic.y = 10;
|
||||
|
@ -1356,7 +1345,6 @@ Options_MenuInit(void)
|
|||
s_options_oggshuffle_box.generic.name = "Shuffle";
|
||||
s_options_oggshuffle_box.generic.callback = OGGShuffleFunc;
|
||||
s_options_oggshuffle_box.itemnames = ogg_shuffle;
|
||||
#endif
|
||||
|
||||
s_options_quality_list.generic.type = MTYPE_SPINCONTROL;
|
||||
s_options_quality_list.generic.x = 0;
|
||||
|
@ -1438,11 +1426,9 @@ Options_MenuInit(void)
|
|||
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_sfxvolume_slider);
|
||||
|
||||
#ifdef OGG
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_oggvolume_slider);
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_oggenable_box);
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_oggshuffle_box);
|
||||
#endif
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_quality_list);
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_sensitivity_slider);
|
||||
Menu_AddItem(&s_options_menu, (void *)&s_options_alwaysrun_box);
|
||||
|
|
|
@ -22,16 +22,9 @@
|
|||
* =======================================================================
|
||||
*/
|
||||
|
||||
#ifdef OGG
|
||||
|
||||
#ifndef CL_SOUND_VORBIS_H
|
||||
#define CL_SOUND_VORBIS_H
|
||||
|
||||
/* The OGG codec can return the samples in a number
|
||||
* of different formats, we use the standard signed
|
||||
* short format. */
|
||||
#define OGG_SAMPLEWIDTH 2
|
||||
|
||||
typedef enum
|
||||
{
|
||||
PLAY,
|
||||
|
@ -47,4 +40,3 @@ void OGG_Stop(void);
|
|||
void OGG_Stream(void);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
* =======================================================================
|
||||
*/
|
||||
|
||||
#ifdef OGG
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
@ -624,6 +622,3 @@ OGG_Shutdown(void)
|
|||
|
||||
ogg_started = false;
|
||||
}
|
||||
|
||||
#endif /* OGG */
|
||||
|
||||
|
|
|
@ -681,9 +681,7 @@ AL_Update(void)
|
|||
AL_AddLoopSounds();
|
||||
|
||||
/* add music */
|
||||
#ifdef OGG
|
||||
OGG_Stream();
|
||||
#endif
|
||||
|
||||
AL_StreamUpdate();
|
||||
AL_IssuePlaysounds();
|
||||
|
|
|
@ -1168,10 +1168,8 @@ SDL_Update(void)
|
|||
Com_Printf("----(%i)---- painted: %i\n", total, paintedtime);
|
||||
}
|
||||
|
||||
#ifdef OGG
|
||||
/* stream music */
|
||||
OGG_Stream();
|
||||
#endif
|
||||
|
||||
if (!sound.buffer)
|
||||
{
|
||||
|
|
|
@ -1084,9 +1084,7 @@ S_Init(void)
|
|||
num_sfx = 0;
|
||||
paintedtime = 0;
|
||||
|
||||
#ifdef OGG
|
||||
OGG_Init();
|
||||
#endif
|
||||
|
||||
Com_Printf("Sound sampling rate: %i\n", sound.speed);
|
||||
S_StopAllSounds();
|
||||
|
@ -1110,10 +1108,7 @@ S_Shutdown(void)
|
|||
}
|
||||
|
||||
S_StopAllSounds();
|
||||
|
||||
#ifdef OGG
|
||||
OGG_Shutdown();
|
||||
#endif
|
||||
|
||||
/* free all sounds */
|
||||
for (i = 0, sfx = known_sfx; i < num_sfx; i++, sfx++)
|
||||
|
|
|
@ -28,9 +28,7 @@
|
|||
#include "header/common.h"
|
||||
#include "header/glob.h"
|
||||
|
||||
#ifdef OGG
|
||||
#include "../client/sound/header/vorbis.h"
|
||||
#endif
|
||||
|
||||
#ifdef ZIP
|
||||
#include "unzip/unzip.h"
|
||||
|
@ -1576,7 +1574,7 @@ FS_BuildGameSpecificSearchPath(char *dir)
|
|||
// the gamedir has changed, so read in the corresponding configs
|
||||
Qcommon_ExecConfigs(false);
|
||||
|
||||
#if !defined(DEDICATED_ONLY) && defined(OGG)
|
||||
#ifndef DEDICATED_ONLY
|
||||
// this function is called whenever the game cvar changes => the player wants to switch to another mod
|
||||
// in that case the list of music tracks needs to be loaded again (=> tracks are possibly from the new mod dir)
|
||||
OGG_InitTrackList();
|
||||
|
@ -1672,7 +1670,7 @@ FS_InitFilesystem(void)
|
|||
{
|
||||
FS_BuildGameSpecificSearchPath(fs_gamedirvar->string);
|
||||
}
|
||||
#if !defined(DEDICATED_ONLY) && defined(OGG)
|
||||
#ifndef DEDICATED_ONLY
|
||||
else
|
||||
{
|
||||
// no mod, but we still need to get the list of OGG tracks for background music
|
||||
|
|
|
@ -102,11 +102,6 @@ Qcommon_Buildstring(void)
|
|||
#ifndef DEDICATED_ONLY
|
||||
printf("Client build options:\n");
|
||||
|
||||
#ifdef OGG
|
||||
printf(" + OGG/Vorbis\n");
|
||||
#else
|
||||
printf(" - OGG/Vorbis\n");
|
||||
#endif
|
||||
#ifdef USE_OPENAL
|
||||
printf(" + OpenAL audio\n");
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue