Browse Source

build: fix a few compilation issues with input v2.

undefined
Sam Hocevar 11 years ago
parent
commit
399a172425
16 changed files with 36 additions and 26 deletions
  1. +4
    -1
      .gitignore
  2. +1
    -1
      demos/tutorial/07_input.cpp
  3. +1
    -1
      demos/tutorial/Makefile.am
  4. +2
    -0
      src/Makefile.am
  5. +4
    -0
      src/eglapp.cpp
  6. +2
    -2
      src/input/controller.cpp
  7. +4
    -4
      src/input/controller.h
  8. +2
    -1
      src/input/input.cpp
  9. +2
    -2
      src/input/input.h
  10. +2
    -2
      src/input/inputdevice.cpp
  11. +2
    -2
      src/input/inputdevice.h
  12. +2
    -2
      src/input/inputdevice_internal.h
  13. +2
    -2
      src/input/keyboard.cpp
  14. +2
    -2
      src/input/keyboard.h
  15. +2
    -2
      src/input/stick.cpp
  16. +2
    -2
      src/input/stick.h

+ 4
- 1
.gitignore View File

@@ -35,6 +35,7 @@ libtool
stamp-*
*-stamp
lolengine-*.tar.*
test-suite.log
# Personal stuff
patch-*.diff
# Debugging cruft
@@ -96,4 +97,6 @@ doc/doxygen.log
doc/html
doc/latex
doc/man

# Our test suites
test/testsuite.log
test/testsuite.trs

+ 1
- 1
demos/tutorial/07_input.cpp View File

@@ -121,7 +121,7 @@ public:
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 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);


+ 1
- 1
demos/tutorial/Makefile.am View File

@@ -2,7 +2,7 @@
include $(top_srcdir)/build/autotools/common.am

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

01_triangle_SOURCES = 01_triangle.cpp 01_triangle.lolfx


+ 2
- 0
src/Makefile.am View File

@@ -84,6 +84,8 @@ liblolcore_sources = \
input/input.cpp input/input.h \
input/keyboard.cpp input/keyboard.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/tile.lolfx gpu/line.lolfx \


+ 4
- 0
src/eglapp.cpp View File

@@ -251,7 +251,11 @@ EglApp::EglApp(char const *title, ivec2 res, float fps) :
# endif

# 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();
# endif
# endif

/* Initialise everything */


+ 2
- 2
src/input/controller.cpp View File

@@ -8,14 +8,14 @@
// http://www.wtfpl.net/ for more details.
//

#ifdef LOL_INPUT_V2

#if defined HAVE_CONFIG_H
# include "config.h"
#endif

#include "core.h"

#ifdef LOL_INPUT_V2

namespace lol
{



+ 4
- 4
src/input/controller.h View File

@@ -11,17 +11,17 @@
#if !defined __LOL_INPUT_CONTROLLER_H__
#define __LOL_INPUT_CONTROLLER_H__

#if defined LOL_INPUT_V2

#include "core.h"

#if defined LOL_INPUT_V2

namespace lol
{

class KeyBinding
{
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 IsUp() const { return !m_current; }
@@ -44,7 +44,7 @@ protected:
class AxisBinding
{
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 GetDelta() const { return m_current - m_previous; }


+ 2
- 1
src/input/input.cpp View File

@@ -8,7 +8,6 @@
// http://www.wtfpl.net/ for more details.
//

#ifndef LOL_INPUT_V2

#if defined HAVE_CONFIG_H
# include "config.h"
@@ -18,6 +17,8 @@

#include "core.h"

#ifndef LOL_INPUT_V2

namespace lol
{



+ 2
- 2
src/input/input.h View File

@@ -16,13 +16,13 @@
#if !defined __LOL_INPUT_INPUT_H__
#define __LOL_INPUT_INPUT_H__

#ifndef LOL_INPUT_V2

#include <cstring>
#include <string.h>

#include "core.h"

#ifndef LOL_INPUT_V2

#include "lol/math/vector.h"
#include "input/keyboard.h"
#include "input/stick.h"


+ 2
- 2
src/input/inputdevice.cpp View File

@@ -8,14 +8,14 @@
// http://www.wtfpl.net/ for more details.
//

#ifdef LOL_INPUT_V2

#if defined HAVE_CONFIG_H
# include "config.h"
#endif

#include "core.h"

#ifdef LOL_INPUT_V2

#include "input/inputdevice_internal.h"

namespace lol


+ 2
- 2
src/input/inputdevice.h View File

@@ -11,10 +11,10 @@
#if !defined __LOL_INPUT_DEVICE_H__
#define __LOL_INPUT_DEVICE_H__

#if defined LOL_INPUT_V2

#include "core.h"

#if defined LOL_INPUT_V2

namespace lol
{



+ 2
- 2
src/input/inputdevice_internal.h View File

@@ -11,10 +11,10 @@
#if !defined __LOL_INPUT_DEVICE_INTERNAL_H__
#define __LOL_INPUT_DEVICE_H__

#if defined LOL_INPUT_V2

#include "core.h"

#if defined LOL_INPUT_V2

namespace lol
{



+ 2
- 2
src/input/keyboard.cpp View File

@@ -8,8 +8,6 @@
// http://www.wtfpl.net/ for more details.
//

#ifndef LOL_INPUT_V2

#if defined HAVE_CONFIG_H
# include "config.h"
#endif
@@ -18,6 +16,8 @@

#include "core.h"

#ifndef LOL_INPUT_V2

namespace lol
{



+ 2
- 2
src/input/keyboard.h View File

@@ -16,10 +16,10 @@
#if !defined __LOL_INPUT_KEYBOARD_H__
#define __LOL_INPUT_KEYBOARD_H__

#ifndef LOL_INPUT_V2

#include "entity.h"

#ifndef LOL_INPUT_V2

namespace lol
{



+ 2
- 2
src/input/stick.cpp View File

@@ -8,8 +8,6 @@
// http://www.wtfpl.net/ for more details.
//

#ifndef LOL_INPUT_V2

#if defined HAVE_CONFIG_H
# include "config.h"
#endif
@@ -18,6 +16,8 @@

#include "core.h"

#ifndef LOL_INPUT_V2

namespace lol
{



+ 2
- 2
src/input/stick.h View File

@@ -16,10 +16,10 @@
#if !defined __LOL_INPUT_STICK_H__
#define __LOL_INPUT_STICK_H__

#ifndef LOL_INPUT_V2

#include "entity.h"

#ifndef LOL_INPUT_V2

namespace lol
{



Loading…
Cancel
Save