这篇教程C++ Draw_Pic函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中Draw_Pic函数的典型用法代码示例。如果您正苦于以下问题:C++ Draw_Pic函数的具体用法?C++ Draw_Pic怎么用?C++ Draw_Pic使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了Draw_Pic函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);}
开发者ID:twinaphex,项目名称:fxquake,代码行数:16,
示例2: SCR_DrawNet/* SCR_DrawNet*/voidSCR_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);}
开发者ID:luaman,项目名称:qforge-newtree,代码行数:14,
示例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);}
开发者ID:ericwa,项目名称:Quakespasm,代码行数:16,
示例4: SCR_DrawRam/* SCR_DrawRam*/voidSCR_DrawRam (void){ if (!scr_showram->int_val) return; if (!r_cache_thrash) return; Draw_Pic (scr_vrect.x + 32, scr_vrect.y, scr_ram);}
开发者ID:luaman,项目名称:qforge-newtree,代码行数:14,
示例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");}
开发者ID:mattx86,项目名称:myq2,代码行数:18,
示例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);}
开发者ID:darkduke606,项目名称:Insomnia-ProQuake-Engine,代码行数:18,
示例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 ); }
开发者ID:axltxl,项目名称:hecatomb,代码行数:14,
示例8: SCR_DrawFieldvoidSCR_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--; }}
开发者ID:tmcb,项目名称:yquake2,代码行数:51,
示例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);}
开发者ID:m4c0,项目名称:Quake,代码行数:19,
示例10: SCR_DrawLoadingvoidSCR_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");}
开发者ID:siraj,项目名称:yquake2,代码行数:14,
示例11: Draw_TransPicTranslate/*=============Draw_TransPicTranslate -- johnfitz -- rewritten to use texmgr to do translationOnly 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);}
开发者ID:ericwa,项目名称:Quakespasm,代码行数:22,
示例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);}
开发者ID:masterfeizz,项目名称:ctrQuake,代码行数:24,
示例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 );}
开发者ID:hifi-unmaintained,项目名称:aprq2,代码行数:25,
示例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);}
开发者ID:Blzut3,项目名称:Engoo,代码行数:27,
示例15: Draw_ScaledPicvoid 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);}
开发者ID:hifi-unmaintained,项目名称:aprq2,代码行数:4,
示例16: SCR_ExecuteLayoutString/*================SCR_ExecuteLayoutString ================*/void SCR_ExecuteLayoutString (char *s){ int x, y; int value; char *token; int width; int index; clientinfo_t *ci; if (cls.state != ca_active || !cl.refresh_prepped) return; if (!s[0]) return; x = 0; y = 0; width = 3; while (s) { token = COM_Parse (&s); if (!strcmp(token, "xl")) { token = COM_Parse (&s); x = atoi(token); continue; } if (!strcmp(token, "xr")) { token = COM_Parse (&s); x = viddef.width + atoi(token); continue; } if (!strcmp(token, "xv")) { token = COM_Parse (&s); x = viddef.width/2 - 160 + atoi(token); continue; } if (!strcmp(token, "yt")) { token = COM_Parse (&s); y = atoi(token); continue; } if (!strcmp(token, "yb")) { token = COM_Parse (&s); y = viddef.height + atoi(token); continue; } if (!strcmp(token, "yv")) { token = COM_Parse (&s); y = viddef.height/2 - 120 + atoi(token); continue; } if (!strcmp(token, "pic")) { // draw a pic from a stat number token = COM_Parse (&s); value = cl.frame.playerstate.stats[atoi(token)]; if (value >= MAX_IMAGES) Com_Error (ERR_DROP, "Pic >= MAX_IMAGES"); if (cl.configstrings[CS_IMAGES+value]) { SCR_AddDirtyPoint (x, y); SCR_AddDirtyPoint (x+23, y+23); Draw_Pic (x, y, cl.configstrings[CS_IMAGES+value]); } continue; } if (!strcmp(token, "client")) { // draw a deathmatch client block int score, ping, time; token = COM_Parse (&s); x = viddef.width/2 - 160 + atoi(token); token = COM_Parse (&s); y = viddef.height/2 - 120 + atoi(token); SCR_AddDirtyPoint (x, y); SCR_AddDirtyPoint (x+159, y+31); token = COM_Parse (&s); value = atoi(token); if (value >= MAX_CLIENTS || value < 0) Com_Error (ERR_DROP, "client >= MAX_CLIENTS"); ci = &cl.clientinfo[value]; token = COM_Parse (&s); score = atoi(token);//.........这里部分代码省略.........
开发者ID:mattx86,项目名称:myq2,代码行数:101,
示例17: SCR_ExecuteLayoutStringvoidSCR_ExecuteLayoutString(char *s){ int x, y; int value; char *token; int width; int index; clientinfo_t *ci; if ((cls.state != ca_active) || !cl.refresh_prepped) { return; } if (!s[0]) { return; } x = 0; y = 0; while (s) { token = COM_Parse(&s); if (!strcmp(token, "xl")) { token = COM_Parse(&s); x = (int)strtol(token, (char **)NULL, 10); continue; } if (!strcmp(token, "xr")) { token = COM_Parse(&s); x = viddef.width + (int)strtol(token, (char **)NULL, 10); continue; } if (!strcmp(token, "xv")) { token = COM_Parse(&s); x = viddef.width / 2 - 160 + (int)strtol(token, (char **)NULL, 10); continue; } if (!strcmp(token, "yt")) { token = COM_Parse(&s); y = (int)strtol(token, (char **)NULL, 10); continue; } if (!strcmp(token, "yb")) { token = COM_Parse(&s); y = viddef.height + (int)strtol(token, (char **)NULL, 10); continue; } if (!strcmp(token, "yv")) { token = COM_Parse(&s); y = viddef.height / 2 - 120 + (int)strtol(token, (char **)NULL, 10); continue; } if (!strcmp(token, "pic")) { /* draw a pic from a stat number */ token = COM_Parse(&s); index = (int)strtol(token, (char **)NULL, 10); if ((index < 0) || (index >= sizeof(cl.frame.playerstate.stats))) { Com_Error(ERR_DROP, "bad stats index %d (0x%x)", index, index); } value = cl.frame.playerstate.stats[index]; if (value >= MAX_IMAGES) { Com_Error(ERR_DROP, "Pic >= MAX_IMAGES"); } if (cl.configstrings[CS_IMAGES + value]) { SCR_AddDirtyPoint(x, y); SCR_AddDirtyPoint(x + 23, y + 23); Draw_Pic(x, y, cl.configstrings[CS_IMAGES + value]); } continue; } if (!strcmp(token, "client")) { /* draw a deathmatch client block *///.........这里部分代码省略.........
开发者ID:tmcb,项目名称:yquake2,代码行数:101,
示例18: Sbar_DeathmatchOverlay/*==================Sbar_DeathmatchOverlayping time frags name==================*/voidSbar_DeathmatchOverlay(int start){ const qpic_t *pic; int i, k, l; int top, bottom; int x, y, f; char num[12]; player_info_t *s; int total; int minutes; int p; int teamplay; char team[5]; int skip = 10; if (largegame) skip = 8;// request new ping times every two second if (realtime - cl.last_ping_request > 2) { cl.last_ping_request = realtime; MSG_WriteByte(&cls.netchan.message, clc_stringcmd); MSG_WriteString(&cls.netchan.message, "pings"); } teamplay = atoi(Info_ValueForKey(cl.serverinfo, "teamplay")); scr_copyeverything = 1; scr_fullupdate = 0; if (!start) { pic = Draw_CachePic("gfx/ranking.lmp"); Draw_Pic(160 - pic->width / 2, 0, pic); }// scores Sbar_SortFrags(true);// draw the text l = scoreboardlines; if (start) y = start; else y = 24; if (teamplay) { x = 4;// 0 40 64 104 152 192 Draw_String(x, y, "ping pl time frags team name"); y += 8;// Draw_String ( x , y, "---- -- ---- ----- ---- ----------------"); Draw_String(x, y, "/x1d/x1e/x1e/x1f /x1d/x1f /x1d/x1e/x1e/x1f /x1d/x1e/x1e/x1e/x1f /x1d/x1e/x1e/x1f /x1d/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1f"); y += 8; } else { x = 16;// 0 40 64 104 152 Draw_String(x, y, "ping pl time frags name"); y += 8;// Draw_String ( x , y, "---- -- ---- ----- ----------------"); Draw_String(x, y, "/x1d/x1e/x1e/x1f /x1d/x1f /x1d/x1e/x1e/x1f /x1d/x1e/x1e/x1e/x1f /x1d/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1f"); y += 8; } for (i = 0; i < l && y <= vid.height - 10; i++) { k = fragsort[i]; s = &cl.players[k]; if (!s->name[0]) continue; // draw ping p = s->ping; if (p < 0 || p > 999) p = 999; sprintf(num, "%4i", p); Draw_String(x, y, num); // draw pl p = s->pl; sprintf(num, "%3i", p); if (p > 25) Draw_Alt_String(x + 32, y, num); else Draw_String(x + 32, y, num); if (s->spectator) { Draw_String(x + 40, y, "(spectator)"); // draw name if (teamplay) Draw_String(x + 152 + 40, y, s->name); else Draw_String(x + 152, y, s->name);//.........这里部分代码省略.........
开发者ID:CatalystG,项目名称:tyrquake,代码行数:101,
示例19: Sbar_TeamOverlay/*==================Sbar_TeamOverlayteam fragsadded by Zoid==================*/voidSbar_TeamOverlay(void){ const qpic_t *pic; int i, k; int x, y; char num[12]; int teamplay; char team[5]; team_t *tm; int plow, phigh, pavg;// request new ping times every two second teamplay = atoi(Info_ValueForKey(cl.serverinfo, "teamplay")); if (!teamplay) { Sbar_DeathmatchOverlay(0); return; } scr_copyeverything = 1; scr_fullupdate = 0; pic = Draw_CachePic("gfx/ranking.lmp"); Draw_Pic(160 - pic->width / 2, 0, pic); y = 24; x = 36; Draw_String(x, y, "low/avg/high team total players"); y += 8;// Draw_String(x, y, "------------ ---- ----- -------"); Draw_String(x, y, "/x1d/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1e/x1f /x1d/x1e/x1e/x1f /x1d/x1e/x1e/x1e/x1f /x1d/x1e/x1e/x1e/x1e/x1e/x1f"); y += 8;// sort the teams Sbar_SortTeams();// draw the text for (i = 0; i < scoreboardteams && y <= vid.height - 10; i++) { k = teamsort[i]; tm = teams + k; // draw pings plow = tm->plow; if (plow < 0 || plow > 999) plow = 999; phigh = tm->phigh; if (phigh < 0 || phigh > 999) phigh = 999; if (!tm->players) pavg = 999; else pavg = tm->ptotal / tm->players; if (pavg < 0 || pavg > 999) pavg = 999; sprintf(num, "%3i/%3i/%3i", plow, pavg, phigh); Draw_String(x, y, num); // draw team team[4] = 0; strncpy(team, tm->team, 4); Draw_String(x + 104, y, team); // draw total sprintf(num, "%5i", tm->frags); Draw_String(x + 104 + 40, y, num); // draw players sprintf(num, "%5i", tm->players); Draw_String(x + 104 + 88, y, num); if (!strncmp(Info_ValueForKey(cl.players[cl.playernum].userinfo, "team"), tm->team, 16)) { Draw_Character(x + 104 - 8, y, 16); Draw_Character(x + 104 + 32, y, 17); } y += 8; } y += 8; Sbar_DeathmatchOverlay(y);}
开发者ID:CatalystG,项目名称:tyrquake,代码行数:92,
示例20: Sbar_DrawPic/*=============Sbar_DrawPic=============*/voidSbar_DrawPic(int x, int y, const qpic_t *pic){ Draw_Pic(x /* + ((vid.width - 320)>>1) */ , y + (vid.height - SBAR_HEIGHT), pic);}
开发者ID:CatalystG,项目名称:tyrquake,代码行数:11,
注:本文中的Draw_Pic函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ Drop_Item函数代码示例 C++ DrawTriangle函数代码示例 |