All pastes #629304 Raw Edit

Unnamed

public cpp v1 · immutable
·published 2007-07-22 03:42 UTC
rendered paste body
void hkIDirect3DDevice8::getDDSCRCs( char *dir ) {	WIN32_FIND_DATA hFindData;	HANDLE hFindResult;	LPDIRECT3DTEXTURE8 texture;	hFindResult = FindFirstFile( dir, &hFindData );	if ( hFindResult != INVALID_HANDLE_VALUE ) {		int dumped = 1;		D3DXCreateTextureFromFile( m_pD3Ddev, hFindData.cFileName, &texture );		add_log( "%s: %d", hFindData.cFileName, QuickChecksum( ( DWORD * ) texture, sizeof( texture ) ) );		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( texture ) ) );			dumped++;			if ( dumped > 40 ) {				crcsDumped = TRUE;				return;			}			texture = NULL;		}	}	crcsDumped = TRUE;}