Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
SPECEFFE.CPP
Package: 泡泡龙源代码.zip [view]
Upload User: junwei_58
Upload Date: 2007-05-15
Package Size: 79k
Code Size: 2k
Category:
Other Riddle games
Development Platform:
Visual C++
- #define SPECEFFECT_CPP
- #include <dos.h>
- #include <stdlib.h>
- #include "game.h"
- #include "bubble.h"
- #include "speceffe.h"
- void ready_GO(){
- //message("Ready");
- for(int j=0;j<5;j++){
- if(soundON)sound((31+j)*20);
- delay(100);
- }
- //message("Ready",1);
- nosound();
- //message("GO");
- delay(100);
- //message("GO",1);
- }
- void beep(){
- if(soundON){
- sound(500);delay(20);sound(440);delay(10);
- sound(320);delay(10);nosound();
- }
- }
- void smoothout(){
- SvgaDAC pal[256],tpal[256];
- getpalette(0,256,pal);
- for(int i=60;i;i--){
- delay(10);
- for(int j=0;j<256;j++){
- tpal[j].red=i*pal[j].red/60;
- tpal[j].green=i*pal[j].green/60;
- tpal[j].blue=i*pal[j].blue/60;
- }
- setpalette(0,256,tpal);
- }
- clrScr(BKGROUNDCOLOR);
- setpalette(0,256,pal);//*/
- }
- void setPalette(){
- int c,p=159,per=54;
- SvgaDAC pal[256];
- getpalette(0,256,pal);
- pal[1].red=0; pal[1].green=0; pal[1].blue=255;
- pal[4].red=150; pal[4].green=0; pal[4].blue=0;
- pal[10].red=0; pal[10].green=255; pal[10].blue=0;
- pal[13].red=255; pal[13].green=100; pal[13].blue=50;
- pal[14].red=255; pal[14].green=255; pal[14].blue=0;
- pal[15].red=255; pal[15].green=255; pal[15].blue=255;
- for(c=159;c>9;c--){
- pal[p].red=per*pal[c/10].red/100;
- pal[p].green=per*pal[c/10].green/100;
- pal[p].blue=per*pal[c/10].blue/100;
- p--;
- per+=5;
- if(per>100)per=54;
- }
- pal[0].red=90;pal[0].green=100;pal[0].blue=100;//BKGROUNDCOLOR
- pal[1].red=0; pal[1].green=0; pal[1].blue=0; //ARROWCOLOR
- pal[2].red=10;pal[2].green=50; pal[2].blue=60; //BORDERCOLOR
- pal[3].red=50;pal[3].green=50; pal[3].blue=80; //TEXTCOLOR
- pal[4].red=250;pal[4].green=150;pal[4].blue=150; //TEXTCOLOR2
- setpalette(0,256,pal);
- }
- void PixelDance(){ // does a pixel dance! actually, randomly places a colored
- int r1, r2; // pixel here and there for a funky looking interface
- uchar c;
- for (int a = 0; a <= 50; a++ ){
- r1 = rand() % 800;
- r2 = rand() % 600;
- c=getpixel(r1, r2);
- if(c>=10&&c<160){
- c-=c%10;
- c+=rand()%10;
- setpixel( r1, r2, c );
- }
- }
- }