Compare commits
2 Commits
4f9577eb36
...
664632d111
Author | SHA1 | Date |
---|---|---|
BodgeMaster | 664632d111 | |
BodgeMaster | f18874019b |
|
@ -1,4 +1,4 @@
|
|||
// Copyright <year>, FOSS-VG Developers and Contributers
|
||||
// Copyright 2022, FOSS-VG Developers and Contributers
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify it
|
||||
// under the terms of the GNU Affero General Public License as published
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright <year>, FOSS-VG Developers and Contributers
|
||||
# Copyright 2022, FOSS-VG Developers and Contributers
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Affero General Public License as published
|
||||
|
|
|
@ -180,6 +180,49 @@ namespace NBT {
|
|||
}
|
||||
return ErrorOr<std::vector<int64_t>>(result);
|
||||
}
|
||||
|
||||
void writeInt8(std::vector<uint8_t>* destination, int8_t data) {
|
||||
}
|
||||
|
||||
void writeInt16(std::vector<uint8_t>* destination, int16_t data) {
|
||||
}
|
||||
|
||||
void writeInt32(std::vector<uint8_t>* destination, int32_t data) {
|
||||
}
|
||||
|
||||
void writeInt64(std::vector<uint8_t>* destination, int64_t data) {
|
||||
}
|
||||
|
||||
//FIXME: we just assume that float is a single-precision IEEE754
|
||||
// floating point number
|
||||
void writeFloat32(std::vector<uint8_t>* destination, float data) {
|
||||
}
|
||||
|
||||
//FIXME: we just assume that double is a single-precision IEEE754
|
||||
// floating point number
|
||||
void writeFloat64(std::vector<uint8_t>* destination, double data) {
|
||||
}
|
||||
|
||||
void writeInt8Array(std::vector<uint8_t>* destination, std::vector<int8_t> data) {
|
||||
}
|
||||
|
||||
void writeInt8Array(std::vector<uint8_t>* destination, int8_t data[], uint64_t dataSize) {
|
||||
}
|
||||
|
||||
//void writeString(std::vector<uint8_t>* destination, <string type> data) {
|
||||
//}
|
||||
|
||||
void writeInt32Array(std::vector<uint8_t>* destination, std::vector<int32_t> data) {
|
||||
}
|
||||
|
||||
void writeInt32Array(std::vector<uint8_t>* destination, int32_t data[], uint64_t dataSize) {
|
||||
}
|
||||
|
||||
void writeInt64Array(std::vector<uint8_t>* destination, std::vector<int64_t> data) {
|
||||
}
|
||||
|
||||
void writeInt64Array(std::vector<uint8_t>* destination, int64_t data[], uint64_t dataSize) {
|
||||
}
|
||||
}
|
||||
|
||||
bool validateRawNBTData(uint8_t data[], uint64_t dataSize){
|
||||
|
|
|
@ -55,6 +55,24 @@ namespace NBT {
|
|||
//ErrorOr<> readString(uint8_t data[], uint64_t dataSize, uint64_t currentPosition);
|
||||
ErrorOr<std::vector<int32_t>> readInt32Array(uint8_t data[], uint64_t dataSize, uint64_t currentPosition);
|
||||
ErrorOr<std::vector<int64_t>> readInt64Array(uint8_t data[], uint64_t dataSize, uint64_t currentPosition);
|
||||
|
||||
void writeInt8(std::vector<uint8_t>* destination, int8_t data);
|
||||
void writeInt16(std::vector<uint8_t>* destination, int16_t data);
|
||||
void writeInt32(std::vector<uint8_t>* destination, int32_t data);
|
||||
void writeInt64(std::vector<uint8_t>* destination, int64_t data);
|
||||
//FIXME: we just assume that float is a single-precision IEEE754
|
||||
// floating point number
|
||||
void writeFloat32(std::vector<uint8_t>* destination, float data);
|
||||
//FIXME: we just assume that double is a single-precision IEEE754
|
||||
// floating point number
|
||||
void writeFloat64(std::vector<uint8_t>* destination, double data);
|
||||
void writeInt8Array(std::vector<uint8_t>* destination, std::vector<int8_t> data);
|
||||
void writeInt8Array(std::vector<uint8_t>* destination, int8_t data[], uint64_t dataSize);
|
||||
//void writeString(std::vector<uint8_t>* destination, <string type> data);
|
||||
void writeInt32Array(std::vector<uint8_t>* destination, std::vector<int32_t> data);
|
||||
void writeInt32Array(std::vector<uint8_t>* destination, int32_t data[], uint64_t dataSize);
|
||||
void writeInt64Array(std::vector<uint8_t>* destination, std::vector<int64_t> data);
|
||||
void writeInt64Array(std::vector<uint8_t>* destination, int64_t data[], uint64_t dataSize);
|
||||
}
|
||||
|
||||
bool validateRawNBTData(uint8_t data[], int length);
|
||||
|
|
Loading…
Reference in New Issue