Diff for /np2/font/font.c between versions 1.9 and 1.10

version 1.9, 2005/02/09 20:11:34 version 1.10, 2011/02/23 10:11:44
Line 1 Line 1
   /**
    * @file        font.c
    * @brief       CGROM and font loader
    *
    * @author      $Author$
    * @date        $Date$
    */
   
 #include        "compiler.h"  #include        "compiler.h"
 #include        "strres.h"  #include        "strres.h"
 #include        "dosio.h"  #include        "dosio.h"
Line 6 Line 14
 #include        "fontdata.h"  #include        "fontdata.h"
 #include        "fontmake.h"  #include        "fontmake.h"
   
   
 #ifndef FONTMEMORYBIND  #ifndef FONTMEMORYBIND
         UINT8   __font[0x84000];          UINT8   __font[0x84000];
 #endif  #endif
   
 static const OEMCHAR fonttmpname[] = OEMTEXT("font.tmp");  static const OEMCHAR fonttmpname[] = OEMTEXT("font.tmp");
   
   /**
    * Initializes CGROM
    */
 void font_initialize(void) {  void font_initialize(void) {
   
           ZeroMemory(fontrom, sizeof(fontrom));
           font_setchargraph(FALSE);
   }
   
   /**
    * Builds charactor graphics
    * @param[in] epson If this parameter is FALSE, patched NEC charactor
    */
   void font_setchargraph(BOOL epson) {
   
         UINT8   *p;          UINT8   *p;
         UINT8   *q;          UINT8   *q;
         UINT    i;          UINT    i;
         UINT    j;          UINT    j;
         UINT32  dbit;          UINT32  dbit;
   
         ZeroMemory(fontrom, sizeof(fontrom));  
         p = fontrom + 0x81000;          p = fontrom + 0x81000;
         q = fontrom + 0x82000;          q = fontrom + 0x82000;
         for (i=0; i<256; i++) {          for (i=0; i<256; i++) {
Line 41  void font_initialize(void) { Line 59  void font_initialize(void) {
                         q += 2;                          q += 2;
                 }                  }
         }          }
   
           if (!epson) {
                   *(UINT16 *)(fontrom + 0x81000 + (0xf2 * 16)) = 0;
                   fontrom[0x82000 + (0xf2 * 8)] = 0;
           }
 }  }
   
   /**
    * Retrieves the font type of the specified file.
    * @param[in] fname The name of the font file
    * @return font type
    */
 static UINT8 fonttypecheck(const OEMCHAR *fname) {  static UINT8 fonttypecheck(const OEMCHAR *fname) {
   
 const OEMCHAR   *p;  const OEMCHAR   *p;
Line 75  const OEMCHAR *p; Line 103  const OEMCHAR *p;
         return(FONTTYPE_NONE);          return(FONTTYPE_NONE);
 }  }
   
   /**
    * Loads font files
    * @param[in] filename The name of the font file
    * @param[in] force If this parameter is TRUE, load file always
    *                  If this parameter is FALSE, load when font is not ready
    * @return font type
    */
 UINT8 font_load(const OEMCHAR *filename, BOOL force) {  UINT8 font_load(const OEMCHAR *filename, BOOL force) {
   
         UINT    i;          UINT    i;
Line 154  const UINT8 *p; Line 189  const UINT8 *p;
         }          }
         return(type);          return(type);
 }  }
   

Removed from v.1.9  
changed lines
  Added in v.1.10


RetroPC.NET-CVS <cvs@retropc.net>