OpenClonk
C4LoaderScreen.h
Go to the documentation of this file.
1 /*
2  * OpenClonk, http://www.openclonk.org
3  *
4  * Copyright (c) 2003-2009, RedWolf Design GmbH, http://www.clonk.de/
5  * Copyright (c) 2013-2016, The OpenClonk Team and contributors
6  *
7  * Distributed under the terms of the ISC license; see accompanying file
8  * "COPYING" for details.
9  *
10  * "Clonk" is a registered trademark of Matthes Bender, used with permission.
11  * See accompanying file "TRADEMARK" for details.
12  *
13  * To redistribute this file separately, substitute the full license texts
14  * for the above references.
15  */
16  // startup screen
17 
18 #ifndef INC_C4LoaderScreen
19 #define INC_C4LoaderScreen
20 
21 #include "graphics/C4FacetEx.h"
22 
23 
25 {
26 public:
27  enum Flag: int {
28  BLACK = 0x00,
29  BACKGROUND = 0x01,
30  TITLE = 0x02,
31  PROGRESS = 0x04,
32  LOG = 0x08,
33  PROCESS = 0x0f,
34 
35  // All of the above
36  ALL = 0xFF
37  };
38 
39 protected:
40  C4FacetSurface fctBackground; // background image
41  char *szInfo; // info text to be drawn on loader screen
42  bool fBlackScreen; // if set, a black screen is drawn instead of a loader
43 
44  std::map<C4Group*, const std::string> loaders;
45  void SeekLoaderScreens(C4Group &rFromGrp, const std::string &wildcard);
46 
47 public:
50 
51  bool Init(std::string szLoaderSpec); // inits and loads from global C4Game-class
52  void SetBlackScreen(bool fIsBlack); // enabled/disables drawing of loader screen
53  // draw loader screen (does not page flip!)
54  void Draw(C4Facet &cgo, Flag options = Flag::ALL, int iProgress = 0, class C4LogBuffer *pLog = nullptr, int Process = 0);
55 };
56 
57 #endif //INC_C4LoaderScreen
std::map< C4Group *, const std::string > loaders
void SeekLoaderScreens(C4Group &rFromGrp, const std::string &wildcard)
void SetBlackScreen(bool fIsBlack)
void Draw(C4Facet &cgo, Flag options=Flag::ALL, int iProgress=0, class C4LogBuffer *pLog=nullptr, int Process=0)
bool Init(std::string szLoaderSpec)
C4FacetSurface fctBackground