Image loading, bytes fixes for HL

This commit is contained in:
Joshua Granick
2018-06-13 19:41:04 -07:00
parent 5ec6aaee62
commit 62c5722ab0
9 changed files with 190 additions and 131 deletions

View File

@@ -2,7 +2,9 @@
#define LIME_UTILS_RESOURCE_H
#include <system/CFFI.h>
#include <utils/Bytes.h>
#include <utils/String.h>
namespace lime {
@@ -13,7 +15,8 @@ namespace lime {
Resource () : data (NULL), path (NULL) {}
Resource (const char* path) : data (NULL), path (path) {}
Resource (Bytes *data) : data (data), path (NULL) {}
Resource (HL_String* path) : data (NULL), path (path ? hl_to_utf8 ((const uchar*)path->bytes) : NULL) {}
Resource (Bytes* data) : data (data), path (NULL) {}
Bytes *data;
const char* path;