MCPcopy Create free account
hub / github.com/ddnet/ddnet / QuadsText

Method QuadsText

src/engine/client/graphics_threaded.cpp:1010–1037  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1008}
1009
1010void CGraphics_Threaded::QuadsText(float x, float y, float Size, const char *pText)
1011{
1012 float StartX = x;
1013
1014 while(*pText)
1015 {
1016 char c = *pText;
1017 pText++;
1018
1019 if(c == '\n')
1020 {
1021 x = StartX;
1022 y += Size;
1023 }
1024 else
1025 {
1026 QuadsSetSubset(
1027 (c % 16) / 16.0f,
1028 (c / 16) / 16.0f,
1029 (c % 16) / 16.0f + 1.0f / 16.0f,
1030 (c / 16) / 16.0f + 1.0f / 16.0f);
1031
1032 CQuadItem QuadItem(x, y, Size, Size);
1033 QuadsDrawTL(&QuadItem, 1);
1034 x += Size / 2;
1035 }
1036 }
1037}
1038
1039void CGraphics_Threaded::DrawRectExt(float x, float y, float w, float h, float r, int Corners)
1040{

Callers 2

ShowInfoMethod · 0.80
RenderDebugMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected