Common Definitions¶
What follows is a non-exhaustive list of common definitions used by the Sega NN Chunk Format.
NNS_VECTOR¶
Represents a Vector3.
NNS_VECTOR2D¶
Represents a Vector2.
NNS_RGB¶
Represents an RGB color value.
NNS_TEXCOORD¶
Represents a two-dimensional UV texture coordinate.
NNS_ROTATE_A32¶
Represents a fixed-point 32-bit angle rotation.
struct NNS_ROTATE_A32
{
int32_t x;
int32_t y;
int32_t z;
};
// Macros used by Text-Form files:
#define NNM_DEGtoA32(deg) (int32_t)((deg) * 182.04444f)
#define NNM_DEGtoA32FLT(deg) ((deg) * 182.04444f)
#define NNM_A32toDEG(val) ((val) * 0.0054931641f)
NNS_ROTATE_A16¶
Represents a fixed-point 16-bit angle rotation.
struct NNS_ROTATE_A16
{
int16_t x;
int16_t y;
int16_t z;
};
// Macros used by Text-Form files:
#define NNM_DEGtoA16(deg) (int16_t)((deg) * 182.04444f)
#define NNM_DEGtoA16FLT(deg) ((deg) * 182.04444f)
#define NNM_A16toDEG(val) ((val) * 0.0054931641f)
NNS_QUATERNION¶
Represents a quaternion rotation.