int FONT_Load( const char *p_pFileName, struct FONT **p_ppFont ) { FILE *pFontFile; if( *( p_ppFont ) ) { FONT_Destroy( p_ppFont ); } if( p_pFileName == NULL ) { return 1; } if( strlen( p_pFileName ) == 0 ) { return 1; } /* Other than checking if the file exists, there is very little error * checking, so be careful! * * Font file resources are as follows: * Glyph set * --------- * Number of glyphs in the set * foreach glyph in glyphset * Read: x, y, advance, bearing, width, height, character * Append new glyph to last glyph read * * Glyph set data is stored as binary data, use glyphbin to convert the * glyph set into a binary file. If not already performed, bmp2img will * convert a bitmap (.BMP) file to an IMAGE-based file. When both the * glyphs and image are ready, use the glyphimg program to merge the image * and glyph set into a font file * * IMAGE-formatted image data */ return 0; }
int Main (void) { static char szAppName[] = MAIN_NAME ; char *cFilePart ; // get installed path if (! SearchPath (NULL, MAIN_EXE, NULL, MSG_SIZE, InstallDir, &cFilePart)) { GetCurrentDirectory (MSG_SIZE, InstallDir) ; } // initialize system SYS_Init () ; // initialize coordinate TOOLBOX_InitCoord () ; // initialize font FONT_Init () ; // initialize telnet variables TELNET_Init () ; // initialize timeseal TIMESEAL_Init () ; // initialize history HISTORY_Init () ; // initialize script SCRIPT_Init () ; // initialize state STATE_Init () ; // initialize command COMMAND_Init () ; // initialize player PLAYER_Init () ; // initialize group GROUP_Init () ; // initialize arb ARB_Init () ; // initialize ini INI_Init () ; // initialize queue QUEUE_Init () ; // read from SETUP.TXT INI_ReadSys () ; // setup server address TIMESEAL_SetServerAddress () ; // create font FONT_Create () ; // connect TIMESEAL_Load () ; // load window coordinate TOOLBOX_LoadWindowCoord () ; // setup window title TOOLBOX_SetupWinTitle () ; // get message while (1) { IDLE_Proc () ; } // destroy font FONT_Destroy () ; // write into SETUP.TXT INI_WriteSys () ; // quit return 0; }