projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- only enable sRGB if we got an sRGB framebuffer.
[laserbrain_demo]
/
src
/
app.h
diff --git
a/src/app.h
b/src/app.h
index
5e65394
..
5e7554f
100644
(file)
--- a/
src/app.h
+++ b/
src/app.h
@@
-1,18
+1,45
@@
#ifndef APP_H_
#define APP_H_
#ifndef APP_H_
#define APP_H_
+#include "texture.h"
+#include "scene.h"
+
extern long time_msec;
extern int win_width, win_height;
extern float win_aspect;
extern bool opt_gear_wireframe;
extern bool fb_srgb;
extern long time_msec;
extern int win_width, win_height;
extern float win_aspect;
extern bool opt_gear_wireframe;
extern bool fb_srgb;
+extern TextureSet texman;
+extern SceneSet sceneman;
+
+extern unsigned int sdr_ltmap, sdr_ltmap_notex;
+
enum {
MOD_SHIFT = 1,
MOD_ALT = 2,
MOD_CTRL = 4
};
enum {
MOD_SHIFT = 1,
MOD_ALT = 2,
MOD_CTRL = 4
};
+/* XXX make sure these match with SDL_GameControllerButton */
+enum {
+ GPAD_A,
+ GPAD_B,
+ GPAD_X,
+ GPAD_Y,
+ GPAD_BACK,
+ GPAD_GUIDE,
+ GPAD_START,
+ GPAD_LSTICK,
+ GPAD_RSTICK,
+ GPAD_L,
+ GPAD_R,
+ GPAD_UP,
+ GPAD_DOWN,
+ GPAD_LEFT,
+ GPAD_RIGHT,
+};
+
bool app_init(int argc, char **argv);
void app_cleanup();
bool app_init(int argc, char **argv);
void app_cleanup();
@@
-24,6
+51,9
@@
void app_mouse_button(int bn, bool pressed, int x, int y);
void app_mouse_motion(int x, int y);
void app_mouse_delta(int dx, int dy);
void app_mouse_motion(int x, int y);
void app_mouse_delta(int dx, int dy);
+void app_gamepad_axis(int axis, float val);
+void app_gamepad_button(int bn, bool pressed);
+
// the following functions are implemented by the backend (main.cc)
void app_quit();
void app_swap_buffers();
// the following functions are implemented by the backend (main.cc)
void app_quit();
void app_swap_buffers();