From 95318780c4d25ed786d0c1fb27c5aa1ac1b28a77 Mon Sep 17 00:00:00 2001 From: Alexandr Akulich Date: Mon, 9 Nov 2015 19:17:12 +0500 Subject: [PATCH] Massive D3DCOLOR_XRGB() -> color_xrgb() change. Author: Jules Blok Author: Alexandr Akulich Based on commit 46c36e6 from Armada651/xray repository. --- src/Layers/xrRender/SkeletonCustom.cpp | 8 +- src/Layers/xrRender/dxConsoleRender.cpp | 10 +- src/Layers/xrRender/dxObjectSpaceRender.cpp | 4 +- src/Layers/xrRender/occRasterizer.cpp | 2 +- src/Layers/xrRender/r__dsgraph_build.cpp | 8 +- src/Layers/xrRenderPC_R1/LightShadows.cpp | 2 +- src/editors/ECore/Engine/Image.cpp | 2 +- src/xrCDB/xr_area.cpp | 4 +- src/xrCDB/xr_area_raypick.cpp | 4 +- src/xrGame/ActivatingCharCollisionDelay.cpp | 2 +- src/xrGame/Actor.cpp | 2 +- src/xrGame/ActorCameras.cpp | 18 ++-- src/xrGame/CharacterPhysicsSupport.cpp | 38 ++++---- src/xrGame/ClimableObject.cpp | 8 +- src/xrGame/CustomMonster.cpp | 42 ++++----- src/xrGame/CustomRocket.cpp | 4 +- src/xrGame/DBG_Car.cpp | 56 +++++------ src/xrGame/Explosive.cpp | 12 +-- src/xrGame/HelicopterMovementManager.cpp | 8 +- src/xrGame/IKFoot.cpp | 6 +- src/xrGame/IKLimbsController.cpp | 2 +- src/xrGame/Level.cpp | 8 +- src/xrGame/Level_Bullet_Manager.cpp | 6 +- src/xrGame/PHDebug.cpp | 36 +++---- src/xrGame/PHDebug.h | 2 +- src/xrGame/PhysicObject.cpp | 10 +- src/xrGame/UICursor.cpp | 2 +- src/xrGame/Weapon.cpp | 6 +- src/xrGame/WeaponKnife.cpp | 14 +-- src/xrGame/WeaponMagazinedWGrenade.cpp | 6 +- src/xrGame/WeaponRG6.cpp | 6 +- src/xrGame/ai/monsters/ai_monster_defs.h | 2 +- .../basemonster/base_monster_debug.cpp | 10 +- .../basemonster/base_monster_script.cpp | 4 +- .../ai/monsters/controller/controller.cpp | 4 +- .../controller/controller_psy_hit.cpp | 2 +- .../ai/monsters/monster_cover_manager.cpp | 2 +- .../ai/monsters/rats/ai_rat_templates.cpp | 12 +-- src/xrGame/ai/stalker/ai_stalker_debug.cpp | 94 +++++++++---------- src/xrGame/character_hit_animations.cpp | 2 +- src/xrGame/doors_actor.cpp | 4 +- src/xrGame/file_transfer.cpp | 2 +- src/xrGame/game_cl_mp.cpp | 4 +- src/xrGame/game_sv_artefacthunt.cpp | 4 +- src/xrGame/game_sv_base.cpp | 2 +- src/xrGame/ik/IKLimb.cpp | 48 +++++----- src/xrGame/ik_foot_collider.cpp | 14 +-- src/xrGame/ik_object_shift.cpp | 4 +- src/xrGame/imotion_position.cpp | 4 +- src/xrGame/inventory_item.cpp | 4 +- src/xrGame/level_debug.cpp | 8 +- src/xrGame/level_graph_debug.cpp | 52 +++++----- src/xrGame/level_graph_debug2.cpp | 52 +++++----- src/xrGame/player_hud_tune.cpp | 6 +- src/xrGame/script_game_object3.cpp | 2 +- src/xrGame/script_zone.cpp | 4 +- src/xrGame/smart_cover_object.cpp | 2 +- src/xrGame/space_restrictor.cpp | 4 +- src/xrGame/team_base_zone.cpp | 4 +- src/xrGame/ui/UIMainIngameWnd.cpp | 4 +- src/xrGame/wallmark_manager.cpp | 6 +- src/xrPhysics/ActorCameraCollision.cpp | 4 +- src/xrPhysics/Geometry.cpp | 2 +- src/xrPhysics/PHActivationShape.cpp | 4 +- src/xrPhysics/PHDisabling.cpp | 4 +- src/xrPhysics/PHElement.cpp | 12 +-- src/xrPhysics/PHObject.cpp | 2 +- src/xrPhysics/PHShell.cpp | 4 +- src/xrPhysics/PHSimpleCharacter.cpp | 22 ++--- .../tri-colliderknoopc/dSortTriPrimitive.h | 20 ++-- 70 files changed, 389 insertions(+), 389 deletions(-) diff --git a/src/Layers/xrRender/SkeletonCustom.cpp b/src/Layers/xrRender/SkeletonCustom.cpp index b400727dda5..9d3dea03b9c 100644 --- a/src/Layers/xrRender/SkeletonCustom.cpp +++ b/src/Layers/xrRender/SkeletonCustom.cpp @@ -69,12 +69,12 @@ void CKinematics::DebugRender(Fmatrix& XFORM) Fvector P1,P2; M1.transform_tiny(P1,Z); M2.transform_tiny(P2,Z); - RCache.dbg_DrawLINE(XFORM,P1,P2,D3DCOLOR_XRGB(0,255,0)); + RCache.dbg_DrawLINE(XFORM,P1,P2,color_xrgb(0,255,0)); Fmatrix M; M.mul_43(XFORM,M2); - RCache.dbg_DrawOBB(M,H1,D3DCOLOR_XRGB(255,255,255)); - RCache.dbg_DrawOBB(M,H2,D3DCOLOR_XRGB(255,255,255)); + RCache.dbg_DrawOBB(M,H1,color_xrgb(255,255,255)); + RCache.dbg_DrawOBB(M,H2,color_xrgb(255,255,255)); } for (u32 b=0; bsize(); b++) @@ -84,7 +84,7 @@ void CKinematics::DebugRender(Fmatrix& XFORM) Fmatrix Mbox; obb.xform_get(Mbox); Fmatrix X; X.mul(Mbone,Mbox); Fmatrix W; W.mul(XFORM,X); - RCache.dbg_DrawOBB(W,obb.m_halfsize,D3DCOLOR_XRGB(0,0,255)); + RCache.dbg_DrawOBB(W,obb.m_halfsize,color_xrgb(0,0,255)); } } #endif diff --git a/src/Layers/xrRender/dxConsoleRender.cpp b/src/Layers/xrRender/dxConsoleRender.cpp index d88abad2d2c..c49b15ae60f 100644 --- a/src/Layers/xrRender/dxConsoleRender.cpp +++ b/src/Layers/xrRender/dxConsoleRender.cpp @@ -26,10 +26,10 @@ void dxConsoleRender::OnRender(bool bGame) u32 vOffset = 0; // TODO: DX10: Implement console background clearing for DX10 FVF::TL* verts = (FVF::TL*)RCache.Vertex.Lock(4, m_Geom->vb_stride, vOffset); - verts->set ( R.x1, R.y2, D3DCOLOR_XRGB(32,32,32), 0, 0 ); verts++; - verts->set ( R.x1, R.y1, D3DCOLOR_XRGB(32,32,32), 0, 0 ); verts++; - verts->set ( R.x2, R.y2, D3DCOLOR_XRGB(32,32,32), 0, 0 ); verts++; - verts->set ( R.x2, R.y1, D3DCOLOR_XRGB(32,32,32), 0, 0 ); verts++; + verts->set ( R.x1, R.y2, color_xrgb(32,32,32), 0, 0 ); verts++; + verts->set ( R.x1, R.y1, color_xrgb(32,32,32), 0, 0 ); verts++; + verts->set ( R.x2, R.y2, color_xrgb(32,32,32), 0, 0 ); verts++; + verts->set ( R.x2, R.y1, color_xrgb(32,32,32), 0, 0 ); verts++; RCache.Vertex.Unlock(4,m_Geom->vb_stride); RCache.set_Element (m_Shader->E[0]); @@ -37,6 +37,6 @@ void dxConsoleRender::OnRender(bool bGame) RCache.Render (D3DPT_TRIANGLELIST, vOffset, 0, 4, 0, 2); #else // USE_DX10 - CHK_DX (HW.pDevice->Clear(1,&R,D3DCLEAR_TARGET,D3DCOLOR_XRGB(32,32,32),1,0)); + CHK_DX (HW.pDevice->Clear(1,&R,D3DCLEAR_TARGET,color_xrgb(32,32,32),1,0)); #endif // USE_DX10 } \ No newline at end of file diff --git a/src/Layers/xrRender/dxObjectSpaceRender.cpp b/src/Layers/xrRender/dxObjectSpaceRender.cpp index cc1895affa7..abab373b68e 100644 --- a/src/Layers/xrRender/dxObjectSpaceRender.cpp +++ b/src/Layers/xrRender/dxObjectSpaceRender.cpp @@ -34,10 +34,10 @@ void dxObjectSpaceRender::dbgRender() Fobb& obb = q_debug.boxes[i]; Fmatrix X,S,R; obb.xform_get(X); - RCache.dbg_DrawOBB(X,obb.m_halfsize,D3DCOLOR_XRGB(255,0,0)); + RCache.dbg_DrawOBB(X,obb.m_halfsize,color_xrgb(255,0,0)); S.scale (obb.m_halfsize); R.mul (X,S); - RCache.dbg_DrawEllipse(R,D3DCOLOR_XRGB(0,0,255)); + RCache.dbg_DrawEllipse(R,color_xrgb(0,0,255)); } q_debug.boxes.clear(); diff --git a/src/Layers/xrRender/occRasterizer.cpp b/src/Layers/xrRender/occRasterizer.cpp index 1dce4fb57fd..004bd6e653c 100644 --- a/src/Layers/xrRender/occRasterizer.cpp +++ b/src/Layers/xrRender/occRasterizer.cpp @@ -177,7 +177,7 @@ void occRasterizer::on_dbg_render() Device.SetNearer(TRUE); RCache.set_Shader (RImplementation.m_SelectionShader); - RCache.dbg_DrawOBB( Transform, tmp.radius, D3DCOLOR_XRGB(u32(255*pow(tmp.z,20.f)),u32(255*(1-pow(tmp.z,20.f))),0) ); + RCache.dbg_DrawOBB( Transform, tmp.radius, color_xrgb(u32(255*pow(tmp.z,20.f)),u32(255*(1-pow(tmp.z,20.f))),0) ); Device.SetNearer(FALSE); } } diff --git a/src/Layers/xrRender/r__dsgraph_build.cpp b/src/Layers/xrRender/r__dsgraph_build.cpp index f0b9ef485a2..13782b025e1 100644 --- a/src/Layers/xrRender/r__dsgraph_build.cpp +++ b/src/Layers/xrRender/r__dsgraph_build.cpp @@ -941,7 +941,7 @@ void D3DXRenderBase::overdrawEnd() CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILFUNC, D3DCMP_EQUAL)); CHK_DX(HW.pDevice->SetRenderState(D3DRS_STENCILMASK, 0xff)); // Set the background to black - CHK_DX(HW.pDevice->Clear(0, 0, D3DCLEAR_TARGET,D3DCOLOR_XRGB(255, 0, 0), 0, 0)); + CHK_DX(HW.pDevice->Clear(0, 0, D3DCLEAR_TARGET,color_xrgb(255, 0, 0), 0, 0)); // Draw a rectangle wherever the count equal I RCache.OnFrameEnd(); CHK_DX(HW.pDevice->SetFVF(FVF::F_TL)); @@ -949,7 +949,7 @@ void D3DXRenderBase::overdrawEnd() for (int I=0; I<12; I++) { u32 _c = I*256/13; - u32 c = D3DCOLOR_XRGB(_c, _c, _c); + u32 c = color_xrgb(_c, _c, _c); FVF::TL pv[4]; pv[0].set(float(0), float(Device.dwHeight), c, 0, 0); pv[1].set(float(0), float(0), c, 0, 0); @@ -1031,7 +1031,7 @@ void D3DXRenderBase::Clear() } #else CHK_DX(HW.pDevice->Clear(0, 0, D3DCLEAR_ZBUFFER|(psDeviceFlags.test(rsClearBB)?D3DCLEAR_TARGET:0)| - (HW.Caps.bStencil?D3DCLEAR_STENCIL:0), D3DCOLOR_XRGB(0, 0, 0), 1, 0)); + (HW.Caps.bStencil?D3DCLEAR_STENCIL:0), color_xrgb(0, 0, 0), 1, 0)); #endif } @@ -1064,7 +1064,7 @@ void D3DXRenderBase::ClearTarget() FLOAT ColorRGBA[4] = {0.0f, 0.0f, 0.0f, 0.0f}; HW.pContext->ClearRenderTargetView(RCache.get_RT(), ColorRGBA); #else - CHK_DX(HW.pDevice->Clear(0,0,D3DCLEAR_TARGET,D3DCOLOR_XRGB(0, 0, 0), 1, 0)); + CHK_DX(HW.pDevice->Clear(0,0,D3DCLEAR_TARGET,color_xrgb(0, 0, 0), 1, 0)); #endif } diff --git a/src/Layers/xrRenderPC_R1/LightShadows.cpp b/src/Layers/xrRenderPC_R1/LightShadows.cpp index 7547b60adfe..d721746f5b9 100644 --- a/src/Layers/xrRenderPC_R1/LightShadows.cpp +++ b/src/Layers/xrRenderPC_R1/LightShadows.cpp @@ -172,7 +172,7 @@ void CLightShadows::calculate () bRTS = TRUE; RCache.set_RT (RT_temp->pRT); RCache.set_ZB (RImplementation.Target->pTempZB); - HW.pDevice->Clear (0,0,D3DCLEAR_TARGET,D3DCOLOR_XRGB(255,255,255),1,0); + HW.pDevice->Clear (0,0,D3DCLEAR_TARGET,color_xrgb(255,255,255),1,0); } // calculate light center diff --git a/src/editors/ECore/Engine/Image.cpp b/src/editors/ECore/Engine/Image.cpp index fd56af22789..8c3a4c047b9 100644 --- a/src/editors/ECore/Engine/Image.cpp +++ b/src/editors/ECore/Engine/Image.cpp @@ -281,7 +281,7 @@ bool CImage::LoadTGA(LPCSTR name) // u32 R = RGBA_GETRED (pixel)/2; // u32 G = RGBA_GETGREEN (pixel)/2; // u32 B = RGBA_GETBLUE (pixel)/2; -// *ptr++ = D3DCOLOR_XRGB(R,G,B); +// *ptr++ = color_xrgb(R,G,B); } } } diff --git a/src/xrCDB/xr_area.cpp b/src/xrCDB/xr_area.cpp index 555ea5cc8cb..279579f99b1 100644 --- a/src/xrCDB/xr_area.cpp +++ b/src/xrCDB/xr_area.cpp @@ -146,10 +146,10 @@ void CObjectSpace::dbgRender() Fobb& obb = q_debug.boxes[i]; Fmatrix X,S,R; obb.xform_get(X); - RCache.dbg_DrawOBB(X,obb.m_halfsize,D3DCOLOR_XRGB(255,0,0)); + RCache.dbg_DrawOBB(X,obb.m_halfsize,color_xrgb(255,0,0)); S.scale (obb.m_halfsize); R.mul (X,S); - RCache.dbg_DrawEllipse(R,D3DCOLOR_XRGB(0,0,255)); + RCache.dbg_DrawEllipse(R,color_xrgb(0,0,255)); } q_debug.boxes.clear(); diff --git a/src/xrCDB/xr_area_raypick.cpp b/src/xrCDB/xr_area_raypick.cpp index 64520295ecf..5f2a8ce7a20 100644 --- a/src/xrCDB/xr_area_raypick.cpp +++ b/src/xrCDB/xr_area_raypick.cpp @@ -130,10 +130,10 @@ BOOL CObjectSpace::_RayPick ( const Fvector &start, const Fvector &dir, float ra if (collidable==ignore_object) continue; ECollisionFormType tp = collidable->collidable.model->Type(); if (((tgt&(rqtObject|rqtObstacle))&&(tp==cftObject))||((tgt&rqtShape)&&(tp==cftShape))){ - u32 C = D3DCOLOR_XRGB (64,64,64); + u32 C = color_xrgb (64,64,64); Q.range = R.range; if (collidable->collidable.model->_RayQuery(Q,r_temp)){ - C = D3DCOLOR_XRGB(128,128,196); + C = color_xrgb(128,128,196); R.set_if_less (r_temp.r_begin()); } #ifdef DEBUG diff --git a/src/xrGame/ActivatingCharCollisionDelay.cpp b/src/xrGame/ActivatingCharCollisionDelay.cpp index cce7dd811ac..729f49f272f 100644 --- a/src/xrGame/ActivatingCharCollisionDelay.cpp +++ b/src/xrGame/ActivatingCharCollisionDelay.cpp @@ -59,7 +59,7 @@ bool activating_character_delay::do_position_correct() Fmatrix m = obj->XFORM(); m.c = sv_pos; DBG_DrawMatrix( m, 0.5f ); - DBG_DrawLine( obj->Position(), m.c, D3DCOLOR_XRGB( 255, 255, 255 ) ); + DBG_DrawLine( obj->Position(), m.c, color_xrgb( 255, 255, 255 ) ); DBG_ClosedCashedDraw(50000); } #endif diff --git a/src/xrGame/Actor.cpp b/src/xrGame/Actor.cpp index 01059c8895e..029b9a9fdfc 100644 --- a/src/xrGame/Actor.cpp +++ b/src/xrGame/Actor.cpp @@ -472,7 +472,7 @@ void CActor::Hit(SHit* pHDS) if(ph_dbg_draw_mask.test(phDbgCharacterControl)) { DBG_OpenCashedDraw(); Fvector to;to.add(Position(),Fvector().mul(HDS.dir,HDS.phys_impulse())); - DBG_DrawLine(Position(),to,D3DCOLOR_XRGB(124,124,0)); + DBG_DrawLine(Position(),to,color_xrgb(124,124,0)); DBG_ClosedCashedDraw(500); } #endif // DEBUG diff --git a/src/xrGame/ActorCameras.cpp b/src/xrGame/ActorCameras.cpp index 7b9a1757825..c9df047bcc2 100644 --- a/src/xrGame/ActorCameras.cpp +++ b/src/xrGame/ActorCameras.cpp @@ -165,15 +165,15 @@ void dbg_draw_viewport( const T &cam_info, float _viewport_near ) const Fvector bottom_left = Fvector().sub( near_plane_center, right ).sub( up ); const Fvector bottom_right = Fvector().add( near_plane_center, right ).sub( up ); - DBG_DrawLine( cam_info.Position(), top_left, D3DCOLOR_XRGB(255, 0, 0 ) ); - DBG_DrawLine( cam_info.Position(), top_right, D3DCOLOR_XRGB(255, 0, 0 ) ); - DBG_DrawLine( cam_info.Position(), bottom_left, D3DCOLOR_XRGB(255, 0, 0 ) ); - DBG_DrawLine( cam_info.Position(), bottom_right, D3DCOLOR_XRGB(255, 0, 0 ) ); - - DBG_DrawLine( top_right, top_left, D3DCOLOR_XRGB(255, 0, 0 ) ); - DBG_DrawLine( bottom_right, top_right, D3DCOLOR_XRGB(255, 0, 0 ) ); - DBG_DrawLine( top_left, bottom_left, D3DCOLOR_XRGB(255, 0, 0 ) ); - DBG_DrawLine( bottom_left, bottom_right, D3DCOLOR_XRGB(255, 0, 0 ) ); + DBG_DrawLine( cam_info.Position(), top_left, color_xrgb(255, 0, 0 ) ); + DBG_DrawLine( cam_info.Position(), top_right, color_xrgb(255, 0, 0 ) ); + DBG_DrawLine( cam_info.Position(), bottom_left, color_xrgb(255, 0, 0 ) ); + DBG_DrawLine( cam_info.Position(), bottom_right, color_xrgb(255, 0, 0 ) ); + + DBG_DrawLine( top_right, top_left, color_xrgb(255, 0, 0 ) ); + DBG_DrawLine( bottom_right, top_right, color_xrgb(255, 0, 0 ) ); + DBG_DrawLine( top_left, bottom_left, color_xrgb(255, 0, 0 ) ); + DBG_DrawLine( bottom_left, bottom_right, color_xrgb(255, 0, 0 ) ); } #endif diff --git a/src/xrGame/CharacterPhysicsSupport.cpp b/src/xrGame/CharacterPhysicsSupport.cpp index 4e9b123892c..2deda50be25 100644 --- a/src/xrGame/CharacterPhysicsSupport.cpp +++ b/src/xrGame/CharacterPhysicsSupport.cpp @@ -590,7 +590,7 @@ void dbg_draw_geoms(xr_vector& m_weapon_geoms) { CODEGeom *g =(*ii); - g->dbg_draw( 0.01f, D3DCOLOR_XRGB( 0, 255, 100 ), Flags32() ); + g->dbg_draw( 0.01f, color_xrgb( 0, 255, 100 ), Flags32() ); } } #endif @@ -888,13 +888,13 @@ void CCharacterPhysicsSupport::on_child_shell_activate ( CPhysicsShellHolder* o VERIFY(obj->PPhysicsShell()); #if 0 // DBG_OpenCashedDraw(); - //m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 255, 100, 0 ) ); - m_pPhysicsShell->dbg_draw_velocity( 0.01f, D3DCOLOR_XRGB( 100, 255, 0 ) ); - m_pPhysicsShell->dbg_draw_force( 0.1f, D3DCOLOR_XRGB( 100, 0, 255 ) ); + //m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_xrgb( 255, 100, 0 ) ); + m_pPhysicsShell->dbg_draw_velocity( 0.01f, color_xrgb( 100, 255, 0 ) ); + m_pPhysicsShell->dbg_draw_force( 0.1f, color_xrgb( 100, 0, 255 ) ); DBG_ClosedCashedDraw( 50000 ); #endif //DBG_OpenCashedDraw(); - //obj->PPhysicsShell()->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 255, 100, 0 ) ); + //obj->PPhysicsShell()->dbg_draw_geometry( 0.2f, color_xrgb( 255, 100, 0 ) ); RemoveActiveWeaponCollision (); @@ -931,7 +931,7 @@ void CCharacterPhysicsSupport:: RemoveActiveWeaponCollision () { CODEGeom *g =(*ii); - //g->dbg_draw( 0.01f, D3DCOLOR_XRGB( 0, 0, 255 ), Flags32() ); + //g->dbg_draw( 0.01f, color_xrgb( 0, 0, 255 ), Flags32() ); m_weapon_attach_bone->remove_geom( g ); g->destroy(); @@ -939,7 +939,7 @@ void CCharacterPhysicsSupport:: RemoveActiveWeaponCollision () } - //m_active_item_obj->PPhysicsShell()->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 255, 0, 100 ) ); + //m_active_item_obj->PPhysicsShell()->dbg_draw_geometry( 0.2f, color_xrgb( 255, 0, 100 ) ); Fvector a_vel, l_vel; const Fvector& mc = root->mass_Center(); @@ -1045,11 +1045,11 @@ void CCharacterPhysicsSupport:: AddActiveWeaponCollision () for( ;ii!=ee; ++ii ) { CODEGeom *g =(*ii); - //g->dbg_draw( 0.01f, D3DCOLOR_XRGB( 255, 0, 0 ), Flags32() ); + //g->dbg_draw( 0.01f, color_xrgb( 255, 0, 0 ), Flags32() ); weapon_element->remove_geom( g ); g->set_bone_id( weapon_attach_bone->m_SelfID ); weapon_attach_bone->add_geom( g ); - //g->dbg_draw( 0.01f, D3DCOLOR_XRGB( 0, 255, 0 ), Flags32() ); + //g->dbg_draw( 0.01f, color_xrgb( 0, 255, 0 ), Flags32() ); } m_weapon_attach_bone = weapon_attach_bone; m_active_item_obj = &(active_weapon_item->object()); @@ -1057,7 +1057,7 @@ void CCharacterPhysicsSupport:: AddActiveWeaponCollision () destroy_physics_shell( weapon_shell ); - //m_pPhysicsShell->dbg_draw_geometry( 1, D3DCOLOR_XRGB( 0, 0, 255 ) ); + //m_pPhysicsShell->dbg_draw_geometry( 1, color_xrgb( 0, 0, 255 ) ); //DBG_ClosedCashedDraw( 50000 ); } @@ -1182,7 +1182,7 @@ void CCharacterPhysicsSupport:: EndActivateFreeShell ( CObject* who, const Fve if( dbg_draw_ragdoll_spawn ) { DBG_OpenCashedDraw(); - m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 255, 100, 0 ) ); + m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_xrgb( 255, 100, 0 ) ); DBG_ClosedCashedDraw( 50000 ); } #endif @@ -1194,7 +1194,7 @@ if( dbg_draw_ragdoll_spawn ) if( dbg_draw_ragdoll_spawn ) { DBG_OpenCashedDraw(); - m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 255, 0, 100 ) ); + m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_xrgb( 255, 0, 100 ) ); DBG_ClosedCashedDraw( 50000 ); } #endif @@ -1205,7 +1205,7 @@ if( dbg_draw_ragdoll_spawn ) if( dbg_draw_ragdoll_spawn ) { DBG_OpenCashedDraw(); - m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 100, 255, 100 ) ); + m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_xrgb( 100, 255, 100 ) ); DBG_ClosedCashedDraw( 50000 ); } #endif @@ -1374,17 +1374,17 @@ void CCharacterPhysicsSupport::FlyTo(const Fvector &disp) m_pPhysicsShell->set_LinearVel(vel); #if 0 DBG_OpenCashedDraw(); - //m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 255, 100, 0 ) ); - m_pPhysicsShell->dbg_draw_velocity( 0.01f, D3DCOLOR_XRGB( 0, 255, 0 ) ); - m_pPhysicsShell->dbg_draw_force( 0.1f, D3DCOLOR_XRGB( 0, 0, 255 ) ); + //m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_xrgb( 255, 100, 0 ) ); + m_pPhysicsShell->dbg_draw_velocity( 0.01f, color_xrgb( 0, 255, 0 ) ); + m_pPhysicsShell->dbg_draw_force( 0.1f, color_xrgb( 0, 0, 255 ) ); // DBG_ClosedCashedDraw( 50000 ); #endif physics_world()->Step(); #if 0 // DBG_OpenCashedDraw(); - //m_pPhysicsShell->dbg_draw_geometry( 0.2f, D3DCOLOR_XRGB( 255, 100, 0 ) ); - m_pPhysicsShell->dbg_draw_velocity( 0.01f, D3DCOLOR_XRGB( 100, 255, 0 ) ); - m_pPhysicsShell->dbg_draw_force( 0.1f, D3DCOLOR_XRGB( 100, 0, 255 ) ); + //m_pPhysicsShell->dbg_draw_geometry( 0.2f, color_xrgb( 255, 100, 0 ) ); + m_pPhysicsShell->dbg_draw_velocity( 0.01f, color_xrgb( 100, 255, 0 ) ); + m_pPhysicsShell->dbg_draw_force( 0.1f, color_xrgb( 100, 0, 255 ) ); DBG_ClosedCashedDraw( 50000 ); #endif } diff --git a/src/xrGame/ClimableObject.cpp b/src/xrGame/ClimableObject.cpp index e2bc239cca7..0d73a2dbe32 100644 --- a/src/xrGame/ClimableObject.cpp +++ b/src/xrGame/ClimableObject.cpp @@ -349,22 +349,22 @@ void CClimableObject ::OnRender() Fmatrix form;m_box.xform_get(form); //form.mulA(XFORM()); - Level().debug_renderer().draw_obb(XFORM(),m_box.m_halfsize,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_obb(XFORM(),m_box.m_halfsize,color_xrgb(0,0,255)); Fvector p1,p2,d; d.set(m_axis); p1.add(XFORM().c,d); p2.sub(XFORM().c,d); - Level().debug_renderer().draw_line(Fidentity,p1,p2,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,p1,p2,color_xrgb(255,0,0)); d.set(m_side); p1.add(XFORM().c,d); p2.sub(XFORM().c,d); - Level().debug_renderer().draw_line(Fidentity,p1,p2,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,p1,p2,color_xrgb(255,0,0)); d.set(m_norm); d.mul(10.f); p1.add(XFORM().c,d); p2.set(XFORM().c); - Level().debug_renderer().draw_line(Fidentity,p1,p2,D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line(Fidentity,p1,p2,color_xrgb(0,255,0)); } #endif \ No newline at end of file diff --git a/src/xrGame/CustomMonster.cpp b/src/xrGame/CustomMonster.cpp index 2779b2fc0b9..f2347627039 100644 --- a/src/xrGame/CustomMonster.cpp +++ b/src/xrGame/CustomMonster.cpp @@ -1112,16 +1112,16 @@ void CCustomMonster::OnRender() xr_vector::const_iterator i = path.begin(); xr_vector::const_iterator const e = path.end(); for ( ; i != e; ++i ) - Level().debug_renderer().draw_aabb ( ai().level_graph().vertex_position(*i), radius, radius, radius, D3DCOLOR_XRGB(255,22,255) ); + Level().debug_renderer().draw_aabb ( ai().level_graph().vertex_position(*i), radius, radius, radius, color_xrgb(255,22,255) ); } for (int i=0; i<1; ++i) { const xr_vector &keys = !i ? movement().detail().m_key_points : movement().detail().m_key_points; const xr_vector &path = !i ? movement().detail().path() : movement().detail().path(); - u32 color0 = !i ? D3DCOLOR_XRGB(0,255,0) : D3DCOLOR_XRGB(0,0,255); - u32 color1 = !i ? D3DCOLOR_XRGB(255,0,0) : D3DCOLOR_XRGB(255,255,0); - u32 color2 = !i ? D3DCOLOR_XRGB(0,0,255) : D3DCOLOR_XRGB(0,255,255); - u32 color3 = !i ? D3DCOLOR_XRGB(255,255,255) : D3DCOLOR_XRGB(255,0,255); + u32 color0 = !i ? color_xrgb(0,255,0) : color_xrgb(0,0,255); + u32 color1 = !i ? color_xrgb(255,0,0) : color_xrgb(255,255,0); + u32 color2 = !i ? color_xrgb(0,0,255) : color_xrgb(0,255,255); + u32 color3 = !i ? color_xrgb(255,255,255) : color_xrgb(255,0,255); float radius0 = !i ? .1f : .15f; float radius1 = !i ? .2f : .3f; { @@ -1160,19 +1160,19 @@ void CCustomMonster::OnRender() Fvector P1 = ai().level_graph().vertex_position(node); P1.y += 1.f; - Level().debug_renderer().draw_aabb (P1,.5f,1.f,.5f,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_aabb (P1,.5f,1.f,.5f,color_xrgb(255,0,0)); } if (g_Alive()) { if (memory().enemy().selected()) { Fvector P1 = memory().memory(memory().enemy().selected()).m_object_params.m_position; P1.y += 1.f; - Level().debug_renderer().draw_aabb (P1,1.f,1.f,1.f,D3DCOLOR_XRGB(0,0,0)); + Level().debug_renderer().draw_aabb (P1,1.f,1.f,1.f,color_xrgb(0,0,0)); } if (memory().danger().selected()) { Fvector P1 = memory().danger().selected()->position(); P1.y += 1.f; - Level().debug_renderer().draw_aabb (P1,1.f,1.f,1.f,D3DCOLOR_XRGB(0,0,0)); + Level().debug_renderer().draw_aabb (P1,1.f,1.f,1.f,color_xrgb(0,0,0)); } } @@ -1261,11 +1261,11 @@ void CCustomMonster::OnRender() (- pick.x_axis * pick.sizes.x * 0.5f) - (pick.y_axis * pick.sizes.y * 0.5f), }; Fvector const z_normal = - pick.z_axis * 0.1 * inv_nz; - Level().debug_renderer().draw_line (Fidentity,traj_start,traj_start + z_normal,D3DCOLOR_XRGB(128,255,128)); - Level().debug_renderer().draw_line (Fidentity,traj_end,traj_end - z_normal,D3DCOLOR_XRGB(128,255,128)); + Level().debug_renderer().draw_line (Fidentity,traj_start,traj_start + z_normal,color_xrgb(128,255,128)); + Level().debug_renderer().draw_line (Fidentity,traj_end,traj_end - z_normal,color_xrgb(128,255,128)); for ( u32 i=0; iContact(l_pos, vUp); diff --git a/src/xrGame/DBG_Car.cpp b/src/xrGame/DBG_Car.cpp index f74584c8ca0..3bffe43cf52 100644 --- a/src/xrGame/DBG_Car.cpp +++ b/src/xrGame/DBG_Car.cpp @@ -37,23 +37,23 @@ void CCar::DbgCreatePlots() e_state_drive=drive; ////////////////////////////// int y_pos=0,y_w=100; - m_dbg_power_rpm.Init(CFunctionGraph::type_function(this,&CCar::Parabola),m_min_rpm,m_max_rpm,0,y_pos,500,y_w,1000,D3DCOLOR_XRGB(0,0,255)); - m_dbg_power_rpm.AddMarker(CStatGraph::stVert, 0, D3DCOLOR_XRGB(255, 0, 0)); - m_dbg_power_rpm.AddMarker(CStatGraph::stHor, 0, D3DCOLOR_XRGB(0, 0, 255)); - m_dbg_power_rpm.AddMarker(CStatGraph::stVert,0,D3DCOLOR_XRGB(0, 0, 0)); + m_dbg_power_rpm.Init(CFunctionGraph::type_function(this,&CCar::Parabola),m_min_rpm,m_max_rpm,0,y_pos,500,y_w,1000,color_xrgb(0,0,255)); + m_dbg_power_rpm.AddMarker(CStatGraph::stVert, 0, color_xrgb(255, 0, 0)); + m_dbg_power_rpm.AddMarker(CStatGraph::stHor, 0, color_xrgb(0, 0, 255)); + m_dbg_power_rpm.AddMarker(CStatGraph::stVert,0,color_xrgb(0, 0, 0)); - m_dbg_power_rpm.AddMarker(CStatGraph::stVert,0,D3DCOLOR_XRGB(127, 0, 0)); - m_dbg_power_rpm.AddMarker(CStatGraph::stVert,0,D3DCOLOR_XRGB(0, 0, 127)); + m_dbg_power_rpm.AddMarker(CStatGraph::stVert,0,color_xrgb(127, 0, 0)); + m_dbg_power_rpm.AddMarker(CStatGraph::stVert,0,color_xrgb(0, 0, 127)); y_pos+=y_w+10; m_dbg_torque_rpm.Init(CFunctionGraph::type_function(this,&CCar::TorqueRpmFun),m_min_rpm,m_max_rpm,0,y_pos,500,y_w,1000); - m_dbg_torque_rpm.AddMarker(CStatGraph::stVert, 0, D3DCOLOR_XRGB(255, 0, 0)); - m_dbg_torque_rpm.AddMarker(CStatGraph::stHor, 0, D3DCOLOR_XRGB(0, 255,0)); - m_dbg_torque_rpm.AddMarker(CStatGraph::stVert,0,D3DCOLOR_XRGB(0, 0, 0)); + m_dbg_torque_rpm.AddMarker(CStatGraph::stVert, 0, color_xrgb(255, 0, 0)); + m_dbg_torque_rpm.AddMarker(CStatGraph::stHor, 0, color_xrgb(0, 255,0)); + m_dbg_torque_rpm.AddMarker(CStatGraph::stVert,0,color_xrgb(0, 0, 0)); - m_dbg_torque_rpm.AddMarker(CStatGraph::stVert,0,D3DCOLOR_XRGB(127, 0, 0)); - m_dbg_torque_rpm.AddMarker(CStatGraph::stVert,0,D3DCOLOR_XRGB(0, 0, 127)); + m_dbg_torque_rpm.AddMarker(CStatGraph::stVert,0,color_xrgb(127, 0, 0)); + m_dbg_torque_rpm.AddMarker(CStatGraph::stVert,0,color_xrgb(0, 0, 127)); y_pos+=y_w+10; @@ -63,16 +63,16 @@ void CCar::DbgCreatePlots() for(;i(); - m_dbg_dynamic_plot ->SetRect(0,y_pos,500,y_w,D3DCOLOR_XRGB(255,255,255),D3DCOLOR_XRGB(255,255,255)); + m_dbg_dynamic_plot ->SetRect(0,y_pos,500,y_w,color_xrgb(255,255,255),color_xrgb(255,255,255)); m_dbg_dynamic_plot ->SetMinMax(Parabola(m_min_rpm),m_max_power,1000); m_dbg_dynamic_plot ->AppendSubGraph(CStatGraph::stCurve); torq_pow_max_ratio =Parabola(m_torque_rpm)/m_torque_rpm /m_max_power; @@ -80,12 +80,12 @@ void CCar::DbgCreatePlots() m_dbg_dynamic_plot ->AppendSubGraph(CStatGraph::stCurve); rpm_pow_max_ratio =m_max_rpm /m_max_power; //-------------------------------------- - m_dbg_dynamic_plot ->AddMarker(CStatGraph::stHor, 0, D3DCOLOR_XRGB(255, 0, 0)); + m_dbg_dynamic_plot ->AddMarker(CStatGraph::stHor, 0, color_xrgb(255, 0, 0)); xr_vector::iterator i=m_gear_ratious.begin()+1,e=m_gear_ratious.end(); for(;iAddMarker(CStatGraph::stHor, (*i)[1]/rpm_pow_max_ratio,D3DCOLOR_XRGB(127, 0, 0)); - m_dbg_dynamic_plot ->AddMarker(CStatGraph::stHor, (*i)[2]/rpm_pow_max_ratio,D3DCOLOR_XRGB(0, 0, 127)); + m_dbg_dynamic_plot ->AddMarker(CStatGraph::stHor, (*i)[1]/rpm_pow_max_ratio,color_xrgb(127, 0, 0)); + m_dbg_dynamic_plot ->AddMarker(CStatGraph::stHor, (*i)[2]/rpm_pow_max_ratio,color_xrgb(0, 0, 127)); } ////////////////////////////// e_state_drive=state; @@ -116,7 +116,7 @@ void CCar::DbgUbdateCl() UI().Font().pFontStat->SetColor (color_rgba(0xff,0xff,0xff,0xff)) ; UI().Font().pFontStat->OutSet (120,530) ; UI().Font().pFontStat->OutNext (s) ; - UI().Font().pFontStat->SetColor (D3DCOLOR_XRGB(255,!b_transmission_switching*255,!b_transmission_switching*255)); + UI().Font().pFontStat->SetColor (color_xrgb(255,!b_transmission_switching*255,!b_transmission_switching*255)); UI().Font().pFontStat->OutNext ("Transmission num: [%d]",m_current_transmission_num) ; UI().Font().pFontStat->SetColor (color_rgba(0xff,0xff,0xff,0xff)) ; UI().Font().pFontStat->OutNext ("gear ratio: [%3.2f]",m_current_gear_ratio) ; @@ -127,31 +127,31 @@ void CCar::DbgUbdateCl() UI().Font().pFontStat->OutNext ("fuel: [%3.2f]",m_fuel) ; if(b_clutch) { - UI().Font().pFontStat->SetColor (D3DCOLOR_XRGB(0,255,0)) ; + UI().Font().pFontStat->SetColor (color_xrgb(0,255,0)) ; UI().Font().pFontStat->OutNext ("CLUTCH") ; UI().Font().pFontStat->SetColor (color_rgba(0xff,0xff,0xff,0xff)) ; } if(b_engine_on) { - UI().Font().pFontStat->SetColor (D3DCOLOR_XRGB(0,255,0)) ; + UI().Font().pFontStat->SetColor (color_xrgb(0,255,0)) ; UI().Font().pFontStat->OutNext ("ENGINE ON") ; UI().Font().pFontStat->SetColor (color_rgba(0xff,0xff,0xff,0xff)) ; } if(b_stalling) { - UI().Font().pFontStat->SetColor (D3DCOLOR_XRGB(255,0,0)) ; + UI().Font().pFontStat->SetColor (color_xrgb(255,0,0)) ; UI().Font().pFontStat->OutNext ("STALLING") ; UI().Font().pFontStat->SetColor (color_rgba(0xff,0xff,0xff,0xff)) ; } if(b_starting) { - UI().Font().pFontStat->SetColor (D3DCOLOR_XRGB(255,0,0)) ; + UI().Font().pFontStat->SetColor (color_xrgb(255,0,0)) ; UI().Font().pFontStat->OutNext ("STARTER") ; UI().Font().pFontStat->SetColor (color_rgba(0xff,0xff,0xff,0xff)) ; } if(b_breaks) { - UI().Font().pFontStat->SetColor (D3DCOLOR_XRGB(255,0,0)) ; + UI().Font().pFontStat->SetColor (color_xrgb(255,0,0)) ; UI().Font().pFontStat->OutNext ("BREAKS") ; UI().Font().pFontStat->SetColor (color_rgba(0xff,0xff,0xff,0xff)) ; } @@ -162,9 +162,9 @@ void CCar::DbgUbdateCl() if(ph_dbg_draw_mask.test(phDbgDrawCarPlots)&&b_plots) { float cur_torque=EngineCurTorque(); - m_dbg_dynamic_plot->AppendItem(m_current_engine_power,D3DCOLOR_XRGB(0,0,255)); - m_dbg_dynamic_plot->AppendItem(cur_torque/torq_pow_max_ratio,D3DCOLOR_XRGB(0,255,0),1); - m_dbg_dynamic_plot->AppendItem(m_current_rpm/rpm_pow_max_ratio,D3DCOLOR_XRGB(255,0,0),2); + m_dbg_dynamic_plot->AppendItem(m_current_engine_power,color_xrgb(0,0,255)); + m_dbg_dynamic_plot->AppendItem(cur_torque/torq_pow_max_ratio,color_xrgb(0,255,0),1); + m_dbg_dynamic_plot->AppendItem(m_current_rpm/rpm_pow_max_ratio,color_xrgb(255,0,0),2); m_dbg_dynamic_plot->UpdateMarkerPos(0,m_current_rpm/rpm_pow_max_ratio); diff --git a/src/xrGame/Explosive.cpp b/src/xrGame/Explosive.cpp index 96d031a59c9..99264369de9 100644 --- a/src/xrGame/Explosive.cpp +++ b/src/xrGame/Explosive.cpp @@ -202,7 +202,7 @@ ICF static BOOL grenade_hit_callback(collide::rq_result& result, LPVOID params) { Fvector p;p.set(ep.l_dir);p.mul(result.range);p.add(ep.source_p); u8 c =u8(shoot_factor*255.f); - DBG_DrawPoint(p,0.1f,D3DCOLOR_XRGB(255-c,0,c)); + DBG_DrawPoint(p,0.1f,color_xrgb(255-c,0,c)); } #endif return (ep.shoot_factor>0.01f); @@ -234,7 +234,7 @@ float CExplosive::ExplosionEffect(collide::rq_results& storage, CExplosive*exp_o { Fmatrix dbg_box_m;dbg_box_m.set(obj_xform); dbg_box_m.c.set(l_c);obj_xform.transform(dbg_box_m.c); - DBG_DrawOBB(dbg_box_m,l_d,D3DCOLOR_XRGB(255,255,0)); + DBG_DrawOBB(dbg_box_m,l_d,color_xrgb(255,255,0)); } #endif @@ -258,9 +258,9 @@ float CExplosive::ExplosionEffect(collide::rq_results& storage, CExplosive*exp_o #ifdef DEBUG if(ph_dbg_draw_mask.test(phDbgDrawExplosions)) { - DBG_DrawPoint(l_source_p,0.1f,D3DCOLOR_XRGB(0,0,255)); - DBG_DrawPoint(l_end_p,0.1f,D3DCOLOR_XRGB(0,0,255)); - DBG_DrawLine(l_source_p,l_end_p,D3DCOLOR_XRGB(0,0,255)); + DBG_DrawPoint(l_source_p,0.1f,color_xrgb(0,0,255)); + DBG_DrawPoint(l_end_p,0.1f,color_xrgb(0,0,255)); + DBG_DrawLine(l_source_p,l_end_p,color_xrgb(0,0,255)); } #endif @@ -326,7 +326,7 @@ void CExplosive::Explode() if(ph_dbg_draw_mask.test(phDbgDrawExplosions)) { DBG_OpenCashedDraw(); - DBG_DrawPoint(pos,0.3f,D3DCOLOR_XRGB(255,0,0)); + DBG_DrawPoint(pos,0.3f,color_xrgb(255,0,0)); } #endif // Msg("---------CExplosive Explode [%d] frame[%d]",cast_game_object()->ID(), Device.dwFrame); diff --git a/src/xrGame/HelicopterMovementManager.cpp b/src/xrGame/HelicopterMovementManager.cpp index 6fb3b46b218..f2e50f8964d 100644 --- a/src/xrGame/HelicopterMovementManager.cpp +++ b/src/xrGame/HelicopterMovementManager.cpp @@ -457,7 +457,7 @@ void CHelicopter::OnRender() CPatrolPath::const_vertex_iterator e = m_movement.currPatrolPath->vertices().end(); for ( ; b != e; ++b) { Fvector p = (*b).second->data().position(); - Level().debug_renderer().draw_aabb (p,0.1f,0.1f,0.1f,D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_aabb (p,0.1f,0.1f,0.1f,color_xrgb(0,255,0)); } */ /* @@ -481,12 +481,12 @@ void CHelicopter::OnRender() xr_vector::iterator it = round_points.begin(); xr_vector::iterator it_e = round_points.end(); for(;it!=it_e;++it){ - Level().debug_renderer().draw_aabb ((*it),0.1f,0.1f,0.1f,D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_aabb ((*it),0.1f,0.1f,0.1f,color_xrgb(0,255,0)); } */ -/* Level().debug_renderer().draw_line(Fidentity,m_heli->m_right_rocket_bone_xform.c, m_heli->m_data.m_destEnemyPos,D3DCOLOR_XRGB(0,255,0)); +/* Level().debug_renderer().draw_line(Fidentity,m_heli->m_right_rocket_bone_xform.c, m_heli->m_data.m_destEnemyPos,color_xrgb(0,255,0)); - Level().debug_renderer().draw_line(Fidentity,m_heli->XFORM().c,m_heli->m_data.m_destEnemyPos,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,m_heli->XFORM().c,m_heli->m_data.m_destEnemyPos,color_xrgb(255,0,0)); return; */ diff --git a/src/xrGame/IKFoot.cpp b/src/xrGame/IKFoot.cpp index 3fecfbd106b..1fb7c701ffc 100644 --- a/src/xrGame/IKFoot.cpp +++ b/src/xrGame/IKFoot.cpp @@ -276,7 +276,7 @@ bool CIKFoot::make_shift( Fmatrix &xm,const Fvector &cl_point, bool collide, con if(shift_m > 0.f) { DBG_OpenCashedDraw(); - DBG_DrawLine( toe, Fvector().add( toe, shift ), D3DCOLOR_XRGB( 255, 255, 255 ) ); + DBG_DrawLine( toe, Fvector().add( toe, shift ), color_xrgb( 255, 255, 255 ) ); DBG_ClosedCashedDraw( 1000 ); } #endif @@ -323,7 +323,7 @@ bool CIKFoot::GetFootStepMatrix( ik_goal_matrix &m, const Fmatrix &g_anim, const #ifdef DEBUG //if( ph_dbg_draw_mask.test( phDbgDrawIKGoal ) ) //{ - // DBG_DrawLine( global_point, Fvector().add( global_point, foot_normal ), D3DCOLOR_XRGB( 0, 255, 255) ); + // DBG_DrawLine( global_point, Fvector().add( global_point, foot_normal ), color_xrgb( 0, 255, 255) ); //} #endif if( cld.m_collide_point == ik_foot_geom::heel || cld.m_collide_point == ik_foot_geom::side ) @@ -334,7 +334,7 @@ bool CIKFoot::GetFootStepMatrix( ik_goal_matrix &m, const Fmatrix &g_anim, const foot.transform_tiny(global_point, heel ); #ifdef DEBUG if( ph_dbg_draw_mask.test( phDbgDrawIKGoal ) ) - DBG_DrawPoint( global_point, 0.01, D3DCOLOR_XRGB( 0, 255, 255)); + DBG_DrawPoint( global_point, 0.01, color_xrgb( 0, 255, 255)); #endif Fmatrix foot_to_ref; ref_bone_to_foot_transform(foot_to_ref).transform_tiny(local_point, heel ); diff --git a/src/xrGame/IKLimbsController.cpp b/src/xrGame/IKLimbsController.cpp index ca4cceff700..3948df33975 100644 --- a/src/xrGame/IKLimbsController.cpp +++ b/src/xrGame/IKLimbsController.cpp @@ -295,7 +295,7 @@ void CIKLimbsController::Calculate( ) Fvector toe; cd[j].m_limb->dbg_ik_foot().ToePosition( toe ); m.transform_tiny( toe ); - DBG_DrawLine( toe, Fvector().add( toe, Fvector().set( 0, -_object_shift.shift(), 0 ) ), D3DCOLOR_XRGB( 255, 0, 0 ) ); + DBG_DrawLine( toe, Fvector().add( toe, Fvector().set( 0, -_object_shift.shift(), 0 ) ), color_xrgb( 255, 0, 0 ) ); } #endif } diff --git a/src/xrGame/Level.cpp b/src/xrGame/Level.cpp index 6daa020288e..9beeb52b894 100644 --- a/src/xrGame/Level.cpp +++ b/src/xrGame/Level.cpp @@ -486,7 +486,7 @@ void CLevel::OnFrame() const IServerStatistic* S = Server->GetStatistic(); F->SetHeightI(0.015f); F->OutSetI(0.0f, 0.5f); - F->SetColor(D3DCOLOR_XRGB(0, 255, 0)); + F->SetColor(color_xrgb(0, 255, 0)); F->OutNext("IN: %4d/%4d (%2.1f%%)", S->bytes_in_real, S->bytes_in, 100.f*float(S->bytes_in_real) / float(S->bytes_in)); F->OutNext("OUT: %4d/%4d (%2.1f%%)", S->bytes_out_real, S->bytes_out, @@ -494,7 +494,7 @@ void CLevel::OnFrame() F->OutNext("client_2_sever ping: %d", net_Statistic.getPing()); F->OutNext("SPS/Sended : %4d/%4d", S->dwBytesPerSec, S->dwBytesSended); F->OutNext("sv_urate/cl_urate : %4d/%4d", psNET_ServerUpdate, psNET_ClientUpdate); - F->SetColor(D3DCOLOR_XRGB(255, 255, 255)); + F->SetColor(color_xrgb(255, 255, 255)); struct net_stats_functor { xrServer* m_server; @@ -523,10 +523,10 @@ void CLevel::OnFrame() IPureClient::UpdateStatistic(); F->SetHeightI(0.015f); F->OutSetI(0.0f, 0.5f); - F->SetColor(D3DCOLOR_XRGB(0, 255, 0)); + F->SetColor(color_xrgb(0, 255, 0)); F->OutNext("client_2_sever ping: %d", net_Statistic.getPing()); F->OutNext("sv_urate/cl_urate : %4d/%4d", psNET_ServerUpdate, psNET_ClientUpdate); - F->SetColor(D3DCOLOR_XRGB(255, 255, 255)); + F->SetColor(color_xrgb(255, 255, 255)); F->OutNext("BReceivedPs(%2d), BSendedPs(%2d), Retried(%2d), Blocked(%2d)", net_Statistic.getReceivedPerSec(), net_Statistic.getSendedPerSec(), diff --git a/src/xrGame/Level_Bullet_Manager.cpp b/src/xrGame/Level_Bullet_Manager.cpp index d631e3c5305..b10bce8edfe 100644 --- a/src/xrGame/Level_Bullet_Manager.cpp +++ b/src/xrGame/Level_Bullet_Manager.cpp @@ -934,12 +934,12 @@ void CBulletManager::Render () BulletPoints::const_iterator e = m_bullet_points.end(); for ( ; i != e; i+=2) { sphere.c = *i; - renderer.draw_ellipse (sphere, D3DCOLOR_XRGB(255, 0, 0)); + renderer.draw_ellipse (sphere, color_xrgb(255, 0, 0)); - renderer.draw_line (Fidentity, *i, *(i + 1), D3DCOLOR_XRGB(0, 255, 0)); + renderer.draw_line (Fidentity, *i, *(i + 1), color_xrgb(0, 255, 0)); sphere.c = *(i + 1); - renderer.draw_ellipse (sphere, D3DCOLOR_XRGB(255, 0, 0)); + renderer.draw_ellipse (sphere, color_xrgb(255, 0, 0)); } if (m_bullet_points.size() > 32768) diff --git a/src/xrGame/PHDebug.cpp b/src/xrGame/PHDebug.cpp index 18e8929e4c8..d02b487f25d 100644 --- a/src/xrGame/PHDebug.cpp +++ b/src/xrGame/PHDebug.cpp @@ -72,7 +72,7 @@ struct SPHObjDBGDraw:public SPHDBGDrawAbsract } void render ( ) { - Level().debug_renderer().draw_aabb(AABB_center,AABB.x,AABB.y,AABB.z,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_aabb(AABB_center,AABB.x,AABB.y,AABB.z,color_xrgb(255,0,0)); } Fvector AABB; Fvector AABB_center; @@ -109,12 +109,12 @@ struct SPHContactDBGDraw :public SPHDBGDrawAbsract void render ( ) { //bool is_cyl= (geomClass==dCylinderClassUser); - Level().debug_renderer().draw_aabb (pos,.01f,.01f,.01f,D3DCOLOR_XRGB(255*is_cyl,0,255*!is_cyl)); + Level().debug_renderer().draw_aabb (pos,.01f,.01f,.01f,color_xrgb(255*is_cyl,0,255*!is_cyl)); Fvector dir; dir.set(norm); dir.mul(depth*100.f); dir.add(pos); - Level().debug_renderer().draw_line(Fidentity,pos,dir,D3DCOLOR_XRGB(255*is_cyl,0,255*!is_cyl)); + Level().debug_renderer().draw_line(Fidentity,pos,dir,color_xrgb(255*is_cyl,0,255*!is_cyl)); } }; @@ -209,11 +209,11 @@ void DBG_DrawLine ( const Fvector& p0, const Fvector& p1, u32 c ) void DBG_DrawMatrix( const Fmatrix &m, float size, u8 a/* = 255*/ ) { Fvector to;to.add( m.c,Fvector( ).mul( m.i, size ) ); - DBG_DrawPHAbstruct( xr_new( m.c, to, D3DCOLOR_XRGB(a, 0, 0 ) ) ); + DBG_DrawPHAbstruct( xr_new( m.c, to, color_xrgb(a, 0, 0 ) ) ); to.add(m.c,Fvector( ).mul( m.j, size ) ); - DBG_DrawPHAbstruct( xr_new( m.c, to, D3DCOLOR_XRGB(0, a, 0 ) ) ); + DBG_DrawPHAbstruct( xr_new( m.c, to, color_xrgb(0, a, 0 ) ) ); to.add(m.c,Fvector( ).mul( m.k, size ) ); - DBG_DrawPHAbstruct( xr_new( m.c, to, D3DCOLOR_XRGB(0, 0, a ) ) ); + DBG_DrawPHAbstruct( xr_new( m.c, to, color_xrgb(0, 0, a ) ) ); } template @@ -676,8 +676,8 @@ void CFunctionGraph::Init(type_function fun,float x0,float x1,int l, int t, int m_stat_graph->AppendItem(val,color); } - //m_stat_graph->AddMarker(CStatGraph::stVert, 0, D3DCOLOR_XRGB(255, 0, 0)); - //m_stat_graph->AddMarker(CStatGraph::stHor, 0, D3DCOLOR_XRGB(255, 0, 0)); + //m_stat_graph->AddMarker(CStatGraph::stVert, 0, color_xrgb(255, 0, 0)); + //m_stat_graph->AddMarker(CStatGraph::stHor, 0, color_xrgb(255, 0, 0)); } void CFunctionGraph::AddMarker(CStatGraph::EStyle Style, float pos, u32 Color) @@ -870,11 +870,11 @@ void DBG_DrawBones( const Fmatrix &xform, IKinematics *K ) if( BI_NONE != bp ) { CBoneInstance &pbi = K->LL_GetBoneInstance( bp ); - DBG_DrawLine( Fmatrix().mul_43( xform, bone_pos ).c, Fmatrix().mul_43( xform, pbi.mTransform ).c, D3DCOLOR_XRGB( 255, 255, 0 ) ); + DBG_DrawLine( Fmatrix().mul_43( xform, bone_pos ).c, Fmatrix().mul_43( xform, pbi.mTransform ).c, color_xrgb( 255, 255, 0 ) ); } } DBG_DrawMatrix( xform, 1 ); - DBG_DrawPoint( xform.c, 0.1, D3DCOLOR_XRGB( 255, 125, 125 ) ); + DBG_DrawPoint( xform.c, 0.1, color_xrgb( 255, 125, 125 ) ); } void DBG_DrawBones( CObject &O ) @@ -903,7 +903,7 @@ void DBG_PhysBones( CObject &O ) DBG_DrawMatrix( e->XFORM(), 0.1f );//Fmatrix().mul_43( O.XFORM(),e->XFORM()) CPhysicsElement* pE = ( e )->parent_element(); if( pE ) - DBG_DrawLine( e->XFORM().c, pE->XFORM().c, D3DCOLOR_XRGB( 255, 100, 0 ) ); + DBG_DrawLine( e->XFORM().c, pE->XFORM().c, color_xrgb( 255, 100, 0 ) ); } @@ -928,14 +928,14 @@ void DBG_DrawBind( CObject &O ) if( BI_NONE != bp ) { - DBG_DrawLine( Fmatrix().mul_43( O.XFORM(), binds[i] ).c, Fmatrix().mul_43( O.XFORM(), binds[bp] ).c, D3DCOLOR_XRGB( 0, 255, 255 ) ); + DBG_DrawLine( Fmatrix().mul_43( O.XFORM(), binds[i] ).c, Fmatrix().mul_43( O.XFORM(), binds[bp] ).c, color_xrgb( 0, 255, 255 ) ); } } u16 bip01_bi = K->LL_BoneID( "bip01" ); if( bip01_bi != BI_NONE ) - DBG_DrawPoint( Fmatrix().mul_43( O.XFORM(), binds[bip01_bi] ).c, 0.1, D3DCOLOR_XRGB( 255, 255, 255 ) ); + DBG_DrawPoint( Fmatrix().mul_43( O.XFORM(), binds[bip01_bi] ).c, 0.1, color_xrgb( 255, 255, 255 ) ); } @@ -999,10 +999,10 @@ void DBG_ObjBeforeStep ( CPHObject *obj ) if( is_trace_obj(obj) ) { DBG_OpenCashedDraw(); - //dbg_draw_velocity ( 0.1f, D3DCOLOR_XRGB( 255, 0, 0 ) ); + //dbg_draw_velocity ( 0.1f, color_xrgb( 255, 0, 0 ) ); if(obj->ref_object()->ObjectPPhysicsShell()) { - obj->ref_object()->ObjectPPhysicsShell()->dbg_draw_force ( 0.1f, D3DCOLOR_XRGB( 0, 0, 255 ) ); + obj->ref_object()->ObjectPPhysicsShell()->dbg_draw_force ( 0.1f, color_xrgb( 0, 0, 255 ) ); Fmatrix form = Fidentity; obj->ref_object()->ObjectPPhysicsShell()->GetGlobalTransformDynamic( &form ); dbg_trace_prev_pos.set( form.c ); @@ -1018,9 +1018,9 @@ void DBG_ObjAfterStep ( CPHObject *obj ) if(obj->ref_object()->ObjectPPhysicsShell()) { - obj->ref_object()->ObjectPPhysicsShell()->dbg_draw_velocity ( 0.1f, D3DCOLOR_XRGB( 255, 0, 0 ) ); + obj->ref_object()->ObjectPPhysicsShell()->dbg_draw_velocity ( 0.1f, color_xrgb( 255, 0, 0 ) ); } - //dbg_draw_force ( 0.1f, D3DCOLOR_XRGB( 0, 0, 255 ) ); + //dbg_draw_force ( 0.1f, color_xrgb( 0, 0, 255 ) ); } } @@ -1037,7 +1037,7 @@ void DBG_ObjAfterPhDataUpdate ( CPHObject *obj ) { Fmatrix form = Fidentity; obj->ref_object()->ObjectPPhysicsShell()->GetGlobalTransformDynamic( &form ); - DBG_DrawLine( dbg_trace_prev_pos, form.c, D3DCOLOR_XRGB( 255, 0, 0 ) ); + DBG_DrawLine( dbg_trace_prev_pos, form.c, color_xrgb( 255, 0, 0 ) ); } DBG_ClosedCashedDraw( 50000 ); diff --git a/src/xrGame/PHDebug.h b/src/xrGame/PHDebug.h index bf6005a44dd..78eb725faaf 100644 --- a/src/xrGame/PHDebug.h +++ b/src/xrGame/PHDebug.h @@ -97,7 +97,7 @@ struct CFunctionGraph CFunctionGraph ( ) ; ~CFunctionGraph ( ) ; - void Init ( type_function fun, float x0, float x1, int l, int t, int w, int h, int points_num=500, u32 color=D3DCOLOR_XRGB( 0, 255, 0 ), u32 bk_color=D3DCOLOR_XRGB( 255, 255, 255 ) ) ; + void Init ( type_function fun, float x0, float x1, int l, int t, int w, int h, int points_num=500, u32 color=color_xrgb( 0, 255, 0 ), u32 bk_color=color_xrgb( 255, 255, 255 ) ) ; void Clear ( ) ; bool IsActive ( ) ; void AddMarker ( CStatGraph::EStyle Style, float pos, u32 Color ) ; diff --git a/src/xrGame/PhysicObject.cpp b/src/xrGame/PhysicObject.cpp index fcbe612ea16..cbb166f7451 100644 --- a/src/xrGame/PhysicObject.cpp +++ b/src/xrGame/PhysicObject.cpp @@ -794,12 +794,12 @@ void CPhysicObject::PH_A_CrPr () Fvector c,r,p; bb.get_CD(c,r ); XFORM().transform_tiny(p,c); - DBG_DrawAABB( p, r,D3DCOLOR_XRGB(255, 0, 0)); + DBG_DrawAABB( p, r,color_xrgb(255, 0, 0)); //PPhysicsShell()->XFORM().transform_tiny(c); Fmatrix mm; PPhysicsShell()->GetGlobalTransformDynamic(&mm); mm.transform_tiny(p,c); - DBG_DrawAABB( p, r,D3DCOLOR_XRGB(0, 255, 0)); + DBG_DrawAABB( p, r,color_xrgb(0, 255, 0)); DBG_ClosedCashedDraw (50000); #endif spatial_move(); @@ -960,10 +960,10 @@ if(dbg_draw_doors) const Fvector pos = start_pos.c.add( Fvector().set(0,0.2f,0) ); const Fvector pos1 = start_pos.c.add( Fvector().set(0,0.3f,0) ); - DBG_DrawLine( pos, Fvector( ).add( pos, open ), D3DCOLOR_XRGB( 0, 255, 0 ) ); - DBG_DrawLine( pos, Fvector( ).add( pos, closed ), D3DCOLOR_XRGB( 255, 0, 0 ) ); + DBG_DrawLine( pos, Fvector( ).add( pos, open ), color_xrgb( 0, 255, 0 ) ); + DBG_DrawLine( pos, Fvector( ).add( pos, closed ), color_xrgb( 255, 0, 0 ) ); - DBG_DrawLine( pos1, Fvector( ).add( pos1, det_vector ), D3DCOLOR_XRGB( 255, 255, 0 ) ); + DBG_DrawLine( pos1, Fvector( ).add( pos1, det_vector ), color_xrgb( 255, 255, 0 ) ); } #endif //DBG_ClosedCashedDraw( 50000000 ); diff --git a/src/xrGame/UICursor.cpp b/src/xrGame/UICursor.cpp index f71f172b356..3d044acffaf 100644 --- a/src/xrGame/UICursor.cpp +++ b/src/xrGame/UICursor.cpp @@ -5,7 +5,7 @@ #include "ui/UIBtnHint.h" #include "xrEngine/IInputReceiver.h" -#define C_DEFAULT D3DCOLOR_XRGB(0xff,0xff,0xff) +#define C_DEFAULT color_xrgb(0xff,0xff,0xff) CUICursor::CUICursor() :m_static(NULL),m_b_use_win_cursor(false) diff --git a/src/xrGame/Weapon.cpp b/src/xrGame/Weapon.cpp index d8a12aaebe0..d01b231babb 100644 --- a/src/xrGame/Weapon.cpp +++ b/src/xrGame/Weapon.cpp @@ -1835,13 +1835,13 @@ void CWeapon::debug_draw_firedeps() CDebugRenderer &render = Level().debug_renderer(); if(hud_adj_mode==5) - render.draw_aabb(get_LastFP(), 0.005f,0.005f,0.005f,D3DCOLOR_XRGB(255,0,0)); + render.draw_aabb(get_LastFP(), 0.005f,0.005f,0.005f,color_xrgb(255,0,0)); if(hud_adj_mode==6) - render.draw_aabb(get_LastFP2(), 0.005f,0.005f,0.005f,D3DCOLOR_XRGB(0,0,255)); + render.draw_aabb(get_LastFP2(), 0.005f,0.005f,0.005f,color_xrgb(0,0,255)); if(hud_adj_mode==7) - render.draw_aabb(get_LastSP(), 0.005f,0.005f,0.005f,D3DCOLOR_XRGB(0,255,0)); + render.draw_aabb(get_LastSP(), 0.005f,0.005f,0.005f,color_xrgb(0,255,0)); } #endif // DEBUG } diff --git a/src/xrGame/WeaponKnife.cpp b/src/xrGame/WeaponKnife.cpp index 358c83fdda7..e65bd9262be 100644 --- a/src/xrGame/WeaponKnife.cpp +++ b/src/xrGame/WeaponKnife.cpp @@ -408,19 +408,19 @@ void CWeaponKnife::OnRender() float sc_r = i->second; Fmatrix sphere = Fmatrix().scale(sc_r, sc_r, sc_r); sphere.c = i->first; - renderer.draw_ellipse (sphere, D3DCOLOR_XRGB(100, 255, 0)); + renderer.draw_ellipse (sphere, color_xrgb(100, 255, 0)); } /* Fmatrix sphere = Fmatrix().scale(.05f, .05f, .05f); sphere.c = m_dbg_data.m_pos; - renderer.draw_ellipse (sphere, D3DCOLOR_XRGB(255, 0, 0)); - renderer.draw_line (Fidentity, m_dbg_data.m_pos, m_dbg_data.m_endpos, D3DCOLOR_XRGB(255, 255, 0)); + renderer.draw_ellipse (sphere, color_xrgb(255, 0, 0)); + renderer.draw_line (Fidentity, m_dbg_data.m_pos, m_dbg_data.m_endpos, color_xrgb(255, 255, 0)); sphere.c = m_dbg_data.m_endpos; - renderer.draw_ellipse (sphere, D3DCOLOR_XRGB(100, 255, 0));*/ + renderer.draw_ellipse (sphere, color_xrgb(100, 255, 0));*/ //Fvector victim_end (m_dbg_data.m_pos); //victim_end.add (m_dbg_data.m_pick_vector); - //renderer.draw_line (Fidentity, m_dbg_data.m_pos, victim_end, D3DCOLOR_XRGB(0, 255, 255)); + //renderer.draw_line (Fidentity, m_dbg_data.m_pos, victim_end, color_xrgb(0, 255, 255)); } float hit_power = 1.f; for (dbg_draw_data::targets_t::const_iterator i = m_dbg_data.m_targets_vectors.begin(), @@ -430,7 +430,7 @@ void CWeaponKnife::OnRender() sphere.c = *i; u8 hit_color = u8(255 * hit_power); hit_power *= m_NextHitDivideFactor; - renderer.draw_ellipse(sphere, D3DCOLOR_XRGB(hit_color, 50, 0)); + renderer.draw_ellipse(sphere, color_xrgb(hit_color, 50, 0)); } for (dbg_draw_data::obbes_t::const_iterator i = m_dbg_data.m_target_boxes.begin(), @@ -438,7 +438,7 @@ void CWeaponKnife::OnRender() { Fmatrix tmp_matrix; tmp_matrix.set(i->m_rotate.i, i->m_rotate.j, i->m_rotate.k, i->m_translate); - renderer.draw_obb(tmp_matrix, i->m_halfsize, D3DCOLOR_XRGB(0, 255, 0)); + renderer.draw_obb(tmp_matrix, i->m_halfsize, color_xrgb(0, 255, 0)); } } #endif diff --git a/src/xrGame/WeaponMagazinedWGrenade.cpp b/src/xrGame/WeaponMagazinedWGrenade.cpp index 84ebf2ad40a..238b94d3575 100644 --- a/src/xrGame/WeaponMagazinedWGrenade.cpp +++ b/src/xrGame/WeaponMagazinedWGrenade.cpp @@ -345,15 +345,15 @@ void CWeaponMagazinedWGrenade::LaunchGrenade() Fvector res[2]; #ifdef DEBUG //. DBG_OpenCashedDraw(); -//. DBG_DrawLine(p1,Fvector().add(p1,d),D3DCOLOR_XRGB(255,0,0)); +//. DBG_DrawLine(p1,Fvector().add(p1,d),color_xrgb(255,0,0)); #endif u8 canfire0 = TransferenceAndThrowVelToThrowDir(Transference, CRocketLauncher::m_fLaunchSpeed, EffectiveGravity(), res); #ifdef DEBUG -//. if(canfire0>0)DBG_DrawLine(p1,Fvector().add(p1,res[0]),D3DCOLOR_XRGB(0,255,0)); -//. if(canfire0>1)DBG_DrawLine(p1,Fvector().add(p1,res[1]),D3DCOLOR_XRGB(0,0,255)); +//. if(canfire0>0)DBG_DrawLine(p1,Fvector().add(p1,res[0]),color_xrgb(0,255,0)); +//. if(canfire0>1)DBG_DrawLine(p1,Fvector().add(p1,res[1]),color_xrgb(0,0,255)); //. DBG_ClosedCashedDraw(30000); #endif diff --git a/src/xrGame/WeaponRG6.cpp b/src/xrGame/WeaponRG6.cpp index d68b3bba267..37d089377e9 100644 --- a/src/xrGame/WeaponRG6.cpp +++ b/src/xrGame/WeaponRG6.cpp @@ -100,12 +100,12 @@ void CWeaponRG6::FireStart () Fvector res[2]; /*#ifdef DEBUG DBG_OpenCashedDraw(); - DBG_DrawLine(p1,Fvector().add(p1,d),D3DCOLOR_XRGB(255,0,0)); + DBG_DrawLine(p1,Fvector().add(p1,d),color_xrgb(255,0,0)); #endif*/ u8 canfire0 = TransferenceAndThrowVelToThrowDir(Transference, CRocketLauncher::m_fLaunchSpeed, EffectiveGravity(), res); /*#ifdef DEBUG - if(canfire0>0)DBG_DrawLine(p1,Fvector().add(p1,res[0]),D3DCOLOR_XRGB(0,255,0)); - if(canfire0>1)DBG_DrawLine(p1,Fvector().add(p1,res[1]),D3DCOLOR_XRGB(0,0,255)); + if(canfire0>0)DBG_DrawLine(p1,Fvector().add(p1,res[0]),color_xrgb(0,255,0)); + if(canfire0>1)DBG_DrawLine(p1,Fvector().add(p1,res[1]),color_xrgb(0,0,255)); DBG_ClosedCashedDraw(30000); #endif*/ if (canfire0 != 0) diff --git a/src/xrGame/ai/monsters/ai_monster_defs.h b/src/xrGame/ai/monsters/ai_monster_defs.h index 70d003957aa..d22a383a4ea 100644 --- a/src/xrGame/ai/monsters/ai_monster_defs.h +++ b/src/xrGame/ai/monsters/ai_monster_defs.h @@ -5,7 +5,7 @@ typedef u32 TTime; -#define COLOR D3DCOLOR_XRGB +#define COLOR color_xrgb #define COLOR_RED COLOR(255,0,0) #define COLOR_GREEN COLOR(0,255,0) #define COLOR_BLUE COLOR(0,0,255) diff --git a/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp b/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp index d06fe4dbd45..ff1ecdd903e 100644 --- a/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp +++ b/src/xrGame/ai/monsters/basemonster/base_monster_debug.cpp @@ -47,8 +47,8 @@ CBaseMonster::SDebugInfo CBaseMonster::show_debug_info() string256 text; - u32 color = D3DCOLOR_XRGB(0,255,0); - u32 delimiter_color = D3DCOLOR_XRGB(0,0,255); + u32 color = color_xrgb(0,255,0); + u32 delimiter_color = color_xrgb(0,0,255); DBG().text(this).clear (); DBG().text(this).add_item("---------------------------------------", x, y+=delta_y, delimiter_color); @@ -287,11 +287,11 @@ void CBaseMonster::debug_fsm() DBG().object_info(this,this).remove_item (u32(1)); DBG().object_info(this,this).remove_item (u32(2)); - DBG().object_info(this,this).add_item (*cName(), D3DCOLOR_XRGB(255,0,0), 0); - DBG().object_info(this,this).add_item (st, D3DCOLOR_XRGB(255,0,0), 1); + DBG().object_info(this,this).add_item (*cName(), color_xrgb(255,0,0), 0); + DBG().object_info(this,this).add_item (st, color_xrgb(255,0,0), 1); xr_sprintf(st, "Team[%u]Squad[%u]Group[%u]", g_Team(), g_Squad(), g_Group()); - DBG().object_info(this,this).add_item (st, D3DCOLOR_XRGB(255,0,0), 2); + DBG().object_info(this,this).add_item (st, color_xrgb(255,0,0), 2); CEntityAlive *entity = smart_cast(Level().CurrentEntity()); if (entity && entity->character_physics_support()->movement()) { diff --git a/src/xrGame/ai/monsters/basemonster/base_monster_script.cpp b/src/xrGame/ai/monsters/basemonster/base_monster_script.cpp index 7ae7872aafc..9439e052113 100644 --- a/src/xrGame/ai/monsters/basemonster/base_monster_script.cpp +++ b/src/xrGame/ai/monsters/basemonster/base_monster_script.cpp @@ -454,8 +454,8 @@ void CBaseMonster::ProcessScripts() if (psAI_Flags.test(aiMonsterDebug)) { DBG().object_info(this,this).remove_item (u32(0)); DBG().object_info(this,this).remove_item (u32(1)); - DBG().object_info(this,this).add_item (*cName(), D3DCOLOR_XRGB(255,0,0), 0); - DBG().object_info(this,this).add_item ("Under script", D3DCOLOR_XRGB(255,0,0), 1); + DBG().object_info(this,this).add_item (*cName(), color_xrgb(255,0,0), 0); + DBG().object_info(this,this).add_item ("Under script", color_xrgb(255,0,0), 1); } else { DBG().object_info(this,this).clear (); } diff --git a/src/xrGame/ai/monsters/controller/controller.cpp b/src/xrGame/ai/monsters/controller/controller.cpp index 2da8a69eb84..7048713f558 100644 --- a/src/xrGame/ai/monsters/controller/controller.cpp +++ b/src/xrGame/ai/monsters/controller/controller.cpp @@ -750,8 +750,8 @@ CBaseMonster::SDebugInfo CController::show_debug_info() enemy_pos.y += 1.0f; - DBG().level_info(this).add_item(my_pos, new_pos, D3DCOLOR_XRGB(0,255,255)); - DBG().level_info(this).add_item(enemy_pos, new_pos, D3DCOLOR_XRGB(0,255,255)); + DBG().level_info(this).add_item(my_pos, new_pos, color_xrgb(0,255,255)); + DBG().level_info(this).add_item(enemy_pos, new_pos, color_xrgb(0,255,255)); } return CBaseMonster::SDebugInfo(); diff --git a/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp b/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp index 839ada7171e..d7d4fb7d9ff 100644 --- a/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp +++ b/src/xrGame/ai/monsters/controller/controller_psy_hit.cpp @@ -147,7 +147,7 @@ bool check_actor_visibility (const Fvector trace_from, Fvector trace_dir; trace_dir.sub(trace_to, trace_from); - //DBG().level_info(this).add_item (trace_from,trace_to,D3DCOLOR_XRGB(0,150,150)); + //DBG().level_info(this).add_item (trace_from,trace_to,color_xrgb(0,150,150)); collide::rq_result l_rq; diff --git a/src/xrGame/ai/monsters/monster_cover_manager.cpp b/src/xrGame/ai/monsters/monster_cover_manager.cpp index e42d9496737..2439fb4f32d 100644 --- a/src/xrGame/ai/monsters/monster_cover_manager.cpp +++ b/src/xrGame/ai/monsters/monster_cover_manager.cpp @@ -111,7 +111,7 @@ void CCoverEvaluator::initialize(const Fvector &start_position) void CCoverEvaluator::evaluate_cover(const CCoverPoint *cover_point, float weight) { #ifdef DEBUG - //DBG().level_info(this).add_item(cover_point->position(), D3DCOLOR_XRGB(0,255,0)); + //DBG().level_info(this).add_item(cover_point->position(), color_xrgb(0,255,0)); #endif CMonsterSquad *squad = monster_squad().get_squad(m_object); if (squad->is_locked_cover(cover_point->level_vertex_id())) return; diff --git a/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp b/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp index 20b08d4ab0b..6c062d07c84 100644 --- a/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp +++ b/src/xrGame/ai/monsters/rats/ai_rat_templates.cpp @@ -529,12 +529,12 @@ void CAI_Rat::draw_way() vertex = m_path->vertex(i); P2 = ai().level_graph().vertex_position(vertex->data().level_vertex_id()); if (!fis_zero(P1.distance_to_sqr(P2),EPS_L)) - Level().debug_renderer().draw_line (Fidentity,P1,P2,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_line (Fidentity,P1,P2,color_xrgb(0,0,255)); m_sphere.identity(); m_sphere.scale(0.25, 0.25, 0.25); m_sphere.translate_add(P2); - Level().debug_renderer().draw_ellipse(m_sphere, D3DCOLOR_XRGB(0,255,255)); - //Level().debug_renderer().draw_aabb (P1,0.5f,0.5f,0.5f,D3DCOLOR_XRGB(0,255,255)); + Level().debug_renderer().draw_ellipse(m_sphere, color_xrgb(0,255,255)); + //Level().debug_renderer().draw_aabb (P1,0.5f,0.5f,0.5f,color_xrgb(0,255,255)); } vertex = m_path->vertex(0); @@ -542,11 +542,11 @@ void CAI_Rat::draw_way() vertex = m_path->vertex(m_path->vertex_count() - 1); P2 = ai().level_graph().vertex_position(vertex->data().level_vertex_id()); if (!fis_zero(P1.distance_to_sqr(P2),EPS_L)) - Level().debug_renderer().draw_line (Fidentity,P1,P2,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_line (Fidentity,P1,P2,color_xrgb(0,0,255)); m_sphere.identity(); m_sphere.scale(0.25, 0.25, 0.25); m_sphere.translate_add(P2); - Level().debug_renderer().draw_ellipse(m_sphere, D3DCOLOR_XRGB(0,255,255)); - //Level().debug_renderer().draw_aabb (P1,0.5f,0.5f,0.5f,D3DCOLOR_XRGB(0,255,255)); + Level().debug_renderer().draw_ellipse(m_sphere, color_xrgb(0,255,255)); + //Level().debug_renderer().draw_aabb (P1,0.5f,0.5f,0.5f,color_xrgb(0,255,255)); } #endif diff --git a/src/xrGame/ai/stalker/ai_stalker_debug.cpp b/src/xrGame/ai/stalker/ai_stalker_debug.cpp index ba04c52c395..8bddb6ff564 100644 --- a/src/xrGame/ai/stalker/ai_stalker_debug.cpp +++ b/src/xrGame/ai/stalker/ai_stalker_debug.cpp @@ -256,7 +256,7 @@ void CAI_Stalker::debug_text () float up_indent = 40.f; LPCSTR indent = " "; - DBG_TextSetColor(D3DCOLOR_XRGB(0,255,0)); + DBG_TextSetColor(color_xrgb(0,255,0)); DBG_TextOutSet (0,up_indent); // memory DBG_OutText ("memory"); @@ -1075,18 +1075,18 @@ void draw_visiblity_rays (CCustomMonster *self, const CObject *object, collide:: VERIFY (points.size() > 1); Fvector size = Fvector().set(.05f,.05f,.05f); - Level().debug_renderer().draw_aabb (points.front(),size.x,size.y,size.z,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb (points.front(),size.x,size.y,size.z,color_xrgb(0,0,255)); { COLLIDE_POINTS::const_iterator I = points.begin() + 1; COLLIDE_POINTS::const_iterator E = points.end(); for ( ; I != E; ++I) { - Level().debug_renderer().draw_line (Fidentity,*(I-1),*I,D3DCOLOR_XRGB(0,255,0)); - Level().debug_renderer().draw_aabb (*I,size.x,size.y,size.z,D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line (Fidentity,*(I-1),*I,color_xrgb(0,255,0)); + Level().debug_renderer().draw_aabb (*I,size.x,size.y,size.z,color_xrgb(0,255,0)); } } - Level().debug_renderer().draw_aabb (points.back(),size.x,size.y,size.z,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_aabb (points.back(),size.x,size.y,size.z,color_xrgb(255,0,0)); } void CAI_Stalker::dbg_draw_visibility_rays () @@ -1127,12 +1127,12 @@ static Fmatrix aim_on_actor ( { temp.scale (.01f, .01f, .01f); temp.c = bone_position; - renderer.draw_ellipse (temp, D3DCOLOR_XRGB(255, 0, 0)); + renderer.draw_ellipse (temp, color_xrgb(255, 0, 0)); temp.c = weapon_position; - renderer.draw_ellipse (temp, D3DCOLOR_XRGB(0, 255, 0)); + renderer.draw_ellipse (temp, color_xrgb(0, 255, 0)); Fvector const weapon_position_target= Fvector().mad(weapon_position, weapon_direction, weapon_position.distance_to(target)); - renderer.draw_line (Fidentity, weapon_position, weapon_position_target, D3DCOLOR_XRGB(255, 0, 255)); + renderer.draw_line (Fidentity, weapon_position, weapon_position_target, color_xrgb(255, 0, 255)); } #endif // #ifdef DEBUG_RENDER @@ -1144,7 +1144,7 @@ static Fmatrix aim_on_actor ( if (debug_draw) { temp.c = current_point; - renderer.draw_ellipse (temp, D3DCOLOR_XRGB(0, 0, 255)); + renderer.draw_ellipse (temp, color_xrgb(0, 0, 255)); } #endif // #ifdef DEBUG_RENDER @@ -1173,12 +1173,12 @@ static Fmatrix aim_on_actor ( if (debug_draw) { temp.c = target_point; - renderer.draw_ellipse (temp, D3DCOLOR_XRGB(255, 255, 255)); + renderer.draw_ellipse (temp, color_xrgb(255, 255, 255)); float const sphere_radius = _sqrt(sphere_radius_sqr); temp.scale (sphere_radius, sphere_radius, sphere_radius); temp.c = bone_position; - renderer.draw_ellipse (temp, D3DCOLOR_XRGB(255, 255, 0)); + renderer.draw_ellipse (temp, color_xrgb(255, 255, 0)); } #endif // #ifdef DEBUG_RENDER @@ -1233,7 +1233,7 @@ static Fmatrix aim_on_actor ( temp.scale (.01f, .01f, .01f); transform.transform_dir (temp.c, Fvector().sub(weapon_position, bone_position)); temp.c.add (bone_position); - renderer.draw_ellipse (temp, D3DCOLOR_XRGB(0, 255, 255)); + renderer.draw_ellipse (temp, color_xrgb(0, 255, 255)); } #endif // #ifdef DEBUG_RENDER @@ -1413,8 +1413,8 @@ static void draw_animation_bones (CAI_Stalker& self, Fmatrix const& transform, I draw_bones ( *kinematics, Fvector().set(.011f, .011f, .011f), - D3DCOLOR_XRGB(0, 255, 0), - D3DCOLOR_XRGB(0, 255, 255), + color_xrgb(0, 255, 0), + color_xrgb(0, 255, 255), &transform ); #endif // #ifdef DEBUG_RENDER @@ -1582,45 +1582,45 @@ static void draw_animation_bones (CAI_Stalker& self, Fmatrix const& transform, I Fidentity, position, Fvector().mad(position, direction, position.distance_to(target)), - D3DCOLOR_XRGB(255, 0, 0) + color_xrgb(255, 0, 0) ); } } Fvector const weapon_position_target= Fvector().mad(weapon_bone_position, weapon_bone_direction, weapon_bone_position.distance_to(target)); - renderer.draw_line (Fidentity, weapon_bone_position, weapon_position_target, D3DCOLOR_XRGB(255, 255, 0)); + renderer.draw_line (Fidentity, weapon_bone_position, weapon_position_target, color_xrgb(255, 255, 0)); Fmatrix target_transform; target_transform.scale (.01f, .01f, .01f); target_transform.c = target; - renderer.draw_ellipse (target_transform, D3DCOLOR_XRGB(255, 0, 0)); + renderer.draw_ellipse (target_transform, color_xrgb(255, 0, 0)); target_transform.scale (.015f, .015f, .015f); target_transform.c = weapon_bone_position; - renderer.draw_ellipse (target_transform, D3DCOLOR_XRGB(255, 0, 0)); + renderer.draw_ellipse (target_transform, color_xrgb(255, 0, 0)); draw_bones ( *kinematics, Fvector().set(.01f, .01f, .01f), - D3DCOLOR_XRGB(0, 0, 255), - D3DCOLOR_XRGB(255, 255, 0) + color_xrgb(0, 0, 255), + color_xrgb(255, 255, 0) ); renderer.draw_obb ( g_stalker_skeleton[weapon_bone_id0], Fvector().set(.01f, .01f, .01f), - D3DCOLOR_XRGB(255, 0, 0) + color_xrgb(255, 0, 0) ); renderer.draw_obb ( g_stalker_skeleton[weapon_bone_id1], Fvector().set(.01f, .01f, .01f), - D3DCOLOR_XRGB(255, 0, 0) + color_xrgb(255, 0, 0) ); renderer.draw_line ( Fidentity, g_stalker_skeleton[weapon_bone_id0].c, g_stalker_skeleton[weapon_bone_id1].c, - D3DCOLOR_XRGB(255, 0, 0) + color_xrgb(255, 0, 0) ); #endif // #ifdef DEBUG_RENDER } @@ -1653,7 +1653,7 @@ void CAI_Stalker::OnRender () temp = direction; temp.mul (1.f); temp.add (position); - Level().debug_renderer().draw_line (Fidentity,position,temp,D3DCOLOR_XRGB(0*255,255,0*255)); + Level().debug_renderer().draw_line (Fidentity,position,temp,color_xrgb(0*255,255,0*255)); } if (IsMyCamera()) { @@ -1667,7 +1667,7 @@ void CAI_Stalker::OnRender () feel_vision_get (objects); if (std::find(objects.begin(),objects.end(),memory().enemy().selected()) != objects.end()) { Fvector position = feel_vision_get_vispoint(const_cast(memory().enemy().selected())); - Level().debug_renderer().draw_aabb (position,.05f,.05f,.05f,D3DCOLOR_XRGB(0*255,255,0*255)); + Level().debug_renderer().draw_aabb (position,.05f,.05f,.05f,color_xrgb(0*255,255,0*255)); return; } @@ -1682,19 +1682,19 @@ void CAI_Stalker::OnRender () float yaw, pitch, safety_fire_angle = 1.f*PI_DIV_8*.125f; direction.getHP (yaw,pitch); - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); direction.setHP (yaw - safety_fire_angle,pitch); - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); direction.setHP (yaw + safety_fire_angle,pitch); - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); direction.setHP (yaw,pitch - safety_fire_angle); - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); direction.setHP (yaw,pitch + safety_fire_angle); - Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line(Fidentity, position, Fvector().mad(position, direction, 20.f), color_xrgb(0,255,0)); } #endif // #if 0 @@ -1713,8 +1713,8 @@ void CAI_Stalker::OnRender () target_direction.add(eye_matrix.c); target_direction.y = eye_matrix.c.y + 0.4f; - Level().debug_renderer().draw_line(Fidentity, eye_matrix.c, current_direction, D3DCOLOR_XRGB(255,0,255)); - Level().debug_renderer().draw_line(Fidentity, eye_matrix.c, target_direction, D3DCOLOR_XRGB(255,255,0)); + Level().debug_renderer().draw_line(Fidentity, eye_matrix.c, current_direction, color_xrgb(255,0,255)); + Level().debug_renderer().draw_line(Fidentity, eye_matrix.c, target_direction, color_xrgb(255,255,0)); } { @@ -1722,12 +1722,12 @@ void CAI_Stalker::OnRender () c0.y += 2.f; c1.setHP (-movement().m_body.current.yaw,-movement().m_body.current.pitch); c1.add (c0); - Level().debug_renderer().draw_line (Fidentity,c0,c1,D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line (Fidentity,c0,c1,color_xrgb(0,255,0)); t0.y += 2.f; t1.setHP (-movement().m_body.target.yaw,-movement().m_body.target.pitch); t1.add (t0); - Level().debug_renderer().draw_line (Fidentity,t0,t1,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line (Fidentity,t0,t1,color_xrgb(255,0,0)); } if (memory().danger().selected() && ai().level_graph().valid_vertex_position(memory().danger().selected()->position())) { @@ -1735,7 +1735,7 @@ void CAI_Stalker::OnRender () u32 level_vertex_id = ai().level_graph().vertex_id(position); float half_size = ai().level_graph().header().cell_size()*.5f; position.y += 1.f; - Level().debug_renderer().draw_aabb (position,half_size - .01f,1.f,ai().level_graph().header().cell_size()*.5f-.01f,D3DCOLOR_XRGB(0*255,255,0*255)); + Level().debug_renderer().draw_aabb (position,half_size - .01f,1.f,ai().level_graph().header().cell_size()*.5f-.01f,color_xrgb(0*255,255,0*255)); if (ai().level_graph().valid_vertex_id(level_vertex_id)) { LevelGraph::CVertex *v = ai().level_graph().vertex(level_vertex_id); @@ -1751,7 +1751,7 @@ void CAI_Stalker::OnRender () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line (Fidentity,position,direction,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_line (Fidentity,position,direction,color_xrgb(0,0,255)); value = ai().level_graph().compute_high_square(float(10*i)/180.f*PI,PI/2.f,v); if (value > best_value) { best_value = value; @@ -1760,16 +1760,16 @@ void CAI_Stalker::OnRender () } direction.set (position.x - half_size*float(v->high_cover(0))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z + half_size*float(v->high_cover(1))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x + half_size*float(v->high_cover(2))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z - half_size*float(v->high_cover(3))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); float value = ai().level_graph().high_cover_in_direction(float(10*j)/180.f*PI,v); direction.setHP (float(10*j)/180.f*PI,0); @@ -1777,7 +1777,7 @@ void CAI_Stalker::OnRender () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line (Fidentity,position,direction,D3DCOLOR_XRGB(0,0,0)); + Level().debug_renderer().draw_line (Fidentity,position,direction,color_xrgb(0,0,0)); // low { @@ -1791,7 +1791,7 @@ void CAI_Stalker::OnRender () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line (Fidentity,position,direction,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_line (Fidentity,position,direction,color_xrgb(0,0,255)); value = ai().level_graph().compute_low_square(float(10*i)/180.f*PI,PI/2.f,v); if (value > best_value) { best_value = value; @@ -1800,16 +1800,16 @@ void CAI_Stalker::OnRender () } direction.set (position.x - half_size*float(v->low_cover(0))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z + half_size*float(v->low_cover(1))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x + half_size*float(v->low_cover(2))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z - half_size*float(v->low_cover(3))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); float value = ai().level_graph().low_cover_in_direction(float(10*j)/180.f*PI,v); direction.setHP (float(10*j)/180.f*PI,0); @@ -1817,7 +1817,7 @@ void CAI_Stalker::OnRender () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line (Fidentity,position,direction,D3DCOLOR_XRGB(0,0,0)); + Level().debug_renderer().draw_line (Fidentity,position,direction,color_xrgb(0,0,0)); } } } diff --git a/src/xrGame/character_hit_animations.cpp b/src/xrGame/character_hit_animations.cpp index 8f18ece4180..d16702bfcbb 100644 --- a/src/xrGame/character_hit_animations.cpp +++ b/src/xrGame/character_hit_animations.cpp @@ -114,7 +114,7 @@ void character_hit_animation_controller::PlayHitMotion( const Fvector &dir, cons if( ph_dbg_draw_mask1.test( phDbgHitAnims ) ) { DBG_OpenCashedDraw(); - DBG_DrawLine( m.c, Fvector( ).sub( m.c, Fvector( ).mul( dir, 1.5 ) ), D3DCOLOR_XRGB( 255, 0, 255 ) ); + DBG_DrawLine( m.c, Fvector( ).sub( m.c, Fvector( ).mul( dir, 1.5 ) ), color_xrgb( 255, 0, 255 ) ); DBG_ClosedCashedDraw( 1000 ); } #endif diff --git a/src/xrGame/doors_actor.cpp b/src/xrGame/doors_actor.cpp index 8cef732c343..c2ac0c63a19 100644 --- a/src/xrGame/doors_actor.cpp +++ b/src/xrGame/doors_actor.cpp @@ -292,10 +292,10 @@ void actor::render ( ) const Fmatrix const& matrix = (*i)->get_matrix(); Fvector temp; matrix.transform_tiny ( temp, (*i)->get_vector(door_state_open) ); - renderer.draw_line ( Fidentity, matrix.c, temp, D3DCOLOR_XRGB(0,255,0) ); + renderer.draw_line ( Fidentity, matrix.c, temp, color_xrgb(0,255,0) ); matrix.transform_tiny ( temp, (*i)->get_vector(door_state_closed) ); - renderer.draw_line ( Fidentity, matrix.c, temp, D3DCOLOR_XRGB(255,0,0) ); + renderer.draw_line ( Fidentity, matrix.c, temp, color_xrgb(255,0,0) ); } } #endif // #ifdef DEBUG \ No newline at end of file diff --git a/src/xrGame/file_transfer.cpp b/src/xrGame/file_transfer.cpp index febd1779be5..29b09b54e0f 100644 --- a/src/xrGame/file_transfer.cpp +++ b/src/xrGame/file_transfer.cpp @@ -643,7 +643,7 @@ void client_site::dbg_init_statgraph() CGameFont* F = UI().Font().pFontDI; F->SetHeightI(0.015f); F->OutSet (360.f, 700.f); - F->SetColor (D3DCOLOR_XRGB(0,255,0)); + F->SetColor (color_xrgb(0,255,0)); F->OutNext("%d", (int)data_max_chunk_size); F->OutSet (360.f, 760.f); F->OutNext("%d", (int)data_min_chunk_size); diff --git a/src/xrGame/game_cl_mp.cpp b/src/xrGame/game_cl_mp.cpp index a47395a1b5a..8c65ab36a91 100644 --- a/src/xrGame/game_cl_mp.cpp +++ b/src/xrGame/game_cl_mp.cpp @@ -1858,7 +1858,7 @@ void game_cl_mp::draw_all_active_binder_states() CGameFont* F = UI().Font().pFontDI; F->SetHeightI (0.015f); F->OutSetI (0.1f,0.2f); - F->SetColor (D3DCOLOR_XRGB(0,255,0)); + F->SetColor (color_xrgb(0,255,0)); for (u32 i = 0; i < MAX_PLAYERS_COUNT; ++i) { @@ -1872,7 +1872,7 @@ void game_cl_mp::draw_all_active_binder_states() ); } } - F->SetColor (D3DCOLOR_XRGB(255,0,0)); + F->SetColor (color_xrgb(255,0,0)); for (cheaters_collection_t::iterator i = m_detected_cheaters.begin(), ie = m_detected_cheaters.end(); i != ie; ++i) { diff --git a/src/xrGame/game_sv_artefacthunt.cpp b/src/xrGame/game_sv_artefacthunt.cpp index e02e7655f17..277a7355f70 100644 --- a/src/xrGame/game_sv_artefacthunt.cpp +++ b/src/xrGame/game_sv_artefacthunt.cpp @@ -1422,13 +1422,13 @@ void game_sv_ArtefactHunt::OnRender () V1.y +=1.0f; T.identity(); - Level().debug_renderer().draw_line(Fidentity, V0, V1, D3DCOLOR_XRGB(0, 255, 255)); + Level().debug_renderer().draw_line(Fidentity, V0, V1, color_xrgb(0, 255, 255)); float r = .4f; T.identity(); T.scale(r, r/2, r); T.translate_add(rp.P); - Level().debug_renderer().draw_ellipse(T, D3DCOLOR_XRGB(0, 255, 255)); + Level().debug_renderer().draw_ellipse(T, color_xrgb(0, 255, 255)); } }; inherited::OnRender(); diff --git a/src/xrGame/game_sv_base.cpp b/src/xrGame/game_sv_base.cpp index a60baee7a76..b79fc97b6d6 100644 --- a/src/xrGame/game_sv_base.cpp +++ b/src/xrGame/game_sv_base.cpp @@ -1156,7 +1156,7 @@ void game_sv_GameState::OnRender () #ifdef DEBUG /*Fmatrix T; T.identity(); Fvector V0, V1; - u32 TeamColors[TEAM_COUNT] = {D3DCOLOR_XRGB(255, 0, 0), D3DCOLOR_XRGB(0, 255, 0), D3DCOLOR_XRGB(0, 0, 255), D3DCOLOR_XRGB(255, 255, 0)}; + u32 TeamColors[TEAM_COUNT] = {color_xrgb(255, 0, 0), color_xrgb(0, 255, 0), color_xrgb(0, 0, 255), color_xrgb(255, 255, 0)}; // u32 TeamColorsDist[TEAM_COUNT] = {color_argb(128, 255, 0, 0), color_argb(128, 0, 255, 0), color_argb(128, 0, 0, 255), color_argb(128, 255, 255, 0)}; if (dbg_net_Draw_Flags.test(dbg_draw_rp)) diff --git a/src/xrGame/ik/IKLimb.cpp b/src/xrGame/ik/IKLimb.cpp index 2d0819a7595..a297b5424f7 100644 --- a/src/xrGame/ik/IKLimb.cpp +++ b/src/xrGame/ik/IKLimb.cpp @@ -275,7 +275,7 @@ void CIKLimb::Solve( SCalculateData& cd ) { Fvector dbg_pos; cd.m_obj->transform_tiny(dbg_pos, pos); - DBG_DrawPoint( dbg_pos, 0.02f, D3DCOLOR_XRGB( 255, 255 , 255 ) ); + DBG_DrawPoint( dbg_pos, 0.02f, color_xrgb( 255, 255 , 255 ) ); } #endif Fmatrix ihip; @@ -294,7 +294,7 @@ if( ph_dbg_draw_mask.test( phDbgDrawIKGoal ) ) Fvector dbg_pos; m_foot.ToePosition( dbg_pos ); Kinematics()->LL_GetBoneInstance(m_bones[m_foot.ref_bone()]).mTransform.transform_tiny( dbg_pos ); cd.m_obj->transform_tiny( dbg_pos ); - DBG_DrawPoint( dbg_pos, 0.02f, D3DCOLOR_XRGB( 255, 255 , 0 ) ); + DBG_DrawPoint( dbg_pos, 0.02f, color_xrgb( 255, 255 , 0 ) ); } #endif } @@ -586,7 +586,7 @@ bool CIKLimb::blend_collide( ik_goal_matrix &m, const SCalculateData& cd, const { Fvector l_toe; m_foot.ToePosition( l_toe ); Fvector v; fm.transform_tiny( v, l_toe ); - DBG_DrawPoint( v, 0.1, D3DCOLOR_XRGB( 0, (ik_goal_matrix::cl_free == m0.collide_state()) * 255 ,(ik_goal_matrix::cl_aligned == m0.collide_state()) * 255 ) ); + DBG_DrawPoint( v, 0.1, color_xrgb( 0, (ik_goal_matrix::cl_free == m0.collide_state()) * 255 ,(ik_goal_matrix::cl_aligned == m0.collide_state()) * 255 ) ); } #endif return ret; @@ -614,7 +614,7 @@ bool CIKLimb::blend_collide( ik_goal_matrix &m, const SCalculateData& cd, const m_foot.GetFootStepMatrix( m, fm, collide_data, true, true ); #ifdef IK_DBG_DRAW_BLEND_COLLIDE Fvector v; fm.transform_tiny( v, l_toe ); - DBG_DrawPoint( v, 0.1, D3DCOLOR_XRGB( 0, (ik_goal_matrix::cl_free == m0.collide_state()) * 255 ,(ik_goal_matrix::cl_aligned == m0.collide_state()) * 255 ) ); + DBG_DrawPoint( v, 0.1, color_xrgb( 0, (ik_goal_matrix::cl_free == m0.collide_state()) * 255 ,(ik_goal_matrix::cl_aligned == m0.collide_state()) * 255 ) ); #endif return ret; } @@ -631,7 +631,7 @@ bool CIKLimb::blend_collide( ik_goal_matrix &m, const SCalculateData& cd, const m = r; #ifdef IK_DBG_DRAW_BLEND_COLLIDE Fvector v; r.get().transform_tiny( v, l_toe ); - DBG_DrawPoint( v, 0.1, D3DCOLOR_XRGB( (!collided) * 255, 255 , 255 ) ); + DBG_DrawPoint( v, 0.1, color_xrgb( (!collided) * 255, 255 , 255 ) ); #endif return ret; } @@ -640,7 +640,7 @@ bool CIKLimb::blend_collide( ik_goal_matrix &m, const SCalculateData& cd, const //NR #ifdef IK_DBG_DRAW_BLEND_COLLIDE Fvector v; r.get().transform_tiny( v, l_toe ); - DBG_DrawPoint( v, 0.1, D3DCOLOR_XRGB( 255, 0 , 0 ) ); + DBG_DrawPoint( v, 0.1, color_xrgb( 255, 0 , 0 ) ); #endif m = r; return false; @@ -659,7 +659,7 @@ bool CIKLimb::blend_collide( ik_goal_matrix &m, const SCalculateData& cd, const { #ifdef DEBUG Fvector v; r.get().transform_tiny( v, l_toe ); - DBG_DrawPoint( v, 0.1, D3DCOLOR_XRGB( 255, 255 , 0 ) ); + DBG_DrawPoint( v, 0.1, color_xrgb( 255, 255 , 0 ) ); #endif m = r; return ret; @@ -668,7 +668,7 @@ bool CIKLimb::blend_collide( ik_goal_matrix &m, const SCalculateData& cd, const { #ifdef DEBUG Fvector v; r.get().transform_tiny( v, l_toe ); - DBG_DrawPoint( v, 0.1, D3DCOLOR_XRGB( 255, 0 , 0 ) ); + DBG_DrawPoint( v, 0.1, color_xrgb( 255, 0 , 0 ) ); #endif //NR m = r; @@ -686,7 +686,7 @@ bool CIKLimb::blend_collide( ik_goal_matrix &m, const SCalculateData& cd, const #ifdef IK_DBG_DRAW_BLEND_COLLIDE Fvector v; r.get().transform_tiny( v, l_toe ); - DBG_DrawPoint( v, 0.1, D3DCOLOR_XRGB( 255, 0 , 255 ) ); + DBG_DrawPoint( v, 0.1, color_xrgb( 255, 0 , 255 ) ); #endif m = r; @@ -822,7 +822,7 @@ void CIKLimb::DBGDrawSetNewGoal ( SCalculateData& cd, const SIKCollideData &cld if( cd.state.foot_step && state_valide( sv_state ) ) { DBG_DrawMatrix( cd.state.collide_pos.get(), 1.0f, 100 ); - DBG_DrawPoint ( cd.state.collide_pos.get().c, 0.1, D3DCOLOR_XRGB( 0, 255 , 255 ) ); + DBG_DrawPoint ( cd.state.collide_pos.get().c, 0.1, color_xrgb( 0, 255 , 255 ) ); } if( ph_dbg_draw_mask1.test(phDbgDrawIKBlending) && cd.state.blending ) @@ -838,15 +838,15 @@ void CIKLimb::DBGDrawSetNewGoal ( SCalculateData& cd, const SIKCollideData &cld sv_state.goal( m ).get().transform_tiny( a0, l_toe ); Fvector a1; sv_state.goal( m ).get().transform_tiny( a1, l_toe ); - DBG_DrawLine( a0, a1, D3DCOLOR_XRGB( c, 0, c ) ); + DBG_DrawLine( a0, a1, color_xrgb( c, 0, c ) ); Fvector a2; cd.state.goal.get().transform_tiny( a2, l_toe ); - DBG_DrawLine( a1, a2, D3DCOLOR_XRGB( 0, c , 0 ) ); + DBG_DrawLine( a1, a2, color_xrgb( 0, c , 0 ) ); /* Fvector a3; sv_state_DBR.goal.transform_tiny( a3, l_toe ); - DBG_DrawLine( a3, a0, D3DCOLOR_XRGB( c, c , 0 ) ); + DBG_DrawLine( a3, a0, color_xrgb( c, c , 0 ) ); if( Fvector( ).sub( a3, a0 ).magnitude() > 0.1f ) - DBG_DrawLine( a3, a0, D3DCOLOR_XRGB( c, 0 , 0 ) ); + DBG_DrawLine( a3, a0, color_xrgb( c, 0 , 0 ) ); */ if( cd.state.count > -1 ) { @@ -937,7 +937,7 @@ IC void CIKLimb::GetPickDir( Fvector &v, SCalculateData& cd ) const { Fvector p ; m_foot.ToePosition( p ); cd.state.anim_pos.transform_tiny( p ); - DBG_DrawLine( p, Fvector().add( p, Fvector( ).mul( cd.state.pick, 1 ) ), D3DCOLOR_XRGB( 255, 0, 255 ) ); + DBG_DrawLine( p, Fvector().add( p, Fvector( ).mul( cd.state.pick, 1 ) ), color_xrgb( 255, 0, 255 ) ); } #endif */ @@ -1106,9 +1106,9 @@ void CIKLimb::step_predict( CGameObject *O, const CBlend *b, ik_limb_state_predi #ifdef DEBUG if( ph_dbg_draw_mask1.test( phDbgDrawIKPredict ) ) { - DBG_DrawPoint( gl_cl_goal.get().c, 0.03f, D3DCOLOR_XRGB( 255, 0, 0 ) ); - DBG_DrawPoint( gl_goal.c, 0.03f, D3DCOLOR_XRGB( 0, 0, 255 ) ); - DBG_DrawLine( gl_cl_goal.get().c, gl_goal.c, D3DCOLOR_XRGB( 0, 255, 0 ) ); + DBG_DrawPoint( gl_cl_goal.get().c, 0.03f, color_xrgb( 255, 0, 0 ) ); + DBG_DrawPoint( gl_goal.c, 0.03f, color_xrgb( 0, 0, 255 ) ); + DBG_DrawLine( gl_cl_goal.get().c, gl_goal.c, color_xrgb( 0, 255, 0 ) ); DBG_DrawMatrix( gl_cl_goal.get(), 0.3f ); DBG_DrawMatrix( gl_goal, 0.5f, 155 ); @@ -1144,10 +1144,10 @@ Matrix &CIKLimb::Goal ( Matrix &gl, const Fmatrix &xm, const SCalculateData& c if( cd.do_collide ) { ik_goal_matrix m; - DBG_DrawLine( sv_state.goal( m ).get().c, DBGG.c, D3DCOLOR_XRGB( 255, 0, 255 ) ); + DBG_DrawLine( sv_state.goal( m ).get().c, DBGG.c, color_xrgb( 255, 0, 255 ) ); - DBG_DrawPoint( sv_state.goal( m ).get().c, 0.05, D3DCOLOR_XRGB( 255, 255, 255 ) ); - DBG_DrawPoint( DBGG.c, 0.04,D3DCOLOR_XRGB(0, 255 ,0 ) ); + DBG_DrawPoint( sv_state.goal( m ).get().c, 0.05, color_xrgb( 255, 255, 255 ) ); + DBG_DrawPoint( DBGG.c, 0.04,color_xrgb(0, 255 ,0 ) ); Fvector ch; ch.sub( DBGG.c, sv_state.goal( m ).get().c ); if( ch.magnitude( ) > 0.5f ) { @@ -1197,7 +1197,7 @@ void CIKLimb::CalculateBones( SCalculateData &cd ) void DBG_DrawRotationLimitsY( const Fmatrix &start, float ang, float l, float h ) { #ifdef DEBUG - DBG_DrawRotationY( start, ang - EPS, ang + EPS, 0.15f, D3DCOLOR_XRGB( 0, 255, 0 ), false, 1 ); + 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 ); #endif // DEBUG } @@ -1205,7 +1205,7 @@ void DBG_DrawRotationLimitsY( const Fmatrix &start, float ang, float l, float h void DBG_DrawRotationLimitsZ( const Fmatrix &start, float ang, float l, float h ) { #ifdef DEBUG - DBG_DrawRotationZ( start, ang - EPS, ang + EPS, 0.15f, D3DCOLOR_XRGB( 0, 0, 255 ), false, 1 ); + 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 ); #endif // DEBUG } @@ -1213,7 +1213,7 @@ void DBG_DrawRotationLimitsZ( const Fmatrix &start, float ang, float l, float h void DBG_DrawRotationLimitsX( const Fmatrix &start, float ang, float l, float h ) { #ifdef DEBUG - DBG_DrawRotationX( start, ang + EPS, ang - EPS, 0.15f, D3DCOLOR_XRGB( 255, 0, 0 ), false, 1 ); + 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 ); #endif // DEBUG } diff --git a/src/xrGame/ik_foot_collider.cpp b/src/xrGame/ik_foot_collider.cpp index ac5a6405738..36a47c04d1d 100644 --- a/src/xrGame/ik_foot_collider.cpp +++ b/src/xrGame/ik_foot_collider.cpp @@ -208,10 +208,10 @@ bool Pick( ik_pick_result &r, const ik_pick_query &q , CObject* ignore_object) { CDB::TRI *tri = Level( ).ObjectSpace.GetStaticTris( ) + R.element; Fvector p = q.pos();p.add( Fvector( ).mul( q.dir(), range ) ); - DBG_DrawLine(pos,p,D3DCOLOR_XRGB( 255, 0, 0 ) ); + DBG_DrawLine(pos,p,color_xrgb( 255, 0, 0 ) ); if( tri ) { - DBG_DrawTri( tri,Level( ).ObjectSpace.GetStaticVerts( ), D3DCOLOR_XRGB( 255, 0, 0 ) ); + DBG_DrawTri( tri,Level( ).ObjectSpace.GetStaticVerts( ), color_xrgb( 255, 0, 0 ) ); } } #endif @@ -278,9 +278,9 @@ void ik_foot_collider::collide( SIKCollideData &cld, const ik_foot_geom &foot_ge #ifdef DEBUG if( ph_dbg_draw_mask1.test( phDbgDrawIKCollision ) ) { - DBG_DrawPoint( pos_toe, 0.01, D3DCOLOR_XRGB( 255, 0, 0)); + DBG_DrawPoint( pos_toe, 0.01, color_xrgb( 255, 0, 0)); if(cld.collided) - DBG_DrawPoint( r_toe.position, 0.01, D3DCOLOR_XRGB( 0, 0, 255)); + DBG_DrawPoint( r_toe.position, 0.01, color_xrgb( 0, 0, 255)); } #endif @@ -325,10 +325,10 @@ void ik_foot_collider::collide( SIKCollideData &cld, const ik_foot_geom &foot_ge #ifdef DEBUG if( ph_dbg_draw_mask1.test( phDbgDrawIKCollision ) ) { - DBG_DrawPoint( pos_toe, 0.01, D3DCOLOR_XRGB( 255, 0, 0)); + DBG_DrawPoint( pos_toe, 0.01, color_xrgb( 255, 0, 0)); if(cld.collided) { - DBG_DrawTri( r_toe.position, r_heel.position, r_side.position, D3DCOLOR_XRGB( 0, 0, 255), false ); + DBG_DrawTri( r_toe.position, r_heel.position, r_side.position, color_xrgb( 0, 0, 255), false ); } } #endif @@ -395,7 +395,7 @@ void ik_foot_collider::collide( SIKCollideData &cld, const ik_foot_geom &foot_ge // Fplane plane; // tri_plane( r_toe.position, r_hill.position , r_foot.position, plane ); - // DBG_DrawTri(r_toe.position, r_hill.position, r_foot.position , D3DCOLOR_XRGB( 255, 255, 255 ), false ); + // DBG_DrawTri(r_toe.position, r_hill.position, r_foot.position , color_xrgb( 255, 255, 255 ), false ); // // if( plane.n.dotproduct( r_hill.p.n ) < 0.f ) // { diff --git a/src/xrGame/ik_object_shift.cpp b/src/xrGame/ik_object_shift.cpp index 1bd913b214f..d0c94074278 100644 --- a/src/xrGame/ik_object_shift.cpp +++ b/src/xrGame/ik_object_shift.cpp @@ -39,7 +39,7 @@ void object_shift:: dbg_draw ( const Fmatrix ¤t_pos, const extrapolation DBG_DrawLine( v0, v1, - D3DCOLOR_XRGB( 0, 255, 0 ) ); + color_xrgb( 0, 255, 0 ) ); } float start_shift = current + delta_shift( time_passed ); @@ -47,7 +47,7 @@ void object_shift:: dbg_draw ( const Fmatrix ¤t_pos, const extrapolation DBG_DrawLine( Fvector().add( p0, Fvector().set( 0, start_shift, 0 ) ) , Fvector().add( p1, Fvector().set( 0, end_shift, 0 ) ), - D3DCOLOR_XRGB( 255, 0, 0 ) ); + color_xrgb( 255, 0, 0 ) ); } #endif diff --git a/src/xrGame/imotion_position.cpp b/src/xrGame/imotion_position.cpp index e058748f63c..db19ebe533c 100644 --- a/src/xrGame/imotion_position.cpp +++ b/src/xrGame/imotion_position.cpp @@ -210,7 +210,7 @@ static void dbg_draw_state_end( CPhysicsShell *shell ) { DBG_OpenCashedDraw(); shell->dbg_draw_velocity( dbg_imotion_draw_velocity_scale, D3DCOLOR_ARGB( 100 ,255, 0, 0 ) ); - //shell->dbg_draw_force( 0.01, D3DCOLOR_XRGB( 0, 0, 255 ) ); + //shell->dbg_draw_force( 0.01, color_xrgb( 0, 0, 255 ) ); DBG_ClosedCashedDraw( 50000 ); } if(dbg_imotion_collide_debug) @@ -387,7 +387,7 @@ void collide_anim_dbg_draw( CPhysicsShell *shell, float dt ) { shell->AnimToVelocityState( dt, default_l_limit * 10, default_w_limit * 10 ); DBG_OpenCashedDraw(); - shell->dbg_draw_velocity( dbg_imotion_draw_velocity_scale, D3DCOLOR_XRGB( 0, 255, 0 ) ); + shell->dbg_draw_velocity( dbg_imotion_draw_velocity_scale, color_xrgb( 0, 255, 0 ) ); DBG_ClosedCashedDraw( 50000 ); } if( dbg_imotion_draw_skeleton ) diff --git a/src/xrGame/inventory_item.cpp b/src/xrGame/inventory_item.cpp index 12e3e68a84d..11928085224 100644 --- a/src/xrGame/inventory_item.cpp +++ b/src/xrGame/inventory_item.cpp @@ -879,12 +879,12 @@ void CInventoryItem::PH_A_CrPr () Fvector c,r,p; bb.get_CD(c,r ); XFORM().transform_tiny(p,c); - DBG_DrawAABB( p, r,D3DCOLOR_XRGB(255, 0, 0)); + DBG_DrawAABB( p, r,color_xrgb(255, 0, 0)); //PPhysicsShell()->XFORM().transform_tiny(c); Fmatrix mm; PPhysicsShell()->GetGlobalTransformDynamic(&mm); mm.transform_tiny(p,c); - DBG_DrawAABB( p, r,D3DCOLOR_XRGB(0, 255, 0)); + DBG_DrawAABB( p, r,color_xrgb(0, 255, 0)); DBG_ClosedCashedDraw (50000); #endif object().spatial_move(); diff --git a/src/xrGame/level_debug.cpp b/src/xrGame/level_debug.cpp index 309bbe9734f..66ba3f2040c 100644 --- a/src/xrGame/level_debug.cpp +++ b/src/xrGame/level_debug.cpp @@ -63,7 +63,7 @@ void CLevelDebug::draw_debug_text () { debug::draw_text_tree (*actor_view, 2, x_start, y_start, m_texttree_offs, column_size, 80, - D3DCOLOR_XRGB(0,255,0), D3DCOLOR_XRGB(255,255,0)); + color_xrgb(0,255,0), color_xrgb(255,255,0)); } return; } @@ -72,21 +72,21 @@ void CLevelDebug::draw_debug_text () { debug::draw_text_tree(*m_p_texttree->find_node("General"), 2, x_start, y_start, m_texttree_offs, column_size, 80, - D3DCOLOR_XRGB(0,255,0), D3DCOLOR_XRGB(255,255,0)); + color_xrgb(0,255,0), color_xrgb(255,255,0)); } if ( m_p_texttree->find_node("Brain") ) { debug::draw_text_tree(*m_p_texttree->find_node("Brain"), 2, x_start*2+column_size, y_start, m_texttree_offs, column_size, 80, - D3DCOLOR_XRGB(0,255,0), D3DCOLOR_XRGB(255,255,0)); + color_xrgb(0,255,0), color_xrgb(255,255,0)); } if ( m_p_texttree->find_node("Controllers") ) { debug::draw_text_tree(*m_p_texttree->find_node("Controllers"), 2, x_start*3+column_size*2, y_start, m_texttree_offs, column_size, 80, - D3DCOLOR_XRGB(0,255,0), D3DCOLOR_XRGB(255,255,0)); + color_xrgb(0,255,0), color_xrgb(255,255,0)); } } diff --git a/src/xrGame/level_graph_debug.cpp b/src/xrGame/level_graph_debug.cpp index 31ada0baccc..fd0eadebfa5 100644 --- a/src/xrGame/level_graph_debug.cpp +++ b/src/xrGame/level_graph_debug.cpp @@ -121,13 +121,13 @@ void CLevelGraph::draw_edge (const int &vertex_id0, const int &vertex_id1) float radius = 0.005f; if (psAI_Flags.test(aiDrawGameGraphRealPos)) radius = 1.f; - u32 vertex_color0 = D3DCOLOR_XRGB(0,255,255); + u32 vertex_color0 = color_xrgb(0,255,255); if (vt0[3] == 0) - vertex_color0 = D3DCOLOR_XRGB(255,0,255); - u32 vertex_color1 = D3DCOLOR_XRGB(0,255,255); + vertex_color0 = color_xrgb(255,0,255); + u32 vertex_color1 = color_xrgb(0,255,255); if (vt1[3] == 0) - vertex_color1 = D3DCOLOR_XRGB(255,0,255); - const u32 edge_color = D3DCOLOR_XRGB(0,255,0); + vertex_color1 = color_xrgb(255,0,255); + const u32 edge_color = color_xrgb(0,255,0); const CGameGraph &graph = ai().game_graph(); Fvector position0; @@ -171,7 +171,7 @@ void CLevelGraph::draw_stalkers (const int &vertex_id) float radius = .0105f; if (psAI_Flags.test(aiDrawGameGraphRealPos)) radius = 1.f; - const u32 color = D3DCOLOR_XRGB(255,0,0); + const u32 color = color_xrgb(255,0,0); const CGameGraph &graph = ai().game_graph(); CGameFont &font = *UI().Font().pFontDI; @@ -181,7 +181,7 @@ void CLevelGraph::draw_stalkers (const int &vertex_id) else position = convert_position(graph.vertex(vertex_id)->game_point()); - font.SetColor (D3DCOLOR_XRGB(255,255,0)); + font.SetColor (color_xrgb(255,255,0)); bool show_text = true; for (;;) { @@ -338,7 +338,7 @@ void CLevelGraph::draw_objects (const int &vertex_id) float radius = .0105f; if (psAI_Flags.test(aiDrawGameGraphRealPos)) radius = 1.f; - const u32 color = D3DCOLOR_XRGB(255,0,0); + const u32 color = color_xrgb(255,0,0); const CGameGraph &graph = ai().game_graph(); CGameFont &font = *UI().Font().pFontDI; Fvector position; @@ -347,7 +347,7 @@ void CLevelGraph::draw_objects (const int &vertex_id) else position = convert_position(graph.vertex(vertex_id)->game_point()); - font.SetColor (D3DCOLOR_XRGB(255,255,0)); + font.SetColor (color_xrgb(255,255,0)); bool show_text = true; for (;;) { @@ -513,7 +513,7 @@ void CLevelGraph::draw_game_graph () xform.transform_tiny (vertices[2], Fvector().set(center.x - bounds.x, center.y - bounds.y, center.z - bounds.z)); xform.transform_tiny (vertices[3], Fvector().set(center.x + bounds.x, center.y - bounds.y, center.z - bounds.z)); -// u32 back_color = D3DCOLOR_XRGB(0,0,0); +// u32 back_color = color_xrgb(0,0,0); // RCache.dbg_DrawTRI (Fidentity,vertices[0],vertices[2],vertices[1],back_color); // RCache.dbg_DrawTRI (Fidentity,vertices[1],vertices[2],vertices[3],back_color); @@ -549,14 +549,14 @@ void CLevelGraph::draw_game_graph () Fvector t1 = ai().game_graph().vertex(i)->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(0,0,255)); CGameGraph::const_iterator I, E; ai().game_graph().begin (i,I,E); for ( ; I != E; ++I) { Fvector t2 = ai().game_graph().vertex((*I).vertex_id())->game_point(); t2.y += .6f; NORMALIZE_VECTOR(t2); - Level().debug_renderer().draw_line(Fidentity,t1,t2,D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_line(Fidentity,t1,t2,color_xrgb(0,255,0)); } Fvector T; Fvector4 S; @@ -577,13 +577,13 @@ void CLevelGraph::draw_game_graph () Fvector t1 = ai().game_graph().vertex(path.back())->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(0,0,255)); for (int i=(int)path.size() - 2; i>=0;--i) { Fvector t2 = ai().game_graph().vertex(path[i])->game_point(); t2.y += .6f; NORMALIZE_VECTOR(t2); - Level().debug_renderer().draw_aabb(t2,.05f,.05f,.05f,D3DCOLOR_XRGB(0,0,255)); - Level().debug_renderer().draw_line(Fidentity,t1,t2,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb(t2,.05f,.05f,.05f,color_xrgb(0,0,255)); + Level().debug_renderer().draw_line(Fidentity,t1,t2,color_xrgb(0,0,255)); t1 = t2; } } @@ -599,8 +599,8 @@ void CLevelGraph::draw_game_graph () t1.y += .6f; t2.y += .6f; NORMALIZE_VECTOR(t2); - Level().debug_renderer().draw_aabb(t1,.5f,.5f,.5f,D3DCOLOR_XRGB(255,255,255)); - //Level().debug_renderer().draw_line(Fidentity,t1,t2,D3DCOLOR_XRGB(255,255,255)); + Level().debug_renderer().draw_aabb(t1,.5f,.5f,.5f,color_xrgb(255,255,255)); + //Level().debug_renderer().draw_line(Fidentity,t1,t2,color_xrgb(255,255,255)); Fvector T; Fvector4 S; T.set (t1); @@ -627,13 +627,13 @@ void CLevelGraph::draw_game_graph () Fvector t1 = ai().game_graph().vertex(tpALifeHuman->brain().movement().detail().path().back())->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(0,0,255)); for (int i=(int)tpALifeHuman->brain().movement().detail().path().size() - 2; i>=0;--i) { Fvector t2 = ai().game_graph().vertex(tpALifeHuman->brain().movement().detail().path()[i])->game_point(); t2.y += .6f; NORMALIZE_VECTOR(t2); - Level().debug_renderer().draw_aabb(t2,.05f,.05f,.05f,D3DCOLOR_XRGB(0,0,255)); - Level().debug_renderer().draw_line(Fidentity,t1,t2,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb(t2,.05f,.05f,.05f,color_xrgb(0,0,255)); + Level().debug_renderer().draw_line(Fidentity,t1,t2,color_xrgb(0,0,255)); t1 = t2; } } @@ -645,13 +645,13 @@ void CLevelGraph::draw_game_graph () t1.add(t2); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(255,0,0)); } else { Fvector t1 = ai().game_graph().vertex((*I).second->m_tGraphID)->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(255,0,0)); } } else { @@ -660,7 +660,7 @@ void CLevelGraph::draw_game_graph () Fvector t1 = ai().game_graph().vertex((*I).second->m_tGraphID)->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(255,255,0)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(255,255,0)); } else { CSE_ALifeCreatureActor *tpALifeCreatureActor = smart_cast((*I).second); @@ -668,7 +668,7 @@ void CLevelGraph::draw_game_graph () Fvector t1 = ai().game_graph().vertex((*I).second->m_tGraphID)->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(255,255,255)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(255,255,255)); } else { CSE_ALifeTrader *tpALifeTrader = smart_cast((*I).second); @@ -676,7 +676,7 @@ void CLevelGraph::draw_game_graph () Fvector t1 = ai().game_graph().vertex((*I).second->m_tGraphID)->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(0,0,0)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(0,0,0)); } else { CSE_ALifeSmartZone *smart_zone = smart_cast((*I).second); @@ -684,7 +684,7 @@ void CLevelGraph::draw_game_graph () Fvector t1 = ai().game_graph().vertex((*I).second->m_tGraphID)->game_point(); t1.y += .6f; NORMALIZE_VECTOR(t1); - Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_aabb(t1,.05f,.05f,.05f,color_xrgb(255,0,0)); } } } diff --git a/src/xrGame/level_graph_debug2.cpp b/src/xrGame/level_graph_debug2.cpp index fa0d2f2a48d..6edea095ab0 100644 --- a/src/xrGame/level_graph_debug2.cpp +++ b/src/xrGame/level_graph_debug2.cpp @@ -120,12 +120,12 @@ void CLevelGraph::draw_nodes () u32 LL = 255; - u32 CC = D3DCOLOR_XRGB(0,0,255); - u32 CT = D3DCOLOR_XRGB(LL,LL,LL); - u32 CH = D3DCOLOR_XRGB(0,128,0); + u32 CC = color_xrgb(0,0,255); + u32 CT = color_xrgb(LL,LL,LL); + u32 CH = color_xrgb(0,128,0); BOOL bHL = FALSE; - if (Nid==u32(ID)) { bHL = TRUE; CT = D3DCOLOR_XRGB(0,255,0); } + if (Nid==u32(ID)) { bHL = TRUE; CT = color_xrgb(0,255,0); } else { for (u32 t=0; t::const_iterator i = (*II).m_restriction->border().begin(); @@ -210,7 +210,7 @@ void CLevelGraph::draw_restrictions () for ( ; i != e; ++i) { Fvector temp = ai().level_graph().vertex_position(*i); temp.y += .1f; - Level().debug_renderer().draw_aabb(temp,.05f,.05f,.05f,D3DCOLOR_XRGB(0,255,0)); + Level().debug_renderer().draw_aabb(temp,.05f,.05f,.05f,color_xrgb(0,255,0)); } } } @@ -229,7 +229,7 @@ void CLevelGraph::draw_covers () for ( ; I != E; ++I) { Fvector position = (*I)->position(); position.y += 1.5f; - Level().debug_renderer().draw_aabb (position,half_size - .01f,1.f,ai().level_graph().header().cell_size()*.5f-.01f,D3DCOLOR_XRGB(0*255,255,0*255)); + Level().debug_renderer().draw_aabb (position,half_size - .01f,1.f,ai().level_graph().header().cell_size()*.5f-.01f,color_xrgb(0*255,255,0*255)); CVertex *v = vertex((*I)->level_vertex_id()); Fvector direction; @@ -242,7 +242,7 @@ void CLevelGraph::draw_covers () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(0,0,255)); value = compute_high_square(float(10*i)/180.f*PI,PI/2.f,v); if (value > best_value) { best_value = value; @@ -251,16 +251,16 @@ void CLevelGraph::draw_covers () } direction.set (position.x - half_size*float(v->high_cover(0))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z + half_size*float(v->high_cover(1))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x + half_size*float(v->high_cover(2))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z - half_size*float(v->high_cover(3))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); float value = high_cover_in_direction(float(10*j)/180.f*PI,v); direction.setHP (float(10*j)/180.f*PI,0); @@ -268,13 +268,13 @@ void CLevelGraph::draw_covers () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line (Fidentity,position,direction,D3DCOLOR_XRGB(0,0,0)); + Level().debug_renderer().draw_line (Fidentity,position,direction,color_xrgb(0,0,0)); // low { position = (*I)->position(); position.y += 0.6f; - Level().debug_renderer().draw_aabb (position,half_size - .01f,1.f,ai().level_graph().header().cell_size()*.5f-.01f,D3DCOLOR_XRGB(0*255,255,0*255)); + Level().debug_renderer().draw_aabb (position,half_size - .01f,1.f,ai().level_graph().header().cell_size()*.5f-.01f,color_xrgb(0*255,255,0*255)); CVertex *v = vertex((*I)->level_vertex_id()); Fvector direction; @@ -287,7 +287,7 @@ void CLevelGraph::draw_covers () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(0,0,255)); value = compute_low_square(float(10*i)/180.f*PI,PI/2.f,v); if (value > best_value) { best_value = value; @@ -296,16 +296,16 @@ void CLevelGraph::draw_covers () } direction.set (position.x - half_size*float(v->low_cover(0))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z + half_size*float(v->low_cover(1))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x + half_size*float(v->low_cover(2))/15.f,position.y,position.z); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); direction.set (position.x,position.y,position.z - half_size*float(v->low_cover(3))/15.f); - Level().debug_renderer().draw_line(Fidentity,position,direction,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,position,direction,color_xrgb(255,0,0)); float value = low_cover_in_direction(float(10*j)/180.f*PI,v); direction.setHP (float(10*j)/180.f*PI,0); @@ -313,7 +313,7 @@ void CLevelGraph::draw_covers () direction.mul (value*half_size); direction.add (position); direction.y = position.y; - Level().debug_renderer().draw_line (Fidentity,position,direction,D3DCOLOR_XRGB(0,0,0)); + Level().debug_renderer().draw_line (Fidentity,position,direction,color_xrgb(0,0,0)); } } } @@ -335,7 +335,7 @@ void CLevelGraph::draw_objects () tpCustomMonster->OnRender(); if (!tpCustomMonster->movement().detail().path().empty()) { Fvector temp = tpCustomMonster->movement().detail().path()[tpCustomMonster->movement().detail().path().size() - 1].position; - Level().debug_renderer().draw_aabb (temp,1.f,1.f,1.f,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb (temp,1.f,1.f,1.f,color_xrgb(0,0,255)); } } @@ -359,8 +359,8 @@ void CLevelGraph::draw_debug_node() pos_dest = pos_src; pos_dest.y += 10.0f; - Level().debug_renderer().draw_aabb(pos_src,0.35f,0.35f,0.35f,D3DCOLOR_XRGB(0,0,255)); - Level().debug_renderer().draw_line(Fidentity,pos_src,pos_dest,D3DCOLOR_XRGB(0,0,255)); + Level().debug_renderer().draw_aabb(pos_src,0.35f,0.35f,0.35f,color_xrgb(0,0,255)); + Level().debug_renderer().draw_line(Fidentity,pos_src,pos_dest,color_xrgb(0,0,255)); } if (ai().level_graph().valid_vertex_id(g_dwDebugNodeDest)) { @@ -368,8 +368,8 @@ void CLevelGraph::draw_debug_node() pos_dest = pos_src; pos_dest.y += 10.0f; - Level().debug_renderer().draw_aabb(pos_src,0.35f,0.35f,0.35f,D3DCOLOR_XRGB(255,0,0)); - Level().debug_renderer().draw_line(Fidentity,pos_src,pos_dest,D3DCOLOR_XRGB(255,0,0)); + Level().debug_renderer().draw_aabb(pos_src,0.35f,0.35f,0.35f,color_xrgb(255,0,0)); + Level().debug_renderer().draw_line(Fidentity,pos_src,pos_dest,color_xrgb(255,0,0)); } } } diff --git a/src/xrGame/player_hud_tune.cpp b/src/xrGame/player_hud_tune.cpp index e0ff83bb41d..c430648111f 100644 --- a/src/xrGame/player_hud_tune.cpp +++ b/src/xrGame/player_hud_tune.cpp @@ -194,13 +194,13 @@ void attachable_hud_item::debug_draw_firedeps() setup_firedeps (fd); if(hud_adj_mode==5||bForce) - render.draw_aabb(fd.vLastFP,0.005f,0.005f,0.005f,D3DCOLOR_XRGB(255,0,0)); + render.draw_aabb(fd.vLastFP,0.005f,0.005f,0.005f,color_xrgb(255,0,0)); if(hud_adj_mode==6) - render.draw_aabb(fd.vLastFP2,0.005f,0.005f,0.005f,D3DCOLOR_XRGB(0,0,255)); + render.draw_aabb(fd.vLastFP2,0.005f,0.005f,0.005f,color_xrgb(0,0,255)); if(hud_adj_mode==7) - render.draw_aabb(fd.vLastSP,0.005f,0.005f,0.005f,D3DCOLOR_XRGB(0,255,0)); + render.draw_aabb(fd.vLastSP,0.005f,0.005f,0.005f,color_xrgb(0,255,0)); } #endif // DEBUG } diff --git a/src/xrGame/script_game_object3.cpp b/src/xrGame/script_game_object3.cpp index dcd47f9ea7d..c198295df53 100644 --- a/src/xrGame/script_game_object3.cpp +++ b/src/xrGame/script_game_object3.cpp @@ -888,7 +888,7 @@ Fvector CScriptGameObject::head_orientation () const void CScriptGameObject::info_add(LPCSTR text) { #ifdef DEBUG - DBG().object_info(&object(),this).add_item (text, D3DCOLOR_XRGB(255,0,0), 0); + DBG().object_info(&object(),this).add_item (text, color_xrgb(255,0,0), 0); #endif } diff --git a/src/xrGame/script_zone.cpp b/src/xrGame/script_zone.cpp index 8b2cbdcfcdf..f33338abed0 100644 --- a/src/xrGame/script_zone.cpp +++ b/src/xrGame/script_zone.cpp @@ -114,13 +114,13 @@ void CScriptZone::OnRender() l_ball.scale(l_sphere.R, l_sphere.R, l_sphere.R); Fvector l_p; XFORM().transform(l_p, l_sphere.P); l_ball.translate_add(l_p); - Level().debug_renderer().draw_ellipse(l_ball, D3DCOLOR_XRGB(0,255,255)); + Level().debug_renderer().draw_ellipse(l_ball, color_xrgb(0,255,255)); } break; case 1: { l_box.mul(XFORM(), l_pShape->data.box); - Level().debug_renderer().draw_obb(l_box, l_half, D3DCOLOR_XRGB(0,255,255)); + Level().debug_renderer().draw_obb(l_box, l_half, color_xrgb(0,255,255)); } break; } diff --git a/src/xrGame/smart_cover_object.cpp b/src/xrGame/smart_cover_object.cpp index f8ff3668b07..dbeabc92579 100644 --- a/src/xrGame/smart_cover_object.cpp +++ b/src/xrGame/smart_cover_object.cpp @@ -103,7 +103,7 @@ void object::OnRender () GlobalEnv.DRender->OnFrameEnd (); Fvector l_half; l_half.set(.5f, .5f, .5f); Fmatrix l_ball, l_box; - u32 Color = D3DCOLOR_XRGB(0,255,0); + u32 Color = color_xrgb(0,255,0); typedef xr_vector Shapes; Shapes &l_shapes = ((CCF_Shape*)CFORM())->Shapes(); diff --git a/src/xrGame/space_restrictor.cpp b/src/xrGame/space_restrictor.cpp index 35b74b69aad..b63655db123 100644 --- a/src/xrGame/space_restrictor.cpp +++ b/src/xrGame/space_restrictor.cpp @@ -222,9 +222,9 @@ void CSpaceRestrictor::OnRender () u32 Color = 0; CCustomZone *custom_zone = smart_cast(this); if (custom_zone && custom_zone->IsEnabled()) - Color = D3DCOLOR_XRGB(0,255,255); + Color = color_xrgb(0,255,255); else - Color = D3DCOLOR_XRGB(255,0,0); + Color = color_xrgb(255,0,0); for(l_pShape = l_shapes.begin(); l_shapes.end() != l_pShape; ++l_pShape) diff --git a/src/xrGame/team_base_zone.cpp b/src/xrGame/team_base_zone.cpp index d958733b9f4..1f7ea4556ad 100644 --- a/src/xrGame/team_base_zone.cpp +++ b/src/xrGame/team_base_zone.cpp @@ -165,13 +165,13 @@ void CTeamBaseZone::OnRender() l_ball.scale(l_sphere.R, l_sphere.R, l_sphere.R); Fvector l_p; XFORM().transform(l_p, l_sphere.P); l_ball.translate_add(l_p); - Level().debug_renderer().draw_ellipse(l_ball, D3DCOLOR_XRGB(0,255,255)); + Level().debug_renderer().draw_ellipse(l_ball, color_xrgb(0,255,255)); } break; case 1: { l_box.mul(XFORM(), l_pShape->data.box); - Level().debug_renderer().draw_obb(l_box, l_half, D3DCOLOR_XRGB(0,255,255)); + Level().debug_renderer().draw_obb(l_box, l_half, color_xrgb(0,255,255)); } break; } diff --git a/src/xrGame/ui/UIMainIngameWnd.cpp b/src/xrGame/ui/UIMainIngameWnd.cpp index 82ab625a1e5..1dc86249fbe 100644 --- a/src/xrGame/ui/UIMainIngameWnd.cpp +++ b/src/xrGame/ui/UIMainIngameWnd.cpp @@ -61,8 +61,8 @@ const u32 g_clWhite = 0xffffffff; #define SHOW_INFO_SPEED 0.5f #define HIDE_INFO_SPEED 10.f -#define C_ON_ENEMY D3DCOLOR_XRGB(0xff,0,0) -#define C_DEFAULT D3DCOLOR_XRGB(0xff,0xff,0xff) +#define C_ON_ENEMY color_xrgb(0xff,0,0) +#define C_DEFAULT color_xrgb(0xff,0xff,0xff) #define MAININGAME_XML "maingame.xml" diff --git a/src/xrGame/wallmark_manager.cpp b/src/xrGame/wallmark_manager.cpp index aacf2f6ac34..26e1153a912 100644 --- a/src/xrGame/wallmark_manager.cpp +++ b/src/xrGame/wallmark_manager.cpp @@ -121,14 +121,14 @@ void CWalmarkManager::StartWorkflow() u32 _not_dist = 0; /* DBG_OpenCashedDraw (); - DBG_DrawAABB (m_pos,Fvector().set(m_trace_dist,m_trace_dist,m_trace_dist),D3DCOLOR_XRGB(255,0,0)); - DBG_DrawAABB (m_pos,Fvector().set(0.05f,0.05f,0.05f),D3DCOLOR_XRGB(0,255,0)); + DBG_DrawAABB (m_pos,Fvector().set(m_trace_dist,m_trace_dist,m_trace_dist),color_xrgb(255,0,0)); + DBG_DrawAABB (m_pos,Fvector().set(0.05f,0.05f,0.05f),color_xrgb(0,255,0)); CTimer T; T.Start(); */ for (CDB::RESULT* Res=R_begin; Res!=R_end; ++Res) { -//. DBG_DrawTri(Res, D3DCOLOR_XRGB(0,255,0) ); +//. DBG_DrawTri(Res, color_xrgb(0,255,0) ); if(wm_count >= max_wallmarks_count) break; diff --git a/src/xrPhysics/ActorCameraCollision.cpp b/src/xrPhysics/ActorCameraCollision.cpp index 9ed31b388c7..1feef7a9dc4 100644 --- a/src/xrPhysics/ActorCameraCollision.cpp +++ b/src/xrPhysics/ActorCameraCollision.cpp @@ -343,13 +343,13 @@ void collide_camera( CCameraBase & camera, float _viewport_near, IPhysicsShellHo if( dbg_draw_camera_collision ) { debug_output().DBG_DrawMatrix( Fmatrix().translate( xform.c ), 1 ); - shell->dbg_draw_geometry( 1, D3DCOLOR_XRGB(0, 0, 255 ) ); + shell->dbg_draw_geometry( 1, color_xrgb(0, 0, 255 ) ); } #endif do_collide_and_move( xform, l_actor, shell, roote ); #ifdef DEBUG if( dbg_draw_camera_collision ) - shell->dbg_draw_geometry( 1, D3DCOLOR_XRGB(0, 255, 0 ) ); + shell->dbg_draw_geometry( 1, color_xrgb(0, 255, 0 ) ); #endif roote->GetGlobalPositionDynamic( &camera.vPosition ); camera.vPosition.mad( camera.Direction(), -_viewport_near/2.f ); diff --git a/src/xrPhysics/Geometry.cpp b/src/xrPhysics/Geometry.cpp index 04a68cad252..74775d784fe 100644 --- a/src/xrPhysics/Geometry.cpp +++ b/src/xrPhysics/Geometry.cpp @@ -753,7 +753,7 @@ void CODEGeom:: dbg_draw ( float scale, u32 color, Flags32 flags )const Fmatrix m; get_xform( m ); debug_output().DBG_DrawMatrix( m, 0.02f ); - debug_output().DBG_DrawPoint( m.c, 0.001f, D3DCOLOR_XRGB(0, 255, 255 ) ); + debug_output().DBG_DrawPoint( m.c, 0.001f, color_xrgb(0, 255, 255 ) ); } diff --git a/src/xrPhysics/PHActivationShape.cpp b/src/xrPhysics/PHActivationShape.cpp index e6855b13de5..d0245b4ff14 100644 --- a/src/xrPhysics/PHActivationShape.cpp +++ b/src/xrPhysics/PHActivationShape.cpp @@ -225,7 +225,7 @@ bool CPHActivationShape:: Activate (const Fvector need_size,u16 steps,floa Fmatrix M; PHDynamicData::DMXPStoFMX(dBodyGetRotation(m_body),dBodyGetPosition(m_body),M); Fvector v;dGeomBoxGetLengths(m_geom,cast_fp(v));v.mul(0.5f); - debug_output().DBG_DrawOBB(M,v,D3DCOLOR_XRGB(0,255,0)); + debug_output().DBG_DrawOBB(M,v,color_xrgb(0,255,0)); } #endif VERIFY(m_geom&&m_body); @@ -313,7 +313,7 @@ bool CPHActivationShape:: Activate (const Fvector need_size,u16 steps,floa Fmatrix M; PHDynamicData::DMXPStoFMX(dBodyGetRotation(m_body),dBodyGetPosition(m_body),M); Fvector v;v.set(need_size);v.mul(0.5f); - debug_output().DBG_DrawOBB(M,v,D3DCOLOR_XRGB(0,255,255)); + debug_output().DBG_DrawOBB(M,v,color_xrgb(0,255,255)); debug_output().DBG_ClosedCashedDraw(30000); } #endif diff --git a/src/xrPhysics/PHDisabling.cpp b/src/xrPhysics/PHDisabling.cpp index 6baf6adc1b3..324a8cc6fe6 100644 --- a/src/xrPhysics/PHDisabling.cpp +++ b/src/xrPhysics/PHDisabling.cpp @@ -191,8 +191,8 @@ void CPHDisablingTranslational::UpdateL1() const dReal *position = dBodyGetPosition(body) ; const dReal *velocity = dBodyGetLinearVel(body) ; #if 0 - DBG_DrawLine( cast_fv( position ), Fvector().add(cast_fv( position ),m_mean_velocity.sum), D3DCOLOR_XRGB( 255, 0, 0 ) ); - DBG_DrawLine( cast_fv( position ), Fvector().add(cast_fv( position ),m_mean_acceleration.sum), D3DCOLOR_XRGB( 0, 0, 255 ) ); + DBG_DrawLine( cast_fv( position ), Fvector().add(cast_fv( position ),m_mean_velocity.sum), color_xrgb( 255, 0, 0 ) ); + DBG_DrawLine( cast_fv( position ), Fvector().add(cast_fv( position ),m_mean_acceleration.sum), color_xrgb( 0, 0, 255 ) ); #endif CPHDisablingBase::UpdateValues(* (Fvector*) position,* (Fvector*) velocity); //float velocity_param = m_mean_velocity .Update(* (Fvector*) position) ; diff --git a/src/xrPhysics/PHElement.cpp b/src/xrPhysics/PHElement.cpp index de966cc8fa4..37c53d8bb0b 100644 --- a/src/xrPhysics/PHElement.cpp +++ b/src/xrPhysics/PHElement.cpp @@ -410,7 +410,7 @@ void CPHElement::PhDataUpdate(dReal step){ #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgDrawMassCenters)) { - debug_output().DBG_DrawPoint(cast_fv(dBodyGetPosition(m_body)),0.03f,D3DCOLOR_XRGB(255,0,0)); + debug_output().DBG_DrawPoint(cast_fv(dBodyGetPosition(m_body)),0.03f,color_xrgb(255,0,0)); } #endif @@ -614,7 +614,7 @@ void CPHElement::applyImpulseVsMC(const Fvector& pos,const Fvector& dir, float v { Fvector draw_pos; draw_pos.add( cast_fv( dBodyGetPosition( m_body ) ), pos ); debug_output().DBG_OpenCashedDraw(); - debug_output().DBG_DrawLine( draw_pos, Fvector().add( draw_pos, dir ), D3DCOLOR_XRGB(255,0,0) ); + debug_output().DBG_DrawLine( draw_pos, Fvector().add( draw_pos, dir ), color_xrgb(255,0,0) ); debug_output().DBG_ClosedCashedDraw( 50000 ); } #endif @@ -632,7 +632,7 @@ void CPHElement::applyImpulseVsGF(const Fvector& pos,const Fvector& dir, float v if( dbg_draw_ph_force_apply ) { debug_output().DBG_OpenCashedDraw(); - debug_output().DBG_DrawLine( pos, Fvector().add( pos, dir ), D3DCOLOR_XRGB(255,05,0) ); + debug_output().DBG_DrawLine( pos, Fvector().add( pos, dir ), color_xrgb(255,05,0) ); debug_output().DBG_ClosedCashedDraw( 50000 ); } #endif @@ -686,9 +686,9 @@ void CPHElement:: applyImpulseTrace (const Fvector& pos, const Fvector& dir, fl Fvector dbg_position;dbg_position.set(body_pos); dMULTIPLY0_331 (cast_fp(dbg_position),dBodyGetRotation(m_body),cast_fp(body_pos)); dbg_position.add(cast_fv(dBodyGetPosition(m_body))); - debug_output().DBG_DrawPoint(dbg_position,0.01f,D3DCOLOR_XRGB(255,255,255)); - debug_output().DBG_DrawLine(cast_fv(dBodyGetPosition(m_body)),dbg_position,D3DCOLOR_XRGB(255,255,255)); - debug_output().DBG_DrawLine(dbg_position,Fvector().add(dbg_position,Fvector().mul(dir,0.4f)),D3DCOLOR_XRGB(255,0,255)); + debug_output().DBG_DrawPoint(dbg_position,0.01f,color_xrgb(255,255,255)); + debug_output().DBG_DrawLine(cast_fv(dBodyGetPosition(m_body)),dbg_position,color_xrgb(255,255,255)); + debug_output().DBG_DrawLine(dbg_position,Fvector().add(dbg_position,Fvector().mul(dir,0.4f)),color_xrgb(255,0,255)); debug_output().DBG_ClosedCashedDraw(10000); } #endif diff --git a/src/xrPhysics/PHObject.cpp b/src/xrPhysics/PHObject.cpp index d0a67426384..02b6aab894d 100644 --- a/src/xrPhysics/PHObject.cpp +++ b/src/xrPhysics/PHObject.cpp @@ -96,7 +96,7 @@ void CPHObject::Collide() if(debug_output().ph_dbg_draw_mask().test(phDbgDrawRayMotions)) { debug_output().DBG_OpenCashedDraw(); - debug_output().DBG_DrawLine(*from,Fvector().add(*from,Fvector().mul(dir,magnitude)),D3DCOLOR_XRGB(0,255,0)); + debug_output().DBG_DrawLine(*from,Fvector().add(*from,Fvector().mul(dir,magnitude)),color_xrgb(0,255,0)); debug_output().DBG_ClosedCashedDraw(30000); } diff --git a/src/xrPhysics/PHShell.cpp b/src/xrPhysics/PHShell.cpp index 5ec277c29ad..501ee89899f 100644 --- a/src/xrPhysics/PHShell.cpp +++ b/src/xrPhysics/PHShell.cpp @@ -245,8 +245,8 @@ void CPHShell::PhDataUpdate(dReal step){ ReanableObject(); #if 0 DBG_OpenCashedDraw(); - dbg_draw_velocity ( 0.1f, D3DCOLOR_XRGB( 255, 0, 0 ) ); - dbg_draw_force ( 0.1f, D3DCOLOR_XRGB( 0, 0, 255 ) ); + dbg_draw_velocity ( 0.1f, color_xrgb( 255, 0, 0 ) ); + dbg_draw_force ( 0.1f, color_xrgb( 0, 0, 255 ) ); DBG_ClosedCashedDraw( 10000 ); //dbg_draw_geometry #endif diff --git a/src/xrPhysics/PHSimpleCharacter.cpp b/src/xrPhysics/PHSimpleCharacter.cpp index 4eb8a879861..59b4c8bd330 100644 --- a/src/xrPhysics/PHSimpleCharacter.cpp +++ b/src/xrPhysics/PHSimpleCharacter.cpp @@ -592,7 +592,7 @@ void CPHSimpleCharacter::PhTune(dReal step){ if(debug_output().ph_dbg_draw_mask().test(phDbgCharacterControl)) { if(b_air_contact_state) - debug_output().DBG_DrawPoint(cast_fv(dBodyGetPosition(m_body)),m_radius,D3DCOLOR_XRGB(255,0,0)); + debug_output().DBG_DrawPoint(cast_fv(dBodyGetPosition(m_body)),m_radius,color_xrgb(255,0,0)); } #endif @@ -743,10 +743,10 @@ void CPHSimpleCharacter::PhTune(dReal step){ if(debug_output().ph_dbg_draw_mask().test(phDbgCharacterControl)) { const Fvector dipsp = Fvector().set(0,0.02f,0); - debug_output().DBG_DrawLine(cast_fv(dBodyGetPosition(m_body)),Fvector().add(cast_fv(dBodyGetPosition(m_body)),Fvector().mul(cast_fv(sidedir),1.f)),D3DCOLOR_XRGB(0,0,255)); - debug_output().DBG_DrawLine(cast_fv(dBodyGetPosition(m_body)),Fvector().add(cast_fv(dBodyGetPosition(m_body)),Fvector().mul(cast_fv(m_control_force),1.f/1000.f)),D3DCOLOR_XRGB(0,0,255)); + debug_output().DBG_DrawLine(cast_fv(dBodyGetPosition(m_body)),Fvector().add(cast_fv(dBodyGetPosition(m_body)),Fvector().mul(cast_fv(sidedir),1.f)),color_xrgb(0,0,255)); + debug_output().DBG_DrawLine(cast_fv(dBodyGetPosition(m_body)),Fvector().add(cast_fv(dBodyGetPosition(m_body)),Fvector().mul(cast_fv(m_control_force),1.f/1000.f)),color_xrgb(0,0,255)); debug_output().DBG_DrawLine(Fvector().add(cast_fv(dBodyGetPosition(m_body)),dipsp), - Fvector().add(Fvector().add(cast_fv(dBodyGetPosition(m_body)),dipsp),Fvector().mul(cast_fv(dBodyGetForce(m_body)),1.f/1000.f)),D3DCOLOR_XRGB(255,0,0)); + Fvector().add(Fvector().add(cast_fv(dBodyGetPosition(m_body)),dipsp),Fvector().mul(cast_fv(dBodyGetForce(m_body)),1.f/1000.f)),color_xrgb(255,0,0)); } #endif //if(b_clamb_jump){ @@ -805,7 +805,7 @@ void CPHSimpleCharacter::PhTune(dReal step){ { const Fvector dipsp = Fvector().set(0,0.02f,0); debug_output().DBG_DrawLine(Fvector().add(cast_fv(dBodyGetPosition(m_body)),dipsp), - Fvector().add(Fvector().add(cast_fv(dBodyGetPosition(m_body)),dipsp),Fvector().mul(cast_fv(dBodyGetForce(m_body)),1.f/1000.f)),D3DCOLOR_XRGB(255,0,0)); + Fvector().add(Fvector().add(cast_fv(dBodyGetPosition(m_body)),dipsp),Fvector().mul(cast_fv(dBodyGetForce(m_body)),1.f/1000.f)),color_xrgb(255,0,0)); } #endif } @@ -917,9 +917,9 @@ bool CPHSimpleCharacter::ValidateWalkOnMesh() m.i.set(sd_dir); m.k.set(accel); m.c.set(center); - debug_output().DBG_DrawOBB(m,obb,D3DCOLOR_XRGB(0,255,0)); + debug_output().DBG_DrawOBB(m,obb,color_xrgb(0,255,0)); m.c.set(center_forbid); - debug_output().DBG_DrawOBB(m,obb_fb,D3DCOLOR_XRGB(255,0,0)); + debug_output().DBG_DrawOBB(m,obb_fb,color_xrgb(255,0,0)); } #endif @@ -941,7 +941,7 @@ bool CPHSimpleCharacter::ValidateWalkOnMesh() #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgCharacterControl)) { - debug_output().DBG_DrawTri(Res,D3DCOLOR_XRGB(255,0,0)); + debug_output().DBG_DrawTri(Res,color_xrgb(255,0,0)); } #endif b_side_contact=true; @@ -970,7 +970,7 @@ bool CPHSimpleCharacter::ValidateWalkOnMesh() #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgCharacterControl)) { - debug_output().DBG_DrawTri(Res,D3DCOLOR_XRGB(0,255,0)); + debug_output().DBG_DrawTri(Res,color_xrgb(0,255,0)); } #endif return true; @@ -1188,8 +1188,8 @@ void CPHSimpleCharacter::OnRender(){ GLevel().debug_renderer().draw_ellipse(M, 0xffffffff); #ifdef DRAW_BOXES - GLevel().debug_renderer().draw_aabb (m_bcenter,m_AABB.x,m_AABB.y,m_AABB.z,D3DCOLOR_XRGB(0,0,255)); - GLevel().debug_renderer().draw_aabb (m_bcenter_forbid,m_AABB_forbid.x,m_AABB_forbid.y,m_AABB_forbid.z,D3DCOLOR_XRGB(255,0,0)); + GLevel().debug_renderer().draw_aabb (m_bcenter,m_AABB.x,m_AABB.y,m_AABB.z,color_xrgb(0,0,255)); + GLevel().debug_renderer().draw_aabb (m_bcenter_forbid,m_AABB_forbid.x,m_AABB_forbid.y,m_AABB_forbid.z,color_xrgb(255,0,0)); #endif ///M.c.set(0.f,1.f,0.f); //Level().debug_renderer().draw_ellipse(M, 0xffffffff); diff --git a/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h b/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h index 679fb85ab00..b8d23e22cb6 100644 --- a/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h +++ b/src/xrPhysics/tri-colliderknoopc/dSortTriPrimitive.h @@ -135,7 +135,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgDrawTriTestAABB)) - debug_output().DBG_DrawAABB(cast_fv(p),AABB,D3DCOLOR_XRGB(0,0,255)); + debug_output().DBG_DrawAABB(cast_fv(p),AABB,color_xrgb(0,0,255)); #endif @@ -165,7 +165,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgDrawSavedTries)) - debug_output().DBG_DrawTri(neg_tri.T,V_array,D3DCOLOR_XRGB(255,0,0)); + debug_output().DBG_DrawTri(neg_tri.T,V_array,color_xrgb(255,0,0)); #endif } @@ -185,7 +185,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgDrawSavedTries)) - debug_output().DBG_DrawTri(b_neg_tri.T,V_array,D3DCOLOR_XRGB(0,0,255)); + debug_output().DBG_DrawTri(b_neg_tri.T,V_array,color_xrgb(0,0,255)); #endif } @@ -206,7 +206,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( continue; #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDBgDrawIntersectedTries)) - debug_output().DBG_DrawTri(T,V_array,D3DCOLOR_XRGB(0,255,0)); + debug_output().DBG_DrawTri(T,V_array,color_xrgb(0,255,0)); debug_output().dbg_tries_num()++; #endif Triangle tri; @@ -214,7 +214,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( if(tri.dist<0.f){ #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDBgDrawNegativeTries)) - debug_output().DBG_DrawTri(T,V_array,D3DCOLOR_XRGB(0,0,255)); + debug_output().DBG_DrawTri(T,V_array,color_xrgb(0,0,255)); #endif float last_pos_dist=dDOT(last_pos,tri.norm)- tri.pos ; if((!(last_pos_dist<0.f))||b_pushing) @@ -222,7 +222,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( { #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDBgDrawTriesChangesSign)) - debug_output().DBG_DrawTri(T,V_array,D3DCOLOR_XRGB(0,255,0)); + debug_output().DBG_DrawTri(T,V_array,color_xrgb(0,255,0)); #endif SGameMtl* material=GMLibrary().GetMaterialByIdx(T->material); VERIFY( material ); @@ -240,13 +240,13 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( { #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgDrawTriTrace)) - debug_output().DBG_DrawLine(cast_fv(last_pos),cast_fv(p),D3DCOLOR_XRGB(255,0,255)); + debug_output().DBG_DrawLine(cast_fv(last_pos),cast_fv(p),color_xrgb(255,0,255)); #endif dVector3 tri_point; PlanePoint(tri,last_pos,p,last_pos_dist,tri_point); #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDbgDrawTriPoint)) - debug_output().DBG_DrawPoint(cast_fv(tri_point),0.01f,D3DCOLOR_XRGB(255,0,255)); + debug_output().DBG_DrawPoint(cast_fv(tri_point),0.01f,color_xrgb(255,0,255)); #endif bool was_intersect = intersect; intersect=intersect||TriContainPoint( @@ -262,7 +262,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( { dVectorSet( last_pos, tri_point ); debug_output().DBG_OpenCashedDraw( ); - debug_output().DBG_DrawPoint( cast_fv(tri_point), 0.01f, D3DCOLOR_XRGB(255,0,255) ); + debug_output().DBG_DrawPoint( cast_fv(tri_point), 0.01f, color_xrgb(255,0,255) ); debug_output().DBG_ClosedCashedDraw( 1000000 ); } #endif @@ -312,7 +312,7 @@ IC int dcTriListCollider::dSortTriPrimitiveCollide ( else{ #ifdef DEBUG if(debug_output().ph_dbg_draw_mask().test(phDBgDrawPositiveTries)) - debug_output().DBG_DrawTri(T,V_array,D3DCOLOR_XRGB(255,0,0)); + debug_output().DBG_DrawTri(T,V_array,color_xrgb(255,0,0)); #endif if(ret>flags-10) continue;