Results 1 to 1 of 1

Thread: Overlay players

  1. #1
    Coders (+)_'s Avatar
    Join Date
    Jan 2010
    Location
    Earth
    Posts
    455

    Smile Overlay players

    Overlay players xD

    Cannot be seen in game screenshot.
    Run in window mode.

    Credits:
    UCForum

    main.h
    Code:
    #include <windows.h>
    #include <stdio.h>
    #include <tchar.h>
    #include <uxtheme.h>
    #include <dwmapi.h>
    #include <d3d9.h>
    #include <d3dx9.h>
    
    #pragma comment(lib, "dwmapi.lib")
    #pragma comment(lib, "d3d9.lib")
    #pragma comment(lib, "d3dx9.lib")
    
    #pragma warning(disable : 4996)
    
    #define D3D_RELEASE(D3D_PTR) if( D3D_PTR )\
    	{ D3D_PTR->Release( ); D3D_PTR	= NULL; }
    
    VOID WINAPI HkD3D( PDWORD vTable );
    BOOL WINAPI GenTex( LPDIRECT3DDEVICE9 pDev, 
    		LPDIRECT3DTEXTURE9 * ppD3Dtex, DWORD Color );
    
    void SetWindowSize( );
    
    extern HWND GameWindow;
    extern HWND Transparent;
    extern D3DVIEWPORT9 D3DVP;
    d3d.cpp
    Code:
    #include "Main.h"
    #include "Models.h"
    
    HRESULT (WINAPI* pReset)(LPDIRECT3DDEVICE9, D3DPRESENT_PARAMETERS*);
    HRESULT (WINAPI* pBegineScene)(LPDIRECT3DDEVICE9);
    HRESULT (WINAPI* pDrawPrim)(LPDIRECT3DDEVICE9, D3DPRIMITIVETYPE, INT, UINT, UINT, UINT, UINT);
    HRESULT (WINAPI* pEndScene)(LPDIRECT3DDEVICE9);
    HRESULT (WINAPI* pPresent)( LPDIRECT3DDEVICE9 Device, 
    	CONST RECT* pSourceRect, CONST RECT* pDestRect,
    		HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion );
    
    D3DVIEWPORT9 D3DVP						= {NULL};
    LPD3DXFONT PFONT							= NULL;
    LPDIRECT3DSWAPCHAIN9 Second			= NULL;
    LPDIRECT3DTEXTURE9 Blue					= NULL;		
    LPDIRECT3DTEXTURE9 Red					= NULL;		
    LPDIRECT3DTEXTURE9 Yellow				= NULL;		
    LPDIRECT3DTEXTURE9 Green				= NULL;		
    
    HRESULT WINAPI DrawPrim( LPDIRECT3DDEVICE9 pDevice, D3DPRIMITIVETYPE Type, INT Base, 
                                               UINT Min, UINT NumVertices, UINT Start, UINT PrimitiveCount )
    {	
    	LPDIRECT3DVERTEXBUFFER9 Stream		= NULL;
    	UINT Offset			= 0;
    	UINT Stride			= 0;
    	BOOL TeamTE			= FALSE;
    	BOOL TeamCTE		= FALSE;
    	BOOL TeamC4			= FALSE;
    
    	if( pDevice->GetStreamSource( 0, &Stream, &Offset, &Stride ) == D3D_OK )
    		Stream->Release( );
    
    	if( TE_DX8 || TE )					TeamTE			= TRUE;
    	else if( CTE_DX8 || CTE )			TeamCTE		= TRUE;
    	else if( C4 )							TeamC4			= TRUE;
    
    	if( Second )
    	if( TeamTE || TeamCTE )
    	{
    		LPDIRECT3DSURFACE9 Surf						= NULL;
    		LPDIRECT3DBASETEXTURE9 Texture			= NULL;
    		LPDIRECT3DSURFACE9 Depth					= NULL;
    
    		if( pDevice->GetTexture( 0, &Texture ) == S_OK )
    		{
    			if( pDevice->GetRenderTarget( 0, &Surf ) == S_OK )
    			{
    				if( pDevice->GetDepthStencilSurface( &Depth ) == S_OK )
    				{
    					LPDIRECT3DSURFACE9 pBackBuffer		= NULL;
    
    					if( Second->GetBackBuffer( 0, 
    						D3DBACKBUFFER_TYPE_MONO, &pBackBuffer ) == S_OK )
    					{
    						pDevice->SetRenderTarget( 0, pBackBuffer );
    						pDevice->SetDepthStencilSurface( Depth );
    
    						pDevice->SetRenderState( D3DRS_ZENABLE, FALSE );
    
    						if( Blue && TeamCTE )
    							pDevice->SetTexture( 0, Red );
    
    						if( Red && TeamTE )
    							pDevice->SetTexture( 0, Blue );
    
    						pDrawPrim( pDevice, Type, Base, Min, NumVertices, 
    							Start, PrimitiveCount );
    
    						pDevice->SetRenderState( D3DRS_ZENABLE, TRUE );
    
    						if( Yellow && TeamCTE )
    							pDevice->SetTexture( 0, Yellow );
    
    						if( Green && TeamTE )
    							pDevice->SetTexture( 0, Green );
    
    						pDrawPrim( pDevice, Type, Base, Min, NumVertices, 
    							Start, PrimitiveCount );
    
    						D3D_RELEASE( pBackBuffer )
    					}
    
    					pDevice->SetTexture( 0, Texture );
    					pDevice->SetRenderTarget( 0, Surf );
    					pDevice->SetDepthStencilSurface( Depth );
    
    					D3D_RELEASE( Depth )
    
    				}
    
    				D3D_RELEASE( Surf )
    			}
    
    			D3D_RELEASE( Texture )
    		}
    	}
    
    	return pDrawPrim( pDevice, Type, Base, Min, 
    		NumVertices, Start, PrimitiveCount );
    }
    
    HRESULT WINAPI Reset( LPDIRECT3DDEVICE9 pDevice, 
    					 D3DPRESENT_PARAMETERS* PPR )
    {
    	D3D_RELEASE( PFONT )
    	D3D_RELEASE( Blue )		
    	D3D_RELEASE( Red )	
    	D3D_RELEASE( Yellow )		
    	D3D_RELEASE( Green )	
    	return pReset( pDevice, PPR );
    }
    
    HRESULT WINAPI BegineScene( LPDIRECT3DDEVICE9 pDev )
    {
    	if( !Blue )		GenTex( pDev, &Blue, D3DCOLOR_ARGB( 255, 20, 20, 255 ) );
    	if( !Red )		GenTex( pDev, &Red, D3DCOLOR_ARGB( 255, 255, 20, 20 ) );
    	if( !Yellow )	GenTex( pDev, &Yellow, D3DCOLOR_ARGB( 255, 255, 255, 20 ) );
    	if( !Green )		GenTex( pDev, &Green, D3DCOLOR_ARGB( 255, 20, 255, 20 ) );
    
    	if( !Second && Transparent )
    	{
    		D3DPRESENT_PARAMETERS pP		= {0};
    		LPDIRECT3DSWAPCHAIN9 Swap	= NULL;
    
    		if( pDev->GetSwapChain( 0, &Swap ) == S_OK )
    		{
    			if( Swap->GetPresentParameters( &pP ) == S_OK )
    				pDev->CreateAdditionalSwapChain( &pP, &Second );
    
    			D3D_RELEASE( Swap )	
    		}
    	}
    
    	return pBegineScene( pDev );
    }
    
    void WINAPI Draw( LPDIRECT3DDEVICE9 pDev )
    {
    	if( !PFONT )
    		return;
    
    	RECT FRECT			= { D3DVP.Width-400, D3DVP.Height-50,
    										D3DVP.Width-200, D3DVP.Height };
    
    	PFONT->DrawTextA( 0, "Overlay Players", -1, 
    			&FRECT, DT_NOCLIP | DT_CENTER | 
    			DT_VCENTER, 0xFFFF0000 );
    }
    
    void WINAPI DrawCross( LPDIRECT3DDEVICE9 Device )
    {
    	LONG ScreenWidthHalf			= D3DVP.Width/2;
    	LONG ScreenHeightHalf		= D3DVP.Height/2;
    
    	D3DRECT CrossA					={ ScreenWidthHalf, ScreenHeightHalf -  5,
    												ScreenWidthHalf + 1, ScreenHeightHalf + 6};
    
    	Device->Clear( 1, &CrossA, D3DCLEAR_TARGET, 
    		D3DCOLOR_ARGB( 255, 255, 20, 20 ), 0,  0 );
    
    	D3DRECT CrossB					={ ScreenWidthHalf -  5, ScreenHeightHalf,
    												ScreenWidthHalf + 6, ScreenHeightHalf + 1};
    
    	Device->Clear( 1, &CrossB, D3DCLEAR_TARGET, 
    		D3DCOLOR_ARGB( 255, 255, 20, 20 ), 0,  0 ); 
    }
    
    void WINAPI GetTarget( LPDIRECT3DDEVICE9 Device )
    {
    	if( !Second )
    		return;
    
    	LPDIRECT3DSURFACE9 Surf						= NULL;
    	LPDIRECT3DSURFACE9 pBackBuffer			= NULL;
    
    	if( Device->GetRenderTarget( 0, &Surf ) == S_OK )
    	{
    		if( Second->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, 
    			&pBackBuffer ) == S_OK )
    		{
    			Device->SetRenderTarget( 0, pBackBuffer );
    			Draw( Device );
    			DrawCross( Device );
    			Device->SetRenderTarget( 0, Surf );
    			D3D_RELEASE( pBackBuffer )
    		}
    		D3D_RELEASE( Surf )
    	}
    }
    
    HRESULT WINAPI EndScene( LPDIRECT3DDEVICE9 pDev )
    {
    	pDev->GetViewport( &D3DVP );
    
    	if( !PFONT )
    		D3DXCreateFontA( pDev, 14, 0, FW_BOLD, 0, FALSE, DEFAULT_CHARSET, 
    			OUT_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, 
    				"Cambria", &PFONT );
    
    	GetTarget( pDev );
    
    	if( Transparent )	SetWindowSize( );
    
    	return pEndScene( pDev );
    }
    
    HRESULT WINAPI Present( LPDIRECT3DDEVICE9 Device, 
    	CONST RECT* pSourceRect, CONST RECT* pDestRect,
    		HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion )
    {	
    	if( Second )
    	{
    		LPDIRECT3DSURFACE9 Surf						= NULL;
    
    		Second->Present( NULL, NULL, Transparent, NULL, 0 );
    
    		if( Device->GetRenderTarget( 0, &Surf ) == S_OK )
    		{
    			LPDIRECT3DSURFACE9 pBackBuffer		= NULL;
    
    			if( Second->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, 
    				&pBackBuffer ) == S_OK )
    			{
    				Device->SetRenderTarget( 0, pBackBuffer );
    
    				Device->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER,
    						D3DCOLOR_COLORVALUE( 0.0f, 0.0f, 0.0f, 0.0f ), 1.0f, 0L );
    
    				Device->SetRenderTarget( 0, Surf );
    				D3D_RELEASE( pBackBuffer )
    			}
    			D3D_RELEASE( Surf )
    		}
    	}
    
    	return pPresent( Device, pSourceRect, pDestRect, 
    		hDestWindowOverride, pDirtyRegion );
    }
    
    VOID WINAPI HkD3D( PDWORD vTable )
    {
    	DWORD OLD;
    	VirtualProtect( &vTable[0], 118 * 4, 0x40, &OLD );
    
    	*(PDWORD)&pReset				= (DWORD)vTable[16];
    	*(PDWORD)&pPresent				= (DWORD)vTable[17];
    	*(PDWORD)&pBegineScene		= (DWORD)vTable[41];
    	*(PDWORD)&pEndScene			= (DWORD)vTable[42];
    	*(PDWORD)&pDrawPrim			= (DWORD)vTable[82];
    
    	while( 1 )
    	{
    		vTable[82]						= (DWORD)DrawPrim;
    		vTable[16]						= (DWORD)Reset;
    		vTable[17]						= (DWORD)Present;
    		vTable[41]						= (DWORD)BegineScene;
    		vTable[42]						= (DWORD)EndScene;
    		Sleep( 100 );
    	}
    }
    
    BOOL WINAPI GenTex( LPDIRECT3DDEVICE9 pDev, 
    		LPDIRECT3DTEXTURE9 * ppD3Dtex, DWORD Color )
    {
    	D3DLOCKED_RECT d3dlr				= {NULL};
    	IDirect3DTexture9 *	Temp		= NULL;
    
    	if( FAILED( pDev->CreateTexture( 100, 100, 1, 0, D3DFMT_A8R8G8B8, 
    		D3DPOOL_DEFAULT, ppD3Dtex, NULL ) ) ) 
    		return FALSE;
    
    	if( FAILED( pDev->CreateTexture( 100, 100, 1, 0, D3DFMT_A8R8G8B8, 
    		D3DPOOL_SYSTEMMEM, &Temp, NULL ) ) ) 
    	{
    		D3D_RELEASE( (*ppD3Dtex) )
    		return FALSE;
    	}
    
    	if( Temp->LockRect( 0, &d3dlr, 0, 0 ) == S_OK )
    	{
    		for( int i = 0;i < 100*100;i++ )
    			((PDWORD)d3dlr.pBits)[i]		= Color;
    
    		Temp->UnlockRect( 0 );
    
    		pDev->UpdateTexture( Temp, *ppD3Dtex );
    	}
    	else
    	{
    		D3D_RELEASE( Temp )
    		D3D_RELEASE( (*ppD3Dtex) )
    		return FALSE;
    	}
    
    	D3D_RELEASE( Temp )
    
    	return TRUE;
    }
    main.cpp
    Code:
    #include "Main.h"
    
    static TCHAR szWindowClass[]			= _T("Overlay");
    static TCHAR szTitle[]						= _T("Overlay Players");
    WNDCLASSEX WC							= {NULL};
    MSG msg										= {NULL};
    RECT GameRect								= {NULL};
    RECT WRect									= {NULL};
    WINDOWINFO GameWinfo				= {NULL};
    LONG BorderSizeLeft						= NULL;
    LONG BorderSizeTop						= NULL;
    MARGINS Margins							= {-1};
    HINSTANCE Game							= NULL;
    HWND GameWindow						= NULL;
    HWND Transparent							= NULL;
    
    LRESULT CALLBACK WndProc( HWND hWnd, UINT message, 
    						 WPARAM wParam, LPARAM lParam )
    {
        PAINTSTRUCT ps;
        HDC hdc;
    
        switch (message)
    	{
        case WM_PAINT:
    		{
    			hdc		= BeginPaint(hWnd, &ps);
    			EndPaint( hWnd, &ps );
    			break;
    		}
        case WM_DESTROY:
            PostQuitMessage(0);
            break;
        default:
            return DefWindowProc( hWnd, message, wParam, lParam );
            break;
        }
    
        return 0;
    }
    
    bool WINAPI bDataCompare( const BYTE* pData, const BYTE* bMask, const char* szMask )
    {
    	for( ; *szMask; ++szMask, ++pData, ++bMask )
    	{
    		if( *szMask == 'x' && *pData != *bMask )
    		{
    			return false;
    		}
    	}
    	return (*szMask) == NULL;
    }
    
    DWORD WINAPI dwFindPattern( DWORD dwAddress, DWORD dwSize, BYTE* pbMask, char* szMask )
    {
    	for( DWORD i = NULL; i < dwSize; i++ )
    	{
    		if( bDataCompare( (BYTE*)( dwAddress + i ), pbMask, szMask ) )
    		{
    			return (DWORD)( dwAddress + i );
    		}
    	}
    	return 0;
    }
    
    void SetWindowSize( )
    {
    	GetWindowRect( GameWindow, &GameRect );
    	GetWindowRect( Transparent, &WRect );
    
    	LONG GameWidth			= D3DVP.Width;
    	LONG GameHeight			= D3DVP.Height;
    	LONG GameX					= GameRect.left;
    	LONG GameY					= GameRect.top;
    
    	LONG Width					= WRect.right - WRect.left;
    	LONG Height					= WRect.bottom - WRect.top;
    	LONG X							= WRect.left - BorderSizeLeft;
    	LONG Y							= WRect.top - BorderSizeTop;
    
    	if( GameWidth != Width || GameHeight != Height ||
    		GameX != X || GameY != Y )
    	{		
    		SetWindowPos( Transparent, HWND_TOPMOST, GameX + BorderSizeLeft, 
    			GameY + BorderSizeTop, D3DVP.Width, D3DVP.Height, SWP_FRAMECHANGED );
    	}
    }
    
    void WINAPI CreateTransparentWindow( )
    {
    	do{
    		GameWindow		= FindWindowA( 0, "Counter-Strike Source" );
    		Sleep( 100 );
    	} while( !GameWindow );
    
    	do{
    		Game		= GetModuleHandleA( "hl2.exe" );
    		Sleep( 100 );
    	} while( !Game );
    
    	WC.cbSize					= sizeof(WNDCLASSEX);
    	WC.style					= CS_HREDRAW | CS_VREDRAW;
    	WC.lpfnWndProc			= WndProc;
    	WC.hInstance				= Game;
    	WC.hCursor				= LoadCursor( NULL, IDC_ARROW );
    	WC.hbrBackground		= 0;
    	WC.lpszClassName		= szWindowClass;
    
    	RegisterClassEx( &WC );
    
    	Transparent		= CreateWindowExA( 0L, szWindowClass, szTitle,
    							WS_CAPTION | WS_SYSMENU, 
    							CW_USEDEFAULT, CW_USEDEFAULT,
    							500, 500, 0, NULL, Game, NULL );
    
    	ShowWindow( Transparent, SW_SHOW );
    	UpdateWindow( Transparent );
    	SetWindowSize( );
    	GetWindowInfo( GameWindow, &GameWinfo );
    
    	BorderSizeLeft		= GameWinfo.rcClient.left - GameWinfo.rcWindow.left;
    	BorderSizeTop		= GameWinfo.rcClient.top - GameWinfo.rcWindow.top;
    
    	LONG lStyle			= GetWindowLong( Transparent, GWL_STYLE );
    	lStyle						&= ~(WS_CAPTION | WS_THICKFRAME | WS_MINIMIZE | WS_MAXIMIZE | WS_SYSMENU);
    	
    	SetWindowLongA( Transparent, GWL_STYLE, lStyle );
    	SetWindowLong( Transparent, GWL_EXSTYLE, GetWindowLong( Transparent, GWL_EXSTYLE) | 
    		WS_EX_LAYERED | WS_EX_TRANSPARENT );
    	SetLayeredWindowAttributes( Transparent, RGB( 255, 255, 255 ), 0, LWA_COLORKEY );
    	DwmExtendFrameIntoClientArea( Transparent, &Margins );
    
    	while(GetMessage(&msg, NULL, 0, 0))
    	{
    		TranslateMessage(&msg);
    		DispatchMessage(&msg);
    	}
    }
    
    VOID WINAPI GetD3D( VOID )
    {
    	DWORD D3D9		= (DWORD)
    		LoadLibraryA( "d3d9.dll" );
    
    	Sleep( 1000 );
    
    	DWORD D3DPattern		= dwFindPattern( D3D9, 0x128000, 
    		(PBYTE)"\xC7\x06\x00\x00\x00\x00\x89\x86\x00\x00\x00\x00\x89\x86", 
    			"xx????xx????xx" );
    
    	while( !*(PDWORD)(D3DPattern+2) )
    		Sleep( 500 );
    
    	HkD3D( (PDWORD)*(PDWORD)(D3DPattern+2) );
    }
    
    BOOL WINAPI DllMain( HINSTANCE hModule, DWORD dwReason, LPVOID lpvReserved )
    {
    	if( dwReason == DLL_PROCESS_ATTACH )
    	{
    		DisableThreadLibraryCalls( hModule );
    		CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)GetD3D, 0, 0, 0);
    		CreateThread( 0, 0, (LPTHREAD_START_ROUTINE)CreateTransparentWindow, 0, 0, 0);
    	}
    
    	return TRUE;
    }
    models.h
    Code:
    #define TE_DX8 ( Stride == 64 && ( PHOENIX_DX8 || ARCTIC_DX8 || ELITE_DX8 || GUERILLA_DX8 ) )
    #define CTE_DX8 ( Stride == 64 && ( GSG9_DX8 || GIGN_DX8 || GIGN_DX8_MASK || SAS_DX8 || SEAL_DX8 ) )
    #define TE ( Stride == 32 && ( PHOENIX || ELITE || ARCTIC || GUERILLA ) )
    #define CTE ( Stride == 32 && ( GIGN || GIGN_MASK || SAS || GSG9 || SEAL ) )
    #define C4 ( ( Stride == 32 || Stride == 64 ) && NumVertices == 758 && PrimitiveCount == 462 )
    
    #define GIGN_MASK (( NumVertices == 41 && PrimitiveCount == 50 ) || \
    ( NumVertices == 20 && PrimitiveCount == 18 ) || \
    ( NumVertices == 16 && PrimitiveCount == 14 ) || \
    ( NumVertices == 11 && PrimitiveCount == 9 ) || \
    ( NumVertices == 10 && PrimitiveCount == 8 ))
    
    #define GIGN ((NumVertices == 324 && PrimitiveCount == 372) || \
    (NumVertices == 466 && PrimitiveCount == 550) || \
    (NumVertices == 811 && PrimitiveCount == 989) || \
    (NumVertices == 1404 && PrimitiveCount == 1919) || \
    (NumVertices == 3304 && PrimitiveCount == 5003) || \
    (NumVertices == 2196 && PrimitiveCount == 3061))
    
    #define GIGN_DX8_MASK (( NumVertices == 20 && PrimitiveCount == 18 ) || \
    ( NumVertices == 16 && PrimitiveCount == 14 ) || \
    ( NumVertices == 11 && PrimitiveCount == 9 ) || \
    ( NumVertices == 10 && PrimitiveCount == 8 ) || \
    ( NumVertices == 41 && PrimitiveCount == 50 ))
    
    #define GIGN_DX8 (( NumVertices == 3473 && PrimitiveCount == 3147 ) || \
    ( NumVertices == 3473 && PrimitiveCount == 923 ) || \
    ( NumVertices == 3473 && PrimitiveCount == 408 ) || \
    ( NumVertices == 3473 && PrimitiveCount == 475 ) || \
    ( NumVertices == 3473 && PrimitiveCount == 50 ) || \
    ( NumVertices == 2331 && PrimitiveCount == 1676 ) || \
    ( NumVertices == 2331 && PrimitiveCount == 940 ) || \
    ( NumVertices == 2331 && PrimitiveCount == 439 ) || \
    ( NumVertices == 2331 && PrimitiveCount == 6 ) || \
    ( NumVertices == 1493 && PrimitiveCount == 1265 ) || \
    ( NumVertices == 1493 && PrimitiveCount == 485 ) || \
    ( NumVertices == 1493 && PrimitiveCount == 169 ) || \
    ( NumVertices == 811 && PrimitiveCount == 989 ) || \
    ( NumVertices == 466 && PrimitiveCount == 550 ) || \
    ( NumVertices == 324 && PrimitiveCount == 372 ))
    
    #define SAS ((NumVertices == 2245 && PrimitiveCount == 2998) || \
    (NumVertices == 3417 && PrimitiveCount == 5030) || \
    (NumVertices == 1498 && PrimitiveCount == 1822) || \
    (NumVertices == 929 && PrimitiveCount == 1007) || \
    (NumVertices == 499 && PrimitiveCount == 533) || \
    (NumVertices == 409 && PrimitiveCount == 433))
    
    #define SAS_DX8 (( NumVertices == 2337 && PrimitiveCount == 1774 ) || \
    ( NumVertices == 2337 && PrimitiveCount == 846 ) || \
    ( NumVertices == 2337 && PrimitiveCount == 378 ) || \
    ( NumVertices == 3573 && PrimitiveCount == 703 ) || \
    ( NumVertices == 3573 && PrimitiveCount == 891 ) || \
    ( NumVertices == 3573 && PrimitiveCount == 2754 ) || \
    ( NumVertices == 3573 && PrimitiveCount == 682 ) || \
    ( NumVertices == 1562 && PrimitiveCount == 1411 ) || \
    ( NumVertices == 1562 && PrimitiveCount == 359 ) || \
    ( NumVertices == 1562 && PrimitiveCount == 52 ) || \
    ( NumVertices == 929 && PrimitiveCount == 1007 ) || \
    ( NumVertices == 499 && PrimitiveCount == 533 ) || \
    ( NumVertices == 409 && PrimitiveCount == 433 ))
    
    #define GSG9 ((NumVertices == 1424 && PrimitiveCount == 1858) || \
    (NumVertices == 2130 && PrimitiveCount == 3004) || \
    (NumVertices == 814 && PrimitiveCount == 945) || \
    (NumVertices == 3206 && PrimitiveCount == 4872) || \
    (NumVertices == 475 && PrimitiveCount == 510) || \
    (NumVertices == 343 && PrimitiveCount == 344))
    
    #define GSG9_DX8 (( NumVertices == 3380 && PrimitiveCount == 3300 ) || \
    ( NumVertices == 3380 && PrimitiveCount == 766 ) || \
    ( NumVertices == 3380 && PrimitiveCount == 357 ) || \
    ( NumVertices == 3380 && PrimitiveCount == 432 ) || \
    ( NumVertices == 3380 && PrimitiveCount == 17 ) || \
    ( NumVertices == 2260 && PrimitiveCount == 1376 ) || \
    ( NumVertices == 2260 && PrimitiveCount == 1263 ) || \
    ( NumVertices == 2260 && PrimitiveCount == 360 ) || \
    ( NumVertices == 2260 && PrimitiveCount == 5 ) || \
    ( NumVertices == 1487 && PrimitiveCount == 1083 ) || \
    ( NumVertices == 1487 && PrimitiveCount == 658 ) || \
    ( NumVertices == 1487 && PrimitiveCount == 117 ) || \
    ( NumVertices == 814 && PrimitiveCount == 945 ) || \
    ( NumVertices == 475 && PrimitiveCount == 510 ) || \
    ( NumVertices == 2260 && PrimitiveCount == 5 ) || \
    ( NumVertices == 343 && PrimitiveCount == 344 ))
    
    #define SEAL ((NumVertices == 2487 && PrimitiveCount == 3006) || \
    (NumVertices == 1609 && PrimitiveCount == 1794) || \
    (NumVertices == 3887 && PrimitiveCount == 4974) || \
    (NumVertices == 899 && PrimitiveCount == 910) || \
    (NumVertices == 513 && PrimitiveCount == 451) || \
    (NumVertices == 369 && PrimitiveCount == 297))
    
    #define SEAL_DX8 (( NumVertices == 3973 && PrimitiveCount == 3443 ) || \
    ( NumVertices == 3973 && PrimitiveCount == 701 ) || \
    ( NumVertices == 3973 && PrimitiveCount == 607 ) || \
    ( NumVertices == 3973 && PrimitiveCount == 223 ) || \
    ( NumVertices == 2587 && PrimitiveCount == 2075 ) || \
    ( NumVertices == 2587 && PrimitiveCount == 622 ) || \
    ( NumVertices == 2587 && PrimitiveCount == 309 ) || \
    ( NumVertices == 513 && PrimitiveCount == 451 ) || \
    ( NumVertices == 369 && PrimitiveCount == 297 ) || \
    ( NumVertices == 1677 && PrimitiveCount == 1264 ) || \
    ( NumVertices == 1677 && PrimitiveCount == 487 ) || \
    ( NumVertices == 1677 && PrimitiveCount == 43 ) || \
    ( NumVertices == 899 && PrimitiveCount == 910 ))
    
    #define PHOENIX ((NumVertices == 2274 && PrimitiveCount == 3070) || \
    (NumVertices == 3265 && PrimitiveCount == 5015) || \
    (NumVertices == 1510 && PrimitiveCount == 1871) || \
    (NumVertices == 873 && PrimitiveCount == 986) || \
    (NumVertices == 563 && PrimitiveCount == 590) || \
    (NumVertices == 368 && PrimitiveCount == 377))
    
    #define PHOENIX_DX8 (( NumVertices == 3349 && PrimitiveCount == 3596 ) || \
    ( NumVertices == 3349 && PrimitiveCount == 725 ) || \
    ( NumVertices == 3349 && PrimitiveCount == 625 ) || \
    ( NumVertices == 3349 && PrimitiveCount == 69 ) || \
    ( NumVertices == 873 && PrimitiveCount == 986 ) || \
    ( NumVertices == 1584 && PrimitiveCount == 1211 ) || \
    ( NumVertices == 1584 && PrimitiveCount == 420 ) || \
    ( NumVertices == 1584 && PrimitiveCount == 240 ) || \
    ( NumVertices == 2375 && PrimitiveCount == 2114 ) || \
    ( NumVertices == 2375 && PrimitiveCount == 578 ) || \
    ( NumVertices == 2375 && PrimitiveCount == 378 ) || \
    ( NumVertices == 368 && PrimitiveCount == 377 ) || \
    ( NumVertices == 563 && PrimitiveCount == 590 ))
    
    #define ELITE ((NumVertices == 1992 && PrimitiveCount == 2996) || \
    (NumVertices == 3087 && PrimitiveCount == 4911) || \
    (NumVertices == 735 && PrimitiveCount == 899) || \
    (NumVertices == 1311 && PrimitiveCount == 1812) || \
    (NumVertices == 454 && PrimitiveCount == 519) || \
    (NumVertices == 323 && PrimitiveCount == 338))
    
    #define ELITE_DX8 (( NumVertices == 3248 && PrimitiveCount == 1758 ) || \
    ( NumVertices == 3248 && PrimitiveCount == 2340 ) || \
    ( NumVertices == 3248 && PrimitiveCount == 611 ) || \
    ( NumVertices == 3248 && PrimitiveCount == 154 ) || \
    ( NumVertices == 3248 && PrimitiveCount == 48 ) || \
    ( NumVertices == 2119 && PrimitiveCount == 1607 ) || \
    ( NumVertices == 2119 && PrimitiveCount == 779 ) || \
    ( NumVertices == 2119 && PrimitiveCount == 599 ) || \
    ( NumVertices == 2119 && PrimitiveCount == 11 ) || \
    ( NumVertices == 1375 && PrimitiveCount == 1189 ) || \
    ( NumVertices == 1375 && PrimitiveCount == 460 ) || \
    ( NumVertices == 1375 && PrimitiveCount == 163 ) || \
    ( NumVertices == 735 && PrimitiveCount == 899 ) || \
    ( NumVertices == 454 && PrimitiveCount == 519 ) || \
    ( NumVertices == 323 && PrimitiveCount == 338 ))
    
    #define ARCTIC ((NumVertices == 1488 && PrimitiveCount == 1819) || \
    (NumVertices == 2292 && PrimitiveCount == 3015) || \
    (NumVertices == 3210 && PrimitiveCount == 4503) || \
    (NumVertices == 408 && PrimitiveCount == 344) || \
    (NumVertices == 835 && PrimitiveCount == 899) || \
    (NumVertices == 554 && PrimitiveCount == 509))
    
    #define ARCTIC_DX8 (( NumVertices == 3319 && PrimitiveCount == 2871 ) || \
    ( NumVertices == 3319 && PrimitiveCount == 773 ) || \
    ( NumVertices == 3319 && PrimitiveCount == 663 ) || \
    ( NumVertices == 3319 && PrimitiveCount == 196 ) || \
    ( NumVertices == 2412 && PrimitiveCount == 1614 ) || \
    ( NumVertices == 2412 && PrimitiveCount == 891 ) || \
    ( NumVertices == 2412 && PrimitiveCount == 490 ) || \
    ( NumVertices == 2412 && PrimitiveCount == 20 ) || \
    ( NumVertices == 1564 && PrimitiveCount == 1194 ) || \
    ( NumVertices == 1564 && PrimitiveCount == 381 ) || \
    ( NumVertices == 1564 && PrimitiveCount == 244 ) || \
    ( NumVertices == 835 && PrimitiveCount == 899 ) || \
    ( NumVertices == 554 && PrimitiveCount == 509 ) || \
    ( NumVertices == 408 && PrimitiveCount == 344 ))
    
    #define GUERILLA ((NumVertices == 1588 && PrimitiveCount == 2013) || \
    (NumVertices == 2261 && PrimitiveCount == 3003) || \
    (NumVertices == 3561 && PrimitiveCount == 5066) || \
    (NumVertices == 911 && PrimitiveCount == 996) || \
    (NumVertices == 526 && PrimitiveCount == 594) || \
    (NumVertices == 389 && PrimitiveCount == 386))
    
    #define GUERILLA_DX8 (( NumVertices == 3676 && PrimitiveCount == 3184 ) || \
    ( NumVertices == 2373 && PrimitiveCount == 1794 ) || \
    ( NumVertices == 1699 && PrimitiveCount == 1312 ) || \
    ( NumVertices == 911 && PrimitiveCount == 996 ) || \
    ( NumVertices == 526 && PrimitiveCount == 594 ) || \
    ( NumVertices == 389 && PrimitiveCount == 386 ))
    Last edited by (+)_; February 1st, 2015 at 15:24.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •