1
0
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:
Evil Eye 2023-10-24 17:23:54 +02:00
parent 26ff56f150
commit 77c978c226
6 changed files with 12 additions and 13 deletions

View File

@ -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;

View File

@ -9,7 +9,7 @@ namespace ESM
struct CreatureLevListState final : public ObjectState
{
int mSpawnActorId;
int32_t mSpawnActorId;
bool mSpawn;
void load(ESMReader& esm) override;

View File

@ -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
{

View File

@ -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;

View File

@ -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;

View File

@ -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;