diff options
Diffstat (limited to 'engines/wintermute/Base')
-rw-r--r-- | engines/wintermute/Base/BFader.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BFader.h | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BFrame.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BGame.cpp | 48 | ||||
-rw-r--r-- | engines/wintermute/Base/BGame.h | 10 | ||||
-rw-r--r-- | engines/wintermute/Base/BObject.cpp | 126 | ||||
-rw-r--r-- | engines/wintermute/Base/BObject.h | 50 | ||||
-rw-r--r-- | engines/wintermute/Base/BRegion.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BSprite.cpp | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BSprite.h | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BTransitionMgr.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/Base/BTransitionMgr.h | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/BViewport.cpp | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/BViewport.h | 2 | ||||
-rw-r--r-- | engines/wintermute/Base/PartEmitter.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/Base/PartEmitter.h | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/PartParticle.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/Base/PartParticle.h | 4 | ||||
-rw-r--r-- | engines/wintermute/Base/scriptables/ScEngine.cpp | 2 |
19 files changed, 147 insertions, 147 deletions
diff --git a/engines/wintermute/Base/BFader.cpp b/engines/wintermute/Base/BFader.cpp index b20d377e93..741b586d56 100644 --- a/engines/wintermute/Base/BFader.cpp +++ b/engines/wintermute/Base/BFader.cpp @@ -60,7 +60,7 @@ CBFader::~CBFader() { //////////////////////////////////////////////////////////////////////////
-HRESULT CBFader::Update() {
+HRESULT CBFader::update() {
if (!_active) return S_OK;
int AlphaDelta = _targetAlpha - _sourceAlpha;
@@ -84,7 +84,7 @@ HRESULT CBFader::Update() { //////////////////////////////////////////////////////////////////////////
-HRESULT CBFader::Display() {
+HRESULT CBFader::display() {
if (!_active) return S_OK;
if (_currentAlpha > 0x00) return Game->_renderer->FadeToColor(DRGBA(_red, _green, _blue, _currentAlpha));
diff --git a/engines/wintermute/Base/BFader.h b/engines/wintermute/Base/BFader.h index 141f44f485..663766127b 100644 --- a/engines/wintermute/Base/BFader.h +++ b/engines/wintermute/Base/BFader.h @@ -41,8 +41,8 @@ public: HRESULT FadeOut(uint32 TargetColor, uint32 Duration, bool System = false);
HRESULT FadeIn(uint32 SourceColor, uint32 Duration, bool System = false);
HRESULT Deactivate();
- HRESULT Display();
- HRESULT Update();
+ HRESULT display();
+ HRESULT update();
DECLARE_PERSISTENT(CBFader, CBObject)
CBFader(CBGame *inGame);
virtual ~CBFader();
diff --git a/engines/wintermute/Base/BFrame.cpp b/engines/wintermute/Base/BFrame.cpp index b774a4bf92..7acc45e3ba 100644 --- a/engines/wintermute/Base/BFrame.cpp +++ b/engines/wintermute/Base/BFrame.cpp @@ -90,7 +90,7 @@ HRESULT CBFrame::Draw(int X, int Y, CBObject *Register, float ZoomX, float ZoomY //////////////////////////////////////////////////////////////////////////
HRESULT CBFrame::OneTimeDisplay(CBObject *Owner, bool Muted) {
if (_sound && !Muted) {
- if (Owner) Owner->UpdateOneSound(_sound);
+ if (Owner) Owner->updateOneSound(_sound);
_sound->Play();
/*
if (Game->_state == GAME_FROZEN) {
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp index 73cdea0971..62197ec430 100644 --- a/engines/wintermute/Base/BGame.cpp +++ b/engines/wintermute/Base/BGame.cpp @@ -653,9 +653,9 @@ HRESULT CBGame::InitLoop() { }
}
- UpdateSounds();
+ updateSounds();
- if (_fader) _fader->Update();
+ if (_fader) _fader->update();
return S_OK;
}
@@ -817,7 +817,7 @@ HRESULT CBGame::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_CAPTION:
- SetCaption((char *)params);
+ setCaption((char *)params);
break;
case TOKEN_SYSTEM_FONT:
@@ -1669,7 +1669,7 @@ HRESULT CBGame::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *ThisS //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "SetActiveCursor") == 0) {
Stack->CorrectParams(1);
- if (SUCCEEDED(SetActiveCursor(Stack->Pop()->GetString()))) Stack->PushBool(true);
+ if (SUCCEEDED(setActiveCursor(Stack->Pop()->GetString()))) Stack->PushBool(true);
else Stack->PushBool(false);
return S_OK;
@@ -3209,15 +3209,15 @@ HRESULT CBGame::ExternalCall(CScScript *Script, CScStack *Stack, CScStack *ThisS //////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::ShowCursor() {
+HRESULT CBGame::showCursor() {
if (_cursorHidden) return S_OK;
if (!_interactive && Game->_state == GAME_RUNNING) {
if (_cursorNoninteractive) return DrawCursor(_cursorNoninteractive);
} else {
- if (_activeObject && !FAILED(_activeObject->ShowCursor())) return S_OK;
+ if (_activeObject && !FAILED(_activeObject->showCursor())) return S_OK;
else {
- if (_activeObject && _activeCursor && _activeObject->GetExtendedFlag("usable")) return DrawCursor(_activeCursor);
+ if (_activeObject && _activeCursor && _activeObject->getExtendedFlag("usable")) return DrawCursor(_activeCursor);
else if (_cursor) return DrawCursor(_cursor);
}
}
@@ -3404,7 +3404,7 @@ HRESULT CBGame::DisplayWindows(bool InGame) { for (i = 0; i < _windows.GetSize(); i++) {
if (_windows[i]->_visible && _windows[i]->_inGame == InGame) {
- res = _windows[i]->Display();
+ res = _windows[i]->display();
if (FAILED(res)) return res;
}
}
@@ -3768,7 +3768,7 @@ HRESULT CBGame::Unfreeze() { //////////////////////////////////////////////////////////////////////////
-bool CBGame::HandleKeypress(Common::Event *event, bool printable) {
+bool CBGame::handleKeypress(Common::Event *event, bool printable) {
if (IsVideoPlaying()) {
if (event->kbd.keycode == Common::KEYCODE_ESCAPE)
StopVideo();
@@ -3796,7 +3796,7 @@ bool CBGame::HandleKeypress(Common::Event *event, bool printable) { // TODO
if (_focusedWindow) {
- if (!Game->_focusedWindow->HandleKeypress(event, _keyboardState->_currentPrintable)) {
+ if (!Game->_focusedWindow->handleKeypress(event, _keyboardState->_currentPrintable)) {
/*if (event->type != SDL_TEXTINPUT) {*/
if (Game->_focusedWindow->canHandleEvent("Keypress"))
Game->_focusedWindow->applyEvent("Keypress");
@@ -3819,10 +3819,10 @@ void CBGame::handleKeyRelease(Common::Event *event) { //////////////////////////////////////////////////////////////////////////
-bool CBGame::HandleMouseWheel(int Delta) {
+bool CBGame::handleMouseWheel(int Delta) {
bool Handled = false;
if (_focusedWindow) {
- Handled = Game->_focusedWindow->HandleMouseWheel(Delta);
+ Handled = Game->_focusedWindow->handleMouseWheel(Delta);
if (!Handled) {
if (Delta < 0 && Game->_focusedWindow->canHandleEvent("MouseWheelDown")) {
@@ -4186,18 +4186,18 @@ void CBGame::DEBUG_DumpClassRegistry() { //////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::InvalidateDeviceObjects() {
+HRESULT CBGame::invalidateDeviceObjects() {
for (int i = 0; i < _regObjects.GetSize(); i++) {
- _regObjects[i]->InvalidateDeviceObjects();
+ _regObjects[i]->invalidateDeviceObjects();
}
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBGame::RestoreDeviceObjects() {
+HRESULT CBGame::restoreDeviceObjects() {
for (int i = 0; i < _regObjects.GetSize(); i++) {
- _regObjects[i]->RestoreDeviceObjects();
+ _regObjects[i]->restoreDeviceObjects();
}
return S_OK;
}
@@ -4266,7 +4266,7 @@ HRESULT CBGame::OnActivate(bool Activate, bool RefreshMouse) { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::OnMouseLeftDown() {
- if (_activeObject) _activeObject->HandleMouse(MOUSE_CLICK, MOUSE_BUTTON_LEFT);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_CLICK, MOUSE_BUTTON_LEFT);
bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("LeftClick"));
if (!Handled) {
@@ -4284,7 +4284,7 @@ HRESULT CBGame::OnMouseLeftDown() { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::OnMouseLeftUp() {
- if (_activeObject) _activeObject->HandleMouse(MOUSE_RELEASE, MOUSE_BUTTON_LEFT);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_RELEASE, MOUSE_BUTTON_LEFT);
CBPlatform::ReleaseCapture();
_capturedObject = NULL;
@@ -4303,7 +4303,7 @@ HRESULT CBGame::OnMouseLeftUp() { HRESULT CBGame::OnMouseLeftDblClick() {
if (_state == GAME_RUNNING && !_interactive) return S_OK;
- if (_activeObject) _activeObject->HandleMouse(MOUSE_DBLCLICK, MOUSE_BUTTON_LEFT);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_DBLCLICK, MOUSE_BUTTON_LEFT);
bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("LeftDoubleClick"));
if (!Handled) {
@@ -4318,7 +4318,7 @@ HRESULT CBGame::OnMouseLeftDblClick() { HRESULT CBGame::OnMouseRightDblClick() {
if (_state == GAME_RUNNING && !_interactive) return S_OK;
- if (_activeObject) _activeObject->HandleMouse(MOUSE_DBLCLICK, MOUSE_BUTTON_RIGHT);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_DBLCLICK, MOUSE_BUTTON_RIGHT);
bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("RightDoubleClick"));
if (!Handled) {
@@ -4331,7 +4331,7 @@ HRESULT CBGame::OnMouseRightDblClick() { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::OnMouseRightDown() {
- if (_activeObject) _activeObject->HandleMouse(MOUSE_CLICK, MOUSE_BUTTON_RIGHT);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_CLICK, MOUSE_BUTTON_RIGHT);
bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("RightClick"));
if (!Handled) {
@@ -4344,7 +4344,7 @@ HRESULT CBGame::OnMouseRightDown() { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::OnMouseRightUp() {
- if (_activeObject) _activeObject->HandleMouse(MOUSE_RELEASE, MOUSE_BUTTON_RIGHT);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_RELEASE, MOUSE_BUTTON_RIGHT);
bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("RightRelease"));
if (!Handled) {
@@ -4359,7 +4359,7 @@ HRESULT CBGame::OnMouseRightUp() { HRESULT CBGame::OnMouseMiddleDown() {
if (_state == GAME_RUNNING && !_interactive) return S_OK;
- if (_activeObject) _activeObject->HandleMouse(MOUSE_CLICK, MOUSE_BUTTON_MIDDLE);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_CLICK, MOUSE_BUTTON_MIDDLE);
bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("MiddleClick"));
if (!Handled) {
@@ -4372,7 +4372,7 @@ HRESULT CBGame::OnMouseMiddleDown() { //////////////////////////////////////////////////////////////////////////
HRESULT CBGame::OnMouseMiddleUp() {
- if (_activeObject) _activeObject->HandleMouse(MOUSE_RELEASE, MOUSE_BUTTON_MIDDLE);
+ if (_activeObject) _activeObject->handleMouse(MOUSE_RELEASE, MOUSE_BUTTON_MIDDLE);
bool Handled = _state == GAME_RUNNING && SUCCEEDED(applyEvent("MiddleRelease"));
if (!Handled) {
diff --git a/engines/wintermute/Base/BGame.h b/engines/wintermute/Base/BGame.h index 8aa1cce127..51f792dc75 100644 --- a/engines/wintermute/Base/BGame.h +++ b/engines/wintermute/Base/BGame.h @@ -219,8 +219,8 @@ public: CBFader *_fader;
bool _suppressScriptErrors;
- virtual HRESULT InvalidateDeviceObjects();
- virtual HRESULT RestoreDeviceObjects();
+ virtual HRESULT invalidateDeviceObjects();
+ virtual HRESULT restoreDeviceObjects();
virtual void PublishNatives();
virtual HRESULT ExternalCall(CScScript *Script, CScStack *Stack, CScStack *ThisStack, char *Name);
@@ -253,11 +253,11 @@ public: HRESULT GetSaveSlotDescription(int Slot, char *Buffer);
HRESULT GetSaveSlotFilename(int Slot, char *Buffer);
void SetWindowTitle();
- virtual bool HandleMouseWheel(int Delta);
+ virtual bool handleMouseWheel(int Delta);
bool _quitting;
virtual HRESULT GetVersion(byte *VerMajor, byte *VerMinor, byte *ExtMajor, byte *ExtMinor);
- virtual bool HandleKeypress(Common::Event *event, bool printable = false);
+ virtual bool handleKeypress(Common::Event *event, bool printable = false);
virtual void handleKeyRelease(Common::Event *event);
int _freezeLevel;
HRESULT Unfreeze();
@@ -295,7 +295,7 @@ public: virtual HRESULT LoadGame(int Slot);
virtual HRESULT LoadGame(const char *Filename);
virtual HRESULT SaveGame(int slot, const char *desc, bool quickSave = false);
- virtual HRESULT ShowCursor();
+ virtual HRESULT showCursor();
CBSprite *_cursorNoninteractive;
CBObject *_activeObject;
diff --git a/engines/wintermute/Base/BObject.cpp b/engines/wintermute/Base/BObject.cpp index 107ab2537c..156575b2b5 100644 --- a/engines/wintermute/Base/BObject.cpp +++ b/engines/wintermute/Base/BObject.cpp @@ -135,21 +135,21 @@ HRESULT CBObject::cleanup() { //////////////////////////////////////////////////////////////////////////
-void CBObject::SetCaption(const char *Caption, int Case) {
+void CBObject::setCaption(const char *caption, int Case) { // TODO: rename Case to something usefull
if (Case == 0) Case = 1;
if (Case < 1 || Case > 7) return;
delete[] _caption[Case - 1];
- _caption[Case - 1] = new char[strlen(Caption) + 1];
+ _caption[Case - 1] = new char[strlen(caption) + 1];
if (_caption[Case - 1]) {
- strcpy(_caption[Case - 1], Caption);
+ strcpy(_caption[Case - 1], caption);
Game->_stringTable->Expand(&_caption[Case - 1]);
}
}
//////////////////////////////////////////////////////////////////////////
-char *CBObject::GetCaption(int Case) {
+char *CBObject::getCaption(int Case) {
if (Case == 0) Case = 1;
if (Case < 1 || Case > 7 || _caption[Case - 1] == NULL) return "";
else return _caption[Case - 1];
@@ -185,7 +185,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "Caption") == 0) {
Stack->CorrectParams(1);
- Stack->PushString(GetCaption(Stack->Pop()->GetInt()));
+ Stack->PushString(getCaption(Stack->Pop()->GetInt()));
return S_OK;
}
@@ -195,7 +195,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "SetCursor") == 0) {
Stack->CorrectParams(1);
- if (SUCCEEDED(SetCursor(Stack->Pop()->GetString()))) Stack->PushBool(true);
+ if (SUCCEEDED(setCursor(Stack->Pop()->GetString()))) Stack->PushBool(true);
else Stack->PushBool(false);
return S_OK;
@@ -257,7 +257,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "SetCaption") == 0) {
Stack->CorrectParams(2);
- SetCaption(Stack->Pop()->GetString(), Stack->Pop()->GetInt());
+ setCaption(Stack->Pop()->GetString(), Stack->Pop()->GetInt());
Stack->PushNULL();
return S_OK;
@@ -269,7 +269,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi else if (strcmp(Name, "LoadSound") == 0) {
Stack->CorrectParams(1);
const char *Filename = Stack->Pop()->GetString();
- if (SUCCEEDED(PlaySFX(Filename, false, false)))
+ if (SUCCEEDED(playSFX(Filename, false, false)))
Stack->PushBool(true);
else
Stack->PushBool(false);
@@ -302,7 +302,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi LoopStart = val3->GetInt();
}
- if (FAILED(PlaySFX(Filename, Looping, true, NULL, LoopStart))) Stack->PushBool(false);
+ if (FAILED(playSFX(Filename, Looping, true, NULL, LoopStart))) Stack->PushBool(false);
else Stack->PushBool(true);
return S_OK;
}
@@ -327,7 +327,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi EventName = val2->GetString();
}
- if (FAILED(PlaySFX(Filename, false, true, EventName))) Stack->PushBool(false);
+ if (FAILED(playSFX(Filename, false, true, EventName))) Stack->PushBool(false);
else Stack->PushBool(true);
return S_OK;
}
@@ -338,7 +338,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi else if (strcmp(Name, "StopSound") == 0) {
Stack->CorrectParams(0);
- if (FAILED(StopSFX())) Stack->PushBool(false);
+ if (FAILED(stopSFX())) Stack->PushBool(false);
else Stack->PushBool(true);
return S_OK;
}
@@ -349,7 +349,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi else if (strcmp(Name, "PauseSound") == 0) {
Stack->CorrectParams(0);
- if (FAILED(PauseSFX())) Stack->PushBool(false);
+ if (FAILED(pauseSFX())) Stack->PushBool(false);
else Stack->PushBool(true);
return S_OK;
}
@@ -360,7 +360,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi else if (strcmp(Name, "ResumeSound") == 0) {
Stack->CorrectParams(0);
- if (FAILED(ResumeSFX())) Stack->PushBool(false);
+ if (FAILED(resumeSFX())) Stack->PushBool(false);
else Stack->PushBool(true);
return S_OK;
}
@@ -383,7 +383,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi Stack->CorrectParams(1);
uint32 Time = Stack->Pop()->GetInt();
- if (FAILED(SetSFXTime(Time))) Stack->PushBool(false);
+ if (FAILED(setSFXTime(Time))) Stack->PushBool(false);
else Stack->PushBool(true);
return S_OK;
}
@@ -406,7 +406,7 @@ HRESULT CBObject::scCallMethod(CScScript *Script, CScStack *Stack, CScStack *Thi Stack->CorrectParams(1);
int Volume = Stack->Pop()->GetInt();
- if (FAILED(SetSFXVolume(Volume))) Stack->PushBool(false);
+ if (FAILED(setSFXVolume(Volume))) Stack->PushBool(false);
else Stack->PushBool(true);
return S_OK;
}
@@ -488,7 +488,7 @@ CScValue *CBObject::scGetProperty(const char *Name) { // Caption
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "Caption") == 0) {
- _scValue->SetString(GetCaption(1));
+ _scValue->SetString(getCaption(1));
return _scValue;
}
@@ -512,7 +512,7 @@ CScValue *CBObject::scGetProperty(const char *Name) { // Height (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "Height") == 0) {
- _scValue->SetInt(GetHeight());
+ _scValue->SetInt(getHeight());
return _scValue;
}
@@ -671,7 +671,7 @@ HRESULT CBObject::scSetProperty(const char *Name, CScValue *Value) { // Caption
//////////////////////////////////////////////////////////////////////////
if (strcmp(Name, "Caption") == 0) {
- SetCaption(Value->GetString());
+ setCaption(Value->GetString());
return S_OK;
}
@@ -813,7 +813,7 @@ HRESULT CBObject::scSetProperty(const char *Name, CScValue *Value) { //////////////////////////////////////////////////////////////////////////
else if (strcmp(Name, "SoundPanning") == 0) {
_autoSoundPanning = Value->GetBool();
- if (!_autoSoundPanning) ResetSoundPan();
+ if (!_autoSoundPanning) resetSoundPan();
return S_OK;
}
@@ -851,14 +851,14 @@ const char *CBObject::scToString() { //////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::ShowCursor() {
+HRESULT CBObject::showCursor() {
if (_cursor) return Game->DrawCursor(_cursor);
else return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::saveAsText(CBDynBuffer *Buffer, int Indent) {
+HRESULT CBObject::saveAsText(CBDynBuffer *buffer, int indent) {
return S_OK;
}
@@ -919,7 +919,7 @@ HRESULT CBObject::persist(CBPersistMgr *persistMgr) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::SetCursor(const char *Filename) {
+HRESULT CBObject::setCursor(const char *filename) {
if (!_sharedCursors) {
delete _cursor;
_cursor = NULL;
@@ -927,7 +927,7 @@ HRESULT CBObject::SetCursor(const char *Filename) { _sharedCursors = false;
_cursor = new CBSprite(Game);
- if (!_cursor || FAILED(_cursor->LoadFile(Filename))) {
+ if (!_cursor || FAILED(_cursor->LoadFile(filename))) {
delete _cursor;
_cursor = NULL;
return E_FAIL;
@@ -936,10 +936,10 @@ HRESULT CBObject::SetCursor(const char *Filename) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::SetActiveCursor(const char *Filename) {
+HRESULT CBObject::setActiveCursor(const char *filename) {
delete _activeCursor;
_activeCursor = new CBSprite(Game);
- if (!_activeCursor || FAILED(_activeCursor->LoadFile(Filename))) {
+ if (!_activeCursor || FAILED(_activeCursor->LoadFile(filename))) {
delete _activeCursor;
_activeCursor = NULL;
return E_FAIL;
@@ -948,62 +948,62 @@ HRESULT CBObject::SetActiveCursor(const char *Filename) { //////////////////////////////////////////////////////////////////////////
-int CBObject::GetHeight() {
+int CBObject::getHeight() {
return 0;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::HandleMouse(TMouseEvent Event, TMouseButton Button) {
+HRESULT CBObject::handleMouse(TMouseEvent event, TMouseButton button) {
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-bool CBObject::HandleKeypress(Common::Event *event, bool printable) {
+bool CBObject::handleKeypress(Common::Event *event, bool printable) {
return false;
}
//////////////////////////////////////////////////////////////////////////
-bool CBObject::HandleMouseWheel(int Delta) {
+bool CBObject::handleMouseWheel(int delta) {
return false;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::PlaySFX(const char *Filename, bool Looping, bool PlayNow, const char *EventName, uint32 LoopStart) {
+HRESULT CBObject::playSFX(const char *filename, bool looping, bool playNow, const char *eventName, uint32 loopStart) {
// just play loaded sound
- if (Filename == NULL && _sFX) {
+ if (filename == NULL && _sFX) {
if (Game->_editorMode || _sFXStart) {
_sFX->SetVolume(_sFXVolume);
_sFX->SetPositionTime(_sFXStart);
if (!Game->_editorMode) _sFXStart = 0;
}
- if (PlayNow) {
- SetSoundEvent(EventName);
- if (LoopStart) _sFX->SetLoopStart(LoopStart);
- return _sFX->Play(Looping);
+ if (playNow) {
+ setSoundEvent(eventName);
+ if (loopStart) _sFX->SetLoopStart(loopStart);
+ return _sFX->Play(looping);
} else return S_OK;
}
- if (Filename == NULL) return E_FAIL;
+ if (filename == NULL) return E_FAIL;
// create new sound
delete _sFX;
_sFX = new CBSound(Game);
- if (_sFX && SUCCEEDED(_sFX->SetSound(Filename, SOUND_SFX, true))) {
+ if (_sFX && SUCCEEDED(_sFX->SetSound(filename, SOUND_SFX, true))) {
_sFX->SetVolume(_sFXVolume);
if (_sFXStart) {
_sFX->SetPositionTime(_sFXStart);
_sFXStart = 0;
}
_sFX->ApplyFX(_sFXType, _sFXParam1, _sFXParam2, _sFXParam3, _sFXParam4);
- if (PlayNow) {
- SetSoundEvent(EventName);
- if (LoopStart) _sFX->SetLoopStart(LoopStart);
- return _sFX->Play(Looping);
+ if (playNow) {
+ setSoundEvent(eventName);
+ if (loopStart) _sFX->SetLoopStart(loopStart);
+ return _sFX->Play(looping);
} else return S_OK;
} else {
delete _sFX;
@@ -1014,10 +1014,10 @@ HRESULT CBObject::PlaySFX(const char *Filename, bool Looping, bool PlayNow, cons //////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::StopSFX(bool DeleteSound) {
+HRESULT CBObject::stopSFX(bool deleteSound) {
if (_sFX) {
_sFX->Stop();
- if (DeleteSound) {
+ if (deleteSound) {
delete _sFX;
_sFX = NULL;
}
@@ -1027,29 +1027,29 @@ HRESULT CBObject::StopSFX(bool DeleteSound) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::PauseSFX() {
+HRESULT CBObject::pauseSFX() {
if (_sFX) return _sFX->Pause();
else return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::ResumeSFX() {
+HRESULT CBObject::resumeSFX() {
if (_sFX) return _sFX->Resume();
else return E_FAIL;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::SetSFXTime(uint32 Time) {
- _sFXStart = Time;
- if (_sFX && _sFX->IsPlaying()) return _sFX->SetPositionTime(Time);
+HRESULT CBObject::setSFXTime(uint32 time) {
+ _sFXStart = time;
+ if (_sFX && _sFX->IsPlaying()) return _sFX->SetPositionTime(time);
else return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::SetSFXVolume(int Volume) {
+HRESULT CBObject::setSFXVolume(int Volume) {
_sFXVolume = Volume;
if (_sFX) return _sFX->SetVolume(Volume);
else return S_OK;
@@ -1057,34 +1057,34 @@ HRESULT CBObject::SetSFXVolume(int Volume) { //////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::UpdateSounds() {
+HRESULT CBObject::updateSounds() {
if (_soundEvent) {
if (_sFX && !_sFX->IsPlaying()) {
applyEvent(_soundEvent);
- SetSoundEvent(NULL);
+ setSoundEvent(NULL);
}
}
- if (_sFX) UpdateOneSound(_sFX);
+ if (_sFX) updateOneSound(_sFX);
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::UpdateOneSound(CBSound *Sound) {
+HRESULT CBObject::updateOneSound(CBSound *sound) {
HRESULT Ret = S_OK;
- if (Sound) {
+ if (sound) {
if (_autoSoundPanning)
- Ret = Sound->SetPan(Game->_soundMgr->posToPan(_posX - Game->_offsetX, _posY - Game->_offsetY));
+ Ret = sound->SetPan(Game->_soundMgr->posToPan(_posX - Game->_offsetX, _posY - Game->_offsetY));
- Ret = Sound->ApplyFX(_sFXType, _sFXParam1, _sFXParam2, _sFXParam3, _sFXParam4);
+ Ret = sound->ApplyFX(_sFXType, _sFXParam1, _sFXParam2, _sFXParam3, _sFXParam4);
}
return Ret;
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CBObject::ResetSoundPan() {
+HRESULT CBObject::resetSoundPan() {
if (!_sFX) return S_OK;
else {
return _sFX->SetPan(0.0f);
@@ -1093,24 +1093,24 @@ HRESULT CBObject::ResetSoundPan() { //////////////////////////////////////////////////////////////////////////
-bool CBObject::GetExtendedFlag(const char *FlagName) {
+bool CBObject::getExtendedFlag(const char *flagName) {
return false;
}
//////////////////////////////////////////////////////////////////////////
-bool CBObject::IsReady() {
+bool CBObject::isReady() {
return _ready;
}
//////////////////////////////////////////////////////////////////////////
-void CBObject::SetSoundEvent(const char *EventName) {
+void CBObject::setSoundEvent(const char *eventName) {
delete[] _soundEvent;
_soundEvent = NULL;
- if (EventName) {
- _soundEvent = new char[strlen(EventName) + 1];
- if (_soundEvent) strcpy(_soundEvent, EventName);
+ if (eventName) {
+ _soundEvent = new char[strlen(eventName) + 1];
+ if (_soundEvent) strcpy(_soundEvent, eventName);
}
}
diff --git a/engines/wintermute/Base/BObject.h b/engines/wintermute/Base/BObject.h index 294b345dec..20b6cfdb2a 100644 --- a/engines/wintermute/Base/BObject.h +++ b/engines/wintermute/Base/BObject.h @@ -50,27 +50,27 @@ public: float _relativeRotate;
bool _rotateValid;
float _rotate;
- void SetSoundEvent(const char *EventName);
+ void setSoundEvent(const char *EventName);
bool _rotatable;
uint32 _alphaColor;
float _scale;
float _scaleX;
float _scaleY;
float _relativeScale;
- virtual bool IsReady();
- virtual bool GetExtendedFlag(const char *FlagName);
- virtual HRESULT ResetSoundPan();
- virtual HRESULT UpdateSounds();
- HRESULT UpdateOneSound(CBSound *Sound);
+ virtual bool isReady();
+ virtual bool getExtendedFlag(const char *FlagName);
+ virtual HRESULT resetSoundPan();
+ virtual HRESULT updateSounds();
+ HRESULT updateOneSound(CBSound *Sound);
bool _autoSoundPanning;
uint32 _sFXStart;
int _sFXVolume;
- HRESULT SetSFXTime(uint32 Time);
- HRESULT SetSFXVolume(int Volume);
- HRESULT ResumeSFX();
- HRESULT PauseSFX();
- HRESULT StopSFX(bool DeleteSound = true);
- HRESULT PlaySFX(const char *Filename, bool Looping = false, bool PlayNow = true, const char *EventName = NULL, uint32 LoopStart = 0);
+ HRESULT setSFXTime(uint32 Time);
+ HRESULT setSFXVolume(int Volume);
+ HRESULT resumeSFX();
+ HRESULT pauseSFX();
+ HRESULT stopSFX(bool DeleteSound = true);
+ HRESULT playSFX(const char *Filename, bool Looping = false, bool PlayNow = true, const char *EventName = NULL, uint32 LoopStart = 0);
CBSound *_sFX;
TSFXType _sFXType;
@@ -79,21 +79,21 @@ public: float _sFXParam3;
float _sFXParam4;
- virtual bool HandleMouseWheel(int Delta);
- virtual HRESULT HandleMouse(TMouseEvent Event, TMouseButton Button);
- virtual bool HandleKeypress(Common::Event *event, bool printable = false);
- virtual int GetHeight();
- HRESULT SetCursor(const char *Filename);
- HRESULT SetActiveCursor(const char *Filename);
+ virtual bool handleMouseWheel(int Delta);
+ virtual HRESULT handleMouse(TMouseEvent Event, TMouseButton Button);
+ virtual bool handleKeypress(Common::Event *event, bool printable = false);
+ virtual int getHeight();
+ HRESULT setCursor(const char *Filename);
+ HRESULT setActiveCursor(const char *Filename);
HRESULT cleanup();
- char *GetCaption(int Case = 1);
- void SetCaption(const char *Caption, int Case = 1);
+ char *getCaption(int Case = 1);
+ void setCaption(const char *Caption, int Case = 1);
bool _editorSelected;
bool _editorAlwaysRegister;
bool _editorOnly;
bool _is3D;
DECLARE_PERSISTENT(CBObject, CBScriptHolder)
- virtual HRESULT ShowCursor();
+ virtual HRESULT showCursor();
CBSprite *_cursor;
bool _sharedCursors;
CBSprite *_activeCursor;
@@ -116,16 +116,16 @@ public: bool _saveState;
// base
- virtual HRESULT Update() {
+ virtual HRESULT update() {
return E_FAIL;
};
- virtual HRESULT Display() {
+ virtual HRESULT display() {
return E_FAIL;
};
- virtual HRESULT InvalidateDeviceObjects() {
+ virtual HRESULT invalidateDeviceObjects() {
return S_OK;
};
- virtual HRESULT RestoreDeviceObjects() {
+ virtual HRESULT restoreDeviceObjects() {
return S_OK;
};
bool _nonIntMouseEvents;
diff --git a/engines/wintermute/Base/BRegion.cpp b/engines/wintermute/Base/BRegion.cpp index 9307af62bb..9de95bb858 100644 --- a/engines/wintermute/Base/BRegion.cpp +++ b/engines/wintermute/Base/BRegion.cpp @@ -169,7 +169,7 @@ HRESULT CBRegion::LoadBuffer(byte *Buffer, bool Complete) { break;
case TOKEN_CAPTION:
- SetCaption((char *)params);
+ setCaption((char *)params);
break;
case TOKEN_ACTIVE:
@@ -383,7 +383,7 @@ HRESULT CBRegion::saveAsText(CBDynBuffer *Buffer, int Indent, const char *NameOv else Buffer->PutTextIndent(Indent, "%s {\n", NameOverride);
Buffer->PutTextIndent(Indent + 2, "NAME=\"%s\"\n", _name);
- Buffer->PutTextIndent(Indent + 2, "CAPTION=\"%s\"\n", GetCaption());
+ Buffer->PutTextIndent(Indent + 2, "CAPTION=\"%s\"\n", getCaption());
Buffer->PutTextIndent(Indent + 2, "ACTIVE=%s\n", _active ? "TRUE" : "FALSE");
Buffer->PutTextIndent(Indent + 2, "EDITOR_SELECTED_POINT=%d\n", _editorSelectedPoint);
diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp index 8e851d5605..e7f9df194d 100644 --- a/engines/wintermute/Base/BSprite.cpp +++ b/engines/wintermute/Base/BSprite.cpp @@ -117,7 +117,7 @@ HRESULT CBSprite::Draw(int X, int Y, CBObject *Register, float ZoomX, float Zoom }
// draw frame
- return Display(X, Y, Register, ZoomX, ZoomY, Alpha);
+ return display(X, Y, Register, ZoomX, ZoomY, Alpha);
}
@@ -383,7 +383,7 @@ bool CBSprite::GetCurrentFrame(float ZoomX, float ZoomY) { //////////////////////////////////////////////////////////////////////
-HRESULT CBSprite::Display(int X, int Y, CBObject *Register, float ZoomX, float ZoomY, uint32 Alpha, float Rotate, TSpriteBlendMode BlendMode) {
+HRESULT CBSprite::display(int X, int Y, CBObject *Register, float ZoomX, float ZoomY, uint32 Alpha, float Rotate, TSpriteBlendMode BlendMode) {
if (_currentFrame < 0 || _currentFrame >= _frames.GetSize()) return S_OK;
// on change...
diff --git a/engines/wintermute/Base/BSprite.h b/engines/wintermute/Base/BSprite.h index a5dde324e5..67f703d744 100644 --- a/engines/wintermute/Base/BSprite.h +++ b/engines/wintermute/Base/BSprite.h @@ -56,7 +56,7 @@ public: bool GetBoundingRect(LPRECT Rect, int X, int Y, float ScaleX = 100, float ScaleY = 100);
int _moveY;
int _moveX;
- HRESULT Display(int X, int Y, CBObject *Register = NULL, float ZoomX = 100, float ZoomY = 100, uint32 Alpha = 0xFFFFFFFF, float Rotate = 0.0f, TSpriteBlendMode BlendMode = BLEND_NORMAL);
+ HRESULT display(int X, int Y, CBObject *Register = NULL, float ZoomX = 100, float ZoomY = 100, uint32 Alpha = 0xFFFFFFFF, float Rotate = 0.0f, TSpriteBlendMode BlendMode = BLEND_NORMAL);
bool GetCurrentFrame(float ZoomX = 100, float ZoomY = 100);
bool _canBreak;
bool _editorMuted;
diff --git a/engines/wintermute/Base/BTransitionMgr.cpp b/engines/wintermute/Base/BTransitionMgr.cpp index 1a9d9008c6..c44a5960a1 100644 --- a/engines/wintermute/Base/BTransitionMgr.cpp +++ b/engines/wintermute/Base/BTransitionMgr.cpp @@ -52,7 +52,7 @@ CBTransitionMgr::~CBTransitionMgr() { //////////////////////////////////////////////////////////////////////////
-bool CBTransitionMgr::IsReady() {
+bool CBTransitionMgr::isReady() {
return (_state == TRANS_MGR_READY);
}
@@ -82,8 +82,8 @@ HRESULT CBTransitionMgr::Start(TTransitionType Type, bool NonInteractive) { #define FADE_DURATION 200
//////////////////////////////////////////////////////////////////////////
-HRESULT CBTransitionMgr::Update() {
- if (IsReady()) return S_OK;
+HRESULT CBTransitionMgr::update() {
+ if (isReady()) return S_OK;
if (!_started) {
_started = true;
@@ -118,7 +118,7 @@ HRESULT CBTransitionMgr::Update() { error("CBTransitionMgr::Update - unhandled enum NUM_TRANSITION_TYPES");
}
- if (IsReady()) {
+ if (isReady()) {
if (_preserveInteractive) Game->_interactive = _origInteractive;
}
return S_OK;
diff --git a/engines/wintermute/Base/BTransitionMgr.h b/engines/wintermute/Base/BTransitionMgr.h index 01cdee8262..41ec077822 100644 --- a/engines/wintermute/Base/BTransitionMgr.h +++ b/engines/wintermute/Base/BTransitionMgr.h @@ -39,9 +39,9 @@ public: uint32 _lastTime;
bool _origInteractive;
bool _preserveInteractive;
- HRESULT Update();
+ HRESULT update();
HRESULT Start(TTransitionType Type, bool NonInteractive = false);
- bool IsReady();
+ bool isReady();
TTransMgrState _state;
CBTransitionMgr(CBGame *inGame);
virtual ~CBTransitionMgr();
diff --git a/engines/wintermute/Base/BViewport.cpp b/engines/wintermute/Base/BViewport.cpp index 5010b2c030..e6c372b4e6 100644 --- a/engines/wintermute/Base/BViewport.cpp +++ b/engines/wintermute/Base/BViewport.cpp @@ -91,7 +91,7 @@ int CBViewport::GetWidth() { //////////////////////////////////////////////////////////////////////////
-int CBViewport::GetHeight() {
+int CBViewport::getHeight() {
return _rect.bottom - _rect.top;
}
diff --git a/engines/wintermute/Base/BViewport.h b/engines/wintermute/Base/BViewport.h index 640f54f438..65d82de45b 100644 --- a/engines/wintermute/Base/BViewport.h +++ b/engines/wintermute/Base/BViewport.h @@ -36,7 +36,7 @@ namespace WinterMute { class CBObject;
class CBViewport : public CBBase {
public:
- int GetHeight();
+ int getHeight();
int GetWidth();
RECT *GetRect();
HRESULT SetRect(int left, int top, int right, int bottom, bool NoCheck = false);
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp index bfce64041e..5f7f8f5906 100644 --- a/engines/wintermute/Base/PartEmitter.cpp +++ b/engines/wintermute/Base/PartEmitter.cpp @@ -226,7 +226,7 @@ HRESULT CPartEmitter::InitParticle(CPartParticle *Particle, uint32 CurrentTime, }
//////////////////////////////////////////////////////////////////////////
-HRESULT CPartEmitter::Update() {
+HRESULT CPartEmitter::update() {
if (!_running) return S_OK;
else return UpdateInternal(Game->_timer, Game->_timerDelta);
}
@@ -236,7 +236,7 @@ HRESULT CPartEmitter::UpdateInternal(uint32 CurrentTime, uint32 TimerDelta) { int NumLive = 0;
for (int i = 0; i < _particles.GetSize(); i++) {
- _particles[i]->Update(this, CurrentTime, TimerDelta);
+ _particles[i]->update(this, CurrentTime, TimerDelta);
if (!_particles[i]->_isDead) NumLive++;
}
@@ -288,7 +288,7 @@ HRESULT CPartEmitter::UpdateInternal(uint32 CurrentTime, uint32 TimerDelta) { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CPartEmitter::Display(CBRegion *Region) {
+HRESULT CPartEmitter::display(CBRegion *Region) {
if (_sprites.GetSize() <= 1) Game->_renderer->StartSpriteBatch();
for (int i = 0; i < _particles.GetSize(); i++) {
@@ -296,7 +296,7 @@ HRESULT CPartEmitter::Display(CBRegion *Region) { if (!Region->PointInRegion(_particles[i]->_pos.x, _particles[i]->_pos.y)) continue;
}
- _particles[i]->Display(this);
+ _particles[i]->display(this);
}
if (_sprites.GetSize() <= 1) Game->_renderer->EndSpriteBatch();
diff --git a/engines/wintermute/Base/PartEmitter.h b/engines/wintermute/Base/PartEmitter.h index 45997b280e..f4ef67fe69 100644 --- a/engines/wintermute/Base/PartEmitter.h +++ b/engines/wintermute/Base/PartEmitter.h @@ -102,8 +102,8 @@ public: HRESULT Start();
- HRESULT Update();
- HRESULT Display(CBRegion *Region = NULL);
+ HRESULT update();
+ HRESULT display(CBRegion *Region = NULL);
HRESULT SortParticlesByZ();
HRESULT AddSprite(const char *Filename);
diff --git a/engines/wintermute/Base/PartParticle.cpp b/engines/wintermute/Base/PartParticle.cpp index f772e6fe77..69b933b518 100644 --- a/engines/wintermute/Base/PartParticle.cpp +++ b/engines/wintermute/Base/PartParticle.cpp @@ -96,7 +96,7 @@ HRESULT CPartParticle::SetSprite(const char *Filename) { }
//////////////////////////////////////////////////////////////////////////
-HRESULT CPartParticle::Update(CPartEmitter *Emitter, uint32 CurrentTime, uint32 TimerDelta) {
+HRESULT CPartParticle::update(CPartEmitter *Emitter, uint32 CurrentTime, uint32 TimerDelta) {
if (_state == PARTICLE_FADEIN) {
if (CurrentTime - _fadeStart >= _fadeTime) {
_state = PARTICLE_NORMAL;
@@ -180,12 +180,12 @@ HRESULT CPartParticle::Update(CPartEmitter *Emitter, uint32 CurrentTime, uint32 }
//////////////////////////////////////////////////////////////////////////
-HRESULT CPartParticle::Display(CPartEmitter *Emitter) {
+HRESULT CPartParticle::display(CPartEmitter *Emitter) {
if (!_sprite) return E_FAIL;
if (_isDead) return S_OK;
_sprite->GetCurrentFrame();
- return _sprite->Display(_pos.x, _pos.y,
+ return _sprite->display(_pos.x, _pos.y,
NULL,
_scale, _scale,
DRGBA(255, 255, 255, _currentAlpha),
diff --git a/engines/wintermute/Base/PartParticle.h b/engines/wintermute/Base/PartParticle.h index 2c5c57034c..9618954475 100644 --- a/engines/wintermute/Base/PartParticle.h +++ b/engines/wintermute/Base/PartParticle.h @@ -68,8 +68,8 @@ public: bool _isDead;
TParticleState _state;
- HRESULT Update(CPartEmitter *Emitter, uint32 CurrentTime, uint32 TimerDelta);
- HRESULT Display(CPartEmitter *Emitter);
+ HRESULT update(CPartEmitter *Emitter, uint32 CurrentTime, uint32 TimerDelta);
+ HRESULT display(CPartEmitter *Emitter);
HRESULT SetSprite(const char *Filename);
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp index 0066a2574f..4e2dd203cc 100644 --- a/engines/wintermute/Base/scriptables/ScEngine.cpp +++ b/engines/wintermute/Base/scriptables/ScEngine.cpp @@ -390,7 +390,7 @@ HRESULT CScEngine::Tick() { if(!obj_found) _scripts[i]->Finish(); // _waitObject no longer exists
*/
if (Game->ValidObject(_scripts[i]->_waitObject)) {
- if (_scripts[i]->_waitObject->IsReady()) _scripts[i]->Run();
+ if (_scripts[i]->_waitObject->isReady()) _scripts[i]->Run();
} else _scripts[i]->Finish();
break;
}
|