From 9f4438fa2288db1efca07bda9eb695debe992e49 Mon Sep 17 00:00:00 2001 From: Juliano Leal Goncalves Date: Mon, 6 Sep 2021 12:47:07 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=9A=20Rename=20'TextDataStruct'=20stru?= =?UTF-8?q?ct=20to=20'Speech'=20(#2805)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/minitext.cpp | 8 ++++---- Source/monster.cpp | 2 +- Source/textdat.cpp | 2 +- Source/textdat.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Source/minitext.cpp b/Source/minitext.cpp index 52e7d83a7..925a3f0f3 100644 --- a/Source/minitext.cpp +++ b/Source/minitext.cpp @@ -146,14 +146,14 @@ void InitQuestText() */ void InitQTextMsg(_speech_id m) { - if (Texts[m].scrlltxt) { + if (Speeches[m].scrlltxt) { QuestLogIsOpen = false; - LoadText(_(Texts[m].txtstr)); + LoadText(_(Speeches[m].txtstr)); qtextflag = true; - qtextSpd = CalculateTextSpeed(Texts[m].sfxnr); + qtextSpd = CalculateTextSpeed(Speeches[m].sfxnr); ScrollStart = SDL_GetTicks(); } - PlaySFX(Texts[m].sfxnr); + PlaySFX(Speeches[m].sfxnr); } void DrawQTextBack(const Surface &out) diff --git a/Source/monster.cpp b/Source/monster.cpp index 4c8246f7e..54510a974 100644 --- a/Source/monster.cpp +++ b/Source/monster.cpp @@ -1729,7 +1729,7 @@ bool MonsterTalk(Monster &monster) { M_StartStand(monster, monster._mdir); monster._mgoal = MGOAL_TALKING; - if (effect_is_playing(Texts[monster.mtalkmsg].sfxnr)) + if (effect_is_playing(Speeches[monster.mtalkmsg].sfxnr)) return false; InitQTextMsg(monster.mtalkmsg); if (monster._uniqtype - 1 == UMT_GARBUD) { diff --git a/Source/textdat.cpp b/Source/textdat.cpp index 0153b1600..20f1b491c 100644 --- a/Source/textdat.cpp +++ b/Source/textdat.cpp @@ -11,7 +11,7 @@ namespace devilution { /* todo: move text out of struct */ /** Contains the data related to each speech ID. */ -const TextDataStruct Texts[] = { +const Speech Speeches[] = { { N_(/* TRANSLATORS: Quest dialog spoken by Cain */ " Ahh, the story of our King, is it? The tragic fall of Leoric was a harsh blow to this land. The people always loved the King, and now they live in mortal fear of him. The question that I keep asking myself is how he could have fallen so far from the Light, as Leoric had always been the holiest of men. Only the vilest powers of Hell could so utterly destroy a man from within..."), true, TSFX_STORY1 }, { N_(/* TRANSLATORS: Quest dialog spoken by Ogden */ "The village needs your help, good master! Some months ago King Leoric's son, Prince Albrecht, was kidnapped. The King went into a rage and scoured the village for his missing child. With each passing day, Leoric seemed to slip deeper into madness. He sought to blame innocent townsfolk for the boy's disappearance and had them brutally executed. Less than half of us survived his insanity...\n \nThe King's Knights and Priests tried to placate him, but he turned against them and sadly, they were forced to kill him. With his dying breath the King called down a terrible curse upon his former followers. He vowed that they would serve him in darkness forever...\n \nThis is where things take an even darker twist than I thought possible! Our former King has risen from his eternal sleep and now commands a legion of undead minions within the Labyrinth. His body was buried in a tomb three levels beneath the Cathedral. Please, good master, put his soul at ease by destroying his now cursed form..."), diff --git a/Source/textdat.h b/Source/textdat.h index a81ec29d9..edfa444f1 100644 --- a/Source/textdat.h +++ b/Source/textdat.h @@ -422,12 +422,12 @@ enum _speech_id : int16_t { TEXT_NONE = -1, }; -struct TextDataStruct { +struct Speech { const char *txtstr; bool scrlltxt; _sfx_id sfxnr; }; -extern const TextDataStruct Texts[]; +extern const Speech Speeches[]; } // namespace devilution