Debian Codegraph @

prboom2/src/dsda/scroll.h

raw
1 //
2 // Copyright(C) 2023 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 Scroll
16 //
17
18 #ifndef __DSDA_SCROLL__
19 #define __DSDA_SCROLL__
20
21 #include "d_think.h"
22
23 #define SCROLL_TOP 0x01
24 #define SCROLL_MID 0x02
25 #define SCROLL_BOTTOM 0x04
26
27 #define SCROLL_TEXTURE 0x01
28 #define SCROLL_STATIC 0x02
29 #define SCROLL_PLAYER 0x04
30 #define SCROLL_MONSTER 0x08
31
32 #define THRUST_STATIC 0x01
33 #define THRUST_PLAYER 0x02
34 #define THRUST_MONSTER 0x04
35 #define THRUST_PROJECTILE 0x08
36 #define THRUST_WINDTHRUST 0x10
37
38 #define THRUST_GROUNDED 0x20
39 #define THRUST_AIRBORNE 0x40
40 #define THRUST_CEILING 0x80
41
42 #define THRUST_LOCATION_SHIFT 5
43
44 typedef struct {
45 thinker_t thinker;
46 fixed_t dx;
47 fixed_t dy;
48 int affectee;
49 int flags;
50 } scroll_t;
51
52 typedef struct {
53 scroll_t scroll;
54 int control;
55 fixed_t last_height;
56 fixed_t vdx;
57 fixed_t vdy;
58 int accel;
59 } control_scroll_t;
60
61 void dsda_UpdateControlSideScroller(control_scroll_t* s);
62 void dsda_UpdateSideScroller(scroll_t* s);
63 void dsda_UpdateControlFloorScroller(control_scroll_t* s);
64 void dsda_UpdateFloorScroller(scroll_t* s);
65 void dsda_UpdateControlCeilingScroller(control_scroll_t* s);
66 void dsda_UpdateCeilingScroller(scroll_t* s);
67 void dsda_UpdateControlFloorCarryScroller(control_scroll_t* s);
68 void dsda_UpdateFloorCarryScroller(scroll_t* s);
69 void dsda_UpdateZDoomFloorScroller(scroll_t* s);
70 void dsda_UpdateZDoomCeilingScroller(scroll_t* s);
71 void dsda_UpdateThruster(scroll_t* s);
72
73 void dsda_AddSideScroller(fixed_t dx, fixed_t dy, int affectee, int flags);
74 void dsda_AddControlSideScroller(fixed_t dx, fixed_t dy,
75 int control, int affectee, int accel, int flags);
76 void dsda_AddFloorScroller(fixed_t dx, fixed_t dy, int affectee, int flags);
77 void dsda_AddControlFloorScroller(fixed_t dx, fixed_t dy,
78 int control, int affectee, int accel, int flags);
79 void dsda_AddCeilingScroller(fixed_t dx, fixed_t dy, int affectee, int flags);
80 void dsda_AddControlCeilingScroller(fixed_t dx, fixed_t dy,
81 int control, int affectee, int accel, int flags);
82 void dsda_AddFloorCarryScroller(fixed_t dx, fixed_t dy, int affectee, int flags);
83 void dsda_AddControlFloorCarryScroller(fixed_t dx, fixed_t dy,
84 int control, int affectee, int accel, int flags);
85 void dsda_AddZDoomFloorScroller(fixed_t dx, fixed_t dy, int affectee, int flags);
86 void dsda_AddZDoomCeilingScroller(fixed_t dx, fixed_t dy, int affectee, int flags);
87 void dsda_AddThruster(fixed_t dx, fixed_t dy, int affectee, int flags);
88
89 #endif