Difference between revisions of "Exit Destination (.JMP) File Format"

From Ōkami Speedrun Wiki
Jump to navigation Jump to search
(→‎File Format: Converting to tables)
Line 6: Line 6:


==File Format==
==File Format==
<pre>
===Overall===
uint32_t number_of_entries     // One for each exit destination definition.
{| class="wikitable dataStructure"
|-
! Start (Bytes in Hex) !! Width (Bytes in Hex) !! Type !! Field Name !! Note
|-
| 0 || 4 || uint32 || number_of_entries || One for each exit destination definition.
|-
| 4 || 64 each || jumpEntry array || jumpEntries ||
|}


For each entry:
===jumpEntry===
    uint16 x_coordinate
{| class="wikitable dataStructure"
    uint16 y_coordinate
|-
    uint16 z_coordinate
! Start (Bytes in Hex) !! Width (Bytes in Hex) !! Type !! Field Name !! Note
    uint16 ammy_orientation
|-
    uint8 area_id             // See Level File ID Table.
| 0 || 2 || uint16 || x_coordinate ||
    uint8 region_id           // See Level File ID Table.
|-
    uint8 unknown            // Seems to reference the other side of the exit, but doesn't appear to do anything when changed.
| 2 || 2 || uint16 || 7_coordinate ||
    uint8 exit_id             // Index into this file.
|-
 
| 4 || 2 || uint16 || z_coordinate ||
Pad with zeroes for 64 byte alignment.
|-
</pre>
| 6 || 2 || uint16 || ammy_orientation ||
|-
| 8 || 1 || uint8 || area_id || See Level File ID Table.
|-
| 9 || 1 || uint8 || region_id || See Level File ID Table.
|-
| 10 || 1 || uint8 || source_id? || Seems to reference the other side of the exit, but doesn't appear to do anything when changed.
|-
| 11 || 1 || uint8 || exit_id || Index into this file.
|-
| 12 || 52 || || || Pad with zeroes for 64 byte alignment.
|}

Revision as of 16:23, 25 November 2021

Note: This page pertains to Reverse Engineering of Okami.

Explanation

This file defines the destinations for exits. This does not define the loading zones themselves, but is referred to by them. (See Zone (.MEH/.SCA/.SCI) File Format for that.)

File Format

Overall

Start (Bytes in Hex) Width (Bytes in Hex) Type Field Name Note
0 4 uint32 number_of_entries One for each exit destination definition.
4 64 each jumpEntry array jumpEntries

jumpEntry

Start (Bytes in Hex) Width (Bytes in Hex) Type Field Name Note
0 2 uint16 x_coordinate
2 2 uint16 7_coordinate
4 2 uint16 z_coordinate
6 2 uint16 ammy_orientation
8 1 uint8 area_id See Level File ID Table.
9 1 uint8 region_id See Level File ID Table.
10 1 uint8 source_id? Seems to reference the other side of the exit, but doesn't appear to do anything when changed.
11 1 uint8 exit_id Index into this file.
12 52 Pad with zeroes for 64 byte alignment.