Debian Codegraph @

prboom2/src/dsda/aim.h

raw
1 //
2 // Copyright(C) 2024 by Ryan Krafnick
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. See the
12 // GNU General Public License for more details.
13 //
14 // DESCRIPTION:
15 // DSDA Aim
16 //
17
18 #ifndef __DSDA_AIM__
19 #define __DSDA_AIM__
20
21 #include "d_player.h"
22
23 typedef struct {
24 angle_t angle;
25 fixed_t slope;
26 fixed_t z_offset;
27 } aim_t;
28
29 angle_t dsda_PlayerPitch(player_t* player);
30 fixed_t dsda_PlayerSlope(player_t* player);
31 int dsda_PitchToLookDir(angle_t pitch);
32 angle_t dsda_LookDirToPitch(int lookdir);
33 int dsda_PlayerLookDir(player_t* player);
34 void dsda_PlayerAim(mobj_t* source, angle_t angle, aim_t* aim, uint64_t target_mask);
35 void dsda_PlayerAimBad(mobj_t* source, angle_t angle, aim_t* aim, uint64_t target_mask);
36
37 #endif