Browse Source

IS_ASSET -> URHO3D_IS_ASSET

Ivan K 10 years ago
parent
commit
ec17b8f73d

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

@@ -131,7 +131,7 @@ bool File::Open(const String& fileName, FileMode mode)
     }
     }
 
 
 #ifdef ANDROID
 #ifdef ANDROID
-    if (IS_ASSET(fileName))
+    if (URHO3D_IS_ASSET(fileName))
     {
     {
         if (mode != FILE_READ)
         if (mode != FILE_READ)
         {
         {

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

@@ -38,7 +38,7 @@ namespace Urho3D
 extern const char* APK;
 extern const char* APK;
 
 
 // Macro for checking if a given pathname is inside APK's assets directory
 // Macro for checking if a given pathname is inside APK's assets directory
-#define IS_ASSET(p) p.StartsWith(APK)
+#define URHO3D_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 URHO3D_ASSET(p) p.Substring(5).Replaced("/", ASSET_DIR_INDICATOR "/").CString()
 #define URHO3D_ASSET(p) p.Substring(5).Replaced("/", ASSET_DIR_INDICATOR "/").CString()

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

@@ -585,7 +585,7 @@ bool FileSystem::FileExists(const String& fileName) const
         return false;
         return false;
 
 
 #ifdef ANDROID
 #ifdef ANDROID
-    if (IS_ASSET(fileName))
+    if (URHO3D_IS_ASSET(fileName))
     {
     {
         SDL_RWops* rwOps = SDL_RWFromFile(URHO3D_ASSET(fileName), "rb");
         SDL_RWops* rwOps = SDL_RWFromFile(URHO3D_ASSET(fileName), "rb");
         if (rwOps)
         if (rwOps)
@@ -627,7 +627,7 @@ bool FileSystem::DirExists(const String& pathName) const
     String fixedName = GetNativePath(RemoveTrailingSlash(pathName));
     String fixedName = GetNativePath(RemoveTrailingSlash(pathName));
 
 
 #ifdef ANDROID
 #ifdef ANDROID
-    if (IS_ASSET(fixedName))
+    if (URHO3D_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(URHO3D_ASSET((fixedName + '/')));
         String assetPath(URHO3D_ASSET((fixedName + '/')));
@@ -805,7 +805,7 @@ void FileSystem::ScanDirInternal(Vector<String>& result, String path, const Stri
         filterExtension.Clear();
         filterExtension.Clear();
 
 
 #ifdef ANDROID
 #ifdef ANDROID
-    if (IS_ASSET(path))
+    if (URHO3D_IS_ASSET(path))
     {
     {
         String assetPath(URHO3D_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

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

@@ -53,7 +53,7 @@ PackageFile::~PackageFile()
 bool PackageFile::Open(const String& fileName, unsigned startOffset)
 bool PackageFile::Open(const String& fileName, unsigned startOffset)
 {
 {
 #ifdef ANDROID
 #ifdef ANDROID
-    if (IS_ASSET(fileName))
+    if (URHO3D_IS_ASSET(fileName))
     {
     {
         LOGERROR("Package files within the apk are not supported on Android");
         LOGERROR("Package files within the apk are not supported on Android");
         return false;
         return false;