MCPcopy Create free account
hub / github.com/demoth/jake2 / Draw_Char

Method Draw_Char

client/src/main/java/jake2/client/render/fast/Draw.java:67–94  ·  view source on GitHub ↗
(int x, int y, int num)

Source from the content-addressed store, hash-verified

65 ================
66 */
67 public void Draw_Char(int x, int y, int num) {
68
69 num &= 255;
70
71 if ( (num&127) == 32 ) return; // space
72
73 if (y <= -8) return; // totally off screen
74
75 int row = num>>4;
76 int col = num&15;
77
78 float frow = row*0.0625f;
79 float fcol = col*0.0625f;
80 float size = 0.0625f;
81
82 GL_Bind(draw_chars.texnum);
83
84 gl.glBegin (GL_QUADS);
85 gl.glTexCoord2f (fcol, frow);
86 gl.glVertex2f (x, y);
87 gl.glTexCoord2f (fcol + size, frow);
88 gl.glVertex2f (x+8, y);
89 gl.glTexCoord2f (fcol + size, frow + size);
90 gl.glVertex2f (x+8, y+8);
91 gl.glTexCoord2f (fcol, frow + size);
92 gl.glVertex2f (x, y+8);
93 gl.glEnd ();
94 }
95
96
97 /*

Callers

nothing calls this directly

Calls 5

glBeginMethod · 0.65
glTexCoord2fMethod · 0.65
glVertex2fMethod · 0.65
glEndMethod · 0.65
GL_BindMethod · 0.45

Tested by

no test coverage detected