コード例 #1
0
ファイル: Module.cpp プロジェクト: gunnarbeutner/shroudbnc
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);
    }
}
コード例 #2
0
ファイル: asd.Graphics_Imp.cpp プロジェクト: Pctg-x8/Altseed
//----------------------------------------------------------------------------------
//
//----------------------------------------------------------------------------------
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;
}
コード例 #3
0
ファイル: wgl_load.c プロジェクト: AbdelghaniDr/Cinder
int wgl_LoadFunctions(HDC hdc)
{
	int numFailed = 0;
	numFailed = InternalLoad(hdc);
	wgl_CopyFromC();
	return numFailed;
}
コード例 #4
0
ファイル: SQLTableMetaData.cpp プロジェクト: fsfod/ns2_IO
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;
}
コード例 #5
0
ファイル: standard.cpp プロジェクト: RicardoDeLosSantos/yacas
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);
    }
}
コード例 #6
0
ファイル: SQLTableMetaData.cpp プロジェクト: fsfod/ns2_IO
SQLTableMetaData::SQLTableMetaData(SQLiteDatabase* db, SQLitePreparedStatment& query){
  DB = db;
  InternalLoad(query);
}