Files
lime/project/include/utils/Resource.h
2018-06-13 19:41:04 -07:00

31 lines
514 B
C++

#ifndef LIME_UTILS_RESOURCE_H
#define LIME_UTILS_RESOURCE_H
#include <system/CFFI.h>
#include <utils/Bytes.h>
#include <utils/String.h>
namespace lime {
struct Resource {
Resource () : data (NULL), path (NULL) {}
Resource (const char* path) : data (NULL), path (path) {}
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;
};
}
#endif