mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2024-12-29 03:19:44 +00:00
Use more fixed size integers
This commit is contained in:
parent
26ff56f150
commit
77c978c226
@ -16,10 +16,10 @@ namespace ESM
|
||||
|
||||
struct AIData
|
||||
{
|
||||
unsigned short mHello; // This is the base value for greeting distance [0, 65535]
|
||||
uint16_t mHello; // This is the base value for greeting distance [0, 65535]
|
||||
unsigned char mFight, mFlee, mAlarm; // These are probabilities [0, 100]
|
||||
char mU1, mU2, mU3; // Unknown values
|
||||
int mServices; // See the Services enum
|
||||
int32_t mServices; // See the Services enum
|
||||
|
||||
void blank();
|
||||
///< Set record to default state (does not touch the ID).
|
||||
@ -27,8 +27,8 @@ namespace ESM
|
||||
|
||||
struct AIWander
|
||||
{
|
||||
short mDistance;
|
||||
short mDuration;
|
||||
int16_t mDistance;
|
||||
int16_t mDuration;
|
||||
unsigned char mTimeOfDay;
|
||||
unsigned char mIdle[8];
|
||||
unsigned char mShouldRepeat;
|
||||
@ -44,7 +44,7 @@ namespace ESM
|
||||
struct AITarget
|
||||
{
|
||||
float mX, mY, mZ;
|
||||
short mDuration;
|
||||
int16_t mDuration;
|
||||
NAME32 mId;
|
||||
unsigned char mShouldRepeat;
|
||||
unsigned char mPadding;
|
||||
|
@ -9,7 +9,7 @@ namespace ESM
|
||||
|
||||
struct CreatureLevListState final : public ObjectState
|
||||
{
|
||||
int mSpawnActorId;
|
||||
int32_t mSpawnActorId;
|
||||
bool mSpawn;
|
||||
|
||||
void load(ESMReader& esm) override;
|
||||
|
@ -47,9 +47,8 @@ namespace ESM
|
||||
std::vector<int> mSummonGraveyard;
|
||||
|
||||
TimeStamp mTradeTime;
|
||||
int mGoldPool;
|
||||
int mActorId;
|
||||
// int mHitAttemptActorId;
|
||||
int32_t mGoldPool;
|
||||
int32_t mActorId;
|
||||
|
||||
enum Flags
|
||||
{
|
||||
|
@ -24,14 +24,14 @@ namespace ESM
|
||||
Flag_Global = 4 // make available from main menu (i.e. not location specific)
|
||||
};
|
||||
|
||||
unsigned int mRecordFlags;
|
||||
uint32_t mRecordFlags;
|
||||
RefId mId;
|
||||
|
||||
std::string mDescription;
|
||||
|
||||
std::string mScriptText;
|
||||
|
||||
unsigned int mFlags;
|
||||
uint32_t mFlags;
|
||||
|
||||
void load(ESMReader& esm, bool& isDeleted);
|
||||
void save(ESMWriter& esm, bool isDeleted = false) const;
|
||||
|
@ -9,7 +9,7 @@ namespace ESM
|
||||
|
||||
struct DoorState final : public ObjectState
|
||||
{
|
||||
int mDoorState = 0;
|
||||
int32_t mDoorState = 0;
|
||||
|
||||
void load(ESMReader& esm) override;
|
||||
void save(ESMWriter& esm, bool inInventory = false) const override;
|
||||
|
@ -17,7 +17,7 @@ namespace ESM
|
||||
|
||||
static constexpr std::string_view getRecordType() { return "Filter"; }
|
||||
|
||||
unsigned int mRecordFlags;
|
||||
uint32_t mRecordFlags;
|
||||
RefId mId;
|
||||
|
||||
std::string mDescription;
|
||||
|
Loading…
Reference in New Issue
Block a user