EvilEngine/FLY: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
Battlepedia>Wowaname
m (add decimal representation to number)
(Rename Flythrough to Fly, change wording, use zFlyKey struct from decomp)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<onlyinclude>
{{AssetInfobox
{{#vardefine:typeid|FLY}}<nowiki/>
|subtitle=Flythrough
{{#vardefine:name|Fly}}<nowiki/>
|type=[[Binary]]
{{#vardefine:type|[[Binary]]}}<nowiki/>
|games=Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie}}
{{#vardefine:basetype|}}<nowiki/>
{{#vardefine:games|BFBB TSSM Incredibles RatProto}}<nowiki/>
{{#vardefine:sourcecode|[https://github.com/bfbbdecomp/bfbb/blob/master/src/Game/zCamera.h zCamera.h]}}<nowiki/>
{{#vardefine:image|}}<nowiki/>
</onlyinclude>
{{AutoAssetInfobox}}


A '''Flythrough''' defines a path for the camera to move around a level. It is made up of individual points, each point defining the transform for the camera at a specified time. The time is measured in frames. 30 frames = 1 second.
A '''Fly''' asset defines a path for the camera to move around the scene. It is made up of keys containing the camera's transform, aperture, and focal length for each frame. Each frame lasts ~0.0333 ms (30 FPS).

Fly assets contain all of the data necessary for [[EvilEngine/DYNA/game_object:Flythrough|game_object:Flythrough]], which is the in-game [[object]] that overrides the in-game camera.


==Format==
==Format==
Flythroughs are stored in little-endian. There is no header, it is simply made up of the following struct which repeats until the end of the file. The total length in frames is the frame number of the last struct in the file. Each entry is 64 (0x40 hex) bytes long.
A Fly asset is stored in little-endian on all platforms. It has no header and is made up of contiguous zFlyKey entries. Therefore, the number of entries is the asset's size / <code>sizeof(zFlyKey)</code> (64 bytes).


<source lang=cpp>
<source lang=cpp>
struct zFlyKey
struct zFlyKey
{
{
int frame;
int32 frame;
float matrix[12];
float32 matrix[12];
float aperture[2];
float32 aperture[2];
float focal;
float32 focal;
};
};
</source>
</source>


{{Assets}}
* '''frame''' usually starts at either 1 or 0, and increments by 1 with each point.
{{AutoGameNavs}}
* '''matrix'''

** index 0-2 is the right (reversed) vector
** index 3-5 is the up vector
** index 6-8 is the at (reversed) vector
** index 9-11 is the position
* '''aperture'''
* '''focal'''
[[Category:Asset]]
[[Category:Asset]]

Latest revision as of 17:23, 13 December 2022

FLY
Fly
TypeBinary
Games usedBattle for Bikini Bottom

The SpongeBob SquarePants Movie
The Incredibles

Ratatouille Prototype
Source codezCamera.h

A Fly asset defines a path for the camera to move around the scene. It is made up of keys containing the camera's transform, aperture, and focal length for each frame. Each frame lasts ~0.0333 ms (30 FPS).

Fly assets contain all of the data necessary for game_object:Flythrough, which is the in-game object that overrides the in-game camera.

Format

A Fly asset is stored in little-endian on all platforms. It has no header and is made up of contiguous zFlyKey entries. Therefore, the number of entries is the asset's size / sizeof(zFlyKey) (64 bytes).

struct zFlyKey
{
    int32 frame;
    float32 matrix[12];
    float32 aperture[2];
    float32 focal;
};