| 186 | } |
| 187 | |
| 188 | void ResParticle::ParticlePool::Render(f2dGraphics2D* graph, float scaleX, float scaleY) |
| 189 | { |
| 190 | f2dSprite* p = m_pInstance->GetBindedSprite(); |
| 191 | const ParticleInfo& pInfo = m_pInstance->GetParticleInfo(); |
| 192 | fcyColor tOrgColor = p->GetColor(0U); |
| 193 | |
| 194 | for (size_t i = 0; i < m_iAlive; ++i) |
| 195 | { |
| 196 | ParticleInstance& pInst = m_ParticlePool[i]; |
| 197 | |
| 198 | if (pInfo.colColorStart[0] < 0) // r < 0 |
| 199 | p->SetColor(fcyColor( |
| 200 | (int)(pInst.colColor[3] * 255), |
| 201 | tOrgColor.r, |
| 202 | tOrgColor.g, |
| 203 | tOrgColor.b |
| 204 | )); |
| 205 | else |
| 206 | p->SetColor(fcyColor(pInst.colColor[3], pInst.colColor[0], pInst.colColor[1], pInst.colColor[2])); |
| 207 | p->Draw2(graph, fcyVec2(pInst.vecLocation.x, pInst.vecLocation.y), fcyVec2(scaleX * pInst.fSize, scaleY * pInst.fSize), pInst.fSpin, false); |
| 208 | } |
| 209 | |
| 210 | p->SetColor(tOrgColor); |
| 211 | } |
| 212 | |
| 213 | //////////////////////////////////////////////////////////////////////////////// |
| 214 | /// ResFont |
nothing calls this directly
no test coverage detected