diff options
author | Arnaud Boutonné | 2011-02-11 20:27:48 +0000 |
---|---|---|
committer | Arnaud Boutonné | 2011-02-11 20:27:48 +0000 |
commit | 87ab737e6bc4b97950e83d981ef5828665ce9b72 (patch) | |
tree | 46156b2b01f665d9bb0ba5221b069dc76f5e1369 /engines | |
parent | a9b051beff3157e1aa88b8090852850f55440e9b (diff) | |
download | scummvm-rg350-87ab737e6bc4b97950e83d981ef5828665ce9b72.tar.gz scummvm-rg350-87ab737e6bc4b97950e83d981ef5828665ce9b72.tar.bz2 scummvm-rg350-87ab737e6bc4b97950e83d981ef5828665ce9b72.zip |
HUGO: Cleanup: fix style issue in Doxygen comments
svn-id: r55884
Diffstat (limited to 'engines')
30 files changed, 596 insertions, 594 deletions
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp index 4d6303305d..d2ceea8fc8 100644 --- a/engines/hugo/display.cpp +++ b/engines/hugo/display.cpp @@ -42,6 +42,37 @@ #include "hugo/object.h" namespace Hugo { +/** + * A black and white Windows-style arrow cursor (12x20). + * 0 = Black (#000000 in 24-bit RGB). + * 1 = Transparent. + * 15 = White (#FFFFFF in 24-bit RGB). + * This cursor comes from Mohawk engine. + */ +static const byte stdMouseCursor[] = { + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 15, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 15, 15, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 15, 15, 15, 0, 1, 1, 1, 1, 1, 1, 1, + 0, 15, 15, 15, 15, 0, 1, 1, 1, 1, 1, 1, + 0, 15, 15, 15, 15, 15, 0, 1, 1, 1, 1, 1, + 0, 15, 15, 15, 15, 15, 15, 0, 1, 1, 1, 1, + 0, 15, 15, 15, 15, 15, 15, 15, 0, 1, 1, 1, + 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 1, 1, + 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 1, + 0, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, + 0, 15, 15, 15, 0, 15, 15, 0, 1, 1, 1, 1, + 0, 15, 15, 0, 0, 15, 15, 0, 1, 1, 1, 1, + 0, 15, 0, 1, 0, 0, 15, 15, 0, 1, 1, 1, + 0, 0, 1, 1, 1, 0, 15, 15, 0, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1 +}; + + Screen::Screen(HugoEngine *vm) : _vm(vm) { _mainPalette = 0; _curPalette = 0; @@ -74,8 +105,8 @@ Screen::~Screen() { } /** -* Replace the palette by the main palette -*/ + * Replace the palette by the main palette + */ void Screen::createPal() { debugC(1, kDebugDisplay, "createPal"); @@ -87,16 +118,16 @@ void Screen::setCursorPal() { } /** -* Create logical palette -*/ + * Create logical palette + */ void Screen::initDisplay() { debugC(1, kDebugDisplay, "initDisplay"); createPal(); } /** -* Move an image from source to destination -*/ + * Move an image from source to destination + */ void Screen::moveImage(image_pt srcImage, const int16 x1, const int16 y1, const int16 dx, int16 dy, const int16 width1, image_pt dstImage, const int16 x2, const int16 y2, const int16 width2) { debugC(3, kDebugDisplay, "moveImage(srcImage, %d, %d, %d, %d, %d, dstImage, %d, %d, %d)", x1, y1, dx, dy, width1, x2, y2, width2); @@ -121,8 +152,8 @@ void Screen::displayBackground() { } /** -* Blit the supplied rectangle from _frontBuffer to the screen -*/ + * Blit the supplied rectangle from _frontBuffer to the screen + */ void Screen::displayRect(const int16 x, const int16 y, const int16 dx, const int16 dy) { debugC(3, kDebugDisplay, "displayRect(%d, %d, %d, %d)", x, y, dx, dy); @@ -133,9 +164,9 @@ void Screen::displayRect(const int16 x, const int16 y, const int16 dx, const int } /** -* Change a color by remapping supplied palette index with new index in main palette. -* Alse save the new color in the current palette. -*/ + * Change a color by remapping supplied palette index with new index in main palette. + * Alse save the new color in the current palette. + */ void Screen::remapPal(const uint16 oldIndex, const uint16 newIndex) { debugC(1, kDebugDisplay, "Remap_pal(%d, %d)", oldIndex, newIndex); @@ -150,8 +181,8 @@ void Screen::remapPal(const uint16 oldIndex, const uint16 newIndex) { } /** -* Saves the current palette in a savegame -*/ + * Saves the current palette in a savegame + */ void Screen::savePal(Common::WriteStream *f) const { debugC(1, kDebugDisplay, "savePal()"); @@ -160,8 +191,8 @@ void Screen::savePal(Common::WriteStream *f) const { } /** -* Restore the current palette from a savegame -*/ + * Restore the current palette from a savegame + */ void Screen::restorePal(Common::SeekableReadStream *f) { debugC(1, kDebugDisplay, "restorePal()"); @@ -181,10 +212,10 @@ void Screen::restorePal(Common::SeekableReadStream *f) { /** -* Set the new background color. -* This implementation gives the same result than the DOS version. -* It wasn't implemented in the Win version -*/ + * Set the new background color. + * This implementation gives the same result than the DOS version. + * It wasn't implemented in the Win version + */ void Screen::setBackgroundColor(const uint16 color) { debugC(1, kDebugDisplay, "setBackgroundColor(%d)", color); @@ -192,10 +223,10 @@ void Screen::setBackgroundColor(const uint16 color) { } /** -* Return the overlay state (Foreground/Background) of the currently -* processed object by looking down the current column for an overlay -* base bit set (in which case the object is foreground). -*/ + * Return the overlay state (Foreground/Background) of the currently + * processed object by looking down the current column for an overlay + * base bit set (in which case the object is foreground). + */ overlayState_t Screen::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { debugC(4, kDebugDisplay, "findOvl()"); @@ -210,9 +241,9 @@ overlayState_t Screen::findOvl(seq_t *seq_p, image_pt dst_p, uint16 y) { } /** -* Merge an object frame into _frontBuffer at sx, sy and update rectangle list. -* If fore TRUE, force object above any overlay -*/ + * Merge an object frame into _frontBuffer at sx, sy and update rectangle list. + * If fore TRUE, force object above any overlay + */ void Screen::displayFrame(const int sx, const int sy, seq_t *seq, const bool foreFl) { debugC(3, kDebugDisplay, "displayFrame(%d, %d, seq, %d)", sx, sy, (foreFl) ? 1 : 0); @@ -246,8 +277,8 @@ void Screen::displayFrame(const int sx, const int sy, seq_t *seq, const bool for } /** -* Merge rectangles A,B leaving result in B -*/ + * Merge rectangles A,B leaving result in B + */ void Screen::merge(const rect_t *rectA, rect_t *rectB) { debugC(6, kDebugDisplay, "merge()"); @@ -263,11 +294,11 @@ void Screen::merge(const rect_t *rectA, rect_t *rectB) { } /** -* Coalesce the rectangles in the restore/add list into one unified -* blist. len is the sizes of alist or rlist. blen is current length -* of blist. bmax is the max size of the blist. Note that blist can -* have holes, in which case dx = 0. Returns used length of blist. -*/ + * Coalesce the rectangles in the restore/add list into one unified + * blist. len is the sizes of alist or rlist. blen is current length + * of blist. bmax is the max size of the blist. Note that blist can + * have holes, in which case dx = 0. Returns used length of blist. + */ int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 blen) { debugC(4, kDebugDisplay, "mergeLists()"); @@ -303,9 +334,9 @@ int16 Screen::mergeLists(rect_t *list, rect_t *blist, const int16 len, int16 ble } /** -* Process the display list -* Trailing args are int16 x,y,dx,dy for the D_ADD operation -*/ + * Process the display list + * Trailing args are int16 x,y,dx,dy for the D_ADD operation + */ void Screen::displayList(dupdate_t update, ...) { debugC(6, kDebugDisplay, "displayList()"); @@ -363,12 +394,12 @@ void Screen::displayList(dupdate_t update, ...) { } /** -* Write supplied character (font data) at sx,sy in supplied color -* Font data as follows: -* *(fontdata+1) = Font Height (pixels) -* *(fontdata+1) = Font Width (pixels) -* *(fontdata+x) = Font Bitmap (monochrome) -*/ + * Write supplied character (font data) at sx,sy in supplied color + * Font data as follows: + * *(fontdata+1) = Font Height (pixels) + * *(fontdata+1) = Font Width (pixels) + * *(fontdata+x) = Font Bitmap (monochrome) + */ void Screen::writeChr(const int sx, const int sy, const byte color, const char *local_fontdata){ debugC(2, kDebugDisplay, "writeChr(%d, %d, %d, %d)", sx, sy, color, local_fontdata[0]); @@ -389,8 +420,8 @@ void Screen::writeChr(const int sx, const int sy, const byte color, const char * } /** -* Returns height of characters in current font -*/ + * Returns height of characters in current font + */ int16 Screen::fontHeight() const { debugC(2, kDebugDisplay, "fontHeight()"); @@ -399,8 +430,8 @@ int16 Screen::fontHeight() const { } /** -* Returns length of supplied string in pixels -*/ + * Returns length of supplied string in pixels + */ int16 Screen::stringLength(const char *s) const { debugC(2, kDebugDisplay, "stringLength(%s)", s); @@ -413,8 +444,8 @@ int16 Screen::stringLength(const char *s) const { } /** -* Return x which would center supplied string -*/ + * Return x which would center supplied string + */ int16 Screen::center(const char *s) const { debugC(1, kDebugDisplay, "center(%s)", s); @@ -422,9 +453,9 @@ int16 Screen::center(const char *s) const { } /** -* Write string at sx,sy in supplied color in current font -* If sx == CENTER, center it -*/ + * Write string at sx,sy in supplied color in current font + * If sx == CENTER, center it + */ void Screen::writeStr(int16 sx, const int16 sy, const char *s, const byte color) { debugC(2, kDebugDisplay, "writeStr(%d, %d, %s, %d)", sx, sy, s, color); @@ -439,8 +470,8 @@ void Screen::writeStr(int16 sx, const int16 sy, const char *s, const byte color) } /** -* Shadowed version of writestr -*/ + * Shadowed version of writestr + */ void Screen::shadowStr(int16 sx, const int16 sy, const char *s, const byte color) { debugC(1, kDebugDisplay, "shadowStr(%d, %d, %s, %d)", sx, sy, s, color); @@ -452,9 +483,9 @@ void Screen::shadowStr(int16 sx, const int16 sy, const char *s, const byte color } /** -* Introduce user to the game. In the original games, it was only -* present in the DOS versions -*/ + * Introduce user to the game. In the original games, it was only + * present in the DOS versions + */ void Screen::userHelp() const { Utils::Box(kBoxAny , "%s", "F1 - Press F1 again\n" @@ -503,8 +534,8 @@ void Screen::drawShape(const int x, const int y, const int color1, const int col } } /** -* Display rectangle (filles or empty) -*/ + * Display rectangle (filles or empty) + */ void Screen::drawRectangle(const bool filledFl, const int16 x1, const int16 y1, const int16 x2, const int16 y2, const int color) { assert(x1 <= x2); assert(y1 <= y2); @@ -529,8 +560,8 @@ void Screen::drawRectangle(const bool filledFl, const int16 x1, const int16 y1, } /** -* Initialize screen components and display results -*/ + * Initialize screen components and display results + */ void Screen::initNewScreenDisplay() { displayList(kDisplayInit); setBackgroundColor(_TBLACK); @@ -541,8 +572,8 @@ void Screen::initNewScreenDisplay() { } /** -* Load palette from Hugo.dat -*/ + * Load palette from Hugo.dat + */ void Screen::loadPalette(Common::File &in) { // Read palette _paletteSize = in.readUint16BE(); @@ -553,16 +584,16 @@ void Screen::loadPalette(Common::File &in) { } /** -* Free main and current palettes -*/ + * Free main and current palettes + */ void Screen::freePalette() { free(_curPalette); free(_mainPalette); } /** -* Free fonts -*/ + * Free fonts + */ void Screen::freeFonts() { for (int i = 0; i < kNumFonts; i++) { if (_arrayFont[i]) @@ -619,19 +650,19 @@ bool Screen::isInY(const int16 y, const rect_t *rect) const { } /** -* Check if two rectangles are overlapping -*/ + * 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)) && (isInY(rectA->y, rectB) || isInY(rectA->y + rectA->dy, rectB) || isInY(rectB->y, rectA) || isInY(rectB->y + rectB->dy, rectA)); } /** -* Display exit hotspots in God Mode ('PPG') -* Light Red = Exit hotspots -* Light Green = Visible objects -* White = Fixed objects, parts of background -*/ + * Display exit hotspots in God Mode ('PPG') + * Light Red = Exit hotspots + * Light Green = Visible objects + * White = Fixed objects, parts of background + */ void Screen::drawHotspots() { if (!_vm->getGameStatus().godModeFl) return; @@ -662,10 +693,10 @@ Screen_v1d::~Screen_v1d() { } /** -* Load font file, construct font ptrs and reverse data bytes -* TODO: This uses hardcoded fonts in hugo.dat, it should be replaced -* by a proper implementation of .FON files -*/ + * Load font file, construct font ptrs and reverse data bytes + * TODO: This uses hardcoded fonts in hugo.dat, it should be replaced + * by a proper implementation of .FON files + */ void Screen_v1d::loadFont(const int16 fontId) { debugC(2, kDebugDisplay, "loadFont(%d)", fontId); @@ -698,10 +729,10 @@ void Screen_v1d::loadFont(const int16 fontId) { } /** -* Load fonts from Hugo.dat -* These fonts are a workaround to avoid handling TTF fonts used by DOS versions -* TODO: Get rid of this function when the win1 fonts are supported -*/ + * Load fonts from Hugo.dat + * These fonts are a workaround to avoid handling TTF fonts used by DOS versions + * TODO: Get rid of this function when the win1 fonts are supported + */ void Screen_v1d::loadFontArr(Common::File &in) { for (int i = 0; i < kNumFonts; i++) { _arrayFontSize[i] = in.readUint16BE(); @@ -719,8 +750,8 @@ Screen_v1w::~Screen_v1w() { } /** -* Load font file, construct font ptrs and reverse data bytes -*/ + * Load font file, construct font ptrs and reverse data bytes + */ void Screen_v1w::loadFont(const int16 fontId) { debugC(2, kDebugDisplay, "loadFont(%d)", fontId); @@ -752,8 +783,8 @@ void Screen_v1w::loadFont(const int16 fontId) { } /** -* Skips the fonts used by the DOS versions -*/ + * Skips the fonts used by the DOS versions + */ void Screen_v1w::loadFontArr(Common::File &in) { for (int i = 0; i < kNumFonts; i++) { uint16 numElem = in.readUint16BE(); diff --git a/engines/hugo/display.h b/engines/hugo/display.h index 05a9546243..fd008cc97e 100644 --- a/engines/hugo/display.h +++ b/engines/hugo/display.h @@ -45,35 +45,6 @@ struct rect_t { // Rectangle used in Display static const int kCenter = -1; // Used to center text in x -/** - * A black and white Windows-style arrow cursor (12x20). - * 0 = Black (#000000 in 24-bit RGB). - * 1 = Transparent. - * 15 = White (#FFFFFF in 24-bit RGB). - * This cursor comes from Mohawk engine. - */ -static const byte stdMouseCursor[] = { - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 15, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 15, 15, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 15, 15, 15, 0, 1, 1, 1, 1, 1, 1, 1, - 0, 15, 15, 15, 15, 0, 1, 1, 1, 1, 1, 1, - 0, 15, 15, 15, 15, 15, 0, 1, 1, 1, 1, 1, - 0, 15, 15, 15, 15, 15, 15, 0, 1, 1, 1, 1, - 0, 15, 15, 15, 15, 15, 15, 15, 0, 1, 1, 1, - 0, 15, 15, 15, 15, 15, 15, 15, 15, 0, 1, 1, - 0, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 1, - 0, 15, 15, 15, 15, 15, 15, 0, 0, 0, 0, 0, - 0, 15, 15, 15, 0, 15, 15, 0, 1, 1, 1, 1, - 0, 15, 15, 0, 0, 15, 15, 0, 1, 1, 1, 1, - 0, 15, 0, 1, 0, 0, 15, 15, 0, 1, 1, 1, - 0, 0, 1, 1, 1, 0, 15, 15, 0, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 0, 15, 15, 0, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1 -}; class Screen { public: diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index be1ba89fce..bfc39346d5 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -55,9 +55,9 @@ FileManager::~FileManager() { } /** -* Convert 4 planes (RGBI) data to 8-bit DIB format -* Return original plane data ptr -*/ + * Convert 4 planes (RGBI) data to 8-bit DIB format + * Return original plane data ptr + */ byte *FileManager::convertPCC(byte *p, const uint16 y, const uint16 bpl, image_pt dataPtr) const { debugC(2, kDebugFile, "convertPCC(byte *p, %d, %d, image_pt data_p)", y, bpl); @@ -74,10 +74,10 @@ byte *FileManager::convertPCC(byte *p, const uint16 y, const uint16 bpl, image_p } /** -* Read a pcx file of length len. Use supplied seq_p and image_p or -* allocate space if NULL. Name used for errors. Returns address of seq_p -* Set first TRUE to initialize b_index (i.e. not reading a sequential image in file). -*/ + * Read a pcx file of length len. Use supplied seq_p and image_p or + * allocate space if NULL. Name used for errors. Returns address of seq_p + * Set first TRUE to initialize b_index (i.e. not reading a sequential image in file). + */ seq_t *FileManager::readPCX(Common::File &f, seq_t *seqPtr, byte *imagePtr, const bool firstFl, const char *name) { debugC(1, kDebugFile, "readPCX(..., %s)", name); @@ -147,14 +147,14 @@ seq_t *FileManager::readPCX(Common::File &f, seq_t *seqPtr, byte *imagePtr, cons } /** -* Read object file of PCC images into object supplied -*/ + * Read object file of PCC images into object supplied + */ void FileManager::readImage(const int objNum, object_t *objPtr) { debugC(1, kDebugFile, "readImage(%d, object_t *objPtr)", objNum); /** - * Structure of object file lookup entry - */ + * Structure of object file lookup entry + */ struct objBlock_t { uint32 objOffset; uint32 objLength; @@ -246,9 +246,9 @@ void FileManager::readImage(const int objNum, object_t *objPtr) { } /** -* Read sound (or music) file data. Call with SILENCE to free-up -* any allocated memory. Also returns size of data -*/ + * Read sound (or music) file data. Call with SILENCE to free-up + * any allocated memory. Also returns size of data + */ sound_pt FileManager::getSound(const int16 sound, uint16 *size) { debugC(1, kDebugFile, "getSound(%d)", sound); @@ -288,16 +288,16 @@ sound_pt FileManager::getSound(const int16 sound, uint16 *size) { } /** -* Return whether file exists or not -*/ + * Return whether file exists or not + */ bool FileManager::fileExists(const Common::String filename) const { Common::File f; return(f.exists(filename)); } /** -* Save game to supplied slot -*/ + * Save game to supplied slot + */ bool FileManager::saveGame(const int16 slot, const Common::String descrip) { debugC(1, kDebugFile, "saveGame(%d, %s)", slot, descrip.c_str()); @@ -411,8 +411,8 @@ bool FileManager::saveGame(const int16 slot, const Common::String descrip) { } /** -* Restore game from supplied slot number -*/ + * Restore game from supplied slot number + */ bool FileManager::restoreGame(const int16 slot) { debugC(1, kDebugFile, "restoreGame(%d)", slot); @@ -516,8 +516,8 @@ bool FileManager::restoreGame(const int16 slot) { } /** -* Read the encrypted text from the boot file and print it -*/ + * Read the encrypted text from the boot file and print it + */ void FileManager::printBootText() { debugC(1, kDebugFile, "printBootText()"); static const char *cypher = getBootCypher(); @@ -555,9 +555,9 @@ void FileManager::printBootText() { } /** -* Reads boot file for program environment. Fatal error if not there or -* file checksum is bad. De-crypts structure while checking checksum -*/ + * Reads boot file for program environment. Fatal error if not there or + * file checksum is bad. De-crypts structure while checking checksum + */ void FileManager::readBootFile() { debugC(1, kDebugFile, "readBootFile()"); static const char *cypher = getBootCypher(); @@ -596,10 +596,10 @@ void FileManager::readBootFile() { } /** -* Returns address of uif_hdr[id], reading it in if first call -* This file contains, between others, the bitmaps of the fonts used in the application -* UIF means User interface database (Windows Only) -*/ + * Returns address of uif_hdr[id], reading it in if first call + * This file contains, between others, the bitmaps of the fonts used in the application + * UIF means User interface database (Windows Only) + */ uif_hdr_t *FileManager::getUIFHeader(const uif_t id) { debugC(1, kDebugFile, "getUIFHeader(%d)", id); @@ -625,8 +625,8 @@ uif_hdr_t *FileManager::getUIFHeader(const uif_t id) { } /** -* Read uif item into supplied buffer. -*/ + * Read uif item into supplied buffer. + */ void FileManager::readUIFItem(const int16 id, byte *buf) { debugC(1, kDebugFile, "readUIFItem(%d, ...)", id); @@ -656,8 +656,8 @@ void FileManager::readUIFItem(const int16 id, byte *buf) { } /** -* Read the uif image file (inventory icons) -*/ + * Read the uif image file (inventory icons) + */ void FileManager::readUIFImages() { debugC(1, kDebugFile, "readUIFImages()"); diff --git a/engines/hugo/file.h b/engines/hugo/file.h index 766c8d24a0..8e98ac9722 100644 --- a/engines/hugo/file.h +++ b/engines/hugo/file.h @@ -35,8 +35,8 @@ namespace Hugo { /** -* Enumerate overlay file types -*/ + * Enumerate overlay file types + */ enum ovl_t {kOvlBoundary, kOvlOverlay, kOvlBase}; class FileManager { @@ -79,8 +79,8 @@ protected: static const int kLengthMask = 0x3F; // Lower 6 bits are length /** - * Structure of scenery file lookup entry - */ + * Structure of scenery file lookup entry + */ struct sceneBlock_t { uint32 scene_off; uint32 scene_len; diff --git a/engines/hugo/file_v1d.cpp b/engines/hugo/file_v1d.cpp index 417b637ab2..166a335c8d 100644 --- a/engines/hugo/file_v1d.cpp +++ b/engines/hugo/file_v1d.cpp @@ -54,8 +54,8 @@ void FileManager_v1d::closeDatabaseFiles() { } /** -* Open and read in an overlay file, close file -*/ + * Open and read in an overlay file, close file + */ void FileManager_v1d::readOverlay(const int screenNum, image_pt image, const ovl_t overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); @@ -79,8 +79,8 @@ void FileManager_v1d::readOverlay(const int screenNum, image_pt image, const ovl } /** -* Read a PCX image into dib_a -*/ + * Read a PCX image into dib_a + */ void FileManager_v1d::readBackground(const int screenIndex) { debugC(1, kDebugFile, "readBackground(%d)", screenIndex); @@ -102,9 +102,9 @@ char *FileManager_v1d::fetchString(const int index) { } /** -* Simple instructions given when F1 pressed twice in a row -* Only in DOS versions -*/ + * Simple instructions given when F1 pressed twice in a row + * Only in DOS versions + */ void FileManager_v1d::instructions() const { Common::File f; if (!f.open("help.dat")) { diff --git a/engines/hugo/file_v1w.cpp b/engines/hugo/file_v1w.cpp index 04a317e93a..b902e50f15 100644 --- a/engines/hugo/file_v1w.cpp +++ b/engines/hugo/file_v1w.cpp @@ -44,8 +44,8 @@ FileManager_v1w::~FileManager_v1w() { } /** -* Open and read in an overlay file, close file -*/ + * Open and read in an overlay file, close file + */ void FileManager_v1w::readOverlay(const int screenNum, image_pt image, ovl_t overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); diff --git a/engines/hugo/file_v2d.cpp b/engines/hugo/file_v2d.cpp index 2e3b0e2b08..2b227d6afc 100644 --- a/engines/hugo/file_v2d.cpp +++ b/engines/hugo/file_v2d.cpp @@ -49,8 +49,8 @@ FileManager_v2d::~FileManager_v2d() { } /** -* Open "database" file (packed files) -*/ + * Open "database" file (packed files) + */ void FileManager_v2d::openDatabaseFiles() { debugC(1, kDebugFile, "openDatabaseFiles"); @@ -63,8 +63,8 @@ void FileManager_v2d::openDatabaseFiles() { } /** -* Close "Database" files -*/ + * Close "Database" files + */ void FileManager_v2d::closeDatabaseFiles() { debugC(1, kDebugFile, "closeDatabaseFiles"); @@ -74,8 +74,8 @@ void FileManager_v2d::closeDatabaseFiles() { } /** -* Read a PCX image into dib_a -*/ + * Read a PCX image into dib_a + */ void FileManager_v2d::readBackground(const int screenIndex) { debugC(1, kDebugFile, "readBackground(%d)", screenIndex); @@ -100,8 +100,8 @@ void FileManager_v2d::readBackground(const int screenIndex) { } /** -* Open and read in an overlay file, close file -*/ + * Open and read in an overlay file, close file + */ void FileManager_v2d::readOverlay(const int screenNum, image_pt image, ovl_t overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); @@ -161,8 +161,8 @@ void FileManager_v2d::readOverlay(const int screenNum, image_pt image, ovl_t ove } /** -* Fetch string from file, decode and return ptr to string in memory -*/ + * Fetch string from file, decode and return ptr to string in memory + */ char *FileManager_v2d::fetchString(const int index) { debugC(1, kDebugFile, "fetchString(%d)", index); diff --git a/engines/hugo/file_v2w.cpp b/engines/hugo/file_v2w.cpp index 5691345757..b917d81bd5 100644 --- a/engines/hugo/file_v2w.cpp +++ b/engines/hugo/file_v2w.cpp @@ -44,9 +44,9 @@ FileManager_v2w::~FileManager_v2w() { } /** -* Display a Windows help file -* Same comment than in SCI: maybe in the future we can implement this, but for now this message should suffice -*/ + * Display a Windows help file + * Same comment than in SCI: maybe in the future we can implement this, but for now this message should suffice + */ void FileManager_v2w::instructions() const { Utils::Box(kBoxAny, "Please use an external viewer to open the game's help file: HUGOWIN%d.HLP", _vm->_gameVariant + 1); } diff --git a/engines/hugo/file_v3d.cpp b/engines/hugo/file_v3d.cpp index 78d9471c57..ec0d736bb9 100644 --- a/engines/hugo/file_v3d.cpp +++ b/engines/hugo/file_v3d.cpp @@ -46,8 +46,8 @@ FileManager_v3d::~FileManager_v3d() { } /** -* Read a PCX image into dib_a -*/ + * Read a PCX image into dib_a + */ void FileManager_v3d::readBackground(const int screenIndex) { debugC(1, kDebugFile, "readBackground(%d)", screenIndex); @@ -77,8 +77,8 @@ void FileManager_v3d::readBackground(const int screenIndex) { } /** -* Open "database" file (packed files) -*/ + * Open "database" file (packed files) + */ void FileManager_v3d::openDatabaseFiles() { debugC(1, kDebugFile, "openDatabaseFiles"); @@ -93,8 +93,8 @@ void FileManager_v3d::openDatabaseFiles() { } /** -* Close "Database" files -*/ + * Close "Database" files + */ void FileManager_v3d::closeDatabaseFiles() { debugC(1, kDebugFile, "closeDatabaseFiles"); @@ -105,8 +105,8 @@ void FileManager_v3d::closeDatabaseFiles() { } /** -* Open and read in an overlay file, close file -*/ + * Open and read in an overlay file, close file + */ void FileManager_v3d::readOverlay(const int screenNum, image_pt image, ovl_t overlayType) { debugC(1, kDebugFile, "readOverlay(%d, ...)", screenNum); diff --git a/engines/hugo/game.h b/engines/hugo/game.h index dd9eb5e918..773000c1fe 100644 --- a/engines/hugo/game.h +++ b/engines/hugo/game.h @@ -62,20 +62,20 @@ enum uif_t {U_FONT5, U_FONT6, U_FONT8, UIF_IMAGES, NUM_UIF_ITEMS}; static const int kFirstFont = U_FONT5; /** -* Enumerate ways of cycling a sequence of frames -*/ + * Enumerate ways of cycling a sequence of frames + */ enum cycle_t {kCycleInvisible, kCycleAlmostInvisible, kCycleNotCycling, kCycleForward, kCycleBackward}; /** -* Enumerate sequence index matching direction of travel -*/ + * Enumerate sequence index matching direction of travel + */ enum {RIGHT, LEFT, DOWN, _UP}; enum font_t {LARGE_ROMAN, MED_ROMAN, NUM_GDI_FONTS, INIT_FONTS, DEL_FONTS}; /** -* Enumerate the different path types for an object -*/ + * Enumerate the different path types for an object + */ enum path_t { kPathUser, // User has control of object via cursor keys kPathAuto, // Computer has control, controlled by action lists @@ -87,8 +87,8 @@ enum path_t { }; /** -* Following defines the action types and action list -*/ + * Following defines the action types and action list + */ enum action_t { // Parameters: ANULL = 0xff, // Special NOP used to 'delete' events in DEL_EVENTS ASCHEDULE = 0, // 0 - Ptr to action list to be rescheduled @@ -158,22 +158,22 @@ struct uif_hdr_t { // UIF font/image look up }; /** -* Game specific type definitions -*/ + * Game specific type definitions + */ typedef byte *image_pt; // ptr to an object image (sprite) typedef byte *sound_pt; // ptr to sound (or music) data /** -* Following are points for achieving certain actions. -*/ + * Following are points for achieving certain actions. + */ struct point_t { byte score; // The value of the point bool scoredFl; // Whether scored yet }; /** -* Structure for initializing maze processing -*/ + * Structure for initializing maze processing + */ struct maze_t { bool enabledFl; // TRUE when maze processing enabled byte size; // Size of (square) maze matrix @@ -183,8 +183,8 @@ struct maze_t { }; /** -* The following determines how a verb is acted on, for an object -*/ + * The following determines how a verb is acted on, for an object + */ struct cmd { uint16 verbIndex; // the verb uint16 reqIndex; // ptr to list of required objects @@ -197,9 +197,9 @@ struct cmd { }; /** -* The following is a linked list of images in an animation sequence -* The image data is in 8-bit DIB format, i.e. 1 byte = 1 pixel -*/ + * The following is a linked list of images in an animation sequence + * The image data is in 8-bit DIB format, i.e. 1 byte = 1 pixel + */ struct seq_t { // Linked list of images byte *imagePtr; // ptr to image uint16 bytesPerLine8; // bytes per line (8bits) @@ -209,19 +209,19 @@ struct seq_t { // Linked list of images }; /** -* The following is an array of structures of above sequences -*/ + * The following is an array of structures of above sequences + */ struct seqList_t { uint16 imageNbr; // Number of images in sequence seq_t *seqPtr; // Ptr to sequence structure }; /** -* Following is structure of verbs and nouns for 'background' objects -* These are objects that appear in the various screens, but nothing -* interesting ever happens with them. Rather than just be dumb and say -* "don't understand" we produce an interesting msg to keep user sane. -*/ + * Following is structure of verbs and nouns for 'background' objects + * These are objects that appear in the various screens, but nothing + * interesting ever happens with them. Rather than just be dumb and say + * "don't understand" we produce an interesting msg to keep user sane. + */ struct background_t { uint16 verbIndex; uint16 nounIndex; @@ -258,8 +258,8 @@ struct sound_hdr_t { // Sound file lookup entry static const int kMaxSeqNumb = 4; // Number of sequences of images in object /** -* Following is definition of object attributes -*/ + * Following is definition of object attributes + */ struct object_t { uint16 nounIndex; // String identifying object uint16 dataIndex; // String describing the object diff --git a/engines/hugo/hugo.cpp b/engines/hugo/hugo.cpp index dec3ab59d3..48500bd782 100644 --- a/engines/hugo/hugo.cpp +++ b/engines/hugo/hugo.cpp @@ -297,8 +297,8 @@ void HugoEngine::initMachine() { } /** -* Hugo game state machine - called during onIdle -*/ + * Hugo game state machine - called during onIdle + */ void HugoEngine::runMachine() { status_t &gameStatus = getGameStatus(); // Don't process if we're in a textbox @@ -355,8 +355,8 @@ void HugoEngine::runMachine() { } /** -* Loads Hugo.dat file, which contains all the hardcoded data in the original executables -*/ + * Loads Hugo.dat file, which contains all the hardcoded data in the original executables + */ bool HugoEngine::loadHugoDat() { Common::File in; in.open("hugo.dat"); @@ -715,8 +715,8 @@ uint16 **HugoEngine::loadLongArray(Common::File &in) { } /** -* Sets the playlist to be the default tune selection -*/ + * Sets the playlist to be the default tune selection + */ void HugoEngine::initPlaylist(bool playlist[kMaxTunes]) { debugC(1, kDebugEngine, "initPlaylist"); @@ -727,8 +727,8 @@ void HugoEngine::initPlaylist(bool playlist[kMaxTunes]) { } /** -* Initialize the dynamic game status -*/ + * Initialize the dynamic game status + */ void HugoEngine::initStatus() { debugC(1, kDebugEngine, "initStatus"); _status.storyModeFl = false; // Not in story mode @@ -759,8 +759,8 @@ void HugoEngine::initStatus() { } /** -* Initialize default config values. Must be done before Initialize(). -*/ + * Initialize default config values. Must be done before Initialize(). + */ void HugoEngine::initConfig() { debugC(1, kDebugEngine, "initConfig()"); @@ -772,8 +772,8 @@ void HugoEngine::initConfig() { } /** -* Reset config parts. Currently only reset music played based on playlist -*/ + * Reset config parts. Currently only reset music played based on playlist + */ void HugoEngine::resetConfig() { debugC(1, kDebugEngine, "resetConfig()"); @@ -833,8 +833,8 @@ void HugoEngine::initialize() { } /** -* Restore all resources before termination -*/ + * Restore all resources before termination + */ void HugoEngine::shutdown() { debugC(1, kDebugEngine, "shutdown"); @@ -843,8 +843,8 @@ void HugoEngine::shutdown() { } /** -* Read scenery, overlay files for given screen number -*/ + * Read scenery, overlay files for given screen number + */ void HugoEngine::readScreenFiles(const int screenNum) { debugC(1, kDebugEngine, "readScreenFiles(%d)", screenNum); @@ -861,9 +861,9 @@ void HugoEngine::readScreenFiles(const int screenNum) { } /** -* Search background command list for this screen for supplied object. -* Return first associated verb (not "look") or 0 if none found. -*/ + * Search background command list for this screen for supplied object. + * Return first associated verb (not "look") or 0 if none found. + */ char *HugoEngine::useBG(const char *name) { debugC(1, kDebugEngine, "useBG(%s)", name); @@ -879,8 +879,8 @@ char *HugoEngine::useBG(const char *name) { } /** -* Add action lists for this screen to event queue -*/ + * Add action lists for this screen to event queue + */ void HugoEngine::screenActions(const int screenNum) { debugC(1, kDebugEngine, "screenActions(%d)", screenNum); @@ -892,8 +892,8 @@ void HugoEngine::screenActions(const int screenNum) { } /** -* Set the new screen number into the hero object and any carried objects -*/ + * Set the new screen number into the hero object and any carried objects + */ void HugoEngine::setNewScreen(const int screenNum) { debugC(1, kDebugEngine, "setNewScreen(%d)", screenNum); @@ -902,8 +902,8 @@ void HugoEngine::setNewScreen(const int screenNum) { } /** -* Add up all the object values and all the bonus points -*/ + * Add up all the object values and all the bonus points + */ void HugoEngine::calcMaxScore() { debugC(1, kDebugEngine, "calcMaxScore"); @@ -914,8 +914,8 @@ void HugoEngine::calcMaxScore() { } /** -* Exit game, advertise trilogy, show copyright -*/ + * Exit game, advertise trilogy, show copyright + */ void HugoEngine::endGame() { debugC(1, kDebugEngine, "endGame"); diff --git a/engines/hugo/hugo.h b/engines/hugo/hugo.h index 3799e32e32..053f433357 100644 --- a/engines/hugo/hugo.h +++ b/engines/hugo/hugo.h @@ -126,39 +126,39 @@ enum HugoDebugChannels { }; /** -* Ways to dismiss a text/prompt box -*/ + * Ways to dismiss a text/prompt box + */ enum box_t {kBoxAny, kBoxOk, kBoxPrompt, kBoxYesNo}; /** -* Inventory icon bar states -*/ + * Inventory icon bar states + */ enum istate_t {kInventoryOff, kInventoryUp, kInventoryDown, kInventoryActive}; /** -* Game view state machine -*/ + * Game view state machine + */ enum vstate_t {kViewIdle, kViewIntroInit, kViewIntro, kViewPlay, kViewInvent, kViewExit}; /** -* Enumerate whether object is foreground, background or 'floating' -* If floating, HERO can collide with it and fore/back ground is determined -* by relative y-coord of object base. This is the general case. -* If fore or background, no collisions can take place and object is either -* behind or in front of all others, although can still be hidden by the -* the overlay plane. OVEROVL means the object is FLOATING (to other -* objects) but is never hidden by the overlay plane -*/ + * Enumerate whether object is foreground, background or 'floating' + * If floating, HERO can collide with it and fore/back ground is determined + * by relative y-coord of object base. This is the general case. + * If fore or background, no collisions can take place and object is either + * behind or in front of all others, although can still be hidden by the + * the overlay plane. OVEROVL means the object is FLOATING (to other + * objects) but is never hidden by the overlay plane + */ enum {kPriorityForeground, kPriorityBackground, kPriorityFloating, kPriorityOverOverlay}; /** -* Display list functions -*/ + * Display list functions + */ enum dupdate_t {kDisplayInit, kDisplayAdd, kDisplayDisplay, kDisplayRestore}; /** -* Priority for sound effect -*/ + * Priority for sound effect + */ enum priority_t {kSoundPriorityLow, kSoundPriorityMedium, kSoundPriorityHigh}; enum HugoGameFeatures { @@ -203,8 +203,8 @@ struct status_t { // Game status (not saved) }; /** -* Structure to define an EXIT or other collision-activated hotspot -*/ + * Structure to define an EXIT or other collision-activated hotspot + */ struct hotspot_t { int screenIndex; // Screen in which hotspot appears int x1, y1, x2, y2; // Bounding box of hotspot diff --git a/engines/hugo/intro.cpp b/engines/hugo/intro.cpp index 73e6ab3e29..02fb94c83d 100644 --- a/engines/hugo/intro.cpp +++ b/engines/hugo/intro.cpp @@ -289,9 +289,9 @@ void intro_v3d::introInit() { } /** -* Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. -* Called every tick. Returns TRUE when complete -*/ + * Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. + * Called every tick. Returns TRUE when complete + */ bool intro_v3d::introPlay() { if (_vm->getGameStatus().skipIntroFl) return true; @@ -365,8 +365,8 @@ void intro_v3w::preNewGame() { } /** -* Hugo 3 - show map and set up for introPlay() -*/ + * Hugo 3 - show map and set up for introPlay() + */ void intro_v3w::introInit() { _vm->_screen->displayList(kDisplayInit); _vm->_file->readBackground(_vm->_numScreens - 1); // display splash screen @@ -380,9 +380,9 @@ void intro_v3w::introInit() { } /** -* Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. -* Called every tick. Returns TRUE when complete -*/ + * Hugo 3 - Preamble screen before going into game. Draws path of Hugo's plane. + * Called every tick. Returns TRUE when complete + */ bool intro_v3w::introPlay() { if (_vm->getGameStatus().skipIntroFl) return true; diff --git a/engines/hugo/inventory.cpp b/engines/hugo/inventory.cpp index 82b8e09d80..4bf107575e 100644 --- a/engines/hugo/inventory.cpp +++ b/engines/hugo/inventory.cpp @@ -54,12 +54,12 @@ InventoryHandler::InventoryHandler(HugoEngine *vm) : _vm(vm) { } /** -* Construct the inventory scrollbar in dib_i -* imageTotNumb is total number of inventory icons -* displayNumb is number requested for display -* scrollFl is TRUE if scroll arrows required -* firstObjId is index of first (scrolled) inventory object to display -*/ + * Construct the inventory scrollbar in dib_i + * imageTotNumb is total number of inventory icons + * displayNumb is number requested for display + * scrollFl is TRUE if scroll arrows required + * firstObjId is index of first (scrolled) inventory object to display + */ void InventoryHandler::constructInventory(const int16 imageTotNumb, int displayNumb, const bool scrollFl, int16 firstObjId) { debugC(1, kDebugInventory, "constructInventory(%d, %d, %d, %d)", imageTotNumb, displayNumb, (scrollFl) ? 0 : 1, firstObjId); @@ -98,9 +98,9 @@ void InventoryHandler::constructInventory(const int16 imageTotNumb, int displayN } /** -* Process required action for inventory -* Returns objId under cursor (or -1) for INV_GET -*/ + * Process required action for inventory + * Returns objId under cursor (or -1) for INV_GET + */ int16 InventoryHandler::processInventory(const invact_t action, ...) { debugC(1, kDebugInventory, "processInventory(invact_t action, ...)"); @@ -169,8 +169,8 @@ int16 InventoryHandler::processInventory(const invact_t action, ...) { } /** -* Process inventory state machine -*/ + * Process inventory state machine + */ void InventoryHandler::runInventory() { status_t &gameStatus = _vm->getGameStatus(); diff --git a/engines/hugo/inventory.h b/engines/hugo/inventory.h index 84bc29ea1b..deb22cf9aa 100644 --- a/engines/hugo/inventory.h +++ b/engines/hugo/inventory.h @@ -35,8 +35,8 @@ namespace Hugo { /** -* Actions for Process_inventory() -*/ + * Actions for Process_inventory() + */ enum invact_t {kInventoryActionInit, kInventoryActionLeft, kInventoryActionRight, kInventoryActionGet}; class InventoryHandler { diff --git a/engines/hugo/mouse.cpp b/engines/hugo/mouse.cpp index 7924397bce..b522b2cd76 100644 --- a/engines/hugo/mouse.cpp +++ b/engines/hugo/mouse.cpp @@ -56,8 +56,8 @@ MouseHandler::MouseHandler(HugoEngine *vm) : _vm(vm) { } /** -* Shadow-blit supplied string into dib_a at cx,cy and add to display list -*/ + * Shadow-blit supplied string into dib_a at cx,cy and add to display list + */ void MouseHandler::cursorText(const char *buffer, const int16 cx, const int16 cy, const uif_t fontId, const int16 color) { debugC(1, kDebugMouse, "cursorText(%s, %d, %d, %d, %d)", buffer, cx, cy, fontId, color); @@ -81,9 +81,9 @@ void MouseHandler::cursorText(const char *buffer, const int16 cx, const int16 cy } /** -* Find the exit hotspot containing cx, cy. -* Return hotspot index or -1 if not found. -*/ + * Find the exit hotspot containing cx, cy. + * Return hotspot index or -1 if not found. + */ int16 MouseHandler::findExit(const int16 cx, const int16 cy) { debugC(2, kDebugMouse, "findExit(%d, %d)", cx, cy); @@ -98,8 +98,8 @@ int16 MouseHandler::findExit(const int16 cx, const int16 cy) { } /** -* Process a mouse right click at coord cx, cy over object objid -*/ + * Process a mouse right click at coord cx, cy over object objid + */ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const int16 cy) { debugC(1, kDebugMouse, "ProcessRightClick(%d, %d, %d)", objId, cx, cy); @@ -144,12 +144,12 @@ void MouseHandler::processRightClick(const int16 objId, const int16 cx, const in } /** Process a left mouse click over: -* 1. An icon - show description -* 2. An object - walk to and show description -* 3. An icon scroll arrow - scroll the iconbar -* 4. Nothing - attempt to walk there -* 5. Exit - walk to exit hotspot -*/ + * 1. An icon - show description + * 2. An object - walk to and show description + * 3. An icon scroll arrow - scroll the iconbar + * 4. Nothing - attempt to walk there + * 5. Exit - walk to exit hotspot + */ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int16 cy) { debugC(1, kDebugMouse, "ProcessLeftClick(%d, %d, %d)", objId, cx, cy); @@ -230,8 +230,8 @@ void MouseHandler::processLeftClick(const int16 objId, const int16 cx, const int } /** -* Process mouse activity -*/ + * Process mouse activity + */ void MouseHandler::mouseHandler() { debugC(2, kDebugMouse, "mouseHandler"); diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp index 5db53fdd79..23b88886a2 100644 --- a/engines/hugo/object.cpp +++ b/engines/hugo/object.cpp @@ -60,8 +60,8 @@ ObjectHandler::~ObjectHandler() { } /** -* Save sequence number and image number in given object -*/ + * Save sequence number and image number in given object + */ void ObjectHandler::saveSeq(object_t *obj) { debugC(1, kDebugObject, "saveSeq"); @@ -81,8 +81,8 @@ void ObjectHandler::saveSeq(object_t *obj) { } /** -* Set up cur_seq_p from stored sequence and image number in object -*/ + * Set up cur_seq_p from stored sequence and image number in object + */ void ObjectHandler::restoreSeq(object_t *obj) { debugC(1, kDebugObject, "restoreSeq"); @@ -93,9 +93,9 @@ void ObjectHandler::restoreSeq(object_t *obj) { } /** -* If status.objid = -1, pick up objid, else use status.objid on objid, -* if objid can't be picked up, use it directly -*/ + * If status.objid = -1, pick up objid, else use status.objid on objid, + * if objid can't be picked up, use it directly + */ void ObjectHandler::useObject(int16 objId) { debugC(1, kDebugObject, "useObject(%d)", objId); @@ -154,9 +154,9 @@ void ObjectHandler::useObject(int16 objId) { } /** -* Return object index of the topmost object under the cursor, or -1 if none -* Objects are filtered if not "useful" -*/ + * Return object index of the topmost object under the cursor, or -1 if none + * Objects are filtered if not "useful" + */ int16 ObjectHandler::findObject(uint16 x, uint16 y) { debugC(3, kDebugObject, "findObject(%d, %d)", x, y); @@ -197,9 +197,9 @@ int16 ObjectHandler::findObject(uint16 x, uint16 y) { } /** -* Issue "Look at <object>" command -* Note special case of swapped hero image -*/ + * Issue "Look at <object>" command + * Note special case of swapped hero image + */ void ObjectHandler::lookObject(object_t *obj) { debugC(1, kDebugObject, "lookObject"); @@ -211,8 +211,8 @@ void ObjectHandler::lookObject(object_t *obj) { } /** -* Free all object images -*/ + * Free all object images + */ void ObjectHandler::freeObjects() { debugC(1, kDebugObject, "freeObjects"); @@ -248,10 +248,10 @@ void ObjectHandler::freeObjects() { } /** -* Compare function for the quicksort. The sort is to order the objects in -* increasing vertical position, using y+y2 as the baseline -* Returns -1 if ay2 < by2 else 1 if ay2 > by2 else 0 -*/ + * Compare function for the quicksort. The sort is to order the objects in + * increasing vertical position, using y+y2 as the baseline + * Returns -1 if ay2 < by2 else 1 if ay2 > by2 else 0 + */ int ObjectHandler::y2comp(const void *a, const void *b) { debugC(6, kDebugObject, "y2comp"); @@ -281,8 +281,8 @@ int ObjectHandler::y2comp(const void *a, const void *b) { } /** -* Return TRUE if object being carried by hero -*/ + * Return TRUE if object being carried by hero + */ bool ObjectHandler::isCarrying(uint16 wordIndex) { debugC(1, kDebugObject, "isCarrying(%d)", wordIndex); @@ -294,8 +294,8 @@ bool ObjectHandler::isCarrying(uint16 wordIndex) { } /** -* Describe any takeable objects visible in this screen -*/ + * Describe any takeable objects visible in this screen + */ void ObjectHandler::showTakeables() { debugC(1, kDebugObject, "showTakeables"); @@ -310,8 +310,8 @@ void ObjectHandler::showTakeables() { } /** -* Find a clear space around supplied object that hero can walk to -*/ + * Find a clear space around supplied object that hero can walk to + */ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { debugC(1, kDebugObject, "findObjectSpace(obj, %d, %d)", *destx, *desty); @@ -355,8 +355,8 @@ bool ObjectHandler::findObjectSpace(object_t *obj, int16 *destx, int16 *desty) { } /** -* Free ObjectArr (before exiting) -*/ + * Free ObjectArr (before exiting) + */ void ObjectHandler::freeObjectArr() { for(int16 i = 0; i < _objCount; i++) { free(_objects[i].stateDataIndex); @@ -367,8 +367,8 @@ void ObjectHandler::freeObjectArr() { } /** -* Load ObjectArr from Hugo.dat -*/ + * Load ObjectArr from Hugo.dat + */ void ObjectHandler::loadObjectArr(Common::File &in) { debugC(6, kDebugObject, "loadObject(&in)"); @@ -474,9 +474,9 @@ void ObjectHandler::loadObjectArr(Common::File &in) { } /** -* Set the screenindex property of the carried objets to the given screen -* number -*/ + * Set the screenindex property of the carried objets to the given screen + * number + */ void ObjectHandler::setCarriedScreen(int screenNum) { for (int i = kHeroIndex + 1; i < _numObj; i++) {// Any others if (isCarried(i)) // being carried @@ -485,8 +485,8 @@ void ObjectHandler::setCarriedScreen(int screenNum) { } /** -* Load _numObj from Hugo.dat -*/ + * Load _numObj from Hugo.dat + */ void ObjectHandler::loadNumObj(Common::File &in) { int numElem; @@ -498,8 +498,8 @@ void ObjectHandler::loadNumObj(Common::File &in) { } /** -* Restore all sequences -*/ + * Restore all sequences + */ void ObjectHandler::restoreAllSeq() { // Restore ptrs to currently loaded objects for (int i = 0; i < _numObj; i++) @@ -507,8 +507,8 @@ void ObjectHandler::restoreAllSeq() { } /** -* Save objects -*/ + * Save objects + */ void ObjectHandler::saveObjects(Common::WriteStream *out) { for (int i = 0; i < _numObj; i++) { // Save where curr_seq_p is pointing to @@ -542,8 +542,8 @@ void ObjectHandler::saveObjects(Common::WriteStream *out) { } /** -* Restore objects -*/ + * Restore objects + */ void ObjectHandler::restoreObjects(Common::SeekableReadStream *in) { for (int i = 0; i < _numObj; i++) { _objects[i].pathType = (path_t) in->readByte(); @@ -574,8 +574,8 @@ void ObjectHandler::restoreObjects(Common::SeekableReadStream *in) { } /** -* Compute max object score -*/ + * Compute max object score + */ int ObjectHandler::calcMaxScore() { int score = 0; for (int i = 0; i < _numObj; i++) @@ -584,8 +584,8 @@ int ObjectHandler::calcMaxScore() { } /** -* Read Object images -*/ + * Read Object images + */ void ObjectHandler::readObjectImages() { debugC(1, kDebugObject, "readObjectImages"); @@ -599,9 +599,9 @@ bool ObjectHandler::checkBoundary(int16 x, int16 y) { } /** -* Return maximum allowed movement (from zero to vx) such that object does -* not cross a boundary (either background or another object) -*/ + * Return maximum allowed movement (from zero to vx) such that object does + * not cross a boundary (either background or another object) + */ int ObjectHandler::deltaX(const int x1, const int x2, const int vx, int y) const { // Explanation of algorithm: The boundaries are drawn as contiguous // lines 1 pixel wide. Since DX,DY are not necessarily 1, we must @@ -651,10 +651,10 @@ int ObjectHandler::deltaX(const int x1, const int x2, const int vx, int y) const } /** -* Similar to Delta_x, but for movement in y direction. Special case of -* bytes at end of line segment; must only count boundary bits falling on -* line segment. -*/ + * Similar to Delta_x, but for movement in y direction. Special case of + * bytes at end of line segment; must only count boundary bits falling on + * line segment. + */ int ObjectHandler::deltaY(const int x1, const int x2, const int vy, const int y) const { debugC(3, kDebugEngine, "deltaY(%d, %d, %d, %d)", x1, x2, vy, y); @@ -680,8 +680,8 @@ int ObjectHandler::deltaY(const int x1, const int x2, const int vy, const int y) } /** -* Store a horizontal line segment in the object boundary file -*/ + * Store a horizontal line segment in the object boundary file + */ void ObjectHandler::storeBoundary(const int x1, const int x2, const int y) { debugC(5, kDebugEngine, "storeBoundary(%d, %d, %d)", x1, x2, y); @@ -697,8 +697,8 @@ void ObjectHandler::storeBoundary(const int x1, const int x2, const int y) { } /** -* Clear a horizontal line segment in the object boundary file -*/ + * Clear a horizontal line segment in the object boundary file + */ void ObjectHandler::clearBoundary(const int x1, const int x2, const int y) { debugC(5, kDebugEngine, "clearBoundary(%d, %d, %d)", x1, x2, y); @@ -714,9 +714,9 @@ void ObjectHandler::clearBoundary(const int x1, const int x2, const int y) { } /** -* Clear a horizontal line segment in the screen boundary file -* Used to fix some data issues -*/ + * Clear a horizontal line segment in the screen boundary file + * Used to fix some data issues + */ void ObjectHandler::clearScreenBoundary(const int x1, const int x2, const int y) { debugC(5, kDebugEngine, "clearScreenBoundary(%d, %d, %d)", x1, x2, y); @@ -732,8 +732,8 @@ void ObjectHandler::clearScreenBoundary(const int x1, const int x2, const int y) } /** -* An object has collided with a boundary. See if any actions are required -*/ + * An object has collided with a boundary. See if any actions are required + */ void ObjectHandler::boundaryCollision(object_t *obj) { debugC(1, kDebugEngine, "boundaryCollision"); diff --git a/engines/hugo/object_v1d.cpp b/engines/hugo/object_v1d.cpp index 64def1435a..d46ef890bc 100644 --- a/engines/hugo/object_v1d.cpp +++ b/engines/hugo/object_v1d.cpp @@ -52,11 +52,11 @@ ObjectHandler_v1d::~ObjectHandler_v1d() { } /** -* Draw all objects on screen as follows: -* 1. Sort 'FLOATING' objects in order of y2 (base of object) -* 2. Display new object frames/positions in dib -* Finally, cycle any animating objects to next frame -*/ + * Draw all objects on screen as follows: + * 1. Sort 'FLOATING' objects in order of y2 (base of object) + * 2. Display new object frames/positions in dib + * Finally, cycle any animating objects to next frame + */ void ObjectHandler_v1d::updateImages() { debugC(5, kDebugObject, "updateImages"); @@ -171,9 +171,9 @@ void ObjectHandler_v1d::updateImages() { } /** -* Update all object positions. Process object 'local' events -* including boundary events and collisions -*/ + * Update all object positions. Process object 'local' events + * including boundary events and collisions + */ void ObjectHandler_v1d::moveObjects() { debugC(4, kDebugObject, "moveObjects"); @@ -347,10 +347,10 @@ void ObjectHandler_v1d::moveObjects() { } /** -* Swap all the images of one object with another. Set hero_image (we make -* the assumption for now that the first obj is always the HERO) to the object -* number of the swapped image -*/ + * Swap all the images of one object with another. Set hero_image (we make + * the assumption for now that the first obj is always the HERO) to the object + * number of the swapped image + */ void ObjectHandler_v1d::swapImages(int objIndex1, int objIndex2) { debugC(1, kDebugObject, "swapImages(%d, %d)", objIndex1, objIndex2); diff --git a/engines/hugo/object_v1w.cpp b/engines/hugo/object_v1w.cpp index 0e3efbb98b..321bb293f0 100644 --- a/engines/hugo/object_v1w.cpp +++ b/engines/hugo/object_v1w.cpp @@ -52,11 +52,11 @@ ObjectHandler_v1w::~ObjectHandler_v1w() { } /** -* Draw all objects on screen as follows: -* 1. Sort 'FLOATING' objects in order of y2 (base of object) -* 2. Display new object frames/positions in dib -* Finally, cycle any animating objects to next frame -*/ + * Draw all objects on screen as follows: + * 1. Sort 'FLOATING' objects in order of y2 (base of object) + * 2. Display new object frames/positions in dib + * Finally, cycle any animating objects to next frame + */ void ObjectHandler_v1w::updateImages() { debugC(5, kDebugObject, "updateImages"); @@ -169,9 +169,9 @@ void ObjectHandler_v1w::updateImages() { } /** -* Update all object positions. Process object 'local' events -* including boundary events and collisions -*/ + * Update all object positions. Process object 'local' events + * including boundary events and collisions + */ void ObjectHandler_v1w::moveObjects() { debugC(4, kDebugObject, "moveObjects"); @@ -357,10 +357,10 @@ void ObjectHandler_v1w::moveObjects() { } /** -* Swap all the images of one object with another. Set hero_image (we make -* the assumption for now that the first obj is always the HERO) to the object -* number of the swapped image -*/ + * Swap all the images of one object with another. Set hero_image (we make + * the assumption for now that the first obj is always the HERO) to the object + * number of the swapped image + */ void ObjectHandler_v1w::swapImages(int objIndex1, int objIndex2) { debugC(1, kDebugObject, "swapImages(%d, %d)", objIndex1, objIndex2); diff --git a/engines/hugo/object_v2d.cpp b/engines/hugo/object_v2d.cpp index 7a4e5ce9a2..0bb207411e 100644 --- a/engines/hugo/object_v2d.cpp +++ b/engines/hugo/object_v2d.cpp @@ -52,11 +52,11 @@ ObjectHandler_v2d::~ObjectHandler_v2d() { } /** -* Draw all objects on screen as follows: -* 1. Sort 'FLOATING' objects in order of y2 (base of object) -* 2. Display new object frames/positions in dib -* Finally, cycle any animating objects to next frame -*/ + * Draw all objects on screen as follows: + * 1. Sort 'FLOATING' objects in order of y2 (base of object) + * 2. Display new object frames/positions in dib + * Finally, cycle any animating objects to next frame + */ void ObjectHandler_v2d::updateImages() { debugC(5, kDebugObject, "updateImages"); @@ -171,9 +171,9 @@ void ObjectHandler_v2d::updateImages() { } /** -* Update all object positions. Process object 'local' events -* including boundary events and collisions -*/ + * Update all object positions. Process object 'local' events + * including boundary events and collisions + */ void ObjectHandler_v2d::moveObjects() { debugC(4, kDebugObject, "moveObjects"); diff --git a/engines/hugo/object_v3d.cpp b/engines/hugo/object_v3d.cpp index b9d7bcc261..8c9efba1d0 100644 --- a/engines/hugo/object_v3d.cpp +++ b/engines/hugo/object_v3d.cpp @@ -52,9 +52,9 @@ ObjectHandler_v3d::~ObjectHandler_v3d() { } /** -* Update all object positions. Process object 'local' events -* including boundary events and collisions -*/ + * Update all object positions. Process object 'local' events + * including boundary events and collisions + */ void ObjectHandler_v3d::moveObjects() { debugC(4, kDebugObject, "moveObjects"); @@ -242,10 +242,10 @@ void ObjectHandler_v3d::moveObjects() { } /** -* Swap all the images of one object with another. Set hero_image (we make -* the assumption for now that the first obj is always the HERO) to the object -* number of the swapped image -*/ + * Swap all the images of one object with another. Set hero_image (we make + * the assumption for now that the first obj is always the HERO) to the object + * number of the swapped image + */ void ObjectHandler_v3d::swapImages(int objIndex1, int objIndex2) { debugC(1, kDebugObject, "swapImages(%d, %d)", objIndex1, objIndex2); diff --git a/engines/hugo/parser.cpp b/engines/hugo/parser.cpp index 3a5f73e48b..fcf9f9b07d 100644 --- a/engines/hugo/parser.cpp +++ b/engines/hugo/parser.cpp @@ -67,9 +67,9 @@ void Parser::switchTurbo() { } /** -* Add any new chars to line buffer and display them. -* If CR pressed, pass line to LineHandler() -*/ + * Add any new chars to line buffer and display them. + * If CR pressed, pass line to LineHandler() + */ void Parser::charHandler() { debugC(4, kDebugParser, "charHandler"); @@ -251,9 +251,9 @@ void Parser::keyHandler(Common::Event event) { } /** -* Perform an immediate command. Takes parameters a la sprintf -* Assumes final string will not overrun line[] length -*/ + * Perform an immediate command. Takes parameters a la sprintf + * Assumes final string will not overrun line[] length + */ void Parser::command(const char *format, ...) { debugC(1, kDebugParser, "Command(%s, ...)", format); @@ -266,8 +266,8 @@ void Parser::command(const char *format, ...) { } /** -* Locate any member of object name list appearing in command line -*/ + * Locate any member of object name list appearing in command line + */ bool Parser::isWordPresent(char **wordArr) const { debugC(1, kDebugParser, "isWordPresent(%s)", wordArr[0]); @@ -281,8 +281,8 @@ bool Parser::isWordPresent(char **wordArr) const { } /** -* Locate word in list of nouns and return ptr to first string in noun list -*/ + * Locate word in list of nouns and return ptr to first string in noun list + */ char *Parser::findNoun() const { debugC(1, kDebugParser, "findNoun()"); @@ -296,8 +296,8 @@ char *Parser::findNoun() const { } /** -* Locate word in list of verbs and return ptr to first string in verb list -*/ + * Locate word in list of verbs and return ptr to first string in verb list + */ char *Parser::findVerb() const { debugC(1, kDebugParser, "findVerb()"); @@ -311,8 +311,8 @@ char *Parser::findVerb() const { } /** -* Show user all objects being carried in a variable width 2 column format -*/ + * Show user all objects being carried in a variable width 2 column format + */ void Parser::showDosInventory() const { debugC(1, kDebugParser, "showDosInventory()"); static const char *blanks = " "; diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp index f9c2d1525a..8819100ee6 100644 --- a/engines/hugo/parser_v1d.cpp +++ b/engines/hugo/parser_v1d.cpp @@ -52,9 +52,9 @@ Parser_v1d::~Parser_v1d() { } /** -* Locate word in list of nouns and return ptr to string in noun list -* If n is NULL, start at beginning of list, else with n -*/ + * Locate word in list of nouns and return ptr to string in noun list + * If n is NULL, start at beginning of list, else with n + */ char *Parser_v1d::findNextNoun(char *noun) const { debugC(1, kDebugParser, "findNextNoun(%s)", noun); @@ -75,11 +75,11 @@ char *Parser_v1d::findNextNoun(char *noun) const { } /** -* Test whether hero is close to object. Return TRUE or FALSE -* If no noun specified, check context flag in object before other tests. -* If object not near, return suitable string; may be similar object closer -* If radius is -1, treat radius as infinity -*/ + * Test whether hero is close to object. Return TRUE or FALSE + * If no noun specified, check context flag in object before other tests. + * If object not near, return suitable string; may be similar object closer + * If radius is -1, treat radius as infinity + */ bool Parser_v1d::isNear_v1(char *verb, char *noun, object_t *obj, char *comment) const { debugC(1, kDebugParser, "isNear(%s, %s, obj, %s)", verb, noun, comment); @@ -138,10 +138,10 @@ bool Parser_v1d::isNear_v1(char *verb, char *noun, object_t *obj, char *comment) } /** -* Test whether supplied verb is one of the common variety for this object -* say_ok needed for special case of take/drop which may be handled not only -* here but also in a cmd_list with a donestr string simultaneously -*/ + * Test whether supplied verb is one of the common variety for this object + * say_ok needed for special case of take/drop which may be handled not only + * here but also in a cmd_list with a donestr string simultaneously + */ bool Parser_v1d::isGenericVerb_v1(char *word, object_t *obj) { debugC(1, kDebugParser, "isGenericVerb(%s, object_t *obj)", word); @@ -178,11 +178,11 @@ bool Parser_v1d::isGenericVerb_v1(char *word, object_t *obj) { } /** -* Test whether supplied verb is included in the list of allowed verbs for -* this object. If it is, then perform the tests on it from the cmd list -* and if it passes, perform the actions in the action list. If the verb -* is catered for, return TRUE -*/ + * Test whether supplied verb is included in the list of allowed verbs for + * this object. If it is, then perform the tests on it from the cmd list + * and if it passes, perform the actions in the action list. If the verb + * is catered for, return TRUE + */ bool Parser_v1d::isObjectVerb_v1(char *word, object_t *obj) { debugC(1, kDebugParser, "isObjectVerb(%s, object_t *obj)", word); @@ -230,9 +230,9 @@ bool Parser_v1d::isObjectVerb_v1(char *word, object_t *obj) { } /** -* Print text for possible background object. Return TRUE if match found -* Only match if both verb and noun found. Test_ca will match verb-only -*/ + * Print text for possible background object. Return TRUE if match found + * Only match if both verb and noun found. Test_ca will match verb-only + */ bool Parser_v1d::isBackgroundWord_v1(char *noun, char *verb, objectList_t obj) const { debugC(1, kDebugParser, "isBackgroundWord(%s, %s, object_list_t obj)", noun, verb); @@ -249,8 +249,8 @@ bool Parser_v1d::isBackgroundWord_v1(char *noun, char *verb, objectList_t obj) c } /** -* Do all things necessary to carry an object -*/ + * Do all things necessary to carry an object + */ void Parser_v1d::takeObject(object_t *obj) { debugC(1, kDebugParser, "takeObject(object_t *obj)"); @@ -264,8 +264,8 @@ void Parser_v1d::takeObject(object_t *obj) { } /** -* Do all necessary things to drop an object -*/ + * Do all necessary things to drop an object + */ void Parser_v1d::dropObject(object_t *obj) { debugC(1, kDebugParser, "dropObject(object_t *obj)"); @@ -280,9 +280,9 @@ void Parser_v1d::dropObject(object_t *obj) { } /** -* Print text for possible background object. Return TRUE if match found -* If test_noun TRUE, must have a noun given -*/ + * Print text for possible background object. Return TRUE if match found + * If test_noun TRUE, must have a noun given + */ bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, char *noun, char *verb, objectList_t obj) const { debugC(1, kDebugParser, "isCatchallVerb(%d, %s, %s, object_list_t obj)", (testNounFl) ? 1 : 0, noun, verb); @@ -302,8 +302,8 @@ bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, char *noun, char *verb, obje } /** -* Parse the user's line of text input. Generate events as necessary -*/ + * Parse the user's line of text input. Generate events as necessary + */ void Parser_v1d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); diff --git a/engines/hugo/parser_v1w.cpp b/engines/hugo/parser_v1w.cpp index 7cd6b19bb7..5b3c48f939 100644 --- a/engines/hugo/parser_v1w.cpp +++ b/engines/hugo/parser_v1w.cpp @@ -55,8 +55,8 @@ Parser_v1w::~Parser_v1w() { } /** -* Parse the user's line of text input. Generate events as necessary -*/ + * Parse the user's line of text input. Generate events as necessary + */ void Parser_v1w::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); diff --git a/engines/hugo/parser_v2d.cpp b/engines/hugo/parser_v2d.cpp index 3d37d97c01..24d9a338b6 100644 --- a/engines/hugo/parser_v2d.cpp +++ b/engines/hugo/parser_v2d.cpp @@ -52,8 +52,8 @@ Parser_v2d::~Parser_v2d() { } /** -* Parse the user's line of text input. Generate events as necessary -*/ + * Parse the user's line of text input. Generate events as necessary + */ void Parser_v2d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); diff --git a/engines/hugo/parser_v3d.cpp b/engines/hugo/parser_v3d.cpp index 413edfd4d1..0925192507 100644 --- a/engines/hugo/parser_v3d.cpp +++ b/engines/hugo/parser_v3d.cpp @@ -52,8 +52,8 @@ Parser_v3d::~Parser_v3d() { } /** -* Parse the user's line of text input. Generate events as necessary -*/ + * Parse the user's line of text input. Generate events as necessary + */ void Parser_v3d::lineHandler() { debugC(1, kDebugParser, "lineHandler()"); @@ -206,10 +206,10 @@ void Parser_v3d::lineHandler() { } /** -* Test whether command line contains a verb allowed by this object. -* If it does, and the object is near and passes the tests in the command -* list then carry out the actions in the action list and return TRUE -*/ + * Test whether command line contains a verb allowed by this object. + * If it does, and the object is near and passes the tests in the command + * list then carry out the actions in the action list and return TRUE + */ bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { debugC(1, kDebugParser, "isObjectVerb(object_t *obj, %s)", comment); @@ -263,8 +263,8 @@ bool Parser_v3d::isObjectVerb_v3(object_t *obj, char *comment) { } /** -* Test whether command line contains one of the generic actions -*/ + * Test whether command line contains one of the generic actions + */ bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { debugC(1, kDebugParser, "isGenericVerb(object_t *obj, %s)", comment); @@ -314,11 +314,11 @@ bool Parser_v3d::isGenericVerb_v3(object_t *obj, char *comment) { } /** -* Test whether hero is close to object. Return TRUE or FALSE -* If object not near, return suitable comment; may be another object close -* If radius is -1, treat radius as infinity -* Verb is included to determine correct comment if not near -*/ + * Test whether hero is close to object. Return TRUE or FALSE + * If object not near, return suitable comment; may be another object close + * If radius is -1, treat radius as infinity + * Verb is included to determine correct comment if not near + */ bool Parser_v3d::isNear_v3(object_t *obj, char *verb, char *comment) const { debugC(1, kDebugParser, "isNear(object_t *obj, %s, %s)", verb, comment); @@ -372,8 +372,8 @@ bool Parser_v3d::isNear_v3(object_t *obj, char *verb, char *comment) const { } /** -* Do all things necessary to carry an object -*/ + * Do all things necessary to carry an object + */ void Parser_v3d::takeObject(object_t *obj) { debugC(1, kDebugParser, "takeObject(object_t *obj)"); @@ -389,8 +389,8 @@ void Parser_v3d::takeObject(object_t *obj) { } /** -* Do all necessary things to drop an object -*/ + * Do all necessary things to drop an object + */ void Parser_v3d::dropObject(object_t *obj) { debugC(1, kDebugParser, "dropObject(object_t *obj)"); @@ -408,11 +408,11 @@ void Parser_v3d::dropObject(object_t *obj) { } /** -* Search for matching verbs in background command list. -* Noun is not required. Return TRUE if match found -* Note that if the background command list has match set TRUE then do not -* print text if there are any recognizable nouns in the command line -*/ + * Search for matching verbs in background command list. + * Noun is not required. Return TRUE if match found + * Note that if the background command list has match set TRUE then do not + * print text if there are any recognizable nouns in the command line + */ bool Parser_v3d::isCatchallVerb_v3(objectList_t obj) const { debugC(1, kDebugParser, "isCatchallVerb(object_list_t obj)"); @@ -438,9 +438,9 @@ bool Parser_v3d::isCatchallVerb_v3(objectList_t obj) const { } /** -* Search for matching verb/noun pairs in background command list -* Print text for possible background object. Return TRUE if match found -*/ + * Search for matching verb/noun pairs in background command list + * Print text for possible background object. Return TRUE if match found + */ bool Parser_v3d::isBackgroundWord_v3(objectList_t obj) const { debugC(1, kDebugParser, "isBackgroundWord(object_list_t obj)"); diff --git a/engines/hugo/route.cpp b/engines/hugo/route.cpp index ad74acf4bf..fd7bb84a9d 100644 --- a/engines/hugo/route.cpp +++ b/engines/hugo/route.cpp @@ -49,8 +49,8 @@ Route::Route(HugoEngine *vm) : _vm(vm) { } /** -* Face hero in new direction, based on cursor key input by user. -*/ + * Face hero in new direction, based on cursor key input by user. + */ void Route::setDirection(const uint16 keyCode) { debugC(1, kDebugRoute, "setDirection(%d)", keyCode); @@ -94,9 +94,9 @@ void Route::setDirection(const uint16 keyCode) { } /** -* Set hero walking, based on cursor key input by user. -* Hitting same key twice will stop hero. -*/ + * Set hero walking, based on cursor key input by user. + * Hitting same key twice will stop hero. + */ void Route::setWalk(const uint16 direction) { debugC(1, kDebugRoute, "setWalk(%d)", direction); @@ -166,17 +166,17 @@ void Route::setWalk(const uint16 direction) { } /** -* Recursive algorithm! Searches from hero to dest_x, dest_y -* Find horizontal line segment about supplied point and recursively -* find line segments for each point above and below that segment. -* When destination point found in segment, start surfacing and leave -* a trail in segment[] from destination back to hero. -* -* Note: there is a bug which allows a route through a 1-pixel high -* narrow gap if between 2 segments wide enough for hero. To work -* around this, make sure any narrow gaps are 2 or more pixels high. -* An example of this was the blocking guard in Hugo1/Dead-End. -*/ + * Recursive algorithm! Searches from hero to dest_x, dest_y + * Find horizontal line segment about supplied point and recursively + * find line segments for each point above and below that segment. + * When destination point found in segment, start surfacing and leave + * a trail in segment[] from destination back to hero. + * + * Note: there is a bug which allows a route through a 1-pixel high + * narrow gap if between 2 segments wide enough for hero. To work + * around this, make sure any narrow gaps are 2 or more pixels high. + * An example of this was the blocking guard in Hugo1/Dead-End. + */ void Route::segment(int16 x, int16 y) { debugC(1, kDebugRoute, "segment(%d, %d)", x, y); @@ -288,9 +288,9 @@ void Route::segment(int16 x, int16 y) { } /** -* Create and return ptr to new node. Initialize with previous node. -* Returns 0 if MAX_NODES exceeded -*/ + * Create and return ptr to new node. Initialize with previous node. + * Returns 0 if MAX_NODES exceeded + */ Point *Route::newNode() { debugC(1, kDebugRoute, "newNode"); @@ -303,11 +303,11 @@ Point *Route::newNode() { } /** -* Construct route to cx, cy. Return TRUE if successful. -* 1. Copy boundary bitmap to local byte map (include object bases) -* 2. Construct list of segments segment[] from hero to destination -* 3. Compress to shortest route in route[] -*/ + * Construct route to cx, cy. Return TRUE if successful. + * 1. Copy boundary bitmap to local byte map (include object bases) + * 2. Construct list of segments segment[] from hero to destination + * 3. Compress to shortest route in route[] + */ bool Route::findRoute(const int16 cx, const int16 cy) { debugC(1, kDebugRoute, "findRoute(%d, %d)", cx, cy); @@ -415,8 +415,8 @@ bool Route::findRoute(const int16 cx, const int16 cy) { } /** -* Process hero in route mode - called from Move_objects() -*/ + * Process hero in route mode - called from Move_objects() + */ void Route::processRoute() { debugC(1, kDebugRoute, "processRoute"); @@ -489,10 +489,10 @@ void Route::processRoute() { } /** -* Start a new route from hero to cx, cy -* go_for is the purpose, id indexes the exit or object to walk to -* Returns FALSE if route not found -*/ + * Start a new route from hero to cx, cy + * go_for is the purpose, id indexes the exit or object to walk to + * Returns FALSE if route not found + */ bool Route::startRoute(const go_t go_for, const int16 id, int16 cx, int16 cy) { debugC(1, kDebugRoute, "startRoute(%d, %d, %d, %d)", go_for, id, cx, cy); diff --git a/engines/hugo/route.h b/engines/hugo/route.h index ca5d03d910..5b1eb9bff4 100644 --- a/engines/hugo/route.h +++ b/engines/hugo/route.h @@ -36,8 +36,8 @@ namespace Hugo { /** -* Purpose of an automatic route -*/ + * Purpose of an automatic route + */ enum go_t {kRouteSpace, kRouteExit, kRouteLook, kRouteGet}; struct Point { diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp index 46b4f50939..709f09d987 100644 --- a/engines/hugo/schedule.cpp +++ b/engines/hugo/schedule.cpp @@ -56,8 +56,8 @@ Scheduler::~Scheduler() { } /** -* Initialise the timer event queue -*/ + * Initialise the timer event queue + */ void Scheduler::initEventQueue() { debugC(1, kDebugSchedule, "initEventQueue"); @@ -76,8 +76,8 @@ void Scheduler::initEventQueue() { } /** -* Return a ptr to an event structure from the free list -*/ + * Return a ptr to an event structure from the free list + */ event_t *Scheduler::getQueue() { debugC(4, kDebugSchedule, "getQueue"); @@ -90,8 +90,8 @@ event_t *Scheduler::getQueue() { } /** -* Call Insert_action for each action in the list supplied -*/ + * Call Insert_action for each action in the list supplied + */ void Scheduler::insertActionList(const uint16 actIndex) { debugC(1, kDebugSchedule, "insertActionList(%d)", actIndex); @@ -102,8 +102,8 @@ void Scheduler::insertActionList(const uint16 actIndex) { } /** -* Return system time in ticks. A tick is 1/TICKS_PER_SEC mS -*/ + * Return system time in ticks. A tick is 1/TICKS_PER_SEC mS + */ uint32 Scheduler::getWinTicks() const { debugC(5, kDebugSchedule, "getWinTicks()"); @@ -111,11 +111,11 @@ uint32 Scheduler::getWinTicks() const { } /** -* Return system time in ticks. A tick is 1/TICKS_PER_SEC mS -* If update FALSE, simply return last known time -* Note that this is real time unless a processing cycle takes longer than -* a real tick, in which case the system tick is simply incremented -*/ + * Return system time in ticks. A tick is 1/TICKS_PER_SEC mS + * If update FALSE, simply return last known time + * Note that this is real time unless a processing cycle takes longer than + * a real tick, in which case the system tick is simply incremented + */ uint32 Scheduler::getDosTicks(const bool updateFl) { debugC(5, kDebugSchedule, "getDosTicks(%s)", (updateFl) ? "TRUE" : "FALSE"); @@ -137,8 +137,8 @@ uint32 Scheduler::getDosTicks(const bool updateFl) { } /** -* Add indecated bonus to score if not added already -*/ + * Add indecated bonus to score if not added already + */ void Scheduler::processBonus(const int bonusIndex) { debugC(1, kDebugSchedule, "processBonus(%d)", bonusIndex); @@ -149,13 +149,13 @@ void Scheduler::processBonus(const int bonusIndex) { } /** -* Transition to a new screen as follows: -* 1. Clear out all non-global events from event list. -* 2. Set the new screen (in the hero object and any carried objects) -* 3. Read in the screen files for the new screen -* 4. Schedule action list for new screen -* 5. Initialise prompt line and status line -*/ + * Transition to a new screen as follows: + * 1. Clear out all non-global events from event list. + * 2. Set the new screen (in the hero object and any carried objects) + * 3. Read in the screen files for the new screen + * 4. Schedule action list for new screen + * 5. Initialise prompt line and status line + */ void Scheduler::newScreen(const int screenIndex) { debugC(1, kDebugSchedule, "newScreen(%d)", screenIndex); @@ -193,11 +193,11 @@ void Scheduler::newScreen(const int screenIndex) { } /** -* Transition to a new screen as follows: -* 1. Set the new screen (in the hero object and any carried objects) -* 2. Read in the screen files for the new screen -* 3. Initialise prompt line and status line -*/ + * Transition to a new screen as follows: + * 1. Set the new screen (in the hero object and any carried objects) + * 2. Read in the screen files for the new screen + * 3. Initialise prompt line and status line + */ void Scheduler::restoreScreen(const int screenIndex) { debugC(1, kDebugSchedule, "restoreScreen(%d)", screenIndex); @@ -212,11 +212,11 @@ void Scheduler::restoreScreen(const int screenIndex) { } /** -* Wait (if necessary) for next synchronizing tick -* Slow machines won't make it by the end of tick, so will just plod on -* at their own speed, not waiting here, but free running. -* Note: DOS Versions only -*/ + * Wait (if necessary) for next synchronizing tick + * Slow machines won't make it by the end of tick, so will just plod on + * at their own speed, not waiting here, but free running. + * Note: DOS Versions only + */ void Scheduler::waitForRefresh() { debugC(5, kDebugSchedule, "waitForRefresh()"); @@ -231,8 +231,8 @@ void Scheduler::waitForRefresh() { } /** -* Read kALnewscr used by maze (Hugo 2) -*/ + * Read kALnewscr used by maze (Hugo 2) + */ void Scheduler::loadAlNewscrIndex(Common::File &in) { debugC(6, kDebugSchedule, "loadAlNewscrIndex(&in)"); @@ -245,8 +245,8 @@ void Scheduler::loadAlNewscrIndex(Common::File &in) { } /** -* Load actListArr from Hugo.dat -*/ + * Load actListArr from Hugo.dat + */ void Scheduler::loadActListArr(Common::File &in) { debugC(6, kDebugSchedule, "loadActListArr(&in)"); @@ -832,9 +832,9 @@ void Scheduler::freeActListArr() { } /** -* Maze mode is enabled. Check to see whether hero has crossed the maze -* bounding box, if so, go to the next room -*/ + * Maze mode is enabled. Check to see whether hero has crossed the maze + * bounding box, if so, go to the next room + */ void Scheduler::processMaze(const int x1, const int x2, const int y1, const int y2) { debugC(1, kDebugSchedule, "processMaze"); @@ -870,11 +870,11 @@ void Scheduler::processMaze(const int x1, const int x2, const int y1, const int } /** -* Write the event queue to the file with handle f -* Note that we convert all the event structure ptrs to indexes -* using -1 for NULL. We can't convert the action ptrs to indexes -* so we save address of first dummy action ptr to compare on restore. -*/ + * Write the event queue to the file with handle f + * Note that we convert all the event structure ptrs to indexes + * using -1 for NULL. We can't convert the action ptrs to indexes + * so we save address of first dummy action ptr to compare on restore. + */ void Scheduler::saveEvents(Common::WriteStream *f) { debugC(1, kDebugSchedule, "saveEvents()"); @@ -907,8 +907,8 @@ void Scheduler::saveEvents(Common::WriteStream *f) { } /** -* Restore the action data from file with handle f -*/ + * Restore the action data from file with handle f + */ void Scheduler::restoreActions(Common::SeekableReadStream *f) { @@ -980,8 +980,8 @@ void Scheduler::findAction(act* action, int16* index, int16* subElem) { } /** -* Restore the event list from file with handle f -*/ + * Restore the event list from file with handle f + */ void Scheduler::restoreEvents(Common::SeekableReadStream *f) { debugC(1, kDebugSchedule, "restoreEvents"); @@ -1022,9 +1022,9 @@ void Scheduler::restoreEvents(Common::SeekableReadStream *f) { } /** -* Insert the action pointed to by p into the timer event queue -* The queue goes from head (earliest) to tail (latest) timewise -*/ + * Insert the action pointed to by p into the timer event queue + * The queue goes from head (earliest) to tail (latest) timewise + */ void Scheduler::insertAction(act *action) { debugC(1, kDebugSchedule, "insertAction() - Action type A%d", action->a0.actType); @@ -1074,10 +1074,10 @@ void Scheduler::insertAction(act *action) { } /** -* This function performs the action in the event structure pointed to by p -* It dequeues the event and returns it to the free list. It returns a ptr -* to the next action in the list, except special case of NEW_SCREEN -*/ + * This function performs the action in the event structure pointed to by p + * It dequeues the event and returns it to the free list. It returns a ptr + * to the next action in the list, except special case of NEW_SCREEN + */ event_t *Scheduler::doAction(event_t *curEvent) { debugC(1, kDebugSchedule, "doAction - Event action type : %d", curEvent->action->a0.actType); @@ -1322,14 +1322,14 @@ event_t *Scheduler::doAction(event_t *curEvent) { } /** -* Delete an event structure (i.e. return it to the free list) -* Historical note: Originally event p was assumed to be at head of queue -* (i.e. earliest) since all events were deleted in order when proceeding to -* a new screen. To delete an event from the middle of the queue, the action -* was overwritten to be ANULL. With the advent of GLOBAL events, delQueue -* was modified to allow deletes anywhere in the list, and the DEL_EVENT -* action was modified to perform the actual delete. -*/ + * Delete an event structure (i.e. return it to the free list) + * Historical note: Originally event p was assumed to be at head of queue + * (i.e. earliest) since all events were deleted in order when proceeding to + * a new screen. To delete an event from the middle of the queue, the action + * was overwritten to be ANULL. With the advent of GLOBAL events, delQueue + * was modified to allow deletes anywhere in the list, and the DEL_EVENT + * action was modified to perform the actual delete. + */ void Scheduler::delQueue(event_t *curEvent) { debugC(4, kDebugSchedule, "delQueue()"); @@ -1382,10 +1382,10 @@ uint32 Scheduler_v1d::getTicks() { } /** -* This is the scheduler which runs every tick. It examines the event queue -* for any events whose time has come. It dequeues these events and performs -* the action associated with the event, returning it to the free queue -*/ + * This is the scheduler which runs every tick. It examines the event queue + * for any events whose time has come. It dequeues these events and performs + * the action associated with the event, returning it to the free queue + */ void Scheduler_v1d::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); @@ -1422,8 +1422,8 @@ void Scheduler_v1d::promptAction(act *action) { } /** -* Decode a response to a prompt -*/ + * Decode a response to a prompt + */ void Scheduler_v1d::decodeString(char *line) { debugC(1, kDebugSchedule, "decodeString(%s)", line); @@ -1474,8 +1474,8 @@ void Scheduler_v2d::promptAction(act *action) { } /** -* Decode a string -*/ + * Decode a string + */ void Scheduler_v2d::decodeString(char *line) { debugC(1, kDebugSchedule, "decodeString(%s)", line); @@ -1507,10 +1507,10 @@ uint32 Scheduler_v1w::getTicks() { } /** -* This is the scheduler which runs every tick. It examines the event queue -* for any events whose time has come. It dequeues these events and performs -* the action associated with the event, returning it to the free queue -*/ + * This is the scheduler which runs every tick. It examines the event queue + * for any events whose time has come. It dequeues these events and performs + * the action associated with the event, returning it to the free queue + */ void Scheduler_v1w::runScheduler() { debugC(6, kDebugSchedule, "runScheduler"); diff --git a/engines/hugo/sound.cpp b/engines/hugo/sound.cpp index ecf1bd1a86..9906cb7c3c 100644 --- a/engines/hugo/sound.cpp +++ b/engines/hugo/sound.cpp @@ -254,29 +254,29 @@ SoundHandler::~SoundHandler() { } /** -* Set the FM music volume from config.mvolume (0..100%) -*/ + * Set the FM music volume from config.mvolume (0..100%) + */ void SoundHandler::setMusicVolume() { _midiPlayer->syncVolume(); } /** -* Stop any sound that might be playing -*/ + * Stop any sound that might be playing + */ void SoundHandler::stopSound() { _vm->_mixer->stopAll(); } /** -* Stop any tune that might be playing -*/ + * Stop any tune that might be playing + */ void SoundHandler::stopMusic() { _midiPlayer->stop(); } /** -* Turn music on and off -*/ + * Turn music on and off + */ void SoundHandler::toggleMusic() { _vm->_config.musicFl = !_vm->_config.musicFl; @@ -284,8 +284,8 @@ void SoundHandler::toggleMusic() { } /** -* Turn digitized sound on and off -*/ + * Turn digitized sound on and off + */ void SoundHandler::toggleSound() { _vm->_config.soundFl = !_vm->_config.soundFl; } @@ -295,8 +295,8 @@ void SoundHandler::playMIDI(sound_pt seq_p, uint16 size) { } /** -* Read a tune sequence from the sound database and start playing it -*/ + * Read a tune sequence from the sound database and start playing it + */ void SoundHandler::playMusic(int16 tune) { sound_pt seqPtr; // Sequence data from file uint16 size; // Size of sequence data @@ -310,9 +310,9 @@ void SoundHandler::playMusic(int16 tune) { } /** -* Produce various sound effects on supplied stereo channel(s) -* Override currently playing sound only if lower or same priority -*/ + * Produce various sound effects on supplied stereo channel(s) + * Override currently playing sound only if lower or same priority + */ void SoundHandler::playSound(int16 sound, const byte priority) { // uint32 dwVolume; // Left, right volume of sound sound_pt sound_p; // Sound data @@ -334,8 +334,8 @@ void SoundHandler::playSound(int16 sound, const byte priority) { } /** -* Initialize for MCI sound and midi -*/ + * Initialize for MCI sound and midi + */ void SoundHandler::initSound() { _midiPlayer->open(); } @@ -353,9 +353,9 @@ void SoundHandler::syncVolume() { } /** -* Check if music is still playing. -* If not, select the next track in the playlist and play it -*/ + * Check if music is still playing. + * If not, select the next track in the playlist and play it + */ void SoundHandler::checkMusic() { if (_midiPlayer->isPlaying()) return; @@ -376,10 +376,10 @@ void SoundHandler::loopPlayer(void *refCon) { } /** -* Decrement last note's timer and see if time to play next note yet. -* If so, interpret next note in string and play it. Update ptr to string -* Timer: >0 - song still going, 0 - Stop note, -1 - Set next note -*/ + * Decrement last note's timer and see if time to play next note yet. + * If so, interpret next note in string and play it. Update ptr to string + * Timer: >0 - song still going, 0 - Stop note, -1 - Set next note + */ void SoundHandler::pcspkr_player() { static const uint16 pcspkrNotes[8] = {1352, 1205, 2274, 2026, 1805, 1704, 1518}; // The 3rd octave note counts A..G static const uint16 pcspkrSharps[8] = {1279, 1171, 2150, 1916, 1755, 1611, 1435}; // The sharps, A# to B# |