Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
EDuke32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
93
Issues
93
List
Boards
Labels
Service Desk
Milestones
Merge Requests
9
Merge Requests
9
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Richard Gobeille
EDuke32
Commits
320f5341
Commit
320f5341
authored
Aug 16, 2020
by
Richard Gobeille
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Duke3d: add SK_WEAPON_MASK macro, comprised of the four SK_WEAPON_BITS values
parent
95078053
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
2 deletions
+3
-2
source/duke3d/src/macros.h
source/duke3d/src/macros.h
+1
-0
source/duke3d/src/player.cpp
source/duke3d/src/player.cpp
+1
-1
source/duke3d/src/sector.cpp
source/duke3d/src/sector.cpp
+1
-1
No files found.
source/duke3d/src/macros.h
View file @
320f5341
...
...
@@ -77,6 +77,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#define SK_WEAPON_BITS1 9
#define SK_WEAPON_BITS2 10
#define SK_WEAPON_BITS3 11
#define SK_WEAPON_MASK ((1 << SK_WEAPON_BITS) | (1 << SK_WEAPON_BITS1) | (1 << SK_WEAPON_BITS2) | (1 << SK_WEAPON_BITS3))
#define SK_STEROIDS 12
#define SK_LOOK_UP 13
#define SK_LOOK_DOWN 14
...
...
source/duke3d/src/player.cpp
View file @
320f5341
...
...
@@ -3192,7 +3192,7 @@ void P_GetInput(int const playerNum)
else
if
(
weaponSelection
==
gamefunc_Weapon_1
-
1
)
weaponSelection
=
0
;
if
(
(
localInput
.
bits
&
0xf00
)
==
0
)
if
(
weaponSelection
&&
(
localInput
.
bits
&
SK_WEAPON_MASK
)
==
0
)
localInput
.
bits
|=
(
weaponSelection
<<
SK_WEAPON_BITS
);
localInput
.
bits
|=
(
BUTTON
(
gamefunc_Fire
)
<<
SK_FIRE
);
...
...
source/duke3d/src/sector.cpp
View file @
320f5341
...
...
@@ -2788,7 +2788,7 @@ CHECKINV1:
}
}
weaponNum
=
((
playerBits
&
(
15
<<
SK_WEAPON_BITS
)
)
>>
SK_WEAPON_BITS
)
-
1
;
weaponNum
=
((
playerBits
&
SK_WEAPON_MASK
)
>>
SK_WEAPON_BITS
)
-
1
;
switch
((
int32_t
)
weaponNum
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment