#include
#include<graphics.h>
#include<Windows.h>
#include
#include<string.h>
#include<MMSystem.h>// 播放音乐需要的头文件
#pragma comment(lib ,“winmm.lib”)//告诉编译器, 加载winmm.lib库文件
using namespace std;
#define COUNT 148
int main(void){
char fileName[128];
cout<<"正在加载"<<endl;
//预加载
IMAGE images[COUNT];
for(int i =1;i<COUNT;i++){
sprintf(fileName, "D:\\tmp\\images2\\_%04d_图层-%d.jpg", COUNT-i, i);
loadimage(&images[i-1], fileName);
}
initgraph(800, 450);
// 重复播放"极乐净土.mp3"
mciSendString(_T("play 极乐净土.mp3 repeat"), 0, 0, 0);
while (1) {
for (int i=0; i<COUNT; i++) {
putimage(0, 0, &images[i-1]);
Sleep(75);
}
}
system("pause");
closegraph();
return 0;
}