Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [source] PackFile
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Catalyst




PostPosted: 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)



packfile.t
 Description:

Download
 Filename:  packfile.t
 Filesize:  2.65 KB
 Downloaded:  314 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Sat Jan 31, 2004 2:43 pm   Post subject: (No 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.
Paul




PostPosted: Sat Jan 31, 2004 6:06 pm   Post subject: (No subject)

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




PostPosted: Sat Jan 31, 2004 6:08 pm   Post subject: (No 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
Kuntzy




PostPosted: Sat Jan 31, 2004 6:20 pm   Post subject: (No subject)

This is great, good work catalyst!
recneps




PostPosted: Sat Jan 31, 2004 9:29 pm   Post subject: (No 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
shorthair




PostPosted: Sat Jan 31, 2004 10:02 pm   Post subject: (No 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
Catalyst




PostPosted: Sat Jan 31, 2004 10:21 pm   Post subject: (No subject)

See first post i edited it
Sponsor
Sponsor
Sponsor
sponsor
shorthair




PostPosted: Sat Jan 31, 2004 11:41 pm   Post subject: (No subject)

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




PostPosted: Sat Jan 31, 2004 11:44 pm   Post subject: (No subject)

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




PostPosted: Sat Jan 31, 2004 11:53 pm   Post subject: (No subject)

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




PostPosted: Sat Jan 31, 2004 11:55 pm   Post subject: (No 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
Catalyst




PostPosted: Sat Jan 31, 2004 11:56 pm   Post subject: (No subject)

Thanks Very Happy
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 13 Posts ]
Jump to:   


Style:  
Search: