From 831560d03b5d19e64feccdac9ff909ffe9100a39 Mon Sep 17 00:00:00 2001 From: Einar Johan Trøan Sømåen Date: Tue, 26 Jun 2012 12:33:37 +0200 Subject: WINTERMUTE: Rename FuncName->funcName in AdObject --- engines/wintermute/Ad/AdActor.cpp | 16 ++++++------- engines/wintermute/Ad/AdEntity.cpp | 10 ++++---- engines/wintermute/Ad/AdGame.cpp | 8 +++---- engines/wintermute/Ad/AdInventoryBox.cpp | 6 ++--- engines/wintermute/Ad/AdObject.cpp | 40 ++++++++++++++++---------------- engines/wintermute/Ad/AdObject.h | 36 ++++++++++++++-------------- engines/wintermute/Base/BObject.cpp | 8 +++---- engines/wintermute/Base/BObject.h | 2 +- engines/wintermute/Base/BSprite.cpp | 2 +- 9 files changed, 64 insertions(+), 64 deletions(-) (limited to 'engines/wintermute') diff --git a/engines/wintermute/Ad/AdActor.cpp b/engines/wintermute/Ad/AdActor.cpp index f560bf9049..40c18bbb34 100644 --- a/engines/wintermute/Ad/AdActor.cpp +++ b/engines/wintermute/Ad/AdActor.cpp @@ -521,7 +521,7 @@ HRESULT CAdActor::display() { else Rotate = ((CAdGame *)Game)->_scene->GetRotationAt(_posX, _posY) + _relativeRotate; } else Rotate = 0.0f; - if (_active) DisplaySpriteAttachments(true); + if (_active) displaySpriteAttachments(true); if (_currentSprite && _active) { bool Reg = _registrable; @@ -538,7 +538,7 @@ HRESULT CAdActor::display() { } - if (_active) DisplaySpriteAttachments(false); + if (_active) displaySpriteAttachments(false); if (_active && _partEmitter) _partEmitter->display(); @@ -730,17 +730,17 @@ HRESULT CAdActor::update() { if (_currentSprite->_changed) { _posX += _currentSprite->_moveX; _posY += _currentSprite->_moveY; - AfterMove(); + afterMove(); } } //Game->QuickMessageForm("%s", _currentSprite->_filename); - UpdateBlockRegion(); + updateBlockRegion(); _ready = (_state == STATE_READY); - UpdatePartEmitter(); - UpdateSpriteAttachments(); + updatePartEmitter(); + updateSpriteAttachments(); return S_OK; } @@ -810,7 +810,7 @@ void CAdActor::GetNextStep() { _posX = (int)_pFX; _posY = (int)_pFY; - AfterMove(); + afterMove(); if (_pFCount == 0) { @@ -1310,7 +1310,7 @@ HRESULT CAdActor::PlayAnim(const char *Filename) { } } // otherwise call the standard handler - return CAdTalkHolder::PlayAnim(Filename); + return CAdTalkHolder::playAnim(Filename); } } // end of namespace WinterMute diff --git a/engines/wintermute/Ad/AdEntity.cpp b/engines/wintermute/Ad/AdEntity.cpp index d5e2fe954f..35e9ea7caa 100644 --- a/engines/wintermute/Ad/AdEntity.cpp +++ b/engines/wintermute/Ad/AdEntity.cpp @@ -506,7 +506,7 @@ HRESULT CAdEntity::display() { Game->_renderer->_rectList.Add(new CBActiveRect(Game, _registerAlias, _region, Game->_offsetX, Game->_offsetY)); } - DisplaySpriteAttachments(true); + displaySpriteAttachments(true); if (_theora && (_theora->isPlaying() || _theora->isPaused())) { _theora->display(Alpha); } else if (_currentSprite) { @@ -519,7 +519,7 @@ HRESULT CAdEntity::display() { Rotate, _blendMode); } - DisplaySpriteAttachments(false); + displaySpriteAttachments(false); if (_partEmitter) _partEmitter->display(_region); @@ -598,7 +598,7 @@ HRESULT CAdEntity::update() { } } - UpdateBlockRegion(); + updateBlockRegion(); _ready = (_state == STATE_READY); if (_theora) { @@ -615,8 +615,8 @@ HRESULT CAdEntity::update() { } } - UpdatePartEmitter(); - UpdateSpriteAttachments(); + updatePartEmitter(); + updateSpriteAttachments(); return S_OK; } diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp index 6d1744b3d3..96948c7042 100644 --- a/engines/wintermute/Ad/AdGame.cpp +++ b/engines/wintermute/Ad/AdGame.cpp @@ -259,7 +259,7 @@ HRESULT CAdGame::ChangeScene(const char *Filename, bool FadeIn) { if (_scene) { // reset objects - for (int i = 0; i < _objects.GetSize(); i++) _objects[i]->Reset(); + for (int i = 0; i < _objects.GetSize(); i++) _objects[i]->reset(); // reset scene properties _scene->_sFXVolume = 100; @@ -274,7 +274,7 @@ HRESULT CAdGame::ChangeScene(const char *Filename, bool FadeIn) { if (SUCCEEDED(ret)) { // invalidate references to the original scene for (int i = 0; i < _objects.GetSize(); i++) { - _objects[i]->InvalidateCurrRegions(); + _objects[i]->invalidateCurrRegions(); _objects[i]->_stickRegion = NULL; } @@ -997,7 +997,7 @@ HRESULT CAdGame::scSetProperty(const char *Name, CScValue *Value) { // InventoryObject ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "InventoryObject") == 0) { - if (_inventoryOwner && _inventoryBox) _inventoryOwner->GetInventory()->_scrollOffset = _inventoryBox->_scrollOffset; + if (_inventoryOwner && _inventoryBox) _inventoryOwner->getInventory()->_scrollOffset = _inventoryBox->_scrollOffset; if (Value->IsNULL()) _inventoryOwner = _invObject; else { @@ -1006,7 +1006,7 @@ HRESULT CAdGame::scSetProperty(const char *Name, CScValue *Value) { else if (Game->ValidObject(Obj)) _inventoryOwner = (CAdObject *)Obj; } - if (_inventoryOwner && _inventoryBox) _inventoryBox->_scrollOffset = _inventoryOwner->GetInventory()->_scrollOffset; + if (_inventoryOwner && _inventoryBox) _inventoryBox->_scrollOffset = _inventoryOwner->getInventory()->_scrollOffset; return S_OK; } diff --git a/engines/wintermute/Ad/AdInventoryBox.cpp b/engines/wintermute/Ad/AdInventoryBox.cpp index 9c2d5bbcfc..f7aa67b280 100644 --- a/engines/wintermute/Ad/AdInventoryBox.cpp +++ b/engines/wintermute/Ad/AdInventoryBox.cpp @@ -108,7 +108,7 @@ HRESULT CAdInventoryBox::display() { if (_window) { _window->EnableWidget("prev", _scrollOffset > 0); - _window->EnableWidget("next", _scrollOffset + ItemsX * ItemsY < AdGame->_inventoryOwner->GetInventory()->_takenItems.GetSize()); + _window->EnableWidget("next", _scrollOffset + ItemsX * ItemsY < AdGame->_inventoryOwner->getInventory()->_takenItems.GetSize()); } @@ -135,8 +135,8 @@ HRESULT CAdInventoryBox::display() { int xxx = rect.left; for (int i = 0; i < ItemsX; i++) { int ItemIndex = _scrollOffset + j * ItemsX + i; - if (ItemIndex >= 0 && ItemIndex < AdGame->_inventoryOwner->GetInventory()->_takenItems.GetSize()) { - CAdItem *item = AdGame->_inventoryOwner->GetInventory()->_takenItems[ItemIndex]; + if (ItemIndex >= 0 && ItemIndex < AdGame->_inventoryOwner->getInventory()->_takenItems.GetSize()) { + CAdItem *item = AdGame->_inventoryOwner->getInventory()->_takenItems[ItemIndex]; if (item != ((CAdGame *)Game)->_selectedItem || !_hideSelected) { item->update(); item->display(xxx, yyy); diff --git a/engines/wintermute/Ad/AdObject.cpp b/engines/wintermute/Ad/AdObject.cpp index 6cd37ee040..4a2ec065e9 100644 --- a/engines/wintermute/Ad/AdObject.cpp +++ b/engines/wintermute/Ad/AdObject.cpp @@ -151,7 +151,7 @@ CAdObject::~CAdObject() { ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::PlayAnim(const char *Filename) { +HRESULT CAdObject::playAnim(const char *Filename) { delete _animSprite; _animSprite = NULL; _animSprite = new CBSprite(Game, this); @@ -194,7 +194,7 @@ HRESULT CAdObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th ////////////////////////////////////////////////////////////////////////// if (strcmp(Name, "PlayAnim") == 0 || strcmp(Name, "PlayAnimAsync") == 0) { Stack->CorrectParams(1); - if (FAILED(PlayAnim(Stack->Pop()->GetString()))) Stack->PushBool(false); + if (FAILED(playAnim(Stack->Pop()->GetString()))) Stack->PushBool(false); else { if (strcmp(Name, "PlayAnimAsync") != 0) Script->WaitFor(this); Stack->PushBool(true); @@ -207,7 +207,7 @@ HRESULT CAdObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "Reset") == 0) { Stack->CorrectParams(0); - Reset(); + reset(); Stack->PushNULL(); return S_OK; } @@ -272,7 +272,7 @@ HRESULT CAdObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th const char *Sound = SoundVal->IsNULL() ? NULL : SoundVal->GetString(); - Talk(Text, Sound, Duration, Stances, (TTextAlign)Align); + talk(Text, Sound, Duration, Stances, (TTextAlign)Align); if (strcmp(Name, "TalkAsync") != 0) Script->WaitForExclusive(this); Stack->PushNULL(); @@ -457,7 +457,7 @@ HRESULT CAdObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Th int OffsetX = Stack->Pop()->GetInt(); int OffsetY = Stack->Pop()->GetInt(); - CPartEmitter *Emitter = CreateParticleEmitter(FollowParent, OffsetX, OffsetY); + CPartEmitter *Emitter = createParticleEmitter(FollowParent, OffsetX, OffsetY); if (Emitter) Stack->PushNative(_partEmitter, true); else Stack->PushNULL(); @@ -687,7 +687,7 @@ CScValue *CAdObject::scGetProperty(const char *Name) { // NumItems (RO) ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "NumItems") == 0) { - _scValue->SetInt(GetInventory()->_takenItems.GetSize()); + _scValue->SetInt(getInventory()->_takenItems.GetSize()); return _scValue; } @@ -824,7 +824,7 @@ int CAdObject::getHeight() { ////////////////////////////////////////////////////////////////////////// -void CAdObject::Talk(const char *Text, const char *Sound, uint32 Duration, const char *Stances, TTextAlign Align) { +void CAdObject::talk(const char *Text, const char *Sound, uint32 Duration, const char *Stances, TTextAlign Align) { if (!_sentence) _sentence = new CAdSentence(Game); if (!_sentence) return; @@ -936,7 +936,7 @@ void CAdObject::Talk(const char *Text, const char *Sound, uint32 Duration, const ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::Reset() { +HRESULT CAdObject::reset() { if (_state == STATE_PLAYING_ANIM && _animSprite != NULL) { delete _animSprite; _animSprite = NULL; @@ -1036,7 +1036,7 @@ HRESULT CAdObject::saveAsText(CBDynBuffer *Buffer, int Indent) { ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::UpdateBlockRegion() { +HRESULT CAdObject::updateBlockRegion() { CAdGame *AdGame = (CAdGame *)Game; if (AdGame->_scene) { if (_blockRegion && _currentBlockRegion) @@ -1049,7 +1049,7 @@ HRESULT CAdObject::UpdateBlockRegion() { } ////////////////////////////////////////////////////////////////////////// -CAdInventory *CAdObject::GetInventory() { +CAdInventory *CAdObject::getInventory() { if (!_inventory) { _inventory = new CAdInventory(Game); ((CAdGame *)Game)->RegisterInventory(_inventory); @@ -1059,7 +1059,7 @@ CAdInventory *CAdObject::GetInventory() { ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::AfterMove() { +HRESULT CAdObject::afterMove() { CAdRegion *NewRegions[MAX_NUM_REGIONS]; ((CAdGame *)Game)->_scene->GetRegionsAt(_posX, _posY, NewRegions, MAX_NUM_REGIONS); @@ -1087,7 +1087,7 @@ HRESULT CAdObject::AfterMove() { } ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::InvalidateCurrRegions() { +HRESULT CAdObject::invalidateCurrRegions() { for (int i = 0; i < MAX_NUM_REGIONS; i++) _currentRegions[i] = NULL; return S_OK; } @@ -1108,7 +1108,7 @@ HRESULT CAdObject::GetScale(float *ScaleX, float *ScaleY) { } ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::UpdateSpriteAttachments() { +HRESULT CAdObject::updateSpriteAttachments() { for (int i = 0; i < _attachmentsPre.GetSize(); i++) { _attachmentsPre[i]->update(); } @@ -1119,21 +1119,21 @@ HRESULT CAdObject::UpdateSpriteAttachments() { } ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::DisplaySpriteAttachments(bool PreDisplay) { +HRESULT CAdObject::displaySpriteAttachments(bool PreDisplay) { if (PreDisplay) { for (int i = 0; i < _attachmentsPre.GetSize(); i++) { - DisplaySpriteAttachment(_attachmentsPre[i]); + displaySpriteAttachment(_attachmentsPre[i]); } } else { for (int i = 0; i < _attachmentsPost.GetSize(); i++) { - DisplaySpriteAttachment(_attachmentsPost[i]); + displaySpriteAttachment(_attachmentsPost[i]); } } return S_OK; } ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::DisplaySpriteAttachment(CAdObject *Attachment) { +HRESULT CAdObject::displaySpriteAttachment(CAdObject *Attachment) { if (!Attachment->_active) return S_OK; float ScaleX, ScaleY; @@ -1171,7 +1171,7 @@ HRESULT CAdObject::DisplaySpriteAttachment(CAdObject *Attachment) { } ////////////////////////////////////////////////////////////////////////// -CPartEmitter *CAdObject::CreateParticleEmitter(bool FollowParent, int OffsetX, int OffsetY) { +CPartEmitter *CAdObject::createParticleEmitter(bool FollowParent, int OffsetX, int OffsetY) { _partFollowParent = FollowParent; _partOffsetX = OffsetX; _partOffsetY = OffsetY; @@ -1182,12 +1182,12 @@ CPartEmitter *CAdObject::CreateParticleEmitter(bool FollowParent, int OffsetX, i Game->RegisterObject(_partEmitter); } } - UpdatePartEmitter(); + updatePartEmitter(); return _partEmitter; } ////////////////////////////////////////////////////////////////////////// -HRESULT CAdObject::UpdatePartEmitter() { +HRESULT CAdObject::updatePartEmitter() { if (!_partEmitter) return E_FAIL; if (_partFollowParent) { diff --git a/engines/wintermute/Ad/AdObject.h b/engines/wintermute/Ad/AdObject.h index ca85da42b0..05548c6dbd 100644 --- a/engines/wintermute/Ad/AdObject.h +++ b/engines/wintermute/Ad/AdObject.h @@ -46,13 +46,13 @@ class CAdInventory; class CAdObject : public CBObject { public: CPartEmitter *_partEmitter; - virtual CPartEmitter *CreateParticleEmitter(bool FollowParent = false, int OffsetX = 0, int OffsetY = 0); - virtual HRESULT UpdatePartEmitter(); + virtual CPartEmitter *createParticleEmitter(bool followParent = false, int offsetX = 0, int offsetY = 0); + virtual HRESULT updatePartEmitter(); bool _partFollowParent; int _partOffsetX; int _partOffsetY; - HRESULT InvalidateCurrRegions(); + HRESULT invalidateCurrRegions(); bool _subtitlesModRelative; bool _subtitlesModXCenter; int _subtitlesModX; @@ -61,23 +61,23 @@ public: CAdRegion *_stickRegion; bool _sceneIndependent; bool _ignoreItems; - HRESULT UpdateBlockRegion(); + HRESULT updateBlockRegion(); bool _forcedTalkAnimUsed; char *_forcedTalkAnimName; - virtual bool getExtendedFlag(const char *FlagName); + virtual bool getExtendedFlag(const char *flagName); virtual HRESULT resetSoundPan(); virtual HRESULT updateSounds(); - HRESULT Reset(); + HRESULT reset(); DECLARE_PERSISTENT(CAdObject, CBObject) - virtual void Talk(const char *Text, const char *Sound = NULL, uint32 Duration = 0, const char *Stances = NULL, TTextAlign Align = TAL_CENTER); + virtual void talk(const char *text, const char *sound = NULL, uint32 duration = 0, const char *stances = NULL, TTextAlign align = TAL_CENTER); virtual int getHeight(); CAdSentence *_sentence; - HRESULT SetFont(const char *Filename); + HRESULT SetFont(const char *filename); virtual HRESULT update(); virtual HRESULT display(); bool _drawn; bool _active; - virtual HRESULT PlayAnim(const char *Filename); + virtual HRESULT playAnim(const char *filename); CBSprite *_animSprite; CBSprite *_currentSprite; TObjectState _state; @@ -91,27 +91,27 @@ public: CAdWaypointGroup *_wptGroup; CBRegion *_currentBlockRegion; CAdWaypointGroup *_currentWptGroup; - CAdInventory *GetInventory(); + CAdInventory *getInventory(); - virtual HRESULT saveAsText(CBDynBuffer *Buffer, int Indent); + virtual HRESULT saveAsText(CBDynBuffer *buffer, int indent); - virtual HRESULT AfterMove(); + virtual HRESULT afterMove(); CAdRegion *_currentRegions[MAX_NUM_REGIONS]; // scripting interface - virtual CScValue *scGetProperty(const char *Name); - virtual HRESULT scSetProperty(const char *Name, CScValue *Value); - virtual HRESULT scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisStack, const char *Name); + virtual CScValue *scGetProperty(const char *name); + virtual HRESULT scSetProperty(const char *name, CScValue *value); + virtual HRESULT scCallMethod(CScScript *script, CScStack *stack, CScStack *thisStack, const char *name); virtual const char *scToString(); CBArray _attachmentsPre; CBArray _attachmentsPost; - HRESULT UpdateSpriteAttachments(); - HRESULT DisplaySpriteAttachments(bool PreDisplay); + HRESULT updateSpriteAttachments(); + HRESULT displaySpriteAttachments(bool preDisplay); CAdObject *_registerAlias; private: - HRESULT DisplaySpriteAttachment(CAdObject *Attachment); + HRESULT displaySpriteAttachment(CAdObject *Attachment); CAdInventory *_inventory; protected: diff --git a/engines/wintermute/Base/BObject.cpp b/engines/wintermute/Base/BObject.cpp index d117fe3455..7c3acd83a7 100644 --- a/engines/wintermute/Base/BObject.cpp +++ b/engines/wintermute/Base/BObject.cpp @@ -174,7 +174,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi Stack->CorrectParams(2); _posX = Stack->Pop()->GetInt(); _posY = Stack->Pop()->GetInt(); - AfterMove(); + afterMove(); Stack->PushNULL(); return S_OK; @@ -680,7 +680,7 @@ HRESULT CBObject::scSetProperty(const char *Name, CScValue *Value) { ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "X") == 0) { _posX = Value->GetInt(); - AfterMove(); + afterMove(); return S_OK; } @@ -689,7 +689,7 @@ HRESULT CBObject::scSetProperty(const char *Name, CScValue *Value) { ////////////////////////////////////////////////////////////////////////// else if (strcmp(Name, "Y") == 0) { _posY = Value->GetInt(); - AfterMove(); + afterMove(); return S_OK; } @@ -1115,7 +1115,7 @@ void CBObject::setSoundEvent(const char *eventName) { } ////////////////////////////////////////////////////////////////////////// -HRESULT CBObject::AfterMove() { +HRESULT CBObject::afterMove() { return S_OK; } diff --git a/engines/wintermute/Base/BObject.h b/engines/wintermute/Base/BObject.h index 20b6cfdb2a..c289bd1313 100644 --- a/engines/wintermute/Base/BObject.h +++ b/engines/wintermute/Base/BObject.h @@ -46,7 +46,7 @@ class CScScript; class CBObject : public CBScriptHolder { public: TSpriteBlendMode _blendMode; - virtual HRESULT AfterMove(); + virtual HRESULT afterMove(); float _relativeRotate; bool _rotateValid; float _rotate; diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp index 6ec19c6ba3..6f23649737 100644 --- a/engines/wintermute/Base/BSprite.cpp +++ b/engines/wintermute/Base/BSprite.cpp @@ -110,7 +110,7 @@ HRESULT CBSprite::Draw(int X, int Y, CBObject *Register, float ZoomX, float Zoom if (_changed && _owner && _owner->_movable) { _owner->_posX += _moveX; _owner->_posY += _moveY; - _owner->AfterMove(); + _owner->afterMove(); X = _owner->_posX; Y = _owner->_posY; -- cgit v1.2.3