Diff for /np2/win9x/toolwin.cpp between versions 1.15 and 1.16

version 1.15, 2003/11/11 14:50:52 version 1.16, 2005/02/07 14:46:14
Line 70  typedef struct { Line 70  typedef struct {
         HWND                    hwnd;          HWND                    hwnd;
         WINLOCEX                wlex;          WINLOCEX                wlex;
         HBITMAP                 hbmp;          HBITMAP                 hbmp;
         BYTE                    fddaccess[2];          UINT8                   fddaccess[2];
         BYTE                    hddaccess;          UINT8                   hddaccess;
         BYTE                    _padding;          UINT8                   _padding;
         int                             winflg;          int                             winflg;
         int                             wingx;          int                             wingx;
         int                             wingy;          int                             wingy;
Line 103  static TOOLWIN  toolwin; Line 103  static TOOLWIN  toolwin;
   
 typedef struct {  typedef struct {
         WORD    idc;          WORD    idc;
         BYTE    *counter;          UINT8   *counter;
 } DISKACC;  } DISKACC;
   
 static const BYTE fddlist[FDDLIST_DRV] = {  static const UINT8 fddlist[FDDLIST_DRV] = {
                                         IDC_TOOLFDD1LIST, IDC_TOOLFDD2LIST};                                          IDC_TOOLFDD1LIST, IDC_TOOLFDD2LIST};
   
 static const DISKACC diskacc[3] = {  static const DISKACC diskacc[3] = {
Line 129  static HBITMAP skinload(const char *path Line 129  static HBITMAP skinload(const char *path
         toolskin.color1 = 0x600000;          toolskin.color1 = 0x600000;
         toolskin.color2 = 0xff0000;          toolskin.color2 = 0xff0000;
         if (path) {          if (path) {
                 ini_read(path, skintitle, skinini1, sizeof(skinini1)/sizeof(INITBL));                  ini_read(path, skintitle, skinini1, NELEMENTS(skinini1));
         }          }
         if (toolskin.main[0]) {          if (toolskin.main[0]) {
                 ZeroMemory(subitem, sizeof(defsubitem));                  ZeroMemory(subitem, sizeof(defsubitem));
Line 142  static HBITMAP skinload(const char *path Line 142  static HBITMAP skinload(const char *path
                 CopyMemory(subitem, defsubitem, sizeof(defsubitem));                  CopyMemory(subitem, defsubitem, sizeof(defsubitem));
         }          }
         if (path) {          if (path) {
                 ini_read(path, skintitle, skinini2, sizeof(skinini2)/sizeof(INITBL));                  ini_read(path, skintitle, skinini2, NELEMENTS(skinini2));
         }          }
         if (toolskin.main[0]) {          if (toolskin.main[0]) {
                 milstr_ncpy(fname, path, sizeof(fname));                  milstr_ncpy(fname, path, sizeof(fname));
Line 300  static void remakefddlist(HWND hwnd, TOO Line 300  static void remakefddlist(HWND hwnd, TOO
         setlist(hwnd, fdd, sel);          setlist(hwnd, fdd, sel);
 }  }
   
 static void accdraw(HWND hWnd, BYTE count) {  static void accdraw(HWND hWnd, UINT8 count) {
   
         HDC                     hdc;          HDC                     hdc;
         PAINTSTRUCT     ps;          PAINTSTRUCT     ps;
Line 940  HWND toolwin_gethwnd(void) { Line 940  HWND toolwin_gethwnd(void) {
         return(toolwin.hwnd);          return(toolwin.hwnd);
 }  }
   
 void toolwin_setfdd(BYTE drv, const char *name) {  void toolwin_setfdd(UINT8 drv, const char *name) {
   
         TOOLFDD *fdd;          TOOLFDD *fdd;
         char    *q;          char    *q;
Line 983  void toolwin_setfdd(BYTE drv, const char Line 983  void toolwin_setfdd(BYTE drv, const char
         }          }
 }  }
   
 static void setdiskacc(UINT num, BYTE count) {  static void setdiskacc(UINT num, UINT8 count) {
   
 const DISKACC   *acc;  const DISKACC   *acc;
         HWND            sub;          HWND            sub;
Line 991  const DISKACC *acc; Line 991  const DISKACC *acc;
         if (toolwin.hwnd == NULL) {          if (toolwin.hwnd == NULL) {
                 return;                  return;
         }          }
         if (num < (sizeof(diskacc)/sizeof(DISKACC))) {          if (num < NELEMENTS(diskacc)) {
                 acc = diskacc + num;                  acc = diskacc + num;
                 sub = NULL;                  sub = NULL;
                 if (*(acc->counter) == 0) {                  if (*(acc->counter) == 0) {
Line 1004  const DISKACC *acc; Line 1004  const DISKACC *acc;
         }          }
 }  }
   
 void toolwin_fddaccess(BYTE drv) {  void toolwin_fddaccess(UINT8 drv) {
   
         if (drv < 2) {          if (drv < 2) {
                 setdiskacc(drv, 20);                  setdiskacc(drv, 20);
         }          }
 }  }
   
 void toolwin_hddaccess(BYTE drv) {  void toolwin_hddaccess(UINT8 drv) {
   
         setdiskacc(2, 10);          setdiskacc(2, 10);
 }  }
   
 void toolwin_draw(BYTE frame) {  void toolwin_draw(UINT8 frame) {
   
 const DISKACC   *acc;  const DISKACC   *acc;
 const DISKACC   *accterm;  const DISKACC   *accterm;
         BYTE            counter;          UINT8           counter;
         HWND            sub;          HWND            sub;
   
         if (toolwin.hwnd == NULL) {          if (toolwin.hwnd == NULL) {
Line 1030  const DISKACC *accterm; Line 1030  const DISKACC *accterm;
                 frame = 1;                  frame = 1;
         }          }
         acc = diskacc;          acc = diskacc;
         accterm = acc + (sizeof(diskacc)/sizeof(DISKACC));          accterm = acc + NELEMENTS(diskacc);
         while(acc < accterm) {          while(acc < accterm) {
                 counter = *acc->counter;                  counter = *acc->counter;
                 if (counter) {                  if (counter) {
Line 1089  void toolwin_readini(void) { Line 1089  void toolwin_readini(void) {
         np2tool.posy = CW_USEDEFAULT;          np2tool.posy = CW_USEDEFAULT;
         np2tool.type = 1;          np2tool.type = 1;
         initgetfile(path, sizeof(path));          initgetfile(path, sizeof(path));
         ini_read(path, ini_title, iniitem, sizeof(iniitem)/sizeof(INITBL));          ini_read(path, ini_title, iniitem, NELEMENTS(iniitem));
 }  }
   
 void toolwin_writeini(void) {  void toolwin_writeini(void) {
Line 1097  void toolwin_writeini(void) { Line 1097  void toolwin_writeini(void) {
         char    path[MAX_PATH];          char    path[MAX_PATH];
   
         initgetfile(path, sizeof(path));          initgetfile(path, sizeof(path));
         ini_write(path, ini_title, iniitem, sizeof(iniitem)/sizeof(INITBL));          ini_write(path, ini_title, iniitem, NELEMENTS(iniitem));
 }  }
   

Removed from v.1.15  
changed lines
  Added in v.1.16


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