#include <stdio.h>
#include<Windows.h>
#include <iostream>
#include<graphics.h>
#include<MMSystem.h>//播放音乐需要的头文件
#pragma comment(lib,"winmm.lib")//告诉编译器,加载winmm.lib库文件
using namespace std;
#define nIMAGE 148
int main(){
IMAGE images[nIMAGE];
char fileName[128];
int i=0;
cout<<"加载中......";
for(i=0;i<nIMAGE;i++){
sprintf(fileName,".\\images2\\_%04d_图层-%d.jpg",nIMAGE-1-i,i+1);
loadimage(&images[i],fileName);
}
initgraph(800,450);
mciSendString(_T("play bg.mp3 repeat"),0,0,0);//重复播放背景音乐
while(1){
for(i=0;i<nIMAGE;i++){
putimage(0,0,&images[i]);
Sleep(50);
}
}
system("pause");
return 0;
}
运行效果动态效果截取其中的一个图,小姐姐漂亮吧 ,让你的小姐姐也动起来如下