mirror of
https://github.com/edubart/otclient.git
synced 2025-10-16 12:34:55 +02:00
Lights now are looking really good
* Draw lights beneath holes * Improve light particle * Light intensityvaries inversely with the square of the distance * Local player always have a minimum light in complete darkness * Creature names are behind lights now
This commit is contained in:
@@ -39,6 +39,8 @@ public:
|
||||
void paste(const ImagePtr& other);
|
||||
bool nextMipmap();
|
||||
|
||||
void setPixel(int x, int y, uint8 *pixel) { memcpy(&m_pixels[(y * m_size.width() + x) * m_bpp], pixel, m_bpp);}
|
||||
|
||||
std::vector<uint8>& getPixels() { return m_pixels; }
|
||||
uint8* getPixelData() { return &m_pixels[0]; }
|
||||
int getPixelCount() { return m_size.area(); }
|
||||
@@ -46,7 +48,7 @@ public:
|
||||
int getWidth() { return m_size.width(); }
|
||||
int getHeight() { return m_size.height(); }
|
||||
int getBpp() { return m_bpp; }
|
||||
uint8* getPixel(int x, int y) { return &m_pixels[(y * m_size.width() + x) * 4]; }
|
||||
uint8* getPixel(int x, int y) { return &m_pixels[(y * m_size.width() + x) * m_bpp]; }
|
||||
|
||||
private:
|
||||
std::vector<uint8> m_pixels;
|
||||
|
Reference in New Issue
Block a user