本文整理匯總了C++中Draw_Pic函數的典型用法代碼示例。如果您正苦於以下問題:C++ Draw_Pic函數的具體用法?C++ Draw_Pic怎麽用?C++ Draw_Pic使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了Draw_Pic函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: SCR_DrawLoading
/*
==============
SCR_DrawLoading
==============
*/
void SCR_DrawLoading (void)
{
qpic_t *pic;
if (!scr_drawloading)
return;
pic = Draw_CachePic ("gfx/loading.lmp");
Draw_Pic ( (vid.width - pic->width)/2,
(vid.height - 48 - pic->height)/2, pic);
}
示例2: SCR_DrawNet
/*
SCR_DrawNet
*/
void
SCR_DrawNet (void)
{
if (cls.netchan.outgoing_sequence - cls.netchan.incoming_acknowledged <
UPDATE_BACKUP - 1)
return;
if (cls.demoplayback)
return;
Draw_Pic (scr_vrect.x + 64, scr_vrect.y, scr_net);
}
示例3: SCR_DrawNet
/*
==============
SCR_DrawNet
==============
*/
void SCR_DrawNet (void)
{
if (realtime - cl.last_received_message < 0.3)
return;
if (cls.demoplayback)
return;
GL_SetCanvas (CANVAS_DEFAULT); //johnfitz
Draw_Pic (scr_vrect.x+64, scr_vrect.y, scr_net);
}
示例4: SCR_DrawRam
/*
SCR_DrawRam
*/
void
SCR_DrawRam (void)
{
if (!scr_showram->int_val)
return;
if (!r_cache_thrash)
return;
Draw_Pic (scr_vrect.x + 32, scr_vrect.y, scr_ram);
}
示例5: SCR_DrawPause
/*
==============
SCR_DrawPause
==============
*/
void SCR_DrawPause (void)
{
int w, h;
if (!scr_showpause->value) // turn off for screenshots
return;
if (!cl_paused->value)
return;
Draw_GetPicSize (&w, &h, "pause");
Draw_Pic ((viddef.width-w)/2, viddef.height/2 + 8, "pause");
}
示例6: SCR_DrawPause
/*
==============
DrawPause
==============
*/
void SCR_DrawPause (void)
{
qpic_t *pic;
if (!scr_showpause.value) // turn off for screenshots
return;
if (!cl.paused)
return;
pic = Draw_CachePic ("gfx/pause.lmp");
Draw_Pic ( (vid.width - pic->width)/2, (vid.height - 48 - pic->height)/2, pic);
}
示例7: VID_MenuDraw
/* ========================================================================= */
void
VID_MenuDraw ( void )
{
q_int32_t w, h;
/* draw the banner */
Draw_GetPicSize ( &w, &h, "m_banner_video" );
Draw_Pic ( viddef.width / 2 - w / 2, viddef.height / 2 - 110,
"m_banner_video" );
/* move cursor to a reasonable starting position */
Menu_AdjustCursor ( &s_opengl_menu, 1 );
/* draw the menu */
Menu_Draw ( &s_opengl_menu );
}
示例8: SCR_DrawField
void
SCR_DrawField(int x, int y, int color, int width, int value)
{
char num[16], *ptr;
int l;
int frame;
if (width < 1)
{
return;
}
/* draw number string */
if (width > 5)
{
width = 5;
}
SCR_AddDirtyPoint(x, y);
SCR_AddDirtyPoint(x + width * CHAR_WIDTH + 2, y + 23);
Com_sprintf(num, sizeof(num), "%i", value);
l = (int)strlen(num);
if (l > width)
{
l = width;
}
x += 2 + CHAR_WIDTH * (width - l);
ptr = num;
while (*ptr && l)
{
if (*ptr == '-')
{
frame = STAT_MINUS;
}
else
{
frame = *ptr - '0';
}
Draw_Pic(x, y, sb_nums[color][frame]);
x += CHAR_WIDTH;
ptr++;
l--;
}
}
示例9: SCR_DrawPause
/*
==============
DrawPause
==============
*/
void SCR_DrawPause (void)
{
quake::sprite pic;
if (!scr_showpause.to_bool()) // turn off for screenshots
return;
if (!cl.paused)
return;
pic = Draw_CachePic ("gfx/pause.lmp");
Draw_Pic ( (vid.width - pic.width)/2,
(vid.height - 48 - pic.height)/2, pic);
}
示例10: SCR_DrawLoading
void
SCR_DrawLoading(void)
{
int w, h;
if (!scr_draw_loading)
{
return;
}
scr_draw_loading = false;
Draw_GetPicSize(&w, &h, "loading");
Draw_Pic((viddef.width - w) / 2, (viddef.height - h) / 2, "loading");
}
示例11: Draw_TransPicTranslate
/*
=============
Draw_TransPicTranslate -- johnfitz -- rewritten to use texmgr to do translation
Only used for the player color selection menu
=============
*/
void Draw_TransPicTranslate (int x, int y, qpic_t *pic, int top, int bottom)
{
static int oldtop = -2;
static int oldbottom = -2;
if (top != oldtop || bottom != oldbottom)
{
glpic_t *p = (glpic_t *)pic->data;
gltexture_t *glt = p->gltexture;
oldtop = top;
oldbottom = bottom;
TexMgr_ReloadImage (glt, top, bottom);
}
Draw_Pic (x, y, pic);
}
示例12: SCR_DrawTurtle
/*
==============
SCR_DrawTurtle
==============
*/
void SCR_DrawTurtle (void)
{
static int count;
if (!scr_showturtle.value)
return;
if (host_frametime < 0.1)
{
count = 0;
return;
}
count++;
if (count < 3)
return;
Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
}
示例13: VID_MenuDraw
/*
================
VID_MenuDraw
================
*/
void VID_MenuDraw (menuframework_s *self)
{
int w, h;
/*
** draw the banner
*/
Draw_GetPicSize( &w, &h, "m_banner_video" );
Draw_Pic( viddef.width / 2 - w / 2, viddef.height /2 - 110, "m_banner_video", 1 );
/*
** move cursor to a reasonable starting position
*/
Menu_AdjustCursor( self, 1 );
/*
** draw the menu
*/
Menu_Draw( self );
}
示例14: SCR_DrawTurtle
/*
==============
SCR_DrawTurtle
==============
*/
void SCR_DrawTurtle (void)
{
static int count;
if (!scr_showturtle->value)
return;
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes start
// if (host_frametime < 0.1)
if (host_cpu_frametime < 0.1)
// 2001-10-20 TIMESCALE extension by Tomaz/Maddes end
{
count = 0;
return;
}
count++;
if (count < 3)
return;
Draw_Pic (scr_vrect.x, scr_vrect.y, scr_turtle);
}
示例15: Draw_ScaledPic
void Draw_ScaledPic (int x, int y, float scale, const char *pic, float red, float green, float blue, float alpha)
{
Draw_Pic (x, y, pic, 1);
}