DEADSOFTWARE

d0d586c89257b8e4a0962dfa3e2a3630d98a16a7
[flatwaifu.git] / src / switch.h
1 /*
2 Copyright (C) Prikol Software 1996-1997
3 Copyright (C) Aleksey Volynskov 1996-1997
5 This file is part of the Doom2D:Rembo project.
7 Doom2D:Rembo is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 2 as
9 published by the Free Software Foundation.
11 Doom2D:Rembo is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, see <http://www.gnu.org/licenses/> or
18 write to the Free Software Foundation, Inc.,
19 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 */
22 #ifndef SWITCH_H_INCLUDED
23 #define SWITCH_H_INCLUDED
25 #include <stdio.h> // FILE
26 #include "view.h" // obj_t
28 #define MAXSW 100
30 enum {
31 SW_NONE, SW_EXIT, SW_EXITS, SW_OPENDOOR, SW_SHUTDOOR, SW_SHUTTRAP,
32 SW_DOOR, SW_DOOR5, SW_PRESS, SW_TELE, SW_SECRET, SW_LIFTUP, SW_LIFTDOWN,
33 SW_TRAP, SW_LIFT
34 };
36 typedef struct {
37 byte x, y;
38 byte t, tm;
39 byte a, b, c, d;
40 byte f;
41 } sw_t;
43 extern int sw_secrets;
44 extern sw_t sw[MAXSW];
46 int SW_load (FILE *h);
47 void SW_alloc (void);
48 void SW_init (void);
49 void Z_water_trap (obj_t *o);
50 void Z_untrap (byte t);
51 void SW_act (void);
52 void SW_cheat_open (void);
53 int SW_press (int x, int y, int r, int h, byte t, int o);
55 #endif /* SWITCH_H_INCLUDED */