-
Notifications
You must be signed in to change notification settings - Fork 23
/
Startup.h
71 lines (56 loc) · 1.41 KB
/
Startup.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#pragma once
#include <cinttypes>
#include <algorithm>
#include <cstdlib>
#include <chrono>
#include <memory>
#include "GameManager.h"
#include "GUI/UIState.h"
#include "GUI/MenuUtils.h"
#include "Audio/Song.h"
#include "Events/Event.h"
#include "Events/Mouse.h"
#include "Parsers/TgxFile.h"
#include "Parsers/Gm1File.h"
#include "Parsers/AniFile.h"
#include "Rendering/Texture.h"
#include "Rendering/TextureAtlas.h"
#include "Rendering/BinkVideo.h"
namespace Sourcehold {
namespace Game {
using namespace Events;
using namespace Parsers;
using namespace Rendering;
using namespace GUI;
using namespace Audio;
/**
* Handles non game states - menus and intro sequence
*/
class Startup : protected EventConsumer<Mouse> {
public:
Startup();
Startup(const Startup &) = delete;
~Startup();
void PlayMusic();
UIState Begin();
protected:
void onEventReceive(Mouse &event) override;
double startTime = 0.0;
Song aud_startup;
/* Resources */
std::shared_ptr<TgxFile> tgx_firefly, tgx_taketwo, tgx_present, tgx_logo,
tgx_firefly_front;
std::shared_ptr<BinkVideo> intro;
enum StartupSequence : uint8_t {
STARTUP_FIREFLY_LOGO = 0,
STARTUP_TAKETWO_LOGO,
STARTUP_PRESENT,
STARTUP_STRONGHOLD_LOGO,
STARTUP_MULTIPLAYER_INFO,
STARTUP_INTRO
};
UIState currentUIState = UIState::INTRO_SEQUENCE;
uint8_t currentStartupState = 0;
};
} // namespace Game
} // namespace Sourcehold