pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/editor thumb_cache.cxx,1.6,1.7


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor thumb_cache.cxx,1.6,1.7
Date: 23 Jun 2002 19:16:44 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv15884/editor

Modified Files:
        thumb_cache.cxx 
Log Message:
changed debug statements to use Pingus debug streams


Index: thumb_cache.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/thumb_cache.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- thumb_cache.cxx     23 Jun 2002 12:47:50 -0000      1.6
+++ thumb_cache.cxx     23 Jun 2002 19:16:42 -0000      1.7
@@ -26,6 +26,7 @@
 #include "../globals.hxx"
 #include "../blitter.hxx"
 #include "../system.hxx"
+#include "../debug.hxx"
 #include "../pingus_resource.hxx"
 #include "../math.hxx"
 #include "thumb_cache.hxx"
@@ -51,7 +52,7 @@
 {
   CL_Surface sur = PingusResource::load_surface (res_ident, datafile);
 
-  std::cout << "ThumbCache: Loading: " << res_ident << " (" << datafile << ")" 
 << std::endl;
+  pout << "ThumbCache: Loading: " << res_ident << " (" << datafile << ")"  << 
std::endl;
   
   // Add object to cache
   return ThumbCache::cache (sur, res_ident, datafile);
@@ -104,8 +105,8 @@
          
          if (read_size != buffer_size)
            {
-             if (pingus_debug_flags & PINGUS_DEBUG_EDITOR)
-               std::cerr << "ThumbCache: " << filename << ": read error: 
wanted " << buffer_size << " got " << read_size << std::endl;
+             perr(PINGUS_DEBUG_EDITOR) << "ThumbCache: " << filename << ": 
read error: wanted " 
+                                       << buffer_size << " got " << read_size 
<< std::endl;
              delete canvas;
              return uncached_load (res_ident, datafile);
            }
@@ -129,6 +130,7 @@
       && sur.get_provider ()->get_width () < 50)
     {
       // If the image is smaller than the thumbnail, there is no need to cache 
it
+      pout << "ThumbCache: image too small for cache: " << res_ident << 
std::endl;
       std::cout << "ThumbCache: image too small for cache: " << res_ident << 
std::endl;
       return sur;
     }
@@ -143,9 +145,8 @@
 
   unsigned int timestamp = PingusResource::get_mtime (res_ident, datafile);
 
-  std::cout <<"ThumbCache: Writing cache file: " << filename 
-           << " timestamp: " << timestamp
-           << std::endl;
+  pout << "ThumbCache: Writing cache file: " << filename 
+       << " timestamp: " << timestamp << std::endl;
   
   try 
     {
@@ -179,7 +180,7 @@
     }
   catch (CL_Error& err) 
     {
-      std::cout << "ThumbCache: Couldn't open file for writing: " << filename 
<< std::endl;
+      perr << "ThumbCache: Couldn't open file for writing: " << filename << 
std::endl;
       
       // If writing the surface fails, we return the surface without
       // writing it to the cache




reply via email to

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