Commit 7d7c4678 authored by Steven Fuller's avatar Steven Fuller

More cleanups, id_in.c ready

parent abf4a36f
This diff is collapsed.
//
// 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
//
// 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},
......
#ifndef __MISC_H__
#define __MISC_H__
extern int _argc;
extern char **_argv;
long filelength(int handle);
#elif
......
/* 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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment