Worldstone
 All Classes Files Functions Variables Enumerations Enumerator Macros Pages
WorldStone::COF Class Reference

Decoder for the COF (Components Object File) file format. More...

#include <cof.h>

Classes

struct  Header
 
struct  Layer
 

Public Types

enum  Keyframe : uint8_t {
  COFKEY_NONE, COFKEY_ATTACK, COFKEY_MISSILE, COFKEY_SOUND,
  COFKEY_SKILL, COFKEY_MAX
}
 Frame trigger type.
 

Public Member Functions

bool read (const StreamPtr &streamPtr)
 
const HeadergetHeader () const
 
const Vector< Layer > & getLayers () const
 
const Vector< Keyframe > & getKeyframes () const
 
const Vector< uint8_t > & getAllLayersOrders () const
 
const uint8_t * getFrameLayerOrder (size_t direction, size_t frame) const
 

Static Public Attributes

static constexpr uint8_t componentsNumber = 16
 
static constexpr const char * componentsNames [componentsNumber]
 

Detailed Description

Decoder for the COF (Components Object File) file format.

Layout of a COF file:

Name Type Size in bytes
header COF::Header 32
layers COF::Layer[layers] 9 * header.layers
keyframes COF::Keyframe[frames] 1 * header.frames
layersOrder uint8_t[dirs][frames][layers] header.directions * header.frames * header.layers

Definition at line 24 of file cof.h.

Member Function Documentation

const uint8_t* WorldStone::COF::getFrameLayerOrder ( size_t  direction,
size_t  frame 
) const
inline
Returns
A pointer to the list of layers in the order of draw

Definition at line 74 of file cof.h.

Member Data Documentation

constexpr const char * WorldStone::COF::componentsNames
static
Initial value:
= {
"HD", "TR", "LG", "RA", "LA", "RH", "LH", "SH",
"S1", "S2", "S3", "S4", "S5", "S6", "S7", "S8"}

Definition at line 82 of file cof.h.

constexpr uint8_t WorldStone::COF::componentsNumber = 16
static
Note
This list of components comes from the file data\global\excel\Composit.txt

Definition at line 81 of file cof.h.


The documentation for this class was generated from the following files: