这篇教程C++ CG_AdjustFrom640函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中CG_AdjustFrom640函数的典型用法代码示例。如果您正苦于以下问题:C++ CG_AdjustFrom640函数的具体用法?C++ CG_AdjustFrom640怎么用?C++ CG_AdjustFrom640使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了CG_AdjustFrom640函数的29个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: CG_DrawSides/*================CG_DrawSidesCoords are virtual 640x480================*/void CG_DrawSides(float x, float y, float w, float h, float size){ CG_AdjustFrom640(&x, &y, &w, &h); size *= cgs.screenXScale; trap_R_DrawStretchPic(x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader); trap_R_DrawStretchPic(x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader);}
开发者ID:ethr,项目名称:ETXreaLPro_etmain,代码行数:14,
示例2: CG_DrawChar/*===============CG_DrawCharCoordinates and size in 640*480 virtual screen size===============*/void CG_DrawChar( int x, int y, int width, int height, int ch ) { int row, col; gfixed frow, fcol; gfixed size; gfixed ax, ay, aw, ah; ch &= 255; if ( ch == ' ' ) { return; } ax = MAKE_GFIXED(x); ay = MAKE_GFIXED(y); aw = MAKE_GFIXED(width); ah = MAKE_GFIXED(height); CG_AdjustFrom640( &ax, &ay, &aw, &ah ); row = ch>>4; col = ch&15; frow = MAKE_GFIXED(row)*GFIXED(0,0625); fcol = MAKE_GFIXED(col)*GFIXED(0,0625); size = GFIXED(0,0625); _CG_trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol + size, frow + size, cgs.media.charsetShader );}
开发者ID:Jsoucek,项目名称:q3ce,代码行数:37,
示例3: CG_DrawTopBottomvoid CG_DrawTopBottom( float x, float y, float w, float h, float size ){ CG_AdjustFrom640( &x, &y, &w, &h ); size *= cgs.screenYScale; trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader );}
开发者ID:SHOVELL,项目名称:Unvanquished,代码行数:7,
示例4: CG_CalcVrectstatic void CG_CalcVrect( void ) { int xsize, ysize; float lbheight; // NERVE - SMF if ( cg.limboMenu ) { float x, y, w, h; x = LIMBO_3D_X; y = LIMBO_3D_Y; w = LIMBO_3D_W; h = LIMBO_3D_H; cg.refdef.width = 0; CG_AdjustFrom640( &x, &y, &w, &h ); cg.refdef.x = x; cg.refdef.y = y; cg.refdef.width = w; cg.refdef.height = h; return; } // -NERVE - SMF // the intermission should allways be full screen if ( cg.snap->ps.pm_type == PM_INTERMISSION ) { xsize = ysize = 100; } else { // bound normal viewsize if ( cg_viewsize.integer < 30 ) { trap_Cvar_Set( "cg_viewsize","30" ); xsize = ysize = 30; } else if ( cg_viewsize.integer > 100 ) { trap_Cvar_Set( "cg_viewsize","100" ); xsize = ysize = 100; } else { xsize = ysize = cg_viewsize.integer; } }//----(SA) added transition to/from letterbox// normal aspect is xx:xx// letterbox is yy:yy (85% of 'normal' height) lbheight = ysize * 0.85; if ( cg_letterbox.integer ) { ysize = lbheight; }//----(SA) end cg.refdef.width = cgs.glconfig.vidWidth * xsize / 100; cg.refdef.width &= ~1; cg.refdef.height = cgs.glconfig.vidHeight * ysize / 100; cg.refdef.height &= ~1; cg.refdef.x = ( cgs.glconfig.vidWidth - cg.refdef.width ) / 2; cg.refdef.y = ( cgs.glconfig.vidHeight - cg.refdef.height ) / 2;}
开发者ID:MAN-AT-ARMS,项目名称:iortcw-archive,代码行数:60,
示例5: CG_DrawPic/*================CG_DrawPicCoordinates are 640*480 virtual values=================*/void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ) { float s0; float s1; float t0; float t1; if ( width < 0 ) { // flip about vertical width = -width; s0 = 1; s1 = 0; } else { s0 = 0; s1 = 1; } if ( height < 0 ) { // flip about horizontal height = -height; t0 = 1; t1 = 0; } else { t0 = 0; t1 = 1; } CG_AdjustFrom640( &x, &y, &width, &height ); trap_R_DrawStretchPic( x, y, width, height, s0, t0, s1, t1, hShader );}
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:34,
示例6: CG_Text_PaintCharvoid CG_Text_PaintChar(float x, float y, float width, float height, float scale, float s, float t, float s2, float t2, qhandle_t hShader) { float w, h; w = width * scale; h = height * scale; CG_AdjustFrom640( &x, &y, &w, &h,qtrue); trap_R_DrawStretchPic( x, y, w, h, s, t, s2, t2, hShader );}
开发者ID:Aravind7z,项目名称:zeq2lite,代码行数:7,
示例7: CG_DrawChar2/*===============CG_DrawChar2Coordinates and size in 640*480 virtual screen size===============*/void CG_DrawChar2( int x, int y, int width, int height, int ch ) { int row, col; float frow, fcol; float size; float ax, ay, aw, ah; ch &= 255; if ( ch == ' ' ) { return; } ax = x; ay = y; aw = width; ah = height; CG_AdjustFrom640( &ax, &ay, &aw, &ah ); row = ch >> 4; col = ch & 15; frow = row * 0.0625; fcol = col * 0.0625; size = 0.0625; trap_R_DrawStretchPic( ax, ay, aw, ah, fcol, frow, fcol + size, frow + size, cgs.media.menucharsetShader );}
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:37,
示例8: CG_Cinematic_f/*=================CG_Cinematic_f=================*/void CG_Cinematic_f( void ) { char arg[MAX_QPATH]; char s[6]; float x, y, width, height; int bits = CIN_system; Com_DPrintf("CG_Cinematic_f/n"); CG_StopCinematic_f(); trap_Argv( 1, arg, sizeof( arg ) ); trap_Argv( 2, s, sizeof( s ) ); if (s[0] == '1' || Q_stricmp(arg,"demoend.roq")==0 || Q_stricmp(arg,"end.roq")==0) { bits |= CIN_hold; } if (s[0] == '2') { bits |= CIN_loop; } //trap_S_StopAllSounds(); x = 0; y = 0; width = SCREEN_WIDTH; height = SCREEN_HEIGHT; CG_SetScreenPlacement( PLACE_CENTER, PLACE_CENTER ); CG_AdjustFrom640( &x, &y, &width, &height ); cg.cinematicHandle = trap_CIN_PlayCinematic( arg, x, y, width, height, bits );}
开发者ID:LavenderMoon,项目名称:mint-arena,代码行数:35,
示例9: CG_DrawRotatedPic/*================CG_DrawRotatedPicCoordinates are 640*480 virtual values=================*/void CG_DrawRotatedPic(float x, float y, float width, float height, qhandle_t hShader, float angle){ CG_AdjustFrom640(&x, &y, &width, &height); trap_R_DrawRotatedPic(x, y, width, height, 0, 0, 1, 1, hShader, angle);}
开发者ID:ethr,项目名称:ETXreaLPro_etmain,代码行数:14,
示例10: CG_FillRectGradient/*==============CG_FillRectGradient==============*/void CG_FillRectGradient( float x, float y, float width, float height, const float *color, const float *gradcolor, int gradientType ) { trap_R_SetColor( color ); CG_AdjustFrom640( &x, &y, &width, &height ); trap_R_DrawStretchPicGradient( x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader, gradcolor, gradientType ); trap_R_SetColor( NULL );}
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:13,
示例11: CG_LimboPanel_RenderCounterNumbervoid CG_LimboPanel_RenderCounterNumber(float x, float y, float w, float h, float number, qhandle_t shaderBack, qhandle_t shaderRoll, int numbuttons) { float numberS = (((numbuttons - 1) - number) + 0) * (1.f / numbuttons); float numberE = (((numbuttons - 1) - number) + 1) * (1.f / numbuttons); CG_AdjustFrom640(&x, &y, &w, &h); trap_R_DrawStretchPic(x, y, w, h, 0, 0, 1, 1, shaderBack); trap_R_DrawStretchPic(x, y, w, h, 0, numberS, 1, numberE, shaderRoll);}
开发者ID:ETrun,项目名称:ETrun,代码行数:8,
示例12: CG_FillRect/*================CG_FillRectCoordinates are 640*480 virtual values=================*/void CG_FillRect( gfixed x, gfixed y, gfixed width, gfixed height, const gfixed *color ) { _CG_trap_R_SetColor( color ); CG_AdjustFrom640( &x, &y, &width, &height ); _CG_trap_R_DrawStretchPic( x, y, width, height, GFIXED_0, GFIXED_0, GFIXED_0, GFIXED_0, cgs.media.whiteShader ); _CG_trap_R_SetColor( NULL );}
开发者ID:Jsoucek,项目名称:q3ce,代码行数:15,
示例13: CG_FillRect/*================CG_FillRectCoordinates are 640*480 virtual values=================*/void CG_FillRect( float x, float y, float width, float height, const float *color ) { trap_R_SetColor( color ); CG_AdjustFrom640( &x, &y, &width, &height ); trap_R_DrawStretchPic( x, y, width, height, 0, 0, 0, 1, cgs.media.whiteShader ); trap_R_SetColor( NULL );}
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:15,
示例14: CG_DrawSides/*================CG_DrawSidesCoords are virtual 640x480================*/void CG_DrawSides(float x, float y, float w, float h, float size) { CG_AdjustFrom640( &x, &y, &w, &h ); if (cg_horizontalPlacement == PLACE_STRETCH) { size *= cgs.screenXScaleStretch; } else { size *= cgs.screenXScale; } trap_R_DrawStretchPic( x, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader ); trap_R_DrawStretchPic( x + w - size, y, size, h, 0, 0, 0, 0, cgs.media.whiteShader );}
开发者ID:SilverlineDev,项目名称:mint-arena,代码行数:17,
示例15: CG_DrawTopBottomvoid CG_DrawTopBottom(float x, float y, float w, float h, float size) { CG_AdjustFrom640( &x, &y, &w, &h ); if (cg_verticalPlacement == PLACE_STRETCH) { size *= cgs.screenYScaleStretch; } else { size *= cgs.screenYScale; } trap_R_DrawStretchPic( x, y, w, size, 0, 0, 0, 0, cgs.media.whiteShader ); trap_R_DrawStretchPic( x, y + h - size, w, size, 0, 0, 0, 0, cgs.media.whiteShader );}
开发者ID:SilverlineDev,项目名称:mint-arena,代码行数:10,
示例16: CG_DrawSides/*================CG_DrawSidesCoords are virtual 640x480================*/void CG_DrawSides( float x, float y, float w, float h, float size ){ float sizeY; CG_AdjustFrom640( &x, &y, &w, &h ); sizeY = size * cgs.screenYScale; size *= cgs.screenXScale; trap_R_DrawStretchPic( x, y + sizeY, size, h - ( sizeY * 2.0f ), 0, 0, 0, 0, cgs.media.whiteShader ); trap_R_DrawStretchPic( x + w - size, y + sizeY, size, h - ( sizeY * 2.0f ), 0, 0, 0, 0, cgs.media.whiteShader );}
开发者ID:SHOVELL,项目名称:Unvanquished,代码行数:18,
示例17: CG_DrawCornersstatic void CG_DrawCorners( float x, float y, float w, float h, float size, qhandle_t pic ){ float hs, vs; CG_AdjustFrom640( &x, &y, &w, &h ); hs = size * cgs.screenXScale; vs = size * cgs.screenYScale; trap_R_DrawStretchPic( x, y, hs , vs, 0, 0, 0.5, 0.5, pic ); trap_R_DrawStretchPic( x, y + h - vs, hs, vs, 0, 0.5, 0.5, 1, pic ); trap_R_DrawStretchPic( x + w - hs, y, hs, vs, 0.5, 0, 1, 0.5, pic ); trap_R_DrawStretchPic( x + w - hs, y + h - vs, hs, vs, 0.5, 0.5, 1, 1, pic );}
开发者ID:redrumrobot,项目名称:korx,代码行数:12,
示例18: CG_SetClipRegion/*================CG_SetClipRegion=================*/void CG_SetClipRegion( float x, float y, float w, float h ) { vec4_t clip; CG_AdjustFrom640( &x, &y, &w, &h ); clip[ 0 ] = x; clip[ 1 ] = y; clip[ 2 ] = x + w; clip[ 3 ] = y + h; trap_R_SetClipRegion( clip );}
开发者ID:SilverlineDev,项目名称:mint-arena,代码行数:17,
示例19: CG_DrawFadePic/*================CG_DrawFadePicCoordinates are 640*480 virtual values=================*/void CG_DrawFadePic( float x, float y, float width, float height, const Color::Color& fcolor, const Color::Color& tcolor, float amount, qhandle_t hShader ){ CG_AdjustFrom640( &x, &y, &width, &height ); Color::Color finalcolor = Color::Blend( fcolor, tcolor, amount / 100 ); trap_R_SetColor( finalcolor ); trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader ); trap_R_ClearColor();}
开发者ID:ChunHungLiu,项目名称:Unvanquished,代码行数:19,
示例20: CG_FillAngleYaw/*================CG_FillAngleYaw (taken from iodfengine)modified by @suburb=================*/void CG_FillAngleYaw(float start, float end, float viewangle, float y, float height, int fov, const float *color) { float x, width, fovscale; fovscale = tan(DEG2RAD(fov / 2)); x = CG_WideX(SCREEN_WIDTH) / 2 + tan(DEG2RAD(viewangle + start)) / fovscale * CG_WideX(SCREEN_WIDTH) / 2; width = fabs(CG_WideX(SCREEN_WIDTH) * (tan(DEG2RAD(viewangle + end)) - tan(DEG2RAD(viewangle + start))) / (fovscale * 2)) + 1; if (etr_drawVelocitySnapping.integer == 2) { width /= 2; if (cg.predictedPlayerState.stats[STAT_USERCMD_MOVE] & UMOVE_RIGHT) { x += width; // invert white bars if moving to the right } } trap_R_SetColor(color); CG_AdjustFrom640(&x, &y, &width, &height); trap_R_DrawStretchPic(x, y, width, height, 0, 0, 0, 0, cgs.media.whiteShader); trap_R_SetColor(NULL);}
开发者ID:ETrun,项目名称:ETrun,代码行数:25,
示例21: CG_DrawFadePic/*================CG_DrawFadePicCoordinates are 640*480 virtual values=================*/void CG_DrawFadePic( float x, float y, float width, float height, vec4_t fcolor, vec4_t tcolor, float amount, qhandle_t hShader ){ vec4_t finalcolor; float inverse; inverse = 100 - amount; CG_AdjustFrom640( &x, &y, &width, &height ); finalcolor[ 0 ] = ( ( inverse * fcolor[ 0 ] ) + ( amount * tcolor[ 0 ] ) ) / 100; finalcolor[ 1 ] = ( ( inverse * fcolor[ 1 ] ) + ( amount * tcolor[ 1 ] ) ) / 100; finalcolor[ 2 ] = ( ( inverse * fcolor[ 2 ] ) + ( amount * tcolor[ 2 ] ) ) / 100; finalcolor[ 3 ] = ( ( inverse * fcolor[ 3 ] ) + ( amount * tcolor[ 3 ] ) ) / 100; trap_R_SetColor( finalcolor ); trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader ); trap_R_SetColor( NULL );}
开发者ID:SHOVELL,项目名称:Unvanquished,代码行数:26,
示例22: CG_Draw3DModelvoid CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) { refdef_t refdef; refEntity_t ent; if ( !cg_draw3dIcons.integer || !cg_drawIcons.integer ) { return; } CG_AdjustFrom640( &x, &y, &w, &h ); memset( &refdef, 0, sizeof( refdef ) ); memset( &ent, 0, sizeof( ent ) ); AnglesToAxis( angles, ent.axis ); VectorCopy( origin, ent.origin ); ent.hModel = model; ent.customSkin = skin; ent.renderfx = RF_NOSHADOW; // no stencil shadows refdef.rdflags = RDF_NOWORLDMODEL; AxisClear( refdef.viewaxis ); refdef.fov_x = 30; refdef.fov_y = 30; refdef.x = x; refdef.y = y; refdef.width = w; refdef.height = h; refdef.time = cg.time; trap_R_ClearScene(); trap_R_AddRefEntityToScene( &ent ); trap_MME_TimeFraction(cg.timeFraction); trap_R_RenderScene( &refdef );}
开发者ID:entdark,项目名称:q3mme,代码行数:38,
示例23: CG_DrawMinimap/*================CG_DrawMinimap================*/void CG_DrawMinimap( const rectDef_t* rect640, const vec4_t teamColor ){ minimap_t* m = &cg.minimap; minimapZone_t *z = NULL; rectDef_t rect = *rect640; CG_UpdateMinimapActive( m ); if( !m->active ) { return; } z = CG_ChooseMinimapZone( m ); //Setup the transform CG_AdjustFrom640( &rect.x, &rect.y, &rect.w, &rect.h ); CG_SetupMinimapTransform( &rect, m, z ); CG_SetMinimapColor( teamColor ); //Add the backgound CG_FillRect( rect640->x, rect640->y, rect640->w, rect640->h, m->bgColor ); //Draw things inside the rectangle we were given CG_SetScissor( rect.x, rect.y, rect.w, rect.h ); CG_EnableScissor( qtrue ); { CG_MinimapDrawMap( m, z ); CG_MinimapDrawPlayer( m ); CG_MinimapDrawTeammates( m ); } CG_EnableScissor( qfalse ); //Reset the color for other hud elements trap_R_SetColor( NULL );}
开发者ID:Gallaecio,项目名称:Unvanquished,代码行数:43,
示例24: CG_DrawSkillBarstatic void CG_DrawSkillBar(float x, float y, float w, float h, int skill){ int i; float blockheight = (h - 4) / (float)(NUM_SKILL_LEVELS - 1); float draw_y = y + h - blockheight; vec4_t colour; float x1, y1, w1, h1; for (i = 0; i < NUM_SKILL_LEVELS - 1; i++) { if (i >= skill) { Vector4Set(colour, 1.f, 1.f, 1.f, .15f); } else { Vector4Set(colour, 0.f, 0.f, 0.f, .4f); } CG_FillRect(x, draw_y, w, blockheight, colour); if (i < skill) { x1 = x; y1 = draw_y; w1 = w; h1 = blockheight; CG_AdjustFrom640(&x1, &y1, &w1, &h1); trap_R_DrawStretchPic(x1, y1, w1, h1, 0, 0, 1.f, 0.5f, cgs.media.limboStar_roll); } CG_DrawRect_FixedBorder(x, draw_y, w, blockheight, 1, colorBlack); draw_y -= (blockheight + 1); }}
开发者ID:sxweet,项目名称:etlegacy,代码行数:36,
示例25: CG_Draw3DModel/*================CG_Draw3DModel================*/void CG_Draw3DModel( float x, float y, float w, float h, qhandle_t model, qhandle_t skin, vec3_t origin, vec3_t angles ) { refdef_t refdef; refEntity_t ent; CG_AdjustFrom640( &x, &y, &w, &h,qtrue); memset( &refdef, 0, sizeof( refdef ) ); memset( &ent, 0, sizeof( ent ) ); AnglesToAxis( angles, ent.axis ); VectorCopy( origin, ent.origin ); ent.hModel = model; ent.customSkin = skin; ent.renderfx = RF_NOSHADOW | RF_DEPTHHACK | RF_LIGHTING_ORIGIN; refdef.rdflags = RDF_NOWORLDMODEL; AxisClear(refdef.viewaxis); refdef.fov_x = 30; refdef.fov_y = 30; refdef.x = x; refdef.y = y; refdef.width = w; refdef.height = h; refdef.time = cg.time; trap_R_ClearScene(); trap_R_AddRefEntityToScene(&ent); trap_R_RenderScene(&refdef);}
开发者ID:Aravind7z,项目名称:zeq2lite,代码行数:30,
示例26: CG_PainBlend/*===============CG_PainBlend===============*/static void CG_PainBlend(){ int damage; float damageAsFracOfMax; qhandle_t shader = cgs.media.viewBloodShader; float x, y, w, h; float s1, t1, s2, t2; if ( cg.snap->ps.persistant[ PERS_SPECSTATE ] != SPECTATOR_NOT || cg.intermissionStarted ) { return; } damage = cg.lastHealth - cg.snap->ps.stats[ STAT_HEALTH ]; if ( damage < 0 ) { damage = 0; } damageAsFracOfMax = ( float ) damage / cg.snap->ps.stats[ STAT_MAX_HEALTH ]; cg.lastHealth = cg.snap->ps.stats[ STAT_HEALTH ]; cg.painBlendValue += damageAsFracOfMax * cg_painBlendScale.value; if ( cg.painBlendValue > 0.0f ) { cg.painBlendValue -= ( cg.frametime / 1000.0f ) * cg_painBlendDownRate.value; } if ( cg.painBlendValue > 1.0f ) { cg.painBlendValue = 1.0f; } else if ( cg.painBlendValue <= 0.0f ) { cg.painBlendValue = 0.0f; return; } Color::Color color; if ( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_ALIENS ) { color = { 0.43f, 0.8f, 0.37f }; } else if ( cg.snap->ps.persistant[ PERS_TEAM ] == TEAM_HUMANS ) { color = { 0.8f, 0.0f, 0.0f }; } if ( cg.painBlendValue > cg.painBlendTarget ) { cg.painBlendTarget += ( cg.frametime / 1000.0f ) * cg_painBlendUpRate.value; } else if ( cg.painBlendValue < cg.painBlendTarget ) { cg.painBlendTarget = cg.painBlendValue; } if ( cg.painBlendTarget > cg_painBlendMax.value ) { cg.painBlendTarget = cg_painBlendMax.value; } color.SetAlpha( cg.painBlendTarget ); trap_R_SetColor( color ); //left x = 0.0f; y = 0.0f; w = PAINBLEND_BORDER * 640.0f; h = 480.0f; CG_AdjustFrom640( &x, &y, &w, &h ); s1 = 0.0f; t1 = 0.0f; s2 = PAINBLEND_BORDER; t2 = 1.0f; CG_ScalePainBlendTCs( &s1, &t1, &s2, &t2 ); trap_R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, shader ); //right x = 640.0f - ( PAINBLEND_BORDER * 640.0f ); y = 0.0f; w = PAINBLEND_BORDER * 640.0f; h = 480.0f; CG_AdjustFrom640( &x, &y, &w, &h ); s1 = 1.0f - PAINBLEND_BORDER; t1 = 0.0f; s2 = 1.0f; t2 = 1.0f; CG_ScalePainBlendTCs( &s1, &t1, &s2, &t2 ); trap_R_DrawStretchPic( x, y, w, h, s1, t1, s2, t2, shader );//.........这里部分代码省略.........
开发者ID:t4im,项目名称:Unvanquished,代码行数:101,
示例27: CG_DrawPicST/*================CG_DrawPicSTAllows passing of st co-ordsCoordinates are 640*480 virtual values=================*/void CG_DrawPicST( float x, float y, float width, float height, float s0, float t0, float s1, float t1, qhandle_t hShader ) { CG_AdjustFrom640( &x, &y, &width, &height ); trap_R_DrawStretchPic( x, y, width, height, s0, t0, s1, t1, hShader );}
开发者ID:AdrienJaguenet,项目名称:Enemy-Territory,代码行数:13,
示例28: CG_DrawPic/*================CG_DrawPicCoordinates are 640*480 virtual values=================*/void CG_DrawPic( float x, float y, float width, float height, qhandle_t hShader ){ CG_AdjustFrom640( &x, &y, &width, &height ); trap_R_DrawStretchPic( x, y, width, height, 0, 0, 1, 1, hShader );}
开发者ID:SHOVELL,项目名称:Unvanquished,代码行数:12,
示例29: Main_MenuDrawstatic void Main_MenuDraw( void ) { refdef_t refdef; refEntity_t ent; vec3_t origin; vec3_t angles; float adjust; float x, y, w, h; vec4_t color = {0.5, 0, 0, 1}; // setup the refdef memset( &refdef, 0, sizeof( refdef ) ); refdef.rdflags = RDF_NOWORLDMODEL; AxisClear( refdef.viewaxis ); x = 0; y = 0; w = 640; h = 120; CG_AdjustFrom640( &x, &y, &w, &h ); refdef.x = x; refdef.y = y; refdef.width = w; refdef.height = h; adjust = 0; // JDC: Kenneth asked me to stop this 1.0 * sin( (float)uis.realtime / 1000 ); refdef.fov_x = 60 + adjust; refdef.fov_y = 19.6875 + adjust; refdef.time = uis.realtime; origin[0] = 300; origin[1] = 0; origin[2] = -32; trap_R_ClearScene(); // add the model memset( &ent, 0, sizeof(ent) ); adjust = 5.0 * sin( (float)uis.realtime / 5000 ); VectorSet( angles, 0, 180 + adjust, 0 ); AnglesToAxis( angles, ent.axis ); ent.hModel = s_main.bannerModel; VectorCopy( origin, ent.origin ); VectorCopy( origin, ent.lightingOrigin ); ent.renderfx = RF_LIGHTING_ORIGIN | RF_NOSHADOW; VectorCopy( ent.origin, ent.oldorigin ); CG_AddRefEntityWithMinLight( &ent ); trap_R_RenderScene( &refdef ); if (strlen(s_errorMessage.errorMessage)) { UI_DrawProportionalString_AutoWrapped( 320, 192, 600, 20, s_errorMessage.errorMessage, UI_CENTER|UI_SMALLFONT|UI_DROPSHADOW, menu_text_color ); } else { // standard menu drawing Menu_Draw( &s_main.menu ); } if (uis.demoversion) { UI_DrawProportionalString( 320, 372, "DEMO FOR MATURE AUDIENCES DEMO", UI_CENTER|UI_SMALLFONT, color ); UI_DrawString( 320, 400, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color ); } else if (uis.demotestversion) { UI_DrawProportionalString( 320, 372, "DEMOTEST FOR MATURE AUDIENCES DEMOTEST", UI_CENTER|UI_SMALLFONT, color ); UI_DrawString( 320, 400, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color ); UI_DrawString( 320, 428, "This test may only be distributed electronically. Physical media (e.g. CD-ROM's, floppies, etc.) redistribution of the demo test is prohibited. Refer to the End User License Agreement for further details.", UI_CENTER|UI_SMALLFONT, color ); } else { UI_DrawString( 320, 450, "Quake III Arena(c) 1999-2000, Id Software, Inc. All Rights Reserved", UI_CENTER|UI_SMALLFONT, color ); }}
开发者ID:coltongit,项目名称:mint-arena-demotest-work,代码行数:77,
注:本文中的CG_AdjustFrom640函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ CG_AllocLocalEntity函数代码示例 C++ CGPointMake函数代码示例 |