mirror of
https://github.com/GRRLIB/GRRLIB.git
synced 2024-11-22 06:52:20 +00:00
[CHG] Moved some structure to proper place
[CHG] Documentation improvement
This commit is contained in:
parent
2dc838cb2b
commit
5d28586ff2
5 changed files with 48 additions and 43 deletions
|
@ -41,7 +41,11 @@ static bool is_setup = false; // To control entry and exit
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize GRRLIB. Call this once at the beginning your code.
|
* 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
|
* @see GRRLIB_Exit
|
||||||
*/
|
*/
|
||||||
int GRRLIB_Init (void) {
|
int GRRLIB_Init (void) {
|
||||||
|
|
|
@ -28,6 +28,44 @@ THE SOFTWARE.
|
||||||
|
|
||||||
#include <grrlib.h>
|
#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.
|
* Convert a raw BMP (RGB, no alpha) to 4x4RGBA.
|
||||||
* @author DragonMinded
|
* @author DragonMinded
|
||||||
|
|
|
@ -160,7 +160,9 @@ void GRRLIB_PrintfTTFW(int x, int y, GRRLIB_ttfFont *myFont, const wchar_t *utf3
|
||||||
* @param bitmap Bitmap to draw.
|
* @param bitmap Bitmap to draw.
|
||||||
* @param offset x-coordinate offset.
|
* @param offset x-coordinate offset.
|
||||||
* @param top y-coordinate.
|
* @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) {
|
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;
|
FT_Int i, j, p, q;
|
||||||
|
|
|
@ -152,50 +152,11 @@ typedef struct GRRLIB_bytemapFont {
|
||||||
/**
|
/**
|
||||||
* Structure to hold the TTF information.
|
* Structure to hold the TTF information.
|
||||||
*/
|
*/
|
||||||
typedef struct GRRLIB_Font {
|
typedef struct GRRLIB_Font {
|
||||||
FT_Face face; /**< A TTF face object. */
|
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. */
|
FT_Bool kerning; /**< true whenever a face object contains kerning data that can be accessed with FT_Get_Kerning. */
|
||||||
} GRRLIB_ttfFont;
|
} 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
|
// Allow general access to screen and frame information
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
|
|
@ -324,7 +324,7 @@ EXTRACT_STATIC = YES
|
||||||
# defined locally in source files will be included in the documentation.
|
# defined locally in source files will be included in the documentation.
|
||||||
# If set to NO only classes defined in header files are included.
|
# 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
|
# 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
|
# methods, which are defined in the implementation section but not in
|
||||||
|
|
Loading…
Reference in a new issue