the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at main 26 lines 993 B view raw
1#pragma once 2// 4J Stu - Represents Java standard library class 3 4#include "InputStream.h" 5 6class ByteArrayInputStream : public InputStream 7{ 8protected: 9 byteArray buf; //An array of bytes that was provided by the creator of the stream. 10 unsigned int count; //The index one greater than the last valid character in the input stream buffer. 11 unsigned int mark; //The currently marked position in the stream. 12 unsigned int pos; //The index of the next character to read from the input stream buffer. 13 14public: 15 ByteArrayInputStream(byteArray buf, unsigned int offset, unsigned int length); 16 ByteArrayInputStream(byteArray buf); 17 virtual ~ByteArrayInputStream(); 18 virtual int read(); 19 virtual int read(byteArray b); 20 virtual int read(byteArray b, unsigned int offset, unsigned int length); 21 virtual void close(); 22 virtual __int64 skip(__int64 n); 23 24 // 4J Stu Added - Sometimes we don't want to delete the data on destroying this 25 void reset() { buf = byteArray(); count = 0; mark = 0; pos = 0; } 26};