1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 2
10  * of the License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  *
22  * Based on the original sources
23  *   Faery Tale II -- The Halls of the Dead
24  *   (c) 1993-1996 The Wyrmkeep Entertainment Co.
25  */
26 
27 #ifndef SAGA2_DISPLAY_H
28 #define SAGA2_DISPLAY_H
29 
30 namespace Saga2 {
31 
32 /* ===================================================================== *
33    Types
34  * ===================================================================== */
35 
36 enum DisplayDisabledBecause {
37 	GameNotInitialized      = 1 << 0,
38 	PlayingVideo            = 1 << 1,
39 	GraphicsInit            = 1 << 2,
40 	GameSuspended           = 1 << 3,
41 	GameEnded               = 1 << 4
42 };
43 
44 /* ===================================================================== *
45    Prototypes
46  * ===================================================================== */
47 void endGame(void);
48 
49 // ------------------------------------------------------------------------
50 // Display initialization
51 
52 void niceScreenStartup(void);
53 void initBackPanel(void);
54 
55 // ------------------------------------------------------------------------
56 // Display disable flags
57 
58 void displayEnable(DisplayDisabledBecause reason, bool onOff = true);
59 bool displayEnabled(uint32 mask = 0xFFFFFFFF);
60 bool displayOkay(void);
61 void mainEnable(void);
62 void mainDisable(void);
63 
64 inline void displayDisable(DisplayDisabledBecause reason, bool onOff = false) {
65 	displayEnable(reason, onOff);
66 }
67 
68 // ------------------------------------------------------------------------
69 // palette changes can be disabled
70 
71 void enablePaletteChanges(void);
72 void disablePaletteChanges(void);
73 bool paletteChangesEnabled(void);
74 
75 // ------------------------------------------------------------------------
76 // Screen refreshes
77 void delayedDisplayEnable(void);
78 void externalPaletteIntrusion(void);
79 void reDrawScreen(void);
80 void blackOut(void);
81 void showLoadMessage(void);
82 
83 // ------------------------------------------------------------------------
84 // Video mode save and restore for videos
85 
86 void pushVidState(void);
87 void popVidState(void);
88 
89 // ------------------------------------------------------------------------
90 // Calls to suspend audio
91 
92 void suspendAudio(void);
93 void resumeAudio(void);
94 
95 // ------------------------------------------------------------------------
96 // The display may be disabled for several reasons these track them
97 void blackOut(void);
98 
99 } // end of namespace Saga2
100 
101 #endif  //DISPLAY_H
102