| 74 | { |
| 75 | public: |
| 76 | inline Frame(const olc::Renderable* gfxSource, const geom2d::rect<int32_t>& rectSource = { {0,0},{0,0} }) |
| 77 | : gfxImageSource(gfxSource), rectFrameSource(rectSource) |
| 78 | { |
| 79 | // If no source rectangle specified then use whole image source. Ignore in the event |
| 80 | // that a frame is set up as source-less |
| 81 | if(gfxSource && rectFrameSource.size.x == 0) |
| 82 | rectFrameSource.size = gfxSource->Sprite()->Size(); |
| 83 | } |
| 84 | |
| 85 | inline const olc::Renderable* GetSourceImage() const |
| 86 | { |