[Scummvm-cvs-logs] SF.net SVN: scummvm:[42335] tools/branches/gsoc2009-gui
Remere at users.sourceforge.net
Remere at users.sourceforge.net
Fri Jul 10 15:38:16 CEST 2009
Revision: 42335
http://scummvm.svn.sourceforge.net/scummvm/?rev=42335&view=rev
Author: Remere
Date: 2009-07-10 13:38:16 +0000 (Fri, 10 Jul 2009)
Log Message:
-----------
*Forgot to commit the new .h files.
Added Paths:
-----------
tools/branches/gsoc2009-gui/compress_scumm_bun.h
tools/branches/gsoc2009-gui/compress_scumm_san.h
tools/branches/gsoc2009-gui/compress_scumm_sou.h
tools/branches/gsoc2009-gui/compress_sword1.h
Added: tools/branches/gsoc2009-gui/compress_scumm_bun.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_bun.h (rev 0)
+++ tools/branches/gsoc2009-gui/compress_scumm_bun.h 2009-07-10 13:38:16 UTC (rev 42335)
@@ -0,0 +1,68 @@
+/* compress_scumm_bun - compressor for bundle files
+ * Copyright (C) 2004-2006 The ScummVM Team
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+
+#ifndef COMPRESS_SCUMM_BUN_H
+#define COMPRESS_SCUMM_BUN_H
+
+#include "compress.h"
+
+class CompressScummBun : public CompressionTool {
+public:
+ CompressScummBun(const std::string &name = "compress_scumm_bun");
+
+ virtual void execute();
+
+
+ struct BundleAudioTable {
+ char filename[24];
+ int size;
+ int offset;
+ };
+
+protected:
+
+ File _waveTmpFile;
+ int32 _waveDataSize;
+ BundleAudioTable *_bundleTable;
+ BundleAudioTable _cbundleTable[10000]; // difficult to calculate
+ int32 _cbundleCurIndex;
+
+ int32 compDecode(byte *src, byte *dst);
+ int32 decompressCodec(int32 codec, byte *comp_input, byte *comp_output, int32 input_size);
+ void encodeWaveWithFlac(char *filename);
+ void encodeWaveWithOgg(char *filename);
+ void encodeWaveWithLame(char *filename);
+ void writeWaveHeader(int s_size, int rate, int chan);
+ void writeToTempWave(char *fileName, byte *output_data, unsigned int size);
+ byte *decompressBundleSound(int index, File &input, int32 &finalSize);
+ byte *convertTo16bit(byte *ptr, int inputSize, int &outputSize, int bits, int freq, int channels);
+ void countMapElements(byte *ptr, int &numRegions, int &numJumps, int &numSyncs, int &numMarkers);
+ void writeRegions(byte *ptr, int bits, int freq, int channels, const char *dir, char *filename, File &output);
+ void recalcRegions(int32 &value, int bits, int freq, int channels);
+ void writeToRMAPFile(byte *ptr, File &output, char *filename, int &offsetData, int &bits, int &freq, int &channels);
+
+};
+
+#endif
+
+
Property changes on: tools/branches/gsoc2009-gui/compress_scumm_bun.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
Added: tools/branches/gsoc2009-gui/compress_scumm_san.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_san.h (rev 0)
+++ tools/branches/gsoc2009-gui/compress_scumm_san.h 2009-07-10 13:38:16 UTC (rev 42335)
@@ -0,0 +1,93 @@
+/* compress_scumm_san - compressor for smush san files
+ * Copyright (C) 2004-2006 The ScummVM Team
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+
+#ifndef COMPRESS_SCUMM_SAN_H
+#define COMPRESS_SCUMM_SAN_H
+
+#include "compress.h"
+
+
+#define COMPRESS_SCUMM_SAN_MAX_TRACKS 150
+
+class CompressScummSan : public CompressionTool {
+public:
+ CompressScummSan(const std::string &name = "compress_scumm_san");
+
+ virtual void execute();
+
+ struct FrameInfo {
+ int32 frameSize;
+ int32 offsetOutput;
+ int32 fobjDecompressedSize;
+ int32 fobjCompressedSize;
+ int32 lessIACTSize;
+ int32 lessPSADSize;
+ };
+
+ struct AudioTrackInfo {
+ int animFrame;
+ int trackId;
+ int bits;
+ bool stereo;
+ int freq;
+ bool used;
+ File file;
+ int waveDataSize;
+ int *volumes;
+ int *pans;
+ int *sizes;
+ int nbframes;
+ int countFrames;
+ int lastFrame;
+ int32 sdatSize;
+ };
+
+protected:
+ byte _IACToutput[0x1000];
+ int _IACTpos;
+ File _waveTmpFile;
+ int32 _waveDataSize;
+ AudioTrackInfo _audioTracks[COMPRESS_SCUMM_SAN_MAX_TRACKS];
+
+ void encodeSanWaveWithOgg(char *filename);
+ void encodeSanWaveWithLame(char *filename);
+ void writeWaveHeader(int s_size);
+ void writeToTempWaveFile(char *fileName, byte *output_data, unsigned int size);
+ void decompressComiIACT(char *fileName, byte *output_data, byte *d_src, int bsize);
+ void handleComiIACT(File &input, int size, const char *outputDir, const char *inputFilename);
+ AudioTrackInfo *allocAudioTrack(int trackId, int frame);
+ AudioTrackInfo *findAudioTrack(int trackId);
+ void flushTracks(int frame);
+ void prepareForMixing(const char *outputDir, const char *inputFilename);
+ void mixing(const char *outputDir, const char *inputFilename, int frames, int fps);
+ void handleMapChunk(AudioTrackInfo *audioTrack, File &input);
+ int32 handleSaudChunk(AudioTrackInfo *audioTrack, File &input);
+ void handleAudioTrack(int index, int trackId, int frame, int nbframes, File &input, const char *outputDir,
+ const char *inputFilename, int &size, int volume, int pan, bool iact);
+ void handleDigIACT(File &input, int size, const char *outputDir, const char *inputFilename,int flags, int track_flags, int frame);
+ void handlePSAD(File &input, int size, const char *outputDir, const char *inputFilename, int frame);
+};
+
+#endif
+
+
Property changes on: tools/branches/gsoc2009-gui/compress_scumm_san.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
Added: tools/branches/gsoc2009-gui/compress_scumm_sou.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_scumm_sou.h (rev 0)
+++ tools/branches/gsoc2009-gui/compress_scumm_sou.h 2009-07-10 13:38:16 UTC (rev 42335)
@@ -0,0 +1,47 @@
+/* compress_scumm_sou - monster.sou to MP3-compressed monster.so3 converter
+ * Copyright (C) 2009 The ScummVM Team
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+
+#ifndef COMPRESS_SCUMM_SOU_H
+#define COMPRESS_SCUMM_SOU_H
+
+#include "compress.h"
+
+
+class CompressScummSou : public CompressionTool {
+public:
+ CompressScummSou(const std::string &name = "compress_scumm_sou");
+
+ virtual void execute();
+
+protected:
+ std::string _audioOuputFilename;
+ File _input, _output_idx, _output_snd;
+
+ void end_of_file(const char *inputPath);
+ void append_byte(int size, char buf[]);
+ void get_part(const char *inputPath);
+};
+
+#endif
+
+
Property changes on: tools/branches/gsoc2009-gui/compress_scumm_sou.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
Added: tools/branches/gsoc2009-gui/compress_sword1.h
===================================================================
--- tools/branches/gsoc2009-gui/compress_sword1.h (rev 0)
+++ tools/branches/gsoc2009-gui/compress_sword1.h 2009-07-10 13:38:16 UTC (rev 42335)
@@ -0,0 +1,51 @@
+/* compress_sword1 - Compress Broken Sword I sound clusters into MP3/Ogg Vorbis
+ * Copyright (C) 2004-2006 The ScummVM Team
+ *
+ * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL$
+ * $Id$
+ *
+ */
+
+#ifndef COMPRESS_SWORD1_H
+#define COMPRESS_SWORD1_H
+
+#include "compress.h"
+
+
+class CompressSword1 : public CompressionTool {
+public:
+ CompressSword1(const std::string &name = "compress_sword1");
+
+ virtual void execute();
+protected:
+ void parseExtraArguments();
+
+ std::string _audioOuputFilename;
+ bool _compSpeech;
+ bool _compMusic;
+
+ int16 *uncompressSpeech(File &clu, uint32 idx, uint32 cSize, uint32 *returnSize);
+ uint8 *convertData(uint8 *rawData, uint32 rawSize, uint32 *resSize);
+ void convertClu(File &clu, File &cl3);
+ void compressSpeech(const Filename *inpath, const Filename *outpath);
+ void compressMusic(const Filename *inpath, const Filename *outpath);
+ void checkFilesExist(bool checkSpeech, bool checkMusic, const Filename *inpath);
+};
+
+#endif
+
+
Property changes on: tools/branches/gsoc2009-gui/compress_sword1.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author URL Id
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list