Change doxygen inline comments from "//!" to "///" as proposed on -devel

svn-id: r44802
This commit is contained in:
Max Horn 2009-10-08 21:28:57 +00:00
parent 2ab906bafd
commit 3399c3aeb6
46 changed files with 521 additions and 523 deletions

View File

@ -44,26 +44,26 @@ namespace Common {
* kPathInvalid, kPathIsInvalid, kInvalidPathError * kPathInvalid, kPathIsInvalid, kInvalidPathError
*/ */
enum Error { enum Error {
kNoError = 0, //!< No error occured kNoError = 0, ///< No error occured
kInvalidPathError, //!< Engine initialization: Invalid game path was passed kInvalidPathError, ///< Engine initialization: Invalid game path was passed
kNoGameDataFoundError, //!< Engine initialization: No game data was found in the specified location kNoGameDataFoundError, ///< Engine initialization: No game data was found in the specified location
kUnsupportedGameidError, //!< Engine initialization: Gameid not supported by this (Meta)Engine kUnsupportedGameidError, ///< Engine initialization: Gameid not supported by this (Meta)Engine
kUnsupportedColorMode, //!< Engine initialization: Engine does not support backend's color mode kUnsupportedColorMode, ///< Engine initialization: Engine does not support backend's color mode
kReadPermissionDenied, //!< Unable to read data due to missing read permission kReadPermissionDenied, ///< Unable to read data due to missing read permission
kWritePermissionDenied, //!< Unable to write data due to missing write permission kWritePermissionDenied, ///< Unable to write data due to missing write permission
// The following three overlap a bit with kInvalidPathError and each other. Which to keep? // The following three overlap a bit with kInvalidPathError and each other. Which to keep?
kPathDoesNotExist, //!< The specified path does not exist kPathDoesNotExist, ///< The specified path does not exist
kPathNotDirectory, //!< The specified path does not point to a directory kPathNotDirectory, ///< The specified path does not point to a directory
kPathNotFile, //!< The specified path does not point to a file kPathNotFile, ///< The specified path does not point to a file
kCreatingFileFailed, kCreatingFileFailed,
kReadingFailed, //!< Failed creating a (savestate) file kReadingFailed, ///< Failed creating a (savestate) file
kWritingFailed, //!< Failure to write data -- disk full? kWritingFailed, ///< Failure to write data -- disk full?
kUnknownError //!< Catch-all error, used if no other error code matches kUnknownError ///< Catch-all error, used if no other error code matches
}; };
} // End of namespace Common } // End of namespace Common

View File

@ -217,8 +217,8 @@ class IFFParser {
}; };
protected: protected:
IFFChunkNav _formChunk; //!< The root chunk of the file. IFFChunkNav _formChunk; ///< The root chunk of the file.
IFFChunkNav _chunk; //!< The current chunk. IFFChunkNav _chunk; ///< The current chunk.
uint32 _formSize; uint32 _formSize;
Common::IFF_ID _formType; Common::IFF_ID _formType;

View File

@ -36,8 +36,8 @@ namespace Common {
* Simple class for handling both 2D position and size. * Simple class for handling both 2D position and size.
*/ */
struct Point { struct Point {
int16 x; //!< The horizontal part of the point int16 x; ///< The horizontal part of the point
int16 y; //!< The vertical part of the point int16 y; ///< The vertical part of the point
Point() : x(0), y(0) {} Point() : x(0), y(0) {}
Point(int16 x1, int16 y1) : x(x1), y(y1) {} Point(int16 x1, int16 y1) : x(x1), y(y1) {}
@ -82,8 +82,8 @@ struct Point {
* When writing code using our Rect class, always keep this principle in mind! * When writing code using our Rect class, always keep this principle in mind!
*/ */
struct Rect { struct Rect {
int16 top, left; //!< The point at the top left of the rectangle (part of the rect). int16 top, left; ///< The point at the top left of the rectangle (part of the rect).
int16 bottom, right; //!< The point at the bottom right of the rectangle (not part of the rect). int16 bottom, right; ///< The point at the bottom right of the rectangle (not part of the rect).
Rect() : top(0), left(0), bottom(0), right(0) {} Rect() : top(0), left(0), bottom(0), right(0) {}
Rect(int16 w, int16 h) : top(0), left(0), bottom(h), right(w) {} Rect(int16 w, int16 h) : top(0), left(0), bottom(h), right(w) {}

View File

@ -79,15 +79,15 @@ public:
* @note Uses space, horizontal tab, carriage return, newline, form feed and vertical tab as delimiters by default. * @note Uses space, horizontal tab, carriage return, newline, form feed and vertical tab as delimiters by default.
*/ */
StringTokenizer(const String &str, const String &delimiters = " \t\r\n\f\v"); StringTokenizer(const String &str, const String &delimiters = " \t\r\n\f\v");
void reset(); //!< Resets the tokenizer to its initial state void reset(); ///< Resets the tokenizer to its initial state
bool empty() const; //!< Returns true if there are no more tokens left in the string, false otherwise bool empty() const; ///< Returns true if there are no more tokens left in the string, false otherwise
String nextToken(); //!< Returns the next token from the string (Or an empty string if there are no more tokens) String nextToken(); ///< Returns the next token from the string (Or an empty string if there are no more tokens)
private: private:
const String _str; //!< The string to be tokenized const String _str; ///< The string to be tokenized
const String _delimiters; //!< String containing all the delimiter characters const String _delimiters; ///< String containing all the delimiter characters
uint _tokenBegin; //!< Latest found token's begin (Valid after a call to nextToken(), zero otherwise) uint _tokenBegin; ///< Latest found token's begin (Valid after a call to nextToken(), zero otherwise)
uint _tokenEnd; //!< Latest found token's end (Valid after a call to nextToken(), zero otherwise) uint _tokenEnd; ///< Latest found token's end (Valid after a call to nextToken(), zero otherwise)
}; };
/** /**

View File

@ -189,8 +189,8 @@ private:
Cine::Palette::Color saturatedAddColor(Cine::Palette::Color baseColor, signed r, signed g, signed b) const; Cine::Palette::Color saturatedAddColor(Cine::Palette::Color baseColor, signed r, signed g, signed b) const;
private: private:
Graphics::PixelFormat _format; //!< The used source color format Graphics::PixelFormat _format; ///< The used source color format
Common::Array<Color> _colors; //!< The actual palette data Common::Array<Color> _colors; ///< The actual palette data
}; };
} // End of namespace Cine } // End of namespace Cine

View File

@ -99,17 +99,17 @@ private:
*/ */
void copyRelocatedBytes(uint offset, uint numBytes); void copyRelocatedBytes(uint offset, uint numBytes);
private: private:
uint32 _crc; //!< Error-detecting code (This should be zero after successful unpacking) uint32 _crc; ///< Error-detecting code (This should be zero after successful unpacking)
uint32 _chunk32b; //!< The current internal 32-bit chunk of source data uint32 _chunk32b; ///< The current internal 32-bit chunk of source data
byte *_dst; //!< Pointer to the current position in the destination buffer byte *_dst; ///< Pointer to the current position in the destination buffer
const byte *_src; //!< Pointer to the current position in the source buffer const byte *_src; ///< Pointer to the current position in the source buffer
// These are used for detecting errors (e.g. out of bounds issues) during unpacking // These are used for detecting errors (e.g. out of bounds issues) during unpacking
bool _error; //!< Did an error occur during unpacking? bool _error; ///< Did an error occur during unpacking?
const byte *_srcBegin; //!< Source buffer's beginning const byte *_srcBegin; ///< Source buffer's beginning
const byte *_srcEnd; //!< Source buffer's end const byte *_srcEnd; ///< Source buffer's end
byte *_dstBegin; //!< Destination buffer's beginning byte *_dstBegin; ///< Destination buffer's beginning
byte *_dstEnd; //!< Destination buffer's end byte *_dstEnd; ///< Destination buffer's end
}; };
} // End of namespace Cine } // End of namespace Cine

View File

@ -123,7 +123,7 @@ CommandeType objectListCommand[20];
int16 objListTab[20]; int16 objListTab[20];
Common::Array<uint16> zoneData; Common::Array<uint16> zoneData;
Common::Array<uint16> zoneQuery; //!< Only exists in Operation Stealth Common::Array<uint16> zoneQuery; ///< Only exists in Operation Stealth
/*! \brief Move the player character using the keyboard /*! \brief Move the player character using the keyboard
* \param x Negative values move left, positive right, zero not at all * \param x Negative values move left, positive right, zero not at all

View File

@ -34,12 +34,12 @@ namespace Draci {
* Represents individual files inside the archive. * Represents individual files inside the archive.
*/ */
struct BAFile { struct BAFile {
uint _compLength; //!< Compressed length (the same as _length if the file is uncompressed) uint _compLength; ///< Compressed length (the same as _length if the file is uncompressed)
uint _length; //!< Uncompressed length uint _length; ///< Uncompressed length
uint32 _offset; //!< Offset of file inside archive uint32 _offset; ///< Offset of file inside archive
byte *_data; byte *_data;
byte _crc; byte _crc;
byte _stopper; //!< Not used in BAR files, needed for DFW byte _stopper; ///< Not used in BAR files, needed for DFW
/** Releases the file data (for memory considerations) */ /** Releases the file data (for memory considerations) */
void close(void) { void close(void) {
@ -82,11 +82,11 @@ private:
// File stream header data // File stream header data
static const uint _fileHeaderSize = 6; static const uint _fileHeaderSize = 6;
Common::String _path; //!< Path to file Common::String _path; ///< Path to file
BAFile *_files; //!< Internal array of files BAFile *_files; ///< Internal array of files
uint _fileCount; //!< Number of files in archive uint _fileCount; ///< Number of files in archive
bool _isDFW; //!< True if the archive is in DFW format, false otherwise bool _isDFW; ///< True if the archive is in DFW format, false otherwise
bool _opened; //!< True if the archive is opened, false otherwise bool _opened; ///< True if the archive is opened, false otherwise
void openDFW(const Common::String &path); void openDFW(const Common::String &path);
BAFile *loadFileDFW(uint i) const; BAFile *loadFileDFW(uint i) const;

View File

@ -90,8 +90,8 @@ enum InventoryConstants {
kInventoryItemHeight = 25, kInventoryItemHeight = 25,
kInventoryColumns = 7, kInventoryColumns = 7,
kInventoryLines = 5, kInventoryLines = 5,
kInventoryX = 70, //!< Used for positioning of the inventory sprite on the X axis kInventoryX = 70, ///< Used for positioning of the inventory sprite on the X axis
kInventoryY = 30, //!< Used for positioning of the inventory sprite on the Y axis kInventoryY = 30, ///< Used for positioning of the inventory sprite on the Y axis
kInventorySlots = kInventoryLines * kInventoryColumns kInventorySlots = kInventoryLines * kInventoryColumns
}; };
@ -398,7 +398,7 @@ private:
int _oldObjUnderCursor; int _oldObjUnderCursor;
int _animUnderCursor; int _animUnderCursor;
int _markedAnimationIndex; //!< Used by the Mark GPL command int _markedAnimationIndex; ///< Used by the Mark GPL command
int _scheduledPalette; int _scheduledPalette;
}; };

View File

@ -74,11 +74,11 @@ public:
virtual DrawableType getType() const = 0; virtual DrawableType getType() const = 0;
protected: protected:
uint _width; //!< Width of the sprite uint _width; ///< Width of the sprite
uint _height; //!< Height of the sprite uint _height; ///< Height of the sprite
uint _scaledWidth; //!< Scaled width of the sprite uint _scaledWidth; ///< Scaled width of the sprite
uint _scaledHeight; //!< Scaled height of the sprite uint _scaledHeight; ///< Scaled height of the sprite
int _x, _y; //!< Sprite coordinates int _x, _y; ///< Sprite coordinates
/** The time a drawable should stay on the screen /** The time a drawable should stay on the screen
* before being replaced by another or deleted * before being replaced by another or deleted
@ -120,7 +120,7 @@ public:
DrawableType getType() const { return kDrawableSprite; } DrawableType getType() const { return kDrawableSprite; }
private: private:
const byte *_data; //!< Pointer to a buffer containing raw sprite data (row-wise) const byte *_data; ///< Pointer to a buffer containing raw sprite data (row-wise)
bool _mirror; bool _mirror;
}; };

View File

@ -60,7 +60,7 @@ private:
*/ */
bool _fullUpdate; bool _fullUpdate;
Common::List<Common::Rect> _dirtyRects; //!< List of currently dirty rectangles Common::List<Common::Rect> _dirtyRects; ///< List of currently dirty rectangles
}; };

View File

@ -38,10 +38,10 @@ class SaveLoad {
public: public:
/** How to handle the specific save. */ /** How to handle the specific save. */
enum SaveMode { enum SaveMode {
kSaveModeNone, //!< Don't handle it kSaveModeNone, ///< Don't handle it
kSaveModeIgnore, //!< Ignore it kSaveModeIgnore, ///< Ignore it
kSaveModeExists, //!< Just claim it exists kSaveModeExists, ///< Just claim it exists
kSaveModeSave //!< A normal save kSaveModeSave ///< A normal save
}; };
/** The constructor. /** The constructor.
@ -146,8 +146,8 @@ public:
static const uint32 kIndexSize = kSlotCount * kSlotNameLength; static const uint32 kIndexSize = kSlotCount * kSlotNameLength;
enum ScreenshotType { enum ScreenshotType {
kScreenshotTypeGob3, //!< Goblins 3 type screenshot kScreenshotTypeGob3, ///< Goblins 3 type screenshot
kScreenshotTypeLost //!< Lost in Time type screenshot kScreenshotTypeLost ///< Lost in Time type screenshot
}; };
SaveLoad_v3(GobEngine *vm, const char *targetName, ScreenshotType sShotType); SaveLoad_v3(GobEngine *vm, const char *targetName, ScreenshotType sShotType);

View File

@ -87,41 +87,41 @@ private:
void animatePersonPrepare(const MovePersonData *mpd, int direction); void animatePersonPrepare(const MovePersonData *mpd, int direction);
void animatePerson(const MovePersonData *mpd, uint16 image, uint16 bobNum, uint16 bankNum, int direction); void animatePerson(const MovePersonData *mpd, uint16 image, uint16 bobNum, uint16 bankNum, int direction);
//! compute transition coordinate /// compute transition coordinate
static int16 calcC(int16 c1, int16 c2, int16 c3, int16 c4, int16 lastc); static int16 calcC(int16 c1, int16 c2, int16 c3, int16 c4, int16 lastc);
//! find area for position /// find area for position
int16 findAreaPosition(int16 *x, int16 *y, bool recalibrate); int16 findAreaPosition(int16 *x, int16 *y, bool recalibrate);
//! find an area not already struck /// find an area not already struck
uint16 findFreeArea(uint16 area) const; uint16 findFreeArea(uint16 area) const;
//! return true if the area is already on the walking path /// return true if the area is already on the walking path
bool isAreaStruck(uint16 area) const; bool isAreaStruck(uint16 area) const;
//! calculates the path list from oldArea to newArea /// calculates the path list from oldArea to newArea
bool calcPath(uint16 oldArea, uint16 newArea); bool calcPath(uint16 oldArea, uint16 newArea);
//! resets path computed in calcPath() /// resets path computed in calcPath()
void initWalkData(); void initWalkData();
//! add an area to the path /// add an area to the path
void incWalkData(int16 px, int16 py, int16 x, int16 y, uint16 area); void incWalkData(int16 px, int16 py, int16 x, int16 y, uint16 area);
//! compute path (and populates _walkData) from current position to the new one /// compute path (and populates _walkData) from current position to the new one
bool calc(uint16 oldPos, uint16 newPos, int16 oldx, int16 oldy, int16 x, int16 y); bool calc(uint16 oldPos, uint16 newPos, int16 oldx, int16 oldy, int16 x, int16 y);
//! areas for current room /// areas for current room
const Area *_roomArea; const Area *_roomArea;
//! number of areas for current room /// number of areas for current room
uint16 _roomAreaCount; uint16 _roomAreaCount;
//! walking steps /// walking steps
WalkData _walkData[MAX_WALK_DATA]; WalkData _walkData[MAX_WALK_DATA];
//! number of walking steps /// number of walking steps
uint16 _walkDataCount; uint16 _walkDataCount;
uint16 _areaStrike[MAX_WALK_DATA]; uint16 _areaStrike[MAX_WALK_DATA];
@ -130,15 +130,15 @@ private:
uint16 _areaList[MAX_WALK_DATA]; uint16 _areaList[MAX_WALK_DATA];
uint16 _areaListCount; uint16 _areaListCount;
//! set if stopJoe() is called /// set if stopJoe() is called
bool _joeInterrupted; bool _joeInterrupted;
//! set if handleSpecialArea() is called /// set if handleSpecialArea() is called
bool _joeMoveBlock; bool _joeMoveBlock;
QueenEngine *_vm; QueenEngine *_vm;
//! persons walking animation data /// persons walking animation data
static const MovePersonData _moveData[]; static const MovePersonData _moveData[];
}; };

View File

@ -108,12 +108,12 @@ protected:
return (_dwWrote == _szUnpacked) && (_dwRead >= _szPacked); return (_dwWrote == _szUnpacked) && (_dwRead >= _szPacked);
} }
uint32 _dwBits; //!< bits buffer uint32 _dwBits; ///< bits buffer
byte _nBits; //!< number of unread bits in _dwBits byte _nBits; ///< number of unread bits in _dwBits
uint32 _szPacked; //!< size of the compressed data uint32 _szPacked; ///< size of the compressed data
uint32 _szUnpacked; //!< size of the decompressed data uint32 _szUnpacked; ///< size of the decompressed data
uint32 _dwRead; //!< number of bytes read from _src uint32 _dwRead; ///< number of bytes read from _src
uint32 _dwWrote; //!< number of bytes written to _dest uint32 _dwWrote; ///< number of bytes written to _dest
Common::ReadStream *_src; Common::ReadStream *_src;
byte *_dest; byte *_dest;
}; };

View File

@ -30,17 +30,15 @@
#include "sci/engine/vm.h" #include "sci/engine/vm.h"
#include "sci/engine/vm_types.h" // for reg_t #include "sci/engine/vm_types.h" // for reg_t
//#include "common/util.h"
namespace Sci { namespace Sci {
struct SegmentRef { struct SegmentRef {
bool isRaw; ///! true if data is raw, false if it is a reg_t sequence bool isRaw; ///< true if data is raw, false if it is a reg_t sequence
union { union {
byte *raw; byte *raw;
reg_t *reg; reg_t *reg;
}; };
int maxSize; ///! number of available bytes int maxSize; ///< number of available bytes
// TODO: Add this? // TODO: Add this?
//reg_t pointer; // Original pointer //reg_t pointer; // Original pointer

View File

@ -78,9 +78,9 @@ struct gfx_bitmap_font_t {
* SCI0, SCI01 and SCI1 all use the same font format. * SCI0, SCI01 and SCI1 all use the same font format.
*/ */
enum fontFlags { enum fontFlags {
kFontCountWhitespace = 1 << 0, //!< In SQ3, whitespace is included in text size kFontCountWhitespace = 1 << 0, ///< In SQ3, whitespace is included in text size
kFontNoNewlines = 1 << 1, //!< Don't treat newline characters kFontNoNewlines = 1 << 1, ///< Don't treat newline characters
kFontIgnoreLF = 1 << 2 //!< Interpret CR LF sequences as a single newline, rather than two kFontIgnoreLF = 1 << 2 ///< Interpret CR LF sequences as a single newline, rather than two
}; };
/** /**

View File

@ -38,8 +38,8 @@ class Menu;
* Flags for windows in SCI0. * Flags for windows in SCI0.
*/ */
enum windowFlags { enum windowFlags {
kWindowTransparent = 0x01, //!< 0000 0001 kWindowTransparent = 0x01, ///< 0000 0001
kWindowNoFrame = 0x02, //!< 0000 0010 - a window without a frame kWindowNoFrame = 0x02, ///< 0000 0010 - a window without a frame
kWindowTitle = 0x04, /** kWindowTitle = 0x04, /**
* 0000 0100 - Add title bar to * 0000 0100 - Add title bar to
* window (10 pixels high, framed, * window (10 pixels high, framed,
@ -47,17 +47,17 @@ enum windowFlags {
* white on dark gray), bits 3-6 * white on dark gray), bits 3-6
* are unused * are unused
*/ */
kWindowDontDraw = 0x80, //!< 1000 0000 - don't draw anything kWindowDontDraw = 0x80, ///< 1000 0000 - don't draw anything
kWindowNoDropShadow = 0x1000000, //!< 0001 0000 0000 0000 0000 0000 0000 (not in SCI) kWindowNoDropShadow = 0x1000000, ///< 0001 0000 0000 0000 0000 0000 0000 (not in SCI)
kWindowAutoRestore = 0x2000000 kWindowAutoRestore = 0x2000000
}; };
/** Button and frame control flags. */ /** Button and frame control flags. */
enum controlStateFlags { enum controlStateFlags {
kControlStateEnabled = 0x0001, //!< 0001 - enabled buttons (used by the interpreter) kControlStateEnabled = 0x0001, ///< 0001 - enabled buttons (used by the interpreter)
kControlStateDisabled = 0x0004, //!< 0010 - grayed out buttons (used by the interpreter) kControlStateDisabled = 0x0004, ///< 0010 - grayed out buttons (used by the interpreter)
kControlStateFramed = 0x0008, //!< 1000 - widgets surrounded by a frame (used by the interpreter) kControlStateFramed = 0x0008, ///< 1000 - widgets surrounded by a frame (used by the interpreter)
kControlStateDitherFramed = 0x1000 //!< 0001 0000 0000 0000 - widgets surrounded by a dithered frame (used in kgraphics) kControlStateDitherFramed = 0x1000 ///< 0001 0000 0000 0000 - widgets surrounded by a dithered frame (used in kgraphics)
}; };
/** /**

View File

@ -282,14 +282,14 @@ protected:
ViewType _viewType; // Used to determine if the game has EGA or VGA graphics ViewType _viewType; // Used to determine if the game has EGA or VGA graphics
Common::List<ResourceSource *> _sources; Common::List<ResourceSource *> _sources;
int _memoryLocked; //!< Amount of resource bytes in locked memory int _memoryLocked; ///< Amount of resource bytes in locked memory
int _memoryLRU; //!< Amount of resource bytes under LRU control int _memoryLRU; ///< Amount of resource bytes under LRU control
Common::List<Resource *> _LRU; //!< Last Resource Used list Common::List<Resource *> _LRU; ///< Last Resource Used list
ResourceMap _resMap; ResourceMap _resMap;
Common::List<Common::File *> _volumeFiles; //!< list of opened volume files Common::List<Common::File *> _volumeFiles; ///< list of opened volume files
ResourceSource *_audioMapSCI1; //!< Currently loaded audio map for SCI1 ResourceSource *_audioMapSCI1; ///< Currently loaded audio map for SCI1
ResVersion _volVersion; //!< RESOURCE.0xx version ResVersion _volVersion; ///< RESOURCE.0xx version
ResVersion _mapVersion; //!< RESOURCE.MAP version ResVersion _mapVersion; ///< RESOURCE.MAP version
/** /**
* Initializes the resource manager * Initializes the resource manager

View File

@ -38,20 +38,20 @@ namespace Sci {
enum { enum {
SI_STATE_UNINITIALISED = -1, SI_STATE_UNINITIALISED = -1,
SI_STATE_DELTA_TIME = 0, //!< Now at a delta time SI_STATE_DELTA_TIME = 0, ///< Now at a delta time
SI_STATE_COMMAND = 1, //!< Now at a MIDI operation SI_STATE_COMMAND = 1, ///< Now at a MIDI operation
SI_STATE_PENDING = 2, //!< Pending for loop SI_STATE_PENDING = 2, ///< Pending for loop
SI_STATE_FINISHED = 3, //!< End of song SI_STATE_FINISHED = 3, ///< End of song
SI_STATE_PCM = 4, //!< Should report a PCM next (-> DELTA_TIME) SI_STATE_PCM = 4, ///< Should report a PCM next (-> DELTA_TIME)
SI_STATE_PCM_MAGIC_DELTA = 5 //!< Should report a ``magic'' one tick delta time next (goes on to FINISHED) SI_STATE_PCM_MAGIC_DELTA = 5 ///< Should report a ``magic'' one tick delta time next (goes on to FINISHED)
}; };
struct SongIteratorChannel { struct SongIteratorChannel {
int state; //!< State of this song iterator channel int state; ///< State of this song iterator channel
int offset; //!< Offset into the data chunk */ int offset; ///< Offset into the data chunk */
int end; //!< Last allowed byte in track */ int end; ///< Last allowed byte in track */
int id; //!< Some channel ID */ int id; ///< Some channel ID */
/** /**
* Number of ticks before the specified channel is next used, or * Number of ticks before the specified channel is next used, or
@ -64,14 +64,14 @@ struct SongIteratorChannel {
int loop_offset; int loop_offset;
int initial_offset; int initial_offset;
int playmask; //!< Active playmask (MIDI channels to play in here) */ int playmask; ///< Active playmask (MIDI channels to play in here) */
int notes_played; //!< #of notes played since the last loop start */ int notes_played; ///< #of notes played since the last loop start */
int loop_timepos; //!< Total delay for this channel's loop marker */ int loop_timepos; ///< Total delay for this channel's loop marker */
int total_timepos; //!< Number of ticks since the beginning, ignoring loops */ int total_timepos; ///< Number of ticks since the beginning, ignoring loops */
int timepos_increment; //!< Number of ticks until the next command (to add) */ int timepos_increment; ///< Number of ticks until the next command (to add) */
int saw_notes; //!< Bitmask of channels we have currently played notes on */ int saw_notes; ///< Bitmask of channels we have currently played notes on */
byte last_cmd; //!< Last operation executed, for running status */ byte last_cmd; ///< Last operation executed, for running status */
public: public:
void init(int id, int offset, int end); void init(int id, int offset, int end);
@ -80,17 +80,17 @@ public:
class BaseSongIterator : public SongIterator { class BaseSongIterator : public SongIterator {
public: public:
int _polyphony[MIDI_CHANNELS]; //!< # of simultaneous notes on each int _polyphony[MIDI_CHANNELS]; ///< # of simultaneous notes on each
int _importance[MIDI_CHANNELS]; //!< priority rating for each channel, 0 means unrated. int _importance[MIDI_CHANNELS]; ///< priority rating for each channel, 0 means unrated.
int _ccc; //!< Cumulative cue counter, for those who need it int _ccc; ///< Cumulative cue counter, for those who need it
byte _resetflag; //!< for 0x4C -- on DoSound StopSound, do we return to start? byte _resetflag; ///< for 0x4C -- on DoSound StopSound, do we return to start?
int _deviceId; //!< ID of the device we generating events for int _deviceId; ///< ID of the device we generating events for
int _numActiveChannels; //!< Number of active channels int _numActiveChannels; ///< Number of active channels
Common::Array<byte> _data; //!< Song data Common::Array<byte> _data; ///< Song data
int _loops; //!< Number of loops remaining int _loops; ///< Number of loops remaining
public: public:
BaseSongIterator(byte *data, uint size, songit_id_t id); BaseSongIterator(byte *data, uint size, songit_id_t id);

View File

@ -36,13 +36,13 @@ namespace Scumm {
class SmushChannel { class SmushChannel {
protected: protected:
int32 _track; //!< the track number int32 _track; ///< the track number
byte *_tbuffer; //!< data temporary buffer byte *_tbuffer; ///< data temporary buffer
int32 _tbufferSize; //!< temporary buffer size int32 _tbufferSize; ///< temporary buffer size
byte *_sbuffer; //!< sound buffer byte *_sbuffer; ///< sound buffer
int32 _sbufferSize; //!< sound buffer size int32 _sbufferSize; ///< sound buffer size
int32 _dataSize; //!< remaining size of sound data in the iMUS buffer int32 _dataSize; ///< remaining size of sound data in the iMUS buffer
bool _inData; bool _inData;
@ -100,9 +100,9 @@ class ImuseChannel : public SmushChannel {
private: private:
int32 _srbufferSize; int32 _srbufferSize;
int32 _bitsize; //!< the bitsize of the original data int32 _bitsize; ///< the bitsize of the original data
int32 _rate; //!< the sampling rate of the original data int32 _rate; ///< the sampling rate of the original data
int32 _channels; //!< the number of channels of the original data int32 _channels; ///< the number of channels of the original data
protected: protected:
void decode(); void decode();

View File

@ -56,9 +56,9 @@ namespace Tinsel {
/** actor struct - one per actor */ /** actor struct - one per actor */
struct T1_ACTOR_STRUC { struct T1_ACTOR_STRUC {
int32 masking; //!< type of actor masking int32 masking; ///< type of actor masking
SCNHANDLE hActorId; //!< handle actor ID string index SCNHANDLE hActorId; ///< handle actor ID string index
SCNHANDLE hActorCode; //!< handle to actor script SCNHANDLE hActorCode; ///< handle to actor script
} PACKED_STRUCT; } PACKED_STRUCT;
struct T2_ACTOR_STRUC { struct T2_ACTOR_STRUC {

View File

@ -145,8 +145,8 @@ struct SAVED_ACTOR {
short zFactor; short zFactor;
bool bAlive; bool bAlive;
bool bHidden; bool bHidden;
SCNHANDLE presFilm; //!< the film that reel belongs to SCNHANDLE presFilm; ///< the film that reel belongs to
short presRnum; //!< the present reel number short presRnum; ///< the present reel number
short presPlayX, presPlayY; short presPlayX, presPlayY;
}; };
typedef SAVED_ACTOR *PSAVED_ACTOR; typedef SAVED_ACTOR *PSAVED_ACTOR;

View File

@ -35,11 +35,11 @@ struct OBJECT;
/** animation structure */ /** animation structure */
struct ANIM { struct ANIM {
int aniRate; //!< animation speed int aniRate; ///< animation speed
int aniDelta; //!< animation speed delta counter int aniDelta; ///< animation speed delta counter
OBJECT *pObject; //!< object to animate (assumed to be multi-part) OBJECT *pObject; ///< object to animate (assumed to be multi-part)
uint32 hScript; //!< animation script handle uint32 hScript; ///< animation script handle
int scriptIndex; //!< current position in animation script int scriptIndex; ///< current position in animation script
}; };
typedef ANIM *PANIM; typedef ANIM *PANIM;
@ -47,25 +47,25 @@ typedef void (*PANI_ADDR)(struct ANIM *);
/** Animation script commands */ /** Animation script commands */
enum { enum {
ANI_END = 0, //!< end of animation script ANI_END = 0, ///< end of animation script
ANI_JUMP = 1, //!< animation script jump ANI_JUMP = 1, ///< animation script jump
ANI_HFLIP = 2, //!< flip animated object horizontally ANI_HFLIP = 2, ///< flip animated object horizontally
ANI_VFLIP = 3, //!< flip animated object vertically ANI_VFLIP = 3, ///< flip animated object vertically
ANI_HVFLIP = 4, //!< flip animated object in both directions ANI_HVFLIP = 4, ///< flip animated object in both directions
ANI_ADJUSTX = 5, //!< adjust animated object x animation point ANI_ADJUSTX = 5, ///< adjust animated object x animation point
ANI_ADJUSTY = 6, //!< adjust animated object y animation point ANI_ADJUSTY = 6, ///< adjust animated object y animation point
ANI_ADJUSTXY = 7, //!< adjust animated object x & y animation points ANI_ADJUSTXY = 7, ///< adjust animated object x & y animation points
ANI_NOSLEEP = 8, //!< do not sleep for this frame ANI_NOSLEEP = 8, ///< do not sleep for this frame
ANI_CALL = 9, //!< call routine ANI_CALL = 9, ///< call routine
ANI_HIDE = 10, //!< hide animated object ANI_HIDE = 10, ///< hide animated object
ANI_STOP = 11 //!< stop sound ANI_STOP = 11 ///< stop sound
}; };
/** animation script command possibilities */ /** animation script command possibilities */
union ANI_SCRIPT { union ANI_SCRIPT {
int32 op; //!< treat as an opcode or operand int32 op; ///< treat as an opcode or operand
uint32 hFrame; //!< treat as a animation frame handle uint32 hFrame; ///< treat as a animation frame handle
// PANI_ADDR pFunc; //!< treat as a animation function call // PANI_ADDR pFunc; ///< treat as a animation function call
}; };

View File

@ -49,26 +49,26 @@ enum {
/** background playfield structure - a playfield is a container for modules */ /** background playfield structure - a playfield is a container for modules */
struct PLAYFIELD { struct PLAYFIELD {
OBJECT *pDispList; //!< object display list for this playfield OBJECT *pDispList; ///< object display list for this playfield
frac_t fieldX; //!< current world x position of playfield frac_t fieldX; ///< current world x position of playfield
frac_t fieldY; //!< current world y position of playfield frac_t fieldY; ///< current world y position of playfield
frac_t fieldXvel; //!< current x velocity of playfield frac_t fieldXvel; ///< current x velocity of playfield
frac_t fieldYvel; //!< current y velocity of playfield frac_t fieldYvel; ///< current y velocity of playfield
Common::Rect rcClip; //!< clip rectangle for this playfield Common::Rect rcClip; ///< clip rectangle for this playfield
bool bMoved; //!< set when playfield has moved bool bMoved; ///< set when playfield has moved
}; };
/** multi-playfield background structure - a backgnd is a container of playfields */ /** multi-playfield background structure - a backgnd is a container of playfields */
struct BACKGND { struct BACKGND {
COLORREF rgbSkyColour; //!< background sky colour COLORREF rgbSkyColour; ///< background sky colour
Common::Point ptInitWorld; //!< initial world position Common::Point ptInitWorld; ///< initial world position
Common::Rect rcScrollLimits; //!< scroll limits Common::Rect rcScrollLimits; ///< scroll limits
int refreshRate; //!< background update process refresh rate int refreshRate; ///< background update process refresh rate
frac_t *pXscrollTable; //!< pointer to x direction scroll table for this background frac_t *pXscrollTable; ///< pointer to x direction scroll table for this background
frac_t *pYscrollTable; //!< pointer to y direction scroll table for this background frac_t *pYscrollTable; ///< pointer to y direction scroll table for this background
int numPlayfields; //!< number of playfields for this background int numPlayfields; ///< number of playfields for this background
PLAYFIELD *fieldArray; //!< pointer to array of all playfields for this background PLAYFIELD *fieldArray; ///< pointer to array of all playfields for this background
bool bAutoErase; //!< when set - screen is cleared before anything is plotted (unused) bool bAutoErase; ///< when set - screen is cleared before anything is plotted (unused)
}; };

View File

@ -507,16 +507,16 @@ static bool bRemember;
enum BTYPE { enum BTYPE {
RGROUP, //!< Radio button group - 1 is selectable at a time. Action on double click RGROUP, ///< Radio button group - 1 is selectable at a time. Action on double click
ARSBUT, //!< Action if a radio button is selected ARSBUT, ///< Action if a radio button is selected
AABUT, //!< Action always AABUT, ///< Action always
AATBUT, //!< Action always, text box AATBUT, ///< Action always, text box
ARSGBUT, ARSGBUT,
AAGBUT, //!< Action always, graphic button AAGBUT, ///< Action always, graphic button
SLIDER, //!< Not a button at all SLIDER, ///< Not a button at all
TOGGLE, //!< Discworld 1 toggle TOGGLE, ///< Discworld 1 toggle
TOGGLE1, //!< Discworld 2 toggle type 1 TOGGLE1, ///< Discworld 2 toggle type 1
TOGGLE2, //!< Discworld 2 toggle type 2 TOGGLE2, ///< Discworld 2 toggle type 2
DCTEST, DCTEST,
FLIP, FLIP,
FRGROUP, FRGROUP,

View File

@ -58,25 +58,25 @@ bool bLockedScene = 0;
//----------------- LOCAL DEFINES -------------------- //----------------- LOCAL DEFINES --------------------
struct MEMHANDLE { struct MEMHANDLE {
char szName[12]; //!< 00 - file name of graphics file char szName[12]; ///< 00 - file name of graphics file
int32 filesize; //!< 12 - file size and flags int32 filesize; ///< 12 - file size and flags
MEM_NODE *pNode; //!< 16 - memory node for the graphics MEM_NODE *pNode; ///< 16 - memory node for the graphics
uint32 flags2; uint32 flags2;
}; };
/** memory allocation flags - stored in the top bits of the filesize field */ /** memory allocation flags - stored in the top bits of the filesize field */
enum { enum {
fPreload = 0x01000000L, //!< preload memory fPreload = 0x01000000L, ///< preload memory
fDiscard = 0x02000000L, //!< discard memory fDiscard = 0x02000000L, ///< discard memory
fSound = 0x04000000L, //!< sound data fSound = 0x04000000L, ///< sound data
fGraphic = 0x08000000L, //!< graphic data fGraphic = 0x08000000L, ///< graphic data
fCompressed = 0x10000000L, //!< compressed data fCompressed = 0x10000000L, ///< compressed data
fLoaded = 0x20000000L //!< set when file data has been loaded fLoaded = 0x20000000L ///< set when file data has been loaded
}; };
#define FSIZE_MASK 0x00FFFFFFL //!< mask to isolate the filesize #define FSIZE_MASK 0x00FFFFFFL ///< mask to isolate the filesize
#define MALLOC_MASK 0xFF000000L //!< mask to isolate the memory allocation flags #define MALLOC_MASK 0xFF000000L ///< mask to isolate the memory allocation flags
//#define HANDLEMASK 0xFF800000L //!< get handle of address //#define HANDLEMASK 0xFF800000L ///< get handle of address
//----------------- LOCAL GLOBAL DATA -------------------- //----------------- LOCAL GLOBAL DATA --------------------

View File

@ -40,13 +40,13 @@ struct OBJECT;
* multi-object initialisation structure (parallels OBJ_INIT struct) * multi-object initialisation structure (parallels OBJ_INIT struct)
*/ */
struct MULTI_INIT { struct MULTI_INIT {
SCNHANDLE hMulFrame; //!< multi-objects shape - NULL terminated list of IMAGE structures SCNHANDLE hMulFrame; ///< multi-objects shape - NULL terminated list of IMAGE structures
int32 mulFlags; //!< multi-objects flags int32 mulFlags; ///< multi-objects flags
int32 mulID; //!< multi-objects id int32 mulID; ///< multi-objects id
int32 mulX; //!< multi-objects initial x ani position int32 mulX; ///< multi-objects initial x ani position
int32 mulY; //!< multi-objects initial y ani position int32 mulY; ///< multi-objects initial y ani position
int32 mulZ; //!< multi-objects initial z position int32 mulZ; ///< multi-objects initial z position
uint32 otherFlags; //!< multi-objects Tinsel 2 - other flags uint32 otherFlags; ///< multi-objects Tinsel 2 - other flags
} PACKED_STRUCT; } PACKED_STRUCT;
typedef MULTI_INIT *PMULTI_INIT; typedef MULTI_INIT *PMULTI_INIT;

View File

@ -40,17 +40,17 @@ enum {
NUM_OBJECTS = 256, NUM_OBJECTS = 256,
// object flags // object flags
DMA_WNZ = 0x0001, //!< write non-zero data DMA_WNZ = 0x0001, ///< write non-zero data
DMA_CNZ = 0x0002, //!< write constant on non-zero data DMA_CNZ = 0x0002, ///< write constant on non-zero data
DMA_CONST = 0x0004, //!< write constant on both zero & non-zero data DMA_CONST = 0x0004, ///< write constant on both zero & non-zero data
DMA_WA = 0x0008, //!< write all data DMA_WA = 0x0008, ///< write all data
DMA_FLIPH = 0x0010, //!< flip object horizontally DMA_FLIPH = 0x0010, ///< flip object horizontally
DMA_FLIPV = 0x0020, //!< flip object vertically DMA_FLIPV = 0x0020, ///< flip object vertically
DMA_CLIP = 0x0040, //!< clip object DMA_CLIP = 0x0040, ///< clip object
DMA_TRANS = 0x0084, //!< translucent rectangle object DMA_TRANS = 0x0084, ///< translucent rectangle object
DMA_ABS = 0x0100, //!< position of object is absolute DMA_ABS = 0x0100, ///< position of object is absolute
DMA_CHANGED = 0x0200, //!< object has changed in some way since the last frame DMA_CHANGED = 0x0200, ///< object has changed in some way since the last frame
DMA_USERDEF = 0x0400, //!< user defined flags start here DMA_USERDEF = 0x0400, ///< user defined flags start here
DMA_GHOST = 0x0080, DMA_GHOST = 0x0080,
@ -61,12 +61,12 @@ enum {
/** structure for image */ /** structure for image */
#include "common/pack-start.h" // START STRUCT PACKING #include "common/pack-start.h" // START STRUCT PACKING
struct IMAGE { struct IMAGE {
short imgWidth; //!< image width short imgWidth; ///< image width
unsigned short imgHeight; //!< image height unsigned short imgHeight; ///< image height
short anioffX; //!< image x animation offset short anioffX; ///< image x animation offset
short anioffY; //!< image y animation offset short anioffY; ///< image y animation offset
SCNHANDLE hImgBits; //!< image bitmap handle SCNHANDLE hImgBits; ///< image bitmap handle
SCNHANDLE hImgPal; //!< image palette handle SCNHANDLE hImgPal; ///< image palette handle
} PACKED_STRUCT; } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING #include "common/pack-end.h" // END STRUCT PACKING
@ -76,25 +76,25 @@ typedef uint32 FRAME;
// object structure // object structure
struct OBJECT { struct OBJECT {
OBJECT *pNext; //!< pointer to next object in list OBJECT *pNext; ///< pointer to next object in list
OBJECT *pSlave; //!< pointer to slave object (multi-part objects) OBJECT *pSlave; ///< pointer to slave object (multi-part objects)
// char *pOnDispList; //!< pointer to display list byte for background objects // char *pOnDispList; ///< pointer to display list byte for background objects
// frac_t xVel; //!< x velocity of object // frac_t xVel; ///< x velocity of object
// frac_t yVel; //!< y velocity of object // frac_t yVel; ///< y velocity of object
frac_t xPos; //!< x position of object frac_t xPos; ///< x position of object
frac_t yPos; //!< y position of object frac_t yPos; ///< y position of object
int zPos; //!< z position of object int zPos; ///< z position of object
Common::Rect rcPrev; //!< previous screen coordinates of object bounding rectangle Common::Rect rcPrev; ///< previous screen coordinates of object bounding rectangle
int flags; //!< object flags - see above for list int flags; ///< object flags - see above for list
PALQ *pPal; //!< objects palette Q position PALQ *pPal; ///< objects palette Q position
int constant; //!< which colour in palette for monochrome objects int constant; ///< which colour in palette for monochrome objects
int width; //!< width of object int width; ///< width of object
int height; //!< height of object int height; ///< height of object
SCNHANDLE hBits; //!< image bitmap handle SCNHANDLE hBits; ///< image bitmap handle
SCNHANDLE hImg; //!< handle to object image definition SCNHANDLE hImg; ///< handle to object image definition
SCNHANDLE hShape; //!< objects current animation frame SCNHANDLE hShape; ///< objects current animation frame
SCNHANDLE hMirror; //!< objects previous animation frame SCNHANDLE hMirror; ///< objects previous animation frame
int oid; //!< object identifier int oid; ///< object identifier
}; };
typedef OBJECT *POBJECT; typedef OBJECT *POBJECT;

View File

@ -40,12 +40,12 @@ namespace Tinsel {
/** video DAC transfer Q structure */ /** video DAC transfer Q structure */
struct VIDEO_DAC_Q { struct VIDEO_DAC_Q {
union { union {
SCNHANDLE hRGBarray; //!< handle of palette or SCNHANDLE hRGBarray; ///< handle of palette or
COLORREF *pRGBarray; //!< list of palette colours COLORREF *pRGBarray; ///< list of palette colours
} pal; } pal;
bool bHandle; //!< when set - use handle of palette bool bHandle; ///< when set - use handle of palette
int destDACindex; //!< start index of palette in video DAC int destDACindex; ///< start index of palette in video DAC
int numColours; //!< number of colours in "hRGBarray" int numColours; ///< number of colours in "hRGBarray"
}; };

View File

@ -42,18 +42,18 @@ typedef uint32 COLORREF;
#define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10))) #define TINSEL_PSX_RGB(r,g,b) ((uint16)(((uint8)(r))|((uint16)(g)<<5)|(((uint16)(b))<<10)))
enum { enum {
MAX_COLOURS = 256, //!< maximum number of colours - for VGA 256 MAX_COLOURS = 256, ///< maximum number of colours - for VGA 256
BITS_PER_PIXEL = 8, //!< number of bits per pixel for VGA 256 BITS_PER_PIXEL = 8, ///< number of bits per pixel for VGA 256
MAX_INTENSITY = 255, //!< the biggest value R, G or B can have MAX_INTENSITY = 255, ///< the biggest value R, G or B can have
NUM_PALETTES = 32, //!< number of palettes NUM_PALETTES = 32, ///< number of palettes
// Discworld has some fixed apportioned bits in the palette. // Discworld has some fixed apportioned bits in the palette.
BGND_DAC_INDEX = 0, //!< index of background colour in Video DAC BGND_DAC_INDEX = 0, ///< index of background colour in Video DAC
FGND_DAC_INDEX = 1, //!< index of first foreground colour in Video DAC FGND_DAC_INDEX = 1, ///< index of first foreground colour in Video DAC
TBLUE1 = 228, //!< Blue used in translucent rectangles TBLUE1 = 228, ///< Blue used in translucent rectangles
TBLUE2 = 229, //!< Blue used in translucent rectangles TBLUE2 = 229, ///< Blue used in translucent rectangles
TBLUE3 = 230, //!< Blue used in translucent rectangles TBLUE3 = 230, ///< Blue used in translucent rectangles
TBLUE4 = 231, //!< Blue used in translucent rectangles TBLUE4 = 231, ///< Blue used in translucent rectangles
TALKFONT_COL = 233 TALKFONT_COL = 233
}; };
@ -73,8 +73,8 @@ enum {
/** hardware palette structure */ /** hardware palette structure */
struct PALETTE { struct PALETTE {
int32 numColours; //!< number of colours in the palette int32 numColours; ///< number of colours in the palette
COLORREF palRGB[MAX_COLOURS]; //!< actual palette colours COLORREF palRGB[MAX_COLOURS]; ///< actual palette colours
} PACKED_STRUCT; } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING #include "common/pack-end.h" // END STRUCT PACKING
@ -82,10 +82,10 @@ struct PALETTE {
/** palette queue structure */ /** palette queue structure */
struct PALQ { struct PALQ {
SCNHANDLE hPal; //!< handle to palette data struct SCNHANDLE hPal; ///< handle to palette data struct
int objCount; //!< number of objects using this palette int objCount; ///< number of objects using this palette
int posInDAC; //!< palette position in the video DAC int posInDAC; ///< palette position in the video DAC
int numColours; //!< number of colours in the palette int numColours; ///< number of colours in the palette
// Discworld 2 fields // Discworld 2 fields
bool bFading; // Whether or not fading bool bFading; // Whether or not fading
COLORREF palRGB[MAX_COLOURS]; // actual palette colours COLORREF palRGB[MAX_COLOURS]; // actual palette colours

View File

@ -48,57 +48,57 @@ extern int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONT
/** list of all opcodes */ /** list of all opcodes */
enum OPCODE { enum OPCODE {
OP_HALT = 0, //!< end of program OP_HALT = 0, ///< end of program
OP_IMM = 1, //!< loads signed immediate onto stack OP_IMM = 1, ///< loads signed immediate onto stack
OP_ZERO = 2, //!< loads zero onto stack OP_ZERO = 2, ///< loads zero onto stack
OP_ONE = 3, //!< loads one onto stack OP_ONE = 3, ///< loads one onto stack
OP_MINUSONE = 4, //!< loads minus one onto stack OP_MINUSONE = 4, ///< loads minus one onto stack
OP_STR = 5, //!< loads string offset onto stack OP_STR = 5, ///< loads string offset onto stack
OP_FILM = 6, //!< loads film offset onto stack OP_FILM = 6, ///< loads film offset onto stack
OP_FONT = 7, //!< loads font offset onto stack OP_FONT = 7, ///< loads font offset onto stack
OP_PAL = 8, //!< loads palette offset onto stack OP_PAL = 8, ///< loads palette offset onto stack
OP_LOAD = 9, //!< loads local variable onto stack OP_LOAD = 9, ///< loads local variable onto stack
OP_GLOAD = 10, //!< loads global variable onto stack - long offset to variable OP_GLOAD = 10, ///< loads global variable onto stack - long offset to variable
OP_STORE = 11, //!< pops stack and stores in local variable - long offset to variable OP_STORE = 11, ///< pops stack and stores in local variable - long offset to variable
OP_GSTORE = 12, //!< pops stack and stores in global variable - long offset to variable OP_GSTORE = 12, ///< pops stack and stores in global variable - long offset to variable
OP_CALL = 13, //!< procedure call OP_CALL = 13, ///< procedure call
OP_LIBCALL = 14, //!< library procedure call - long offset to procedure OP_LIBCALL = 14, ///< library procedure call - long offset to procedure
OP_RET = 15, //!< procedure return OP_RET = 15, ///< procedure return
OP_ALLOC = 16, //!< allocate storage on stack OP_ALLOC = 16, ///< allocate storage on stack
OP_JUMP = 17, //!< unconditional jump - signed word offset OP_JUMP = 17, ///< unconditional jump - signed word offset
OP_JMPFALSE = 18, //!< conditional jump - signed word offset OP_JMPFALSE = 18, ///< conditional jump - signed word offset
OP_JMPTRUE = 19, //!< conditional jump - signed word offset OP_JMPTRUE = 19, ///< conditional jump - signed word offset
OP_EQUAL = 20, //!< tests top two items on stack for equality OP_EQUAL = 20, ///< tests top two items on stack for equality
OP_LESS, //!< tests top two items on stack OP_LESS, ///< tests top two items on stack
OP_LEQUAL, //!< tests top two items on stack OP_LEQUAL, ///< tests top two items on stack
OP_NEQUAL, //!< tests top two items on stack OP_NEQUAL, ///< tests top two items on stack
OP_GEQUAL, //!< tests top two items on stack OP_GEQUAL, ///< tests top two items on stack
OP_GREAT = 25, //!< tests top two items on stack OP_GREAT = 25, ///< tests top two items on stack
OP_PLUS, //!< adds top two items on stack and replaces with result OP_PLUS, ///< adds top two items on stack and replaces with result
OP_MINUS, //!< subs top two items on stack and replaces with result OP_MINUS, ///< subs top two items on stack and replaces with result
OP_LOR, //!< logical or of top two items on stack and replaces with result OP_LOR, ///< logical or of top two items on stack and replaces with result
OP_MULT, //!< multiplies top two items on stack and replaces with result OP_MULT, ///< multiplies top two items on stack and replaces with result
OP_DIV = 30, //!< divides top two items on stack and replaces with result OP_DIV = 30, ///< divides top two items on stack and replaces with result
OP_MOD, //!< divides top two items on stack and replaces with modulus OP_MOD, ///< divides top two items on stack and replaces with modulus
OP_AND, //!< bitwise ands top two items on stack and replaces with result OP_AND, ///< bitwise ands top two items on stack and replaces with result
OP_OR, //!< bitwise ors top two items on stack and replaces with result OP_OR, ///< bitwise ors top two items on stack and replaces with result
OP_EOR, //!< bitwise exclusive ors top two items on stack and replaces with result OP_EOR, ///< bitwise exclusive ors top two items on stack and replaces with result
OP_LAND = 35, //!< logical ands top two items on stack and replaces with result OP_LAND = 35, ///< logical ands top two items on stack and replaces with result
OP_NOT, //!< logical nots top item on stack OP_NOT, ///< logical nots top item on stack
OP_COMP, //!< complements top item on stack OP_COMP, ///< complements top item on stack
OP_NEG, //!< negates top item on stack OP_NEG, ///< negates top item on stack
OP_DUP, //!< duplicates top item on stack OP_DUP, ///< duplicates top item on stack
OP_ESCON = 40, //!< start of escapable sequence OP_ESCON = 40, ///< start of escapable sequence
OP_ESCOFF = 41, //!< end of escapable sequence OP_ESCOFF = 41, ///< end of escapable sequence
OP_CIMM, //!< loads signed immediate onto stack (special to case statements) OP_CIMM, ///< loads signed immediate onto stack (special to case statements)
OP_CDFILM //!< loads film offset onto stack but not in current scene OP_CDFILM ///< loads film offset onto stack but not in current scene
}; };
// modifiers for the above opcodes // modifiers for the above opcodes
#define OPSIZE8 0x40 //!< when this bit is set - the operand size is 8 bits #define OPSIZE8 0x40 ///< when this bit is set - the operand size is 8 bits
#define OPSIZE16 0x80 //!< when this bit is set - the operand size is 16 bits #define OPSIZE16 0x80 ///< when this bit is set - the operand size is 16 bits
#define OPMASK 0x3F //!< mask to isolate the opcode #define OPMASK 0x3F ///< mask to isolate the opcode
bool bNoPause = false; bool bNoPause = false;

View File

@ -44,7 +44,7 @@ enum RESUME_STATE {
}; };
enum { enum {
PCODE_STACK_SIZE = 128 //!< interpeters stack size PCODE_STACK_SIZE = 128 ///< interpeters stack size
}; };
enum GSORT { enum GSORT {
@ -68,25 +68,25 @@ struct WorkaroundEntry {
struct INT_CONTEXT { struct INT_CONTEXT {
// Elements for interpret context management // Elements for interpret context management
PROCESS *pProc; //!< processes owning this context PROCESS *pProc; ///< processes owning this context
GSORT GSort; //!< sort of this context GSORT GSort; ///< sort of this context
// Previously parameters to Interpret() // Previously parameters to Interpret()
SCNHANDLE hCode; //!< scene handle of the code to execute SCNHANDLE hCode; ///< scene handle of the code to execute
byte *code; //!< pointer to the code to execute byte *code; ///< pointer to the code to execute
TINSEL_EVENT event; //!< causal event TINSEL_EVENT event; ///< causal event
HPOLYGON hPoly; //!< associated polygon (if any) HPOLYGON hPoly; ///< associated polygon (if any)
int idActor; //!< associated actor (if any) int idActor; ///< associated actor (if any)
INV_OBJECT *pinvo; //!< associated inventory object INV_OBJECT *pinvo; ///< associated inventory object
// Previously local variables in Interpret() // Previously local variables in Interpret()
int32 stack[PCODE_STACK_SIZE]; //!< interpeters run time stack int32 stack[PCODE_STACK_SIZE]; ///< interpeters run time stack
int sp; //!< stack pointer int sp; ///< stack pointer
int bp; //!< base pointer int bp; ///< base pointer
int ip; //!< instruction pointer int ip; ///< instruction pointer
bool bHalt; //!< set to exit interpeter bool bHalt; ///< set to exit interpeter
bool escOn; bool escOn;
int myEscape; //!< only initialised to prevent compiler warning! int myEscape; ///< only initialised to prevent compiler warning!
uint32 waitNumber1; // The waiting numbert uint32 waitNumber1; // The waiting numbert
uint32 waitNumber2; // The wait for number uint32 waitNumber2; // The wait for number

View File

@ -123,10 +123,10 @@ struct LINEINFO {
int32 b; int32 b;
int32 c; int32 c;
int32 a2; //!< a squared int32 a2; ///< a squared
int32 b2; //!< b squared int32 b2; ///< b squared
int32 a2pb2; //!< a squared + b squared int32 a2pb2; ///< a squared + b squared
int32 ra2pb2; //!< root(a squared + b squared) int32 ra2pb2; ///< root(a squared + b squared)
int32 ab; int32 ab;
int32 ac; int32 ac;
@ -165,7 +165,7 @@ public:
LINEINFO *getLineinfo(int i) const { return ((LINEINFO *)(_pStart + (int)FROM_LE_32(plinelist))) + i; } LINEINFO *getLineinfo(int i) const { return ((LINEINFO *)(_pStart + (int)FROM_LE_32(plinelist))) + i; }
protected: protected:
POLY_TYPE type; //!< type of polygon POLY_TYPE type; ///< type of polygon
public: public:
int32 x[4], y[4]; // Polygon definition int32 x[4], y[4]; // Polygon definition
uint32 xoff, yoff; // DW2 - polygon offset uint32 xoff, yoff; // DW2 - polygon offset
@ -174,9 +174,9 @@ public:
SCNHANDLE hTagtext; // } i.e. EXIT, TAG, EFFECT SCNHANDLE hTagtext; // } i.e. EXIT, TAG, EFFECT
int32 nodex, nodey; // EXIT, TAG, REFER int32 nodex, nodey; // EXIT, TAG, REFER
SCNHANDLE hFilm; //!< film reel handle for EXIT, TAG SCNHANDLE hFilm; ///< film reel handle for EXIT, TAG
int32 reftype; //!< Type of REFER int32 reftype; ///< Type of REFER
int32 id; // } EXIT and TAG int32 id; // } EXIT and TAG
@ -187,15 +187,15 @@ public:
int32 zFactor; // } int32 zFactor; // }
protected: protected:
int32 nodecount; //!<The number of nodes in this polygon int32 nodecount; ///<The number of nodes in this polygon
int32 pnodelistx, pnodelisty; //!<offset in chunk to this array if present int32 pnodelistx, pnodelisty; ///<offset in chunk to this array if present
int32 plinelist; int32 plinelist;
int32 *nlistx; int32 *nlistx;
int32 *nlisty; int32 *nlisty;
public: public:
SCNHANDLE hScript; //!< handle of code segment for polygon events SCNHANDLE hScript; ///< handle of code segment for polygon events
}; };
Poly::Poly(const byte *pSrc) : _pStart(pSrc) { Poly::Poly(const byte *pSrc) : _pStart(pSrc) {
@ -610,10 +610,10 @@ void FindBestPoint(HPOLYGON hp, int *x, int *y, int *pline) {
// One bad thing: We use sqrt to compute a square root. Might not be a good idea, // One bad thing: We use sqrt to compute a square root. Might not be a good idea,
// speed wise. Maybe we should take Vicent's fp_sqroot. But that's a problem for later. // speed wise. Maybe we should take Vicent's fp_sqroot. But that's a problem for later.
int32 a2 = (int)FROM_LE_32(line->a2); //!< a squared int32 a2 = (int)FROM_LE_32(line->a2); ///< a squared
int32 b2 = (int)FROM_LE_32(line->b2); //!< b squared int32 b2 = (int)FROM_LE_32(line->b2); ///< b squared
int32 a2pb2 = (int)FROM_LE_32(line->a2pb2); //!< a squared + b squared int32 a2pb2 = (int)FROM_LE_32(line->a2pb2); ///< a squared + b squared
int32 ra2pb2 = (int)FROM_LE_32(line->ra2pb2); //!< root(a squared + b squared) int32 ra2pb2 = (int)FROM_LE_32(line->ra2pb2); ///< root(a squared + b squared)
int32 ab = (int)FROM_LE_32(line->ab); int32 ab = (int)FROM_LE_32(line->ab);
int32 ac = (int)FROM_LE_32(line->ac); int32 ac = (int)FROM_LE_32(line->ac);

View File

@ -94,8 +94,8 @@ struct SCENE_STRUC {
/** entrance structure - one per entrance */ /** entrance structure - one per entrance */
struct ENTRANCE_STRUC { struct ENTRANCE_STRUC {
int32 eNumber; //!< entrance number int32 eNumber; ///< entrance number
SCNHANDLE hScript; //!< handle to entrance script SCNHANDLE hScript; ///< handle to entrance script
// Tinsel 2 fields // Tinsel 2 fields
SCNHANDLE hEntDesc; // handle to entrance description SCNHANDLE hEntDesc; // handle to entrance description
uint32 flags; uint32 flags;

View File

@ -33,11 +33,11 @@
namespace Tinsel { namespace Tinsel {
enum { enum {
MAX_NODES = 32, //!< maximum nodes in a Node Path MAX_NODES = 32, ///< maximum nodes in a Node Path
MAX_NOSCROLL = 16, //!< maximum number of NoScroll commands in a scene MAX_NOSCROLL = 16, ///< maximum number of NoScroll commands in a scene
MAX_ENTRANCE = 25, //!< maximum number of entrances in a scene MAX_ENTRANCE = 25, ///< maximum number of entrances in a scene
MAX_POLY = 256, //!< maximum number of polygons in a scene MAX_POLY = 256, ///< maximum number of polygons in a scene
MAX_ACTOR = 32 //!< maximum number of actors in a scene MAX_ACTOR = 32 ///< maximum number of actors in a scene
}; };
// ENTRANCE_STRUC bitflags // ENTRANCE_STRUC bitflags

View File

@ -45,15 +45,15 @@ typedef void (*CORO_ADDR)(CoroContext &, const void *);
/** process structure */ /** process structure */
struct PROCESS { struct PROCESS {
PROCESS *pNext; //!< pointer to next process in active or free list PROCESS *pNext; ///< pointer to next process in active or free list
PROCESS *pPrevious; //!< pointer to previous process in active or free list PROCESS *pPrevious; ///< pointer to previous process in active or free list
CoroContext state; //!< the state of the coroutine CoroContext state; ///< the state of the coroutine
CORO_ADDR coroAddr; //!< the entry point of the coroutine CORO_ADDR coroAddr; ///< the entry point of the coroutine
int sleepTime; //!< number of scheduler cycles to sleep int sleepTime; ///< number of scheduler cycles to sleep
int pid; //!< process ID int pid; ///< process ID
char param[PARAM_SIZE]; //!< process specific info char param[PARAM_SIZE]; ///< process specific info
}; };
typedef PROCESS *PPROCESS; typedef PROCESS *PPROCESS;

View File

@ -34,10 +34,10 @@ namespace Tinsel {
/** text mode flags - defaults to left justify */ /** text mode flags - defaults to left justify */
enum { enum {
TXT_CENTRE = 0x0001, //!< centre justify text TXT_CENTRE = 0x0001, ///< centre justify text
TXT_RIGHT = 0x0002, //!< right justify text TXT_RIGHT = 0x0002, ///< right justify text
TXT_SHADOW = 0x0004, //!< shadow each character TXT_SHADOW = 0x0004, ///< shadow each character
TXT_ABSOLUTE = 0x0008 //!< position of text is absolute (only for object text) TXT_ABSOLUTE = 0x0008 ///< position of text is absolute (only for object text)
}; };
/** maximum number of characters in a font */ /** maximum number of characters in a font */
@ -56,13 +56,13 @@ enum {
* It is currently set at 300 because it suited me for debugging. * It is currently set at 300 because it suited me for debugging.
*/ */
struct FONT { struct FONT {
int xSpacing; //!< x spacing between characters int xSpacing; ///< x spacing between characters
int ySpacing; //!< y spacing between characters int ySpacing; ///< y spacing between characters
int xShadow; //!< x shadow offset int xShadow; ///< x shadow offset
int yShadow; //!< y shadow offset int yShadow; ///< y shadow offset
int spaceSize; //!< x spacing to use for a space character int spaceSize; ///< x spacing to use for a space character
OBJ_INIT fontInit; //!< structure used to init text objects OBJ_INIT fontInit; ///< structure used to init text objects
SCNHANDLE fontDef[300]; //!< image handle array for all characters in the font SCNHANDLE fontDef[300]; ///< image handle array for all characters in the font
} PACKED_STRUCT; } PACKED_STRUCT;
#include "common/pack-end.h" // END STRUCT PACKING #include "common/pack-end.h" // END STRUCT PACKING
@ -70,14 +70,14 @@ struct FONT {
/** structure for passing the correct parameters to ObjectTextOut */ /** structure for passing the correct parameters to ObjectTextOut */
struct TEXTOUT { struct TEXTOUT {
OBJECT *pList; //!< object list to add text to OBJECT *pList; ///< object list to add text to
char *szStr; //!< string to output char *szStr; ///< string to output
int colour; //!< colour for monochrome text int colour; ///< colour for monochrome text
int xPos; //!< x position of string int xPos; ///< x position of string
int yPos; //!< y position of string int yPos; ///< y position of string
SCNHANDLE hFont; //!< which font to use SCNHANDLE hFont; ///< which font to use
int mode; //!< mode flags for the string int mode; ///< mode flags for the string
int sleepTime; //!< sleep time between each character (if non-zero) int sleepTime; ///< sleep time between each character (if non-zero)
}; };

View File

@ -39,8 +39,8 @@ class PaletteLUT {
public: public:
/** Palette format. */ /** Palette format. */
enum PaletteFormat { enum PaletteFormat {
kPaletteRGB, //!< Palette in RGB colorspace kPaletteRGB, ///< Palette in RGB colorspace
kPaletteYUV //!< Palette in YUV colorspace kPaletteYUV ///< Palette in YUV colorspace
}; };
/** Converting a color from YUV to RGB colorspace. */ /** Converting a color from YUV to RGB colorspace. */
@ -114,23 +114,23 @@ public:
private: private:
static const uint32 kVersion = 1; static const uint32 kVersion = 1;
byte _depth1; //!< The table's depth for one dimension. byte _depth1; ///< The table's depth for one dimension.
byte _depth2; //!< The table's depth for two dimensions. byte _depth2; ///< The table's depth for two dimensions.
byte _shift; //!< Amount to shift to adjust for the table's depth. byte _shift; ///< Amount to shift to adjust for the table's depth.
uint32 _dim1; //!< The table's entry offset for one dimension. uint32 _dim1; ///< The table's entry offset for one dimension.
uint32 _dim2; //!< The table's entry offset for two dimensions. uint32 _dim2; ///< The table's entry offset for two dimensions.
uint32 _dim3; //!< The table's entry offset for three dimensions. uint32 _dim3; ///< The table's entry offset for three dimensions.
int _transp; //!< The transparent palette index. int _transp; ///< The transparent palette index.
PaletteFormat _format; //!< The table's palette format. PaletteFormat _format; ///< The table's palette format.
byte _lutPal[768]; //!< The palette used for looking up a color. byte _lutPal[768]; ///< The palette used for looking up a color.
byte _realPal[768]; //!< The original palette. byte _realPal[768]; ///< The original palette.
uint32 _got; //!< Number of slices generated. uint32 _got; ///< Number of slices generated.
byte *_gots; //!< Map of generated slices. byte *_gots; ///< Map of generated slices.
byte *_lut; //!< The lookup table. byte *_lut; ///< The lookup table.
/** Building a specified slice. */ /** Building a specified slice. */
void build(int d1); void build(int d1);
@ -175,13 +175,13 @@ public:
byte dither(byte c1, byte c2, byte c3, uint32 x); byte dither(byte c1, byte c2, byte c3, uint32 x);
protected: protected:
int16 _width; //!< The image's width. int16 _width; ///< The image's width.
PaletteLUT *_palLUT; //!< The palette against which to dither. PaletteLUT *_palLUT; ///< The palette against which to dither.
int32 *_errorBuf; //!< Big buffer for all collected errors. int32 *_errorBuf; ///< Big buffer for all collected errors.
int32 *_errors[2]; //!< Pointers into the error buffer for two lines. int32 *_errors[2]; ///< Pointers into the error buffer for two lines.
int _curLine; //!< Which one is the current line? int _curLine; ///< Which one is the current line?
/** Querying a pixel's errors. */ /** Querying a pixel's errors. */
inline void getErrors(uint32 x, int32 &eC1, int32 &eC2, int32 &eC3); inline void getErrors(uint32 x, int32 &eC1, int32 &eC2, int32 &eC3);

View File

@ -37,9 +37,9 @@ namespace Graphics {
/** Text alignment modes */ /** Text alignment modes */
enum TextAlign { enum TextAlign {
kTextAlignInvalid, kTextAlignInvalid,
kTextAlignLeft, //!< Text should be aligned to the left kTextAlignLeft, ///< Text should be aligned to the left
kTextAlignCenter, //!< Text should be centered kTextAlignCenter, ///< Text should be centered
kTextAlignRight //!< Text should be aligned to the right kTextAlignRight ///< Text should be aligned to the right
}; };
/** /**

View File

@ -67,18 +67,18 @@ struct ILBMDecoder {
* Available decoding modes for loadBitmap(). * Available decoding modes for loadBitmap().
*/ */
enum { enum {
ILBM_UNPACK_PLANES = 0xFF, //!< Decode all bitplanes, and map 1 pixel to 1 byte. ILBM_UNPACK_PLANES = 0xFF, ///< Decode all bitplanes, and map 1 pixel to 1 byte.
ILBM_PACK_PLANES = 0x100, //!< Request unpacking, used as a mask with below options. ILBM_PACK_PLANES = 0x100, ///< Request unpacking, used as a mask with below options.
ILBM_1_PLANES = 1, //!< Decode only the first bitplane, don't pack. ILBM_1_PLANES = 1, ///< Decode only the first bitplane, don't pack.
ILBM_1_PACK_PLANES = ILBM_1_PLANES | ILBM_PACK_PLANES, //!< Decode only the first bitplane, pack 8 pixels in 1 byte. ILBM_1_PACK_PLANES = ILBM_1_PLANES | ILBM_PACK_PLANES, ///< Decode only the first bitplane, pack 8 pixels in 1 byte.
ILBM_2_PLANES = 2, //!< Decode first 2 bitplanes, don't pack. ILBM_2_PLANES = 2, ///< Decode first 2 bitplanes, don't pack.
ILBM_2_PACK_PLANES = ILBM_2_PLANES | ILBM_PACK_PLANES, //!< Decode first 2 bitplanes, pack 4 pixels in 1 byte. ILBM_2_PACK_PLANES = ILBM_2_PLANES | ILBM_PACK_PLANES, ///< Decode first 2 bitplanes, pack 4 pixels in 1 byte.
ILBM_3_PLANES = 3, //!< Decode first 3 bitplanes, don't pack. ILBM_3_PLANES = 3, ///< Decode first 3 bitplanes, don't pack.
ILBM_4_PLANES = 4, //!< Decode first 4 bitplanes, don't pack. ILBM_4_PLANES = 4, ///< Decode first 4 bitplanes, don't pack.
ILBM_4_PACK_PLANES = ILBM_4_PLANES | ILBM_PACK_PLANES, //!< Decode first 4 bitplanes, pack 2 pixels in 1 byte. ILBM_4_PACK_PLANES = ILBM_4_PLANES | ILBM_PACK_PLANES, ///< Decode first 4 bitplanes, pack 2 pixels in 1 byte.
ILBM_5_PLANES = 5, //!< Decode first 5 bitplanes, don't pack. ILBM_5_PLANES = 5, ///< Decode first 5 bitplanes, don't pack.
ILBM_8_PLANES = 8 //!< Decode all 8 bitplanes. ILBM_8_PLANES = 8 ///< Decode all 8 bitplanes.
}; };
/** /**

View File

@ -40,12 +40,12 @@ enum NumberingMode {
kListNumberingOne = 1 kListNumberingOne = 1
}; };
// Some special commands /// Some special commands
enum { enum {
kListItemDoubleClickedCmd = 'LIdb', // double click on item - 'data' will be item index kListItemDoubleClickedCmd = 'LIdb', ///< double click on item - 'data' will be item index
kListItemActivatedCmd = 'LIac', // item activated by return/enter - 'data' will be item index kListItemActivatedCmd = 'LIac', ///< item activated by return/enter - 'data' will be item index
kListItemRemovalRequestCmd = 'LIrm', // request to remove the item with the delete/backspace keys - 'data' will be item index kListItemRemovalRequestCmd = 'LIrm', ///< request to remove the item with the delete/backspace keys - 'data' will be item index
kListSelectionChangedCmd = 'Lsch' // selection changed - 'data' will be item index kListSelectionChangedCmd = 'Lsch' ///< selection changed - 'data' will be item index
}; };
/* ListWidget */ /* ListWidget */
@ -137,7 +137,7 @@ public:
protected: protected:
void drawWidget(); void drawWidget();
//! Finds the item at position (x,y). Returns -1 if there is no item there. /// Finds the item at position (x,y). Returns -1 if there is no item there.
int findItem(int x, int y) const; int findItem(int x, int y) const;
void scrollBarRecalc(); void scrollBarRecalc();

View File

@ -154,10 +154,10 @@ protected:
* Data definitions for theme engine elements * Data definitions for theme engine elements
*********************************************************/ *********************************************************/
struct DrawDataInfo { struct DrawDataInfo {
DrawData id; //!< The actual ID of the DrawData item. DrawData id; ///< The actual ID of the DrawData item.
const char *name; //!< The name of the DrawData item as it appears in the Theme Description files const char *name; ///< The name of the DrawData item as it appears in the Theme Description files
bool buffer; //!< Sets whether this item is buffered on the backbuffer or drawn directly to the screen. bool buffer; ///< Sets whether this item is buffered on the backbuffer or drawn directly to the screen.
DrawData parent; //!< Parent DrawData item, for items that overlay. E.g. kButtonIdle -> kButtonHover DrawData parent; ///< Parent DrawData item, for items that overlay. E.g. kButtonIdle -> kButtonHover
}; };
/** /**

View File

@ -134,7 +134,7 @@ protected:
friend class GUI::GuiObject; friend class GUI::GuiObject;
public: public:
//! Vertical alignment of the text. /// Vertical alignment of the text.
enum TextAlignVertical { enum TextAlignVertical {
kTextAlignVInvalid, kTextAlignVInvalid,
kTextAlignVBottom, kTextAlignVBottom,
@ -142,17 +142,17 @@ public:
kTextAlignVTop kTextAlignVTop
}; };
//! Widget background type /// Widget background type
enum WidgetBackground { enum WidgetBackground {
kWidgetBackgroundNo, //!< No background at all kWidgetBackgroundNo, ///< No background at all
kWidgetBackgroundPlain, //!< Simple background, this may not include borders kWidgetBackgroundPlain, ///< Simple background, this may not include borders
kWidgetBackgroundBorder, //!< Same as kWidgetBackgroundPlain just with a border kWidgetBackgroundBorder, ///< Same as kWidgetBackgroundPlain just with a border
kWidgetBackgroundBorderSmall, //!< Same as kWidgetBackgroundPlain just with a small border kWidgetBackgroundBorderSmall, ///< Same as kWidgetBackgroundPlain just with a small border
kWidgetBackgroundEditText, //!< Background used for edit text fields kWidgetBackgroundEditText, ///< Background used for edit text fields
kWidgetBackgroundSlider //!< Background used for sliders kWidgetBackgroundSlider ///< Background used for sliders
}; };
//! Dialog background type /// Dialog background type
enum DialogBackground { enum DialogBackground {
kDialogBackgroundMain, kDialogBackgroundMain,
kDialogBackgroundSpecial, kDialogBackgroundSpecial,
@ -160,20 +160,20 @@ public:
kDialogBackgroundDefault kDialogBackgroundDefault
}; };
//! State of the widget to be drawn /// State of the widget to be drawn
enum State { enum State {
kStateDisabled, //!< Indicates that the widget is disabled, that does NOT include that it is invisible kStateDisabled, ///< Indicates that the widget is disabled, that does NOT include that it is invisible
kStateEnabled, //!< Indicates that the widget is enabled kStateEnabled, ///< Indicates that the widget is enabled
kStateHighlight //!< Indicates that the widget is highlighted by the user kStateHighlight ///< Indicates that the widget is highlighted by the user
}; };
typedef State WidgetStateInfo; typedef State WidgetStateInfo;
//! Text inversion state of the text to be draw /// Text inversion state of the text to be draw
enum TextInversionState { enum TextInversionState {
kTextInversionNone, //!< Indicates that the text should not be drawn inverted kTextInversionNone, ///< Indicates that the text should not be drawn inverted
kTextInversion, //!< Indicates that the text should be drawn inverted, but not focused kTextInversion, ///< Indicates that the text should be drawn inverted, but not focused
kTextInversionFocus //!< Indicates thte the test should be drawn inverted, and focused kTextInversionFocus ///< Indicates thte the test should be drawn inverted, and focused
}; };
enum ScrollbarState { enum ScrollbarState {
@ -184,35 +184,35 @@ public:
kScrollbarStateSinglePage kScrollbarStateSinglePage
}; };
//! Font style selector /// Font style selector
enum FontStyle { enum FontStyle {
kFontStyleBold = 0, //!< A bold font. This is also the default font. kFontStyleBold = 0, ///< A bold font. This is also the default font.
kFontStyleNormal = 1, //!< A normal font. kFontStyleNormal = 1, ///< A normal font.
kFontStyleItalic = 2, //!< Italic styled font. kFontStyleItalic = 2, ///< Italic styled font.
kFontStyleFixedNormal = 3, //!< Fixed size font. kFontStyleFixedNormal = 3, ///< Fixed size font.
kFontStyleFixedBold = 4, //!< Fixed size bold font. kFontStyleFixedBold = 4, ///< Fixed size bold font.
kFontStyleFixedItalic = 5, //!< Fixed size italic font. kFontStyleFixedItalic = 5, ///< Fixed size italic font.
kFontStyleMax kFontStyleMax
}; };
//! Font color selector /// Font color selector
enum FontColor { enum FontColor {
kFontColorNormal = 0, //!< The default color of the theme kFontColorNormal = 0, ///< The default color of the theme
kFontColorAlternate = 1, //!< Alternative font color kFontColorAlternate = 1, ///< Alternative font color
kFontColorMax kFontColorMax
}; };
//! Function used to process areas other than the current dialog /// Function used to process areas other than the current dialog
enum ShadingStyle { enum ShadingStyle {
kShadingNone, //!< No special post processing kShadingNone, ///< No special post processing
kShadingDim, //!< Dimming unused areas kShadingDim, ///< Dimming unused areas
kShadingLuminance //!< Converting colors to luminance for unused areas kShadingLuminance ///< Converting colors to luminance for unused areas
}; };
// Special image ids for images used in the GUI // Special image ids for images used in the GUI
static const char * const kImageLogo; //!< ScummVM logo used in the launcher static const char * const kImageLogo; ///< ScummVM logo used in the launcher
static const char * const kImageLogoSmall; //!< ScummVM logo used in the GMM static const char * const kImageLogoSmall; ///< ScummVM logo used in the GMM
static const char * const kImageSearch; //!< Search tool image used in the launcher static const char * const kImageSearch; ///< Search tool image used in the launcher
/** /**
* Graphics mode enumeration. * Graphics mode enumeration.
@ -220,9 +220,9 @@ public:
* surface. * surface.
*/ */
enum GraphicsMode { enum GraphicsMode {
kGfxDisabled = 0, //!< No GFX kGfxDisabled = 0, ///< No GFX
kGfxStandard16bit, //!< 2BPP with the standard (aliased) renderer. kGfxStandard16bit, ///< 2BPP with the standard (aliased) renderer.
kGfxAntialias16bit //!< 2BPP with the optimized AA renderer. kGfxAntialias16bit ///< 2BPP with the optimized AA renderer.
}; };
/** Constant value to expand dirty rectangles, to make sure they are fully copied */ /** Constant value to expand dirty rectangles, to make sure they are fully copied */
@ -625,11 +625,11 @@ protected:
/** Queue with all the drawing that must be done to the screen */ /** Queue with all the drawing that must be done to the screen */
Common::List<ThemeItem *> _screenQueue; Common::List<ThemeItem *> _screenQueue;
bool _initOk; //!< Class and renderer properly initialized bool _initOk; ///< Class and renderer properly initialized
bool _themeOk; //!< Theme data successfully loaded. bool _themeOk; ///< Theme data successfully loaded.
bool _enabled; //!< Whether the Theme is currently shown on the overlay bool _enabled; ///< Whether the Theme is currently shown on the overlay
Common::String _themeName; //!< Name of the currently loaded theme Common::String _themeName; ///< Name of the currently loaded theme
Common::String _themeId; Common::String _themeId;
Common::String _themeFile; Common::String _themeFile;
Common::Archive *_themeArchive; Common::Archive *_themeArchive;

View File

@ -23,7 +23,7 @@
* *
*/ */
//! \brief Declarations related to the MidiParser class /// \brief Declarations related to the MidiParser class
#ifndef SOUND_MIDIPARSER_H #ifndef SOUND_MIDIPARSER_H
#define SOUND_MIDIPARSER_H #define SOUND_MIDIPARSER_H
@ -53,16 +53,16 @@ class MidiDriver;
* each Tracker location. * each Tracker location.
*/ */
struct Tracker { struct Tracker {
byte * _play_pos; //!< A pointer to the next event to be parsed byte * _play_pos; ///< A pointer to the next event to be parsed
uint32 _play_time; //!< Current time in microseconds; may be in between event times uint32 _play_time; ///< Current time in microseconds; may be in between event times
uint32 _play_tick; //!< Current MIDI tick; may be in between event ticks uint32 _play_tick; ///< Current MIDI tick; may be in between event ticks
uint32 _last_event_time; //!< The time, in microseconds, of the last event that was parsed uint32 _last_event_time; ///< The time, in microseconds, of the last event that was parsed
uint32 _last_event_tick; //!< The tick at which the last parsed event occurs uint32 _last_event_tick; ///< The tick at which the last parsed event occurs
byte _running_status; //!< Cached MIDI command, for MIDI streams that rely on implied event codes byte _running_status; ///< Cached MIDI command, for MIDI streams that rely on implied event codes
Tracker() { clear(); } Tracker() { clear(); }
//! Copy constructor for each duplication of Tracker information. /// Copy constructor for each duplication of Tracker information.
Tracker(const Tracker &copy) : Tracker(const Tracker &copy) :
_play_pos(copy._play_pos), _play_pos(copy._play_pos),
_play_time(copy._play_time), _play_time(copy._play_time),
@ -72,7 +72,7 @@ struct Tracker {
_running_status(copy._running_status) _running_status(copy._running_status)
{ } { }
//! Clears all data; used by the constructor for initialization. /// Clears all data; used by the constructor for initialization.
void clear() { void clear() {
_play_pos = 0; _play_pos = 0;
_play_time = 0; _play_time = 0;
@ -89,28 +89,28 @@ struct Tracker {
* of MidiParser::parseNextEvent() each time another event is needed. * of MidiParser::parseNextEvent() each time another event is needed.
*/ */
struct EventInfo { struct EventInfo {
byte * start; //!< Position in the MIDI stream where the event starts. byte * start; ///< Position in the MIDI stream where the event starts.
//!< For delta-based MIDI streams (e.g. SMF and XMIDI), this points to the delta. ///< For delta-based MIDI streams (e.g. SMF and XMIDI), this points to the delta.
uint32 delta; //!< The number of ticks after the previous event that this event should occur. uint32 delta; ///< The number of ticks after the previous event that this event should occur.
byte event; //!< Upper 4 bits are the command code, lower 4 bits are the MIDI channel. byte event; ///< Upper 4 bits are the command code, lower 4 bits are the MIDI channel.
//!< For META, event == 0xFF. For SysEx, event == 0xF0. ///< For META, event == 0xFF. For SysEx, event == 0xF0.
union { union {
struct { struct {
byte param1; //!< The first parameter in a simple MIDI message. byte param1; ///< The first parameter in a simple MIDI message.
byte param2; //!< The second parameter in a simple MIDI message. byte param2; ///< The second parameter in a simple MIDI message.
} basic; } basic;
struct { struct {
byte type; //!< For META events, this indicates the META type. byte type; ///< For META events, this indicates the META type.
byte * data; //!< For META and SysEx events, this points to the start of the data. byte * data; ///< For META and SysEx events, this points to the start of the data.
} ext; } ext;
}; };
uint32 length; //!< For META and SysEx blocks, this indicates the length of the data. uint32 length; ///< For META and SysEx blocks, this indicates the length of the data.
//!< For Note On events, a non-zero value indicates that no Note Off event ///< For Note On events, a non-zero value indicates that no Note Off event
//!< will occur, and the MidiParser will have to generate one itself. ///< will occur, and the MidiParser will have to generate one itself.
//!< For all other events, this value should always be zero. ///< For all other events, this value should always be zero.
byte channel() { return event & 0x0F; } //!< Separates the MIDI channel from the event. byte channel() { return event & 0x0F; } ///< Separates the MIDI channel from the event.
byte command() { return event >> 4; } //!< Separates the command code from the event. byte command() { return event >> 4; } ///< Separates the command code from the event.
}; };
/** /**
@ -121,9 +121,9 @@ struct EventInfo {
* longer a note should remain active before being turned off. * longer a note should remain active before being turned off.
*/ */
struct NoteTimer { struct NoteTimer {
byte channel; //!< The MIDI channel on which the note was played byte channel; ///< The MIDI channel on which the note was played
byte note; //!< The note number for the active note byte note; ///< The note number for the active note
uint32 time_left; //!< The time, in microseconds, remaining before the note should be turned off uint32 time_left; ///< The time, in microseconds, remaining before the note should be turned off
NoteTimer() : channel(0), note(0), time_left(0) {} NoteTimer() : channel(0), note(0), time_left(0) {}
}; };
@ -268,30 +268,30 @@ struct NoteTimer {
*/ */
class MidiParser { class MidiParser {
private: private:
uint16 _active_notes[128]; //!< Each uint16 is a bit mask for channels that have that note on. uint16 _active_notes[128]; ///< Each uint16 is a bit mask for channels that have that note on.
NoteTimer _hanging_notes[32]; //!< Maintains expiration info for up to 32 notes. NoteTimer _hanging_notes[32]; ///< Maintains expiration info for up to 32 notes.
//!< Used for "Smart Jump" and MIDI formats that do not include explicit Note Off events. ///< Used for "Smart Jump" and MIDI formats that do not include explicit Note Off events.
byte _hanging_notes_count; //!< Count of hanging notes, used to optimize expiration. byte _hanging_notes_count; ///< Count of hanging notes, used to optimize expiration.
protected: protected:
MidiDriver *_driver; //!< The device to which all events will be transmitted. MidiDriver *_driver; ///< The device to which all events will be transmitted.
uint32 _timer_rate; //!< The time in microseconds between onTimer() calls. Obtained from the MidiDriver. uint32 _timer_rate; ///< The time in microseconds between onTimer() calls. Obtained from the MidiDriver.
uint32 _ppqn; //!< Pulses Per Quarter Note. (We refer to "pulses" as "ticks".) uint32 _ppqn; ///< Pulses Per Quarter Note. (We refer to "pulses" as "ticks".)
uint32 _tempo; //!< Microseconds per quarter note. uint32 _tempo; ///< Microseconds per quarter note.
uint32 _psec_per_tick; //!< Microseconds per tick (_tempo / _ppqn). uint32 _psec_per_tick; ///< Microseconds per tick (_tempo / _ppqn).
bool _autoLoop; //!< For lightweight clients that don't provide their own flow control. bool _autoLoop; ///< For lightweight clients that don't provide their own flow control.
bool _smartJump; //!< Support smart expiration of hanging notes when jumping bool _smartJump; ///< Support smart expiration of hanging notes when jumping
bool _centerPitchWheelOnUnload; //!< Center the pitch wheels when unloading a song bool _centerPitchWheelOnUnload; ///< Center the pitch wheels when unloading a song
byte *_tracks[120]; //!< Multi-track MIDI formats are supported, up to 120 tracks. byte *_tracks[120]; ///< Multi-track MIDI formats are supported, up to 120 tracks.
byte _num_tracks; //!< Count of total tracks for multi-track MIDI formats. 1 for single-track formats. byte _num_tracks; ///< Count of total tracks for multi-track MIDI formats. 1 for single-track formats.
byte _active_track; //!< Keeps track of the currently active track, in multi-track formats. byte _active_track; ///< Keeps track of the currently active track, in multi-track formats.
Tracker _position; //!< The current time/position in the active track. Tracker _position; ///< The current time/position in the active track.
EventInfo _next_event; //!< The next event to transmit. Events are preparsed EventInfo _next_event; ///< The next event to transmit. Events are preparsed
//!< so each event is parsed only once; this permits ///< so each event is parsed only once; this permits
//!< simulated events in certain formats. ///< simulated events in certain formats.
bool _abort_parse; //!< If a jump or other operation interrupts parsing, flag to abort. bool _abort_parse; ///< If a jump or other operation interrupts parsing, flag to abort.
protected: protected:
static uint32 readVLQ(byte * &data); static uint32 readVLQ(byte * &data);

View File

@ -89,8 +89,8 @@ private:
enum { kNumVoices = 4, kNumChannels = 8, kNumSubsongs = 32, kMaxPatternOffsets = 128, kMaxMacroOffsets = 128 }; enum { kNumVoices = 4, kNumChannels = 8, kNumSubsongs = 32, kMaxPatternOffsets = 128, kMaxMacroOffsets = 128 };
struct MdatResource { struct MdatResource {
const byte *mdatAlloc; //!< allocated Block of Memory const byte *mdatAlloc; ///< allocated Block of Memory
const byte *mdatData; //!< Start of mdat-File, might point before mdatAlloc to correct Offset const byte *mdatData; ///< Start of mdat-File, might point before mdatAlloc to correct Offset
uint32 mdatLen; uint32 mdatLen;
uint16 headerFlags; uint16 headerFlags;
@ -98,16 +98,16 @@ private:
// char textField[6 * 40]; // char textField[6 * 40];
struct Subsong { struct Subsong {
uint16 songstart; //!< Index in Trackstep-Table uint16 songstart; ///< Index in Trackstep-Table
uint16 songend; //!< Last index in Trackstep-Table uint16 songend; ///< Last index in Trackstep-Table
uint16 tempo; uint16 tempo;
} subsong[kNumSubsongs]; } subsong[kNumSubsongs];
uint32 trackstepOffset; //!< Offset in mdat uint32 trackstepOffset; ///< Offset in mdat
uint32 sfxTableOffset; uint32 sfxTableOffset;
uint32 patternOffset[kMaxPatternOffsets]; //!< Offset in mdat uint32 patternOffset[kMaxPatternOffsets]; ///< Offset in mdat
uint32 macroOffset[kMaxMacroOffsets]; //!< Offset in mdat uint32 macroOffset[kMaxMacroOffsets]; ///< Offset in mdat
void boundaryCheck(const void *address, size_t accessLen = 1) const { void boundaryCheck(const void *address, size_t accessLen = 1) const {
assert(mdatAlloc <= address && (const byte *)address + accessLen <= (const byte *)mdatData + mdatLen); assert(mdatAlloc <= address && (const byte *)address + accessLen <= (const byte *)mdatData + mdatLen);
@ -115,7 +115,7 @@ private:
} const *_resource; } const *_resource;
struct SampleResource { struct SampleResource {
const int8 *sampleData; //!< The whole sample-File const int8 *sampleData; ///< The whole sample-File
uint32 sampleLen; uint32 sampleLen;
void boundaryCheck(const void *address, size_t accessLen = 2) const { void boundaryCheck(const void *address, size_t accessLen = 2) const {
@ -140,7 +140,7 @@ private:
uint16 macroReturnStep; uint16 macroReturnStep;
uint8 macroLoopCount; uint8 macroLoopCount;
bool macroRun; bool macroRun;
int8 macroSfxRun; //!< values are the folowing: -1 macro disabled, 0 macro init, 1 macro running int8 macroSfxRun; ///< values are the folowing: -1 macro disabled, 0 macro init, 1 macro running
uint32 customMacro; uint32 customMacro;
uint8 customMacroIndex; uint8 customMacroIndex;
@ -193,7 +193,7 @@ private:
uint8 command; uint8 command;
int8 expose; int8 expose;
uint8 loopCount; uint8 loopCount;
uint8 wait; //!< how many ticks to wait before next Command uint8 wait; ///< how many ticks to wait before next Command
} _patternCtx[kNumChannels]; } _patternCtx[kNumChannels];
struct TrackStepContext { struct TrackStepContext {
@ -204,12 +204,12 @@ private:
} _trackCtx; } _trackCtx;
struct PlayerContext { struct PlayerContext {
int8 song; //!< >= 0 if Song is running (means process Patterns) int8 song; ///< >= 0 if Song is running (means process Patterns)
uint16 patternCount; uint16 patternCount;
uint16 patternSkip; //!< skip that amount of CIA-Interrupts uint16 patternSkip; ///< skip that amount of CIA-Interrupts
int8 volume; //!< Master Volume int8 volume; ///< Master Volume
uint8 fadeSkip; uint8 fadeSkip;
uint8 fadeCount; uint8 fadeCount;
@ -221,7 +221,7 @@ private:
uint16 *signal; uint16 *signal;
uint16 numSignals; uint16 numSignals;
bool stopWithLastPattern; //!< hack to automatically stop the whole player if no Pattern is running bool stopWithLastPattern; ///< hack to automatically stop the whole player if no Pattern is running
} _playerCtx; } _playerCtx;
const byte *getSfxPtr(uint16 index = 0) const { const byte *getSfxPtr(uint16 index = 0) const {

View File

@ -79,8 +79,8 @@
// the link complains about an unresolved external token Common.String.__dtor // the link complains about an unresolved external token Common.String.__dtor
struct Rect { struct Rect {
int16 top, left; //!< The point at the top left of the rectangle (part of the rect). int16 top, left; ///< The point at the top left of the rectangle (part of the rect).
int16 bottom, right; //!< The point at the bottom right of the rectangle (not part of the rect). int16 bottom, right; ///< The point at the bottom right of the rectangle (not part of the rect).
}; };
struct FileEntry { struct FileEntry {