/* * A standard set of graphics calls, defined on different machines * to make the proper calls for that machine */ /* * Definitions for the Borland BGI library for DOS */ #include #include int ctrlcfunc( void ); #define draw_init() ctrlbrk(ctrlcfunc) void setup_graphics( void ); #define cleanup_graphics() closegraph() void draw_fontcolor( int c ); void draw_text_left( int x, int y, char *string ); void draw_text_centered( int x, int y, char *string ); void draw_text_right( int x, int y, char *string ); void draw_text_vertical( int x, int y, char *string ); void draw_rectangle( int x1, int y1, int x2, int y2, int c ); #define draw_pixel(x,y,color) putpixel(x,y,color) void draw_line( int x1, int y1, int x2, int y2, int c ); void draw_bar( int x1, int y1, int x2, int y2, int c ); #define draw_setpalette(n,r,g,b) setrgbpalette(n,r,g,b) int draw_getch( void ); int draw_getkey( void );