aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-11-08 22:57:42 +0000
committerPaweł Kołodziejski2003-11-08 22:57:42 +0000
commit13c7acee9d57cc5d3134c9f5be0f7cb2614c33e7 (patch)
tree3f382ac8a9a37673da8aa77e11d335fa9bd9129d
parentb5a7ef0822d336958682b3f9b8b1c4fc0d28af3c (diff)
downloadscummvm-rg350-13c7acee9d57cc5d3134c9f5be0f7cb2614c33e7.tar.gz
scummvm-rg350-13c7acee9d57cc5d3134c9f5be0f7cb2614c33e7.tar.bz2
scummvm-rg350-13c7acee9d57cc5d3134c9f5be0f7cb2614c33e7.zip
cleanup whitespaces
svn-id: r11220
-rw-r--r--backends/fs/fs.h4
-rw-r--r--backends/midi/adlib.cpp26
-rw-r--r--backends/midi/windows.cpp6
-rw-r--r--backends/midi/ym2612.cpp36
-rw-r--r--backends/sdl/sdl-common.cpp22
5 files changed, 45 insertions, 49 deletions
diff --git a/backends/fs/fs.h b/backends/fs/fs.h
index 7bc0fa87b1..4b933e8d7a 100644
--- a/backends/fs/fs.h
+++ b/backends/fs/fs.h
@@ -155,8 +155,8 @@ public:
ConstIterator(FilesystemNode **data) : _data(data) { }
public:
const FilesystemNode &operator *() const { return **_data; }
- const FilesystemNode *operator->() const { return *_data; }
- bool operator !=(const ConstIterator &iter) const { return _data != iter._data; }
+ const FilesystemNode *operator->() const { return *_data; }
+ bool operator !=(const ConstIterator &iter) const { return _data != iter._data; }
void operator ++() { ++_data; }
};
diff --git a/backends/midi/adlib.cpp b/backends/midi/adlib.cpp
index 8eebde5240..fae1ffa5e8 100644
--- a/backends/midi/adlib.cpp
+++ b/backends/midi/adlib.cpp
@@ -25,7 +25,7 @@
#include "common/util.h"
#define BASE_FREQ 250
-#define FIXP_SHIFT 16
+#define FIXP_SHIFT 16
#ifdef DEBUG_ADLIB
static int tick;
@@ -96,7 +96,7 @@ public:
_pedal = 0;
_program = 0;
_pri_eff = 0;
-
+
_owner = 0;
_allocated = false;
_channel = 0;
@@ -619,7 +619,7 @@ private:
static void link_mc(AdlibPart *part, AdlibVoice *voice);
void mc_inc_stuff(AdlibVoice *voice, Struct10 * s10, Struct11 * s11);
void mc_init_stuff(AdlibVoice *voice, Struct10 * s10, Struct11 * s11, byte flags,
- InstrumentExtra * ie);
+ InstrumentExtra * ie);
void struct10_init(Struct10 * s10, InstrumentExtra * ie);
static byte struct10_ontimer(Struct10 * s10, Struct11 * s11);
@@ -680,7 +680,7 @@ void AdlibPart::pitchBend(int16 bend) {
_pitchbend = bend;
for (voice = _voice; voice; voice = voice->_next) {
_owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+ (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
}
}
@@ -733,7 +733,7 @@ void AdlibPart::pitchBendFactor(byte value) {
_pitchbend_factor = value;
for (voice = _voice; voice; voice = voice->_next) {
_owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+ (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
}
}
@@ -743,7 +743,7 @@ void AdlibPart::detune(byte value) {
_detune_eff = value;
for (voice = _voice; voice; voice = voice->_next) {
_owner->adlib_note_on(voice->_channel, voice->_note + _transpose_eff,
- (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
+ (_pitchbend * _pitchbend_factor >> 6) + _detune_eff);
}
}
@@ -820,7 +820,7 @@ MidiDriver_ADLIB::MidiDriver_ADLIB(SoundMixer *mixer)
_timer_proc = 0;
_timer_param = 0;
-
+
_adlib_timer_counter = 0;
_voice_index = 0;
_next_tick = 0;
@@ -853,8 +853,8 @@ int MidiDriver_ADLIB::open() {
_adlib_reg_cache = (byte *)calloc(256, 1);
// We need to emulate one YM3812 chip
- int env_bits = g_system->property(OSystem::PROP_GET_FMOPL_ENV_BITS, NULL);
- int eg_ent = g_system->property(OSystem::PROP_GET_FMOPL_EG_ENT, NULL);
+ int env_bits = g_system->property(OSystem::PROP_GET_FMOPL_ENV_BITS, NULL);
+ int eg_ent = g_system->property(OSystem::PROP_GET_FMOPL_EG_ENT, NULL);
OPLBuildTables((env_bits ? env_bits : FMOPL_ENV_BITS_HQ), (eg_ent ? eg_ent : FMOPL_EG_ENT_HQ));
_opl = OPLCreate(OPL_TYPE_YM3812, 3579545, _mixer->getOutputRate());
@@ -866,7 +866,7 @@ int MidiDriver_ADLIB::open() {
_samples_per_tick = (_mixer->getOutputRate() << FIXP_SHIFT) / BASE_FREQ;
_mixer->setupPremix(premix_proc, this);
-
+
return 0;
}
@@ -882,7 +882,7 @@ void MidiDriver_ADLIB::close() {
// Detach the premix callback handler
_mixer->setupPremix(0, 0);
-
+
// Turn off the OPL emulation
// YM3812Shutdown();
@@ -1123,7 +1123,7 @@ void MidiDriver_ADLIB::mc_inc_stuff(AdlibVoice *voice, Struct10 *s10, Struct11 *
break;
default:
adlib_set_param(voice->_channel, s11->param,
- s10->start_value + s11->modify_val);
+ s10->start_value + s11->modify_val);
break;
}
}
@@ -1466,7 +1466,7 @@ void MidiDriver_ADLIB::adlib_note_on_ex(int chan, byte note, int mod)
}
void MidiDriver_ADLIB::mc_init_stuff(AdlibVoice *voice, Struct10 * s10,
- Struct11 * s11, byte flags, InstrumentExtra * ie) {
+ Struct11 * s11, byte flags, InstrumentExtra * ie) {
AdlibPart *part = voice->_part;
s11->modify_val = 0;
s11->flag0x40 = flags & 0x40;
diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp
index 58fcedabc6..8984349cee 100644
--- a/backends/midi/windows.cpp
+++ b/backends/midi/windows.cpp
@@ -73,8 +73,7 @@ void MidiDriver_WIN::close() {
CloseHandle (_streamEvent);
}
-void MidiDriver_WIN::send(uint32 b)
-{
+void MidiDriver_WIN::send(uint32 b) {
union {
DWORD dwData;
BYTE bData[4];
@@ -88,8 +87,7 @@ void MidiDriver_WIN::send(uint32 b)
check_error(midiOutShortMsg(_mo, u.dwData));
}
-void MidiDriver_WIN::sysEx (byte *msg, uint16 length)
-{
+void MidiDriver_WIN::sysEx (byte *msg, uint16 length) {
if (!_isOpen)
return;
diff --git a/backends/midi/ym2612.cpp b/backends/midi/ym2612.cpp
index 1e1b4ce2e4..9f23fd1582 100644
--- a/backends/midi/ym2612.cpp
+++ b/backends/midi/ym2612.cpp
@@ -208,22 +208,21 @@ public:
////////////////////////////////////////
Operator2612::Operator2612 (Voice2612 *owner) :
-_owner (owner),
-_state (_s_ready),
-_currentLevel ((int32)0x7f << 15),
-_phase (0),
-_lastOutput (0),
-_feedbackLevel (0),
-_detune (0),
-_multiple (1),
-_keyScale (0),
-_specifiedTotalLevel (127),
-_specifiedAttackRate (0),
-_specifiedDecayRate (0),
-_specifiedSustainRate (0),
-_specifiedReleaseRate (15)
-{
- velocity(0);
+ _owner (owner),
+ _state (_s_ready),
+ _currentLevel ((int32)0x7f << 15),
+ _phase (0),
+ _lastOutput (0),
+ _feedbackLevel (0),
+ _detune (0),
+ _multiple (1),
+ _keyScale (0),
+ _specifiedTotalLevel (127),
+ _specifiedAttackRate (0),
+ _specifiedDecayRate (0),
+ _specifiedSustainRate (0),
+ _specifiedReleaseRate (15) {
+ velocity(0);
}
Operator2612::~Operator2612()
@@ -232,7 +231,7 @@ Operator2612::~Operator2612()
void Operator2612::velocity(int velo) {
_velocity = velo;
_totalLevel = ((int32)_specifiedTotalLevel << 15) +
- ((int32)(127-_velocity) << 13);
+ ((int32)(127-_velocity) << 13);
_sustainLevel = ((int32)_specifiedSustainLevel << 17);
}
@@ -724,8 +723,7 @@ void MidiChannel_YM2612::rate(uint16 r) {
////////////////////////////////////////
MidiDriver_YM2612::MidiDriver_YM2612(SoundMixer *mixer) :
-_mixer(mixer)
-{
+_mixer(mixer) {
_isOpen = false;
_timer_proc = 0;
_timer_param = 0;
diff --git a/backends/sdl/sdl-common.cpp b/backends/sdl/sdl-common.cpp
index ed6669f069..4656d91232 100644
--- a/backends/sdl/sdl-common.cpp
+++ b/backends/sdl/sdl-common.cpp
@@ -198,7 +198,7 @@ void OSystem_SDL_Common::copy_rect(const byte *src, int pitch, int x, int y, int
byte *dst = (byte *)_screen->pixels + y * _screenWidth + x;
- if (_screenWidth==pitch && pitch==w) {
+ if (_screenWidth==pitch && pitch == w) {
memcpy(dst, src, h*w);
} else {
do {
@@ -218,15 +218,15 @@ void OSystem_SDL_Common::move_screen(int dx, int dy, int height) {
// Short circuit check - do we have to do anything anyway?
if ((dx == 0 && dy == 0) || height <= 0)
return;
-
+
Common::StackLock lock(_graphicsMutex, this); // Lock the mutex until this function ends
byte *src, *dst;
int x, y;
-
+
// We'll have to do a full screen redraw anyway, so set the flag.
_forceFull = true;
-
+
// Hide the mouse
if (_mouseDrawn)
undraw_mouse();
@@ -265,8 +265,8 @@ void OSystem_SDL_Common::move_screen(int dx, int dy, int height) {
for (x = dx; x < _screenWidth; x++) {
*dst-- = *src--;
}
- src += _screenWidth + (_screenWidth-dx);
- dst += _screenWidth + (_screenWidth-dx);
+ src += _screenWidth + (_screenWidth - dx);
+ dst += _screenWidth + (_screenWidth - dx);
}
} else if (dx < 0) {
// move left - copy from left to right
@@ -276,8 +276,8 @@ void OSystem_SDL_Common::move_screen(int dx, int dy, int height) {
for (x = -dx; x < _screenWidth; x++) {
*dst++ = *src++;
}
- src += _screenWidth - (_screenWidth+dx);
- dst += _screenWidth - (_screenWidth+dx);
+ src += _screenWidth - (_screenWidth + dx);
+ dst += _screenWidth - (_screenWidth + dx);
}
}
@@ -368,7 +368,7 @@ void OSystem_SDL_Common::mk_checksums(const byte *buf) {
void OSystem_SDL_Common::add_dirty_rgn_auto(const byte *buf) {
assert(((long)buf & 3) == 0);
-
+
/* generate a table of the checksums */
mk_checksums(buf);
@@ -383,9 +383,9 @@ void OSystem_SDL_Common::add_dirty_rgn_auto(const byte *buf) {
if (!_forceFull) {
int x,y,w;
uint32 *ck = _dirty_checksums;
-
+
for(y = 0; y!=_screenHeight / 8; y++) {
- for(x = 0; x!=_screenWidth / 8; x++,ck++) {
+ for(x = 0; x!=_screenWidth / 8; x++, ck++) {
if (ck[0] != ck[CKSUM_NUM]) {
/* found a dirty 8x8 block, now go as far to the right as possible,
and at the same time, unmark the dirty status by setting old to new. */