This commit is contained in:
Eduardo Bart 2011-12-29 17:36:43 -02:00
parent d597335135
commit 7c0ad7a356
7 changed files with 17 additions and 11 deletions

View File

@ -113,6 +113,7 @@ SET(framework_LIBRARIES
${GLEW_LIBRARY}
${OPENGL_LIBRARIES}
${OPENGLES_LIBRARY}
${EGL_LIBRARY}
${LUA_LIBRARIES}
${PHYSFS_LIBRARY}
${GMP_LIBRARY}

View File

@ -47,7 +47,7 @@ public:
bool isRunning() { return m_running; }
bool isStopping() { return m_stopping; }
std::string getAppName() { return m_appName; }
const std::string& getAppName() { return m_appName; }
protected:
virtual void render();

View File

@ -55,8 +55,8 @@ bool Shader::compileSourceCode(const std::string& sourceCode)
static const char *qualifierDefines =
"#ifndef GL_FRAGMENT_PRECISION_HIGH\n"
"#define highp mediump\n"
"#endif\n";
"precision highp float;\n"
"#endif\n"
"precision highp float;\n";
#endif
std::string code = qualifierDefines;

View File

@ -421,7 +421,7 @@ void X11Window::internalDestroyGLContext()
eglDestroyContext(m_eglDisplay, m_eglContext);
m_eglContext = 0;
}
if(m_eglSurface)
if(m_eglSurface) {
eglDestroySurface(m_eglDisplay, m_eglSurface);
m_eglSurface = 0;
}

View File

@ -315,13 +315,8 @@ void Creature::setOutfit(const Outfit& outfit)
m_outfit = outfit;
m_type = getType();
// Do not apply any mask color.
if(m_type->dimensions[ThingType::Layers] == 1) {
m_outfit.setHead(0);
m_outfit.setBody(0);
m_outfit.setLegs(0);
m_outfit.setFeet(0);
}
if(m_type->dimensions[ThingType::Layers] == 1)
m_outfit.resetClothes();
}
ThingType *Creature::getType()

View File

@ -117,3 +117,11 @@ Color Outfit::getColor(int color)
}
return Color(int(red * 255), int(green * 255), int(blue * 255));
}
void Outfit::resetClothes()
{
setHead(0);
setBody(0);
setLegs(0);
setFeet(0);
}

View File

@ -44,6 +44,8 @@ public:
void setFeet(int feet) { m_feet = feet; m_feetColor = getColor(feet); }
void setAddons(int addons) { m_addons = addons; }
void resetClothes();
int getType() const { return m_type; }
int getHead() const { return m_head; }
int getBody() const { return m_body; }