Initial import of Red Planet v4.10 Win32 source
Imports the current Win32 source for the pod-racing game 'Red Planet', built on the MUNGA engine and its L4 (Win32/DirectX) platform layer: - MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend - RP / RP_L4: Red Planet game logic and Win32 application - DivLoader, Setup1: asset loader and installer project - lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies Removed stale Subversion metadata and added .gitignore/.gitattributes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#include "DXUtils.h"
|
||||
|
||||
#if defined(PIX_PROFILE)
|
||||
|
||||
#include <time.h>
|
||||
#include <d3dx9.h>
|
||||
#include <windows.h>
|
||||
#include <math.h>
|
||||
#include <strsafe.h>
|
||||
|
||||
namespace D3DUtils
|
||||
{
|
||||
// Class constructor. Takes the necessary information and
|
||||
// composes a string that will appear in PIXfW.
|
||||
ScopeProfiler::ScopeProfiler( WCHAR* Name, int Line )
|
||||
{
|
||||
WCHAR wc[ MAX_PATH ];
|
||||
StringCchPrintf( wc, MAX_PATH, L"%s @ Line %d.\0", Name, Line );
|
||||
|
||||
D3DPERF_BeginEvent( D3DCOLOR_XRGB( rand() % 255, rand() % 255, rand() % 255 ), wc );
|
||||
srand( static_cast< unsigned >( time( NULL ) ) );
|
||||
}
|
||||
|
||||
// Makes sure that the BeginEvent() has a matching EndEvent()
|
||||
// if used via the macro in D3DUtils.h this will be called when
|
||||
// the variable goes out of scope.
|
||||
ScopeProfiler::~ScopeProfiler( )
|
||||
{
|
||||
D3DPERF_EndEvent( );
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user