[Scummvm-cvs-logs] CVS: scummvm script_v2.cpp,1.40,1.41 scumm.h,1.111,1.112 sound.cpp,1.37,1.38

James Brown ender at users.sourceforge.net
Mon Apr 8 09:55:54 CEST 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv7987

Modified Files:
	script_v2.cpp scumm.h sound.cpp 
Log Message:
Start of The Dig voice support. Don't get excited, it doesn't do anything yet. :)




Index: script_v2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v2.cpp,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** script_v2.cpp	7 Apr 2002 04:29:15 -0000	1.40
--- script_v2.cpp	8 Apr 2002 13:55:03 -0000	1.41
***************
*** 2355,2360 ****
  
  void Scumm::o6_talkActor() {
  	_actorToPrintStrFor = pop();
! 	_messagePtr = _scriptPointer;
  	setStringVars(0);
  	actorTalk();
--- 2355,2371 ----
  
  void Scumm::o6_talkActor() {
+ 	char *pointer = NULL, *string = NULL;
  	_actorToPrintStrFor = pop();
! 	pointer = string = (char *)_scriptPointer;
! 
! 	pointer = strtok(pointer, "/");
! 	if (pointer) {
! 			playBundleSound(pointer);
! 			pointer = strtok(NULL, "");				
! 			_messagePtr = (unsigned char *)pointer;
! 	} else {
! 			_messagePtr = (unsigned char *)string;
! 	}
! 	
  	setStringVars(0);
  	actorTalk();
***************
*** 2527,2537 ****
  			_insaneFlag = args[1];
  			break;
! 		case 16: {
  			byte buf[200];
  			_msgPtrToAdd = buf;
  			addMessageToStack(getStringAddress(_vars[VAR_STRING2DRAW]));
! 			warning("o6_miscOps: drawString(%s,charset=%d,color=%d,x=%d,y=%d)",buf, args[1],args[2],args[3],args[4]);
  			break;
- 		}
  		case 17:
  			warning("o6_miscOps: stub17(%d,%d,%d,%d)",args[1],args[2],args[3],args[4]);
--- 2538,2547 ----
  			_insaneFlag = args[1];
  			break;
! 		case 16:
  			byte buf[200];
  			_msgPtrToAdd = buf;
  			addMessageToStack(getStringAddress(_vars[VAR_STRING2DRAW]));
! 			//warning("o6_miscOps: drawString(%s,charset=%d,color=%d,x=%d,y=%d)",buf, args[1],args[2],args[3],args[4]);
  			break;
  		case 17:
  			warning("o6_miscOps: stub17(%d,%d,%d,%d)",args[1],args[2],args[3],args[4]);
***************
*** 2818,2822 ****
  		break;
  	case 75:
! 		_messagePtr = _scriptPointer;
  		switch(m) {
  		case 0: actorTalk(); break;
--- 2828,2832 ----
  		break;
  	case 75:
! 		_messagePtr = _scriptPointer;		
  		switch(m) {
  		case 0: actorTalk(); break;

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm.h,v
retrieving revision 1.111
retrieving revision 1.112
diff -C2 -d -r1.111 -r1.112
*** scumm.h	7 Apr 2002 18:46:37 -0000	1.111
--- scumm.h	8 Apr 2002 13:55:03 -0000	1.112
***************
*** 974,977 ****
--- 974,978 ----
  	MixerChannel *allocateMixer();
  	bool isSfxFinished();
+ 	void playBundleSound(char *sound);
  	void playSfxSound(void *sound, uint32 size, uint rate);
    	void playSfxSound_MP3(void *sound, uint32 size);

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound.cpp,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** sound.cpp	7 Apr 2002 18:46:44 -0000	1.37
--- sound.cpp	8 Apr 2002 13:55:03 -0000	1.38
***************
*** 478,483 ****
  void *Scumm::openSfxFile() {
  	char buf[50];
! 	FILE *file;
  
  	/* Try opening the file <_exe_name>.sou first, eg tentacle.sou.
  	 * That way, you can keep .sou files for multiple games in the
--- 478,490 ----
  void *Scumm::openSfxFile() {
  	char buf[50];
! 	FILE *file = NULL;
  
+ 	if (_gameId == GID_DIG) {
+ 		sprintf(buf, "%s%svoice.bun", _gameDataPath, _exe_name);
+ 		file = fopen(buf, "rb");
+ 		if (!file)
+ 			warning("Unable to open DIG voice bundle: %s", buf);
+ 		return file;
+ 	}
  	/* Try opening the file <_exe_name>.sou first, eg tentacle.sou.
  	 * That way, you can keep .sou files for multiple games in the
***************
*** 609,612 ****
--- 616,623 ----
  }
  #endif
+ 
+ void Scumm::playBundleSound(char *sound) {
+ 	warning("playBundleSound: %s", sound);
+ }
  
  void Scumm::playSfxSound(void *sound, uint32 size, uint rate) {





More information about the Scummvm-git-logs mailing list