MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / DrawSmallChar

Method DrawSmallChar

neo/renderer/RenderSystem.cpp:373–399  ·  view source on GitHub ↗

===================== idRenderSystemLocal::DrawSmallChar small chars are drawn at native screen resolution ===================== */

Source from the content-addressed store, hash-verified

371=====================
372*/
373void idRenderSystemLocal::DrawSmallChar( int x, int y, int ch, const idMaterial *material ) {
374 int row, col;
375 float frow, fcol;
376 float size;
377
378 ch &= 255;
379
380 if ( ch == ' ' ) {
381 return;
382 }
383
384 if ( y < -SMALLCHAR_HEIGHT ) {
385 return;
386 }
387
388 row = ch >> 4;
389 col = ch & 15;
390
391 frow = row * 0.0625f;
392 fcol = col * 0.0625f;
393 size = 0.0625f;
394
395 DrawStretchPic( x, y, SMALLCHAR_WIDTH, SMALLCHAR_HEIGHT,
396 fcol, frow,
397 fcol + size, frow + size,
398 material );
399}
400
401/*
402==================

Callers 4

DrawInputMethod · 0.80
DrawNotifyMethod · 0.80
DrawSolidConsoleMethod · 0.80
DrawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected