-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathformat specs v0.txt
35 lines (27 loc) · 1.22 KB
/
format specs v0.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
0x00-0x03: 4-byte signature: 6D 6D 32 67 ("mm2g")
0x04-0x05: version number: 2-byte, unsigned, big-endian (should be 00 00)
0x06-0x09: length: 4-byte, unsigned, big-endian
Following this header is length frames of data.
Each frame starts with 5 bytes:
xPos yPos xScrl animIndex flags
xPos:
Mega Man's X pixel position in the world.
yPos:
Mega Man's Y pixel position in the world
xScrl:
How many pixels the screen is scrolled.
This, combined with xPos and the current X scroll in the emulator, is used to calculate the draw position
on the emulator screen.
animIndex:
Mega Man's animation index (walking, jumping, etc). 0xFF is a sentinel value unused by the game, which
signifies no animation (Mega Man is offscreen, etc.) in this file.
For a full list of animIndex values and their meanings, see animIndex.txt
flags:
These flags indicate certain states, as described below. Extra bytes may follow, depending on which are set.
7654 3210
---- --WF
|||| ||||
|||| |||+- Flipped: whether Mega Man's sprite is flipped (facing right). Updates every frame.
|||| ||+-- Weapon: set when the currently equipped weapon changes. When this bit is 1,
|||| || the index of the new weapon will follow, on the range [0,12].
++++-++--- Unused & ignored.