|
@@ -4,14 +4,26 @@ class Resource
|
|
|
{
|
|
{
|
|
|
bool Load(Deserializer& source);
|
|
bool Load(Deserializer& source);
|
|
|
bool Save(Serializer& dest) const;
|
|
bool Save(Serializer& dest) const;
|
|
|
- bool Load(const String& fileName);
|
|
|
|
|
- bool Save(const String& fileName) const;
|
|
|
|
|
-
|
|
|
|
|
|
|
+ tolua_outside bool ResourceLoad @ Load(const String& fileName);
|
|
|
|
|
+ tolua_outside bool ResourceSave @ Save(const String& fileName) const;
|
|
|
|
|
+
|
|
|
const String GetName() const;
|
|
const String GetName() const;
|
|
|
StringHash GetNameHash() const;
|
|
StringHash GetNameHash() const;
|
|
|
unsigned GetMemoryUse() const;
|
|
unsigned GetMemoryUse() const;
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
tolua_readonly tolua_property__get_set String name;
|
|
tolua_readonly tolua_property__get_set String name;
|
|
|
tolua_readonly tolua_property__get_set StringHash nameHash;
|
|
tolua_readonly tolua_property__get_set StringHash nameHash;
|
|
|
tolua_readonly tolua_property__get_set unsigned memoryUse;
|
|
tolua_readonly tolua_property__get_set unsigned memoryUse;
|
|
|
};
|
|
};
|
|
|
|
|
+
|
|
|
|
|
+${
|
|
|
|
|
+static bool ResourceLoad(Resource* resource, const String& fileName)
|
|
|
|
|
+{
|
|
|
|
|
+ return resource->LoadFile(fileName);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+static bool ResourceSave(const Resource* resource, const String& fileName)
|
|
|
|
|
+{
|
|
|
|
|
+ return resource->SaveFile(fileName);
|
|
|
|
|
+}
|
|
|
|
|
+$}
|