Browse Source

ASSET -> URHO3D_ASSET

Ivan K 10 years ago
parent
commit
d78219d014
3 changed files with 6 additions and 6 deletions
  1. 1 1
      Source/Urho3D/IO/File.cpp
  2. 2 2
      Source/Urho3D/IO/File.h
  3. 3 3
      Source/Urho3D/IO/FileSystem.cpp

+ 1 - 1
Source/Urho3D/IO/File.cpp

@@ -139,7 +139,7 @@ bool File::Open(const String& fileName, FileMode mode)
             return false;
             return false;
         }
         }
 
 
-        assetHandle_ = SDL_RWFromFile(ASSET(fileName), "rb");
+        assetHandle_ = SDL_RWFromFile(URHO3D_ASSET(fileName), "rb");
         if (!assetHandle_)
         if (!assetHandle_)
         {
         {
             LOGERRORF("Could not open asset file %s", fileName.CString());
             LOGERRORF("Could not open asset file %s", fileName.CString());

+ 2 - 2
Source/Urho3D/IO/File.h

@@ -41,9 +41,9 @@ extern const char* APK;
 #define IS_ASSET(p) p.StartsWith(APK)
 #define IS_ASSET(p) p.StartsWith(APK)
 // Macro for truncating the APK prefix string from the asset pathname and at the same time patching the directory name components (see custom_rules.xml)
 // Macro for truncating the APK prefix string from the asset pathname and at the same time patching the directory name components (see custom_rules.xml)
 #ifdef ASSET_DIR_INDICATOR
 #ifdef ASSET_DIR_INDICATOR
-#define ASSET(p) p.Substring(5).Replaced("/", ASSET_DIR_INDICATOR "/").CString()
+#define URHO3D_ASSET(p) p.Substring(5).Replaced("/", ASSET_DIR_INDICATOR "/").CString()
 #else
 #else
-#define ASSET(p) p.Substring(5).CString()
+#define URHO3D_ASSET(p) p.Substring(5).CString()
 #endif
 #endif
 #endif
 #endif
 
 

+ 3 - 3
Source/Urho3D/IO/FileSystem.cpp

@@ -587,7 +587,7 @@ bool FileSystem::FileExists(const String& fileName) const
 #ifdef ANDROID
 #ifdef ANDROID
     if (IS_ASSET(fileName))
     if (IS_ASSET(fileName))
     {
     {
-        SDL_RWops* rwOps = SDL_RWFromFile(ASSET(fileName), "rb");
+        SDL_RWops* rwOps = SDL_RWFromFile(URHO3D_ASSET(fileName), "rb");
         if (rwOps)
         if (rwOps)
         {
         {
             SDL_RWclose(rwOps);
             SDL_RWclose(rwOps);
@@ -630,7 +630,7 @@ bool FileSystem::DirExists(const String& pathName) const
     if (IS_ASSET(fixedName))
     if (IS_ASSET(fixedName))
     {
     {
         // Split the pathname into two components: the longest parent directory path and the last name component
         // Split the pathname into two components: the longest parent directory path and the last name component
-        String assetPath(ASSET((fixedName + '/')));
+        String assetPath(URHO3D_ASSET((fixedName + '/')));
         String parentPath;
         String parentPath;
         unsigned pos = assetPath.FindLast('/', assetPath.Length() - 2);
         unsigned pos = assetPath.FindLast('/', assetPath.Length() - 2);
         if (pos != String::NPOS)
         if (pos != String::NPOS)
@@ -807,7 +807,7 @@ void FileSystem::ScanDirInternal(Vector<String>& result, String path, const Stri
 #ifdef ANDROID
 #ifdef ANDROID
     if (IS_ASSET(path))
     if (IS_ASSET(path))
     {
     {
-        String assetPath(ASSET(path));
+        String assetPath(URHO3D_ASSET(path));
         assetPath.Resize(assetPath.Length() - 1);       // AssetManager.list() does not like trailing slash
         assetPath.Resize(assetPath.Length() - 1);       // AssetManager.list() does not like trailing slash
         int count;
         int count;
         char** list = SDL_Android_GetFileList(assetPath.CString(), &count);
         char** list = SDL_Android_GetFileList(assetPath.CString(), &count);