home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / cset21v1.zip / IBMCPP / WKFRAME / MAHJONGG / MAHJONGG.IPF < prev    next >
Text File  |  1993-02-28  |  11KB  |  348 lines

  1. .*/*┌──────────────────────────────────────────────────────────────────────────┐*/
  2. .*/*│                                                                          │*/
  3. .*/*│ PROGRAM NAME: MAHJONGG                                                   │*/
  4. .*/*│ -------------                                                            │*/
  5. .*/*│  A PM version of a Chinese game similar to 'concentration' but without   │*/
  6. .*/*│  the background puzzle.                                                  │*/
  7. .*/*│                                                                          │*/
  8. .*/*│ COPYRIGHT:                                                               │*/
  9. .*/*│ ----------                                                               │*/
  10. .*/*│  Copyright (C) International Business Machines Corp., 1991,1992,1993.    │*/
  11. .*/*│                                                                          │*/
  12. .*/*│ DISCLAIMER OF WARRANTIES:                                                │*/
  13. .*/*│ -------------------------                                                │*/
  14. .*/*│  The following [enclosed] code is sample code created by IBM Corporation.│*/
  15. .*/*│  This sample code is not part of any standard IBM product and is provided│*/
  16. .*/*│  to you solely for the purpose of assisting you in the development of    │*/
  17. .*/*│  your applications.  The code is provided "AS IS", without warranty of   │*/
  18. .*/*│  any kind.  IBM shall not be liable for any damages arising out of your  │*/
  19. .*/*│  use of the sample code, even if they have been advised of the           │*/
  20. .*/*│  possibility of such damages.                                            │*/
  21. .*/*│                                                                          │*/
  22. .*/*│ For details on what this program does etc., please see the MAHJONGG.C    │*/
  23. .*/*│ file.                                                                    │*/
  24. .*/*│                                                                          │*/
  25. .*/*└──────────────────────────────────────────────────────────────────────────┘*/
  26. .*
  27. .*/*┌──────────────────────────────────────────────────────────────────────────┐*/
  28. .*/*│ MAHJONGG.IPF                                                             │*/
  29. .*/*│                                                                          │*/
  30. .*/*│ Mahjongg Game documentation (IPF) file                                   │*/
  31. .*/*└──────────────────────────────────────────────────────────────────────────┘*/
  32. .*
  33. #include "mahjongg.h"
  34. :userdoc.
  35. :title.Mahjongg Solitaire
  36. :body.
  37. .*--------------------------------------------------------
  38. :h1 res(ID_WINDOW)Mahjongg
  39. :p.
  40. The :hp3.Mahjongg:ehp3. game presented here is a solitaire version
  41. of a tile pair removing game.
  42. :p.
  43. The rest of this help material is organized as follows:
  44. :ul.
  45. :li.
  46. :hp2.How to play Mahjongg:ehp2.
  47. :ul compact.
  48. :li.
  49. :link reftype=hd res(IDM_HELP_PATIENCE)
  50. Explanations and rules of the Mahjongg game
  51. :elink.
  52. :eul.
  53. .*-------
  54. :lp.
  55. :li.
  56. :hp2.Menus and Commands:ehp2.
  57. :ul compact.
  58. :li.
  59. :link reftype=hd res(IDA_GAME)
  60. Game
  61. :elink.
  62. :li.
  63. :link reftype=hd res(IDA_MOVES)
  64. Moves
  65. :elink.
  66. :li.
  67. :link reftype=hd res(IDA_OPTIONS)
  68. Options
  69. :elink.
  70. :li.
  71. :link reftype=hd res(IDA_HELP)
  72. Help
  73. :elink.
  74. :eul.
  75. :eul.
  76. .*--------------------------------------------------------
  77. :h1 res(IDM_HELP_PATIENCE)How to Play the Game
  78. :p.
  79. :hp3.Mahjongg:ehp3. is an easy to play one person game with the following
  80. rules:
  81. :p.
  82. :hp2.Objective&colon.:ehp2.
  83. :p.
  84. The objective of the game is to remove as many pairs of tiles as possible.
  85. Tiles are always removed from the left or right edges of the pyramid.
  86. Any tile that is not on a left or right edge is considered blocked and
  87. cannot be removed. The pyramid consists of five levels of tiles. Tiles
  88. which have another tile above them are blocked as well.
  89. :p.
  90. :hp2.Suits of tiles&colon.:ehp2.
  91. :p.
  92. There are different suits of tiles and for each suit there is a rule
  93. how pairs can be matched. Tiles can only be matched when they are of the
  94. same suit.
  95. :p.
  96. :hp3.Character Suit:ehp3.
  97. :p.
  98. :artwork name='tile_c_1.bmp' runin.
  99. :artwork name='tile_c_2.bmp' runin.
  100. :artwork name='tile_c_3.bmp' runin.
  101. :artwork name='tile_c_4.bmp' runin.
  102. :artwork name='tile_c_5.bmp' runin.
  103. :artwork name='tile_c_6.bmp' runin.
  104. :artwork name='tile_c_7.bmp' runin.
  105. :artwork name='tile_c_8.bmp' runin.
  106. :artwork name='tile_c_9.bmp' runin.
  107. :p.
  108. :hp3.Bamboo Suit:ehp3.
  109. :p.
  110. :artwork name='tile_b_1.bmp' runin.
  111. :artwork name='tile_b_2.bmp' runin.
  112. :artwork name='tile_b_3.bmp' runin.
  113. :artwork name='tile_b_4.bmp' runin.
  114. :artwork name='tile_b_5.bmp' runin.
  115. :artwork name='tile_b_6.bmp' runin.
  116. :artwork name='tile_b_7.bmp' runin.
  117. :artwork name='tile_b_8.bmp' runin.
  118. :artwork name='tile_b_9.bmp' runin.
  119. :p.
  120. :hp3.Dots Suit:ehp3.
  121. :p.
  122. :artwork name='tile_d_1.bmp' runin.
  123. :artwork name='tile_d_2.bmp' runin.
  124. :artwork name='tile_d_3.bmp' runin.
  125. :artwork name='tile_d_4.bmp' runin.
  126. :artwork name='tile_d_5.bmp' runin.
  127. :artwork name='tile_d_6.bmp' runin.
  128. :artwork name='tile_d_7.bmp' runin.
  129. :artwork name='tile_d_8.bmp' runin.
  130. :artwork name='tile_d_9.bmp' runin.
  131. :p.
  132. :hp3.Dragons Suit:ehp3.
  133. :p.
  134. :artwork name='tile_r_1.bmp' runin.
  135. :artwork name='tile_r_2.bmp' runin.
  136. :artwork name='tile_r_3.bmp' runin.
  137. :p.
  138. :hp3.Winds Suit:ehp3.
  139. :p.
  140. :artwork name='tile_w_e.bmp' runin.
  141. :artwork name='tile_w_n.bmp' runin.
  142. :artwork name='tile_w_w.bmp' runin.
  143. :artwork name='tile_w_s.bmp' runin.
  144. :note.That for the above 5 suits an exact match is required.
  145. :p.
  146. :hp3.Flowers Suit:ehp3.
  147. :p.
  148. :artwork name='tile_f_1.bmp' runin.
  149. :artwork name='tile_f_2.bmp' runin.
  150. :artwork name='tile_f_3.bmp' runin.
  151. :artwork name='tile_f_4.bmp' runin.
  152. :p.
  153. :hp3.Seasons Suit:ehp3.
  154. :p.
  155. :artwork name='tile_s_1.bmp' runin.
  156. :artwork name='tile_s_2.bmp' runin.
  157. :artwork name='tile_s_3.bmp' runin.
  158. :artwork name='tile_s_4.bmp' runin.
  159. :note.That for the above 2 suits any tile matches any other tile in the same suit.
  160. :p.
  161. :hp2.Number of tiles&colon.:ehp2.
  162. :p.
  163. There are 144 tiles total: for the flower and seasons suits only one tile
  164. of each exists, for all other suits four of each tile exist.
  165. :p.
  166. The game does not come out very often.
  167. .*--------------------------------------------------------
  168. :h1. Menus and Commands
  169. :p.
  170. The menus are ordered by the following main topics:
  171. :ul compact.
  172. :li.
  173. :link reftype=hd res(IDA_GAME)
  174. Game
  175. :elink.
  176. :li.
  177. :link reftype=hd res(IDA_MOVES)
  178. Moves
  179. :elink.
  180. :li.
  181. :link reftype=hd res(IDA_OPTIONS)
  182. Options
  183. :elink.
  184. :li.
  185. :link reftype=hd res(IDA_HELP)
  186. Help
  187. :elink.
  188. :eul.
  189. .*--------------------------------------------------------
  190. :h2 res(IDA_GAME) The Game Menu
  191. :p.
  192. The game menu contains choices to start a new (fresh dealt copy) game,
  193. and to exit this program.
  194. :ul compact.
  195. :li.
  196. :link reftype=hd res(IDM_NEW_G)
  197. New (Deal)
  198. :elink.
  199. :li.
  200. :link reftype=hd res(IDM_EXIT)
  201. Exit
  202. :elink.
  203. :eul.
  204. .*--------------------------------------------------------
  205. :h3 res(IDM_NEW_G) New (Deal)
  206. :p.Takes all tiles, shuffles and redistributes them.
  207. Hence a new game is started.
  208. .*--------------------------------------------------------
  209. :h3 res(IDM_EXIT) Exit
  210. :p.Quits this program.
  211. .*--------------------------------------------------------
  212. :h2 res(IDA_MOVES) The Moves Menu
  213. :p.
  214. The moves menu allows the editing of moves by either
  215. undoing or redoing the last action, and showing all next possible moves.
  216. :ul compact.
  217. :li.
  218. :link reftype=hd res(IDM_UNDO)
  219. Tack Back
  220. :elink.
  221. :li.
  222. :link reftype=hd res(IDM_REDO)
  223. Replay
  224. :elink.
  225. :li.
  226. :link reftype=hd res(IDM_SHOW)
  227. Show next moves
  228. :elink.
  229. :eul.
  230. .*--------------------------------------------------------
  231. :h3 res(IDM_UNDO) Take Back the Previous Action
  232. :p.
  233. A rather large stack of the last user actions is kept by this program.  The
  234. :hp2.Take Back:ehp2. choice will undo the most recent user action.  The
  235. :hp2.Take Back:ehp2. command may repeated as many times as there are actions
  236. on the :hp2.Take Back:ehp2. stack.  :hp2.Take Back:ehp2. actions may be redone
  237. by the :link reftype=hd res(IDM_REDO)
  238. Replay
  239. :elink.
  240. command.
  241. .*--------------------------------------------------------
  242. :h3 res(IDM_REDO) Replay the Last Take Back Action
  243. :p.
  244. :hp2.Replay:ehp2. re-executes the most recent :hp2.Take Back:ehp2. action on the
  245. :link reftype=hd res(IDM_UNDO)
  246. Take Back
  247. :elink.
  248. stack.
  249. .*--------------------------------------------------------
  250. :h3 res(IDM_SHOW) Show the Next Possible Moves
  251. :p.
  252. Each pair of tiles which could be removed as the next move
  253. is highlighted during half a second. The intention is to give
  254. some help on how to proceed.
  255. :p.
  256. When no more moves are possible a message box is displayed to inform
  257. you about this fact.
  258. .*--------------------------------------------------------
  259. :h2 res(IDA_OPTIONS) The Options Menu
  260. :p.
  261. The options menu allows the setting of a warning sound for wrong
  262. selections.  This value may be saved from this menu.
  263. you.
  264. :ul compact.
  265. :li.
  266. :link reftype=hd res(IDM_SOUND)
  267. Sound Toggle
  268. :elink.
  269. :li.
  270. :link reftype=hd res(IDM_SAVEOPT)
  271. Save Options
  272. :elink.
  273. :eul.
  274. .*--------------------------------------------------------
  275. :h3 res(IDM_SOUND) Sound Toggle
  276. :p.Toggles sound and warning beeps on or off.
  277. .*--------------------------------------------------------
  278. :h3 res(IDM_SAVEOPT) Save Options
  279. :p.
  280. The Options selectable in the options menu are saved in the OS2.INI file
  281. and read back to be taken as defaults whenever a the Mahjongg Game is
  282. started.  The saved values encompass only the sound setting currently.
  283. .*--------------------------------------------------------
  284. :h2 res(IDA_HELP) The Help Menu
  285. :p.
  286. The help menu contains choices for fast access to special sections of this
  287. help information. The following choices are available:
  288. :ul compact.
  289. :li.
  290. :link reftype=hd res(IDM_HELP_HELP)
  291. Help for help
  292. :elink.
  293. :li.
  294. :link reftype=hd res(IDM_HELP_EXTENDED)
  295. Extended Help
  296. :elink.
  297. :li.
  298. :link reftype=hd res(IDM_HELP_KEYS)
  299. Keys Help
  300. :elink.
  301. :li.
  302. :link reftype=hd res(IDM_HELP_INDEX)
  303. Help Index
  304. :elink.
  305. :li.
  306. :link reftype=hd res(IDM_ABOUT)
  307. About
  308. :elink.
  309. :eul.
  310. .*--------------------------------------------------------
  311. :h3 res(IDM_HELP_HELP) Help for help
  312. :p.
  313. Explains how to use the help facility.
  314. .*--------------------------------------------------------
  315. :h3 res(IDM_HELP_EXTENDED) Extended help
  316. :p.
  317. Explains the working of this program, its options and how to play Mahjongg.
  318. .*--------------------------------------------------------
  319. :h3 res(IDM_HELP_KEYS) Help for Keys
  320. :p.
  321. :dl.
  322. :dt.Ctrl+N
  323. :dd.Accelerator for :hp3.New (Deal):ehp3.
  324. :dt.Ctrl+R
  325. :dd.Accelerator for :hp3.Replay:ehp3.
  326. :dt.Ctrl+S
  327. :dd.Accelerator for :hp3.Show:ehp3.
  328. :dt.Ctrl+T
  329. :dd.Accelerator for :hp3.Take Back:ehp3.
  330. :dt.F1
  331. :dd.Accelerator for :hp3.Get help about this program:ehp3.
  332. :dt.F3
  333. :dd.Accelerator for :hp3.Exit this program:ehp3.
  334. :dt.Alt + Backspace
  335. :dd.The standard accelerator for :hp3.Take Back:ehp3.
  336. :edl.
  337. .*--------------------------------------------------------
  338. :h3 res(IDM_HELP_INDEX) Index to the Help Topics
  339. :P.
  340. Displays the index to the help topics
  341. .*--------------------------------------------------------
  342. :h3 res(IDM_ABOUT) About Mahjongg
  343. :p.
  344. This choice shows a panel with the game&apos.s copyright, its
  345. version and name.
  346. :euserdoc.
  347. .*--- end ------------------------------------------------
  348.