Debian Codegraph @

prboom2/src/dsda/skill_info.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 Skill Info
16 //
17
18 #ifndef __DSDA_SKILL_INFO__
19 #define __DSDA_SKILL_INFO__
20
21 #include "doomdef.h"
22 #include "m_fixed.h"
23
24 #define SI_SPAWN_MULTI 0x0001
25 #define SI_FAST_MONSTERS 0x0002
26 #define SI_INSTANT_REACTION 0x0004
27 #define SI_DISABLE_CHEATS 0x0008
28 #define SI_NO_PAIN 0x0010
29 #define SI_DEFAULT_SKILL 0x0020
30 #define SI_PLAYER_RESPAWN 0x0080
31 #define SI_EASY_BOSS_BRAIN 0x0100
32 #define SI_MUST_CONFIRM 0x0200
33 #define SI_AUTO_USE_HEALTH 0x0400
34
35 typedef uint16_t skill_info_flags_t;
36
37 typedef struct {
38 fixed_t ammo_factor;
39 fixed_t damage_factor;
40 fixed_t armor_factor;
41 fixed_t health_factor;
42 fixed_t monster_health_factor;
43 fixed_t friend_health_factor;
44 int respawn_time;
45 int spawn_filter;
46 char key;
47 const char* must_confirm;
48 const char* name;
49 const char* pic_name;
50 int text_color;
51 skill_info_flags_t flags;
52 } skill_info_t;
53
54 extern skill_info_t skill_info;
55 extern skill_info_t *skill_infos;
56
57 extern int num_skills;
58
59 void dsda_InitSkills(void);
60 void dsda_RefreshGameSkill(void);
61 void dsda_UpdateGameSkill(int skill);
62 void dsda_AlterGameFlags(void);
63 void dsda_InitGameModifiers(void);
64 void dsda_ResetGameModifiers(void);
65 void dsda_RefreshPistolStart(void);
66 void dsda_RefreshAlwaysPistolStart(void);
67
68 #endif