]> git.lizzy.rs Git - plan9front.git/blob - sys/src/games/doom/i_system.h
doom: fix -warp argument parsing bug
[plan9front.git] / sys / src / games / doom / i_system.h
1 // Emacs style mode select   -*- C++ -*- 
2 //-----------------------------------------------------------------------------
3 //
4 // $Id:$
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 //
8 // This source is available for distribution and/or modification
9 // only under the terms of the DOOM Source Code License as
10 // published by id Software. All rights reserved.
11 //
12 // The source is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
15 // for more details.
16 //
17 // DESCRIPTION:
18 //      System specific interface stuff.
19 //
20 //-----------------------------------------------------------------------------
21
22
23 #ifndef __I_SYSTEM__
24 #define __I_SYSTEM__
25
26 #include "d_ticcmd.h"
27 #include "d_event.h"
28
29 #ifdef __GNUG__
30 #pragma interface
31 #endif
32
33
34 // Called by DoomMain.
35 void I_Init (void);
36
37 // Called by startup code
38 // to get the ammount of memory to malloc
39 // for the zone management.
40 byte*   I_ZoneBase (int *size);
41
42
43 // Called by D_DoomLoop,
44 // returns current time in tics.
45 int I_GetTime (void);
46
47
48 //
49 // Called by D_DoomLoop,
50 // called before processing any tics in a frame
51 // (just after displaying a frame).
52 // Time consuming syncronous operations
53 // are performed here (joystick reading).
54 // Can call D_PostEvent.
55 //
56 void I_StartFrame (void);
57
58
59 //
60 // Called by D_DoomLoop,
61 // called before processing each tic in a frame.
62 // Quick syncronous operations are performed here.
63 // Can call D_PostEvent.
64 void I_StartTic (void);
65
66 // Asynchronous interrupt functions should maintain private queues
67 // that are read by the synchronous functions
68 // to be converted into events.
69
70 // Either returns a null ticcmd,
71 // or calls a loadable driver to build it.
72 // This ticcmd will then be modified by the gameloop
73 // for normal input.
74 ticcmd_t* I_BaseTiccmd (void);
75
76
77 // Called by M_Responder when quit is selected.
78 // Clean exit, displays sell blurb.
79 void I_Quit (void);
80
81
82 // Allocates from low memory under dos,
83 // just mallocs under unix
84 byte* I_AllocLow (int length);
85
86 void I_Tactile (int on, int off, int total);
87
88
89 void I_Error (char *error, ...);
90
91 int I_FileExists (char *filepath);
92
93 int I_Open (char *filepath);
94 void I_Close (int handle);
95
96 int I_Seek(int handle, int n);
97 int I_Read(int handle, void *buf, int n);
98
99 char* I_IdentifyWAD(char *wadname);
100
101 #endif
102 //-----------------------------------------------------------------------------
103 //
104 // $Log:$
105 //
106 //-----------------------------------------------------------------------------