- void CTDrawImpl::Draw( int iX, int iY, int iModuleID, int iGraphicID, D3DCOLOR color )
- {
- CImageRes* pImageRes = (CImageResManager::GetSingleton()).GetImageRes( iModuleID );
- if( pImageRes == NULL )
- {
- assert( pImageRes && "Get ImageRes failed" );
- return;
- }
- stTexture* pTextureInfo = pImageRes->GetTexture( iGraphicID );
- stSprite* pSpriteInfo = pImageRes->GetSprite( iGraphicID );
- if( pTextureInfo == NULL )
- {
- assert( pTextureInfo && "Get TextureInfo failed" );
- return;
- }
- if( pSpriteInfo == NULL )
- {
- assert( pSpriteInfo && "Get SpriteInfo failed");
- return;
- }
- HNODE hTexture = pTextureInfo->m_Texture;
- if( hTexture == NULL )
- {
- assert( hTexture && "Get Texture failed");
- return;
- }
- // Transform
- D3DXMATRIX mat;
- D3DXMatrixTranslation( &mat, (float)iX, (float)iY, 0 );
- ::setTransformSprite( mat );
- ::drawSprite( hTexture,
- &(pSpriteInfo->m_Rect),
- NULL,
- &D3DXVECTOR3( 0, 0 , 0 ),
- color );
- }
When I hit level 2, I got a notification from the Fairy of Arua. Clicking on it made the program crash. Perhaps another missing resource?