diff --git a/Code/Misc/Misc.vcxproj b/Code/Misc/Misc.vcxproj index 743cea70..e2947725 100644 --- a/Code/Misc/Misc.vcxproj +++ b/Code/Misc/Misc.vcxproj @@ -148,7 +148,6 @@ - diff --git a/Code/Misc/Misc.vcxproj.filters b/Code/Misc/Misc.vcxproj.filters index f3ea3d1f..6eae993b 100644 --- a/Code/Misc/Misc.vcxproj.filters +++ b/Code/Misc/Misc.vcxproj.filters @@ -33,9 +33,6 @@ Source Files - - Source Files - diff --git a/Code/Misc/Resource/Loaders/CustomLoader.cpp b/Code/Misc/Resource/Loaders/CustomLoader.cpp index 84cb9302..05d7113d 100644 --- a/Code/Misc/Resource/Loaders/CustomLoader.cpp +++ b/Code/Misc/Resource/Loaders/CustomLoader.cpp @@ -9,7 +9,7 @@ using namespace Oyster::Resource; OResource* OResource::CustomLoader(const wchar_t filename[], CustomLoadFunction fnc) { - const CustomData &data = fnc(); + const CustomData &data = fnc(filename); if(!data.loadedData) return 0; if(!data.resourceUnloadFnc) return 0; @@ -31,7 +31,7 @@ OResource* OResource::CustomReloader() { CustomUnloader(); - const CustomData &data = this->customData->loadingFunction(); + const CustomData &data = this->customData->loadingFunction(this->resourceFilename.c_str()); this->resourceData = (OHRESOURCE)data.loadedData; if(data.resourceUnloadFnc) diff --git a/Code/Misc/Resource/OysterResource.h b/Code/Misc/Resource/OysterResource.h index 3e449196..e152f0d1 100644 --- a/Code/Misc/Resource/OysterResource.h +++ b/Code/Misc/Resource/OysterResource.h @@ -13,8 +13,8 @@ namespace Oyster struct CustomData; /** A Resource handle representing various resources */ typedef unsigned long OHRESOURCE; - typedef void(*CustomUnloadFunction)(void*); - typedef const CustomData&(*CustomLoadFunction)(); + typedef void(*CustomUnloadFunction)(void* loadedData); + typedef const CustomData&(*CustomLoadFunction)(const wchar_t filename[]); /** An enum class representing all avalible resources that is supported. */ enum ResourceType