Richard Ellingworth / Mbed 2 deprecated RobotRic

Dependencies:   25LCxxx_SPI CommonTypes Gameduino mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers GDExtra.h Source File

GDExtra.h

00001 /*
00002  * SOURCE FILE : GDExtra.h
00003  *
00004  * Additional routines for the Gameduino.
00005  *
00006  */
00007 
00008 #ifndef GDExtraIncluded
00009   
00010   #define GDExtraIncluded
00011 
00012   #include "Gameduino.h"       // Gameduino stuff
00013   #include "Types.h"           // various types
00014   
00015   class GDExtra {
00016     
00017   public :
00018   
00019     /****************/
00020     /* CLEAR SCREEN */
00021     /****************/
00022     // Pass pointer to a Gameduino in gd.
00023     // Writes all character RAM with given character code.
00024     static void ClearScreen( Gameduino *gd, UInt8 code );
00025 
00026     /************************/
00027     /* HIDE A SINGLE SPRITE */
00028     /************************/
00029     // Pass pointer to a Gameduino in gd.
00030     // Pass sprite number in spriteNumber parameter.
00031     static void HideSprite( Gameduino *gd, UInt8 spriteNumber );
00032         
00033     /********************/
00034     /* HIDE ALL SPRITES */
00035     /********************/
00036     // Pass pointer to a Gameduino in gd.
00037     static void HideAllSprites( Gameduino *gd );
00038     
00039     /*********************************************/
00040     /* DISPLAY A STRING STORED IN PROGRAM MEMORY */
00041     /*********************************************/
00042     // Pass pointer to a Gameduino in gd.
00043     // Pass coordinates in x and y.
00044     // Pass address of string in s.
00045     static void WriteProgString( Gameduino *gd, UInt8 x, UInt8 y, const char *s );
00046     
00047     /*******************************/
00048     /* DISPLAY AN UNSIGNED INTEGER */
00049     /*******************************/
00050     // Pass pointer to a Gameduino in gd.
00051     // Pass coordinates in x and y.
00052     // Pass number to write in num.
00053     // Pass numeric base in base.
00054     // Pass number of digits to write in digits.
00055     static void WriteUInt16( Gameduino *gd, UInt8 x, UInt8 y, UInt16 num, UInt8 base, UInt8 digits );
00056 
00057     /************************/
00058     /* DISPLAY A BCD NUMBER */
00059     /************************/
00060     // Pass pointer to a Gameduino in gd.
00061     // Pass coordinates in x and y.
00062     // Pass number to write in num.
00063     // Pass number of digits to write in digits.
00064     static void WriteBCDNumber( Gameduino *gd, UInt8 x, UInt8 y, UInt32 num, UInt8 digits );
00065     
00066     /******************************************************/
00067     /* DISPLAY A CHARACTER BLOCK STORED IN PROGRAM MEMORY */
00068     /******************************************************/
00069     // Pass pointer to a Gameduino in gd.
00070     // Pass coordinates in x and y.
00071     // Pass address of character block in bPtr.
00072     // Address points to the width of the block, followed by the height of
00073     // the block and then the character codes that make up the block.
00074     static void WriteProgCharBlock( Gameduino *gd, UInt8 x, UInt8 y, const UInt8 *bPtr );
00075     
00076   };
00077   
00078 #endif
00079 
00080 /* END of GDExtra.h */
00081 
00082