MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / displayTextNoSpacing

Method displayTextNoSpacing

engine/src/text.cpp:51–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51void Font::displayTextNoSpacing(float x, float y, float w, float h,
52 float r, float g, float b, const char *string)
53{
54 float w_x = x;
55 float w_y = y + h;
56 int length = static_cast<int>(strlen(string));
57
58 float ds = w / 8.0f;
59
60 glBindTexture(GL_TEXTURE_2D, *(atlas->texture));
61 glColor4f(r, g, b, 1.0f);
62
63 for (int i = 0; i < length; i++)
64 {
65 BitmapCharacter(w_x, w_y, w, -h, string[i]);
66 w_x += w;
67 }
68}
69
70void Font::displayScreenText(int x, int y, float r, float g, float b, const char *string)
71{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected