Diff for /np2/win9xc/scrnmng.cpp between versions 1.3 and 1.5

version 1.3, 2003/12/08 00:55:34 version 1.5, 2004/03/23 18:34:05
Line 21  typedef struct { Line 21  typedef struct {
         LPDIRECTDRAWSURFACE     backsurf;          LPDIRECTDRAWSURFACE     backsurf;
         LPDIRECTDRAWCLIPPER     clipper;          LPDIRECTDRAWCLIPPER     clipper;
         LPDIRECTDRAWPALETTE     palette;          LPDIRECTDRAWPALETTE     palette;
         BYTE                            scrnmode;          UINT8                           enable;
           UINT8                           scrnmode;
         int                                     width;          int                                     width;
         int                                     height;          int                                     height;
         int                                     extend;          int                                     extend;
Line 30  typedef struct { Line 31  typedef struct {
         RECT                            rect;          RECT                            rect;
 #if defined(SUPPORT_16BPP)  #if defined(SUPPORT_16BPP)
         RGB32                           pal16mask;          RGB32                           pal16mask;
         BYTE                            r16b;          UINT8                           r16b;
         BYTE                            l16r;          UINT8                           l16r;
         BYTE                            l16g;          UINT8                           l16g;
           UINT8                           padding16;
 #endif  #endif
 #if defined(SUPPORT_8BPP)  #if defined(SUPPORT_8BPP)
         PALETTEENTRY            pal[256];          PALETTEENTRY            pal[256];
Line 287  void scrnmng_initialize(void) { Line 289  void scrnmng_initialize(void) {
         setwindowsize(640, 400);          setwindowsize(640, 400);
 }  }
   
 BOOL scrnmng_create(BYTE scrnmode) {  BOOL scrnmng_create(UINT8 scrnmode) {
   
         DWORD                   winstyle;          DWORD                   winstyle;
         DWORD                   winstyleex;          DWORD                   winstyleex;
Line 327  BOOL scrnmng_create(BYTE scrnmode) { Line 329  BOOL scrnmng_create(BYTE scrnmode) {
         ddraw.ddraw1->QueryInterface(IID_IDirectDraw2, (void **)&ddraw2);          ddraw.ddraw1->QueryInterface(IID_IDirectDraw2, (void **)&ddraw2);
         ddraw.ddraw2 = ddraw2;          ddraw.ddraw2 = ddraw2;
   
   #if defined(SUPPORT_PC9821)
           scrnmode |= SCRNMODE_HIGHCOLOR;
   #endif
         if (scrnmode & SCRNMODE_FULLSCREEN) {          if (scrnmode & SCRNMODE_FULLSCREEN) {
                 ddraw2->SetCooperativeLevel(hWndMain,                  ddraw2->SetCooperativeLevel(hWndMain,
                                         DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_ALLOWREBOOT);                                          DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN | DDSCL_ALLOWREBOOT);
                 if (!(scrnmode & SCRNMODE_HIGHCOLOR)) {                  if (!(scrnmode & SCRNMODE_HIGHCOLOR)) {
 #if defined(SUPPORT_8BPP)  #if defined(SUPPORT_8BPP)
                         bitcolor = 8;                          bitcolor = 8;
   #elif defined(SUPPORT_16BPP)
                           bitcolor = 16;
   #elif defined(SUPPORT_32BPP)
                           bitcolor = 32;
   #elif defined(SUPPORT_24BPP)
                           bitcolor = 24;
 #else  #else
                         goto scre_err;                          goto scre_err;
 #endif  #endif
Line 447  BOOL scrnmng_create(BYTE scrnmode) { Line 458  BOOL scrnmng_create(BYTE scrnmode) {
         }          }
         scrnmng.bpp = (BYTE)bitcolor;          scrnmng.bpp = (BYTE)bitcolor;
         scrnsurf.bpp = bitcolor;          scrnsurf.bpp = bitcolor;
           ddraw.enable = TRUE;
         ddraw.scrnmode = scrnmode;          ddraw.scrnmode = scrnmode;
         ddraw.width = 640;          ddraw.width = 640;
         ddraw.height = 480;          ddraw.height = 480;
Line 505  UINT16 scrnmng_makepal16(RGB32 pal32) { Line 517  UINT16 scrnmng_makepal16(RGB32 pal32) {
   
 void scrnmng_topwinui(void) {  void scrnmng_topwinui(void) {
   
         mouse_running(MOUSE_STOP);          mousemng_disable(MOUSEPROC_WINUI);
         if (!ddraw.cliping++) {                                                                                 // ver0.28          if (!ddraw.cliping++) {                                                                                 // ver0.28
                 if (scrnmng.flag & SCRNFLAG_FULLSCREEN) {                  if (scrnmng.flag & SCRNFLAG_FULLSCREEN) {
                         ddraw.primsurf->SetClipper(ddraw.clipper);                          ddraw.primsurf->SetClipper(ddraw.clipper);
Line 529  void scrnmng_clearwinui(void) { Line 541  void scrnmng_clearwinui(void) {
         if (scrnmng.flag & SCRNFLAG_FULLSCREEN) {          if (scrnmng.flag & SCRNFLAG_FULLSCREEN) {
                 clearoutfullscreen();                  clearoutfullscreen();
         }          }
         mouse_running(MOUSE_CONT);          mousemng_enable(MOUSEPROC_WINUI);
 }  }
   
 void scrnmng_setwidth(int posx, int width) {  void scrnmng_setwidth(int posx, int width) {
Line 628  void scrnmng_update(void) { Line 640  void scrnmng_update(void) {
         }          }
 }  }
   
   void scrnmng_restoresize(void) {
   
           if ((ddraw.enable) && (!(ddraw.scrnmode & SCRNMODE_FULLSCREEN))) {
                   renewalclientsize();
           }
   }
   

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


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