Mercurial > fife-parpg
diff engine/core/view/visual.i @ 0:4a0efb7baf70
* Datasets becomes the new trunk and retires after that :-)
author | mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Sun, 29 Jun 2008 18:44:17 +0000 |
parents | |
children | 90005975cdbb |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/engine/core/view/visual.i Sun Jun 29 18:44:17 2008 +0000 @@ -0,0 +1,54 @@ +%module fife +%{ +#include "view/visual.h" +%} + +namespace FIFE { + class Visual2DGfx { + public: + virtual ~Visual2DGfx(); + void setTransparency(uint8_t transparency); + unsigned int getTransparency(); + void setVisible(bool visible); + unsigned int isVisible(); + private: + Visual2DGfx(); + }; + + %apply std::vector<int> &OUTPUT { std::vector<int>& angles }; + class ObjectVisual: public Visual2DGfx { + public: + static ObjectVisual* create(Object* object); + virtual ~ObjectVisual(); + void addStaticImage(unsigned int angle, int image_index); + int getStaticImageIndexByAngle(int angle); + int getClosestMatchingAngle(int angle); + void getStaticImageAngles(std::vector<int>& angles); + private: + ObjectVisual(); + }; + %template(get2dGfxVisual) Object::getVisual<ObjectVisual>; + %clear std::vector<int> angles; + + class InstanceVisual: public Visual2DGfx { + public: + static InstanceVisual* create(Instance* instance); + virtual ~InstanceVisual(); + void setStackPosition(int stackposition); + int getStackPosition(); + private: + InstanceVisual(); + }; + %template(get2dGfxVisual) Instance::getVisual<InstanceVisual>; + + class ActionVisual: public Visual2DGfx { + public: + static ActionVisual* create(Action* action); + virtual ~ActionVisual(); + void addAnimation(unsigned int angle, int animation_index); + int getAnimationIndexByAngle(int angle); + private: + ActionVisual(); + }; + %template(get2dGfxVisual) Action::getVisual<ActionVisual>; +}