Bfres: Difference between revisions
Jump to navigation
Jump to search
(Add header (unsure of what I'm doing)) |
(Update links.) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
=== Header (nn::g3d::ResFile or nn::g3d2::ResFile) === | === Header (nn::g3d::ResFile or nn::g3d2::ResFile) === | ||
An nn::util::BinaryFileHeader derived file header featuring arrays and dictionaries of each model resource type, as well. | An [[Common nn::util#nn::util::BinaryFileHeader|nn::util::BinaryFileHeader]] derived file header featuring arrays and dictionaries of each model resource type, as well. | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Version 10.0.0 | |+Version 10.0.0 | ||
Line 12: | Line 12: | ||
|0x0 | |0x0 | ||
|0x20 | |0x20 | ||
|nn::util::BinaryFileHeader | |[[Common nn::util#nn::util::BinaryFileHeader|nn::util::BinaryFileHeader]] | ||
|Base header | |Base header | ||
|- | |- | ||
Line 27: | Line 27: | ||
|0x30 | |0x30 | ||
|0x8 | |0x8 | ||
|nn::util::ResDic * | |[[Common nn::util#nn::util::ResDic|nn::util::ResDic]] * | ||
|Model dictionary | |Model dictionary | ||
|- | |- | ||
|0x38 | |0x38 | ||
|0x8 | |0x8 | ||
| | |void*[4] | ||
|Only 4 unused null pointers so far | |Only observed as 4 unused null pointers so far | ||
|- | |- | ||
|0x58 | |0x58 | ||
Line 42: | Line 42: | ||
|0x60 | |0x60 | ||
|0x8 | |0x8 | ||
|nn::util::ResDic * | |[[Common nn::util#nn::util::ResDic|nn::util::ResDic]] * | ||
|Skeletal animation dictionary | |Skeletal animation dictionary | ||
|- | |- | ||
Line 52: | Line 52: | ||
|0x70 | |0x70 | ||
|0x8 | |0x8 | ||
|nn::util::ResDic * | |[[Common nn::util#nn::util::ResDic|nn::util::ResDic]] * | ||
|Material animation dictionary | |Material animation dictionary | ||
|- | |- | ||
Line 62: | Line 62: | ||
|0x80 | |0x80 | ||
|0x8 | |0x8 | ||
|nn::util::ResDic * | |[[Common nn::util#nn::util::ResDic|nn::util::ResDic]] * | ||
|Bone visibility animation dictionary | |Bone visibility animation dictionary | ||
|- | |- | ||
Line 72: | Line 72: | ||
|0x90 | |0x90 | ||
|0x8 | |0x8 | ||
|nn::util::ResDic * | |[[Common nn::util#nn::util::ResDic|nn::util::ResDic]] * | ||
|Shape animation dictionary | |Shape animation dictionary | ||
|- | |- | ||
Line 82: | Line 82: | ||
|0xa0 | |0xa0 | ||
|0x8 | |0x8 | ||
|nn::util::ResDic * | |[[Common nn::util#nn::util::ResDic|nn::util::ResDic]] * | ||
|Scene animation dictionary | |Scene animation dictionary | ||
|- | |- | ||
Line 92: | Line 92: | ||
|0xb0 | |0xb0 | ||
|0x8 | |0x8 | ||
|nn::gfx::MemoryPoolInfo | |[[Common nn::gfx#nn::gfx::MemoryPoolInfo|nn::gfx::MemoryPoolInfo]] | ||
|Pre-initialized MemoryPool info pointing to GPU region | |Pre-initialized MemoryPool info pointing to GPU region | ||
|- | |- | ||
|0xb8 | |0xb8 | ||
|0x8 | |0x8 | ||
|nn::gfx::ResEmbedFile * | |[[Common nn::gfx#nn::gfx::ResEmbedFile|nn::gfx::ResEmbedFile]] * | ||
|Embed file array | |Embed file array | ||
|- | |- | ||
|0xc0 | |0xc0 | ||
|0x8 | |0x8 | ||
|nn::util::ResDic * | |[[Common nn::util#nn::util::ResDic|nn::util::ResDic]] * | ||
|Embed file dictionary | |Embed file dictionary | ||
|- | |- | ||
Line 112: | Line 112: | ||
|0xd0 | |0xd0 | ||
|0x8 | |0x8 | ||
|const char * | |const char * (NW) | ||
|Reserved | |Reserved | ||
|- | |- | ||
Line 170: | Line 170: | ||
|Reserved | |Reserved | ||
|} | |} | ||
[[Category:File formats]] |
Latest revision as of 19:41, 9 May 2023
Bfres is a model archive file format. A Bfres file can contain models with shapes, materials, and a skeleton as well as skeletal, material, shape, bone visibility, and scene animations.
Header (nn::g3d::ResFile or nn::g3d2::ResFile)
An nn::util::BinaryFileHeader derived file header featuring arrays and dictionaries of each model resource type, as well.
Offset | Size | Type | Description |
---|---|---|---|
0x0 | 0x20 | nn::util::BinaryFileHeader | Base header |
0x20 | 0x8 | const char * (NW) | File name |
0x28 | 0x8 | ResModel * | Model array |
0x30 | 0x8 | nn::util::ResDic * | Model dictionary |
0x38 | 0x8 | void*[4] | Only observed as 4 unused null pointers so far |
0x58 | 0x8 | ResSkeletalAnim * | Skeletal animation array |
0x60 | 0x8 | nn::util::ResDic * | Skeletal animation dictionary |
0x68 | 0x8 | ResMaterialAnim * | Material animation array |
0x70 | 0x8 | nn::util::ResDic * | Material animation dictionary |
0x78 | 0x8 | ResBoneVisibilityAnim * | Bone visibility animation array |
0x80 | 0x8 | nn::util::ResDic * | Bone visibility animation dictionary |
0x88 | 0x8 | ResShapeAnim * | Shape animation array |
0x90 | 0x8 | nn::util::ResDic * | Shape animation dictionary |
0x98 | 0x8 | ResSceneAnim * | Scene animation array |
0xa0 | 0x8 | nn::util::ResDic * | Scene animation dictionary |
0xa8 | 0x8 | nn::gfx::TMemoryPool * | Runtime MemoryPool (set by g3d) |
0xb0 | 0x8 | nn::gfx::MemoryPoolInfo | Pre-initialized MemoryPool info pointing to GPU region |
0xb8 | 0x8 | nn::gfx::ResEmbedFile * | Embed file array |
0xc0 | 0x8 | nn::util::ResDic * | Embed file dictionary |
0xc8 | 0x8 | void * | User pointer in EPD software. (possibly a UI tree in nn::ui?) |
0xd0 | 0x8 | const char * (NW) | Reserved |
0xd8 | 0x4 | u32 | Reserved |
0xdc | 0x2 | u16 | Model array count |
0xde | 0x2 | u16 | Reserved |
0xe0 | 0x2 | u16 | Reserved |
0xe2 | 0x2 | u16 | Skeletal animation array count |
0xe4 | 0x2 | u16 | Material animation array count |
0xe6 | 0x2 | u16 | Bone visibility animation count |
0xe8 | 0x2 | u16 | Shape animation count |
0xea | 0x2 | u16 | Scene animation count |
0xec | 0x2 | u16 | Embed file count |
0xee | 0x2 | u16 | Reserved |