patch-props_c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. $OpenBSD: patch-props_c,v 1.2 2017/05/10 23:34:25 espie Exp $
  2. Index: props.c
  3. --- props.c.orig
  4. +++ props.c
  5. @@ -7,8 +7,10 @@
  6. * sequences in the game.
  7. */
  8. +void check_normal_events(void);
  9. /* the get-ready sequence */
  10. +void
  11. get_ready()
  12. {
  13. int xx, yy, i;
  14. @@ -41,6 +43,7 @@ get_ready()
  15. /* the game-over sequence */
  16. +void
  17. game_over()
  18. {
  19. int xx, yy;
  20. @@ -64,6 +67,7 @@ game_over()
  21. /* the end-of-level sequence -- the screen flashes a few times */
  22. +void
  23. finish()
  24. {
  25. int i;
  26. @@ -115,7 +119,7 @@ Bool pause_seq()
  27. if (event.xany.window != window) continue;
  28. switch (event.type) {
  29. case KeyPress:
  30. - XLookupString(&event, &c_buf, 1, &last_key, &status);
  31. + XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status);
  32. if ((last_key == XK_q) || (last_key == XK_Q))
  33. do_exit();
  34. if ((last_key == XK_r) || (last_key == XK_R))
  35. @@ -136,7 +140,8 @@ Bool pause_seq()
  36. }
  37. -do_sleep(secs)
  38. +void
  39. +do_sleep(int secs)
  40. {
  41. int i;
  42. @@ -147,7 +152,8 @@ do_sleep(secs)
  43. }
  44. -do_usleep(usecs)
  45. +void
  46. +do_usleep(int usecs)
  47. {
  48. int i, d, r;
  49. @@ -164,6 +170,7 @@ do_usleep(usecs)
  50. }
  51. +void
  52. check_normal_events()
  53. {
  54. char c_buf;
  55. @@ -175,7 +182,7 @@ check_normal_events()
  56. if (event.xany.window != window) continue;
  57. switch (event.type) {
  58. case KeyPress:
  59. - XLookupString(&event, &c_buf, 1, &last_key, &status);
  60. + XLookupString((XKeyEvent *) &event, &c_buf, 1, &last_key, &status);
  61. if (last_key == XK_space)
  62. if (!pause_seq())
  63. longjmp(jb_start, 1);