diff options
-rw-r--r-- | engines/wintermute/Ad/AdGame.cpp | 18 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdResponseBox.cpp | 38 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdResponseBox.h | 20 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdResponseContext.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Ad/AdResponseContext.h | 2 |
5 files changed, 40 insertions, 40 deletions
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp index 85eb897c6d..56e0961743 100644 --- a/engines/wintermute/Ad/AdGame.cpp +++ b/engines/wintermute/Ad/AdGame.cpp @@ -510,8 +510,8 @@ HRESULT CAdGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *This //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "ClearResponses") == 0) {
Stack->CorrectParams(0);
- _responseBox->ClearResponses();
- _responseBox->ClearButtons();
+ _responseBox->clearResponses();
+ _responseBox->clearButtons();
Stack->PushNULL();
return S_OK;
}
@@ -524,7 +524,7 @@ HRESULT CAdGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *This bool AutoSelectLast = Stack->Pop()->GetBool();
if (_responseBox) {
- _responseBox->WeedResponses();
+ _responseBox->weedResponses();
if (_responseBox->_responses.GetSize() == 0) {
Stack->PushNULL();
@@ -534,12 +534,12 @@ HRESULT CAdGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *This if (_responseBox->_responses.GetSize() == 1 && AutoSelectLast) {
Stack->PushInt(_responseBox->_responses[0]->_iD);
- _responseBox->HandleResponse(_responseBox->_responses[0]);
- _responseBox->ClearResponses();
+ _responseBox->handleResponse(_responseBox->_responses[0]);
+ _responseBox->clearResponses();
return S_OK;
}
- _responseBox->CreateButtons();
+ _responseBox->createButtons();
_responseBox->_waitingScript = Script;
Script->WaitForExclusive(_responseBox);
_state = GAME_SEMI_FROZEN;
@@ -558,7 +558,7 @@ HRESULT CAdGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *This else if (strcmp(Name, "GetNumResponses") == 0) {
Stack->CorrectParams(0);
if (_responseBox) {
- _responseBox->WeedResponses();
+ _responseBox->weedResponses();
Stack->PushInt(_responseBox->_responses.GetSize());
} else {
Script->RuntimeError("Game.GetNumResponses: response box is not defined");
@@ -1611,7 +1611,7 @@ HRESULT CAdGame::AddBranchResponse(int ID) { if (BranchResponseUsed(ID)) return S_OK;
CAdResponseContext *r = new CAdResponseContext(Game);
r->_iD = ID;
- r->SetContext(_dlgPendingBranches.GetSize() > 0 ? _dlgPendingBranches[_dlgPendingBranches.GetSize() - 1] : NULL);
+ r->setContext(_dlgPendingBranches.GetSize() > 0 ? _dlgPendingBranches[_dlgPendingBranches.GetSize() - 1] : NULL);
_responsesBranch.Add(r);
return S_OK;
}
@@ -1634,7 +1634,7 @@ HRESULT CAdGame::AddGameResponse(int ID) { if (GameResponseUsed(ID)) return S_OK;
CAdResponseContext *r = new CAdResponseContext(Game);
r->_iD = ID;
- r->SetContext(_dlgPendingBranches.GetSize() > 0 ? _dlgPendingBranches[_dlgPendingBranches.GetSize() - 1] : NULL);
+ r->setContext(_dlgPendingBranches.GetSize() > 0 ? _dlgPendingBranches[_dlgPendingBranches.GetSize() - 1] : NULL);
_responsesGame.Add(r);
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdResponseBox.cpp b/engines/wintermute/Ad/AdResponseBox.cpp index bf449214e1..c14497a4c4 100644 --- a/engines/wintermute/Ad/AdResponseBox.cpp +++ b/engines/wintermute/Ad/AdResponseBox.cpp @@ -85,15 +85,15 @@ CAdResponseBox::~CAdResponseBox() { if (_font) Game->_fontStorage->RemoveFont(_font);
if (_fontHover) Game->_fontStorage->RemoveFont(_fontHover);
- ClearResponses();
- ClearButtons();
+ clearResponses();
+ clearButtons();
_waitingScript = NULL;
}
//////////////////////////////////////////////////////////////////////////
-void CAdResponseBox::ClearResponses() {
+void CAdResponseBox::clearResponses() {
for (int i = 0; i < _responses.GetSize(); i++) {
delete _responses[i];
}
@@ -102,7 +102,7 @@ void CAdResponseBox::ClearResponses() { //////////////////////////////////////////////////////////////////////////
-void CAdResponseBox::ClearButtons() {
+void CAdResponseBox::clearButtons() {
for (int i = 0; i < _respButtons.GetSize(); i++) {
delete _respButtons[i];
}
@@ -111,7 +111,7 @@ void CAdResponseBox::ClearButtons() { //////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponseBox::InvalidateButtons() {
+HRESULT CAdResponseBox::invalidateButtons() {
for (int i = 0; i < _respButtons.GetSize(); i++) {
_respButtons[i]->_image = NULL;
_respButtons[i]->_cursor = NULL;
@@ -125,8 +125,8 @@ HRESULT CAdResponseBox::InvalidateButtons() { //////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponseBox::CreateButtons() {
- ClearButtons();
+HRESULT CAdResponseBox::createButtons() {
+ clearButtons();
_scrollOffset = 0;
for (int i = 0; i < _responses.GetSize(); i++) {
@@ -493,13 +493,13 @@ HRESULT CAdResponseBox::listen(CBScriptHolder *param1, uint32 param2) { _scrollOffset++;
} else if (scumm_stricmp(obj->_name, "response") == 0) {
if (_waitingScript) _waitingScript->_stack->PushInt(_responses[param2]->_iD);
- HandleResponse(_responses[param2]);
+ handleResponse(_responses[param2]);
_waitingScript = NULL;
Game->_state = GAME_RUNNING;
((CAdGame *)Game)->_stateEx = GAME_NORMAL;
_ready = true;
- InvalidateButtons();
- ClearResponses();
+ invalidateButtons();
+ clearResponses();
} else return CBObject::listen(param1, param2);
break;
default:
@@ -536,7 +536,7 @@ HRESULT CAdResponseBox::persist(CBPersistMgr *persistMgr) { //////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponseBox::WeedResponses() {
+HRESULT CAdResponseBox::weedResponses() {
CAdGame *AdGame = (CAdGame *)Game;
for (int i = 0; i < _responses.GetSize(); i++) {
@@ -566,15 +566,15 @@ HRESULT CAdResponseBox::WeedResponses() { //////////////////////////////////////////////////////////////////////////
-void CAdResponseBox::SetLastResponseText(const char *Text, const char *TextOrig) {
+void CAdResponseBox::setLastResponseText(const char *Text, const char *TextOrig) {
CBUtils::SetString(&_lastResponseText, Text);
CBUtils::SetString(&_lastResponseTextOrig, TextOrig);
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponseBox::HandleResponse(CAdResponse *Response) {
- SetLastResponseText(Response->_text, Response->_textOrig);
+HRESULT CAdResponseBox::handleResponse(CAdResponse *Response) {
+ setLastResponseText(Response->_text, Response->_textOrig);
CAdGame *AdGame = (CAdGame *)Game;
@@ -595,9 +595,9 @@ HRESULT CAdResponseBox::HandleResponse(CAdResponse *Response) { //////////////////////////////////////////////////////////////////////////
-CBObject *CAdResponseBox::GetNextAccessObject(CBObject *CurrObject) {
+CBObject *CAdResponseBox::getNextAccessObject(CBObject *CurrObject) {
CBArray<CUIObject *, CUIObject *> Objects;
- GetObjects(Objects, true);
+ getObjects(Objects, true);
if (Objects.GetSize() == 0) return NULL;
else {
@@ -615,9 +615,9 @@ CBObject *CAdResponseBox::GetNextAccessObject(CBObject *CurrObject) { }
//////////////////////////////////////////////////////////////////////////
-CBObject *CAdResponseBox::GetPrevAccessObject(CBObject *CurrObject) {
+CBObject *CAdResponseBox::getPrevAccessObject(CBObject *CurrObject) {
CBArray<CUIObject *, CUIObject *> Objects;
- GetObjects(Objects, true);
+ getObjects(Objects, true);
if (Objects.GetSize() == 0) return NULL;
else {
@@ -635,7 +635,7 @@ CBObject *CAdResponseBox::GetPrevAccessObject(CBObject *CurrObject) { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CAdResponseBox::GetObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly) {
+HRESULT CAdResponseBox::getObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly) {
for (int i = 0; i < _respButtons.GetSize(); i++) {
Objects.Add(_respButtons[i]);
}
diff --git a/engines/wintermute/Ad/AdResponseBox.h b/engines/wintermute/Ad/AdResponseBox.h index 82a5b4fae5..17778beaba 100644 --- a/engines/wintermute/Ad/AdResponseBox.h +++ b/engines/wintermute/Ad/AdResponseBox.h @@ -40,12 +40,12 @@ class CUIObject; class CAdResponse;
class CAdResponseBox : public CBObject {
public:
- CBObject *GetNextAccessObject(CBObject *CurrObject);
- CBObject *GetPrevAccessObject(CBObject *CurrObject);
- HRESULT GetObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly);
+ CBObject *getNextAccessObject(CBObject *CurrObject);
+ CBObject *getPrevAccessObject(CBObject *CurrObject);
+ HRESULT getObjects(CBArray<CUIObject *, CUIObject *> &Objects, bool InteractiveOnly);
- HRESULT HandleResponse(CAdResponse *Response);
- void SetLastResponseText(const char *Text, const char *TextOrig);
+ HRESULT handleResponse(CAdResponse *Response);
+ void setLastResponseText(const char *Text, const char *TextOrig);
char *_lastResponseText;
char *_lastResponseTextOrig;
DECLARE_PERSISTENT(CAdResponseBox, CBObject)
@@ -55,16 +55,16 @@ public: EVENT_PREV, EVENT_NEXT, EVENT_RESPONSE
} TResponseEvent;
- HRESULT WeedResponses();
+ HRESULT weedResponses();
HRESULT display();
int _spacing;
int _scrollOffset;
CBFont *_fontHover;
CBFont *_font;
- HRESULT CreateButtons();
- HRESULT InvalidateButtons();
- void ClearButtons();
- void ClearResponses();
+ HRESULT createButtons();
+ HRESULT invalidateButtons();
+ void clearButtons();
+ void clearResponses();
CAdResponseBox(CBGame *inGame);
virtual ~CAdResponseBox();
CBArray<CAdResponse *, CAdResponse *> _responses;
diff --git a/engines/wintermute/Ad/AdResponseContext.cpp b/engines/wintermute/Ad/AdResponseContext.cpp index 6947838ff0..d757010023 100644 --- a/engines/wintermute/Ad/AdResponseContext.cpp +++ b/engines/wintermute/Ad/AdResponseContext.cpp @@ -58,7 +58,7 @@ HRESULT CAdResponseContext::persist(CBPersistMgr *persistMgr) { }
//////////////////////////////////////////////////////////////////////////
-void CAdResponseContext::SetContext(const char *Context) {
+void CAdResponseContext::setContext(const char *Context) {
delete[] _context;
_context = NULL;
if (Context) {
diff --git a/engines/wintermute/Ad/AdResponseContext.h b/engines/wintermute/Ad/AdResponseContext.h index f29d943e19..d6ad9a9d17 100644 --- a/engines/wintermute/Ad/AdResponseContext.h +++ b/engines/wintermute/Ad/AdResponseContext.h @@ -36,7 +36,7 @@ namespace WinterMute { class CAdResponseContext : public CBBase {
public:
- void SetContext(const char *Context);
+ void setContext(const char *Context);
int _iD;
char *_context;
DECLARE_PERSISTENT(CAdResponseContext, CBBase)
|