Xurses...
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

44 Zeilen
1.3KB

  1. #include <xolatile/xtandard.c>
  2. #include <xolatile/xurses.c>
  3. #include <stdio.h>
  4. static int i_x = 0;
  5. static int i_y = 0;
  6. static void i_up (void) { --i_y; limit (& i_y, 0, curses_screen_height - 1); }
  7. static void i_down (void) { ++i_y; limit (& i_y, 0, curses_screen_height - 1); }
  8. static void i_left (void) { --i_x; limit (& i_x, 0, curses_screen_width - 1); }
  9. static void i_right (void) { ++i_x; limit (& i_x, 0, curses_screen_width - 1); }
  10. int main (void) {
  11. curses_configure ();
  12. curses_bind (SIGNAL_W, i_up);
  13. curses_bind (SIGNAL_S, i_down);
  14. curses_bind (SIGNAL_A, i_left);
  15. curses_bind (SIGNAL_D, i_right);
  16. terminal_show_cursor (0);
  17. while (curses_active != 0) {
  18. curses_render_background ('.', COLOUR_GREY, EFFECT_BOLD);
  19. curses_render_character ('A', COLOUR_GREEN, EFFECT_NORMAL, 0, 1);
  20. curses_render_character ('B', COLOUR_YELLOW, EFFECT_REVERSE, 0, 2);
  21. curses_render_character ('C', COLOUR_WHITE, EFFECT_BLINK, 1, 0);
  22. curses_render_character ('D', COLOUR_BLUE, EFFECT_ITALIC, 2, 0);
  23. curses_render_string ("Heyo world!", COLOUR_RED, EFFECT_BOLD, 3, 0);
  24. curses_render_string ("Heyo world!", COLOUR_PINK, EFFECT_BOLD, 168, 0);
  25. curses_render_character ('@', COLOUR_CYAN, EFFECT_ITALIC, i_x, i_y);
  26. curses_synchronize ();
  27. }
  28. terminal_show_cursor (1);
  29. return (EXIT_SUCCESS);
  30. }