[Scummvm-cvs-logs] CVS: scummvm/sky autoroute.cpp,1.7,1.8 autoroute.h,1.4,1.5 grid.cpp,1.4,1.5 grid.h,1.2,1.3 skychannel.cpp,1.2,1.3 skychannel.h,1.1,1.2 skymusic.cpp,1.1,1.2 skymusic.h,1.1,1.2

Robert G?ffringmann lavosspawn at users.sourceforge.net
Tue Apr 29 07:35:12 CEST 2003


Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv3380/sky

Modified Files:
	autoroute.cpp autoroute.h grid.cpp grid.h skychannel.cpp 
	skychannel.h skymusic.cpp skymusic.h 
Log Message:
changed ScummVM header, renamed header defines

Index: autoroute.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/autoroute.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- autoroute.cpp	29 Apr 2003 13:06:01 -0000	1.7
+++ autoroute.cpp	29 Apr 2003 14:34:18 -0000	1.8
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -77,10 +76,10 @@
 	uint16 cnt;
 	//First clear the bottom line and right hand edge of next line
 	for (cnt = 0; cnt < ROUTE_GRID_WIDTH + 1; cnt++)
-		_routeGrid[(ROUTE_GRID_SIZE>>1) - 1 - cnt] = 0;
+		_routeGrid[(ROUTE_GRID_SIZE >> 1) - 1 - cnt] = 0;
 
-	uint16 gridCntX = ROUTE_GRID_WIDTH-2; // ch
-	uint16 gridCntY = ROUTE_GRID_HEIGHT-2; // ebp
+	uint16 gridCntX = ROUTE_GRID_WIDTH - 2; // ch
+	uint16 gridCntY = ROUTE_GRID_HEIGHT - 2; // ebp
 	uint16 bitsLeft = 32;
 	uint32 gridData = screenGrid[0] | (screenGrid[1] << 8) |
 		(screenGrid[2] << 16) | (screenGrid[3] << 24);
@@ -117,12 +116,12 @@
 			routeCalc--;
 			routeCalc[0] = routeCalc[1] = 0; // do edges
 			routeCalc--;
-			gridCntX = ROUTE_GRID_WIDTH-2;
+			gridCntX = ROUTE_GRID_WIDTH - 2;
 			stretch1 = 0; // clear stretch factor
 			gridCntY--;
 		}
 	} while(gridCntY);
-	for (cnt = 0; cnt < ROUTE_GRID_WIDTH-1; cnt++) 
+	for (cnt = 0; cnt < ROUTE_GRID_WIDTH - 1; cnt++) 
 		_routeGrid[cnt] = 0; // clear top line (right hand edge already done
 	
 	// the grid has been initialised
@@ -256,11 +255,11 @@
 		foundRoute = false;
 		if (!routeDestCalc[0]) {
 			// we have done a section, see if we want to shift backwards (what?)
-			if (numLines < ROUTE_GRID_HEIGHT-4) {
+			if (numLines < ROUTE_GRID_HEIGHT - 4) {
 				routeSrcCalc -= directionY;
 				numLines++;
 			}
-			if (numCols < ROUTE_GRID_WIDTH-4) {
+			if (numCols < ROUTE_GRID_WIDTH - 4) {
 				routeSrcCalc -= directionX;
 				numCols++;
 			}
@@ -273,7 +272,7 @@
 	}
 	// ok, we know now that it's possible to get from the start position to the desired
 	// destination. Let's see how.
-	uint16 *saveRoute = routeData+(ROUTE_SPACE >> 1)-1; // route_space is given in bytes so >> 1
+	uint16 *saveRoute = routeData + (ROUTE_SPACE >> 1) - 1; // route_space is given in bytes so >> 1
 	saveRoute[0] = 0; // route is null terminated
 	uint16 lastVal;
 	lastVal = routeDestCalc[0];
@@ -341,11 +340,11 @@
 	if (initX < 0) {
         saveRoute -= 4;
 		saveRoute[1] = RIGHTY;
-		saveRoute[0] = ((-initX)+7)&0xFFF8;
+		saveRoute[0] = ((-initX) + 7) & 0xFFF8;
 	} else if (initX > 0) {
 		saveRoute -= 4;
 		saveRoute[1] = LEFTY;
-		saveRoute[0] = (initX+7)&0xFFF8;
+		saveRoute[0] = (initX + 7) & 0xFFF8;
 	}
 	// I wonder why initY isn't checked
 	// saveRoute should now point to routeData

Index: autoroute.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/autoroute.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- autoroute.h	27 Apr 2003 16:36:24 -0000	1.4
+++ autoroute.h	29 Apr 2003 14:34:19 -0000	1.5
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -20,8 +19,8 @@
  *
  */
 
-#ifndef __AutoRoute__
-#define __AutoRoute__
+#ifndef AUTOROUTE_H
+#define AUTOROUTE_H
 
 #include "stdafx.h"
 #include "sky/sky.h"
@@ -43,5 +42,5 @@
 	uint16 *_routeGrid;
 };
 
-#endif // __AutoRoute
+#endif // AUTOROUTE_H
 

Index: grid.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/grid.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- grid.cpp	29 Apr 2003 13:06:01 -0000	1.4
+++ grid.cpp	29 Apr 2003 14:34:22 -0000	1.5
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License

Index: grid.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/grid.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- grid.h	27 Apr 2003 15:02:52 -0000	1.2
+++ grid.h	29 Apr 2003 14:34:22 -0000	1.3
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License

Index: skychannel.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/skychannel.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- skychannel.cpp	24 Apr 2003 23:52:03 -0000	1.2
+++ skychannel.cpp	29 Apr 2003 14:34:22 -0000	1.3
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -221,20 +220,20 @@
 }
 
 #ifdef SCUMM_BIG_ENDIAN
-#define ENDIAN16(x) ((x>>8)|((x&0xFF)<<8))
+#define ENDIAN16(x) ((x >> 8) | ((x & 0xFF) << 8))
 #else
 #define ENDIAN16(x) (x)
 #endif
 
 uint16 SkyChannel::getNextNote(uint8 param) {
 
-	int16 freqIndex = ((int16)_channelData.freqOffset)-0x40;
+	int16 freqIndex = ((int16)_channelData.freqOffset) - 0x40;
 	if (freqIndex >= 0x3F) freqIndex++;
 	freqIndex *= _channelData.freqDataSize;
 	freqIndex += param<<6;
-	uint16 freqData = ENDIAN16(_frequenceTable[freqIndex%0x300]);
+	uint16 freqData = ENDIAN16(_frequenceTable[freqIndex % 0x300]);
 	if ((freqIndex%0x300 >= 0x1C0) || (freqIndex/0x300 > 0)) {
-		return (((freqIndex/0x300)-1)<<10)+(freqData&0x7FF);
+		return (((freqIndex / 0x300) - 1) << 10) + (freqData & 0x7FF);
 	} else {
 		// looks like a bug. dunno why. It's what the ASM code says.
 		return (uint16)(((int16)freqData) >> 1);
@@ -280,9 +279,9 @@
 	if (_channelData.note & 0x20) {
 		uint16 nextNote = getNextNote(
 			_channelData.lastCommand - 0x18 + _channelData.instrumentData->bindedEffect);
-		setRegister(0xA0|_channelData.adlibChannelNumber, (uint8)nextNote);
-		setRegister(0xB0|_channelData.adlibChannelNumber, (uint8)((nextNote>>8)|0x20));
-		_channelData.note = (uint8)(nextNote>>8)|0x20;
+		setRegister(0xA0 | _channelData.adlibChannelNumber, (uint8)nextNote);
+		setRegister(0xB0 | _channelData.adlibChannelNumber, (uint8)((nextNote >> 8) | 0x20));
+		_channelData.note = (uint8)(nextNote >> 8) | 0x20;
 	}
 }
 

Index: skychannel.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/skychannel.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- skychannel.h	21 Apr 2003 20:58:53 -0000	1.1
+++ skychannel.h	29 Apr 2003 14:34:23 -0000	1.2
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -20,8 +19,8 @@
  *
  */
 
-#ifndef __SkyChannel__
-#define __SkyChannel__
+#ifndef SKYCHANNEL_H
+#define SKYCHANNEL_H
 
 #include "stdafx.h"
 #include "sound/fmopl.h"
@@ -99,4 +98,4 @@
 	//void com90_do_two_Lodsb(void);    // 13
 };
 
-#endif //__SkyChannel__
+#endif //SKYCHANNEL_H

Index: skymusic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/skymusic.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- skymusic.cpp	21 Apr 2003 20:58:53 -0000	1.1
+++ skymusic.cpp	29 Apr 2003 14:34:23 -0000	1.2
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License

Index: skymusic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/skymusic.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- skymusic.h	21 Apr 2003 20:58:53 -0000	1.1
+++ skymusic.h	29 Apr 2003 14:34:23 -0000	1.2
@@ -1,6 +1,5 @@
 /* ScummVM - Scumm Interpreter
  * Copyright (C) 2003 The ScummVM project
- * Copyright (C) 2003 Robert "LavosSpawn" Goeffringmann
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -21,8 +20,8 @@
  */
 
 
-#ifndef __SkyMusicDriver__
-#define __SkyMusicDriver__
+#ifndef SKYMUSIC_H
+#define SKYMUSIC_H
 
 #include "stdafx.h"
 #include "sound/fmopl.h"
@@ -81,4 +80,4 @@
 	void setFMVolume(uint16 param);                                              // 13
 };
 
-#endif //__SkyMusicDriver__
+#endif //SKYMUSIC_H





More information about the Scummvm-git-logs mailing list