curses 1.3.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (262) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/macos.yml +19 -0
  3. data/.github/workflows/ubuntu.yml +26 -0
  4. data/.github/workflows/windows.yml +25 -0
  5. data/History.md +27 -0
  6. data/README.md +14 -46
  7. data/Rakefile +0 -86
  8. data/curses.gemspec +3 -4
  9. data/ext/curses/curses.c +194 -38
  10. data/ext/curses/extconf.rb +81 -22
  11. data/lib/curses.rb +5 -12
  12. data/sample/addch.rb +16 -0
  13. data/sample/attr_demo.rb +32 -0
  14. data/sample/colors.rb +26 -0
  15. data/sample/mouse_move.rb +75 -0
  16. data/vendor/PDCurses/.gitignore +47 -0
  17. data/vendor/PDCurses/.travis.yml +49 -0
  18. data/vendor/PDCurses/CMakeLists.txt +68 -0
  19. data/vendor/PDCurses/HISTORY.md +2036 -0
  20. data/vendor/PDCurses/IMPLEMNT.md +327 -0
  21. data/vendor/PDCurses/Makefile +27 -0
  22. data/vendor/PDCurses/README.md +77 -0
  23. data/vendor/PDCurses/acs_defs.h +265 -0
  24. data/vendor/PDCurses/appveyor.yml +218 -0
  25. data/vendor/PDCurses/cmake/README.md +71 -0
  26. data/vendor/PDCurses/cmake/build_dependencies.cmake +178 -0
  27. data/vendor/PDCurses/cmake/build_options.cmake +25 -0
  28. data/vendor/PDCurses/cmake/dll_version.cmake +26 -0
  29. data/vendor/PDCurses/cmake/gen_config_header.cmake +43 -0
  30. data/vendor/PDCurses/cmake/get_version.cmake +17 -0
  31. data/vendor/PDCurses/cmake/make_uninstall.cmake +19 -0
  32. data/vendor/PDCurses/cmake/project_common.cmake +121 -0
  33. data/vendor/PDCurses/cmake/resource.in.cmake +52 -0
  34. data/vendor/PDCurses/cmake/sdl2_ttf/CMakeLists.txt +83 -0
  35. data/vendor/PDCurses/cmake/target_arch.cmake +36 -0
  36. data/vendor/PDCurses/cmake/version.in.cmake +73 -0
  37. data/vendor/PDCurses/cmake/watcom_open_dos16_toolchain.cmake +96 -0
  38. data/vendor/PDCurses/cmake/watcom_open_dos32_toolchain.cmake +106 -0
  39. data/vendor/PDCurses/cmake/watcom_open_os2v2_toolchain.cmake +105 -0
  40. data/vendor/PDCurses/curses.h +1846 -0
  41. data/vendor/PDCurses/curspriv.h +134 -0
  42. data/vendor/PDCurses/demos/README.md +25 -0
  43. data/vendor/PDCurses/demos/firework.c +144 -0
  44. data/vendor/PDCurses/demos/newtest.c +581 -0
  45. data/vendor/PDCurses/demos/ozdemo.c +447 -0
  46. data/vendor/PDCurses/demos/ptest.c +283 -0
  47. data/vendor/PDCurses/demos/rain.c +157 -0
  48. data/vendor/PDCurses/demos/testcurs.c +1607 -0
  49. data/vendor/PDCurses/demos/tui.c +1048 -0
  50. data/vendor/PDCurses/demos/tui.h +65 -0
  51. data/vendor/PDCurses/demos/tuidemo.c +233 -0
  52. data/vendor/PDCurses/demos/version.c +61 -0
  53. data/vendor/PDCurses/demos/worm.c +432 -0
  54. data/vendor/PDCurses/demos/xmas.c +955 -0
  55. data/vendor/PDCurses/dos/CMakeLists.txt +47 -0
  56. data/vendor/PDCurses/dos/Makefile +105 -0
  57. data/vendor/PDCurses/dos/Makefile.bcc +83 -0
  58. data/vendor/PDCurses/dos/Makefile.dmc +257 -0
  59. data/vendor/PDCurses/dos/Makefile.msc +113 -0
  60. data/vendor/PDCurses/dos/Makefile.wcc +107 -0
  61. data/vendor/PDCurses/dos/README.md +51 -0
  62. data/vendor/PDCurses/dos/bccdos.lrf +9 -0
  63. data/vendor/PDCurses/dos/mscdos.lrf +50 -0
  64. data/vendor/PDCurses/dos/pdcclip.c +132 -0
  65. data/vendor/PDCurses/dos/pdcdisp.c +135 -0
  66. data/vendor/PDCurses/dos/pdcdos.h +194 -0
  67. data/vendor/PDCurses/dos/pdcgetsc.c +98 -0
  68. data/vendor/PDCurses/dos/pdckbd.c +513 -0
  69. data/vendor/PDCurses/dos/pdcscrn.c +785 -0
  70. data/vendor/PDCurses/dos/pdcsetsc.c +101 -0
  71. data/vendor/PDCurses/dos/pdcutil.c +212 -0
  72. data/vendor/PDCurses/libobjs.mif +26 -0
  73. data/vendor/PDCurses/makedist.mif +20 -0
  74. data/vendor/PDCurses/man/Makefile +37 -0
  75. data/vendor/PDCurses/man/README.md +21 -0
  76. data/vendor/PDCurses/man/intro.md +361 -0
  77. data/vendor/PDCurses/man/manext.c +119 -0
  78. data/vendor/PDCurses/man/sdl.md +152 -0
  79. data/vendor/PDCurses/man/sdl2.md +58 -0
  80. data/vendor/PDCurses/man/x11.md +407 -0
  81. data/vendor/PDCurses/ncurses/CMakeLists.txt +66 -0
  82. data/vendor/PDCurses/ncurses/README.md +26 -0
  83. data/vendor/PDCurses/ncurses/makefile +29 -0
  84. data/vendor/PDCurses/os2/CMakeLists.txt +41 -0
  85. data/vendor/PDCurses/os2/Makefile +132 -0
  86. data/vendor/PDCurses/os2/Makefile.bcc +90 -0
  87. data/vendor/PDCurses/os2/Makefile.wcc +43 -0
  88. data/vendor/PDCurses/os2/README.md +43 -0
  89. data/vendor/PDCurses/os2/iccos2.lrf +50 -0
  90. data/vendor/PDCurses/os2/iccos2.mak +256 -0
  91. data/vendor/PDCurses/os2/pdcclip.c +188 -0
  92. data/vendor/PDCurses/os2/pdcdisp.c +93 -0
  93. data/vendor/PDCurses/os2/pdcgetsc.c +89 -0
  94. data/vendor/PDCurses/os2/pdckbd.c +521 -0
  95. data/vendor/PDCurses/os2/pdcos2.h +55 -0
  96. data/vendor/PDCurses/os2/pdcscrn.c +449 -0
  97. data/vendor/PDCurses/os2/pdcsetsc.c +112 -0
  98. data/vendor/PDCurses/os2/pdcutil.c +52 -0
  99. data/vendor/PDCurses/panel.h +56 -0
  100. data/vendor/PDCurses/pdcurses/README.md +25 -0
  101. data/vendor/PDCurses/pdcurses/addch.c +693 -0
  102. data/vendor/PDCurses/pdcurses/addchstr.c +245 -0
  103. data/vendor/PDCurses/pdcurses/addstr.c +240 -0
  104. data/vendor/PDCurses/pdcurses/attr.c +359 -0
  105. data/vendor/PDCurses/pdcurses/beep.c +68 -0
  106. data/vendor/PDCurses/pdcurses/bkgd.c +223 -0
  107. data/vendor/PDCurses/pdcurses/border.c +411 -0
  108. data/vendor/PDCurses/pdcurses/clear.c +159 -0
  109. data/vendor/PDCurses/pdcurses/color.c +298 -0
  110. data/vendor/PDCurses/pdcurses/debug.c +109 -0
  111. data/vendor/PDCurses/pdcurses/delch.c +96 -0
  112. data/vendor/PDCurses/pdcurses/deleteln.c +211 -0
  113. data/vendor/PDCurses/pdcurses/deprec.c +27 -0
  114. data/vendor/PDCurses/pdcurses/getch.c +417 -0
  115. data/vendor/PDCurses/pdcurses/getstr.c +474 -0
  116. data/vendor/PDCurses/pdcurses/getyx.c +139 -0
  117. data/vendor/PDCurses/pdcurses/inch.c +127 -0
  118. data/vendor/PDCurses/pdcurses/inchstr.c +214 -0
  119. data/vendor/PDCurses/pdcurses/initscr.c +367 -0
  120. data/vendor/PDCurses/pdcurses/inopts.c +324 -0
  121. data/vendor/PDCurses/pdcurses/insch.c +271 -0
  122. data/vendor/PDCurses/pdcurses/insstr.c +264 -0
  123. data/vendor/PDCurses/pdcurses/instr.c +246 -0
  124. data/vendor/PDCurses/pdcurses/kernel.c +259 -0
  125. data/vendor/PDCurses/pdcurses/keyname.c +157 -0
  126. data/vendor/PDCurses/pdcurses/mouse.c +438 -0
  127. data/vendor/PDCurses/pdcurses/move.c +57 -0
  128. data/vendor/PDCurses/pdcurses/outopts.c +159 -0
  129. data/vendor/PDCurses/pdcurses/overlay.c +214 -0
  130. data/vendor/PDCurses/pdcurses/pad.c +260 -0
  131. data/vendor/PDCurses/pdcurses/panel.c +633 -0
  132. data/vendor/PDCurses/pdcurses/printw.c +126 -0
  133. data/vendor/PDCurses/pdcurses/refresh.c +279 -0
  134. data/vendor/PDCurses/pdcurses/scanw.c +578 -0
  135. data/vendor/PDCurses/pdcurses/scr_dump.c +213 -0
  136. data/vendor/PDCurses/pdcurses/scroll.c +101 -0
  137. data/vendor/PDCurses/pdcurses/slk.c +591 -0
  138. data/vendor/PDCurses/pdcurses/termattr.c +182 -0
  139. data/vendor/PDCurses/pdcurses/terminfo.c +217 -0
  140. data/vendor/PDCurses/pdcurses/touch.c +163 -0
  141. data/vendor/PDCurses/pdcurses/util.c +312 -0
  142. data/vendor/PDCurses/pdcurses/window.c +569 -0
  143. data/vendor/PDCurses/sdl1/Makefile +129 -0
  144. data/vendor/PDCurses/sdl1/Makefile.mng +110 -0
  145. data/vendor/PDCurses/sdl1/README.md +31 -0
  146. data/vendor/PDCurses/sdl1/deffont.h +385 -0
  147. data/vendor/PDCurses/sdl1/deficon.h +23 -0
  148. data/vendor/PDCurses/sdl1/pdcclip.c +131 -0
  149. data/vendor/PDCurses/sdl1/pdcdisp.c +373 -0
  150. data/vendor/PDCurses/sdl1/pdcgetsc.c +30 -0
  151. data/vendor/PDCurses/sdl1/pdckbd.c +405 -0
  152. data/vendor/PDCurses/sdl1/pdcscrn.c +414 -0
  153. data/vendor/PDCurses/sdl1/pdcsdl.h +31 -0
  154. data/vendor/PDCurses/sdl1/pdcsetsc.c +64 -0
  155. data/vendor/PDCurses/sdl1/pdcutil.c +40 -0
  156. data/vendor/PDCurses/sdl1/sdltest.c +79 -0
  157. data/vendor/PDCurses/sdl2/CMakeLists.txt +76 -0
  158. data/vendor/PDCurses/sdl2/Makefile +135 -0
  159. data/vendor/PDCurses/sdl2/Makefile.vc +164 -0
  160. data/vendor/PDCurses/sdl2/README.md +34 -0
  161. data/vendor/PDCurses/sdl2/deffont.h +385 -0
  162. data/vendor/PDCurses/sdl2/deficon.h +23 -0
  163. data/vendor/PDCurses/sdl2/pdcclip.c +93 -0
  164. data/vendor/PDCurses/sdl2/pdcdisp.c +534 -0
  165. data/vendor/PDCurses/sdl2/pdcgetsc.c +30 -0
  166. data/vendor/PDCurses/sdl2/pdckbd.c +480 -0
  167. data/vendor/PDCurses/sdl2/pdcscrn.c +443 -0
  168. data/vendor/PDCurses/sdl2/pdcsdl.h +33 -0
  169. data/vendor/PDCurses/sdl2/pdcsetsc.c +67 -0
  170. data/vendor/PDCurses/sdl2/pdcutil.c +39 -0
  171. data/vendor/PDCurses/sdl2/sdltest.c +81 -0
  172. data/vendor/PDCurses/term.h +48 -0
  173. data/vendor/PDCurses/version.mif +7 -0
  174. data/vendor/PDCurses/vt/CMakeLists.txt +28 -0
  175. data/vendor/PDCurses/vt/Makefile +135 -0
  176. data/vendor/PDCurses/vt/Makefile.bcc +111 -0
  177. data/vendor/PDCurses/vt/Makefile.dmc +258 -0
  178. data/vendor/PDCurses/vt/Makefile.vc +144 -0
  179. data/vendor/PDCurses/vt/Makefile.wcc +107 -0
  180. data/vendor/PDCurses/vt/README.md +64 -0
  181. data/vendor/PDCurses/vt/pdcclip.c +20 -0
  182. data/vendor/PDCurses/vt/pdcdisp.c +284 -0
  183. data/vendor/PDCurses/vt/pdcgetsc.c +27 -0
  184. data/vendor/PDCurses/vt/pdckbd.c +394 -0
  185. data/vendor/PDCurses/vt/pdcscrn.c +434 -0
  186. data/vendor/PDCurses/vt/pdcsetsc.c +45 -0
  187. data/vendor/PDCurses/vt/pdcutil.c +43 -0
  188. data/vendor/PDCurses/vt/pdcvt.h +16 -0
  189. data/vendor/PDCurses/watcom.mif +68 -0
  190. data/vendor/PDCurses/wincon/CMakeLists.txt +27 -0
  191. data/vendor/PDCurses/wincon/Makefile.bcc +88 -0
  192. data/vendor/PDCurses/wincon/Makefile.dmc +256 -0
  193. data/vendor/PDCurses/wincon/Makefile.lcc +273 -0
  194. data/vendor/PDCurses/wincon/Makefile.mng +176 -0
  195. data/vendor/PDCurses/wincon/Makefile.vc +144 -0
  196. data/vendor/PDCurses/wincon/Makefile.wcc +51 -0
  197. data/vendor/PDCurses/wincon/README.md +85 -0
  198. data/vendor/PDCurses/wincon/pdcclip.c +174 -0
  199. data/vendor/PDCurses/wincon/pdcdisp.c +143 -0
  200. data/vendor/PDCurses/wincon/pdcgetsc.c +55 -0
  201. data/vendor/PDCurses/wincon/pdckbd.c +786 -0
  202. data/vendor/PDCurses/wincon/pdcscrn.c +717 -0
  203. data/vendor/PDCurses/wincon/pdcsetsc.c +91 -0
  204. data/vendor/PDCurses/wincon/pdcurses.ico +0 -0
  205. data/vendor/PDCurses/wincon/pdcurses.rc +28 -0
  206. data/vendor/PDCurses/wincon/pdcutil.c +41 -0
  207. data/vendor/PDCurses/wincon/pdcwin.h +31 -0
  208. data/vendor/PDCurses/wingui/CMakeLists.txt +27 -0
  209. data/vendor/PDCurses/wingui/Makefile.bcc +85 -0
  210. data/vendor/PDCurses/wingui/Makefile.dmc +259 -0
  211. data/vendor/PDCurses/wingui/Makefile.lcc +273 -0
  212. data/vendor/PDCurses/wingui/Makefile.mng +171 -0
  213. data/vendor/PDCurses/wingui/Makefile.vc +144 -0
  214. data/vendor/PDCurses/wingui/Makefile.wcc +51 -0
  215. data/vendor/PDCurses/wingui/README.md +93 -0
  216. data/vendor/PDCurses/wingui/pdcclip.c +174 -0
  217. data/vendor/PDCurses/wingui/pdcdisp.c +718 -0
  218. data/vendor/PDCurses/wingui/pdcgetsc.c +30 -0
  219. data/vendor/PDCurses/wingui/pdckbd.c +143 -0
  220. data/vendor/PDCurses/wingui/pdcscrn.c +2797 -0
  221. data/vendor/PDCurses/wingui/pdcsetsc.c +89 -0
  222. data/vendor/PDCurses/wingui/pdcurses.ico +0 -0
  223. data/vendor/PDCurses/wingui/pdcurses.rc +28 -0
  224. data/vendor/PDCurses/wingui/pdcutil.c +61 -0
  225. data/vendor/PDCurses/wingui/pdcwin.h +122 -0
  226. data/vendor/PDCurses/x11/Makefile.in +754 -0
  227. data/vendor/PDCurses/x11/PDCurses.spec +82 -0
  228. data/vendor/PDCurses/x11/README.md +62 -0
  229. data/vendor/PDCurses/x11/ScrollBox.c +319 -0
  230. data/vendor/PDCurses/x11/ScrollBox.h +51 -0
  231. data/vendor/PDCurses/x11/ScrollBoxP.h +70 -0
  232. data/vendor/PDCurses/x11/aclocal.m4 +994 -0
  233. data/vendor/PDCurses/x11/big_icon.xbm +46 -0
  234. data/vendor/PDCurses/x11/compose.h +201 -0
  235. data/vendor/PDCurses/x11/config.guess +1500 -0
  236. data/vendor/PDCurses/x11/config.h.in +100 -0
  237. data/vendor/PDCurses/x11/config.sub +1616 -0
  238. data/vendor/PDCurses/x11/configure +6700 -0
  239. data/vendor/PDCurses/x11/configure.ac +295 -0
  240. data/vendor/PDCurses/x11/debian/changelog +6 -0
  241. data/vendor/PDCurses/x11/debian/compat +1 -0
  242. data/vendor/PDCurses/x11/debian/control +11 -0
  243. data/vendor/PDCurses/x11/debian/copyright +27 -0
  244. data/vendor/PDCurses/x11/debian/rules +98 -0
  245. data/vendor/PDCurses/x11/install-sh +253 -0
  246. data/vendor/PDCurses/x11/little_icon.xbm +14 -0
  247. data/vendor/PDCurses/x11/ncurses_cfg.h +45 -0
  248. data/vendor/PDCurses/x11/pdcclip.c +173 -0
  249. data/vendor/PDCurses/x11/pdcdisp.c +85 -0
  250. data/vendor/PDCurses/x11/pdcgetsc.c +28 -0
  251. data/vendor/PDCurses/x11/pdckbd.c +104 -0
  252. data/vendor/PDCurses/x11/pdcscrn.c +258 -0
  253. data/vendor/PDCurses/x11/pdcsetsc.c +95 -0
  254. data/vendor/PDCurses/x11/pdcutil.c +52 -0
  255. data/vendor/PDCurses/x11/pdcx11.c +316 -0
  256. data/vendor/PDCurses/x11/pdcx11.h +191 -0
  257. data/vendor/PDCurses/x11/sb.c +155 -0
  258. data/vendor/PDCurses/x11/x11.c +3686 -0
  259. data/vendor/PDCurses/x11/xcurses-config.in +81 -0
  260. metadata +259 -25
  261. data/.travis.yml +0 -16
  262. data/appveyor.yml +0 -16
@@ -0,0 +1,955 @@
1
+ /******************************************************************************/
2
+ /* asciixmas */
3
+ /* December 1989 Larry Bartz Indianapolis, IN */
4
+ /* */
5
+ /* */
6
+ /* I'm dreaming of an ascii character-based monochrome Christmas, */
7
+ /* Just like the one's I used to know! */
8
+ /* Via a full duplex communications channel, */
9
+ /* At 9600 bits per second, */
10
+ /* Even though it's kinda slow. */
11
+ /* */
12
+ /* I'm dreaming of an ascii character-based monochrome Christmas, */
13
+ /* With ev'ry C program I write! */
14
+ /* May your screen be merry and bright! */
15
+ /* And may all your Christmases be amber or green, */
16
+ /* (for reduced eyestrain and improved visibility)! */
17
+ /* */
18
+ /* */
19
+ /* */
20
+ /* IMPLEMENTATION */
21
+ /* */
22
+ /* Feel free to modify the defined string FROMWHO to reflect you, your */
23
+ /* organization, your site, whatever. */
24
+ /* */
25
+ /* This looks a lot better if you can turn off your cursor before execution. */
26
+ /* The cursor is distracting but it doesn't really ruin the show. */
27
+ /* */
28
+ /* At our site, we invoke this for our users just after login and the */
29
+ /* determination of terminal type. */
30
+ /* */
31
+ /* */
32
+ /* PORTABILITY */
33
+ /* */
34
+ /* I wrote this using only the very simplest curses functions so that it */
35
+ /* might be the most portable. I was personally able to test on five */
36
+ /* different cpu/UNIX combinations. */
37
+ /* */
38
+ /* */
39
+ /* COMPILE */
40
+ /* */
41
+ /* usually this: */
42
+ /* */
43
+ /* cc -O xmas.c -lcurses -o xmas -s */
44
+ /* */
45
+ /******************************************************************************/
46
+
47
+ #include <curses.h>
48
+ #include <signal.h>
49
+
50
+ void lil(WINDOW *);
51
+ void midtop(WINDOW *);
52
+ void bigtop(WINDOW *);
53
+ void bigface(WINDOW *, chtype);
54
+ void legs1(WINDOW *);
55
+ void legs2(WINDOW *);
56
+ void legs3(WINDOW *);
57
+ void legs4(WINDOW *);
58
+ void initdeer(void);
59
+ void boxit(void);
60
+ void seas(void);
61
+ void greet(void);
62
+ void fromwho(void);
63
+ void del_msg(void);
64
+ void tree(void);
65
+ void balls(void);
66
+ void star(void);
67
+ void strng1(void);
68
+ void strng2(void);
69
+ void strng3(void);
70
+ void strng4(void);
71
+ void strng5(void);
72
+ void blinkit(void);
73
+ void reindeer(void);
74
+
75
+ #define FROMWHO "From Larry Bartz, Mark Hessling and William McBrine"
76
+
77
+ int y_pos, x_pos;
78
+
79
+ WINDOW *treescrn, *treescrn2, *treescrn3, *treescrn4, *treescrn5,
80
+ *treescrn6, *treescrn7, *treescrn8, *dotdeer0, *stardeer0,
81
+ *lildeer0, *lildeer1, *lildeer2, *lildeer3, *middeer0,
82
+ *middeer1, *middeer2, *middeer3, *bigdeer0, *bigdeer1,
83
+ *bigdeer2, *bigdeer3, *bigdeer4, *lookdeer0, *lookdeer1,
84
+ *lookdeer2, *lookdeer3, *lookdeer4, *w_holiday, *w_del_msg;
85
+
86
+ int main(int argc, char **argv)
87
+ {
88
+ int loopy;
89
+
90
+ #ifdef XCURSES
91
+ Xinitscr(argc, argv);
92
+ #else
93
+ initscr();
94
+ #endif
95
+ nodelay(stdscr, TRUE);
96
+ noecho();
97
+ nonl();
98
+ refresh();
99
+
100
+ #ifdef A_COLOR
101
+ if (has_colors())
102
+ start_color();
103
+ #endif
104
+ curs_set(0);
105
+
106
+ treescrn = newwin(16, 27, 3, 53);
107
+ treescrn2 = newwin(16, 27, 3, 53);
108
+ treescrn3 = newwin(16, 27, 3, 53);
109
+ treescrn4 = newwin(16, 27, 3, 53);
110
+ treescrn5 = newwin(16, 27, 3, 53);
111
+ treescrn6 = newwin(16, 27, 3, 53);
112
+ treescrn7 = newwin(16, 27, 3, 53);
113
+ treescrn8 = newwin(16, 27, 3, 53);
114
+
115
+ w_holiday = newwin(1, 26, 3, 27);
116
+
117
+ w_del_msg = newwin(1, 12, 23, 60);
118
+
119
+ mvwaddstr(w_holiday, 0, 0, "H A P P Y H O L I D A Y S");
120
+
121
+ initdeer();
122
+
123
+ clear();
124
+ werase(treescrn);
125
+ touchwin(treescrn);
126
+ werase(treescrn2);
127
+ touchwin(treescrn2);
128
+ werase(treescrn8);
129
+ touchwin(treescrn8);
130
+ refresh();
131
+ napms(1000);
132
+
133
+ boxit();
134
+ del_msg();
135
+ napms(1000);
136
+
137
+ seas();
138
+ del_msg();
139
+ napms(1000);
140
+
141
+ greet();
142
+ del_msg();
143
+ napms(1000);
144
+
145
+ fromwho();
146
+ del_msg();
147
+ napms(1000);
148
+
149
+ tree();
150
+ napms(1000);
151
+
152
+ balls();
153
+ napms(1000);
154
+
155
+ star();
156
+ napms(1000);
157
+
158
+ strng1();
159
+ strng2();
160
+ strng3();
161
+ strng4();
162
+ strng5();
163
+
164
+ /* set up the windows for our blinking trees */
165
+ /* **************************************** */
166
+ /* treescrn3 */
167
+
168
+ overlay(treescrn, treescrn3);
169
+
170
+ /* balls */
171
+ mvwaddch(treescrn3, 4, 18, ' ');
172
+ mvwaddch(treescrn3, 7, 6, ' ');
173
+ mvwaddch(treescrn3, 8, 19, ' ');
174
+ mvwaddch(treescrn3, 11, 22, ' ');
175
+
176
+ /* star */
177
+ mvwaddch(treescrn3, 0, 12, '*');
178
+
179
+ /* strng1 */
180
+ mvwaddch(treescrn3, 3, 11, ' ');
181
+
182
+ /* strng2 */
183
+ mvwaddch(treescrn3, 5, 13, ' ');
184
+ mvwaddch(treescrn3, 6, 10, ' ');
185
+
186
+ /* strng3 */
187
+ mvwaddch(treescrn3, 7, 16, ' ');
188
+ mvwaddch(treescrn3, 7, 14, ' ');
189
+
190
+ /* strng4 */
191
+ mvwaddch(treescrn3, 10, 13, ' ');
192
+ mvwaddch(treescrn3, 10, 10, ' ');
193
+ mvwaddch(treescrn3, 11, 8, ' ');
194
+
195
+ /* strng5 */
196
+ mvwaddch(treescrn3, 11, 18, ' ');
197
+ mvwaddch(treescrn3, 12, 13, ' ');
198
+
199
+ /* treescrn4 */
200
+
201
+ overlay(treescrn, treescrn4);
202
+
203
+ /* balls */
204
+ mvwaddch(treescrn4, 3, 9, ' ');
205
+ mvwaddch(treescrn4, 4, 16, ' ');
206
+ mvwaddch(treescrn4, 7, 6, ' ');
207
+ mvwaddch(treescrn4, 8, 19, ' ');
208
+ mvwaddch(treescrn4, 11, 2, ' ');
209
+ mvwaddch(treescrn4, 12, 23, ' ');
210
+
211
+ /* star */
212
+ mvwaddch(treescrn4, 0, 12, '*' | A_STANDOUT);
213
+
214
+ /* strng1 */
215
+ mvwaddch(treescrn4, 3, 13, ' ');
216
+
217
+ /* strng2 */
218
+
219
+ /* strng3 */
220
+ mvwaddch(treescrn4, 7, 15, ' ');
221
+ mvwaddch(treescrn4, 8, 11, ' ');
222
+
223
+ /* strng4 */
224
+ mvwaddch(treescrn4, 9, 16, ' ');
225
+ mvwaddch(treescrn4, 10, 12, ' ');
226
+ mvwaddch(treescrn4, 11, 8, ' ');
227
+
228
+ /* strng5 */
229
+ mvwaddch(treescrn4, 11, 18, ' ');
230
+ mvwaddch(treescrn4, 12, 14, ' ');
231
+
232
+ /* treescrn5 */
233
+
234
+ overlay(treescrn, treescrn5);
235
+
236
+ /* balls */
237
+ mvwaddch(treescrn5, 3, 15, ' ');
238
+ mvwaddch(treescrn5, 10, 20, ' ');
239
+ mvwaddch(treescrn5, 12, 1, ' ');
240
+
241
+ /* star */
242
+ mvwaddch(treescrn5, 0, 12, '*');
243
+
244
+ /* strng1 */
245
+ mvwaddch(treescrn5, 3, 11, ' ');
246
+
247
+ /* strng2 */
248
+ mvwaddch(treescrn5, 5, 12, ' ');
249
+
250
+ /* strng3 */
251
+ mvwaddch(treescrn5, 7, 14, ' ');
252
+ mvwaddch(treescrn5, 8, 10, ' ');
253
+
254
+ /* strng4 */
255
+ mvwaddch(treescrn5, 9, 15, ' ');
256
+ mvwaddch(treescrn5, 10, 11, ' ');
257
+ mvwaddch(treescrn5, 11, 7, ' ');
258
+
259
+ /* strng5 */
260
+ mvwaddch(treescrn5, 11, 17, ' ');
261
+ mvwaddch(treescrn5, 12, 13, ' ');
262
+
263
+ /* treescrn6 */
264
+
265
+ overlay(treescrn, treescrn6);
266
+
267
+ /* balls */
268
+ mvwaddch(treescrn6, 6, 7, ' ');
269
+ mvwaddch(treescrn6, 7, 18, ' ');
270
+ mvwaddch(treescrn6, 10, 4, ' ');
271
+ mvwaddch(treescrn6, 11, 23, ' ');
272
+
273
+ /* star */
274
+ mvwaddch(treescrn6, 0, 12, '*' | A_STANDOUT);
275
+
276
+ /* strng1 */
277
+
278
+ /* strng2 */
279
+ mvwaddch(treescrn6, 5, 11, ' ');
280
+
281
+ /* strng3 */
282
+ mvwaddch(treescrn6, 7, 13, ' ');
283
+ mvwaddch(treescrn6, 8, 9, ' ');
284
+
285
+ /* strng4 */
286
+ mvwaddch(treescrn6, 9, 14, ' ');
287
+ mvwaddch(treescrn6, 10, 10, ' ');
288
+ mvwaddch(treescrn6, 11, 6, ' ');
289
+
290
+ /* strng5 */
291
+ mvwaddch(treescrn6, 11, 16, ' ');
292
+ mvwaddch(treescrn6, 12, 12, ' ');
293
+
294
+ /* treescrn7 */
295
+
296
+ overlay(treescrn, treescrn7);
297
+
298
+ /* balls */
299
+ mvwaddch(treescrn7, 3, 15, ' ');
300
+ mvwaddch(treescrn7, 6, 7, ' ');
301
+ mvwaddch(treescrn7, 7, 18, ' ');
302
+ mvwaddch(treescrn7, 10, 4, ' ');
303
+ mvwaddch(treescrn7, 11, 22, ' ');
304
+
305
+ /* star */
306
+ mvwaddch(treescrn7, 0, 12, '*');
307
+
308
+ /* strng1 */
309
+ mvwaddch(treescrn7, 3, 12, ' ');
310
+
311
+ /* strng2 */
312
+ mvwaddch(treescrn7, 5, 13, ' ');
313
+ mvwaddch(treescrn7, 6, 9, ' ');
314
+
315
+ /* strng3 */
316
+ mvwaddch(treescrn7, 7, 15, ' ');
317
+ mvwaddch(treescrn7, 8, 11, ' ');
318
+
319
+ /* strng4 */
320
+ mvwaddch(treescrn7, 9, 16, ' ');
321
+ mvwaddch(treescrn7, 10, 12, ' ');
322
+ mvwaddch(treescrn7, 11, 8, ' ');
323
+
324
+ /* strng5 */
325
+ mvwaddch(treescrn7, 11, 18, ' ');
326
+ mvwaddch(treescrn7, 12, 14, ' ');
327
+
328
+ napms(1000);
329
+ reindeer();
330
+
331
+ touchwin(w_holiday);
332
+ wrefresh(w_holiday);
333
+ wrefresh(w_del_msg);
334
+
335
+ napms(1000);
336
+
337
+ for (loopy = 0; loopy < 50; loopy++)
338
+ blinkit();
339
+
340
+ clear();
341
+ refresh();
342
+ endwin();
343
+
344
+ return 0;
345
+ }
346
+
347
+ void lil(WINDOW *win)
348
+ {
349
+ mvwaddch(win, 0, 0, (chtype) 'V');
350
+ mvwaddch(win, 1, 0, (chtype) '@');
351
+ mvwaddch(win, 1, 3, (chtype) '~');
352
+ }
353
+
354
+ void midtop(WINDOW *win)
355
+ {
356
+ mvwaddstr(win, 0, 2, "yy");
357
+ mvwaddstr(win, 1, 2, "0(=)~");
358
+ }
359
+
360
+ void bigtop(WINDOW *win)
361
+ {
362
+ mvwaddstr(win, 0, 17, "\\/");
363
+ mvwaddstr(win, 0, 20, "\\/");
364
+ mvwaddch(win, 1, 18, (chtype) '\\');
365
+ mvwaddch(win, 1, 20, (chtype) '/');
366
+ mvwaddstr(win, 2, 19, "|_");
367
+ mvwaddstr(win, 3, 18, "/^0\\");
368
+ mvwaddstr(win, 4, 17, "//\\");
369
+ mvwaddch(win, 4, 22, (chtype) '\\');
370
+ mvwaddstr(win, 5, 7, "^~~~~~~~~// ~~U");
371
+ }
372
+
373
+ void bigface(WINDOW *win, chtype noseattr)
374
+ {
375
+ mvwaddstr(win, 0, 16, "\\/ \\/");
376
+ mvwaddstr(win, 1, 17, "\\Y/ \\Y/");
377
+ mvwaddstr(win, 2, 19, "\\=/");
378
+ mvwaddstr(win, 3, 17, "^\\o o/^");
379
+ mvwaddstr(win, 4, 17, "//( )");
380
+ mvwaddstr(win, 5, 7, "^~~~~~~~~// \\");
381
+ waddch(win, 'O' | noseattr);
382
+ waddstr(win, "/");
383
+ }
384
+
385
+ void legs1(WINDOW *win)
386
+ {
387
+ mvwaddstr(win, 6, 7, "( \\_____( /");
388
+ mvwaddstr(win, 7, 8, "( ) /");
389
+ mvwaddstr(win, 8, 9, "\\\\ /");
390
+ mvwaddstr(win, 9, 11, "\\>/>");
391
+ }
392
+
393
+ void legs2(WINDOW *win)
394
+ {
395
+ mvwaddstr(win, 6, 7, "(( )____( /");
396
+ mvwaddstr(win, 7, 7, "( / |");
397
+ mvwaddstr(win, 8, 8, "\\/ |");
398
+ mvwaddstr(win, 9, 9, "|> |>");
399
+ }
400
+
401
+ void legs3(WINDOW *win)
402
+ {
403
+ mvwaddstr(win, 6, 6, "( ()_____( /");
404
+ mvwaddstr(win, 7, 6, "/ / /");
405
+ mvwaddstr(win, 8, 5, "|/ \\");
406
+ mvwaddstr(win, 9, 5, "/> \\>");
407
+ }
408
+
409
+ void legs4(WINDOW *win)
410
+ {
411
+ mvwaddstr(win, 6, 6, "( )______( /");
412
+ mvwaddstr(win, 7, 5, "(/ \\");
413
+ mvwaddstr(win, 8, 0, "v___= ----^");
414
+ }
415
+
416
+ void initdeer(void)
417
+ {
418
+ chtype noseattr;
419
+
420
+ #ifdef A_COLOR
421
+ if (has_colors())
422
+ {
423
+ init_pair(31, COLOR_RED, COLOR_BLACK);
424
+ noseattr = COLOR_PAIR(31);
425
+ }
426
+ else
427
+ #endif
428
+ noseattr = A_NORMAL;
429
+
430
+ /* set up the windows for our various reindeer */
431
+
432
+ dotdeer0 = newwin(3, 71, 0, 8);
433
+ stardeer0 = newwin(4, 56, 0, 8);
434
+ lildeer0 = newwin(7, 54, 0, 8);
435
+ middeer0 = newwin(15, 42, 0, 8);
436
+ bigdeer0 = newwin(10, 23, 0, 0);
437
+ lookdeer0 = newwin(10, 25, 0, 0);
438
+
439
+ /* lildeer1 */
440
+ lildeer1 = newwin(2, 4, 0, 0);
441
+ lil(lildeer1);
442
+ mvwaddstr(lildeer1, 1, 1, "<>");
443
+
444
+ /* lildeer2 */
445
+ lildeer2 = newwin(2, 4, 0, 0);
446
+ lil(lildeer2);
447
+ mvwaddstr(lildeer2, 1, 1, "||");
448
+
449
+ /* lildeer3 */
450
+ lildeer3 = newwin(2, 4, 0, 0);
451
+ lil(lildeer3);
452
+ mvwaddstr(lildeer3, 1, 1, "><");
453
+
454
+ /* middeer1 */
455
+ middeer1 = newwin(3, 7, 0, 0);
456
+ midtop(middeer1);
457
+ mvwaddstr(middeer1, 2, 3, "\\/");
458
+
459
+ /* middeer2 */
460
+ middeer2 = newwin(3, 7, 0, 0);
461
+ midtop(middeer2);
462
+ mvwaddch(middeer2, 2, 3, (chtype) '|');
463
+ mvwaddch(middeer2, 2, 5, (chtype) '|');
464
+
465
+ /* middeer3 */
466
+ middeer3 = newwin(3, 7, 0, 0);
467
+ midtop(middeer3);
468
+ mvwaddch(middeer3, 2, 2, (chtype) '/');
469
+ mvwaddch(middeer3, 2, 6, (chtype) '\\');
470
+
471
+ /* bigdeer1 */
472
+ bigdeer1 = newwin(10, 23, 0, 0);
473
+ bigtop(bigdeer1);
474
+ legs1(bigdeer1);
475
+
476
+ /* bigdeer2 */
477
+ bigdeer2 = newwin(10, 23, 0, 0);
478
+ bigtop(bigdeer2);
479
+ legs2(bigdeer2);
480
+
481
+ /* bigdeer3 */
482
+ bigdeer3 = newwin(10, 23, 0, 0);
483
+ bigtop(bigdeer3);
484
+ legs3(bigdeer3);
485
+
486
+ /* bigdeer4 */
487
+ bigdeer4 = newwin(10, 23, 0, 0);
488
+ bigtop(bigdeer4);
489
+ legs4(bigdeer4);
490
+
491
+ /* lookdeer1 */
492
+ lookdeer1 = newwin(10, 25, 0, 0);
493
+ bigface(lookdeer1, noseattr);
494
+ legs1(lookdeer1);
495
+
496
+ /* lookdeer2 */
497
+ lookdeer2 = newwin(10, 25, 0, 0);
498
+ bigface(lookdeer2, noseattr);
499
+ legs2(lookdeer2);
500
+
501
+ /* lookdeer3 */
502
+ lookdeer3 = newwin(10, 25, 0, 0);
503
+ bigface(lookdeer3, noseattr);
504
+ legs3(lookdeer3);
505
+
506
+ /* lookdeer4 */
507
+ lookdeer4 = newwin(10, 25, 0, 0);
508
+ bigface(lookdeer4, noseattr);
509
+ legs4(lookdeer4);
510
+ }
511
+
512
+ void boxit(void)
513
+ {
514
+ int x;
515
+
516
+ for (x = 0; x < 20; ++x)
517
+ mvaddch(x, 7, '|');
518
+
519
+ for (x = 0; x < 80; ++x)
520
+ {
521
+ if (x > 7)
522
+ mvaddch(19, x, '_');
523
+
524
+ mvaddch(22, x, '_');
525
+ }
526
+ }
527
+
528
+ void seas(void)
529
+ {
530
+ mvaddch(4, 1, 'S');
531
+ mvaddch(6, 1, 'E');
532
+ mvaddch(8, 1, 'A');
533
+ mvaddch(10, 1, 'S');
534
+ mvaddch(12, 1, 'O');
535
+ mvaddch(14, 1, 'N');
536
+ mvaddch(16, 1, '`');
537
+ mvaddch(18, 1, 'S');
538
+ }
539
+
540
+ void greet(void)
541
+ {
542
+ mvaddch(3, 5, 'G');
543
+ mvaddch(5, 5, 'R');
544
+ mvaddch(7, 5, 'E');
545
+ mvaddch(9, 5, 'E');
546
+ mvaddch(11, 5, 'T');
547
+ mvaddch(13, 5, 'I');
548
+ mvaddch(15, 5, 'N');
549
+ mvaddch(17, 5, 'G');
550
+ mvaddch(19, 5, 'S');
551
+ }
552
+
553
+ void fromwho(void)
554
+ {
555
+ mvaddstr(21, 13, FROMWHO);
556
+ }
557
+
558
+ void del_msg(void)
559
+ {
560
+ refresh();
561
+ }
562
+
563
+ void tree(void)
564
+ {
565
+ #ifdef A_COLOR
566
+ if (has_colors())
567
+ {
568
+ init_pair(30, COLOR_GREEN, COLOR_BLACK);
569
+ wattrset(treescrn, COLOR_PAIR(30));
570
+ }
571
+ #endif
572
+ mvwaddch(treescrn, 1, 11, (chtype) '/');
573
+ mvwaddch(treescrn, 2, 11, (chtype) '/');
574
+ mvwaddch(treescrn, 3, 10, (chtype) '/');
575
+ mvwaddch(treescrn, 4, 9, (chtype) '/');
576
+ mvwaddch(treescrn, 5, 9, (chtype) '/');
577
+ mvwaddch(treescrn, 6, 8, (chtype) '/');
578
+ mvwaddch(treescrn, 7, 7, (chtype) '/');
579
+ mvwaddch(treescrn, 8, 6, (chtype) '/');
580
+ mvwaddch(treescrn, 9, 6, (chtype) '/');
581
+ mvwaddch(treescrn, 10, 5, (chtype) '/');
582
+ mvwaddch(treescrn, 11, 3, (chtype) '/');
583
+ mvwaddch(treescrn, 12, 2, (chtype) '/');
584
+
585
+ mvwaddch(treescrn, 1, 13, (chtype) '\\');
586
+ mvwaddch(treescrn, 2, 13, (chtype) '\\');
587
+ mvwaddch(treescrn, 3, 14, (chtype) '\\');
588
+ mvwaddch(treescrn, 4, 15, (chtype) '\\');
589
+ mvwaddch(treescrn, 5, 15, (chtype) '\\');
590
+ mvwaddch(treescrn, 6, 16, (chtype) '\\');
591
+ mvwaddch(treescrn, 7, 17, (chtype) '\\');
592
+ mvwaddch(treescrn, 8, 18, (chtype) '\\');
593
+ mvwaddch(treescrn, 9, 18, (chtype) '\\');
594
+ mvwaddch(treescrn, 10, 19, (chtype) '\\');
595
+ mvwaddch(treescrn, 11, 21, (chtype) '\\');
596
+ mvwaddch(treescrn, 12, 22, (chtype) '\\');
597
+
598
+ mvwaddch(treescrn, 4, 10, (chtype) '_');
599
+ mvwaddch(treescrn, 4, 14, (chtype) '_');
600
+ mvwaddch(treescrn, 8, 7, (chtype) '_');
601
+ mvwaddch(treescrn, 8, 17, (chtype) '_');
602
+
603
+ mvwaddstr(treescrn, 13, 0,
604
+ "//////////// \\\\\\\\\\\\\\\\\\\\\\\\");
605
+
606
+ #ifdef A_COLOR
607
+ if (has_colors())
608
+ {
609
+ init_pair(20, COLOR_YELLOW, COLOR_BLACK);
610
+ wattrset(treescrn, COLOR_PAIR(20));
611
+ }
612
+ #endif
613
+ mvwaddstr(treescrn, 14, 11, "| |");
614
+ mvwaddstr(treescrn, 15, 11, "|_|");
615
+
616
+ wrefresh(treescrn);
617
+ wrefresh(w_del_msg);
618
+ }
619
+
620
+ void balls(void)
621
+ {
622
+ chtype ball1, ball2, ball3, ball4, ball5, ball6;
623
+
624
+ overlay(treescrn, treescrn2);
625
+
626
+ #ifdef A_COLOR
627
+ if (has_colors())
628
+ {
629
+ init_pair(1, COLOR_BLUE, COLOR_BLACK);
630
+ init_pair(2, COLOR_RED, COLOR_BLACK);
631
+ init_pair(3, COLOR_MAGENTA, COLOR_BLACK);
632
+ init_pair(4, COLOR_CYAN, COLOR_BLACK);
633
+ init_pair(5, COLOR_YELLOW, COLOR_BLACK);
634
+ init_pair(6, COLOR_WHITE, COLOR_BLACK);
635
+ ball1 = COLOR_PAIR(1) | '@';
636
+ ball2 = COLOR_PAIR(2) | '@';
637
+ ball3 = COLOR_PAIR(3) | '@';
638
+ ball4 = COLOR_PAIR(4) | '@';
639
+ ball5 = COLOR_PAIR(5) | '@';
640
+ ball6 = COLOR_PAIR(6) | '@';
641
+ }
642
+ else
643
+ #endif
644
+ ball1 = ball2 = ball3 = ball4 = ball5 = ball6 = '@';
645
+
646
+ mvwaddch(treescrn2, 3, 9, ball1);
647
+ mvwaddch(treescrn2, 3, 15, ball2);
648
+ mvwaddch(treescrn2, 4, 8, ball3);
649
+ mvwaddch(treescrn2, 4, 16, ball4);
650
+ mvwaddch(treescrn2, 5, 7, ball5);
651
+ mvwaddch(treescrn2, 5, 17, ball6);
652
+ mvwaddch(treescrn2, 7, 6, ball1 | A_BOLD);
653
+ mvwaddch(treescrn2, 7, 18, ball2 | A_BOLD);
654
+ mvwaddch(treescrn2, 8, 5, ball3 | A_BOLD);
655
+ mvwaddch(treescrn2, 8, 19, ball4 | A_BOLD);
656
+ mvwaddch(treescrn2, 10, 4, ball5 | A_BOLD);
657
+ mvwaddch(treescrn2, 10, 20, ball6 | A_BOLD);
658
+ mvwaddch(treescrn2, 11, 2, ball1);
659
+ mvwaddch(treescrn2, 11, 22, ball2);
660
+ mvwaddch(treescrn2, 12, 1, ball3);
661
+ mvwaddch(treescrn2, 12, 23, ball4);
662
+
663
+ wrefresh(treescrn2);
664
+ wrefresh(w_del_msg);
665
+ }
666
+
667
+ void star(void)
668
+ {
669
+ mvwaddch(treescrn2, 0, 12, (chtype) '*' | A_STANDOUT);
670
+
671
+ wrefresh(treescrn2);
672
+ wrefresh(w_del_msg);
673
+ }
674
+
675
+ void strng1(void)
676
+ {
677
+ #ifdef A_COLOR
678
+ if (has_colors())
679
+ {
680
+ init_pair(10, COLOR_YELLOW, COLOR_BLACK);
681
+ wattrset(treescrn2, COLOR_PAIR(10) | A_BOLD);
682
+ }
683
+ #endif
684
+ mvwaddstr(treescrn2, 3, 11, ".:'");
685
+
686
+ wrefresh(treescrn2);
687
+ wrefresh(w_del_msg);
688
+ }
689
+
690
+ void strng2(void)
691
+ {
692
+ #ifdef A_COLOR
693
+ if (has_colors())
694
+ {
695
+ init_pair(11, COLOR_RED, COLOR_BLACK);
696
+ wattrset(treescrn2, COLOR_PAIR(11) | A_BOLD);
697
+ }
698
+ #endif
699
+ mvwaddstr(treescrn2, 5, 11, ",.:'");
700
+ mvwaddstr(treescrn2, 6, 9, ":'");
701
+
702
+ wrefresh(treescrn2);
703
+ wrefresh(w_del_msg);
704
+ }
705
+
706
+ void strng3(void)
707
+ {
708
+ #ifdef A_COLOR
709
+ if (has_colors())
710
+ {
711
+ init_pair(12, COLOR_GREEN, COLOR_BLACK);
712
+ wattrset(treescrn2, COLOR_PAIR(12) | A_BOLD);
713
+ }
714
+ #endif
715
+ mvwaddstr(treescrn2, 7, 13, ",.:'");
716
+ mvwaddstr(treescrn2, 8, 9, ",.:'");
717
+
718
+ wrefresh(treescrn2);
719
+ wrefresh(w_del_msg);
720
+ }
721
+
722
+ void strng4(void)
723
+ {
724
+ #ifdef A_COLOR
725
+ if (has_colors())
726
+ {
727
+ init_pair(13, COLOR_WHITE, COLOR_BLACK);
728
+ wattrset(treescrn2, COLOR_PAIR(13) | A_BOLD);
729
+ }
730
+ #endif
731
+ mvwaddstr(treescrn2, 9, 14, ",.:'");
732
+ mvwaddstr(treescrn2, 10, 10, ",.:'");
733
+ mvwaddstr(treescrn2, 11, 6, ",.:'");
734
+ mvwaddch(treescrn2, 12, 5, (chtype) '\'');
735
+
736
+ wrefresh(treescrn2);
737
+ wrefresh(w_del_msg);
738
+ }
739
+
740
+ void strng5(void)
741
+ {
742
+ #ifdef A_COLOR
743
+ if (has_colors())
744
+ {
745
+ init_pair(14, COLOR_CYAN, COLOR_BLACK);
746
+ wattrset(treescrn2, COLOR_PAIR(14) | A_BOLD);
747
+ }
748
+ #endif
749
+ mvwaddstr(treescrn2, 11, 16, ",.:'");
750
+ mvwaddstr(treescrn2, 12, 12, ",.:'");
751
+
752
+ /* save a fully lit tree */
753
+ overlay(treescrn2, treescrn);
754
+
755
+ wrefresh(treescrn2);
756
+ wrefresh(w_del_msg);
757
+ }
758
+
759
+ void blinkit(void)
760
+ {
761
+ static int cycle;
762
+
763
+ if (cycle > 4)
764
+ cycle = 0;
765
+
766
+ touchwin(treescrn8);
767
+
768
+ switch (cycle)
769
+ {
770
+ case 0:
771
+ overlay(treescrn3, treescrn8);
772
+ break;
773
+
774
+ case 1:
775
+ overlay(treescrn4, treescrn8);
776
+ break;
777
+
778
+ case 2:
779
+ overlay(treescrn5, treescrn8);
780
+ break;
781
+
782
+ case 3:
783
+ overlay(treescrn6, treescrn8);
784
+ break;
785
+
786
+ case 4:
787
+ overlay(treescrn7, treescrn8);
788
+ }
789
+
790
+ wrefresh(treescrn8);
791
+ wrefresh(w_del_msg);
792
+
793
+ napms(50);
794
+ touchwin(treescrn8);
795
+
796
+ /*ALL ON************************************************** */
797
+
798
+ overlay(treescrn, treescrn8);
799
+ wrefresh(treescrn8);
800
+ wrefresh(w_del_msg);
801
+
802
+ ++cycle;
803
+ }
804
+
805
+ #define TSHOW(win, pause) touchwin(win); wrefresh(win); \
806
+ wrefresh(w_del_msg); napms(pause)
807
+
808
+ #define SHOW(win, pause) mvwin(win, y_pos, x_pos); wrefresh(win); \
809
+ wrefresh(w_del_msg); napms(pause)
810
+
811
+ void reindeer(void)
812
+ {
813
+ int looper;
814
+
815
+ y_pos = 0;
816
+
817
+ for (x_pos = 70; x_pos > 62; x_pos--)
818
+ {
819
+ if (x_pos < 62)
820
+ y_pos = 1;
821
+
822
+ for (looper = 0; looper < 4; looper++)
823
+ {
824
+ mvwaddch(dotdeer0, y_pos, x_pos, (chtype) '.');
825
+ wrefresh(dotdeer0);
826
+ wrefresh(w_del_msg);
827
+ werase(dotdeer0);
828
+ wrefresh(dotdeer0);
829
+ wrefresh(w_del_msg);
830
+ }
831
+ }
832
+
833
+ y_pos = 2;
834
+
835
+ for (; x_pos > 50; x_pos--)
836
+ {
837
+ for (looper = 0; looper < 4; looper++)
838
+ {
839
+ if (x_pos < 56)
840
+ {
841
+ y_pos = 3;
842
+
843
+ mvwaddch(stardeer0, y_pos, x_pos, (chtype) '*');
844
+ wrefresh(stardeer0);
845
+ wrefresh(w_del_msg);
846
+ werase(stardeer0);
847
+ wrefresh(stardeer0);
848
+ }
849
+ else
850
+ {
851
+ mvwaddch(dotdeer0, y_pos, x_pos, (chtype) '*');
852
+ wrefresh(dotdeer0);
853
+ wrefresh(w_del_msg);
854
+ werase(dotdeer0);
855
+ wrefresh(dotdeer0);
856
+ }
857
+ wrefresh(w_del_msg);
858
+ }
859
+ }
860
+
861
+ x_pos = 58;
862
+
863
+ for (y_pos = 2; y_pos < 5; y_pos++)
864
+ {
865
+ TSHOW(lildeer0, 50);
866
+
867
+ for (looper = 0; looper < 4; looper++)
868
+ {
869
+ SHOW(lildeer3, 50);
870
+ SHOW(lildeer2, 50);
871
+ SHOW(lildeer1, 50);
872
+ SHOW(lildeer2, 50);
873
+ SHOW(lildeer3, 50);
874
+
875
+ TSHOW(lildeer0, 50);
876
+
877
+ x_pos -= 2;
878
+ }
879
+ }
880
+
881
+ x_pos = 35;
882
+
883
+ for (y_pos = 5; y_pos < 10; y_pos++)
884
+ {
885
+ touchwin(middeer0);
886
+ wrefresh(middeer0);
887
+ wrefresh(w_del_msg);
888
+
889
+ for (looper = 0; looper < 2; looper++)
890
+ {
891
+ SHOW(middeer3, 50);
892
+ SHOW(middeer2, 50);
893
+ SHOW(middeer1, 50);
894
+ SHOW(middeer2, 50);
895
+ SHOW(middeer3, 50);
896
+
897
+ TSHOW(middeer0, 50);
898
+
899
+ x_pos -= 3;
900
+ }
901
+ }
902
+
903
+ napms(2000);
904
+
905
+ y_pos = 1;
906
+
907
+ for (x_pos = 8; x_pos < 16; x_pos++)
908
+ {
909
+ SHOW(bigdeer4, 30);
910
+ SHOW(bigdeer3, 30);
911
+ SHOW(bigdeer2, 30);
912
+ SHOW(bigdeer1, 30);
913
+ SHOW(bigdeer2, 30);
914
+ SHOW(bigdeer3, 30);
915
+ SHOW(bigdeer4, 30);
916
+ SHOW(bigdeer0, 30);
917
+ }
918
+
919
+ --x_pos;
920
+
921
+ for (looper = 0; looper < 6; looper++)
922
+ {
923
+ SHOW(lookdeer4, 40);
924
+ SHOW(lookdeer3, 40);
925
+ SHOW(lookdeer2, 40);
926
+ SHOW(lookdeer1, 40);
927
+ SHOW(lookdeer2, 40);
928
+ SHOW(lookdeer3, 40);
929
+ SHOW(lookdeer4, 40);
930
+ }
931
+
932
+ SHOW(lookdeer0, 40);
933
+
934
+ for (; y_pos < 10; y_pos++)
935
+ {
936
+ for (looper = 0; looper < 2; looper++)
937
+ {
938
+ SHOW(bigdeer4, 30);
939
+ SHOW(bigdeer3, 30);
940
+ SHOW(bigdeer2, 30);
941
+ SHOW(bigdeer1, 30);
942
+ SHOW(bigdeer2, 30);
943
+ SHOW(bigdeer3, 30);
944
+ SHOW(bigdeer4, 30);
945
+ }
946
+
947
+ SHOW(bigdeer0, 30);
948
+ }
949
+
950
+ --y_pos;
951
+
952
+ mvwin(lookdeer3, y_pos, x_pos);
953
+ wrefresh(lookdeer3);
954
+ wrefresh(w_del_msg);
955
+ }