print.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef PRINT_H
  2. #define PRINT_H
  3. /// Print characters onto the screen (not player input).
  4. /// @param arr string to print
  5. /// @param size size of the string
  6. /// @param line line on which to print the string
  7. ///
  8. void slowPrint(char arr[], int size, int line);
  9. /// Print characters onto the screen (player input).
  10. /// @param arr string to print
  11. /// @param size size of the string
  12. /// @param line line on which to print the string
  13. ///
  14. void slowType(char arr[], int size, int line);
  15. /// Operates the same way as slowPrint, but cannot be interrupted
  16. /// by a key press.
  17. /// @param arr string to print
  18. /// @param size size of the string
  19. /// @param line line on which to print the string
  20. ///
  21. void passPrint(char arr[], int size, int line);
  22. /// Checks if a key has been pressed. Used to skip the opening sequence and
  23. /// jump straight to pass().
  24. ///
  25. int kbhit();
  26. /// Used by pass() to print the left side of the screen. First prints
  27. /// a hexidecimal representation of an int, then the section of the
  28. /// string containing words and garbage.
  29. /// @param hex number to be displayed in hexidecimal
  30. /// @param arr string to be printed
  31. /// @param line line on which to print the string
  32. /// @param offset used to determine which side of the screen to print on
  33. ///
  34. void printChoices(int hex, char arr[], int line, int offset);
  35. #endif // PRINT_H
  36. // end