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:
Alex Szpakowski
2016-03-28 19:28:40 -03:00
parent 9efbe4892c
commit 734789eb93
15 changed files with 394 additions and 141 deletions
+1 -7
View File
@@ -128,13 +128,7 @@ public:
* @param size The size of the data.
* @param filename The full filename used to file type identification.
**/
virtual FileData *newFileData(void *data, unsigned int size, const char *filename) const = 0;
/**
* Creates a new FileData object from base64 data.
* @param b64 The base64 data.
**/
virtual FileData *newFileData(const char *b64, const char *filename) const = 0;
virtual FileData *newFileData(const void *data, size_t size, const char *filename) const;
/**
* Gets the current working directory.