/
p_spec.h
107 lines (84 loc) · 2.76 KB
/
p_spec.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
/**\file
*\section License
* License: GPL
* Online License Link: http://www.gnu.org/licenses/gpl.html
*
*\author Copyright © 2003-2017 Jaakko Keränen <jaakko.keranen@iki.fi>
*\author Copyright © 2005-2013 Daniel Swanson <danij@dengine.net>
*\author Copyright © 1993-1996 by id Software, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor,
* Boston, MA 02110-1301 USA
*/
/**
* p_spec.h: Implements special effects:
*
* Texture animation, height or lighting changes according to adjacent
* sectors, respective utility functions, etc.
*
* Line Tag handling. Line and Sector triggers.
*
* Events are operations triggered by using, crossing, or shooting
* special lines, or by timed thinkers.
*/
#ifndef __P_SPEC_H__
#define __P_SPEC_H__
#ifndef __JHERETIC__
# error "Using jHeretic headers without __JHERETIC__"
#endif
#include "h_player.h"
#include "r_data.h"
#define MO_TELEPORTMAN 14
#ifdef __cplusplus
extern "C" {
#endif
// at game start
void P_InitLava(void);
// at map load
void P_SpawnSectorSpecialThinkers(void);
void P_SpawnLineSpecialThinkers(void);
void P_SpawnAllSpecialThinkers(void);
void P_InitAmbientSound(void);
void P_DefineAmbientSfx(int sequence, const int *seq, size_t count);
/**
* Called by spawnMapThing during @ref P_SetupMap()
*/
void P_AddAmbientSfx(int sequence);
/**
* Called every tic by (P_tick):P_Ticker.
*/
void P_AmbientSound(void);
dd_bool P_ActivateLine(Line* ld, mobj_t* mo, int side,
int activationType);
void P_PlayerInSpecialSector(player_t* player);
void P_PlayerInWindSector(player_t* player);
int EV_DoDonut(Line* line);
typedef enum {
ok,
crushed,
pastdest
} result_e;
typedef enum {
build8, // Slowly build by 8.
build16 // Slowly build by 16.
} stair_e;
result_e T_MovePlane(Sector* sector, float speed, coord_t dest,
int crush, int floorOrCeiling, int direction);
int EV_BuildStairs(Line* line, stair_e type);
dd_bool P_UseSpecialLine2(mobj_t* mo, Line* line, int side);
#ifdef __cplusplus
} // extern "C"
#endif
#endif