render.h 762 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef RENDER_H
  2. #define RENDER_H
  3. #include <string>
  4. struct render {
  5. int speed;
  6. int effect;
  7. };
  8. void reset_render(void);
  9. int ms_sleep(unsigned int ms);
  10. void render_sleep(void);
  11. void write_color(int fd, int color);
  12. int send_file(int fd, char *filename);
  13. void send_goto(int fd, int x, int y);
  14. int send_file(int fd, int x, int y, char *filename);
  15. const char *process_trigger(int fd, const char *cp);
  16. void process_trigger(int fd, std::string str, size_t &pos);
  17. void render_effect(int fd, char ch);
  18. /*
  19. void render(int fd, const char *string_out, int len);
  20. */
  21. void render(int fd, std::string &string_out);
  22. void render_image(const char **lines, int size);
  23. #define TRIGGER "^"
  24. // Max limit we'll sleep before ignoring effects/speed.
  25. #define SLEEP_LIMIT 30
  26. #endif