intx[15] = { 120, 120, 110, 117, 110, 93, 102, 102, 110, 105, 100, 108, 110, 145, 124 };
inty[15] = { 120, 120, 85, 118, 120, 103, 105, 110, 110, 120, 120, 104, 85, 145, 124 };
fire[i].width = 500;
fire[i].height = 500;
fire[i].maxr = r[i];
fire[i].cenx = x[i];
fire[i].ceny = y[i];
fire[i].show = false;
fire[i].t1 = GetTickCount();
fire[i].dt = 5;
fire[i].r = 0;
//初始化烟花弹的部分数据
jet[i].t1 = GetTickCount(); //定个时间点
jet[i].dt = rand() % 10; //0-9 ms
jet[i].n = 0;
jet[i].shoot = false; //都是没有发射的。
}
//加载图片
void Load() //加载到哪里去?
{
IMAGEfm, gm;
loadimage(&fm, L"./fire/flower.jpg", 3120, 240);
for (inti = 0; i < NUM; i++)
{
SetWorkingImage(&fm); //fm去拿
getimage(&gm,i*240, 0, 240, 240); //gm
SetWorkingImage(&gm); //gm去拿
for (int a = 0; a < 240; a++)
{
for (int b = 0; b < 240; b++)
{
fire[i].xy[a][b] = getpixel(a, b);
}
}
}
//文件夹
IMAGEsm;
loadimage(&sm, L"./fire/shoot.jpg", 200, 50);
//保存在sm
评论0
最新资源