Diff for /np2/generic/cmndraw.c between versions 1.3 and 1.4

version 1.3, 2004/03/10 02:42:51 version 1.4, 2004/03/10 07:41:48
Line 3 Line 3
 #include        "cpucore.h"  #include        "cpucore.h"
 #include        "font.h"  #include        "font.h"
 #include        "cmndraw.h"  #include        "cmndraw.h"
   #include        "minifont.res"
   
   
 void cmndraw_getpals(CMNPALFN *fn, CMNPAL *pal, UINT pals) {  void cmndraw_getpals(CMNPALFN *fn, CMNPAL *pal, UINT pals) {
Line 458  void cmddraw_fill(CMNVRAM *vram, int x,  Line 459  void cmddraw_fill(CMNVRAM *vram, int x, 
 void cmddraw_text8(CMNVRAM *vram, int x, int y, const char *str, CMNPAL *pal) {  void cmddraw_text8(CMNVRAM *vram, int x, int y, const char *str, CMNPAL *pal) {
   
         UINT    s;          UINT    s;
   const BYTE      *ptr;
         BYTE    src[10];          BYTE    src[10];
   
         if ((vram == NULL) || (str == NULL) || (pal == NULL)) {          if ((vram == NULL) || (str == NULL) || (pal == NULL)) {
                 return;                  return;
         }          }
         src[0] = 8;          src[0] = 0;
         src[1] = 8;          src[1] = 7;
         while(*str) {          while(*str) {
                 s = (UINT)(*str++);                  s = (UINT)(*str++);
                 CopyMemory(src + 2, fontrom + 0x82000 + (s * 16), 8);                  ptr = NULL;
                   if ((s >= 0x20) && (s < 0x80)) {
                           ptr = minifont + (s - 0x20) * 8;
                   }
                   else if ((s >= 0xa0) && (s < 0xe0)) {
                           ptr = minifont + (s - 0xa0 + 0x60) * 8;
                   }
                   if (ptr == NULL) {
                           continue;
                   }
                   src[0] = ptr[0];
                   CopyMemory(src + 2, ptr + 1, 7);
                 switch(vram->bpp) {                  switch(vram->bpp) {
 #if defined(SUPPORT_8BPP)  #if defined(SUPPORT_8BPP)
                         case 8:                          case 8:
Line 490  void cmddraw_text8(CMNVRAM *vram, int x, Line 503  void cmddraw_text8(CMNVRAM *vram, int x,
                                 break;                                  break;
 #endif  #endif
                 }                  }
                 x += 8;                  x += ptr[0] + 1;
         }          }
 }  }
   

Removed from v.1.3  
changed lines
  Added in v.1.4


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