🚚 Rename 'QuestData' global array to 'QuestsData'
This will allow us to disambiguate from the 'QuestDataStruct' after the 'Struct' suffix is removed.
This commit is contained in:
parent
d4a5868a89
commit
ce23cd6bce
5 changed files with 12 additions and 12 deletions
|
|
@ -331,7 +331,7 @@ std::string DebugCmdQuest(const string_view parameter)
|
|||
for (auto &quest : Quests) {
|
||||
if (IsNoneOf(quest._qactive, QUEST_NOTAVAIL, QUEST_INIT))
|
||||
continue;
|
||||
ret.append(fmt::format(", {} ({})", quest._qidx, QuestData[quest._qidx]._qlstr));
|
||||
ret.append(fmt::format(", {} ({})", quest._qidx, QuestsData[quest._qidx]._qlstr));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -355,12 +355,12 @@ std::string DebugCmdQuest(const string_view parameter)
|
|||
auto &quest = Quests[questId];
|
||||
|
||||
if (IsNoneOf(quest._qactive, QUEST_NOTAVAIL, QUEST_INIT))
|
||||
return fmt::format("{} was already given.", QuestData[questId]._qlstr);
|
||||
return fmt::format("{} was already given.", QuestsData[questId]._qlstr);
|
||||
|
||||
quest._qactive = QUEST_ACTIVE;
|
||||
quest._qlog = true;
|
||||
|
||||
return fmt::format("{} enabled.", QuestData[questId]._qlstr);
|
||||
return fmt::format("{} enabled.", QuestsData[questId]._qlstr);
|
||||
}
|
||||
|
||||
std::string DebugCmdLevelUp(const string_view parameter)
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ byte *DeltaExportJunk(byte *dst)
|
|||
|
||||
int q = 0;
|
||||
for (auto &quest : Quests) {
|
||||
if (!QuestData[quest._qidx].isSinglePlayerOnly) {
|
||||
if (!QuestsData[quest._qidx].isSinglePlayerOnly) {
|
||||
sgJunk.quests[q].qlog = quest._qlog ? 1 : 0;
|
||||
sgJunk.quests[q].qstate = quest._qactive;
|
||||
sgJunk.quests[q].qvar1 = quest._qvar1;
|
||||
|
|
@ -276,7 +276,7 @@ void DeltaImportJunk(byte *src)
|
|||
|
||||
int q = 0;
|
||||
for (auto &quest : Quests) {
|
||||
if (!QuestData[quest._qidx].isSinglePlayerOnly) {
|
||||
if (!QuestsData[quest._qidx].isSinglePlayerOnly) {
|
||||
memcpy(&sgJunk.quests[q], src, sizeof(MultiQuests));
|
||||
src += sizeof(MultiQuests);
|
||||
quest._qlog = sgJunk.quests[q].qlog != 0;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ dungeon_type ReturnLevelType;
|
|||
int ReturnLevel;
|
||||
|
||||
/** Contains the data related to each quest_id. */
|
||||
QuestDataStruct QuestData[] = {
|
||||
QuestDataStruct QuestsData[] = {
|
||||
// clang-format off
|
||||
// _qdlvl, _qdmultlvl, _qlvlt, bookOrder, _qdrnd, _qslvl, isSinglePlayerOnly, _qdmsg, _qlstr
|
||||
{ 5, -1, DTYPE_NONE, 5, 100, SL_NONE, true, TEXT_INFRA5, N_( /* TRANSLATORS: Quest Name Block */ "The Magic Rock") },
|
||||
|
|
@ -301,7 +301,7 @@ void InitQuests()
|
|||
int q = 0;
|
||||
for (auto &quest : Quests) {
|
||||
quest._qidx = static_cast<quest_id>(q);
|
||||
auto &questData = QuestData[q];
|
||||
auto &questData = QuestsData[q];
|
||||
q++;
|
||||
|
||||
quest._qactive = QUEST_NOTAVAIL;
|
||||
|
|
@ -751,7 +751,7 @@ void DrawQuestLog(const Surface &out)
|
|||
if (i == firstFinishedEntry) {
|
||||
y += act2finSpacing;
|
||||
}
|
||||
PrintQLString(out, x, y, _(QuestData[qlist[i]]._qlstr), i == selectedEntry, i >= firstFinishedEntry);
|
||||
PrintQLString(out, x, y, _(QuestsData[qlist[i]]._qlstr), i == selectedEntry, i >= firstFinishedEntry);
|
||||
y += lineSpacing;
|
||||
}
|
||||
}
|
||||
|
|
@ -760,7 +760,7 @@ void StartQuestlog()
|
|||
{
|
||||
|
||||
auto sortQuestIdx = [](int a, int b) {
|
||||
return QuestData[a].questBookOrder < QuestData[b].questBookOrder;
|
||||
return QuestsData[a].questBookOrder < QuestsData[b].questBookOrder;
|
||||
};
|
||||
|
||||
qlistCnt = 0;
|
||||
|
|
@ -873,7 +873,7 @@ bool Quest::IsAvailable()
|
|||
return false;
|
||||
if (_qactive == QUEST_NOTAVAIL)
|
||||
return false;
|
||||
if (gbIsMultiplayer && QuestData[_qidx].isSinglePlayerOnly)
|
||||
if (gbIsMultiplayer && QuestsData[_qidx].isSinglePlayerOnly)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -105,6 +105,6 @@ void QuestlogESC();
|
|||
void SetMultiQuest(int q, quest_state s, bool log, int v1);
|
||||
|
||||
/* rdata */
|
||||
extern QuestDataStruct QuestData[];
|
||||
extern QuestDataStruct QuestsData[];
|
||||
|
||||
} // namespace devilution
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,7 @@ void StartTalk()
|
|||
|
||||
for (auto &quest : Quests) {
|
||||
if (quest._qactive == QUEST_ACTIVE && QuestDialogTable[talker][quest._qidx] != TEXT_NONE && quest._qlog) {
|
||||
AddSText(0, sn, _(QuestData[quest._qidx]._qlstr), UiFlags::ColorSilver | UiFlags::AlignCenter, true);
|
||||
AddSText(0, sn, _(QuestsData[quest._qidx]._qlstr), UiFlags::ColorSilver | UiFlags::AlignCenter, true);
|
||||
sn += la;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue