platform fixes

* fix black cursor on win32
* fix front buffer refresh on some x11 platforms
* fix outfit framebuffer glitch
* display entergame by default
* change some icons
master
Eduardo Bart 12 years ago
parent f1fda8050a
commit 49727c573f

@ -1,9 +0,0 @@
trying to walking while following doesn't cancel de walk
attacked/followed creatures are not cleared when it goes out of range
hotkeys works while windows are locked, it shouldnt
some animated hits are displayed as 2 hits instead of one
skulls is rendering outside map bounds
paste on x11 platform does not work correctly when doing ctrl+c in google chrome
party options does not work when relogging inside a party
when the player gets disconnected it isn't removed from the map

@ -80,7 +80,6 @@ function EnterGame.init()
enterGame:getChildById('accountNameTextEdit'):focus()
-- only open entergame when app starts
enterGame:hide()
if not g_app.isRunning() then
if #account > 0 and autologin then
addEvent(EnterGame.doLogin)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 962 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 928 B

After

Width:  |  Height:  |  Size: 945 B

@ -143,10 +143,10 @@ void Painter::setClipRect(const Rect& clipRect)
if(clipRect.isValid()) {
glEnable(GL_SCISSOR_TEST);
glScissor(clipRect.left(), g_graphics.getViewportSize().height() - clipRect.bottom() - 1, clipRect.width(), clipRect.height());
m_clipRect = clipRect;
} else {
glDisable(GL_SCISSOR_TEST);
}
m_clipRect = clipRect;
}
void Painter::saveAndResetState()

@ -687,16 +687,12 @@ void WIN32Window::setMouseCursor(const std::string& file, const Point& hotSpot)
std::vector<uchar> xorMask(numbytes, 0);
for(int i=0;i<numbits;++i) {
uchar r = apng.pdata[i*4+0];
uchar g = apng.pdata[i*4+1];
uchar b = apng.pdata[i*4+2];
uchar a = apng.pdata[i*4+3];
Color color(r,g,b,a);
if(color == Color::white) { //white
uint32 rgba = Fw::readLE32(apng.pdata + i*4);
if(rgba == 0xffffffff) { //white
HSB_BIT_SET(xorMask, i);
} else if(color == Color::alpha) { //alpha
} else if(rgba == 0x00000000) { //alpha
HSB_BIT_SET(andMask, i);
} //otherwise black
} // otherwise 0xff000000 => black
}
free_apng(&apng);

@ -632,7 +632,7 @@ void X11Window::poll()
XFree(propertyValue);
}
}
// updates window pos
if(m_visible)
m_position = newPos;
@ -794,6 +794,7 @@ void X11Window::poll()
void X11Window::swapBuffers()
{
#ifndef OPENGL_ES2
glFinish();
glXSwapBuffers(m_display, m_window);
#else
eglSwapBuffers(m_eglDisplay, m_eglSurface);
@ -872,17 +873,13 @@ void X11Window::setMouseCursor(const std::string& file, const Point& hotSpot)
std::vector<uchar> maskBits(numbytes, 0);
for(int i=0;i<numbits;++i) {
uchar r = apng.pdata[i*4+0];
uchar g = apng.pdata[i*4+1];
uchar b = apng.pdata[i*4+2];
uchar a = apng.pdata[i*4+3];
Color color(r,g,b,a);
if(color == Color::white) { //background
uint32 rgba = Fw::readLE32(apng.pdata + i*4);
if(rgba == 0xffffffff) { //white, background
LSB_BIT_SET(maskBits, i);
} else if(color == Color::black) { //foreground
} else if(rgba == 0xff000000) { //black, foreground
LSB_BIT_SET(mapBits, i);
LSB_BIT_SET(maskBits, i);
} //otherwise alpha
} //otherwise 0x00000000 => alpha
}
free_apng(&apng);

Loading…
Cancel
Save