From bc7e154643329d08c9230d9041c54ff114aaf3fe Mon Sep 17 00:00:00 2001 From: Marco Melletti Date: Thu, 4 Sep 2014 13:23:29 +0200 Subject: [PATCH] done with header files, unsure about mSkills and mReputation in loadnpc.hpp --- components/esm/loadnpc.hpp | 3 ++- components/esm/loadregn.hpp | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/esm/loadnpc.hpp b/components/esm/loadnpc.hpp index ff255608f..31104a71f 100644 --- a/components/esm/loadnpc.hpp +++ b/components/esm/loadnpc.hpp @@ -80,7 +80,8 @@ struct NPC mPersonality, mLuck; - char mSkills[Skill::Length]; + // mSkill vals are used only in MWMechanics::AttributeValue.setBase(), if less than 0 they are not considered + unsigned char mSkills[Skill::Length]; // at opencs/model/tools/referenceablecheck.cpp:679 is assumed that negative reputation values are invalid, can we assume we won't find any negative value? unsigned char mReputation; diff --git a/components/esm/loadregn.hpp b/components/esm/loadregn.hpp index 1992c951b..c231b6aa0 100644 --- a/components/esm/loadregn.hpp +++ b/components/esm/loadregn.hpp @@ -24,10 +24,11 @@ struct Region #pragma pack(1) struct WEATstruct { - // I guess these are probabilities - char mClear, mCloudy, mFoggy, mOvercast, mRain, mThunder, mAsh, mBlight, + // These are probabilities that add up to 100 + unsigned char mClear, mCloudy, mFoggy, mOvercast, mRain, mThunder, mAsh, mBlight, // Unknown weather, probably snow and something. Only // present in file version 1.3. + // the engine uses mA as "snow" and mB as "blizard" mA, mB; }; // 10 bytes @@ -35,7 +36,7 @@ struct Region struct SoundRef { NAME32 mSound; - char mChance; + unsigned char mChance; }; // 33 bytes #pragma pack(pop)