SAGA2: Remove audiores.h

This commit is contained in:
a/ 2021-07-03 01:08:40 +09:00
parent 61dd4fb9cf
commit 9131a50795
6 changed files with 27 additions and 127 deletions

View File

@ -219,4 +219,27 @@ audioAttenuationFunction audioInterface::setAttenuator(audioAttenuationFunction
return nullptr;
}
bool bufCheckResID(hResContext *hrc, uint32 s) {
return s != 0;
}
bool hResCheckResID(hResContext *hrc, uint32 s) {
if (hrc != NULL)
return hrc->seek(s);
return false;
}
bool hResCheckResID(hResContext *hrc, uint32 s[]) {
if (s != NULL) {
if (s[0] == 0)
return false;
for (int i = 0; s[i]; i++) {
if (!hResCheckResID(hrc, s[i]))
return false;
}
}
return true;
}
} // end of namespace Saga2

View File

@ -29,6 +29,8 @@
#include "audio/mixer.h"
namespace Saga2 {
/* ===================================================================== *
the library(s) must be recompiled if you change these settings
* ===================================================================== */
@ -79,4 +81,6 @@ inline void audioFatal(char *msg) {
error("Sound error %s", msg);
}
} // end of namespace Saga2
#endif

View File

@ -1,77 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* 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
* aint32 with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* Based on the original sources
* Faery Tale II -- The Halls of the Dead
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
*/
#include "saga2/saga2.h"
#include "saga2/audio.h"
#include "saga2/hresmgr.h"
#include "saga2/rect.h"
#include "saga2/queues.h"
#include "saga2/idtypes.h"
#include "saga2/audiosmp.h"
#include "saga2/audiobuf.h"
namespace Saga2 {
#define ASYNCH_AUDIO 0
#define ASYNCH_READ_SIZE 65536L
/* ===================================================================== *
Imports
* ===================================================================== */
extern audioInterface *audio;
extern bool debugStatuses;
extern bool debugResource;
extern uint32 maxClicks;
extern int32 clickSizes[];
extern uint8 *clickData[];
bool bufCheckResID(hResContext *hrc, uint32 s) {
return s != 0;
}
bool hResCheckResID(hResContext *hrc, uint32 s) {
if (hrc != NULL)
return hrc->seek(s);
return false;
}
bool hResCheckResID(hResContext *hrc, uint32 s[]) {
if (s != NULL) {
if (s[0] == 0)
return false;
for (int i = 0; s[i]; i++) {
if (!hResCheckResID(hrc, s[i]))
return false;
}
}
return true;
}
} // end of namespace Saga2

View File

@ -1,48 +0,0 @@
/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* 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
* aint32 with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*
* Based on the original sources
* Faery Tale II -- The Halls of the Dead
* (c) 1993-1996 The Wyrmkeep Entertainment Co.
*/
#ifndef SAGA2_AUDIORES_H
#define SAGA2_AUDIORES_H
namespace Saga2 {
class Buffer;
class soundSample;
int16 hResSeek(Buffer &sb, soundSample &ss, hResContext *hrc, bool Cheksize);
int16 hResRead(Buffer &sb, soundSample &ss, hResContext *hrc);
int16 hResFlush(Buffer &sb, soundSample &ss, hResContext *hrc);
//-----------------------------------------------------------------------
// Buffer readers
int16 bufSeek(Buffer &sb, soundSample &ss);
int16 bufRead(Buffer &sb, soundSample &ss);
int16 bufFlush(Buffer &sb, soundSample &ss);
} // end of namespace Saga2
#endif

View File

@ -6,7 +6,6 @@ MODULE_OBJS := \
assign.o \
audio.o \
audiobuf.o \
audiores.o \
automap.o \
band.o \
beegee.o \

View File

@ -30,7 +30,6 @@
#include "saga2/saga2.h"
#include "saga2/fta.h"
#include "saga2/audio.h"
#include "saga2/audiores.h"
#include "saga2/annoy.h"
#include "saga2/player.h"
#include "saga2/queues.h"