home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 2 / Giga_Games_2_CD-ROM_Walnut_Creek_April_1995.iso / os2 / spl15.zip / spl.hlp (.txt) < prev    next >
OS/2 Help File  |  1994-04-18  |  20KB  |  549 lines

  1.  
  2. ΓòÉΓòÉΓòÉ 1. Introduction and Copyright ΓòÉΓòÉΓòÉ
  3.  
  4.                             Spellbook Control Program
  5.                                      spl.exe
  6.  
  7.                                    Version 1.5
  8.  
  9.                                      4/16/94
  10.  
  11.                   Copyright (C) 1993, 1994 John-Marc Chandonia
  12.  
  13. For suggested enhancements and bug reports, please mail 
  14. chandoni@husc8.harvard.edu or write: 
  15.  
  16.                                John-Marc Chandonia
  17.                              7 Divinity Avenue, #121
  18.                               Cambridge, Ma. 02138
  19.  
  20. This is spl, a program for handling spells and spellbooks from various fantasy 
  21. role-playing (FRP) games.  It can handle both mage and priest spells for TSR's 
  22. AD&D (a trademark of TSR, Inc) game, and can easily be expanded to handle other 
  23. systems as well. In addition to possibly being useful to FRP players and GM's, 
  24. the source may be useful to OS/2 2.x programmers learning about containers, 
  25. MLE's, and PM programming in general. 
  26.  
  27. This program is free software; you can redistribute it and/or modify it under 
  28. the terms of the GNU General Public License as published by the Free Software 
  29. Foundation; either version 2 of the License, or (at your option) any later 
  30. version. 
  31.  
  32. This program is distributed in the hope that it will be useful, but WITHOUT ANY 
  33. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 
  34. PARTICULAR PURPOSE.  See the GNU General Public License for more details. 
  35.  
  36. You should have received a copy of the GNU General Public License along with 
  37. this program; if not, write to the Free Software Foundation, Inc., 675 Mass 
  38. Ave, Cambridge, MA 02139, USA. 
  39.  
  40.  
  41. ΓòÉΓòÉΓòÉ 2. Release Notes ΓòÉΓòÉΓòÉ
  42.  
  43. Version 1.5: 
  44.  
  45. Spell searching, sorting, loading, and saving are now multithreaded, allowing 
  46. you to work on other books or adjust the window while the program is working. 
  47.  
  48. Multiple views of the spellbook are supported. 
  49.  
  50. Large or small icons are supported. 
  51.  
  52. On-line help is available by pressing F1 or using the help menu/buttons. 
  53.  
  54. Spellbook position, view, icon size, and details bar position are saved in 
  55. EA's/INI files. 
  56.  
  57. Spell descriptions are loaded in as required, using less memory. 
  58.  
  59. Spells in the master list are saved in a "quick reference" file for faster 
  60. loading. 
  61.  
  62. Version 1.0: 
  63.  
  64. This is the first initial release of the program. 
  65.  
  66. Known bugs are listed in the file bugs.txt. If you find any more, please either 
  67. fix them yourself and send me the patch (sure!) or report the bug to the 
  68. address given above. 
  69.  
  70. I will put all future versions of this program on the OS/2 anonymous ftp site, 
  71. currently ftp-os2.cdrom.com. If you distribute any enhanced versions of this 
  72. program, please do the same.  Also, please comment any changes in the source 
  73. code, and describe them in the file changes.txt. 
  74.  
  75.  
  76. ΓòÉΓòÉΓòÉ 3. Using the program ΓòÉΓòÉΓòÉ
  77.  
  78. This section describes how to install and use the program. 
  79.  
  80. Topics include: 
  81.  
  82.   Installation
  83.   Master spell list
  84.   Icon mapping
  85.   Spellbook window
  86.   Spell window
  87.  
  88.  
  89. ΓòÉΓòÉΓòÉ 3.1. Installation ΓòÉΓòÉΓòÉ
  90.  
  91. Unzip the zip file in some directory.  If you want, create a program object for 
  92. the file spl.exe, If you don't plan to look at the source code, you can delete 
  93. the src directory... this is not needed to run the program. 
  94.  
  95. Check out the file splbook.all, which contains pointers to all spellbooks which 
  96. will comprise the master spell list. 
  97.  
  98. Also, look at the file splicon.res which contains a mapping of spell spheres 
  99. and schools to icons. 
  100.  
  101. You already know how to view the docs; to run the program, just run spl.exe. 
  102.  
  103.  
  104. ΓòÉΓòÉΓòÉ 3.2. Master spell list ΓòÉΓòÉΓòÉ
  105.  
  106. The file splbook.all contains a list of spellbooks which make up the master 
  107. spell list. These spellbooks should contain full spell listings.  This is 
  108. important because other spellbooks are by default saved only as lists of 
  109. titles, which are then looked up in the master spell list as the spells are 
  110. loaded in. 
  111.  
  112. The format of this file is just a list of other files.  To place a comment in 
  113. this list, start the line with a semicolon. 
  114.  
  115.  
  116. ΓòÉΓòÉΓòÉ 3.3. Icon mapping ΓòÉΓòÉΓòÉ
  117.  
  118. The file splicon.def contains a mapping of spell schools and spheres to icons. 
  119.  
  120. Spells in a book are shown with an icon which corresponds to their sphere (if 
  121. given) or school (if no sphere is available).  This file contains a list of 
  122. text strings to look for in the schools and spheres, and a list of icons they 
  123. correspond to.  If a spell matches two or more text strings, the first one 
  124. found is used. 
  125.  
  126. The format of the file is a text string (containing no spaces), then a space, 
  127. then the path name of an icon file to use.  Comments are allowed, as long as 
  128. they begin with a semicolon. 
  129.  
  130.  
  131. ΓòÉΓòÉΓòÉ 3.4. Spellbook window ΓòÉΓòÉΓòÉ
  132.  
  133. This is a window which represents a spellbook; it contains icons representing 
  134. spells in the book.  This window has can be viewed several ways, representing 
  135. spells as single icons, or more or less detailed views. 
  136.  
  137. Several menus can be activated from this window: 
  138.  
  139.   File Menu
  140.   Spell Menu
  141.   Book Menu
  142.   Views Menu
  143.   Help Menu
  144.  
  145. Also, pop-up context menus are available, either by clicking on the background 
  146. of the spellbook, or on individual spells.  The default OS/2 method for 
  147. bringing up these menus uses the right mouse button: 
  148.  
  149.   Spell Context Menu
  150.   Spellbook Context Menu
  151.  
  152.  
  153. ΓòÉΓòÉΓòÉ 3.4.1. File menu ΓòÉΓòÉΓòÉ
  154.  
  155. Options on this menu include: 
  156.  
  157.   New Spellbook
  158.   Load Spellbook
  159.   Load Full Spellbook
  160.   Save Spellbook
  161.   Save Full Spellbook
  162.   Close Spellbook
  163.   Quit Program
  164.  
  165.  
  166. ΓòÉΓòÉΓòÉ 3.4.1.1. New Spellbook ΓòÉΓòÉΓòÉ
  167.  
  168. This will create a new (empty) spellbook window that you can drag and drop 
  169. spells into. 
  170.  
  171.  
  172. ΓòÉΓòÉΓòÉ 3.4.1.2. Load Spellbook ΓòÉΓòÉΓòÉ
  173.  
  174. This will load in a list of spells from disk, looking the spells up in the 
  175. master list to get their full descriptions.  Spells listed in the spellbook but 
  176. not found in the master list will be ignored. 
  177.  
  178.  
  179. ΓòÉΓòÉΓòÉ 3.4.1.3. Load Full Spellbook ΓòÉΓòÉΓòÉ
  180.  
  181. This will load in a complete spellbook (including names and descriptions) from 
  182. disk.  Spells do not have to be in the master list to be loaded successfully, 
  183. although you should add them to the master list so that the full spellbook 
  184. doesn't have to be loaded & saved. 
  185.  
  186.  
  187. ΓòÉΓòÉΓòÉ 3.4.1.4. Save Spellbook ΓòÉΓòÉΓòÉ
  188.  
  189. This will save the names of spells in the current spellbook to disk. 
  190.  
  191.  
  192. ΓòÉΓòÉΓòÉ 3.4.1.5. Save Full Spellbook ΓòÉΓòÉΓòÉ
  193.  
  194. This will save the complete spellbook (names and descriptions) to disk.  If the 
  195. spells are in the master list, you might want to just save the names instead. 
  196.  
  197.  
  198. ΓòÉΓòÉΓòÉ 3.4.1.6. Close Spellbook ΓòÉΓòÉΓòÉ
  199.  
  200. This will close the current spellbook.  If it has been changed but not saved, 
  201. you will be asked if you want to save it first. This option is equivalent to 
  202. double-clicking on the box in the upper left corner of the book, or selecting 
  203. "Window -> Close" 
  204.  
  205. Closing the last spellbook will end the program.  You can close the master 
  206. spell index if you want (once another window is open), as the spells themselves 
  207. are still in memory. 
  208.  
  209.  
  210. ΓòÉΓòÉΓòÉ 3.4.1.7. Quit Program ΓòÉΓòÉΓòÉ
  211.  
  212. This will close all open spellbooks and exit the program.  If any spellbooks 
  213. have been changed but not saved, a window will pop up asking if you really want 
  214. to do this or not. 
  215.  
  216.  
  217. ΓòÉΓòÉΓòÉ 3.4.2. Spell menu ΓòÉΓòÉΓòÉ
  218.  
  219. These options are only available if the book is writeable (i.e. not the master 
  220. spell list). 
  221.  
  222. This menu includes: 
  223.  
  224.   Add New Spell
  225.   Delete Spell
  226.  
  227.  
  228. ΓòÉΓòÉΓòÉ 3.4.2.1. Add New Spell ΓòÉΓòÉΓòÉ
  229.  
  230. This will add a new spell to the book; it isn't really useful in this version. 
  231.  
  232.  
  233. ΓòÉΓòÉΓòÉ 3.4.2.2. Delete Spell ΓòÉΓòÉΓòÉ
  234.  
  235. This will remove selected spells from the book. 
  236.  
  237.  
  238. ΓòÉΓòÉΓòÉ 3.4.3. Book menu ΓòÉΓòÉΓòÉ
  239.  
  240. This menu includes: 
  241.  
  242.   Find Subset
  243.   Sort Spellbook
  244.   Rename Spellbook
  245.  
  246.  
  247. ΓòÉΓòÉΓòÉ 3.4.3.1. Find subset ΓòÉΓòÉΓòÉ
  248.  
  249. This brings up a dialog which allows you to search through the spells in the 
  250. book (window) and bring up a new book (window) which contains the results of 
  251. the search. 
  252.  
  253. Spells can be sorted on several fields, with the results OR'ed or AND'ed 
  254. together depending on the buttons in the lower left corner of the dialog.  Case 
  255. sensitivity is also optional.  Most of the fields just want you to enter text. 
  256.  
  257. The "level" field allows you to enter a number for the spell level, such as "5" 
  258. to select all 5th level spells.  It also allows you to enter things like ">5" 
  259. or "<5" to select all spells higher or lower than a certain level. 
  260.  
  261. The "description" field allows you to enter several lines of text instead of 
  262. only one.  All lines entered are searched for in the spell descriptions, with 
  263. the results OR'ed or AND'ed together according to the button pushed on the 
  264. right. 
  265.  
  266. Searches go faster with case sensitivity enabled.  Also, searches go faster if 
  267. the program doesn't have to search through entire spell descriptions... limit 
  268. using the other fields if possible. 
  269.  
  270. Searching is multithreaded, so you can work on other books while the search is 
  271. in progress. 
  272.  
  273.  
  274. ΓòÉΓòÉΓòÉ 3.4.3.2. Sort spellbook ΓòÉΓòÉΓòÉ
  275.  
  276. This sorts the spellbook, priest spells before mage spells, then in 
  277. alphabetical order. 
  278.  
  279. More sorting options are planned for later. 
  280.  
  281. Sorting is multithreaded, although usually quick. 
  282.  
  283.  
  284. ΓòÉΓòÉΓòÉ 3.4.3.3. Rename spellbook ΓòÉΓòÉΓòÉ
  285.  
  286. This renames the spellbook... it does not change the actual name of the file 
  287. the spellbook is saved in, only the name which appears at the top of the 
  288. window. 
  289.  
  290.  
  291. ΓòÉΓòÉΓòÉ 3.4.4. Views Menu ΓòÉΓòÉΓòÉ
  292.  
  293. The Views menu includes: 
  294.  
  295.   Icon View
  296.   Name View
  297.   Text View
  298.   Details View
  299.   Small Icons
  300.   Large Icons
  301.  
  302. Spellbooks remember which view they are in, whether to use large or small 
  303. icons, and the bar position in details view.  This is stored in extended 
  304. attributes for saved spellbooks, or in the INI file for the master spell window 
  305. and new windows. 
  306.  
  307.  
  308. ΓòÉΓòÉΓòÉ 3.4.4.1. Icon View ΓòÉΓòÉΓòÉ
  309.  
  310. This shows each spell as an icon with the name of the spell underneath. 
  311.  
  312.  
  313. ΓòÉΓòÉΓòÉ 3.4.4.2. Name View ΓòÉΓòÉΓòÉ
  314.  
  315. This shows each spell on a single line with the icon to the left and the name 
  316. to the right. 
  317.  
  318.  
  319. ΓòÉΓòÉΓòÉ 3.4.4.3. Text View ΓòÉΓòÉΓòÉ
  320.  
  321. This just shows the spell names, one per line. 
  322.  
  323.  
  324. ΓòÉΓòÉΓòÉ 3.4.4.4. Details View ΓòÉΓòÉΓòÉ
  325.  
  326. This shows the spell and some other relevant details such as spell level, and 
  327. the school or sphere of the spell. 
  328.  
  329.  
  330. ΓòÉΓòÉΓòÉ 3.4.4.5. Small Icons ΓòÉΓòÉΓòÉ
  331.  
  332. This uses small icons in all views that show icons; the icons lose detail, but 
  333. allow more spells on the screen. 
  334.  
  335.  
  336. ΓòÉΓòÉΓòÉ 3.4.4.6. Large Icons ΓòÉΓòÉΓòÉ
  337.  
  338. This tells the book to use large icons to represent spells; these are as 
  339. detailed as other icons in your system. 
  340.  
  341.  
  342. ΓòÉΓòÉΓòÉ 3.4.5. Help Menu ΓòÉΓòÉΓòÉ
  343.  
  344. This includes: 
  345.  
  346.   Help Index
  347.   General Help
  348.   Using Help
  349.   About
  350.  
  351.  
  352. ΓòÉΓòÉΓòÉ 3.4.5.1. Help Index ΓòÉΓòÉΓòÉ
  353.  
  354. This will display an index of help topics from within the program. 
  355.  
  356.  
  357. ΓòÉΓòÉΓòÉ 3.4.5.2. General Help ΓòÉΓòÉΓòÉ
  358.  
  359. This will bring up general help on using this program, like pushing F1. 
  360.  
  361.  
  362. ΓòÉΓòÉΓòÉ 3.4.5.3. Using Help ΓòÉΓòÉΓòÉ
  363.  
  364. This will bring up help on how OS/2's help system works. 
  365.  
  366.  
  367. ΓòÉΓòÉΓòÉ 3.4.5.4. About ΓòÉΓòÉΓòÉ
  368.  
  369. This will briefly describe the program. 
  370.  
  371.  
  372. ΓòÉΓòÉΓòÉ 3.4.6. Spell Context Menu ΓòÉΓòÉΓòÉ
  373.  
  374. This menu will pop up if you right-click on a spell in the spellbook. 
  375.  
  376. The menu includes: 
  377.  
  378.   Show spell
  379.   Delete spell
  380.  
  381.  
  382. ΓòÉΓòÉΓòÉ 3.4.7. Spellbook Context Menu ΓòÉΓòÉΓòÉ
  383.  
  384. This menu will pop up if you right-click in the spellbook window somewhere in 
  385. the blank (empty) part of the window. 
  386.  
  387. The menu includes the options found in the Views and Book menus. 
  388.  
  389.  
  390. ΓòÉΓòÉΓòÉ 3.4.8. Drag and Drop ΓòÉΓòÉΓòÉ
  391.  
  392. To copy spells between windows (spellbooks), drag them with the right mouse 
  393. button.  You can select several spells with the left button.  Dragging can also 
  394. be used to reposition spells within a window, if the window is not read-only. 
  395.  
  396.  
  397. ΓòÉΓòÉΓòÉ 3.5. Spell Window ΓòÉΓòÉΓòÉ
  398.  
  399. To bring up a spell in detail, double click on it, or select "show spell" from 
  400. the context menu.  This brings up a window which is pretty self-explanatory. 
  401. Use ALT-N or ALT-P as a shortcut to go to the next or previous spell in the 
  402. book. 
  403.  
  404. You can copy text from spells onto the clipboard using the usual methods.  You 
  405. can even edit and change spells, although this doesn't work very well and will 
  406. probably require you to go in and fix the saved text file with an editor. 
  407.  
  408. Any file you change and save is saved in the file splbook.chg. 
  409.  
  410.  
  411. ΓòÉΓòÉΓòÉ 4. Source information ΓòÉΓòÉΓòÉ
  412.  
  413. The source is written in C++ for the IBM C++ compiler; it will probably work 
  414. with other compilers, although I haven't tested this.  You need a C++ compiler 
  415. and a resource compiler to compile the dialogs and menus. 
  416.  
  417. The makefile is compatible with GNU's make. 
  418.  
  419. You need an IPF compiler (IPFC) to compile the documentation. 
  420.  
  421. Click one of the following for more information: 
  422.  
  423.   general.cpp
  424.   splbook.cpp
  425.   spl.cpp
  426.   bookwin.cpp
  427.   splobj.cpp
  428.   splwin.cpp
  429.   spldlgs.cpp
  430.   splhelp.cpp
  431.   ea.cpp
  432.  
  433.  
  434. ΓòÉΓòÉΓòÉ 4.1. general.cpp ΓòÉΓòÉΓòÉ
  435.  
  436. This file contains some generally useful functions which are called from the 
  437. rest of the code.  None are PM specific. 
  438.  
  439. fatal, error, warning - these are 3 error functions indicating various levels 
  440. of severity.  These are pretty useless in a PM program. 
  441.  
  442. chkcalloc - this is a memory allocation function, which is pretty useless for a 
  443. C++ program.  (Just use "new" instead) 
  444.  
  445. upstr, lowstr - these are 2 string functions to capitalize and uncapitalize a 
  446. string... these are rarely found in C libraries, so they're included here. 
  447. These actually get used in the code. 
  448.  
  449. fgets_no_cr - this works just like fgets(), but removes the \n at the end of 
  450. the string. 
  451.  
  452.  
  453. ΓòÉΓòÉΓòÉ 4.2. splbook.cpp ΓòÉΓòÉΓòÉ
  454.  
  455. These files contain the C++ classes for handling spells and spellbooks, and 
  456. contain no OS/2-specific or PM-specific information.  Routines for reading and 
  457. writing spells out of files are given. 
  458.  
  459. Note that the classes are set up to allow later addition of psionic disciplines 
  460. as a subclass of the general spell.  This is why the "magespell" class contains 
  461. things like "school" and so forth that you would normally associate with all 
  462. spells. 
  463.  
  464. If you want to change this program to change the format of how spells are read 
  465. in and out (for example to use this program with another FRP system) this is 
  466. the file to change. It is also the most portable to other systems besides OS/2. 
  467.  
  468.  
  469. ΓòÉΓòÉΓòÉ 4.3. spl.cpp ΓòÉΓòÉΓòÉ
  470.  
  471. This file contains some initialization and general use (PM) functions which get 
  472. called from classes. 
  473.  
  474. Routines to load in the icon file, look up an icon for a given spell, load in 
  475. the INI file, enable/disable or check/uncheck menu items, and printf() to a 
  476. window's title bar are in here. 
  477.  
  478.  
  479. ΓòÉΓòÉΓòÉ 4.4. bookwin.cpp ΓòÉΓòÉΓòÉ
  480.  
  481. bookwindow is a class which refers to the spellbook windows which appear on the 
  482. screen.  The class definition appears in bookwin.hpp. 
  483.  
  484. Bookwindow functions which are handled in the main thread are included in 
  485. bookwin.cpp. 
  486.  
  487.  
  488. ΓòÉΓòÉΓòÉ 4.5. splobj.cpp ΓòÉΓòÉΓòÉ
  489.  
  490. The object thread for bookwindows is handled here.  Both the object window 
  491. function and the main() thread which creates it are defined here. 
  492.  
  493. Bookwindow functions that are handled in the object thread are in this file. 
  494.  
  495.  
  496. ΓòÉΓòÉΓòÉ 4.6. splwin.cpp ΓòÉΓòÉΓòÉ
  497.  
  498. spellwindow is a class which refers to the spell windows which show the 
  499. detailed descriptions of spells.  The class definition appears in splwin.hpp. 
  500.  
  501. Spell windows are not multithreaded; all the code required to handle them is in 
  502. splwin.cpp. 
  503.  
  504.  
  505. ΓòÉΓòÉΓòÉ 4.7. spldlgs.cpp ΓòÉΓòÉΓòÉ
  506.  
  507. These files contain all the code required for processing the dialog boxes used 
  508. in the program. 
  509.  
  510.  
  511. ΓòÉΓòÉΓòÉ 4.8. splhelp.cpp ΓòÉΓòÉΓòÉ
  512.  
  513. These files contain code for on-line help. 
  514.  
  515.  
  516. ΓòÉΓòÉΓòÉ 4.9. ea.cpp ΓòÉΓòÉΓòÉ
  517.  
  518. These files contain OS/2 specific file handling code. 
  519.  
  520. query_last_write is a function for finding out the last time a file has been 
  521. written to. 
  522.  
  523. getEA is a function for reading an given EA out of a file. It may contain bugs; 
  524. I have little coherent information on OS/2's EAs. 
  525.  
  526. putEA is a function for writing data to a named EA of a file.  It works, but 
  527. could stand to be debugged also. 
  528.  
  529.  
  530. ΓòÉΓòÉΓòÉ 5. Planned enhancements ΓòÉΓòÉΓòÉ
  531.  
  532. These are things I plan to add to the program in the future, both in order to 
  533. give it more functionality, and in order to learn more about PM programming 
  534. myself.  If you would like to help me out with any of these, please let me know 
  535. what you're working on. 
  536.  
  537. Fixing up the on-line help some more. 
  538.  
  539. More ways to sort spellbooks. 
  540.  
  541. More fields (user-selectable as to which ones) in details view. 
  542.  
  543. Allowing users to edit spells in a way that actually works. 
  544.  
  545. More drag and drop stuff... should allow you to drop a text file into a spell 
  546. window and read it in.  Also, should allow you to drag a spell onto the printer 
  547. and print it.  Drag and drop icon assignment would also be cool. 
  548.  
  549.