text.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef _WONX_SYS_TEXT_H_
  2. #define _WONX_SYS_TEXT_H_
  3. #include "service.h"
  4. #define NUM_PADSPACE 0
  5. #define NUM_ALIGN_RIGHT 0
  6. #define NUM_HEXA (1 << 0)
  7. #define NUM_PADZERO (1 << 1)
  8. #define NUM_ALIGN_LEFT (1 << 2)
  9. #define NUM_SIGNED (1 << 3)
  10. #define NUM_STORE (1 << 7)
  11. #define TEXT_MODE_ANK 0
  12. #define TEXT_MODE_ANK_SJIS 1
  13. #define TEXT_MODE_SJIS 2
  14. #define TEXT_SCREEN_WIDTH 28
  15. #define TEXT_SCREEN_HEIGHT 18
  16. void text_screen_init(void);
  17. void text_window_init(int x, int y, int w, int h, unsigned int base);
  18. void text_set_mode(int mode);
  19. int text_get_mode(void);
  20. void text_put_char(int x, int y, unsigned int c);
  21. int text_put_string(int x, int y, char * string);
  22. int text_put_substring(int x, int y, char * s, int length);
  23. void text_put_numeric(int x, int y, int length, int format, int number);
  24. void text_store_numeric(char * buffer, int length, int format, int number);
  25. void text_fill_char(int x, int y, int length, int c);
  26. void text_set_palette(int palette_num);
  27. int text_get_palette(void);
  28. void text_set_ank_font(int base, int color, int count, void * font);
  29. void text_set_sjis_font(void * p);
  30. void text_get_fontdata(int c, void * buffer);
  31. void text_set_screen(int screen);
  32. int text_get_screen(void);
  33. void cursor_display(int flag);
  34. int cursor_status(void);
  35. void cursor_set_location(int x, int y, int w, int h);
  36. unsigned long int cursor_get_location(void);
  37. void cursor_set_type(int palette_num, int interval);
  38. unsigned long int cursor_get_type(void);
  39. int text_printf(int x, int y, const char *format, ...);
  40. #endif