I am visual studio c++ 2019, and building a small app using irrlicht.
My app is portable so I embed my data inside the program using bin2h.
With bin2h I managed to transform my password encrypted ZIP file into a unsigned char[] :
Code: Select all
unsigned char resources_data[]={
0x50,0x4b,0x03,0x04,0x33,0x00,0x01,0x00,0x63,0x00,0xa8,0x7d,0x30,0x51,..........
(cut 20k lines after...)
,0x76,0x02,0x00,0x00,0x2b,0xf0,0x03,0x00,0x00,0x00,0x00};
unsigned int data_size=398541;
Code: Select all
io::IReadFile* files_archive = device->getFileSystem()->createMemoryReadFile(resources_data, data_size, "mydatafile.zip", false);
device->getFileSystem()->addFileArchive(files_archive, true, true, io::EFAT_ZIP, "mypassword");
Code: Select all
Reading encrypted file.
Reading encrypted file.
Loaded texture: myfontd.png
Reading encrypted file.
Loaded texture: image1.png
Reading encrypted file.
Loaded texture: image2.png
Reading encrypted file.
Loaded texture: image3.png
Reading encrypted file.
Loaded texture: image4.png
Code: Select all
Reading encrypted file.
Reading encrypted file.
Could not load texture: myfontd.png
Unable to load all textures in the font, aborting
Reading encrypted file.
Reading encrypted file.
Could not load texture: image1.png
Reading encrypted file.
Could not load texture: image2.png
Reading encrypted file.
Could not load texture: image3.png
Reading encrypted file.
Could not load texture: image4.png
Is it a bug? I checked the differences between my debug and release configs and can't seem to understand what happened.
I tried also linking in my release build the debug build of Irrlicht (the same that works) and still get the same issue.
does it have to do with irrlicht? visual studio? compiler optimization?
Thanks