EvilEngine/CSN: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 10:
{{AutoAssetInfobox}}
 
===Alignment===
Header, Raw Data and TimeChunks are all aligned to 2048 bytes.<br>
Entries in TimeChunks are aligned to 16 bytes?
 
==Format==
===Header===
The asset data starts with a [[CTOC|main header]], which is also present in the CTOC asset.
CSN starts with a header, which is also present in the [[CTOC]] asset (without padding bytes).
====xCutsceneInfo====
{| class="wikitable"
|-
! 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.
{| class="wikitable"
|-
! 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====
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
| 0x00 || uint || '''TimeChunkOffs''' || Offset to TimeChunk
|}
 
====Visibility====
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
| 0x00 || uint || '''Visibility''' ||
|}
 
====xCutsceneBreak====
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
| 0x00 || float || '''Time''' ||
|-
| 0x04 || int || '''Index''' ||
|}
 
===Raw Data=Padding====
Padding - 0x00 bytes, 2048 byte alignment.
This section contains all [[MODL]] and JDTM assets. Its size and offset are defined in the [[CTOC|main header]].
 
===TimeChunk===
EveryEach timechunk has a 0x10 byte header:
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
| 0x00 || float || '''StartTime''' ||
|-
| 0x04 || float || '''EndTime''' ||
Line 32 ⟶ 109:
| 0x08 || uint || '''NumData''' || Number of entries.
|-
| 0x0C || uint || '''ChunkIndex''' || TimeChunk index (starts with 0).
|}
 
====xCutsceneData====
The entries have the following structure:
Each entry has this 0x10 byte header:
=====xCutsceneData=====
{| class="wikitable"
|-
Line 54 ⟶ 131:
| 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=====
[[Sound_Format|SNDS]]
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
! 0x00 || colspan="3" | [[#xCutsceneData|xCutsceneData Header]]
|-
| 0x10 || colspan="3" style="text-align:center" | [[SNDS]] (Scooby/BFBB)
|}
 
=====Animation=====
Line 70 ⟶ 142:
! Offset !! Type !! Variable !! Description
|-
!| 0x00 || colspan="3"uint || [[#xCutsceneData'''RootIndex''' ||xCutsceneData Header]]
|-
| 0x100x04 || uint32float[3] || '''RootIndexTranslate''' || Starting position?
|-
| 0x10 || colspan="3" style="text-align:center" | [[ANIM]]
| 0x14 || float[3] || '''Translate''' || Starting position.
|-
| 0x20 || colspan="3" style="text-align:center" | [[ANIM]]
|}
 
=====Camera=====
(BFBB/TSSM/Incredibles only)
Camera is different in Night of 100 Frights.
This is BFBB/TSSM/Incredibles only.
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
!| 0x00 || uint || colspan="32" | [[#xCutsceneData|xCutsceneDataAmount of Header]]frames.
|-
| 0x10 || uint32 || colspan="2" | Amount of frames.
|-
| 0x140x04 || colspan="3" style="text-align:center" | [[FLY]] (Bigbig-Endianendian on GamecubeGameCube)
|}
 
=====JDTA=====
Unknown
{| class="wikitable"
|-
! Offset !! Type !! Variable !! Description
|-
! 0x00 || colspan="3" | [[#xCutsceneData|xCutsceneData Header]]
|-
| 0x10 || colspan="3" | Unknown
|}
 
=====MorphTarget=====
Unknown
{| class="wikitable"
 
|-
====Padding====
! Offset !! Type !! Variable !! Description
Padding - 0x00 bytes, 2048 byte alignment.
|-
! 0x00 || colspan="3" | [[#xCutsceneData|xCutsceneData Header]]
|-
| 0x10 || colspan="3" | Unknown
|-
| colspan="4" style="text-align:center" | [[MPHT]]
|}
 
 
2,079

edits