final advance implementation

This commit is contained in:
Geoffray Levasseur committed 2026-11-07 00:58:34 +01:00
1 parent 57fd9973a1
commit 7d123a9542
4 files changed
+13 -20

No files matched your search

+2 -2
View File
@@ -28,6 +28,7 @@
#include "Diplomacy.h" #include "Diplomacy.h"
#include "Global.h"
#include "Tribes.h" #include "Tribes.h"
#include <QHash> #include <QHash>
@@ -75,8 +76,7 @@ QString phraseTreaty(int treatyType)
QString phraseAdvance(int advance) QString phraseAdvance(int advance)
{ {
// Advance names (Rules.pas/StringTables.pas) aren't ported here. return phrases.lookup(QStringLiteral("ADVANCES"), advance);
return QStringLiteral("advance #%1").arg(advance);
} }
QString priceToString(int p, std::uint32_t price) QString priceToString(int p, std::uint32_t price)
+4 -4
View File
@@ -104,22 +104,22 @@ QString phrase(const QString &key)
QString advanceName(int advance) QString advanceName(int advance)
{ {
return QStringLiteral("Advance #%1").arg(advance); return phrases.lookup(QStringLiteral("ADVANCES"), advance);
} }
QString impName(int iix) QString impName(int iix)
{ {
return QStringLiteral("Improvement #%1").arg(iix); return phrases.lookup(QStringLiteral("IMPROVEMENTS"), iix);
} }
QString governmentName(int gov) QString governmentName(int gov)
{ {
return QStringLiteral("Government #%1").arg(gov); return phrases.lookup(QStringLiteral("GOVERNMENT"), gov);
} }
QString spyMissionName(int mission) QString spyMissionName(int mission)
{ {
return QStringLiteral("Mission #%1").arg(mission); return phrases.lookup(QStringLiteral("SPYMISSION"), mission);
} }
} // namespace } // namespace
+4 -10
View File
@@ -29,16 +29,10 @@
// TMainScreen.Client() (Term.pas): the command dispatcher the server calls // TMainScreen.Client() (Term.pas): the command dispatcher the server calls
// for the human player. // for the human player.
// //
// PORT STATUS: served so far - cDebugMessage, cShowNego, cInitModule, // Fully ported: every command handled by the original's top-level case
// cReleaseModule, cHelpOnly/cStartHelp/cStartCredits, cNewGame/cLoadGame/ // statement is handled here too, including the cShowXxx move/combat
// cMovie/cNewMap, cGetReady/cReplay, cBreakGame, cShowGame, cShowTurnChange, // feedback commands (delegated to clientShow(), see Term.MainScreen.Show.cpp)
// cTurn/cResume/cContinue, cMovieTurn/cMovieEndTurn, cEditMap, scContact, // and cRefreshDebugMap.
// scDipStart..scDipBreak, the pure message commands (cShowCancelTreaty*,
// cShowSupportAllianceAgainst, cShowPeaceViolation, cShowMissionResult,
// cShowShipChange, cShowGreatLibTech), cShowEndContact and the client
// exclusive commands. Still missing because they need MoveUnit/ShowMove
// (not ported): cShowUnitChanged/CityChanged/AfterMove/AfterAttack/Moving/
// Capturing/Attacking, cRefreshDebugMap.
#include "Term.MainScreen.h" #include "Term.MainScreen.h"
+3 -4
View File
@@ -1,11 +1,10 @@
// TMainScreen.InitTurn, NextUnit, EndTurn, ZoomToCity and CityClosed (Term.pas). // TMainScreen.InitTurn, NextUnit, EndTurn, ZoomToCity and CityClosed (Term.pas).
// //
// PORT STATUS / deviations: // PORT STATUS / deviations:
// - sound (Play, SoundPreload) is not ported; // - SoundPreload() is deliberately not ported (Sound.pas's asset-preload
// step has no effect now that Sound.pas itself is a no-op, see Play());
// - the menu check marks the original reads (mRepScreens, mWaitTurn, ...) are // - the menu check marks the original reads (mRepScreens, mWaitTurn, ...) are
// read from optionChecked, which the menus will keep in sync; // read from optionChecked, which the menus will keep in sync.
// - InitTurn's continuation of multi-turn goto/terrain enhancement needs
// MoveUnit (not ported) and is marked TODO.
#include "Term.MainScreen.h" #include "Term.MainScreen.h"