diff options
author | Matthew Wozniak <sirtomato99@gmail.com> | 2024-09-14 22:45:35 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2024-09-14 22:45:35 +0100 |
commit | 5f208d6820f42ab138a3c7144728787bd988004c (patch) | |
tree | df60f43d4d586fcfc19869182c704617bb485d2f /src/engineapi.h | |
parent | 2b6420f04623f0f168148fc858bcf10ffbd01765 (diff) |
Add basic button input HUD
Committer's note: this is heavily modified from the original code
contributed by woz (and somewhat improved by bill and aciidz). Copyright
notices reflect joint authorship accordingly. woz still gets commit
authorship though because it feels wrong to yoink that from someone. :^)
And yes, the original code was written in 2022. Time flies.
A lot of the code is still kind of hacky and ugly and I'd like to
improve it later but there's other things to do so that can wait.
Diffstat (limited to 'src/engineapi.h')
-rw-r--r-- | src/engineapi.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/engineapi.h b/src/engineapi.h index 4f96b73..308e34e 100644 --- a/src/engineapi.h +++ b/src/engineapi.h @@ -154,6 +154,33 @@ struct CServerPlugin /* : IServerPluginHelpers */ { }; extern struct CServerPlugin *pluginhandler; +// input button bits +#define IN_ATTACK (1 << 0) +#define IN_JUMP (1 << 1) +#define IN_DUCK (1 << 2) +#define IN_FORWARD (1 << 3) +#define IN_BACK (1 << 4) +#define IN_USE (1 << 5) +#define IN_CANCEL (1 << 6) +#define IN_LEFT (1 << 7) +#define IN_RIGHT (1 << 8) +#define IN_MOVELEFT (1 << 9) +#define IN_MOVERIGHT (1 << 10) +#define IN_ATTACK2 (1 << 11) +#define IN_RUN (1 << 12) +#define IN_RELOAD (1 << 13) +#define IN_ALT1 (1 << 14) +#define IN_ALT2 (1 << 15) +#define IN_SCORE (1 << 16) +#define IN_SPEED (1 << 17) +#define IN_WALK (1 << 18) +#define IN_ZOOM (1 << 19) +#define IN_WEAPON1 (1 << 20) +#define IN_WEAPON2 (1 << 21) +#define IN_BULLRUSH (1 << 22) +#define IN_GRENADE1 (1 << 23) +#define IN_GRENADE2 (1 << 24) + /* * Called on plugin init to attempt to initialise various core interfaces. * This includes console/cvar initialisation and populating gametype and |