aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-25 01:39:44 +0000
committerJohannes Schickel2010-01-25 01:39:44 +0000
commitaed02365ec81e77b3c8aa4f4ecd9a9d3893326f2 (patch)
tree95f119e687a666f65aad5041910c43bdfd4f2929 /backends
parentec14cd6e6add76ce4f719edd7ce508d67ebd9f14 (diff)
downloadscummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.gz
scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.tar.bz2
scummvm-rg350-aed02365ec81e77b3c8aa4f4ecd9a9d3893326f2.zip
Strip trailing spaces/tabs.
svn-id: r47541
Diffstat (limited to 'backends')
-rw-r--r--backends/fs/psp/psp-fs.cpp6
-rw-r--r--backends/fs/psp/psp-stream.cpp40
-rw-r--r--backends/fs/psp/psp-stream.h8
-rw-r--r--backends/platform/dc/dc.h2
-rw-r--r--backends/platform/ds/arm9/source/fat/io_dldi.s14
-rw-r--r--backends/platform/ds/arm9/source/fat/io_m3sd_asm.s26
-rw-r--r--backends/platform/ds/arm9/source/fat/io_scsd_asm.s112
-rw-r--r--backends/platform/iphone/iphone_video.m8
-rw-r--r--backends/platform/iphone/osys_events.cpp8
-rw-r--r--backends/platform/linuxmoto/linuxmoto-events.cpp20
-rw-r--r--backends/platform/linuxmoto/linuxmoto-sdl.cpp4
-rw-r--r--backends/platform/ps2/iop/rpckbd/include/ps2kbd.h6
-rw-r--r--backends/platform/ps2/iop/rpckbd/src/ps2kbd.c4
-rw-r--r--backends/platform/ps2/iop/rpckbd/src/us_keymap.h2
-rw-r--r--backends/platform/ps2/systemps2.h2
-rw-r--r--backends/platform/psp/elf32.h6
-rw-r--r--backends/platform/psp/osys_psp.cpp14
-rw-r--r--backends/platform/psp/osys_psp.h2
-rw-r--r--backends/platform/psp/powerman.cpp104
-rw-r--r--backends/platform/psp/powerman.h34
-rw-r--r--backends/platform/psp/pspkeyboard.cpp4
-rw-r--r--backends/platform/psp/pspkeyboard.h14
-rw-r--r--backends/platform/psp/psploader.cpp10
-rw-r--r--backends/platform/sdl/events.cpp2
-rw-r--r--backends/platform/sdl/graphics.cpp16
-rw-r--r--backends/platform/sdl/sdl.h4
-rw-r--r--backends/platform/symbian/src/SymbianActions.cpp4
-rw-r--r--backends/platform/symbian/src/portdefs.h4
-rw-r--r--backends/platform/wii/options.cpp2
-rw-r--r--backends/platform/wii/osystem_events.cpp2
-rw-r--r--backends/platform/wii/osystem_gfx.cpp2
-rw-r--r--backends/platform/wince/smartLandScale.s2
-rw-r--r--backends/saves/psp/psp-saves.cpp4
-rw-r--r--backends/vkeybd/virtual-keyboard.h2
34 files changed, 247 insertions, 247 deletions
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index 75a91e5802..0b3e26763e 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -112,7 +112,7 @@ bool PSPFilesystemNode::exists() const {
ret = access(_path.c_str(), F_OK);
PowerMan.endCriticalSection();
-
+
return ret == 0;
}
@@ -124,7 +124,7 @@ bool PSPFilesystemNode::isReadable() const {
ret = access(_path.c_str(), R_OK);
PowerMan.endCriticalSection();
-
+
return ret == 0;
}
@@ -136,7 +136,7 @@ bool PSPFilesystemNode::isWritable() const {
ret = access(_path.c_str(), W_OK);
PowerMan.endCriticalSection();
-
+
return ret == 0;
}
diff --git a/backends/fs/psp/psp-stream.cpp b/backends/fs/psp/psp-stream.cpp
index d72bafd0ad..c66a558fc3 100644
--- a/backends/fs/psp/psp-stream.cpp
+++ b/backends/fs/psp/psp-stream.cpp
@@ -39,11 +39,11 @@ PSPIoStream::PSPIoStream(const Common::String &path, bool writeMode)
assert(!path.empty());
_handle = (void *)0; // Need to do this since base class asserts not 0.
- _ferror = false;
+ _ferror = false;
_feof = false;
_pos = 0;
-#ifdef __PSP_DEBUG_SUSPEND__
+#ifdef __PSP_DEBUG_SUSPEND__
_errorSuspend = 0;
_errorSource = 0;
_errorPos = 0;
@@ -71,7 +71,7 @@ void *PSPIoStream::open() {
if (PowerMan.beginCriticalSection() == PowerManager::Blocked) {
// No need to open. Just return the _handle resume() already opened.
PSPDebugSuspend("Suspended in PSPIoStream::open\n");
- }
+ }
_handle = fopen(_path.c_str(), _writeMode ? "wb" : "rb"); // open
@@ -84,15 +84,15 @@ void *PSPIoStream::open() {
bool PSPIoStream::err() const {
if (_ferror)
- PSPDebugSuspend("In PSPIoStream::err - mem_ferror=%d, source=%d, suspend error=%d, pos=%d, _errorPos=%d, _errorHandle=%p, suspendCount=%d _handle\n",
+ PSPDebugSuspend("In PSPIoStream::err - mem_ferror=%d, source=%d, suspend error=%d, pos=%d, _errorPos=%d, _errorHandle=%p, suspendCount=%d _handle\n",
_ferror, _errorSource, _errorSuspend, _pos, _errorPos, _errorHandle, _suspendCount);
-
+
return _ferror;
}
void PSPIoStream::clearErr() {
_ferror = false; // Remove regular error bit
-
+
}
bool PSPIoStream::eos() const {
@@ -111,14 +111,14 @@ int32 PSPIoStream::size() const {
fseek((FILE *)_handle, 0, SEEK_END);
int32 length = ftell((FILE *)_handle);
fseek((FILE *)_handle, _pos, SEEK_SET);
-
+
if (_pos < 0 || length < 0) { // Check for errors
PSPDebugSuspend("In PSPIoStream::size(). encountered an error!\n");
_ferror = true;
length = -1; // If our oldPos is bad, we want length to be bad too to signal
clearerr((FILE *)_handle);
-#ifdef __PSP_DEBUG_SUSPEND__
+#ifdef __PSP_DEBUG_SUSPEND__
_errorSource = 2;
#endif
}
@@ -134,21 +134,21 @@ bool PSPIoStream::seek(int32 offs, int whence) {
PSPDebugSuspend("Suspended in PSPIoStream::seek()\n");
int ret = fseek((FILE *)_handle, offs, whence);
-
+
if (ret != 0) {
_ferror = true;
PSPDebugSuspend("In PSPIoStream::seek(). encountered an error!\n");
clearerr((FILE *)_handle);
_feof = feof((FILE *)_handle);
-#ifdef __PSP_DEBUG_SUSPEND__
+#ifdef __PSP_DEBUG_SUSPEND__
_errorSource = 3;
#endif
}
else { // everything ok
_feof = false; // Reset eof flag since we know it was ok
}
-
+
_pos = ftell((FILE *)_handle); // update pos
PowerMan.endCriticalSection();
@@ -161,10 +161,10 @@ uint32 PSPIoStream::read(void *ptr, uint32 len) {
if (PowerMan.beginCriticalSection() == PowerManager::Blocked)
PSPDebugSuspend("Suspended in PSPIoStream::read()\n");
- size_t ret = fread((byte *)ptr, 1, len, (FILE *)_handle);
+ size_t ret = fread((byte *)ptr, 1, len, (FILE *)_handle);
_pos += ret; // Update pos
-
+
if (ret != len) { // Check for eof
_feof = feof((FILE *)_handle);
if (!_feof) { // It wasn't an eof. Must be an error
@@ -173,14 +173,14 @@ uint32 PSPIoStream::read(void *ptr, uint32 len) {
_pos = ftell((FILE *)_handle); // Update our position
PSPDebugSuspend("In PSPIoStream::read(). encountered an error!\n");
-#ifdef __PSP_DEBUG_SUSPEND__
+#ifdef __PSP_DEBUG_SUSPEND__
_errorSource = 4;
#endif
}
}
-
+
PowerMan.endCriticalSection();
-
+
return ret;
}
@@ -199,7 +199,7 @@ uint32 PSPIoStream::write(const void *ptr, uint32 len) {
_pos = ftell((FILE *)_handle); // Update pos
PSPDebugTrace("In PSPIoStream::write(). encountered an error!\n");
-#ifdef __PSP_DEBUG_SUSPEND__
+#ifdef __PSP_DEBUG_SUSPEND__
_errorSource = 5;
#endif
}
@@ -221,7 +221,7 @@ bool PSPIoStream::flush() {
clearerr((FILE *)_handle);
PSPDebugSuspend("In PSPIoStream::flush(). encountered an error!\n");
-#ifdef __PSP_DEBUG_SUSPEND__
+#ifdef __PSP_DEBUG_SUSPEND__
_errorSource = 6;
#endif
}
@@ -256,7 +256,7 @@ int PSPIoStream::suspend() {
_errorSuspend = SuspendError;
_errorPos = _pos;
_errorHandle = _handle;
- }
+ }
#endif /* __PSP_DEBUG_SUSPEND__ */
if (_handle > 0) {
@@ -275,7 +275,7 @@ int PSPIoStream::resume() {
#ifdef __PSP_DEBUG_SUSPEND__
_suspendCount--;
#endif
-
+
// We reopen our file descriptor
_handle = fopen(_path.c_str(), _writeMode ? "wb" : "rb");
if (_handle <= 0) {
diff --git a/backends/fs/psp/psp-stream.h b/backends/fs/psp/psp-stream.h
index 112d36ccdb..679fe8dacd 100644
--- a/backends/fs/psp/psp-stream.h
+++ b/backends/fs/psp/psp-stream.h
@@ -48,12 +48,12 @@ protected:
int _errorSuspend;
mutable int _errorSource;
-
-#ifdef __PSP_DEBUG_SUSPEND__
+
+#ifdef __PSP_DEBUG_SUSPEND__
int _errorPos;
- void * _errorHandle;
+ void * _errorHandle;
int _suspendCount;
-#endif /* __PSP_DEBUG_SUSPEND__ */
+#endif /* __PSP_DEBUG_SUSPEND__ */
public:
/**
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index c3e81aef73..393e72caed 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -85,7 +85,7 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys
// Determine the pixel format currently in use for screen rendering.
Graphics::PixelFormat getScreenFormat() const;
- // Returns a list of all pixel formats supported by the backend.
+ // Returns a list of all pixel formats supported by the backend.
Common::List<Graphics::PixelFormat> getSupportedFormats();
// Set the size of the video bitmap.
diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.s b/backends/platform/ds/arm9/source/fat/io_dldi.s
index c2314e772d..311d43f3ff 100644
--- a/backends/platform/ds/arm9/source/fat/io_dldi.s
+++ b/backends/platform/ds/arm9/source/fat/io_dldi.s
@@ -18,7 +18,7 @@
.byte 0x0F @32KiB @ Log [base-2] of the size of this driver in bytes.
.byte 0x00 @ Sections to fix
.byte 0x0F @32KiB @ Log [base-2] of the allocated space in bytes.
-
+
@---------------------------------------------------------------------------------
@ Text identifier - can be anything up to 47 chars + terminating null -- 16 bytes
.align 4
@@ -42,13 +42,13 @@ _dldi_driver_name:
_io_dldi:
.ascii "DLDI" @ ioType
.word 0x00000000 @ Features
- .word _DLDI_startup @
- .word _DLDI_isInserted @
+ .word _DLDI_startup @
+ .word _DLDI_isInserted @
.word _DLDI_readSectors @ Function pointers to standard device driver functions
- .word _DLDI_writeSectors @
- .word _DLDI_clearStatus @
- .word _DLDI_shutdown @
-
+ .word _DLDI_writeSectors @
+ .word _DLDI_clearStatus @
+ .word _DLDI_shutdown @
+
@---------------------------------------------------------------------------------
_DLDI_startup:
diff --git a/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s b/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s
index ffaa971aca..a6bb8dc187 100644
--- a/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s
+++ b/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s
@@ -54,7 +54,7 @@ sd_write_loop2:
sd_write_busy:
bl clkin
- ldrh r0,[r1]
+ ldrh r0,[r1]
tst r0,#0x100
beq sd_write_busy
ldmfd r13!,{r0-r1}
@@ -68,10 +68,10 @@ SD_crc16:
stmfd r13!,{r4-r9}
mov r9,r2
- mov r3,#0
- mov r4,#0
- mov r5,#0
- mov r6,#0
+ mov r3,#0
+ mov r4,#0
+ mov r5,#0
+ mov r6,#0
ldr r7,=0x80808080
ldr r8,=0x1021
@@ -86,19 +86,19 @@ sd_crc16_loop:
eorne r3,r3,r8
tst r2,r7,lsr #24
eorne r3,r3,r8
-
+
mov r4,r4,lsl #1
tst r4,#0x10000
eorne r4,r4,r8
tst r2,r7,lsr #25
eorne r4,r4,r8
-
+
mov r5,r5,lsl #1
tst r5,#0x10000
eorne r5,r5,r8
tst r2,r7,lsr #26
eorne r5,r5,r8
-
+
mov r6,r6,lsl #1
tst r6,#0x10000
eorne r6,r6,r8
@@ -107,7 +107,7 @@ sd_crc16_loop:
mov r7,r7,ror #4
subs r1,r1,#4
- bne sd_crc16_loop
+ bne sd_crc16_loop
mov r2,r9
mov r8,#16
@@ -145,7 +145,7 @@ SD_data_write:
mov r2,#SDODA
sd_data_write_busy:
bl clkin
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
beq sd_data_write_busy
@@ -169,7 +169,7 @@ sd_data_write_loop:
bl clkout
subs r5, r5, #2
- bne sd_data_write_loop
+ bne sd_data_write_loop
cmp r1,#0
movne r0,r1
@@ -184,10 +184,10 @@ sd_data_write_loop2:
bl clkout
subs r5, r5, #1
bne sd_data_write_loop2
-
+
sd_data_write_busy2:
bl clkin
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
beq sd_data_write_busy2
diff --git a/backends/platform/ds/arm9/source/fat/io_scsd_asm.s b/backends/platform/ds/arm9/source/fat/io_scsd_asm.s
index 498cbb96c2..390d36afeb 100644
--- a/backends/platform/ds/arm9/source/fat/io_scsd_asm.s
+++ b/backends/platform/ds/arm9/source/fat/io_scsd_asm.s
@@ -1,22 +1,22 @@
.TEXT
@--------------------------------sd data--------------------------------
.equ sd_comadd,0x9800000
-.equ sd_dataadd,0x9000000
+.equ sd_dataadd,0x9000000
.equ sd_dataradd,0x9100000
@-----------------viod sd_data_write_s(u16 *buff,u16* crc16buff)-------------------
.ALIGN
- .GLOBAL sd_data_write_s
+ .GLOBAL sd_data_write_s
.CODE 32
sd_data_write_s:
stmfd r13!,{r4-r5}
mov r5,#512
mov r2,#sd_dataadd
sd_data_write_busy:
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
beq sd_data_write_busy
- ldrh r3,[r2]
+ ldrh r3,[r2]
mov r3,#0 @star bit
strh r3,[r2]
@@ -24,10 +24,10 @@ sd_data_write_loop:
ldrh r3,[r0],#2
add r3,r3,r3,lsl #20
mov r4,r3,lsl #8
- stmia r2,{r3-r4}
-
- subs r5, r5, #2
- bne sd_data_write_loop
+ stmia r2,{r3-r4}
+
+ subs r5, r5, #2
+ bne sd_data_write_loop
cmp r1,#0
movne r0,r1
@@ -38,11 +38,11 @@ sd_data_write_loop:
mov r3,#0xff @end bit
strh r3,[r2]
sd_data_write_loop2:
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x100
bne sd_data_write_loop2
- ldmia r2,{r3-r4}
+ ldmia r2,{r3-r4}
ldmfd r13!,{r4-r5}
bx r14
@@ -50,7 +50,7 @@ sd_data_write_loop2:
@----------void sd_data_read_s(u16 *buff)-------------
.ALIGN
- .GLOBAL sd_data_read_s
+ .GLOBAL sd_data_read_s
.CODE 32
sd_data_read_s:
stmfd r13!,{r4}
@@ -61,62 +61,62 @@ sd_data_read_loop1:
bne sd_data_read_loop1
mov r2,#512
sd_data_read_loop:
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
mov r3,r4,lsr #16
strh r3 ,[r0],#2
- subs r2, r2, #16
- bne sd_data_read_loop
+ subs r2, r2, #16
+ bne sd_data_read_loop
ldmia r1,{r3-r4} @crc 16
- ldmia r1,{r3-r4}
- ldmia r1,{r3-r4}
- ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
+ ldmia r1,{r3-r4}
ldrh r3,[r1] @end bit
- ldmfd r13!,{r4}
+ ldmfd r13!,{r4}
bx r14
@----------end sd_data_read_s-------------
@------void sd_com_crc16_s(u16* buff,u16 num,u16* crc16buff)
.ALIGN
- .GLOBAL sd_crc16_s
+ .GLOBAL sd_crc16_s
.CODE 32
sd_crc16_s:
stmfd r13!,{r4-r9}
mov r9,r2
- mov r3,#0
- mov r4,#0
- mov r5,#0
- mov r6,#0
+ mov r3,#0
+ mov r4,#0
+ mov r5,#0
+ mov r6,#0
ldr r7,=0x80808080
ldr r8,=0x1021
@@ -131,19 +131,19 @@ sd_crc16_loop:
eorne r3,r3,r8
tst r2,r7,lsr #24
eorne r3,r3,r8
-
+
mov r4,r4,lsl #1
tst r4,#0x10000
eorne r4,r4,r8
tst r2,r7,lsr #25
eorne r4,r4,r8
-
+
mov r5,r5,lsl #1
tst r5,#0x10000
eorne r5,r5,r8
tst r2,r7,lsr #26
eorne r5,r5,r8
-
+
mov r6,r6,lsl #1
tst r6,#0x10000
eorne r6,r6,r8
@@ -152,7 +152,7 @@ sd_crc16_loop:
mov r7,r7,ror #4
subs r1,r1,#4
- bne sd_crc16_loop
+ bne sd_crc16_loop
mov r2,r9
mov r8,#16
@@ -184,7 +184,7 @@ sd_crc16_write_data:
@--------------u8 sd_crc7_s(u16* buff,u16 num)----------------------------
.ALIGN
- .GLOBAL sd_crc7_s
+ .GLOBAL sd_crc7_s
.CODE 32
sd_crc7_s:
stmfd r13!,{r4}
@@ -206,7 +206,7 @@ sd_crc7_loop:
mov r4,r4,ror #1
subs r1,r1,#1
- bne sd_crc7_loop
+ bne sd_crc7_loop
mov r3,r3,lsl #1
add r0,r3,#1
@@ -216,7 +216,7 @@ sd_crc7_loop:
@--------------sd_com_read_s(u16* buff,u32 num)------------------
.ALIGN
- .GLOBAL sd_com_read_s
+ .GLOBAL sd_com_read_s
.CODE 32
sd_com_read_s:
@@ -229,8 +229,8 @@ sd_com_read_loop1:
sd_com_read_loop:
ldmia r2,{r3-r6}
- subs r1, r1, #1
- bne sd_com_read_loop
+ subs r1, r1, #1
+ bne sd_com_read_loop
ldmfd r13!,{r4-r6}
bx r14
@--------------end sd_com_read_s------------------
@@ -242,14 +242,14 @@ sd_com_read_loop:
.CODE 32
sd_com_write_s:
stmfd r13!,{r4-r6}
-
+
mov r2,#sd_comadd
sd_com_write_busy:
- ldrh r3,[r2]
+ ldrh r3,[r2]
tst r3,#0x1
beq sd_com_write_busy
- ldrh r3,[r2]
+ ldrh r3,[r2]
sd_com_write_loop:
ldrb r3,[r0],#1
@@ -257,9 +257,9 @@ sd_com_write_loop:
mov r4,r3,lsl #2
mov r5,r4,lsl #2
mov r6,r5,lsl #2
- stmia r2,{r3-r6}
- subs r1, r1, #1
- bne sd_com_write_loop
+ stmia r2,{r3-r6}
+ subs r1, r1, #1
+ bne sd_com_write_loop
ldmfd r13!,{r4-r6}
bx r14
@@ -267,7 +267,7 @@ sd_com_write_loop:
@-----------------void send_clk(u32 num)---------
.ALIGN
- .GLOBAL send_clk
+ .GLOBAL send_clk
.CODE 32
send_clk:
@@ -281,7 +281,7 @@ send_clk_loop1:
@---------------------------void SDCommand(u8 command,u8 num,u32 sector)--------------------
.ALIGN
- .GLOBAL SDCommand
+ .GLOBAL SDCommand
.CODE 32
@void SDCommand(u8 command,u8 num,u32 sector )
@{
@@ -338,12 +338,12 @@ SDCommand:
@ register u16 i,j;
@ i=readnum;
@ sectno<<=9;
-@ SDCommand(18,0,sector);
+@ SDCommand(18,0,sector);
@ for (j=0;j<i ; j++)
@ {
@ sd_data_read_s((u32)buff+j*512);
@ }
-@ SDCommand(12,0,0);
+@ SDCommand(12,0,0);
@ get_resp();
@ send_clk(0x10);
@
@@ -363,7 +363,7 @@ beginforj_ReadSector:
cmp r6,r5
bge endforj_ReadSector
mov r0,r4
- add r0,r0,r6,lsl #9
+ add r0,r0,r6,lsl #9
bl sd_data_read_s
add r6,r6,#1
b beginforj_ReadSector
@@ -408,17 +408,17 @@ get_resp:
@
@ sectno<<=9;
@
-@ SDCommand(25,0,sector);
+@ SDCommand(25,0,sector);
@ get_resp();
-@ send_clk(0x10);
+@ send_clk(0x10);
@
@ for (j=0;j<i ; j++)
@ {
@ sd_crc16_s((u32)(u32)buff+j*512,512,(u32)crc16);
@ sd_data_write_s((u32)buff+j*512,(u32)crc16);
-@ send_clk(0x10);
+@ send_clk(0x10);
@ }
-@ SDCommand(12,0,0);
+@ SDCommand(12,0,0);
@ get_resp();
@ send_clk(0x10);
@ while((*(u16*)sd_dataadd &0x0100)==0);
@@ -451,7 +451,7 @@ beginforj_WriteSector:
add r2,r13,#4
bl sd_crc16_s
mov r0,r4
- add r0,r0,r6,lsl #9
+ add r0,r0,r6,lsl #9
add r1,r13,#4
bl sd_data_write_s
mov r0,#0x10
@@ -481,7 +481,7 @@ beginwhile_WriteSector:
.GLOBAL InitSCMode
.CODE 32
InitSCMode:
- mvn r0,#0x0F6000000
+ mvn r0,#0x0F6000000
sub r0,r0,#0x01
mov r1,#0x0A500
add r1,r1,#0x5A
diff --git a/backends/platform/iphone/iphone_video.m b/backends/platform/iphone/iphone_video.m
index 33585bdacb..e8977be2f2 100644
--- a/backends/platform/iphone/iphone_video.m
+++ b/backends/platform/iphone/iphone_video.m
@@ -423,7 +423,7 @@ uint getSizeNextPOT(uint size) {
CGPoint point = [touch locationInView:self];
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseDragged], @"type",
@@ -432,13 +432,13 @@ uint getSizeNextPOT(uint size) {
nil
]
];
-
+
} else if (touch == _secondTouch) {
CGPoint point = [touch locationInView:self];
if (!getLocalMouseCoords(&point))
return;
-
+
[self addEvent:
[[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInt:kInputMouseSecondDragged], @"type",
@@ -447,7 +447,7 @@ uint getSizeNextPOT(uint size) {
nil
]
];
-
+
}
}
}
diff --git a/backends/platform/iphone/osys_events.cpp b/backends/platform/iphone/osys_events.cpp
index a190f68189..72408be89a 100644
--- a/backends/platform/iphone/osys_events.cpp
+++ b/backends/platform/iphone/osys_events.cpp
@@ -294,7 +294,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
int vecX = (x - _gestureStartX);
int vecY = (y - _gestureStartY);
-
+
int absX = abs(vecX);
int absY = abs(vecY);
@@ -315,7 +315,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
_needEventRestPeriod = true;
return true;
}
-
+
if (absX < kMaxDeviation && -vecY >= kNeededLength) {
// Swipe up
_mouseClickAndDragEnabled = !_mouseClickAndDragEnabled;
@@ -329,7 +329,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
dialog.runModal();
return false;
}
-
+
if (absY < kMaxDeviation && vecX >= kNeededLength) {
// Swipe right
_touchpadModeEnabled = !_touchpadModeEnabled;
@@ -343,7 +343,7 @@ bool OSystem_IPHONE::handleEvent_mouseSecondDragged(Common::Event &event, int x,
return false;
}
-
+
if (absY < kMaxDeviation && -vecX >= kNeededLength) {
// Swipe left
return false;
diff --git a/backends/platform/linuxmoto/linuxmoto-events.cpp b/backends/platform/linuxmoto/linuxmoto-events.cpp
index 50daa12d5b..007f7c732b 100644
--- a/backends/platform/linuxmoto/linuxmoto-events.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-events.cpp
@@ -110,7 +110,7 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
ev.key.keysym.sym = SDLK_RIGHTBRACKET;
}
// mod+vol'-' -> volume'-'
- else if (ev.key.keysym.sym == SDLK_d) {
+ else if (ev.key.keysym.sym == SDLK_d) {
ev.key.keysym.sym = SDLK_LEFTBRACKET;
}
#endif
@@ -175,33 +175,33 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
fillMouseEvent(event, _km.x, _km.y);
return true;
- } else if (ev.key.keysym.sym == SDLK_RETURN) {
- // Joystick center to pressing Left Mouse
+ } else if (ev.key.keysym.sym == SDLK_RETURN) {
+ // Joystick center to pressing Left Mouse
if (ev.key.type == SDL_KEYDOWN) {
event.type = Common::EVENT_LBUTTONDOWN;
} else {
- event.type = Common::EVENT_LBUTTONUP;
+ event.type = Common::EVENT_LBUTTONUP;
}
fillMouseEvent(event, _km.x, _km.y);
return true;
- } else if (ev.key.keysym.sym == SDLK_PLUS) {
+ } else if (ev.key.keysym.sym == SDLK_PLUS) {
// Volume Up to pressing Right Mouse
if (ev.key.type == SDL_KEYDOWN ) {
event.type = Common::EVENT_RBUTTONDOWN;
} else {
- event.type = Common::EVENT_RBUTTONUP;
+ event.type = Common::EVENT_RBUTTONUP;
}
fillMouseEvent(event, _km.x, _km.y);
return true;
- } else if (ev.key.keysym.sym == SDLK_MINUS) {
- // Volume Down to pressing Left Mouse
+ } else if (ev.key.keysym.sym == SDLK_MINUS) {
+ // Volume Down to pressing Left Mouse
if (ev.key.type == SDL_KEYDOWN) {
event.type = Common::EVENT_LBUTTONDOWN;
} else {
- event.type = Common::EVENT_LBUTTONUP;
+ event.type = Common::EVENT_LBUTTONUP;
}
fillMouseEvent(event, _km.x, _km.y);
@@ -214,7 +214,7 @@ bool OSystem_LINUXMOTO::remapKey(SDL_Event &ev, Common::Event &event) {
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = (Common::KeyCode)ev.key.keysym.sym;
event.kbd.ascii = mapKey(ev.key.keysym.sym, ev.key.keysym.mod, ev.key.keysym.unicode);
- }
+ }
return false;
}
diff --git a/backends/platform/linuxmoto/linuxmoto-sdl.cpp b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
index 91b4f08e82..ad1af455c3 100644
--- a/backends/platform/linuxmoto/linuxmoto-sdl.cpp
+++ b/backends/platform/linuxmoto/linuxmoto-sdl.cpp
@@ -28,7 +28,7 @@
void OSystem_LINUXMOTO::preprocessEvents(SDL_Event *event) {
if (event->type == SDL_ACTIVEEVENT) {
if (event->active.state == SDL_APPINPUTFOCUS && !event->active.gain) {
- suspendAudio();
+ suspendAudio();
for (;;) {
if (!SDL_WaitEvent(event)) {
SDL_Delay(10);
@@ -61,7 +61,7 @@ int OSystem_LINUXMOTO::resumeAudio() {
SDL_PauseAudio(0);
_audioSuspended = false;
return 0;
-}
+}
void OSystem_LINUXMOTO::setupMixer() {
OSystem_SDL::setupMixer();
diff --git a/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h b/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h
index 30f24261e7..07d9c3d7f9 100644
--- a/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h
+++ b/backends/platform/ps2/iop/rpckbd/include/ps2kbd.h
@@ -4,17 +4,17 @@
# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
#-----------------------------------------------------------------------
# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
-#
+#
# This file is dual licensed, with permission by the original author
# TyRaNiD, under both the Academic Free License version 2.0 and the GNU
# General Public License version 2 or later.
-#
+#
# This means you can choose whether to use this code under the terms of
# the Academic Free License version 2.0, or under the terms of the GNU
# General Public License version 2 or later. As long as you comply to the
# terms of at least one of these, you are allowed to use the code as
# permitted by the respective license.
-#
+#
# $Id$
# USB Keyboard Driver for PS2
*/
diff --git a/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c b/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c
index 48e506ad49..7266afdce5 100644
--- a/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c
+++ b/backends/platform/ps2/iop/rpckbd/src/ps2kbd.c
@@ -8,13 +8,13 @@
# This file is dual licensed, with permission by the original author
# TyRaNiD, under both the Academic Free License version 2.0 and the GNU
# General Public License version 2 or later.
-#
+#
# This means you can choose whether to use this code under the terms of
# the Academic Free License version 2.0, or under the terms of the GNU
# General Public License version 2 or later. As long as you comply to the
# terms of at least one of these, you are allowed to use the code as
# permitted by the respective license.
-#
+#
# $Id$
# USB Keyboard Driver for PS2
*/
diff --git a/backends/platform/ps2/iop/rpckbd/src/us_keymap.h b/backends/platform/ps2/iop/rpckbd/src/us_keymap.h
index 374285cd67..058156fa48 100644
--- a/backends/platform/ps2/iop/rpckbd/src/us_keymap.h
+++ b/backends/platform/ps2/iop/rpckbd/src/us_keymap.h
@@ -8,7 +8,7 @@
# This file is dual licensed, with permission by the original author
# TyRaNiD, under both the Academic Free License version 2.0 and the GNU
# General Public License version 2 or later.
-#
+#
# This means you can choose whether to use this code under the terms of
# the Academic Free License version 2.0, or under the terms of the GNU
# General Public License version 2 or later. As long as you comply to the
diff --git a/backends/platform/ps2/systemps2.h b/backends/platform/ps2/systemps2.h
index 0056a7cfe2..0068ffd93f 100644
--- a/backends/platform/ps2/systemps2.h
+++ b/backends/platform/ps2/systemps2.h
@@ -119,7 +119,7 @@ public:
virtual Common::SeekableReadStream *createConfigReadStream();
virtual Common::WriteStream *createConfigWriteStream();
- virtual Graphics::PixelFormat getOverlayFormat() const;
+ virtual Graphics::PixelFormat getOverlayFormat() const;
virtual Common::SaveFileManager *getSavefileManager();
virtual FilesystemFactory *getFilesystemFactory();
diff --git a/backends/platform/psp/elf32.h b/backends/platform/psp/elf32.h
index 78f65d3af2..a7cebe37dd 100644
--- a/backends/platform/psp/elf32.h
+++ b/backends/platform/psp/elf32.h
@@ -25,7 +25,7 @@
#ifndef BACKENDS_ELF_H
#define BACKENDS_ELF_H
-
+
/* ELF stuff */
typedef unsigned short Elf32_Half, Elf32_Section;
@@ -209,6 +209,6 @@ typedef struct
unsigned int __valgp; \
__asm__ ("add %0, $gp, $0" : "=r"(__valgp) : ); \
__valgp; \
-})
-
+})
+
#endif /* BACKENDS_ELF_H */
diff --git a/backends/platform/psp/osys_psp.cpp b/backends/platform/psp/osys_psp.cpp
index ea45863fbf..e29a9da763 100644
--- a/backends/platform/psp/osys_psp.cpp
+++ b/backends/platform/psp/osys_psp.cpp
@@ -713,7 +713,7 @@ bool OSystem_PSP::processInput(Common::Event &event) {
int newDpadX = 0, newDpadY = 0;
event.kbd.ascii = 0;
event.kbd.flags = 0;
-
+
if (pad.Buttons & PSP_CTRL_UP) {
newDpadY += 1;
if (pad.Buttons & PSP_CTRL_RTRIGGER)
@@ -740,7 +740,7 @@ bool OSystem_PSP::processInput(Common::Event &event) {
event.type = Common::EVENT_KEYDOWN;
event.kbd.keycode = getDpadEvent(newDpadX, newDpadY);
event.kbd.ascii = event.kbd.keycode - Common::KEYCODE_KP0 + '0';
- _dpadX = newDpadX;
+ _dpadX = newDpadX;
_dpadY = newDpadY;
}
else if (newDpadX == 0 && newDpadY == 0) {// We unpressed dpad
@@ -756,11 +756,11 @@ bool OSystem_PSP::processInput(Common::Event &event) {
_dpadX = 0; // so that we'll pick up a new dpad movement
_dpadY = 0;
}
-
+
_prevButtons = pad.Buttons;
return true;
-
- } else if (buttonsChanged & (PSP_CTRL_CROSS | PSP_CTRL_CIRCLE | PSP_CTRL_LTRIGGER | PSP_CTRL_RTRIGGER | PSP_CTRL_START |
+
+ } else if (buttonsChanged & (PSP_CTRL_CROSS | PSP_CTRL_CIRCLE | PSP_CTRL_LTRIGGER | PSP_CTRL_RTRIGGER | PSP_CTRL_START |
PSP_CTRL_SELECT | PSP_CTRL_SQUARE | PSP_CTRL_TRIANGLE)) {
if (buttonsChanged & PSP_CTRL_CROSS) {
event.type = (pad.Buttons & PSP_CTRL_CROSS) ? Common::EVENT_LBUTTONDOWN : Common::EVENT_LBUTTONUP;
@@ -769,7 +769,7 @@ bool OSystem_PSP::processInput(Common::Event &event) {
} else {
//any of the other buttons.
event.type = buttonsChanged & pad.Buttons ? Common::EVENT_KEYDOWN : Common::EVENT_KEYUP;
-
+
if (buttonsChanged & PSP_CTRL_LTRIGGER) {
event.kbd.keycode = Common::KEYCODE_ESCAPE;
event.kbd.ascii = 27;
@@ -894,7 +894,7 @@ inline Common::KeyCode OSystem_PSP::getDpadEvent(int x, int y) {
else /* y == 1 */
key = Common::KEYCODE_KP9;
}
-
+
return key;
}
diff --git a/backends/platform/psp/osys_psp.h b/backends/platform/psp/osys_psp.h
index a01b7a0b1b..2d52ea2218 100644
--- a/backends/platform/psp/osys_psp.h
+++ b/backends/platform/psp/osys_psp.h
@@ -94,7 +94,7 @@ protected:
Common::TimerManager *_timer;
Common::KeyCode getDpadEvent(int x, int y);
-
+
public:
OSystem_PSP();
virtual ~OSystem_PSP();
diff --git a/backends/platform/psp/powerman.cpp b/backends/platform/psp/powerman.cpp
index 89741f3fc9..f00272384d 100644
--- a/backends/platform/psp/powerman.cpp
+++ b/backends/platform/psp/powerman.cpp
@@ -25,7 +25,7 @@
#include <psppower.h>
#include <pspthreadman.h>
-
+
#include "./powerman.h"
#include "./trace.h"
#include "engine.h"
@@ -47,19 +47,19 @@ void PowerManager::debugPM() {
*
* Constructor
*
-********************************************/
+********************************************/
PowerManager::PowerManager() {
-
+
_flagMutex = NULL; /* Init mutex handle */
_listMutex = NULL; /* Init mutex handle */
_condSuspendable = NULL; /* Init condition variable */
_condPM = NULL;
-
+
_condSuspendable = SDL_CreateCond();
if (_condSuspendable <= 0) {
PSPDebugSuspend("PowerManager::PowerManager(): Couldn't create condSuspendable\n");
}
-
+
_condPM = SDL_CreateCond();
if (_condPM <= 0) {
PSPDebugSuspend("PowerManager::PowerManager(): Couldn't create condPM\n");
@@ -79,18 +79,18 @@ PowerManager::PowerManager() {
_criticalCounter = 0;
_pauseFlag = 0; _pauseFlagOld = 0; _pauseClientState = 0;
-#ifdef __PSP_DEBUG_SUSPEND__
+#ifdef __PSP_DEBUG_SUSPEND__
_listCounter = 0;
PMStatusSet(kInitDone);
- _error = 0;
+ _error = 0;
#endif
}
-
+
/*******************************************
*
* Function to register to be notified when suspend/resume time comes
*
-********************************************/
+********************************************/
int PowerManager::registerSuspend(Suspendable *item) {
// Register in list
PSPDebugSuspend("In registerSuspend\n");
@@ -111,7 +111,7 @@ int PowerManager::registerSuspend(Suspendable *item) {
PSPDebugSuspend("Out of registerSuspend\n");
debugPM();
-
+
return 0;
}
@@ -119,7 +119,7 @@ int PowerManager::registerSuspend(Suspendable *item) {
*
* Function to unregister to be notified when suspend/resume time comes
*
-********************************************/
+********************************************/
int PowerManager::unregisterSuspend(Suspendable *item) {
PSPDebugSuspend("In unregisterSuspend\n");
@@ -133,32 +133,32 @@ int PowerManager::unregisterSuspend(Suspendable *item) {
_suspendList.remove(item);
#ifdef __PSP_DEBUG_SUSPEND__
_listCounter--;
-#endif
-
+#endif
+
if (SDL_mutexV(_listMutex) != 0) {
PSPDebugTrace("PowerManager::unregisterSuspend(): Couldn't unlock _listMutex %d\n", _listMutex);
}
PSPDebugSuspend("Out of unregisterSuspend\n");
debugPM();
-
+
return 0;
}
-
+
/*******************************************
*
* Destructor
*
-********************************************/
+********************************************/
PowerManager::~PowerManager() {
#ifdef __PSP_DEBUG_SUSPEND__
PMStatusSet(kDestroyPM);
#endif
-
+
SDL_DestroyCond(_condSuspendable);
_condSuspendable = 0;
-
+
SDL_DestroyCond(_condPM);
_condPM = 0;
@@ -173,11 +173,11 @@ int PowerManager::unregisterSuspend(Suspendable *item) {
*
* Unsafe function to poll for a pause event (first stage of suspending)
* Only for pausing the engine, which doesn't need high synchronization ie. we don't care if it misreads
-* the flag a couple of times since there is NO mutex protection (for performance reasons).
+* the flag a couple of times since there is NO mutex protection (for performance reasons).
* Polling the engine happens regularly.
* On the other hand, we don't know if there will be ANY polling which prevents us from using proper events.
*
-********************************************/
+********************************************/
void PowerManager::pollPauseEngine() {
bool pause = _pauseFlag; // We copy so as not to have multiple values
@@ -194,17 +194,17 @@ void PowerManager::pollPauseEngine() {
PSPDebugSuspend("Unpausing for resume in PowerManager::pollPauseEngine()\n");
_pauseClientState = PowerManager::Unpaused; // Tell PM we're in the middle of pausing
}
-
+
_pauseFlagOld = pause;
}
-}
-
+}
+
/*******************************************
*
* Function to be called by threads wanting to block on the PSP entering suspend
* Use this for small critical sections where you can easily restore the previous state.
*
-********************************************/
+********************************************/
int PowerManager::blockOnSuspend() {
return beginCriticalSection(true);
}
@@ -214,7 +214,7 @@ void PowerManager::pollPauseEngine() {
* Function to block on a suspend, then start a non-suspendable critical section
* Use this for large or REALLY critical critical-sections.
* Make sure to call endCriticalSection or the PSP won't suspend.
-********************************************/
+********************************************/
int PowerManager::beginCriticalSection(bool justBlock) {
int ret = NotBlocked;
@@ -238,7 +238,7 @@ void PowerManager::pollPauseEngine() {
PSPDebugSuspend("We got blocked!!\n");
debugPM();
}
-
+
// Now prevent the PM from suspending until we're done
if (justBlock == false)
_criticalCounter++;
@@ -261,14 +261,14 @@ int PowerManager::endCriticalSection() {
// We're done with our critical section
_criticalCounter--;
-
+
if (_criticalCounter <= 0) {
if (_suspendFlag == true) { // If the PM is sleeping, this flag must be set
PSPDebugSuspend("Unblocked thread waking up the PM.\n");
debugPM();
SDL_CondBroadcast(_condPM);
-
+
PSPDebugSuspend("Woke up the PM\n");
debugPM();
}
@@ -291,10 +291,10 @@ int PowerManager::endCriticalSection() {
*
* Callback function to be called to put every Suspendable to suspend
*
-********************************************/
+********************************************/
int PowerManager::suspend() {
int ret = 0;
-
+
if (_pauseFlag) return ret; // Very important - make sure we only suspend once
scePowerLock(0); // Critical to make sure PSP doesn't suspend before we're done
@@ -302,14 +302,14 @@ int PowerManager::suspend() {
// The first stage of suspend is pausing the engine if possible. We don't want to cause files
// to block, or we might not get the engine to pause. On the other hand, we might wait for polling
// and it'll never happen. We also want to do this w/o mutexes (for speed) which is ok in this case.
- _pauseFlag = true;
+ _pauseFlag = true;
PMStatusSet(kWaitForClientPause);
-
+
// Now we wait, giving the engine thread some time to find our flag.
for (int i = 0; i < 10 && _pauseClientState == Unpaused; i++)
sceKernelDelayThread(50000); // We wait 50 msec x 10 times = 0.5 seconds
-
+
if (_pauseClientState == Pausing) { // Our event has been acknowledged. Let's wait until the client is done.
PMStatusSet(kWaitForClientToFinishPausing);
@@ -317,13 +317,13 @@ int PowerManager::suspend() {
sceKernelDelayThread(50000); // We wait 50 msec at a time
}
- // It's possible that the polling thread missed our pause event, but there's nothing we can do about that.
+ // It's possible that the polling thread missed our pause event, but there's nothing we can do about that.
// We can't know if there's polling going on or not. It's usually not a critical thing anyway.
-
+
PMStatusSet(kGettingFlagMutexSuspend);
-
+
// Now we set the suspend flag to true to cause reading threads to block
-
+
if (SDL_mutexP(_flagMutex) != 0) {
PSPDebugTrace("PowerManager::suspend(): Couldn't lock flagMutex %d\n", _flagMutex);
_error = Error;
@@ -331,9 +331,9 @@ int PowerManager::suspend() {
}
PMStatusSet(kGotFlagMutexSuspend);
-
+
_suspendFlag = true;
-
+
// Check if anyone is in a critical section. If so, we'll wait for them
if (_criticalCounter > 0) {
PMStatusSet(kWaitCritSectionSuspend);
@@ -348,7 +348,7 @@ int PowerManager::suspend() {
}
PMStatusSet(kGettingListMutexSuspend);
-
+
// Loop over list, calling suspend()
if (SDL_mutexP(_listMutex) != 0) {
PSPDebugTrace("PowerManager::suspend(): Couldn't lock listMutex %d\n", _listMutex);
@@ -362,7 +362,7 @@ int PowerManager::suspend() {
for (; i != _suspendList.end(); ++i) {
(*i)->suspend();
}
-
+
PMStatusSet(kDoneIteratingListSuspend);
if (SDL_mutexV(_listMutex) != 0) {
@@ -373,7 +373,7 @@ int PowerManager::suspend() {
PMStatusSet(kDoneSuspend);
scePowerUnlock(0); // Allow the PSP to go to sleep now
-
+
return ret;
}
@@ -381,17 +381,17 @@ int PowerManager::suspend() {
*
* Callback function to resume every Suspendable
*
-********************************************/
+********************************************/
int PowerManager::resume() {
int ret = 0;
// Make sure we can't get another suspend
scePowerLock(0);
-
+
if (!_pauseFlag) return ret; // Make sure we can only resume once
-
+
PMStatusSet(kGettingListMutexResume);
-
+
// First we notify our Suspendables. Loop over list, calling resume()
if (SDL_mutexP(_listMutex) != 0) {
PSPDebugTrace("PowerManager::resume(): Couldn't lock listMutex %d\n", _listMutex);
@@ -405,7 +405,7 @@ int PowerManager::resume() {
for (; i != _suspendList.end(); ++i) {
(*i)->resume();
}
-
+
PMStatusSet(kDoneIteratingListResume);
if (SDL_mutexV(_listMutex) != 0) {
@@ -413,7 +413,7 @@ int PowerManager::resume() {
_error = Error;
ret = Error;
}
-
+
PMStatusSet(kGettingFlagMutexResume);
// Now we set the suspend flag to false
@@ -423,11 +423,11 @@ int PowerManager::resume() {
ret = Error;
}
PMStatusSet(kGotFlagMutexResume);
-
+
_suspendFlag = false;
PMStatusSet(kSignalSuspendedThreadsResume);
-
+
// Signal the other threads to wake up
if (SDL_CondBroadcast(_condSuspendable) != 0) {
PSPDebugTrace("PowerManager::resume(): Couldn't broadcast condition %d\n", _condSuspendable);
@@ -442,10 +442,10 @@ int PowerManager::resume() {
ret = Error;
}
PMStatusSet(kDoneResume);
-
+
_pauseFlag = false; // Signal engine to unpause
scePowerUnlock(0); // Allow new suspends
-
+
return ret;
}
diff --git a/backends/platform/psp/powerman.h b/backends/platform/psp/powerman.h
index 43fb55459b..78c403fa5c 100644
--- a/backends/platform/psp/powerman.h
+++ b/backends/platform/psp/powerman.h
@@ -25,12 +25,12 @@
#ifndef POWERMAN_H
#define POWERMAN_H
-
+
#include <SDL/SDL_thread.h>
#include <SDL/SDL_mutex.h>
#include "common/singleton.h"
#include "common/list.h"
-
+
/*
* Implement this class (interface) if you want to use PowerManager's suspend callback functionality
*
@@ -41,11 +41,11 @@
virtual int suspend() = 0;
virtual int resume() = 0;
};
-
- /******************************************************************************************************
+
+ /******************************************************************************************************
*
* This class will call a Suspendable when the PSP goes to suspend/resumes. It also provides the ability to block
- * a thread when the PSP is going to suspend/suspending, and to wake it up when the PSP is resumed.
+ * a thread when the PSP is going to suspend/suspending, and to wake it up when the PSP is resumed.
* This ability is very useful for managing the PSPIoStream class, but may be found useful by other classes as well.
*
*******************************************************************************************************/
@@ -61,13 +61,13 @@ public:
int resume(); /* callback to have all items in list resume */
// Functions for pausing the engine
void pollPauseEngine(); /* Poll whether the engine should be paused */
-
+
enum {
Error = -1,
NotBlocked = 0,
Blocked = 1
};
-
+
enum PauseState {
Unpaused = 0,
PauseEvent,
@@ -75,7 +75,7 @@ public:
Pausing,
Paused
};
-
+
private:
friend class Common::Singleton<PowerManager>;
PowerManager();
@@ -94,10 +94,10 @@ public:
SDL_cond *_condPM; /* signal to wake up the PM from a critical section */
volatile int _criticalCounter; /* Counter of how many threads are in a critical section */
int _error; /* error code - PM can't talk to us. For debugging */
-
+
// States for PM to be in (used for debugging)
enum PMState {
- kInitDone = 1 ,
+ kInitDone = 1 ,
kDestroyPM,
kWaitForClientPause,
kWaitForClientToFinishPausing,
@@ -117,22 +117,22 @@ public:
kSignalSuspendedThreadsResume,
kDoneSignallingSuspendedThreadsResume,
kDoneResume
- };
+ };
#ifdef __PSP_DEBUG_SUSPEND__
volatile int _listCounter; /* How many people are in the list - just for debugging */
-
+
void debugPM(); /* print info about the PM */
void PMStatusSet(PMState s) { _PMStatus = s; }
volatile int _PMStatus; /* What the PM is doing */
-
+
public:
int getPMStatus() { return _PMStatus; }
-
-#endif /* __PSP_DEBUG_SUSPEND__ */
-
+
+#endif /* __PSP_DEBUG_SUSPEND__ */
+
};
-
+
// For easy access
#define PowerMan PowerManager::instance()
diff --git a/backends/platform/psp/pspkeyboard.cpp b/backends/platform/psp/pspkeyboard.cpp
index 0ad5b73cac..40b63d0cbd 100644
--- a/backends/platform/psp/pspkeyboard.cpp
+++ b/backends/platform/psp/pspkeyboard.cpp
@@ -381,7 +381,7 @@ void PSPKeyboard::moveTo(const int newX, const int newY) {
/* move the position the keyboard is currently drawn at */
void PSPKeyboard::increaseKeyboardLocationX(int amount) {
int newX = _moved_x + amount;
-
+
if (newX > PSP_SCREEN_WIDTH - 5 || newX < 0 - 140) // clamp
return;
_moved_x = newX;
@@ -390,7 +390,7 @@ void PSPKeyboard::increaseKeyboardLocationX(int amount) {
/* move the position the keyboard is currently drawn at */
void PSPKeyboard::increaseKeyboardLocationY(int amount) {
int newY = _moved_y + amount;
-
+
if (newY > PSP_SCREEN_HEIGHT - 5 || newY < 0 - 140) // clamp
return;
_moved_y = newY;
diff --git a/backends/platform/psp/pspkeyboard.h b/backends/platform/psp/pspkeyboard.h
index 063aa6bd5b..1d2428b2a0 100644
--- a/backends/platform/psp/pspkeyboard.h
+++ b/backends/platform/psp/pspkeyboard.h
@@ -68,15 +68,15 @@ private:
u32 paletteSize;
};
-
+
// structures used for drawing the keyboard
struct Vertex {
float u, v;
unsigned int color;
float x,y,z;
};
-
- void surface_draw_offset(struct gu_surface* surface,
+
+ void surface_draw_offset(struct gu_surface* surface,
int screenX, int screenY, int offsetX, int offsetY, int intWidth, int intHeight);
void block_copy(gu_surface* surface, u8 *texture);
int load_png_image(Common::SeekableReadStream *, unsigned char *ImageBuffer, uint32 *palette);
@@ -85,7 +85,7 @@ private:
void flipNibbles(gu_surface* surface); // Convert to PSP 4-bit format
void increaseKeyboardLocationX(int amount); // Move keyboard onscreen
void increaseKeyboardLocationY(int amount);
-
+
static short _modeChar[MODE_COUNT][5][6];
static const char *_guiStrings[];
bool _init;
@@ -96,10 +96,10 @@ private:
int _moved_y;
bool _moved; // whether the keyboard was moved
gu_surface _keyTextures[guiStringsSize];
-
+
State _state; // State of keyboard Keyboard state machine
State _lastState;
-
+
enum Cursor {
kUp = 0,
kRight,
@@ -107,7 +107,7 @@ private:
kLeft,
kCenter
};
-
+
Cursor _oldCursor; // Point to place of last cursor
};
diff --git a/backends/platform/psp/psploader.cpp b/backends/platform/psp/psploader.cpp
index 31c183f3fa..e720fbe4a1 100644
--- a/backends/platform/psp/psploader.cpp
+++ b/backends/platform/psp/psploader.cpp
@@ -138,7 +138,7 @@ bool DLObject::relocate(int fd, unsigned long offset, unsigned long size, void *
firstHi16 = i; // Keep the first Hi16 we saw
seenHi16 = true;
ahl = (*target & 0xffff) << 16; // Take lower 16 bits shifted up
-
+
lastHiSymVal = sym->st_value;
hi16InShorts = (ShortsMan.inGeneralSegment((char *)sym->st_value)); // Fix for problem with switching btw segments
if (debugRelocs[0]++ < DEBUG_NUM) // Print only a set number
@@ -154,7 +154,7 @@ bool DLObject::relocate(int fd, unsigned long offset, unsigned long size, void *
free(rel);
return false;
}
-
+
// Fix: bug in gcc makes LO16s connect to wrong HI16s sometimes (shorts and regular segment)
// Note that we can check the entire shorts segment because the executable's shorts don't belong to this plugin section
// and will be screened out above
@@ -165,12 +165,12 @@ bool DLObject::relocate(int fd, unsigned long offset, unsigned long size, void *
ahl -= (lastHiSymVal & 0xffff0000); // We assume gcc meant the same offset
ahl += (sym->st_value & 0xffff0000);
}
-
+
ahl &= 0xffff0000; // Clean lower 16 bits for repeated LO16s
a = *target & 0xffff; // Take lower 16 bits of the target
a = (a << 16) >> 16; // Sign extend them
ahl += a; // Add lower 16 bits. AHL is now complete
-
+
// Fix: we can have LO16 access to the short segment sometimes
if (lo16InShorts) {
relocation = ahl + _shortsSegment->getOffset(); // Add in the short segment offset
@@ -243,7 +243,7 @@ bool DLObject::relocate(int fd, unsigned long offset, unsigned long size, void *
case R_MIPS_32: // Absolute addressing
if (sym->st_shndx < SHN_LOPROC) { // Only shift for plugin section.
a = *target; // Get full 32 bits of addend
-
+
if (ShortsMan.inGeneralSegment((char *)sym->st_value)) // Check if we're in the shorts segment
relocation = a + _shortsSegment->getOffset(); // Shift by shorts offset
else // We're in the main section
diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp
index 5905d5f7ee..d7f6468b24 100644
--- a/backends/platform/sdl/events.cpp
+++ b/backends/platform/sdl/events.cpp
@@ -219,7 +219,7 @@ bool OSystem_SDL::dispatchSDLEvent(SDL_Event &ev, Common::Event &event) {
return true;
}
-
+
return false;
}
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp
index ce3647d6fb..10716fe89a 100644
--- a/backends/platform/sdl/graphics.cpp
+++ b/backends/platform/sdl/graphics.cpp
@@ -205,7 +205,7 @@ OSystem::TransactionError OSystem_SDL::endGFXTransaction() {
} else if (_transactionDetails.needUpdatescreen) {
setGraphicsModeIntern();
internUpdateScreen();
- }
+ }
_transactionMode = kTransactionNone;
return (TransactionError)errors;
@@ -255,10 +255,10 @@ Common::List<Graphics::PixelFormat> OSystem_SDL::getSupportedFormats() {
Graphics::PixelFormat format = Graphics::PixelFormat::createFormatCLUT8();
if (_hwscreen) {
// Get our currently set hardware format
- format = Graphics::PixelFormat(_hwscreen->format->BytesPerPixel,
- 8 - _hwscreen->format->Rloss, 8 - _hwscreen->format->Gloss,
- 8 - _hwscreen->format->Bloss, 8 - _hwscreen->format->Aloss,
- _hwscreen->format->Rshift, _hwscreen->format->Gshift,
+ format = Graphics::PixelFormat(_hwscreen->format->BytesPerPixel,
+ 8 - _hwscreen->format->Rloss, 8 - _hwscreen->format->Gloss,
+ 8 - _hwscreen->format->Bloss, 8 - _hwscreen->format->Aloss,
+ _hwscreen->format->Rshift, _hwscreen->format->Gshift,
_hwscreen->format->Bshift, _hwscreen->format->Ashift);
// Workaround to MacOSX SDL not providing an accurate Aloss value.
@@ -482,7 +482,7 @@ static void fixupResolutionForAspectRatio(AspectRatio desiredAspectRatio, int &w
if (desiredAspectRatio.isAuto())
return;
-
+
int kw = desiredAspectRatio.kw();
int kh = desiredAspectRatio.kh();
@@ -545,8 +545,8 @@ bool OSystem_SDL::loadGFXMode() {
// Create the surface that contains the 8 bit game data
//
#ifdef USE_RGB_COLOR
- _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight,
- _screenFormat.bytesPerPixel << 3,
+ _screen = SDL_CreateRGBSurface(SDL_SWSURFACE, _videoMode.screenWidth, _videoMode.screenHeight,
+ _screenFormat.bytesPerPixel << 3,
((1 << _screenFormat.rBits()) - 1) << _screenFormat.rShift ,
((1 << _screenFormat.gBits()) - 1) << _screenFormat.gShift ,
((1 << _screenFormat.bBits()) - 1) << _screenFormat.bShift ,
diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h
index a38d76583f..0b862abd63 100644
--- a/backends/platform/sdl/sdl.h
+++ b/backends/platform/sdl/sdl.h
@@ -75,9 +75,9 @@ class AspectRatio {
public:
AspectRatio() { _kw = _kh = 0; }
AspectRatio(int w, int h);
-
+
bool isAuto() const { return (_kw | _kh) == 0; }
-
+
int kw() const { return _kw; }
int kh() const { return _kh; }
};
diff --git a/backends/platform/symbian/src/SymbianActions.cpp b/backends/platform/symbian/src/SymbianActions.cpp
index 58ede5988f..d925f5f0e7 100644
--- a/backends/platform/symbian/src/SymbianActions.cpp
+++ b/backends/platform/symbian/src/SymbianActions.cpp
@@ -103,13 +103,13 @@ SymbianActions::SymbianActions()
void SymbianActions::initInstanceMain(OSystem *mainSystem) {
int i;
-
+
// Need to do this since all old mappings are reset after engineDone
_initialized = false;
Actions::initInstanceMain(mainSystem);
// Disable all mappings before setting main mappings again
- for (i = 0; i < ACTION_LAST; i++) {
+ for (i = 0; i < ACTION_LAST; i++) {
_action_enabled[i] = false;
}
diff --git a/backends/platform/symbian/src/portdefs.h b/backends/platform/symbian/src/portdefs.h
index 9059ae9e49..2a26771a0a 100644
--- a/backends/platform/symbian/src/portdefs.h
+++ b/backends/platform/symbian/src/portdefs.h
@@ -127,9 +127,9 @@
#define USE_ARM_COSTUME_ASM
#define USE_ARM_SOUND_ASM
#endif
-// This is not really functioning yet.
+// This is not really functioning yet.
// Default SDL keys should map to standard keys I think!
-//#define ENABLE_KEYMAPPER
+//#define ENABLE_KEYMAPPER
// Symbian bsearch implementation is flawed
void *scumm_bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *));
diff --git a/backends/platform/wii/options.cpp b/backends/platform/wii/options.cpp
index 7446c023f0..729fb6cb41 100644
--- a/backends/platform/wii/options.cpp
+++ b/backends/platform/wii/options.cpp
@@ -256,7 +256,7 @@ void WiiOptionsDialog::revert() {
void WiiOptionsDialog::load() {
int i;
-
+
i = ConfMan.getInt(_strUnderscanX,
Common::ConfigManager::kApplicationDomain);
_sliderUnderscanX->setValue(i);
diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp
index f971f98678..488834fc20 100644
--- a/backends/platform/wii/osystem_events.cpp
+++ b/backends/platform/wii/osystem_events.cpp
@@ -326,7 +326,7 @@ bool OSystem_Wii::pollEvent(Common::Event &event) {
if (bh & PADS_UP) {
PAD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5,
Common::KBD_CTRL);
-
+
if (bd & PADS_R) {
_consoleVisible = !_consoleVisible;
return false;
diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp
index f1d3e255e2..a1fce7f2e9 100644
--- a/backends/platform/wii/osystem_gfx.cpp
+++ b/backends/platform/wii/osystem_gfx.cpp
@@ -364,7 +364,7 @@ void OSystem_Wii::setCursorPalette(const byte *colors, uint start, uint num) {
printf("could not init the mouse texture\n");
::abort();
}
-
+
gfx_tex_set_bilinear_filter(&_texMouse, _bilinearFilter);
}
diff --git a/backends/platform/wince/smartLandScale.s b/backends/platform/wince/smartLandScale.s
index 9be21c45cb..4f26462e95 100644
--- a/backends/platform/wince/smartLandScale.s
+++ b/backends/platform/wince/smartLandScale.s
@@ -177,7 +177,7 @@ x_loop:
SUBS r6,r6,#16 @ width -= 16
STRH r12,[r9],#2 @ store dA
BGT x_loop
-
+
ADD r0, r0, r8 @ srcPtr += srcSpan
ADD r2, r2, r3 @ dstPtr += dstSpan
SUBS r7, r7, #1
diff --git a/backends/saves/psp/psp-saves.cpp b/backends/saves/psp/psp-saves.cpp
index bba27762cd..475c8fa6c5 100644
--- a/backends/saves/psp/psp-saves.cpp
+++ b/backends/saves/psp/psp-saves.cpp
@@ -51,7 +51,7 @@ void PSPSaveFileManager::checkPath(const Common::FSNode &dir) {
clearError();
PowerMan.beginCriticalSection();
-
+
//check if the save directory exists
SceUID fd = sceIoDopen(savePath);
if (fd < 0) {
@@ -61,7 +61,7 @@ void PSPSaveFileManager::checkPath(const Common::FSNode &dir) {
//it exists, so close it again.
sceIoDclose(fd);
}
-
+
PowerMan.endCriticalSection();
}
#endif
diff --git a/backends/vkeybd/virtual-keyboard.h b/backends/vkeybd/virtual-keyboard.h
index 66f5f8b4ea..db94cbe476 100644
--- a/backends/vkeybd/virtual-keyboard.h
+++ b/backends/vkeybd/virtual-keyboard.h
@@ -121,7 +121,7 @@ protected:
OverlayColor displayFontColor;
Mode() : image(0) {}
- ~Mode() {
+ ~Mode() {
if (image) {
image->free();
delete image;