Skip to content

Commit

Permalink
Most of D3DCOLOR_ARGB() calls replaced by color_argb().
Browse files Browse the repository at this point in the history
Author: Jules Blok <[email protected]>
Author: Alexandr Akulich <[email protected]>

Based on commit 46c36e6 from Armada651/xray repository.
  • Loading branch information
Kaffeine committed Nov 10, 2015
1 parent 9531878 commit 79c9582
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion src/editors/LevelEditor/Edit/SceneObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ void CSceneObject::RenderBlink()
if (m_iBlinkTime>0){
if (m_iBlinkTime>(int)EDevice.dwTimeGlobal){
int alpha = iFloor(sqrtf(float(m_iBlinkTime-EDevice.dwTimeGlobal)/BLINK_TIME)*64);
m_pReference->RenderSelection(_Transform(),0, m_BlinkSurf, D3DCOLOR_ARGB(alpha,255,255,255));
m_pReference->RenderSelection(_Transform(),0, m_BlinkSurf, color_argb(alpha,255,255,255));
UI->RedrawScene ();
}else{
m_iBlinkTime = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/xrEngine/cf_dynamic_mesh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ BOOL CCF_DynamicMesh::_RayQuery(const collide::ray_defs& Q, collide::rq_results&
if (res)
{
ph_debug_render->open_cashed_draw();
ph_debug_render->draw_tri(br.tri[0], br.tri[1], br.tri[2], D3DCOLOR_ARGB(50, 255, 0, 0), 0);
ph_debug_render->draw_tri(br.tri[0], br.tri[1], br.tri[2], color_argb(50, 255, 0, 0), 0);
ph_debug_render->close_cashed_draw(50000);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/CharacterPhysicsSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ void CCharacterPhysicsSupport::in_UpdateCL( )
DBG_PhysBones( m_EntityAlife );

if( dbg_draw_character_physics && m_pPhysicsShell )
m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_ARGB( 100 ,255, 0, 0 ) );
m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_argb( 100 ,255, 0, 0 ) );
#endif
update_animation_collision();
m_character_shell_control.CalculateTimeDelta( );
Expand Down
6 changes: 3 additions & 3 deletions src/xrGame/ik/IKLimb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1198,23 +1198,23 @@ void DBG_DrawRotationLimitsY( const Fmatrix &start, float ang, float l, float h
{
#ifdef DEBUG
DBG_DrawRotationY( start, ang - EPS, ang + EPS, 0.15f, color_xrgb( 0, 255, 0 ), false, 1 );
DBG_DrawRotationY( start, l, h, 0.15f, D3DCOLOR_ARGB( 50, 0, 250, 0 ), true );
DBG_DrawRotationY( start, l, h, 0.15f, color_argb( 50, 0, 250, 0 ), true );
#endif // DEBUG
}

void DBG_DrawRotationLimitsZ( const Fmatrix &start, float ang, float l, float h )
{
#ifdef DEBUG
DBG_DrawRotationZ( start, ang - EPS, ang + EPS, 0.15f, color_xrgb( 0, 0, 255 ), false, 1 );
DBG_DrawRotationZ( start, l, h, 0.15f, D3DCOLOR_ARGB( 50, 0, 0, 250 ), true );
DBG_DrawRotationZ( start, l, h, 0.15f, color_argb( 50, 0, 0, 250 ), true );
#endif // DEBUG
}

void DBG_DrawRotationLimitsX( const Fmatrix &start, float ang, float l, float h )
{
#ifdef DEBUG
DBG_DrawRotationX( start, ang + EPS, ang - EPS, 0.15f, color_xrgb( 255, 0, 0 ), false, 1 );
DBG_DrawRotationX( start, l, h, 0.15f, D3DCOLOR_ARGB( 50, 255, 0, 0 ), true );
DBG_DrawRotationX( start, l, h, 0.15f, color_argb( 50, 255, 0, 0 ), true );
#endif // DEBUG
}

Expand Down
18 changes: 9 additions & 9 deletions src/xrGame/imotion_position.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,15 @@ static void dbg_draw_state_end( CPhysicsShell *shell )
if( dbg_imotion_draw_velocity )
{
DBG_OpenCashedDraw();
shell->dbg_draw_velocity( dbg_imotion_draw_velocity_scale, D3DCOLOR_ARGB( 100 ,255, 0, 0 ) );
shell->dbg_draw_velocity( dbg_imotion_draw_velocity_scale, color_argb( 100 ,255, 0, 0 ) );
//shell->dbg_draw_force( 0.01, color_xrgb( 0, 0, 255 ) );
DBG_ClosedCashedDraw( 50000 );
}
if(dbg_imotion_collide_debug)
{
#ifdef DEBUG
DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 255, 255, 255 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 255, 255, 255 ) );
DBG_ClosedCashedDraw( 50000 );
#endif
}
Expand Down Expand Up @@ -293,7 +293,7 @@ void imotion_position::state_end( )
#if 0

DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 0 ) );
DBG_DrawBones( *shell->get_ElementByStoreOrder( 0 )->PhysicsRefObject() );
DBG_ClosedCashedDraw( 50000 );

Expand All @@ -318,7 +318,7 @@ void imotion_position::state_end( )
#if 0

DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 0, 255 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 0, 255 ) );
DBG_DrawBones( *shell->get_ElementByStoreOrder( 0 )->PhysicsRefObject() );
DBG_ClosedCashedDraw( 50000 );

Expand Down Expand Up @@ -543,7 +543,7 @@ float imotion_position::move( float dt, IKinematicsAnimated& KA )
shell->CollideAll();
interactive_motion_diagnostic( make_string( " move (to ragdoll): deppth= %f", depth ).c_str() );
DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 255, 0 ,255 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 255, 0 ,255 ) );
DBG_ClosedCashedDraw( 50000 );
}
#endif
Expand Down Expand Up @@ -576,7 +576,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
//interactive_motion_diagnostic( make_string( " motion_collide collided0: deppth= %f", depth ).c_str() );
interactive_motion_diagnostic( make_string( "motion_collide 1: stoped: colide: %s, depth %f", collide_diag().c_str(), depth ).c_str() );
DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 0 ) );
DBG_ClosedCashedDraw( 50000 );
}
#endif
Expand All @@ -591,7 +591,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
{
interactive_motion_diagnostic( make_string( " motion_collide collided1: deppth= %f", depth ).c_str() );
DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 255 ) );
DBG_ClosedCashedDraw( 50000 );
}
#endif
Expand All @@ -611,7 +611,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
{
interactive_motion_diagnostic( make_string( " motion_collide collided2: deppth= %f", depth ).c_str() );
DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 0 ) );
DBG_ClosedCashedDraw( 50000 );
}
#endif
Expand All @@ -635,7 +635,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
shell->CollideAll();
interactive_motion_diagnostic( make_string( " motion_collide restore: %f ", depth ).c_str() );
DBG_OpenCashedDraw();
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 255, 0, 0 ) );
shell->dbg_draw_geometry( 0.02, color_argb( 255, 255, 0, 0 ) );
DBG_ClosedCashedDraw( 50000 );
}
#endif
Expand Down

0 comments on commit 79c9582

Please sign in to comment.