From 9e83d98797d6c569cb20aecf3b2f6acf478d4b64 Mon Sep 17 00:00:00 2001 From: Robert Göffringmann Date: Tue, 29 Apr 2003 14:34:23 +0000 Subject: changed ScummVM header, renamed header defines svn-id: r7200 --- sky/autoroute.cpp | 21 ++++++++++----------- sky/autoroute.h | 7 +++---- sky/grid.cpp | 1 - sky/grid.h | 1 - sky/skychannel.cpp | 15 +++++++-------- sky/skychannel.h | 7 +++---- sky/skymusic.cpp | 1 - sky/skymusic.h | 7 +++---- 8 files changed, 26 insertions(+), 34 deletions(-) diff --git a/sky/autoroute.cpp b/sky/autoroute.cpp index c66ea9e7eb..352abe791c 100644 --- a/sky/autoroute.cpp +++ b/sky/autoroute.cpp @@ -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 SkyAutoRoute::autoRoute(Compact *cpt, uint16 **pSaveRoute) { 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 @@ uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 **pSaveRoute) { 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 @@ uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 **pSaveRoute) { 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 @@ uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 **pSaveRoute) { } // 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 @@ uint16 SkyAutoRoute::autoRoute(Compact *cpt, uint16 **pSaveRoute) { 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 diff --git a/sky/autoroute.h b/sky/autoroute.h index 8663b6af97..5e6730b849 100644 --- a/sky/autoroute.h +++ b/sky/autoroute.h @@ -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 @@ private: uint16 *_routeGrid; }; -#endif // __AutoRoute +#endif // AUTOROUTE_H diff --git a/sky/grid.cpp b/sky/grid.cpp index 15e9f5670b..c4e1a8918e 100644 --- a/sky/grid.cpp +++ b/sky/grid.cpp @@ -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 diff --git a/sky/grid.h b/sky/grid.h index a594caf632..ed5ef44e35 100644 --- a/sky/grid.h +++ b/sky/grid.h @@ -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 diff --git a/sky/skychannel.cpp b/sky/skychannel.cpp index b150fa7b6f..cba947bd29 100644 --- a/sky/skychannel.cpp +++ b/sky/skychannel.cpp @@ -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 @@ void SkyChannel::adlibSetupInstrument(void) { } #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 @@ void SkyChannel::com90_getFreqOffset(void) { 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; } } diff --git a/sky/skychannel.h b/sky/skychannel.h index e4134652ea..22221e2cea 100644 --- a/sky/skychannel.h +++ b/sky/skychannel.h @@ -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 @@ private: //void com90_do_two_Lodsb(void); // 13 }; -#endif //__SkyChannel__ +#endif //SKYCHANNEL_H diff --git a/sky/skymusic.cpp b/sky/skymusic.cpp index b546a08464..96a5854bef 100644 --- a/sky/skymusic.cpp +++ b/sky/skymusic.cpp @@ -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 diff --git a/sky/skymusic.h b/sky/skymusic.h index d81b7f65ba..cb9bea6dd6 100644 --- a/sky/skymusic.h +++ b/sky/skymusic.h @@ -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 @@ private: void setFMVolume(uint16 param); // 13 }; -#endif //__SkyMusicDriver__ +#endif //SKYMUSIC_H -- cgit v1.2.3