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
7d7c4678
Commit
7d7c4678
authored
Apr 19, 2000
by
Steven Fuller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More cleanups, id_in.c ready
parent
abf4a36f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
512 deletions
+62
-512
id_in.c
src/id_in.c
+43
-447
id_in.h
src/id_in.h
+5
-23
id_sd.c
src/id_sd.c
+3
-38
misc.h
src/misc.h
+3
-0
wl_main.c
src/wl_main.c
+8
-4
No files found.
src/id_in.c
View file @
7d7c4678
This diff is collapsed.
Click to expand it.
src/id_in.h
View file @
7d7c4678
//
// ID Engine
// ID_IN.h - Header file for Input Manager
// v1.0d1
// By Jason Blochowiak
//
#ifndef __ID_IN__
#define __ID_IN__
#ifndef __ID_IN_H__
#define __ID_IN_H__
#define MaxPlayers 4
#define MaxKbds 2
#define MaxJoys 2
#define NumCodes 128
...
...
@@ -105,12 +97,8 @@ typedef byte ScanCode;
#define MouseInt 0x33
#define Mouse(x) _AX = x,geninterrupt(MouseInt)
typedef
enum
{
demo_Off
,
demo_Record
,
demo_Playback
,
demo_PlayDone
}
Demo
;
typedef
enum
{
ctrl_Keyboard
,
ctrl_Keyboard1
=
ctrl_Keyboard
,
ctrl_Keyboard2
,
ctrl_Joystick
,
ctrl_Joystick1
=
ctrl_Joystick
,
ctrl_Joystick2
,
ctrl_Mouse
...
...
@@ -159,10 +147,6 @@ extern KeyboardDef KbdDefs;
extern
JoystickDef
JoyDefs
[];
extern
ControlType
Controls
[
MaxPlayers
];
extern
Demo
DemoMode
;
extern
byte
*
DemoBuffer
;
extern
word
DemoOffset
,
DemoSize
;
// Function prototypes
#define IN_KeyDown(code) (Keyboard[(code)])
#define IN_ClearKey(code) {Keyboard[code] = false; \
...
...
@@ -173,18 +157,14 @@ extern void IN_Startup(void),IN_Shutdown(void),
IN_Default
(
boolean
gotit
,
ControlType
in
),
IN_SetKeyHook
(
void
(
*
)()),
IN_ClearKeysDown
(
void
),
IN_ReadCursor
(
CursorInfo
*
),
IN_ReadControl
(
int
,
ControlInfo
*
),
IN_SetControlType
(
int
,
ControlType
),
IN_GetJoyAbs
(
word
joy
,
word
*
xp
,
word
*
yp
),
IN_SetupJoy
(
word
joy
,
word
minx
,
word
maxx
,
word
miny
,
word
maxy
),
IN_StopDemo
(
void
),
IN_FreeDemoBuffer
(
void
),
IN_Ack
(
void
),
IN_AckBack
(
void
);
IN_Ack
(
void
);
extern
boolean
IN_UserInput
(
longword
delay
);
extern
char
IN_WaitForASCII
(
void
);
extern
ScanCode
IN_WaitForKey
(
void
);
extern
word
IN_GetJoyButtonsDB
(
word
joy
);
extern
byte
*
IN_GetScanName
(
ScanCode
);
...
...
@@ -195,4 +175,6 @@ void INL_GetJoyDelta(word joy,int *dx,int *dy);
void
IN_StartAck
(
void
);
boolean
IN_CheckAck
(
void
);
#elif
#error "fix me TODO"
#endif
src/id_sd.c
View file @
7d7c4678
//
// ID Engine
// ID_SD.c - Sound Manager for Wolfenstein 3D
// v1.2
// By Jason Blochowiak
//
//
// This module handles dealing with generating sound on the appropriate
// hardware
//
// Depends on: User Mgr (for parm checking)
//
// Globals:
// For User Mgr:
// SoundSourcePresent - Sound Source thingie present?
// SoundBlasterPresent - SoundBlaster card present?
// AdLibPresent - AdLib card present?
// SoundMode - What device is used for sound effects
// (Use SM_SetSoundMode() to set)
// MusicMode - What device is used for music
// (Use SM_SetMusicMode() to set)
// DigiMode - What device is used for digitized sound effects
// (Use SM_SetDigiDevice() to set)
//
// For Cache Mgr:
// NeedsDigitized - load digitized sounds?
// NeedsMusic - load music?
//
/* id_sd.c */
#include <dos.h>
#include "id_heads.h"
#ifdef nil
#undef nil
#endif
#define nil 0
#define SDL_SoundFinished() {SoundNumber = SoundPriority = 0;}
// Macros for SoundBlaster stuff
...
...
@@ -92,7 +58,6 @@ static void (*SoundUserHook)(void);
soundnames
SoundNumber
,
DigiNumber
;
word
SoundPriority
,
DigiPriority
;
int
LeftPosition
,
RightPosition
;
void
interrupt
(
*
t0OldService
)(
void
);
long
LocalTime
;
word
TimerRate
;
...
...
@@ -106,9 +71,9 @@ static word DigiNextLen;
// SoundBlaster variables
static
boolean
sbNoCheck
,
sbNoProCheck
;
static
volatile
boolean
sbSamplePlaying
;
static
boolean
sbSamplePlaying
;
static
byte
sbOldIntMask
=
-
1
;
static
volatile
byte
*
sbNextSegPtr
;
static
byte
*
sbNextSegPtr
;
static
byte
sbDMA
=
1
,
sbDMAa1
=
0x83
,
sbDMAa2
=
2
,
sbDMAa3
=
3
,
sba1Vals
[]
=
{
0x87
,
0x83
,
0
,
0x82
},
...
...
src/misc.h
View file @
7d7c4678
#ifndef __MISC_H__
#define __MISC_H__
extern
int
_argc
;
extern
char
**
_argv
;
long
filelength
(
int
handle
);
#elif
...
...
src/wl_main.c
View file @
7d7c4678
/* wl_main.c */
#include <conio.h>
#include "wl_def.h"
/*
=============================================================================
...
...
@@ -61,8 +59,11 @@ void Quit (char *error);
boolean
startgame
,
loadedgame
,
virtualreality
;
int
mouseadjustment
;
char
configname
[
13
]
=
"CONFIG."
;
char
configname
[
13
]
=
"config."
;
int
_argc
;
char
**
argv
;
/*
=============================================================================
...
...
@@ -1525,10 +1526,13 @@ void DemoLoop (void)
==========================
*/
void
main
(
void
)
void
main
(
int
argc
,
char
*
argv
[]
)
{
int
i
;
_argc
=
argc
;
_argv
=
argv
;
CheckForEpisodes
();
InitGame
();
...
...
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