home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff374.lzh / PopArt / PopDoc < prev    next >
Text File  |  1990-10-08  |  6KB  |  153 lines

  1.  
  2.  
  3.              PopArt - image.ImageData generator & animator, by
  4.  
  5.                                    Phlip
  6.                                1637 Baker St
  7.                            Costa Mesa, CA  92626
  8.                3rd Planet, Solar System, Western Spiral Arm
  9.  
  10.     This program is primarily a showcase of its own output, and its purpose
  11.     is to demonstrate how, even WITHOUT IFF files and HAM pictures and ARexx
  12.     and 4-D ray tracing the Amiga is STILL an incredible programming platform
  13.  
  14.     The program was compiled using the MANX Aztec C compiler version 3.6a.
  15.     See "main.c" for the compile lines (and not much else...).  I reserve no
  16.     rights; it is freely distributable.
  17.  
  18.     I am releasing the code for three reasons:
  19.  
  20.         1>  to damage the education of novices
  21.  
  22.         2>  to show off how I prefer to place C punctuation
  23.  
  24.         3>  to let people add things and tune things the way they like them
  25.  
  26.     If you add anything please mail me it so I can send Fred Fish the new
  27.     version and take the credit for it.                                              ;->
  28.  
  29.  
  30.                               Gadget roster:
  31.  
  32.  HATCG  Hatch       - hit only even dots on odd lines && vice versa
  33.  UNHTG  UnHatch     - hit only odd dots on odd lines && vice versa
  34.  PICKG  Pick (menu button) - switch to the next color mouse-clicked on
  35.  NEW_G  New         - blow away the work area with the current color
  36.  BLOKG  Block       - hit a 3 x 3 area (Ctrl == 9 x 9)
  37.  SAVEG  Save        - stick a C declaration on the disk (Ctrl == Inc && Save)
  38.  LOADG  Load        - read the current dataName out of a file (Ctrl == Clone && Load)
  39.  CLONG  Clone       - copy the current window to a new one
  40.  SVSZG  SaveSize    - save all or northwest corner (should be four sliders)
  41.  ROLLG  Roll        - run all the images along the current Sequence
  42.  INC_G  Inc         - add 1 to the dataName and fileName
  43.  INS_G  Inc && Save - same as Ctrl-Save
  44.  FILLG  Fill        - take a shot at filling an area (don't expect much!)
  45.  COPYG  Copy        - copy the working image into the Undo Buffer
  46.  UNDOG  Undo        - copy it back into the working image
  47.  STAKG  Stack       - put all the windows under the current one
  48.  SEQ_G  Seq         - open the Sequence window, to define the animation order
  49.  SQSTG                I forget what this was suppose to be.  Not implemented
  50.  CNL_G  Clone && Load - same as Ctrl-Load
  51.  NOCMG  No Comment  - don't stick a big how-to-edit-and-remain-loadable comment in the output
  52.  ONIOG  See Thru    - write pixels in the working area describing the previous window image
  53.  POP_G  Pop Thru    - copy from last window when drawing
  54.  XWB_G  Close WB    - try to close the workbench && save chip memory
  55.  TWEKG  ColorTweaker- tweak the RGB (Ctrl == save, Alt == load && L-Amiga == restore colors)
  56.  HEX_G  Hex or Dec  - in what radix to write the ImageData array
  57.  
  58.  
  59.                          a sampling of functions:
  60.  
  61. anim ()  waste memory showing little animations for certain buttons
  62.  
  63. art ()  switch-case the input && dispatch orders to maybedospotat,
  64.             dumb_gadgets, etc
  65.  
  66. cloze ()  relinquish the file and memory used in save () and saveColors ()
  67.  
  68. clozeClipWin ()  close the window into which shift-dragged pixels were copied
  69.  
  70. doBox ()  do the COMPLEMENT RectFill when the user shift-drags the mouse
  71.  
  72. doKeys ()  interpret a raw key hit; load a fake gadget event into gadcode,
  73.             and call dumb_gadgets ().  Also roll the color for an arrow key
  74.  
  75. dospot ()  draw a 3 x 3 fat pixel in the work area, and draw a real pixel in
  76.             the working image and the current window image.  Refresh the 
  77.             "shadow" image
  78.  
  79. dumb_gadgets ()  switch-case the gadcode, anim () some gadgets
  80.  
  81. flash_blok ()  set DrawMode to COMPLEMENT and call maybedospot
  82.  
  83. fill ()  start a demented, recursive attempt to fill an area without
  84.             bothering the poor, overworked blitter to do it for us
  85.  
  86. help ()  look up the mouseX, Y, find current help off of a table && display
  87.             it if it is new
  88.  
  89. hotHelp ()  tell the user where the mouse is or what a process is doing
  90.  
  91. increment ()  add 1 to the fileName and dataName
  92.  
  93. init ()  plug into the libraries, grab chip space, open the window, draw fake
  94.             gadgets
  95.  
  96. input ()  check little windows for input, flash_blok () if nescessary, Wait,
  97.             flash_blok () again, discard excess mousemoves, and stuff the
  98.             globals msgclass, msgcode, gadcode and mrQ
  99.  
  100. load ()  stick out the file requestor, open the file, scan it for the current
  101.             dataName, parse it and display it
  102.  
  103. maybedospotat ()  check if we're inside the work area, and draw a dot or a
  104.                     block of dots
  105.  
  106. maybedospot ()  check if we're hatching or unhatching and on the wrong spot
  107.  
  108. new ()  3 rectfills and an attitude
  109.  
  110. new_color ()  put that little ">" at a new color.  If Ctrl is down, SchRep ()
  111.  
  112. newactive ()  make a new window image the current working image, and copy it in
  113.  
  114. newOnion () we have a new window as the see-thru window.  Draw it into the
  115.                 working image
  116.  
  117. onionOn (), onionOff () turn the See Thru gadget on or off
  118.  
  119. offInput ()  close the IDCMP port to prevent input from backing up
  120.  
  121. onInput ()  restore the IDCMP
  122.  
  123. pick ()  enter pick mode, wait for a click or gadget event, and set the new
  124.             color
  125.  
  126. pickmouse ()    attach the pick-mode mouse to the window
  127.  
  128. popChip ()  copy an array into chip memory, plug it into a standard Image,
  129.                 and draw it with DrawImage
  130.  
  131. popOnOff ()  turn the Pop Thru gadget on or off
  132.  
  133. quit ()  init (), backwards and negative
  134.  
  135. Rcloze ()  close the file and temp storage used in load () and loadColors ()
  136.  
  137. redrawWorkArea ()  I forget
  138.  
  139. roll ()  open a stage window if possible, then start flashing images on it
  140.             based on the current Sequence.  If we're out of chip (gosh, how
  141.             did that happen?), borrow the work area
  142.  
  143. save ()  get a file name, get clearance to write on it if it's already there,
  144.             and write the current image
  145.  
  146. SchRep ()  search one color and replace it with another
  147.  
  148. stack ()  delta-move all windows to equal the current window's coords
  149.  
  150. stor ()  call NewWindow ()
  151.  
  152. zapAllWindows ()  seek and destroy all open image windows
  153.