X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fapp.h;h=2f66bcf9a678859440a8e978a18c57d4a72321f1;hb=b30241a8a51be904b22459a1d0cc3322e0a505d9;hp=2867309885f1f78000b03c78fa1ab950bbdcb606;hpb=458f4c5972fc6b0ba43ea42c3b8d5c211d8f3f3d;p=laserbrain_demo diff --git a/src/app.h b/src/app.h index 2867309..2f66bcf 100644 --- a/src/app.h +++ b/src/app.h @@ -5,6 +5,9 @@ extern long time_msec; extern int win_width, win_height; extern float win_aspect; extern bool opt_gear_wireframe; +extern bool fb_srgb; + +extern unsigned int sdr_ltmap, sdr_ltmap_notex; enum { MOD_SHIFT = 1, @@ -12,7 +15,26 @@ enum { MOD_CTRL = 4 }; -bool app_init(); +/* 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(); void app_display(); @@ -23,6 +45,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_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();