| 123 | setBlendMode(_blendMode); |
| 124 | } |
| 125 | void DC6::draw(const uint32_t frameIdx, const int x, const int y) const { |
| 126 | if (frameIdx >= _frameRects.size()) |
| 127 | throw std::runtime_error("Invalid frame index"); |
| 128 | |
| 129 | const auto &frameRect = _frameRects[frameIdx]; |
| 130 | const auto &frame = _frames[frameIdx]; |
| 131 | const SDL_Rect destRect{x + frame.getXOffset(), y + frame.getYOffset() - frameRect.h, frameRect.w, frameRect.h}; |
| 132 | SDL_RenderCopy(Singletons::getRendererProvider().getRenderer(), _texture.get(), &frameRect, &destRect); |
| 133 | } |
| 134 | void DC6::draw(uint32_t frameIdx, const int x, int y, const int framesX, const int framesY) const { |
| 135 | for (auto fy = 0; fy < framesY; fy++) { |
| 136 | auto orgX = x; |
nothing calls this directly
no test coverage detected