MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / DrawObject

Method DrawObject

engine/Poseidon/Game/TitEffects.cpp:337–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335{
336 float top = 0.5 + _textYOffset;
337 PackedColor fColor(Color(1, 1, 1, _alpha));
338 const TitleShadowOffset shadow = SubtitleShadowOffset(GEngine->Width2D(), GEngine->Height2D());
339 for (int i = 0; i < _texts.Size(); i++)
340 {
341 RString text = _texts[i];
342 float width = GEngine->GetTextWidth(_textSize, _textFont, text);
343 float x = 0.5 - width * 0.5;
344 PackedColor bColor(Color(0, 0, 0, _alpha * 0.3));
345 GEngine->DrawText(Point2DFloat(x + shadow.x, top + shadow.y), _textSize, _textFont, bColor, text);
346 GEngine->DrawText(Point2DFloat(x, top), _textSize, _textFont, fColor, text);
347 top += _textSize;
348 }
349}
350
351void TitleEffectBasic::DrawObject()
352{
353 if (!GScene->GetCamera())
354 {
355 return;
356 }
357 // temporary override camera
358 Camera oldCam = *GScene->GetCamera();
359 Camera cam;
360 cam.SetPosition(_objectCamera);
361
362 float fov = 0.7;

Callers

nothing calls this directly

Calls 11

saturateFunction · 0.85
ColorClass · 0.85
GetCameraMethod · 0.80
SetPerspectiveForViewMethod · 0.80
GetFogMaxRangeMethod · 0.80
AdjustMethod · 0.80
SetCameraMethod · 0.80
SetPositionMethod · 0.45
ZMethod · 0.45
SetConstantColorMethod · 0.45
DrawMethod · 0.45

Tested by

no test coverage detected