however
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "GLSLExtension.hpp"
|
||||
|
||||
#include "../util/stringutil.h"
|
||||
#include "../util/stringutil.hpp"
|
||||
#include "../typedefs.h"
|
||||
#include "../files/files.h"
|
||||
#include "../files/engine_paths.h"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#include "binary_json.h"
|
||||
#include "binary_json.hpp"
|
||||
|
||||
#include "gzip.hpp"
|
||||
#include "byte_utils.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include "gzip.h"
|
||||
#include "byte_utils.h"
|
||||
|
||||
using namespace json;
|
||||
using namespace dynamic;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef CODERS_BINARY_JSON_H_
|
||||
#define CODERS_BINARY_JSON_H_
|
||||
#ifndef CODERS_BINARY_JSON_HPP_
|
||||
#define CODERS_BINARY_JSON_HPP_
|
||||
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
@@ -25,4 +25,4 @@ namespace json {
|
||||
extern std::unique_ptr<dynamic::Map> from_binary(const ubyte* src, size_t size);
|
||||
}
|
||||
|
||||
#endif // CODERS_BINARY_JSON_H_
|
||||
#endif // CODERS_BINARY_JSON_HPP_
|
||||
@@ -1,4 +1,4 @@
|
||||
#include "byte_utils.h"
|
||||
#include "byte_utils.hpp"
|
||||
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
#ifndef CODERS_BYTE_UTILS_H_
|
||||
#define CODERS_BYTE_UTILS_H_
|
||||
#ifndef CODERS_BYTE_UTILS_HPP_
|
||||
#define CODERS_BYTE_UTILS_HPP_
|
||||
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "../typedefs.h"
|
||||
|
||||
/* byteorder: little-endian */
|
||||
class ByteBuilder {
|
||||
@@ -44,7 +45,7 @@ public:
|
||||
std::vector<ubyte> build();
|
||||
};
|
||||
|
||||
/* byteorder: little-endian */
|
||||
/// byteorder: little-endian
|
||||
class ByteReader {
|
||||
const ubyte* data;
|
||||
size_t size;
|
||||
@@ -54,26 +55,29 @@ public:
|
||||
ByteReader(const ubyte* data);
|
||||
|
||||
void checkMagic(const char* data, size_t size);
|
||||
/* Read one byte (unsigned 8 bit integer) */
|
||||
/// @brief Read one byte (unsigned 8 bit integer)
|
||||
ubyte get();
|
||||
/* Read one byte (unsigned 8 bit integer) without pointer move */
|
||||
/// @brief Read one byte (unsigned 8 bit integer) without pointer move
|
||||
ubyte peek();
|
||||
/* Read signed 16 bit integer */
|
||||
/// @brief Read signed 16 bit integer
|
||||
int16_t getInt16();
|
||||
/* Read signed 32 bit integer */
|
||||
/// @brief Read signed 32 bit integer
|
||||
int32_t getInt32();
|
||||
/* Read signed 64 bit integer */
|
||||
/// @brief Read signed 64 bit integer
|
||||
int64_t getInt64();
|
||||
/* Read 32 bit floating-point number */
|
||||
/// @brief Read 32 bit floating-point number
|
||||
float getFloat32();
|
||||
/* Read 64 bit floating-point number */
|
||||
/// @brief Read 64 bit floating-point number
|
||||
double getFloat64();
|
||||
/// @brief Read C-String
|
||||
const char* getCString();
|
||||
/// @brief Read string with unsigned 32 bit number before (length)
|
||||
std::string getString();
|
||||
/// @return true if there is at least one byte remains
|
||||
bool hasNext() const;
|
||||
|
||||
const ubyte* pointer() const;
|
||||
void skip(size_t n);
|
||||
};
|
||||
|
||||
#endif // CODERS_BYTE_UTILS_H_
|
||||
#endif // CODERS_BYTE_UTILS_HPP_
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "commons.h"
|
||||
#include "commons.hpp"
|
||||
|
||||
#include "../util/stringutil.h"
|
||||
#include "../util/stringutil.hpp"
|
||||
|
||||
#include <sstream>
|
||||
#include <stdexcept>
|
||||
|
||||
+3
-2
@@ -1,10 +1,11 @@
|
||||
#include "gzip.h"
|
||||
#include "gzip.hpp"
|
||||
|
||||
#include "byte_utils.hpp"
|
||||
|
||||
#define ZLIB_CONST
|
||||
#include <zlib.h>
|
||||
#include <math.h>
|
||||
#include <memory>
|
||||
#include "byte_utils.h"
|
||||
|
||||
std::vector<ubyte> gzip::compress(const ubyte* src, size_t size) {
|
||||
size_t buffer_size = 23+size*1.01;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#ifndef CODERS_GZIP_H_
|
||||
#define CODERS_GZIP_H_
|
||||
#ifndef CODERS_GZIP_HPP_
|
||||
#define CODERS_GZIP_HPP_
|
||||
|
||||
#include <vector>
|
||||
#include "../typedefs.h"
|
||||
#include <vector>
|
||||
|
||||
namespace gzip {
|
||||
const unsigned char MAGIC[] = "\x1F\x8B";
|
||||
@@ -18,4 +18,4 @@ namespace gzip {
|
||||
std::vector<ubyte> decompress(const ubyte* src, size_t size);
|
||||
}
|
||||
|
||||
#endif // CODERS_GZIP_H_
|
||||
#endif // CODERS_GZIP_HPP_
|
||||
+1
-2
@@ -5,9 +5,8 @@
|
||||
#include <iomanip>
|
||||
#include <memory>
|
||||
|
||||
#include "commons.h"
|
||||
#include "../data/dynamic.h"
|
||||
#include "../util/stringutil.h"
|
||||
#include "../util/stringutil.hpp"
|
||||
|
||||
using namespace json;
|
||||
using namespace dynamic;
|
||||
|
||||
+5
-5
@@ -1,17 +1,17 @@
|
||||
#ifndef CODERS_JSON_H_
|
||||
#define CODERS_JSON_H_
|
||||
|
||||
#include "commons.hpp"
|
||||
#include "binary_json.hpp"
|
||||
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <stdint.h>
|
||||
#include <stdexcept>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "commons.h"
|
||||
#include "../typedefs.h"
|
||||
|
||||
#include "binary_json.h"
|
||||
|
||||
namespace dynamic {
|
||||
class Map;
|
||||
class List;
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
#include "toml.hpp"
|
||||
#include "commons.h"
|
||||
|
||||
#include "commons.hpp"
|
||||
#include "../data/setting.hpp"
|
||||
#include "../data/dynamic.h"
|
||||
#include "../util/stringutil.h"
|
||||
#include "../util/stringutil.hpp"
|
||||
#include "../files/settings_io.hpp"
|
||||
|
||||
#include <math.h>
|
||||
|
||||
+2
-4
@@ -1,11 +1,9 @@
|
||||
#ifndef CODERS_TOML_HPP_
|
||||
#define CODERS_TOML_HPP_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include "commons.hpp"
|
||||
|
||||
#include "commons.h"
|
||||
#include <string>
|
||||
|
||||
class SettingsHandler;
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
#include "xml.hpp"
|
||||
|
||||
#include "../util/stringutil.h"
|
||||
#include "../util/stringutil.hpp"
|
||||
|
||||
#include <charconv>
|
||||
#include <stdexcept>
|
||||
|
||||
+2
-2
@@ -1,14 +1,14 @@
|
||||
#ifndef CODERS_XML_HPP_
|
||||
#define CODERS_XML_HPP_
|
||||
|
||||
#include "commons.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <glm/glm.hpp>
|
||||
#include <unordered_map>
|
||||
|
||||
#include "commons.h"
|
||||
|
||||
namespace xml {
|
||||
class Node;
|
||||
class Attribute;
|
||||
|
||||
Reference in New Issue
Block a user