基于HGE引擎使用C++从zip加密压缩包中读取图像文件至内存并显示在窗口中
选择一个要显示的图像文件
以password
为密码压缩为zip
代码
showZipImg.cpp
#include "hge.h"
#include "hgeSprite.h"
//#pragma comment(linker, "/NODEFAULTLIB:libc.lib")
HGE* hge = 0;//创建HGE指针
hgeSprite* spr;//创建精灵类指针
HTEXTURE tex;//定义一个texture(纹理)对象
bool RenderFunc()//绘制函数,程序开始后HGE将不停调用它
{
hge->Gfx_BeginScene();//开始渲染
hge->Gfx_Clear(0xFF000000);//以某颜色清屏,OxFF000000为透明度为0的黑色
spr->Render(0,0);