*/
Are you blogging on PH? Get your free blog.
*/

View \TICTAC.H

Game & Source Code To Tic-tac-toe That Learn

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


/*
 * Misc. Constants
 */

#ifndef ON
#define ON       1
#endif

#ifndef OFF
#define OFF      0
#endif

/*
 * Types used in the mouse interface
 */

/*
 * This is used to define regions of the screen
 */

typedef struct {
        unsigned        char    ul_row;                    /* Upper left row                */
        unsigned        char    ul_col;                    /* Upper left column   */
        unsigned        char    lr_row;                    /* Lower right row            */
        unsigned        char    lr_col;                    /* Lower right column                        */
} REGION;


/****************************************************************************
 *                        M o u s e   h a n d l i n g   f u n c t i o n s                            *
 ****************************************************************************/



/*
 * Hook the mouse, return presence
 */

int          mouse_init(void);

/*
 * Enable mouse processing
 */

void    mouse_on(void);

/*
 * Disable mouse processing
 */

void    mouse_off(void);

/*
 * Set mouse cursor bounds
 */

void    mouse_bounds(int ulrow, int ulcol, int lrrow, int lrcol);

/*
 * Turn the mouse cursor on or off
 */

void    mouse_cursor(int on_off);

/*
 * Return the mouse button state
 */

int          mouse_buttons(void);

/*
 * Determine whether or not the mouse cursor is within a screen region
 */

int          mouse_in_region(REGION *region_list, int num_regions);


/*
 * Routines in ticlib.lib
 */


#define ON              1
#define OFF            0
#define UP              0
#define DOWN     1

/*
 * Color definitions
 */

#define C_BLACK    0
#define C_BLUE      1
#define C_GREEN    2
#define C_CYAN      3
#define C_RED        4
#define C_MAGENTA        5
#define C_BROWN    6
#define C_WHITE    7


/*
 * Window types for the new window routines
 */


#define W_SIMPLE 0
#define W_TBORDER        1
#define W_TSEP      2


void background(int bg_color);
void blinking(int on_or_off);
void clear_below(void);
void clear_eol(void);
void clear_region(int ul_row, int ul_col, int lr_row, int lr_col);
void cls(void);
void foreground(int fg_color);
void get_attrib(int *fg, int *bg, int *blink, int *intense);
void gotoxy(int row, int col);
void init_screen(void);
char *int_asc(char *dest, int source, int radix);
void intensity(int on_or_off);
void out_char(int chr_to_put);
void out_string(char *str_to_put);
void set_cursor(int on_or_off);
unsigned int tvinkey(char *valid_norm, char *valid_alt, unsigned short timeout);

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.