diff engine/core/util/resource/resource.i @ 677:bb26a76458c6

* Modified a calculation in PointType2D to use the FIFE math function * Replaced a #define with an enum for the resource location type * Exposed ResourceLocation::getType() to python
author prock@33b003aa-7bff-0310-803a-e67f0ece8222
date Fri, 12 Nov 2010 03:10:46 +0000
parents b84dbc4665b0
children
line wrap: on
line diff
--- a/engine/core/util/resource/resource.i	Tue Nov 09 21:39:45 2010 +0000
+++ b/engine/core/util/resource/resource.i	Fri Nov 12 03:10:46 2010 +0000
@@ -1,6 +1,6 @@
 /***************************************************************************
- *   Copyright (C) 2005-2008 by the FIFE team                              *
- *   http://www.fifengine.de                                               *
+ *   Copyright (C) 2005-2010 by the FIFE team                              *
+ *   http://www.fifengine.net                                              *
  *   This file is part of FIFE.                                            *
  *                                                                         *
  *   FIFE is free software; you can redistribute it and/or                 *
@@ -29,6 +29,12 @@
 
 namespace FIFE {
 
+	enum ResourceLocationType {
+		RES_TYPE_FILE = 0,
+		RES_TYPE_IMAGE = 1
+	};
+	
+	
 	class ResourceLocation {
 	public:
 		ResourceLocation(const std::string& filename);
@@ -37,9 +43,8 @@
 		virtual bool operator ==(const ResourceLocation& loc) const;
 		virtual bool operator <(const ResourceLocation& loc) const;
 		virtual ResourceLocation* clone() const;
-
-	private:
-		ResourceLocation(const std::string& filename);
+		
+		ResourceLocationType getType() const;
 	};
 
 
@@ -77,9 +82,6 @@
 		virtual void save(const std::string& filename, IResource* resource) { save(ResourceLocation(filename), resource); }
 	};
 
-
-	enum { RES_LOADED = 0x01, RES_NON_LOADED  = 0x02};
-
 	class Pool {
 	public:
 		static const int INVALID_ID = -1;