Browse Source

🚚 Rename 'TextDataStruct' struct to 'Speech' (#2805)

pull/2815/head
Juliano Leal Goncalves 5 years ago committed by GitHub
parent
commit
9f4438fa22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      Source/minitext.cpp
  2. 2
      Source/monster.cpp
  3. 2
      Source/textdat.cpp
  4. 4
      Source/textdat.h

8
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)

2
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) {

2
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..."),

4
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

Loading…
Cancel
Save