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
This commit is contained in:
Eduardo Bart 2012-04-05 09:18:25 -03:00
parent f1fda8050a
commit 49727c573f
7 changed files with 11 additions and 28 deletions

9
BUGS
View File

@ -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

View File

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

View File

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

View File

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

View File

@ -632,7 +632,7 @@ void X11Window::poll()
XFree(propertyValue); XFree(propertyValue);
} }
} }
// updates window pos // updates window pos
if(m_visible) if(m_visible)
m_position = newPos; m_position = newPos;
@ -794,6 +794,7 @@ void X11Window::poll()
void X11Window::swapBuffers() void X11Window::swapBuffers()
{ {
#ifndef OPENGL_ES2 #ifndef OPENGL_ES2
glFinish();
glXSwapBuffers(m_display, m_window); glXSwapBuffers(m_display, m_window);
#else #else
eglSwapBuffers(m_eglDisplay, m_eglSurface); 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); std::vector<uchar> maskBits(numbytes, 0);
for(int i=0;i<numbits;++i) { for(int i=0;i<numbits;++i) {
uchar r = apng.pdata[i*4+0]; uint32 rgba = Fw::readLE32(apng.pdata + i*4);
uchar g = apng.pdata[i*4+1]; if(rgba == 0xffffffff) { //white, background
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
LSB_BIT_SET(maskBits, i); 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(mapBits, i);
LSB_BIT_SET(maskBits, i); LSB_BIT_SET(maskBits, i);
} //otherwise alpha } //otherwise 0x00000000 => alpha
} }
free_apng(&apng); free_apng(&apng);