added nego with deps
This commit is contained in:
1 parent
d65065644e
commit
1da33b4cf7
6 files changed
+1208
-2
No files matched your search
+23
-2
@@ -33,10 +33,13 @@
|
||||
#include "Cevo/Protocol.h"
|
||||
#include "ClientTools.h"
|
||||
#include "MessgEx.h"
|
||||
#include "NatStat.h"
|
||||
#include "Select.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <array>
|
||||
#include <bitset>
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
|
||||
@@ -109,13 +112,23 @@ extern ClientTools::SaveOptions optionChecked;
|
||||
// just observing rather than playing a nation).
|
||||
extern bool supervising;
|
||||
|
||||
// Term.pas's `TDipMem` (per-nation negotiation session memory) - only the
|
||||
// one field (`pContact`) anything needs so far.
|
||||
// Term.pas's `TDipMem` (per-nation negotiation session memory).
|
||||
struct DipMemEntry {
|
||||
int pContact = -1;
|
||||
// Nego.pas's own negotiation-session bookkeeping (added for Nego.pas).
|
||||
int formerTreaty = trNone;
|
||||
int sentCommand = 0;
|
||||
TOffer sentOffer{};
|
||||
// TPriceSet = set of $00..$FF (price-category bytes, i.e. opXxx >> 24).
|
||||
std::bitset<256> deliveredPrices;
|
||||
std::bitset<256> receivedPrices;
|
||||
};
|
||||
extern std::array<DipMemEntry, nPl> dipMem;
|
||||
|
||||
// Term.pas's `ReceivedOffer: TOffer;` (the opponent's current negotiation
|
||||
// offer, as last received from the server).
|
||||
extern TOffer receivedOffer;
|
||||
|
||||
// Term.pas's RoughCredibility(): buckets a 0..100 credibility value into a
|
||||
// 4-level rating (0..3) for display.
|
||||
int roughCredibility(int credibility);
|
||||
@@ -227,6 +240,14 @@ extern std::function<bool(int cix)> listDlgRenameCity;
|
||||
// Mirrors `MainScreen.MessgExDlg` dialog access - returns nullptr by
|
||||
// default until Term.pas creates a real instance.
|
||||
extern std::function<MessgEx::MessgExDlg *()> mainScreenMessgExDlg;
|
||||
// Mirrors `MainScreen.ModalSelectDlg`/`MainScreen.NatStatDlg` dialog
|
||||
// access (the general, non-city-project form - see also
|
||||
// modalSelectDlgShowCityProject above for the city-project-only variant).
|
||||
extern std::function<Select::ListDlg *()> mainScreenModalSelectDlg;
|
||||
extern std::function<NatStat::NatStatDlg *()> mainScreenNatStatDlg;
|
||||
// Mirrors `MainScreen.OfferCall(var Offer: TOffer): Integer` - returns
|
||||
// eInvalid by default.
|
||||
extern std::function<int(const TOffer &offer)> mainScreenOfferCall;
|
||||
|
||||
} // namespace Term
|
||||
} // namespace Cevo
|
||||
Reference in new issue
Block a user