MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / InitQTextMsg

Function InitQTextMsg

Source/minitext.cpp:135–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133}
134
135void InitQTextMsg(_speech_id m)
136{
137 _sfx_id sfxnr = Speeches[m].sfxnr;
138 const _sfx_id *classSounds = herosounds[static_cast<size_t>(MyPlayer->_pClass)];
139 switch (sfxnr) {
140 case PS_WARR1:
141 sfxnr = classSounds[static_cast<size_t>(HeroSpeech::ChamberOfBoneLore)];
142 break;
143 case PS_WARR10:
144 sfxnr = classSounds[static_cast<size_t>(HeroSpeech::ValorLore)];
145 break;
146 case PS_WARR11:
147 sfxnr = classSounds[static_cast<size_t>(HeroSpeech::HallsOfTheBlindLore)];
148 break;
149 case PS_WARR12:
150 sfxnr = classSounds[static_cast<size_t>(HeroSpeech::WarlordOfBloodLore)];
151 break;
152 case PS_WARR54:
153 sfxnr = classSounds[static_cast<size_t>(HeroSpeech::InSpirituSanctum)];
154 break;
155 case PS_WARR55:
156 sfxnr = classSounds[static_cast<size_t>(HeroSpeech::PraedictumOtium)];
157 break;
158 case PS_WARR56:
159 sfxnr = classSounds[static_cast<size_t>(HeroSpeech::EfficioObitusUtInimicus)];
160 break;
161 default:
162 break;
163 }
164 if (Speeches[m].scrlltxt) {
165 QuestLogIsOpen = false;
166 LoadText(_(Speeches[m].txtstr));
167 qtextflag = true;
168 qtextSpd = CalculateTextSpeed(sfxnr);
169 ScrollStart = SDL_GetTicks();
170 }
171 PlaySFX(sfxnr);
172}
173
174void DrawQTextBack(const Surface &out)
175{

Callers 15

OperateBookLeverFunction · 0.85
OperateChamberOfBoneBookFunction · 0.85
OperateStoryBookFunction · 0.85
TalkEnterFunction · 0.85
QuestlogEnterFunction · 0.85
MonsterTalkFunction · 0.85
UseInvItemFunction · 0.85
TownerTalkFunction · 0.85
TalkToBarOwnerFunction · 0.85
TalkToDeadguyFunction · 0.85
TalkToBlackSmithFunction · 0.85
TalkToWitchFunction · 0.85

Calls 3

LoadTextFunction · 0.85
CalculateTextSpeedFunction · 0.85
PlaySFXFunction · 0.70

Tested by

no test coverage detected