pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r3723 - trunk/pingus/src


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3723 - trunk/pingus/src
Date: Tue, 8 Jul 2008 01:21:24 +0200

Author: grumbel
Date: 2008-07-08 01:21:23 +0200 (Tue, 08 Jul 2008)
New Revision: 3723

Modified:
   trunk/pingus/src/resource.cpp
   trunk/pingus/src/resource.hpp
Log:
Unused code removed

Modified: trunk/pingus/src/resource.cpp
===================================================================
--- trunk/pingus/src/resource.cpp       2008-07-07 15:21:34 UTC (rev 3722)
+++ trunk/pingus/src/resource.cpp       2008-07-07 23:21:23 UTC (rev 3723)
@@ -14,12 +14,6 @@
 //  You should have received a copy of the GNU General Public License
 //  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-#ifndef WIN32
-#  include <unistd.h>
-#  include <sys/types.h>
-#  include <sys/stat.h>
-#endif
-
 #include <assert.h>
 
 #include "system.hpp"
@@ -33,9 +27,6 @@
 #include "debug.hpp"
 
 ResourceManager Resource::resmgr;
-#if 0
-std::map<ResDescriptor, CL_Surface>       Resource::surface_map;
-#endif
 
 void
 Resource::init()
@@ -68,34 +59,10 @@
 }
 
 // Returns all resources in the given section
-#if 0
-std::vector<std::string>
-Resource::get_resources(const std::string& type, const std::string& section)
-{
-  if (section == "")
-    return resmgr.get_resources_of_type(type);
-  else
-    return resmgr.get_resources_of_type(type, section);
-}
 
-// Returns a list of sections.  Returns all sections if left blank.
-std::vector<std::string>
-Resource::get_sections(const std::string& section)
-{
-  if (section == std::string())
-    return resmgr.get_all_sections();
-  else
-    return resmgr.get_sections(section);
-}
-#endif
-
 void
 Resource::deinit()
 {
-  cleanup();
-#if 0
-  surface_map.clear();
-#endif
 }
 
 SpriteDescription*
@@ -147,25 +114,10 @@
   return Font(desc);
 }
 
-void
-Resource::cleanup ()
-{
-#if 0
-  CL_Resource res;
-  std::vector<std::string> resources = resmgr.get_all_resources();
-  for (std::vector<std::string>::iterator i = resources.begin(); i != 
resources.end(); i++)
-    {
-      res = resmgr.get_resource(*i);
-      while (res.get_reference_count() > 0)
-        res.unload();
-    }
-#endif
-}
-
 Sprite
 Resource::load_thumb_sprite(const std::string& name)
 {
-  Sprite sprite = Sprite(name);
+  Sprite sprite(name);
 
   Size thumb_size;
   if (sprite.get_width() <= 48)

Modified: trunk/pingus/src/resource.hpp
===================================================================
--- trunk/pingus/src/resource.hpp       2008-07-07 15:21:34 UTC (rev 3722)
+++ trunk/pingus/src/resource.hpp       2008-07-07 23:21:23 UTC (rev 3723)
@@ -25,12 +25,7 @@
 #include "resource_manager.hpp"
 #include "collision_mask.hpp"
 #include "font.hpp"
-
-class CL_ResourceManager;
-
-/** General Resource Managing class, it provides wrappers around
-    CL_Surface::load(), CL_Font::load() and friends.  This class is
-    needed to do a better handling of the resources. */
+
 class Resource
 {
 public:
@@ -54,15 +49,11 @@
   /** Load a font with res_name from datafile */
   static Font          load_font(const std::string& res_name);
 
-  /** Cleanup all currently unused surfaces */
-  static void cleanup ();
-
 private:
   Resource (const Resource&);
   Resource& operator= (const Resource&);
 };
-
-
+
 #endif
 
 /* EOF */





reply via email to

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