Subsections
General Description
FBJ files are addon files to the FSH and the FS2 format which, basicly, store the attributes of
each shape (walkable, sittable, getable) along with the furre position on that particular shape.
Unlike the FS2 files, FBJ format doesn't support encryption (although it is perfectly capable of
doing so) - FBJ files are never encoded.
Header Format - 8 bytes
The header of an FBJ file is apparently built from 4 identification bytes and two 16-bit numbers:
Offset |
Size (B) |
Type |
Description |
0x00 | 4 | char[4] | File format/version: FO01 |
0x04 | 2 | ushort | Image quantity (Note: 2A 01 == 012A) |
0x06 | 2 | ? | Unknown (reserved?) |
|
|
Image (Shape) Preferences Format - 1-3 bytes
Past the header we've got all our shapes that belong to a specific FSH/FS2 file starting from
shape 0 and going onwards. The amount of bytes we've got for each shape varies from 1 byte to 3.
Basicly, with every coordinate (X/Y) that's non-zero we've got an additional byte. The arrangement
(when all 3 bytes are used) looks like this:
Offset |
Size (B) |
Type |
Description |
+0x00 | 1 | ubyte | Attributes and further bytes |
+0x01 | 1 | sbyte | X or Y (only with 1 byte) coordinate |
+0x02 | 1 | sbyte | Y coordinate |
|
|
As you can see from the sample image, you'd find it a lot easier if you would handle the first
FBJ shape byte bit-wise - instead of looking at it as a number, look at what bits it has set/unset
to determine what's going on.
|