-
Notifications
You must be signed in to change notification settings - Fork 814
/
Copy pathinit.h
56 lines (45 loc) · 1.14 KB
/
init.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
/**
* @file init.h
*
* Interface of routines for initializing the environment, disable screen saver, load MPQ.
*/
#pragma once
#include <optional>
#include "engine/assets.hpp"
#include "utils/attributes.h"
#ifdef UNPACKED_MPQS
#include <string>
#else
#include "mpq/mpq_reader.hpp"
#endif
namespace devilution {
/** True if the game is the current active window */
extern bool gbActive;
#ifdef UNPACKED_MPQS
bool AreExtraFontsOutOfDate(const std::string &path);
#else
bool AreExtraFontsOutOfDate(MpqArchive &archive);
#endif
inline bool AreExtraFontsOutOfDate()
{
#ifdef UNPACKED_MPQS
return font_data_path && AreExtraFontsOutOfDate(*font_data_path);
#else
return font_mpq && AreExtraFontsOutOfDate(*font_mpq);
#endif
}
#ifndef UNPACKED_MPQS
bool IsDevilutionXMpqOutOfDate(MpqArchive &archive);
#endif
inline bool IsDevilutionXMpqOutOfDate()
{
#ifdef UNPACKED_MPQS
return false;
#else
return devilutionx_mpq.has_value() && IsDevilutionXMpqOutOfDate(*devilutionx_mpq);
#endif
}
void init_cleanup();
void init_create_window();
void MainWndProc(const SDL_Event &event);
} // namespace devilution