Merge remote-tracking branch 'upstream/master'

Merging upstream updates
This commit is contained in:
Marty Plummer 2014-06-07 02:51:42 -05:00
commit bc13994947
7 changed files with 10 additions and 22 deletions

View File

@ -48,7 +48,7 @@ mkxp employs Qt's qmake build system, so you'll need to install that beforehand.
qmake will use pkg-config to locate the respective include/library paths. If you installed any dependencies into non-standard prefixes, make sure to adjust your `PKG_CONFIG_PATH` variable accordingly.
The exception is boost, which is weird in that it still hasn't managed to pull off pkg-config support (seriously?). *If you installed boost in a non-standard prefix*, you will need to pass its include path via `BOOST_I` and library path via `BOOST_L`, either as direct arguments to qmake (`qmake BOOST_I="/usr/include" ...`) or via environment variables.
The exception is boost, which is weird in that it still hasn't managed to pull off pkg-config support (seriously?). *If you installed boost in a non-standard prefix*, you will need to pass its include path via `BOOST_I` and library path via `BOOST_L`, either as direct arguments to qmake (`qmake BOOST_I="/usr/include" ...`) or via environment variables. You can specify a library suffix (eg. "-mt") via `BOOST_LIB_SUFFIX` if needed.
**MRI-Binding**: pkg-config will look for `ruby-2.1.pc`, but you can modify mkxp.pro to use 2.0 instead. This is the default binding, so no arguments to qmake needed (`BINDING=MRI` to be explicit).

View File

@ -74,7 +74,11 @@ unix {
LIBS += -L$$BOOST_L
}
LIBS += -lboost_program_options
isEmpty(BOOST_LIB_SUFFIX) {
BOOST_LIB_SUFFIX = $$(BOOST_LIB_SUFFIX)
}
LIBS += -lboost_program_options$$BOOST_LIB_SUFFIX
}
# Input

View File

@ -56,11 +56,6 @@ void GLScissorTest::apply(const bool &value)
value ? glEnable(GL_SCISSOR_TEST) : glDisable(GL_SCISSOR_TEST);
}
void GLTexture2D::apply(const bool &value)
{
value ? glEnable(GL_TEXTURE_2D) : glDisable(GL_TEXTURE_2D);
}
void GLBlendMode::apply(const BlendType &value)
{
switch (value)
@ -115,6 +110,5 @@ GLState::GLState()
blendMode.init(BlendNormal);
scissorTest.init(false);
scissorBox.init(IntRect(0, 0, 640, 480));
texture2D.init(true);
program.init(0);
}

View File

@ -84,11 +84,6 @@ class GLScissorTest : public GLProperty<bool>
void apply(const bool &value);
};
class GLTexture2D : public GLProperty<bool>
{
void apply(const bool &value);
};
class GLBlendMode : public GLProperty<BlendType>
{
void apply(const BlendType &value);
@ -111,7 +106,6 @@ public:
GLClearColor clearColor;
GLScissorBox scissorBox;
GLScissorTest scissorTest;
GLTexture2D texture2D;
GLBlendMode blendMode;
GLViewport viewport;
GLProgram program;

View File

@ -31,7 +31,7 @@
#include <vector>
#include <string.h>
const int Input::buttonCodeSize = 24;
#define BUTTON_CODE_COUNT 24
struct ButtonState
{
@ -285,7 +285,7 @@ struct InputPrivate
/* Collective binding array */
std::vector<Binding*> bindings;
ButtonState stateArray[Input::buttonCodeSize*2];
ButtonState stateArray[BUTTON_CODE_COUNT*2];
ButtonState *states;
ButtonState *statesOld;
@ -312,7 +312,7 @@ struct InputPrivate
initMsBindings();
states = stateArray;
statesOld = stateArray + Input::buttonCodeSize;
statesOld = stateArray + BUTTON_CODE_COUNT;
/* Clear buffers */
clearBuffer();
@ -359,7 +359,7 @@ struct InputPrivate
void clearBuffer()
{
const size_t size = sizeof(ButtonState) * Input::buttonCodeSize;
const size_t size = sizeof(ButtonState) * BUTTON_CODE_COUNT;
memset(states, 0, size);
}

View File

@ -45,8 +45,6 @@ public:
MouseLeft = 38, MouseMiddle = 39, MouseRight = 40
};
static const int buttonCodeSize;
void update();
bool isPressed(int button);

View File

@ -1136,7 +1136,6 @@ void GroundLayer::draw()
{
VAO::bind(p->flash.vao);
glState.blendMode.pushSet(BlendAddition);
glState.texture2D.pushSet(false);
FlashMapShader &shader = shState->shaders().flashMap;
shader.bind();
@ -1155,7 +1154,6 @@ void GroundLayer::draw()
drawFlashInt();
}
glState.texture2D.pop();
glState.blendMode.pop();
}