EvilEngine/CSN

From Heavy Iron Modding
Revision as of 23:57, 2 September 2022 by EnergyDrink (talk | contribs)

CSN
Cutscene
TypeBinary
Games usedNight of 100 Frights

Battle for Bikini Bottom
The SpongeBob SquarePants Movie

The Incredibles


Format

Header

CSN starts with a header, which is also present in the CTOC asset (without padding bytes).

xCutsceneInfo

Offset Type Variable Description
0x00 uint Magic
  • CTSN (Xbox/PlayStation 2) (little-endian)
  • NSTC (GameCube) (big-endian)
0x04 uint AssetID AssetID of CSN.
0x08 uint NumData Amount of xCutsceneData entries.
0x0C uint NumTime Amount of xCutsceneTime entries.
0x10 uint MaxModel Largest model in bytes (+padding bytes) in xCutsceneData.
0x14 uint MaxBufEven Largest timechunk in bytes (+padding bytes), usually the first one.
0x18 uint MaxBufOdd Largest timechunk in bytes (+padding bytes).
0x1C uint HeaderSize Size of header.
0x20 uint VisCount Amount of visibility entries.
0x24 uint VisSize Total size of all visibility entries.
0x28 uint BreakCount Amount of xCutsceneBreak entries.
0x2C uint pad null
0x30 byte[16] SoundLeft Only present in Scooby/BFBB
0x40 byte[16] SoundRight null (Only present in Scooby/BFBB)

xCutsceneData

  • If ChunkSize and FileOffset are 0, an external MODL is used within the HOP.
  • Every model has padding - 0x00 bytes at the end, 2048 byte alignment.
Offset Type Variable Description
0x00 uint DataType
  • 1 = MODL
  • 6 = JDTM (Not present in Scooby)
0x04 AssetID AssetID AssetID of model.
0x08 uint ChunkSize Size of model.
0x0C uint FileOffset Offset to model.

xCutsceneTime

Offset Type Variable Description
0x00 uint TimeChunkOffs Offset to TimeChunk

Visibility

Offset Type Variable Description
0x00 uint Visibility

xCutsceneBreak

Offset Type Variable Description
0x00 float Time
0x04 int Index

Padding

Padding - 0x00 bytes, 2048 byte alignment.

TimeChunk

Each timechunk has a 0x10 byte header:

Offset Type Variable Description
0x00 float StartTime
0x04 float EndTime
0x08 uint NumData Number of entries.
0x0C uint ChunkIndex TimeChunk index.

xCutsceneData

Each entry has this 0x10 byte header:

Offset Type Variable Description
0x00 uint DataType
  • 2 = Animation
  • 3 = Camera
  • 4 = MorphTarget (Only present in scooby)
  • 5 = Sound
  • 7 = JDTA (Not present in scooby)
0x04 AssetID AssetID AssetID of entry.
0x08 uint ChunkSize Size of data, relative to end of this header.
0x0C uint FileOffset Starting position of data, relative to end of this header.

Every entry has padding - 0x00 bytes at the end, 16 byte alignment.

Sound

SNDS

Animation
Offset Type Variable Description
0x00 uint RootIndex
0x04 float[3] Translate Starting position?
0x10 ANIM
Camera

(BFBB/TSSM/Incredibles only)

Offset Type Variable Description
0x00 uint Amount of frames.
0x04 FLY (big-endian on GameCube)
JDTA

Unknown

MorphTarget

Unknown

Padding

Padding - 0x00 bytes, 2048 byte alignment.