| @@ -35,6 +35,7 @@ libtool | |||||
| stamp-* | stamp-* | ||||
| *-stamp | *-stamp | ||||
| lolengine-*.tar.* | lolengine-*.tar.* | ||||
| test-suite.log | |||||
| # Personal stuff | # Personal stuff | ||||
| patch-*.diff | patch-*.diff | ||||
| # Debugging cruft | # Debugging cruft | ||||
| @@ -96,4 +97,6 @@ doc/doxygen.log | |||||
| doc/html | doc/html | ||||
| doc/latex | doc/latex | ||||
| doc/man | doc/man | ||||
| # Our test suites | |||||
| test/testsuite.log | |||||
| test/testsuite.trs | |||||
| @@ -121,7 +121,7 @@ public: | |||||
| m_text->SetText("no mouse detected"); | m_text->SetText("no mouse detected"); | ||||
| } | } | ||||
| mat4 anim = mat4::rotate(m_yaw_angle, vec3(0, 1, 0)) * mat4::rotate(m_pitch_angle, vec3(1, 0, 0)); | |||||
| mat4 anim = mat4::fromeuler_yxz(m_yaw_angle, m_pitch_angle, 0.f); | |||||
| mat4 model = mat4::translate(vec3(0, 0, -4.5)); | mat4 model = mat4::translate(vec3(0, 0, -4.5)); | ||||
| mat4 view = mat4::lookat(vec3(0, 2, 0), vec3(0, 0, -4), vec3(0, 1, 0)); | mat4 view = mat4::lookat(vec3(0, 2, 0), vec3(0, 0, -4), vec3(0, 1, 0)); | ||||
| mat4 proj = mat4::perspective(45.0f, 640.0f, 480.0f, 0.1f, 10.0f); | mat4 proj = mat4::perspective(45.0f, 640.0f, 480.0f, 0.1f, 10.0f); | ||||
| @@ -2,7 +2,7 @@ | |||||
| include $(top_srcdir)/build/autotools/common.am | include $(top_srcdir)/build/autotools/common.am | ||||
| noinst_PROGRAMS = 01_triangle 02_cube 03_noise 04_texture 05_easymesh \ | noinst_PROGRAMS = 01_triangle 02_cube 03_noise 04_texture 05_easymesh \ | ||||
| 06_sprite 08_fbo 11_fractal \ | |||||
| 06_sprite 07_input 08_fbo 11_fractal \ | |||||
| 12_voronoi | 12_voronoi | ||||
| 01_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx | 01_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx | ||||
| @@ -84,6 +84,8 @@ liblolcore_sources = \ | |||||
| input/input.cpp input/input.h \ | input/input.cpp input/input.h \ | ||||
| input/keyboard.cpp input/keyboard.h \ | input/keyboard.cpp input/keyboard.h \ | ||||
| input/stick.cpp input/stick.h \ | input/stick.cpp input/stick.h \ | ||||
| input/inputdevice.cpp input/inputdevice.h input/inputdevice_internal.h \ | |||||
| input/controller.cpp input/controller.h \ | |||||
| \ | \ | ||||
| gpu/defaultmaterial.lolfx \ | gpu/defaultmaterial.lolfx \ | ||||
| gpu/tile.lolfx gpu/line.lolfx \ | gpu/tile.lolfx gpu/line.lolfx \ | ||||
| @@ -251,7 +251,11 @@ EglApp::EglApp(char const *title, ivec2 res, float fps) : | |||||
| # endif | # endif | ||||
| # if defined USE_SDL | # if defined USE_SDL | ||||
| # if defined LOL_INPUT_V2 | |||||
| new SdlInput(res.x, res.y, data->screen_size.x, data->screen_size.y); | |||||
| # else | |||||
| new SdlInput(); | new SdlInput(); | ||||
| # endif | |||||
| # endif | # endif | ||||
| /* Initialise everything */ | /* Initialise everything */ | ||||
| @@ -8,14 +8,14 @@ | |||||
| // http://www.wtfpl.net/ for more details. | // http://www.wtfpl.net/ for more details. | ||||
| // | // | ||||
| #ifdef LOL_INPUT_V2 | |||||
| #if defined HAVE_CONFIG_H | #if defined HAVE_CONFIG_H | ||||
| # include "config.h" | # include "config.h" | ||||
| #endif | #endif | ||||
| #include "core.h" | #include "core.h" | ||||
| #ifdef LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -11,17 +11,17 @@ | |||||
| #if !defined __LOL_INPUT_CONTROLLER_H__ | #if !defined __LOL_INPUT_CONTROLLER_H__ | ||||
| #define __LOL_INPUT_CONTROLLER_H__ | #define __LOL_INPUT_CONTROLLER_H__ | ||||
| #if defined LOL_INPUT_V2 | |||||
| #include "core.h" | #include "core.h" | ||||
| #if defined LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| class KeyBinding | class KeyBinding | ||||
| { | { | ||||
| public: | public: | ||||
| KeyBinding() : m_current(false), m_previous(false), m_device(nullptr) {} | |||||
| KeyBinding() : m_device(nullptr), m_current(false), m_previous(false) {} | |||||
| bool IsDown() const { return m_current; } | bool IsDown() const { return m_current; } | ||||
| bool IsUp() const { return !m_current; } | bool IsUp() const { return !m_current; } | ||||
| @@ -44,7 +44,7 @@ protected: | |||||
| class AxisBinding | class AxisBinding | ||||
| { | { | ||||
| public: | public: | ||||
| AxisBinding() : m_current(0.0f), m_previous(0.0f), m_device(nullptr) {} | |||||
| AxisBinding() : m_device(nullptr), m_current(0.0f), m_previous(0.0f) {} | |||||
| float GetValue() const { return m_current; } | float GetValue() const { return m_current; } | ||||
| float GetDelta() const { return m_current - m_previous; } | float GetDelta() const { return m_current - m_previous; } | ||||
| @@ -8,7 +8,6 @@ | |||||
| // http://www.wtfpl.net/ for more details. | // http://www.wtfpl.net/ for more details. | ||||
| // | // | ||||
| #ifndef LOL_INPUT_V2 | |||||
| #if defined HAVE_CONFIG_H | #if defined HAVE_CONFIG_H | ||||
| # include "config.h" | # include "config.h" | ||||
| @@ -18,6 +17,8 @@ | |||||
| #include "core.h" | #include "core.h" | ||||
| #ifndef LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -16,13 +16,13 @@ | |||||
| #if !defined __LOL_INPUT_INPUT_H__ | #if !defined __LOL_INPUT_INPUT_H__ | ||||
| #define __LOL_INPUT_INPUT_H__ | #define __LOL_INPUT_INPUT_H__ | ||||
| #ifndef LOL_INPUT_V2 | |||||
| #include <cstring> | #include <cstring> | ||||
| #include <string.h> | #include <string.h> | ||||
| #include "core.h" | #include "core.h" | ||||
| #ifndef LOL_INPUT_V2 | |||||
| #include "lol/math/vector.h" | #include "lol/math/vector.h" | ||||
| #include "input/keyboard.h" | #include "input/keyboard.h" | ||||
| #include "input/stick.h" | #include "input/stick.h" | ||||
| @@ -8,14 +8,14 @@ | |||||
| // http://www.wtfpl.net/ for more details. | // http://www.wtfpl.net/ for more details. | ||||
| // | // | ||||
| #ifdef LOL_INPUT_V2 | |||||
| #if defined HAVE_CONFIG_H | #if defined HAVE_CONFIG_H | ||||
| # include "config.h" | # include "config.h" | ||||
| #endif | #endif | ||||
| #include "core.h" | #include "core.h" | ||||
| #ifdef LOL_INPUT_V2 | |||||
| #include "input/inputdevice_internal.h" | #include "input/inputdevice_internal.h" | ||||
| namespace lol | namespace lol | ||||
| @@ -11,10 +11,10 @@ | |||||
| #if !defined __LOL_INPUT_DEVICE_H__ | #if !defined __LOL_INPUT_DEVICE_H__ | ||||
| #define __LOL_INPUT_DEVICE_H__ | #define __LOL_INPUT_DEVICE_H__ | ||||
| #if defined LOL_INPUT_V2 | |||||
| #include "core.h" | #include "core.h" | ||||
| #if defined LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -11,10 +11,10 @@ | |||||
| #if !defined __LOL_INPUT_DEVICE_INTERNAL_H__ | #if !defined __LOL_INPUT_DEVICE_INTERNAL_H__ | ||||
| #define __LOL_INPUT_DEVICE_H__ | #define __LOL_INPUT_DEVICE_H__ | ||||
| #if defined LOL_INPUT_V2 | |||||
| #include "core.h" | #include "core.h" | ||||
| #if defined LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -8,8 +8,6 @@ | |||||
| // http://www.wtfpl.net/ for more details. | // http://www.wtfpl.net/ for more details. | ||||
| // | // | ||||
| #ifndef LOL_INPUT_V2 | |||||
| #if defined HAVE_CONFIG_H | #if defined HAVE_CONFIG_H | ||||
| # include "config.h" | # include "config.h" | ||||
| #endif | #endif | ||||
| @@ -18,6 +16,8 @@ | |||||
| #include "core.h" | #include "core.h" | ||||
| #ifndef LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -16,10 +16,10 @@ | |||||
| #if !defined __LOL_INPUT_KEYBOARD_H__ | #if !defined __LOL_INPUT_KEYBOARD_H__ | ||||
| #define __LOL_INPUT_KEYBOARD_H__ | #define __LOL_INPUT_KEYBOARD_H__ | ||||
| #ifndef LOL_INPUT_V2 | |||||
| #include "entity.h" | #include "entity.h" | ||||
| #ifndef LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -8,8 +8,6 @@ | |||||
| // http://www.wtfpl.net/ for more details. | // http://www.wtfpl.net/ for more details. | ||||
| // | // | ||||
| #ifndef LOL_INPUT_V2 | |||||
| #if defined HAVE_CONFIG_H | #if defined HAVE_CONFIG_H | ||||
| # include "config.h" | # include "config.h" | ||||
| #endif | #endif | ||||
| @@ -18,6 +16,8 @@ | |||||
| #include "core.h" | #include "core.h" | ||||
| #ifndef LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||
| @@ -16,10 +16,10 @@ | |||||
| #if !defined __LOL_INPUT_STICK_H__ | #if !defined __LOL_INPUT_STICK_H__ | ||||
| #define __LOL_INPUT_STICK_H__ | #define __LOL_INPUT_STICK_H__ | ||||
| #ifndef LOL_INPUT_V2 | |||||
| #include "entity.h" | #include "entity.h" | ||||
| #ifndef LOL_INPUT_V2 | |||||
| namespace lol | namespace lol | ||||
| { | { | ||||