Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 
 

114 righe
2.8 KiB

  1. /*
  2. * libee ASCII-Art library
  3. * Copyright (c) 2002, 2003 Sam Hocevar <sam@zoy.org>
  4. * All Rights Reserved
  5. *
  6. * $Id$
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */
  22. #ifndef __EE_H__
  23. #define __EE_H__
  24. #ifdef __cplusplus
  25. extern "C"
  26. {
  27. #endif
  28. /*
  29. * Colors
  30. */
  31. enum ee_colors
  32. {
  33. EE_BLACK = 0,
  34. EE_BLUE = 1,
  35. EE_GREEN = 2,
  36. EE_CYAN = 3,
  37. EE_RED = 4,
  38. EE_MAGENTA = 5,
  39. EE_BROWN = 6,
  40. EE_LIGHTGRAY = 7,
  41. EE_DARKGRAY = 8,
  42. EE_LIGHTBLUE = 9,
  43. EE_LIGHTGREEN = 10,
  44. EE_LIGHTCYAN = 11,
  45. EE_LIGHTRED = 12,
  46. EE_LIGHTMAGENTA = 13,
  47. EE_YELLOW = 14,
  48. EE_WHITE = 15
  49. };
  50. extern char *ee_color_names[16];
  51. /*
  52. * Types
  53. */
  54. struct ee_sprite;
  55. /*
  56. * Prototypes
  57. */
  58. int ee_init(void);
  59. void ee_set_delay(int);
  60. int ee_get_width(void);
  61. int ee_get_height(void);
  62. void ee_refresh(void);
  63. void ee_end(void);
  64. char ee_get_key(void);
  65. void ee_set_color(int);
  66. int ee_get_color(void);
  67. void ee_putchar(int, int, char);
  68. void ee_putstr(int, int, char *);
  69. void ee_clear(void);
  70. void ee_draw_line(int, int, int, int, char);
  71. void ee_draw_polyline(int[], int[], int, char);
  72. void ee_draw_thin_line(int, int, int, int);
  73. void ee_draw_thin_polyline(int[], int[], int);
  74. void ee_draw_circle(int, int, int, char);
  75. void ee_draw_ellipse(int, int, int, int, char);
  76. void ee_draw_thin_ellipse(int, int, int, int);
  77. void ee_fill_ellipse(int, int, int, int, char);
  78. void ee_draw_box(int, int, int, int, char);
  79. void ee_draw_thin_box(int, int, int, int);
  80. void ee_fill_box(int, int, int, int, char);
  81. void ee_draw_triangle(int, int, int, int, int, int, char);
  82. void ee_draw_thin_triangle(int, int, int, int, int, int);
  83. void ee_fill_triangle(int, int, int, int, int, int, char);
  84. int ee_rand(int, int);
  85. int ee_sqrt(int);
  86. struct ee_sprite * ee_load_sprite(const char *);
  87. int ee_get_sprite_frames(struct ee_sprite *);
  88. int ee_get_sprite_width(struct ee_sprite *, int);
  89. int ee_get_sprite_height(struct ee_sprite *, int);
  90. int ee_get_sprite_dx(struct ee_sprite *, int);
  91. int ee_get_sprite_dy(struct ee_sprite *, int);
  92. void ee_draw_sprite(int, int, struct ee_sprite *, int);
  93. void ee_free_sprite(struct ee_sprite *);
  94. #ifdef __cplusplus
  95. }
  96. #endif
  97. #endif /* __EE_H__ */