2 RetroRay - integrated standalone vintage modeller/renderer
3 Copyright (C) 2023 John Tsiombikas <nuclear@mutantstargoat.com>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <https://www.gnu.org/licenses/>.
31 KEY_NUM_0 = 256, KEY_NUM_1, KEY_NUM_2, KEY_NUM_3, KEY_NUM_4,
32 KEY_NUM_5, KEY_NUM_6, KEY_NUM_7, KEY_NUM_8, KEY_NUM_9,
33 KEY_NUM_DOT, KEY_NUM_DIV, KEY_NUM_MUL, KEY_NUM_MINUS, KEY_NUM_PLUS, KEY_NUM_ENTER, KEY_NUM_EQUALS,
34 KEY_UP, KEY_DOWN, KEY_RIGHT, KEY_LEFT,
35 KEY_INS, KEY_HOME, KEY_END, KEY_PGUP, KEY_PGDN,
36 KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6,
37 KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12,
38 KEY_F13, KEY_F14, KEY_F15,
39 KEY_NUMLK, KEY_CAPSLK, KEY_SCRLK,
40 KEY_RSHIFT, KEY_LSHIFT, KEY_RCTRL, KEY_LCTRL, KEY_RALT, KEY_LALT,
41 KEY_RMETA, KEY_LMETA, KEY_LSUPER, KEY_RSUPER, KEY_MODE, KEY_COMPOSE,
42 KEY_HELP, KEY_PRINT, KEY_SYSRQ, KEY_BREAK
49 #define KEY_SHIFT (-4)
63 void (*destroy)(void);
66 void (*display)(void);
67 void (*reshape)(int, int);
68 void (*keyboard)(int, int);
69 void (*mouse)(int, int, int, int);
70 void (*motion)(int, int);
71 void (*sball_motion)(int, int, int);
72 void (*sball_rotate)(int, int, int);
73 void (*sball_button)(int, int);
76 extern int mouse_x, mouse_y, mouse_state[3];
77 extern unsigned int modkeys;
78 extern int win_width, win_height;
79 extern float win_aspect;
82 extern long time_msec;
83 extern struct app_screen *cur_scr;
84 extern struct app_screen scr_model, scr_rend;
87 extern struct font *uifont;
89 extern uint32_t *framebuf;
91 extern struct scene *scn;
95 void app_shutdown(void);
97 void app_display(void);
98 void app_reshape(int x, int y);
99 void app_keyboard(int key, int press);
100 void app_mouse(int bn, int st, int x, int y);
101 void app_motion(int x, int y);
102 void app_sball_motion(int x, int y, int z);
103 void app_sball_rotate(int x, int y, int z);
104 void app_sball_button(int bn, int st);
106 void app_chscr(struct app_screen *scr);
108 /* defined in main.c */
109 long app_getmsec(void);
110 void app_redisplay(void);
111 void app_swap_buffers(void);
113 void app_resize(int x, int y);
114 void app_fullscreen(int fs);
115 void app_vsync(int vsync);