flFont.c File Reference

#include "flGlobal.h"
#include <string.h>
#include <stdio.h>
#include <pspgu.h>
#include <pspkernel.h>

Go to the source code of this file.

Functions

void fontInit ()
FontfontLoad (char *inPath)
bool fontSave (char *inPath, Font *inFont)
FontfontCreateTexture (Texture *inTex, int inHSpace, int inVSpace, u32 inColor)
FontfontCreateDebug (int inHSpace, int inVSpace, u32 inColor)
bool fontCreateDebugTex ()
void fontFree (Font *inFont)
int fontHeight (Font *inFont)
int fontCharWidth (Font *inFont, char inChar)
int fontStringWidth (Font *inFont, char *inString)
int fontStringHeight (Font *inFont, char *inString)
bool fontDraw2dChar (int inX, int inY, Font *inFont, char inChar)
void fontDraw2dString (int inX, int inY, Font *inFont, char *inString)
void fontDraw2dStringCenter (int inY, Font *inFont, char *inString)

Variables

u8 msx []
u8 * fontDebugTex = NULL
u8 * fontMonoPal = NULL
FontfontDefault = NULL


Function Documentation

int fontCharWidth ( Font inFont,
char  inChar 
)

Definition at line 245 of file flFont.c.

References ASCII_BS, ASCII_TAB, debugWarning, FL_FONT_TABWIDTH_DEFAULT, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontData, Font::fontFixedWidth, Font::fontType, and Texture::texWidth.

Referenced by fontDraw2dChar(), fontDraw2dString(), and fontStringWidth().

Font* fontCreateDebug ( int  inHSpace,
int  inVSpace,
u32  inColor 
)

Definition at line 117 of file flFont.c.

References debugWarning, FONT_TYPE_DEBUG, Font::fontBackColor, Font::fontColor, fontCreateDebugTex(), Font::fontData, Font::fontDataGlobal, fontDebugTex, Font::fontFixedWidth, Font::fontHSpace, Font::fontType, Font::fontVSpace, memAlloc, and NULL.

Referenced by fontInit().

bool fontCreateDebugTex (  ) 

Definition at line 143 of file flFont.c.

References debugError, fontDebugTex, fontMonoPal, graphicsSwizzleData(), memAlign, msx, and vmemAlloc.

Referenced by fontCreateDebug().

Font* fontCreateTexture ( Texture inTex,
int  inHSpace,
int  inVSpace,
u32  inColor 
)

Definition at line 90 of file flFont.c.

References debugWarning, FONT_TYPE_TEXTURE, Font::fontBackColor, Font::fontColor, Font::fontData, Font::fontDataGlobal, Font::fontFixedWidth, Font::fontHSpace, Font::fontType, Font::fontVSpace, memAlloc, and NULL.

Referenced by fontLoad().

bool fontDraw2dChar ( int  inX,
int  inY,
Font inFont,
char  inChar 
)

Definition at line 310 of file flFont.c.

References debugError, debugWarning, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontBackColor, fontCharWidth(), Font::fontColor, Font::fontData, fontDebugTex, fontHeight(), fontMonoPal, Font::fontType, NULL, palBound, palCreateMonoT4(), Palette::palData, palFree(), texBind(), texBound, Texture::texPalette, vertCVs::vertColor, vertTsVs::vertU, vertTsVs::vertV, vertCVs::vertX, vertTsVs::vertX, vertCVs::vertY, vertTsVs::vertY, vertCVs::vertZ, and vertTsVs::vertZ.

void fontDraw2dString ( int  inX,
int  inY,
Font inFont,
char *  inString 
)

Definition at line 435 of file flFont.c.

References ASCII_BS, ASCII_CR, ASCII_LF, ASCII_SPACE, ASCII_TAB, debugError, debugWarning, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontBackColor, fontCharWidth(), Font::fontColor, Font::fontData, fontDebugTex, fontHeight(), Font::fontHSpace, fontMonoPal, Font::fontType, Font::fontVSpace, NULL, palBound, palCreateMonoT4(), Palette::palData, palFree(), texBind(), texBound, Texture::texPalette, vertCVs::vertColor, vertTsVs::vertU, vertTsVs::vertV, vertTsVs::vertX, vertCVs::vertX, vertTsVs::vertY, vertCVs::vertY, vertTsVs::vertZ, and vertCVs::vertZ.

Referenced by fontDraw2dStringCenter(), graphicsSwapBuffers(), ntfyShowBattery(), ntfyShowTime(), and ntfyTrayShow().

void fontDraw2dStringCenter ( int  inY,
Font inFont,
char *  inString 
)

Definition at line 590 of file flFont.c.

References fontDraw2dString(), fontHeight(), fontStringWidth(), and SCREEN_WIDTH.

void fontFree ( Font inFont  ) 

Definition at line 206 of file flFont.c.

References debugWarning, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontData, Font::fontDataGlobal, Font::fontType, memFree, and texFree().

int fontHeight ( Font inFont  ) 

Definition at line 227 of file flFont.c.

References debugWarning, FONT_TYPE_DEBUG, FONT_TYPE_TEXTURE, FONT_TYPE_TEXTURE_MONO, Font::fontData, Font::fontType, and Texture::texHeight.

Referenced by fontDraw2dChar(), fontDraw2dString(), fontDraw2dStringCenter(), fontStringHeight(), ntfyShowBattery(), ntfyShowTime(), and ntfyTrayShow().

void fontInit (  ) 

Definition at line 38 of file flFont.c.

References FL_FONT_COLOR_DEFAULT, fontCreateDebug(), and fontDefault.

Referenced by flInitialize().

Font* fontLoad ( char *  inPath  ) 

Definition at line 42 of file flFont.c.

References ASCII_A, ASCII_Z, debugDevWarning, debugWarning, FL_FONT_COLOR_DEFAULT, FL_FONT_HSPACE_DEFAULT, FL_FONT_VSPACE_DEFAULT, fontCreateTexture(), Font::fontDataGlobal, NULL, and texLoad().

bool fontSave ( char *  inPath,
Font inFont 
)

Definition at line 82 of file flFont.c.

References debugDevWarning.

int fontStringHeight ( Font inFont,
char *  inString 
)

Definition at line 297 of file flFont.c.

References fontHeight().

int fontStringWidth ( Font inFont,
char *  inString 
)

Definition at line 277 of file flFont.c.

References ASCII_LF, ASCII_SPACE, fontCharWidth(), and Font::fontHSpace.

Referenced by fontDraw2dStringCenter(), and ntfyShowBattery().


Variable Documentation

u8* fontDebugTex = NULL

Definition at line 30 of file flFont.c.

Referenced by fontCreateDebug(), fontCreateDebugTex(), fontDraw2dChar(), and fontDraw2dString().

Font* fontDefault = NULL

Definition at line 36 of file flFont.c.

Referenced by fontInit(), graphicsSwapBuffers(), ntfyShowBattery(), ntfyShowTime(), and ntfyTrayShow().

u8* fontMonoPal = NULL

Definition at line 31 of file flFont.c.

Referenced by fontCreateDebugTex(), fontDraw2dChar(), and fontDraw2dString().

u8 msx[]

Referenced by fontCreateDebugTex().


Generated on Wed Sep 5 19:04:02 2007 for funcLib by  doxygen 1.5.1