Short: Converts a brush/animbrush to .CNK file Author: chris@addnet.demon.co.uk (Chris Deeney) Uploader: chris addnet demon co uk (Chris Deeney) Type: dev/basic Version: V1.0 Requires: dev/basic/Mildred.lha Architecture: m68k-amigaos CNKI File Format By Chris Deeney 1999 Introduction: ------------ CNKI is a file format designed to make chunky shapes compact and easy to load in your programs. This archive contains: CNKI.readme 3651 bytes BrushConvertor 62232 bytes CNKI.bb2 3067 bytes CNKI.bb2.xtra 1222 bytes CNKI.ascii 3679 bytes The "BrushConvertor" is a utility that will convert IFF brush/animbrush files into .CNK (CNKI) files. The "CNKI.bb2" is an include file which contains the CNKI routines. DISCLAIMER: ---------- THIS SOFTWARE IS FREE WARE AND CAN BE DISTRIBUTED FREELY AS LONG AS THE CONTENTS OF THIS ARCHIVE REMAIN UNALTERED, UNLESS YOU HAVE THE EXPRESSED PERMISSION OF THE AUTHOR. THIS SOFTWARE IS TO BE USED AT YOUR OWN RISK. THE AUTHOR TAKES NO RESPONSIBILITY FOR DIRECT/INDIRECT DAMAGE OR LOSS OF DATA RESULTING FROM THE USE/MISUSE OF THIS SOFTWARE. Requirements: ------------ To use this software you will require: Blitz Basic 2, including libraries, Mildred V1.48 or better, by Paul West, An AGA! Amiga! or Amiga with GFX card :), A Hard Drive would be nice ;), A 68030 cpu or better is recommended, but not essential ;) Usage: ----- The routines in this archive are to be used with "Mildred"... *BrushConvertor: The BrushConvertor can convert an IFF brush/animbrush file into a .CNK (CNKI) file with some very nice compression ratios eg. IFF AnimBrush= 4210 bytes compressed to 818 bytes in .CNK file. Please NOTE that the compression ratios vary. To convert an IFF brush/animbrush simply execute the BrushConvertor, a file requestor will pop-up - select a brush/animbrush. A second file requestor will pop-up asking for a destination and file name, after selecting a file name, BrushConvertor will continue to convert the choosen file, showing it's progress with a nice progress indicator :) After it has finnished it will exit. You can set BrushConvertor to use compression or not by altering the tooltype "COMPRESSION" which can be set to YES or NO. You can also make BrushConvertor save the palette (CMAP) of the brush/ animbrush by setting the "SAVEPALETTE" tooltype to YES. *CNKI.bb2 Contains 2 functions. Put this file in your program's directory and add this line at the top of your program 'Include "CNKI.bb2"' : success = LoadCNK{ shapenumber.w , filepath$ } Loads a .CNK file into Mshapes shapenumber.w Where shapenumber.w is the number of the Mshape you want to load into. filepath$ is the full path of the .CNK file. success returns -1 if it succeeds or one of the following error codes: #0 = File doesn't exist / Can't read file! #1 = Not a CNKI file format! #2 = File is corrupt! #3 = Can't allocate enough fast ram! #4 = Illegal parameters! frames.w = CnkFrames{ filepath$ } Returns the number of frames in a .CNK file. Where filepath$ is the complete path of the .CNK file. frames.w returns the number of frames in the .CNK file or returns -1 for failure. Please NOTE that these routines use file 0 for loading so don't have a file 0 open when calling these routines :) Contacting the Author: --------------------- To contact me for any reason, you can email me at: chris@addnet.demon.co.uk Or catch me on IRC Dalnet "PrinceD" #AmIRC #Ungabunga #Amazing or /whois me :) Greetz!: ------- Greetz goes to (in no perticular order): Sparkster, [^CRASH^], TroySwoosh, FoxyLady, leki, Drad, Sp^, NinjA, Epsilon, and loads of other IRC buddies :) Guys on the blitz list: Paul West, Anton Reinauer, Gareth Griffiths, Dave Newton, Paul Burkey, Curt Esser, Mikkel Lokke, And all the other cool guyz on the list :) Join the list, it's grrreat fun, honest :)