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. 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). **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 += -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 # Input

View File

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

View File

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

View File

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

View File

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

View File

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