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 "Global.h"
#include "Tribes.h"
#include <QHash>
@@ -75,8 +76,7 @@ QString phraseTreaty(int treatyType)
QString phraseAdvance(int advance)
{
// Advance names (Rules.pas/StringTables.pas) aren't ported here.
return QStringLiteral("advance #%1").arg(advance);
return phrases.lookup(QStringLiteral("ADVANCES"), advance);
}
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)
{
return QStringLiteral("Advance #%1").arg(advance);
return phrases.lookup(QStringLiteral("ADVANCES"), advance);
}
QString impName(int iix)
{
return QStringLiteral("Improvement #%1").arg(iix);
return phrases.lookup(QStringLiteral("IMPROVEMENTS"), iix);
}
QString governmentName(int gov)
{
return QStringLiteral("Government #%1").arg(gov);
return phrases.lookup(QStringLiteral("GOVERNMENT"), gov);
}
QString spyMissionName(int mission)
{
return QStringLiteral("Mission #%1").arg(mission);
return phrases.lookup(QStringLiteral("SPYMISSION"), mission);
}
} // namespace
+4 -10
View File
@@ -29,16 +29,10 @@
// TMainScreen.Client() (Term.pas): the command dispatcher the server calls
// for the human player.
//
// PORT STATUS: served so far - cDebugMessage, cShowNego, cInitModule,
// cReleaseModule, cHelpOnly/cStartHelp/cStartCredits, cNewGame/cLoadGame/
// cMovie/cNewMap, cGetReady/cReplay, cBreakGame, cShowGame, cShowTurnChange,
// cTurn/cResume/cContinue, cMovieTurn/cMovieEndTurn, cEditMap, scContact,
// 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.
// Fully ported: every command handled by the original's top-level case
// statement is handled here too, including the cShowXxx move/combat
// feedback commands (delegated to clientShow(), see Term.MainScreen.Show.cpp)
// and cRefreshDebugMap.
#include "Term.MainScreen.h"
+3 -4
View File
@@ -1,11 +1,10 @@
// TMainScreen.InitTurn, NextUnit, EndTurn, ZoomToCity and CityClosed (Term.pas).
//
// 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
// 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.
// read from optionChecked, which the menus will keep in sync.
#include "Term.MainScreen.h"