ScummVM API documentation
logo.h
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 modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (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, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef NANCY_STATE_LOGO_H
23 #define NANCY_STATE_LOGO_H
24 
25 #include "common/singleton.h"
26 #include "video/avi_decoder.h"
27 
28 #include "engines/nancy/commontypes.h"
29 #include "engines/nancy/state/state.h"
30 #include "engines/nancy/ui/fullscreenimage.h"
31 
32 namespace Nancy {
33 
34 namespace State {
35 
36 class Logo : public State, public Common::Singleton<Logo> {
37 public:
38  Logo() : _state(kInit), _startTicks(0), _videoObj(1) { }
39 
40  // State API
41  void process() override;
42  void onStateEnter(const NancyState::NancyState prevState) override;
43  bool onStateExit(const NancyState::NancyState nextState) override;
44 
45 private:
46  void init();
47  void playIntroVideo();
48  void startSound();
49  void run();
50  void stop();
51 
52  enum State {
53  kInit,
54  kPlayIntroVideo,
55  kStartSound,
56  kRun,
57  kStop
58  };
59 
60  State _state;
61  uint _startTicks;
62  UI::FullScreenImage _logoImage;
63  UI::FullScreenImage _partnerLogoImage;
64  SoundDescription _msnd;
65  Video::AVIDecoder _tvdVideoDecoder;
66  RenderObject _videoObj;
67 };
68 
69 #define NancyLogoState Nancy::State::Logo::instance()
70 
71 } // end of namespace State
72 } // End of namespace Nancy
73 
74 #endif // NANCY_STATE_LOGO_H
Definition: avi_decoder.h:64
Definition: logo.h:36
Definition: renderobject.h:36
Definition: commontypes.h:254
Definition: fullscreenimage.h:30
Definition: actionmanager.h:32
Definition: singleton.h:42