diff options
author | Max Horn | 2009-06-04 11:45:34 +0000 |
---|---|---|
committer | Max Horn | 2009-06-04 11:45:34 +0000 |
commit | c0f3c2dbd1d5d14457ac12136127233b3b08a237 (patch) | |
tree | 14c266d1c6938a7c2e55af92b2fb1e313bca9913 /backends/platform | |
parent | 6b1110b82d37c067dec5668d9ddaa1e51e5d0e91 (diff) | |
download | scummvm-rg350-c0f3c2dbd1d5d14457ac12136127233b3b08a237.tar.gz scummvm-rg350-c0f3c2dbd1d5d14457ac12136127233b3b08a237.tar.bz2 scummvm-rg350-c0f3c2dbd1d5d14457ac12136127233b3b08a237.zip |
Code formatting in the gp2xwiz backend
svn-id: r41167
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/gp2xwiz/gp2xwiz-events.cpp | 30 | ||||
-rw-r--r-- | backends/platform/gp2xwiz/gp2xwiz-hw.cpp | 25 | ||||
-rw-r--r-- | backends/platform/gp2xwiz/gp2xwiz-main.cpp | 2 |
3 files changed, 25 insertions, 32 deletions
diff --git a/backends/platform/gp2xwiz/gp2xwiz-events.cpp b/backends/platform/gp2xwiz/gp2xwiz-events.cpp index fa03e247d9..ea1b191213 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-events.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-events.cpp @@ -95,39 +95,37 @@ void OSystem_GP2XWIZ::moveStick() { if ((stickBtn[0])||(stickBtn[2])||(stickBtn[4])||(stickBtn[6])) stickBtn[1] = stickBtn[3] = stickBtn[5] = stickBtn[7] = 0; - if ((stickBtn[1])||(stickBtn[2])||(stickBtn[3])){ - if (_km.x_down_count!=2){ + if ((stickBtn[1])||(stickBtn[2])||(stickBtn[3])) { + if (_km.x_down_count!=2) { _km.x_vel = -1; _km.x_down_count = 1; - }else + } else _km.x_vel = -4; - } else if ((stickBtn[5])||(stickBtn[6])||(stickBtn[7])){ - if (_km.x_down_count!=2){ + } else if ((stickBtn[5])||(stickBtn[6])||(stickBtn[7])) { + if (_km.x_down_count!=2) { _km.x_vel = 1; _km.x_down_count = 1; - }else + } else _km.x_vel = 4; - } - else{ + } else { _km.x_vel = 0; _km.x_down_count = 0; } - if ((stickBtn[0])||(stickBtn[1])||(stickBtn[7])){ - if (_km.y_down_count!=2){ + if ((stickBtn[0])||(stickBtn[1])||(stickBtn[7])) { + if (_km.y_down_count!=2) { _km.y_vel = -1; _km.y_down_count = 1; - }else + } else _km.y_vel = -4; - } else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])){ - if (_km.y_down_count!=2){ + } else if ((stickBtn[3])||(stickBtn[4])||(stickBtn[5])) { + if (_km.y_down_count!=2) { _km.y_vel = 1; _km.y_down_count = 1; - }else + } else _km.y_vel = 4; - } - else{ + } else { _km.y_vel = 0; _km.y_down_count = 0; } diff --git a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp index 7133614a3e..c804b0d819 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-hw.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-hw.cpp @@ -50,26 +50,21 @@ void deviceInit() { void deviceDeinit() { } -void mixerMoveVolume( int direction ) -{ - if( volumeLevel <= 10 ) - { - if( direction == VOLUME_UP ) volumeLevel += VOLUME_CHANGE_RATE/2; - if( direction == VOLUME_DOWN ) volumeLevel -= VOLUME_CHANGE_RATE/2; - } - else - { - if( direction == VOLUME_UP ) volumeLevel += VOLUME_CHANGE_RATE; - if( direction == VOLUME_DOWN ) volumeLevel -= VOLUME_CHANGE_RATE; +void mixerMoveVolume(int direction) { + if (volumeLevel <= 10) { + if (direction == VOLUME_UP) volumeLevel += VOLUME_CHANGE_RATE/2; + if (direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE/2; + } else { + if(direction == VOLUME_UP) volumeLevel += VOLUME_CHANGE_RATE; + if(direction == VOLUME_DOWN) volumeLevel -= VOLUME_CHANGE_RATE; } - if( volumeLevel < VOLUME_MIN ) volumeLevel = VOLUME_MIN; - if( volumeLevel > VOLUME_MAX ) volumeLevel = VOLUME_MAX; + if (volumeLevel < VOLUME_MIN) volumeLevel = VOLUME_MIN; + if (volumeLevel > VOLUME_MAX) volumeLevel = VOLUME_MAX; unsigned long soundDev = open("/dev/mixer", O_RDWR); - if(soundDev) - { + if(soundDev) { int vol = ((volumeLevel << 8) | volumeLevel); ioctl(soundDev, SOUND_MIXER_WRITE_PCM, &vol); close(soundDev); diff --git a/backends/platform/gp2xwiz/gp2xwiz-main.cpp b/backends/platform/gp2xwiz/gp2xwiz-main.cpp index 6b61f9c26a..4bd3f98211 100644 --- a/backends/platform/gp2xwiz/gp2xwiz-main.cpp +++ b/backends/platform/gp2xwiz/gp2xwiz-main.cpp @@ -23,7 +23,7 @@ * */ -#include <common/scummsys.h> +#include "common/scummsys.h" #include <SDL/SDL.h> #include "backends/platform/gp2xwiz/gp2xwiz-sdl.h" |