ScummVM API documentation
MultiImageEntity.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 /*
23  * Copyright (C) 2006-2010 - Frictional Games
24  *
25  * This file is part of HPL1 Engine.
26  */
27 
28 #ifndef HPL_MULTI_IMAGE_ENTITY_H
29 #define HPL_MULTI_IMAGE_ENTITY_H
30 
31 #include "hpl1/engine/scene/ImageEntity.h"
32 #include "common/stablemap.h"
33 
34 namespace hpl {
35 
36 class cScene;
37 class cNode2D;
38 
40 public:
41  tFlag mlId;
42  int mlActiveEntity;
43  tImageEntityVec mvEntity;
44 
45  unsigned int mlPrio;
46  unsigned int mlNextAnimPrio;
47  tString msNextAnim;
48  bool mbSyncFrame;
49 };
50 
52 typedef tMultiImagePartMap::iterator tMultiImagePartMapIt;
53 
55 public:
56  cMultiImageEntity(class cScene *apScene, cNode2D *apNode);
58 
59  bool Add(tString asName, tString asFile, cVector3f avLocalPos, tFlag alPartId);
60  bool Add(tString asName, cImageEntity *apEntity, cVector3f avLocalPos, tFlag alPartId);
61 
62  void SetFlipH(bool abX);
63 
64  void SetAlpha(float afX);
65  void Flash(float afX);
66 
67  void SetActive(bool abX);
68  bool GetActive() { return mbActive; }
69 
70  bool PlayAnim(const tString &asName, tFlag alParts, unsigned int alPrio, bool abLoop = true, bool abSyncFrame = false);
71  void UpdateAnim();
72 
73  void SetAnimPaused(bool abX);
74  bool GetAnimPaused() { return mbAnimPaused; }
75 
76  cImageEntity *GetEntity(int alPartId);
77 
78 private:
79  bool mbActive;
80  float mfAlpha;
81  bool mbAnimPaused;
82 
83  cScene *mpScene;
84  cNode2D *mpNode;
85 
86  tMultiImagePartMap m_mapEntityParts;
87 
88  bool mbFlipH;
89 };
90 
91 } // namespace hpl
92 
93 #endif // HPL_MULTI_IMAGE_ENTITY_H
Definition: AI.h:36
Definition: str.h:59
Definition: array.h:52
typename TreeT::BasicIterator iterator
Definition: stablemap.h:48
Definition: Node2D.h:37
Definition: MultiImageEntity.h:54
Definition: MultiImageEntity.h:39
Definition: Scene.h:61
Definition: ImageEntity.h:44