mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-08 03:42:35 +01:00
cfca1cbdc8
+ All Object Data classes inheirt from ObjectInformation which stores the ID and class_type, which maps to the IDE name. - Remove all object mappings except for objectTypes, which now stores all of them.
31 lines
806 B
C++
31 lines
806 B
C++
#ifndef _GENERICDATLOADER_HPP_
|
|
#define _GENERICDATLOADER_HPP_
|
|
|
|
#include <map>
|
|
#include <memory>
|
|
|
|
struct DynamicObjectData;
|
|
typedef std::shared_ptr<DynamicObjectData> DynamicObjectDataPtr;
|
|
typedef std::map<std::string,DynamicObjectDataPtr> DynamicObjectDataPtrs;
|
|
|
|
struct WeaponData;
|
|
typedef std::shared_ptr<WeaponData> WeaponDataPtr;
|
|
typedef std::map<std::string, WeaponDataPtr> WeaponDataPtrs;
|
|
|
|
struct VehicleInfo;
|
|
typedef std::shared_ptr<VehicleInfo> VehicleInfoPtr;
|
|
typedef std::map<std::string, VehicleInfoPtr> VehicleInfoPtrs;
|
|
|
|
class GenericDATLoader
|
|
{
|
|
public:
|
|
|
|
void loadDynamicObjects(const std::string& name, DynamicObjectDataPtrs& data);
|
|
|
|
void loadWeapons(const std::string& name, WeaponDataPtrs& weaponData);
|
|
|
|
void loadHandling(const std::string& name, VehicleInfoPtrs& vehicleData);
|
|
};
|
|
|
|
#endif
|