Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
SRB2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
STJr
SRB2
Commits
870ee893
Commit
870ee893
authored
6 years ago
by
Marco Z
Browse files
Options
Downloads
Plain Diff
Merge branch 'control-selector' into tutorial-time
parents
7ec4a42d
1d86cc34
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/g_input.c
+24
-10
24 additions, 10 deletions
src/g_input.c
src/g_input.h
+19
-13
19 additions, 13 deletions
src/g_input.h
with
43 additions
and
23 deletions
src/g_input.c
+
24
−
10
View file @
870ee893
...
...
@@ -48,30 +48,44 @@ INT32 gamecontrolbis[num_gamecontrols][2]; // secondary splitscreen player
INT32
gamecontroldefault
[
num_gamecontrolschemes
][
num_gamecontrols
][
2
];
// default control storage, use 0 (gcs_custom) for memory retention
// lists of GC codes for selective operation
const
INT32
gclist_tutorial
[
num_gclist_tutorial
]
=
{
const
INT32
gcl_tutorial_check
[
num_gcl_tutorial_check
]
=
{
gc_forward
,
gc_backward
,
gc_strafeleft
,
gc_straferight
,
gc_turnleft
,
gc_turnright
};
const
INT32
gcl_tutorial_used
[
num_gcl_tutorial_used
]
=
{
gc_forward
,
gc_backward
,
gc_strafeleft
,
gc_straferight
,
gc_turnleft
,
gc_turnright
,
gc_jump
,
gc_use
};
const
INT32
gcl_tutorial_full
[
num_gcl_tutorial_full
]
=
{
gc_forward
,
gc_backward
,
gc_strafeleft
,
gc_straferight
,
gc_lookup
,
gc_lookdown
,
gc_turnleft
,
gc_turnright
,
gc_centerview
,
gc_jump
,
gc_use
,
gc_fire
,
gc_firenormal
};
const
INT32
gclist_tutorial_check
[
num_gclist_tutorial_check
]
=
{
gc_forward
,
gc_backward
,
gc_strafeleft
,
gc_straferight
,
gc_turnleft
,
gc_turnright
const
INT32
gcl_movement
[
num_gcl_movement
]
=
{
gc_forward
,
gc_backward
,
gc_strafeleft
,
gc_straferight
};
const
INT32
gcl
ist_movement
[
num_gclist_movement
]
=
{
gc_
forward
,
gc_backward
,
gc_strafe
left
,
gc_
strafe
right
const
INT32
gcl
_camera
[
num_gcl_camera
]
=
{
gc_
turn
left
,
gc_
turn
right
};
const
INT32
gclist_camera
[
num_gclist_camera
]
=
{
const
INT32
gcl_movement_camera
[
num_gcl_movement_camera
]
=
{
gc_forward
,
gc_backward
,
gc_strafeleft
,
gc_straferight
,
gc_turnleft
,
gc_turnright
//gc_lookup, gc_lookdown, gc_turnleft, gc_turnright
};
const
INT32
gclist_jump
[
num_gclist_jump
]
=
{
gc_jump
};
const
INT32
gcl_jump
[
num_gcl_jump
]
=
{
gc_jump
};
const
INT32
gcl_use
[
num_gcl_use
]
=
{
gc_use
};
const
INT32
gclist_use
[
num_gclist_use
]
=
{
gc_use
};
const
INT32
gcl_jump_use
[
num_gcl_jump_use
]
=
{
gc_jump
,
gc_use
};
typedef
struct
{
...
...
This diff is collapsed.
Click to expand it.
src/g_input.h
+
19
−
13
View file @
870ee893
...
...
@@ -128,19 +128,25 @@ extern INT32 gamecontroldefault[num_gamecontrolschemes][num_gamecontrols][2]; //
#define PLAYER1INPUTDOWN(gc) (gamekeydown[gamecontrol[gc][0]] || gamekeydown[gamecontrol[gc][1]])
#define PLAYER2INPUTDOWN(gc) (gamekeydown[gamecontrolbis[gc][0]] || gamekeydown[gamecontrolbis[gc][1]])
#define num_gclist_tutorial 13
#define num_gclist_tutorial_check 6
#define num_gclist_movement 4
#define num_gclist_camera 2
#define num_gclist_jump 1
#define num_gclist_use 1
extern
const
INT32
gclist_tutorial
[
num_gclist_tutorial
];
extern
const
INT32
gclist_tutorial_check
[
num_gclist_tutorial_check
];
extern
const
INT32
gclist_movement
[
num_gclist_movement
];
extern
const
INT32
gclist_camera
[
num_gclist_camera
];
extern
const
INT32
gclist_jump
[
num_gclist_jump
];
extern
const
INT32
gclist_use
[
num_gclist_use
];
#define num_gcl_tutorial_check 6
#define num_gcl_tutorial_used 8
#define num_gcl_tutorial_full 13
#define num_gcl_movement 4
#define num_gcl_camera 2
#define num_gcl_movement_camera 6
#define num_gcl_jump 1
#define num_gcl_use 1
#define num_gcl_jump_use 2
extern
const
INT32
gcl_tutorial_check
[
num_gcl_tutorial_check
];
extern
const
INT32
gcl_tutorial_used
[
num_gcl_tutorial_used
];
extern
const
INT32
gcl_tutorial_full
[
num_gcl_tutorial_full
];
extern
const
INT32
gcl_movement
[
num_gcl_movement
];
extern
const
INT32
gcl_camera
[
num_gcl_camera
];
extern
const
INT32
gcl_movement_camera
[
num_gcl_movement_camera
];
extern
const
INT32
gcl_jump
[
num_gcl_jump
];
extern
const
INT32
gcl_use
[
num_gcl_use
];
extern
const
INT32
gcl_jump_use
[
num_gcl_jump_use
];
// peace to my little coder fingers!
// check a gamecontrol being active or not
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment