Computer Science Canada

[source] PackFile

Author:  Catalyst [ Sat Jan 31, 2004 1:28 pm ]
Post subject:  [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

code:

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

code:

CreatePackFile (test.pack)


To Extract a file from a pack file:
GetFile (whichPack,whichFileInPack,whereToOutputIt)
code:

GetFile (test.pack,this.jpg,newthis.jpg)

Author:  AsianSensation [ Sat Jan 31, 2004 2:43 pm ]
Post subject: 

Now we can squeeze image files all into 1 big file Very Happy 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.

Author:  Paul [ Sat Jan 31, 2004 6:06 pm ]
Post subject: 

any chance of adding a readme or something? I dunno how to use it.

Author:  shorthair [ Sat Jan 31, 2004 6:08 pm ]
Post subject: 

Thanks Catalyst , you can have credit in my next game for this , its really helpfull , good luck with future apps and games Very Happy

Author:  Kuntzy [ Sat Jan 31, 2004 6:20 pm ]
Post subject: 

This is great, good work catalyst!

Author:  recneps [ Sat Jan 31, 2004 9:29 pm ]
Post subject: 

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 Smile

you gotta put '
CreatePackFile (name here)
GetFile ?? maybe
GetFileSize ?? maybe

lol, but nice work, Very Happy

Author:  shorthair [ Sat Jan 31, 2004 10:02 pm ]
Post subject: 

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

Author:  Catalyst [ Sat Jan 31, 2004 10:21 pm ]
Post subject: 

See first post i edited it

Author:  shorthair [ Sat Jan 31, 2004 11:41 pm ]
Post subject: 

Whats up with mario in your avatar catalyst , did you do that ? its pretty cool

Author:  Paul [ Sat Jan 31, 2004 11:44 pm ]
Post subject: 

Ah.. that clears it up, I'll use it next time...

Author:  Catalyst [ Sat Jan 31, 2004 11:53 pm ]
Post subject: 

its mario as a radish (i didnt know what a turnip looked like Laughing )
my first all photoshop drawing Very Happy

Author:  shorthair [ Sat Jan 31, 2004 11:55 pm ]
Post subject: 

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

Author:  Catalyst [ Sat Jan 31, 2004 11:56 pm ]
Post subject: 

Thanks Very Happy


: