render.h 582 B

12345678910111213141516171819202122232425
  1. #ifndef RENDER_H
  2. #define RENDER_H
  3. struct render {
  4. int speed;
  5. int effect;
  6. };
  7. void reset_render(void);
  8. int ms_sleep(unsigned int ms);
  9. void render_sleep(void);
  10. void write_color(int fd, int color);
  11. int send_file(int fd, char *filename);
  12. void send_goto(int fd, int x, int y);
  13. int send_file(int fd, int x, int y, char *filename);
  14. const char *process_trigger(int fd, const char *cp);
  15. void render_effect(int fd, char ch);
  16. void render(int fd, const char *string_out, int len);
  17. #define TRIGGER "^"
  18. // Max limit we'll sleep before ignoring effects/speed.
  19. #define SLEEP_LIMIT 30
  20. #endif