Rework minimap rendering

This commit is contained in:
Eduardo Bart
2013-01-20 21:17:56 -02:00
parent 18a37393c5
commit ae731ddefc
23 changed files with 531 additions and 148 deletions

View File

@@ -37,9 +37,11 @@ public:
void overwriteMask(const Color& maskedColor, const Color& insideColor = Color::white, const Color& outsideColor = Color::alpha);
void blit(const Point& dest, const ImagePtr& other);
void paste(const ImagePtr& other);
void resize(const Size& size) { m_size = size; m_pixels.resize(size.area() * m_bpp, 0); }
bool nextMipmap();
void setPixel(int x, int y, uint8 *pixel) { memcpy(&m_pixels[(y * m_size.width() + x) * m_bpp], pixel, m_bpp);}
void setPixel(int x, int y, const Color& color) { uint32 tmp = color.rgba(); setPixel(x,y,(uint8*)&tmp); }
std::vector<uint8>& getPixels() { return m_pixels; }
uint8* getPixelData() { return &m_pixels[0]; }