mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
- reducing the completionist cruft.
The 3 CD related files don't really contain enough code to justify this, merged all non-empty parts into one.
This commit is contained in:
parent
68a3a60d0b
commit
25bb94cd94
12 changed files with 21 additions and 172 deletions
|
@ -41,8 +41,6 @@ set( PCH_SOURCES
|
|||
src/bubbles.cpp
|
||||
src/bullet.cpp
|
||||
src/cd.cpp
|
||||
src/cdaudio.cpp
|
||||
src/cdrom.cpp
|
||||
src/config.cpp
|
||||
src/enginesubs.cpp
|
||||
src/exhumed.cpp
|
||||
|
|
|
@ -30,8 +30,6 @@ BEGIN_PS_NS
|
|||
|
||||
extern short word_9AC30;
|
||||
|
||||
static char *pTrack = NULL;
|
||||
static int trackhandle = -1;
|
||||
int nLastVolumeSet = 0;
|
||||
|
||||
/* TODO
|
||||
|
@ -52,7 +50,7 @@ bool playCDtrack(int nTrack, bool bLoop)
|
|||
|
||||
// try ogg vorbis now
|
||||
sprintf(filename, "exhumed%02d.ogg", nTrack);
|
||||
trackhandle = Mus_Play(nullptr, filename, true);
|
||||
Mus_Play(nullptr, filename, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -66,18 +64,12 @@ int StepFadeCDaudio()
|
|||
return 0;
|
||||
}
|
||||
Mus_Stop();
|
||||
trackhandle = 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool CDplaying()
|
||||
{
|
||||
if (trackhandle <= 0) {
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
return true;
|
||||
}
|
||||
return Mus_IsPlaying();
|
||||
}
|
||||
|
||||
void StopCD()
|
||||
|
@ -89,4 +81,22 @@ void FadeSong()
|
|||
{
|
||||
}
|
||||
|
||||
int fadecdaudio()
|
||||
{
|
||||
StartfadeCDaudio();
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (!StepFadeCDaudio()) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
WaitTicks(1);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
END_PS_NS
|
||||
|
|
|
@ -1,47 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
||||
This file is part of PCExhumed.
|
||||
PCExhumed is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "cdaudio.h"
|
||||
#include "cd.h"
|
||||
#include "exhumed.h"
|
||||
|
||||
|
||||
BEGIN_PS_NS
|
||||
|
||||
int fadecdaudio()
|
||||
{
|
||||
StartfadeCDaudio();
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (!StepFadeCDaudio()) {
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
WaitTicks(1);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void CheckCD()
|
||||
{
|
||||
|
||||
}
|
||||
END_PS_NS
|
|
@ -1,29 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
||||
This file is part of PCExhumed.
|
||||
PCExhumed is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef __cdaudio_h__
|
||||
#define __cdaudio_h__
|
||||
|
||||
BEGIN_PS_NS
|
||||
|
||||
void CheckCD();
|
||||
int fadecdaudio();
|
||||
|
||||
END_PS_NS
|
||||
|
||||
#endif
|
|
@ -1,32 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
||||
This file is part of PCExhumed.
|
||||
PCExhumed is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
#include "ns.h"
|
||||
#include "cdrom.h"
|
||||
|
||||
BEGIN_PS_NS
|
||||
|
||||
int checkcdrom()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
char GetCDDriveLetter()
|
||||
{
|
||||
return 'D';
|
||||
}
|
||||
END_PS_NS
|
|
@ -1,29 +0,0 @@
|
|||
//-------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (C) 2010-2019 EDuke32 developers and contributors
|
||||
Copyright (C) 2019 sirlemonhead, Nuke.YKT
|
||||
This file is part of PCExhumed.
|
||||
PCExhumed is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License version 2
|
||||
as published by the Free Software Foundation.
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
See the GNU General Public License for more details.
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
#ifndef __cdrom_h__
|
||||
#define __cdrom_h__
|
||||
|
||||
BEGIN_PS_NS
|
||||
|
||||
int checkcdrom();
|
||||
char GetCDDriveLetter();
|
||||
|
||||
END_PS_NS
|
||||
|
||||
#endif
|
|
@ -57,8 +57,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "wasp.h"
|
||||
#include "scorp.h"
|
||||
#include "rat.h"
|
||||
#include "cdrom.h"
|
||||
#include "cdaudio.h"
|
||||
#include "serial.h"
|
||||
#include "network.h"
|
||||
#include "random.h"
|
||||
|
@ -2182,23 +2180,6 @@ LOOP3:
|
|||
fadecdaudio();
|
||||
}
|
||||
|
||||
CheckCD();
|
||||
|
||||
#if 0
|
||||
if (!bNoCDCheck)
|
||||
{
|
||||
while (!checkcdrom())
|
||||
{
|
||||
EraseScreen(overscanindex);
|
||||
Query(2, 0, "Insert CD into drive", "(ESC to abort)");
|
||||
inputState.ClearAllKeyStatus();
|
||||
if (inputState.keyGetChar() == asc_Escape) {
|
||||
I_Error("Aborted\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (levelnew == kMap20)
|
||||
{
|
||||
lCountDown = 81000;
|
||||
|
|
|
@ -37,7 +37,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "object.h"
|
||||
#include "light.h"
|
||||
#include "cd.h"
|
||||
#include "cdaudio.h"
|
||||
#include "menu/menu.h"
|
||||
#include <string>
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "exhumed.h"
|
||||
#include "names.h"
|
||||
#include "movie.h"
|
||||
#include "cdrom.h"
|
||||
#include "light.h"
|
||||
#include <cstdio>
|
||||
#include <cstring>
|
||||
|
|
|
@ -43,7 +43,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "grenade.h"
|
||||
#include "menu.h"
|
||||
#include "cd.h"
|
||||
#include "cdaudio.h"
|
||||
#include "map.h"
|
||||
#include "sound.h"
|
||||
#include "textures.h"
|
||||
|
|
|
@ -121,6 +121,7 @@ void UpdateCreepySounds();
|
|||
void InitFX();
|
||||
void UnInitFX();
|
||||
void FadeSong();
|
||||
int fadecdaudio();
|
||||
int LocalSoundPlaying();
|
||||
void LoadFX();
|
||||
void StopAllSounds();
|
||||
|
|
|
@ -30,7 +30,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "init.h"
|
||||
#include "menu.h"
|
||||
#include "cd.h"
|
||||
#include "cdaudio.h"
|
||||
#include "typedefs.h"
|
||||
#include "map.h"
|
||||
#include "move.h"
|
||||
|
|
Loading…
Reference in a new issue