This commit adds the DAPI server,the ProtoClient that the server uses to communicate with a front end client, and the supporting SFML networking files, with the necessary CMake file changes to integrate the new files.
Some code was moved from anonymous namespaces in DevilutionX to the devilution namespace so that DAPI server can access them.
This builds, but crashes at the SFML initialization.
* Shift item order when selling instead of using last item to fill the slot
Player has items i1, i2, i3, picked up in that order.
Previous Behavior:
1. Sell window at vendor shows i1, i2, i3.
2. Player sells i1
3. i3 is last in list and replaces i1
4. Sell window now shows i3, i2.
New Behavior:
1. Sell window at vendor shows i1, i2, i3.
2. Player sells i1
3. i2/i3 are shifted in index position down to fill the gap left by previous index.
4. Sell window now shows i2, i3.
* Remove whitespace
In C++, globals initialization order accross translation units is not
defined. Accessing a global via a function ensures that it is initialized.
This will be needed for #7638, which will statically initialize change
handlers after the Options object has been initialized.
Fix a bug that caused two-handed items not to able to be equipped
if there was an item in the right hand, but not in the left one
and also there wasn't enough space to place the right item TWO times.
This was unintended, obviously, the right item should only be checked for once.
Co-authored-by: Tully <166401925+Tully-B@users.noreply.github.com>
4 options args are a bit unwieldy, especially when you want
to pass only the first and the last one.
With a struct, there is no need to specify the default values
for the args in between.