Example #1
0
int main(int argc, char*argv[])
{
    pgeZip* thezip = pgeZipOpen("test.zip");

    pgeZipExtract(thezip, NULL);

    pgeZipClose(thezip);

    pgeExit();

    return 0;
}
Example #2
0
void TextureHelper::SetTextureZipName(std::string name)
{
	defaultZip = name;
	texturePatch = defaulPatch + defaultZip;

	if(theZip != NULL)
	{
		pgeZipClose(theZip);
	}
	theZip = pgeZipOpen(texturePatch.c_str());

	//clean old textures
	CleanAllPackImages();
}
Example #3
0
const char* TextureHelper::GetTextureFromZip(const char* name)
{
	if(!TextureManager::Instance()->TextureExist(name))
	{
		if(theZip == NULL)
		{
			theZip = pgeZipOpen(texturePatch.c_str());
		}

		pgeZipFile* fileInZip = pgeZipFileRead(theZip, name, NULL);

		TextureManager::Instance()->LoadTexture(name,fileInZip->data,fileInZip->size);

		pgeZipFileFree(fileInZip);
	}

	return name;
}