skadistats.clarity.io.s1.DotaS1FieldReader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clarity Show documentation
Show all versions of clarity Show documentation
Clarity is an open source replay parser for Dota 2 and CSGO 1 and 2 written in Java.
package skadistats.clarity.io.s1;
import skadistats.clarity.io.bitstream.BitStream;
import skadistats.clarity.model.s1.S1FieldPath;
public class DotaS1FieldReader extends S1FieldReader {
@Override
protected int readIndices(BitStream bs, S1DTClass dtClass) {
var n = 0;
var cursor = -1;
while (true) {
if (bs.readBitFlag()) {
cursor += 1;
} else {
var offset = bs.readVarUInt();
if (offset == MAX_PROPERTIES) {
break;
} else {
cursor += offset + 1;
}
}
fieldPaths[n++] = new S1FieldPath(dtClass.getIndexMapping()[cursor]);
}
return n;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy