TU19: merge Minecraft.World/IO

This commit is contained in:
MatthewBeshay
2026-03-22 10:05:26 +11:00
parent 11a0440998
commit 993617025b
8 changed files with 76 additions and 47 deletions

View File

@@ -146,6 +146,17 @@ void DataOutputStream::writeShort(short a) {
written += 2;
}
void DataOutputStream::writeUnsignedShort(unsigned short a) {
if (stream == NULL) {
app.DebugPrintf(
"DataOutputStream::writeUnsignedShort() but underlying stream is NULL\n");
return;
}
stream->write(static_cast<unsigned int>((a >> 8) & 0xff));
stream->write(static_cast<unsigned int>(a & 0xff));
written += 2;
}
// Writes a char to the underlying output stream as a 2-byte value, high byte
// first. If no exception is thrown, the counter written is incremented by 2.
// Parameters: