Getting bmp tiles from a zip folder
Posted: Tue Jun 20, 2006 2:25 am
I am trying to load a zip file which has all my game tiles in it. I've gone over the tutorials and looked around the forum for some answers, but this is the best i could come up with. Could someone help me out?
I keep getting access violation errors on the first line when i try to debug. I am very confused at this point and could really use some help. Thank you to anyone who can give some information.
Code: Select all
io::IFileSystem* filesystem = device->getFileSystem();
filesystem->addZipFileArchive("../../MEV2/TILES/tiles.zip", true, true);
io::IFileList* filelist = filesystem->createFileList();
if(filelist->getFileCount() == 0)
{
}
else
{
for(int i = 0; i<= filelist->getFileCount(); i++)
{
CTile temp;
temp.settilename(filelist->getFileName(i));
video::ITexture* temp2 = driver->getTexture(temp.gettilename());
driver->makeColorKeyTexture(temp2, core::position2d<s32>(0,0));
temp.setImage(temp2);
tilelist.push_back(temp);
}
filelist->drop();
}