pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] rev 2310 - trunk/src


From: Ingo Ruhnke
Subject: [Pingus-CVS] rev 2310 - trunk/src
Date: Fri, 07 May 2004 00:24:21 +0200

Author: grumbel
Date: 2004-05-07 00:24:21 +0200 (Fri, 07 May 2004)
New Revision: 2310

Modified:
   trunk/src/spot_map.cxx
Log:


Modified: trunk/src/spot_map.cxx
===================================================================
--- trunk/src/spot_map.cxx      2004-05-06 22:07:34 UTC (rev 2309)
+++ trunk/src/spot_map.cxx      2004-05-06 22:24:21 UTC (rev 2310)
@@ -82,25 +82,24 @@
 MapTileSurface::check_empty()
 {
   // FIXME: obsolete
-  CL_PixelBuffer provider = surface.get_pixeldata();
-  unsigned char* buffer;
+  unsigned char* bufptr;
   int lenght;
 
   empty = true;
 
-  provider.lock();
-  lenght = provider.get_pitch() * provider.get_height();
-  buffer = static_cast<unsigned char*>(provider.get_data());
+  buffer.lock();
+  lenght = buffer.get_pitch() * buffer.get_height();
+  bufptr = static_cast<unsigned char*>(buffer.get_data());
 
   // Jumping 4 steps because of RGBA
   for(int i=0; i < lenght; i += 4) {
-    if (buffer[i] != 0) {
+    if (bufptr[i] != 0) {
       empty = false;
       return;
     }
   }
 
-  surface.get_pixeldata().unlock();
+  buffer.unlock();
 }
 
 PingusSpotMap::PingusSpotMap(PLF* plf)
@@ -381,7 +380,7 @@
     {
       for(int iy = start_y; iy <= end_y; ++iy)
        {
-         if (tile[ix][iy].surface == 0)
+         if (!tile[ix][iy].surface)
            {
              CL_PixelBuffer canvas(tile_size, tile_size, tile_size * 4, 
CL_PixelFormat::rgba8888);
               





reply via email to

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