src/video/nanox/SDL_nximage.c
branchSDL-1.3
changeset 1668 4da1ee79c9af
parent 1662 782fd950bd46
     1.1 --- a/src/video/nanox/SDL_nximage.c	Mon May 29 03:53:21 2006 +0000
     1.2 +++ b/src/video/nanox/SDL_nximage.c	Mon May 29 04:04:35 2006 +0000
     1.3 @@ -29,13 +29,13 @@
     1.4  #include "SDL_nximage_c.h"
     1.5  
     1.6  void
     1.7 -NX_NormalUpdate (_THIS, int numrects, SDL_Rect * rects)
     1.8 +NX_NormalUpdate(_THIS, int numrects, SDL_Rect * rects)
     1.9  {
    1.10      int i, j, xinc, yinc, destinc, rowinc;
    1.11      int x, y, w, h;
    1.12      unsigned char *src = NULL, *dest = NULL;
    1.13  
    1.14 -    Dprintf ("enter NX_NormalUpdate\n");
    1.15 +    Dprintf("enter NX_NormalUpdate\n");
    1.16  
    1.17      /* These are the values for the incoming image */
    1.18      xinc = this->screen->format->BytesPerPixel;
    1.19 @@ -106,38 +106,38 @@
    1.20  #endif
    1.21          else {
    1.22              for (j = h; j > 0; --j, src += yinc, dest += destinc)
    1.23 -                SDL_memcpy (dest, src, rowinc);
    1.24 +                SDL_memcpy(dest, src, rowinc);
    1.25          }
    1.26          if (!Clientfb) {
    1.27              if (currently_fullscreen) {
    1.28 -                GrArea (FSwindow, SDL_GC, x + OffsetX, y + OffsetY, w,
    1.29 -                        h, Image_buff, pixel_type);
    1.30 +                GrArea(FSwindow, SDL_GC, x + OffsetX, y + OffsetY, w,
    1.31 +                       h, Image_buff, pixel_type);
    1.32              } else {
    1.33 -                GrArea (SDL_Window, SDL_GC, x, y, w, h, Image_buff,
    1.34 -                        pixel_type);
    1.35 +                GrArea(SDL_Window, SDL_GC, x, y, w, h, Image_buff,
    1.36 +                       pixel_type);
    1.37              }
    1.38          }
    1.39      }
    1.40 -    GrFlush ();
    1.41 +    GrFlush();
    1.42  
    1.43 -    Dprintf ("leave NX_NormalUpdate\n");
    1.44 +    Dprintf("leave NX_NormalUpdate\n");
    1.45  }
    1.46  
    1.47  int
    1.48 -NX_SetupImage (_THIS, SDL_Surface * screen)
    1.49 +NX_SetupImage(_THIS, SDL_Surface * screen)
    1.50  {
    1.51      int size = screen->h * screen->pitch;
    1.52  
    1.53 -    Dprintf ("enter NX_SetupImage\n");
    1.54 +    Dprintf("enter NX_SetupImage\n");
    1.55  
    1.56 -    screen->pixels = (void *) SDL_malloc (size);
    1.57 +    screen->pixels = (void *) SDL_malloc(size);
    1.58  
    1.59      if (!Clientfb) {
    1.60 -        Image_buff = (unsigned char *) SDL_malloc (size);
    1.61 +        Image_buff = (unsigned char *) SDL_malloc(size);
    1.62          if (screen->pixels == NULL || Image_buff == NULL) {
    1.63 -            SDL_free (screen->pixels);
    1.64 -            SDL_free (Image_buff);
    1.65 -            SDL_OutOfMemory ();
    1.66 +            SDL_free(screen->pixels);
    1.67 +            SDL_free(Image_buff);
    1.68 +            SDL_OutOfMemory();
    1.69              return -1;
    1.70          }
    1.71      }
    1.72 @@ -146,37 +146,37 @@
    1.73  
    1.74      this->UpdateRects = NX_NormalUpdate;
    1.75  
    1.76 -    Dprintf ("leave NX_SetupImage\n");
    1.77 +    Dprintf("leave NX_SetupImage\n");
    1.78      return 0;
    1.79  }
    1.80  
    1.81  void
    1.82 -NX_DestroyImage (_THIS, SDL_Surface * screen)
    1.83 +NX_DestroyImage(_THIS, SDL_Surface * screen)
    1.84  {
    1.85 -    Dprintf ("enter NX_DestroyImage\n");
    1.86 +    Dprintf("enter NX_DestroyImage\n");
    1.87  
    1.88      if (SDL_Image)
    1.89 -        SDL_free (SDL_Image);
    1.90 +        SDL_free(SDL_Image);
    1.91      if (Image_buff)
    1.92 -        SDL_free (Image_buff);
    1.93 +        SDL_free(Image_buff);
    1.94      if (screen)
    1.95          screen->pixels = NULL;
    1.96  
    1.97 -    Dprintf ("leave NX_DestroyImage\n");
    1.98 +    Dprintf("leave NX_DestroyImage\n");
    1.99  }
   1.100  
   1.101  int
   1.102 -NX_ResizeImage (_THIS, SDL_Surface * screen, Uint32 flags)
   1.103 +NX_ResizeImage(_THIS, SDL_Surface * screen, Uint32 flags)
   1.104  {
   1.105      int retval;
   1.106      GR_SCREEN_INFO si;
   1.107  
   1.108 -    Dprintf ("enter NX_ResizeImage\n");
   1.109 +    Dprintf("enter NX_ResizeImage\n");
   1.110  
   1.111 -    NX_DestroyImage (this, screen);
   1.112 -    retval = NX_SetupImage (this, screen);
   1.113 +    NX_DestroyImage(this, screen);
   1.114 +    retval = NX_SetupImage(this, screen);
   1.115  
   1.116 -    GrGetScreenInfo (&si);
   1.117 +    GrGetScreenInfo(&si);
   1.118      OffsetX = (si.cols - screen->w) / 2;
   1.119      OffsetY = (si.rows - screen->h) / 2;
   1.120  
   1.121 @@ -184,19 +184,19 @@
   1.122      if (Clientfb) {
   1.123          /* Get current window position and fb pointer */
   1.124          if (currently_fullscreen)
   1.125 -            GrGetWindowFBInfo (FSwindow, &fbinfo);
   1.126 +            GrGetWindowFBInfo(FSwindow, &fbinfo);
   1.127          else
   1.128 -            GrGetWindowFBInfo (SDL_Window, &fbinfo);
   1.129 +            GrGetWindowFBInfo(SDL_Window, &fbinfo);
   1.130      }
   1.131  #endif
   1.132 -    Dprintf ("leave NX_ResizeImage\n");
   1.133 +    Dprintf("leave NX_ResizeImage\n");
   1.134      return retval;
   1.135  }
   1.136  
   1.137  void
   1.138 -NX_RefreshDisplay (_THIS)
   1.139 +NX_RefreshDisplay(_THIS)
   1.140  {
   1.141 -    Dprintf ("enter NX_RefreshDisplay\n");
   1.142 +    Dprintf("enter NX_RefreshDisplay\n");
   1.143  
   1.144      // Don't refresh a display that doesn't have an image (like GL)
   1.145      if (!SDL_Image) {
   1.146 @@ -208,7 +208,7 @@
   1.147          char *src, *dest = NULL;
   1.148          int xinc, yinc, rowinc;
   1.149  
   1.150 -        GrGetWindowFBInfo (SDL_Window, &fbinfo);
   1.151 +        GrGetWindowFBInfo(SDL_Window, &fbinfo);
   1.152  
   1.153          xinc = this->screen->format->BytesPerPixel;
   1.154          yinc = this->screen->pitch;
   1.155 @@ -223,21 +223,21 @@
   1.156  
   1.157          for (j = this->screen->h; j > 0;
   1.158               --j, src += yinc, dest += fbinfo.pitch)
   1.159 -            SDL_memcpy (dest, src, rowinc);
   1.160 +            SDL_memcpy(dest, src, rowinc);
   1.161      } else
   1.162  #endif
   1.163      {
   1.164          if (currently_fullscreen) {
   1.165 -            GrArea (FSwindow, SDL_GC, OffsetX, OffsetY, this->screen->w,
   1.166 -                    this->screen->h, SDL_Image, pixel_type);
   1.167 +            GrArea(FSwindow, SDL_GC, OffsetX, OffsetY, this->screen->w,
   1.168 +                   this->screen->h, SDL_Image, pixel_type);
   1.169          } else {
   1.170 -            GrArea (SDL_Window, SDL_GC, 0, 0, this->screen->w,
   1.171 -                    this->screen->h, SDL_Image, pixel_type);
   1.172 +            GrArea(SDL_Window, SDL_GC, 0, 0, this->screen->w,
   1.173 +                   this->screen->h, SDL_Image, pixel_type);
   1.174          }
   1.175      }
   1.176 -    GrFlush ();
   1.177 +    GrFlush();
   1.178  
   1.179 -    Dprintf ("leave NX_RefreshDisplay\n");
   1.180 +    Dprintf("leave NX_RefreshDisplay\n");
   1.181  }
   1.182  
   1.183  /* vi: set ts=4 sw=4 expandtab: */