Skip to content

Commit 2ee6591

Browse files
author
nitrocaster
committed
Refactor xrDebug.
1 parent b488e57 commit 2ee6591

File tree

99 files changed

+1562
-5549
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+1562
-5549
lines changed

src/Layers/xrRender/AnimationKeyCalculate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ IC void MixInterlerp( CKey &Result, const CKey *R, const CBlend* const BA[MAX_BL
206206
else w = w1/ws;
207207
#ifdef DEBUG
208208
//. if (fis_zero(w0+w1) || (!_valid(w))){
209-
//. Debug.fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, w0: %f, w1: %f, ws:%f, BIS: %d",w0+w1,w,w0,w1,ws,BLEND_INST.Blend.size());
209+
//. xrDebug::Fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, w0: %f, w1: %f, ws:%f, BIS: %d",w0+w1,w,w0,w1,ws,BLEND_INST.Blend.size());
210210
//. }
211211
#endif
212212
KEY_Interp (Result,R[0],R[1], clampr(w,0.f,1.f));
@@ -245,7 +245,7 @@ IC void MixInterlerp( CKey &Result, const CKey *R, const CBlend* const BA[MAX_BL
245245

246246
#ifdef DEBUG
247247
//. if ((total==0) || (!_valid(S[cnt].w/total))){
248-
//. Debug.fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, total: %f, count: %d, real count: %d",total,S[cnt].w,total,count,BLEND_INST.Blend.size());
248+
//. xrDebug::Fatal (DEBUG_INFO,"TO ALEXMX VERY IMPORTANT: (TOTAL: %f) w: %f, total: %f, count: %d, real count: %d",total,S[cnt].w,total,count,BLEND_INST.Blend.size());
249249
//. }
250250
#endif
251251

src/Layers/xrRender/Blender_BmmD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void CBlender_BmmD::Compile (CBlender_Compile& C)
8787
}
8888
C.PassEnd ();
8989
} else {
90-
if (C.L_textures.size()<2) Debug.fatal (DEBUG_INFO,"Not enought textures for shader, base tex: %s",*C.L_textures[0]);
90+
if (C.L_textures.size()<2) xrDebug::Fatal (DEBUG_INFO,"Not enought textures for shader, base tex: %s",*C.L_textures[0]);
9191
switch (C.iElement)
9292
{
9393
case SE_R1_NORMAL_HQ:

src/Layers/xrRender/Blender_Lm(EbB).cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void CBlender_LmEbB::Compile(CBlender_Compile& C)
8585
}
8686
C.PassEnd ();
8787
} else {
88-
if (C.L_textures.size()<2) Debug.fatal (DEBUG_INFO,"Not enought textures for shader, base tex: %s",*C.L_textures[0]);
88+
if (C.L_textures.size()<2) xrDebug::Fatal (DEBUG_INFO,"Not enought textures for shader, base tex: %s",*C.L_textures[0]);
8989
switch (C.iElement)
9090
{
9191
case SE_R1_NORMAL_HQ:

src/Layers/xrRender/HW.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void CHW::Reset (HWND hwnd)
7575
while (TRUE) {
7676
HRESULT _hr = HW.pDevice->Reset (&DevPP);
7777
if (SUCCEEDED(_hr)) break;
78-
Msg ("! ERROR: [%dx%d]: %s",DevPP.BackBufferWidth,DevPP.BackBufferHeight,Debug.error2string(_hr));
78+
Msg ("! ERROR: [%dx%d]: %s",DevPP.BackBufferWidth,DevPP.BackBufferHeight,xrDebug::ErrorToString(_hr));
7979
Sleep (100);
8080
}
8181
R_CHK (pDevice->GetRenderTarget (0,&pBaseRT));

src/Layers/xrRender/ModelPool.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ dxRender_Visual* CModelPool::Instance_Load (const char* N, BOOL allow_register)
114114
Msg("!Can't find model file '%s'.",name);
115115
return 0;
116116
#else
117-
Debug.fatal(DEBUG_INFO,"Can't find model file '%s'.",name);
117+
xrDebug::Fatal(DEBUG_INFO,"Can't find model file '%s'.",name);
118118
#endif
119119
}
120120
} else {

src/Layers/xrRender/ParticleGroup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ void CParticleGroup::SItem::StartFreeChild(CParticleEffect* emitter, LPCSTR nm,
248248
#ifdef _EDITOR
249249
Msg ("!Can't use looped effect '%s' as 'On Birth' child for group.",nm);
250250
#else
251-
Debug.fatal (DEBUG_INFO,"Can't use looped effect '%s' as 'On Birth' child for group.",nm);
251+
xrDebug::Fatal (DEBUG_INFO,"Can't use looped effect '%s' as 'On Birth' child for group.",nm);
252252
#endif
253253
}
254254
}

src/Layers/xrRender/ResourceManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ IBlender* CResourceManager::_GetBlender (LPCSTR Name)
5757
return 0;
5858
}
5959
#endif
60-
if (I==m_blenders.end()) { Debug.fatal(DEBUG_INFO,"Shader '%s' not found in library.",Name); return 0; }
60+
if (I==m_blenders.end()) { xrDebug::Fatal(DEBUG_INFO,"Shader '%s' not found in library.",Name); return 0; }
6161
#endif
6262
else return I->second;
6363
}

src/Layers/xrRender/SkeletonAnimated.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ CBlend* CKinematicsAnimated::PlayCycle (LPCSTR N, BOOL bMixIn, PlayCallback Ca
369369
{
370370
MotionID motion_ID = ID_Cycle(N);
371371
if (motion_ID.valid()) return PlayCycle(motion_ID,bMixIn,Callback,CallbackParam,channel);
372-
else { Debug.fatal(DEBUG_INFO,"! MODEL: can't find cycle: %s", N); return 0; }
372+
else { xrDebug::Fatal(DEBUG_INFO,"! MODEL: can't find cycle: %s", N); return 0; }
373373
}
374374
CBlend* CKinematicsAnimated::PlayCycle (MotionID motion_ID, BOOL bMixIn, PlayCallback Callback, LPVOID CallbackParam,u8 channel /*= 0*/)
375375
{
@@ -702,7 +702,7 @@ void CKinematicsAnimated::Load(const char* N, IReader *data, u32 dwFlags)
702702
Msg ("!Can't find motion file '%s'.",nm);
703703
return;
704704
#else
705-
Debug.fatal (DEBUG_INFO,"Can't find motion file '%s'.",nm);
705+
xrDebug::Fatal (DEBUG_INFO,"Can't find motion file '%s'.",nm);
706706
#endif
707707
}
708708
}
@@ -741,7 +741,7 @@ void CKinematicsAnimated::Load(const char* N, IReader *data, u32 dwFlags)
741741
Msg ("!Can't find motion file '%s'.",nm);
742742
return;
743743
#else
744-
Debug.fatal (DEBUG_INFO,"Can't find motion file '%s'.",nm);
744+
xrDebug::Fatal (DEBUG_INFO,"Can't find motion file '%s'.",nm);
745745
#endif
746746
}
747747
}

src/Layers/xrRender/SkeletonX.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ void CSkeletonX::_Load (const char* N, IReader *data, u32& dwVertCount)
337337
}
338338
}break;
339339
default:
340-
Debug.fatal (DEBUG_INFO,"Invalid vertex type in skinned model '%s'",N);
340+
xrDebug::Fatal (DEBUG_INFO,"Invalid vertex type in skinned model '%s'",N);
341341
break;
342342
}
343343
#ifdef _EDITOR

src/Layers/xrRender/Texture.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ ID3DBaseTexture* CRender::texture_load(LPCSTR fRName, u32& ret_msize)
313313
R_ASSERT(FS.exist(fn,"$game_textures$", "ed\\ed_not_existing_texture",".dds"));
314314
goto _DDS;
315315

316-
// Debug.fatal(DEBUG_INFO,"Can't find texture '%s'",fname);
316+
// xrDebug::Fatal(DEBUG_INFO,"Can't find texture '%s'",fname);
317317

318318
#endif
319319

0 commit comments

Comments
 (0)