1 // Emacs style mode select   -*- C++ -*-
2 //-----------------------------------------------------------------------------
3 //
4 // $Id: d_main.h 1529 2020-05-14 09:44:10Z wesleyjohnson $
5 //
6 // Copyright (C) 1993-1996 by id Software, Inc.
7 // Portions Copyright (C) 1998-2000 by DooM Legacy Team.
8 //
9 // This program is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU General Public License
11 // as published by the Free Software Foundation; either version 2
12 // of the License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 // GNU General Public License for more details.
18 //
19 //
20 // $Log: d_main.h,v $
21 // Revision 1.6  2001/08/20 20:40:39  metzgermeister
22 // Revision 1.5  2000/10/21 08:43:28  bpereira
23 // Revision 1.4  2000/04/23 16:19:52  bpereira
24 // Revision 1.3  2000/04/16 18:38:07  bpereira
25 // Revision 1.2  2000/02/27 00:42:10  hurdler
26 // Revision 1.1.1.1  2000/02/22 20:32:32  hurdler
27 // Initial import into CVS (v1.29 pr3)
28 //
29 //
30 // DESCRIPTION:
31 //      game startup, and main loop code, system specific interface stuff.
32 //
33 //-----------------------------------------------------------------------------
34 
35 #ifndef D_MAIN_H
36 #define D_MAIN_H
37 
38 #include "d_event.h"
39   // doomtype
40 #include "w_wad.h"
41   // for MAX_WADFILES
42 #include "command.h"
43   // consvar_t
44 
45 
46 // make sure not to write back the config until it's been correctly loaded
47 extern tic_t      rendergametic;
48 
49 // to make savegamename and directories
50 extern char * legacyhome;
51 extern int  legacyhome_len;
52 #define MAX_NUM_DOOMWADDIR  28
53 extern char *doomwaddir[MAX_NUM_DOOMWADDIR];
54 
55 extern char * startupwadfiles[MAX_WADFILES+1];
56 
57 // Setup variable doomwaddir for owner usage.
58 void  owner_wad_search_order( void );
59 
60 extern consvar_t cv_home, cv_doomwaddir, cv_iwad;
61 extern consvar_t cv_screenshot_type, cv_screenshot_dir;
62 
63 extern byte  init_sequence;  // = 0 on first init
64 
65 // the infinite loop of D_DoomLoop() called from win_main for windows version
66 void D_DoomLoop (void);
67 
68 //
69 // D_DoomMain()
70 // Not a globally visible function, just included for source reference,
71 // calls all startup code, parses command line options.
72 // If not overrided by user input, calls D_AdvanceDemo.
73 //
74 void D_DoomMain (void);
75 
76 // Called by IO functions when input is detected.
77 void D_PostEvent (const event_t* ev);
78 void D_PostEvent_end (void);    // delimiter for locking memory
79 
80 void D_Process_Events (void);
81 void D_DoAdvanceDemo (void);
82 
83 //
84 // BASE LEVEL
85 //
86 void D_PageTicker (void);
87 // pagename is lumpname of a 320x200 patch to fill the screen
88 void D_PageDrawer (const char* pagename);
89 void D_AdvanceDemo (void);
90 void D_DisableDemo (void);
91 
92 // demo seq controls
93 enum { DEMO_seq_advance = 1, DEMO_seq_playdemo = 2, DEMO_seq_disabled = 8 };  // bits
94 extern byte demo_ctrl;
95 
96 void D_StartTitle (void);
97 void D_End_commandline(void);
98 
99 #endif //__D_MAIN__
100