images.cpp 973 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include "images.h"
  4. #include "utils.h"
  5. static IConv converter("UTF-8", "CP437");
  6. void display_line(const char *line) {
  7. char input[1024];
  8. char output[1024];
  9. strcpy(input, line);
  10. converter.convert(input, output, sizeof(output));
  11. printf("%s\n", output);
  12. }
  13. #define SHOW_IMAGE(img) \
  14. size = (sizeof(img) / sizeof(char *)); \
  15. for (x = 0; x < size; x++) \
  16. display_line(img[x]); \
  17. paws();
  18. void paws(void) {
  19. fflush(stdout);
  20. getchar();
  21. printf("\n\n");
  22. }
  23. int main() {
  24. int x;
  25. int size;
  26. SHOW_IMAGE(skull);
  27. SHOW_IMAGE(skullblink);
  28. SHOW_IMAGE(icu);
  29. SHOW_IMAGE(owl);
  30. SHOW_IMAGE(ghead);
  31. SHOW_IMAGE(ghost);
  32. SHOW_IMAGE(wolf);
  33. SHOW_IMAGE(panther);
  34. SHOW_IMAGE(bat);
  35. SHOW_IMAGE(specter);
  36. return 0;
  37. }