66 { 225, 252, 325, 293 }
71 { 376, 252, 476, 293 }
81 { 225, 311, 325, 352 }
86 { 376, 311, 476, 352 }
96 { 225, 371, 325, 412 }
101 { 376, 371, 476, 412 }
106 { 77, 432, 177, 473 }
111 { 225, 432, 325, 473 }
116 { 362, 434, 489, 470 }
121 constexpr std::array<
127 { 40, 254, 260, 316 }
132 { 545, 255, 765, 317 }
137 { 290, 255, 510, 317 }
142 { 290, 328, 510, 390 }
155 constexpr std::array<
161 { 52, 254, 272, 316 }
166 { 291, 254, 511, 316 }
171 { 532, 254, 752, 316 }
179 constexpr std::array<
200 constexpr std::array<
216 const int raw =
static_cast<int>(language);
217 return raw >= 2 &&
raw <= 10 ?
raw - 2 : 0;
222 state.currencySelection[0] =
state.citySelected;
232 state.currencySelectionIndex =
233 (
state.currencySelectionIndex + direction + 3) % 3;
301 slot =
static_cast<std::size_t
>(
302 static_cast<std::uint8_t
>(
button) -
340 state.currencySelectionIndex = 0;
347 if (
state.aiLevel > 0)
393 state.tokenNames.size())
399 std::wstring result =
409 const std::size_t maximum =
416 if (result.size() > maximum)
418 result.resize(maximum);
455 std::wstring_view
name)
458 state.tokenNames.size())
473 state.hasPlayerLogEntries = available;
477 state.playerLogCount = 0;
478 state.playerLogPageStart = 0;
479 state.playerLog = {};
487 std::span<const std::wstring> entries)
489 state.playerLog = {};
490 state.playerLogCount = 0;
491 state.playerLogPageStart = 0;
496 state.playerLogCount >=
state.playerLog.size())
507 player <
uiState.numberOfPlayers;
521 state.hasPlayerLogEntries =
state.playerLogCount != 0;
527 std::wstring_view
name)
529 std::wstring result(
name);
570 if (!
state.hasPlayerLogEntries)
606 player <
uiState.numberOfPlayers;
610 uiState.players[player].token ==
624 std::uint8_t currentToken)
628 const std::uint8_t original =
629 static_cast<std::uint8_t
>(
636 static_cast<std::uint8_t
>(
647 if (
uiState.numberOfPlayers == 0)
666 static_cast<std::uint8_t
>(
674 if (
token == original)
685 std::wstring_view
name)
690 std::uint8_t
token = 0;
717 const std::uint8_t original =
718 static_cast<std::uint8_t
>(
728 if (
uiState.numberOfPlayers == 0)
736 bool available =
true;
741 player <
uiState.numberOfPlayers;
745 uiState.players[player].colour ==
761 static_cast<std::uint8_t
>(
964 if (
state.playerLogPageStart >=
state.playerLogCount)
965 state.playerLogPageStart = 0;
970 std::size_t
slot = 0;
1037 if (
state.aiLevel > 0)
1156 state.startButtonPressed =
1164 if (
state.serverMode)
1274 ?
state.citySelected + 1 : 0;
1290 command.city =
state.citySelected;
1291 command.system =
state.currencySelection[
state.currencySelectionIndex];
1297 command.city =
state.citySelected;
1298 command.system =
state.currencySelection[
state.currencySelectionIndex];
1315 ?
state.citySelected - 1 : UsaCityCount - 1;
1319 state.citySelected =
state.citySelected < UsaCityCount - 1
1320 ?
state.citySelected + 1 : 0;
1324 state.citySelected = 0;
1333 command.city =
state.citySelected;
1349 state.customRulesDesired =
true;
1354 state.customRulesDesired =
false;
1369 if (
state.serverMode)
1415 std::uint8_t choice)
1426 command.setupRule = rule;
1427 command.ruleChoice = choice;
1469 state.desiredPhase =