aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorPaweł Kołodziejski2003-11-08 22:43:46 +0000
committerPaweł Kołodziejski2003-11-08 22:43:46 +0000
commitb5a7ef0822d336958682b3f9b8b1c4fc0d28af3c (patch)
tree664e98a759f8c7e821c9a33b8c17f27eb295d4a3 /common
parentbd972c97e57234dadd830fef118139c0bf9c71e4 (diff)
downloadscummvm-rg350-b5a7ef0822d336958682b3f9b8b1c4fc0d28af3c.tar.gz
scummvm-rg350-b5a7ef0822d336958682b3f9b8b1c4fc0d28af3c.tar.bz2
scummvm-rg350-b5a7ef0822d336958682b3f9b8b1c4fc0d28af3c.zip
cleanup whitespaces
svn-id: r11219
Diffstat (limited to 'common')
-rw-r--r--common/config-manager.cpp4
-rw-r--r--common/map.h4
-rw-r--r--common/rect.h2
-rw-r--r--common/savefile.cpp20
-rw-r--r--common/scaler.cpp7
-rw-r--r--common/scaler.h3
-rw-r--r--common/scaler/hq2x.cpp10
-rw-r--r--common/scummsys.h4
-rw-r--r--common/str.cpp4
-rw-r--r--common/str.h4
-rw-r--r--common/system.h14
-rw-r--r--common/timer.cpp2
-rw-r--r--common/timer.h2
-rw-r--r--common/util.cpp2
-rw-r--r--common/util.h2
15 files changed, 37 insertions, 47 deletions
diff --git a/common/config-manager.cpp b/common/config-manager.cpp
index 90f4f91c4b..ad51b14407 100644
--- a/common/config-manager.cpp
+++ b/common/config-manager.cpp
@@ -261,7 +261,7 @@ const String & ConfigManager::get(const String &key, const String &dom) const {
// if (_transientDomain.contain(key))
// return true;
-
+
if (!dom.isEmpty()) {
if (_gameDomains.contains(dom) && _gameDomains[dom].contains(key))
return _gameDomains[dom][key];
@@ -273,7 +273,7 @@ const String & ConfigManager::get(const String &key, const String &dom) const {
if (iter->_value.contains(key))
return iter->_value[key];
}
-
+
return _defaultsDomain.get(key);
}
diff --git a/common/map.h b/common/map.h
index d592a7b673..691af36fde 100644
--- a/common/map.h
+++ b/common/map.h
@@ -79,8 +79,8 @@ public:
Node &operator *() { assert(_node != 0); return *_node; }
const Node &operator *() const { assert(_node != 0); return *_node; }
- const Node *operator->() const { assert(_node != 0); return _node; }
- bool operator !=(const ConstIterator &iter) const { return _node != iter._node; }
+ const Node *operator->() const { assert(_node != 0); return _node; }
+ bool operator !=(const ConstIterator &iter) const { return _node != iter._node; }
void operator ++() {
if (!_node)
return;
diff --git a/common/rect.h b/common/rect.h
index c1f80ebf42..0c24c86253 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -59,7 +59,7 @@ struct Rect {
int16 height() const { return bottom - top; }
/*! @brief check if given position is inside this rectangle
-
+
@param x the horizontal position to check
@param y the vertical position to check
diff --git a/common/savefile.cpp b/common/savefile.cpp
index e6ad04d0e6..6133c190cb 100644
--- a/common/savefile.cpp
+++ b/common/savefile.cpp
@@ -23,13 +23,11 @@
#include "common/util.h"
#include "common/savefile.h"
-uint32 SaveFile::read(void *ptr, uint32 size)
-{
+uint32 SaveFile::read(void *ptr, uint32 size) {
return fread(ptr, 1, size);
}
-byte SaveFile::readByte()
-{
+byte SaveFile::readByte() {
byte b;
if (fread(&b, 1, 1) != 1)
return 0;
@@ -60,13 +58,11 @@ uint32 SaveFile::readUint32BE() {
return (b << 16) | a;
}
-uint32 SaveFile::write(const void *ptr, uint32 size)
-{
+uint32 SaveFile::write(const void *ptr, uint32 size) {
return fwrite(ptr, 1, size);
}
-void SaveFile::writeByte(byte value)
-{
+void SaveFile::writeByte(byte value) {
fwrite(&value, 1, 1);
}
@@ -90,12 +86,11 @@ void SaveFile::writeUint32BE(uint32 value) {
writeUint16BE((uint16)(value & 0xffff));
}
-SaveFile *SaveFileManager::open_savefile(const char *filename, const char *directory, bool saveOrLoad)
-{
+SaveFile *SaveFileManager::open_savefile(const char *filename, const char *directory, bool saveOrLoad) {
char buf[256];
join_paths(filename, directory, buf, sizeof(buf));
StdioSaveFile *sf = new StdioSaveFile(buf,
- (saveOrLoad? "wb":"rb"));
+ (saveOrLoad? "wb":"rb"));
if (!sf->is_open()) {
delete sf;
sf = NULL;
@@ -104,8 +99,7 @@ SaveFile *SaveFileManager::open_savefile(const char *filename, const char *direc
}
void SaveFileManager::join_paths(const char *filename, const char *directory,
- char *buf, int bufsize)
-{
+ char *buf, int bufsize) {
buf[bufsize-1] = '\0';
strncpy(buf, directory, bufsize-1);
diff --git a/common/scaler.cpp b/common/scaler.cpp
index 3225c8b964..192fbdb16d 100644
--- a/common/scaler.cpp
+++ b/common/scaler.cpp
@@ -27,7 +27,7 @@
int gBitFormat = 565;
// RGB-to-YUV lookup table
-int RGBtoYUV[65536];
+int RGBtoYUV[65536];
static const uint16 dotmatrix_565[16] = {
0x01E0, 0x0007, 0x3800, 0x0000,
@@ -262,7 +262,7 @@ void TV2xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 ds
MAKE_WRAPPER(TV2x)
static inline uint16 DOT_16(uint16 c, int j, int i) {
- return c - ((c >> 2) & *(dotmatrix + ((j & 3) << 2) + (i & 3)));
+ return c - ((c >> 2) & *(dotmatrix + ((j & 3) << 2) + (i & 3)));
}
// FIXME: This scaler doesn't quite work. Either it needs to know where on the
@@ -272,8 +272,7 @@ static inline uint16 DOT_16(uint16 c, int j, int i) {
// exercise for the reader.)
void DotMatrix(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch,
- int width, int height)
-{
+ int width, int height) {
const uint32 nextlineSrc = srcPitch / sizeof(uint16);
const uint16 *p = (const uint16 *)srcPtr;
diff --git a/common/scaler.h b/common/scaler.h
index ab2a6ba852..5e148e9d22 100644
--- a/common/scaler.h
+++ b/common/scaler.h
@@ -70,11 +70,10 @@ enum {
GFX_DOTMATRIX = 11,
GFX_BILINEAR = 12, // OpenGL backend
-
+
GFX_FLIPPING = 100, // Palmos
GFX_DOUBLEBUFFER = 101, // Palmos
GFX_WIDE = 102 // palmos
-
};
diff --git a/common/scaler/hq2x.cpp b/common/scaler/hq2x.cpp
index 462729804c..55fe0b83ad 100644
--- a/common/scaler/hq2x.cpp
+++ b/common/scaler/hq2x.cpp
@@ -83,8 +83,8 @@
*/
template<int bitFormat>
void HQ2xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
- register int w1, w2, w3, w4, w5, w6, w7, w8, w9;
-
+ register int w1, w2, w3, w4, w5, w6, w7, w8, w9;
+
const uint32 nextlineSrc = srcPitch / sizeof(uint16);
const uint16 *p = (const uint16 *)srcPtr;
@@ -116,10 +116,10 @@ void HQ2xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 ds
// The YUV threshold.
static const vector unsigned char vThreshold = (vector unsigned char)((vector unsigned int)0x00300706);
-
+
// Bit pattern mask.
- static const vector signed int vPatternMask1 = (vector signed int)(0x01,0x02,0x04,0x08);
- static const vector signed int vPatternMask2 = (vector signed int)(0x10,0x20,0x40,0x80);
+ static const vector signed int vPatternMask1 = (vector signed int)(0x01, 0x02, 0x04, 0x08);
+ static const vector signed int vPatternMask2 = (vector signed int)(0x10, 0x20, 0x40, 0x80);
// Permutation masks for the incremental vector loading (see below for more information).
static const vector unsigned char vPermuteToV1234 = (vector unsigned char)( 4, 5, 6, 7, 8,9,10,11, 20,21,22,23, 16,17,18,19);
diff --git a/common/scummsys.h b/common/scummsys.h
index 29116499f6..0c520b09c1 100644
--- a/common/scummsys.h
+++ b/common/scummsys.h
@@ -167,10 +167,10 @@
#define SCUMM_BIG_ENDIAN
#define SCUMM_NEED_ALIGNMENT
#define NONSTANDARD_SAVE
-
+
#define FORCEINLINE inline
#define CDECL
-
+
typedef unsigned char byte;
typedef unsigned char uint8;
typedef unsigned short uint16;
diff --git a/common/str.cpp b/common/str.cpp
index e48a0a9aff..4d90d3249c 100644
--- a/common/str.cpp
+++ b/common/str.cpp
@@ -203,8 +203,8 @@ void String::ensureCapacity(int new_len, bool keep_old) {
if (new_len <= _capacity && *_refCount == 1)
return;
- int newCapacity = (new_len <= _capacity) ? _capacity : new_len + 32;
- char *newStr = (char *)calloc(1, newCapacity+1);
+ int newCapacity = (new_len <= _capacity) ? _capacity : new_len + 32;
+ char *newStr = (char *)calloc(1, newCapacity+1);
if (keep_old && _str)
memcpy(newStr, _str, _len + 1);
diff --git a/common/str.h b/common/str.h
index 2c18c75554..f52cd2f4dc 100644
--- a/common/str.h
+++ b/common/str.h
@@ -74,8 +74,8 @@ public:
class String : public ConstString {
protected:
- int *_refCount;
- int _capacity;
+ int *_refCount;
+ int _capacity;
public:
static const String emptyString;
diff --git a/common/system.h b/common/system.h
index bac63a8950..791c392759 100644
--- a/common/system.h
+++ b/common/system.h
@@ -202,31 +202,29 @@ public:
/** Show or hide the mouse cursor. */
virtual bool show_mouse(bool visible) = 0;
-
+
/**
* Move ("warp) the mouse cursor to the specified position.
*/
virtual void warp_mouse(int x, int y) = 0;
-
+
/** Set the bitmap used for drawing the cursor. */
virtual void set_mouse_cursor(const byte *buf, uint w, uint h, int hotspot_x, int hotspot_y) = 0;
//@}
-
-
/** @name Events and Time */
//@{
/** Get the number of milliseconds since the program was started. */
virtual uint32 get_msecs() = 0;
-
+
/** Delay/sleep for the specified amount of milliseconds. */
virtual void delay_msecs(uint msecs) = 0;
-
+
/** Set the timer callback. */
virtual void set_timer(TimerProc callback, int interval) = 0;
-
+
/**
* Get the next event in the event queue.
* @param event point to an Event struct, which will be filled with the event data.
@@ -248,7 +246,7 @@ public:
* @param format the sample type format.
*/
virtual bool set_sound_proc(SoundProc proc, void *param, SoundFormat format) = 0;
-
+
/**
* Remove any audio callback previously set via set_sound_proc, thus effectively
* stopping all audio output immediately.
diff --git a/common/timer.cpp b/common/timer.cpp
index b6c1ce5710..f19e139476 100644
--- a/common/timer.cpp
+++ b/common/timer.cpp
@@ -36,7 +36,7 @@ Timer::Timer(OSystem *system) :
_mutex = _system->create_mutex();
g_timer = this;
-
+
for (int i = 0; i < MAX_TIMERS; i++) {
_timerSlots[i].procedure = NULL;
_timerSlots[i].interval = 0;
diff --git a/common/timer.h b/common/timer.h
index 503bc9cbe2..96ad1a85de 100644
--- a/common/timer.h
+++ b/common/timer.h
@@ -65,7 +65,7 @@ public:
* @return true if the timer was installed successfully, false otherwise
*/
bool installTimerProc(TimerProc proc, int32 interval, void *refCon);
-
+
/**
* Remove the given timer callback. It will not be invoked anymore.
*/
diff --git a/common/util.cpp b/common/util.cpp
index d7d3c4dd01..ce63a15413 100644
--- a/common/util.cpp
+++ b/common/util.cpp
@@ -140,7 +140,7 @@ const LanguageDescription g_languages[] = {
{"gb", "English (GB)", EN_GRB},
{"se", "Swedish", SE_SWE},
{"hb", "Hebrew", HB_HEB},
- {"ru", "Russian", RU_RUS},
+ {"ru", "Russian", RU_RUS},
{0, 0, UNK_LANG}
};
diff --git a/common/util.h b/common/util.h
index 65919c6a30..e3b0c97e2a 100644
--- a/common/util.h
+++ b/common/util.h
@@ -59,7 +59,7 @@ private:
public:
RandomSource();
void setSeed(uint32 seed);
-
+
/**
* Generates a random unsigned integer in the interval [0, max].
* @param max the upper bound