MCPcopy Create free account
hub / github.com/ZDoom/Raze / drawMapTitle

Function drawMapTitle

source/core/statusbar2.cpp:177–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

175}
176
177void drawMapTitle()
178{
179 if (!hud_showmapname || levelTextTime <= 0 || M_Active())
180 return;
181
182 double alpha = levelTextTime > 16? 1.0 : levelTextTime / 16.;
183 if (alpha > 0)
184 {
185 double scale = isRR()? 0.4 : isSWALL()? 0.7 : 1.0;
186 auto text = currentLevel->DisplayName();
187 auto myfont = PickBigFont(text);
188 double x = 160 - myfont->StringWidth(text) * scale / 2.;
189 double y = isBlood() ? 50 : 100 - myfont->GetHeight()/2.;
190 bool shadow = true;
191
192 if (shadow)
193 {
194 DrawText(twod, myfont, CR_UNTRANSLATED, x+1, y+1, text, DTA_FullscreenScale, FSMode_Fit320x200, DTA_Color, 0xff000000, DTA_Alpha, alpha / 2., DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
195 }
196 DrawText(twod, myfont, CR_UNTRANSLATED, x, y, text, DTA_FullscreenScale, FSMode_Fit320x200, DTA_Alpha, alpha, DTA_ScaleX, scale, DTA_ScaleY, scale, TAG_DONE);
197 }
198}
199
200void DrawAltHUD(SummaryInfo* info);
201

Callers 1

DisplayFunction · 0.85

Calls 9

M_ActiveFunction · 0.85
isRRFunction · 0.85
isSWALLFunction · 0.85
PickBigFontFunction · 0.85
isBloodFunction · 0.85
DrawTextFunction · 0.85
DisplayNameMethod · 0.80
StringWidthMethod · 0.45
GetHeightMethod · 0.45

Tested by

no test coverage detected