Skip to content

Commit 79c9582

Browse files
committed
Most of D3DCOLOR_ARGB() calls replaced by color_argb().
Author: Jules Blok <[email protected]> Author: Alexandr Akulich <[email protected]> Based on commit 46c36e6 from Armada651/xray repository.
1 parent 9531878 commit 79c9582

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

src/editors/LevelEditor/Edit/SceneObject.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ void CSceneObject::RenderBlink()
131131
if (m_iBlinkTime>0){
132132
if (m_iBlinkTime>(int)EDevice.dwTimeGlobal){
133133
int alpha = iFloor(sqrtf(float(m_iBlinkTime-EDevice.dwTimeGlobal)/BLINK_TIME)*64);
134-
m_pReference->RenderSelection(_Transform(),0, m_BlinkSurf, D3DCOLOR_ARGB(alpha,255,255,255));
134+
m_pReference->RenderSelection(_Transform(),0, m_BlinkSurf, color_argb(alpha,255,255,255));
135135
UI->RedrawScene ();
136136
}else{
137137
m_iBlinkTime = 0;

src/xrEngine/cf_dynamic_mesh.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ BOOL CCF_DynamicMesh::_RayQuery(const collide::ray_defs& Q, collide::rq_results&
4646
if (res)
4747
{
4848
ph_debug_render->open_cashed_draw();
49-
ph_debug_render->draw_tri(br.tri[0], br.tri[1], br.tri[2], D3DCOLOR_ARGB(50, 255, 0, 0), 0);
49+
ph_debug_render->draw_tri(br.tri[0], br.tri[1], br.tri[2], color_argb(50, 255, 0, 0), 0);
5050
ph_debug_render->close_cashed_draw(50000);
5151
}
5252
#endif

src/xrGame/CharacterPhysicsSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ void CCharacterPhysicsSupport::in_UpdateCL( )
617617
DBG_PhysBones( m_EntityAlife );
618618

619619
if( dbg_draw_character_physics && m_pPhysicsShell )
620-
m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_ARGB( 100 ,255, 0, 0 ) );
620+
m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_argb( 100 ,255, 0, 0 ) );
621621
#endif
622622
update_animation_collision();
623623
m_character_shell_control.CalculateTimeDelta( );

src/xrGame/ik/IKLimb.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1198,23 +1198,23 @@ void DBG_DrawRotationLimitsY( const Fmatrix &start, float ang, float l, float h
11981198
{
11991199
#ifdef DEBUG
12001200
DBG_DrawRotationY( start, ang - EPS, ang + EPS, 0.15f, color_xrgb( 0, 255, 0 ), false, 1 );
1201-
DBG_DrawRotationY( start, l, h, 0.15f, D3DCOLOR_ARGB( 50, 0, 250, 0 ), true );
1201+
DBG_DrawRotationY( start, l, h, 0.15f, color_argb( 50, 0, 250, 0 ), true );
12021202
#endif // DEBUG
12031203
}
12041204

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

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

src/xrGame/imotion_position.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@ static void dbg_draw_state_end( CPhysicsShell *shell )
209209
if( dbg_imotion_draw_velocity )
210210
{
211211
DBG_OpenCashedDraw();
212-
shell->dbg_draw_velocity( dbg_imotion_draw_velocity_scale, D3DCOLOR_ARGB( 100 ,255, 0, 0 ) );
212+
shell->dbg_draw_velocity( dbg_imotion_draw_velocity_scale, color_argb( 100 ,255, 0, 0 ) );
213213
//shell->dbg_draw_force( 0.01, color_xrgb( 0, 0, 255 ) );
214214
DBG_ClosedCashedDraw( 50000 );
215215
}
216216
if(dbg_imotion_collide_debug)
217217
{
218218
#ifdef DEBUG
219219
DBG_OpenCashedDraw();
220-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 255, 255, 255 ) );
220+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 255, 255, 255 ) );
221221
DBG_ClosedCashedDraw( 50000 );
222222
#endif
223223
}
@@ -293,7 +293,7 @@ void imotion_position::state_end( )
293293
#if 0
294294

295295
DBG_OpenCashedDraw();
296-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
296+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 0 ) );
297297
DBG_DrawBones( *shell->get_ElementByStoreOrder( 0 )->PhysicsRefObject() );
298298
DBG_ClosedCashedDraw( 50000 );
299299

@@ -318,7 +318,7 @@ void imotion_position::state_end( )
318318
#if 0
319319

320320
DBG_OpenCashedDraw();
321-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 0, 255 ) );
321+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 0, 255 ) );
322322
DBG_DrawBones( *shell->get_ElementByStoreOrder( 0 )->PhysicsRefObject() );
323323
DBG_ClosedCashedDraw( 50000 );
324324

@@ -543,7 +543,7 @@ float imotion_position::move( float dt, IKinematicsAnimated& KA )
543543
shell->CollideAll();
544544
interactive_motion_diagnostic( make_string( " move (to ragdoll): deppth= %f", depth ).c_str() );
545545
DBG_OpenCashedDraw();
546-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 255, 0 ,255 ) );
546+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 255, 0 ,255 ) );
547547
DBG_ClosedCashedDraw( 50000 );
548548
}
549549
#endif
@@ -576,7 +576,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
576576
//interactive_motion_diagnostic( make_string( " motion_collide collided0: deppth= %f", depth ).c_str() );
577577
interactive_motion_diagnostic( make_string( "motion_collide 1: stoped: colide: %s, depth %f", collide_diag().c_str(), depth ).c_str() );
578578
DBG_OpenCashedDraw();
579-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
579+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 0 ) );
580580
DBG_ClosedCashedDraw( 50000 );
581581
}
582582
#endif
@@ -591,7 +591,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
591591
{
592592
interactive_motion_diagnostic( make_string( " motion_collide collided1: deppth= %f", depth ).c_str() );
593593
DBG_OpenCashedDraw();
594-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 255 ) );
594+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 255 ) );
595595
DBG_ClosedCashedDraw( 50000 );
596596
}
597597
#endif
@@ -611,7 +611,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
611611
{
612612
interactive_motion_diagnostic( make_string( " motion_collide collided2: deppth= %f", depth ).c_str() );
613613
DBG_OpenCashedDraw();
614-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 0, 255, 0 ) );
614+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 0, 255, 0 ) );
615615
DBG_ClosedCashedDraw( 50000 );
616616
}
617617
#endif
@@ -635,7 +635,7 @@ float imotion_position::motion_collide( float dt, IKinematicsAnimated& KA )
635635
shell->CollideAll();
636636
interactive_motion_diagnostic( make_string( " motion_collide restore: %f ", depth ).c_str() );
637637
DBG_OpenCashedDraw();
638-
shell->dbg_draw_geometry( 0.02, D3DCOLOR_ARGB( 255, 255, 0, 0 ) );
638+
shell->dbg_draw_geometry( 0.02, color_argb( 255, 255, 0, 0 ) );
639639
DBG_ClosedCashedDraw( 50000 );
640640
}
641641
#endif

0 commit comments

Comments
 (0)