QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Generic draw functions

Modules

 QPic functions
 

Functions

void Draw_AltString (int x, int y, const char *str)
 Draws a character string to the screen. More...
 
void Draw_BlendScreen (quat_t color)
 Shift the screen colors. More...
 
void Draw_Character (int x, int y, unsigned ch)
 Draws one 8*8 graphics character with 0 being transparent. More...
 
void Draw_ConsoleBackground (int lines, byte alpha)
 Draw the console background with various optional effects. More...
 
void Draw_Crosshair (void)
 Draw a crosshair at the center of the screen. More...
 
void Draw_CrosshairAt (int ch, int x, int y)
 Draw the specified crosshair on the screen. More...
 
void Draw_FadeScreen (void)
 Darken the screen. More...
 
void Draw_Fill (int x, int y, int w, int h, int c)
 Clear a rectangle with a solid color. More...
 
void Draw_Init (void)
 Initialize the draw stuff. More...
 
void Draw_nString (int x, int y, const char *str, int count)
 Draws a character sub-string to the screen. More...
 
void Draw_String (int x, int y, const char *str)
 Draws a character string to the screen. More...
 
void Draw_TextBox (int x, int y, int width, int lines, byte alpha)
 Draw a text box on the screen. More...
 
void Draw_TileClear (int x, int y, int w, int h)
 Clear a rectangle with a tiled background. More...
 

Variables

bytedraw_chars
 

Detailed Description

Function Documentation

void Draw_AltString ( int  x,
int  y,
const char *  str 
)

Draws a character string to the screen.

No line wrapping is performed.

Parameters
xhorizontal location of the top left corner of the character.
yvertical location of the top left corner of the character.
str8 bit character string to draw.
Note
See Draw_Character() for character set description. String is normal nul terminated C string. Characters of the string are forced to have their high bit set (ie, they will be in the range 0x80-0xff).
void Draw_BlendScreen ( quat_t  color)

Shift the screen colors.

void Draw_Character ( int  x,
int  y,
unsigned  ch 
)

Draws one 8*8 graphics character with 0 being transparent.

It can be clipped to the top of the screen to allow the console to be smoothly scrolled off.

Parameters
xhorizontal location of the top left corner of the character.
yvertical location of the top left corner of the character.
ch8 bit character to draw.
Note
The character drawn is from the quake character set, which is (by default) standard ascii for 0x20-0x7e (white). 0xa0-0xfe is also standard ascii (brown). 0x01-0x1f and 0x80-0x9f are various drawing characters, and 0x7f is a backwards arrow.
void Draw_ConsoleBackground ( int  lines,
byte  alpha 
)

Draw the console background with various optional effects.

Parameters
linesVertical size in pixels of the console.
alphaConsole transparency level (255 = opaque).
Note
alpha is effective only in the OpenGL renderer. Effectively 255 (opaque) for the software renderer.

gl_conspin causes the background to spin.

gl_constretch causes the background to stretch rather than slide.

void Draw_Crosshair ( void  )

Draw a crosshair at the center of the screen.

crosshair specifies which crosshair (1 = '+', 2 = large 'x' shape, 3 = fancy '+' shape) cl_crossx and cl_crossy offset the crosshair from the center of the screen.

void Draw_CrosshairAt ( int  ch,
int  x,
int  y 
)

Draw the specified crosshair on the screen.

Parameters
chcrosshair to draw
xhorizontal position of the center of the crosshair.
yvertical position of the center of the crosshair.

See Draw_Crosshair() for description of crosshair values.

void Draw_FadeScreen ( void  )

Darken the screen.

void Draw_Fill ( int  x,
int  y,
int  w,
int  h,
int  c 
)

Clear a rectangle with a solid color.

Parameters
xhorizontal position of the upper left corner of the rectangle
yhorizontal position of the upper left corner of the rectangle
wwidth of the rectangle
hheight of the rectangle
c8 bit color index.

The color comes from the quake palette.

void Draw_Init ( void  )

Initialize the draw stuff.

void Draw_nString ( int  x,
int  y,
const char *  str,
int  count 
)

Draws a character sub-string to the screen.

No line wrapping is performed.

Parameters
xhorizontal location of the top left corner of the character.
yvertical location of the top left corner of the character.
str8 bit character string to draw.
countMaximum characters of the string to draw.
Note
See Draw_Character() for character set description. Draws up to count characters, or stops at the first nul character.
void Draw_String ( int  x,
int  y,
const char *  str 
)

Draws a character string to the screen.

No line wrapping is performed.

Parameters
xhorizontal location of the top left corner of the character.
yvertical location of the top left corner of the character.
str8 bit character string to draw.
Note
See Draw_Character() for character set description. String is normal nul terminated C string.
void Draw_TextBox ( int  x,
int  y,
int  width,
int  lines,
byte  alpha 
)

Draw a text box on the screen.

Parameters
xhorizontal location of the upper left corner of the box
yvertical location of the upper left corner of the box
widthhorizontal size in character cells of the region
linesvertical size in character cells of the region
alphatransparency of the box
void Draw_TileClear ( int  x,
int  y,
int  w,
int  h 
)

Clear a rectangle with a tiled background.

Parameters
xhorizontal position of the upper left corner of the rectangle
yhorizontal position of the upper left corner of the rectangle
wwidth of the rectangle
hheight of the rectangle

The background used is the "backtile" WAD lump.

Variable Documentation

byte* draw_chars