JazzJackrabbit Community Forums

JazzJackrabbit Community Forums (http://www.jazz2online.com/jcf/index.php)
-   General Jazz Jackrabbit Talk (http://www.jazz2online.com/jcf/forumdisplay.php?f=4)
-   -   question about j2e (http://www.jazz2online.com/jcf/showthread.php?t=16675)

zapS Apr 11, 2007 03:07 AM

question about j2e
 
just wondering if anybody knows how the image is stored(what kind of format) in the j2e files.

Stijn Apr 11, 2007 03:10 AM

IIRC, it's a PCX file, probably compressed with zlib.

zapS Apr 11, 2007 03:13 AM

so pcx is alot smaller than bmp?

Stijn Apr 11, 2007 03:28 AM

PCX is compressed (and in JJ2's case 8bit) while BMP is not. There's probably some info here.

However, the tool used to make J2E's requires you to give it a PCX file, so I guess that's the format used :P

Neobeo Apr 11, 2007 03:58 AM

A J2E contains, among other things, 3 BMPs (not PCX), compressed with zlib. More specifically, the images are stored one byte per pixel (once you get past zlib).

Grytolle Apr 11, 2007 05:14 AM

:( Then it would be false of me to say "it's raw - like me"

DoubleGJ Apr 11, 2007 07:42 AM

One image is the episode pic, second is the title. What's the third picture, then?

Stijn Apr 11, 2007 08:09 AM

A low-res of the title image, I believe, for the zooming in-and-out effect.

Violet CLM Apr 11, 2007 10:33 AM

The title switches to a highlighted version when you select it.

ShadeJackrabbit Apr 11, 2007 11:53 AM

That's just done with shaders I believe.

Also, I used to have the program that made .j2e files, but lost it 3 hard disk deaths ago.

Stijn Apr 11, 2007 11:59 AM

Quote:

Originally Posted by ShadeJackrabbit (Post 401064)
That's just done with shaders I believe.

No, it's done by using the other image.

ShadeJackrabbit Apr 11, 2007 12:03 PM

*thinks back for a few moments*
Sorry, my bad, it is.

Neobeo Apr 11, 2007 05:05 PM

Also, the size of the image alone leads me to conclude that JJ2 was meant to be played in a resolution of 640x400.

zapS May 19, 2007 03:49 AM

does all the 3 bmp images start with "BM"when uncompressed?
and where do i find the uncompressed size in the header? i can only find the compressedsize (4 bytes before 78 da).

Neobeo May 19, 2007 04:57 AM

The uncompressed size is not given, because it is a static value. I don't have the exact figure at hand though. Basically width * height.

Newspaz May 19, 2007 05:48 AM

Quote:

Originally Posted by Neobeo (Post 401089)
Also, the size of the image alone leads me to conclude that JJ2 was meant to be played in a resolution of 640x400.

Well, it makes sense. The game was originally meant for 320x200 like JJ1 was. And 640x400 is exactly the double obviously.

zapS May 19, 2007 07:13 AM

ok, now i can uncompress everything so no more questions about that, but i don't know what the 8 bytes after the width and height are, can anyone tell me?
[IMG]http://www.freewebs.com/dvugglan/j2e.bmp[/IMG]
and one more thing, when i compress images, they become just 41 bytes and i think that is too small and jj2 doesnt like it. why?

zapS May 20, 2007 11:14 PM

I think the compressed size in the j2e files are at least around 10000 bytes and 41 is quite small compared to that.

Neobeo May 21, 2007 12:23 AM

Quote:

Originally Posted by zapS (Post 405011)
ok, now i can uncompress everything so no more questions about that, but i don't know what the 8 bytes after the width and height are, can anyone tell me?
[IMG]http://www.freewebs.com/dvugglan/j2e.bmp[/IMG]
and one more thing, when i compress images, they become just 41 bytes and i think that is too small and jj2 doesnt like it. why?

I have no idea what the 8 bytes after are. They're marked as "unknown" in my file format specs. And 41 bytes definitely doesn't sound right.

Quote:

Originally Posted by zapS (Post 405148)
I think the compressed size in the j2e files are at least around 10000 bytes and 41 is quite small compared to that.

At a guess, you probably used the compress/compress2 function wrongly.

zapS May 21, 2007 12:43 AM

well how should i use it?
it returns Z_OK or something like that.
i tried to increase all the unknown bytes by 1 and it worked just as usual, but when a set the all to ff, there was a memory error, it said something about memAlloc().

zapS May 24, 2007 02:53 AM

I have found the problem and now i can compress and make my own j2e files!
:-) thanks neobeo for your help.

Neobeo May 24, 2007 03:03 AM

You're welcome. :) Just out of curiosity, what was the problem?

zapS May 24, 2007 03:19 AM

i did wrong when i read the file into a char pointer.
in the fread funtion the first parameter must be an adress you know,
and usually i want to read data and put them in int variables or similar types and then i have to write fread(&var,... and i forgot that in this case it was a pointer and i wrote "&" before. the result were just alot of -51:-), quite a stupid thing to do:-) but that's the kind of small mistakes i often run into;)

zapS May 24, 2007 03:22 AM

now i try to read the .LEV files in 1.00g:-)
i have found out how the tileset data is stored.

Neobeo May 24, 2007 03:27 AM

This probably warrants a thread of its own, but the LEV file format is full of hate. </3 Among other things, each tile is stored differently depending on whether it has any transparent pixels, and where the transparent pixels are.

zapS May 24, 2007 03:34 AM

i know, and it's really annoying. but i think i've found out how it works.
the reason for doing this is because i want to get the cool jungle tileset.

ShadeJackrabbit May 24, 2007 09:34 AM

Any chance of releasing a program publicly that allows this j2e editing?
(*dodges really sharp knife*)

n00b May 25, 2007 05:26 AM

Didn't you already get one?

ShadeJackrabbit May 26, 2007 08:41 AM

About 4 hard disk crashes ago...

zapS May 27, 2007 11:36 PM

that's possible :-)

ShadeJackrabbit May 28, 2007 01:58 PM

Yay! :)

zapS Jun 22, 2007 02:05 PM

ok, now I've made a simple console app, which creates a j2e file. you just have to enter som filenames etc. it works fine. does anyone think that could be something? :)

cooba Jun 23, 2007 02:03 AM

Well if it's made completely by you, it could be freely distributed, by being uploaded to J2O for example :)

ShadeJackrabbit Jun 23, 2007 06:06 AM

Excellent idea!

Olsen Jun 28, 2007 08:45 AM

it's uploaded now //zapS

Grytolle Jun 29, 2007 06:29 AM

zapS, please add me to msn (or unblock me) :p grytolle@craccoclan.com

And more importantly; nice job :D

Doubble Dutch Jun 29, 2007 07:48 AM

So is there something to *extract* said images from the j2e file?

Grytolle Jun 29, 2007 08:00 AM

jj2 and print screen

Doubble Dutch Jun 29, 2007 08:35 PM

Doesn't that just give you the whole screen and not the image?

Violet CLM Jun 30, 2007 12:46 AM

Umm... yes. To be solved by cropping, I suppose.


All times are GMT -8. The time now is 03:39 PM.

Powered by vBulletin® Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
JCF © 2001-Infinity Jazz2Online