25 #ifndef PEGASUS_ELEMENTS_H 26 #define PEGASUS_ELEMENTS_H 28 #include "common/array.h" 29 #include "common/rect.h" 30 #include "common/str.h" 31 #include "common/system.h" 32 #include "graphics/surface.h" 34 #include "pegasus/timers.h" 35 #include "pegasus/util.h" 49 void setDisplayOrder(
const DisplayOrder);
50 DisplayOrder getDisplayOrder()
const {
return _elementOrder; }
52 bool validToDraw(DisplayOrder, DisplayOrder);
55 bool isDisplaying() {
return _elementIsDisplaying; }
56 virtual void startDisplaying();
57 virtual void stopDisplaying();
61 bool isVisible() {
return _elementIsVisible; }
67 virtual void setBounds(
const CoordType,
const CoordType,
const CoordType,
const CoordType);
70 virtual void sizeElement(
const CoordType,
const CoordType);
71 virtual void moveElementTo(
const CoordType,
const CoordType);
72 virtual void moveElement(
const CoordType,
const CoordType);
73 virtual void getLocation(CoordType &, CoordType &)
const;
74 virtual void getCenter(CoordType &, CoordType &)
const;
75 virtual void centerElementAt(
const CoordType,
const CoordType);
79 bool _elementIsVisible;
83 bool _elementIsDisplaying;
84 DisplayOrder _elementOrder;
95 void setHighlightColor(
const uint32 &highlight) { _highlightColor = highlight; }
96 void getHighlightColor(uint32 &highlight)
const { highlight = _highlightColor; }
98 void setHighlightThickness(
const uint16 thickness) { _thickness = thickness; }
99 uint16 getHighlightThickness()
const {
return _thickness; }
101 void setHighlightCornerDiameter(
const uint16 diameter) { _cornerDiameter = diameter; }
102 uint16 getHighlightCornerDiameter()
const {
return _cornerDiameter; }
107 uint32 _highlightColor;
109 uint16 _cornerDiameter;
121 void startDisplaying()
override;
122 void stopDisplaying()
override;
124 TimeValue getLastTime()
const {
return _lastTime; }
127 void useIdleTime()
override;
128 virtual void timeChanged(
const TimeValue);
145 virtual void openFrameSequence();
146 virtual void closeFrameSequence();
147 bool isSequenceOpen()
const;
149 uint16 getNumFrames()
const {
return _numFrames; }
150 virtual uint16 getFrameNum()
const {
return _currentFrameNum; }
151 virtual void setFrameNum(
const int16);
154 void timeChanged(
const TimeValue)
override;
155 virtual void newFrame(
const uint16) {}
163 uint16 _currentFrameNum;
171 Sprite(
const DisplayElementID);
174 virtual void addPICTResourceFrame(
const ResIDType,
const bool,
const CoordType,
const CoordType);
175 virtual uint32 addFrame(
SpriteFrame *,
const CoordType,
const CoordType);
176 virtual void removeFrame(
const uint32);
177 virtual void discardFrames();
183 virtual void setCurrentFrameIndex(
const int32);
184 virtual uint32 getCurrentFrameIndex()
const {
return _currentFrameNum; }
190 uint32 getNumFrames()
const {
return _numFrames; }
200 uint32 _currentFrameNum;
207 SpriteSequence(
const DisplayElementID
id,
const DisplayElementID spriteID);
210 void useTransparent(
bool transparent) { _transparent = transparent; }
212 void openFrameSequence()
override;
213 void closeFrameSequence()
override;
220 void newFrame(
const uint16)
override;
239 void incrementLevel();
240 void decrementLevel();
242 uint16 getSoundLevel();
243 void setSoundLevel(uint16);
Definition: elements.h:234
Definition: surface.h:115
Definition: macresman.h:125
Definition: graphics.h:44
Definition: elements.h:138
Definition: elements.h:168
Definition: elements.h:226
Definition: elements.h:205
Definition: elements.h:90
Definition: elements.h:112
Definition: algorithm.h:29
Definition: elements.h:43
Definition: elements.h:193
Definition: elements.h:117
Definition: ai_action.h:33