From ae056a767ba8c983b7d38afd2532ba18fd3cb724 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 8 Dec 2015 09:46:54 +0100 Subject: LAB: Use doxygen format for function comments --- engines/lab/anim.cpp | 24 +++---- engines/lab/engine.cpp | 67 +++++++++--------- engines/lab/eventman.cpp | 56 +++++++-------- engines/lab/graphics.cpp | 161 ++++++++++++++++++++++---------------------- engines/lab/image.cpp | 30 ++++----- engines/lab/interface.cpp | 32 ++++----- engines/lab/intro.cpp | 26 +++---- engines/lab/map.cpp | 56 +++++++-------- engines/lab/music.cpp | 68 +++++++++---------- engines/lab/savegame.cpp | 12 ++-- engines/lab/special.cpp | 68 +++++++++---------- engines/lab/tilepuzzle.cpp | 54 +++++++-------- engines/lab/timing.cpp | 42 ++++++------ engines/lab/transitions.cpp | 70 +++++++++---------- engines/lab/utils.cpp | 92 ++++++++++++------------- 15 files changed, 427 insertions(+), 431 deletions(-) (limited to 'engines/lab') diff --git a/engines/lab/anim.cpp b/engines/lab/anim.cpp index d8b3b2feb3..4927b25eae 100644 --- a/engines/lab/anim.cpp +++ b/engines/lab/anim.cpp @@ -243,9 +243,9 @@ void Anim::diffNextFrame() { } } -/*****************************************************************************/ -/* A separate task launched by readDiff. Plays the DIFF. */ -/*****************************************************************************/ +/** + * A separate task launched by readDiff. Plays the DIFF. + */ void Anim::playDiff(byte *buffer) { _waitSec = 0L; _waitMicros = 0L; @@ -330,17 +330,17 @@ void Anim::playDiff(byte *buffer) { diffNextFrame(); } -/*****************************************************************************/ -/* Stops an animation from running. */ -/*****************************************************************************/ +/** + * Stops an animation from running. + */ void Anim::stopDiff() { if (_isPlaying && _isAnim) _vm->_graphics->blackScreen(); } -/*****************************************************************************/ -/* Stops an animation from running. */ -/*****************************************************************************/ +/** + * Stops an animation from running. + */ void Anim::stopDiffEnd() { if (_isPlaying) { _stopPlayingEnd = true; @@ -351,9 +351,9 @@ void Anim::stopDiffEnd() { } } -/*****************************************************************************/ -/* Reads in a DIFF file. */ -/*****************************************************************************/ +/** + * Reads in a DIFF file. + */ bool Anim::readDiff(byte *buffer, bool playOnce) { _playOnce = playOnce; playDiff(buffer); diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp index 3e76e161e8..6fb4c700d9 100644 --- a/engines/lab/engine.cpp +++ b/engines/lab/engine.cpp @@ -86,9 +86,9 @@ static char initcolors[] = { '\x00', '\x00', '\x00', '\x30', '\x24', '\x24', '\x2c', '\x2c', '\x2c', '\x08', '\x08', '\x08'}; -/******************************************************************************/ -/* Draws the message for the room. */ -/******************************************************************************/ +/** + * Draws the message for the room. + */ void LabEngine::drawRoomMessage(uint16 curInv, CloseDataPtr closePtr) { if (_lastTooLong) { _lastTooLong = false; @@ -124,10 +124,9 @@ void LabEngine::freeScreens() { } } - -/******************************************************************************/ -/* Permanently flips the imagery of a gadget. */ -/******************************************************************************/ +/** + * Permanently flips the imagery of a gadget. + */ void LabEngine::perFlipGadget(uint16 gadgetId) { for (GadgetList::iterator gadget = _moveGadgetList.begin(); gadget != _moveGadgetList.end(); ++gadget) { Gadget *topGadget = *gadget; @@ -147,9 +146,9 @@ void LabEngine::perFlipGadget(uint16 gadgetId) { } } -/******************************************************************************/ -/* Eats all the available messages. */ -/******************************************************************************/ +/** + * Eats all the available messages. + */ void LabEngine::eatMessages() { IntuiMessage *msg; @@ -158,9 +157,9 @@ void LabEngine::eatMessages() { } while (msg); } -/******************************************************************************/ -/* Checks whether the close up is one of the special case closeups. */ -/******************************************************************************/ +/** + * Checks whether the close up is one of the special case closeups. + */ bool LabEngine::doCloseUp(CloseDataPtr closePtr) { if (closePtr == NULL) return false; @@ -216,9 +215,9 @@ bool LabEngine::doCloseUp(CloseDataPtr closePtr) { return true; } -/******************************************************************************/ -/* Gets the current inventory name. */ -/******************************************************************************/ +/** + * Gets the current inventory name. + */ const char *LabEngine::getInvName(uint16 curInv) { if (_mainDisplay) return _inventory[curInv]._bitmapName; @@ -246,9 +245,9 @@ const char *LabEngine::getInvName(uint16 curInv) { return _inventory[curInv]._bitmapName; } -/******************************************************************************/ -/* Turns the interface off. */ -/******************************************************************************/ +/** + * Turns the interface off. + */ void LabEngine::interfaceOff() { if (!_interfaceOff) { _event->attachGadgetList(NULL); @@ -257,9 +256,9 @@ void LabEngine::interfaceOff() { } } -/******************************************************************************/ -/* Turns the interface on. */ -/******************************************************************************/ +/** + * Turns the interface on. + */ void LabEngine::interfaceOn() { if (_interfaceOff) { _interfaceOff = false; @@ -274,9 +273,9 @@ void LabEngine::interfaceOn() { _event->attachGadgetList(&_moveGadgetList); } -/******************************************************************************/ -/* If the user hits the "Use" gadget; things that can get used on themselves. */ -/******************************************************************************/ +/** + * If the user hits the "Use" gadget; things that can get used on themselves. + */ bool LabEngine::doUse(uint16 curInv) { if (curInv == MAPNUM) { /* LAB: Labyrinth specific */ drawStaticMessage(kTextUseMap); @@ -336,9 +335,9 @@ bool LabEngine::doUse(uint16 curInv) { return true; } -/******************************************************************************/ -/* Decrements the current inventory number. */ -/******************************************************************************/ +/** + * Decrements the current inventory number. + */ void LabEngine::decIncInv(uint16 *curInv, bool decreaseFl) { interfaceOff(); @@ -379,9 +378,9 @@ void LabEngine::decIncInv(uint16 *curInv, bool decreaseFl) { } } -/******************************************************************************/ -/* The main game loop */ -/******************************************************************************/ +/** + * The main game loop. + */ void LabEngine::mainGameLoop() { uint16 actionMode = 4; uint16 curInv = MAPNUM; @@ -1075,9 +1074,9 @@ void LabEngine::go() { _music->freeMusic(); } -/*****************************************************************************/ -/* New code to allow quick(er) return navigation in game. */ -/*****************************************************************************/ +/** + * New code to allow quick(er) return navigation in game. + */ int LabEngine::followCrumbs() { // NORTH, SOUTH, EAST, WEST static int movement[4][4] = { diff --git a/engines/lab/eventman.cpp b/engines/lab/eventman.cpp index b840c0a720..5b55ed4102 100644 --- a/engines/lab/eventman.cpp +++ b/engines/lab/eventman.cpp @@ -55,10 +55,10 @@ static byte MouseData[] = { #define MOUSE_WIDTH 10 #define MOUSE_HEIGHT 15 -/*****************************************************************************/ -/* Checks whether or not the cords fall within one of the gadgets in a list */ -/* of gadgets. */ -/*****************************************************************************/ +/** + * Checks whether or not the cords fall within one of the gadgets in a list + * of gadgets. + */ Gadget *EventManager::checkGadgetHit(GadgetList *gadgetList, Common::Point pos) { for (GadgetList::iterator gadgetItr = gadgetList->begin(); gadgetItr != gadgetList->end(); ++gadgetItr) { Gadget *gadget = *gadgetItr; @@ -154,9 +154,9 @@ void EventManager::updateMouse() { _vm->_graphics->screenUpdate(); } -/*****************************************************************************/ -/* Initializes the mouse. */ -/*****************************************************************************/ +/** + * Initializes the mouse. + */ void EventManager::initMouse() { g_system->setMouseCursor(MouseData, MOUSE_WIDTH, MOUSE_HEIGHT, 0, 0, 0); g_system->showMouse(false); @@ -164,9 +164,9 @@ void EventManager::initMouse() { setMousePos(Common::Point(0, 0)); } -/*****************************************************************************/ -/* Shows the mouse. */ -/*****************************************************************************/ +/** + * Shows the mouse. + */ void EventManager::mouseShow() { if (_mouseHidden) { processInput(); @@ -176,9 +176,9 @@ void EventManager::mouseShow() { g_system->showMouse(true); } -/*****************************************************************************/ -/* Hides the mouse. */ -/*****************************************************************************/ +/** + * Hides the mouse. + */ void EventManager::mouseHide() { if (!_mouseHidden) { _mouseHidden = true; @@ -187,10 +187,10 @@ void EventManager::mouseHide() { } } -/*****************************************************************************/ -/* Gets the current mouse co-ordinates. NOTE: On IBM version, will scale */ -/* from virtual to screen co-ordinates automatically. */ -/*****************************************************************************/ +/** + * Gets the current mouse co-ordinates. NOTE: On IBM version, will scale + * from virtual to screen co-ordinates automatically. + */ Common::Point EventManager::getMousePos() { if (_vm->_isHiRes) return _mousePos; @@ -198,9 +198,9 @@ Common::Point EventManager::getMousePos() { return Common::Point(_mousePos.x / 2, _mousePos.y); } -/*****************************************************************************/ -/* Moves the mouse to new co-ordinates. */ -/*****************************************************************************/ +/** + * Moves the mouse to new co-ordinates. + */ void EventManager::setMousePos(Common::Point pos) { if (_vm->_isHiRes) g_system->warpMouse(pos.x, pos.y); @@ -211,11 +211,11 @@ void EventManager::setMousePos(Common::Point pos) { processInput(); } -/*****************************************************************************/ -/* Checks whether or not the mouse buttons have been pressed, and the last */ -/* co-ordinates of the button press. leftbutton tells whether to check the */ -/* left or right button. */ -/*****************************************************************************/ +/** + * Checks whether or not the mouse buttons have been pressed, and the last + * co-ordinates of the button press. leftbutton tells whether to check the + * left or right button. + */ bool EventManager::mouseButton(uint16 *x, uint16 *y, bool leftbutton) { if (leftbutton) { if (_leftClick) { @@ -243,9 +243,9 @@ Gadget *EventManager::mouseGadget() { return temp; } -/*****************************************************************************/ -/* Checks whether or not a key has been pressed. */ -/*****************************************************************************/ +/** + * Checks whether or not a key has been pressed. + */ bool EventManager::keyPress(uint16 *keyCode) { if (haveNextChar()) { *keyCode = getNextChar(); diff --git a/engines/lab/graphics.cpp b/engines/lab/graphics.cpp index aa118eb420..926dc7ce6d 100644 --- a/engines/lab/graphics.cpp +++ b/engines/lab/graphics.cpp @@ -74,9 +74,9 @@ void DisplayMan::loadPict(const char *filename) { delete bitmapFile; } -/*****************************************************************************/ -/* Reads in a picture into the dest bitmap. */ -/*****************************************************************************/ +/** + * Reads in a picture into the dest bitmap. + */ void DisplayMan::readPict(const char *filename, bool playOnce) { _vm->_anim->stopDiff(); @@ -94,9 +94,9 @@ void DisplayMan::readPict(const char *filename, bool playOnce) { _vm->_anim->readDiff(_curBitmap, playOnce); } -/*****************************************************************************/ -/* Reads in a picture into buffer memory. */ -/*****************************************************************************/ +/** + * Reads in a picture into buffer memory. + */ byte *DisplayMan::readPictToMem(const char *filename, uint16 x, uint16 y) { _vm->_anim->stopDiff(); @@ -132,9 +132,9 @@ void DisplayMan::freePict() { /*----- The flowText routines -----*/ -/******************************************************************************/ -/* Extracts the first word from a string. */ -/******************************************************************************/ +/** + * Extracts the first word from a string. + */ static void getWord(char *wordBuffer, const char *mainBuffer, uint16 *wordWidth) { uint16 width = 0; @@ -148,10 +148,10 @@ static void getWord(char *wordBuffer, const char *mainBuffer, uint16 *wordWidth) *wordWidth = width; } -/******************************************************************************/ -/* Gets a line of text for flowText; makes sure that its length is less than */ -/* or equal to the maximum width. */ -/******************************************************************************/ +/** + * Gets a line of text for flowText; makes sure that its length is less than + * or equal to the maximum width. + */ void DisplayMan::getLine(TextFont *tf, char *lineBuffer, const char **mainBuffer, uint16 lineWidth) { uint16 curWidth = 0, wordWidth; char wordBuffer[100]; @@ -181,14 +181,13 @@ void DisplayMan::getLine(TextFont *tf, char *lineBuffer, const char **mainBuffer } } -/******************************************************************************/ -/* Dumps a chunk of text to an arbitrary box; flows it within that box and */ -/* optionally centers it. Returns the number of characters that were */ -/* processed. */ -/* */ -/* Note: Every individual word MUST be int16 enough to fit on a line, and */ -/* each line less than 255 characters. */ -/******************************************************************************/ +/** + * Dumps a chunk of text to an arbitrary box; flows it within that box and + * optionally centers it. Returns the number of characters that were + * processed. + * Note: Every individual word MUST be int16 enough to fit on a line, and + * each line less than 255 characters. + */ uint32 DisplayMan::flowText( void *font, /* the TextAttr pointer */ int16 spacing, /* How much vertical spacing between the lines */ @@ -270,9 +269,9 @@ uint32 DisplayMan::flowTextScaled(void *font, /* the TextAttr pointer */ _vm->_utils->vgaScaleX(x2), _vm->_utils->vgaScaleY(y2), str); } -/******************************************************************************/ -/* Calls flowText, but flows it to memory. Same restrictions as flowText. */ -/******************************************************************************/ +/** + * Calls flowText, but flows it to memory. Same restrictions as flowText. + */ uint32 DisplayMan::flowTextToMem(Image *destIm, void *font, /* the TextAttr pointer */ int16 spacing, /* How much vertical spacing between the lines */ @@ -334,9 +333,9 @@ int32 DisplayMan::longDrawMessage(const char *str) { return flowTextScaled(_vm->_msgFont, 0, 1, 7, false, true, true, true, 6, 155, 313, 195, str); } -/******************************************************************************/ -/* Draws a message to the message box. */ -/******************************************************************************/ +/** + * Draws a message to the message box. + */ void DisplayMan::drawMessage(const char *str) { if (_doNotDrawMessage) { _doNotDrawMessage = false; @@ -362,9 +361,9 @@ void DisplayMan::drawMessage(const char *str) { } } -/******************************************************************************/ -/* Draws the control panel display. */ -/******************************************************************************/ +/** + * Draws the control panel display. + */ void DisplayMan::drawPanel() { _vm->_event->mouseHide(); @@ -415,9 +414,9 @@ void DisplayMan::drawPanel() { _vm->_event->mouseShow(); } -/******************************************************************************/ -/* Sets up the Labyrinth screens, and opens up the initial windows. */ -/******************************************************************************/ +/** + * Sets up the Labyrinth screens, and opens up the initial windows. + */ bool DisplayMan::setUpScreens() { if (!createScreen(_vm->_isHiRes)) return false; @@ -471,16 +470,16 @@ bool DisplayMan::setUpScreens() { return true; } -/*****************************************************************************/ -/* Sets the pen number to use on all the drawing operations. */ -/*****************************************************************************/ +/** + * Sets the pen number to use on all the drawing operations. + */ void DisplayMan::setAPen(byte pennum) { _curapen = pennum; } -/*****************************************************************************/ -/* Fills in a rectangle. */ -/*****************************************************************************/ +/** + * Fills in a rectangle. + */ void DisplayMan::rectFill(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { int w = x2 - x1 + 1; int h = y2 - y1 + 1; @@ -511,16 +510,16 @@ void DisplayMan::rectFillScaled(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { rectFill(_vm->_utils->vgaScaleX(x1), _vm->_utils->vgaScaleY(y1), _vm->_utils->vgaScaleX(x2), _vm->_utils->vgaScaleY(y2)); } -/*****************************************************************************/ -/* Draws a horizontal line. */ -/*****************************************************************************/ +/** + * Draws a horizontal line. + */ void DisplayMan::drawVLine(uint16 x, uint16 y1, uint16 y2) { rectFill(x, y1, x, y2); } -/*****************************************************************************/ -/* Draws a vertical line. */ -/*****************************************************************************/ +/** + * Draws a vertical line. + */ void DisplayMan::drawHLine(uint16 x1, uint16 y, uint16 x2) { rectFill(x1, y, x2, y); } @@ -532,9 +531,9 @@ void DisplayMan::screenUpdate() { _vm->_event->processInput(); } -/*****************************************************************************/ -/* Sets up either a low-res or a high-res 256 color screen. */ -/*****************************************************************************/ +/** + * Sets up either a low-res or a high-res 256 color screen. + */ bool DisplayMan::createScreen(bool hiRes) { if (hiRes) { _screenWidth = 640; @@ -549,10 +548,10 @@ bool DisplayMan::createScreen(bool hiRes) { return true; } -/*****************************************************************************/ -/* Converts an Amiga palette (up to 16 colors) to a VGA palette, then sets */ -/* the VGA palette. */ -/*****************************************************************************/ +/** + * Converts an Amiga palette (up to 16 colors) to a VGA palette, then sets + * the VGA palette. + */ void DisplayMan::setAmigaPal(uint16 *pal, uint16 numColors) { byte vgaPal[16 * 3]; uint16 vgaIdx = 0; @@ -570,17 +569,17 @@ void DisplayMan::setAmigaPal(uint16 *pal, uint16 numColors) { _vm->waitTOF(); } -/*****************************************************************************/ -/* Writes any number of the 256 color registers. */ -/* first: the number of the first color register to write. */ -/* numreg: the number of registers to write */ -/* buf: a char pointer which contains the selected color registers. */ -/* Each value representing a color register occupies 3 bytes in */ -/* the array. The order is red, green then blue. The first byte */ -/* in the array is the red component of the first element selected.*/ -/* The length of the buffer is 3 times the number of registers */ -/* selected. */ -/*****************************************************************************/ +/** + * Writes any number of the 256 color registers. + * first: the number of the first color register to write. + * numreg: the number of registers to write + * buf: a char pointer which contains the selected color registers. + * Each value representing a color register occupies 3 bytes in + * the array. The order is red, green then blue. The first byte + * in the array is the red component of the first element selected. + * The length of the buffer is 3 times the number of registers + * selected. + */ void DisplayMan::writeColorRegs(byte *buf, uint16 first, uint16 numreg) { byte tmp[256 * 3]; @@ -598,9 +597,9 @@ void DisplayMan::setPalette(void *cmap, uint16 numcolors) { writeColorRegs((byte *)cmap, 0, numcolors); } -/*****************************************************************************/ -/* Returns the base address of the current VGA display. */ -/*****************************************************************************/ +/** + * Returns the base address of the current VGA display. + */ byte *DisplayMan::getCurrentDrawingBuffer() { if (_currentDisplayBuffer) return _currentDisplayBuffer; @@ -608,9 +607,9 @@ byte *DisplayMan::getCurrentDrawingBuffer() { return _displayBuffer; } -/*****************************************************************************/ -/* Overlays a region on the screen using the desired pen color. */ -/*****************************************************************************/ +/** + * Overlays a region on the screen using the desired pen color. + */ void DisplayMan::overlayRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, uint16 y2) { int w = x2 - x1 + 1; int h = y2 - y1 + 1; @@ -645,9 +644,9 @@ void DisplayMan::overlayRect(uint16 pencolor, uint16 x1, uint16 y1, uint16 x2, u } } -/*****************************************************************************/ -/* Closes a font and frees all memory associated with it. */ -/*****************************************************************************/ +/** + * Closes a font and frees all memory associated with it. + */ void DisplayMan::closeFont(TextFont *tf) { if (tf) { if (tf->_data && tf->_dataLength) @@ -657,9 +656,9 @@ void DisplayMan::closeFont(TextFont *tf) { } } -/*****************************************************************************/ -/* Returns the length of a text in the specified font. */ -/*****************************************************************************/ +/** + * Returns the length of a text in the specified font. + */ uint16 DisplayMan::textLength(TextFont *tf, const char *text, uint16 numchars) { uint16 length = 0; @@ -673,16 +672,16 @@ uint16 DisplayMan::textLength(TextFont *tf, const char *text, uint16 numchars) { return length; } -/*****************************************************************************/ -/* Returns the height of a specified font. */ -/*****************************************************************************/ +/** + * Returns the height of a specified font. + */ uint16 DisplayMan::textHeight(TextFont *tf) { return (tf) ? tf->_height : 0; } -/*****************************************************************************/ -/* Draws the text to the screen. */ -/*****************************************************************************/ +/** + * Draws the text to the screen. + */ void DisplayMan::text(TextFont *tf, uint16 x, uint16 y, uint16 color, const char *text, uint16 numchars) { byte *VGATop, *VGACur, *VGATemp, *VGATempLine, *cdata; uint32 RealOffset, SegmentOffset; diff --git a/engines/lab/image.cpp b/engines/lab/image.cpp index ab63e96def..29459b1fcc 100644 --- a/engines/lab/image.cpp +++ b/engines/lab/image.cpp @@ -33,9 +33,9 @@ namespace Lab { -/*****************************************************************************/ -/* Reads in an image from disk. */ -/*****************************************************************************/ +/** + * Reads in an image from disk. + */ Image::Image(Common::File *s) { _width = s->readUint16LE(); _height = s->readUint16LE(); @@ -49,9 +49,9 @@ Image::Image(Common::File *s) { s->read(_imageData, size); } -/*****************************************************************************/ -/* Blits a piece of one image to another. */ -/*****************************************************************************/ +/** + * Blits a piece of one image to another. + */ void Image::blitBitmap(uint16 xs, uint16 ys, Image *imDest, uint16 xd, uint16 yd, uint16 width, uint16 height, byte masked) { int w = width; @@ -96,23 +96,23 @@ void Image::blitBitmap(uint16 xs, uint16 ys, Image *imDest, } } -/*****************************************************************************/ -/* Draws an image to the screen. */ -/*****************************************************************************/ +/** + * Draws an image to the screen. + */ void Image::drawImage(uint16 x, uint16 y) { blitBitmap(0, 0, NULL, x, y, _width, _height, false); } -/*****************************************************************************/ -/* Draws an image to the screen with transparency. */ -/*****************************************************************************/ +/** + * Draws an image to the screen with transparency. + */ void Image::drawMaskImage(uint16 x, uint16 y) { blitBitmap(0, 0, NULL, x, y, _width, _height, true); } -/*****************************************************************************/ -/* Reads an image from the screen. */ -/*****************************************************************************/ +/** + * Reads an image from the screen. + */ void Image::readScreenImage(uint16 x, uint16 y) { int w = _width; int h = _height; diff --git a/engines/lab/interface.cpp b/engines/lab/interface.cpp index 4e514ea652..ade5f69a9e 100644 --- a/engines/lab/interface.cpp +++ b/engines/lab/interface.cpp @@ -62,9 +62,9 @@ void freeButtonList(GadgetList *gadgetList) { gadgetList->clear(); } -/*****************************************************************************/ -/* Draws a gadget list to the screen. */ -/*****************************************************************************/ +/** + * Draws a gadget list to the screen. + */ void drawGadgetList(GadgetList *gadgetList) { for (GadgetList::iterator gadget = gadgetList->begin(); gadget != gadgetList->end(); ++gadget) { (*gadget)->_image->drawImage((*gadget)->x, (*gadget)->y); @@ -74,25 +74,25 @@ void drawGadgetList(GadgetList *gadgetList) { } } -/*****************************************************************************/ -/* Dims a gadget, and makes it unavailable for using. */ -/*****************************************************************************/ +/** + * Dims a gadget, and makes it unavailable for using. + */ void disableGadget(Gadget *curgad, uint16 pencolor) { g_lab->_graphics->overlayRect(pencolor, curgad->x, curgad->y, curgad->x + curgad->_image->_width - 1, curgad->y + curgad->_image->_height - 1); curgad->_flags |= GADGETOFF; } -/*****************************************************************************/ -/* Undims a gadget, and makes it available again. */ -/*****************************************************************************/ +/** + * Undims a gadget, and makes it available again. + */ void enableGadget(Gadget *curgad) { curgad->_image->drawImage(curgad->x, curgad->y); curgad->_flags &= !(GADGETOFF); } -/*****************************************************************************/ -/* Make a key press have the right case for a gadget KeyEquiv value. */ -/*****************************************************************************/ +/** + * Make a key press have the right case for a gadget KeyEquiv value. + */ uint16 makeGadgetKeyEquiv(uint16 key) { if (Common::isAlnum(key)) key = tolower(key); @@ -100,10 +100,10 @@ uint16 makeGadgetKeyEquiv(uint16 key) { return key; } -/*****************************************************************************/ -/* Checks whether or not the coords fall within one of the gadgets in a list */ -/* of gadgets. */ -/*****************************************************************************/ +/** + * Checks whether or not the coords fall within one of the gadgets in a list + * of gadgets. + */ Gadget *LabEngine::checkNumGadgetHit(GadgetList *gadgetList, uint16 key) { uint16 gkey = key - '0'; diff --git a/engines/lab/intro.cpp b/engines/lab/intro.cpp index 2af4f448a2..b75a215025 100644 --- a/engines/lab/intro.cpp +++ b/engines/lab/intro.cpp @@ -37,10 +37,10 @@ Intro::Intro(LabEngine *vm) : _vm(vm) { _quitIntro = false; } -/******************************************************************************/ -/* Goes through, and responds to all the intuition messages currently in the */ -/* message queue. */ -/******************************************************************************/ +/** + * Goes through, and responds to all the intuition messages currently in the + * message queue. + */ void Intro::introEatMessages() { while (1) { IntuiMessage *msg = _vm->getMsg(); @@ -61,9 +61,9 @@ void Intro::introEatMessages() { } } -/*****************************************************************************/ -/* Reads in a picture. */ -/*****************************************************************************/ +/** + * Reads in a picture. + */ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { char path[50] = "Lab:rooms/Intro/"; strcat(path, filename); @@ -200,9 +200,9 @@ void Intro::doPictText(const char *filename, TextFont *msgFont, bool isScreen) { } // while(1) } -/*****************************************************************************/ -/* Does a one second delay, but checks the music while doing it. */ -/*****************************************************************************/ +/** + * Does a one second delay, but checks the music while doing it. + */ void Intro::musicDelay() { _vm->_music->updateMusic(); @@ -231,9 +231,9 @@ void Intro::nReadPict(const char *filename, bool playOnce) { _vm->_graphics->readPict(finalFileName.c_str(), playOnce); } -/*****************************************************************************/ -/* Does the introduction sequence for Labyrinth. */ -/*****************************************************************************/ +/** + * Does the introduction sequence for Labyrinth. + */ void Intro::introSequence() { uint16 palette[16] = { 0x0000, 0x0855, 0x0FF9, 0x0EE7, diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp index 405d7b82ea..b86e2b6846 100644 --- a/engines/lab/map.cpp +++ b/engines/lab/map.cpp @@ -80,9 +80,9 @@ static uint16 mapScaleY(uint16 y) { return ((y - 35) >> 1) - (y >> 6); } -/*****************************************************************************/ -/* Loads in the map data. */ -/*****************************************************************************/ +/** + * Loads in the map data. + */ static bool loadMapData() { uint16 counter; @@ -156,9 +156,9 @@ static void freeMapData() { Maps = NULL; } -/*****************************************************************************/ -/* Figures out what a room's coordinates should be. */ -/*****************************************************************************/ +/** + * Figures out what a room's coordinates should be. + */ static void roomCoords(uint16 CurRoom, uint16 *x1, uint16 *y1, uint16 *x2, uint16 *y2) { Image *curRoomImg = NULL; @@ -193,9 +193,9 @@ static void roomCoords(uint16 CurRoom, uint16 *x1, uint16 *y1, uint16 *x2, uint1 } } -/*****************************************************************************/ -/* Draws a room to the bitmap. */ -/*****************************************************************************/ +/** + * Draws a room to the bitmap. + */ static void drawRoom(uint16 CurRoom, bool drawx) { uint16 x, y, xx, xy, offset; uint32 flags; @@ -328,9 +328,9 @@ static void drawRoom(uint16 CurRoom, bool drawx) { XMark->drawImage(xx, xy); } -/*****************************************************************************/ -/* Checks if a floor has been visitted. */ -/*****************************************************************************/ +/** + * Checks if a floor has been visitted. + */ static bool onFloor(uint16 Floor) { for (uint16 i = 1; i <= MaxRooms; i++) { if ((Maps[i].PageNumber == Floor) && g_lab->_roomsFound->in(i) && Maps[i].x) @@ -340,9 +340,9 @@ static bool onFloor(uint16 Floor) { return false; } -/*****************************************************************************/ -/* Figures out which floor, if any, should be gone to if the up arrow is hit */ -/*****************************************************************************/ +/** + * Figures out which floor, if any, should be gone to if the up arrow is hit + */ static void getUpFloor(uint16 *Floor, bool *isfloor) { do { *isfloor = true; @@ -357,10 +357,10 @@ static void getUpFloor(uint16 *Floor, bool *isfloor) { } while ((!onFloor(*Floor)) && (*Floor <= CARNIVAL)); } -/*****************************************************************************/ -/* Figures out which floor, if any, should be gone to if the down arrow is */ -/* hit. */ -/*****************************************************************************/ +/** + * Figures out which floor, if any, should be gone to if the down arrow is + * hit. + */ static void getDownFloor(uint16 *Floor, bool *isfloor) { do { *isfloor = true; @@ -388,9 +388,9 @@ static void getDownFloor(uint16 *Floor, bool *isfloor) { } while ((!onFloor(*Floor)) && *Floor); } -/*****************************************************************************/ -/* Draws the map */ -/*****************************************************************************/ +/** + * Draws the map + */ void LabEngine::drawMap(uint16 CurRoom, uint16 CurMsg, uint16 Floor, bool fadeout, bool fadein) { char *sptr; @@ -468,9 +468,9 @@ void LabEngine::drawMap(uint16 CurRoom, uint16 CurMsg, uint16 Floor, bool fadeou _event->mouseShow(); } -/*****************************************************************************/ -/* Processes the map. */ -/*****************************************************************************/ +/** + * Processes the map. + */ void LabEngine::processMap(uint16 CurRoom) { uint32 Class, place = 1; uint16 Code, Qualifier, MouseX, MouseY, GadgetID, CurFloor, OldFloor, OldMsg, CurMsg, x1, y1, x2, y2; @@ -629,9 +629,9 @@ void LabEngine::processMap(uint16 CurRoom) { } } -/*****************************************************************************/ -/* Does the map processing. */ -/*****************************************************************************/ +/** + * Does the map processing. + */ void LabEngine::doMap(uint16 CurRoom) { static uint16 AmigaMapPalette[] = { 0x0BA8, 0x0C11, 0x0A74, 0x0076, diff --git a/engines/lab/music.cpp b/engines/lab/music.cpp index 8fd88ff3e6..1c043efdb7 100644 --- a/engines/lab/music.cpp +++ b/engines/lab/music.cpp @@ -62,10 +62,10 @@ Music::Music(LabEngine *vm) : _vm(vm) { _waitTillFinished = false; } -/*****************************************************************************/ -/* Figures out which buffer is currently playing based on messages sent to */ -/* it from the Audio device. */ -/*****************************************************************************/ +/** + * Figures out which buffer is currently playing based on messages sent to + * it from the Audio device. + */ void Music::updateMusic() { _vm->_event->processInput(); _vm->_event->updateMouse(); @@ -143,9 +143,9 @@ void Music::fillbuffer(byte *musicBuffer) { } } -/*****************************************************************************/ -/* Starts up the music initially. */ -/*****************************************************************************/ +/** + * Starts up the music initially. + */ void Music::startMusic(bool restartFl) { if (!_musicOn) return; @@ -161,9 +161,9 @@ void Music::startMusic(bool restartFl) { updateMusic(); } -/*****************************************************************************/ -/* Initializes the music buffers. */ -/*****************************************************************************/ +/** + * Initializes the music buffers. + */ bool Music::initMusic() { _musicOn = true; _musicPaused = false; @@ -180,9 +180,9 @@ bool Music::initMusic() { return true; } -/*****************************************************************************/ -/* Frees up the music buffers and closes the file. */ -/*****************************************************************************/ +/** + * Frees up the music buffers and closes the file. + */ void Music::freeMusic() { _musicOn = false; @@ -195,9 +195,9 @@ void Music::freeMusic() { _file = NULL; } -/*****************************************************************************/ -/* Pauses the background music. */ -/*****************************************************************************/ +/** + * Pauses the background music. + */ void Music::pauseBackMusic() { if (!_musicPaused && _musicOn) { updateMusic(); @@ -210,9 +210,9 @@ void Music::pauseBackMusic() { } } -/*****************************************************************************/ -/* Resumes the paused background music. */ -/*****************************************************************************/ +/** + * Resumes the paused background music. + */ void Music::resumeBackMusic() { if (_musicPaused) { stopSoundEffect(); @@ -225,9 +225,9 @@ void Music::resumeBackMusic() { } } -/*****************************************************************************/ -/* Turns the music on and off. */ -/*****************************************************************************/ +/** + * Turns the music on and off. + */ void Music::setMusic(bool on) { stopSoundEffect(); @@ -241,9 +241,9 @@ void Music::setMusic(bool on) { _musicOn = on; } -/******************************************************************************/ -/* Checks the music that should be playing in a particular room. */ -/******************************************************************************/ +/** + * Checks the music that should be playing in a particular room. + */ void Music::checkRoomMusic() { if ((_lastMusicRoom == _vm->_roomNum) || !_musicOn) return; @@ -258,9 +258,9 @@ void Music::checkRoomMusic() { _lastMusicRoom = _vm->_roomNum; } -/*****************************************************************************/ -/* Changes the background music to something else. */ -/*****************************************************************************/ +/** + * Changes the background music to something else. + */ void Music::changeMusic(const char *newmusic) { if (!_tFile) { _tFile = _file; @@ -278,9 +278,9 @@ void Music::changeMusic(const char *newmusic) { setMusic(true); } -/*****************************************************************************/ -/* Changes the background music to the original piece playing. */ -/*****************************************************************************/ +/** + * Changes the background music to the original piece playing. + */ void Music::resetMusic() { if (!_tFile) return; @@ -308,9 +308,9 @@ void Music::resetMusic() { _tFile = 0; } -/*****************************************************************************/ -/* Reads in a music file. Ignores any graphics. */ -/*****************************************************************************/ +/** + * Reads in a music file. Ignores any graphics. + */ bool Music::readMusic(const char *filename, bool waitTillFinished) { Common::File *file = _vm->_resource->openDataFile(filename, MKTAG('D', 'I', 'F', 'F')); updateMusic(); diff --git a/engines/lab/savegame.cpp b/engines/lab/savegame.cpp index bf3f8a4504..10f52a2582 100644 --- a/engines/lab/savegame.cpp +++ b/engines/lab/savegame.cpp @@ -113,9 +113,9 @@ bool readSaveGameHeader(Common::InSaveFile *in, SaveGameHeader &header) { return true; } -/*****************************************************************************/ -/* Writes the game out to disk. */ -/*****************************************************************************/ +/** + * Writes the game out to disk. + */ bool saveGame(uint16 Direction, uint16 Quarters, int slot, Common::String desc) { uint16 i, j; Common::String fileName = g_lab->generateSaveFileName(slot); @@ -164,9 +164,9 @@ bool saveGame(uint16 Direction, uint16 Quarters, int slot, Common::String desc) return true; } -/*****************************************************************************/ -/* Reads the game from disk. */ -/*****************************************************************************/ +/** + * Reads the game from disk. + */ bool loadGame(uint16 *Direction, uint16 *Quarters, int slot) { uint16 i, j; Common::String fileName = g_lab->generateSaveFileName(slot); diff --git a/engines/lab/special.cpp b/engines/lab/special.cpp index 0d92772a39..62d45d12b3 100644 --- a/engines/lab/special.cpp +++ b/engines/lab/special.cpp @@ -92,9 +92,9 @@ static byte *loadBackPict(const char *fileName, bool tomem) { return res; } -/*****************************************************************************/ -/* Does the things to properly set up the detective notes. */ -/*****************************************************************************/ +/** + * Does the things to properly set up the detective notes. + */ void LabEngine::doNotes() { TextFont *noteFont = g_lab->_resource->getFont("P:Note.fon"); char *ntext = g_lab->_resource->getText("Lab:Rooms/Notes"); @@ -107,10 +107,10 @@ void LabEngine::doNotes() { } -/*****************************************************************************/ -/* Does the things to properly set up the old west newspaper. Assumes that */ -/* OpenHiRes already called. */ -/*****************************************************************************/ +/** + * Does the things to properly set up the old west newspaper. Assumes that + * OpenHiRes already called. + */ void LabEngine::doWestPaper() { char *ntext; TextFont *paperFont; @@ -147,9 +147,9 @@ void LabEngine::doWestPaper() { g_lab->_graphics->setPalette(g_lab->_anim->_diffPalette, 256); } -/*****************************************************************************/ -/* Loads in the data for the journal. */ -/*****************************************************************************/ +/** + * Loads in the data for the journal. + */ static bool loadJournalData() { char filename[20]; bool bridge, dirty, news, clean; @@ -223,9 +223,9 @@ static bool loadJournalData() { return true; } -/*****************************************************************************/ -/* Draws the text to the back journal screen to the appropriate Page number */ -/*****************************************************************************/ +/** + * Draws the text to the back journal screen to the appropriate Page number + */ static void drawJournalText() { uint16 DrawingToPage = 1; int32 CharsDrawn = 0L; @@ -261,9 +261,9 @@ static void drawJournalText() { lastpage = lastpage || (*CurText == 0); } -/*****************************************************************************/ -/* Does the turn page wipe. */ -/*****************************************************************************/ +/** + * Does the turn page wipe. + */ static void turnPage(bool FromLeft) { if (FromLeft) { for (int i = 0; i < g_lab->_graphics->_screenWidth; i += 8) { @@ -282,9 +282,9 @@ static void turnPage(bool FromLeft) { } } -/*****************************************************************************/ -/* Draws the journal from page x. */ -/*****************************************************************************/ +/** + * Draws the journal from page x. + */ void LabEngine::drawJournal(uint16 wipenum, bool needFade) { _event->mouseHide(); @@ -326,9 +326,9 @@ void LabEngine::drawJournal(uint16 wipenum, bool needFade) { g_lab->_anim->_noPalChange = false; } -/*****************************************************************************/ -/* Processes user input. */ -/*****************************************************************************/ +/** + * Processes user input. + */ void LabEngine::processJournal() { IntuiMessage *Msg; uint32 Class; @@ -368,9 +368,9 @@ void LabEngine::processJournal() { } } -/*****************************************************************************/ -/* Does the journal processing. */ -/*****************************************************************************/ +/** + * Does the journal processing. + */ void LabEngine::doJournal() { GadgetList journalGadgetList; journalGadgetList.push_back(&BackG); @@ -449,9 +449,9 @@ bool LabEngine::saveRestoreGame() { return isOK; } -/*****************************************************************************/ -/* Draws the text for the monitor. */ -/*****************************************************************************/ +/** + * Draws the text for the monitor. + */ void LabEngine::drawMonText(char *text, TextFont *monitorFont, uint16 x1, uint16 y1, uint16 x2, uint16 y2, bool isinteractive) { uint16 DrawingToPage = 0, yspacing = 0, numlines, fheight; int32 CharsDrawn = 0L; @@ -509,9 +509,9 @@ void LabEngine::drawMonText(char *text, TextFont *monitorFont, uint16 x1, uint16 _event->mouseShow(); } -/*****************************************************************************/ -/* Processes user input. */ -/*****************************************************************************/ +/** + * Processes user input. + */ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isinteractive, uint16 x1, uint16 y1, uint16 x2, uint16 y2) { IntuiMessage *Msg; uint32 Class; @@ -603,9 +603,9 @@ void LabEngine::processMonitor(char *ntext, TextFont *monitorFont, bool isintera } } -/*****************************************************************************/ -/* Does what's necessary for the monitor. */ -/*****************************************************************************/ +/** + * Does what's necessary for the monitor. + */ void LabEngine::doMonitor(char *background, char *textfile, bool isinteractive, uint16 x1, uint16 y1, uint16 x2, uint16 y2) { char *ntext; diff --git a/engines/lab/tilepuzzle.cpp b/engines/lab/tilepuzzle.cpp index 4d95d4c4b5..c6997c5ed2 100644 --- a/engines/lab/tilepuzzle.cpp +++ b/engines/lab/tilepuzzle.cpp @@ -62,9 +62,9 @@ void LabEngine::initTilePuzzle() { _combination[i] = 0; } -/*****************************************************************************/ -/* Processes mouse clicks and changes the combination. */ -/*****************************************************************************/ +/** + * Processes mouse clicks and changes the combination. + */ void LabEngine::mouseTile(Common::Point pos) { Common::Point realPos = _utils->vgaUnscale(pos); @@ -78,9 +78,9 @@ void LabEngine::mouseTile(Common::Point pos) { changeTile(tileX, tileY); } -/*****************************************************************************/ -/* Changes the combination number of one of the slots */ -/*****************************************************************************/ +/** + * Changes the combination number of one of the slots + */ void LabEngine::changeTile(uint16 col, uint16 row) { int16 scrolltype = -1; @@ -147,9 +147,9 @@ void LabEngine::changeTile(uint16 col, uint16 row) { } } -/*****************************************************************************/ -/* Processes mouse clicks and changes the combination. */ -/*****************************************************************************/ +/** + * Processes mouse clicks and changes the combination. + */ void LabEngine::mouseCombination(Common::Point pos) { Common::Point realPos = _utils->vgaUnscale(pos); @@ -173,9 +173,9 @@ void LabEngine::mouseCombination(Common::Point pos) { changeCombination(number); } -/*****************************************************************************/ -/* Draws the images of the combination lock to the display bitmap. */ -/*****************************************************************************/ +/** + * Draws the images of the combination lock to the display bitmap. + */ void LabEngine::doTile(bool showsolution) { uint16 row = 0, col = 0, rowm, colm, num; int16 rows, cols; @@ -215,9 +215,9 @@ void LabEngine::doTile(bool showsolution) { } } -/*****************************************************************************/ -/* Reads in a backdrop picture. */ -/*****************************************************************************/ +/** + * Reads in a backdrop picture. + */ void LabEngine::showTile(const char *filename, bool showsolution) { uint16 start = showsolution ? 0 : 1; @@ -238,9 +238,9 @@ void LabEngine::showTile(const char *filename, bool showsolution) { _graphics->setPalette(_anim->_diffPalette, 256); } -/*****************************************************************************/ -/* Does the scrolling for the tiles on the tile puzzle. */ -/*****************************************************************************/ +/** + * Does the scrolling for the tiles on the tile puzzle. + */ void LabEngine::doTileScroll(uint16 col, uint16 row, uint16 scrolltype) { int16 dX = 0, dY = 0, dx = 0, dy = 0, sx = 0, sy = 0; uint16 last = 0; @@ -278,9 +278,9 @@ void LabEngine::doTileScroll(uint16 col, uint16 row, uint16 scrolltype) { } } -/*****************************************************************************/ -/* Changes the combination number of one of the slots */ -/*****************************************************************************/ +/** + * Changes the combination number of one of the slots + */ void LabEngine::changeCombination(uint16 number) { static const int solution[6] = { 0, 4, 0, 8, 7, 2 }; @@ -328,17 +328,17 @@ void LabEngine::scrollRaster(int16 dx, int16 dy, uint16 x1, uint16 y1, uint16 x2 _graphics->scrollDisplayY(dy, x1, y1, x2, y2); } -/*****************************************************************************/ -/* Draws the images of the combination lock to the display bitmap. */ -/*****************************************************************************/ +/** + * Draws the images of the combination lock to the display bitmap. + */ void LabEngine::doCombination() { for (uint16 i = 0; i <= 5; i++) _numberImages[_combination[i]]->drawImage(_utils->vgaScaleX(COMBINATION_X[i]), _utils->vgaScaleY(65)); } -/*****************************************************************************/ -/* Reads in a backdrop picture. */ -/*****************************************************************************/ +/** + * Reads in a backdrop picture. + */ void LabEngine::showCombination(const char *filename) { _anim->_doBlack = true; _anim->_noPalChange = true; diff --git a/engines/lab/timing.cpp b/engines/lab/timing.cpp index 63a2b946bc..1cbe6d328a 100644 --- a/engines/lab/timing.cpp +++ b/engines/lab/timing.cpp @@ -32,12 +32,11 @@ namespace Lab { -/*****************************************************************************/ -/* Waits for for Secs seconds and Micros microseconds to pass. */ -/*****************************************************************************/ +/** + * Waits for for Secs seconds and Micros microseconds to pass. + */ void LabEngine::microDelay(uint32 secs, uint32 micros) { uint32 waitSecs, waitMicros; - addCurTime(secs, micros, &waitSecs, &waitMicros); while (1) { @@ -50,9 +49,9 @@ void LabEngine::microDelay(uint32 secs, uint32 micros) { } } -/*****************************************************************************/ -/* Gets the current system time. */ -/*****************************************************************************/ +/** + * Gets the current system time. + */ void LabEngine::getTime(uint32 *secs, uint32 *micros) { uint32 t = g_system->getMillis(); @@ -60,9 +59,9 @@ void LabEngine::getTime(uint32 *secs, uint32 *micros) { *micros = t % 1000; } -/*****************************************************************************/ -/* Adds seconds and microseconds to current time to get a new time. */ -/*****************************************************************************/ +/** + * Adds seconds and microseconds to current time to get a new time. + */ void LabEngine::addCurTime(uint32 sec, uint32 micros, uint32 *timeSec, uint32 *timeMicros) { getTime(timeSec, timeMicros); @@ -75,10 +74,10 @@ void LabEngine::addCurTime(uint32 sec, uint32 micros, uint32 *timeSec, uint32 *t } } -/*****************************************************************************/ -/* Finds the difference between time1 and time2. If time1 is later than */ -/* time2, returns 0. */ -/*****************************************************************************/ +/** + * Finds the difference between time1 and time2. If time1 is later than + * time2, returns 0. + */ void LabEngine::anyTimeDiff(uint32 sec1, uint32 micros1, uint32 sec2, uint32 micros2, uint32 *diffSecs, uint32 *diffMicros) { *diffSecs = 0; *diffMicros = 0; @@ -97,22 +96,21 @@ void LabEngine::anyTimeDiff(uint32 sec1, uint32 micros1, uint32 sec2, uint32 mic } } -/*****************************************************************************/ -/* Finds the difference between the current time, and a future time. Returns */ -/* 0 if the future time is actually before the current time. */ -/*****************************************************************************/ +/** + * Finds the difference between the current time, and a future time. Returns + * 0 if the future time is actually before the current time. + */ void LabEngine::timeDiff(uint32 sec, uint32 micros, uint32 *diffSec, uint32 *diffMicros) { uint32 curSec, curMicros; getTime(&curSec, &curMicros); anyTimeDiff(curSec, curMicros, sec, micros, diffSec, diffMicros); } -/*****************************************************************************/ -/* Waits for a specified time to occur. */ -/*****************************************************************************/ +/** + * Waits for a specified time to occur. + */ void LabEngine::waitForTime(uint32 sec, uint32 micros) { uint32 curSec, curMicros; - getTime(&curSec, &curMicros); if (curSec > sec) diff --git a/engines/lab/transitions.cpp b/engines/lab/transitions.cpp index 7090181d32..6f90718eda 100644 --- a/engines/lab/transitions.cpp +++ b/engines/lab/transitions.cpp @@ -34,9 +34,9 @@ namespace Lab { -/*****************************************************************************/ -/* Scrolls the display to black. */ -/*****************************************************************************/ +/** + * Scrolls the display to black. + */ void DisplayMan::doScrollBlack() { byte *tempmem; Image im; @@ -132,9 +132,9 @@ void DisplayMan::copyPage(uint16 width, uint16 height, uint16 nheight, uint16 st } } -/*****************************************************************************/ -/* Scrolls the display to a new picture from a black screen. */ -/*****************************************************************************/ +/** + * Scrolls the display to a new picture from a black screen. + */ void DisplayMan::doScrollWipe(char *filename) { uint16 startline = 0, onrow = 0; @@ -189,9 +189,9 @@ void DisplayMan::doScrollWipe(char *filename) { _vm->_event->mouseShow(); } -/*****************************************************************************/ -/* Does the scroll bounce. Assumes bitmap already in memory. */ -/*****************************************************************************/ +/** + * Does the scroll bounce. Assumes bitmap already in memory. + */ void DisplayMan::doScrollBounce() { const uint16 *newby, *newby1; @@ -235,9 +235,9 @@ void DisplayMan::doScrollBounce() { _vm->_event->mouseShow(); } -/*****************************************************************************/ -/* Does the transporter wipe. */ -/*****************************************************************************/ +/** + * Does the transporter wipe. + */ void DisplayMan::doTransWipe(CloseDataPtr *cPtr, char *filename) { uint16 lastY, curY, linesdone = 0, lineslast; Image imSource, imDest; @@ -318,9 +318,9 @@ void DisplayMan::doTransWipe(CloseDataPtr *cPtr, char *filename) { } // for j } -/*****************************************************************************/ -/* Does a certain number of pre-programmed wipes. */ -/*****************************************************************************/ +/** + * Does a certain number of pre-programmed wipes. + */ void DisplayMan::doTransition(TransitionType transitionType, CloseDataPtr *cPtr, char *filename) { switch (transitionType) { case kTransitionWipe: @@ -348,9 +348,9 @@ void DisplayMan::doTransition(TransitionType transitionType, CloseDataPtr *cPtr, } } -/*****************************************************************************/ -/* Changes the front screen to black. */ -/*****************************************************************************/ +/** + * Changes the front screen to black. + */ void DisplayMan::blackScreen() { byte pal[256 * 3]; memset(pal, 0, 248 * 3); @@ -359,18 +359,18 @@ void DisplayMan::blackScreen() { g_system->delayMillis(32); } -/*****************************************************************************/ -/* Changes the front screen to white. */ -/*****************************************************************************/ +/** + * Changes the front screen to white. + */ void DisplayMan::whiteScreen() { byte pal[256 * 3]; memset(pal, 255, 248 * 3); writeColorRegs(pal, 8, 248); } -/*****************************************************************************/ -/* Changes the entire screen to black. */ -/*****************************************************************************/ +/** + * Changes the entire screen to black. +*/ void DisplayMan::blackAllScreen() { byte pal[256 * 3]; memset(pal, 0, 256 * 3); @@ -379,11 +379,11 @@ void DisplayMan::blackAllScreen() { g_system->delayMillis(32); } -/*****************************************************************************/ -/* Scrolls the display in the x direction by blitting. */ -/* The _tempScrollData variable must be initialized to some memory, or this */ -/* function will fail. */ -/*****************************************************************************/ +/** + * Scrolls the display in the x direction by blitting. + * The _tempScrollData variable must be initialized to some memory, or this + * function will fail. + */ void DisplayMan::scrollDisplayX(int16 dx, uint16 x1, uint16 y1, uint16 x2, uint16 y2) { Image im; @@ -405,9 +405,9 @@ void DisplayMan::scrollDisplayX(int16 dx, uint16 x1, uint16 y1, uint16 x2, uint1 rectFill(x1, y1, x1 + dx - 1, y2); } -/*****************************************************************************/ -/* Scrolls the display in the y direction by blitting. */ -/*****************************************************************************/ +/** + * Scrolls the display in the y direction by blitting. + */ void DisplayMan::scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint16 y2) { Image im; @@ -429,9 +429,9 @@ void DisplayMan::scrollDisplayY(int16 dy, uint16 x1, uint16 y1, uint16 x2, uint1 rectFill(x1, y1, x2, y1 + dy - 1); } -/*****************************************************************************/ -/* Does the fading of the Palette on the screen. */ -/*****************************************************************************/ +/** + * Does the fading of the Palette on the screen. + */ uint16 DisplayMan::fadeNumIn(uint16 num, uint16 res, uint16 counter) { return (num - ((((int32)(15 - counter)) * ((int32)(num - res))) / 15)); } diff --git a/engines/lab/utils.cpp b/engines/lab/utils.cpp index 041a970eff..d5d0734268 100644 --- a/engines/lab/utils.cpp +++ b/engines/lab/utils.cpp @@ -36,10 +36,10 @@ Utils::Utils(LabEngine *vm) : _vm(vm) { _dataBytesPerRow = 0; } -/*****************************************************************************/ -/* Scales the x co-ordinates to that of the new display. In the room parser */ -/* file, co-ordinates are set up on a 360x336 display. */ -/*****************************************************************************/ +/** + * Scales the x co-ordinates to that of the new display. In the room parser + * file, co-ordinates are set up on a 360x336 display. + */ uint16 Utils::scaleX(uint16 x) { if (_vm->_isHiRes) return (uint16)((x * 16) / 9); @@ -47,10 +47,10 @@ uint16 Utils::scaleX(uint16 x) { return (uint16)((x * 8) / 9); } -/*****************************************************************************/ -/* Scales the y co-ordinates to that of the new display. In the room parser */ -/* file, co-ordinates are set up on a 368x336 display. */ -/*****************************************************************************/ +/** + * Scales the y co-ordinates to that of the new display. In the room parser + * file, co-ordinates are set up on a 368x336 display. + */ uint16 Utils::scaleY(uint16 y) { if (_vm->_isHiRes) return (y + (y / 14)); @@ -58,9 +58,9 @@ uint16 Utils::scaleY(uint16 y) { return ((y * 10) / 24); } -/*****************************************************************************/ -/* Scales the VGA coords to SVGA if necessary; otherwise, returns VGA coords.*/ -/*****************************************************************************/ +/** + * Scales the VGA coords to SVGA if necessary; otherwise, returns VGA coords. + */ int16 Utils::vgaScaleX(int16 x) { if (_vm->_isHiRes) return (x * 2); @@ -68,9 +68,9 @@ int16 Utils::vgaScaleX(int16 x) { return x; } -/*****************************************************************************/ -/* Scales the VGA coords to SVGA if necessary; otherwise, returns VGA coords.*/ -/*****************************************************************************/ +/** + * Scales the VGA coords to SVGA if necessary; otherwise, returns VGA coords. + */ int16 Utils::vgaScaleY(int16 y) { if (_vm->_isHiRes) return ((y * 12) / 5); @@ -85,9 +85,9 @@ uint16 Utils::svgaCord(uint16 cord) { return 0; } -/*****************************************************************************/ -/* Converts SVGA coords to VGA if necessary, otherwise returns VGA coords. */ -/*****************************************************************************/ +/** + * Converts SVGA coords to VGA if necessary, otherwise returns VGA coords. + */ Common::Point Utils::vgaUnscale(Common::Point pos) { Common::Point result; if (_vm->_isHiRes) { @@ -100,10 +100,10 @@ Common::Point Utils::vgaUnscale(Common::Point pos) { return result; } -/*****************************************************************************/ -/* Undiffs a piece of memory when header size is a byte, and copy/skip size */ -/* is also a byte. */ -/*****************************************************************************/ +/** + * Undiffs a piece of memory when header size is a byte, and copy/skip size + * is also a byte. + */ void Utils::unDiffByteByte(byte *dest, byte *diff) { uint16 skip, copy; @@ -130,10 +130,10 @@ void Utils::unDiffByteByte(byte *dest, byte *diff) { } } -/*****************************************************************************/ -/* Undiffs a piece of memory when header size is a byte, and copy/skip size */ -/* is a word. */ -/*****************************************************************************/ +/** + * Undiffs a piece of memory when header size is a byte, and copy/skip size + * is a word. + */ void Utils::unDiffByteWord(uint16 *dest, uint16 *diff) { uint16 skip, copy; @@ -186,10 +186,10 @@ void Utils::unDiffByteWord(uint16 *dest, uint16 *diff) { /*------------------------- unDiff Vertical Memory --------------------------*/ -/*****************************************************************************/ -/* Undiffs a piece of memory when header size is a byte, and copy/skip size */ -/* is a byte. */ -/*****************************************************************************/ +/** + * Undiffs a piece of memory when header size is a byte, and copy/skip size + * is a byte. + */ void Utils::VUnDiffByteByte(byte *dest, byte *diff, uint16 bytesPerRow) { byte *curPtr; uint16 skip, copy; @@ -224,10 +224,10 @@ void Utils::VUnDiffByteByte(byte *dest, byte *diff, uint16 bytesPerRow) { } } -/*****************************************************************************/ -/* Undiffs a piece of memory when header size is a byte, and copy/skip size */ -/* is a word. */ -/*****************************************************************************/ +/** + * Undiffs a piece of memory when header size is a byte, and copy/skip size + * is a word. + */ void Utils::VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow) { uint16 *curPtr; uint16 skip, copy; @@ -264,10 +264,10 @@ void Utils::VUnDiffByteWord(uint16 *dest, uint16 *diff, uint16 bytesPerRow) { } } -/*****************************************************************************/ -/* Undiffs a piece of memory when header size is a byte, and copy/skip size */ -/* is a long. */ -/*****************************************************************************/ +/** + * Undiffs a piece of memory when header size is a byte, and copy/skip size + * is a long. + */ void Utils::VUnDiffByteLong(uint32 *dest, uint32 *diff, uint16 bytesPerRow) { uint32 *_curPtr; uint16 skip, copy; @@ -307,9 +307,9 @@ void Utils::VUnDiffByteLong(uint32 *dest, uint32 *diff, uint16 bytesPerRow) { } } -/*****************************************************************************/ -/* Runlength decodes a chunk of memory. */ -/*****************************************************************************/ +/** + * Runlength decodes a chunk of memory. + */ void Utils::runLengthDecode(byte *dest, byte *source) { int8 num; int16 count; @@ -338,9 +338,9 @@ void Utils::runLengthDecode(byte *dest, byte *source) { } } -/*****************************************************************************/ -/* Does a vertical run length decode. */ -/*****************************************************************************/ +/** + * Does a vertical run length decode. + */ void Utils::VRunLengthDecode(byte *dest, byte *source, uint16 bytesPerRow) { int8 num; int16 count; @@ -379,9 +379,9 @@ void Utils::VRunLengthDecode(byte *dest, byte *source, uint16 bytesPerRow) { } } -/*****************************************************************************/ -/* Does the undiffing between the bitmaps. */ -/*****************************************************************************/ +/** + * Does the undiffing between the bitmaps. + */ void Utils::unDiff(byte *newBuf, byte *oldBuf, byte *diffData, uint16 bytesPerRow, bool isV) { diffData++; byte bufType = *diffData; -- cgit v1.2.3