JANITORIAL: Fix whitespace

This commit is contained in:
Adrian Frühwirth 2018-04-19 12:08:31 +02:00
parent 25aa60726d
commit 9bee9e1ba6
38 changed files with 98 additions and 98 deletions

View file

@ -572,7 +572,7 @@ void TownsMidiOutputChannel::keyOff() {
void TownsMidiOutputChannel::keyOnSetFreq(uint16 frq) { void TownsMidiOutputChannel::keyOnSetFreq(uint16 frq) {
uint16 note = (frq << 1) >> 8; uint16 note = (frq << 1) >> 8;
frq = (_freqMSB[note] << 11) | _freqLSB[note] ; frq = (_freqMSB[note] << 11) | _freqLSB[note];
out(0xa4, frq >> 8); out(0xa4, frq >> 8);
out(0xa0, frq & 0xff); out(0xa0, frq & 0xff);
//out(0x28, 0x00); //out(0x28, 0x00);

View file

@ -266,7 +266,7 @@ bool AmigaOSFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, b
if (context) { if (context) {
struct ExamineData * pExd = NULL; // NB: No need to free the value after usage, everything will be dealt with by the DirContext release struct ExamineData * pExd = NULL; // NB: No need to free the value after usage, everything will be dealt with by the DirContext release
AmigaOSFilesystemNode *entry ; AmigaOSFilesystemNode *entry;
while ( (pExd = IDOS->ExamineDir(context)) ) { while ( (pExd = IDOS->ExamineDir(context)) ) {
if ( (EXD_IS_FILE(pExd) && ( Common::FSNode::kListFilesOnly == mode )) if ( (EXD_IS_FILE(pExd) && ( Common::FSNode::kListFilesOnly == mode ))
|| (EXD_IS_DIRECTORY(pExd) && ( Common::FSNode::kListDirectoriesOnly == mode )) || (EXD_IS_DIRECTORY(pExd) && ( Common::FSNode::kListDirectoriesOnly == mode ))

View file

@ -167,5 +167,5 @@ AbstractFSNode *OSystem_Dreamcast::makeCurrentDirectoryFileNode() const {
AbstractFSNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const { AbstractFSNode *OSystem_Dreamcast::makeFileNodePath(const Common::String &path) const {
AbstractFSNode *node = RoninCDFileNode::makeFileNodePath(path); AbstractFSNode *node = RoninCDFileNode::makeFileNodePath(path);
return (node? node : new RoninCDNonexistingNode(path)); return (node ? node : new RoninCDNonexistingNode(path));
} }

View file

@ -440,12 +440,12 @@ void playSound(const void *data, u32 length, bool loop, bool adpcm, int rate) {
soundControl.count = 0; soundControl.count = 0;
} }
soundControl.data[soundControl.count].data = data; soundControl.data[soundControl.count].data = data;
soundControl.data[soundControl.count].len = length | (loop? 0x80000000: 0x00000000); soundControl.data[soundControl.count].len = length | (loop ? 0x80000000 : 0x00000000);
soundControl.data[soundControl.count].rate = rate; // 367 samples per frame soundControl.data[soundControl.count].rate = rate; // 367 samples per frame
soundControl.data[soundControl.count].pan = 64; soundControl.data[soundControl.count].pan = 64;
soundControl.data[soundControl.count].vol = 127; soundControl.data[soundControl.count].vol = 127;
soundControl.data[soundControl.count].format = adpcm? 2: 0; soundControl.data[soundControl.count].format = adpcm ? 2 : 0;
soundControl.count++; soundControl.count++;
@ -641,7 +641,7 @@ void displayMode8Bit() {
displayModeIs8Bit = true; displayModeIs8Bit = true;
if (isCpuScalerEnabled()) { if (isCpuScalerEnabled()) {
videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); videoSetMode(MODE_5_2D | (consoleEnable ? DISPLAY_BG0_ACTIVE : 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
vramSetBankA(VRAM_A_MAIN_BG_0x06000000); vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
@ -660,7 +660,7 @@ void displayMode8Bit() {
BG3_YDY = (int) ((200.0f / 192.0f) * 256); BG3_YDY = (int) ((200.0f / 192.0f) * 256);
} else { } else {
videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); videoSetMode(MODE_5_2D | (consoleEnable ? DISPLAY_BG0_ACTIVE : 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text
vramSetBankA(VRAM_A_MAIN_BG_0x06000000); vramSetBankA(VRAM_A_MAIN_BG_0x06000000);
@ -691,7 +691,7 @@ void displayMode8Bit() {
consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 2, 0, true, true); consoleInit(NULL, 0, BgType_Text4bpp, BgSize_T_256x256, 2, 0, true, true);
// Set this again because consoleinit resets it // Set this again because consoleinit resets it
videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); videoSetMode(MODE_5_2D | (consoleEnable ? DISPLAY_BG0_ACTIVE : 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP);
// Move the cursor to the bottom of the screen using ANSI escape code // Move the cursor to the bottom of the screen using ANSI escape code
consolePrintf("\033[23;0f"); consolePrintf("\033[23;0f");
@ -971,7 +971,7 @@ void displayMode16BitFlipBuffer() {
u16 *back = get16BitBackBuffer(); u16 *back = get16BitBackBuffer();
// highBuffer = !highBuffer; // highBuffer = !highBuffer;
// BG3_CR = BG_BMP16_512x256 | BG_BMP_RAM(highBuffer? 1: 0); // BG3_CR = BG_BMP16_512x256 | BG_BMP_RAM(highBuffer ? 1 : 0);
if (isCpuScalerEnabled()) { if (isCpuScalerEnabled()) {
Rescale_320x256x1555_To_256x256x1555(BG_GFX, back, 512, 512); Rescale_320x256x1555_To_256x256x1555(BG_GFX, back, 512, 512);
@ -1806,13 +1806,13 @@ void triggerIcon(int imageNum) {
void setIcon(int num, int x, int y, int imageNum, int flags, bool enable) { void setIcon(int num, int x, int y, int imageNum, int flags, bool enable) {
sprites[num].attribute[0] = ATTR0_BMP | (enable? (y & 0xFF): 192) | (!enable? ATTR0_DISABLED: 0); sprites[num].attribute[0] = ATTR0_BMP | (enable ? (y & 0xFF) : 192) | (!enable ? ATTR0_DISABLED : 0);
sprites[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags; sprites[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags;
sprites[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16); sprites[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16);
} }
void setIconMain(int num, int x, int y, int imageNum, int flags, bool enable) { void setIconMain(int num, int x, int y, int imageNum, int flags, bool enable) {
spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable? ATTR0_DISABLED: 0); spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable ? ATTR0_DISABLED : 0);
spritesMain[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags; spritesMain[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags;
spritesMain[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16); spritesMain[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16);
} }
@ -1842,7 +1842,7 @@ void updateStatus() {
} }
if (indyFightState) { if (indyFightState) {
setIcon(1, (190 - 32), 150, 3, (indyFightRight? 0: ATTR1_FLIP_X), true); setIcon(1, (190 - 32), 150, 3, (indyFightRight ? 0 : ATTR1_FLIP_X), true);
// consolePrintf("%d\n", indyFightRight); // consolePrintf("%d\n", indyFightRight);
} else { } else {
// setIcon(1, 0, 0, 0, 0, false); // setIcon(1, 0, 0, 0, 0, false);

View file

@ -27,6 +27,6 @@
const char *gScummVMPluginBuildDate = "Git Master"; /* ScummVM Git Master */ const char *gScummVMPluginBuildDate = "Git Master"; /* ScummVM Git Master */
#else #else
const char *gScummVMPluginBuildDate __attribute__((visibility("hidden"))) = const char *gScummVMPluginBuildDate __attribute__((visibility("hidden"))) =
__DATE__ " " __TIME__ ; __DATE__ " " __TIME__;
#endif #endif
#endif #endif

View file

@ -485,13 +485,13 @@ static uLong unzlocal_SearchCentralDir(Common::SeekableReadStream &fin) {
uBackRead = 4; uBackRead = 4;
while (uBackRead<uMaxBack) { while (uBackRead<uMaxBack) {
uLong uReadSize,uReadPos ; uLong uReadSize,uReadPos;
int i; int i;
if (uBackRead+BUFREADCOMMENT>uMaxBack) if (uBackRead+BUFREADCOMMENT>uMaxBack)
uBackRead = uMaxBack; uBackRead = uMaxBack;
else else
uBackRead+=BUFREADCOMMENT; uBackRead+=BUFREADCOMMENT;
uReadPos = uSizeFile-uBackRead ; uReadPos = uSizeFile-uBackRead;
uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ? uReadSize = ((BUFREADCOMMENT+4) < (uSizeFile-uReadPos)) ?
(BUFREADCOMMENT+4) : (uSizeFile-uReadPos); (BUFREADCOMMENT+4) : (uSizeFile-uReadPos);
@ -670,13 +670,13 @@ int unzGetGlobalInfo(unzFile file, unz_global_info *pglobal_info) {
static void unzlocal_DosDateToTmuDate(uLong ulDosDate, tm_unz* ptm) { static void unzlocal_DosDateToTmuDate(uLong ulDosDate, tm_unz* ptm) {
uLong uDate; uLong uDate;
uDate = (uLong)(ulDosDate>>16); uDate = (uLong)(ulDosDate>>16);
ptm->tm_mday = (uInt)(uDate&0x1f) ; ptm->tm_mday = (uInt)(uDate&0x1f);
ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1) ; ptm->tm_mon = (uInt)((((uDate)&0x1E0)/0x20)-1);
ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980) ; ptm->tm_year = (uInt)(((uDate&0x0FE00)/0x0200)+1980);
ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800); ptm->tm_hour = (uInt) ((ulDosDate &0xF800)/0x800);
ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20) ; ptm->tm_min = (uInt) ((ulDosDate&0x7E0)/0x20);
ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f)) ; ptm->tm_sec = (uInt) (2*(ulDosDate&0x1f));
} }
/* /*
@ -772,7 +772,7 @@ static int unzlocal_GetCurrentFileInfoInternal(unzFile file,
lSeek+=file_info.size_filename; lSeek+=file_info.size_filename;
if ((err==UNZ_OK) && (szFileName!=NULL)) { if ((err==UNZ_OK) && (szFileName!=NULL)) {
uLong uSizeRead ; uLong uSizeRead;
if (file_info.size_filename<fileNameBufferSize) { if (file_info.size_filename<fileNameBufferSize) {
*(szFileName+file_info.size_filename)='\0'; *(szFileName+file_info.size_filename)='\0';
uSizeRead = file_info.size_filename; uSizeRead = file_info.size_filename;
@ -787,7 +787,7 @@ static int unzlocal_GetCurrentFileInfoInternal(unzFile file,
if ((err==UNZ_OK) && (extraField!=NULL)) { if ((err==UNZ_OK) && (extraField!=NULL)) {
uLong uSizeRead ; uLong uSizeRead;
if (file_info.size_file_extra<extraFieldBufferSize) if (file_info.size_file_extra<extraFieldBufferSize)
uSizeRead = file_info.size_file_extra; uSizeRead = file_info.size_file_extra;
else else
@ -810,7 +810,7 @@ static int unzlocal_GetCurrentFileInfoInternal(unzFile file,
if ((err==UNZ_OK) && (szComment!=NULL)) { if ((err==UNZ_OK) && (szComment!=NULL)) {
uLong uSizeRead ; uLong uSizeRead;
if (file_info.size_file_comment<commentBufferSize) { if (file_info.size_file_comment<commentBufferSize) {
*(szComment+file_info.size_file_comment)='\0'; *(szComment+file_info.size_file_comment)='\0';
uSizeRead = file_info.size_file_comment; uSizeRead = file_info.size_file_comment;
@ -897,7 +897,7 @@ int unzGoToNextFile(unzFile file) {
return UNZ_END_OF_LIST_OF_FILE; return UNZ_END_OF_LIST_OF_FILE;
s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename + s->pos_in_central_dir += SIZECENTRALDIRITEM + s->cur_file_info.size_filename +
s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment ; s->cur_file_info.size_file_extra + s->cur_file_info.size_file_comment;
s->num_file++; s->num_file++;
err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info, err = unzlocal_GetCurrentFileInfoInternal(file,&s->cur_file_info,
&s->cur_file_info_internal, &s->cur_file_info_internal,
@ -1185,11 +1185,11 @@ int unzReadCurrentFile(unzFile file, voidp buf, unsigned len) {
} }
if (pfile_in_zip_read_info->compression_method==0) { if (pfile_in_zip_read_info->compression_method==0) {
uInt uDoCopy,i ; uInt uDoCopy,i;
if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in) if (pfile_in_zip_read_info->stream.avail_out < pfile_in_zip_read_info->stream.avail_in)
uDoCopy = pfile_in_zip_read_info->stream.avail_out ; uDoCopy = pfile_in_zip_read_info->stream.avail_out;
else else
uDoCopy = pfile_in_zip_read_info->stream.avail_in ; uDoCopy = pfile_in_zip_read_info->stream.avail_in;
for (i=0;i<uDoCopy;i++) for (i=0;i<uDoCopy;i++)
*(pfile_in_zip_read_info->stream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i); *(pfile_in_zip_read_info->stream.next_out+i) = *(pfile_in_zip_read_info->stream.next_in+i);
@ -1327,7 +1327,7 @@ int unzGetLocalExtrafield(unzFile file, voidp buf, unsigned len) {
if (len>size_to_read) if (len>size_to_read)
read_now = (uInt)size_to_read; read_now = (uInt)size_to_read;
else else
read_now = (uInt)len ; read_now = (uInt)len;
if (read_now==0) if (read_now==0)
return 0; return 0;
@ -1392,7 +1392,7 @@ int unzCloseCurrentFile(unzFile file) {
*/ */
int unzGetGlobalComment(unzFile file, char *szComment, uLong uSizeBuf) { int unzGetGlobalComment(unzFile file, char *szComment, uLong uSizeBuf) {
unz_s* s; unz_s* s;
uLong uReadThis ; uLong uReadThis;
if (file==NULL) if (file==NULL)
return UNZ_PARAMERROR; return UNZ_PARAMERROR;
s=(unz_s*)file; s=(unz_s*)file;

View file

@ -152,7 +152,7 @@ void Scripts::searchForSequence() {
_data->seek(0); _data->seek(0);
int sequenceId; int sequenceId;
do { do {
while (_data->readByte() != SCRIPT_START_BYTE) ; while (_data->readByte() != SCRIPT_START_BYTE);
sequenceId = _data->readUint16LE(); sequenceId = _data->readUint16LE();
} while (sequenceId != _sequence); } while (sequenceId != _sequence);
} }

View file

@ -110,7 +110,7 @@ void AudioSpeech::stopSpeech() {
bool AudioSpeech::isPlaying() const { bool AudioSpeech::isPlaying() const {
if (_channel == -1) { if (_channel == -1) {
return false; return false;
} }
return _isActive; return _isActive;
} }

View file

@ -39,12 +39,12 @@ class ScreenEffects {
public: public:
struct Entry { struct Entry {
Color256 palette[16]; Color256 palette[16];
uint16 x; uint16 x;
uint16 y; uint16 y;
uint16 width; uint16 width;
uint16 height; uint16 height;
uint16 z; uint16 z;
uint8 *data; uint8 *data;
}; };
BladeRunnerEngine *_vm; BladeRunnerEngine *_vm;
@ -58,7 +58,7 @@ public:
~ScreenEffects(); ~ScreenEffects();
void readVqa(Common::SeekableReadStream *stream); void readVqa(Common::SeekableReadStream *stream);
void getColor(Color256 *outColor, uint16 x, uint16 y, uint16 z) const ; void getColor(Color256 *outColor, uint16 x, uint16 y, uint16 z) const;
//TODO //TODO
//bool isAffectingArea(int x, int y, int width, int height, int unk); //bool isAffectingArea(int x, int y, int width, int height, int unk);

View file

@ -707,7 +707,7 @@ uint8 Vga::closest(Dac *pal, const uint8 colR, const uint8 colG, const uint8 col
uint16 D = ((r > R) ? (r - R) : (R - r)) + uint16 D = ((r > R) ? (r - R) : (R - r)) +
((g > G) ? (g - G) : (G - g)) + ((g > G) ? (g - G) : (G - g)) +
((b > B) ? (b - B) : (B - b)) + ((b > B) ? (b - B) : (B - b)) +
((l > L) ? (l - L) : (L - l)) * 10 ; ((l > L) ? (l - L) : (L - l)) * 10;
if (D < dif) { if (D < dif) {
found = i; found = i;

View file

@ -938,13 +938,13 @@ uint8 Vga::closest(Dac *pal, const uint8 colR, const uint8 colG, const uint8 col
uint16 D = ((r > R) ? (r - R) : (R - r)) + uint16 D = ((r > R) ? (r - R) : (R - r)) +
((g > G) ? (g - G) : (G - g)) + ((g > G) ? (g - G) : (G - g)) +
((b > B) ? (b - B) : (B - b)) + ((b > B) ? (b - B) : (B - b)) +
((l > L) ? (l - L) : (L - l)) * 10 ; ((l > L) ? (l - L) : (L - l)) * 10;
if (D < dif) { if (D < dif) {
found = i; found = i;
dif = D; dif = D;
if (D == 0) if (D == 0)
break; // exact! break; // exact!
} }
} }
return found; return found;

View file

@ -2321,7 +2321,7 @@ void EdenGame::my_bulle() {
} else if (c >= 0x80 && c < 0x90) } else if (c >= 0x80 && c < 0x90)
SysBeep(1); SysBeep(1);
else if (c >= 0x90 && c < 0xA0) { else if (c >= 0x90 && c < 0xA0) {
while (*textPtr++ != 0xFF) ; while (*textPtr++ != 0xFF);
textPtr--; textPtr--;
} else if (c >= 0xA0 && c < 0xC0) } else if (c >= 0xA0 && c < 0xC0)
_globals->_textToken1 = c & 0xF; _globals->_textToken1 = c & 0xF;
@ -2333,7 +2333,7 @@ void EdenGame::my_bulle() {
#ifdef FAKE_DOS_VERSION #ifdef FAKE_DOS_VERSION
_globals->_textWidthLimit = c1 + 160; _globals->_textWidthLimit = c1 + 160;
#else #else
_globals->_textWidthLimit = c1 + _subtitlesXCenter; //TODO: signed? 160 in pc ver _globals->_textWidthLimit = c1 + _subtitlesXCenter; // TODO: signed? 160 in pc ver
#endif #endif
else { else {
byte c2 = *textPtr++; byte c2 = *textPtr++;

View file

@ -979,7 +979,7 @@ int GnapEngine::playSoundC() {
if (!_timers[_soundTimerIndexC]) { if (!_timers[_soundTimerIndexC]) {
_timers[_soundTimerIndexC] = getRandom(50) + 150; _timers[_soundTimerIndexC] = getRandom(50) + 150;
soundId = kSoundIdsC[getRandom(7)] ; soundId = kSoundIdsC[getRandom(7)];
playSound(soundId | 0x10000, false); playSound(soundId | 0x10000, false);
} }
return soundId; return soundId;

View file

@ -885,7 +885,7 @@ protected:
void inflictMonsterDamage(EoBMonsterInPlay *m, int damage, bool giveExperience); void inflictMonsterDamage(EoBMonsterInPlay *m, int damage, bool giveExperience);
void calcAndInflictMonsterDamage(EoBMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect); void calcAndInflictMonsterDamage(EoBMonsterInPlay *m, int times, int pips, int offs, int flags, int savingThrowType, int savingThrowEffect);
void calcAndInflictCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int savingThrowEffect); void calcAndInflictCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int savingThrowEffect);
int calcCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int damageType) ; int calcCharacterDamage(int charIndex, int times, int itemOrPips, int useStrModifierOrBase, int flags, int savingThrowType, int damageType);
void inflictCharacterDamage(int charIndex, int damage); void inflictCharacterDamage(int charIndex, int damage);
bool characterAttackHitTest(int charIndex, int monsterIndex, int item, int attackType); bool characterAttackHitTest(int charIndex, int monsterIndex, int item, int attackType);

View file

@ -499,7 +499,7 @@ void Screen_EoB::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y,
int16 dX = x - (_dsX1 << 3); int16 dX = x - (_dsX1 << 3);
int16 dY = y; int16 dY = y;
int16 dW = _dsX2 - _dsX1; int16 dW = _dsX2 - _dsX1;
uint8 pixelsPerByte = *src++ ; uint8 pixelsPerByte = *src++;
uint16 dH = *src++; uint16 dH = *src++;
uint16 width = (*src++) << 3; uint16 width = (*src++) << 3;
@ -1211,7 +1211,7 @@ void Screen_EoB::createFadeTable(uint8 *palData, uint8 *dst, uint8 rootColor, ui
if (t <= v && (ii == rootColor || ii != i)) { if (t <= v && (ii == rootColor || ii != i)) {
v = t; v = t;
col = ii ; col = ii;
} }
} }
*dst++ = col; *dst++ = col;

View file

@ -876,7 +876,7 @@ void DarkMoonEngine::seq_playCredits(DarkmoonSequenceHelper *sq, const uint8 *da
const uint8 *shp = sq->_shapes[(*++posOld) - 1]; const uint8 *shp = sq->_shapes[(*++posOld) - 1];
items[i + 1].data = shp; items[i + 1].data = shp;
items[i + 1].size = shp[1]; items[i + 1].size = shp[1];
items[i + 1].x = (dm->w - shp[2]) << 2 ; items[i + 1].x = (dm->w - shp[2]) << 2;
items[i + 1].dataType = 1; items[i + 1].dataType = 1;
delete[] items[i + 1].str; delete[] items[i + 1].str;
items[i + 1].str = 0; items[i + 1].str = 0;

View file

@ -3378,7 +3378,7 @@ void KyraEngine_HoF::seq_showStarcraftLogo() {
int KyraEngine_HoF::seq_playIntro() { int KyraEngine_HoF::seq_playIntro() {
bool startupSaveLoadable = saveFileLoadable(0); bool startupSaveLoadable = saveFileLoadable(0);
return SeqPlayer_HOF(this, _screen, _system, startupSaveLoadable).play(kSequenceVirgin, startupSaveLoadable? kSequenceTitle : kSequenceNoLooping); return SeqPlayer_HOF(this, _screen, _system, startupSaveLoadable).play(kSequenceVirgin, startupSaveLoadable ? kSequenceTitle : kSequenceNoLooping);
} }
int KyraEngine_HoF::seq_playOutro() { int KyraEngine_HoF::seq_playOutro() {

View file

@ -1222,7 +1222,7 @@ void LilliputScript::listAllTexts() {
int index = _vm->_packedStringIndex[i]; int index = _vm->_packedStringIndex[i];
int variantCount = 0; int variantCount = 0;
while (_vm->_packedStrings[index + variantCount] == 0x5B) while (_vm->_packedStrings[index + variantCount] == 0x5B)
++variantCount ; ++variantCount;
/* /*
int it = 0; int it = 0;
if (variantCount != 0) { if (variantCount != 0) {

View file

@ -2443,7 +2443,7 @@ void Scene405::step() {
} }
if (_game._trigger == 70) { if (_game._trigger == 70) {
_game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount ; _game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount;
_game._player._visible = true; _game._player._visible = true;
_globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _globals._sequenceIndexes[1] = _scene->_sequences.addReverseSpriteCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0);
_scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71); _scene->_sequences.addSubEntry(_globals._sequenceIndexes[1], SEQUENCE_TRIGGER_EXPIRE, 0, 71);
@ -2458,7 +2458,7 @@ void Scene405::step() {
} }
if (_game._trigger == 75) { if (_game._trigger == 75) {
_game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount ; _game._player._priorTimer = _scene->_frameStartTime + _game._player._ticksAmount;
_game._player._visible = true; _game._player._visible = true;
_scene->_sequences.remove(_globals._sequenceIndexes[1]); _scene->_sequences.remove(_globals._sequenceIndexes[1]);
_globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0); _globals._sequenceIndexes[1] = _scene->_sequences.addSpriteCycle(_globals._spriteIndexes[1], false, 6, 1, 0, 0);

View file

@ -2804,8 +2804,8 @@ void Interface::mapPanelDrawCrossHair() {
if (screen.contains(mapPosition)) { if (screen.contains(mapPosition)) {
_vm->_sprite->draw(_vm->_sprite->_mainSprites, _vm->_sprite->draw(_vm->_sprite->_mainSprites,
_mapPanelCrossHairState? RID_ITE_SPR_CROSSHAIR : RID_ITE_SPR_CROSSHAIR + 1, _mapPanelCrossHairState ? RID_ITE_SPR_CROSSHAIR : RID_ITE_SPR_CROSSHAIR + 1,
mapPosition, 256); mapPosition, 256);
} }
} }

View file

@ -2811,9 +2811,9 @@ int AI::simulateBuildingLaunch(int x, int y, int power, int angle, int numSteps,
numSteps = 1; numSteps = 1;
if (!sXSpeed && !sYSpeed) { if (!sXSpeed && !sYSpeed) {
sZSpeed = (static_cast<int>(.70711 * power)) ; sZSpeed = (static_cast<int>(.70711 * power));
sXSpeed = (static_cast<int>(cos(degToRad(angle)) * sZSpeed)) ; sXSpeed = (static_cast<int>(cos(degToRad(angle)) * sZSpeed));
sYSpeed = (static_cast<int>(sin(degToRad(angle)) * sZSpeed)) ; sYSpeed = (static_cast<int>(sin(degToRad(angle)) * sZSpeed));
sZSpeed *= SCALE_Z; sZSpeed *= SCALE_Z;
@ -2959,9 +2959,9 @@ int AI::simulateWeaponLaunch(int x, int y, int power, int angle, int numSteps) {
if (!numSteps) numSteps = 1; if (!numSteps) numSteps = 1;
if (!sXSpeed && !sYSpeed) { if (!sXSpeed && !sYSpeed) {
sZSpeed = (static_cast<int>(.70711 * power)) ; sZSpeed = (static_cast<int>(.70711 * power));
sXSpeed = (static_cast<int>(cos(degToRad(angle)) * sZSpeed)) ; sXSpeed = (static_cast<int>(cos(degToRad(angle)) * sZSpeed));
sYSpeed = (static_cast<int>(sin(degToRad(angle)) * sZSpeed)) ; sYSpeed = (static_cast<int>(sin(degToRad(angle)) * sZSpeed));
sZSpeed *= SCALE_Z; sZSpeed *= SCALE_Z;

View file

@ -703,7 +703,7 @@ void ImageFile3DO::load3DOCelRoomData(Common::SeekableReadStream &stream) {
error("load3DOCelRoomData: expected cel data, not enough bytes"); error("load3DOCelRoomData: expected cel data, not enough bytes");
// read data into memory // read data into memory
byte *celDataPtr = new byte[celDataSize]; byte *celDataPtr = new byte[celDataSize];
stream.read(celDataPtr, celDataSize); stream.read(celDataPtr, celDataSize);
streamLeft -= celDataSize; streamLeft -= celDataSize;
@ -936,15 +936,15 @@ void ImageFile3DO::loadFont(Common::SeekableReadStream &stream) {
stream.read(bitsTablePtr, bitsTableSize); stream.read(bitsTablePtr, bitsTableSize);
// Now extract all characters // Now extract all characters
uint16 curChar = 0; uint16 curChar = 0;
const byte *curBitsLinePtr = bitsTablePtr; const byte *curBitsLinePtr = bitsTablePtr;
const byte *curBitsPtr = NULL; const byte *curBitsPtr = NULL;
byte curBitsLeft = 0; byte curBitsLeft = 0;
uint32 curCharHeightLeft = 0; uint32 curCharHeightLeft = 0;
uint32 curCharWidthLeft = 0; uint32 curCharWidthLeft = 0;
byte curBits = 0; byte curBits = 0;
byte curBitsReversed = 0; byte curBitsReversed = 0;
byte curPosX = 0; byte curPosX = 0;
assert(bitsTableSize >= (header_maxChar * header_fontHeight * header_bytesPerLine)); // Security assert(bitsTableSize >= (header_maxChar * header_fontHeight * header_bytesPerLine)); // Security

View file

@ -182,8 +182,8 @@ bool MidiParser_SH::loadMusic(byte *musData, uint32 musDataSize) {
_musData = musData; _musData = musData;
_musDataSize = musDataSize; _musDataSize = musDataSize;
byte *headerPtr = _musData + 12; // skip over the already checked SPACE header byte *headerPtr = _musData + 12; // skip over the already checked SPACE header
byte *pos = headerPtr; byte *pos = headerPtr;
uint16 headerSize = READ_LE_UINT16(headerPtr); uint16 headerSize = READ_LE_UINT16(headerPtr);
assert(headerSize == 0x7F); // Security check assert(headerSize == 0x7F); // Security check

View file

@ -470,7 +470,7 @@ struct SceneImage {
int _filesize; // File size int _filesize; // File size
SceneImage(); SceneImage();
} ; };
} // End of namespace Sherlock } // End of namespace Sherlock

View file

@ -39,7 +39,7 @@ struct AdjustWalk {
int _xAdjust; int _xAdjust;
int _flipXAdjust; int _flipXAdjust;
int _yAdjust; int _yAdjust;
} ; };
static const AdjustWalk ADJUST_WALKS[NUM_ADJUSTED_WALKS] = { static const AdjustWalk ADJUST_WALKS[NUM_ADJUSTED_WALKS] = {
{ "TUPRIGHT", -7, -19, 6 }, { "TUPRIGHT", -7, -19, 6 },

View file

@ -195,7 +195,7 @@ builtIn(howFrozen) {
builtIn(setCursor) { builtIn(setCursor) {
UNUSEDALL UNUSEDALL
PersonaAnimation *aa = getAnimationFromVar(fun->stack->thisVar); PersonaAnimation *aa = getAnimationFromVar(fun->stack->thisVar);
g_sludge->_cursorMan->pickAnimCursor(aa); g_sludge->_cursorMan->pickAnimCursor(aa);
trimStack(fun->stack); trimStack(fun->stack);
return BR_CONTINUE; return BR_CONTINUE;
@ -400,7 +400,7 @@ builtIn(pasteImage) {
if (!getValueType(x, SVT_INT, fun->stack->thisVar)) if (!getValueType(x, SVT_INT, fun->stack->thisVar))
return BR_ERROR; return BR_ERROR;
trimStack(fun->stack); trimStack(fun->stack);
PersonaAnimation *pp = getAnimationFromVar(fun->stack->thisVar); PersonaAnimation *pp = getAnimationFromVar(fun->stack->thisVar);
trimStack(fun->stack); trimStack(fun->stack);
if (pp == NULL) if (pp == NULL)
return BR_CONTINUE; return BR_CONTINUE;
@ -1581,7 +1581,7 @@ builtIn(pasteCharacter) {
builtIn(animate) { builtIn(animate) {
UNUSEDALL UNUSEDALL
int obj; int obj;
PersonaAnimation *pp = getAnimationFromVar(fun->stack->thisVar); PersonaAnimation *pp = getAnimationFromVar(fun->stack->thisVar);
if (pp == NULL) if (pp == NULL)
return BR_ERROR; return BR_ERROR;
trimStack(fun->stack); trimStack(fun->stack);

View file

@ -69,7 +69,7 @@ public:
int &mouseY() { return _input.mouseY; } int &mouseY() { return _input.mouseY; }
// Events // Events
void setEventFunction(EventFunctions event, int funcNum) { _currentEvents->func[event] = funcNum; } ; void setEventFunction(EventFunctions event, int funcNum) { _currentEvents->func[event] = funcNum; };
void loadHandlers(Common::SeekableReadStream *stream); void loadHandlers(Common::SeekableReadStream *stream);
void saveHandlers(Common::WriteStream *stream); void saveHandlers(Common::WriteStream *stream);
bool freeze(FrozenStuffStruct *frozenStuff); bool freeze(FrozenStuffStruct *frozenStuff);

View file

@ -85,7 +85,7 @@ bool GraphicsManager::freeze() {
_vm->_peopleMan->freeze(newFreezer); _vm->_peopleMan->freeze(newFreezer);
StatusStuff *newStatusStuff = new StatusStuff ; StatusStuff *newStatusStuff = new StatusStuff;
if (!checkNew(newStatusStuff)) if (!checkNew(newStatusStuff))
return false; return false;
newFreezer->frozenStatus = copyStatusBarStuff(newStatusStuff); newFreezer->frozenStatus = copyStatusBarStuff(newStatusStuff);

View file

@ -30,7 +30,7 @@ struct OnScreenPerson;
struct PersonaAnimation; struct PersonaAnimation;
struct ScreenRegion; struct ScreenRegion;
struct SpeechStruct; struct SpeechStruct;
struct StatusStuff ; struct StatusStuff;
struct EventHandlers; struct EventHandlers;
struct ScreenRegion; struct ScreenRegion;

View file

@ -257,7 +257,7 @@ bool loadVariable(Variable *to, Common::SeekableReadStream *stream) {
return true; return true;
case SVT_ANIM: case SVT_ANIM:
to->varData.animHandler = new PersonaAnimation ; to->varData.animHandler = new PersonaAnimation;
if (!checkNew(to->varData.animHandler)) if (!checkNew(to->varData.animHandler))
return false; return false;
to->varData.animHandler->load(stream); to->varData.animHandler->load(stream);

View file

@ -175,7 +175,7 @@ bool Persona::load(Common::SeekableReadStream *stream) {
if (!checkNew(animation)) if (!checkNew(animation))
return false; return false;
for (a = 0; a < numDirections * 3; a++) { for (a = 0; a < numDirections * 3; a++) {
animation[a] = new PersonaAnimation ; animation[a] = new PersonaAnimation;
if (!checkNew(animation[a])) if (!checkNew(animation[a]))
return false; return false;
@ -1088,7 +1088,7 @@ bool PeopleManager::loadPeople(Common::SeekableReadStream *stream) {
if (!checkNew(me->myPersona)) if (!checkNew(me->myPersona))
return false; return false;
me->myAnim = new PersonaAnimation ; me->myAnim = new PersonaAnimation;
if (!checkNew(me->myAnim)) if (!checkNew(me->myAnim))
return false; return false;

View file

@ -37,8 +37,8 @@ namespace Sludge {
SpritePalette verbLinePalette; SpritePalette verbLinePalette;
SpritePalette litVerbLinePalette; SpritePalette litVerbLinePalette;
StatusStuff mainStatus; StatusStuff mainStatus;
StatusStuff *nowStatus = & mainStatus; StatusStuff *nowStatus = & mainStatus;
void setLitStatus(int i) { void setLitStatus(int i) {
nowStatus->litStatus = i; nowStatus->litStatus = i;
@ -144,7 +144,7 @@ StatusStuff *copyStatusBarStuff(StatusStuff *here) {
here->litStatus = -1; here->litStatus = -1;
here->firstStatusBar = NULL; here->firstStatusBar = NULL;
StatusStuff *old = nowStatus; StatusStuff *old = nowStatus;
nowStatus = here; nowStatus = here;
return old; return old;

View file

@ -339,9 +339,9 @@ void Screen::renderImageSection(const MSNImage *image, int section) {
return; return;
Common::Rect sectionRect(image->_section[section].x1, Common::Rect sectionRect(image->_section[section].x1,
image->_section[section].y1, image->_section[section].y1,
image->_section[section].x2 + 1, image->_section[section].x2 + 1,
image->_section[section].y2 + 1) ; image->_section[section].y2 + 1);
if (image->_filenumber == 1 || image->_filenumber == 2) { if (image->_filenumber == 1 || image->_filenumber == 2) {
sectionRect.setWidth(640); sectionRect.setWidth(640);
sectionRect.setHeight(480); sectionRect.setHeight(480);

View file

@ -1005,7 +1005,7 @@ void RMCharacter::goTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
_walkCount = 0; _walkCount = 0;
if (bReversed) { if (bReversed) {
while (0) ; while (0);
} }
int nPatt = getCurPattern(); int nPatt = getCurPattern();

View file

@ -864,7 +864,7 @@ const byte *ThreadResource::cardPerform(const byte *card) {
if (cardPerform2(card, id)) { if (cardPerform2(card, id)) {
card += subId; card += subId;
card = cardPerform(card); card = cardPerform(card);
while (*card++ != 61) ; while (*card++ != 61);
} else { } else {
card += subId; card += subId;
while (*card != 61 && *card != 29) while (*card != 61 && *card != 29)

View file

@ -96,7 +96,7 @@ public:
bool setViewport(Rect32 *rect) override { return BaseRenderer::setViewport(rect); } bool setViewport(Rect32 *rect) override { return BaseRenderer::setViewport(rect); }
Rect32 getViewPort() override; Rect32 getViewPort() override;
void modTargetRect(Common::Rect *rect); void modTargetRect(Common::Rect *rect);
void pointFromScreen(Point32 *point) ; void pointFromScreen(Point32 *point);
void pointToScreen(Point32 *point); void pointToScreen(Point32 *point);
void dumpData(const char *filename) override; void dumpData(const char *filename) override;

View file

@ -143,7 +143,7 @@ void VectorRenderer::stepGetPositions(const DrawStep &step, const Common::Rect &
break; break;
case Graphics::DrawStep::kVectorAlignCenter: case Graphics::DrawStep::kVectorAlignCenter:
in_y = area.top + (area.height() / 2) - (in_h / 2) + ((step.padding.top + step.padding.bottom ) / 2) ; in_y = area.top + (area.height() / 2) - (in_h / 2) + ((step.padding.top + step.padding.bottom ) / 2);
break; break;
case Graphics::DrawStep::kVectorAlignTop: case Graphics::DrawStep::kVectorAlignTop:

View file

@ -559,7 +559,7 @@ void BinkDecoder::BinkVideoTrack::mergeHuffmanSymbols(VideoFrame &video, byte *d
} }
void BinkDecoder::BinkVideoTrack::initBundles() { void BinkDecoder::BinkVideoTrack::initBundles() {
uint32 bw = (_surface.w + 7) >> 3; uint32 bw = (_surface.w + 7) >> 3;
uint32 bh = (_surface.h + 7) >> 3; uint32 bh = (_surface.h + 7) >> 3;
uint32 blocks = bw * bh; uint32 blocks = bw * bh;