CModule::CModule(const char *Filename) { bool Result = false; m_Far = NULL; m_Image = NULL; m_File = strdup(Filename); Result = InternalLoad(g_Bouncer->BuildPathModule(Filename)); if (!Result) { InternalLoad(Filename); } }
//---------------------------------------------------------------------------------- // //---------------------------------------------------------------------------------- void* EffectTextureLoader::Load(const EFK_CHAR* path, Effekseer::TextureType textureType) { auto key = astring((const achar*) path); auto cache = m_caches.find(key); if (cache != m_caches.end()) { cache->second.Count++; return cache->second.Ptr; } auto staticFile = m_graphics->GetFile()->CreateStaticFile((const achar*) path); if (staticFile.get() == nullptr) return nullptr; int32_t imageWidth = 0; int32_t imageHeight = 0; std::vector<uint8_t> imageDst; if (!ImageHelper::LoadPNGImage(staticFile->GetData(), staticFile->GetSize(), IsReversed(), imageWidth, imageHeight, imageDst, m_graphics->GetLog())) { return nullptr; } void* img = InternalLoad(m_graphics, imageDst, imageWidth, imageHeight); Cache c; c.Ptr = img; c.Count = 1; c.Width = imageWidth; c.Height = imageHeight; m_caches[key] = c; dataToKey[img] = key; m_graphics->IncVRAM(ImageHelper::GetVRAMSize(TextureFormat::R8G8B8A8_UNORM, imageWidth, imageHeight)); return img; }
int wgl_LoadFunctions(HDC hdc) { int numFailed = 0; numFailed = InternalLoad(hdc); wgl_CopyFromC(); return numFailed; }
bool SQLTableMetaData::Load(){ SQLitePreparedStatment& query = DB->GetCachedStatmentFmt("SELECT %s FROM __TableMetaData WHERE TableName = ?", ColumnList); query.BindValues(TableName); if(query.Execute()){ InternalLoad(query); Loaded = true; }else{ Loaded = false; } return Loaded; }
void InternalUse(LispEnvironment& aEnvironment, const std::string& aFileName) { LispDefFile* def = aEnvironment.DefFiles().File(aFileName); if (!def->IsLoaded()) { def->SetLoaded(); for (const LispString* s: def->symbols) aEnvironment.UnProtect(s); InternalLoad(aEnvironment,aFileName); for (const LispString* s: def->symbols) aEnvironment.Protect(s); } }
SQLTableMetaData::SQLTableMetaData(SQLiteDatabase* db, SQLitePreparedStatment& query){ DB = db; InternalLoad(query); }