X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fapp.h;h=1eed2fe6867f828f16a1706f4533b20ad7d95edd;hp=5e65394138f9910f94caf8c690f973f1c4835447;hb=b5ed5107e21ff834d5a4510b9047f976abb03dff;hpb=3aacec4aee795e703e8eb9d6852ca47a3be065ee diff --git a/src/app.h b/src/app.h index 5e65394..1eed2fe 100644 --- a/src/app.h +++ b/src/app.h @@ -1,18 +1,75 @@ #ifndef APP_H_ #define APP_H_ +#include "texture.h" +#include "scene.h" +#include "exhibit.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 TextureSet texman; +extern SceneSet sceneman; + +extern unsigned int sdr_ltmap, sdr_ltmap_notex; + +extern ExSelection exsel_grab, exsel_hover; + +extern int fpexcept_enabled; // int so that C modules may fwd-delcare and use it + enum { MOD_SHIFT = 1, MOD_ALT = 2, MOD_CTRL = 4 }; +/* special keys */ +enum { + KEY_DEL = 127, + KEY_LEFT, + KEY_RIGHT, + KEY_UP, + KEY_DOWN, + KEY_PGUP, + KEY_PGDOWN, + KEY_HOME, + KEY_END, + KEY_F1, + KEY_F2, + KEY_F3, + KEY_F4, + KEY_F5, + KEY_F6, + KEY_F7, + KEY_F8, + KEY_F9, + KEY_F10, + KEY_F11, + KEY_F12 +}; + +/* 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(); @@ -23,6 +80,10 @@ void app_keyboard(int key, bool pressed); 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_wheel(int dir); + +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();