[Scummvm-cvs-logs] CVS: scummex Makefile,1.7,1.8 blocks.h,1.7,1.8 file.cpp,1.2,1.3 file.h,1.1.1.1,1.2 resource.cpp,1.19,1.20 resource.h,1.12,1.13 scummex.h,1.15,1.16 wxwindows.cpp,1.29,1.30 mixer.cpp,1.2,NONE mixer.h,1.2,NONE sound.cpp,1.5,NONE sound.h,1.4,NONE

Adrien Mercier yoshizf at users.sourceforge.net
Sun Sep 28 15:06:03 CEST 2003


Update of /cvsroot/scummvm/scummex
In directory sc8-pr-cvs1:/tmp/cvs-serv8413

Modified Files:
	Makefile blocks.h file.cpp file.h resource.cpp resource.h 
	scummex.h wxwindows.cpp 
Removed Files:
	mixer.cpp mixer.h sound.cpp sound.h 
Log Message:
We're now using the mixer from ScummVM instead of SDL_mixer

Index: Makefile
===================================================================
RCS file: /cvsroot/scummvm/scummex/Makefile,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Makefile	27 Sep 2003 09:53:42 -0000	1.7
+++ Makefile	28 Sep 2003 21:49:25 -0000	1.8
@@ -11,18 +11,24 @@
 
 RESSW    := --define __WIN32__ --define __WIN95__ --define __GNUWIN32__
 REZ_CMD  := `wx-config --rezflags`
-OBJS     := file.o scummex.o resource.o mixer.o image.o sound.o wxwindows.o descumm.o descumm6.o codec37.o codec47.o bomp.o scaler.o
+OBJS     := file.o scummex.o resource.o image.o wxwindows.o descumm.o descumm6.o codec37.o codec47.o bomp.o scaler.o util.o
 CXXFLAGS := -DOSUNIX -g -O -Wall -Wuninitialized -Wshadow -Wstrict-prototypes -Wno-unused-variable -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
 CXXFLAGS += `wx-config --cxxflags` `sdl-config --cflags`
-LIBS     := `wx-config --libs` `sdl-config --libs` -lSDL_mixer
-
-# The name for the directory used for depenency tracking
-DEPDIR  := .deps
-DEPDIRS := $(DEPDIR)
+LIBS     := `wx-config --libs` `sdl-config --libs`
+INCLUDES := -I.
+CXXFLAGS += $(INCLUDES)
 
+MODULE_DIRS :=
+MODULES := sound
 
 # Default build rule
 all: scummex
+
+-include $(addsuffix /module.mk,$(MODULES))
+
+# The name for the directory used for depenency tracking
+DEPDIR  := .deps
+DEPDIRS := $(addsuffix /$(DEPDIR),$(MODULE_DIRS))
 
 # Main executable build rule
 scummex: ${OBJS}

Index: blocks.h
===================================================================
RCS file: /cvsroot/scummvm/scummex/blocks.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- blocks.h	26 Sep 2003 23:51:36 -0000	1.7
+++ blocks.h	28 Sep 2003 21:49:25 -0000	1.8
@@ -139,7 +139,11 @@
 	MIDI,
 	GMD,
 	SBL,
-	ZSTR
+	ZSTR,
+	AUhd,
+	WVhd,
+	AUdt,
+	WVdt
 };
 
 enum {

Index: file.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/file.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- file.cpp	18 Sep 2003 19:37:14 -0000	1.2
+++ file.cpp	28 Sep 2003 21:49:25 -0000	1.3
@@ -34,47 +34,6 @@
 	close();
 }
 
-uint16 _debugLevel = 1;
-                                                                                                                                                            
-void debug(int level, const char *s, ...) {
-        char buf[1024];
-        va_list va;
-                                                                                                                                                            
-        if (level > _debugLevel)
-                return;
-                                                                                                                                                            
-        va_start(va, s);
-        vsprintf(buf, s, va);
-        va_end(va);
-        printf("%s\n", buf);
-                                                                                                                                                            
-        fflush(stdout);
-}
-
-void warning(const char *s, ...) {
-        char buf[1024];
-        va_list va;
-                                                                                                                                                            
-        va_start(va, s);
-        vsprintf(buf, s, va);
-        va_end(va);
-        printf("Warning: %s\n", buf);
-                                                                                                                                                            
-        fflush(stdout);
-}
-
-void error(const char *s, ...) {
-        char buf[1024];
-        va_list va;
-                                                                                                                                                            
-        va_start(va, s);
-        vsprintf(buf, s, va);
-        va_end(va);
-        printf("Error: %s\n", buf);
-                                                                                                                                                            
-        fflush(stdout);
-}
-
 bool File::open(const char *filename,  int mode, byte encbyte) {
 	if (_handle) {
 		debug(2, "File %s already opened", filename);

Index: file.h
===================================================================
RCS file: /cvsroot/scummvm/scummex/file.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- file.h	18 Sep 2003 16:26:53 -0000	1.1.1.1
+++ file.h	28 Sep 2003 21:49:25 -0000	1.2
@@ -24,6 +24,7 @@
 
 #include "stdafx.h"
 #include "scummsys.h"
+#include "util.h"
 
 class File {
 private:

Index: resource.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/resource.cpp,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- resource.cpp	26 Sep 2003 23:51:36 -0000	1.19
+++ resource.cpp	28 Sep 2003 21:49:25 -0000	1.20
@@ -24,6 +24,7 @@
 #include "file.h"
 #include "resource.h"
 #include "scummex.h"
+#include "sound/voc.h"
 
 int v8 = 0;
 
@@ -571,6 +572,7 @@
 		case OBIM:
 		case SOUN:
 		case ZPLN:
+		case SBL:
 			_blockTable[index].blockSize = _input.readUint32BE();
 			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
 			bufindex = index;
@@ -659,6 +661,8 @@
 		case ROL:
 		case FTCH:
 		case STOR:
+		case AUhd:
+		case WVhd:
 			_blockTable[index].blockSize = _input.readUint32BE() + 8;
 			_input.seek(_blockTable[index].offset + _blockTable[index].blockSize, SEEK_SET);
 			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
@@ -695,7 +699,12 @@
 			break;
 
 		case Crea:
-			_input.seek(22, SEEK_CUR);
+		case AUdt:
+			if (_blockTable[index].blockTypeID == Crea)
+				_input.seek(22, SEEK_CUR);
+			else
+				_input.seek(4, SEEK_CUR);
+
 			offset = 0;
 			code = 0;
 			while (!quit) {
@@ -708,13 +717,7 @@
 						int rate = _input.readByte();
 						_input.readByte();
 						len -= 2;
-						if (rate == 0xa5 || rate == 0xa6) {
-							_blockTable[index].variables = 11025;
-						} else if (rate == 0xd2 || rate == 0xd3) {
-							_blockTable[index].variables = 22050;
-						} else {
-							_blockTable[index].variables = 1000000L / (256L - rate);
-						}
+						_blockTable[index].variables = getSampleRateFromVOCRate(rate);
 						// FIXME some FT samples (ex. 362) has bad length, 2 bytes too short
 						_input.seek(len, SEEK_CUR);
 						} break;
@@ -750,7 +753,7 @@
 			_gui->add_tree_elements(_blockTable[index].blockName, index, level, _blockTable[index].blockTypeID);
 			index++;
 			break;
-			
+
 		default:
 			_blockTable[index].blockSize = _input.readUint32BE();
 			_input.seek(_blockTable[index].offset + _blockTable[index].blockSize, SEEK_SET);
@@ -856,7 +859,7 @@
 
 int Resource::getBlockType(char *tag) {
 	
-	for (int i=0; i<119; i++) {
+	for (int i=0; i<123; i++) {
 		if(strstr(tag, blocksInfo[i].name)) {
 			return blocksInfo[i].id;
 		}

Index: resource.h
===================================================================
RCS file: /cvsroot/scummvm/scummex/resource.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- resource.h	27 Sep 2003 14:56:11 -0000	1.12
+++ resource.h	28 Sep 2003 21:49:25 -0000	1.13
@@ -181,7 +181,11 @@
 	{115, "MIDI", "", 0, "", 31},
 	{116, "GMD ", "", 0, "", 31},
 	{117, "SBL ", "", 0, "", 31},
-	{118, "ZSTR", "", 0, "", 47}
+	{118, "ZSTR", "", 0, "", 47},
+	{119, "AUhd", "", 0, "", 31},
+	{120, "WVhd", "", 0, "", 31},
+	{121, "AUdt", "", 0, "", 31},
+	{122, "WVdt", "", 0, "", 31}
 };
 
 const struct blockInfo oldBlocksInfo[] = {

Index: scummex.h
===================================================================
RCS file: /cvsroot/scummvm/scummex/scummex.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- scummex.h	27 Sep 2003 14:56:11 -0000	1.15
+++ scummex.h	28 Sep 2003 21:49:25 -0000	1.16
@@ -25,7 +25,7 @@
 
 #include "resource.h"
 #include "image.h"
-#include "sound.h"
+#include "sound/sound.h"
 #include "wxwindows.h"
 
 class ScummEX {
@@ -48,10 +48,6 @@
 	~ScummEX();
 
 	void loadFile(const char *filename);
-
-	void warning(const char *s, ...);
-	void debug(int level, const char *s, ...);
-	void error(const char *s, ...);
 
 	void fileView(int blockid);
 	void FileDump(int blockid, const char *filename);

Index: wxwindows.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummex/wxwindows.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- wxwindows.cpp	28 Sep 2003 10:33:23 -0000	1.29
+++ wxwindows.cpp	28 Sep 2003 21:49:25 -0000	1.30
@@ -335,6 +335,7 @@
 			break;
 
 		case Crea:
+		case AUdt:
 			SpecButton1->SetLabel("Play");
 			SpecButton2->SetLabel("Dump to WAV...");
 			SpecButton1->Show(TRUE);
@@ -537,6 +538,7 @@
 			break;
 			
 		case Crea:
+		case AUdt:
 			updateLabel(SpecLabel[0], "Sample Rate", block.variables);
 			SetButton(block.blockTypeID);
 			break;

--- mixer.cpp DELETED ---

--- mixer.h DELETED ---

--- sound.cpp DELETED ---

--- sound.h DELETED ---





More information about the Scummvm-git-logs mailing list