+ All Categories
Home > Documents > More Information About Balloon Shooting Game_presentation

More Information About Balloon Shooting Game_presentation

Date post: 25-Oct-2014
Category:
Upload: jayati-jaiswal
View: 68 times
Download: 0 times
Share this document with a friend
Popular Tags:
17
BALLOON SHOOTING GAME GROUP MEMBERS: ADITYAMANDAHRE10 1034 NITIN CYRIAC 101041 AKASH PRABHU 101048 PUNITLOHANI 101032
Transcript
Page 1: More Information About Balloon Shooting Game_presentation

BALLOON SHOOTING GAMEGROUP MEMBERS:ADITYAMANDAHRE101034NITIN CYRIAC101041AKASH PRABHU 101048PUNITLOHANI 101032

Page 2: More Information About Balloon Shooting Game_presentation

Initgraph()

The initgraph function that will intialize the graphics mode on the computer. Initigraph has the following prototype.

Initgraph initializes the graphics system by loading a graphics driver from disk (or validating a registered

driver) then putting the system in to graphics mode.Initgraph also resets all graphics settings (color, palette,

current position, viewport, etc.) to their defaults, then resets graphresult to 0.

Page 3: More Information About Balloon Shooting Game_presentation

*graphdriver Integer that specifies the graphics driver to

be used. You can give graphdriver a value using a constant of the graphics_drivers enumeration type.

Graphicsdriver

Page 4: More Information About Balloon Shooting Game_presentation

*graphmode Integer that specifies the initial graphics

mode (unless *graphdriver = DETECT). If *graphdriver = DETECT, initgraph sets *graphmode to the highest resolution available for the detected driver. You can give *graphmode a value using a constant of the graphics_modes enumeration type.

Graphmode

Page 5: More Information About Balloon Shooting Game_presentation

*pathtdriver Specifies the directory path where initgraph

looks for graphics drivers (*.BGI) first.

Pathdriver

Page 6: More Information About Balloon Shooting Game_presentation

line function is used to draw a line from a point(x1,y1) to point(x2,y2) i.e. (x1,y1) and (x2,y2) are end points of the line.

Declaration :- void line(int x1, int y1, int x2, int y2);

Page 7: More Information About Balloon Shooting Game_presentation

Setcolor function is used to change the current drawing color.e.g. setcolor(RED) or setcolor(4) changes the current drawing color to RED.

Default drawing color is white. Total 16 colors are available.

setcolor

Page 8: More Information About Balloon Shooting Game_presentation

Void * malloc(size_t bytes) Allocates a block of size bytes of memory

returning a pointer to the beginning of the block.

The contents of the newly allocated block is not initialized remaining with indeterminate values.

Parameter-size of the memory block in bytes

malloc

Page 9: More Information About Balloon Shooting Game_presentation

getimage function saves a bit image of specified region into memory, region can be any rectangle.

Declaration:- void getimage(int left, int top, int right, int bottom, void *bitmap);

getimage copies an image from screen to memory. Left, top, right, and bottom define the area of the screen from which the rectangle is to be copied, bitmap points to the area in memory where the bit image is stored.

getimage

Page 10: More Information About Balloon Shooting Game_presentation

putimage function outputs a bit image onto the screen. Declaration:- void putimage(int left, int top, void *ptr,

int op); putimage puts the bit image previously saved with

getimage back onto the screen, with the upper left corner of the image placed at (left, top). ptr points to the area in memory where the source image is stored. The op argument specifies a operator that controls how the color for each destination pixel on screen is computed, based on pixel already on screen and the corresponding source pixel in memory.

For eg-if the operator is XOR_PUT then the pixel is XORed with the pixel already present on the screen.

putimage

Page 11: More Information About Balloon Shooting Game_presentation

kbhit function is used to determine if a key has been pressed or not.

To use kbhit function in your program you should include the header file "conio.h".

If a key has been pressed then it returns a non zero value otherwise returns zero.

Declaration : int kbhit();

kbhit

Page 12: More Information About Balloon Shooting Game_presentation

delay function is used to suspend execution of a program for a particular time.

Here unsigned int is the number of milliseconds (1 second = 1000 milliseconds ).

To use delay function in your program you should include the dos.h header file.

Declaration :- void delay(unsigned int);

delay

Page 13: More Information About Balloon Shooting Game_presentation

Sound function produces the sound of a specified frequency. Used for adding music to c program.

Declaration:- void sound(unsigned frequency);

sound

Page 14: More Information About Balloon Shooting Game_presentation

nosound function turn off the PC speaker. Declaration : void nosound();

nosound

Page 15: More Information About Balloon Shooting Game_presentation

Pointers point to location within the memory.

Pointer declaration- <variable_type>*<name> The keyword new is used to initialize

pointers with memory from free store (a section of memory available to all programs.

Syntax-int *ptr=new int; The & operator is used to assign the

address of a variable to a pointer.

Pointers

Page 16: More Information About Balloon Shooting Game_presentation

This project has been implemented in C++ C++ has an easy to use and easy to modify

code. This project can also be implemented with

various levels. We can also add some balloons which may

decrement your points.

Scope of this project

Page 17: More Information About Balloon Shooting Game_presentation

The speed of arrows can also be increased. We can also multiply the number of

balloons.

Scope of this project


Recommended