----------------------------------- Catalyst Sat Jan 31, 2004 1:28 pm [source] PackFile ----------------------------------- A simplification from some of my C++ Code A collection of functions to make a packfile (i.e. a file containing a bunch of other files) There is no compression, but it could be useful for distributing a large number of files Because of turing's slowness dont try to use this with files>1mb note: I would release the cpp version but it uses a bunch of other classes and files that i wrote How to Use:: Call AddToPackFile(filename) for all the files you want in the packfile AddToPackFile(this.jpg) AddToPackFile(that.jpg) AddToPackFile(now.jpg) After youve done that Call CreatePackFile (outputTo) with the parameter being the filename of the packfile its gonna make CreatePackFile (test.pack) To Extract a file from a pack file: GetFile (whichPack,whichFileInPack,whereToOutputIt) GetFile (test.pack,this.jpg,newthis.jpg) ----------------------------------- AsianSensation Sat Jan 31, 2004 2:43 pm ----------------------------------- Now we can squeeze image files all into 1 big file :D I always hated how when you run a game with turing that requires so many images, and the images are all clustered in a folder. ----------------------------------- Paul Sat Jan 31, 2004 6:06 pm ----------------------------------- any chance of adding a readme or something? I dunno how to use it. ----------------------------------- shorthair Sat Jan 31, 2004 6:08 pm ----------------------------------- Thanks Catalyst , you can have credit in my next game for this , its really helpfull , good luck with future apps and games :D ----------------------------------- Kuntzy Sat Jan 31, 2004 6:20 pm ----------------------------------- This is great, good work catalyst! ----------------------------------- recneps Sat Jan 31, 2004 9:29 pm ----------------------------------- No idea how to use it, but i get the gist of how it works. You have to add some lines at the bottom, i just dont know what to put after em :) you gotta put ' CreatePackFile (name here) GetFile ?? maybe GetFileSize ?? maybe lol, but nice work, :D ----------------------------------- shorthair Sat Jan 31, 2004 10:02 pm ----------------------------------- Catalyst i knew how to use it , but i sugest a help file for the others , i would write one but i dont want t o do anything wrong or write it wrong , its your code and you understand it ( you wtrite some crazy code by the way , really unique ) so il let you have this one ----------------------------------- Catalyst Sat Jan 31, 2004 10:21 pm ----------------------------------- See first post i edited it ----------------------------------- shorthair Sat Jan 31, 2004 11:41 pm ----------------------------------- Whats up with mario in your avatar catalyst , did you do that ? its pretty cool ----------------------------------- Paul Sat Jan 31, 2004 11:44 pm ----------------------------------- Ah.. that clears it up, I'll use it next time... ----------------------------------- Catalyst Sat Jan 31, 2004 11:53 pm ----------------------------------- its mario as a radish (i didnt know what a turnip looked like :lol: ) my first all photoshop drawing :D ----------------------------------- shorthair Sat Jan 31, 2004 11:55 pm ----------------------------------- Wow its awsome , you did a really good job i love it , you can draw in almost anyting , your getting really good , sinse your first programs in turing , you have come along way from what is a vailable to me at compsci ----------------------------------- Catalyst Sat Jan 31, 2004 11:56 pm ----------------------------------- Thanks :D