make tremor support actually useful, ok jsg@

This commit is contained in:
jolan 2005-07-28 17:28:14 +00:00
parent 3455b52213
commit 30ac998839
16 changed files with 288 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.16 2005/07/06 10:45:44 jsg Exp $
# $OpenBSD: Makefile,v 1.17 2005/07/28 17:28:14 jolan Exp $
.if ${MACHINE_ARCH} == "hppa"
BROKEN= "gcc bug"
@ -6,7 +6,7 @@ BROKEN= "gcc bug"
COMMENT= "graphical adventure game interpreter"
DISTNAME= scummvm-0.7.1
PKGNAME= ${DISTNAME}p1
PKGNAME= ${DISTNAME}p2
CATEGORIES= games x11 emulators
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=scummvm/}

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-base_main_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- base/main.cpp.orig Sat Mar 26 14:50:01 2005
+++ base/main.cpp Wed Jul 27 17:37:10 2005
@@ -96,6 +96,9 @@ const char *gScummVMVersion = "0.7.1";
const char *gScummVMBuildDate = __DATE__ " " __TIME__;
const char *gScummVMFullVersion = "ScummVM 0.7.1 (" __DATE__ " " __TIME__ ")";
const char *gScummVMFeatures = ""
+#ifdef USE_TREMOR
+ "Tremor "
+#endif
#ifdef USE_VORBIS
"Vorbis "
#endif

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-queen_sound_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- queen/sound.cpp.orig Sun Dec 19 06:48:11 2004
+++ queen/sound.cpp Thu Jul 28 12:20:47 2005
@@ -60,7 +60,7 @@ Sound *Sound::giveSound(SoundMixer *mixe
#endif
break;
case COMPRESSION_OGG:
- #ifndef USE_VORBIS
+ #if !defined(USE_TREMOR) && !defined(USE_VORBIS)
warning("Using OGG compressed datafile, but OGG support not compiled in");
return new SilentSound(mixer, vm);
#else
@@ -205,7 +205,7 @@ void MP3Sound::sfxPlay(const char *name,
}
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
void OGGSound::sfxPlay(const char *name, bool isSpeech) {
uint32 size;
File *f = _vm->resource()->giveCompressedSound(name, &size);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-queen_sound_h,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- queen/sound.h.orig Sun Dec 19 06:48:12 2004
+++ queen/sound.h Thu Jul 28 12:20:03 2005
@@ -138,7 +138,7 @@ public:
};
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
class OGGSound : public Sound {
public:
OGGSound(SoundMixer *mixer, QueenEngine *vm) : Sound(mixer, vm) {};

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-scumm_smush_smush_player_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- scumm/smush/smush_player.cpp.orig Sat Mar 26 07:14:32 2005
+++ scumm/smush/smush_player.cpp Wed Jul 27 17:37:41 2005
@@ -1177,7 +1177,7 @@ void SmushPlayer::tryOggFile(const char
char fname[260];
memcpy(fname, filename, i - filename);
strcpy(fname + (i - filename), ".ogg");
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
_compressedFile.open(fname);
if (_compressedFile.isOpen()) {
int size = _compressedFile.size();

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-scumm_sound_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- scumm/sound.cpp.orig Sun Dec 19 05:23:28 2004
+++ scumm/sound.cpp Wed Jul 27 17:38:24 2005
@@ -1005,7 +1005,7 @@ void Sound::startSfxSound(File *file, in
#endif
break;
case kVorbisMode:
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
assert(file_size > 0);
input = makeVorbisStream(file, file_size);
#endif
@@ -1044,7 +1044,7 @@ ScummFile *Sound::openSfxFile() {
#ifdef USE_FLAC
{ "sof", kFlacMode },
#endif
- #ifdef USE_VORBIS
+ #if defined(USE_TREMOR) || defined(USE_VORBIS)
{ "sog", kVorbisMode },
#endif
#ifdef USE_MAD

View File

@ -0,0 +1,30 @@
$OpenBSD: patch-simon_sound_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- simon/sound.cpp.orig Sat Dec 11 17:34:34 2004
+++ simon/sound.cpp Wed Jul 27 17:38:55 2005
@@ -223,7 +223,7 @@ void MP3Sound::playSound(uint sound, Pla
}
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
class VorbisSound : public BaseSound {
public:
VorbisSound(SoundMixer *mixer, File *file, uint32 base = 0) : BaseSound(mixer, file, base) {};
@@ -307,7 +307,7 @@ Sound::Sound(const byte game, const Game
}
}
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
if (!_voice && gss->vorbis_filename && gss->vorbis_filename[0]) {
file->open(gss->vorbis_filename);
if (file->isOpen()) {
@@ -368,7 +368,7 @@ Sound::Sound(const byte game, const Game
}
}
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
if (!_effects && gss->vorbis_effects_filename && gss->vorbis_effects_filename[0]) {
file->open(gss->vorbis_effects_filename);
if (file->isOpen()) {

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-sound_audiocd_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sound/audiocd.cpp.orig Tue Sep 28 15:19:33 2004
+++ sound/audiocd.cpp Wed Jul 27 17:39:45 2005
@@ -46,9 +46,9 @@ static const TrackFormat TRACK_FORMATS[]
#ifdef USE_FLAC
{ "Flac", getFlacTrack },
#endif // #ifdef USE_FLAC
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
{ "Ogg Vorbis", getVorbisTrack },
-#endif // #ifdef USE_VORBIS
+#endif // #if defined(USE_TREMOR) || defined(USE_VORBIS)
#ifdef USE_MAD
{ "Mpeg Layer 3", getMP3Track },
#endif // #ifdef USE_MAD

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-sound_audiostream_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sound/audiostream.cpp.orig Sat Nov 27 11:09:05 2004
+++ sound/audiostream.cpp Wed Jul 27 17:40:14 2005
@@ -57,9 +57,9 @@ static const StreamFileFormat STREAM_FIL
{ "Flac", "flac", makeFlacStream },
{ "Flac", "fla", makeFlacStream },
#endif // #ifdef USE_FLAC
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
{ "Ogg Vorbis", "ogg", makeVorbisStream },
-#endif // #ifdef USE_VORBIS
+#endif // #if defined(USE_TREMOR) || defined(USE_VORBIS)
#ifdef USE_MAD
{ "Mpeg Layer 3", "mp3", makeMP3Stream },
#endif // #ifdef USE_MAD

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-sound_vorbis_cpp,v 1.1 2005/06/30 02:47:49 jolan Exp $
$OpenBSD: patch-sound_vorbis_cpp,v 1.2 2005/07/28 17:28:14 jolan Exp $
--- sound/vorbis.cpp.orig Sat Nov 27 07:54:08 2004
+++ sound/vorbis.cpp Fri Jun 24 16:14:10 2005
+++ sound/vorbis.cpp Wed Jul 27 17:54:19 2005
@@ -21,7 +21,7 @@
#include "sound/vorbis.h"
@ -22,3 +22,40 @@ $OpenBSD: patch-sound_vorbis_cpp,v 1.1 2005/06/30 02:47:49 jolan Exp $
static AudioStream *makeVorbisStream(OggVorbis_File *file, int duration);
@@ -162,16 +166,12 @@ VorbisTrackInfo::~VorbisTrackInfo() {
}
}
-#ifdef CHUNKSIZE
-#define VORBIS_TREMOR
-#endif
-
void VorbisTrackInfo::play(SoundMixer *mixer, PlayingSoundHandle *handle, int startFrame, int duration) {
bool err = openTrack();
assert(!err);
-#ifdef VORBIS_TREMOR
+#ifdef USE_TREMOR
ov_time_seek(&_ov_file, (ogg_int64_t)(startFrame / 75.0 * 1000));
#else
ov_time_seek(&_ov_file, startFrame / 75.0);
@@ -229,9 +229,6 @@ public:
};
-#ifdef CHUNKSIZE
-#define VORBIS_TREMOR
-#endif
VorbisInputStream::VorbisInputStream(OggVorbis_File *file, int duration, bool deleteFileAfterUse)
@@ -284,7 +281,7 @@ void VorbisInputStream::refill() {
while (len_left > 0 && _end_pos > ov_pcm_tell(_ov_file)) {
long result = ov_read(_ov_file, read_pos, len_left,
-#ifndef VORBIS_TREMOR
+#ifndef USE_TREMOR
#ifdef SCUMM_BIG_ENDIAN
1,
#else

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-sound_vorbis_h,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sound/vorbis.h.orig Sun Feb 22 08:11:11 2004
+++ sound/vorbis.h Wed Jul 27 17:40:47 2005
@@ -25,7 +25,7 @@
#include "stdafx.h"
#include "common/scummsys.h"
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
class AudioStream;
class DigitalTrackInfo;

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-sword1_animation_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sword1/animation.cpp.orig Sun Mar 13 11:16:06 2005
+++ sword1/animation.cpp Wed Jul 27 17:42:38 2005
@@ -99,7 +99,7 @@ MoviePlayer::~MoviePlayer(void) {
* @param id the id of the file
*/
void MoviePlayer::play(uint32 id) {
-#if defined(USE_MPEG2) && defined(USE_VORBIS)
+#if defined(USE_MPEG2) && (defined(USE_TREMOR) || defined(USE_VORBIS))
AnimationState *anim = new AnimationState(_scr, _snd, _sys);
AudioStream *stream = NULL;
if (SwordEngine::_systemVars.cutscenePackVersion == 1) {
@@ -165,7 +165,7 @@ void MoviePlayer::play(uint32 id) {
while (!anim->soundFinished())
_sys->delayMillis(100);
delete anim;
-#endif // USE_MPEG2 && USE_VORBIS
+#endif // USE_MPEG2 && (USE_TREMOR || USE_VORBIS)
}
void MoviePlayer::insertOverlay(OverlayColor *buf, uint8 *ovl, OverlayColor *pal) {

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-sword1_music_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sword1/music.cpp.orig Fri Dec 10 12:26:08 2004
+++ sword1/music.cpp Wed Jul 27 17:43:16 2005
@@ -109,7 +109,7 @@ AudioStream *MusicHandle::createAudioSou
case MusicMp3:
return makeMP3Stream(&_file, _file.size());
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
case MusicVorbis:
return makeVorbisStream(&_file, _file.size());
#endif
@@ -133,7 +133,7 @@ bool MusicHandle::play(const char *fileB
if (_file.open(fileName))
_musicMode = MusicMp3;
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
if (!_file.isOpen()) { // mp3 doesn't exist (or not compiled with MAD support)
sprintf(fileName, "%s.ogg", fileBase);
if (_file.open(fileName))

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-sword1_sound_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sword1/sound.cpp.orig Sun Nov 28 17:02:28 2004
+++ sword1/sound.cpp Wed Jul 27 17:43:45 2005
@@ -202,7 +202,7 @@ bool Sound::startSpeech(uint16 roomNo, u
_waveVolPos = 0;
}
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
else if (_cowMode == CowVorbis) {
_cowFile.seek(index);
_mixer->playInputStream(&_speechHandle, makeVorbisStream(&_cowFile, sampleSize), false, SOUND_SPEECH_ID, speechVol, speechPan);
@@ -319,7 +319,7 @@ void Sound::initCowSystem(void) {
_cowMode = CowMp3;
}
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
if (!_cowFile.isOpen()) {
sprintf(cowName, "SPEECH%d.CLV", SwordEngine::_systemVars.currentCD);
_cowFile.open(cowName);

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-sword1_sword1_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sword1/sword1.cpp.orig Mon Dec 20 12:33:54 2004
+++ sword1/sword1.cpp Wed Jul 27 17:44:06 2005
@@ -292,7 +292,7 @@ const CdFile SwordEngine::_cdFileList[]
,{ "speech1.cl3", FLAG_SPEECH1 },
{ "speech2.cl3", FLAG_SPEECH2 }
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
,{ "speech1.clv", FLAG_SPEECH1 },
{ "speech2.clv", FLAG_SPEECH2 }
#endif

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-sword2_driver_d_sound_cpp,v 1.1 2005/07/28 17:28:14 jolan Exp $
--- sword2/driver/d_sound.cpp.orig Fri Feb 18 10:57:24 2005
+++ sword2/driver/d_sound.cpp Wed Jul 27 17:44:31 2005
@@ -48,7 +48,7 @@ static AudioStream *getAudioStream(File
#ifdef USE_MAD
{ "cl3", kMP3Mode },
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
{ "clg", kVorbisMode },
#endif
#ifdef USE_FLAC
@@ -122,7 +122,7 @@ static AudioStream *getAudioStream(File
case kMP3Mode:
return makeMP3Stream(fp, enc_len);
#endif
-#ifdef USE_VORBIS
+#if defined(USE_TREMOR) || defined(USE_VORBIS)
case kVorbisMode:
return makeVorbisStream(fp, enc_len);
#endif