Register FAQ Search Today's Posts Mark Forums Read
Go Back   JazzJackrabbit Community Forums » Open Forums » General Jazz Jackrabbit Talk

Need code for zipping level packs

blurredd blurredd's Avatar

JCF Member

Joined: Nov 2001

Posts: 1,896

blurredd is an asset to this forumblurredd is an asset to this forum

Jul 14, 2009, 09:12 AM
blurredd is offline
Reply With Quote
Need code for zipping level packs

Basically what I'm looking for is someone to create code in C++ that takes a std::list of level filenames and creates a zip containing the levels and optionally their tilesets and music. It may also be helpful if the code could handle getting all the levels in a pack based on the next level setting starting with a single level. I plan on adding the code to plus.exe, though if you want to make your own program as well, I would be fine with that. I would do it all myself, but right now I can't find the inspiration.
__________________
D3
Extra. No CTO v0.75
Animating Tiles Properties.
ATB Contest. Scripting Language.
Gameplay Theories.
1UP. Pitfall. Desolation.
SC2.

Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Jul 26, 2009, 10:05 PM
Cataphract is offline
Reply With Quote
I could do that, I already implemented something very similar ( retrieving transitive dependencies of a level, including music, tileset, next, secret and bonus levels). The only problem is I know absolutely nothing of C++ and I refuse to learn it
I'm very comfortable with C, though, so if you're still interested, say so.
Btw, saying "I'd do it, but it's too boring, so I'll leave it to the minions" is not a great way to motivate people
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>
Grytolle Grytolle's Avatar

JCF Member

Joined: Sep 2004

Posts: 4,126

Grytolle is a forum legendGrytolle is a forum legendGrytolle is a forum legend

Jul 27, 2009, 03:01 AM
Grytolle is offline
Reply With Quote
major minion
__________________
<center></center>
Dermo Dermo's Avatar

JCF Member

Joined: Jun 2005

Posts: 1,743

Dermo should make better posts

Jul 27, 2009, 03:47 AM
Dermo is offline
Reply With Quote
Cataphract, where the hell have you been???
__________________
Yes, I am, in fact, ALWAYS the one to blame for everything. And none of your are full of yourself. Good job.

Do you like Stijn? Take my poll!




Windows is not a virus. A virus is small and efficient...

Note to Stijn: how am i even getting away with this
Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Jul 27, 2009, 07:29 AM
Cataphract is offline
Reply With Quote
Well, you know, unsuccessfuly summoning strength to finish my degree. I've also worked 6 months as a Java developer, but I quit to focus on my thesis.
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>
blurredd blurredd's Avatar

JCF Member

Joined: Nov 2001

Posts: 1,896

blurredd is an asset to this forumblurredd is an asset to this forum

Jul 27, 2009, 03:55 PM
blurredd is offline
Reply With Quote
I guess C is good enough. It doesn't really look like anyone else is willing to make the code anyway.
__________________
D3
Extra. No CTO v0.75
Animating Tiles Properties.
ATB Contest. Scripting Language.
Gameplay Theories.
1UP. Pitfall. Desolation.
SC2.

Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Jul 29, 2009, 10:08 AM
Cataphract is offline
Reply With Quote
All right, I already handled the zip creation part. I can probably complete it before the end of the week.
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>
Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Aug 1, 2009, 11:37 PM
Cataphract is offline
Reply With Quote
I've finished it and will upload it together with the sources (so that you can integrate it to plus.exe) later today.
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>
Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Aug 2, 2009, 12:36 AM
Cataphract is offline
Reply With Quote
Done, see http://www.jazz2online.com/J2Ov2/dow...p?levelID=5606
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>
blurredd blurredd's Avatar

JCF Member

Joined: Nov 2001

Posts: 1,896

blurredd is an asset to this forumblurredd is an asset to this forum

Aug 2, 2009, 11:09 AM
blurredd is offline
Reply With Quote
Awesome! Thanks for the good work. Though I'm not able to run PackPacker.exe just yet.
__________________
D3
Extra. No CTO v0.75
Animating Tiles Properties.
ATB Contest. Scripting Language.
Gameplay Theories.
1UP. Pitfall. Desolation.
SC2.

Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Aug 2, 2009, 01:40 PM
Cataphract is offline
Reply With Quote
But are you having any problem or you simply haven't tried yet?
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>
blurredd blurredd's Avatar

JCF Member

Joined: Nov 2001

Posts: 1,896

blurredd is an asset to this forumblurredd is an asset to this forum

Aug 2, 2009, 03:35 PM
blurredd is offline
Reply With Quote
I'm having a problem. "This application has failed to start because the application configuration is incorrect." I would assume it's because your program requires me to have runtime components from a version of Visual C++ I currently don't have.
__________________
D3
Extra. No CTO v0.75
Animating Tiles Properties.
ATB Contest. Scripting Language.
Gameplay Theories.
1UP. Pitfall. Desolation.
SC2.

Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Aug 2, 2009, 05:21 PM
Cataphract is offline
Reply With Quote
I've rebuilt it and tested it in Windows XP and Windows 2000. There should be no problems now.

The problem was - precisely to avoid statically linking against the C runtime and having to distribute the visual studio runtime - I had linked the program against msvcrt.dll, which is present in all versions of windows. However, the vista version of the file has more functions exported than the ones from XP and 2000. You can add a small object file that contains the missing functions as a dependency (there's a version of such object that only supplies the functions missing in XP, in w2k and w2k3), which I did, but I also had to change the crt headers folder, which I forgot to do. Oddly, in the end _wfopen_s was still missing, so I replaced it with _wfopen.
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>

Last edited by Cataphract; Aug 2, 2009 at 05:22 PM. Reason: typo
Puffie40 Puffie40's Avatar

JCF Member

Joined: May 2002

Posts: 894

Puffie40 is doing well so far

Aug 9, 2009, 07:19 PM
Puffie40 is offline
Reply With Quote
I tinkered with it a little bit just now, and I notice it does not include the level you list. It may be I cannot understand the command line, as the little summery is hard to make sense of.

when I use it I type the following:

Packpacker /z ex01 ex02

this gets it going (It throws a hissy fit if I put just ex01), but it ignores ex01 and packs ex02 along with everything else in the series.

In hindsight, It may work right If I input ex01 twice.

Other than that, it works beautifully, and I like the convenience it provides.
Cataphract

JCF Member

Joined: Sep 2002

Posts: 24

Cataphract is doing well so far

Aug 10, 2009, 07:32 PM
Cataphract is offline
Reply With Quote
You're calling it incorrectly. /z specifies the name of the zip file. So it would try to create a zip file named ex01 and start searching at ex02. You probably want "PackPacker /Z pack.zip ex01"

That is, if I remember correctly.
__________________
Gustavo Lopes

<small>I'm an <a href="https://fenix.ist.utl.pt/homepage/ist155741">undergraduate student</a> of Biomedical Engineering</small>
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT -8. The time now is 01:46 AM.