mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
changed ScummVM header, renamed header defines
svn-id: r7200
This commit is contained in:
parent
caf3ffda05
commit
9e83d98797
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user