diff options
author | Einar Johan Trøan Sømåen | 2012-07-03 05:08:59 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-03 05:08:59 +0200 |
commit | c27d6585df61efc8b1ff5917de2dc3ae8b5d4248 (patch) | |
tree | bbcf066dcaa050f5e1d2e0561e1f7f1166d4ad5f /engines/wintermute/UI | |
parent | 6c6c0bb0167cbf004cf300a81dda71a952d93626 (diff) | |
download | scummvm-rg350-c27d6585df61efc8b1ff5917de2dc3ae8b5d4248.tar.gz scummvm-rg350-c27d6585df61efc8b1ff5917de2dc3ae8b5d4248.tar.bz2 scummvm-rg350-c27d6585df61efc8b1ff5917de2dc3ae8b5d4248.zip |
WINTERMUTE: Rename FuncName->funcName in ScStack
Diffstat (limited to 'engines/wintermute/UI')
-rw-r--r-- | engines/wintermute/UI/UIButton.cpp | 116 | ||||
-rw-r--r-- | engines/wintermute/UI/UIEdit.cpp | 6 | ||||
-rw-r--r-- | engines/wintermute/UI/UIEntity.cpp | 14 | ||||
-rw-r--r-- | engines/wintermute/UI/UIObject.cpp | 58 | ||||
-rw-r--r-- | engines/wintermute/UI/UIText.cpp | 8 | ||||
-rw-r--r-- | engines/wintermute/UI/UIWindow.cpp | 92 |
6 files changed, 147 insertions, 147 deletions
diff --git a/engines/wintermute/UI/UIButton.cpp b/engines/wintermute/UI/UIButton.cpp index 9829114d3a..538f8eb886 100644 --- a/engines/wintermute/UI/UIButton.cpp +++ b/engines/wintermute/UI/UIButton.cpp @@ -671,16 +671,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetDisabledFont
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SetDisabledFont") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
if (_fontDisable) Game->_fontStorage->RemoveFont(_fontDisable);
if (Val->IsNULL()) {
_fontDisable = NULL;
- stack->PushBool(true);
+ stack->pushBool(true);
} else {
_fontDisable = Game->_fontStorage->AddFont(Val->GetString());
- stack->PushBool(_fontDisable != NULL);
+ stack->pushBool(_fontDisable != NULL);
}
return S_OK;
}
@@ -689,16 +689,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetHoverFont
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetHoverFont") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
if (_fontHover) Game->_fontStorage->RemoveFont(_fontHover);
if (Val->IsNULL()) {
_fontHover = NULL;
- stack->PushBool(true);
+ stack->pushBool(true);
} else {
_fontHover = Game->_fontStorage->AddFont(Val->GetString());
- stack->PushBool(_fontHover != NULL);
+ stack->pushBool(_fontHover != NULL);
}
return S_OK;
}
@@ -707,16 +707,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetPressedFont
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetPressedFont") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
if (_fontPress) Game->_fontStorage->RemoveFont(_fontPress);
if (Val->IsNULL()) {
_fontPress = NULL;
- stack->PushBool(true);
+ stack->pushBool(true);
} else {
_fontPress = Game->_fontStorage->AddFont(Val->GetString());
- stack->PushBool(_fontPress != NULL);
+ stack->pushBool(_fontPress != NULL);
}
return S_OK;
}
@@ -725,16 +725,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetFocusedFont
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetFocusedFont") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
if (_fontFocus) Game->_fontStorage->RemoveFont(_fontFocus);
if (Val->IsNULL()) {
_fontFocus = NULL;
- stack->PushBool(true);
+ stack->pushBool(true);
} else {
_fontFocus = Game->_fontStorage->AddFont(Val->GetString());
- stack->PushBool(_fontFocus != NULL);
+ stack->pushBool(_fontFocus != NULL);
}
return S_OK;
}
@@ -743,16 +743,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetDisabledImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetDisabledImage") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
delete _imageDisable;
_imageDisable = new CBSprite(Game);
- const char *Filename = stack->Pop()->GetString();
+ const char *Filename = stack->pop()->GetString();
if (!_imageDisable || FAILED(_imageDisable->loadFile(Filename))) {
delete _imageDisable;
_imageDisable = NULL;
- stack->PushBool(false);
- } else stack->PushBool(true);
+ stack->pushBool(false);
+ } else stack->pushBool(true);
return S_OK;
}
@@ -761,9 +761,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetDisabledImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetDisabledImage") == 0) {
- stack->CorrectParams(0);
- if (!_imageDisable || !_imageDisable->_filename) stack->PushNULL();
- else stack->PushString(_imageDisable->_filename);
+ stack->correctParams(0);
+ if (!_imageDisable || !_imageDisable->_filename) stack->pushNULL();
+ else stack->pushString(_imageDisable->_filename);
return S_OK;
}
@@ -772,9 +772,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetDisabledImageObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetDisabledImageObject") == 0) {
- stack->CorrectParams(0);
- if (!_imageDisable) stack->PushNULL();
- else stack->PushNative(_imageDisable, true);
+ stack->correctParams(0);
+ if (!_imageDisable) stack->pushNULL();
+ else stack->pushNative(_imageDisable, true);
return S_OK;
}
@@ -784,16 +784,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetHoverImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetHoverImage") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
delete _imageHover;
_imageHover = new CBSprite(Game);
- const char *Filename = stack->Pop()->GetString();
+ const char *Filename = stack->pop()->GetString();
if (!_imageHover || FAILED(_imageHover->loadFile(Filename))) {
delete _imageHover;
_imageHover = NULL;
- stack->PushBool(false);
- } else stack->PushBool(true);
+ stack->pushBool(false);
+ } else stack->pushBool(true);
return S_OK;
}
@@ -802,9 +802,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetHoverImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetHoverImage") == 0) {
- stack->CorrectParams(0);
- if (!_imageHover || !_imageHover->_filename) stack->PushNULL();
- else stack->PushString(_imageHover->_filename);
+ stack->correctParams(0);
+ if (!_imageHover || !_imageHover->_filename) stack->pushNULL();
+ else stack->pushString(_imageHover->_filename);
return S_OK;
}
@@ -813,9 +813,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetHoverImageObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetHoverImageObject") == 0) {
- stack->CorrectParams(0);
- if (!_imageHover) stack->PushNULL();
- else stack->PushNative(_imageHover, true);
+ stack->correctParams(0);
+ if (!_imageHover) stack->pushNULL();
+ else stack->pushNative(_imageHover, true);
return S_OK;
}
@@ -824,16 +824,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetPressedImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetPressedImage") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
delete _imagePress;
_imagePress = new CBSprite(Game);
- const char *Filename = stack->Pop()->GetString();
+ const char *Filename = stack->pop()->GetString();
if (!_imagePress || FAILED(_imagePress->loadFile(Filename))) {
delete _imagePress;
_imagePress = NULL;
- stack->PushBool(false);
- } else stack->PushBool(true);
+ stack->pushBool(false);
+ } else stack->pushBool(true);
return S_OK;
}
@@ -842,9 +842,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetPressedImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetPressedImage") == 0) {
- stack->CorrectParams(0);
- if (!_imagePress || !_imagePress->_filename) stack->PushNULL();
- else stack->PushString(_imagePress->_filename);
+ stack->correctParams(0);
+ if (!_imagePress || !_imagePress->_filename) stack->pushNULL();
+ else stack->pushString(_imagePress->_filename);
return S_OK;
}
@@ -853,9 +853,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetPressedImageObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetPressedImageObject") == 0) {
- stack->CorrectParams(0);
- if (!_imagePress) stack->PushNULL();
- else stack->PushNative(_imagePress, true);
+ stack->correctParams(0);
+ if (!_imagePress) stack->pushNULL();
+ else stack->pushNative(_imagePress, true);
return S_OK;
}
@@ -864,16 +864,16 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetFocusedImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetFocusedImage") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
delete _imageFocus;
_imageFocus = new CBSprite(Game);
- const char *Filename = stack->Pop()->GetString();
+ const char *Filename = stack->pop()->GetString();
if (!_imageFocus || FAILED(_imageFocus->loadFile(Filename))) {
delete _imageFocus;
_imageFocus = NULL;
- stack->PushBool(false);
- } else stack->PushBool(true);
+ stack->pushBool(false);
+ } else stack->pushBool(true);
return S_OK;
}
@@ -882,9 +882,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetFocusedImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetFocusedImage") == 0) {
- stack->CorrectParams(0);
- if (!_imageFocus || !_imageFocus->_filename) stack->PushNULL();
- else stack->PushString(_imageFocus->_filename);
+ stack->correctParams(0);
+ if (!_imageFocus || !_imageFocus->_filename) stack->pushNULL();
+ else stack->pushString(_imageFocus->_filename);
return S_OK;
}
@@ -893,9 +893,9 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetFocusedImageObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetFocusedImageObject") == 0) {
- stack->CorrectParams(0);
- if (!_imageFocus) stack->PushNULL();
- else stack->PushNative(_imageFocus, true);
+ stack->correctParams(0);
+ if (!_imageFocus) stack->pushNULL();
+ else stack->pushNative(_imageFocus, true);
return S_OK;
}
@@ -904,13 +904,13 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // Press
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Press") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
if (_visible && !_disable) {
_oneTimePress = true;
_oneTimePressTime = CBPlatform::GetTime();
}
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
}
diff --git a/engines/wintermute/UI/UIEdit.cpp b/engines/wintermute/UI/UIEdit.cpp index f0d4d62874..eb59724089 100644 --- a/engines/wintermute/UI/UIEdit.cpp +++ b/engines/wintermute/UI/UIEdit.cpp @@ -366,11 +366,11 @@ HRESULT CUIEdit::scCallMethod(CScScript *script, CScStack *stack, CScStack *this // SetSelectedFont
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SetSelectedFont") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
if (_fontSelected) Game->_fontStorage->RemoveFont(_fontSelected);
- _fontSelected = Game->_fontStorage->AddFont(stack->Pop()->GetString());
- stack->PushBool(_fontSelected != NULL);
+ _fontSelected = Game->_fontStorage->AddFont(stack->pop()->GetString());
+ stack->pushBool(_fontSelected != NULL);
return S_OK;
}
diff --git a/engines/wintermute/UI/UIEntity.cpp b/engines/wintermute/UI/UIEntity.cpp index 2db966f89d..305f9642a5 100644 --- a/engines/wintermute/UI/UIEntity.cpp +++ b/engines/wintermute/UI/UIEntity.cpp @@ -256,10 +256,10 @@ HRESULT CUIEntity::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetEntity
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "GetEntity") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
- if (_entity) stack->PushNative(_entity, true);
- else stack->PushNULL();
+ if (_entity) stack->pushNative(_entity, true);
+ else stack->pushNULL();
return S_OK;
}
@@ -268,14 +268,14 @@ HRESULT CUIEntity::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetEntity
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetEntity") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
- const char *Filename = stack->Pop()->GetString();
+ const char *Filename = stack->pop()->GetString();
if (SUCCEEDED(setEntity(Filename)))
- stack->PushBool(true);
+ stack->pushBool(true);
else
- stack->PushBool(false);
+ stack->pushBool(false);
return S_OK;
}
diff --git a/engines/wintermute/UI/UIObject.cpp b/engines/wintermute/UI/UIObject.cpp index 45037ec490..a713649604 100644 --- a/engines/wintermute/UI/UIObject.cpp +++ b/engines/wintermute/UI/UIObject.cpp @@ -142,16 +142,16 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetFont
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SetFont") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
if (_font) Game->_fontStorage->RemoveFont(_font);
if (Val->IsNULL()) {
_font = NULL;
- stack->PushBool(true);
+ stack->pushBool(true);
} else {
_font = Game->_fontStorage->AddFont(Val->GetString());
- stack->PushBool(_font != NULL);
+ stack->pushBool(_font != NULL);
}
return S_OK;
}
@@ -160,15 +160,15 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetImage") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
/* const char *Filename = */ Val->GetString();
delete _image;
_image = NULL;
if (Val->IsNULL()) {
- stack->PushBool(true);
+ stack->pushBool(true);
return S_OK;
}
@@ -176,8 +176,8 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th if (!_image || FAILED(_image->loadFile(Val->GetString()))) {
delete _image;
_image = NULL;
- stack->PushBool(false);
- } else stack->PushBool(true);
+ stack->pushBool(false);
+ } else stack->pushBool(true);
return S_OK;
}
@@ -186,9 +186,9 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetImage") == 0) {
- stack->CorrectParams(0);
- if (!_image || !_image->_filename) stack->PushNULL();
- else stack->PushString(_image->_filename);
+ stack->correctParams(0);
+ if (!_image || !_image->_filename) stack->pushNULL();
+ else stack->pushString(_image->_filename);
return S_OK;
}
@@ -197,9 +197,9 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetImageObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetImageObject") == 0) {
- stack->CorrectParams(0);
- if (!_image) stack->PushNULL();
- else stack->PushNative(_image, true);
+ stack->correctParams(0);
+ if (!_image) stack->pushNULL();
+ else stack->pushNative(_image, true);
return S_OK;
}
@@ -208,9 +208,9 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // Focus
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Focus") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
focus();
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
}
@@ -218,14 +218,14 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // MoveAfter / MoveBefore
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MoveAfter") == 0 || strcmp(name, "MoveBefore") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
if (_parent && _parent->_type == UI_WINDOW) {
CUIWindow *win = (CUIWindow *)_parent;
int i;
bool found = false;
- CScValue *val = stack->Pop();
+ CScValue *val = stack->pop();
// find directly
if (val->IsNative()) {
CUIObject *widget = (CUIObject *)val->GetNative();
@@ -258,14 +258,14 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th win->_widgets.RemoveAt(j);
done = true;
- stack->PushBool(true);
+ stack->pushBool(true);
break;
}
}
- if (!done) stack->PushBool(false);
- } else stack->PushBool(false);
+ if (!done) stack->pushBool(false);
+ } else stack->pushBool(false);
- } else stack->PushBool(false);
+ } else stack->pushBool(false);
return S_OK;
}
@@ -274,7 +274,7 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // MoveToBottom
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MoveToBottom") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
if (_parent && _parent->_type == UI_WINDOW) {
CUIWindow *win = (CUIWindow *)_parent;
@@ -285,8 +285,8 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th break;
}
}
- stack->PushBool(true);
- } else stack->PushBool(false);
+ stack->pushBool(true);
+ } else stack->pushBool(false);
return S_OK;
}
@@ -295,7 +295,7 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // MoveToTop
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MoveToTop") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
if (_parent && _parent->_type == UI_WINDOW) {
CUIWindow *win = (CUIWindow *)_parent;
@@ -306,8 +306,8 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th break;
}
}
- stack->PushBool(true);
- } else stack->PushBool(false);
+ stack->pushBool(true);
+ } else stack->pushBool(false);
return S_OK;
}
diff --git a/engines/wintermute/UI/UIText.cpp b/engines/wintermute/UI/UIText.cpp index e73006c28d..414a237556 100644 --- a/engines/wintermute/UI/UIText.cpp +++ b/engines/wintermute/UI/UIText.cpp @@ -381,9 +381,9 @@ HRESULT CUIText::scCallMethod(CScScript *script, CScStack *stack, CScStack *this // SizeToFit
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SizeToFit") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
SizeToFit();
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
}
@@ -391,9 +391,9 @@ HRESULT CUIText::scCallMethod(CScScript *script, CScStack *stack, CScStack *this // HeightToFit
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HeightToFit") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
if (_font && _text) _height = _font->getTextHeight((byte *)_text, _width);
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
}
diff --git a/engines/wintermute/UI/UIWindow.cpp b/engines/wintermute/UI/UIWindow.cpp index 26c60702cb..24e2255d2b 100644 --- a/engines/wintermute/UI/UIWindow.cpp +++ b/engines/wintermute/UI/UIWindow.cpp @@ -695,20 +695,20 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetWidget / GetControl
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "GetWidget") == 0 || strcmp(name, "GetControl") == 0) {
- stack->CorrectParams(1);
- CScValue *val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *val = stack->pop();
if (val->GetType() == VAL_INT) {
int widget = val->GetInt();
- if (widget < 0 || widget >= _widgets.GetSize()) stack->PushNULL();
- else stack->PushNative(_widgets[widget], true);
+ if (widget < 0 || widget >= _widgets.GetSize()) stack->pushNULL();
+ else stack->pushNative(_widgets[widget], true);
} else {
for (int i = 0; i < _widgets.GetSize(); i++) {
if (scumm_stricmp(_widgets[i]->_name, val->GetString()) == 0) {
- stack->PushNative(_widgets[i], true);
+ stack->pushNative(_widgets[i], true);
return S_OK;
}
}
- stack->PushNULL();
+ stack->pushNULL();
}
return S_OK;
@@ -718,11 +718,11 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetInactiveFont
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetInactiveFont") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
if (_fontInactive) Game->_fontStorage->RemoveFont(_fontInactive);
- _fontInactive = Game->_fontStorage->AddFont(stack->Pop()->GetString());
- stack->PushBool(_fontInactive != NULL);
+ _fontInactive = Game->_fontStorage->AddFont(stack->pop()->GetString());
+ stack->pushBool(_fontInactive != NULL);
return S_OK;
}
@@ -731,16 +731,16 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // SetInactiveImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetInactiveImage") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
delete _imageInactive;
_imageInactive = new CBSprite(Game);
- const char *Filename = stack->Pop()->GetString();
+ const char *Filename = stack->pop()->GetString();
if (!_imageInactive || FAILED(_imageInactive->loadFile(Filename))) {
delete _imageInactive;
_imageInactive = NULL;
- stack->PushBool(false);
- } else stack->PushBool(true);
+ stack->pushBool(false);
+ } else stack->pushBool(true);
return S_OK;
}
@@ -749,9 +749,9 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetInactiveImage
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetInactiveImage") == 0) {
- stack->CorrectParams(0);
- if (!_imageInactive || !_imageInactive->_filename) stack->PushNULL();
- else stack->PushString(_imageInactive->_filename);
+ stack->correctParams(0);
+ if (!_imageInactive || !_imageInactive->_filename) stack->pushNULL();
+ else stack->pushString(_imageInactive->_filename);
return S_OK;
}
@@ -760,9 +760,9 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GetInactiveImageObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetInactiveImageObject") == 0) {
- stack->CorrectParams(0);
- if (!_imageInactive) stack->PushNULL();
- else stack->PushNative(_imageInactive, true);
+ stack->correctParams(0);
+ if (!_imageInactive) stack->pushNULL();
+ else stack->pushNative(_imageInactive, true);
return S_OK;
}
@@ -772,8 +772,8 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // Close
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Close") == 0) {
- stack->CorrectParams(0);
- stack->PushBool(SUCCEEDED(close()));
+ stack->correctParams(0);
+ stack->pushBool(SUCCEEDED(close()));
return S_OK;
}
@@ -781,10 +781,10 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GoExclusive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GoExclusive") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
goExclusive();
script->WaitFor(this);
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
}
@@ -792,10 +792,10 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // GoSystemExclusive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GoSystemExclusive") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
goSystemExclusive();
script->WaitFor(this);
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
}
@@ -803,10 +803,10 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // Center
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Center") == 0) {
- stack->CorrectParams(0);
+ stack->correctParams(0);
_posX = (Game->_renderer->_width - _width) / 2;
_posY = (Game->_renderer->_height - _height) / 2;
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
}
@@ -814,13 +814,13 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // LoadFromFile
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LoadFromFile") == 0) {
- stack->CorrectParams(1);
+ stack->correctParams(1);
- CScValue *Val = stack->Pop();
+ CScValue *Val = stack->pop();
cleanup();
if (!Val->IsNULL()) {
- stack->PushBool(SUCCEEDED(loadFile(Val->GetString())));
- } else stack->PushBool(true);
+ stack->pushBool(SUCCEEDED(loadFile(Val->GetString())));
+ } else stack->pushBool(true);
return S_OK;
}
@@ -829,12 +829,12 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // CreateButton
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CreateButton") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
CUIButton *Btn = new CUIButton(Game);
if (!Val->IsNULL()) Btn->setName(Val->GetString());
- stack->PushNative(Btn, true);
+ stack->pushNative(Btn, true);
Btn->_parent = this;
_widgets.Add(Btn);
@@ -846,12 +846,12 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // CreateStatic
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CreateStatic") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
CUIText *Sta = new CUIText(Game);
if (!Val->IsNULL()) Sta->setName(Val->GetString());
- stack->PushNative(Sta, true);
+ stack->pushNative(Sta, true);
Sta->_parent = this;
_widgets.Add(Sta);
@@ -863,12 +863,12 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // CreateEditor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CreateEditor") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
CUIEdit *Edi = new CUIEdit(Game);
if (!Val->IsNULL()) Edi->setName(Val->GetString());
- stack->PushNative(Edi, true);
+ stack->pushNative(Edi, true);
Edi->_parent = this;
_widgets.Add(Edi);
@@ -880,12 +880,12 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // CreateWindow
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CreateWindow") == 0) {
- stack->CorrectParams(1);
- CScValue *Val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *Val = stack->pop();
CUIWindow *Win = new CUIWindow(Game);
if (!Val->IsNULL()) Win->setName(Val->GetString());
- stack->PushNative(Win, true);
+ stack->pushNative(Win, true);
Win->_parent = this;
_widgets.Add(Win);
@@ -897,8 +897,8 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th // DeleteControl / DeleteButton / DeleteStatic / DeleteEditor / DeleteWindow
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DeleteControl") == 0 || strcmp(name, "DeleteButton") == 0 || strcmp(name, "DeleteStatic") == 0 || strcmp(name, "DeleteEditor") == 0 || strcmp(name, "DeleteWindow") == 0) {
- stack->CorrectParams(1);
- CScValue *val = stack->Pop();
+ stack->correctParams(1);
+ CScValue *val = stack->pop();
CUIObject *obj = (CUIObject *)val->GetNative();
for (int i = 0; i < _widgets.GetSize(); i++) {
@@ -908,7 +908,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th if (val->GetType() == VAL_VARIABLE_REF) val->SetNULL();
}
}
- stack->PushNULL();
+ stack->pushNULL();
return S_OK;
} else if SUCCEEDED(Game->WindowScriptMethodHook(this, script, stack, name)) return S_OK;
|