diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hugo/display.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/file.cpp | 24 | ||||
-rw-r--r-- | engines/hugo/hugo.cpp | 10 | ||||
-rw-r--r-- | engines/hugo/intro.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/inventory.cpp | 20 | ||||
-rw-r--r-- | engines/hugo/menu.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/mouse.cpp | 52 | ||||
-rw-r--r-- | engines/hugo/object.cpp | 16 | ||||
-rw-r--r-- | engines/hugo/object.h | 2 | ||||
-rw-r--r-- | engines/hugo/parser.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/route.cpp | 4 | ||||
-rw-r--r-- | engines/hugo/schedule.cpp | 6 | ||||
-rw-r--r-- | engines/hugo/sound.cpp | 32 | ||||
-rw-r--r-- | engines/hugo/text.cpp | 52 |
14 files changed, 117 insertions, 117 deletions
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 3bc283acba..f8fa90330d 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -665,7 +665,7 @@ bool Screen::isInY(const int16 y, const rect_t *rect) const { * Check if two rectangles are overlapping */ bool Screen::isOverlapping(const rect_t *rectA, const rect_t *rectB) const { - return (isInX(rectA->x, rectB) || isInX(rectA->x + rectA->dx, rectB) || isInX(rectB->x, rectA) || isInX(rectB->x + rectB->dx, rectA)) && + return (isInX(rectA->x, rectB) || isInX(rectA->x + rectA->dx, rectB) || isInX(rectB->x, rectA) || isInX(rectB->x + rectB->dx, rectA)) && (isInY(rectA->y, rectB) || isInY(rectA->y + rectA->dy, rectB) || isInY(rectB->y, rectA) || isInY(rectB->y + rectB->dy, rectA)); } @@ -685,7 +685,7 @@ void Screen::drawBoundaries() { object_t *obj = &_vm->_object->_objects[i]; // Get pointer to object if (obj->screenIndex == *_vm->_screen_p) { if ((obj->currImagePtr != 0) && (obj->cycling != kCycleInvisible)) - drawRectangle(false, obj->x + obj->currImagePtr->x1, obj->y + obj->currImagePtr->y1, + drawRectangle(false, obj->x + obj->currImagePtr->x1, obj->y + obj->currImagePtr->y1, obj->x + obj->currImagePtr->x2, obj->y + obj->currImagePtr->y2, _TLIGHTGREEN); else if ((obj->currImagePtr == 0) && (obj->vxPath != 0) && !obj->carriedFl) drawRectangle(false, obj->oldx, obj->oldy, obj->oldx + obj->vxPath, obj->oldy + obj->vyPath, _TBRIGHTWHITE); diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index cf16e4086d..2662a0e392 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -48,7 +48,7 @@ namespace Hugo { FileManager::FileManager(HugoEngine *vm) : _vm(vm) { has_read_header = false; - firstUIFFl = true; + firstUIFFl = true; } FileManager::~FileManager() { @@ -57,28 +57,28 @@ FileManager::~FileManager() { /** * Name scenery and objects picture databases */ -const char *FileManager::getBootFilename() const { +const char *FileManager::getBootFilename() const { return "HUGO.BSF"; } -const char *FileManager::getObjectFilename() const { - return "objects.dat"; +const char *FileManager::getObjectFilename() const { + return "objects.dat"; } -const char *FileManager::getSceneryFilename() const { - return "scenery.dat"; +const char *FileManager::getSceneryFilename() const { + return "scenery.dat"; } -const char *FileManager::getSoundFilename() const { - return "sounds.dat"; +const char *FileManager::getSoundFilename() const { + return "sounds.dat"; } -const char *FileManager::getStringFilename() const { - return "strings.dat"; +const char *FileManager::getStringFilename() const { + return "strings.dat"; } -const char *FileManager::getUifFilename() const { - return "uif.dat"; +const char *FileManager::getUifFilename() const { + return "uif.dat"; } /** diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index 23183dff6c..1976a6464c 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -50,7 +50,7 @@ namespace Hugo { HugoEngine *HugoEngine::s_Engine = 0; -maze_t _maze; // Default to not in maze +maze_t _maze; // Default to not in maze hugo_boot_t _boot; // Boot info structure file HugoEngine::HugoEngine(OSystem *syst, const HugoGameDescription *gd) : Engine(syst), _gameDescription(gd), @@ -107,8 +107,8 @@ HugoEngine::~HugoEngine() { delete _rnd; } -GUI::Debugger *HugoEngine::getDebugger() { - return _console; +GUI::Debugger *HugoEngine::getDebugger() { + return _console; } status_t &HugoEngine::getGameStatus() { @@ -147,8 +147,8 @@ bool HugoEngine::hasFeature(EngineFeature f) const { return (f == kSupportsRTL) || (f == kSupportsLoadingDuringRuntime) || (f == kSupportsSavingDuringRuntime); } -const char *HugoEngine::getCopyrightString() const { - return "Copyright 1989-1997 David P Gray, All Rights Reserved."; +const char *HugoEngine::getCopyrightString() const { + return "Copyright 1989-1997 David P Gray, All Rights Reserved."; } GameType HugoEngine::getGameType() const { diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index 080fbc8f8d..d7b95f9d1f 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -48,8 +48,8 @@ IntroHandler::IntroHandler(HugoEngine *vm) : _vm(vm), _introX(0), _introY(0) { IntroHandler::~IntroHandler() { } -byte IntroHandler::getIntroSize() const { - return _introXSize; +byte IntroHandler::getIntroSize() const { + return _introXSize; } /** diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp index 7cd025025d..ab58e386ba 100644 --- a/engines/hugo/inventory.cpp +++ b/engines/hugo/inventory.cpp @@ -54,24 +54,24 @@ InventoryHandler::InventoryHandler(HugoEngine *vm) : _vm(vm), _invent(0) { _maxInvent = 0; } -void InventoryHandler::setInventoryObjId(int16 objId) { - _inventoryObjId = objId; +void InventoryHandler::setInventoryObjId(int16 objId) { + _inventoryObjId = objId; } -void InventoryHandler::setInventoryState(istate_t state) { - _inventoryState = state; +void InventoryHandler::setInventoryState(istate_t state) { + _inventoryState = state; } -void InventoryHandler::freeInvent() { - free(_invent); +void InventoryHandler::freeInvent() { + free(_invent); } -int16 InventoryHandler::getInventoryObjId() const { - return _inventoryObjId; +int16 InventoryHandler::getInventoryObjId() const { + return _inventoryObjId; } -istate_t InventoryHandler::getInventoryState() const { - return _inventoryState; +istate_t InventoryHandler::getInventoryState() const { + return _inventoryState; } /** diff --git a/engines/hugo/menu.cpp b/engines/hugo/menu.cpp index 21c438bbbc..428a3e096a 100644 --- a/engines/hugo/menu.cpp +++ b/engines/hugo/menu.cpp @@ -109,7 +109,7 @@ void TopMenu::reflowLayout() { _inventButton->resize(x * scale, y * scale, kButtonWidth * scale, kButtonHeight * scale); x += kButtonWidth + kButtonPad; - // Set the graphics to the 'on' buttons, except for the variable ones + // Set the graphics to the 'on' buttons, except for the variable ones _whatButton->setGfx(arrayBmp[4 * kMenuWhat + scale - 1]); _musicButton->setGfx(arrayBmp[4 * kMenuMusic + scale - 1 + ((_vm->_config.musicFl) ? 0 : 2)]); _soundFXButton->setGfx(arrayBmp[4 * kMenuSoundFX + scale - 1 + ((_vm->_config.soundFl) ? 0 : 2)]); @@ -129,7 +129,7 @@ void TopMenu::loadBmpArr(Common::SeekableReadStream &in) { for (int i = 0; i < arraySize; i++) { uint16 bmpSize = in.readUint16BE(); uint32 filPos = in.pos(); - Common::SeekableSubReadStream stream(&in, filPos, filPos + bmpSize); + Common::SeekableSubReadStream stream(&in, filPos, filPos + bmpSize); arrayBmp[i * 2] = Graphics::ImageDecoder::loadFile(stream, g_system->getOverlayFormat()); arrayBmp[i * 2 + 1] = new Graphics::Surface(); arrayBmp[i * 2 + 1]->create(arrayBmp[i * 2]->w * 2, arrayBmp[i * 2]->h * 2, arrayBmp[i * 2]->bytesPerPixel); diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 0bbc74e992..1ac61d3c90 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -55,56 +55,56 @@ MouseHandler::MouseHandler(HugoEngine *vm) : _vm(vm) { _mouseY = kYPix / 2; } -void MouseHandler::resetLeftButton() { - _leftButtonFl = false; +void MouseHandler::resetLeftButton() { + _leftButtonFl = false; } -void MouseHandler::resetRightButton() { - _rightButtonFl = false; +void MouseHandler::resetRightButton() { + _rightButtonFl = false; } -void MouseHandler::setLeftButton() { - _leftButtonFl = true; +void MouseHandler::setLeftButton() { + _leftButtonFl = true; } -void MouseHandler::setRightButton() { - _rightButtonFl = true; +void MouseHandler::setRightButton() { + _rightButtonFl = true; } -void MouseHandler::setJumpExitFl(bool fl) { - _jumpExitFl = fl; +void MouseHandler::setJumpExitFl(bool fl) { + _jumpExitFl = fl; } -void MouseHandler::setMouseX(int x) { - _mouseX = x; +void MouseHandler::setMouseX(int x) { + _mouseX = x; } -void MouseHandler::setMouseY(int y) { - _mouseY = y; +void MouseHandler::setMouseY(int y) { + _mouseY = y; } -void MouseHandler::freeHotspots() { - free(_hotspots); +void MouseHandler::freeHotspots() { + free(_hotspots); } -bool MouseHandler::getJumpExitFl() const { - return _jumpExitFl; +bool MouseHandler::getJumpExitFl() const { + return _jumpExitFl; } -int MouseHandler::getMouseX() const { - return _mouseX; +int MouseHandler::getMouseX() const { + return _mouseX; } -int MouseHandler::getMouseY() const { - return _mouseY; +int MouseHandler::getMouseY() const { + return _mouseY; } -int16 MouseHandler::getDirection(const int16 hotspotId) const { - return _hotspots[hotspotId].direction; +int16 MouseHandler::getDirection(const int16 hotspotId) const { + return _hotspots[hotspotId].direction; } -int16 MouseHandler::getHotspotActIndex(const int16 hotspotId) const { - return _hotspots[hotspotId].actIndex; +int16 MouseHandler::getHotspotActIndex(const int16 hotspotId) const { + return _hotspots[hotspotId].actIndex; } /** diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp index 386689bf5e..04e3449cbb 100644 --- a/engines/hugo/object.cpp +++ b/engines/hugo/object.cpp @@ -61,20 +61,20 @@ ObjectHandler::ObjectHandler(HugoEngine *vm) : _vm(vm), _objects(0), _uses(0) { ObjectHandler::~ObjectHandler() { } -byte ObjectHandler::getBoundaryOverlay(uint16 index) const { - return _boundary[index]; +byte ObjectHandler::getBoundaryOverlay(uint16 index) const { + return _boundary[index]; } -byte ObjectHandler::getObjectBoundary(uint16 index) const { - return _objBound[index]; +byte ObjectHandler::getObjectBoundary(uint16 index) const { + return _objBound[index]; } -byte ObjectHandler::getBaseBoundary(uint16 index) const { - return _ovlBase[index]; +byte ObjectHandler::getBaseBoundary(uint16 index) const { + return _ovlBase[index]; } -byte ObjectHandler::getFirstOverlay(uint16 index) const { - return _overlay[index]; +byte ObjectHandler::getFirstOverlay(uint16 index) const { + return _overlay[index]; } bool ObjectHandler::isCarried(int objIndex) const { diff --git a/engines/hugo/object.h b/engines/hugo/object.h index a3b1ecb56a..842bbe1e62 100644 --- a/engines/hugo/object.h +++ b/engines/hugo/object.h @@ -109,7 +109,7 @@ protected: void restoreSeq(object_t *obj); inline bool checkBoundary(int16 x, int16 y); - template <typename T> + template <typename T> inline int sign(T a) { if ( a < 0) return -1; else return 1; } }; diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index d034da62cd..c845e03eee 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -64,8 +64,8 @@ Parser::Parser(HugoEngine *vm) : _vm(vm), _putIndex(0), _getIndex(0), _arrayReqs Parser::~Parser() { } -uint16 Parser::getCmdDefaultVerbIdx(const uint16 index) const { - return _cmdList[index][0].verbIndex; +uint16 Parser::getCmdDefaultVerbIdx(const uint16 index) const { + return _cmdList[index][0].verbIndex; } /** diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index 3bf10d78f4..76ec583857 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -50,11 +50,11 @@ Route::Route(HugoEngine *vm) : _vm(vm) { } void Route::resetRoute() { - _routeIndex = -1; + _routeIndex = -1; } int16 Route::getRouteIndex() const { - return _routeIndex; + return _routeIndex; } /** diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index 93b1a75a5b..f0f29150e5 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -133,7 +133,7 @@ uint32 Scheduler::getDosTicks(const bool updateFl) { if (_oldTime == 0) _oldTime = (uint32) floor((double) (g_system->getMillis() * _vm->getTPS() / 1000)); // Calculate current wall time in ticks - t_now = g_system->getMillis() * _vm->getTPS() / 1000 ; + t_now = g_system->getMillis() * _vm->getTPS() / 1000; if ((t_now - _oldTime) > 0) { _oldTime = t_now; @@ -574,7 +574,7 @@ void Scheduler::loadActListArr(Common::ReadStream &in) { } else { readAct(in, tmpAct); if (tmpAct.a0.actType == PROMPT) - free(tmpAct.a3.responsePtr); + free(tmpAct.a3.responsePtr); } } @@ -725,7 +725,7 @@ void Scheduler::saveEvents(Common::WriteStream *f) { f->write(saveEventArr, sizeof(saveEventArr)); } -/** +/** * Restore the action data from file with handle f */ diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp index 80086b0e5c..5ef843977f 100644 --- a/engines/hugo/sound.cpp +++ b/engines/hugo/sound.cpp @@ -56,35 +56,35 @@ MidiPlayer::MidiPlayer(MidiDriver *driver) _isLooping = false; _isPlaying = false; _paused = false; - _masterVolume = 0; + _masterVolume = 0; } MidiPlayer::~MidiPlayer() { close(); } -bool MidiPlayer::isPlaying() const { - return _isPlaying; +bool MidiPlayer::isPlaying() const { + return _isPlaying; } -int MidiPlayer::getVolume() const { - return _masterVolume; +int MidiPlayer::getVolume() const { + return _masterVolume; } -void MidiPlayer::setLooping(bool loop) { - _isLooping = loop; +void MidiPlayer::setLooping(bool loop) { + _isLooping = loop; } -MidiChannel *MidiPlayer::allocateChannel() { - return 0; +MidiChannel *MidiPlayer::allocateChannel() { + return 0; } -MidiChannel *MidiPlayer::getPercussionChannel() { - return 0; +MidiChannel *MidiPlayer::getPercussionChannel() { + return 0; } -uint32 MidiPlayer::getBaseTempo() { - return _driver ? _driver->getBaseTempo() : 0; +uint32 MidiPlayer::getBaseTempo() { + return _driver ? _driver->getBaseTempo() : 0; } void MidiPlayer::play(uint8 *stream, uint16 size) { @@ -476,11 +476,11 @@ void SoundHandler::pcspkr_player() { case 'G': count = pcspkrNotes[*DOSSongPtr - 'A']; switch (DOSSongPtr[1]) { // Check for sharp or flat (#, -) - case '#': + case '#': count = pcspkrSharps[*DOSSongPtr++ - 'A']; break; - case 'b': - count = pcspkrFlats[*DOSSongPtr++ - 'A']; + case 'b': + count = pcspkrFlats[*DOSSongPtr++ - 'A']; break; default: break; diff --git a/engines/hugo/text.cpp b/engines/hugo/text.cpp index af3338737d..d2dcbe1405 100644 --- a/engines/hugo/text.cpp +++ b/engines/hugo/text.cpp @@ -29,60 +29,60 @@ namespace Hugo { -TextHandler::TextHandler(HugoEngine *vm) : _vm(vm), _textData(0), _stringtData(0), - _textEngine(0), _textIntro(0), _textMouse(0), _textParser(0), _textUtil(0), +TextHandler::TextHandler(HugoEngine *vm) : _vm(vm), _textData(0), _stringtData(0), + _textEngine(0), _textIntro(0), _textMouse(0), _textParser(0), _textUtil(0), _screenNames(0), _arrayNouns(0), _arrayVerbs(0) { } TextHandler::~TextHandler() { } -const char *TextHandler::getNoun(int idx1, int idx2) const { - return _arrayNouns[idx1][idx2]; +const char *TextHandler::getNoun(int idx1, int idx2) const { + return _arrayNouns[idx1][idx2]; } -const char *TextHandler::getScreenNames(int screenIndex) const { - return _screenNames[screenIndex]; +const char *TextHandler::getScreenNames(int screenIndex) const { + return _screenNames[screenIndex]; } -const char *TextHandler::getStringtData(int stringIndex) const { - return _stringtData[stringIndex]; +const char *TextHandler::getStringtData(int stringIndex) const { + return _stringtData[stringIndex]; } -const char *TextHandler::getTextData(int textIndex) const { - return _textData[textIndex]; +const char *TextHandler::getTextData(int textIndex) const { + return _textData[textIndex]; } -const char *TextHandler::getTextEngine(int engineIndex) const { - return _textEngine[engineIndex]; +const char *TextHandler::getTextEngine(int engineIndex) const { + return _textEngine[engineIndex]; } -const char *TextHandler::getTextIntro(int introIndex) const { - return _textIntro[introIndex]; +const char *TextHandler::getTextIntro(int introIndex) const { + return _textIntro[introIndex]; } -const char *TextHandler::getTextMouse(int mouseIndex) const { - return _textMouse[mouseIndex]; +const char *TextHandler::getTextMouse(int mouseIndex) const { + return _textMouse[mouseIndex]; } -const char *TextHandler::getTextParser(int parserIndex) const { - return _textParser[parserIndex]; +const char *TextHandler::getTextParser(int parserIndex) const { + return _textParser[parserIndex]; } -const char *TextHandler::getTextUtil(int utilIndex) const { - return _textUtil[utilIndex]; +const char *TextHandler::getTextUtil(int utilIndex) const { + return _textUtil[utilIndex]; } -const char *TextHandler::getVerb(int idx1, int idx2) const { - return _arrayVerbs[idx1][idx2]; +const char *TextHandler::getVerb(int idx1, int idx2) const { + return _arrayVerbs[idx1][idx2]; } -char **TextHandler::getNounArray(int idx1) const { - return _arrayNouns[idx1]; +char **TextHandler::getNounArray(int idx1) const { + return _arrayNouns[idx1]; } -char **TextHandler::getVerbArray(int idx1) const { - return _arrayVerbs[idx1]; +char **TextHandler::getVerbArray(int idx1) const { + return _arrayVerbs[idx1]; } char **TextHandler::loadTextsVariante(Common::ReadStream &in, uint16 *arraySize) { |