Luigi's Mansion:Docs/H4M (File Format)
Jump to navigation
Jump to search
Summary[edit | edit source]
H4M files can be partially edited, only through a hex editor. Audio can only be extracted using h4m_audio_decode.
In Luigi Mansion, H4M video file is used only, and only to play the Pikmin trailer.
Format Information[edit | edit source]
The original .H4M docs are below the wiki tables.
File Header[edit | edit source]
The file begins with the header of 0x10 bytes. H4M Includes an extra section (MDL3) that BMD does not:
Offset | Size(h) | Type | Description |
---|---|---|---|
0x00 | 9 | String | Magic: 'HVQM4 ' with version ('1.3'), in ASCII. |
0x08 | 4 | Le | |
0x0c | 4 | N | |
0x10 | 4 | 'SVR3' in ASCII. | |
0x14 | 0C | C | |
End of header |
Data Structures[edit | edit source]
Offset | Integer | Use | Description |
---|---|---|---|
0x00 | u16 | Vertex Index | Index of Vertice for Mesh |
0x02 | u16 | Normal Index | Index of Normal for Mesh (if present) |
0x04 | u16 | Color Index | Index of Vertex Color for Mesh (if present) |
0x06 | u16 | U Index | Index of U Coordinate for TexCoords |
0x08 | u16 | V Index | Index of V Coordinate for TexCoords |
uint | Description |
---|---|
uint8 | matrix index |
uint8 | texcoord0 matrix index? |
uint8 | texcoord1 matrix index? |
uint16 | position index |
uint16 | normal index (only present if the model has normals) |
uint16 | color index (only present if the model has colors) |
uint16 | texcoord index (only present if the model has texcoord) |
HVQM4 Doc: msheppard[edit | edit source]
# HVQM4: compressed movie format designed by Hudson for Nintendo GameCube # From Mark Sheppard <msheppard@climax.co.uk>, 2002-10-03 # 0 string HVQM4 %s >6 string >\0 v%s >0 byte x GameCube movie, >0x34 ubeshort x %d x >0x36 ubeshort x %d, >0x26 ubeshort x %dµs, >0x42 ubeshort 0 no audio >0x42 ubeshort >0 %dHz audio
(Source: ASSEMblerGAMES )