FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
renderitem.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2013 by the FIFE team *
3  * http://www.fifengine.net *
4  * This file is part of FIFE. *
5  * *
6  * FIFE is free software; you can redistribute it and/or *
7  * modify it under the terms of the GNU Lesser General Public *
8  * License as published by the Free Software Foundation; either *
9  * version 2.1 of the License, or (at your option) any later version. *
10  * *
11  * This library is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14  * Lesser General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU Lesser General Public *
17  * License along with this library; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
20  ***************************************************************************/
21 
22 #ifndef FIFE_VIEW_RENDERITEM_H
23 #define FIFE_VIEW_RENDERITEM_H
24 
25 // Standard C++ library includes
26 #include <vector>
27 
28 // 3rd party library includes
29 
30 // FIFE includes
31 // These includes are split up in two parts, separated by one empty line
32 // First block: files included from the FIFE root src directory
33 // Second block: files included from the same folder
34 
35 #include "visual.h"
36 
37 namespace FIFE {
38 
39  class Instance;
40 
41  class RenderItem {
42  public:
43  RenderItem(Instance* parent);
44 
46 
52 
55  void reset();
56 
57  // point where instance was drawn during the previous render
59 
60  // dimensions of this visual on the virtual screen
62 
63  // dimensions of this visual during the previous render
65 
66  // image used during previous render
68 
69  // current facing angle
70  int32_t facingAngle;
71 
72  // current transparency
74 
75  // current frame index (e.g. needed for action frame)
76  int32_t currentFrame;
77  private:
80  };
81 
82  typedef std::vector<RenderItem*> RenderList;
83 }
84 
85 #endif
std::vector< RenderItem * > RenderList
Definition: renderitem.h:82
int32_t getStaticImageIndexByAngle(uint32_t angle, Instance *instance)
Returns closest matching static image for given angle.
Definition: renderitem.cpp:50
RenderItem(Instance *parent)
Definition: renderitem.cpp:40
DoublePoint3D screenpoint
Definition: renderitem.h:58
Instance * instance
Definition: renderitem.h:45
int32_t facingAngle
Definition: renderitem.h:70
unsigned char uint8_t
Definition: core.h:38
int32_t m_cachedStaticImgAngle
Definition: renderitem.h:79
ImagePtr image
Definition: renderitem.h:67
unsigned int uint32_t
Definition: core.h:40
int32_t m_cachedStaticImgId
Definition: renderitem.h:78
uint8_t transparency
Definition: renderitem.h:73
An Instance is an &quot;instantiation&quot; of an Object at a Location.
Definition: instance.h:97
void reset()
Resets the important values.
Definition: renderitem.cpp:66
int32_t currentFrame
Definition: renderitem.h:76