1 /*
2 Copyright (C) 1994-1995 Apogee Software, Ltd.
3 
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
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.
12 
13 See the GNU General Public License for more details.
14 
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 
19 */
20 #ifndef _rt_playr_private
21 #define _rt_playr_private
22 
23 #include "watcom.h"
24 
25 #define YZANGLELIMIT  (30*FINEANGLES/360)
26 #define YZTILTSPEED   20
27 #define SNAPBACKSPEED 10
28 #define YZHORIZONSPEED 4
29 #define HORIZONYZOFFSET (FINEANGLES/4)
30 #define SetPlayerHorizon(ps,hlevel)    \
31     {                                  \
32     if ((hlevel)>YZANGLELIMIT)           \
33        (ps)->horizon=HORIZONYZOFFSET+YZANGLELIMIT;\
34     else if ((hlevel)<-YZANGLELIMIT)     \
35        (ps)->horizon=HORIZONYZOFFSET-YZANGLELIMIT;\
36     else                                  \
37        (ps)->horizon=HORIZONYZOFFSET+(hlevel);\
38 	 }
39 
40 #define StartWeaponChange \
41 {\
42  SD_PlaySoundRTP(SD_SELECTWPNSND,ob->x,ob->y);\
43  pstate->weapondowntics = WEAPONS[pstate->weapon].screenheight/GMOVE;\
44  if ((ob==player) && SHOW_BOTTOM_STATUS_BAR() )\
45 	 DrawBarAmmo (false);            \
46 }
47 
48 
49 #define BULLETHOLEOFFSET 0x700
50 
51 #define M_DIST(x1,x2,y1,y2)   (((x1-x2)*(x1-x2))+((y1-y2)*(y1-y2)))
52 
53 #define W_CHANGE(x)   ((x->weapondowntics) || (x->weaponuptics))
54 #define NOMOM         ((!ob->momentumx) && (!ob->momentumy))
55 #define DISTOK(p1,p2,d)    (abs((p1)-(p2)) <= d)
56 #define Fix(a)        (a &= (FINEANGLES-1))
57 #define REMOTEPKTSIZE    (sizeof(MoveType))
58 #define BJRUNSPEED   2048
59 #define BJJUMPSPEED  680
60 #define PROJECTILESIZE 0xc000l
61 
62 #define MOVESCALE       150l
63 #define BACKMOVESCALE   100l
64 #define EXTRAPOINTS     40000
65 #define JETPACKTHRUST (64)
66 
67 #define RUNMOVE      0xa00
68 #define BASEMOVE     0x600
69 #define ANGLEMOVE    0x100000
70 
71 #define SGN(x)                 (x>0 ? 1 : -1)
72 #define NETMOM    (BASEMOVE+0x10000)
73 
74 #define DISTANCE(x1,x2,y1,y2)   (FixedMulShift((x1-x2),(x1-x2),16)+FixedMulShift((y1-y2),(y1-y2),16))
75 
76 #define TILTLIMIT     95
77 #define PLAYERSTEPTIME 0xf000
78 
79 #define HITWALLSPEED  0x2800
80 #define GODVIEWANGLE  FINEANGLES/150
81 #define GODOFFSET     10
82 #define DOGOFFSET     46
83 #define KESTICS       70
84 #define BBTIME        105
85 
86 #define KEYBOARDNORMALTURNAMOUNT (0x160000)
87 //#define KEYBOARDPREAMBLETURNAMOUNT (0xe0000)
88 #define KEYBOARDPREAMBLETURNAMOUNT (0xa0000)
89 #define TURBOTURNTIME      (5)
90 #define TURBOTURNAMOUNT    (0x1e000)
91 #define TURNAROUNDSPEED   ((ANG180<<16)/15)
92 
93 #define VR_INPUT_SERVICE (0x30)
94 #define VR_FEEDBACK_SERVICE (0x31)
95 
96 #define VR_RUNBUTTON         (0)
97 #define VR_STRAFELEFTBUTTON  (1)
98 #define VR_STRAFERIGHTBUTTON (2)
99 #define VR_ATTACKBUTTON      (3)
100 #define VR_LOOKUPBUTTON      (4)
101 #define VR_LOOKDOWNBUTTON    (5)
102 #define VR_SWAPWEAPONBUTTON  (6)
103 #define VR_USEBUTTON         (7)
104 #define VR_HORIZONUPBUTTON   (8)
105 #define VR_HORIZONDOWNBUTTON (9)
106 #define VR_MAPBUTTON         (10)
107 #define VR_PISTOLBUTTON      (11)
108 #define VR_DUALPISTOLBUTTON  (12)
109 #define VR_MP40BUTTON        (13)
110 #define VR_MISSILEWEAPONBUTTON (14)
111 #define VR_RECORDBUTTON      (15)
112 
113 #define STEPADJUST 3
114 void BatAttack(objtype*ob);
115 void  T_DogLick (objtype *ob);
116 #endif
117