LBA2:Entity information: Difference between revisions
Jump to navigation
Jump to search
[checked revision] | [checked revision] |
Content deleted Content added
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
==Specification== |
==Specification== |
||
{{Cleanup|It should be reformatted to use wikitext instead of <pre> tags.}} |
{{Cleanup|It should be reformatted to use wikitext instead of <pre> tags.}} |
||
'''Warning: the specification below seems to be wrong in most part. Use at your own risk.''' |
|||
<pre> |
<pre> |
||
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
||
L I T T L E B I G A D V E N T U R E |
L I T T L E B I G A D V E N T U R E 2 |
||
LBA File3D format |
LBA File3D format |
||
Revision 1 |
Revision 1 |
||
Line 24: | Line 23: | ||
[#] [ INFORMATION ] ------------------------------------------------------------ |
[#] [ INFORMATION ] ------------------------------------------------------------ |
||
This document describes the format in which the |
This document describes the format in which the LBA2\Twinsen Odyssey File3D |
||
character informations) are stored in. |
|||
If you find any errors in this document please email me the details, also if you |
|||
find new stuff please notify me. This information is provided AS IS. |
|||
[#] [ NOTE ] ------------------------------------------------------------------- |
[#] [ NOTE ] ------------------------------------------------------------------- |
||
In LBA1 the format I'll explain are inside File3D.HQR with many files, each one |
|||
⚫ | |||
correspond the following format. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
Line 46: | Line 42: | ||
+ = to add previeous bytes count |
+ = to add previeous bytes count |
||
The file is laid out like an HQR file, but does not have the size/compression header |
|||
The first thing you need to get is the number of entries it will have. For both |
|||
at each offset given. Refer to the HQR document on how to read the intro. |
|||
games we extract the number the same way, and I'll assume you know it by now, so... |
|||
00: s32 First offset |
|||
00: s32 Number of Entries |
|||
Do this "number of entries" times |
Do this "number of entries" times |
||
[ Entries ] |
[ Entries ] |
||
First of all you need to read the |
First of all you need to read the entry content for each entry of course. |
||
I'll assume you know this. Also you need to create a variable or structures |
I'll assume you know this. Also you need to create a variable or structures |
||
to handle the anim and body content and count. |
to handle the anim and body content and count. |
||
Do the next block while the |
Do the next block while the read byte is not 0xFF (End of each entry content). |
||
02: Make here a offset backup. (Will be needed later) |
|||
[ Content ] |
[ Content ] |
||
Line 70: | Line 65: | ||
[ Body = 1 ] |
[ Body = 1 ] |
||
+00: byte Body index |
+00: byte Body index |
||
01: |
01: byte Body data size - 1 (only take the following values) |
||
|-> 0x04 (4) -> When no collision box is used |
|||
|--> 0x11 (17) -> When used a collision box |
|||
02: s16 Body real index (in BODY.HQR) |
|||
04: byte Collision box flag |
|||
|-> flag = 0x00 (0) -> Model doesn't use collision box |
|||
|--> flag = 0x01 (1) -> Model use collision box |
|||
[ IF Collision box flag is set ] |
|||
You can check if the body real index is correct by testing with 0x8000 |
|||
05: byte Number of bytes to read minus 2. |
|||
In this case the value is always 0x0E, so it will have more 0x0E-0x02 = 0x0C bytes |
|||
06: u16 X (bottom left) |
|||
08: u16 Y (bottom left) |
|||
0A: u16 Z (bottom left) |
|||
0C: u16 X (top right) |
|||
0E: u16 Y (top right) |
|||
10: u16 Z (top right) |
|||
[ /IF ] |
|||
03: |
|||
Here we have some more informations about the body that I'll describe in a |
|||
future revision because lake of time. Sorry, I think it isn't so important |
|||
for now. |
|||
Count here one more body for the total number of bodies in the entrie. |
|||
[ / Body ] |
[ / Body ] |
||
Line 86: | Line 90: | ||
[ Anim = 3 ] |
[ Anim = 3 ] |
||
+00: |
+00: byte Anim index |
||
01: byte Anim real index (in ANIM.HQR) |
|||
02: byte Data size - 3 |
|||
03 until Data Size: ?? |
|||
Count here one more anim for the total number of anims in the entrie. |
|||
[ / Anim ] |
[ / Anim ] |
||
Now you should add the offset backup to the current pointer you using |
|||
to get the content of. |
|||
Something like: |
|||
[LBA 1 & 2 for body] -> current pointer = backup content + backup offset; |
|||
[LBA 1 for anim] -> current pointer = backup content + backup offset; |
|||
- Note for LBA2 anim you should count plus 1: |
|||
[LBA 2 for anim] -> current pointer = (backup content + 1) + (backup offset + 1); |
|||
[ / Content ] |
[ / Content ] |
Revision as of 20:29, 24 July 2013
Entity information | |
---|---|
Extension |
F3D |
Occurence |
LBA2 |
Programs supporting this format | |
References | |
This is the LBA 2 equivalent to the LBA 1 File3d.hqr file. It contains entities of the game Actors.
Specification
This page may need some cleanup. It should be reformatted to use wikitext instead of <pre> tags. |
-------------------------------------------------------------------------------- L I T T L E B I G A D V E N T U R E 2 LBA File3D format Revision 1 Author: Alexandre Fontoura [alexfont] Email: [email protected] Last Modification: 13.11.2005 [#] [ INFORMATION ] ------------------------------------------------------------ This document describes the format in which the LBA2\Twinsen Odyssey File3D character informations) are stored in. [#] [ NOTE ] ------------------------------------------------------------------- In LBA2 this only exists in one unique file which as all this information inside. This file can be found inside Ress.HQR in the entry 44 (LBA2 Character Informations). [#] [ FORMAT ] ----------------------------------------------------------------- s32 = signed int (32bit) u16 = unsigned short (16bit) s16 = signed short (16bit) byte (8bit) + = to add previeous bytes count The file is laid out like an HQR file, but does not have the size/compression header at each offset given. Refer to the HQR document on how to read the intro. 00: s32 First offset Do this "number of entries" times [ Entries ] First of all you need to read the entry content for each entry of course. I'll assume you know this. Also you need to create a variable or structures to handle the anim and body content and count. Do the next block while the read byte is not 0xFF (End of each entry content). [ Content ] +00: byte Opcode Opcode = 1 -> Body content Opcode = 3 -> Anim content [ Body = 1 ] +00: byte Body index 01: byte Body data size - 1 (only take the following values) |-> 0x04 (4) -> When no collision box is used |--> 0x11 (17) -> When used a collision box 02: s16 Body real index (in BODY.HQR) 04: byte Collision box flag |-> flag = 0x00 (0) -> Model doesn't use collision box |--> flag = 0x01 (1) -> Model use collision box [ IF Collision box flag is set ] 05: byte Number of bytes to read minus 2. In this case the value is always 0x0E, so it will have more 0x0E-0x02 = 0x0C bytes 06: u16 X (bottom left) 08: u16 Y (bottom left) 0A: u16 Z (bottom left) 0C: u16 X (top right) 0E: u16 Y (top right) 10: u16 Z (top right) [ /IF ] [ / Body ] [ Anim = 3 ] +00: byte Anim index 01: byte Anim real index (in ANIM.HQR) 02: byte Data size - 3 03 until Data Size: ?? [ / Anim ] [ / Content ] [ / Entries ]
Information provided by: Alexfont