[Scummvm-cvs-logs] CVS: scummvm/bs2 anims.cpp,1.6,1.7 build_display.cpp,1.8,1.9 build_display.h,1.2,1.3 console.cpp,1.4,1.5 console.h,1.3,1.4 controls.cpp,1.5,1.6 debug.cpp,1.4,1.5 debug.h,1.3,1.4 function.cpp,1.4,1.5 icons.cpp,1.3,1.4 interpreter.h,1.4,1.5 layers.cpp,1.3,1.4 logic.cpp,1.3,1.4 maketext.cpp,1.5,1.6 mouse.cpp,1.6,1.7 protocol.cpp,1.3,1.4 resman.cpp,1.9,1.10 router.cpp,1.5,1.6 save_rest.cpp,1.5,1.6 sound.cpp,1.6,1.7 speech.cpp,1.9,1.10 startup.cpp,1.6,1.7 sword2.cpp,1.7,1.8 sword2.h,1.3,1.4

Oliver Kiehl olki at users.sourceforge.net
Wed Jul 30 12:26:13 CEST 2003


Update of /cvsroot/scummvm/scummvm/bs2
In directory sc8-pr-cvs1:/tmp/cvs-serv11580/bs2

Modified Files:
	anims.cpp build_display.cpp build_display.h console.cpp 
	console.h controls.cpp debug.cpp debug.h function.cpp 
	icons.cpp interpreter.h layers.cpp logic.cpp maketext.cpp 
	mouse.cpp protocol.cpp resman.cpp router.cpp save_rest.cpp 
	sound.cpp speech.cpp startup.cpp sword2.cpp sword2.h 
Log Message:
rename bs2 to sword2 to have the same name as the original engine.
besides this way all our engines start with an "s" ;)


Index: anims.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/anims.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- anims.cpp	29 Jul 2003 12:34:45 -0000	1.6
+++ anims.cpp	30 Jul 2003 19:25:27 -0000	1.7
@@ -107,7 +107,7 @@
 	_animHeader		*anim_head;
  	int32	res = params[2];
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	_standardHeader	*head;	// for animation testing & checking for correct file type
 	#endif
 
@@ -123,7 +123,7 @@
 	if (ob_logic->looping==0)
 	{
 		//-----------------------------------------------------------
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		// For testing all anims!	(James18apr97)
 		// A script loop can send every resource number to the anim function
 		// & it will only run the valid ones
@@ -153,7 +153,7 @@
 		//-----------------------------------------------------------
 
 		//---------------------
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		// check that we haven't been passed a zero resource number
 		if (res==0)
 			Con_fatal_error("Animate: %s (id %d) passed zero anim resource (%s line %u)", FetchObjectName(ID), ID, __FILE__, __LINE__);
@@ -163,7 +163,7 @@
 		anim_file = res_man.Res_open(res);	// open anim file
 
 		//---------------------
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		// check this this resource is actually an animation file!
 		head = (_standardHeader*) anim_file;
 		if (head->fileType!=ANIMATION_FILE)	// if it's not an animation file
@@ -175,7 +175,7 @@
 
 		//---------------------
 		/*
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		// check there's at least one frame
 		if (anim_head->noAnimFrames==0)
  			Con_fatal_error("Animate: %s (%d) has zero frame count! (%s line %u)", FetchObjectName(res), res, __FILE__, __LINE__);
@@ -289,12 +289,12 @@
 	_animHeader		*anim_head;
 	int32	res = params[1];
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	_standardHeader	*head;	// for checking for correct file type
 	#endif
 
 	//---------------------
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	// check that we haven't been passed a zero resource number
 	if (res==0)
 		Con_fatal_error("FN_set_frame: %s (id %d) passed zero anim resource (%s line %u)", FetchObjectName(ID), ID, __FILE__, __LINE__);
@@ -307,7 +307,7 @@
 	anim_file = res_man.Res_open(res);	// open anim file
 
 	//---------------------
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	// check this this resource is actually an animation file!
 	head = (_standardHeader*) anim_file;
 	if (head->fileType!=ANIMATION_FILE)	// if it's not an animation file
@@ -319,7 +319,7 @@
 
 	//---------------------
 	/*
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	// check there's at least one frame
 	if (anim_head->noAnimFrames==0)
 		Con_fatal_error("FN_set_frame: %s (%d) has zero frame count! (%s line %u)", FetchObjectName(res), res, __FILE__, __LINE__);
@@ -515,7 +515,7 @@
 //			1	frame number to start the text displaying
 //			2	frame number to stop the text dispalying
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (sequenceTextLines == MAX_SEQUENCE_TEXT_LINES)
 		Con_fatal_error("FN_add_sequence_text ran out of lines (%s line %u)",__FILE__,__LINE__);
 	#endif
@@ -563,7 +563,7 @@
 
 		//--------------------------------------
 		// Write to walkthrough file (zebug0.txt)
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		Zdebug(0,"(%d) SEQUENCE TEXT: %s", *(uint16*)text, text+2);	// 1st word of text line is the official line number
 		#endif
 		//--------------------------------------
@@ -579,11 +579,11 @@
 			// set up path to speech cluster
 			// first checking if we have speech1.clu or speech2.clu in current directory (for translators to test)
 
-			if (g_bs2->_gameId == GID_BS2_DEMO) {
+			if (g_sword2->_gameId == GID_SWORD2_DEMO) {
 				strcpy(speechFile,"SPEECH.CLU");
 			} else {
 
-				#ifdef _BS2_DEBUG
+				#ifdef _SWORD2_DEBUG
 					if ((res_man.WhichCd()==1) && (!access("speech1.clu",0)))	// if 0 ie. if it's there
 					{
 						strcpy(speechFile,"speech1.clu");
@@ -593,7 +593,7 @@
 						strcpy(speechFile,"speech2.clu");
 					}
 					else
-					#endif	// _BS2_DEBUG
+					#endif	// _SWORD2_DEBUG
 					{
 						strcpy(speechFile,res_man.GetCdPath());
 						strcat(speechFile,"CLUSTERS\\SPEECH.CLU");
@@ -601,7 +601,7 @@
 			}
 			//------------------------------
 
-			wavSize = g_bs2->_sound->GetCompSpeechSize(speechFile, wavId);		// returns size of decompressed wav, or 0 if wav not found
+			wavSize = g_sword2->_sound->GetCompSpeechSize(speechFile, wavId);		// returns size of decompressed wav, or 0 if wav not found
 			if (wavSize)	// if we've got the wav
 			{
 				// allocate memory for speech buffer
@@ -609,7 +609,7 @@
 
 				if (sequence_text_list[line].speech_mem)	// if mem allocated ok (should be fine, but worth checking)
 				{
-					if (g_bs2->_sound->PreFetchCompSpeech(speechFile, wavId, sequence_text_list[line].speech_mem->ad) == RD_OK)	// Load speech & decompress to our buffer
+					if (g_sword2->_sound->PreFetchCompSpeech(speechFile, wavId, sequence_text_list[line].speech_mem->ad) == RD_OK)	// Load speech & decompress to our buffer
 					{
 						Float_mem (sequence_text_list[line].speech_mem);	// now float this buffer so we can make space for the next text sprites and/or speech samples
 						speechRunning=1;	// ok, we've got speech!
@@ -706,7 +706,7 @@
 {
 	uint8 *leadIn;
 	uint32 rv;
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	_standardHeader *header;
 #endif
 
@@ -714,7 +714,7 @@
 	leadIn = res_man.Res_open(params[0]);
 
 	//-----------------------------------------
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	header = (_standardHeader*)leadIn;
 	if (header->fileType != WAV_FILE)
 		Con_fatal_error("FN_smacker_lead_in() given invalid resource (%s line %u)",__FILE__,__LINE__);
@@ -722,10 +722,10 @@
 	//-----------------------------------------
 
 	leadIn += sizeof(_standardHeader);
-	rv = g_bs2->_sound->PlayFx( 0, leadIn, 0, 0, RDSE_FXLEADIN );		// wav data gets copied to sound memory
+	rv = g_sword2->_sound->PlayFx( 0, leadIn, 0, 0, RDSE_FXLEADIN );		// wav data gets copied to sound memory
 
 	//-----------------------------------------
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (rv)
 		Zdebug("SFX ERROR: PlayFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
 	#endif
@@ -755,7 +755,7 @@
  	uint32	rv;	// drivers return value
 	_movieTextObject *sequenceSpeechArray[MAX_SEQUENCE_TEXT_LINES+1];
 	uint8 *leadOut = NULL;
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	_standardHeader *header;
 #endif
 
@@ -794,14 +794,14 @@
 
 	//--------------------------------------------------
 	// check that the name paseed from script is 8 chars or less
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (strlen((char *)params[0]) > 8)
 		Con_fatal_error("Sequence filename too long (%s line %u)",__FILE__,__LINE__);
 	#endif
 	//--------------------------------------------------
 	// add the appropriate file extension & play it
 
-	if (g_bs2->_gameId == GID_BS2_DEMO)
+	if (g_sword2->_gameId == GID_SWORD2_DEMO)
 		sprintf(filename,"%s.smk", (char *)params[0]);
 	else
 		sprintf(filename,"%sSMACKS\\%s.smk", res_man.GetCdPath(), (char *)params[0]);
@@ -809,7 +809,7 @@
 	//--------------------------------------
 	// Write to walkthrough file (zebug0.txt)
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
  	Zdebug(0,"PLAYING SEQUENCE \"%s\"", filename);
 	#endif
    	//--------------------------------------
@@ -826,7 +826,7 @@
 		leadOut = res_man.Res_open(smackerLeadOut);
 
 	 	//---------------------------
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		header = (_standardHeader*)leadOut;
 		if (header->fileType != WAV_FILE)
 			Con_fatal_error("FN_smacker_lead_out() given invalid resource (%s line %u)",__FILE__,__LINE__);
@@ -840,7 +840,7 @@
 	// play the smacker
 
 	FN_stop_music(NULL);	// don't want to carry on streaming game music when smacker starts!
-	g_bs2->_sound->PauseFxForSequence();	// pause sfx during sequence, except the one used for lead-in music
+	g_sword2->_sound->PauseFxForSequence();	// pause sfx during sequence, except the one used for lead-in music
 
 	if (sequenceTextLines)	// if we have some text to accompany this sequence
 		rv = PlaySmacker(filename, sequenceSpeechArray, leadOut);
@@ -857,7 +857,7 @@
 	}
 */
 
-	g_bs2->_sound->UnpauseFx();	// unpause sound fx again, in case we're staying in same location
+	g_sword2->_sound->UnpauseFx();	// unpause sound fx again, in case we're staying in same location
 
  	//--------------------------------------
 	// close the lead-out music resource
@@ -869,7 +869,7 @@
 	}
 	//--------------------------
 	// check the error return-value
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (rv)
 		Zdebug("PlaySmacker(\"%s\") returned 0x%.8x", filename, rv);
 	#endif

Index: build_display.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/build_display.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- build_display.cpp	28 Jul 2003 10:28:29 -0000	1.8
+++ build_display.cpp	30 Jul 2003 19:25:27 -0000	1.9
@@ -70,7 +70,7 @@
 uint32	cur_fgp0;
 uint32	cur_fgp1;
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 uint32 largest_layer_area=0;	// should be reset to zero at start of each screen change
 uint32 largest_sprite_area=0;	// - " -
 char largest_layer_info[128]	= {"largest layer:  none registered"};
@@ -119,13 +119,13 @@
 void	Build_display(void)	//Tony21Sept96
 {
 	BOOL		end;
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	uint8		pal[12]={0,0,0,0,0,0,0,0,0,255,0,0};
 #endif
 	uint8		*file;
 	_multiScreenHeader *screenLayerTable;
 
-#ifdef _BS2_DEBUG	// only used by console
+#ifdef _SWORD2_DEBUG	// only used by console
 	_spriteInfo	spriteInfo;
 	uint32		rv;	// drivers error return value
 #endif
@@ -136,7 +136,7 @@
 	{
 		Start_new_palette();										// start the layer palette fading up
 
-		#ifdef _BS2_DEBUG			// (James23jun97)
+		#ifdef _SWORD2_DEBUG			// (James23jun97)
 		largest_layer_area=0;	// should be reset to zero at start of each screen change
 		largest_sprite_area=0;	// - " -
 		#endif
@@ -283,7 +283,7 @@
 
 
 	}
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	else if (console_status)
 	{
 		spriteInfo.x			= 0;
@@ -312,7 +312,7 @@
 		SetPalette(0, 3, pal, RDPAL_INSTANT);	//force the palette
 		Print_to_console("no valid screen?");
 	}
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 
 }
 
@@ -585,7 +585,7 @@
  	_spriteInfo		spriteInfo;
 	uint32 rv;
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	uint32 current_layer_area=0;
 	#endif
 
@@ -610,7 +610,7 @@
 
 	//------------------------------------------
 	// check for largest layer for debug info
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	current_layer_area = layer_head->width * layer_head->height;
 
 	if (current_layer_area > largest_layer_area)
@@ -640,7 +640,7 @@
 	uint32			spriteType;
 	uint32			rv;
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	uint32 current_sprite_area=0;
 	#endif
 
@@ -702,7 +702,7 @@
 
 	//------------------------------------------
 	// check for largest layer for debug info
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	current_sprite_area = frame_head->width * frame_head->height;
 
 	if (current_sprite_area > largest_sprite_area)
@@ -715,7 +715,7 @@
 
 
 	//-----------------------------------------------------------
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (SYSTEM_TESTING_ANIMS)	// see anims.cpp
 	{
 		if ((spriteInfo.x + spriteInfo.scaledWidth) >= 639)		// bring the anim into the visible screen
@@ -739,7 +739,7 @@
 	//-----------------------------------------------------------
 
 	//--------------------------------------------------
-//	#ifdef _BS2_DEBUG
+//	#ifdef _SWORD2_DEBUG
 //	if (frame_head->width <= 1)
 //	{
 //		Zdebug(8,"WARNING: 1-pixel-wide frame found in %s (%d)", FetchObjectName(build_unit->anim_resource), build_unit->anim_resource);
@@ -817,7 +817,7 @@
 
 	ob_graph	= (Object_graphic *) params[1];
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (ob_graph->anim_resource == 0)
 		Con_fatal_error("ERROR: %s(%d) has no anim resource in Register_frame [line=%d file=%s]", FetchObjectName(ID), ID, __LINE__, __FILE__);
 	#endif
@@ -829,7 +829,7 @@
 	frame_head	= FetchFrameHeader( file, ob_graph->anim_pc );
 
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (ID == CUR_PLAYER_ID)	// update player graphic details for on-screen debug info
 	{
 		playerGraphic.type			= ob_graph->type;
@@ -891,7 +891,7 @@
 
 		if (ob_mouse->pointer)	// only if 'pointer' isn't NULL (James13feb97)
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if	(cur_mouse==TOTAL_mouse_list)
 				Con_fatal_error("ERROR: mouse_list full [%s line %u]",__FILE__,__LINE__);
 			#endif
@@ -942,7 +942,7 @@
 		//---------------
 		case BGP0_SPRITE:
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (cur_bgp0==MAX_bgp0_sprites)
 				Con_fatal_error("ERROR: bgp0_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
 			#endif
@@ -954,7 +954,7 @@
 		//---------------
 		case BGP1_SPRITE:
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (cur_bgp1==MAX_bgp1_sprites)
 				Con_fatal_error("ERROR: bgp1_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
 			#endif
@@ -966,7 +966,7 @@
 		//---------------
 		case BACK_SPRITE:
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (cur_back==MAX_back_sprites)
 				Con_fatal_error("ERROR: back_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
 			#endif
@@ -978,7 +978,7 @@
 		//---------------
 		case SORT_SPRITE:
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (cur_sort==MAX_sort_sprites)
 				Con_fatal_error("ERROR: sort_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
 			#endif
@@ -992,7 +992,7 @@
 		//---------------
 		case FORE_SPRITE:
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (cur_fore==MAX_fore_sprites)
 				Con_fatal_error("ERROR: fore_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
 			#endif
@@ -1004,7 +1004,7 @@
 		//---------------
 		case FGP0_SPRITE:
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (cur_fgp0==MAX_fgp0_sprites)
 				Con_fatal_error("ERROR: fgp0_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
 			#endif
@@ -1016,7 +1016,7 @@
 		//---------------
 		case FGP1_SPRITE:
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (cur_fgp1==MAX_fgp1_sprites)
 				Con_fatal_error("ERROR: fgp1_list full in FN_register_frame [line=%d file=%s]",__LINE__,__FILE__);
 			#endif
@@ -1178,7 +1178,7 @@
 	{
 		head	= (_standardHeader*)res_man.Res_open(palRes);	// open the palette file
 
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		if (head->fileType != PALETTE_FILE)
  			Con_fatal_error("FN_set_palette() called with invalid resource! (%s line %u)",__FILE__,__LINE__);
 		#endif

Index: build_display.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/build_display.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- build_display.h	28 Jul 2003 09:49:45 -0000	1.2
+++ build_display.h	30 Jul 2003 19:25:28 -0000	1.3
@@ -58,7 +58,7 @@
 extern	uint32	cur_fgp0;
 extern	uint32	cur_fgp1;
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 extern char largest_layer_info[128];
 extern char largest_sprite_info[128];
 #endif

Index: console.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/console.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- console.cpp	28 Jul 2003 09:49:45 -0000	1.4
+++ console.cpp	30 Jul 2003 19:25:28 -0000	1.5
@@ -23,7 +23,7 @@
 uint32	console_status=0;	//0 off		// LEFT IN RELEASE VERSION
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 
 //-----------------------------------------------------------------------------------------------------------------------
 //its the console! <great>
@@ -1339,4 +1339,4 @@
 void	Init_console(void) {};
 void	StartConsole(void) {};
 
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG

Index: console.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/console.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- console.h	28 Jul 2003 09:49:45 -0000	1.3
+++ console.h	30 Jul 2003 19:25:28 -0000	1.4
@@ -23,7 +23,7 @@
 #include "driver/driver96.h"
 #include "memory.h"
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 
 void	Init_console(void);	//Tony9Sept96
 uint32	One_console(void);	//Tony12Aug96
@@ -45,7 +45,7 @@
 extern uint8 wantSfxDebug;	// sfx debug file enabled/disabled from console
 
 
-#else	// _BS2_DEBUG
+#else	// _SWORD2_DEBUG
 /*
 #define	Init_console	NULL
 #define	One_console		NULL
@@ -73,7 +73,7 @@
 //#define	Var_check			NULL
 //#define	Var_set				NULL
 
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 
 extern	uint32	console_status;
 

Index: controls.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/controls.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- controls.cpp	29 Jul 2003 12:34:45 -0000	1.5
+++ controls.cpp	30 Jul 2003 19:25:28 -0000	1.6
@@ -1566,7 +1566,7 @@
 
 	FreeAllRouteMem();	// free all the route memory blocks from previous game
 
-	g_bs2->Start_game();	// call the same function that first started us up
+	g_sword2->Start_game();	// call the same function that first started us up
 
 
 //prime system with a game cycle
@@ -1929,12 +1929,12 @@
 
 	fclose(fp);
 
-	g_bs2->_sound->SetMusicVolume(buff[0]);
-	g_bs2->_sound->SetSpeechVolume(buff[1]);
-	g_bs2->_sound->SetFxVolume(buff[2]);
-	g_bs2->_sound->MuteMusic(buff[3]);
-	g_bs2->_sound->MuteSpeech(buff[4]);
-	g_bs2->_sound->MuteFx(buff[5]);
+	g_sword2->_sound->SetMusicVolume(buff[0]);
+	g_sword2->_sound->SetSpeechVolume(buff[1]);
+	g_sword2->_sound->SetFxVolume(buff[2]);
+	g_sword2->_sound->MuteMusic(buff[3]);
+	g_sword2->_sound->MuteSpeech(buff[4]);
+	g_sword2->_sound->MuteFx(buff[5]);
 
 
 	UpdateGraphicsLevel(GetRenderType(), buff[6]);	// (James13jun97)
@@ -1944,7 +1944,7 @@
 	pointerTextSelected = buff[8];
 
 	if (buff[9] != stereoReversed)
-		g_bs2->_sound->ReverseStereo();
+		g_sword2->_sound->ReverseStereo();
 
 	stereoReversed = buff[9];
 
@@ -1956,12 +1956,12 @@
 	uint8 buff[10];
 	FILE *fp;
 
-	buff[0] = g_bs2->_sound->GetMusicVolume();
-	buff[1] = g_bs2->_sound->GetSpeechVolume();
-	buff[2] = g_bs2->_sound->GetFxVolume();
-	buff[3] = g_bs2->_sound->IsMusicMute();
-	buff[4] = g_bs2->_sound->IsSpeechMute();
-	buff[5] = g_bs2->_sound->IsFxMute();
+	buff[0] = g_sword2->_sound->GetMusicVolume();
+	buff[1] = g_sword2->_sound->GetSpeechVolume();
+	buff[2] = g_sword2->_sound->GetFxVolume();
+	buff[3] = g_sword2->_sound->IsMusicMute();
+	buff[4] = g_sword2->_sound->IsSpeechMute();
+	buff[5] = g_sword2->_sound->IsFxMute();
 	buff[6] = GetRenderType();
 	buff[7] = subtitles;
 	buff[8] = pointerTextSelected;
@@ -2094,9 +2094,9 @@
 	int		title_len, subtitle_len, ok_len, cancel_len, left_align, test_len;
 
 // slider values
-	uint8   musicVolume  = g_bs2->_sound->GetMusicVolume();
-	uint8	speechVolume = g_bs2->_sound->GetSpeechVolume();
-	uint8	fxVolume	 = g_bs2->_sound->GetFxVolume();
+	uint8   musicVolume  = g_sword2->_sound->GetMusicVolume();
+	uint8	speechVolume = g_sword2->_sound->GetSpeechVolume();
+	uint8	fxVolume	 = g_sword2->_sound->GetFxVolume();
 	uint8	grfxLevel    = GetRenderType();
 
 // safe slider values for restoring on cancel
@@ -2197,9 +2197,9 @@
 	uint8 subtitle_state = subtitles;
 	uint8 stereo_state   = stereoReversed;
 
-	uint8 music_mute_state   = g_bs2->_sound->IsMusicMute();
-	uint8 speech_mute_state  = g_bs2->_sound->IsSpeechMute();
-	uint8 fx_mute_state	     = g_bs2->_sound->IsFxMute();
+	uint8 music_mute_state   = g_sword2->_sound->IsMusicMute();
+	uint8 speech_mute_state  = g_sword2->_sound->IsSpeechMute();
+	uint8 fx_mute_state	     = g_sword2->_sound->IsFxMute();
 
 
 //build the button surfaces surfaces
@@ -2359,19 +2359,19 @@
 		}
 
 		if (!music_mute_state)
-			g_bs2->_sound->SetMusicVolume(musicVolume);
+			g_sword2->_sound->SetMusicVolume(musicVolume);
 		else
-			g_bs2->_sound->SetMusicVolume(0);
+			g_sword2->_sound->SetMusicVolume(0);
 
 		if (!fx_mute_state)
-			g_bs2->_sound->SetFxVolume(fxVolume);
+			g_sword2->_sound->SetFxVolume(fxVolume);
 		else
-			g_bs2->_sound->SetFxVolume(0);
+			g_sword2->_sound->SetFxVolume(0);
 
 		if (!speech_mute_state)
-			g_bs2->_sound->SetSpeechVolume(speechVolume);
+			g_sword2->_sound->SetSpeechVolume(speechVolume);
 		else
-			g_bs2->_sound->SetSpeechVolume(0);
+			g_sword2->_sound->SetSpeechVolume(0);
 
 		//--------------------------------------------------
  		// Service windows
@@ -2555,19 +2555,19 @@
 				{
 					UpdateGraphicsLevel(safe_grfxLevel, grfxLevel);	// (James13jun97)
 
-					g_bs2->_sound->MuteMusic(music_mute_state);					// Ensure all the levels are recorded correctly (Pete21Aug97)
-					g_bs2->_sound->MuteSpeech(speech_mute_state);
-					g_bs2->_sound->MuteFx(fx_mute_state);
-					g_bs2->_sound->SetMusicVolume(music_target);
-					g_bs2->_sound->SetSpeechVolume(speech_target);
-					g_bs2->_sound->SetFxVolume(fx_target);
+					g_sword2->_sound->MuteMusic(music_mute_state);					// Ensure all the levels are recorded correctly (Pete21Aug97)
+					g_sword2->_sound->MuteSpeech(speech_mute_state);
+					g_sword2->_sound->MuteFx(fx_mute_state);
+					g_sword2->_sound->SetMusicVolume(music_target);
+					g_sword2->_sound->SetSpeechVolume(speech_target);
+					g_sword2->_sound->SetFxVolume(fx_target);
 
 					subtitles = subtitle_state;    // Save object label and subtitle settings
 					pointerTextSelected = object_state;
 					speechSelected      = !speech_mute_state;
 
 					if (stereo_state != stereoReversed)
-						g_bs2->_sound->ReverseStereo();
+						g_sword2->_sound->ReverseStereo();
 
 					stereoReversed      = stereo_state;
 					WriteOptionSettings();
@@ -2591,17 +2591,17 @@
 
 				if (touching_music_mute && dmusic_mute_state) {
 					music_mute_state = dmusic_mute_state = 0;  // if the button was in now let it out
-					g_bs2->_sound->MuteMusic(0);
+					g_sword2->_sound->MuteMusic(0);
 				}
 
 				if (touching_fx_mute && dfx_mute_state) {
 					fx_mute_state = dfx_mute_state = 0;  // if the button was in now let it out
-					g_bs2->_sound->MuteFx(0);
+					g_sword2->_sound->MuteFx(0);
 				}
 
 				if (touching_speech_mute && dspeech_mute_state) {
 					speech_mute_state = dspeech_mute_state = 0;  // if the button was in now let it out
-					g_bs2->_sound->MuteSpeech(0);
+					g_sword2->_sound->MuteSpeech(0);
 				}
 
 				// Stop tracking any sliders
@@ -2649,7 +2649,7 @@
 					else
 					{
 						music_mute_state = 1;
-						g_bs2->_sound->MuteMusic(1);
+						g_sword2->_sound->MuteMusic(1);
 					}
 				}
 
@@ -2660,7 +2660,7 @@
 					else
 					{
 						fx_mute_state=1;
-						g_bs2->_sound->MuteFx(1);
+						g_sword2->_sound->MuteFx(1);
 					}
 				}
 
@@ -2671,7 +2671,7 @@
 					else
 					{
 						speech_mute_state=1;
-						g_bs2->_sound->MuteSpeech(1);
+						g_sword2->_sound->MuteSpeech(1);
 					}
 				}
 
@@ -2680,7 +2680,7 @@
 					if (music_mute_state)
 					{
 						music_mute_state = 0;
-						g_bs2->_sound->MuteMusic(0);
+						g_sword2->_sound->MuteMusic(0);
 					}
 
 					if (mousex>(slab_sprite[0].x+SLIDER_W))
@@ -2707,7 +2707,7 @@
 					if (speech_mute_state)
 					{
 						speech_mute_state = 0;
-						g_bs2->_sound->MuteSpeech(0);
+						g_sword2->_sound->MuteSpeech(0);
 					}
 
 					if (mousex>(slab_sprite[1].x+SLIDER_W))
@@ -2734,7 +2734,7 @@
 					if (fx_mute_state)
 					{
 						fx_mute_state = 0;
-						g_bs2->_sound->MuteFx(0);
+						g_sword2->_sound->MuteFx(0);
 					}
 
 					if (mousex>(slab_sprite[2].x+SLIDER_W))

Index: debug.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/debug.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- debug.cpp	28 Jul 2003 09:49:45 -0000	1.4
+++ debug.cpp	30 Jul 2003 19:25:28 -0000	1.5
@@ -26,7 +26,7 @@
 #include "debug.h"
 //--------------------------------------------------------------------------------------
 
-#ifdef _BS2_DEBUG  // this whole file (except ExitWithReport) only included on debug versions
+#ifdef _SWORD2_DEBUG  // this whole file (except ExitWithReport) only included on debug versions
 
 #include <stdlib.h>
 
@@ -86,7 +86,7 @@
 void Plot_cross_hair( int16 x, int16 y, uint8 pen );
 void DrawRect( int16 x, int16 y, int16 x2, int16 y2, uint8 pen );
 //--------------------------------------------------------------------------------------
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 
 // THIS FUNCTION STAYS IN THE RELEASE VERSION
 // IN FACT, CON_FATAL_ERROR IS MAPPED TO THIS AS WELL, SO WE HAVE A MORE PRESENTABLE ERROR REPORT
@@ -113,7 +113,7 @@
 	exit(0);
 }
 
-#ifdef _BS2_DEBUG	// all other functions only for _BS2_DEBUG version
+#ifdef _SWORD2_DEBUG	// all other functions only for _SWORD2_DEBUG version
 //--------------------------------------------------------------------------------------
 void Zdebug(const char *format,...)	//Tony's special debug logging file March96
 {
@@ -550,5 +550,5 @@
 
 void Draw_debug_graphics(void) {};
 
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 //--------------------------------------------------------------------------------------

Index: debug.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/debug.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- debug.h	28 Jul 2003 09:49:45 -0000	1.3
+++ debug.h	30 Jul 2003 19:25:28 -0000	1.4
@@ -21,7 +21,7 @@
 #define D_DEBUG
 
 //--------------------------------------------------------------------------------------
-#ifdef _BS2_DEBUG	// this whole file only included on debug versions
+#ifdef _SWORD2_DEBUG	// this whole file only included on debug versions
 
 
 //#include "src\driver96.h"
@@ -69,7 +69,7 @@
 void Print_current_info(void);	//Tony30Oct96
 
 
-#else	// ie. not _BS2_DEBUG
+#else	// ie. not _SWORD2_DEBUG
 
 /* gcc doesn't like this - khalek
 #define Zdebug				NULL
@@ -82,7 +82,7 @@
 void Build_debug_text(void);	// James's debug text display
 void Draw_debug_graphics(void);	// James's debug graphics display
 
-#endif	// _BS2_DEBUG	// this whole file only included on debug versions
+#endif	// _SWORD2_DEBUG	// this whole file only included on debug versions
 //--------------------------------------------------------------------------------------
 
 void ExitWithReport(const char *format,...);	// (6dec96 JEL) IN BOTH DEBUG & RELEASE VERSIONS

Index: function.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/function.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- function.cpp	29 Jul 2003 12:34:45 -0000	1.4
+++ function.cpp	30 Jul 2003 19:25:28 -0000	1.5
@@ -284,7 +284,7 @@
 {
 	// params	0: colour to flash
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 
 	uint32 count;
 
@@ -315,7 +315,7 @@
 
 	SetPalette(0, 1, black, RDPAL_INSTANT);
 
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 
 	return(IR_CONT);
 }
@@ -327,7 +327,7 @@
 {
 	// params	0: colour (see defines above)
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 
 	switch (params[0])	// what colour?
 	{
@@ -352,7 +352,7 @@
 			break;
 	}
 
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 
 	return(IR_CONT);
 }
@@ -430,7 +430,7 @@
 		StopMusic();	// Stop any streaming music
 		
 		for (int i = 0; i<16; i++)
-			g_bs2->_sound->UpdateCompSampleStreaming();	// And wait for it to die
+			g_sword2->_sound->UpdateCompSampleStreaming();	// And wait for it to die
 
 		GetDrawStatus (&ds);
 		GetSoundStatus(&ss);

Index: icons.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/icons.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- icons.cpp	28 Jul 2003 09:49:45 -0000	1.3
+++ icons.cpp	30 Jul 2003 19:25:28 -0000	1.4
@@ -44,7 +44,7 @@
 
 //	Zdebug("FN_add_menu_object icon res");
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (total_temp == TOTAL_engine_pockets)
 		Con_fatal_error("TOTAL_engine_pockets exceeded! (%s line %u)",__FILE__,__LINE__);
 #endif

Index: interpreter.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/interpreter.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- interpreter.h	28 Jul 2003 11:54:26 -0000	1.4
+++ interpreter.h	30 Jul 2003 19:25:28 -0000	1.5
@@ -30,19 +30,19 @@
 
 extern int g_debugFlag;
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 
 #define DEBUG1(x,y)		if(g_debugFlag){engine.AddTextLine(CVString(x,y),VS_COL_DEBUG);}
 #define DEBUG2(x,y,z)	if(g_debugFlag){engine.AddTextLine(CVString(x,y,z),VS_COL_DEBUG);}
 #define DEBUG3(x,y,z,a)	if(g_debugFlag){engine.AddTextLine(CVString(x,y,z,a),VS_COL_DEBUG);}
 
-#else //_BS2_DEBUG
+#else //_SWORD2_DEBUG
 
 #define DEBUG1
 #define DEBUG2
 #define DEBUG3
 
-#endif //_BS2_DEBUG
+#endif //_SWORD2_DEBUG
 
 #else //INSIDE_LINC
 

Index: layers.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/layers.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- layers.cpp	28 Jul 2003 09:49:45 -0000	1.3
+++ layers.cpp	30 Jul 2003 19:25:29 -0000	1.4
@@ -65,7 +65,7 @@
 
 	//--------------------------------------
 	// Write to walkthrough file (zebug0.txt)
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	Zdebug(0,"=====================================");
 	Zdebug(0,"CHANGED TO LOCATION \"%s\"", FetchObjectName(*params));
 	Zdebug(0,"=====================================");
@@ -80,14 +80,14 @@
 	Clear_fx_queue();		// stops all fx & clears the queue (James22july97)
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	Zdebug("FN_init_background(%d)", *params);
 
 	if	(!*params)
 	{
 		Con_fatal_error("ERROR: FN_set_background cannot have 0 for background layer id! (%s line=%u)",__FILE__,__LINE__);
 	}
-#endif // _BS2_DEBUG
+#endif // _SWORD2_DEBUG
 
 
 	//-------------------------------------------------------

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/logic.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- logic.cpp	28 Jul 2003 09:49:45 -0000	1.3
+++ logic.cpp	30 Jul 2003 19:25:29 -0000	1.4
@@ -401,7 +401,7 @@
 
 		if (entry == kills)	// if this ID isn't already in the list, then add it, (otherwise finish) (05mar97 James)
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (kills == OBJECT_KILL_LIST_SIZE)	// no room at the inn
 				Con_fatal_error("List full in FN_add_to_kill_list(%u) (%s line %u)",ID,__FILE__,__LINE__);
 			#endif

Index: maketext.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/maketext.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- maketext.cpp	28 Jul 2003 09:49:45 -0000	1.5
+++ maketext.cpp	30 Jul 2003 19:25:29 -0000	1.6
@@ -284,7 +284,7 @@
 		{
 			charPtr = FindChar( sentence[pos++], charSet );
 
-			#ifdef _BS2_DEBUG			
+			#ifdef _SWORD2_DEBUG			
 			if ((charPtr->height) != charHeight)
 				Con_fatal_error("FONT ERROR: '%c' is not same height as the space (%s line %u)",sentence[pos-1],__FILE__,__LINE__);
 			#endif
@@ -425,11 +425,11 @@
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 #define	MAX_text_blocs	MAX_DEBUG_TEXT_BLOCKS+1	// allow enough for all the debug text blocks (see debug.cpp)
 #else
 #define	MAX_text_blocs	2	// only need one for speech, and possibly one for "PAUSED"
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 
 typedef	struct
 {
@@ -469,7 +469,7 @@
 	while((j<MAX_text_blocs)&&(text_sprite_list[j].text_mem))
 		j++;
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if	(j==MAX_text_blocs)	//we've run out
 		Con_fatal_error("Build_new_block ran out of blocks! (%s line %u)",__FILE__,__LINE__);	//might as well stop the system
 #endif
@@ -644,7 +644,7 @@
 	//---------------------------------------------------------------------------------
 	// Get the game name for the windows application
 
-	if (g_bs2->_gameId == GID_BS2_DEMO)
+	if (g_sword2->_gameId == GID_SWORD2_DEMO)
 		textLine = FetchTextLine(textFile, 451 )+2;	// get the text line (& skip the 2 chars containing the wavId)
 	else
 		textLine = FetchTextLine(textFile, 54 )+2;	// get the text line (& skip the 2 chars containing the wavId)

Index: mouse.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/mouse.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- mouse.cpp	29 Jul 2003 12:34:45 -0000	1.6
+++ mouse.cpp	30 Jul 2003 19:25:29 -0000	1.7
@@ -235,7 +235,7 @@
 						}
 
 					//------------------------
-					rv = g_bs2->_sound->PauseFx();
+					rv = g_sword2->_sound->PauseFx();
 					if (rv != RD_OK)
 						Zdebug("ERROR: PauseFx() returned %.8x in SystemMenu()", rv);
   					//------------------------
@@ -309,7 +309,7 @@
 						this_screen.new_palette=1;
 
 					//------------------------
-					rv = g_bs2->_sound->UnpauseFx();
+					rv = g_sword2->_sound->UnpauseFx();
 					if (rv != RD_OK)
 						Zdebug("ERROR: UnpauseFx() returned %.8x in SystemMenu()", rv);
 					//------------------------
@@ -392,7 +392,7 @@
 
 			//--------------------------------------
 			// Write to walkthrough file (zebug0.txt)
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			Zdebug(0,"USED \"%s\" ICON ON %s", FetchObjectName(OBJECT_HELD), FetchObjectName(CLICKED_ID));
 			#endif
 			//--------------------------------------
@@ -429,7 +429,7 @@
 
 						//--------------------------------------
 						// Write to walkthrough file (zebug0.txt)
-						#ifdef _BS2_DEBUG
+						#ifdef _SWORD2_DEBUG
 						Zdebug(0,"USED \"%s\" ICON ON \"%s\" ICON", FetchObjectName(OBJECT_HELD), FetchObjectName(COMBINE_BASE));
 						#endif
 						//--------------------------------------
@@ -488,7 +488,7 @@
 
 					//--------------------------------------
 					// Write to walkthrough file (zebug0.txt)
-					#ifdef _BS2_DEBUG
+					#ifdef _SWORD2_DEBUG
 					Zdebug(0,"RIGHT-CLICKED ON \"%s\" ICON", FetchObjectName(OBJECT_HELD));
 					#endif
  					//--------------------------------------
@@ -600,7 +600,7 @@
 	me = MouseEvent();	//get mouse event
 
 	//-----------------------------------------------------
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (definingRectangles)
 	{
 		if (draggingRectangle==0)	// not yet dragging a rectangle, so need click to start
@@ -633,7 +633,7 @@
 		}
 	}
 	else
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 	//-----------------------------------------------------
 	{
 
@@ -697,7 +697,7 @@
 
 				//--------------------------------------
 				// Write to walkthrough file (zebug0.txt)
-				#ifdef _BS2_DEBUG
+				#ifdef _SWORD2_DEBUG
 				if (OBJECT_HELD)
 					Zdebug(0,"USED \"%s\" ICON ON %s", FetchObjectName(OBJECT_HELD), FetchObjectName(CLICKED_ID));
 				else if (LEFT_BUTTON)
@@ -1170,7 +1170,7 @@
 int32 FN_add_human(int32 *params)	//Tony30Sept96
 {
 	//param	none
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	uint8 black[4]	= {0,0,0,0};
 	uint8 white[4]	= {255,255,255,0};
 #endif									// ('0' means don't print to console, but console isn't up anyway)
@@ -1215,7 +1215,7 @@
 
 	//----------------------------------------------------------------------------------------------
 	// enabled/disabled from console; status printed with on-screen debug info
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (testingSnR)						// testing logic scripts by simulating an instant Save & Restore
 	{
 		SetPalette(0, 1, white, RDPAL_INSTANT);
@@ -1249,7 +1249,7 @@
 
 	if (ob_mouse->pointer)	// only if 'pointer' isn't NULL
 	{
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		if	(cur_mouse==TOTAL_mouse_list)
 			Con_fatal_error("ERROR: mouse_list full [%s line %u]",__FILE__,__LINE__);
 		#endif
@@ -1290,7 +1290,7 @@
 {
 //	param 0 local id of text line to use as pointer text
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if	(cur_mouse==TOTAL_mouse_list)
 		Con_fatal_error("ERROR: mouse_list full [%s line %u]",__FILE__,__LINE__);
 	#endif

Index: protocol.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/protocol.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- protocol.cpp	28 Jul 2003 09:49:45 -0000	1.3
+++ protocol.cpp	30 Jul 2003 19:25:29 -0000	1.4
@@ -82,7 +82,7 @@
 
 	screenHead = FetchScreenHeader(screenFile);
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (layerNo > (screenHead->noLayers-1))	// layer number too large!
 		Con_fatal_error("FetchLayerHeader(%d) invalid layer number! (%s line %u)",layerNo,__FILE__,__LINE__);
 #endif
@@ -123,7 +123,7 @@
 
 	animHead = FetchAnimHeader(animFile);
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (frameNo > (animHead->noAnimFrames-1))	// frame number too large!
 		Con_fatal_error("FetchCdtEntry(animFile,%d) - anim only %d frames (%s line %u)",frameNo,animHead->noAnimFrames,__FILE__,__LINE__);
 #endif
@@ -147,7 +147,7 @@
 {
 	_multiScreenHeader *mscreenHeader = (_multiScreenHeader *) (screenFile + sizeof(_standardHeader));
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (mscreenHeader->bg_parallax[layer] == 0)
 		Con_fatal_error("FetchBackgroundParallaxLayer(%d) - No parallax layer exists (%s line %u)",layer,__FILE__,__LINE__);
 #endif
@@ -159,7 +159,7 @@
 {
 	_multiScreenHeader *mscreenHeader = (_multiScreenHeader *) (screenFile + sizeof(_standardHeader));
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (mscreenHeader->screen == 0)
 		Con_fatal_error("FetchBackgroundLayer (%d) - No background layer exists (%s line %u)",__FILE__,__LINE__);
 #endif
@@ -171,7 +171,7 @@
 {
 	_multiScreenHeader *mscreenHeader = (_multiScreenHeader *) (screenFile + sizeof(_standardHeader));
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (mscreenHeader->fg_parallax[layer] == 0)
 		Con_fatal_error("FetchForegroundParallaxLayer(%d) - No parallax layer exists (%s line %u)",layer,__FILE__,__LINE__);
 #endif

Index: resman.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/resman.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- resman.cpp	28 Jul 2003 10:28:29 -0000	1.9
+++ resman.cpp	30 Jul 2003 19:25:29 -0000	1.10
@@ -100,7 +100,7 @@
 	total_clusters=0;
 
 
-	if (file.open("resource.inf", g_bs2->getGameDataPath()) == false) {
+	if (file.open("resource.inf", g_sword2->getGameDataPath()) == false) {
 		Zdebug("InitResMan cannot *OPEN* resource.inf");
 		ExitWithReport("InitResMan cannot *OPEN* resource.inf [file=%s line=%u]",__FILE__,__LINE__);
 	}
@@ -150,7 +150,7 @@
 
 
 //now load in the binary id to res conversion table
-	if (file.open("resource.tab", g_bs2->getGameDataPath()) == false) {
+	if (file.open("resource.tab", g_sword2->getGameDataPath()) == false) {
 		Zdebug("InitResMan cannot *OPEN* resource.tab");
 		ExitWithReport("InitResMan cannot *OPEN* resource.tab [file=%s line=%u]",__FILE__,__LINE__);
 	}
@@ -175,7 +175,7 @@
 	file.close();
 
 
-	if (file.open("cd.inf", g_bs2->getGameDataPath()) == false) {
+	if (file.open("cd.inf", g_sword2->getGameDataPath()) == false) {
 		Zdebug("InitResMan cannot *OPEN* cd.inf");
 		ExitWithReport("InitResMan cannot *OPEN* cd.inf [file=%s line=%u]",__FILE__,__LINE__);
 	}
@@ -242,7 +242,7 @@
 */
 
 
-	if (file.open("revcd1.id", g_bs2->getGameDataPath()) == false) {
+	if (file.open("revcd1.id", g_sword2->getGameDataPath()) == false) {
 		int index = 0;
 /*
 		// Scan for CD drives.
@@ -306,7 +306,7 @@
 	uint32	table_offset;
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if	(res>=total_res_files)
 		Con_fatal_error("Res_open illegal resource %d (there are %d resources 0-%d)", res, total_res_files, total_res_files-1);
 #endif
@@ -319,7 +319,7 @@
 
 		parent_res_file = res_conv_table[res*2];	//points to the number of the ascii filename
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		if	(parent_res_file==0xffff)
 			Con_fatal_error("Res_open tried to open null & void resource number %d", res);
 #endif
@@ -344,7 +344,7 @@
 		}
 
 		//open the cluster file
-		if (file.open(resource_files[parent_res_file], g_bs2->getGameDataPath()) == false) 
+		if (file.open(resource_files[parent_res_file], g_sword2->getGameDataPath()) == false) 
 			Con_fatal_error("Res_open cannot *OPEN* %s", resource_files[parent_res_file]);
 
 
@@ -420,13 +420,13 @@
 {
 //increment the cycle and calculate actual per-cycle memory useage
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	uint32	j;
 #endif
 
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	current_memory_useage=0;
 
 	for	(j=1;j<total_res_files;j++)
@@ -460,7 +460,7 @@
 //resource floats when count=0
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if	(res>=total_res_files)
 		Con_fatal_error("Res_closeing illegal resource %d (there are %d resources 0-%d)", res, total_res_files, total_res_files-1);
 
@@ -742,7 +742,7 @@
 		res = atoi((char*)input);
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		if	(!res)
 			Print_to_console("illegal resource");
 
@@ -1372,7 +1372,7 @@
 	uint8		 *textRes;
 
 	//----------------------------------------------------------------------------------------
-	if (g_bs2->_gameId == GID_BS2_DEMO)
+	if (g_sword2->_gameId == GID_SWORD2_DEMO)
 		return;		// don't ask for CD's in the playable demo downloaded from our web-site!
 
 	#ifdef _PCGUIDE

Index: router.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/router.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- router.cpp	28 Jul 2003 12:24:13 -0000	1.5
+++ router.cpp	30 Jul 2003 19:25:29 -0000	1.6
@@ -319,7 +319,7 @@
 	{
 		slotNo++;
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 		if (slotNo == TOTAL_ROUTE_SLOTS)
 			Con_fatal_error("ERROR: route_slots[] full in AllocateRouteMem() (%s line %u)",__FILE__,__LINE__);
 	#endif
@@ -722,7 +722,7 @@
 
 		options = NewCheck(1, route[p].x, route[p].y, route[p + 1].x, route[p + 1].y);
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		if (options == 0)
 		{
 			Zdebug("BestTurns fail %d %d %d %d",route[p].x, route[p].y, route[p + 1].x, route[p + 1].y);
@@ -756,7 +756,7 @@
 #endif
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		if (steps == 0)
 		{
 			Zdebug("BestTurns failed %d %d %d %d",route[p].x, route[p].y, route[p + 1].x, route[p + 1].y);
@@ -1459,7 +1459,7 @@
 
 
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 	if (lastRealDir == 99)
 	{
 		Con_fatal_error("SlidyWalkAnimatorlast direction error (%s line %u)",__FILE__,__LINE__);
@@ -2988,7 +2988,7 @@
 			//-------------------------------
 			// check that we're not going to exceed the max allowed in the complete walkgrid arrays
 
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if ((nbars+theseBars) >= O_GRID_SIZE)
 				Con_fatal_error("Adding walkgrid(%d): %d+%d bars exceeds max %d (%s line %u)", walkGridList[entry], nbars, theseBars, O_GRID_SIZE, __FILE__, __LINE__);
 

Index: save_rest.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/save_rest.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- save_rest.cpp	28 Jul 2003 11:56:34 -0000	1.5
+++ save_rest.cpp	30 Jul 2003 19:25:29 -0000	1.6
@@ -367,7 +367,7 @@
 
 	//--------------------------------------
 	// Write to walkthrough file (zebug0.txt)
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	Zdebug(0,"*************************************");
 	Zdebug(0,"RESTORED GAME \"%s\"", header.description);
 	Zdebug(0,"*************************************");

Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sound.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sound.cpp	29 Jul 2003 12:34:45 -0000	1.6
+++ sound.cpp	30 Jul 2003 19:25:29 -0000	1.7
@@ -111,7 +111,7 @@
 			}
 			else if (fxq[j].type == FX_SPOT2)
 			{
-				if (g_bs2->_sound->IsFxOpen(j+1))
+				if (g_sword2->_sound->IsFxOpen(j+1))
 					fxq[j].resource = 0;		// Once the Fx has finished remove it from the queue.
 			}
 		}
@@ -131,7 +131,7 @@
 	{
 		data = res_man.Res_open(fxq[j].resource);						// load in the sample
 		data += sizeof(_standardHeader);
-		rv = g_bs2->_sound->PlayFx( id, data, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT );		// wav data gets copied to sound memory
+		rv = g_sword2->_sound->PlayFx( id, data, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT );		// wav data gets copied to sound memory
 		res_man.Res_close(fxq[j].resource);								// release the sample
 //		fxq[j].resource = 0;											// clear spot fx from queue
 	}
@@ -139,12 +139,12 @@
 	{		// - to be referenced by 'j', so pass NULL data
 
 		if (fxq[j].type == FX_RANDOM)
-			rv = g_bs2->_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT );	// not looped
+			rv = g_sword2->_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXSPOT );	// not looped
 		else			// FX_LOOP
-			rv = g_bs2->_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXLOOP );	// looped
+			rv = g_sword2->_sound->PlayFx( id, NULL, fxq[j].volume, fxq[j].pan, RDSE_FXLOOP );	// looped
 	}
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (rv)
 		Zdebug("SFX ERROR: PlayFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
 	#endif
@@ -172,7 +172,7 @@
 	uint32 rv;
 
 	//----------------------------------
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 
 	_standardHeader *header;
 	char type[10];
@@ -201,7 +201,7 @@
 		Zdebug("SFX (sample=\"%s\", vol=%d, pan=%d, delay=%d, type=%s)", FetchObjectName(params[0]), params[3], params[4], params[2], type);
 	}
 
-	#endif	//_BS2_DEBUG
+	#endif	//_SWORD2_DEBUG
 	//----------------------------------
 
 	while ((j < FXQ_LENGTH) && (fxq[j].resource != 0))
@@ -228,7 +228,7 @@
 
 		if (fxq[j].type == FX_SPOT)						// spot fx
 		{
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
  			data = res_man.Res_open(fxq[j].resource);	// "pre-load" the sample; this gets it into memory
 			header = (_standardHeader*)data;
 			if (header->fileType != WAV_FILE)
@@ -244,16 +244,16 @@
 
 			data = res_man.Res_open(fxq[j].resource);	// load in the sample
 
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			header = (_standardHeader*)data;
 			if (header->fileType != WAV_FILE)
 				Con_fatal_error("FN_play_fx given invalid resource (%s line %u)",__FILE__,__LINE__);
 			#endif
 
 			data += sizeof(_standardHeader);
-			rv = g_bs2->_sound->OpenFx(id,data);							// copy it to sound memory, using position in queue as 'id'
+			rv = g_sword2->_sound->OpenFx(id,data);							// copy it to sound memory, using position in queue as 'id'
 
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (rv)
 				Zdebug("SFX ERROR: OpenFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
 			#endif
@@ -289,7 +289,7 @@
 //			2	new pan (-16..16)
 
 //	SetFxVolumePan(int32 id, uint8 vol, uint8 pan);
-	g_bs2->_sound->SetFxVolumePan(1+params[0], params[1], params[2]);	// driver fx_id is 1+<pos in queue>
+	g_sword2->_sound->SetFxVolumePan(1+params[0], params[1], params[2]);	// driver fx_id is 1+<pos in queue>
 //	Zdebug("%d",params[2]);
 
 	return (IR_CONT);
@@ -302,7 +302,7 @@
 //			1	new volume (0..16)
 
 //	SetFxIdVolume(int32 id, uint8 vol);
-	g_bs2->_sound->SetFxIdVolume(1+params[0], params[1]);
+	g_sword2->_sound->SetFxIdVolume(1+params[0], params[1]);
 
 	return (IR_CONT);
 }
@@ -321,9 +321,9 @@
 	if ((fxq[j].type == FX_RANDOM) || (fxq[j].type == FX_LOOP))
 	{
 		id = (uint32)j+1;	// because 0 is not a valid id
-		rv = g_bs2->_sound->CloseFx(id);		// stop fx & remove sample from sound memory
+		rv = g_sword2->_sound->CloseFx(id);		// stop fx & remove sample from sound memory
 
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		if (rv)
 			Zdebug("SFX ERROR: CloseFx() returned %.8x (%s line %u)", rv, __FILE__, __LINE__);
 		#endif
@@ -350,7 +350,7 @@
 
 void Clear_fx_queue(void)
 {
-	g_bs2->_sound->ClearAllFx();			// stop all fx & remove the samples from sound memory
+	g_sword2->_sound->ClearAllFx();			// stop all fx & remove the samples from sound memory
 	Init_fx_queue();		// clean out the queue
 }
 
@@ -410,14 +410,14 @@
 
 	// add the appropriate file extension & play it
 
-	if (g_bs2->_gameId == GID_BS2_DEMO)
+	if (g_sword2->_gameId == GID_SWORD2_DEMO)
 		sprintf(filename,"MUSIC.CLU");
 	else
 		sprintf(filename,"%sCLUSTERS\\MUSIC.CLU", res_man.GetCdPath());
 
-	rv = g_bs2->_sound->StreamCompMusic(filename, params[0], loopFlag);
+	rv = g_sword2->_sound->StreamCompMusic(filename, params[0], loopFlag);
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 		if (rv)
 	 		Zdebug("ERROR: StreamCompMusic(%s, %d, %d) returned error 0x%.8x", filename, params[0], loopFlag, rv);
 	#endif
@@ -435,7 +435,7 @@
 
 	looping_music_id=0;		// clear the 'looping' flag
 
-	g_bs2->_sound->StopMusic();
+	g_sword2->_sound->StopMusic();
 
 	if (params);
 
@@ -448,11 +448,11 @@
 	uint8 count;
 
 	looping_music_id=0;		// clear the 'looping' flag
-	g_bs2->_sound->StopMusic();
+	g_sword2->_sound->StopMusic();
 
 	// THIS BIT CAUSES THE MUSIC TO STOP INSTANTLY!
 	for(count=0; count<16; count++)
-		g_bs2->_sound->UpdateCompSampleStreaming();
+		g_sword2->_sound->UpdateCompSampleStreaming();
 }
 //--------------------------------------------------------------------------------------
 int32 FN_check_music_playing(int32 *params)		// James (30july97)
@@ -462,7 +462,7 @@
 	// sets result to no. of seconds of current tune remaining
 	// or 0 if no music playing
 
-	RESULT = g_bs2->_sound->MusicTimeRemaining();	// in seconds, rounded up to the nearest second
+	RESULT = g_sword2->_sound->MusicTimeRemaining();	// in seconds, rounded up to the nearest second
 
 	return(IR_CONT);	//	continue script
 }
@@ -471,15 +471,15 @@
 {
 	uint32	rv;	// for drivers return value
 
-	rv = g_bs2->_sound->PauseMusic();
+	rv = g_sword2->_sound->PauseMusic();
 	if (rv != RD_OK)
 		Zdebug("ERROR: PauseMusic() returned %.8x in PauseAllSound()", rv);
 
-	rv = g_bs2->_sound->PauseSpeech();
+	rv = g_sword2->_sound->PauseSpeech();
 	if (rv != RD_OK)
 		Zdebug("ERROR: PauseSpeech() returned %.8x in PauseAllSound()", rv);
 
-	rv = g_bs2->_sound->PauseFx();
+	rv = g_sword2->_sound->PauseFx();
 	if (rv != RD_OK)
 		Zdebug("ERROR: PauseFx() returned %.8x in PauseAllSound()", rv);
 }
@@ -488,15 +488,15 @@
 {
 	uint32	rv;	// for drivers return value
 
-	rv = g_bs2->_sound->UnpauseMusic();
+	rv = g_sword2->_sound->UnpauseMusic();
 	if (rv != RD_OK)
 		Zdebug("ERROR: UnpauseMusic() returned %.8x in UnpauseAllSound()", rv);
 
-	rv = g_bs2->_sound->UnpauseSpeech();
+	rv = g_sword2->_sound->UnpauseSpeech();
 	if (rv != RD_OK)
 		Zdebug("ERROR: UnpauseSpeech() returned %.8x in UnpauseAllSound()", rv);
 
-	rv = g_bs2->_sound->UnpauseFx();
+	rv = g_sword2->_sound->UnpauseFx();
  	if (rv != RD_OK)
 		Zdebug("ERROR: UnpauseFx() returned %.8x in UnpauseAllSound()", rv);
 }

Index: speech.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/speech.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- speech.cpp	29 Jul 2003 12:34:46 -0000	1.9
+++ speech.cpp	30 Jul 2003 19:25:29 -0000	1.10
@@ -94,7 +94,7 @@
 BOOL	Is_anim_boxed(uint32 res);		//Tony20Oct96
 uint8 WantSpeechForLine(uint32 wavId);	// James (29july97)
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 void GetCorrectCdForSpeech(int32 wavId);	// for testing speech & text
 #endif
 
@@ -257,7 +257,7 @@
 				{
 		   			//--------------------------------------
 					// Write to walkthrough file (zebug0.txt)
-					#ifdef _BS2_DEBUG
+					#ifdef _SWORD2_DEBUG
  					Zdebug(0,"----------------------");
 					Zdebug(0,"Icons available:");
 					#endif
@@ -267,7 +267,7 @@
 					{
 				   		//--------------------------------------
 						// Write to walkthrough file (zebug0.txt)
-						#ifdef _BS2_DEBUG
+						#ifdef _SWORD2_DEBUG
 						Zdebug(0,"%s", FetchObjectName(subject_list[j].res));
 						#endif
 	 		   			//--------------------------------------
@@ -282,7 +282,7 @@
 
 		   			//--------------------------------------
 					// Write to walkthrough file (zebug0.txt)
-					#ifdef _BS2_DEBUG
+					#ifdef _SWORD2_DEBUG
 					Zdebug(0,"Selected: %s", FetchObjectName(subject_list[hit].res));
 					Zdebug(0,"----------------------");
    					#endif
@@ -1350,7 +1350,7 @@
 	char			speechFile[256];
 	static uint8	cycle_skip=0;
 
-	#ifdef _BS2_DEBUG			// (James26jun97)
+	#ifdef _SWORD2_DEBUG			// (James26jun97)
 	_standardHeader	*head;	// for text/speech testing & checking for correct file type
 	static	uint32	currentTextResource=0;	// for text/speech testing - keeping track of text resource currently being tested
 	#endif
@@ -1373,7 +1373,7 @@
 		// New fudge to wait for smacker samples to finish (James31july97)
 		// since they can over-run into the game
 
-		if (g_bs2->_sound->GetSpeechStatus()!=RDSE_SAMPLEFINISHED)	// has it finished?
+		if (g_sword2->_sound->GetSpeechStatus()!=RDSE_SAMPLEFINISHED)	// has it finished?
 			return (IR_REPEAT);
 		
 	 	//-------------------------
@@ -1396,7 +1396,7 @@
 	 	//-------------------------
 
 		//-----------------------------------------------------------
-		#ifdef _BS2_DEBUG			// (James26jun97)
+		#ifdef _SWORD2_DEBUG			// (James26jun97)
 
  		textNumber	= params[S_TEXT];	// for debug info
 
@@ -1437,10 +1437,10 @@
 			}
 		}
 
-		#endif	// _BS2_DEBUG
+		#endif	// _SWORD2_DEBUG
  		//-----------------------------------------------------------
 		// pull out the text line to get the official text number (for wav id)
-		// Once the wav id's go into all script text commands, we'll only need this for _BS2_DEBUG
+		// Once the wav id's go into all script text commands, we'll only need this for _SWORD2_DEBUG
 
 		text_res	= params[S_TEXT]/SIZE;
 		local_text	= params[S_TEXT]&0xffff;
@@ -1452,7 +1452,7 @@
 		res_man.Res_close(text_res);	// now ok to close the text file
 
 		//--------------------------------------
-		#ifdef _BS2_DEBUG			// (James09jul97)
+		#ifdef _SWORD2_DEBUG			// (James09jul97)
 
 		// prevent dud lines from appearing while testing text & speech
 		// since these will not occur in the game anyway
@@ -1466,7 +1466,7 @@
 			}
 		}
 
-		#endif	// _BS2_DEBUG
+		#endif	// _SWORD2_DEBUG
 		//--------------------------------------
 		// set the 'looping_flag' & the text-click-delay
  
@@ -1477,7 +1477,7 @@
 		//----------------------------------------------------------
 		// Write to walkthrough file (zebug0.txt)
 
-		#ifdef _BS2_DEBUG
+		#ifdef _SWORD2_DEBUG
 		if (PLAYER_ID!=CUR_PLAYER_ID)	// if (player_id != george), then player is controlling Nico
 			Zdebug(0,"(%d) Nico: %s", officialTextNumber, text+2);	// so write 'Nico' instead of George
 		else	// ok, it's George anyway
@@ -1547,7 +1547,7 @@
 			else if (speech_pan>16)
 				speech_pan=16;
 
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			if (SYSTEM_TESTING_TEXT)	// if we're testing text & speech
 			{
 				// if we've moved onto a new text resource, we will want to check
@@ -1565,17 +1565,17 @@
 			// set up path to speech cluster
 			// first checking if we have speech1.clu or speech2.clu in current directory (for translators to test)
 
-			if (g_bs2->_gameId == GID_BS2_DEMO)
+			if (g_sword2->_gameId == GID_SWORD2_DEMO)
 				strcpy(speechFile,"SPEECH.CLU");
 			else {
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 				if ((res_man.WhichCd()==1) && (!access("speech1.clu",0))) {	// if 0 ie. if it's there
 				strcpy(speechFile,"speech1.clu");
 				} else if ((res_man.WhichCd()==2) && (!access("speech2.clu",0))) {	// if 0 ie. if it's there
 					strcpy(speechFile,"speech2.clu");
 				} else
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 				{
 					strcpy(speechFile,res_man.GetCdPath());
 					strcat(speechFile,"CLUSTERS\\SPEECH.CLU");
@@ -1584,13 +1584,13 @@
  			//------------------------------
 
 
-			rv = g_bs2->_sound->PlayCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan);	// Load speech but don't start playing yet
+			rv = g_sword2->_sound->PlayCompSpeech(speechFile, params[S_WAV], SPEECH_VOLUME, speech_pan);	// Load speech but don't start playing yet
 			if (rv == RD_OK)
 			{
 				speechRunning=1;	// ok, we've got something to play	(2 means not playing yet - see below)
-				g_bs2->_sound->UnpauseSpeech();	// set it playing now (we might want to do this next cycle, don't know yet)
+				g_sword2->_sound->UnpauseSpeech();	// set it playing now (we might want to do this next cycle, don't know yet)
 			}
-			#ifdef _BS2_DEBUG
+			#ifdef _SWORD2_DEBUG
 			else
 			{
 				Zdebug("ERROR: PlayCompSpeech(speechFile=\"%s\", wav=%d (res=%d pos=%d)) returned %.8x", speechFile, params[S_WAV], text_res, local_text, rv);
@@ -1628,7 +1628,7 @@
 			else if (speechRunning)											// if playing a sample
 			{
 				if	(!unpause_zone)
-				{	if (g_bs2->_sound->AmISpeaking()==RDSE_QUIET)								// if we're at a quiet bit
+				{	if (g_sword2->_sound->AmISpeaking()==RDSE_QUIET)								// if we're at a quiet bit
 						ob_graphic->anim_pc=0;									// restart from frame 0 ('closed mouth' frame)
 				}
 			}
@@ -1655,7 +1655,7 @@
 	if (speechRunning==1)	// if playing a sample (note that value of '2' means about to play!)
 	{
 		if	(!unpause_zone)
-		{	if (g_bs2->_sound->GetSpeechStatus()==RDSE_SAMPLEFINISHED)	// has it finished?
+		{	if (g_sword2->_sound->GetSpeechStatus()==RDSE_SAMPLEFINISHED)	// has it finished?
 				speechFinished=1;						// James25feb97
 		}
 		else	unpause_zone--;
@@ -1672,7 +1672,7 @@
   	//-----------------------------------------------------------------------
 	// ok, all is running along smoothly - but a click means stop unnaturally
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if ((SYSTEM_TESTING_TEXT==0)||(mousey>0))	// so that we can go to the options panel while text & speech is being tested
 	#endif
 	{
@@ -1685,7 +1685,7 @@
 	 		// we ignore mouse releases
 
 			//-----------------------------------------------------------
-			#ifdef _BS2_DEBUG	// (James26jun97)
+			#ifdef _SWORD2_DEBUG	// (James26jun97)
 			if (SYSTEM_TESTING_TEXT)	// if testing text & speech
 			{
 				if (me->buttons&RD_RIGHTBUTTONDOWN)	// and RB used to click past text
@@ -1704,7 +1704,7 @@
 
 			if (speechRunning)							// if speech sample playing
 			{
-				g_bs2->_sound->StopSpeechBS2();							// halt the sample prematurely
+				g_sword2->_sound->StopSpeechSword2();							// halt the sample prematurely
 			}
 		}
 	}
@@ -1730,9 +1730,9 @@
 
 		ob_logic->looping=0;						// no longer in a script function loop
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		textNumber			= 0;					// reset for debug info
-#endif // _BS2_DEBUG
+#endif // _SWORD2_DEBUG
 		officialTextNumber	= 0;					// reset to zero, in case text line not even extracted (since this number comes from the text line)
 
 		RESULT=0;	// ok (James09july97)
@@ -1909,7 +1909,7 @@
 	}
 }
 //------------------------------------------------------------------------------------
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 
 void GetCorrectCdForSpeech(int32 wavId)
 {

Index: startup.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/startup.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- startup.cpp	29 Jul 2003 12:34:46 -0000	1.6
+++ startup.cpp	30 Jul 2003 19:25:30 -0000	1.7
@@ -163,7 +163,7 @@
 
 //	Zdebug(" FN_register_start_point %d %s", params[0], params[1]);
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 	if (total_startups==MAX_starts)
 		Con_fatal_error("ERROR: start_list full [%s line %u]",__FILE__,__LINE__);
 
@@ -290,8 +290,8 @@
 			FN_stop_music(NULL);	// fade out any music that is currently playing
 			//---------------------------------------------
 
-			g_bs2->_sound->UnpauseSpeech();
-			g_bs2->_sound->StopSpeechBS2();							// halt the sample prematurely
+			g_sword2->_sound->UnpauseSpeech();
+			g_sword2->_sound->StopSpeechSword2();							// halt the sample prematurely
 
 			//--------------------------------------------------------------
 			// clean out all resources & flags, ready for a total restart (James24mar97)

Index: sword2.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sword2.cpp	29 Jul 2003 12:34:46 -0000	1.7
+++ sword2.cpp	30 Jul 2003 19:25:30 -0000	1.8
@@ -80,39 +80,39 @@
 
 //------------------------------------------------------------------------------------
 
-static const VersionSettings bs2_settings[] = {
+static const VersionSettings sword2_settings[] = {
 	/* Broken Sword 2 */
-	{"bs2", "Broken Sword II", GID_BS2, 99, VersionSettings::ADLIB_DONT_CARE, GF_DEFAULT_TO_1X_SCALER, "players.clu" },
-	{"bs2demo", "Broken Sword II (Demo)", GID_BS2_DEMO, 99, VersionSettings::ADLIB_DONT_CARE, GF_DEFAULT_TO_1X_SCALER, "players.clu" },
+	{"sword2", "Broken Sword II", GID_SWORD2, 99, VersionSettings::ADLIB_DONT_CARE, GF_DEFAULT_TO_1X_SCALER, "players.clu" },
+	{"sword2demo", "Broken Sword II (Demo)", GID_SWORD2_DEMO, 99, VersionSettings::ADLIB_DONT_CARE, GF_DEFAULT_TO_1X_SCALER, "players.clu" },
 	{NULL, NULL, 0, 0, VersionSettings::ADLIB_DONT_CARE, 0, NULL}
 };
 
-BS2State *g_bs2 = NULL;
+Sword2State *g_sword2 = NULL;
 
-const VersionSettings *Engine_BS2_targetList() {
-	return bs2_settings;
+const VersionSettings *Engine_SWORD2_targetList() {
+	return sword2_settings;
 }
 
-Engine *Engine_BS2_create(GameDetector *detector, OSystem *syst) {
-	return new BS2State(detector, syst);
+Engine *Engine_SWORD2_create(GameDetector *detector, OSystem *syst) {
+	return new Sword2State(detector, syst);
 }
 
-BS2State::BS2State(GameDetector *detector, OSystem *syst)
+Sword2State::Sword2State(GameDetector *detector, OSystem *syst)
 	: Engine(detector, syst) {
 	
 	_detector = detector;
 	_syst = syst;
-	g_bs2 = this;
+	g_sword2 = this;
 	_features = detector->_game.features;
 	_gameId = detector->_game.id;
 }
 
 
-void BS2State::errorString(const char *buf1, char *buf2) {
+void Sword2State::errorString(const char *buf1, char *buf2) {
 	strcpy(buf2, buf1);
 }
 
-int32 BS2State::InitialiseGame(void)
+int32 Sword2State::InitialiseGame(void)
 {
 //init engine drivers
 
@@ -146,11 +146,11 @@
 	Init_console();				// set up the console system
 	Zdebug("RETURNED.");
 
-	#ifdef _BS2_DEBUG
+	#ifdef _SWORD2_DEBUG
 		Zdebug("CALLING: Init_start_menu");
 		Init_start_menu();			// read in all the startup information
 		Zdebug("RETURNED from Init_start_menu");
-	#endif	// _BS2_DEBUG
+	#endif	// _SWORD2_DEBUG
 
 
 
@@ -166,14 +166,14 @@
 	Init_event_system();
 	Zdebug("RETURNED.");
 	
-	_sound = new BS2Sound;
+	_sound = new Sword2Sound;
 	
 	Zdebug("CALLING: Init_fx_queue");
 	Init_fx_queue();			// initialise the sound fx queue
 	Zdebug("RETURNED.");
 
 	// all demos (not just web)
-	if (_gameId == GID_BS2_DEMO)
+	if (_gameId == GID_SWORD2_DEMO)
 		DEMO=1;		// set script variable
 
 	return(0);
@@ -234,7 +234,7 @@
 //------------------------------------------------------------------------------------
 // int main(int argc, char *argv[])
 // int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
-void BS2State::go()
+void Sword2State::go()
 {
 	uint32 rv;
 	uint8  breakOut = 0;
@@ -243,7 +243,7 @@
 //	Zdebug("[%s]", lpCmdLine);
 
 
-	#ifndef _BS2_DEBUG
+	#ifndef _SWORD2_DEBUG
 	DisableQuitKey();	// so cannot use Ctrl-Q from the release versions (full game or demo)
 	#endif
 
@@ -344,7 +344,7 @@
 		
 		// check for events
 		parseEvents();
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		if (grabbingSequences && (!console_status))
 			GrabScreenShot();
 #endif
@@ -363,7 +363,7 @@
 
 //-----
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		if	(console_status)
 		{
 			if	(One_console())
@@ -376,7 +376,7 @@
 
 		if	(!console_status)	//not in console mode - if the console is quit we want to get a logic cycle in before
 		{							//the screen is build. Mostly because of first scroll cycle stuff
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 			if (stepOneCycle)	// if we've just stepped forward one cycle while the game was paused
 			{
 				PauseGame();
@@ -386,7 +386,7 @@
 			if (KeyWaiting())
 			{
 				ReadKey(&c);
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 				if (c==27)					// ESC whether paused or not
 				{
 					PauseAllSound();					// see sound.cpp
@@ -400,29 +400,29 @@
 						{
 							UnpauseGame();
 						}
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 						else if (toupper(c)==' ')			// SPACE bar while paused = step one frame!
 						{
 							stepOneCycle=1;					// step through one game cycle
 							UnpauseGame();
 						}
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 					}
 				else if (toupper(c)=='P')	// 'P' while not paused = pause!
 				{
 					PauseGame();
 				}
-#ifdef _BS2_DEBUG	// frame-skipping only allowed on debug version
+#ifdef _SWORD2_DEBUG	// frame-skipping only allowed on debug version
 				else if (toupper(c)=='S')	// 'S' toggles speed up (by skipping display rendering)
 				{
 					renderSkip = 1 - renderSkip;
 				}
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 			}
 
 			if (gamePaused==0)	// skip GameCycle if we're paused
 			{
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 				gameCycle += 1;
 #endif
 
@@ -430,20 +430,20 @@
 					break;		// break out of main game loop
 			}
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 			Build_debug_text();			// creates the debug text blocks
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 		}
 //-----
 
 		// James (24mar97)
 
-#ifdef _BS2_DEBUG
+#ifdef _SWORD2_DEBUG
 		if ((console_status)||(renderSkip==0)||(gameCycle%4 == 0))	// if not in console & 'renderSkip' is set, only render display once every 4 game-cycles
 			Build_display();	// create and flip the screen
 #else
 		Build_display();	// create and flip the screen
-#endif	// _BS2_DEBUG
+#endif	// _SWORD2_DEBUG
 
 	}
 
@@ -478,7 +478,7 @@
 
 
 //------------------------------------------------------------------------------------
-void	BS2State::Start_game(void)	//Tony29May97
+void	Sword2State::Start_game(void)	//Tony29May97
 {
 //boot the game straight into a start script
 	int screen_manager_id;
@@ -486,7 +486,7 @@
 	Zdebug("Start_game() STARTING:");
 
 	// all demos not just web
-	if (_gameId == GID_BS2_DEMO)
+	if (_gameId == GID_SWORD2_DEMO)
 		screen_manager_id = 19;		// DOCKS SECTION START
 	else
 		screen_manager_id = 949;	// INTRO & PARIS START

Index: sword2.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/bs2/sword2.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- sword2.h	29 Jul 2003 12:34:46 -0000	1.3
+++ sword2.h	30 Jul 2003 19:25:30 -0000	1.4
@@ -44,15 +44,15 @@
 extern uint8 unencoded_name[];
 
 enum BSGameId {
-	GID_BS2 = GID_BS2_FIRST,
-	GID_BS2_DEMO
+	GID_SWORD2 = GID_SWORD2_FIRST,
+	GID_SWORD2_DEMO
 };
 
 // TODO move stuff into class
-class BS2State : public Engine {
+class Sword2State : public Engine {
 		void errorString(const char *buf_input, char *buf_output);
 	public:
-		BS2State(GameDetector *detector, OSystem *syst);
+		Sword2State(GameDetector *detector, OSystem *syst);
 		void go(void);
 		void parseEvents(void);
 		void Start_game(void);
@@ -61,11 +61,11 @@
 		GameDetector *_detector;
 		uint32 _features;
 		byte _gameId;
-		BS2Sound *_sound;
+		Sword2Sound *_sound;
 	private:
 		bool _quit;
 };
 
-extern BS2State *g_bs2;
+extern Sword2State *g_sword2;
 
 #endif





More information about the Scummvm-git-logs mailing list