home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 067.lha / SpriteMasterII.DOC < prev    next >
Text File  |  1986-11-20  |  18KB  |  334 lines

  1.            Instructions for SPRITEMASTER II by Brad Kiefer
  2.  
  3.                   (C) 1987 by Brad Kiefer
  4.                       512 D Kingsway Ave. S.E.
  5.                       Medicine Hat, Alberta
  6.                       T1A 2W7
  7.                       (403) 526-2288           Work
  8.                       (403) 527-7871           Home
  9.  
  10.          This Program is released to the Public Domain on 2 conditions:
  11.      1. That this Instruction.doc be distributed with it, and . .
  12.      2. That the above copyright notice be left intact.
  13.  
  14.  
  15.      If you find the program useful the author would appreciate a small
  16. pittance of $10.00 .  Now onto the useful stuff.
  17.  
  18.  
  19.  
  20.      Sprites Can be ANY length ( up to 200 pixels tall ) but only 16 pixels
  21. wide, unfortunately. Refer to you Rom Kernal Manuals on all the details.
  22. However, there are ways around these limitations. By Attaching two sprites
  23. together we boost the number of colors we can effectively use from 4 to 16.
  24. By placing 2 or more sprites side by side we can double or triple or
  25. quadruple the width of the sprite too ! With so many Sprites at our
  26. disposal, why not ??
  27.      So, now that we have decided to use Sprites, lets see how SPRITEMASTER
  28. II can help.
  29.  
  30.      The first thing you are greeted with is the opening options screen. The
  31. top string gadget is how many Sprites you want in each buffer; anything up
  32. to a maximum of 99 is accepted ( With a word of warning : Since only a word
  33. size is used you must keep the maximum buffer length under 65K. e.g.: Sprite
  34. Height*4+8*Number of Sprites per Buffer < 65,000 . You can see that with 99
  35. 200 pixel sprites the formula yields the following results: 200*4+8*99=79,
  36. 992 bytes. MORE than 1 word can hold !! So, if using 200 pixel sprites try
  37. to keep the number of sprites per buffer down to around 80 or so. You can
  38. always add more Buffers on instead. ) The next string gadget is for how high
  39. you want each sprite to be. Anything up to the maximum of 200 pixels is
  40. allowed. Then, how many Buffers do you want. A normal application of :
  41.        Number of Sprites Per Buffer    :    50
  42.                        Height of Sprites               :    15
  43.                        Number of Buffers               :    5
  44.  
  45. would yield a total of 2.06K Chip memory being allocated and 250 sprites to
  46. work on at one time. ( only sprites in the first buffer may be animated
  47. though ).
  48.      If you are going to be using one particular set of parameters it would
  49. probably be wise to save the setting as a configuration.file that
  50. SPRITEMASTER II reads in when you hit the Config gadget instead of the 'Try
  51. It' gadget. Merely click in the string gadget with the 'n' in it and type
  52. 'y'. Then when you click on 'Try it', the program will save the new
  53. configuration.file under the SPRITEMASTER/Sprite drawer. Next time you run
  54. the program merely hit the Config gadget and your configuration will be
  55. loaded in and activated !!
  56.  
  57.      The Opening screens shows the sprite expanded in a grid on the left
  58. side of the screen. This is your work area. If you chose a number under 23
  59. pixels for your Sprites, then an Extra line will be drawn on the grid
  60. showing how far down you are allowed to draw. The drawing area under this
  61. area is off limits. Clicking the mouse inside the drawing area will leave a
  62. trail of colored squares behind, just like any other drawing program. You
  63. can keep the left button down and draw for faster operation. Notice the
  64. difference compared to other Sprite Programs written in C ? I even had to
  65. install a delay to keep up.
  66.  
  67.      On the right hand side of the grid is a set of 4 arrows. If you have
  68. picked a pixel length greater than 23 pixels, there is no way to modify the
  69. sprite all at one time, so you must scroll the sprite up and down to reach
  70. all of its length. The left and right scroll bars are included to scroll the
  71. sprite left and right within the Grid without cropping.
  72.  
  73.      Over more and up are the Sprite Numbers and the color selection boxes.
  74. If sprite #1 is currently selected you can draw with any of the first 4
  75. colors in Box #1. If sprite #2 or Sprite #3 is selected the next 4 colors
  76. are active, and so on. Simply click on the desired color you want and the
  77. big Current Color indicator will reflect your choice. Now you can draw with
  78. that color in the Grid. No matter WHAT color you put in Color 0 on each
  79. sprite it will NEVER appear on the sprite. Color 0 is Transparent and as
  80. such is a color, but a see-through color. All the color 0's for each sprite
  81. are set to Black as default so as not to confuse, but should you change
  82. these to some other colors, they will still act as Transparent to the
  83. Sprites ! Sorry, Talk to Commodore-Amiga.
  84.  
  85.      To Choose a Sprite just click ABOVE the color selection Boxes on any of
  86. the 7 Numbers there and Current Sprite Number at the bottom right hand side
  87. of the screen will show that sprite as being the current sprite. Also, that
  88. sprite will be drawn in the Grid Box on the left of the screen and Color #1
  89. will be the active color !
  90.  
  91.      The Boolean Gadget with the A on it is the Animate Gadget, used for
  92. animating your sprites. See Animate
  93.  
  94.      Well, lets move onto the menus !
  95.  
  96.  
  97. Main Menus
  98. HELP:    Commands, Sprites, Show Bar, Hide Bar, RESET, OPTIONS
  99. PROJECT: Archive, Load Palette, Save Palette, Say Goodbye !
  100. MOVE:    Up 1 Page, Down 1 Page, Up 10 Pages, Down 10 Pages
  101. FUN:     Mirror Image, Reverse 0 & 3, Reverse 1 & 2, Reverse
  102.                    Entire Sprite, Flip Sprite, Move Sprite #, Animate
  103. THINGS:  Palette, Transfer, Clear, Fill, Grid, Take Pic, Plant Pic.
  104. SPRITE:  Attach Sprites ( Not Implemented ),Hide Sprites, Show
  105. Sprit          es.
  106.  
  107.      Lets Take Them 1 at a time and go through them
  108.  
  109. HELP:
  110.  
  111.      1. Commands: This merely displays a requester on copyright notice and
  112. such.
  113.      2. Sprites : This displays a requester and cautions you about being
  114. careful loading and saving different lengths of sprites. More on this later.
  115.      3. Show Bar: This will display the title bar if is not already
  116. displayed.
  117.      4. Hide Bar: What else.
  118.      5. RESET:    This will entirely reset the machine without having to
  119. rerun the program. Careful, All your sprites will be lost !!
  120.      6. OPTIONS:  This will take you back to the opening Options screen and
  121. allow you to reset the Height of your sprites etc. Not quite as catastrophic
  122. as RESET.
  123.  
  124. PROJECT:
  125.  
  126.      1. Archive: This will bring up the Load/Save Window. The opening,
  127. default text for Drive and path is DF0:, and the program will display all
  128. files on that drive. Files will be blue, Directories will be in Gray. To
  129. access a directory, merely click the mouse button on any of the Gray names
  130. and the subsequent Directory will be displayed. Once you have the Filename
  131. you wish to do something with on the screen, click on it and it will appear
  132. in the Filename String Gadget. If you hit delete, the file will be DELETED
  133. with no requester of any kind saying  " Are you sure you want to DELETE file
  134. so and so ?? ", so be sure before you hit it. Makedir does not work right
  135. now but will be implemented when I am not so lazy. There were minor bugs in
  136. it, and rather that put it in untested I left it out. Hitting on either of
  137. the DF0: and DF1: gadgets will take you to that particular drive. Hitting
  138. the load gadget will open the Load Window. Use the left mouse button to
  139. increment the Buffer counter and Page counter for where you want the file to
  140. load in at. Try and keep it down far enough in the allocated memory so it
  141. does not corrupt memory past the amount specified in the opening options
  142. screen. This will happen when, for instance, you have specified 2 buffers of
  143. 44 pages, and then try to load a 10k file in at buffer #2 Page #40 !!! Oh,
  144. sure you will get the first couple of pages, but the rest of the file will
  145. end up who knows where. To check all this would have required too much
  146. trouble, so I rest the burden of this on your shoulders ! To load the file
  147. only the top row of numbers are in operation. When Saving a file you can
  148. specify both the Buffer and Page to load from and the Buffer and Page to
  149. save to !  Thus to save sprites Buffer #1 Page #20 to Buffer #2 Page #12 you
  150. would click on the (10) Page # until it read Page #20 ( requires two clicks
  151. ) then move down to the Save portion of the window and click inside the
  152. Buffer # once to move it to Buffer #2 then once in the (10) Page # and twice
  153. in the (1) Page #. Then select OK and your sprites will be saved as a binary
  154. file. For a 15 pixel long sprite 68 bytes are saved for every sprite
  155. specified. Sprites are saved inclusive of the last Page specified. Thus, in
  156. the preceding example, Buffer #2 Page #21 sprite would be saved too ! Each
  157. Sprite is saved in the following format:
  158.  
  159.      FFFF FFFF             ;2 words for control and position
  160.      8000 7000             ;2 words for every pixel in height
  161.      CC00 FF00             ;etc., etc.
  162.      0000 0000             ;2 ending words consisting of the next
  163.                            ;usage of this sprite  Usually Zero
  164.  
  165.      Therefor 15 pixels * 4 bytes per pixel = 60 bytes. 2 control words at
  166. the beginning of the sprite and at the end of the sprite = 8 bytes for a
  167. total of 68 bytes per sprite !
  168.      Once a drive and path have been selected, the next time Archive is
  169. selected the program will remain in that Drive/Path. Of course you can
  170. always click in the string gadgets and enter it by hand if you want to. (
  171. Why buy an Amiga he asks ?? )
  172.  
  173.      2. Load Palette :  This brings up a Requester with a 9 images on it ;
  174. the number of Palettes you are allowed to use. Merely click on the number of
  175. the Palette you wish to load in, and the that ColorMap will be used from
  176. that time on, providing you had saved a Palette already under the Palette
  177. directory. 3 or 4 Palette's are provided as examples.
  178.  
  179.      3. Save Palette : Once you are done modifying the colors you wish for
  180. your sprite and wish to save them rather than trying to get the exact color
  181. combinations again, just pick Save Palette and then the number you wish to
  182. save and the ColorMap will be saved ( 32 color words or 64 bytes long ). If
  183. for instance you picked number 3, the color information would be saved under
  184. the following drive/path SPRITEMASTERII/Palette/Palette3.pal.
  185.  
  186. ****  NOTE  :  If you are not running from Workbench be sure to CD:
  187. SPRITEMASTER or you will probably run into a lot of trouble !! ****
  188.  
  189.      4.  Say Goodbye ! :  Exit the program ( what, are you kidding ? )
  190.  
  191.  
  192. MOVE:
  193.  
  194.      1. Up 1 Page : Move all 7 sprites down by 1. NOTE :  ANY of the move
  195. instructions do not affect the sprite currently displayed in the grid box on
  196. the left of the screen. Due to EXTREMELY slow times involved in my
  197. DrawSprite routine ( and I used every trick in 68000 Assembly to get it up
  198. the speed it is at ), I think because _LVORectFill is so slow, I do not
  199. redraw the sprite everytime you move up and down through the buffers. Merely
  200. click on the sprite number you wish to modify and the sprite will be drawn
  201. on the grid. Then go to it. If you keep the same parameters as default and
  202. you move up until you can go no further you will find you stop at page #38
  203. and the screen Beeps. That is because you are at the end of the buffer.
  204. Since 44 sprites were specified if Sprite #1 is at page 38 then Sprite #7 is
  205. at page 44. Just click on #7 and you can modify sprite 44.
  206.      2. Down 1 Page : Same as above, of course. Except that you cannot go
  207. down under Buffer #1 Page #00 !!
  208.      3. Up 10 Pages : Just a fast way to get around. Depending on the Page
  209. number when you start you may find the screen Beeping when you are far from
  210. the end of the Buffer. This is because to add 10 pages would take you over
  211. the top ! Just move Up 1 Page to reach the final page number.
  212.      4. Down 10 Pages : I've had this thing throw some oddball characters up
  213. there at times but can't seem to get it to do it consistently. Any troubles,
  214. let me know.
  215.  
  216. **** NOTE :  Start the prog. form CLI and run through the pages, then move
  217. to Workbench and run the program; then run through the pages again 1 at a
  218. time ( Simply hold the Right Amiga and 1 keys down ). What a difference !!
  219.  
  220.  
  221. FUN:
  222.  
  223.      1. Mirror Image : This will create a mirror image of the currently
  224. selected sprite from right to left. If the man was facing left he's facing
  225. right NOW.
  226.      2. Reverse 0 & 3 : Reverses colors 0 & 3. I don't know you might find
  227. these colors useful if you ever find you drew a great big complicated sprite
  228. and decide everything you drew in a certain color would look better in a
  229. different one ?? I don't know.
  230.      3. Reverse 1 & 2 : Reverses color 1 & 2. Same as above but now you have
  231. even more versatility.
  232.      4. Reverse Entire Sprite : Wow, is this guy stuck on Reversi or what ??
  233.      5. Flip Sprite : Flip the current sprite upside down, or right side up
  234. if you drew it upside down !
  235.      6. Move Sprite : Brings up a requester asking you to input the Sprite #
  236. you wish to move and the X,Y coordinates to move it to. This is useful for
  237. moving your sprites about the screen and sticking them together before you
  238. animate them. Clicking OK will move the sprite there, Cancel will cancel
  239. this requester without doing anything and clicking Joy will move the
  240. selected sprite by a joystick plugged into port #2; the one at the back of
  241. the machine. Push the fire button when it is properly positioned to take you
  242. back to the program. Should be able to control the delay in movement of the
  243. sprite. Some might think the speed I set is too slow or too fast.
  244.      7. Animate : Ahah !, now we get to the crux of the matter. I had to cut
  245. this short due to the pressing of other matters. Hopefully you will hear all
  246. about it later. A requester will appear with numbers from 1 to 7 down the
  247. left side. ANY SPRITES BEING ANIMATED MUST BE IN BUFFER #1. Put the starting
  248. and ending pages of the sprites you want animated in the respective string
  249. gadgets and hit OK.
  250.         ** You must specify a sprite #1 to be animated regardless of any of
  251. the other sprites that are being animated. **
  252.         I take the starting and ending pages off of Sprite #1 and use them
  253. for all the other sprites too. That means that each animation sequence must
  254. have the same number of cel's in it. ( That's animation talk ) On the sample
  255. sprites provided ( Sprites/Sprites1.spr ) try this input: Starting Page #7
  256. Ending Page #11 then OK. Now move down to the Boolean gadget at the bottom
  257. of the screen with the Large A on the top of it and click the left mouse
  258. button. The Hearts should start beating. The only thing you should play with
  259. while the animation is running is the 4 scroll gadgets that are used to move
  260. the sprite around the grid. They work in the following manner :
  261.  
  262.                      sub 50 from Delay time  FASTER
  263.                                 ^
  264. Subtract 200 from Delay FAST   < >   Adds 200 to Delay time  SLOW
  265.                                 V
  266.                       Add 50 to Delay time    Slower
  267.  
  268.      When you are done watching the animation just click the Boolean gadget
  269. to off and resume modifying your sprites. When you use Move Sprite you must
  270. activate the Animate Requester and hit OK even if you don't want to change
  271. anything. When you hit OK, the memory is allocated for the animation and the
  272. sprites are moved up to the new chip memory where they reside for the ani.
  273. sequences. If you do not do this, the sprite will be flung back to its old
  274. position and animated from there ! Hit Right Amiga A and put 7 & 11 for all
  275. seven sprites and watch all 7 sprites animate !
  276.      Should put the joystick on this routine so you can move a sprite around
  277. while it is being animated. Any call for this ?? Just let me know.
  278.  
  279.  
  280. THINGS:
  281.  
  282.      1. Palette :  This will bring up the palette window ; move it to where
  283. it is most convenient. There's the familiar RGB Prop Gadgets !
  284.      Everything is pretty self-explanatory here. If you want to accept the
  285. changes made hit OK, if not hit cancel. Hit undo to UNDO the changes so far.
  286. Spread will give you a spread between 2 color ( Give me a break, I know it
  287. doesn't work very well, I missed something on my averaging algorithm. Who
  288. needs to spread colors on a Sprite Program anyway, geesh ! ) and EX will
  289. exchange any 2 colors. Don't forget to Save Palette if you want to keep you
  290. colors and load them back in next time or use them in your own program.
  291.    2. Transfer : Transfer a range of sprites to any Buffer and Page
  292.    3. Clear    : Clear out a range of sprites ( makes them Zero )
  293.    4. Fill     : Fill a range of sprites ( makes them Solid )
  294.    5. Grid     : Puts a grid on the Grid for fine detail work. Toggles on
  295. off everytime it is selected.
  296.    6. Take Pic : Takes a snapshot of the current sprite in a Extra Buffer
  297. area for safekeeping. If you modify the sprite and find you don't like it
  298. you can move to the next command and bring your sprite BACK !
  299.      7. Plant Pic : Plant the Sprite in the Extra Buffer area at the
  300. currently selected Page. Good for moving 1 page up a couple quick without
  301. having to go to transfer everytime !
  302.  
  303.  
  304. Sprite:
  305.  
  306.      1. Attach Sprites : Sorry, Not implemented, But I AM working on it.
  307.      Real  Soon  Now .
  308.      2. Hide All Sprites : Since sprites are independent of Windows and
  309. Screens they always stay where they are. This can be irritating to downright
  310. maddening when you are moving screens around willy-nilly. Activate this and
  311. it will hide the sprites so you can perform some other function without the
  312. sprites interfering with you.
  313.      3. Show All Sprites : This will bring the sprites back once you are
  314. done doing whatever it was that you were doing !!
  315.  
  316.  
  317.      Well, I think that about covers everything. I am REALLY rushed these
  318. days so I don't have time to make this LOOK really good, but let me know
  319. what you think and any ideas for improvement or BUG ( what a nasty word,
  320. where's the RAID ) fixes etc., would be appreciated. Also, If you use the
  321. program at all I would appreciate a meager donation ; after all that's what
  322. its all about right ?
  323.  
  324.      Brad Kiefer
  325.      512 d Kingsway Ave. S.E.
  326.      Medicine Hat, Alta                      WORK
  327.      T1A 2W7
  328.      (403) 526-2288
  329.  
  330. 524 c Princess Ave. S.E.
  331. Medicine Hat, ALberta                         HOME
  332. T1A 3C4
  333. (403) 527-7871
  334.