///////////////////////////////////////////////////////////////////// // Created by [Dennis Andersen] [2013] ///////////////////////////////////////////////////////////////////// #ifndef MISC_OYSTER_RESOURCE_H #define MISC_OYSTER_RESOURCE_H namespace Oyster { namespace Resource { struct CustomData; /** A Resource handle representing various resources */ typedef unsigned long OHRESOURCE; /** Typedef on a fuction required for custom unloading */ typedef void(*CustomUnloadFunction)(void* loadedData); /** Typedef on a fuction required for custom loading */ typedef const CustomData&(*CustomLoadFunction)(const wchar_t filename[]); /** An enum class representing all avalible resources that is supported. */ enum ResourceType { //Byte ResourceType_Byte_Raw, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_ANSI, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_UTF8, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_UNICODE, /**< Handle can be interpeted as char[] or char* */ ResourceType_Byte_UTF16LE, /**< Handle can be interpeted as char[] or char* */ ResourceType_COUNT, /**< Not used. */ ResourceType_UNKNOWN = -1, /**< Handle can be interpeted as void* */ }; /** A struct to return when doing a custom resource Load * By loading this way you are handing over the ownership to the resource loaded. */ struct CustomData { void* loadedData; ///