-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathi_system.h
136 lines (110 loc) · 3.8 KB
/
i_system.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id: i_system.h,v 1.2 2000-08-12 21:29:28 fraggle Exp $
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// DESCRIPTION:
// System specific interface stuff.
//
//-----------------------------------------------------------------------------
#ifndef __I_SYSTEM__
#define __I_SYSTEM__
#include "d_ticcmd.h"
// Called by DoomMain.
void I_Init(void);
// Called by D_DoomLoop,
// returns current time in tics.
// int I_GetTime (void);
int (*I_GetTime)(); // killough
int I_GetTime_RealTime(); // killough
int I_GetTime_Adaptive(void); // killough 4/10/98
extern int GetTime_Scale;
//
// Called by D_DoomLoop,
// called before processing any tics in a frame
// (just after displaying a frame).
// Time consuming syncronous operations
// are performed here (joystick reading).
// Can call D_PostEvent.
//
void I_StartFrame (void);
//
// Called by D_DoomLoop,
// called before processing each tic in a frame.
// Quick syncronous operations are performed here.
// Can call D_PostEvent.
void I_StartTic (void);
// Asynchronous interrupt functions should maintain private queues
// that are read by the synchronous functions
// to be converted into events.
// Either returns a null ticcmd,
// or calls a loadable driver to build it.
// This ticcmd will then be modified by the gameloop
// for normal input.
ticcmd_t* I_BaseTiccmd (void);
// atexit handler -- killough
void I_Quit (void);
// Allocates from low memory under dos, just mallocs under unix
#define I_AllocLow(length) calloc((length),1) /* killough */
#define I_Tactile(on, off, total)
// killough 3/20/98: add const
// killough 4/25/98: add gcc attributes
void I_Error(const char *error, ...) __attribute__((format(printf,1,2)));
extern int mousepresent; // killough
extern int leds_always_off; // killough 10/98
void I_ResetLEDs(void); // killough 10/98
void I_EndDoom(void); // killough 2/22/98: endgame screen
// killough 3/21/98: keyboard queue
#define KQSIZE 256
extern struct keyboard_queue_s {
volatile int head,tail,queue[KQSIZE];
} keyboard_queue;
#endif
//----------------------------------------------------------------------------
//
// $Log: i_system.h,v $
// Revision 1.2 2000-08-12 21:29:28 fraggle
// change license header
//
// Revision 1.1.1.1 2000/07/29 13:20:41 fraggle
// imported sources
//
// Revision 1.7 1998/05/03 22:33:43 killough
// beautification, remove unnecessary #includes
//
// Revision 1.6 1998/04/27 01:52:47 killough
// Add __attribute__ to I_Error for gcc checking
//
// Revision 1.5 1998/04/10 06:34:07 killough
// Add adaptive gametic timer
//
// Revision 1.4 1998/03/23 03:17:19 killough
// Add keyboard FIFO queue and make I_Error arg const
//
// Revision 1.3 1998/02/23 04:28:30 killough
// Add ENDOOM support
//
// Revision 1.2 1998/01/26 19:26:59 phares
// First rev with no ^Ms
//
// Revision 1.1.1.1 1998/01/19 14:03:10 rand
// Lee's Jan 19 sources
//
//
//----------------------------------------------------------------------------