| 107 | } |
| 108 | |
| 109 | void Tr2AtlasTexture::CalcSubTextureWindow( Vector4& tw, float rectX, float rectY, float rectWidth, float rectHeight ) |
| 110 | { |
| 111 | Tr2TextureAL* tex = GetTexture(); |
| 112 | |
| 113 | if( !tex ) |
| 114 | { |
| 115 | tw.x = 0.0f; |
| 116 | tw.y = 0.0f; |
| 117 | tw.w = 1.0f; |
| 118 | tw.z = 1.0f; |
| 119 | |
| 120 | return; |
| 121 | } |
| 122 | |
| 123 | if( rectWidth == 0.0f ) |
| 124 | { |
| 125 | rectWidth = (float)m_width; |
| 126 | } |
| 127 | |
| 128 | if( rectHeight == 0 ) |
| 129 | { |
| 130 | rectHeight = (float)m_height; |
| 131 | } |
| 132 | |
| 133 | tw.x = (float)( m_x + rectX ) * m_textureWidthReciprocal; |
| 134 | tw.y = (float)( m_y + rectY ) * m_textureHeightReciprocal; |
| 135 | tw.z = (float)rectWidth * m_textureWidthReciprocal; |
| 136 | tw.w = (float)rectHeight * m_textureHeightReciprocal; |
| 137 | } |
| 138 | |
| 139 | void Tr2AtlasTexture::OnShutdown() |
| 140 | { |
no outgoing calls
no test coverage detected