HOB file handler prototype Mesh building should be moved to RSPModel lib Tree rendering unicode chars fix Updated version detection HOB file handler Debug HOB handler Pointer probably deallocated, need to check it Fix HOB loader and disposer Using HOB instance instead of static methods Review DLL support for MSVC build Vertices values calculation fix Added export obj method to debug tool Missed levels name separation Cleaned model processing Multithreading branch reported to later
92 lines
2.4 KiB
C++
92 lines
2.4 KiB
C++
/**
|
|
* @file Krennic.hpp
|
|
* @date 18/01/2023
|
|
* @author JackCarterSmith
|
|
* @copyright GPL-v3.0
|
|
* @brief Main game assets parser and interface.
|
|
*
|
|
* Complete class would take Erso legacy files tree and extract levels, objects,
|
|
* textures, animations, etc. adapted datas for OpenGL/Direct3D application.
|
|
*
|
|
*/
|
|
|
|
#include <vector>
|
|
#include <string>
|
|
#include <boost/filesystem.hpp>
|
|
#include <FileHandler/Generic.h>
|
|
#include <FileHandler/HMT.h>
|
|
#include <FileHandler/HOB.h>
|
|
#include "Erso.hpp"
|
|
|
|
|
|
#ifndef KRENNIC_HPP_
|
|
#define KRENNIC_HPP_
|
|
|
|
namespace RDI {
|
|
|
|
class Krennic final {
|
|
public:
|
|
Krennic( Erso* pErso );
|
|
~Krennic();
|
|
|
|
/**
|
|
* Retrieve know list of legacy game files type.
|
|
* @return Array of filtered elements.
|
|
*/
|
|
///@{
|
|
std::vector<std::string> getLevelsList() { return listLevelsName; }
|
|
std::vector<std::string> getModelsList() { return listModelsName; }
|
|
std::vector<std::string> getTexturesList() { return listTexturesName; }
|
|
std::vector<std::string> getMusicsList() { return listMusicsName; }
|
|
std::vector<std::string> getSamplesList() { return listSamplesName; }
|
|
///@}
|
|
|
|
/**
|
|
* Obtain the class interface for datas in specified file type.
|
|
* @param name Name of the file, should be in list.
|
|
* @return File type class handler.
|
|
*/
|
|
///@{
|
|
void* getLevel( std::string name );
|
|
HOB* getModel( std::string name );
|
|
HMT* getTexture( std::string name );
|
|
void* getMusic( std::string name );
|
|
void* getSample( std::string name );
|
|
///@}
|
|
|
|
/**
|
|
* @brief Retrieve default file instance.
|
|
* @details Unknown file type can be wrapped in dummy class to access raw
|
|
* content without parsing or other type of processing.
|
|
*
|
|
* @param[in] vPath Virtual path to the file.
|
|
* @return Generic file type class handler.
|
|
*/
|
|
GenericFile *getFile( boost::filesystem::path vPath );
|
|
|
|
private:
|
|
std::vector<HOB*> listModels;
|
|
|
|
std::vector<std::string> listLevelsName;
|
|
std::vector<std::string> listModelsName;
|
|
std::vector<std::string> listTexturesName;
|
|
std::vector<std::string> listMusicsName;
|
|
std::vector<std::string> listSamplesName;
|
|
|
|
void BuildLevelFileList( Erso* pErso );
|
|
void BuildModelFileList( Erso* pErso );
|
|
void BuildTextureFileList( Erso* pErso );
|
|
void BuildMusicFileList( Erso* pErso );
|
|
void BuildSampleFileList( Erso* pErso );
|
|
|
|
void DisposeLevels();
|
|
void DisposeModels();
|
|
void DisposeTextures();
|
|
void DisposeMusics();
|
|
void DisposeSamples();
|
|
};
|
|
|
|
}
|
|
|
|
#endif /* KRENNIC_HPP_ */
|