diff options
author | Filippos Karapetis | 2014-10-28 16:06:07 +0200 |
---|---|---|
committer | Filippos Karapetis | 2014-10-28 16:06:07 +0200 |
commit | c76c72c7998820c5046db7dbf58dc7dfd4af97dc (patch) | |
tree | 89b9752156357b361fa9795a2f2eb519fcf69585 /engines/cge2 | |
parent | 2621d22cb7d71e23a96fbdb8d65759a107930d67 (diff) | |
download | scummvm-rg350-c76c72c7998820c5046db7dbf58dc7dfd4af97dc.tar.gz scummvm-rg350-c76c72c7998820c5046db7dbf58dc7dfd4af97dc.tar.bz2 scummvm-rg350-c76c72c7998820c5046db7dbf58dc7dfd4af97dc.zip |
CGE2: Remove trailing whitespace
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/cge2.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/cge2.h | 2 | ||||
-rw-r--r-- | engines/cge2/cge2_main.cpp | 24 | ||||
-rw-r--r-- | engines/cge2/cge2_main.h | 2 | ||||
-rw-r--r-- | engines/cge2/events.cpp | 4 | ||||
-rw-r--r-- | engines/cge2/hero.cpp | 10 | ||||
-rw-r--r-- | engines/cge2/map.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/saveload.cpp | 4 | ||||
-rw-r--r-- | engines/cge2/snail.cpp | 10 | ||||
-rw-r--r-- | engines/cge2/spare.h | 2 | ||||
-rw-r--r-- | engines/cge2/talk.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/vga13h.cpp | 8 |
12 files changed, 36 insertions, 36 deletions
diff --git a/engines/cge2/cge2.cpp b/engines/cge2/cge2.cpp index 37d87ba09c..ee62e20ac6 100644 --- a/engines/cge2/cge2.cpp +++ b/engines/cge2/cge2.cpp @@ -97,7 +97,7 @@ CGE2Engine::CGE2Engine(OSystem *syst, const ADGameDescription *gameDescription) _midiNotify = nullptr; _spriteNotify = nullptr; _startGameSlot = 0; - + _sayCap = ConfMan.getBool("subtitles"); _sayVox = !ConfMan.getBool("speech_mute"); _muteAll = ConfMan.getBool("mute"); diff --git a/engines/cge2/cge2.h b/engines/cge2/cge2.h index 50b418f294..fbe4cb3abc 100644 --- a/engines/cge2/cge2.h +++ b/engines/cge2/cge2.h @@ -269,7 +269,7 @@ public: void snRoom(Sprite *spr, bool on); void snGhost(Bitmap *bmp); void snSay(Sprite *spr, int val); - + void hide1(Sprite *spr); Sprite *expandSprite(Sprite *spr); void qGame(); diff --git a/engines/cge2/cge2_main.cpp b/engines/cge2/cge2_main.cpp index 3e3d615a91..4e3d229618 100644 --- a/engines/cge2/cge2_main.cpp +++ b/engines/cge2/cge2_main.cpp @@ -58,7 +58,7 @@ void System::touch(uint16 mask, V2D pos, Common::KeyCode keyCode) { if (_vm->_gamePhase != kPhaseInGame) return; _vm->_infoLine->setText(nullptr); - + if (mask & kMouseLeftUp) { if (pos.y >= 0) { // world if (!_vm->_talk && pos.y < _vm->_mouseTop) @@ -184,7 +184,7 @@ Sprite *CGE2Engine::loadSprite(const char *fname, int ref, int scene, V3D &pos) if (line.empty()) continue; Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); - + char *p = token(tmpStr); if (*p == '@') { if (label != kNoByte) @@ -327,7 +327,7 @@ void CGE2Engine::loadScript(const char *fname, bool onlyToolbar) { lcnt++; Common::strlcpy(tmpStr, line.c_str(), sizeof(tmpStr)); - + ok = false; // not OK if break V3D P; @@ -419,7 +419,7 @@ void CGE2Engine::sceneUp(int cav) { _map->load(_now); _spare->takeScene(_now); openPocket(); - + for (int i = 0; i < 2; i++) { Hero *h = _heroTab[i]->_ptr; if (h && h->_scene == _now) { @@ -432,7 +432,7 @@ void CGE2Engine::sceneUp(int cav) { h->setContact(); } } - + _sound->stop(); _fx->clear(); @@ -596,7 +596,7 @@ void CGE2Engine::tick() { for (Sprite *spr = _vga->_showQ->first(); spr; spr = spr->_next) { if (spr->_time && (--spr->_time == 0)) spr->tick(); - + if (_waitRef && (_waitRef == spr->_ref) && spr->seqTest(_waitSeq)) _waitRef = 0; } @@ -658,10 +658,10 @@ void CGE2Engine::loadUser() { void CGE2Engine::loadHeroes() { // Original name: loadGame() // load sprites & pocket - + Sprite *s; Hero *h = nullptr; - + // initialize Andzia/Anna s = _spare->take(142); if (s) { @@ -698,7 +698,7 @@ void CGE2Engine::loadPos() { if (_resman->exist("CGE.HXY")) { for (int cav = 0; cav < kSceneMax; cav++) _heroTab[1]->_posTab[cav] = new V2D(this, 180, 10); - + EncryptedStream file(this, "CGE.HXY"); for (int cav = 0; cav < kSceneMax; cav++) { @@ -752,7 +752,7 @@ void CGE2Engine::cge2_main() { runGame(); _gamePhase = kPhaseOver; } - + _vga->sunset(); } else _vga->sunset(); @@ -767,7 +767,7 @@ char *CGE2Engine::mergeExt(char *buf, const char *name, const char *ext) { return buf; } -void CGE2Engine::setEye(const V3D &e) { +void CGE2Engine::setEye(const V3D &e) { *_eye = e; } @@ -931,7 +931,7 @@ void CGE2Engine::offUse() { // This fixes the issue of empty speech bubbles in the original. // Now we only let this cycle pass if it randoms a valid value for getText(). int txt = 0; - do { + do { txt = kOffUseText + _sex * offUseCount + newRandom(offUseCount); } while (_text->getText(txt) == nullptr); diff --git a/engines/cge2/cge2_main.h b/engines/cge2/cge2_main.h index 88cca1cc1e..4d92c33e50 100644 --- a/engines/cge2/cge2_main.h +++ b/engines/cge2/cge2_main.h @@ -40,7 +40,7 @@ public: Sprite *_blinkSprite; System(CGE2Engine *vm); - + virtual void touch(uint16 mask, V2D pos, Common::KeyCode keyCode); void tick(); private: diff --git a/engines/cge2/events.cpp b/engines/cge2/events.cpp index ed1ec66bb1..85743c8011 100644 --- a/engines/cge2/events.cpp +++ b/engines/cge2/events.cpp @@ -132,7 +132,7 @@ Mouse::Mouse(CGE2Engine *vm) : Sprite(vm), _busy(nullptr), _hold(nullptr), _hx(0 _busy = nullptr; _active = false; _flags._kill = false; - + setSeq(_stdSeq8); BitmapPtr MC = new Bitmap[2]; @@ -260,7 +260,7 @@ void EventManager::handleEvents() { if (e._spritePtr) { if (e._mask & kEventKeyb) e._spritePtr->touch(e._mask, _vm->_mouse->_point, e._keyCode); - else + else e._spritePtr->touch(e._mask, _vm->_mouse->_point - e._spritePtr->_pos2D, e._keyCode); } else if (_vm->_sys) _vm->_sys->touch(e._mask, _vm->_mouse->_point, e._keyCode); diff --git a/engines/cge2/hero.cpp b/engines/cge2/hero.cpp index 225df54bd1..42ae67cc2b 100644 --- a/engines/cge2/hero.cpp +++ b/engines/cge2/hero.cpp @@ -205,7 +205,7 @@ Sprite *Hero::expand() { int i = stepSize() / 2; _maxDist = (int)sqrt(double(i * i * 2)); setCurrent(); - + return this; } @@ -558,9 +558,9 @@ int CGE2Engine::mapCross(const V2D &a, const V2D &b) { if (p) { if (cross(a, b, *n0, *n)) ++cnt; - + if (*n == *p) - p = nullptr; + p = nullptr; } else { p = n; } @@ -587,7 +587,7 @@ void Hero::operator--() { bool Sprite::works(Sprite *spr) { if (!spr || !spr->_ext) return false; - + bool ok = false; Action a = _vm->_heroTab[_vm->_sex]->_ptr->action(); @@ -615,7 +615,7 @@ bool Sprite::works(Sprite *spr) { } } } - + return ok; } diff --git a/engines/cge2/map.cpp b/engines/cge2/map.cpp index 8c1f00048f..275e15f55a 100644 --- a/engines/cge2/map.cpp +++ b/engines/cge2/map.cpp @@ -48,7 +48,7 @@ void Map::load(int scene) { return; EncryptedStream file(_vm, fileName.c_str()); - + Common::String line; for (line = file.readLine(); !file.eos(); line = file.readLine()) { if (line.empty()) diff --git a/engines/cge2/saveload.cpp b/engines/cge2/saveload.cpp index fd60422dff..7735c077a6 100644 --- a/engines/cge2/saveload.cpp +++ b/engines/cge2/saveload.cpp @@ -104,7 +104,7 @@ bool CGE2Engine::loadGame(int slotNumber) { saveFile->read(dataBuffer, size); readStream = new Common::MemoryReadStream(dataBuffer, size, DisposeAfterUse::YES); delete saveFile; - + // Check to see if it's a ScummVM savegame or not char buffer[kSavegameStrSize + 1]; readStream->read(buffer, kSavegameStrSize + 1); @@ -132,7 +132,7 @@ bool CGE2Engine::loadGame(int slotNumber) { delete readStream; loadHeroes(); - + return true; } diff --git a/engines/cge2/snail.cpp b/engines/cge2/snail.cpp index 8e1ddf2d9b..7580ef4425 100644 --- a/engines/cge2/snail.cpp +++ b/engines/cge2/snail.cpp @@ -92,7 +92,7 @@ void CommandHandler::runCommand() { } _textDelay = false; } - + if (_vm->_talk && tailCmd._commandType != kCmdPause) break; } @@ -332,7 +332,7 @@ void CGE2Engine::snRSeq(Sprite *spr, int val) { void CGE2Engine::snSend(Sprite *spr, int val) { if (!spr) return; - + // Sending", spr->_file // from scene", spr->_scene // to scene", val @@ -691,7 +691,7 @@ Sprite *CGE2Engine::expandSprite(Sprite *spr) { void CGE2Engine::qGame() { // Write out the user's progress saveGame(0, Common::String("Automatic Savegame")); - + busy(false); _vga->sunset(); _endGame = true; @@ -853,13 +853,13 @@ void CGE2Engine::feedSnail(Sprite *spr, Action snq, Hero *hero) { if (s == spr) break; } - + _commandHandler->addCommand(c->_commandType, c->_ref, c->_val, spr); ++c; } } - + } } // End of namespace CGE2. diff --git a/engines/cge2/spare.h b/engines/cge2/spare.h index 7dc6ce60f5..24a97712ff 100644 --- a/engines/cge2/spare.h +++ b/engines/cge2/spare.h @@ -38,7 +38,7 @@ class Spare { public: Spare(CGE2Engine *vm) : _vm(vm) {} ~Spare() { clear(); } - void store(Sprite *spr); + void store(Sprite *spr); Sprite *locate(int ref); Sprite *take(int ref); void takeScene(int cav); diff --git a/engines/cge2/talk.cpp b/engines/cge2/talk.cpp index 9109da90f1..8e6be6cac2 100644 --- a/engines/cge2/talk.cpp +++ b/engines/cge2/talk.cpp @@ -121,7 +121,7 @@ Talk::Talk(CGE2Engine *vm, const char *text, TextBoxStyle mode, ColorBank color, Talk::Talk(CGE2Engine *vm, ColorBank color) : Sprite(vm), _mode(kTBPure), _created(false), _wideSpace(false), _vm(vm) { _color = _vm->_font->_colorSet[color]; - + if (color == kCBRel) _vm->setAutoColors(); } diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index 227633579e..f4064f3565 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -45,13 +45,13 @@ void V3D::sync(Common::Serializer &s) { _z.sync(s); } -FXP FXP::operator*(const FXP& x) const { - FXP y; +FXP FXP::operator*(const FXP& x) const { + FXP y; int32 t1 = (v >> 8) * x.v; int32 t2 = ((v & 0xFF) * x.v) >> 8; y.v = t1 + t2; - return y; + return y; } FXP FXP::operator/(const FXP& x) const { @@ -613,7 +613,7 @@ void Sprite::gotoxyz(V2D pos) { ++trim; } _pos2D.x = pos.x; - + if (pos.y < -kPanHeight) { pos.y = -kPanHeight; ++trim; |