From 5d28586ff2548bc92f1a620aadb1aa2fec152a12 Mon Sep 17 00:00:00 2001 From: Crayon2000 Date: Thu, 4 Mar 2010 20:14:57 +0000 Subject: [PATCH] [CHG] Moved some structure to proper place [CHG] Documentation improvement --- GRRLIB/GRRLIB/GRRLIB_core.c | 6 ++++- GRRLIB/GRRLIB/GRRLIB_texEdit.c | 38 +++++++++++++++++++++++++++++++ GRRLIB/GRRLIB/GRRLIB_ttf.c | 4 +++- GRRLIB/GRRLIB/grrlib.h | 41 +--------------------------------- grrlib.doxygen | 2 +- 5 files changed, 48 insertions(+), 43 deletions(-) diff --git a/GRRLIB/GRRLIB/GRRLIB_core.c b/GRRLIB/GRRLIB/GRRLIB_core.c index 8d817f3..ac3cc7f 100644 --- a/GRRLIB/GRRLIB/GRRLIB_core.c +++ b/GRRLIB/GRRLIB/GRRLIB_core.c @@ -41,7 +41,11 @@ static bool is_setup = false; // To control entry and exit /** * Initialize GRRLIB. Call this once at the beginning your code. - * @return int 0=OK; -1=NoMemory; -2=NoFilingSystem + * @return A integer representating a code: + * - 0 : The operation completed successfully. + * - -1 : Not enough memory is available to initialize GRRLIB. + * - -2 : Failed to add the fat device driver to the devoptab. + * - -3 : Failed to initialize the font engine. * @see GRRLIB_Exit */ int GRRLIB_Init (void) { diff --git a/GRRLIB/GRRLIB/GRRLIB_texEdit.c b/GRRLIB/GRRLIB/GRRLIB_texEdit.c index f490a89..5b25b67 100644 --- a/GRRLIB/GRRLIB/GRRLIB_texEdit.c +++ b/GRRLIB/GRRLIB/GRRLIB_texEdit.c @@ -28,6 +28,44 @@ THE SOFTWARE. #include +/** + * This structure contains information about the type, size, and layout of a file that containing a device-independent bitmap (DIB). + */ +typedef struct tagBITMAPFILEHEADER { + u16 bfType; /**< Specifies the file type. It must be set to the signature word BM (0x4D42) to indicate bitmap. */ + u32 bfSize; /**< Specifies the size, in bytes, of the bitmap file. */ + u16 bfReserved1; /**< Reserved; set to zero. */ + u16 bfReserved2; /**< Reserved; set to zero. */ + u32 bfOffBits; /**< Specifies the offset, in bytes, from the BITMAPFILEHEADER structure to the bitmap bits. */ +} BITMAPFILEHEADER; +/** + * This structure contains information about the dimensions and color format of a device-independent bitmap (DIB). + */ +typedef struct tagBITMAPINFOHEADER { + u32 biSize; /**< Specifies the size of the structure, in bytes. */ + u32 biWidth; /**< Specifies the width of the bitmap, in pixels. */ + u32 biHeight; /**< Specifies the height of the bitmap, in pixels. */ + u16 biPlanes; /**< Specifies the number of planes for the target device. */ + u16 biBitCount; /**< Specifies the number of bits per pixel. */ + u32 biCompression; /**< Specifies the type of compression for a compressed bottom-up bitmap.*/ + u32 biSizeImage; /**< Specifies the size, in bytes, of the image. */ + u32 biXPelsPerMeter; /**< Specifies the horizontal resolution, in pixels per meter, of the target device for the bitmap. */ + u32 biYPelsPerMeter; /**< Specifies the vertical resolution, in pixels per meter, of the target device for the bitmap. */ + u32 biClrUsed; /**< Specifies the number of color indexes in the color table that are actually used by the bitmap. */ + u32 biClrImportant; /**< Specifies the number of color indexes required for displaying the bitmap. */ +} BITMAPINFOHEADER; +/** + * The RGBQUAD structure describes a color consisting of relative intensities of + * red, green, and blue. The bmiColors member of the BITMAPINFO structure + * consists of an array of RGBQUAD structures. + */ +typedef struct tagRGBQUAD { + u8 rgbBlue; /**< Specifies the intensity of blue in the color. */ + u8 rgbGreen; /**< Specifies the intensity of green in the color. */ + u8 rgbRed; /**< Specifies the intensity of red in the color. */ + u8 rgbReserved; /**< Not used; must be set to zero. */ +} RGBQUAD; + /** * Convert a raw BMP (RGB, no alpha) to 4x4RGBA. * @author DragonMinded diff --git a/GRRLIB/GRRLIB/GRRLIB_ttf.c b/GRRLIB/GRRLIB/GRRLIB_ttf.c index a3f7621..9f3a568 100644 --- a/GRRLIB/GRRLIB/GRRLIB_ttf.c +++ b/GRRLIB/GRRLIB/GRRLIB_ttf.c @@ -160,7 +160,9 @@ void GRRLIB_PrintfTTFW(int x, int y, GRRLIB_ttfFont *myFont, const wchar_t *utf3 * @param bitmap Bitmap to draw. * @param offset x-coordinate offset. * @param top y-coordinate. - * @param color character color in RGBA format. + * @param cR Red component of the colour. + * @param cG Green component of the colour. + * @param cB Blue component of the colour. */ static void DrawBitmap(FT_Bitmap *bitmap, int offset, int top, const u8 cR, const u8 cG, const u8 cB) { FT_Int i, j, p, q; diff --git a/GRRLIB/GRRLIB/grrlib.h b/GRRLIB/GRRLIB/grrlib.h index cf0e5e9..3502276 100644 --- a/GRRLIB/GRRLIB/grrlib.h +++ b/GRRLIB/GRRLIB/grrlib.h @@ -152,50 +152,11 @@ typedef struct GRRLIB_bytemapFont { /** * Structure to hold the TTF information. */ -typedef struct GRRLIB_Font { +typedef struct GRRLIB_Font { FT_Face face; /**< A TTF face object. */ FT_Bool kerning; /**< true whenever a face object contains kerning data that can be accessed with FT_Get_Kerning. */ } GRRLIB_ttfFont; -//------------------------------------------------------------------------------ -/** - * This structure contains information about the type, size, and layout of a file that containing a device-independent bitmap (DIB). - */ -typedef struct tagBITMAPFILEHEADER { - u16 bfType; /**< Specifies the file type. It must be set to the signature word BM (0x4D42) to indicate bitmap. */ - u32 bfSize; /**< Specifies the size, in bytes, of the bitmap file. */ - u16 bfReserved1; /**< Reserved; set to zero. */ - u16 bfReserved2; /**< Reserved; set to zero. */ - u32 bfOffBits; /**< Specifies the offset, in bytes, from the BITMAPFILEHEADER structure to the bitmap bits. */ -} BITMAPFILEHEADER; -/** - * This structure contains information about the dimensions and color format of a device-independent bitmap (DIB). - */ -typedef struct tagBITMAPINFOHEADER { - u32 biSize; /**< Specifies the size of the structure, in bytes. */ - u32 biWidth; /**< Specifies the width of the bitmap, in pixels. */ - u32 biHeight; /**< Specifies the height of the bitmap, in pixels. */ - u16 biPlanes; /**< Specifies the number of planes for the target device. */ - u16 biBitCount; /**< Specifies the number of bits per pixel. */ - u32 biCompression; /**< Specifies the type of compression for a compressed bottom-up bitmap.*/ - u32 biSizeImage; /**< Specifies the size, in bytes, of the image. */ - u32 biXPelsPerMeter; /**< Specifies the horizontal resolution, in pixels per meter, of the target device for the bitmap. */ - u32 biYPelsPerMeter; /**< Specifies the vertical resolution, in pixels per meter, of the target device for the bitmap. */ - u32 biClrUsed; /**< Specifies the number of color indexes in the color table that are actually used by the bitmap. */ - u32 biClrImportant; /**< Specifies the number of color indexes required for displaying the bitmap. */ -} BITMAPINFOHEADER; -/** - * The RGBQUAD structure describes a color consisting of relative intensities of - * red, green, and blue. The bmiColors member of the BITMAPINFO structure - * consists of an array of RGBQUAD structures. - */ -typedef struct tagRGBQUAD { - u8 rgbBlue; /**< Specifies the intensity of blue in the color. */ - u8 rgbGreen; /**< Specifies the intensity of green in the color. */ - u8 rgbRed; /**< Specifies the intensity of red in the color. */ - u8 rgbReserved; /**< Not used; must be set to zero. */ -} RGBQUAD; - //============================================================================== // Allow general access to screen and frame information //============================================================================== diff --git a/grrlib.doxygen b/grrlib.doxygen index e7bf80f..5e0c294 100644 --- a/grrlib.doxygen +++ b/grrlib.doxygen @@ -324,7 +324,7 @@ EXTRACT_STATIC = YES # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. -EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_CLASSES = NO # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in