diff options
Diffstat (limited to 'engines/wintermute/ad/ad_object.h')
-rw-r--r-- | engines/wintermute/ad/ad_object.h | 92 |
1 files changed, 48 insertions, 44 deletions
diff --git a/engines/wintermute/ad/ad_object.h b/engines/wintermute/ad/ad_object.h index d1a20908e1..c6573315da 100644 --- a/engines/wintermute/ad/ad_object.h +++ b/engines/wintermute/ad/ad_object.h @@ -46,77 +46,81 @@ class PartEmitter; class AdObject : public BaseObject { public: - PartEmitter *_partEmitter; virtual PartEmitter *createParticleEmitter(bool followParent = false, int offsetX = 0, int offsetY = 0); virtual bool updatePartEmitter(); - bool _partFollowParent; - int _partOffsetX; - int _partOffsetY; bool invalidateCurrRegions(); - bool _subtitlesModRelative; - bool _subtitlesModXCenter; - int _subtitlesModX; - int _subtitlesModY; - int _subtitlesWidth; AdRegion *_stickRegion; bool _sceneIndependent; - bool _ignoreItems; + bool updateBlockRegion(); - bool _forcedTalkAnimUsed; - char *_forcedTalkAnimName; - virtual bool getExtendedFlag(const char *flagName); - virtual bool resetSoundPan(); - virtual bool updateSounds(); + + virtual bool getExtendedFlag(const char *flagName) override; + virtual bool resetSoundPan() override; + virtual bool updateSounds() override; bool reset(); DECLARE_PERSISTENT(AdObject, BaseObject) - virtual void talk(const char *text, const char *sound = NULL, uint32 duration = 0, const char *stances = NULL, TTextAlign align = TAL_CENTER); - virtual int getHeight(); - AdSentence *_sentence; + virtual void talk(const char *text, const char *sound = nullptr, uint32 duration = 0, const char *stances = nullptr, TTextAlign align = TAL_CENTER); + virtual int getHeight() override; + bool setFont(const char *filename); - virtual bool update(); - virtual bool display(); + virtual bool update() override; + virtual bool display() override; + bool _drawn; bool _active; virtual bool playAnim(const char *filename); - BaseSprite *_animSprite; - BaseSprite *_currentSprite; - TObjectState _state; - TObjectState _nextState; - TObjectType _type; + + TObjectType getType() const; AdObject(BaseGame *inGame); virtual ~AdObject(); - BaseFont *_font; - BaseSprite *_tempSprite2; - BaseRegion *_blockRegion; - AdWaypointGroup *_wptGroup; + BaseRegion *_currentBlockRegion; AdWaypointGroup *_currentWptGroup; AdInventory *getInventory(); - virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent); - - virtual bool afterMove(); - AdRegion *_currentRegions[MAX_NUM_REGIONS]; + virtual bool saveAsText(BaseDynamicBuffer *buffer, int indent) override; + virtual bool afterMove() override; // scripting interface - virtual ScValue *scGetProperty(const Common::String &name); - virtual bool scSetProperty(const char *name, ScValue *value); - virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name); - virtual const char *scToString(); - - BaseArray<AdObject *> _attachmentsPre; - BaseArray<AdObject *> _attachmentsPost; - + virtual ScValue *scGetProperty(const Common::String &name) override; + virtual bool scSetProperty(const char *name, ScValue *value) override; + virtual bool scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, const char *name) override; + virtual const char *scToString() override; bool updateSpriteAttachments(); bool displaySpriteAttachments(bool preDisplay); + +protected: + PartEmitter *_partEmitter; + bool _ignoreItems; + bool _forcedTalkAnimUsed; + char *_forcedTalkAnimName; + BaseSprite *_animSprite; + BaseSprite *_currentSprite; + AdSentence *_sentence; + TObjectState _state; + TObjectState _nextState; + TObjectType _type; + BaseFont *_font; + BaseSprite *_tempSprite2; + BaseRegion *_blockRegion; + AdWaypointGroup *_wptGroup; AdObject *_registerAlias; + bool getScale(float *scaleX, float *scaleY); private: + bool _partFollowParent; + int32 _partOffsetX; + int32 _partOffsetY; + bool _subtitlesModRelative; + bool _subtitlesModXCenter; + int32 _subtitlesModX; + int32 _subtitlesModY; + int32 _subtitlesWidth; + AdRegion *_currentRegions[MAX_NUM_REGIONS]; + BaseArray<AdObject *> _attachmentsPre; + BaseArray<AdObject *> _attachmentsPost; bool displaySpriteAttachment(AdObject *attachment); AdInventory *_inventory; - -protected: - bool getScale(float *scaleX, float *scaleY); }; } // end of namespace Wintermute |