Merge remote-tracking branch 'upstream/master'
Conflicts: lime/text/TextLayout.hx project/src/text/Font.cpp
This commit is contained in:
41
project/include/utils/Bytes.h
Normal file
41
project/include/utils/Bytes.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef LIME_UTILS_BYTES_H
|
||||
#define LIME_UTILS_BYTES_H
|
||||
|
||||
|
||||
#include <hx/CFFI.h>
|
||||
#include <utils/QuickVec.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
struct Bytes {
|
||||
|
||||
|
||||
Bytes ();
|
||||
Bytes (int size);
|
||||
Bytes (value bytes);
|
||||
Bytes (const char* path);
|
||||
Bytes (const QuickVec<unsigned char> data);
|
||||
~Bytes ();
|
||||
|
||||
unsigned char *Data ();
|
||||
const unsigned char *Data () const;
|
||||
int Length () const;
|
||||
void Resize (int size);
|
||||
void Set (value bytes);
|
||||
void Set (const QuickVec<unsigned char> data);
|
||||
value Value ();
|
||||
|
||||
unsigned char *_data;
|
||||
int _length;
|
||||
value _value;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
26
project/include/utils/LZMA.h
Normal file
26
project/include/utils/LZMA.h
Normal file
@@ -0,0 +1,26 @@
|
||||
#ifndef LIME_UTILS_LZMA_H
|
||||
#define LIME_UTILS_LZMA_H
|
||||
|
||||
|
||||
#include <utils/Bytes.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
|
||||
|
||||
class LZMA {
|
||||
|
||||
|
||||
public:
|
||||
|
||||
static void Decode (Bytes* data, Bytes* result);
|
||||
static void Encode (Bytes* data, Bytes* result);
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -2,7 +2,7 @@
|
||||
#define LIME_UTILS_RESOURCE_H
|
||||
|
||||
|
||||
#include <utils/ByteArray.h>
|
||||
#include <utils/Bytes.h>
|
||||
|
||||
|
||||
namespace lime {
|
||||
@@ -13,9 +13,9 @@ namespace lime {
|
||||
|
||||
Resource () : data (NULL), path (NULL) {}
|
||||
Resource (const char* path) : data (NULL), path (path) {}
|
||||
Resource (ByteArray *data) : data (data), path (NULL) {}
|
||||
Resource (Bytes *data) : data (data), path (NULL) {}
|
||||
|
||||
ByteArray *data;
|
||||
Bytes *data;
|
||||
const char* path;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user