2002-07-28 15:35:26 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2003-03-06 21:46:56 +00:00
|
|
|
* Copyright (C) 2002-2003 The ScummVM project
|
2002-07-28 15:35:26 +00:00
|
|
|
*
|
|
|
|
* 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
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
2002-08-04 17:31:20 +00:00
|
|
|
* $Header$
|
2002-07-28 15:35:26 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef BUNDLE_H
|
|
|
|
#define BUNDLE_H
|
|
|
|
|
|
|
|
#include "scummsys.h"
|
2002-08-31 09:50:36 +00:00
|
|
|
#include "file.h"
|
2002-08-14 16:18:45 +00:00
|
|
|
|
|
|
|
class Bundle {
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
2002-07-28 15:35:26 +00:00
|
|
|
struct CompTable {
|
|
|
|
int32 offset;
|
|
|
|
int32 size;
|
|
|
|
int32 codec;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BundleAudioTable {
|
|
|
|
char filename[13];
|
|
|
|
int32 size;
|
|
|
|
int32 offset;
|
|
|
|
};
|
|
|
|
|
2002-08-14 09:52:43 +00:00
|
|
|
int32 compDecode(byte *src, byte *dst);
|
2003-01-25 18:41:32 +00:00
|
|
|
int32 decompressCodec(int32 codec, byte *comp_input, byte *comp_output, int32 size);
|
2003-01-18 15:54:38 +00:00
|
|
|
CompTable *_compVoiceTable;
|
|
|
|
CompTable *_compMusicTable;
|
2002-08-14 09:52:43 +00:00
|
|
|
BundleAudioTable *_bundleVoiceTable;
|
|
|
|
BundleAudioTable *_bundleMusicTable;
|
2002-07-28 15:35:26 +00:00
|
|
|
int32 _numVoiceFiles;
|
|
|
|
int32 _numMusicFiles;
|
2002-08-04 16:30:59 +00:00
|
|
|
int32 _lastSong;
|
2002-07-28 15:35:26 +00:00
|
|
|
|
2002-12-28 15:02:23 +00:00
|
|
|
bool _initializedImcTables;
|
|
|
|
byte _destImcTable[93];
|
|
|
|
uint32 _destImcTable2[5697];
|
|
|
|
|
2002-07-28 15:35:26 +00:00
|
|
|
public:
|
2002-08-31 09:50:36 +00:00
|
|
|
Bundle();
|
2002-08-14 09:52:43 +00:00
|
|
|
~Bundle();
|
2002-07-28 15:35:26 +00:00
|
|
|
|
2003-01-14 18:23:46 +00:00
|
|
|
File _musicFile;
|
2003-01-20 05:59:25 +00:00
|
|
|
File _voiceFile;
|
2002-12-28 15:02:23 +00:00
|
|
|
void initializeImcTables();
|
2002-09-15 19:28:34 +00:00
|
|
|
bool openVoiceFile(const char *filename, const char *directory);
|
|
|
|
bool openMusicFile(const char *filename, const char *directory);
|
2003-03-07 07:49:10 +00:00
|
|
|
int32 decompressVoiceSampleByName(char *name, byte **comp_final);
|
|
|
|
int32 decompressVoiceSampleByIndex(int32 index, byte **comp_final);
|
2003-01-25 18:41:32 +00:00
|
|
|
int32 decompressMusicSampleByName(char *name, int32 number, byte *comp_final);
|
|
|
|
int32 decompressMusicSampleByIndex(int32 index, int32 number, byte *comp_final);
|
2002-07-28 15:35:26 +00:00
|
|
|
int32 getNumberOfMusicSamplesByIndex(int32 index);
|
2002-12-28 15:02:23 +00:00
|
|
|
int32 getNumberOfMusicSamplesByName(char *name);
|
2002-07-28 15:35:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|