adonthell-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Adonthell-commits] CVS: adonthell/src image.cc,1.12,1.13 main.cc,1.47,1


From: Alexandre Courbot <address@hidden>
Subject: [Adonthell-commits] CVS: adonthell/src image.cc,1.12,1.13 main.cc,1.47,1.48 screen.cc,1.14,1.15 screen.h,1.23,1.24 surface.cc,1.10,1.11
Date: Sat, 15 Jun 2002 04:37:27 -0400

Update of /cvsroot/adonthell/adonthell/src
In directory subversions:/tmp/cvs-serv21767/src

Modified Files:
        image.cc main.cc screen.cc screen.h surface.cc 
Log Message:
Just synchronized my source tree with the CVS


Index: image.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/image.cc,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** image.cc    26 May 2002 09:27:27 -0000      1.12
--- image.cc    15 Jun 2002 08:37:25 -0000      1.13
***************
*** 28,35 ****
  
  #if SDL_BYTEORDER == SDL_BIG_ENDIAN
! #define R_MASK 0xff000000
! #define G_MASK 0x00ff0000
! #define B_MASK 0x0000ff00
! #define A_MASK 0x000000ff
  #else
  #define R_MASK 0x000000ff
--- 28,35 ----
  
  #if SDL_BYTEORDER == SDL_BIG_ENDIAN
! #define R_MASK 0x00ff0000
! #define G_MASK 0x0000ff00
! #define B_MASK 0x000000ff
! #define A_MASK 0xff000000
  #else
  #define R_MASK 0x000000ff

Index: main.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/main.cc,v
retrieving revision 1.47
retrieving revision 1.48
diff -C2 -r1.47 -r1.48
*** main.cc     26 May 2002 09:27:27 -0000      1.47
--- main.cc     15 Jun 2002 08:37:25 -0000      1.48
***************
*** 131,136 ****
  
      // init video subsystem
!     screen::set_video_mode (320, 240, 0, myconfig.double_screen);
!     screen::set_fullscreen (myconfig.screen_mode); 
       
      // init audio subsystem
--- 131,137 ----
  
      // init video subsystem
!     screen::set_video_mode (320, 240, 0, myconfig.double_screen, 
myconfig.screen_mode);
! 
!     printf("%s\n", screen::info().c_str());
       
      // init audio subsystem

Index: screen.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/screen.cc,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** screen.cc   27 Apr 2002 17:00:19 -0000      1.14
--- screen.cc   15 Jun 2002 08:37:25 -0000      1.15
***************
*** 36,40 ****
  bool screen::dblmode;
  
! void screen::set_video_mode (u_int16 nl, u_int16 nh, u_int8 depth = 0, bool 
dbl = false)
  {
      u_int8 bpp;
--- 36,40 ----
  bool screen::dblmode;
  
! void screen::set_video_mode (u_int16 nl, u_int16 nh, u_int8 depth = 0, bool 
dbl = false, bool fscreen = false)
  {
      u_int8 bpp;
***************
*** 42,48 ****
      u_int8 emulated = depth; 
      
      dblmode = dbl;
  
!     if (SDL_Init (SDL_INIT_VIDEO) < 0)
      {
          fprintf (stderr, "couldn't init display: %s\n", SDL_GetError ());
--- 42,54 ----
      u_int8 emulated = depth; 
      
+     if (fscreen) 
+     {
+         SDL_flags |= SDL_FULLSCREEN;
+         fullscreen_ = true;
+     }
+ 
      dblmode = dbl;
  
!     if (SDL_Init (SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0)
      {
          fprintf (stderr, "couldn't init display: %s\n", SDL_GetError ());
***************
*** 56,60 ****
  
      if ((emulated) && (bpp) && (bpp != depth)) bpp = depth; 
!     
      switch (bpp)
      {
--- 62,66 ----
  
      if ((emulated) && (bpp) && (bpp != depth)) bpp = depth; 
! 
      switch (bpp)
      {
***************
*** 107,111 ****
--- 113,122 ----
      ostrstream temp; 
  
+     const int driver_name_length = 500;
+     char drv_name[driver_name_length];
+ 
      temp << "Video information: \n"
+          << "Video driver used:                   " << 
SDL_VideoDriverName(drv_name, driver_name_length) << endl
+          << "Internal game depth:                 " << bytes_per_pixel_ * 8 
<< endl
           << "Can create hardware surfaces:        " << (vi->hw_available ? 
"Yes" : "No") << endl
           << "Window manager available:            " << (vi->wm_available ? 
"Yes" : "No") << endl
***************
*** 118,121 ****
--- 129,134 ----
           << "Color fill blits accelerated:        " << (vi->blit_fill ? "Yes" 
: "No") << endl
           << "Total video memory available:        " << vi->video_mem << " Kb" 
<< endl 
+          << "Using double size:                   " << (dblmode ? "Yes" : 
"No") << endl
+          << "Fullscreen:                          " << (fullscreen_ ? "Yes" : 
"No") << endl
           << ends;
  

Index: screen.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/screen.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** screen.h    27 Apr 2002 17:00:19 -0000      1.23
--- screen.h    15 Jun 2002 08:37:25 -0000      1.24
***************
*** 58,62 ****
       *  @param depth desired screen depth.
       */ 
!     static void set_video_mode (u_int16 nl, u_int16 nh, u_int8 depth = 0, 
bool dbl = false);
  
      /** Returns the length of the screen.
--- 58,62 ----
       *  @param depth desired screen depth.
       */ 
!     static void set_video_mode (u_int16 nl, u_int16 nh, u_int8 depth = 0, 
bool dbl = false, bool fscreen = false);
  
      /** Returns the length of the screen.

Index: surface.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/surface.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** surface.cc  27 Apr 2002 17:00:19 -0000      1.10
--- surface.cc  15 Jun 2002 08:37:25 -0000      1.11
***************
*** 153,157 ****
              break;
          }
!     }     
      changed = true; 
  }
--- 153,166 ----
              break;
          }
!         case 4:
!             *((Uint32 *)(offset)) = (Uint32) col;
!             if (screen::dblmode)
!             {
!                 *((Uint32 *) (offset+vis->format->BytesPerPixel)) = (Uint32) 
col;
!                 *((Uint32 *) (offset+vis->pitch)) = (Uint32) col;
!                 *((Uint32 *) (offset+vis->pitch+vis->format->BytesPerPixel)) 
= (Uint32) col;
!             }
!             break;
!     }
      changed = true; 
  }
***************
*** 321,324 ****
--- 330,342 ----
              break;
          }
+         case 4:
+             *((Uint32 *)(offset)) = (Uint32) col;
+             if (screen::dblmode)
+             {
+                 *((Uint32 *) (offset+vis->format->BytesPerPixel)) = (Uint32) 
col;
+                 *((Uint32 *) (offset+vis->pitch)) = (Uint32) col;
+                 *((Uint32 *) (offset+vis->pitch+vis->format->BytesPerPixel)) 
= (Uint32) col;
+             }
+             break;
      }     
      changed = true; 
***************
*** 359,362 ****
--- 377,383 ----
              break;
          }
+         case 4:
+             col = *((Uint32 *)(offset));
+             break;
      }
  }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]