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 >
Wrap
Text File
|
1990-10-08
|
6KB
|
153 lines
PopArt - image.ImageData generator & animator, by
Phlip
1637 Baker St
Costa Mesa, CA 92626
3rd Planet, Solar System, Western Spiral Arm
This program is primarily a showcase of its own output, and its purpose
is to demonstrate how, even WITHOUT IFF files and HAM pictures and ARexx
and 4-D ray tracing the Amiga is STILL an incredible programming platform
The program was compiled using the MANX Aztec C compiler version 3.6a.
See "main.c" for the compile lines (and not much else...). I reserve no
rights; it is freely distributable.
I am releasing the code for three reasons:
1> to damage the education of novices
2> to show off how I prefer to place C punctuation
3> to let people add things and tune things the way they like them
If you add anything please mail me it so I can send Fred Fish the new
version and take the credit for it. ;->
Gadget roster:
HATCG Hatch - hit only even dots on odd lines && vice versa
UNHTG UnHatch - hit only odd dots on odd lines && vice versa
PICKG Pick (menu button) - switch to the next color mouse-clicked on
NEW_G New - blow away the work area with the current color
BLOKG Block - hit a 3 x 3 area (Ctrl == 9 x 9)
SAVEG Save - stick a C declaration on the disk (Ctrl == Inc && Save)
LOADG Load - read the current dataName out of a file (Ctrl == Clone && Load)
CLONG Clone - copy the current window to a new one
SVSZG SaveSize - save all or northwest corner (should be four sliders)
ROLLG Roll - run all the images along the current Sequence
INC_G Inc - add 1 to the dataName and fileName
INS_G Inc && Save - same as Ctrl-Save
FILLG Fill - take a shot at filling an area (don't expect much!)
COPYG Copy - copy the working image into the Undo Buffer
UNDOG Undo - copy it back into the working image
STAKG Stack - put all the windows under the current one
SEQ_G Seq - open the Sequence window, to define the animation order
SQSTG I forget what this was suppose to be. Not implemented
CNL_G Clone && Load - same as Ctrl-Load
NOCMG No Comment - don't stick a big how-to-edit-and-remain-loadable comment in the output
ONIOG See Thru - write pixels in the working area describing the previous window image
POP_G Pop Thru - copy from last window when drawing
XWB_G Close WB - try to close the workbench && save chip memory
TWEKG ColorTweaker- tweak the RGB (Ctrl == save, Alt == load && L-Amiga == restore colors)
HEX_G Hex or Dec - in what radix to write the ImageData array
a sampling of functions:
anim () waste memory showing little animations for certain buttons
art () switch-case the input && dispatch orders to maybedospotat,
dumb_gadgets, etc
cloze () relinquish the file and memory used in save () and saveColors ()
clozeClipWin () close the window into which shift-dragged pixels were copied
doBox () do the COMPLEMENT RectFill when the user shift-drags the mouse
doKeys () interpret a raw key hit; load a fake gadget event into gadcode,
and call dumb_gadgets (). Also roll the color for an arrow key
dospot () draw a 3 x 3 fat pixel in the work area, and draw a real pixel in
the working image and the current window image. Refresh the
"shadow" image
dumb_gadgets () switch-case the gadcode, anim () some gadgets
flash_blok () set DrawMode to COMPLEMENT and call maybedospot
fill () start a demented, recursive attempt to fill an area without
bothering the poor, overworked blitter to do it for us
help () look up the mouseX, Y, find current help off of a table && display
it if it is new
hotHelp () tell the user where the mouse is or what a process is doing
increment () add 1 to the fileName and dataName
init () plug into the libraries, grab chip space, open the window, draw fake
gadgets
input () check little windows for input, flash_blok () if nescessary, Wait,
flash_blok () again, discard excess mousemoves, and stuff the
globals msgclass, msgcode, gadcode and mrQ
load () stick out the file requestor, open the file, scan it for the current
dataName, parse it and display it
maybedospotat () check if we're inside the work area, and draw a dot or a
block of dots
maybedospot () check if we're hatching or unhatching and on the wrong spot
new () 3 rectfills and an attitude
new_color () put that little ">" at a new color. If Ctrl is down, SchRep ()
newactive () make a new window image the current working image, and copy it in
newOnion () we have a new window as the see-thru window. Draw it into the
working image
onionOn (), onionOff () turn the See Thru gadget on or off
offInput () close the IDCMP port to prevent input from backing up
onInput () restore the IDCMP
pick () enter pick mode, wait for a click or gadget event, and set the new
color
pickmouse () attach the pick-mode mouse to the window
popChip () copy an array into chip memory, plug it into a standard Image,
and draw it with DrawImage
popOnOff () turn the Pop Thru gadget on or off
quit () init (), backwards and negative
Rcloze () close the file and temp storage used in load () and loadColors ()
redrawWorkArea () I forget
roll () open a stage window if possible, then start flashing images on it
based on the current Sequence. If we're out of chip (gosh, how
did that happen?), borrow the work area
save () get a file name, get clearance to write on it if it's already there,
and write the current image
SchRep () search one color and replace it with another
stack () delta-move all windows to equal the current window's coords
stor () call NewWindow ()
zapAllWindows () seek and destroy all open image windows