| 1 |
// |
| 2 |
// Copyright(C) 1993-1996 Id Software, Inc. |
| 3 |
// Copyright(C) 1993-2008 Raven Software |
| 4 |
// Copyright(C) 2005-2014 Simon Howard |
| 5 |
// |
| 6 |
// This program is free software; you can redistribute it and/or |
| 7 |
// modify it under the terms of the GNU General Public License |
| 8 |
// as published by the Free Software Foundation; either version 2 |
| 9 |
// of the License, or (at your option) any later version. |
| 10 |
// |
| 11 |
// This program 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. |
| 15 |
// |
| 16 |
|
| 17 |
#ifndef __HEXEN_PO_MAN__ |
| 18 |
#define __HEXEN_PO_MAN__ |
| 19 |
|
| 20 |
#include "r_defs.h" |
| 21 |
|
| 22 |
typedef enum |
| 23 |
{ |
| 24 |
PODOOR_NONE, |
| 25 |
PODOOR_SLIDE, |
| 26 |
PODOOR_SWING, |
| 27 |
} podoortype_t; |
| 28 |
|
| 29 |
typedef struct |
| 30 |
{ |
| 31 |
thinker_t thinker; |
| 32 |
int polyobj; |
| 33 |
int speed; |
| 34 |
unsigned int dist; |
| 35 |
int angle; |
| 36 |
fixed_t xSpeed; // for sliding walls |
| 37 |
fixed_t ySpeed; |
| 38 |
} polyevent_t; |
| 39 |
|
| 40 |
typedef struct |
| 41 |
{ |
| 42 |
thinker_t thinker; |
| 43 |
int polyobj; |
| 44 |
int speed; |
| 45 |
int dist; |
| 46 |
int totalDist; |
| 47 |
int direction; |
| 48 |
fixed_t xSpeed, ySpeed; |
| 49 |
int tics; |
| 50 |
int waitTics; |
| 51 |
podoortype_t type; |
| 52 |
dboolean close; |
| 53 |
} polydoor_t; |
| 54 |
|
| 55 |
void T_PolyDoor(polydoor_t * pd); |
| 56 |
void T_RotatePoly(polyevent_t * pe); |
| 57 |
dboolean EV_RotatePoly(line_t * line, byte * args, int direction, dboolean overRide); |
| 58 |
void T_MovePoly(polyevent_t * pe); |
| 59 |
dboolean EV_MovePoly(line_t * line, byte * args, dboolean timesEight, dboolean overRide); |
| 60 |
dboolean EV_OpenPolyDoor(line_t * line, byte * args, podoortype_t type); |
| 61 |
|
| 62 |
dboolean PO_MovePolyobj(int num, int x, int y); |
| 63 |
dboolean PO_RotatePolyobj(int num, angle_t angle); |
| 64 |
dboolean PO_Detect(int doomednum); |
| 65 |
void PO_Init(int lump); |
| 66 |
dboolean PO_Busy(int polyobj); |
| 67 |
|
| 68 |
void PO_ResetBlockMap(dboolean allocate); |
| 69 |
|
| 70 |
// zdoom |
| 71 |
|
| 72 |
dboolean EV_RotateZDoomPoly(line_t * line, int polyobj, int speed, |
| 73 |
int angle, int direction, dboolean overRide); |
| 74 |
dboolean EV_MoveZDoomPoly(line_t * line, int polyobj, int speed, |
| 75 |
int angle, int distance, dboolean timesEight, dboolean overRide); |
| 76 |
dboolean EV_OpenZDoomPolyDoor(line_t * line, int polyobj, int speed, |
| 77 |
int angle, int distance, int delay, podoortype_t type); |
| 78 |
dboolean EV_StopPoly(int polyNum); |
| 79 |
dboolean EV_MovePolyTo(line_t * line, int polyNum, fixed_t speed, |
| 80 |
fixed_t x, fixed_t y, dboolean overRide); |
| 81 |
|
| 82 |
#endif |