[Scummvm-git-logs] scummvm master -> be39e3b4d286d3334af97e071da7b48d64bc2582

criezy criezy at scummvm.org
Sun Nov 29 23:04:05 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
be39e3b4d2 DOXYGEN: Doxy work on files from 'image'


Commit: be39e3b4d286d3334af97e071da7b48d64bc2582
    https://github.com/scummvm/scummvm/commit/be39e3b4d286d3334af97e071da7b48d64bc2582
Author: Bartosz Gentkowski (bartosz.gentkowski at nordicsemi.no)
Date: 2020-11-29T23:04:01Z

Commit Message:
DOXYGEN: Doxy work on files from 'image'

There is only one file in this folder that is in scope of
GSoD - image_decoder.h. It was in great shape docwise though,
so not much review required.

The rest of the headers have received a doxy group definition.

Changed paths:
    doc/doxygen/groups.dox
    image/bmp.h
    image/cel_3do.h
    image/iff.h
    image/image_decoder.h
    image/jpeg.h
    image/pcx.h
    image/pict.h
    image/png.h
    image/tga.h


diff --git a/doc/doxygen/groups.dox b/doc/doxygen/groups.dox
index 4bd819768d..2a42ad93ac 100644
--- a/doc/doxygen/groups.dox
+++ b/doc/doxygen/groups.dox
@@ -11,4 +11,11 @@
 @ingroup common
 @brief Functions for the Lua programming language. See @linkLua.
 
+*/
+
+/**
+
+ at defgroup image Image API
+ at brief API of various image decoders used in engines.
+
 */
\ No newline at end of file
diff --git a/image/bmp.h b/image/bmp.h
index 2493f8351a..ae258c77e3 100644
--- a/image/bmp.h
+++ b/image/bmp.h
@@ -20,15 +20,6 @@
  *
  */
 
-/**
- * @file
- * Image decoder used in engines:
- *  - hugo
- *  - mohawk
- *  - petka
- *  - wintermute
- */
-
 #ifndef IMAGE_BMP_H
 #define IMAGE_BMP_H
 
@@ -46,7 +37,21 @@ struct Surface;
 }
 
 namespace Image {
-
+	
+/**
+ * @defgroup image_bmp BMP decoder
+ * @ingroup image
+ *
+ * @brief Decoder for BMP images.
+ *
+ * Used in engines:
+ *  - Hugo
+ *  - Mohawk
+ *  - Petka
+ *  - Wintermute
+ * @{
+ */
+ 
 class Codec;
 
 class BitmapDecoder : public ImageDecoder {
@@ -72,7 +77,7 @@ private:
  * Outputs an uncompressed BMP stream of the given input surface.
  */
 bool writeBMP(Common::WriteStream &out, const Graphics::Surface &input);
-
+/** @} */
 } // End of namespace Image
 
 #endif
diff --git a/image/cel_3do.h b/image/cel_3do.h
index 41c999ae9b..ad7b4a0c7b 100644
--- a/image/cel_3do.h
+++ b/image/cel_3do.h
@@ -38,6 +38,14 @@ struct Surface;
 
 namespace Image {
 
+/**
+ * @defgroup image_cel CEL decoder
+ * @ingroup image
+ *
+ * @brief Decoder for CEL images.
+ * @{
+ */
+
 class Codec;
 
 class Cel3DODecoder : public ImageDecoder {
@@ -57,7 +65,7 @@ private:
 	byte *_palette;
 	uint16 _paletteColorCount;
 };
-
+/** @} */
 } // End of namespace Image
 
 #endif
diff --git a/image/iff.h b/image/iff.h
index 3d342b3173..a94279d273 100644
--- a/image/iff.h
+++ b/image/iff.h
@@ -20,15 +20,6 @@
  *
  */
 
-/**
- * @file
- * Image decoder used in engines:
- *  - gob
- *  - parallaction
- *  - queen
- *  - saga
- */
-
 #ifndef IMAGE_IFF_H
 #define IMAGE_IFF_H
 
@@ -48,6 +39,20 @@ struct Surface;
 
 namespace Image {
 
+/**
+ * @defgroup image_iff IFF decoder
+ * @ingroup image
+ *
+ * @brief Decoder for images encoded as Interchange File Format (IFF).
+ *
+ * Used in engines:
+ * - Gob
+ * - Parallaction
+ * - Queen
+ * - Saga
+ * @{
+ */
+
 class IFFDecoder : public ImageDecoder {
 public:
 	struct Header {
@@ -120,7 +125,7 @@ private:
 	void loadBitmap(Common::SeekableReadStream &stream);
 	void packPixels(byte *scanlines, byte *data, const uint16 scanlinePitch, const uint16 outPitch);
 };
-
+/** @} */	
 } // End of namespace Image
 
 #endif
diff --git a/image/image_decoder.h b/image/image_decoder.h
index 2018cebd37..8fc775214c 100644
--- a/image/image_decoder.h
+++ b/image/image_decoder.h
@@ -36,6 +36,14 @@ struct Surface;
 
 namespace Image {
 
+/**
+ * @defgroup image_decoder Image decoder
+ * @ingroup image
+ *
+ * @brief ImageDecoder class used for representing and managing various image decoders.
+ * @{
+ */
+
 /**
  * A representation of an image decoder that maintains ownership of the surface
  * and palette it decodes to.
@@ -47,53 +55,55 @@ public:
 	virtual ~ImageDecoder() {}
 
 	/**
-	 * Load an image from the specified stream
+	 * Load an image from the specified stream.
 	 *
 	 * loadStream() should implicitly call destroy() to free the memory
 	 * of the last loadStream() call.
 	 *
-	 * @param stream the input stream
-	 * @return whether loading the file succeeded
+	 * @param stream  Input stream.
+	 *
+	 * @return Whether loading the file succeeded.
+	 *
 	 * @see getSurface
 	 * @see getPalette
 	 */
 	virtual bool loadStream(Common::SeekableReadStream &stream) = 0;
 
 	/**
-	 * Destroy this decoder's surface and palette
+	 * Destroy this decoder's surface and palette.
 	 *
 	 * This should be called by a loadStream() implementation as well
-	 * as the destructor.
+	 * as by the destructor.
 	 */
 	virtual void destroy() = 0;
 
 	/**
-	 * Get the decoded surface
+	 * Get the decoded surface.
 	 *
-	 * This surface is owned by this ImageDecoder and will remain valid
-	 * until destroy() or loadStream() is called, or until this ImageDecoder's
-	 * destructor is called.
+	 * This surface is owned by this ImageDecoder and remains valid
+	 * until destroy() or loadStream() is called, or until the destructor of
+	 * this ImageDecoder is called.
 	 *
-	 * @return the decoded surface, or 0 if no surface is present
+	 * @return The decoded surface, or 0 if no surface is present.
 	 */
 	virtual const Graphics::Surface *getSurface() const = 0;
 
 	/**
-	 * Get the decoded palette
+	 * Get the decoded palette.
 	 *
-	 * This palette is owned by this ImageDecoder and will remain valid
-	 * until destroy() or loadStream() is called, or until this ImageDecoder's
-	 * destructor is called.
+	 * This palette is owned by this ImageDecoder and remains valid
+	 * until destroy() or loadStream() is called, or until the destructor of
+	 * this ImageDecoder is called.
 	 *
-	 * The palette's format is the same as PaletteManager's palette
+	 * The format of the palette is the same as that of the PaletteManager's palette.
 	 * (interleaved RGB values).
 	 *
-	 * @return the decoded palette, or undefined if no palette is present
+	 * @return The decoded palette, or undefined if no palette is present.
 	 */
 	virtual const byte *getPalette() const { return 0; }
 
 	/**
-	 * Query if the decoded image has a palette.
+	 * Query whether the decoded image has a palette.
 	 */
 	virtual bool hasPalette() const { return getPaletteColorCount() != 0; }
 
@@ -102,7 +112,7 @@ public:
 	/** Return the number of colors in the palette. */
 	virtual uint16 getPaletteColorCount() const { return 0; }
 };
-
+/** @} */
 } // End of namespace Image
 
 #endif
diff --git a/image/jpeg.h b/image/jpeg.h
index 08b5c01dc4..38908d04d5 100644
--- a/image/jpeg.h
+++ b/image/jpeg.h
@@ -20,16 +20,6 @@
  *
  */
 
-/**
- * @file
- * Image decoder used in engines:
- *  - groovie
- *  - mohawk
- *  - wintermute
- *
- * Used by PICT/QuickTime.
- */
-
 #ifndef IMAGE_JPEG_H
 #define IMAGE_JPEG_H
 
@@ -43,6 +33,19 @@ class SeekableReadStream;
 
 namespace Image {
 
+/**
+ * @defgroup image_jpeg JPEG decoder
+ * @ingroup image
+ *
+ * @brief Decoder for JPEG images.
+ *
+ * Used in engines:
+ * - Groovie
+ * - Mohawk
+ * - Wintermute
+ * @{
+ */
+
 class JPEGDecoder : public ImageDecoder, public Codec {
 public:
 	JPEGDecoder();
@@ -106,7 +109,7 @@ private:
 
 	Graphics::PixelFormat getByteOrderRgbPixelFormat() const;
 };
-
+/** @} */
 } // End of namespace Image
 
 #endif
diff --git a/image/pcx.h b/image/pcx.h
index ce30ab5eb2..7e9dbf6285 100644
--- a/image/pcx.h
+++ b/image/pcx.h
@@ -20,14 +20,6 @@
  *
  */
 
-/**
- * PCX decoder used in engines:
- *  - dreamweb
- *  - hugo
- *  - queen
- *  - tucker
- */
-
 #ifndef IMAGE_PCX_H
 #define IMAGE_PCX_H
 
@@ -41,6 +33,20 @@ class SeekableReadStream;
 
 namespace Image {
 
+/**
+ * @defgroup image_pcx PCX decoder
+ * @ingroup image
+ *
+ * @brief Decoder for PCX images.
+ *
+ * Used in engines:
+ * - Dreamweb
+ * - Hugo
+ * - Queen
+ * - Tucker
+ * @{
+ */
+
 class PCXDecoder : public ImageDecoder {
 public:
 	PCXDecoder();
@@ -60,7 +66,7 @@ private:
 	byte *_palette;
 	uint16 _paletteColorCount;
 };
-
+/** @} */
 } // End of namespace Image
 
 #endif
diff --git a/image/pict.h b/image/pict.h
index 7fd65c6052..e15df136de 100644
--- a/image/pict.h
+++ b/image/pict.h
@@ -20,14 +20,6 @@
  *
  */
 
-/**
- * @file
- * Image decoder used in engines:
- *  - mohawk
- *  - pegasus
- *  - sci
- */
-
 #ifndef IMAGE_PICT_H
 #define IMAGE_PICT_H
 
@@ -47,6 +39,19 @@ struct Surface;
 
 namespace Image {
 
+/**
+ * @defgroup image_pict PICT decoder
+ * @ingroup image
+ *
+ * @brief Decoder for PICT images.
+ *
+ * Used in engines:
+ * - Mohawk
+ * - Pegasus
+ * - SCI
+ * @{
+ */
+
 #define DECLARE_OPCODE(x) void x(Common::SeekableReadStream &stream)
 
 class PICTDecoder : public ImageDecoder {
@@ -136,7 +141,7 @@ private:
 };
 
 #undef DECLARE_OPCODE
-
+/** @} */
 } // End of namespace Image
 
 #endif
diff --git a/image/png.h b/image/png.h
index 1402976963..0ab4b99bdf 100644
--- a/image/png.h
+++ b/image/png.h
@@ -20,14 +20,6 @@
  *
  */
 
-/*
- * PNG decoder used in engines:
- *  - sword25
- *  - wintermute
- * Dependencies:
- *  - libpng
- */
-
 #ifndef IMAGE_PNG_H
 #define IMAGE_PNG_H
 
@@ -47,6 +39,20 @@ struct Surface;
 
 namespace Image {
 
+/**
+ * @defgroup image_png PNG decoder
+ * @ingroup image
+ *
+ * @brief Decoder for PNG images.
+ *
+ * This decoder has a dependency on the libpng library.
+ *
+ * Used in engines:
+ * - Sword25
+ * - Wintermute
+ * @{
+ */
+
 class PNGDecoder : public ImageDecoder {
 public:
 	PNGDecoder();
@@ -80,7 +86,7 @@ private:
  * Outputs a compressed PNG stream of the given input surface.
  */
 bool writePNG(Common::WriteStream &out, const Graphics::Surface &input);
-
+/** @} */
 } // End of namespace Image
 
 #endif
diff --git a/image/tga.h b/image/tga.h
index ef897becdd..a4a550fbfa 100644
--- a/image/tga.h
+++ b/image/tga.h
@@ -43,6 +43,14 @@ class SeekableReadStream;
 
 namespace Image {
 
+/**
+ * @defgroup image_tga TGA (TARGA) decoder
+ * @ingroup image
+ *
+ * @brief Decoder for TGA images.
+ * @{
+ */
+
 /** TarGa image-decoder
  * The following variations of TGA are supported:
  * - Type 1 - Color-mapped images in 16/24/32 bpp with 8 bit indexes
@@ -95,7 +103,7 @@ private:
 	bool readDataRLE(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);
 	bool readColorMap(Common::SeekableReadStream &tga, byte imageType, byte pixelDepth);
 };
-
+/** @} */
 } // End of namespace Image
 
 #endif




More information about the Scummvm-git-logs mailing list