All pastes #633767 Raw Edit

Unnamed

public cpp v1 · immutable
#633767 ·published 2007-07-25 22:31 UTC
rendered paste body
void hkIDirect3DDevice8::getDDSCRCs( char *dir ) {	WIN32_FIND_DATA hFindData;	HANDLE hFindResult;		hFindResult = FindFirstFile( dir, &hFindData );	if ( hFindResult != INVALID_HANDLE_VALUE ) {                LPDIRECT3DTEXTURE8* texture = new LPDIRECT3DTEXTURE8;		int dumped = 1;		D3DXCreateTextureFromFile( m_pD3Ddev, hFindData.cFileName, texture );		add_log( "%s: %d", hFindData.cFileName, QuickChecksum( ( DWORD * ) texture, sizeof( LPDIRECT3DTEXTURE8 ) ) );		while ( GetLastError() != ERROR_NO_MORE_FILES ) {			FindNextFile( hFindResult, &hFindData );			D3DXCreateTextureFromFile( m_pD3Ddev, hFindData.cFileName, texture );			add_log( "%s: %d", hFindData.cFileName, QuickChecksum( ( DWORD * ) texture, sizeof( LPDIRECT3DTEXTURE8 ) ) );			dumped++;			if ( dumped > 40 ) {				crcsDumped = TRUE;				return;			}					}                delete texture;	}	crcsDumped = TRUE;}