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,45 @@
|
||||
#pragma once
|
||||
|
||||
#include <windows.h>
|
||||
#include <dxerr.h>
|
||||
|
||||
#if defined(DX_VERBOSE)
|
||||
#pragma comment(lib, "DXErr.lib")
|
||||
#ifndef V
|
||||
#define V(x) { hr = (x); if( FAILED(hr) ) { DEBUG_STREAM << __FILE__ << "(" << __LINE__ << "): " << L#x << " FAILED! hr=" << DXGetErrorString(hr) << std::endl << std::flush; } }
|
||||
#endif
|
||||
#else
|
||||
#define V(x) hr = (x)
|
||||
#endif
|
||||
|
||||
#if defined(PIX_PROFILE)
|
||||
|
||||
// These first two macros are taken from the
|
||||
// VStudio help files - necessary to convert the
|
||||
// __FUNCTION__ symbol from char to wchar_t.
|
||||
#define WIDEN2(x) L ## x
|
||||
#define WIDEN(x) WIDEN2(x)
|
||||
|
||||
// Only the first of these macro's should be used. The _INTERNAL
|
||||
// one is so that the sp##id part generates "sp1234" type identifiers
|
||||
// instead of always "sp__LINE__"...
|
||||
#define PROFILE_BLOCK PROFILE_BLOCK_INTERNAL( __LINE__ )
|
||||
#define PROFILE_BLOCK_INTERNAL(id) D3DUtils::ScopeProfiler sp##id ( WIDEN(__FUNCTION__), __LINE__ );
|
||||
|
||||
// To avoid polluting the global namespace,
|
||||
// all D3D utility functions/classes are wrapped
|
||||
// up in the D3DUtils namespace.
|
||||
namespace D3DUtils
|
||||
{
|
||||
class ScopeProfiler
|
||||
{
|
||||
public:
|
||||
ScopeProfiler( WCHAR *Name, int Line );
|
||||
~ScopeProfiler( );
|
||||
|
||||
private:
|
||||
ScopeProfiler( );
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user