************************************************************ DISCLAIMER : (gotta have one) I can't stress enough, this is NOT commercial software. Put no faith what-so-ever in it. It is likely to destroy your hard-drive, blow up your moniter, and somehow cause problems on far away machines that aren't even connected. People you don't know will call you can tell you this program has destoryed their lives. Note while the above is meant in jest, crack dot com does not support Satan Paint at all, so please, please, don't call tech support, they will laugh at you and call you names :) Satan paint was used mainly as a in-house tool for Abuse, so you might find it useful for adding artwork to Abuse. You can say spaint art\dev.spe, for example to see all of the images in dev.spe while in the root abuse directory. (see end of this file for info on interfacing with abuse). I'm am currently planning on a rewrite from scratch for SPII, so I don't care for bug reports.. Satan Paint 1.4, (C) 1995 Jonathan Clark (very hard to descern) ** DOCS ** ---------------------------------------------------------------- New features ---------------------------------------------------------------- version 1.4 - who knows... I just got it for Abuse :) fixed all shm memory problems, but the Linux X server still has a bug on my accelerated video card (Cirrus) that causes X it to die a nasty death if the mouse cursor is at the edge of a window when running with shm. version 1.3 - Some new stuff with selectable areas, polygon selection doesn't work so I took it out. new commands include light, gravel, and sat. Version 1.2 - Broke all wildcards in DOS. - Fixed the problem of shared memory not getting de-allocated on crash. It is still not freed if you kill the program (kill -9), but these blocks can be freed with ipcs and ipcrm. - added reverse sequence command. - you can start spaint with no command-line args now! - 24 bit image merging replaced with slower 8 bit color method from faster 5 bit method. - fixed most bugs that occur when no images are loaded - added a -seq option to auto-load, crop, center, and calculate frame advancement from a dpaint sequence. i.e. pic0001.pcx ... Usefull for loading long sequences on a system without virtual memory. - character format replaced (still reads old characters) to include frame advancement. - fixed window resizing for X shm version. - added particle animation type (see type command) New commands : write_raw_gray, write_raw_color, merge_raw_gray, bevel Version 1.0 ---------------------------------------------------------------- Pull down menus : pretty obvious how to use them A couple of tricks : On dialog entries asking for a color number you can just click on the palette color. On dialog entries asking for a single image number you can click on it wih the right mouse button during index mode. I know about the redraw the problems, don't tell me. ---------------------------------------------------------------- To run satan paint ---------------------------------------------------------------- type paint filename [filename] [filename] [options]. ex. paint figures.spe the first file is loaded with it's palette and the rest are merged in to best fit the palette. Wildcards are permitted in both DOS and UNIX. You can specify the following graphics modes to run in : (SVGA and VESA) -vmode G640x400x256 -vmode G640x480x256 (need 512k video card) -vmode G800x600x256 (need 512k video card) -vmode G1024x768x256 (need 1M video card) For DOS, if your video card does not have the VESA driver built-in, you must run a VESA driver for your card to run hi-res. For XWindows, you can specify the initial size of the window with the "-size" option. Example spaint picture.pcx -size 800 560 NOTE : all flags should be at the end of the parameters. Satan Paint currently reads the following file formats : Bits Type ----------------------------------------------------------------------- 8 MDL : One of my older paint programs... 8 XWD : Produced by the Unix xwd command. (this can be used to load anything you can display in an X window). 24 PPM : portable pixmap format 8 PIC : used by GL animations, and some Mac programs. 8 PCX : PC Paint brush, Delux Paint 24,8 BMP : Microsoft Bitmap format. 8 LBM : Delux Paint 8 SPE : Satan Paint SPEc format. To read a 24 bit file you must specify a 8 bit file first, so spaint knows what palette to quantize to. i.e. spaint mypal.pcx my24pic.bmp ------------------------------------------------------------------- Basic Editing ------------------------------------------------------------------- Pixel mode : left mouse button draws, right mouse button "picks" up the color Image mode : You have to select an area (like brush in DPaint). Use the SPACE-BAR to select an area first, then select the image icon and you can use the selected area like a brush. For commands like blur 'b', and anti-aliase 'a' you must select an area this way. Fill, line, rectangle, circle, bar mode : obvious I know the circles aren't great, I never use them.... Index mode : Arrows scroll, left button selects. You can draw your own icons by editing spaint.spe. ------------------------------------------------------------------- Definitions ------------------------------------------------------------------- range : a list of image numbers, examples : 0,1,4,5-8 = (0,1,4,5,6,7,8) 3-6,9-12 = (3,4,5,6,9,10,11,12) all = every image currently loaded this = current image last_on = last image selected (before this) spe : short for Spec, as in a spec of dust. The file format is a collections of specs of different types, mainly images. See end of this file for more info on the format. Has also been refered to as Small Penis Envy :) ----------------------------------------------------------------------- Commands ----------------------------------------------------------------------- Command line commands : To type in a command hit the '/' key then type... Commands : *****************************FILE OPERATIONS *************************** load palette filename loads the palette from another file, the current images are left alone so if you load a different palette, they might look wierd. merge filename merges all the images from the filename. New images are remapped to best fit the current palatte. read filename reads filename and processes each line as a command saveas filename saves all the images in SPEC (propritary) format to filename the working filename is also altered to this name write_ppm [filename] saves the current image in Portable PixMap format. write_pcx [filename] saves the current image in PCX 8 bit format write_bmp [filename] saves the current image in MS bitmap 8 bit format write_include [filename] saves the current image in 'C' code which can be compiled and included in programs. If the file already exists, then the current image is appended to it and the palette is not written. This can be used to write a series of images to a single file. write_property [filename] range appends a string to filename which contains all the property information about an image, if you constantly reimport graphics data from another format and want to keep the properties the same you cna use this to save only the properties and load_properties to fetch them back write_raw_gray filename saves the current image as a raw series of bytes in gray scale. Stored as you would expect. left-right to top-down. Image dimensions are not stored! write_raw_color filename saveas as a raw 24 bit picture. left-right to top-down, 3 byte RGB triplets. Image dimensions are not stored! merge_raw_gray width height filename merges a raw 8 bit gray scale image. Sice width and height are not stored in the file you must input these. Note : write_raw_gray and merge_ray_gray are usefully if you are playing with dec.c and enc.c from the book Fractal Image Compression, of which the source can be found on the net. ************************* IMAGE OPERATIONS ************************** with range command --------! USEFULL !-------- does the command 'command' on the specified image number example : with all lower_name (converts the names of all the images to lower case) DO NOT USE WITH IN CONJUNCTION WITH DELETE, because image numbers change with each delete commands. Like wise the command with 0-last copy should not be used because copy increments last and an infinite copy loop is created. with all ascale 2 1 -> scales all images x2 at x y command does the command 'command' at the location x y, useful for command line fill and other commands that require the location of the mouse name [name] ex. name gaint, frame #3 names the current image 'gaint, frame #3' remove singles removes an single pixels in an image (makes them color 0) this is usefull for cleaning up dirty digitized pictures make color strip Creates an image 256x1 with every color in the palatte. Not very usefull for the artist. animate [frame1 frame2 ..] will animate the named in the order you specified. ex. animate 0 4 3 2 1 while draw picture #0, #4, #3, #2, #1, repeatedly to advance to the next frame, press the left mouse button, to quit the animation mode, press any key. palette on pops up the palette window if you closed it. hotkey '1' toggles palette on and off palette off removes the palette window from the screen. hotkey '1' toggles palette on and off palette toggle flip [x or y] flips the current image about the x or y axis. ex. flip x chop [width height] chops the current image up into peices that are exactly [widthxheight] this is usefully for making tiles. You can draw large image and chop it up and use the peices in the map editor. new or newb or newf or newc or news [width height name] creates a new image size widthxheight and names it name ex. new 40 30 green picture newb creates a new background tile (don't worry about this for now) newf creates a new foreground tile (don't worry about this for now) newc creates a new character (don't worry about this for now) new with no parameters brings up a pop-up window which will prompt you for more info. news creates a new image from the last selected area scale [width height] scales the current image to the new size scalex [mult div] scales image by a factor of mult/div, eg. scalex 1 2 scales the image one half size. where tells exactly where the moose is located within the current image & screen this is usefully for measuring pixels. (shotcut key 'w') clip x1 y1 x2 y2 cuts away part of an image and leaves only the area in x1 y1 x2 y2 the new image size becomes (x2-x1+1)x(y2-y1+1) solid [x] makes every non-black pixel in the current image the color x. useful for making mask. select enters select mode. The user then mouse the mouse to create a rectangle around the part of the image they wish to copy into the select buffer. select x1 y1 x2 y2 copies the specified area into the select buffer You can use the 'P' & 'p' keys to paste the selection back. If no paramters are specified then area is selected interactivly. Hot key is SPACE BAR. swap x y swaps the image numbers of images x & y. Names are not changed. ex. swap 4 3 will swap the 5th and 4rth image. The first image is #0. tile tiles the current image on the screen to fill the screen. usefull to see how something repeats across boundaries. go x jumps the image #x index same as the 'i' key displays all the images on the screen and lets you pick one with the mouse. You can scroll up and down with the UP/DOWN arrow keys. While in index mode you can also select image to animate by pressing 'a' then clicking on the order of animation and the pressing 'a' again. Pressing 'f' will show the properties of all images, incomplete polygons are shown in green (if the current palette as a green in it). set type|xcfg|attack|damage|body .. examples include set type foretile set attack 2 4 4 8 2 ; 2 point (4,4) (8,2) set attack -1 ; 5 points, guess to be the body outline set xcfg 8 set xcfg -1 ; image width/2 you can combine more than one set in the same command, example set type character xcfg 4 damage 3 0 0 0 4 5 4 the above example reuires the type set to occur first in the list because the other things being set are dependant on being a character type. type [image|character|foretile|backtile|particle] changes the type associated with the current image, a litmited form of set particle frames probably aren't to usefull for most people, I made a particle animator which I use with spaint. I don't know what features work with particle frames, because I haven't tested this yet, see end of file of particle save format. bevel amount makes an image "beveled". The boundary of the object must be color 0. The highlight is raised color intensity 'amount' anmd the darkened area is lowered 'amount'. Closest match is preformed on these values. blend image# amount blurs the current image with the image specified, amount is a percentage by which the current image is represented in blend, 50 is 50% half and half. blur x1 y1 x2 y2 blur_amount does a blur on the specfied, blur with no parameters blurs the last selected area with blur_amount 1. if no parameters are given to blur then the blur amount is 1 and hte area is used from the last select operation. blur_color amount color takes all of the pixels of color [color] and blurs them into the surronding image by a factor of [amount]. The area that is morphed if the area selected by the last select operation (say as pressing 'b'). If amount and color are not given then amount of 1 is used and color is taken from the currently selected color. See 'B' key. anti x1 y1 x2 y2 antialeases, very similary to blur, but not as strong morph aneal_steps frames blur start_frame end_frame [start_hint] [end_hint] creates [frames] images which morph from the starting frame to the ending frame. aneal_steps should be low for a blurry morph [10 or less] and high for crisp morph [100+] start_hint and end_hint are images which suggest ways the pixels should move while morphing. blur is a threshold used to decide weither or not to blur a pixel. if the color space distance squared between two pixel is greater than this value they averaged to become closer to each other. Some values to try : 1000, 2000, 5000, 8000. Low values (< 100) are not advised :) undo undoes the last thing you did undos x sets the number of undos avaiable to x (default is 4) when editing large images, set undos to 0 or 1 because an entire copy the image is saved for every undo level. renumber starting_number "format string" range renumbers a list of images, example renumber 10 "image #%d, JC" 3-10,12 format string is in the format of C printf functions, and should contain a %d. crop clips an image to minimum size removing only color 0 crop_center if the current image type is character, then this command takes and image searches for a lone pixel (non 0) above the image and skips it continuing to crop, but after the operation is over, the center of gravity is set to where the x position of that lone pixel was relative to the new start off the image. If the image type is not character then all of the above occurs except no center of gravity exsist to be set. upper_name converts all of the letters in the image name to upper case lower_name converts all of the letter in the image name to lower case prefix_name adds the following string to the front of the current name suffix_name adds the following string to the end of the current name calc_filter Calculates a 5 bit color filter which will be saved when the file is saved. remap color1 color2 color3 ... Remaps all the listed colors to the currently selected color setkey keyname [command] assigns a command to a key, valid keys are printables and F1 through F10 useful to have your favorite commands assigned to keys, this list of setkeys can be read from $HOME/satan.rc or ./satan.rc at startup. delete range deletes a range of images, range of 5-10,12 deletes images 5 through 10 and 12 rm_dups scans all the images and removes duplicates based on image content. If two images have exactly the same picture, the second is deleted. Image type and properties are not taken into account when comparing. clear_unsed sets all the unsed colors to black (0). Scans all of your images for colors that haven't been used yet and sets them to 0,0,0. refresh off/on if refresh is turned off then image opration will not be refreshed on the screen, usefull for speeding up scripts which do not need to be seen on the screen. grow xamount yamount enlarges the image by abs(xamount) abs(yamount) pixels. If xamount,yamount <0 then the image is enlarged on the left,top else on the right bottom. Grow addes blanks space onto the new region. See scale if you want to enlarge the image. color_add amount adds amount to the currently selected color, can be negative. key short cuts, '[' = color_add -1, ']' = color_add 1 add_bs amount adds amount to the size of the color cells in the palette. I.e. makes the palette window bigger or smaller by amount mouse_shape image centerx centery sets the shape of the mouse cursor. image is the number of the image to use. (also valid are this, last_on, and "name"). centerx and centery are used as offsets into the image to specify where the actual cursor points. In your satan.rc file you can add the following lines to to set the mouse cursor up every time you start. ------------ merge /u/me/mymouse.spe mouse_shape "my_mouse_image_name" 0 0 delete "my_mouse_image_name" copy_prop image property_name copies a property from another item. valid property names are : type attack (only for character type) body (only for character type) damage (only for character type) frame (only for foretile type) xcfg (only for character type) name example : copy_prop "frog_image" xcfg with 0-20 copy_prop 21 frame (copies the frame from foretile 21 to images 0 thru 20) ------------------------------------------------------------------------- Keys ------------------------------------------------------------------------- keys : Just press it stuff. 1 toggles palette window on/off / do a command, follow with command and enter n go to the next image z (z)oom in X1 Z (Z)oom out X1 m make image (m)inimum size (zoom 1) M make image (M)aximum size to fit screen e toggles the edit window s saves the file you are working on. do this periotically! The program is not bug free :) If no filename has been specifed with saveas, save uses the first file on the command line. D delete the current image, command is caps so you don't accidentally do this. There is no undo! c copy the current image. C draws a circle. f flood fill with the current color at the spot where the mouse is. p paste the select buffer (transpaerent mode) P paste the select buffer (non-transpaerent mode) + make the brush bigger if cursor is on palette window, it grows - make the brush smaller if cursor is on palette window, it shrinks space see the select command w see the where command t see the tile command i see the index command l draws a line. b blurs the last selected area by amount 1 (see select) B blurs only the currently selected color by amount 1 A antialieases the last selected area r see remap command u undo [ color_add -1 ] color_add 1 arrow keys scroll around while editing... ------------------------------------------------------------------------- File format ------------------------------------------------------------------------- all shorts, and longs are stored in Intel endianess Signature = "SPEC1.0",0 8 bytes short number of directory entries [entries] byte entry type byte entry name length X entry name (with null terminator) byte flags SPEC_FLAG_LINK=1 if (flags&LINK) byte link filename length X link filename else long data size long offset (linked filenames are not implemented yet) Types : #define SPEC_INVALID_TYPE 0 #define SPEC_COLOR_TABLE 1 (x=short followed by x*x*x bytes) #define SPEC_PALETTE 2 (x=short followed by x*3 bytes {r,g,b} ) #define SPEC_IMAGE 4 (x,y=shorts followed by x*y bytes) #define SPEC_PARTICLE 22 (t=long followed by t*(short x, short y, char color) bytes) (below are not documented yet .... ) #define SPEC_FORETILE 5 #define SPEC_BACKTILE 6 #define SPEC_CHARACTER 7 #define SPEC_MORPH_POINTS_8 8 #define SPEC_MORPH_POINTS_16 9 #define SPEC_GRUE_OBJS 10 #define SPEC_EXTERN_SFX 11 #define SPEC_DMX_MUS 12 #define SPEC_PATCHED_MORPH 13 #define SPEC_NORMAL_FILE 14 #define SPEC_COMPRESS1_FILE 15 #define SPEC_VECTOR_IMAGE 16 #define SPEC_LIGHT_LIST 17 #define SPEC_GRUE_FGMAP 18 #define SPEC_GRUE_BGMAP 19 #define SPEC_DATA_ARRAY 20 #define SPEC_CHARACTER2 21 #define SPEC_EXTERNAL_LCACHE 23 Notes from Duong on import/exporting artwork into Abuse The purpose of this tutorial is to explain the prcocess in which the user can intergrate new artwork into Abuse, the game. This tutorial will cover the aspects of tile creation, not character creation. To add characters into the game it is nessecary to know LISP, whose scope is beyond this tutorial. For tile creation it is nessecary to have a bitmap editor, such as Spaint or any of the other popular paint programs. It is suggestable that they support 256 colors, palette control, pixel accuracy, and exportable to the PCX format, all of which Spaint will meet. The game as it is currently set up will (see Abuse.doc for a comeplete description of the game) accept tiles in a fixed dimension of 30x15 for the foreground, and 60x30 for the background. It is possible to change the tile dimensions of the game, however this will make all the tiles previously created obselete, and unsable in their current state, without some modifications. That will not be disscused in this tutorial, but instead cover in the abuse programming tutorial (not Abuse.doc). To start off making tiles it is best, to look at some existing examples. Under the Abuse directory, in the art\fore directory there will be a series of spes. (spe is the file extension for Spaint files. They can only be read by Spaint) To look at any of the spes, type in the folling command: spaint .spe replace the with the name of the file excluding the .spe extension. Spaint will now start up. It is advisable to review the Spaint commands before going further. I warned ya, turn back all yee enter. Ok, I see your determined. This will open up a foreground tile set. Note at the upper left hand corner the dimensions of the tile is stated, in this case 30x15. Press to see the index, a listing of all tiles in this set. Use the arrorw keys to scroll around the index. While in index mode press the key to see the bounding boxes of the tiles, drawn in bright red. The bounding boxes blocks the player, thus can be used to construct walls, floors, and ceilings. To edit the property of a tile click on it with the mouse to filp to it. You can use the <.> key to scroll forward in the tile listings if you are in the regular mode, andthe <,> key to scroll backwards. To access the property menu is the key. This will bring up a property menu, and in this menu is the frame button. It is used to edit the bounding boxes of the tiles. (note you may want to zoom up the tile with the key , and to zoom down key, this does not work after you have pressed the frame button, do this before) Click on the frame button, and it will bring up another menu, with the end and finish button. By clicking inside the tile you will lay down points for the bounding box. The bounding boxes can be any arbitary polygon. To end the polygon, click on the first point you places in the image, or click on the finsh button. Note do not close the property window, before you finish laying down the bounding box, or it will not be saved. The last link can be connected to the first automaticly by clicking on the finish button. You have just created a bounding box. Note that only the techno.spe and alien.spe tiles have any bounding boxes. Be conserative in laying down points for your bounding boxes, since for more points, the more taxing it will be to the engine. If you want to create a new set of bounding tiles pay particular attention to the junctions of the tiles and their bound boxes, if they are not flush and continous, the player can either fall through then or can get stuck in them. Use the existing tiles as a guide. To create new tiles, you can either create them in spaint or another paint program and import them in. What follows is a description of how to create them in Spaint. First you need to create a new spe, to do this use the folling command: spaint spaint will start with no file loaded, and using a default palette. Now create a new tile any multiple of of 30x15. Use either the command line or menu selection (see above for all commands used in the command line), to do this. create a new tile set or block of tiles, if you created an image greater than 30x15. A tip, in using spaint use the right mouse button to pick the color which the mouse cursor is currently over in the image, and the left to draw with. Also the <[> and <]> key will allow you to scroll up and down the palette, respectivly. Once you have created your tile or set of tile, which incidently is an image type once created , as stated above in the upper left hand corner of the screen, it needs to be converted to a foretile type. If you have an image bigger than 30x15, must a multiple of 30x15 for this to work, you need to chop it into smaller bite size. To do this either user the command line or the menu selection chop command, use the 30x15 size factor. If you chopped it, you may want to get rid of redundant peices, either by going through the list and use the delete key , command line, or the menu selection remove duplicates. Now that you have a series of 30x15 images, to transform them into foreground tiles, use the command line : with all type foretile This will transform all the images into foretiles. Now you will proably need to rename them. The game will only accept tiles with a numbered naming convention. Currently in the game, the tiles are broken into 100 blocks, you can renumber the tiles using the renumber command. To do this type in the following command line : renumber "%d" all the being the first number to begin the series with. Now you can add bounding boxes to the tiles. Once you have compeleted this, you can save you project with the following command: saveas .spe The .spe is a naming convention, and is strongly advisable to use. The method for importing graphic files into spaint as follows. They first must be in PCX format. Launch spaint again with the following changes: spaint .pcx This will load up the image, and more importantly use that images palatte as the default. Note that spaint will not load up 24bit pcxs. Note that in foretiles the 0 color (black) is not drawn in the game, and so the background will show through. Once the image is in the game, you can crop the image to the approtiate size either using the scale command or if the image is already in the proper dimensions, but is surround by the 0 color then use the crop command. Now follow the same procedure as stated above to chop and transform the tiles. Now that is done, you need to modify the game to add in your tiles. Look in the lisp directory, in the current Abuse directory. Edit the startup.lsp with any text editor. Find the peice of code resembling this : (load_tiles "art/fore/foregrnd.spe" "art/fore/techno.spe" "art/fore/techno2.spe" "art/fore/techno3.spe" "art/fore/techno4.spe" "art/fore/cave.spe" "art/fore/trees.spe" "art/fore/trees2.spe" "art/fore/alien.spe" "art/back/intro.spe" "art/back/city.spe" "art/back/tech.spe" "art/back/cave.spe" "art/back/backgrnd.spe" "art/back/alienb.spe" "art/back/green2.spe" "art/back/galien.spe" ) Insert underneath the "art/fore/alien.spe" the line : /.spe The proper directory structure and name must be used for this to work. It is advisable to number your tiles so they don't conflict with eixsting tiles, or if you want you can replace them. Save the modifcations and run the game, and take a look at your new tiles in the game. If you are going to send new levels with new artwork for Abuse to Crack dot Com, they prefer you create a new lisp file to load up any new tiles, characters, etc. and have that loaded from abuse.lsp. i.e. put (load "myart.lsp") in abuse.lsp ------myart.lsp---------- (load_tiles "mytiles.spe") ;; this can be called more than once If you want to save all the artwork in a spaint file to be imported into deluxe paint, you should use these two commands : renumber 1 "base%04.pcx" all with all write_pcx this will save a series of PCX files base0001.pcx base0002.pcx ....