aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ds/arm9/source/dsmain.cpp
diff options
context:
space:
mode:
authorMax Horn2010-07-05 20:36:11 +0000
committerMax Horn2010-07-05 20:36:11 +0000
commit429de8f6efc3d3dcbbdfbc9f7eb53d2d096ca925 (patch)
treecc94d2427cc629bd6b2047c6289c58b844efb5e9 /backends/platform/ds/arm9/source/dsmain.cpp
parentcffcc3d9360dbbadec4a3e18c3b6ca64dfc27995 (diff)
downloadscummvm-rg350-429de8f6efc3d3dcbbdfbc9f7eb53d2d096ca925.tar.gz
scummvm-rg350-429de8f6efc3d3dcbbdfbc9f7eb53d2d096ca925.tar.bz2
scummvm-rg350-429de8f6efc3d3dcbbdfbc9f7eb53d2d096ca925.zip
DS: More formating, made more vars static
svn-id: r50708
Diffstat (limited to 'backends/platform/ds/arm9/source/dsmain.cpp')
-rw-r--r--backends/platform/ds/arm9/source/dsmain.cpp61
1 files changed, 19 insertions, 42 deletions
diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp
index d1e30b93cd..dc52038cec 100644
--- a/backends/platform/ds/arm9/source/dsmain.cpp
+++ b/backends/platform/ds/arm9/source/dsmain.cpp
@@ -1026,8 +1026,9 @@ u16 *get16BitBackBuffer() {
}
s32 get8BitBackBufferStride() {
- // When the CPU scaler is enabled, the back buffer is in system RAM and is 320 pixels wide
- // When the CPU scaler is disabled, the back buffer is in video memory and therefore must have a 512 pixel stride
+ // When the CPU scaler is enabled, the back buffer is in system RAM and is
+ // 320 pixels wide. When the CPU scaler is disabled, the back buffer is in
+ // video memory and therefore must have a 512 pixel stride.
if (isCpuScalerEnabled()){
return 320;
@@ -1371,8 +1372,7 @@ void doScreenTapMode(OSystem_DS *system) {
system->addEvent(event);
}
-void doButtonSelectMode(OSystem_DS *system)
-{
+void doButtonSelectMode(OSystem_DS *system) {
Common::Event event;
@@ -1670,12 +1670,9 @@ void addEventsToQueue() {
if (!keyboardEnable) {
-
if (((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) || (indyFightState)) && (displayModeIs8Bit)) {
// Controls specific to the control method
-
-
if (s_currentGame->control == CONT_SKY) {
// Extra controls for Beneath a Steel Sky
if ((getKeysDown() & KEY_DOWN)) {
@@ -1686,7 +1683,6 @@ void addEventsToQueue() {
if (s_currentGame->control == CONT_AGI) {
// Extra controls for Leisure Suit Larry and KQ4
-
if ((getKeysHeld() & KEY_UP) && (getKeysHeld() & KEY_START)
/*&& (!strcmp(gameName, "LLLLL"))*/) {
consolePrintf("Cheat key!\n");
@@ -1699,11 +1695,8 @@ void addEventsToQueue() {
event.type = Common::EVENT_KEYUP;
system->addEvent(event);
}
-
}
-
-
if (s_currentGame->control == CONT_SIMON) {
// Extra controls for Simon the Sorcerer
if ((getKeysDown() & KEY_DOWN)) {
@@ -1719,8 +1712,6 @@ void addEventsToQueue() {
}
}
-
-
if (s_currentGame->control == CONT_SCUMM_ORIGINAL) {
// Extra controls for Scumm v1-5 games
if ((getKeysDown() & KEY_DOWN)) {
@@ -1803,9 +1794,7 @@ void addEventsToQueue() {
}
consumeKeys();
-
consumePenEvents();
-
}
}
@@ -1835,23 +1824,19 @@ void updateStatus() {
if (displayModeIs8Bit) {
if (!tapScreenClicks) {
switch (mouseMode) {
- case MOUSE_LEFT: {
- offs = 1;
- break;
- }
- case MOUSE_RIGHT: {
- offs = 2;
- break;
- }
- case MOUSE_HOVER: {
- offs = 0;
- break;
- }
- default: {
- // Nothing!
- offs = 0;
- break;
- }
+ case MOUSE_LEFT:
+ offs = 1;
+ break;
+ case MOUSE_RIGHT:
+ offs = 2;
+ break;
+ case MOUSE_HOVER:
+ offs = 0;
+ break;
+ default:
+ // Nothing!
+ offs = 0;
+ break;
}
setIcon(0, 208, 150, offs, 0, true);
@@ -1935,15 +1920,12 @@ void setMainScreenScale(int x, int y) {
SUB_BG3_YDX = 0;
SUB_BG3_YDY = y;
} else*/ {
- if (isCpuScalerEnabled() && (x==320))
- {
+ if (isCpuScalerEnabled() && (x==320)) {
BG3_XDX = 256;
BG3_XDY = 0;
BG3_YDX = 0;
BG3_YDY = y;
- }
- else
- {
+ } else {
BG3_XDX = x;
BG3_XDY = 0;
BG3_YDX = 0;
@@ -2030,8 +2012,6 @@ void VBlankHandler(void) {
soundUpdate();
-
-
if ((!gameScreenSwap) && (!(getKeysHeld() & KEY_L) && !(getKeysHeld() & KEY_R))) {
if (s_currentGame) {
if (s_currentGame->control != CONT_SCUMM_SAMNMAX) {
@@ -2607,9 +2587,6 @@ void penUpdate() {
}
}
- else
- {
- }
} else {
penDown = true;