aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authorStrangerke2013-09-04 13:34:58 +0200
committerStrangerke2013-09-04 13:34:58 +0200
commitfe8e5c7325d3b88ac8bb2dd3db6ee2761e5f9764 (patch)
tree2d48ef83b811c47a78ccd95f9394218cad5e6326 /engines/avalanche
parentff31d8e52152c7a988764d361fbcaeda049d2645 (diff)
downloadscummvm-rg350-fe8e5c7325d3b88ac8bb2dd3db6ee2761e5f9764.tar.gz
scummvm-rg350-fe8e5c7325d3b88ac8bb2dd3db6ee2761e5f9764.tar.bz2
scummvm-rg350-fe8e5c7325d3b88ac8bb2dd3db6ee2761e5f9764.zip
AVALANCHE: Fix coding style: ++ and --
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/avalanche.cpp2
-rw-r--r--engines/avalanche/celer2.cpp4
-rw-r--r--engines/avalanche/dropdown2.cpp2
-rw-r--r--engines/avalanche/graphics.cpp4
-rw-r--r--engines/avalanche/gyro2.cpp6
-rw-r--r--engines/avalanche/lucerna2.cpp32
-rw-r--r--engines/avalanche/parser.cpp2
-rw-r--r--engines/avalanche/pingo2.cpp2
-rw-r--r--engines/avalanche/scrolls2.cpp10
-rw-r--r--engines/avalanche/trip6.cpp8
10 files changed, 38 insertions, 34 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 3d8ba61a38..a00701456e 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -278,7 +278,7 @@ void AvalancheEngine::synchronize(Common::Serializer &sz) {
sz.syncAsByte(_gyro->dna.asked_dogfood_about_nim);
- //for (byte groi = 0; groi < numtr; groi ++) {
+ //for (byte groi = 0; groi < numtr; groi++) {
// if (tr[groi].quick) {
// blockwrite(f, groi, 1);
// tr[groi].savedata(f);
diff --git a/engines/avalanche/celer2.cpp b/engines/avalanche/celer2.cpp
index 6dece2f476..a84d15116f 100644
--- a/engines/avalanche/celer2.cpp
+++ b/engines/avalanche/celer2.cpp
@@ -319,7 +319,7 @@ void Celer::loadBackgroundSprites(byte number) {
}
void Celer::forgetBackgroundSprites() {
- for (byte i = 0; i < _spriteNum; i ++)
+ for (byte i = 0; i < _spriteNum; i++)
if (_sprites[i]._x > kOnDisk)
_sprites[i]._picture.free();
}
@@ -366,7 +366,7 @@ void Celer::drawBackgroundSprite(int16 destX, int16 destY, byte which) {
//setactivepage(1 - cp);
warning("STUB: Celer::show_one()");
- for (byte i = 0; i < 2; i ++)
+ for (byte i = 0; i < 2; i++)
_vm->_trip->getset[i].remember(_r);
}
diff --git a/engines/avalanche/dropdown2.cpp b/engines/avalanche/dropdown2.cpp
index 064af299dc..82a5228ed3 100644
--- a/engines/avalanche/dropdown2.cpp
+++ b/engines/avalanche/dropdown2.cpp
@@ -276,7 +276,7 @@ void menuset::extd(char c) {
byte fv;
fv = 0;
while ((fv < howmany) && (ddms[fv].extdparse(c)))
- fv ++;
+ fv++;
if (fv == howmany)
return;
getcertain(fv);
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index eaf547c018..b4ee2a7a3f 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -126,9 +126,9 @@ Common::Point Graphics::drawArc(::Graphics::Surface &surface, int16 x, int16 y,
int32 yRadius = radius * kScreenWidth / (8 * kScreenHeight); // Just don't ask why...
if (xRadius == 0)
- xRadius ++;
+ xRadius++;
if (yRadius == 0)
- yRadius ++;
+ yRadius++;
// Check for an ellipse with negligable x and y radius.
if ((xRadius <= 1) && (yRadius <= 1))
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index 4166ecfe32..1653159937 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -312,7 +312,7 @@ void Gyro::shbox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String t) {
}
void Gyro::newgame() {
- for (byte gm = 0; gm < numtr; gm ++) {
+ for (byte gm = 0; gm < numtr; gm++) {
if (_vm->_trip->tr[gm].quick)
_vm->_trip->tr[gm].done();
}
@@ -343,7 +343,7 @@ void Gyro::newgame() {
ppos[0][1] = -177;
_vm->_trip->tr[0].appear(300,117,right); // Needed to initialize Avalot.
- //for (gd = 0; gd <= 30; gd ++) for (gm = 0; gm <= 1; gm ++) also[gd][gm] = nil;
+ //for (gd = 0; gd <= 30; gd++) for (gm = 0; gm <= 1; gm++) also[gd][gm] = nil;
/* fillchar(previous^,sizeof(previous^),#0); { blank out array } */
him = 254;
her = 254;
@@ -356,7 +356,7 @@ void Gyro::newgame() {
dna.avvy_in_bed = true;
enid_filename = "";
- for (byte gd = 0; gd <= 1; gd ++) {
+ for (byte gd = 0; gd <= 1; gd++) {
cp = 1 - cp;
_vm->_trip->getback();
}
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 1406c444d3..389aa2e23d 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -115,7 +115,7 @@ void Lucerna::scram1(Common::String &x) {
}
void Lucerna::unscramble() {
- for (byte fv = 0; fv < 31; fv ++)
+ for (byte fv = 0; fv < 31; fv++)
for (byte ff = 0; ff < 2; ff++)
if (_vm->_gyro->also[fv][ff] != 0)
scram1(*_vm->_gyro->also[fv][ff]);
@@ -815,7 +815,7 @@ void Lucerna::thinkabout(byte z, bool th) { /* Hey!!! Get it and put it!!! *
putimage(x, y, p, 0);
setactivepage(1 - cp);*/
- for (byte fv = 0; fv <= 1; fv ++)
+ for (byte fv = 0; fv <= 1; fv++)
_vm->_trip->getset[fv].remember(thinkspace);
CursorMan.showMouse(true);
@@ -831,14 +831,14 @@ void Lucerna::load_digits() { /* Load the scoring digits & rwlites */
return;
}
- for (byte fv = 0; fv < 10; fv ++) {
+ for (byte fv = 0; fv < 10; fv++) {
f.seek(fv * digitsize);
/*_vm->_gyro->digit[fv] = new byte[digitsize];
f.read(_vm->_gyro->digit[fv], digitsize);*/
_vm->_gyro->digit[fv] = _vm->_graphics->loadPictureGraphic(f);
}
- for (byte ff = 0; ff < 9; ff ++) {
+ for (byte ff = 0; ff < 9; ff++) {
f.seek(10 * digitsize + ff * rwlitesize);
/*_vm->_gyro->rwlite[ff] = new byte[rwlitesize];
f.read(_vm->_gyro->rwlite[ff], rwlitesize);*/
@@ -894,11 +894,11 @@ void Lucerna::showscore() {
//setactivepage(3);
- for (byte fv = 0; fv < 3; fv ++)
+ for (byte fv = 0; fv < 3; fv++)
if (_vm->_gyro->lastscore[fv] != numbers[fv])
_vm->_graphics->drawPicture(_vm->_graphics->_surface, _vm->_gyro->digit[numbers[fv]], 250 + (fv + 1) * 15, 177);
- for (byte fv = 0; fv < 2; fv ++)
+ for (byte fv = 0; fv < 2; fv++)
_vm->_trip->getset[fv].remember(scorespace);
//setactivepage(1 - cp);
@@ -909,10 +909,10 @@ void Lucerna::showscore() {
}
void Lucerna::points(byte num) { /* Add on no. of points */
- for (byte q = 1; q <= num; q ++) {
+ for (byte q = 1; q <= num; q++) {
_vm->_gyro->dna.score++;
/*if (soundfx)
- for (byte fv = 1; fv <= 97; fv ++)
+ for (byte fv = 1; fv <= 97; fv++)
sound(177 + dna.score * 3);
nosound;*/
}
@@ -1143,9 +1143,13 @@ int8 Lucerna::fades(int8 x) {
x = x % 16;
byte g = x / 4;
byte b = x % 4;
- if (r > 0) r --;
- if (g > 0) g --;
- if (b > 0) b --;
+ if (r > 0)
+ r--;
+ if (g > 0)
+ g--;
+ if (b > 0)
+ b--;
+
return (16 * r + 4 * g + b);
/* fades:=x-1;*/
}
@@ -1180,7 +1184,7 @@ void Lucerna::showrw() { // It's data is loaded in load_digits().
_vm->_gyro->oldrw = _vm->_gyro->dna.rw;
CursorMan.showMouse(false);
- /* for (byte page_ = 0; page_ <= 1; page_ ++) {
+ /* for (byte page_ = 0; page_ <= 1; page_++) {
setactivepage(page_);
putimage(0, 161, rwlite[with.rw], 0);
}*/
@@ -1277,7 +1281,7 @@ void Lucerna::delavvy() {
CursorMan.showMouse(false);
// triptype &with = _vm->_trip->tr[0];
-// for (byte page_ = 0; page_ <= 1; page_ ++)
+// for (byte page_ = 0; page_ <= 1; page_++)
// mblit(with.x / 8, with.y, (with.x + with._info.xl) / 8 + 1, with.y + with._info.yl, 3, page_);
CursorMan.showMouse(true);
@@ -1307,7 +1311,7 @@ void Lucerna::minor_redraw() {
enterroom(_vm->_gyro->dna.room, 0); /* Ped unknown or non-existant. */
- for (byte fv = 0; fv <= 1; fv ++) {
+ for (byte fv = 0; fv <= 1; fv++) {
_vm->_gyro->cp = 1 - _vm->_gyro->cp;
_vm->_trip->getback();
}
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index 8bd6d52248..67b893f32f 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -153,7 +153,7 @@ void Parser::drawCursor() {
bf.x2 = _inputTextPos + 2;
bf.y1 = 168;
bf.y2 = 168;
- for (byte fv = 0; fv <= 1; fv ++)
+ for (byte fv = 0; fv <= 1; fv++)
_vm->_trip->getset[fv].remember(bf);
}
diff --git a/engines/avalanche/pingo2.cpp b/engines/avalanche/pingo2.cpp
index 096a8be084..777a1c7cb6 100644
--- a/engines/avalanche/pingo2.cpp
+++ b/engines/avalanche/pingo2.cpp
@@ -116,7 +116,7 @@ void Pingo::winning_pic() {
return;
}
- /*for (byte bit = 0; bit <= 3; bit ++) {
+ /*for (byte bit = 0; bit <= 3; bit++) {
port[0x3c4] = 2;
port[0x3ce] = 4;
port[0x3c5] = 1 << bit;
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 615bdd5a52..65c4faaae0 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -207,7 +207,7 @@ bool Scrolls::they_match(tunetype &played) {
mistakes = 0;
- for (fv = 1; fv <= sizeof(played); fv ++)
+ for (fv = 1; fv <= sizeof(played); fv++)
if (played[fv] != _vm->_gyro->tune[fv]) {
mistakes += 1;
}
@@ -303,8 +303,8 @@ void Scrolls::block_drop(Common::String fn, int16 xl, int16 yl, int16 y) {
}
/*byte bit;
- for (uint16 fv = 1; fv <= yl; fv ++)
- for (bit = 0; bit <= 3; bit ++) {
+ for (uint16 fv = 1; fv <= yl; fv++)
+ for (bit = 0; bit <= 3; bit++) {
port[0x3c4] = 2;
port[0x3ce] = 4;
port[0x3c5] = 1 << bit;
@@ -560,7 +560,7 @@ bool Scrolls::ask(Common::String question) {
void Scrolls::resetscroll() {
_vm->_gyro->scrolln = 1;
- for (int j = 0; j < 15; j ++)
+ for (int j = 0; j < 15; j++)
if (!_vm->_gyro->scroll[j].empty())
_vm->_gyro->scroll[j].clear();
}
@@ -760,7 +760,7 @@ void Scrolls::calldrivers() {
nn = 1;
for (nnn = 0; nnn < numobjs; nnn++)
if (_vm->_gyro->dna.obj[nnn]) {
- nn ++;
+ nn++;
display(_vm->_gyro->get_better(nnn) + ", " + kControlToBuffer);
}
}
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp
index 20c22e40e0..417a92056e 100644
--- a/engines/avalanche/trip6.cpp
+++ b/engines/avalanche/trip6.cpp
@@ -110,7 +110,7 @@ void triptype::init(byte spritenum, bool do_check, Trip *tr) {
//getmem(sil[totalnum-1], 11 * (a.yl + 1));
_info.mani[totalnum] = new manitype[_info.size - 6];
//getmem(mani[totalnum-1], a.size - 6);
- for (fv = 0; fv <= _info.yl; fv ++)
+ for (fv = 0; fv <= _info.yl; fv++)
inf.read((*_info.sil[totalnum])[fv], _info.xw);
//blockread(inf, (*sil[totalnum-1])[fv], xw);
inf.read(*_info.mani[totalnum], _info.size - 6);
@@ -945,7 +945,7 @@ void Trip::call_special(uint16 which) {
}
}
_vm->_lucerna->dusk();
- _vm->_gyro->dna.cat_y --;
+ _vm->_gyro->dna.cat_y--;
catamove(4);
if (_vm->_gyro->dna.room != r__catacombs)
return;
@@ -1079,7 +1079,7 @@ void Trip::newspeed() {
//setactivepage(1 - cp);
- for (page_ = 0; page_ <= 1; page_ ++)
+ for (page_ = 0; page_ <= 1; page_++)
getset[page_].remember(lightspace);
}
@@ -1304,7 +1304,7 @@ void Trip::spin(byte whichway, byte &tripnum) {
void Trip::geida_procs(byte tripnum) {
if (_vm->_gyro->dna.geida_time > 0) {
- _vm->_gyro->dna.geida_time --;
+ _vm->_gyro->dna.geida_time--;
if (_vm->_gyro->dna.geida_time == 0)
_vm->_gyro->dna.geida_spin = 0;
}