Skip to content

Commit f01dd51

Browse files
authored
Merge pull request #73 from kion-dgl/6-update-readme-for-information-on-vertices
Update README.md
2 parents c60e8d8 + da9f4cd commit f01dd51

File tree

1 file changed

+2
-70
lines changed

1 file changed

+2
-70
lines changed

README.md

Lines changed: 2 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -48,77 +48,9 @@ $ bun index.ts
4848
| test | tests for encoding and decoding information into the game |
4949

5050

51-
## MegaMan Model
52-
53-
There is a separate model of MegaMan depending on the equipment.
54-
The options for this are if a helmet is equipped or not, and if the shoes are jet, cleat, asbestos, or hover.
55-
What this means is that most of the information in the model is duplicated, with the exception of the helmet and shoes.
56-
57-
| File | Helmet | Shoes |
58-
| ---- | ------ | ---- |
59-
| PL00P000.BIN | YES | Normal |
60-
| PL00P001.BIN | YES | Jet Shoes |
61-
| PL00P002.BIN | YES | Cleat Shoes |
62-
| PL00P003.BIN | YES | Asbestos Shoes |
63-
| PL00P004.BIN | YES | Hydo Shoes |
64-
| PL00P005.BIN | YES | Hover Shoes |
65-
| PL00P010.BIN | NO | Normal |
66-
| PL00P011.BIN | NO | Jet Shoes |
67-
| PL00P012.BIN | NO | Cleat Shoes | `
68-
| PL00P013.BIN | NO | Asbestos Shoes |
69-
| PL00P014.BIN | NO | Hydo Shoes |
70-
| PL00P015.BIN | NO | Hover Shoes |
71-
72-
## Body Parts
73-
74-
Even through there are variations with all of the models, the offsets for the body parts are the same.
75-
The mesh information stored in each `.BIN` files starts at `0x30` and is `0x2b40` in size.
76-
These offsets are with respect to the start of the model file which is `0x30`.
77-
78-
For the purpose of this document, we will use the term "model" to refer to the enter file,
79-
"mesh" refers to a single body part. And "strip" will refer to the list of commands that make up the mesh.
80-
81-
| Body Part| Offset| Number of Strips |
82-
| --------| ----- | ---------------- |
83-
| Bones| 0x00| 16 |
84-
| Body| 0x80 | 6 |
85-
| Head| 0xb60 | 3 |
86-
| Feet| 0x1800 | 2 |
87-
| Right Arm| 0x1dd0 | 3 |
88-
| Buster| 0x2220 | 3 |
89-
| Left Arm| 0x26f0 | 3 |
90-
91-
### Strip Format
92-
93-
Each strip is a list of vertices and indices used to draw the mesh.
94-
Indices are described in either triangles or quads, and both reference the same vertex list.
95-
For the same number of vertices, there are shading vertex colors that describe the local shadows for each face.
96-
97-
```c
98-
typedef struct {
99-
utin8_t triCount;
100-
utin8_t quadCount;
101-
utin8_t vertexCount;
102-
uint8_t nop;
103-
uint32_t triOffset;
104-
uint32_t quadOffset;
105-
uint32_t vertexOffset;
106-
utin32_t triShadowOffset;
107-
utin32_t quadShadowOffset;
108-
} StripHeader;
109-
```
110-
111-
| 0x00 | 0x01 | 0x02 | 0x03 | 0x04 | 0x08 | 0x0c | 0x10 | 0x14 |
112-
| --------| ----- | ---------------- | ----- | ---- | ----- | ---- | ----- | --- |
113-
| Tri Count | Quad Count | Vertex Count | NOP | Tri Ofs | Quad Ofs | Vertex Ofs | Tri Shadow Ofs | Quad Shadow Ofs |
114-
115-
### Vertex Format
116-
117-
Issue: https://github.com/kion-dgl/Miku-Legends-2/issues/6
118-
119-
### Face Format
51+
## Format Documentation
12052

121-
Issue: https://github.com/kion-dgl/Miku-Legends-2/issues/12
53+
Documentation for File Formats used in MegaMan Legends 2 can be found here: [https://format.dashgl.com/mml2/](https://format.dashgl.com/mml2/)
12254

12355
## Credits
12456

0 commit comments

Comments
 (0)