drawborder()

Discussion in 'General Marketing' started by bhusalnarayan, Jun 18, 2012.

  1. #1
    This function is used to draw a solid single line around the current viewport. This function takes no argument and returns nothing.

    1. Draw a solid single line around the current viewport using color

     
    bhusalnarayan, Jun 18, 2012 IP
  2. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    1. saygoodbye()
    This function is created to give a closing screen to the user before leaving. This function takes no argument and returns nothing.

    1. Define structure to read viewport
    2. Read viewport settings
    3. Display the message of winning game with proper format.
    4. Clear the graphics screen
    5. Return to main function
     
    bhusalnarayan, Jun 18, 2012 IP
  3. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    1. initialize()
    This function is created to initialize the graphics systems. This function takes no argument and returns nothing.

    1. Initialize graph
    2. If error occurs during initialization of graph display proper message
    3. Read palette from board
    4. Read maximum number of colors
    5. Read hardware aspect
    6. Calculate aspect ratio
    7. Return to main function
     
    bhusalnarayan, Jun 18, 2012 IP
  4. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    1. bell()
    This function is created to play different types of music. This function takes integer value as argument and returns nothing. The music will be played according to the argument passed.

    1. Set the frequency of note
    2. Using switch case, play sound of different frequency for different interval of time according to the argument
    3. Close the sound
    4. Return to the main function
     
    bhusalnarayan, Jun 18, 2012 IP
  5. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    1. delbrick()
    This function is created to erase the brick which is knocked by the ball. This function also doesn’t take argument and return nothing.

    1. Set the color of rectangle
    2. Erase the color if the ball reaches the coordinate of the brick
    3. Set background color in the place of erased brick
    4. Return to the main function
     
    bhusalnarayan, Jun 18, 2012 IP
  6. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    1. bricks()
    This function is created to draw bricks at upper layer of screen. There are 4 layers with 20 rows. This function doesn’t take any argument and returns nothing.

    1. Draw the brick at appropriate coordinates using for loops for rows and columns
    2. Return to main function
     
    bhusalnarayan, Jun 18, 2012 IP
  7. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    1. screen()
    Screen() function is created to display the instructions for playing game, options play or exit and to select the level of the program. This also doesn’t take any argument and returns nothing.

    1. initialize graph
    2. draw a rectangle covering the display screen
    3. set background color
    4. display instructions for playing the game with musical sound
    5. clear buffer
    6. close graph
    7. initiate graph
    8. Set background color
    9. Display options p for play e for exit
     
    bhusalnarayan, Jun 18, 2012 IP
  8. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    1. mainscreen()
    Mainscreen() function is created to display the welcome screen at the initial position. This function takes no argument and returns nothing. The algorithm for this function is:

    1. Initialize graph
    2. Draw a rectangle covering the display screen
    3. Set background color ex RED, BLUE etc.
    4. Display the welcome information on screen at different positions with music in background.
    5. Clear buffer
    6. Close graph
    7. Return to main functions.
     
    bhusalnarayan, Jun 18, 2012 IP
  9. bhusalnarayan

    bhusalnarayan Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Steps followed to code the program
    First the concept of simple graphic program was built up and for which Brick game is the simplest for coding. The simple diagrams of program were constructed and raw codes were collected and written. Different functions were created to do individual task. The module was coded and the user defined functions were included in the module. The errors were debugged and the program was launched in Turbo C environment.
     
    bhusalnarayan, Jun 18, 2012 IP