added draft and natstat with their requirements

This commit is contained in:
Geoffray Levasseur committed 2026-11-03 14:25:34 +01:00
1 parent 6513c6f8ec
commit 1667e18dda
10 files changed
+1542

No files matched your search

+43
View File
@@ -32,7 +32,10 @@
#include "Cevo/Protocol.h"
#include "ClientTools.h"
#include <QString>
#include <array>
#include <functional>
namespace Cevo {
namespace Term {
@@ -80,5 +83,45 @@ extern Dpi::Bitmap *smallImp;
// from bigImp, substituting the age-specific palace graphic for imPalace.
void impImage(Dpi::Canvas &canvas, int x, int y, int iix, int government = -1, bool isControl = false);
// Term.pas's `OptionChecked: TSaveOptions;` (user-configurable UI options).
extern ClientTools::SaveOptions optionChecked;
// Term.pas's `Supervising: Boolean;` (true when controlling player 0 is
// 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.
struct DipMemEntry {
int pContact = -1;
};
extern std::array<DipMemEntry, nPl> dipMem;
// Term.pas's RoughCredibility(): buckets a 0..100 credibility value into a
// 4-level rating (0..3) for display.
int roughCredibility(int credibility);
// ScreenTools.pas's TurnToString(): turnToYear() formatted as "<n> BC"/"AD
// <n>" (or the plain turn number if `generateNames` is off). Lives here
// rather than in the widget-layer CevoScreenTools.h since it needs
// Global::generateNames (a game-layer symbol widget/ mustn't depend on).
QString turnToString(int turn);
// Term.pas's `MainScreen: TMainScreen` instance isn't ported; these mirror
// its DipCall()/ContactRefused() methods as injection points other leaf
// dialogs can call into once Term.pas/Nego.pas exist. Default to safe
// no-ops (DipCall "not executed", ContactRefused "not refused") so callers
// relying on them just see "nothing happened" rather than crashing.
extern std::function<int(int command)> mainScreenDipCall;
extern std::function<bool(int p, const QString &item)> mainScreenContactRefused;
// Term.pas's ChooseModelPicture()/InitMyModel(): assigns a visual "picture"
// to a developed/enemy unit model. Simplified - always takes the
// "non-original tribe" path (dispatches straight through
// Tribe::setModelPicture()) since the network cSet*ModelPicture command
// plumbing isn't ported, and the mkSlaves (Code==74) special case isn't
// handled either (narrow edge case, not reached by anything ported so far).
void chooseModelPicture(int p, int mix, int code, int hash, int turn, bool forceNew, bool final);
void initMyModel(int mix, bool final);
} // namespace Term
} // namespace Cevo