Mercurial > fife-parpg
comparison engine/core/view/renderers/genericrenderer.h @ 445:f855809822cf
* Fixed GenericRenderer, now it only render to a specific layer. If the node is only a point then it used the last active layer. fixes #[ticket:458]
author | helios2000@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Wed, 24 Mar 2010 16:11:30 +0000 |
parents | ad1f09d954f9 |
children | 16c2b3ee59ce |
comparison
equal
deleted
inserted
replaced
444:79678719d569 | 445:f855809822cf |
---|---|
38 class ImagePool; | 38 class ImagePool; |
39 class AnimationPool; | 39 class AnimationPool; |
40 | 40 |
41 class GenericRendererNode { | 41 class GenericRendererNode { |
42 public: | 42 public: |
43 GenericRendererNode(Instance* attached_instance, Location* relative_location, Layer* relative_layer, const Point &relative_point = Point(0,0)); | |
43 GenericRendererNode(Instance* attached_instance, Location* relative_location, const Point &relative_point = Point(0,0)); | 44 GenericRendererNode(Instance* attached_instance, Location* relative_location, const Point &relative_point = Point(0,0)); |
45 GenericRendererNode(Instance* attached_instance, Layer* relative_layer, const Point &relative_point = Point(0,0)); | |
44 GenericRendererNode(Instance* attached_instance, const Point &relative_point = Point(0,0)); | 46 GenericRendererNode(Instance* attached_instance, const Point &relative_point = Point(0,0)); |
47 GenericRendererNode(Location* attached_location, Layer* relative_layer, const Point &relative_point = Point(0,0)); | |
45 GenericRendererNode(Location* attached_location, const Point &relative_point = Point(0,0)); | 48 GenericRendererNode(Location* attached_location, const Point &relative_point = Point(0,0)); |
49 GenericRendererNode(Layer* attached_layer, const Point &relative_point = Point(0,0)); | |
46 GenericRendererNode(const Point &attached_point); | 50 GenericRendererNode(const Point &attached_point); |
47 ~GenericRendererNode(); | 51 ~GenericRendererNode(); |
48 | 52 |
49 void setAttached(Instance* attached_instance, Location* relative_location, const Point &relative_point); | 53 void setAttached(Instance* attached_instance, Location* relative_location, const Point &relative_point); |
50 void setAttached(Instance* attached_instance, Location* relative_location); | 54 void setAttached(Instance* attached_instance, Location* relative_location); |
51 void setAttached(Instance* attached_instance, const Point &relative_point); | 55 void setAttached(Instance* attached_instance, const Point &relative_point); |
52 void setAttached(Instance* attached_instance); | 56 void setAttached(Instance* attached_instance); |
53 void setAttached(Location* attached_location, const Point &relative_point); | 57 void setAttached(Location* attached_location, const Point &relative_point); |
54 void setAttached(Location* attached_location); | 58 void setAttached(Location* attached_location); |
59 void setAttached(Layer* attached_layer); | |
55 void setAttached(const Point &attached_point); | 60 void setAttached(const Point &attached_point); |
56 | 61 |
57 void setRelative(Location* relative_location); | 62 void setRelative(Location* relative_location); |
58 void setRelative(Location* relative_location, Point relative_point); | 63 void setRelative(Location* relative_location, Point relative_point); |
59 void setRelative(const Point &relative_point); | 64 void setRelative(const Point &relative_point); |
60 | 65 |
61 Instance* getAttachedInstance(); | 66 Instance* getAttachedInstance(); |
62 Location* getAttachedLocation(); | 67 Location* getAttachedLocation(); |
68 Layer* getAttachedLayer(); | |
63 Point getAttachedPoint(); | 69 Point getAttachedPoint(); |
64 | 70 |
65 Location* getOffsetLocation(); | 71 Location* getOffsetLocation(); |
66 Point getOffsetPoint(); | 72 Point getOffsetPoint(); |
67 | 73 |
68 Instance* getInstance(); | 74 Instance* getInstance(); |
69 Location* getLocation(); | 75 Location* getLocation(); |
76 Layer* getLayer(); | |
70 Point getPoint(); | 77 Point getPoint(); |
71 | 78 |
72 Point getCalculatedPoint(Camera* cam, Layer* layer, std::vector<Instance*>& instances); | 79 Point getCalculatedPoint(Camera* cam, Layer* layer, std::vector<Instance*>& instances); |
73 private: | 80 private: |
74 Instance* m_instance; | 81 Instance* m_instance; |
75 Location* m_location; | 82 Location* m_location; |
83 Layer* m_layer; | |
76 Point m_point; | 84 Point m_point; |
77 }; | 85 }; |
78 class GenericRendererElementInfo { | 86 class GenericRendererElementInfo { |
79 public: | 87 public: |
80 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) {}; | 88 virtual void render(Camera* cam, Layer* layer, std::vector<Instance*>& instances, RenderBackend* renderbackend, ImagePool* imagepool, AnimationPool* animpool) {}; |