Net Yaroze User Pad Module By Matt Verran Description User Pad Module. Handles digital and analog type pads. Will return Pad button status, stick status, pad mode/type and whether a pad is connected or removed. Contents Usage Contact data structures functions Usage Include pad.h. Contact Matt Verran / frktlx email: matt@frktl.freeserve.co.uk url: http://www.frktl.freeserve.co.uk NY url: http://www.netyaroze-europe.com/frktlx˜/ Font Font definition Structure struct PadInfo { u_long button; int leftStickV, leftStickH; int rightStickV, rightStickH; u_char mode; }; Members rows, columns The number of rows and columns of characters that the fonttile texture uses. char_height, char_width The height and width (in pixels) that defines one character in the fonttile texture. tim_data The address in main ram that the fontile is stored. start_char, end_char The first and last characters represented in the fonttile texture. start_u, start_v Stores the start coordinates of the fonttile, set internally in LoadFont, no need to touch. spriteHandler Internal sprite handler, set internally in LoadFont, no need to touch. imageHandler Internal tim image handler, set internally in LoadFont, no need to touch. Comments This structure is the definition for a user font. The rows, columns, char_height, char_width, start_char, end_char and tim_data members must all be set up before the LoadFont function call is made. LoadFont Loads and initialises user font Format void LoadFont ( Font *Font ) Arguments Font Font structure to be loaded into. Return Value None Comments Loads the fonttile texture from main ram into video ram and sets up the Font structure internal members start_u, start_v, spriteHandler and imageHandler. Notes The rows, columns, char_height, char_width, start_char, end_char and tim_data members of the Font structure to be loaded into must all be set up before the LoadFont function call is made. ColFont Changes colour and transparency settings for font Format void ColFont ( u_char r, g, b, u_char trsp, Font *Font ) Arguments r, g, b, Red green and blue that the passed font is to be set to, 0-255, 128=original value. trsp, Set to 1 if you want to make the font transparent, 0 otherwise. Font Font that colour values are to be applied to. Return Value None Comments Allows alteration of colour values and transparency effects on fonts. DispFont Renders text to screen using user font Format void DispFont ( char *text, int x, y, Font *Font ) Arguments text String that is to be rendered to screen. x, y Position (in pixels) on screen that string is to start. Font Font that is to be used for rendering. Return Value None Comments Renders a string onto the current active screen buffer at specified position using passed font. Notes Any characters in the string that are not within the start_char-end_char range will be replaced with a blank space on render. See Also DispFontDX() DispFontDX Renders text to screen using user font Format void DispFontDX ( char *text, int x, y, short scalex, scaley, long rotate, Font *Font ) Arguments text String that is to be rendered to screen. x, y Position (in pixels) on screen that string is to start. scalex, scaley x and y direction scaling values, 4096=original size. Rotate rotation angle, 4096=1 degree. Font Font that is to be used for rendering. Return Value None Comments Deluxe version of DispFont, allows rotation and scaling of each char as well as standard font rendering, operates slower than DispFont. The rotate and scale values operate the same value on each character of the string, they are to allow wizzy graphical effects. Notes Any characters in the string that are not within the start_char-end_char range will be replaced with a blank space on render. See Also DispFont()