mirror of
https://github.com/love2d/love.git
synced 2026-08-18 03:34:23 +02:00
Added love.math.encode(format, data | string [, linelength]) and love.math.decode(format, data | string). Current formats are "base64" and "hex". The optional line length only applies to base64 and specifies the maximum number of characters per line in the encoded string.
Removed the variant of love.filesystem.newFileData which decoded a base64-encoded string since it's redundant. --HG-- branch : minor
This commit is contained in:
@@ -60,6 +60,13 @@ bool Filesystem::isAndroidSaveExternal() const
|
||||
return useExternal;
|
||||
}
|
||||
|
||||
FileData *Filesystem::newFileData(const void *data, size_t size, const char *filename) const
|
||||
{
|
||||
FileData *fd = new FileData(size, std::string(filename));
|
||||
memcpy(fd->getData(), data, size);
|
||||
return fd;
|
||||
}
|
||||
|
||||
bool Filesystem::isRealDirectory(const std::string &path) const
|
||||
{
|
||||
#ifdef LOVE_WINDOWS
|
||||
|
||||
Reference in New Issue
Block a user