Skip to content

Commit bf6023d

Browse files
committed
Add Willox's updates, Part 3 - Class
1 parent fd83d09 commit bf6023d

File tree

2 files changed

+41
-40
lines changed

2 files changed

+41
-40
lines changed

Diff for: after/src/main/java/after/io/DMBClassTable.java

+32-31
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,15 @@ public static class Entry implements DMBObjectEntryBasedSubblock.Entry {
5151

5252
// >= 494
5353

54-
public int idH;
55-
public short unkB;
56-
public short unkC;
54+
@StringID // Nullable
55+
public int maptext;
56+
public short maptextWidth;
57+
public short maptextHeight;
5758

5859
// >= 508
5960

60-
public short unkD;
61-
public short unkE;
61+
public short maptextX;
62+
public short maptextY;
6263

6364
// --
6465

@@ -83,13 +84,13 @@ public static class Entry implements DMBObjectEntryBasedSubblock.Entry {
8384

8485
// >= 500
8586

86-
public byte hasFloats;
87-
public float[] floats = new float[6];
87+
public byte hasTransform;
88+
public float[] transform = new float[6];
8889

8990
// >= 509
9091

91-
public byte hasEvenMoreFloats;
92-
public float[] evenMoreFloats = new float[20];
92+
public byte hasColourMatrix;
93+
public float[] colourMatrix = new float[20];
9394

9495
// >= 306
9596

@@ -118,14 +119,14 @@ public void read(DMBReadContext rc) {
118119
text = rc.id();
119120

120121
if (rc.vRHS >= 494) {
121-
idH = rc.id();
122-
unkB = rc.io.getShort();
123-
unkC = rc.io.getShort();
122+
maptext = rc.id();
123+
maptextWidth = rc.io.getShort();
124+
maptextHeight = rc.io.getShort();
124125
}
125126

126127
if (rc.vRHS >= 508) {
127-
unkD = rc.io.getShort();
128-
unkE = rc.io.getShort();
128+
maptextX = rc.io.getShort();
129+
maptextY = rc.io.getShort();
129130
}
130131

131132
suffix = rc.id();
@@ -144,15 +145,15 @@ public void read(DMBReadContext rc) {
144145
layer = rc.io.getFloat();
145146

146147
if (rc.vRHS >= 500) {
147-
hasFloats = rc.io.get();
148-
if (hasFloats != 0)
149-
rc.floats(floats);
148+
hasTransform = rc.io.get();
149+
if (hasTransform != 0)
150+
rc.floats(transform);
150151
}
151152

152153
if (rc.vRHS >= 509) {
153-
hasEvenMoreFloats = rc.io.get();
154-
if (hasEvenMoreFloats != 0)
155-
rc.floats(evenMoreFloats);
154+
hasColourMatrix = rc.io.get();
155+
if (hasColourMatrix != 0)
156+
rc.floats(colourMatrix);
156157
}
157158

158159
if (rc.vGEN >= 306)
@@ -181,14 +182,14 @@ public void write(DMBWriteContext wc) {
181182
wc.id(text);
182183

183184
if (wc.vRHS >= 494) {
184-
wc.id(idH);
185-
wc.i16(unkB);
186-
wc.i16(unkC);
185+
wc.id(maptext);
186+
wc.i16(maptextWidth);
187+
wc.i16(maptextHeight);
187188
}
188189

189190
if (wc.vRHS >= 508) {
190-
wc.i16(unkD);
191-
wc.i16(unkE);
191+
wc.i16(maptextX);
192+
wc.i16(maptextY);
192193
}
193194

194195
wc.id(suffix);
@@ -206,15 +207,15 @@ public void write(DMBWriteContext wc) {
206207
wc.i32(Float.floatToIntBits(layer));
207208

208209
if (wc.vRHS >= 500) {
209-
wc.i8(hasFloats);
210-
if (hasFloats != 0)
211-
wc.floats(floats);
210+
wc.i8(hasTransform);
211+
if (hasTransform != 0)
212+
wc.floats(transform);
212213
}
213214

214215
if (wc.vRHS >= 509) {
215-
wc.i8(hasEvenMoreFloats);
216-
if (hasEvenMoreFloats != 0)
217-
wc.floats(evenMoreFloats);
216+
wc.i8(hasColourMatrix);
217+
if (hasColourMatrix != 0)
218+
wc.floats(colourMatrix);
218219
}
219220

220221
if (wc.vGEN >= 306)

Diff for: formats/DMB.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,16 @@ format version shenanigans.
147147

148148
For RHS Versions >= 494, additionally {
149149

150-
1. ObjectID unk
151-
2. Uint16 unk (note: my pet theory is, this involves either step or icon size)
152-
3. Uint16 unk (same)
150+
1. Nullable StringID maptext (thanks to Willox for finding this)
151+
2. Uint16 maptextWidth (thanks to Willox for finding this)
152+
3. Uint16 maptextHeight (thanks to Willox for finding this)
153153

154154
}
155155

156156
For RHS Versions >= 508, additionally {
157157

158-
1. Uint16 unk
159-
2. Uint16 unk
158+
1. Uint16 maptextX (thanks to Willox for finding this)
159+
2. Uint16 maptextY (thanks to Willox for finding this)
160160

161161
}
162162

@@ -176,15 +176,15 @@ For GEN Versions >= 267, additionally {
176176

177177
For RHS Versions >= 500, additionally {
178178

179-
1. Uint8 hasFloats, but really a boolean
180-
2. If hasFloats, Array of 6 Float32s
179+
1. Uint8 hasTransform, but really a boolean
180+
2. If hasColourMatrix, Array of 6 Float32s (Affine transform (TODO: Details?) - thanks to Willox for finding this)
181181

182182
}
183183

184184
For RHS Versions >= 509, additionally {
185185

186-
1. Uint8 hasEvenMoreFloats, really a boolean
187-
2. If hasEvenMoreFloats, Array of 20 Float32s
186+
1. Uint8 hasColourMatrix, really a boolean
187+
2. If hasColourMatrix, Array of 20 Float32s (Colour matrix (TODO: Details?) - thanks to Willox for finding this)
188188

189189
}
190190

0 commit comments

Comments
 (0)