[NEW] Added a define with the version as a string (GRRLIB_VER_STRING)

This commit is contained in:
Crayon2000 2009-12-03 00:08:19 +00:00
parent 5761644fe8
commit 0d0ae2ca97
3 changed files with 9 additions and 5 deletions

View file

@ -49,9 +49,6 @@ int GRRLIB_Init (void) {
Mtx44 perspective; Mtx44 perspective;
s8 error_code = 0; s8 error_code = 0;
//just to get the GRRLIB version in the dol ;)
if(1){ printf("GRRLIB 4.1.2"); }
// Ensure this function is only ever called once // Ensure this function is only ever called once
if (is_setup) return 0 ; if (is_setup) return 0 ;
@ -114,6 +111,8 @@ int GRRLIB_Init (void) {
GX_SetDispCopyGamma(GX_GM_1_0); GX_SetDispCopyGamma(GX_GM_1_0);
if(rmode->fbWidth <= 0){ printf("GRRLIB " GRRLIB_VER_STRING); }
// Setup the vertex descriptor // Setup the vertex descriptor
GX_ClearVtxDesc(); // clear all the vertex descriptors GX_ClearVtxDesc(); // clear all the vertex descriptors
GX_InvVtxCache(); // Invalidate the vertex cache GX_InvVtxCache(); // Invalidate the vertex cache

View file

@ -28,6 +28,11 @@ THE SOFTWARE.
#ifndef __GRRLIB_H__ #ifndef __GRRLIB_H__
#define __GRRLIB_H__ #define __GRRLIB_H__
/**
* Version information for GRRLIB.
*/
#define GRRLIB_VER_STRING "4.1.2"
//============================================================================== //==============================================================================
// Includes // Includes
//============================================================================== //==============================================================================
@ -197,7 +202,7 @@ typedef struct tagRGBQUAD {
GRR_EXTERN GXRModeObj *rmode; GRR_EXTERN GXRModeObj *rmode;
GRR_EXTERN void *xfb[2] GRR_INITS(NULL, NULL); GRR_EXTERN void *xfb[2] GRR_INITS(NULL, NULL);
GRR_EXTERN u32 fb GRR_INIT(0); GRR_EXTERN u32 fb GRR_INIT(0);
GRR_EXTERN void *TrashTex; GRR_EXTERN void *TrashTex;
//============================================================================== //==============================================================================
// procedure and function prototypes // procedure and function prototypes
// Inline function handling - http://www.greenend.org.uk/rjk/2003/03/inline.html // Inline function handling - http://www.greenend.org.uk/rjk/2003/03/inline.html

View file

@ -155,7 +155,7 @@ int main() {
GRRLIB_Plot(ir1.sx + 1, ir1.sy + 1, GRRLIB_YELLOW); GRRLIB_Plot(ir1.sx + 1, ir1.sy + 1, GRRLIB_YELLOW);
break; break;
default: // Print some text default: // Print some text
GRRLIB_Printf(5, 25, tex_BMfont2, GRRLIB_WHITE, 1, "TEXT DEMO"); GRRLIB_Printf(5, 25, tex_BMfont2, GRRLIB_WHITE, 1, "GRRLIB %s TEXT DEMO", GRRLIB_VER_STRING);
GRRLIB_Printf(5, 100, tex_BMfont4, GRRLIB_WHITE, 1, "TO QUIT PRESS THE HOME BUTTON."); GRRLIB_Printf(5, 100, tex_BMfont4, GRRLIB_WHITE, 1, "TO QUIT PRESS THE HOME BUTTON.");
GRRLIB_Printf(5, 140, tex_BMfont4, GRRLIB_YELLOW, 1, "USE + OR - TO MOVE ACROSS PAGES."); GRRLIB_Printf(5, 140, tex_BMfont4, GRRLIB_YELLOW, 1, "USE + OR - TO MOVE ACROSS PAGES.");