mirror of
https://github.com/love2d/love.git
synced 2026-08-17 02:58:31 +02:00
Added base64 support for FileData, and inlined all resources in boot.lua/graphics.lua as base64. Also removed old reshax stuff.
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
// LOVE
|
||||
#include <string>
|
||||
#include <common/Data.h>
|
||||
#include <common/StringMap.h>
|
||||
|
||||
namespace love
|
||||
{
|
||||
@@ -47,6 +48,13 @@ namespace filesystem
|
||||
|
||||
public:
|
||||
|
||||
enum Decoder
|
||||
{
|
||||
FILE,
|
||||
BASE64,
|
||||
DECODE_MAX_ENUM
|
||||
}; // Decoder
|
||||
|
||||
FileData(int size, const std::string & filename);
|
||||
|
||||
virtual ~FileData();
|
||||
@@ -58,6 +66,14 @@ namespace filesystem
|
||||
const std::string & getFilename() const;
|
||||
const std::string & getExtension() const;
|
||||
|
||||
static bool getConstant(const char * in, Decoder & out);
|
||||
static bool getConstant(Decoder in, const char *& out);
|
||||
|
||||
private:
|
||||
|
||||
static StringMap<Decoder, DECODE_MAX_ENUM>::Entry decoderEntries[];
|
||||
static StringMap<Decoder, DECODE_MAX_ENUM> decoders;
|
||||
|
||||
}; // FileData
|
||||
|
||||
} // filesystem
|
||||
|
||||
Reference in New Issue
Block a user