Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wolf3d
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PocketInsanity
wolf3d
Commits
bcd61803
Commit
bcd61803
authored
Apr 24, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some cleanups on id_in
parent
2bb2fbd9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
57 deletions
+16
-57
IDEAS
src/IDEAS
+1
-0
id_in.c
src/id_in.c
+4
-34
id_in.h
src/id_in.h
+10
-22
wl_text.c
src/wl_text.c
+1
-1
No files found.
src/IDEAS
View file @
bcd61803
...
@@ -22,3 +22,4 @@
...
@@ -22,3 +22,4 @@
* Have some sort of way of playing both digital and adlib sounds on all
* Have some sort of way of playing both digital and adlib sounds on all
platforms...
platforms...
* Test with other (compatible) available mods
* Test with other (compatible) available mods
* Unified input handling
src/id_in.c
View file @
bcd61803
...
@@ -15,21 +15,19 @@
...
@@ -15,21 +15,19 @@
//
//
boolean
MousePresent
;
boolean
MousePresent
;
boolean
JoysPresent
[
MaxJoys
];
boolean
JoysPresent
[
MaxJoys
];
boolean
JoyPadPresent
;
// Global variables
// Global variables
boolean
Keyboard
[
NumCodes
];
boolean
Keyboard
[
NumCodes
];
boolean
Paused
;
boolean
Paused
;
char
LastASCII
;
char
LastASCII
;
ScanCode
LastScan
;
ScanCode
LastScan
;
/*
KeyboardDef KbdDefs = {0x1d,0x38,0x47,0x48,0x49,0x4b,0x4d,0x4f,0x50,0x51};
*/
KeyboardDef
KbdDefs
=
{
sc_Control
,
sc_Alt
,
sc_Home
,
sc_UpArrow
,
sc_PgUp
,
sc_LeftArrow
,
sc_RightArrow
,
sc_End
,
sc_DownArrow
,
sc_PgDn
};
KeyboardDef
KbdDefs
=
{
0x1d
,
0x38
,
0x47
,
0x48
,
0x49
,
0x4b
,
0x4d
,
0x4f
,
0x50
,
0x51
};
JoystickDef
JoyDefs
[
MaxJoys
];
ControlType
Controls
[
MaxPlayers
];
ControlType
Controls
[
MaxPlayers
];
longword
MouseDownCount
;
/*
/*
=============================================================================
=============================================================================
...
@@ -434,34 +432,6 @@ void IN_ReadControl(int player,ControlInfo *info)
...
@@ -434,34 +432,6 @@ void IN_ReadControl(int player,ControlInfo *info)
}
}
///////////////////////////////////////////////////////////////////////////
//
// IN_SetControlType() - Sets the control type to be used by the specified
// player
//
///////////////////////////////////////////////////////////////////////////
void
IN_SetControlType
(
int
player
,
ControlType
type
)
{
// DEBUG - check that requested type is present?
Controls
[
player
]
=
type
;
}
///////////////////////////////////////////////////////////////////////////
//
// IN_WaitForASCII() - Waits for an ASCII char, then clears LastASCII and
// returns the ASCII value
//
///////////////////////////////////////////////////////////////////////////
char
IN_WaitForASCII
(
void
)
{
char
result
;
while
(
!
(
result
=
LastASCII
))
;
LastASCII
=
'\0'
;
return
(
result
);
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
//
//
// IN_Ack() - waits for a button or key press. If a button is down, upon
// IN_Ack() - waits for a button or key press. If a button is down, upon
...
...
src/id_in.h
View file @
bcd61803
...
@@ -19,10 +19,19 @@ typedef byte ScanCode;
...
@@ -19,10 +19,19 @@ typedef byte ScanCode;
#define sc_CapsLock 0x3a
#define sc_CapsLock 0x3a
#define sc_LShift 0x2a
#define sc_LShift 0x2a
#define sc_RShift 0x36
#define sc_RShift 0x36
#define sc_UpArrow 0x48
/* TODO: have all these defines map into system specific values */
/*
#define sc_UpArrow 0x48
#define sc_DownArrow 0x50
#define sc_DownArrow 0x50
#define sc_LeftArrow 0x4b
#define sc_LeftArrow 0x4b
#define sc_RightArrow 0x4d
#define sc_RightArrow 0x4d
*/
#define sc_UpArrow 103
#define sc_DownArrow 108
#define sc_LeftArrow 105
#define sc_RightArrow 106
#define sc_Insert 0x52
#define sc_Insert 0x52
#define sc_Delete 0x53
#define sc_Delete 0x53
#define sc_Home 0x47
#define sc_Home 0x47
...
@@ -81,13 +90,6 @@ typedef byte ScanCode;
...
@@ -81,13 +90,6 @@ typedef byte ScanCode;
#define sc_Z 0x2c
#define sc_Z 0x2c
#define key_None 0
#define key_None 0
#define key_Return 0x0d
#define key_Enter key_Return
#define key_Escape 0x1b
#define key_Space 0x20
#define key_BackSpace 0x08
#define key_Tab 0x09
#define key_Delete 0x7f
typedef
enum
{
typedef
enum
{
ctrl_Keyboard
,
ctrl_Keyboard
,
...
@@ -120,14 +122,6 @@ typedef struct {
...
@@ -120,14 +122,6 @@ typedef struct {
left
,
right
,
left
,
right
,
downleft
,
down
,
downright
;
downleft
,
down
,
downright
;
}
KeyboardDef
;
}
KeyboardDef
;
typedef
struct
{
word
joyMinX
,
joyMinY
,
threshMinX
,
threshMinY
,
threshMaxX
,
threshMaxY
,
joyMaxX
,
joyMaxY
,
joyMultXL
,
joyMultYL
,
joyMultXH
,
joyMultYH
;
}
JoystickDef
;
// Global variables
// Global variables
extern
boolean
Keyboard
[],
extern
boolean
Keyboard
[],
MousePresent
,
MousePresent
,
...
@@ -136,7 +130,6 @@ extern boolean Paused;
...
@@ -136,7 +130,6 @@ extern boolean Paused;
extern
char
LastASCII
;
extern
char
LastASCII
;
extern
ScanCode
LastScan
;
extern
ScanCode
LastScan
;
extern
KeyboardDef
KbdDefs
;
extern
KeyboardDef
KbdDefs
;
extern
JoystickDef
JoyDefs
[];
extern
ControlType
Controls
[
MaxPlayers
];
extern
ControlType
Controls
[
MaxPlayers
];
// Function prototypes
// Function prototypes
...
@@ -144,19 +137,14 @@ extern ControlType Controls[MaxPlayers];
...
@@ -144,19 +137,14 @@ extern ControlType Controls[MaxPlayers];
#define IN_ClearKey(code) {Keyboard[code] = false; \
#define IN_ClearKey(code) {Keyboard[code] = false; \
if (code == LastScan) LastScan = sc_None;}
if (code == LastScan) LastScan = sc_None;}
// DEBUG - put names in prototypes
extern
void
IN_Startup
(
void
),
IN_Shutdown
(
void
),
extern
void
IN_Startup
(
void
),
IN_Shutdown
(
void
),
IN_Default
(
boolean
gotit
,
ControlType
in
),
IN_SetKeyHook
(
void
(
*
)()),
IN_ClearKeysDown
(
void
),
IN_ClearKeysDown
(
void
),
IN_ReadControl
(
int
,
ControlInfo
*
),
IN_ReadControl
(
int
,
ControlInfo
*
),
IN_SetControlType
(
int
,
ControlType
),
IN_GetJoyAbs
(
word
joy
,
word
*
xp
,
word
*
yp
),
IN_GetJoyAbs
(
word
joy
,
word
*
xp
,
word
*
yp
),
IN_SetupJoy
(
word
joy
,
word
minx
,
word
maxx
,
IN_SetupJoy
(
word
joy
,
word
minx
,
word
maxx
,
word
miny
,
word
maxy
),
word
miny
,
word
maxy
),
IN_Ack
(
void
);
IN_Ack
(
void
);
extern
boolean
IN_UserInput
(
longword
delay
);
extern
boolean
IN_UserInput
(
longword
delay
);
extern
char
IN_WaitForASCII
(
void
);
extern
byte
*
IN_GetScanName
(
ScanCode
);
extern
byte
*
IN_GetScanName
(
ScanCode
);
...
...
src/wl_text.c
View file @
bcd61803
...
@@ -54,7 +54,7 @@ unsigned leftmargin[TEXTROWS],rightmargin[TEXTROWS];
...
@@ -54,7 +54,7 @@ unsigned leftmargin[TEXTROWS],rightmargin[TEXTROWS];
char
*
text
;
char
*
text
;
unsigned
rowon
;
unsigned
rowon
;
int
picx
,
picy
,
picnum
,
picdelay
;
int
picx
,
picy
,
picnum
,
picdelay
;
boolean
layoutdone
;
boolean
layoutdone
;
//===========================================================================
//===========================================================================
...
...
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