mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-08 00:17:14 +00:00
refactor: consistent include paths in java/nbt
This commit is contained in:
parent
44f6982e96
commit
0817878fe1
|
|
@ -1,4 +1,4 @@
|
|||
#include "Buffer.h"
|
||||
#include "java/Buffer.h"
|
||||
|
||||
Buffer::Buffer(unsigned int capacity)
|
||||
: m_capacity(capacity),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
#include "IntBuffer.h"
|
||||
#include "FloatBuffer.h"
|
||||
#include "ByteBuffer.h"
|
||||
#include "java/IntBuffer.h"
|
||||
#include "java/FloatBuffer.h"
|
||||
#include "java/ByteBuffer.h"
|
||||
|
||||
ByteBuffer::ByteBuffer(unsigned int capacity) : Buffer(capacity) {
|
||||
hasBackingArray = false;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "Class.h"
|
||||
#include "java/Class.h"
|
||||
|
||||
// 4J Stu - To ensure that other classes can get the _class object of it's
|
||||
// superclass, we also need the BaseObject to have that member
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include <cassert>
|
||||
#include <cmath>
|
||||
|
||||
#include "Color.h"
|
||||
#include "java/Color.h"
|
||||
|
||||
// Creates an opaque sRGB color with the specified red, green, and blue values
|
||||
// in the range (0.0 - 1.0). Alpha is defaulted to 1.0. The actual color used in
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
#include "FileFilter.h"
|
||||
#include "File.h"
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
|
||||
#include "java/FileFilter.h"
|
||||
#include "java/File.h"
|
||||
|
||||
#include "../../../Minecraft.World/ConsoleHelpers/PathHelper.h" // 4jcraft TODO
|
||||
#include "../../../Minecraft.World/ConsoleHelpers/StringHelpers.h" // 4jcraft TODO
|
||||
|
||||
#include <chrono>
|
||||
#include <filesystem>
|
||||
|
||||
const wchar_t File::pathSeparator = L'/';
|
||||
|
||||
const std::wstring File::pathRoot =
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "FloatBuffer.h"
|
||||
#include "java/FloatBuffer.h"
|
||||
|
||||
// Allocates a new float buffer.
|
||||
// The new buffer's position will be zero, its limit will be its capacity, and
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "InputOutputStream/BufferedOutputStream.h"
|
||||
#include "java/InputOutputStream/BufferedOutputStream.h"
|
||||
|
||||
// Creates a new buffered output stream to write data to the specified
|
||||
// underlying output stream with the specified buffer size. Parameters: out -
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "InputOutputStream/BufferedReader.h"
|
||||
#include "java/InputOutputStream/BufferedReader.h"
|
||||
|
||||
// Creates a buffering character-input stream that uses a default-sized input
|
||||
// buffer. Parameters: in - A Reader
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "InputOutputStream/InputOutputStream.h"
|
||||
#include "java/InputOutputStream/InputOutputStream.h"
|
||||
|
||||
// Creates ByteArrayInputStream that uses buf as its buffer array. The initial
|
||||
// value of pos is offset and the initial value of count is the minimum of
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "InputOutputStream/ByteArrayOutputStream.h"
|
||||
#include "java/InputOutputStream/ByteArrayOutputStream.h"
|
||||
|
||||
// Creates a new byte array output stream. The buffer capacity is initially 32
|
||||
// bytes, though its size increases if necessary.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "InputOutputStream/DataInputStream.h"
|
||||
#include <bit>
|
||||
#include <cstdint>
|
||||
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
|
||||
// Creates a DataInputStream that uses the specified underlying InputStream.
|
||||
// Parameters:
|
||||
// in - the specified input stream
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
|
||||
#include "InputOutputStream/DataOutputStream.h"
|
||||
#include <bit>
|
||||
#include <cstdint>
|
||||
|
||||
#include "java/InputOutputStream/DataOutputStream.h"
|
||||
|
||||
// Creates a new data output stream to write data to the specified underlying
|
||||
// output stream. The counter written is set to zero. Parameters: out - the
|
||||
// underlying output stream, to be saved for later use.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
#include "File.h"
|
||||
#include "InputOutputStream/FileInputStream.h"
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/FileInputStream.h"
|
||||
#include <algorithm>
|
||||
|
||||
#include "../../../Minecraft.World/ConsoleHelpers/StringHelpers.h"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#include "File.h"
|
||||
#include "InputOutputStream/FileOutputStream.h"
|
||||
|
||||
#include "../../../Minecraft.World/ConsoleHelpers/ArrayWithLength.h" // 4jcraft TODO
|
||||
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/FileOutputStream.h"
|
||||
|
||||
// Creates a file output stream to write to the file represented by the
|
||||
// specified File object. A new FileDescriptor object is created to represent
|
||||
// this file connection. First, if there is a security manager, its checkWrite
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#include "File.h"
|
||||
#include "InputOutputStream/InputOutputStream.h"
|
||||
#include "InputOutputStream/InputStream.h"
|
||||
#include "java/File.h"
|
||||
#include "java/InputOutputStream/InputOutputStream.h"
|
||||
#include "java/InputOutputStream/InputStream.h"
|
||||
|
||||
InputStream* InputStream::getResourceAsStream(const std::wstring& fileName) {
|
||||
File file(fileName);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
#include "InputOutputStream/InputStream.h"
|
||||
#include "InputOutputStream/DataInputStream.h"
|
||||
#include "InputOutputStream/InputStreamReader.h"
|
||||
#include "java/InputOutputStream/InputStream.h"
|
||||
#include "java/InputOutputStream/DataInputStream.h"
|
||||
#include "java/InputOutputStream/InputStreamReader.h"
|
||||
|
||||
// Creates an InputStreamReader that uses the default charset.
|
||||
// Parameters:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
|
||||
#include "IntBuffer.h"
|
||||
#include "java/IntBuffer.h"
|
||||
|
||||
// Allocates a new int buffer.
|
||||
// The new buffer's position will be zero, its limit will be its capacity, and
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#include "JavaMath.h"
|
||||
#include "java/JavaMath.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#include "Random.h"
|
||||
#include <ctime>
|
||||
#include <cstdint> // for int64_t
|
||||
#include "System.h"
|
||||
|
||||
#include "java/System.h"
|
||||
#include "java/Random.h"
|
||||
|
||||
Random::Random() {
|
||||
// 4J - jave now uses the system nanosecond counter added to a
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
#include "System.h"
|
||||
#if defined(__linux__)
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <ctime>
|
||||
#endif
|
||||
|
||||
#include "java/System.h"
|
||||
|
||||
template <class T>
|
||||
void System::arraycopy(arrayWithLength<T> src, unsigned int srcPos,
|
||||
arrayWithLength<T>* dst, unsigned int dstPos,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ nbt_sources = files(
|
|||
lib_nbt = static_library('nbt',
|
||||
nbt_sources,
|
||||
dependencies: [java_dep],
|
||||
include_directories : include_directories('include/nbt'),
|
||||
include_directories : include_directories('include'),
|
||||
cpp_args : global_cpp_args + global_cpp_defs,
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#include "java/InputOutputStream/InputOutputStream.h"
|
||||
#include "NbtIo.h"
|
||||
#include "nbt/NbtIo.h"
|
||||
|
||||
CompoundTag* NbtIo::readCompressed(InputStream* in) {
|
||||
// MemSect(26);
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
#include "Tag.h"
|
||||
#include "EndTag.h"
|
||||
#include "ByteTag.h"
|
||||
#include "ByteArrayTag.h"
|
||||
#include "DoubleTag.h"
|
||||
#include "FloatTag.h"
|
||||
#include "IntTag.h"
|
||||
#include "LongTag.h"
|
||||
#include "ShortTag.h"
|
||||
#include "StringTag.h"
|
||||
#include "ListTag.h"
|
||||
#include "CompoundTag.h"
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "nbt/Tag.h"
|
||||
#include "nbt/EndTag.h"
|
||||
#include "nbt/ByteTag.h"
|
||||
#include "nbt/ByteArrayTag.h"
|
||||
#include "nbt/DoubleTag.h"
|
||||
#include "nbt/FloatTag.h"
|
||||
#include "nbt/IntTag.h"
|
||||
#include "nbt/LongTag.h"
|
||||
#include "nbt/ShortTag.h"
|
||||
#include "nbt/StringTag.h"
|
||||
#include "nbt/ListTag.h"
|
||||
#include "nbt/CompoundTag.h"
|
||||
|
||||
Tag::Tag(const std::wstring& name) {
|
||||
if (name.empty()) {
|
||||
this->name = L"";
|
||||
|
|
|
|||
Loading…
Reference in a new issue