Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
mainmovie.h
Go to the documentation of this file.
1 // * This file is part of the COLOBOT source code
2 // * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
3 // *
4 // * This program is free software: you can redistribute it and/or modify
5 // * it under the terms of the GNU General Public License as published by
6 // * the Free Software Foundation, either version 3 of the License, or
7 // * (at your option) any later version.
8 // *
9 // * This program is distributed in the hope that it will be useful,
10 // * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // * GNU General Public License for more details.
13 // *
14 // * You should have received a copy of the GNU General Public License
15 // * along with this program. If not, see http://www.gnu.org/licenses/.
16 
22 #pragma once
23 
24 
25 #include "common/event.h"
26 
27 #include "math/vector.h"
28 
29 
30 class CRobotMain;
31 class CSoundInterface;
32 
33 namespace Gfx {
34 class CCamera;
35 class CEngine;
36 }
37 
38 enum MainMovieType
39 {
40  MM_NONE,
41  MM_SATCOMopen,
42  MM_SATCOMclose,
43 };
44 
45 
46 
48 {
49 public:
50  CMainMovie();
51  ~CMainMovie();
52 
53  void Flush();
54  bool Start(MainMovieType type, float time);
55  bool Stop();
56  bool IsExist();
57  bool EventProcess(const Event &event);
58  MainMovieType GetType();
59  MainMovieType GetStopType();
60 
61 protected:
62  Gfx::CEngine* m_engine;
63  CRobotMain* m_main;
64  Gfx::CCamera* m_camera;
65  CSoundInterface* m_sound;
66 
67  MainMovieType m_type;
68  MainMovieType m_stopType;
69  float m_speed;
70  float m_progress;
71  Math::Vector m_initialEye;
72  Math::Vector m_initialLookat;
73  Math::Vector m_finalEye[2];
74  Math::Vector m_finalLookat[2];
75 };
76