LBA2:Entity information
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. |
Warning: the specification below seems to be wrong in most part. Use at your own risk.
-------------------------------------------------------------------------------- L I T T L E B I G A D V E N T U R E 1 & 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 LBA1\Relentless and 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 ] ------------------------------------------------------------------- In LBA1 the format I'll explain are inside File3D.HQR with many files, each one correspond the following format. In LBA2 only exist one unique file with all this information inside. This file could be found inside Ress.HQR in the entry 45 (LBA2 Character Informations). [#] [ FORMAT ] ----------------------------------------------------------------- s32 = signed int (32bit) u16 = unsigned short (16bit) s16 = signed short (16bit) byte (8bit) + = to add previeous bytes count The first thing you need to get is the number of entries it will have. For both games we extract the number the same way, and I'll assume you know it by now, so... 00: s32 Number of Entries Do this "number of entries" times [ Entries ] First of all you need to read the entrie content for each entrie 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 readed byte isn't 0xFF (End of each entrie content). 02: Make here a offset backup. (Will be needed later) [ Content ] +00: byte Opcode Opcode = 1 -> Body content Opcode = 3 -> Anim content [ Body = 1 ] +00: byte Body index (in File3D.HQR) 01: s16 Body real index (in Body.HQR) You can check if the body real index is correct by testing with 0x8000 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 ] [ Anim = 3 ] +00: s32 Anim index (in File3D.HQR) 04: s32 Anim real index (in Anim.HQR) Count here one more anim for the total number of anims in the entrie. [ / 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 ] [ / Entries ]
Information provided by: Alexfont