| generated by cgit v1.2.3 (git 2.39.1) at 2026-12-03 02:19:54 +0000
RUE, (UInt8 *)path, PATH_MAX)) + // Code based on + // http://stackoverflow.com/questions/516200/relative-paths-not-working-in-xcode-c + CFBundleRef main_bundle = CFBundleGetMainBundle(); + CFURLRef resources_url = CFBundleCopyResourcesDirectoryURL(main_bundle); + char path[PATH_MAX]; + if(CFURLGetFileSystemRepresentation(resources_url, TRUE, (UInt8 *)path, PATH_MAX)) { dstream<<"Bundle resource path: "<<path<<std::endl; //chdir(path); - path_share = std::string(path) + "/share"; + path_share = std::string(path) + DIR_DELIM + "share"; } else - { - // error! + { + // error! dstream<<"WARNING: Could not determine bundle resource path"<<std::endl; - } - CFRelease(resources_url); + } + CFRelease(resources_url); path_user = std::string(getenv("HOME")) + "/Library/Application Support/" + PROJECT_NAME; #else // FreeBSD, and probably many other POSIX-like systems. path_share = STATIC_SHAREDIR; - path_user = std::string(getenv("HOME")) + "/." + PROJECT_NAME; + path_user = std::string(getenv("HOME")) + DIR_DELIM + "." + PROJECT_NAME; #endif @@ -37,6 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include <map> #include <set> #include "filesys.h" +#include <cctype> enum ValueType { @@ -575,7 +576,7 @@ public: u32 getFlagStr(std::string name, FlagDesc *flagdesc, u32 *flagmask) { std::string val = get(name); - return (isdigit(val[0])) ? stoi(val) : + return (std::isdigit(val[0])) ? stoi(val) : readFlagString(val, flagdesc, flagmask); } @@ -730,9 +730,6 @@ u32 TextureSource::getTextureIdDirect(const std::string &name) m_textureinfo_cache.push_back(ti); m_name_to_id[name] = id; - /*infostream<<"getTextureIdDirect(): " - <<"Returning id="<<id<<" for name \""<<name<<"\""<<std::endl;*/ - return id; } @@ -962,6 +959,20 @@ bool TextureSource::generateImage(std::string part_of_name, video::IImage *& bas { video::IImage *image = m_sourcecache.getOrLoad(part_of_name, m_device); + if (image != NULL) { + if (!driver->queryFeature(irr::video::EVDF_TEXTURE_NPOT)) { + core::dimension2d<u32> dim = image->getDimension(); + + + if ((dim.Height %2 != 0) || + (dim.Width %2 != 0)) { + errorstream << "TextureSource::generateImage " + << part_of_name << " size npot2 x=" << dim.Width + << " y=" << dim.Height << std::endl; + } + } + } + if(image == NULL) { if(part_of_name != ""){ @@ -258,7 +258,7 @@ public: } T & operator[](unsigned int i) const { - //assert(i < m_size) + assert(i < m_size); return data[i]; } T * operator*() const |