mirror of
https://github.com/edubart/otclient.git
synced 2025-10-19 14:03:26 +02:00
bunch of optimizations
This commit is contained in:
@@ -646,9 +646,9 @@ void WIN32Window::setMouseCursor(const std::string& file, const Point& hotSpot)
|
||||
uchar b = apng.pdata[i*4+2];
|
||||
uchar a = apng.pdata[i*4+3];
|
||||
Color color(r,g,b,a);
|
||||
if(color == Fw::white) { //white
|
||||
if(color == Color::white) { //white
|
||||
HSB_BIT_SET(xorMask, i);
|
||||
} else if(color == Fw::alpha) { //alpha
|
||||
} else if(color == Color::alpha) { //alpha
|
||||
HSB_BIT_SET(andMask, i);
|
||||
} //otherwise black
|
||||
}
|
||||
|
@@ -864,9 +864,9 @@ void X11Window::setMouseCursor(const std::string& file, const Point& hotSpot)
|
||||
uchar b = apng.pdata[i*4+2];
|
||||
uchar a = apng.pdata[i*4+3];
|
||||
Color color(r,g,b,a);
|
||||
if(color == Fw::white) { //background
|
||||
if(color == Color::white) { //background
|
||||
LSB_BIT_SET(maskBits, i);
|
||||
} else if(color == Fw::black) { //foreground
|
||||
} else if(color == Color::black) { //foreground
|
||||
LSB_BIT_SET(mapBits, i);
|
||||
LSB_BIT_SET(maskBits, i);
|
||||
} //otherwise alpha
|
||||
|
Reference in New Issue
Block a user