- Internal enums were resized to occupy single byte.
- Duration bitmask uses 16 bit integer directly instead of std::bitset<11> which consumed 8 bytes.
- Fields shuffled to minimise padding and keep the most useful data on first 2 cache lines.
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes
Moved without changes:
Languages.h -> texts/Languages.h
MetaString.* -> texts/MetaString.*
TextOperations.* -> texts/TextOperations.*
Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
-> texts/CLegacyConfigParser.*
-> texts/TextLocalizationContainer.*
-> texts/TextIdentifier.h
Added a new div-function to resource-sets. It allows to calculate the amount of times one resource set, for example income, has to be accumulated in order to reach another resource-set, for example required resource. It will return INT_MAX if it's impossible.
Restored the "<" operator-function and made it actually work like it's supposed to.
In cases where the file name was not specified, the warning messages were not very useful.
Example:
```json
File <unknown> is not a valid JSON file!
At line 33, position 1 warning: Comma expected!
{
"name" : "New Old Heroes",
"description" : "New heroes based on old 3DO artwork and other game appearances. Requires Horn of the Abyss.",
"modType" : "Heroes",
"version" : "1.2.0",
"author" : "Aphra",
"contact" : "",
"heroes" :
[
"config/gwenneth.json",
"config/balindar.json",
"config/nicolas.json",
"config/kastore.json",
"config/kydoimos.json",
"config/athe.json",
"config/miseria.json",
"config/areshrak.json",
"config/pactal.json",
"config/zog.json"
],
"changelog" :
{
"1.0.0" : ["Initial release"],
"1.1.0" : ["Added Nicolas Gryphonheart and Kastore"],
"1.1.1" : ["Bug fixes"],
"1.2.0" : ["Added some HotA portrait-only campaign heroes"]
},
"depends" :
[ "hota.neutralCreatures" ]
"keepDisabled" : true
}
```
The magic-strength of a hero now checks if the hero has a spellbook and at least one combat-spell.
The impact of knowledge and spellpower to the hero's magic-strength is now also depending on it's current and max mana-pool-size as an empty mana-pool does not exactly contribute well to fights.
Replaced every call of getFightingStrength() with getHeroStrength() which uses both the fightingStrength and the (reworked) magicStrength to guess how much stronger a hero-lead army is.