#pragma once #ifndef _LOADERDFF_HPP_ #define _LOADERDFF_HPP_ #define GLEW_STATIC #include #include #include #include #include class Model; class GameData; class LoaderDFF { private: template T readStructure(char *data, size_t &dataI); RW::BSSectionHeader readHeader(char *data, size_t &dataI); public: Model* loadFromMemory(char *data, GameData* gameData); }; #include class LoaderIMG; class LoadModelJob : public WorkJob { public: typedef std::function ModelCallback; private: GameData* _gameData; LoaderIMG* _archive; std::string _file; ModelCallback _callback; char* _data; public: LoadModelJob(WorkContext* context, GameData* gd, LoaderIMG& archive, const std::string& file, ModelCallback cb); void work(); void complete(); }; #endif