Refactors constants out of Disciplines.h.

This commit is contained in:
2023-04-25 13:32:50 -07:00
parent 053da18030
commit c3cd1e65ff
5 changed files with 70 additions and 65 deletions

View File

@@ -13,6 +13,7 @@
#include "Utils.h"
#include "sbf-cpp/Abilities.h"
#include "sbf-cpp/Backgrounds.h"
#include "sbf-cpp/Disciplines.h"
namespace SBF {
namespace {
@@ -209,7 +210,7 @@ void CGSpendDisciplinePoint(CharacterType& ch) {
MaybeClearScreen();
MenuStyle ms;
ms.show_cancel = true;
ms.cancel_item_id = kDisciplinesCount + 1;
ms.cancel_item_id = GetNumDisciplines() + 1;
vector<int> values = ch.GetDisciplineValues();
vector<string> labels;
FillDisciplineLabels(labels);
@@ -345,7 +346,7 @@ void ShowCharacterSheet(CharacterType& ch) {
const int kRightColumnWidth = 37;
vector<string> discipline_strings;
size_t index;
for (index = 1; index <= kDisciplinesCount; index++) {
for (index = 1; index <= GetNumDisciplines(); index++) {
int value = ch.GetDisciplineValue(index);
if (value > 0) {
string suffix = "";