Tidy up and comment protocol.hjson

This commit is contained in:
DankParrot 2020-08-18 18:50:41 -07:00
parent e09c70a51a
commit c26fc81a2b
1 changed files with 11 additions and 2 deletions

View File

@ -2,9 +2,16 @@
types:
{
varint: {
// native type
type: int32_t
// this is the max size. varint is 3 to 5
size: 5
// R/W: ReadVarInt, WriteVarInt
method: VarInt
// Alias types use ReadVarInt<T>
generic: true
}
@ -15,6 +22,7 @@
string: {
type: std::string
method: String
// requires count: e.g. string[256]
size: count
}
@ -43,11 +51,12 @@
byte: {type: 'uint8_t', size: 1}
bool: {type: 'bool', size: 1}
// if no native type is specified,
// it's assumed to be the type's name
bool: {size: 1}
float: {size: 4}
double: {size: 8}
}
states :