DEADSOFTWARE

cosmetix: cleanup view.h
[flatwaifu.git] / src / switch.h
1 /* Copyright (C) 1996-1997 Aleksey Volynskov
2 * Copyright (C) 2011 Rambo
3 * Copyright (C) 2020 SovietPony
4 *
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, version 3 of the License ONLY.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
18 #ifndef SWITCH_H_INCLUDED
19 #define SWITCH_H_INCLUDED
21 #include "view.h" // obj_t
23 #define MAXSW 100
25 enum {
26 SW_NONE, SW_EXIT, SW_EXITS, SW_OPENDOOR, SW_SHUTDOOR, SW_SHUTTRAP,
27 SW_DOOR, SW_DOOR5, SW_PRESS, SW_TELE, SW_SECRET, SW_LIFTUP, SW_LIFTDOWN,
28 SW_TRAP, SW_LIFT
29 };
31 typedef struct {
32 byte x, y;
33 byte t, tm;
34 byte a, b, c, d;
35 byte f;
36 } sw_t;
38 extern int sw_secrets;
39 extern sw_t sw[MAXSW];
41 void SW_alloc (void);
42 void SW_init (void);
43 void Z_water_trap (obj_t *o);
44 void Z_untrap (byte t);
45 void SW_act (void);
46 void SW_cheat_open (void);
47 int SW_press (int x, int y, int r, int h, byte t, int o);
49 #endif /* SWITCH_H_INCLUDED */