2017-09-12 19:11:30 +00:00
|
|
|
#ifndef OPENMW_ESSIMPORT_IMPORTPROJ_H
|
|
|
|
#define OPENMW_ESSIMPORT_IMPORTPROJ_H
|
|
|
|
|
|
|
|
#include <components/esm/esmcommon.hpp>
|
2024-05-02 01:09:13 +00:00
|
|
|
#include <components/esm/vector3.hpp>
|
|
|
|
|
2023-12-17 14:21:12 +00:00
|
|
|
#include <cstdint>
|
2017-09-12 19:11:30 +00:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
class ESMReader;
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace ESSImport
|
|
|
|
{
|
|
|
|
|
|
|
|
struct PROJ
|
|
|
|
{
|
|
|
|
|
|
|
|
struct PNAM // 184 bytes
|
|
|
|
{
|
|
|
|
float mAttackStrength;
|
|
|
|
float mSpeed;
|
|
|
|
unsigned char mUnknown[4 * 2];
|
|
|
|
float mFlightTime;
|
2023-12-17 13:03:45 +00:00
|
|
|
int32_t mSplmIndex; // reference to a SPLM record (0 for ballistic projectiles)
|
2017-09-12 19:11:30 +00:00
|
|
|
unsigned char mUnknown2[4];
|
|
|
|
ESM::Vector3 mVelocity;
|
|
|
|
ESM::Vector3 mPosition;
|
|
|
|
unsigned char mUnknown3[4 * 9];
|
|
|
|
ESM::NAME32 mActorId; // indexed refID (with the exception of "PlayerSaveGame")
|
|
|
|
ESM::NAME32 mArrowId;
|
|
|
|
ESM::NAME32 mBowId;
|
2022-09-22 18:26:05 +00:00
|
|
|
|
2017-09-12 19:11:30 +00:00
|
|
|
bool isMagic() const { return mSplmIndex != 0; }
|
|
|
|
};
|
|
|
|
|
|
|
|
std::vector<PNAM> mProjectiles;
|
|
|
|
|
|
|
|
void load(ESM::ESMReader& esm);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|