Debian Codegraph @

prboom2/src/dsda/tracker.h

raw
1 //
2 // Copyright(C) 2022 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 Tracker
16 //
17
18 #ifndef __DSDA_TRACKER__
19 #define __DSDA_TRACKER__
20
21 #include "p_mobj.h"
22
23 #define TRACKER_LIMIT 16
24
25 typedef enum {
26 dsda_tracker_nothing,
27 dsda_tracker_line,
28 dsda_tracker_line_distance,
29 dsda_tracker_sector,
30 dsda_tracker_mobj,
31 dsda_tracker_player,
32 } dsda_tracker_type_t;
33
34 typedef struct {
35 dsda_tracker_type_t type;
36 int id;
37 mobj_t* mobj;
38 } dsda_tracker_t;
39
40 dboolean dsda_TrackLine(int id);
41 dboolean dsda_UntrackLine(int id);
42 dboolean dsda_TrackLineDistance(int id);
43 dboolean dsda_UntrackLineDistance(int id);
44 dboolean dsda_TrackSector(int id);
45 dboolean dsda_UntrackSector(int id);
46 dboolean dsda_TrackMobj(int id);
47 dboolean dsda_UntrackMobj(int id);
48 dboolean dsda_TrackPlayer(int id);
49 dboolean dsda_UntrackPlayer(int id);
50 void dsda_WipeTrackers(void);
51 void dsda_ResetTrackers(void);
52 mobj_t* dsda_FindMobj(int id);
53
54 #endif