Mafia Coderz
Gusto mo bang maexperience ang isang napaka LUPIT na hideout ng mga cheaters and buggers? Dito mo lang yan matatagpuan sa IntensityPros! Smile Gusto mo din bang maka acquire ng mga gusto mo in cyber for FREE? Register ka lang! Kaya ano pang hinihintay mo? Join us Now!
Mafia Coderz
Gusto mo bang maexperience ang isang napaka LUPIT na hideout ng mga cheaters and buggers? Dito mo lang yan matatagpuan sa IntensityPros! Smile Gusto mo din bang maka acquire ng mga gusto mo in cyber for FREE? Register ka lang! Kaya ano pang hinihintay mo? Join us Now!
Mafia Coderz
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Mafia Coderz

Where gaming don't need skills.
 
HomeSearchLatest imagesRegisterLog in
DMCA.com
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

Most users ever online was 12 on Sat Aug 17, 2013 1:09 pm
Latest topics
» PHO SF DFI PUBLIC HACK 1.20
C : Code a Moving Ball in Rain ( with graphics ) EmptyThu Oct 31, 2013 4:08 pm by banaykazuki01

» MafiaCoderz Cf Hack
C : Code a Moving Ball in Rain ( with graphics ) EmptyThu Sep 05, 2013 4:25 pm by Heneral2010

»  TOPIC: [MOD]POP CORN MOD (READ 4830 TIMES)
C : Code a Moving Ball in Rain ( with graphics ) EmptyThu Sep 05, 2013 8:07 am by Heneral2010

» Read Before Applying!
C : Code a Moving Ball in Rain ( with graphics ) EmptySun Sep 01, 2013 10:12 am by j@cKaZzz 143

» Coding Tutorials
C : Code a Moving Ball in Rain ( with graphics ) EmptySun Sep 01, 2013 10:08 am by j@cKaZzz 143

» READ BEFORE YOU POST
C : Code a Moving Ball in Rain ( with graphics ) EmptySun Sep 01, 2013 10:08 am by j@cKaZzz 143

» [MOD]DFI SF MOD, KILLMARK, SOUND ETC (READ 5623 TIMES)
C : Code a Moving Ball in Rain ( with graphics ) EmptyMon Aug 26, 2013 11:31 am by j@cKaZzz 143

»  LNL LOADER WALLHACK LOADER! V7
C : Code a Moving Ball in Rain ( with graphics ) EmptyMon Aug 26, 2013 11:28 am by j@cKaZzz 143

» OneHitCf By:TheMvT
C : Code a Moving Ball in Rain ( with graphics ) EmptyMon Aug 26, 2013 11:28 am by j@cKaZzz 143


 

 C : Code a Moving Ball in Rain ( with graphics )

Go down 
AuthorMessage
Cr4v3n HaX
Super Moderator
Super Moderator
Cr4v3n HaX


Posts : 26
Join date : 17/08/2013
Location : C:/Windows/System32/cmd.exe

C : Code a Moving Ball in Rain ( with graphics ) Empty
PostSubject: C : Code a Moving Ball in Rain ( with graphics )   C : Code a Moving Ball in Rain ( with graphics ) EmptySat Aug 17, 2013 12:22 pm

Lines used : 102
Copy all the codes below :
#############


Code:
# include <graphics.h>
# include <stdlib.h>
# include <conio.h>
# include <dos.h>

int x,y,maxx,maxy,i,j;

int main(void)
{
int gdriver = DETECT, gmode;
void *image;
unsigned int size;
char ch;
void fillBox(int,int);
int Row,Col;

// Initialize graphics drivers and mode.
initgraph(&gdriver,&gmode,"");

// Draw a rectangle
// rectangle(x1,y1,x2,y2)
maxx=getmaxx(); // x2
maxy=getmaxy(); // y2
rectangle(10,10,maxx-10,maxy-10);

// Puts Pixel in the Rectangle.
fillBox(maxx,maxy);
x=y=70;
// Draw Circle and FillColor
setfillstyle(1,14);
circle(x,y,20);
floodfill(x,y,15);

// Creating the Image
size = imagesize(x,y,x+20,y+20);
image=malloc(size);
getimage(x-20,y-20,x+20,y+20,image);
x-=20;
y-=20;
// Will Displays till Any key is hit !!!...
while(!kbhit())
{
Row = x; Col = y;
putimage(x,y,image,XOR_PUT);    // clears the Image from Screen
//x=random(maxx-70);
//y=random(maxy-70);
//fillBox(maxx,maxy);
x=x+10;
/*    if(x
x=50;
if(y
y=50;*/
putimage(x,y,image,OR_PUT); // Puts the image on screen.
delay(50); // Waits for few Seconds.
if(x>540)
{
putimage(x,y,image,XOR_PUT);
Row = x; Col = y;
for(i=0;i
{
x=random(maxx-10);
y=random(maxy-10);
if(x>10 && y>10)
putpixel(x,y,14);
}
//putpixel(x,y,14);
x= Row;
y=Col;
x=10;
y=y+20;
putimage(x,y,image,XOR_PUT);
}
if(y>410)
{
putimage(x,y,image,XOR_PUT);
Row = x; Col = y;
fillBox(maxx,maxy);
x= Row;
y=Col;
x=10;
y=30;
putimage(x,y,image,XOR_PUT);
}
}
free(image); //Removes the image from the Screen.
closegraph(); // Closes the Graphics Mode.
}

void fillBox(int maxx,int maxy)
{
cleardevice();   // Clears the Graphics Screen
maxx=getmaxx(); // x2
maxy=getmaxy(); // y2
rectangle(10,10,maxx-10,maxy-10);
for(i=0;i
{
x=random(maxx-10);
y=random(maxy-10);
if(x>10 && y>10)
putpixel(x,y,14);
}
}
-Cr4v3n HaX
www.facebook.com/lesterwayne123
Back to top Go down
 
C : Code a Moving Ball in Rain ( with graphics )
Back to top 
Page 1 of 1
 Similar topics
-
» C++ : Code a Taj Mahal ( with graphics )
» C++ : Code a 3D Car Handling ( with Graphics )
» [SOURCECODE] KILLHACK CODE By:TheMvT

Permissions in this forum:You cannot reply to topics in this forum
Mafia Coderz :: Programming Zone :: C & C++ Programming-
Jump to: