[CHG] Moved some structure to proper place

[CHG] Documentation improvement
This commit is contained in:
Crayon2000 2010-03-04 20:14:57 +00:00
parent 2dc838cb2b
commit 5d28586ff2
5 changed files with 48 additions and 43 deletions

View file

@ -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) {

View file

@ -28,6 +28,44 @@ THE SOFTWARE.
#include <grrlib.h>
/**
* 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

View file

@ -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;

View file

@ -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
//==============================================================================

View file

@ -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