cleanup whitespaces
svn-id: r11219
This commit is contained in:
parent
bd972c97e5
commit
b5a7ef0822
15 changed files with 37 additions and 47 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -74,8 +74,8 @@ public:
|
|||
|
||||
class String : public ConstString {
|
||||
protected:
|
||||
int *_refCount;
|
||||
int _capacity;
|
||||
int *_refCount;
|
||||
int _capacity;
|
||||
|
||||
public:
|
||||
static const String emptyString;
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -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}
|
||||
};
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue