void vulture_fade_out(double n_secs) { /* create a screen sized pure black surface without an alpha channel */ SDL_Surface * img = SDL_CreateRGBSurface(SDL_SWSURFACE, vulture_screen->w, vulture_screen->h, vulture_px_format->BitsPerPixel, vulture_px_format->Rmask, vulture_px_format->Gmask, vulture_px_format->Bmask, 0); SDL_FillRect(img, NULL, 0); /* blend the blackness with the existing image */ dofade(n_secs, img); SDL_FreeSurface(img); }
void vulture_fade_in(double n_secs) { /* create a copy of the screen without an alpha-channel (ie an alpha mask == 0) */ SDL_Surface * img = SDL_CreateRGBSurface(SDL_SWSURFACE, vulture_screen->w, vulture_screen->h, vulture_px_format->BitsPerPixel, vulture_px_format->Rmask, vulture_px_format->Gmask, vulture_px_format->Bmask, 0); SDL_BlitSurface(vulture_screen, NULL, img, NULL); /* set the screen to all-black and display that */ SDL_FillRect(vulture_screen, NULL, CLR32_BLACK); vulture_refresh(); dofade(n_secs, img); SDL_FreeSurface(img); }
main() { int a,b,x,y; int zimz; initvideo(); readp(palette,-1,hzpic); for(y=0;y<256;y++) { readp(rowbuf,y,hzpic); lineblit(y+64,rowbuf); } for(y=0;y<32;y++) { readp(font[y],y+300,hzpic); for(a=0;a<640;a++) { switch(font[y][a]) { case 0x40 : b=0xc0; break; case 0x41 : b=0x80; break; case 0x42 : b=0x40; break; default : b=0; } font[y][a]=b; } } for(y=0;y<768;y+=3) { if(y<64*3) ; else if(y<128*3) { palette2[y+0]=palette[0x42*3+0]; palette2[y+1]=palette[0x42*3+1]; palette2[y+2]=palette[0x42*3+2]; } else if(y<192*3) { palette2[y+0]=palette[0x41*3+0]; palette2[y+1]=palette[0x41*3+1]; palette2[y+2]=palette[0x41*3+2]; } else { palette2[y+0]=palette[0x40*3+0]; palette2[y+1]=palette[0x40*3+1]; palette2[y+2]=palette[0x40*3+2]; } } for(y=192;y<768;y++) { palette[y]=palette[y-192]; } for(x=0;x<64;x++) { for(y=0;y<576;y++) { fade1[x][y]=(palette2[y+192]*x+palette[y+192]*(63-x))/63; fade2[x][y]=(palette2[y+192]*x)/63; } } for(x=0;x<640 && *fonaorder;) { while(x<640) { for(y=0;y<32;y++) if(font[y][x]) break; if(y!=32) break; x++; } b=x; while(x<640) { for(y=0;y<32;y++) if(font[y][x]) break; if(y==32) break; x++; } //printf("%c: %i %i\n",*fonaorder,b,x-b); fonap[*fonaorder]=b; fonaw[*fonaorder]=x-b; fonaorder++; } fonap[32]=640-20; fonaw[32]=16; setpalarea(fade2[0],64,192); for(;;) { prtc(160,140,"A"); prtc(160,180,"Future Crew"); prtc(160,220,"production"); dofade2(300); if(kbhit()) break; prtc(160,140,"First presented at"); prtc(160,220,"Assembly NoNumbers"); dofade2(300); if(kbhit()) break; dofadef(); if(kbhit()) break; prtc(100,140,"Graphics"); prtc(100,200,"Pixel"); prtc(100,240,"Marvel"); dofade(300); if(kbhit()) break; prtc(100,140,"Music"); prtc(100,200,"Purple Motioon"); prtc(100,240,"Skaven"); dofade(300); if(kbhit()) break; prtc(100,140,"Code"); prtc(100,200,"Trug"); prtc(100,240,"Wildfire"); prtc(100,280,"Psi"); dofade(300); if(kbhit()) break; } getch(); deinitvideo(); }
main() { int aa,b,c,x,y,f; asm mov ax, 3 asm int 10h init(); while(dis_sync()<1 && !dis_exit()); prtc(160,120,"A"); prtc(160,160,"Future Crew"); prtc(160,200,"Production"); dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois(); while(dis_sync()<2 && !dis_exit()); prtc(160,160,"First Presented"); prtc(160,200,"at Assembly 93"); dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois(); while(dis_sync()<3 && !dis_exit()); prtc(160,120,"in"); prtc(160,160,"�"); prtc(160,179,"�"); dofade(fade1,fade2); wait(300); dofade(fade2,fade1); fonapois(); while(dis_sync()<4 && !dis_exit()); memcpy(fadepal,fade1,768); cop_fadepal=picin; cop_dofade=128; for(a=1,p=1,f=0,frame_count=0;cop_dofade!=0 && !dis_exit();) do_scroll(2); for(f=60;a<320 && !dis_exit();) { if(f==0) { cop_fadepal=textin; cop_dofade=64; f+=20; } else if(f==50) { cop_fadepal=textout; cop_dofade=64; f++; } else if(f>50 && cop_dofade==0) { cop_pal=palette; do_pal=1; f++; memset(tbuf,0,186*320); switch(tptr++) { case 0: addtext(160,50,"Graphics"); addtext(160,90,"Marvel"); addtext(160,130,"Pixel"); // sucks ffonapois(); break; case 1: faddtext(160,50,"Music"); faddtext(160,90, "Purple Motion"); faddtext(160,130, "Skaven"); ffonapois(); break; case 2: faddtext(160,30,"Code"); faddtext(160,70, "Psi"); faddtext(160,110, "Trug"); faddtext(160,148, "Wildfire"); ffonapois(); break; case 3: faddtext(160,50,"Additional Design"); faddtext(160,90, "Abyss"); // faddtext(160,110,"Useless Design"); faddtext(160,130, "Gore"); ffonapois(); break; case 4: ffonapois(); break; default: faddtext(160,80, "BUG BUG BUG"); faddtext(160,130, "Timing error"); ffonapois(); break; } while(((a&1) || dis_sync()<4+tptr) && !dis_exit() && a<319) do_scroll(0); aa=a; if(aa<320-12) fmaketext(aa+16); f=0; } else f++; do_scroll(1); } if(f>63/SCRLF){ dofade(palette2,palette); } fonapois(); close_copper(); }