aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2012-07-03 05:37:08 +0200
committerEinar Johan Trøan Sømåen2012-07-03 05:37:08 +0200
commit2f90dd76f99a827ce1bf5ea8ee6d653396756e1b (patch)
tree1239e46c37d48023f2a6cd0148d93d0920b34a83 /engines
parentc27d6585df61efc8b1ff5917de2dc3ae8b5d4248 (diff)
downloadscummvm-rg350-2f90dd76f99a827ce1bf5ea8ee6d653396756e1b.tar.gz
scummvm-rg350-2f90dd76f99a827ce1bf5ea8ee6d653396756e1b.tar.bz2
scummvm-rg350-2f90dd76f99a827ce1bf5ea8ee6d653396756e1b.zip
WINTERMUTE: Rename FuncName->funcName in CScValue
Diffstat (limited to 'engines')
-rw-r--r--engines/wintermute/Ad/AdActor.cpp58
-rw-r--r--engines/wintermute/Ad/AdEntity.cpp38
-rw-r--r--engines/wintermute/Ad/AdGame.cpp162
-rw-r--r--engines/wintermute/Ad/AdItem.cpp46
-rw-r--r--engines/wintermute/Ad/AdLayer.cpp48
-rw-r--r--engines/wintermute/Ad/AdObject.cpp124
-rw-r--r--engines/wintermute/Ad/AdRegion.cpp28
-rw-r--r--engines/wintermute/Ad/AdScene.cpp168
-rw-r--r--engines/wintermute/Ad/AdTalkHolder.cpp22
-rw-r--r--engines/wintermute/Ad/AdWaypointGroup.cpp8
-rw-r--r--engines/wintermute/Base/BFrame.cpp52
-rw-r--r--engines/wintermute/Base/BGame.cpp426
-rw-r--r--engines/wintermute/Base/BKeyboardState.cpp26
-rw-r--r--engines/wintermute/Base/BObject.cpp154
-rw-r--r--engines/wintermute/Base/BRegion.cpp38
-rw-r--r--engines/wintermute/Base/BScriptHolder.cpp26
-rw-r--r--engines/wintermute/Base/BScriptable.cpp4
-rw-r--r--engines/wintermute/Base/BSprite.cpp40
-rw-r--r--engines/wintermute/Base/BSubFrame.cpp42
-rw-r--r--engines/wintermute/Base/PartEmitter.cpp180
-rw-r--r--engines/wintermute/Base/scriptables/SXArray.cpp36
-rw-r--r--engines/wintermute/Base/scriptables/SXDate.cpp34
-rw-r--r--engines/wintermute/Base/scriptables/SXFile.cpp46
-rw-r--r--engines/wintermute/Base/scriptables/SXMath.cpp50
-rw-r--r--engines/wintermute/Base/scriptables/SXMemBuffer.cpp62
-rw-r--r--engines/wintermute/Base/scriptables/SXStore.cpp44
-rw-r--r--engines/wintermute/Base/scriptables/SXString.cpp36
-rw-r--r--engines/wintermute/Base/scriptables/ScEngine.cpp20
-rw-r--r--engines/wintermute/Base/scriptables/ScScript.cpp246
-rw-r--r--engines/wintermute/Base/scriptables/ScStack.cpp32
-rw-r--r--engines/wintermute/Base/scriptables/ScValue.cpp318
-rw-r--r--engines/wintermute/Base/scriptables/ScValue.h82
-rw-r--r--engines/wintermute/Base/scriptables/SxObject.cpp4
-rw-r--r--engines/wintermute/UI/UIButton.cpp44
-rw-r--r--engines/wintermute/UI/UIEdit.cpp38
-rw-r--r--engines/wintermute/UI/UIEntity.cpp12
-rw-r--r--engines/wintermute/UI/UIObject.cpp56
-rw-r--r--engines/wintermute/UI/UIText.cpp12
-rw-r--r--engines/wintermute/UI/UIWindow.cpp66
39 files changed, 1464 insertions, 1464 deletions
diff --git a/engines/wintermute/Ad/AdActor.cpp b/engines/wintermute/Ad/AdActor.cpp
index d6ed8a35c3..f553128d79 100644
--- a/engines/wintermute/Ad/AdActor.cpp
+++ b/engines/wintermute/Ad/AdActor.cpp
@@ -856,8 +856,8 @@ HRESULT CAdActor::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "GoTo") == 0 || strcmp(name, "GoToAsync") == 0) {
stack->correctParams(2);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
goTo(X, Y);
if (strcmp(name, "GoToAsync") != 0) script->WaitForExclusive(this);
stack->pushNULL();
@@ -870,12 +870,12 @@ HRESULT CAdActor::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "GoToObject") == 0 || strcmp(name, "GoToObjectAsync") == 0) {
stack->correctParams(1);
CScValue *Val = stack->pop();
- if (!Val->IsNative()) {
+ if (!Val->isNative()) {
script->RuntimeError("actor.%s method accepts an entity refrence only", name);
stack->pushNULL();
return S_OK;
}
- CAdObject *Obj = (CAdObject *)Val->GetNative();
+ CAdObject *Obj = (CAdObject *)Val->getNative();
if (!Obj || Obj->_type != OBJECT_ENTITY) {
script->RuntimeError("actor.%s method accepts an entity refrence only", name);
stack->pushNULL();
@@ -898,13 +898,13 @@ HRESULT CAdActor::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CScValue *val = stack->pop();
// turn to object?
- if (val->IsNative() && Game->ValidObject((CBObject *)val->GetNative())) {
- CBObject *obj = (CBObject *)val->GetNative();
+ if (val->isNative() && Game->ValidObject((CBObject *)val->getNative())) {
+ CBObject *obj = (CBObject *)val->getNative();
int angle = (int)(atan2((double)(obj->_posY - _posY), (double)(obj->_posX - _posX)) * (180 / 3.14));
dir = (int)angleToDirection(angle);
}
// otherwise turn to direction
- else dir = val->GetInt();
+ else dir = val->getInt();
if (dir >= 0 && dir < NUM_DIRECTIONS) {
turnTo((TDirection)dir);
@@ -928,7 +928,7 @@ HRESULT CAdActor::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MergeAnims") == 0) {
stack->correctParams(1);
- stack->pushBool(SUCCEEDED(mergeAnims(stack->pop()->GetString())));
+ stack->pushBool(SUCCEEDED(mergeAnims(stack->pop()->getString())));
return S_OK;
}
@@ -937,7 +937,7 @@ HRESULT CAdActor::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "UnloadAnim") == 0) {
stack->correctParams(1);
- const char *AnimName = stack->pop()->GetString();
+ const char *AnimName = stack->pop()->getString();
bool Found = false;
for (int i = 0; i < _anims.GetSize(); i++) {
@@ -963,7 +963,7 @@ HRESULT CAdActor::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HasAnim") == 0) {
stack->correctParams(1);
- const char *AnimName = stack->pop()->GetString();
+ const char *AnimName = stack->pop()->getString();
stack->pushBool(getAnimByName(AnimName) != NULL);
return S_OK;
}
@@ -974,27 +974,27 @@ HRESULT CAdActor::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CAdActor::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Direction
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Direction") == 0) {
- _scValue->SetInt(_dir);
+ _scValue->setInt(_dir);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Type") == 0) {
- _scValue->SetString("actor");
+ _scValue->setString("actor");
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// TalkAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TalkAnimName") == 0) {
- _scValue->SetString(_talkAnimName);
+ _scValue->setString(_talkAnimName);
return _scValue;
}
@@ -1002,7 +1002,7 @@ CScValue *CAdActor::scGetProperty(const char *name) {
// WalkAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkAnimName") == 0) {
- _scValue->SetString(_walkAnimName);
+ _scValue->setString(_walkAnimName);
return _scValue;
}
@@ -1010,7 +1010,7 @@ CScValue *CAdActor::scGetProperty(const char *name) {
// IdleAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IdleAnimName") == 0) {
- _scValue->SetString(_idleAnimName);
+ _scValue->setString(_idleAnimName);
return _scValue;
}
@@ -1018,7 +1018,7 @@ CScValue *CAdActor::scGetProperty(const char *name) {
// TurnLeftAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TurnLeftAnimName") == 0) {
- _scValue->SetString(_turnLeftAnimName);
+ _scValue->setString(_turnLeftAnimName);
return _scValue;
}
@@ -1026,7 +1026,7 @@ CScValue *CAdActor::scGetProperty(const char *name) {
// TurnRightAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TurnRightAnimName") == 0) {
- _scValue->SetString(_turnRightAnimName);
+ _scValue->setString(_turnRightAnimName);
return _scValue;
}
@@ -1040,7 +1040,7 @@ HRESULT CAdActor::scSetProperty(const char *name, CScValue *value) {
// Direction
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Direction") == 0) {
- int dir = value->GetInt();
+ int dir = value->getInt();
if (dir >= 0 && dir < NUM_DIRECTIONS) _dir = (TDirection)dir;
return S_OK;
}
@@ -1049,8 +1049,8 @@ HRESULT CAdActor::scSetProperty(const char *name, CScValue *value) {
// TalkAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TalkAnimName") == 0) {
- if (value->IsNULL()) _talkAnimName = "talk";
- else _talkAnimName = value->GetString();
+ if (value->isNULL()) _talkAnimName = "talk";
+ else _talkAnimName = value->getString();
return S_OK;
}
@@ -1058,8 +1058,8 @@ HRESULT CAdActor::scSetProperty(const char *name, CScValue *value) {
// WalkAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkAnimName") == 0) {
- if (value->IsNULL()) _walkAnimName = "walk";
- else _walkAnimName = value->GetString();
+ if (value->isNULL()) _walkAnimName = "walk";
+ else _walkAnimName = value->getString();
return S_OK;
}
@@ -1067,8 +1067,8 @@ HRESULT CAdActor::scSetProperty(const char *name, CScValue *value) {
// IdleAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IdleAnimName") == 0) {
- if (value->IsNULL()) _idleAnimName = "idle";
- else _idleAnimName = value->GetString();
+ if (value->isNULL()) _idleAnimName = "idle";
+ else _idleAnimName = value->getString();
return S_OK;
}
@@ -1076,8 +1076,8 @@ HRESULT CAdActor::scSetProperty(const char *name, CScValue *value) {
// TurnLeftAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TurnLeftAnimName") == 0) {
- if (value->IsNULL()) _turnLeftAnimName = "turnleft";
- else _turnLeftAnimName = value->GetString();
+ if (value->isNULL()) _turnLeftAnimName = "turnleft";
+ else _turnLeftAnimName = value->getString();
return S_OK;
}
@@ -1085,8 +1085,8 @@ HRESULT CAdActor::scSetProperty(const char *name, CScValue *value) {
// TurnRightAnimName
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TurnRightAnimName") == 0) {
- if (value->IsNULL()) _turnRightAnimName = "turnright";
- else _turnRightAnimName = value->GetString();
+ if (value->isNULL()) _turnRightAnimName = "turnright";
+ else _turnRightAnimName = value->getString();
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdEntity.cpp b/engines/wintermute/Ad/AdEntity.cpp
index 2b4a2871f0..d3074c1562 100644
--- a/engines/wintermute/Ad/AdEntity.cpp
+++ b/engines/wintermute/Ad/AdEntity.cpp
@@ -642,15 +642,15 @@ HRESULT CAdEntity::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PlayTheora") == 0) {
stack->correctParams(4);
- const char *filename = stack->pop()->GetString();
- bool looping = stack->pop()->GetBool(false);
+ const char *filename = stack->pop()->getString();
+ bool looping = stack->pop()->getBool(false);
CScValue *valAlpha = stack->pop();
- int startTime = stack->pop()->GetInt();
+ int startTime = stack->pop()->getInt();
delete _theora;
_theora = new CVidTheoraPlayer(Game);
if (_theora && SUCCEEDED(_theora->initialize(filename))) {
- if (!valAlpha->IsNULL()) _theora->setAlphaImage(valAlpha->GetString());
+ if (!valAlpha->isNULL()) _theora->setAlphaImage(valAlpha->getString());
_theora->play(VID_PLAY_POS, 0, 0, false, false, looping, startTime, _scale >= 0.0f ? _scale : -1.0f, _sFXVolume);
//if(m_Scale>=0) m_Theora->m_PlayZoom = m_Scale;
stack->pushBool(true);
@@ -761,13 +761,13 @@ HRESULT CAdEntity::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CAdEntity::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("entity");
+ _scValue->setString("entity");
return _scValue;
}
@@ -775,8 +775,8 @@ CScValue *CAdEntity::scGetProperty(const char *name) {
// Item
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Item") == 0) {
- if (_item) _scValue->SetString(_item);
- else _scValue->SetNULL();
+ if (_item) _scValue->setString(_item);
+ else _scValue->setNULL();
return _scValue;
}
@@ -786,9 +786,9 @@ CScValue *CAdEntity::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Subtype") == 0) {
if (_subtype == ENTITY_SOUND)
- _scValue->SetString("sound");
+ _scValue->setString("sound");
else
- _scValue->SetString("normal");
+ _scValue->setString("normal");
return _scValue;
}
@@ -797,7 +797,7 @@ CScValue *CAdEntity::scGetProperty(const char *name) {
// WalkToX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkToX") == 0) {
- _scValue->SetInt(_walkToX);
+ _scValue->setInt(_walkToX);
return _scValue;
}
@@ -805,7 +805,7 @@ CScValue *CAdEntity::scGetProperty(const char *name) {
// WalkToY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkToY") == 0) {
- _scValue->SetInt(_walkToY);
+ _scValue->setInt(_walkToY);
return _scValue;
}
@@ -813,7 +813,7 @@ CScValue *CAdEntity::scGetProperty(const char *name) {
// WalkToDirection
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkToDirection") == 0) {
- _scValue->SetInt((int)_walkToDir);
+ _scValue->setInt((int)_walkToDir);
return _scValue;
}
@@ -821,8 +821,8 @@ CScValue *CAdEntity::scGetProperty(const char *name) {
// Region (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Region") == 0) {
- if (_region) _scValue->SetNative(_region, true);
- else _scValue->SetNULL();
+ if (_region) _scValue->setNative(_region, true);
+ else _scValue->setNULL();
return _scValue;
}
@@ -837,7 +837,7 @@ HRESULT CAdEntity::scSetProperty(const char *name, CScValue *value) {
// Item
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Item") == 0) {
- setItem(value->GetString());
+ setItem(value->getString());
return S_OK;
}
@@ -845,7 +845,7 @@ HRESULT CAdEntity::scSetProperty(const char *name, CScValue *value) {
// WalkToX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkToX") == 0) {
- _walkToX = value->GetInt();
+ _walkToX = value->getInt();
return S_OK;
}
@@ -853,7 +853,7 @@ HRESULT CAdEntity::scSetProperty(const char *name, CScValue *value) {
// WalkToY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkToY") == 0) {
- _walkToY = value->GetInt();
+ _walkToY = value->getInt();
return S_OK;
}
@@ -861,7 +861,7 @@ HRESULT CAdEntity::scSetProperty(const char *name, CScValue *value) {
// WalkToDirection
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WalkToDirection") == 0) {
- int dir = value->GetInt();
+ int dir = value->getInt();
if (dir >= 0 && dir < NUM_DIRECTIONS) _walkToDir = (TDirection)dir;
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdGame.cpp b/engines/wintermute/Ad/AdGame.cpp
index cbcf488abb..ee8e3ca6c1 100644
--- a/engines/wintermute/Ad/AdGame.cpp
+++ b/engines/wintermute/Ad/AdGame.cpp
@@ -322,19 +322,19 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "ChangeScene") == 0) {
stack->correctParams(3);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
CScValue *valFadeOut = stack->pop();
CScValue *valFadeIn = stack->pop();
- bool TransOut = valFadeOut->IsNULL() ? true : valFadeOut->GetBool();
- bool TransIn = valFadeIn->IsNULL() ? true : valFadeIn->GetBool();
+ bool TransOut = valFadeOut->isNULL() ? true : valFadeOut->getBool();
+ bool TransIn = valFadeIn->isNULL() ? true : valFadeIn->getBool();
ScheduleChangeScene(Filename, TransIn);
if (TransOut) _transMgr->start(TRANSITION_FADE_OUT, true);
stack->pushNULL();
- //HRESULT ret = ChangeScene(stack->pop()->GetString());
+ //HRESULT ret = ChangeScene(stack->pop()->getString());
//if(FAILED(ret)) stack->pushBool(false);
//else stack->pushBool(true);
@@ -347,7 +347,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
else if (strcmp(name, "LoadActor") == 0) {
stack->correctParams(1);
CAdActor *act = new CAdActor(Game);
- if (act && SUCCEEDED(act->loadFile(stack->pop()->GetString()))) {
+ if (act && SUCCEEDED(act->loadFile(stack->pop()->getString()))) {
AddObject(act);
stack->pushNative(act, true);
} else {
@@ -364,7 +364,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
else if (strcmp(name, "LoadEntity") == 0) {
stack->correctParams(1);
CAdEntity *ent = new CAdEntity(Game);
- if (ent && SUCCEEDED(ent->loadFile(stack->pop()->GetString()))) {
+ if (ent && SUCCEEDED(ent->loadFile(stack->pop()->getString()))) {
AddObject(ent);
stack->pushNative(ent, true);
} else {
@@ -381,9 +381,9 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
else if (strcmp(name, "UnloadObject") == 0 || strcmp(name, "UnloadActor") == 0 || strcmp(name, "UnloadEntity") == 0 || strcmp(name, "DeleteEntity") == 0) {
stack->correctParams(1);
CScValue *val = stack->pop();
- CAdObject *obj = (CAdObject *)val->GetNative();
+ CAdObject *obj = (CAdObject *)val->getNative();
RemoveObject(obj);
- if (val->GetType() == VAL_VARIABLE_REF) val->SetNULL();
+ if (val->getType() == VAL_VARIABLE_REF) val->setNULL();
stack->pushNULL();
return S_OK;
@@ -398,7 +398,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
CAdEntity *Ent = new CAdEntity(Game);
AddObject(Ent);
- if (!Val->IsNULL()) Ent->setName(Val->GetString());
+ if (!Val->isNULL()) Ent->setName(Val->getString());
stack->pushNative(Ent, true);
return S_OK;
}
@@ -412,7 +412,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
CAdItem *Item = new CAdItem(Game);
AddItem(Item);
- if (!Val->IsNULL()) Item->setName(Val->GetString());
+ if (!Val->isNULL()) Item->setName(Val->getString());
stack->pushNative(Item, true);
return S_OK;
}
@@ -425,8 +425,8 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
CScValue *Val = stack->pop();
CAdItem *Item = NULL;
- if (Val->IsNative()) Item = (CAdItem *)Val->GetNative();
- else Item = GetItemByName(Val->GetString());
+ if (Val->isNative()) Item = (CAdItem *)Val->getNative();
+ else Item = GetItemByName(Val->getString());
if (Item) {
DeleteItem(Item);
@@ -444,11 +444,11 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
CScValue *Val = stack->pop();
CAdItem *Item = NULL;
- if (Val->IsInt()) {
- int Index = Val->GetInt();
+ if (Val->isInt()) {
+ int Index = Val->getInt();
if (Index >= 0 && Index < _items.GetSize()) Item = _items[Index];
} else {
- Item = GetItemByName(Val->GetString());
+ Item = GetItemByName(Val->getString());
}
if (Item) stack->pushNative(Item, true);
@@ -463,8 +463,8 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AddResponse") == 0 || strcmp(name, "AddResponseOnce") == 0 || strcmp(name, "AddResponseOnceGame") == 0) {
stack->correctParams(6);
- int id = stack->pop()->GetInt();
- const char *text = stack->pop()->GetString();
+ int id = stack->pop()->getInt();
+ const char *text = stack->pop()->getString();
CScValue *val1 = stack->pop();
CScValue *val2 = stack->pop();
CScValue *val3 = stack->pop();
@@ -476,10 +476,10 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
res->_iD = id;
res->SetText(text);
_stringTable->Expand(&res->_text);
- if (!val1->IsNULL()) res->SetIcon(val1->GetString());
- if (!val2->IsNULL()) res->SetIconHover(val2->GetString());
- if (!val3->IsNULL()) res->SetIconPressed(val3->GetString());
- if (!val4->IsNULL()) res->SetFont(val4->GetString());
+ if (!val1->isNULL()) res->SetIcon(val1->getString());
+ if (!val2->isNULL()) res->SetIconHover(val2->getString());
+ if (!val3->isNULL()) res->SetIconPressed(val3->getString());
+ if (!val4->isNULL()) res->SetFont(val4->getString());
if (strcmp(name, "AddResponseOnce") == 0) res->_responseType = RESPONSE_ONCE;
else if (strcmp(name, "AddResponseOnceGame") == 0) res->_responseType = RESPONSE_ONCE_GAME;
@@ -499,7 +499,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ResetResponse") == 0) {
stack->correctParams(1);
- int ID = stack->pop()->GetInt(-1);
+ int ID = stack->pop()->getInt(-1);
ResetResponse(ID);
stack->pushNULL();
return S_OK;
@@ -521,7 +521,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetResponse") == 0) {
stack->correctParams(1);
- bool AutoSelectLast = stack->pop()->GetBool();
+ bool AutoSelectLast = stack->pop()->getBool();
if (_responseBox) {
_responseBox->weedResponses();
@@ -575,9 +575,9 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
stack->correctParams(1);
CScValue *Val = stack->pop();
Common::String BranchName;
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
BranchName.format("line%d", script->_currentLine);
- } else BranchName = Val->GetString();
+ } else BranchName = Val->getString();
StartDlgBranch(BranchName.c_str(), script->_filename == NULL ? "" : script->_filename, script->_threadEvent == NULL ? "" : script->_threadEvent);
stack->pushNULL();
@@ -593,7 +593,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
const char *BranchName = NULL;
CScValue *Val = stack->pop();
- if (!Val->IsNULL()) BranchName = Val->GetString();
+ if (!Val->isNULL()) BranchName = Val->getString();
EndDlgBranch(BranchName, script->_filename == NULL ? "" : script->_filename, script->_threadEvent == NULL ? "" : script->_threadEvent);
stack->pushNULL();
@@ -649,15 +649,15 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
stack->correctParams(1);
CScValue *val = stack->pop();
- if (!val->IsNULL()) {
+ if (!val->isNULL()) {
for (int i = 0; i < _inventories.GetSize(); i++) {
CAdInventory *Inv = _inventories[i];
for (int j = 0; j < Inv->_takenItems.GetSize(); j++) {
- if (val->GetNative() == Inv->_takenItems[j]) {
+ if (val->getNative() == Inv->_takenItems[j]) {
stack->pushBool(true);
return S_OK;
- } else if (scumm_stricmp(val->GetString(), Inv->_takenItems[j]->_name) == 0) {
+ } else if (scumm_stricmp(val->getString(), Inv->_takenItems[j]->_name) == 0) {
stack->pushBool(true);
return S_OK;
}
@@ -700,7 +700,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LoadResponseBox") == 0) {
stack->correctParams(1);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
Game->UnregisterObject(_responseBox);
_responseBox = new CAdResponseBox(Game);
@@ -720,7 +720,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LoadInventoryBox") == 0) {
stack->correctParams(1);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
Game->UnregisterObject(_inventoryBox);
_inventoryBox = new CAdInventoryBox(Game);
@@ -740,8 +740,8 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LoadItems") == 0) {
stack->correctParams(2);
- const char *Filename = stack->pop()->GetString();
- bool Merge = stack->pop()->GetBool(false);
+ const char *Filename = stack->pop()->getString();
+ bool Merge = stack->pop()->getBool(false);
HRESULT Ret = LoadItemsFile(Filename, Merge);
stack->pushBool(SUCCEEDED(Ret));
@@ -754,7 +754,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AddSpeechDir") == 0) {
stack->correctParams(1);
- const char *Dir = stack->pop()->GetString();
+ const char *Dir = stack->pop()->getString();
stack->pushBool(SUCCEEDED(AddSpeechDir(Dir)));
return S_OK;
@@ -765,7 +765,7 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RemoveSpeechDir") == 0) {
stack->correctParams(1);
- const char *Dir = stack->pop()->GetString();
+ const char *Dir = stack->pop()->getString();
stack->pushBool(SUCCEEDED(RemoveSpeechDir(Dir)));
return S_OK;
@@ -776,10 +776,10 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetSceneViewport") == 0) {
stack->correctParams(4);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
- int Width = stack->pop()->GetInt();
- int Height = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
+ int Width = stack->pop()->getInt();
+ int Height = stack->pop()->getInt();
if (Width <= 0) Width = _renderer->_width;
if (Height <= 0) Height = _renderer->_height;
@@ -799,21 +799,21 @@ HRESULT CAdGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CAdGame::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("game");
+ _scValue->setString("game");
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Scene
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scene") == 0) {
- if (_scene) _scValue->SetNative(_scene, true);
- else _scValue->SetNULL();
+ if (_scene) _scValue->setNative(_scene, true);
+ else _scValue->setNULL();
return _scValue;
}
@@ -821,9 +821,9 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// SelectedItem
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SelectedItem") == 0) {
- //if(_selectedItem) _scValue->SetString(_selectedItem->_name);
- if (_selectedItem) _scValue->SetNative(_selectedItem, true);
- else _scValue->SetNULL();
+ //if(_selectedItem) _scValue->setString(_selectedItem->_name);
+ if (_selectedItem) _scValue->setNative(_selectedItem, true);
+ else _scValue->setNULL();
return _scValue;
}
@@ -838,7 +838,7 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// SmartItemCursor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SmartItemCursor") == 0) {
- _scValue->SetBool(_smartItemCursor);
+ _scValue->setBool(_smartItemCursor);
return _scValue;
}
@@ -846,7 +846,7 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// InventoryVisible
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InventoryVisible") == 0) {
- _scValue->SetBool(_inventoryBox && _inventoryBox->_visible);
+ _scValue->setBool(_inventoryBox && _inventoryBox->_visible);
return _scValue;
}
@@ -854,8 +854,8 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// InventoryScrollOffset
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InventoryScrollOffset") == 0) {
- if (_inventoryBox) _scValue->SetInt(_inventoryBox->_scrollOffset);
- else _scValue->SetInt(0);
+ if (_inventoryBox) _scValue->setInt(_inventoryBox->_scrollOffset);
+ else _scValue->setInt(0);
return _scValue;
}
@@ -864,7 +864,7 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// ResponsesVisible (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ResponsesVisible") == 0) {
- _scValue->SetBool(_stateEx == GAME_WAITING_RESPONSE);
+ _scValue->setBool(_stateEx == GAME_WAITING_RESPONSE);
return _scValue;
}
@@ -872,8 +872,8 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// PrevScene / PreviousScene (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PrevScene") == 0 || strcmp(name, "PreviousScene") == 0) {
- if (!_prevSceneName) _scValue->SetString("");
- else _scValue->SetString(_prevSceneName);
+ if (!_prevSceneName) _scValue->setString("");
+ else _scValue->setString(_prevSceneName);
return _scValue;
}
@@ -881,8 +881,8 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// PrevSceneFilename / PreviousSceneFilename (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PrevSceneFilename") == 0 || strcmp(name, "PreviousSceneFilename") == 0) {
- if (!_prevSceneFilename) _scValue->SetString("");
- else _scValue->SetString(_prevSceneFilename);
+ if (!_prevSceneFilename) _scValue->setString("");
+ else _scValue->setString(_prevSceneFilename);
return _scValue;
}
@@ -890,8 +890,8 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// LastResponse (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LastResponse") == 0) {
- if (!_responseBox || !_responseBox->_lastResponseText) _scValue->SetString("");
- else _scValue->SetString(_responseBox->_lastResponseText);
+ if (!_responseBox || !_responseBox->_lastResponseText) _scValue->setString("");
+ else _scValue->setString(_responseBox->_lastResponseText);
return _scValue;
}
@@ -899,8 +899,8 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// LastResponseOrig (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LastResponseOrig") == 0) {
- if (!_responseBox || !_responseBox->_lastResponseTextOrig) _scValue->SetString("");
- else _scValue->SetString(_responseBox->_lastResponseTextOrig);
+ if (!_responseBox || !_responseBox->_lastResponseTextOrig) _scValue->setString("");
+ else _scValue->setString(_responseBox->_lastResponseTextOrig);
return _scValue;
}
@@ -908,8 +908,8 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// InventoryObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InventoryObject") == 0) {
- if (_inventoryOwner == _invObject) _scValue->SetNative(this, true);
- else _scValue->SetNative(_inventoryOwner, true);
+ if (_inventoryOwner == _invObject) _scValue->setNative(this, true);
+ else _scValue->setNative(_inventoryOwner, true);
return _scValue;
}
@@ -918,7 +918,7 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// TotalNumItems
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TotalNumItems") == 0) {
- _scValue->SetInt(_items.GetSize());
+ _scValue->setInt(_items.GetSize());
return _scValue;
}
@@ -926,7 +926,7 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// TalkSkipButton
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TalkSkipButton") == 0) {
- _scValue->SetInt(_talkSkipButton);
+ _scValue->setInt(_talkSkipButton);
return _scValue;
}
@@ -934,7 +934,7 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// ChangingScene
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ChangingScene") == 0) {
- _scValue->SetBool(_scheduledScene != NULL);
+ _scValue->setBool(_scheduledScene != NULL);
return _scValue;
}
@@ -942,8 +942,8 @@ CScValue *CAdGame::scGetProperty(const char *name) {
// StartupScene
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "StartupScene") == 0) {
- if (!_startupScene) _scValue->SetNULL();
- else _scValue->SetString(_startupScene);
+ if (!_startupScene) _scValue->setNULL();
+ else _scValue->setString(_startupScene);
return _scValue;
}
@@ -958,19 +958,19 @@ HRESULT CAdGame::scSetProperty(const char *name, CScValue *value) {
// SelectedItem
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SelectedItem") == 0) {
- if (value->IsNULL()) _selectedItem = NULL;
+ if (value->isNULL()) _selectedItem = NULL;
else {
- if (value->IsNative()) {
+ if (value->isNative()) {
_selectedItem = NULL;
for (int i = 0; i < _items.GetSize(); i++) {
- if (_items[i] == value->GetNative()) {
- _selectedItem = (CAdItem *)value->GetNative();
+ if (_items[i] == value->getNative()) {
+ _selectedItem = (CAdItem *)value->getNative();
break;
}
}
} else {
// try to get by name
- _selectedItem = GetItemByName(value->GetString());
+ _selectedItem = GetItemByName(value->getString());
}
}
@@ -981,7 +981,7 @@ HRESULT CAdGame::scSetProperty(const char *name, CScValue *value) {
// SmartItemCursor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SmartItemCursor") == 0) {
- _smartItemCursor = value->GetBool();
+ _smartItemCursor = value->getBool();
return S_OK;
}
@@ -989,7 +989,7 @@ HRESULT CAdGame::scSetProperty(const char *name, CScValue *value) {
// InventoryVisible
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InventoryVisible") == 0) {
- if (_inventoryBox) _inventoryBox->_visible = value->GetBool();
+ if (_inventoryBox) _inventoryBox->_visible = value->getBool();
return S_OK;
}
@@ -999,9 +999,9 @@ HRESULT CAdGame::scSetProperty(const char *name, CScValue *value) {
else if (strcmp(name, "InventoryObject") == 0) {
if (_inventoryOwner && _inventoryBox) _inventoryOwner->getInventory()->_scrollOffset = _inventoryBox->_scrollOffset;
- if (value->IsNULL()) _inventoryOwner = _invObject;
+ if (value->isNULL()) _inventoryOwner = _invObject;
else {
- CBObject *Obj = (CBObject *)value->GetNative();
+ CBObject *Obj = (CBObject *)value->getNative();
if (Obj == this) _inventoryOwner = _invObject;
else if (Game->ValidObject(Obj)) _inventoryOwner = (CAdObject *)Obj;
}
@@ -1015,7 +1015,7 @@ HRESULT CAdGame::scSetProperty(const char *name, CScValue *value) {
// InventoryScrollOffset
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InventoryScrollOffset") == 0) {
- if (_inventoryBox) _inventoryBox->_scrollOffset = value->GetInt();
+ if (_inventoryBox) _inventoryBox->_scrollOffset = value->getInt();
return S_OK;
}
@@ -1023,7 +1023,7 @@ HRESULT CAdGame::scSetProperty(const char *name, CScValue *value) {
// TalkSkipButton
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TalkSkipButton") == 0) {
- int Val = value->GetInt();
+ int Val = value->getInt();
if (Val < 0) Val = 0;
if (Val > TALK_SKIP_NONE) Val = TALK_SKIP_NONE;
_talkSkipButton = (TTalkSkipButton)Val;
@@ -1037,7 +1037,7 @@ HRESULT CAdGame::scSetProperty(const char *name, CScValue *value) {
if (value == NULL) {
delete[] _startupScene;
_startupScene = NULL;
- } else CBUtils::SetString(&_startupScene, value->GetString());
+ } else CBUtils::SetString(&_startupScene, value->getString());
return S_OK;
}
@@ -1068,7 +1068,7 @@ HRESULT CAdGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *this
stack->correctParams(0);
this_obj = thisStack->getTop();
- this_obj->SetNative(new CAdActor(Game));
+ this_obj->setNative(new CAdActor(Game));
stack->pushNULL();
}
@@ -1079,7 +1079,7 @@ HRESULT CAdGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *this
stack->correctParams(0);
this_obj = thisStack->getTop();
- this_obj->SetNative(new CAdEntity(Game));
+ this_obj->setNative(new CAdEntity(Game));
stack->pushNULL();
}
@@ -1524,7 +1524,7 @@ HRESULT CAdGame::WindowScriptMethodHook(CUIWindow *Win, CScScript *script, CScSt
CScValue *Val = stack->pop();
CUIEntity *Ent = new CUIEntity(Game);
- if (!Val->IsNULL()) Ent->setName(Val->GetString());
+ if (!Val->isNULL()) Ent->setName(Val->getString());
stack->pushNative(Ent, true);
Ent->_parent = Win;
diff --git a/engines/wintermute/Ad/AdItem.cpp b/engines/wintermute/Ad/AdItem.cpp
index 69d7e115da..a6c990528f 100644
--- a/engines/wintermute/Ad/AdItem.cpp
+++ b/engines/wintermute/Ad/AdItem.cpp
@@ -439,7 +439,7 @@ HRESULT CAdItem::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
bool SetCurrent = false;
if (_currentSprite && _currentSprite == _spriteHover) SetCurrent = true;
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
delete _spriteHover;
_spriteHover = NULL;
@@ -482,7 +482,7 @@ HRESULT CAdItem::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
if (strcmp(name, "SetNormalCursor") == 0) {
stack->correctParams(1);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
delete _cursorNormal;
_cursorNormal = NULL;
@@ -525,7 +525,7 @@ HRESULT CAdItem::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
if (strcmp(name, "SetHoverCursor") == 0) {
stack->correctParams(1);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
delete _cursorHover;
_cursorHover = NULL;
@@ -568,13 +568,13 @@ HRESULT CAdItem::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CAdItem::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("item");
+ _scValue->setString("item");
return _scValue;
}
@@ -582,7 +582,7 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// Name
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Name") == 0) {
- _scValue->SetString(_name);
+ _scValue->setString(_name);
return _scValue;
}
@@ -590,7 +590,7 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// DisplayAmount
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DisplayAmount") == 0) {
- _scValue->SetBool(_displayAmount);
+ _scValue->setBool(_displayAmount);
return _scValue;
}
@@ -598,7 +598,7 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// Amount
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Amount") == 0) {
- _scValue->SetInt(_amount);
+ _scValue->setInt(_amount);
return _scValue;
}
@@ -606,7 +606,7 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// AmountOffsetX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountOffsetX") == 0) {
- _scValue->SetInt(_amountOffsetX);
+ _scValue->setInt(_amountOffsetX);
return _scValue;
}
@@ -614,7 +614,7 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// AmountOffsetY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountOffsetY") == 0) {
- _scValue->SetInt(_amountOffsetY);
+ _scValue->setInt(_amountOffsetY);
return _scValue;
}
@@ -622,7 +622,7 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// AmountAlign
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountAlign") == 0) {
- _scValue->SetInt(_amountAlign);
+ _scValue->setInt(_amountAlign);
return _scValue;
}
@@ -630,8 +630,8 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// AmountString
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountString") == 0) {
- if (!_amountString) _scValue->SetNULL();
- else _scValue->SetString(_amountString);
+ if (!_amountString) _scValue->setNULL();
+ else _scValue->setString(_amountString);
return _scValue;
}
@@ -639,7 +639,7 @@ CScValue *CAdItem::scGetProperty(const char *name) {
// CursorCombined
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorCombined") == 0) {
- _scValue->SetBool(_cursorCombined);
+ _scValue->setBool(_cursorCombined);
return _scValue;
}
@@ -653,7 +653,7 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -661,7 +661,7 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// DisplayAmount
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DisplayAmount") == 0) {
- _displayAmount = value->GetBool();
+ _displayAmount = value->getBool();
return S_OK;
}
@@ -669,7 +669,7 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// Amount
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Amount") == 0) {
- _amount = value->GetInt();
+ _amount = value->getInt();
return S_OK;
}
@@ -677,7 +677,7 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// AmountOffsetX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountOffsetX") == 0) {
- _amountOffsetX = value->GetInt();
+ _amountOffsetX = value->getInt();
return S_OK;
}
@@ -685,7 +685,7 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// AmountOffsetY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountOffsetY") == 0) {
- _amountOffsetY = value->GetInt();
+ _amountOffsetY = value->getInt();
return S_OK;
}
@@ -693,7 +693,7 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// AmountAlign
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountAlign") == 0) {
- _amountAlign = (TTextAlign)value->GetInt();
+ _amountAlign = (TTextAlign)value->getInt();
return S_OK;
}
@@ -701,11 +701,11 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// AmountString
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AmountString") == 0) {
- if (value->IsNULL()) {
+ if (value->isNULL()) {
delete[] _amountString;
_amountString = NULL;
} else {
- CBUtils::SetString(&_amountString, value->GetString());
+ CBUtils::SetString(&_amountString, value->getString());
}
return S_OK;
}
@@ -714,7 +714,7 @@ HRESULT CAdItem::scSetProperty(const char *name, CScValue *value) {
// CursorCombined
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorCombined") == 0) {
- _cursorCombined = value->GetBool();
+ _cursorCombined = value->getBool();
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdLayer.cpp b/engines/wintermute/Ad/AdLayer.cpp
index 25d292f44e..b462d23963 100644
--- a/engines/wintermute/Ad/AdLayer.cpp
+++ b/engines/wintermute/Ad/AdLayer.cpp
@@ -236,11 +236,11 @@ HRESULT CAdLayer::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CScValue *val = stack->pop();
int node = -1;
- if (val->_type == VAL_INT) node = val->GetInt();
+ if (val->_type == VAL_INT) node = val->getInt();
else { // get by name
for (int i = 0; i < _nodes.GetSize(); i++) {
- if ((_nodes[i]->_type == OBJECT_ENTITY && scumm_stricmp(_nodes[i]->_entity->_name, val->GetString()) == 0) ||
- (_nodes[i]->_type == OBJECT_REGION && scumm_stricmp(_nodes[i]->_region->_name, val->GetString()) == 0)) {
+ if ((_nodes[i]->_type == OBJECT_ENTITY && scumm_stricmp(_nodes[i]->_entity->_name, val->getString()) == 0) ||
+ (_nodes[i]->_type == OBJECT_REGION && scumm_stricmp(_nodes[i]->_region->_name, val->getString()) == 0)) {
node = i;
break;
}
@@ -273,12 +273,12 @@ HRESULT CAdLayer::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CAdSceneNode *Node = new CAdSceneNode(Game);
if (strcmp(name, "AddRegion") == 0) {
CAdRegion *Region = new CAdRegion(Game);
- if (!Val->IsNULL()) Region->setName(Val->GetString());
+ if (!Val->isNULL()) Region->setName(Val->getString());
Node->setRegion(Region);
stack->pushNative(Region, true);
} else {
CAdEntity *Entity = new CAdEntity(Game);
- if (!Val->IsNULL()) Entity->setName(Val->GetString());
+ if (!Val->isNULL()) Entity->setName(Val->getString());
Node->setEntity(Entity);
stack->pushNative(Entity, true);
}
@@ -291,18 +291,18 @@ HRESULT CAdLayer::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InsertRegion") == 0 || strcmp(name, "InsertEntity") == 0) {
stack->correctParams(2);
- int Index = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
CScValue *Val = stack->pop();
CAdSceneNode *Node = new CAdSceneNode(Game);
if (strcmp(name, "InsertRegion") == 0) {
CAdRegion *Region = new CAdRegion(Game);
- if (!Val->IsNULL()) Region->setName(Val->GetString());
+ if (!Val->isNULL()) Region->setName(Val->getString());
Node->setRegion(Region);
stack->pushNative(Region, true);
} else {
CAdEntity *Entity = new CAdEntity(Game);
- if (!Val->IsNULL()) Entity->setName(Val->GetString());
+ if (!Val->isNULL()) Entity->setName(Val->getString());
Node->setEntity(Entity);
stack->pushNative(Entity, true);
}
@@ -321,8 +321,8 @@ HRESULT CAdLayer::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CScValue *Val = stack->pop();
CAdSceneNode *ToDelete = NULL;
- if (Val->IsNative()) {
- CBScriptable *Temp = Val->GetNative();
+ if (Val->isNative()) {
+ CBScriptable *Temp = Val->getNative();
for (int i = 0; i < _nodes.GetSize(); i++) {
if (_nodes[i]->_region == Temp || _nodes[i]->_entity == Temp) {
ToDelete = _nodes[i];
@@ -330,7 +330,7 @@ HRESULT CAdLayer::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
}
}
} else {
- int Index = Val->GetInt();
+ int Index = Val->getInt();
if (Index >= 0 && Index < _nodes.GetSize()) {
ToDelete = _nodes[Index];
}
@@ -358,13 +358,13 @@ HRESULT CAdLayer::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CAdLayer::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("layer");
+ _scValue->setString("layer");
return _scValue;
}
@@ -372,7 +372,7 @@ CScValue *CAdLayer::scGetProperty(const char *name) {
// NumNodes (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumNodes") == 0) {
- _scValue->SetInt(_nodes.GetSize());
+ _scValue->setInt(_nodes.GetSize());
return _scValue;
}
@@ -380,7 +380,7 @@ CScValue *CAdLayer::scGetProperty(const char *name) {
// Width
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Width") == 0) {
- _scValue->SetInt(_width);
+ _scValue->setInt(_width);
return _scValue;
}
@@ -388,7 +388,7 @@ CScValue *CAdLayer::scGetProperty(const char *name) {
// Height
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Height") == 0) {
- _scValue->SetInt(_height);
+ _scValue->setInt(_height);
return _scValue;
}
@@ -396,7 +396,7 @@ CScValue *CAdLayer::scGetProperty(const char *name) {
// Main (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Main") == 0) {
- _scValue->SetBool(_main);
+ _scValue->setBool(_main);
return _scValue;
}
@@ -404,7 +404,7 @@ CScValue *CAdLayer::scGetProperty(const char *name) {
// CloseUp
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CloseUp") == 0) {
- _scValue->SetBool(_closeUp);
+ _scValue->setBool(_closeUp);
return _scValue;
}
@@ -412,7 +412,7 @@ CScValue *CAdLayer::scGetProperty(const char *name) {
// Active
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Active") == 0) {
- _scValue->SetBool(_active);
+ _scValue->setBool(_active);
return _scValue;
}
@@ -426,7 +426,7 @@ HRESULT CAdLayer::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -434,7 +434,7 @@ HRESULT CAdLayer::scSetProperty(const char *name, CScValue *value) {
// CloseUp
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CloseUp") == 0) {
- _closeUp = value->GetBool();
+ _closeUp = value->getBool();
return S_OK;
}
@@ -442,7 +442,7 @@ HRESULT CAdLayer::scSetProperty(const char *name, CScValue *value) {
// Width
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Width") == 0) {
- _width = value->GetInt();
+ _width = value->getInt();
if (_width < 0) _width = 0;
return S_OK;
}
@@ -451,7 +451,7 @@ HRESULT CAdLayer::scSetProperty(const char *name, CScValue *value) {
// Height
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Height") == 0) {
- _height = value->GetInt();
+ _height = value->getInt();
if (_height < 0) _height = 0;
return S_OK;
}
@@ -460,7 +460,7 @@ HRESULT CAdLayer::scSetProperty(const char *name, CScValue *value) {
// Active
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Active") == 0) {
- bool b = value->GetBool();
+ bool b = value->getBool();
if (b == false && _main) {
Game->LOG(0, "Warning: cannot deactivate scene's main layer");
} else _active = b;
diff --git a/engines/wintermute/Ad/AdObject.cpp b/engines/wintermute/Ad/AdObject.cpp
index 58c892dae8..2f72a2dcbe 100644
--- a/engines/wintermute/Ad/AdObject.cpp
+++ b/engines/wintermute/Ad/AdObject.cpp
@@ -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);
@@ -240,7 +240,7 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ForceTalkAnim") == 0) {
stack->correctParams(1);
- const char *AnimName = stack->pop()->GetString();
+ const char *AnimName = stack->pop()->getString();
delete[] _forcedTalkAnimName;
_forcedTalkAnimName = new char[strlen(AnimName) + 1];
strcpy(_forcedTalkAnimName, AnimName);
@@ -256,21 +256,21 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
else if (strcmp(name, "Talk") == 0 || strcmp(name, "TalkAsync") == 0) {
stack->correctParams(5);
- const char *Text = stack->pop()->GetString();
+ const char *Text = stack->pop()->getString();
CScValue *SoundVal = stack->pop();
- int Duration = stack->pop()->GetInt();
+ int Duration = stack->pop()->getInt();
CScValue *ValStances = stack->pop();
- const char *Stances = ValStances->IsNULL() ? NULL : ValStances->GetString();
+ const char *Stances = ValStances->isNULL() ? NULL : ValStances->getString();
int Align;
CScValue *val = stack->pop();
- if (val->IsNULL()) Align = TAL_CENTER;
- else Align = val->GetInt();
+ if (val->isNULL()) Align = TAL_CENTER;
+ else Align = val->getInt();
Align = MIN(MAX(0, Align), NUM_TEXT_ALIGN - 1);
- const char *Sound = SoundVal->IsNULL() ? NULL : SoundVal->GetString();
+ const char *Sound = SoundVal->isNULL() ? NULL : SoundVal->getString();
talk(Text, Sound, Duration, Stances, (TTextAlign)Align);
if (strcmp(name, "TalkAsync") != 0) script->WaitForExclusive(this);
@@ -290,11 +290,11 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
int i;
CScValue *Val = stack->pop();
- if (Val->IsNULL() || !Main) {
+ if (Val->isNULL() || !Main) {
_stickRegion = NULL;
RegFound = true;
- } else if (Val->IsString()) {
- const char *RegionName = Val->GetString();
+ } else if (Val->isString()) {
+ const char *RegionName = Val->getString();
for (i = 0; i < Main->_nodes.GetSize(); i++) {
if (Main->_nodes[i]->_type == OBJECT_REGION && Main->_nodes[i]->_region->_name && scumm_stricmp(Main->_nodes[i]->_region->_name, RegionName) == 0) {
_stickRegion = Main->_nodes[i]->_region;
@@ -302,8 +302,8 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
break;
}
}
- } else if (Val->IsNative()) {
- CBScriptable *Obj = Val->GetNative();
+ } else if (Val->isNative()) {
+ CBScriptable *Obj = Val->getNative();
for (i = 0; i < Main->_nodes.GetSize(); i++) {
if (Main->_nodes[i]->_type == OBJECT_REGION && Main->_nodes[i]->_region == Obj) {
@@ -327,8 +327,8 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
stack->correctParams(1);
CScValue *Val = stack->pop();
- if (Val->IsNULL()) SetFont(NULL);
- else SetFont(Val->GetString());
+ if (Val->isNULL()) SetFont(NULL);
+ else SetFont(Val->getString());
stack->pushNULL();
return S_OK;
@@ -356,10 +356,10 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
}
CScValue *val = stack->pop();
- if (!val->IsNULL()) {
- const char *ItemName = val->GetString();
+ if (!val->isNULL()) {
+ const char *ItemName = val->getString();
val = stack->pop();
- const char *InsertAfter = val->IsNULL() ? NULL : val->GetString();
+ const char *InsertAfter = val->isNULL() ? NULL : val->getString();
if (FAILED(_inventory->InsertItem(ItemName, InsertAfter))) script->RuntimeError("Cannot add item '%s' to inventory", ItemName);
else {
// hide associated entities
@@ -384,11 +384,11 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
}
CScValue *val = stack->pop();
- if (!val->IsNULL()) {
- if (FAILED(_inventory->RemoveItem(val->GetString()))) script->RuntimeError("Cannot remove item '%s' from inventory", val->GetString());
+ if (!val->isNULL()) {
+ if (FAILED(_inventory->RemoveItem(val->getString()))) script->RuntimeError("Cannot remove item '%s' from inventory", val->getString());
else {
// show associated entities
- ((CAdGame *)Game)->_scene->handleItemAssociations(val->GetString(), true);
+ ((CAdGame *)Game)->_scene->handleItemAssociations(val->getString(), true);
}
} else script->RuntimeError("DropItem: item name expected");
@@ -409,13 +409,13 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *val = stack->pop();
if (val->_type == VAL_STRING) {
- CAdItem *item = ((CAdGame *)Game)->GetItemByName(val->GetString());
+ CAdItem *item = ((CAdGame *)Game)->GetItemByName(val->getString());
if (item) stack->pushNative(item, true);
else stack->pushNULL();
- } else if (val->IsNULL() || val->GetInt() < 0 || val->GetInt() >= _inventory->_takenItems.GetSize())
+ } else if (val->isNULL() || val->getInt() < 0 || val->getInt() >= _inventory->_takenItems.GetSize())
stack->pushNULL();
else
- stack->pushNative(_inventory->_takenItems[val->GetInt()], true);
+ stack->pushNative(_inventory->_takenItems[val->getInt()], true);
return S_OK;
}
@@ -432,12 +432,12 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
}
CScValue *val = stack->pop();
- if (!val->IsNULL()) {
+ if (!val->isNULL()) {
for (int i = 0; i < _inventory->_takenItems.GetSize(); i++) {
- if (val->GetNative() == _inventory->_takenItems[i]) {
+ if (val->getNative() == _inventory->_takenItems[i]) {
stack->pushBool(true);
return S_OK;
- } else if (scumm_stricmp(val->GetString(), _inventory->_takenItems[i]->_name) == 0) {
+ } else if (scumm_stricmp(val->getString(), _inventory->_takenItems[i]->_name) == 0) {
stack->pushBool(true);
return S_OK;
}
@@ -453,9 +453,9 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CreateParticleEmitter") == 0) {
stack->correctParams(3);
- bool FollowParent = stack->pop()->GetBool();
- int OffsetX = stack->pop()->GetInt();
- int OffsetY = stack->pop()->GetInt();
+ bool FollowParent = stack->pop()->getBool();
+ int OffsetX = stack->pop()->getInt();
+ int OffsetY = stack->pop()->getInt();
CPartEmitter *Emitter = createParticleEmitter(FollowParent, OffsetX, OffsetY);
if (Emitter) stack->pushNative(_partEmitter, true);
@@ -483,10 +483,10 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AddAttachment") == 0) {
stack->correctParams(4);
- const char *Filename = stack->pop()->GetString();
- bool PreDisplay = stack->pop()->GetBool(true);
- int OffsetX = stack->pop()->GetInt();
- int OffsetY = stack->pop()->GetInt();
+ const char *Filename = stack->pop()->getString();
+ bool PreDisplay = stack->pop()->getBool(true);
+ int OffsetX = stack->pop()->getInt();
+ int OffsetY = stack->pop()->getInt();
HRESULT res;
CAdEntity *Ent = new CAdEntity(Game);
@@ -518,8 +518,8 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
stack->correctParams(1);
CScValue *Val = stack->pop();
bool Found = false;
- if (Val->IsNative()) {
- CBScriptable *Obj = Val->GetNative();
+ if (Val->isNative()) {
+ CBScriptable *Obj = Val->getNative();
for (int i = 0; i < _attachmentsPre.GetSize(); i++) {
if (_attachmentsPre[i] == Obj) {
Found = true;
@@ -537,7 +537,7 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
}
}
} else {
- const char *attachmentName = Val->GetString();
+ const char *attachmentName = Val->getString();
for (int i = 0; i < _attachmentsPre.GetSize(); i++) {
if (_attachmentsPre[i]->_name && scumm_stricmp(_attachmentsPre[i]->_name, attachmentName) == 0) {
Found = true;
@@ -568,8 +568,8 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
CAdObject *Ret = NULL;
- if (Val->IsInt()) {
- int Index = Val->GetInt();
+ if (Val->isInt()) {
+ int Index = Val->getInt();
int CurrIndex = 0;
for (int i = 0; i < _attachmentsPre.GetSize(); i++) {
if (CurrIndex == Index) Ret = _attachmentsPre[i];
@@ -580,7 +580,7 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CurrIndex++;
}
} else {
- const char *attachmentName = Val->GetString();
+ const char *attachmentName = Val->getString();
for (int i = 0; i < _attachmentsPre.GetSize(); i++) {
if (_attachmentsPre[i]->_name && scumm_stricmp(_attachmentsPre[i]->_name, attachmentName) == 0) {
Ret = _attachmentsPre[i];
@@ -609,13 +609,13 @@ HRESULT CAdObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CAdObject::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("object");
+ _scValue->setString("object");
return _scValue;
}
@@ -623,7 +623,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// Active
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Active") == 0) {
- _scValue->SetBool(_active);
+ _scValue->setBool(_active);
return _scValue;
}
@@ -631,7 +631,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// IgnoreItems
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IgnoreItems") == 0) {
- _scValue->SetBool(_ignoreItems);
+ _scValue->setBool(_ignoreItems);
return _scValue;
}
@@ -639,7 +639,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// SceneIndependent
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SceneIndependent") == 0) {
- _scValue->SetBool(_sceneIndependent);
+ _scValue->setBool(_sceneIndependent);
return _scValue;
}
@@ -647,7 +647,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// SubtitlesWidth
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesWidth") == 0) {
- _scValue->SetInt(_subtitlesWidth);
+ _scValue->setInt(_subtitlesWidth);
return _scValue;
}
@@ -655,7 +655,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// SubtitlesPosRelative
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosRelative") == 0) {
- _scValue->SetBool(_subtitlesModRelative);
+ _scValue->setBool(_subtitlesModRelative);
return _scValue;
}
@@ -663,7 +663,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// SubtitlesPosX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosX") == 0) {
- _scValue->SetInt(_subtitlesModX);
+ _scValue->setInt(_subtitlesModX);
return _scValue;
}
@@ -671,7 +671,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// SubtitlesPosY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosY") == 0) {
- _scValue->SetInt(_subtitlesModY);
+ _scValue->setInt(_subtitlesModY);
return _scValue;
}
@@ -679,7 +679,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// SubtitlesPosXCenter
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosXCenter") == 0) {
- _scValue->SetBool(_subtitlesModXCenter);
+ _scValue->setBool(_subtitlesModXCenter);
return _scValue;
}
@@ -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;
}
@@ -695,8 +695,8 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// ParticleEmitter (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ParticleEmitter") == 0) {
- if (_partEmitter) _scValue->SetNative(_partEmitter, true);
- else _scValue->SetNULL();
+ if (_partEmitter) _scValue->setNative(_partEmitter, true);
+ else _scValue->setNULL();
return _scValue;
}
@@ -705,7 +705,7 @@ CScValue *CAdObject::scGetProperty(const char *name) {
// NumAttachments (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumAttachments") == 0) {
- _scValue->SetInt(_attachmentsPre.GetSize() + _attachmentsPost.GetSize());
+ _scValue->setInt(_attachmentsPre.GetSize() + _attachmentsPost.GetSize());
return _scValue;
}
@@ -721,7 +721,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// Active
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Active") == 0) {
- _active = value->GetBool();
+ _active = value->getBool();
return S_OK;
}
@@ -729,7 +729,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// IgnoreItems
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IgnoreItems") == 0) {
- _ignoreItems = value->GetBool();
+ _ignoreItems = value->getBool();
return S_OK;
}
@@ -737,7 +737,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// SceneIndependent
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SceneIndependent") == 0) {
- _sceneIndependent = value->GetBool();
+ _sceneIndependent = value->getBool();
return S_OK;
}
@@ -745,7 +745,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// SubtitlesWidth
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesWidth") == 0) {
- _subtitlesWidth = value->GetInt();
+ _subtitlesWidth = value->getInt();
return S_OK;
}
@@ -753,7 +753,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// SubtitlesPosRelative
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosRelative") == 0) {
- _subtitlesModRelative = value->GetBool();
+ _subtitlesModRelative = value->getBool();
return S_OK;
}
@@ -761,7 +761,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// SubtitlesPosX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosX") == 0) {
- _subtitlesModX = value->GetInt();
+ _subtitlesModX = value->getInt();
return S_OK;
}
@@ -769,7 +769,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// SubtitlesPosY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosY") == 0) {
- _subtitlesModY = value->GetInt();
+ _subtitlesModY = value->getInt();
return S_OK;
}
@@ -777,7 +777,7 @@ HRESULT CAdObject::scSetProperty(const char *name, CScValue *value) {
// SubtitlesPosXCenter
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesPosXCenter") == 0) {
- _subtitlesModXCenter = value->GetBool();
+ _subtitlesModXCenter = value->getBool();
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdRegion.cpp b/engines/wintermute/Ad/AdRegion.cpp
index 42730b2567..9522ebbb61 100644
--- a/engines/wintermute/Ad/AdRegion.cpp
+++ b/engines/wintermute/Ad/AdRegion.cpp
@@ -226,8 +226,8 @@ HRESULT CAdRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SkipTo")==0) {
stack->correctParams(2);
- _posX = stack->pop()->GetInt();
- _posY = stack->pop()->GetInt();
+ _posX = stack->pop()->getInt();
+ _posY = stack->pop()->getInt();
stack->pushNULL();
return S_OK;
@@ -239,13 +239,13 @@ HRESULT CAdRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CAdRegion::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("ad region");
+ _scValue->setString("ad region");
return _scValue;
}
@@ -253,7 +253,7 @@ CScValue *CAdRegion::scGetProperty(const char *name) {
// Name
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Name") == 0) {
- _scValue->SetString(_name);
+ _scValue->setString(_name);
return _scValue;
}
@@ -261,7 +261,7 @@ CScValue *CAdRegion::scGetProperty(const char *name) {
// Blocked
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Blocked") == 0) {
- _scValue->SetBool(_blocked);
+ _scValue->setBool(_blocked);
return _scValue;
}
@@ -269,7 +269,7 @@ CScValue *CAdRegion::scGetProperty(const char *name) {
// Decoration
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Decoration") == 0) {
- _scValue->SetBool(_decoration);
+ _scValue->setBool(_decoration);
return _scValue;
}
@@ -277,7 +277,7 @@ CScValue *CAdRegion::scGetProperty(const char *name) {
// Scale
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale") == 0) {
- _scValue->SetFloat(_zoom);
+ _scValue->setFloat(_zoom);
return _scValue;
}
@@ -285,7 +285,7 @@ CScValue *CAdRegion::scGetProperty(const char *name) {
// AlphaColor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AlphaColor") == 0) {
- _scValue->SetInt((int)_alpha);
+ _scValue->setInt((int)_alpha);
return _scValue;
}
@@ -299,7 +299,7 @@ HRESULT CAdRegion::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -307,7 +307,7 @@ HRESULT CAdRegion::scSetProperty(const char *name, CScValue *value) {
// Blocked
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Blocked") == 0) {
- _blocked = value->GetBool();
+ _blocked = value->getBool();
return S_OK;
}
@@ -315,7 +315,7 @@ HRESULT CAdRegion::scSetProperty(const char *name, CScValue *value) {
// Decoration
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Decoration") == 0) {
- _decoration = value->GetBool();
+ _decoration = value->getBool();
return S_OK;
}
@@ -323,7 +323,7 @@ HRESULT CAdRegion::scSetProperty(const char *name, CScValue *value) {
// Scale
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale") == 0) {
- _zoom = value->GetFloat();
+ _zoom = value->getFloat();
return S_OK;
}
@@ -331,7 +331,7 @@ HRESULT CAdRegion::scSetProperty(const char *name, CScValue *value) {
// AlphaColor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AlphaColor") == 0) {
- _alpha = (uint32)value->GetInt();
+ _alpha = (uint32)value->getInt();
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdScene.cpp b/engines/wintermute/Ad/AdScene.cpp
index f567a8b058..04d3887f6c 100644
--- a/engines/wintermute/Ad/AdScene.cpp
+++ b/engines/wintermute/Ad/AdScene.cpp
@@ -1255,7 +1255,7 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
if (strcmp(name, "LoadActor") == 0) {
stack->correctParams(1);
CAdActor *act = new CAdActor(Game);
- if (act && SUCCEEDED(act->loadFile(stack->pop()->GetString()))) {
+ if (act && SUCCEEDED(act->loadFile(stack->pop()->getString()))) {
addObject(act);
stack->pushNative(act, true);
} else {
@@ -1272,7 +1272,7 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "LoadEntity") == 0) {
stack->correctParams(1);
CAdEntity *ent = new CAdEntity(Game);
- if (ent && SUCCEEDED(ent->loadFile(stack->pop()->GetString()))) {
+ if (ent && SUCCEEDED(ent->loadFile(stack->pop()->getString()))) {
addObject(ent);
stack->pushNative(ent, true);
} else {
@@ -1292,7 +1292,7 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CAdEntity *Ent = new CAdEntity(Game);
addObject(Ent);
- if (!Val->IsNULL()) Ent->setName(Val->GetString());
+ if (!Val->isNULL()) Ent->setName(Val->getString());
stack->pushNative(Ent, true);
return S_OK;
}
@@ -1303,9 +1303,9 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "UnloadObject") == 0 || strcmp(name, "UnloadActor") == 0 || strcmp(name, "UnloadEntity") == 0 || strcmp(name, "UnloadActor3D") == 0 || strcmp(name, "DeleteEntity") == 0) {
stack->correctParams(1);
CScValue *val = stack->pop();
- CAdObject *obj = (CAdObject *)val->GetNative();
+ CAdObject *obj = (CAdObject *)val->getNative();
removeObject(obj);
- if (val->GetType() == VAL_VARIABLE_REF) val->SetNULL();
+ if (val->getType() == VAL_VARIABLE_REF) val->setNULL();
stack->pushNULL();
return S_OK;
@@ -1318,10 +1318,10 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
stack->correctParams(2);
CScValue *val1 = stack->pop();
CScValue *val2 = stack->pop();
- if (val1->IsNative()) {
- skipToObject((CBObject *)val1->GetNative());
+ if (val1->isNative()) {
+ skipToObject((CBObject *)val1->getNative());
} else {
- skipTo(val1->GetInt(), val2->GetInt());
+ skipTo(val1->getInt(), val2->getInt());
}
stack->pushNULL();
return S_OK;
@@ -1334,10 +1334,10 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
stack->correctParams(2);
CScValue *val1 = stack->pop();
CScValue *val2 = stack->pop();
- if (val1->IsNative()) {
- scrollToObject((CBObject *)val1->GetNative());
+ if (val1->isNative()) {
+ scrollToObject((CBObject *)val1->getNative());
} else {
- scrollTo(val1->GetInt(), val2->GetInt());
+ scrollTo(val1->getInt(), val2->getInt());
}
if (strcmp(name, "ScrollTo") == 0) script->WaitForExclusive(this);
stack->pushNULL();
@@ -1350,12 +1350,12 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "GetLayer") == 0) {
stack->correctParams(1);
CScValue *val = stack->pop();
- if (val->IsInt()) {
- int layer = val->GetInt();
+ if (val->isInt()) {
+ int layer = val->getInt();
if (layer < 0 || layer >= _layers.GetSize()) stack->pushNULL();
else stack->pushNative(_layers[layer], true);
} else {
- const char *LayerName = val->GetString();
+ const char *LayerName = val->getString();
bool LayerFound = false;
for (int i = 0; i < _layers.GetSize(); i++) {
if (scumm_stricmp(LayerName, _layers[i]->_name) == 0) {
@@ -1374,7 +1374,7 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetWaypointGroup") == 0) {
stack->correctParams(1);
- int group = stack->pop()->GetInt();
+ int group = stack->pop()->getInt();
if (group < 0 || group >= _waypointGroups.GetSize()) stack->pushNULL();
else stack->pushNative(_waypointGroups[group], true);
return S_OK;
@@ -1385,7 +1385,7 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetNode") == 0) {
stack->correctParams(1);
- const char *nodeName = stack->pop()->GetString();
+ const char *nodeName = stack->pop()->getString();
CBObject *node = getNodeByName(nodeName);
if (node) stack->pushNative((CBScriptable *)node, true);
@@ -1402,11 +1402,11 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CScValue *Val = stack->pop();
CAdObject *Ret = NULL;
- if (Val->IsInt()) {
- int Index = Val->GetInt();
+ if (Val->isInt()) {
+ int Index = Val->getInt();
if (Index >= 0 && Index < _objects.GetSize()) Ret = _objects[Index];
} else {
- const char *nodeName = Val->GetString();
+ const char *nodeName = Val->getString();
for (int i = 0; i < _objects.GetSize(); i++) {
if (_objects[i] && _objects[i]->_name && scumm_stricmp(_objects[i]->_name, nodeName) == 0) {
Ret = _objects[i];
@@ -1425,12 +1425,12 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetRegionAt") == 0) {
stack->correctParams(3);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
CScValue *Val = stack->pop();
bool IncludeDecors = false;
- if (!Val->IsNULL()) IncludeDecors = Val->GetBool();
+ if (!Val->isNULL()) IncludeDecors = Val->getBool();
if (_mainLayer) {
for (int i = _mainLayer->_nodes.GetSize() - 1; i >= 0; i--) {
@@ -1452,8 +1452,8 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsBlockedAt") == 0) {
stack->correctParams(2);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
stack->pushBool(isBlockedAt(X, Y));
return S_OK;
@@ -1464,8 +1464,8 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsWalkableAt") == 0) {
stack->correctParams(2);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
stack->pushBool(isWalkableAt(X, Y));
return S_OK;
@@ -1476,8 +1476,8 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetScaleAt") == 0) {
stack->correctParams(2);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
stack->pushFloat(getZoomAt(X, Y));
return S_OK;
@@ -1488,8 +1488,8 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetRotationAt") == 0) {
stack->correctParams(2);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
stack->pushFloat(getRotationAt(X, Y));
return S_OK;
@@ -1514,11 +1514,11 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeOut") == 0 || strcmp(name, "FadeOutAsync") == 0) {
stack->correctParams(5);
- uint32 Duration = stack->pop()->GetInt(500);
- byte Red = stack->pop()->GetInt(0);
- byte Green = stack->pop()->GetInt(0);
- byte Blue = stack->pop()->GetInt(0);
- byte Alpha = stack->pop()->GetInt(0xFF);
+ uint32 Duration = stack->pop()->getInt(500);
+ byte Red = stack->pop()->getInt(0);
+ byte Green = stack->pop()->getInt(0);
+ byte Blue = stack->pop()->getInt(0);
+ byte Alpha = stack->pop()->getInt(0xFF);
_fader->fadeOut(DRGBA(Red, Green, Blue, Alpha), Duration);
if (strcmp(name, "FadeOutAsync") != 0) script->WaitFor(_fader);
@@ -1532,11 +1532,11 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeIn") == 0 || strcmp(name, "FadeInAsync") == 0) {
stack->correctParams(5);
- uint32 Duration = stack->pop()->GetInt(500);
- byte Red = stack->pop()->GetInt(0);
- byte Green = stack->pop()->GetInt(0);
- byte Blue = stack->pop()->GetInt(0);
- byte Alpha = stack->pop()->GetInt(0xFF);
+ uint32 Duration = stack->pop()->getInt(500);
+ byte Red = stack->pop()->getInt(0);
+ byte Green = stack->pop()->getInt(0);
+ byte Blue = stack->pop()->getInt(0);
+ byte Alpha = stack->pop()->getInt(0xFF);
_fader->fadeIn(DRGBA(Red, Green, Blue, Alpha), Duration);
if (strcmp(name, "FadeInAsync") != 0) script->WaitFor(_fader);
@@ -1559,8 +1559,8 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsPointInViewport") == 0) {
stack->correctParams(2);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
stack->pushBool(pointInViewport(X, Y));
return S_OK;
}
@@ -1570,10 +1570,10 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetViewport") == 0) {
stack->correctParams(4);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
- int Width = stack->pop()->GetInt();
- int Height = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
+ int Width = stack->pop()->getInt();
+ int Height = stack->pop()->getInt();
if (Width <= 0) Width = Game->_renderer->_width;
if (Height <= 0) Height = Game->_renderer->_height;
@@ -1594,7 +1594,7 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CScValue *Val = stack->pop();
CAdLayer *Layer = new CAdLayer(Game);
- if (!Val->IsNULL()) Layer->setName(Val->GetString());
+ if (!Val->isNULL()) Layer->setName(Val->getString());
if (_mainLayer) {
Layer->_width = _mainLayer->_width;
Layer->_height = _mainLayer->_height;
@@ -1611,11 +1611,11 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InsertLayer") == 0) {
stack->correctParams(2);
- int Index = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
CScValue *Val = stack->pop();
CAdLayer *Layer = new CAdLayer(Game);
- if (!Val->IsNULL()) Layer->setName(Val->GetString());
+ if (!Val->isNULL()) Layer->setName(Val->getString());
if (_mainLayer) {
Layer->_width = _mainLayer->_width;
Layer->_height = _mainLayer->_height;
@@ -1638,8 +1638,8 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CScValue *Val = stack->pop();
CAdLayer *ToDelete = NULL;
- if (Val->IsNative()) {
- CBScriptable *Temp = Val->GetNative();
+ if (Val->isNative()) {
+ CBScriptable *Temp = Val->getNative();
for (int i = 0; i < _layers.GetSize(); i++) {
if (_layers[i] == Temp) {
ToDelete = _layers[i];
@@ -1647,7 +1647,7 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
}
}
} else {
- int Index = Val->GetInt();
+ int Index = Val->getInt();
if (Index >= 0 && Index < _layers.GetSize()) {
ToDelete = _layers[Index];
}
@@ -1680,13 +1680,13 @@ HRESULT CAdScene::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CAdScene::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("scene");
+ _scValue->setString("scene");
return _scValue;
}
@@ -1694,7 +1694,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// NumLayers (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumLayers") == 0) {
- _scValue->SetInt(_layers.GetSize());
+ _scValue->setInt(_layers.GetSize());
return _scValue;
}
@@ -1702,7 +1702,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// NumWaypointGroups (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumWaypointGroups") == 0) {
- _scValue->SetInt(_waypointGroups.GetSize());
+ _scValue->setInt(_waypointGroups.GetSize());
return _scValue;
}
@@ -1710,8 +1710,8 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// MainLayer (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MainLayer") == 0) {
- if (_mainLayer) _scValue->SetNative(_mainLayer, true);
- else _scValue->SetNULL();
+ if (_mainLayer) _scValue->setNative(_mainLayer, true);
+ else _scValue->setNULL();
return _scValue;
}
@@ -1720,7 +1720,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// NumFreeNodes (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumFreeNodes") == 0) {
- _scValue->SetInt(_objects.GetSize());
+ _scValue->setInt(_objects.GetSize());
return _scValue;
}
@@ -1731,7 +1731,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
int ViewportX;
getViewportOffset(&ViewportX);
- _scValue->SetInt(Game->_mousePos.x + _offsetLeft - ViewportX);
+ _scValue->setInt(Game->_mousePos.x + _offsetLeft - ViewportX);
return _scValue;
}
@@ -1742,7 +1742,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
int ViewportY;
getViewportOffset(NULL, &ViewportY);
- _scValue->SetInt(Game->_mousePos.y + _offsetTop - ViewportY);
+ _scValue->setInt(Game->_mousePos.y + _offsetTop - ViewportY);
return _scValue;
}
@@ -1750,7 +1750,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// AutoScroll
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutoScroll") == 0) {
- _scValue->SetBool(_autoScroll);
+ _scValue->setBool(_autoScroll);
return _scValue;
}
@@ -1758,7 +1758,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// PersistentState
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PersistentState") == 0) {
- _scValue->SetBool(_persistentState);
+ _scValue->setBool(_persistentState);
return _scValue;
}
@@ -1766,7 +1766,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// PersistentStateSprites
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PersistentStateSprites") == 0) {
- _scValue->SetBool(_persistentStateSprites);
+ _scValue->setBool(_persistentStateSprites);
return _scValue;
}
@@ -1774,7 +1774,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// ScrollPixelsX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollPixelsX") == 0) {
- _scValue->SetInt(_scrollPixelsH);
+ _scValue->setInt(_scrollPixelsH);
return _scValue;
}
@@ -1782,7 +1782,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// ScrollPixelsY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollPixelsY") == 0) {
- _scValue->SetInt(_scrollPixelsV);
+ _scValue->setInt(_scrollPixelsV);
return _scValue;
}
@@ -1791,7 +1791,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// ScrollSpeedX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollSpeedX") == 0) {
- _scValue->SetInt(_scrollTimeH);
+ _scValue->setInt(_scrollTimeH);
return _scValue;
}
@@ -1799,7 +1799,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// ScrollSpeedY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollSpeedY") == 0) {
- _scValue->SetInt(_scrollTimeV);
+ _scValue->setInt(_scrollTimeV);
return _scValue;
}
@@ -1807,7 +1807,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// OffsetX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "OffsetX") == 0) {
- _scValue->SetInt(_offsetLeft);
+ _scValue->setInt(_offsetLeft);
return _scValue;
}
@@ -1815,7 +1815,7 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// OffsetY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "OffsetY") == 0) {
- _scValue->SetInt(_offsetTop);
+ _scValue->setInt(_offsetTop);
return _scValue;
}
@@ -1823,8 +1823,8 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// Width (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Width") == 0) {
- if (_mainLayer) _scValue->SetInt(_mainLayer->_width);
- else _scValue->SetInt(0);
+ if (_mainLayer) _scValue->setInt(_mainLayer->_width);
+ else _scValue->setInt(0);
return _scValue;
}
@@ -1832,8 +1832,8 @@ CScValue *CAdScene::scGetProperty(const char *name) {
// Height (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Height") == 0) {
- if (_mainLayer) _scValue->SetInt(_mainLayer->_height);
- else _scValue->SetInt(0);
+ if (_mainLayer) _scValue->setInt(_mainLayer->_height);
+ else _scValue->setInt(0);
return _scValue;
}
@@ -1847,7 +1847,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -1855,7 +1855,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// AutoScroll
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutoScroll") == 0) {
- _autoScroll = value->GetBool();
+ _autoScroll = value->getBool();
return S_OK;
}
@@ -1863,7 +1863,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// PersistentState
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PersistentState") == 0) {
- _persistentState = value->GetBool();
+ _persistentState = value->getBool();
return S_OK;
}
@@ -1871,7 +1871,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// PersistentStateSprites
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PersistentStateSprites") == 0) {
- _persistentStateSprites = value->GetBool();
+ _persistentStateSprites = value->getBool();
return S_OK;
}
@@ -1879,7 +1879,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// ScrollPixelsX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollPixelsX") == 0) {
- _scrollPixelsH = value->GetInt();
+ _scrollPixelsH = value->getInt();
return S_OK;
}
@@ -1887,7 +1887,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// ScrollPixelsY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollPixelsY") == 0) {
- _scrollPixelsV = value->GetInt();
+ _scrollPixelsV = value->getInt();
return S_OK;
}
@@ -1895,7 +1895,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// ScrollSpeedX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollSpeedX") == 0) {
- _scrollTimeH = value->GetInt();
+ _scrollTimeH = value->getInt();
return S_OK;
}
@@ -1903,7 +1903,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// ScrollSpeedY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScrollSpeedY") == 0) {
- _scrollTimeV = value->GetInt();
+ _scrollTimeV = value->getInt();
return S_OK;
}
@@ -1911,7 +1911,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// OffsetX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "OffsetX") == 0) {
- _offsetLeft = value->GetInt();
+ _offsetLeft = value->getInt();
int ViewportWidth, ViewportHeight;
getViewportSize(&ViewportWidth, &ViewportHeight);
@@ -1927,7 +1927,7 @@ HRESULT CAdScene::scSetProperty(const char *name, CScValue *value) {
// OffsetY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "OffsetY") == 0) {
- _offsetTop = value->GetInt();
+ _offsetTop = value->getInt();
int ViewportWidth, ViewportHeight;
getViewportSize(&ViewportWidth, &ViewportHeight);
diff --git a/engines/wintermute/Ad/AdTalkHolder.cpp b/engines/wintermute/Ad/AdTalkHolder.cpp
index 67e225a444..4f5ad76880 100644
--- a/engines/wintermute/Ad/AdTalkHolder.cpp
+++ b/engines/wintermute/Ad/AdTalkHolder.cpp
@@ -133,12 +133,12 @@ HRESULT CAdTalkHolder::scCallMethod(CScScript *script, CScStack *stack, CScStack
delete _sprite;
_sprite = NULL;
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
_sprite = NULL;
if (SetCurrent) _currentSprite = NULL;
stack->pushBool(true);
} else {
- const char *Filename = Val->GetString();
+ const char *Filename = Val->getString();
CBSprite *spr = new CBSprite(Game, this);
if (!spr || FAILED(spr->loadFile(Filename))) {
script->RuntimeError("SetSprite method failed for file '%s'", Filename);
@@ -180,8 +180,8 @@ HRESULT CAdTalkHolder::scCallMethod(CScScript *script, CScStack *stack, CScStack
else if (strcmp(name, "AddTalkSprite") == 0) {
stack->correctParams(2);
- const char *Filename = stack->pop()->GetString();
- bool Ex = stack->pop()->GetBool();
+ const char *Filename = stack->pop()->getString();
+ bool Ex = stack->pop()->getBool();
CBSprite *spr = new CBSprite(Game, this);
if (!spr || FAILED(spr->loadFile(Filename))) {
@@ -201,8 +201,8 @@ HRESULT CAdTalkHolder::scCallMethod(CScScript *script, CScStack *stack, CScStack
else if (strcmp(name, "RemoveTalkSprite") == 0) {
stack->correctParams(2);
- const char *Filename = stack->pop()->GetString();
- bool Ex = stack->pop()->GetBool();
+ const char *Filename = stack->pop()->getString();
+ bool Ex = stack->pop()->getBool();
int i;
bool SetCurrent = false;
@@ -244,8 +244,8 @@ HRESULT CAdTalkHolder::scCallMethod(CScScript *script, CScStack *stack, CScStack
else if (strcmp(name, "SetTalkSprite") == 0) {
stack->correctParams(2);
- const char *Filename = stack->pop()->GetString();
- bool Ex = stack->pop()->GetBool();
+ const char *Filename = stack->pop()->getString();
+ bool Ex = stack->pop()->getBool();
bool SetCurrent = false;
bool SetTemp2 = false;
@@ -290,13 +290,13 @@ HRESULT CAdTalkHolder::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
CScValue *CAdTalkHolder::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("talk-holder");
+ _scValue->setString("talk-holder");
return _scValue;
}
@@ -311,7 +311,7 @@ HRESULT CAdTalkHolder::scSetProperty(const char *name, CScValue *value) {
// Item
//////////////////////////////////////////////////////////////////////////
if(strcmp(name, "Item")==0){
- SetItem(value->GetString());
+ SetItem(value->getString());
return S_OK;
}
diff --git a/engines/wintermute/Ad/AdWaypointGroup.cpp b/engines/wintermute/Ad/AdWaypointGroup.cpp
index f3dd9581b6..da21cf0ba6 100644
--- a/engines/wintermute/Ad/AdWaypointGroup.cpp
+++ b/engines/wintermute/Ad/AdWaypointGroup.cpp
@@ -201,13 +201,13 @@ HRESULT CAdWaypointGroup::persist(CBPersistMgr *persistMgr) {
//////////////////////////////////////////////////////////////////////////
CScValue *CAdWaypointGroup::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("waypoint-group");
+ _scValue->setString("waypoint-group");
return _scValue;
}
@@ -215,7 +215,7 @@ CScValue *CAdWaypointGroup::scGetProperty(const char *name) {
// Active
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Active") == 0) {
- _scValue->SetBool(_active);
+ _scValue->setBool(_active);
return _scValue;
}
@@ -229,7 +229,7 @@ HRESULT CAdWaypointGroup::scSetProperty(const char *name, CScValue *value) {
// Active
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Active") == 0) {
- _active = value->GetBool();
+ _active = value->getBool();
return S_OK;
}
diff --git a/engines/wintermute/Base/BFrame.cpp b/engines/wintermute/Base/BFrame.cpp
index 34b5ebbe47..3e034cc499 100644
--- a/engines/wintermute/Base/BFrame.cpp
+++ b/engines/wintermute/Base/BFrame.cpp
@@ -423,9 +423,9 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
delete _sound;
_sound = NULL;
- if (!Val->IsNULL()) {
+ if (!Val->isNULL()) {
_sound = new CBSound(Game);
- if (!_sound || FAILED(_sound->setSound(Val->GetString(), SOUND_SFX, false))) {
+ if (!_sound || FAILED(_sound->setSound(Val->getString(), SOUND_SFX, false))) {
stack->pushBool(false);
delete _sound;
_sound = NULL;
@@ -439,7 +439,7 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "GetSubframe") == 0) {
stack->correctParams(1);
- int Index = stack->pop()->GetInt(-1);
+ int Index = stack->pop()->getInt(-1);
if (Index < 0 || Index >= _subframes.GetSize()) {
script->RuntimeError("Frame.GetSubframe: Subframe index %d is out of range.", Index);
stack->pushNULL();
@@ -454,13 +454,13 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
else if (strcmp(name, "DeleteSubframe") == 0) {
stack->correctParams(1);
CScValue *Val = stack->pop();
- if (Val->IsInt()) {
- int Index = Val->GetInt(-1);
+ if (Val->isInt()) {
+ int Index = Val->getInt(-1);
if (Index < 0 || Index >= _subframes.GetSize()) {
script->RuntimeError("Frame.DeleteSubframe: Subframe index %d is out of range.", Index);
}
} else {
- CBSubFrame *Sub = (CBSubFrame *)Val->GetNative();
+ CBSubFrame *Sub = (CBSubFrame *)Val->getNative();
for (int i = 0; i < _subframes.GetSize(); i++) {
if (_subframes[i] == Sub) {
delete _subframes[i];
@@ -480,7 +480,7 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
stack->correctParams(1);
CScValue *Val = stack->pop();
const char *Filename = NULL;
- if (!Val->IsNULL()) Filename = Val->GetString();
+ if (!Val->isNULL()) Filename = Val->getString();
CBSubFrame *Sub = new CBSubFrame(Game);
if (Filename != NULL) {
@@ -498,12 +498,12 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InsertSubframe") == 0) {
stack->correctParams(2);
- int Index = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
if (Index < 0) Index = 0;
CScValue *Val = stack->pop();
const char *Filename = NULL;
- if (!Val->IsNULL()) Filename = Val->GetString();
+ if (!Val->isNULL()) Filename = Val->getString();
CBSubFrame *Sub = new CBSubFrame(Game);
if (Filename != NULL) {
@@ -522,7 +522,7 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetSubframe") == 0) {
stack->correctParams(1);
- int Index = stack->pop()->GetInt(-1);
+ int Index = stack->pop()->getInt(-1);
if (Index < 0 || Index >= _applyEvent.GetSize()) {
script->RuntimeError("Frame.GetEvent: Event index %d is out of range.", Index);
stack->pushNULL();
@@ -535,7 +535,7 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AddEvent") == 0) {
stack->correctParams(1);
- const char *Event = stack->pop()->GetString();
+ const char *Event = stack->pop()->getString();
for (int i = 0; i < _applyEvent.GetSize(); i++) {
if (scumm_stricmp(_applyEvent[i], Event) == 0) {
stack->pushNULL();
@@ -552,7 +552,7 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DeleteEvent") == 0) {
stack->correctParams(1);
- const char *Event = stack->pop()->GetString();
+ const char *Event = stack->pop()->getString();
for (int i = 0; i < _applyEvent.GetSize(); i++) {
if (scumm_stricmp(_applyEvent[i], Event) == 0) {
delete [] _applyEvent[i];
@@ -575,13 +575,13 @@ HRESULT CBFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CBFrame::scGetProperty(const char *name) {
if (!_scValue) _scValue = new CScValue(Game);
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("frame");
+ _scValue->setString("frame");
return _scValue;
}
@@ -589,7 +589,7 @@ CScValue *CBFrame::scGetProperty(const char *name) {
// Delay
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Delay") == 0) {
- _scValue->SetInt(_delay);
+ _scValue->setInt(_delay);
return _scValue;
}
@@ -597,7 +597,7 @@ CScValue *CBFrame::scGetProperty(const char *name) {
// Keyframe
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Keyframe") == 0) {
- _scValue->SetBool(_keyframe);
+ _scValue->setBool(_keyframe);
return _scValue;
}
@@ -605,7 +605,7 @@ CScValue *CBFrame::scGetProperty(const char *name) {
// KillSounds
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "KillSounds") == 0) {
- _scValue->SetBool(_killSound);
+ _scValue->setBool(_killSound);
return _scValue;
}
@@ -613,7 +613,7 @@ CScValue *CBFrame::scGetProperty(const char *name) {
// MoveX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MoveX") == 0) {
- _scValue->SetInt(_moveX);
+ _scValue->setInt(_moveX);
return _scValue;
}
@@ -621,7 +621,7 @@ CScValue *CBFrame::scGetProperty(const char *name) {
// MoveY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MoveY") == 0) {
- _scValue->SetInt(_moveY);
+ _scValue->setInt(_moveY);
return _scValue;
}
@@ -629,7 +629,7 @@ CScValue *CBFrame::scGetProperty(const char *name) {
// NumSubframes (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumSubframes") == 0) {
- _scValue->SetInt(_subframes.GetSize());
+ _scValue->setInt(_subframes.GetSize());
return _scValue;
}
@@ -637,7 +637,7 @@ CScValue *CBFrame::scGetProperty(const char *name) {
// NumEvents (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumEvents") == 0) {
- _scValue->SetInt(_applyEvent.GetSize());
+ _scValue->setInt(_applyEvent.GetSize());
return _scValue;
}
@@ -655,7 +655,7 @@ HRESULT CBFrame::scSetProperty(const char *name, CScValue *value) {
// Delay
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Delay") == 0) {
- _delay = MAX(0, value->GetInt());
+ _delay = MAX(0, value->getInt());
return S_OK;
}
@@ -663,7 +663,7 @@ HRESULT CBFrame::scSetProperty(const char *name, CScValue *value) {
// Keyframe
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Keyframe") == 0) {
- _keyframe = value->GetBool();
+ _keyframe = value->getBool();
return S_OK;
}
@@ -671,7 +671,7 @@ HRESULT CBFrame::scSetProperty(const char *name, CScValue *value) {
// KillSounds
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "KillSounds") == 0) {
- _killSound = value->GetBool();
+ _killSound = value->getBool();
return S_OK;
}
@@ -679,7 +679,7 @@ HRESULT CBFrame::scSetProperty(const char *name, CScValue *value) {
// MoveX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MoveX") == 0) {
- _moveX = value->GetInt();
+ _moveX = value->getInt();
return S_OK;
}
@@ -687,7 +687,7 @@ HRESULT CBFrame::scSetProperty(const char *name, CScValue *value) {
// MoveY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MoveY") == 0) {
- _moveY = value->GetInt();
+ _moveY = value->getInt();
return S_OK;
}
diff --git a/engines/wintermute/Base/BGame.cpp b/engines/wintermute/Base/BGame.cpp
index 2c60521e54..93c063a3b3 100644
--- a/engines/wintermute/Base/BGame.cpp
+++ b/engines/wintermute/Base/BGame.cpp
@@ -983,7 +983,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "LOG") == 0) {
stack->correctParams(1);
- LOG(0, stack->pop()->GetString());
+ LOG(0, stack->pop()->getString());
stack->pushNULL();
return S_OK;
}
@@ -1002,7 +1002,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Msg") == 0) {
stack->correctParams(1);
- QuickMessage(stack->pop()->GetString());
+ QuickMessage(stack->pop()->getString());
stack->pushNULL();
return S_OK;
}
@@ -1013,7 +1013,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "RunScript") == 0) {
Game->LOG(0, "**Warning** The 'RunScript' method is now obsolete. Use 'AttachScript' instead (same syntax)");
stack->correctParams(1);
- if (FAILED(addScript(stack->pop()->GetString())))
+ if (FAILED(addScript(stack->pop()->getString())))
stack->pushBool(false);
else
stack->pushBool(true);
@@ -1026,12 +1026,12 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LoadStringTable") == 0) {
stack->correctParams(2);
- const char *filename = stack->pop()->GetString();
+ const char *filename = stack->pop()->getString();
CScValue *Val = stack->pop();
bool ClearOld;
- if (Val->IsNULL()) ClearOld = true;
- else ClearOld = Val->GetBool();
+ if (Val->isNULL()) ClearOld = true;
+ else ClearOld = Val->getBool();
if (FAILED(_stringTable->loadFile(filename, ClearOld)))
stack->pushBool(false);
@@ -1046,7 +1046,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ValidObject") == 0) {
stack->correctParams(1);
- CBScriptable *obj = stack->pop()->GetNative();
+ CBScriptable *obj = stack->pop()->getNative();
if (ValidObject((CBObject *) obj)) stack->pushBool(true);
else stack->pushBool(false);
@@ -1071,9 +1071,9 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "UnloadObject") == 0) {
stack->correctParams(1);
CScValue *val = stack->pop();
- CBObject *obj = (CBObject *)val->GetNative();
+ CBObject *obj = (CBObject *)val->getNative();
UnregisterObject(obj);
- if (val->GetType() == VAL_VARIABLE_REF) val->SetNULL();
+ if (val->getType() == VAL_VARIABLE_REF) val->setNULL();
stack->pushNULL();
return S_OK;
@@ -1085,7 +1085,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "LoadWindow") == 0) {
stack->correctParams(1);
CUIWindow *win = new CUIWindow(Game);
- if (win && SUCCEEDED(win->loadFile(stack->pop()->GetString()))) {
+ if (win && SUCCEEDED(win->loadFile(stack->pop()->getString()))) {
_windows.Add(win);
RegisterObject(win);
stack->pushNative(win, true);
@@ -1103,8 +1103,8 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "ExpandString") == 0) {
stack->correctParams(1);
CScValue *val = stack->pop();
- char *str = new char[strlen(val->GetString()) + 1];
- strcpy(str, val->GetString());
+ char *str = new char[strlen(val->getString()) + 1];
+ strcpy(str, val->getString());
_stringTable->Expand(&str);
stack->pushString(str);
delete [] str;
@@ -1119,15 +1119,15 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "PlayMusic") == 0) stack->correctParams(3);
else {
stack->correctParams(4);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
- const char *filename = stack->pop()->GetString();
+ const char *filename = stack->pop()->getString();
CScValue *ValLooping = stack->pop();
- bool Looping = ValLooping->IsNULL() ? true : ValLooping->GetBool();
+ bool Looping = ValLooping->isNULL() ? true : ValLooping->getBool();
CScValue *ValLoopStart = stack->pop();
- uint32 LoopStart = (uint32)(ValLoopStart->IsNULL() ? 0 : ValLoopStart->GetInt());
+ uint32 LoopStart = (uint32)(ValLoopStart->isNULL() ? 0 : ValLoopStart->getInt());
if (FAILED(PlayMusic(channel, filename, Looping, LoopStart))) stack->pushBool(false);
@@ -1144,7 +1144,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "StopMusic") == 0) stack->correctParams(0);
else {
stack->correctParams(1);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
if (FAILED(StopMusic(channel))) stack->pushBool(false);
@@ -1161,7 +1161,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "PauseMusic") == 0) stack->correctParams(0);
else {
stack->correctParams(1);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
if (FAILED(PauseMusic(channel))) stack->pushBool(false);
@@ -1177,7 +1177,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "ResumeMusic") == 0) stack->correctParams(0);
else {
stack->correctParams(1);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
if (FAILED(ResumeMusic(channel))) stack->pushBool(false);
@@ -1193,7 +1193,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "GetMusic") == 0) stack->correctParams(0);
else {
stack->correctParams(1);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
if (channel < 0 || channel >= NUM_MUSIC_CHANNELS) stack->pushNULL();
else {
@@ -1211,10 +1211,10 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "SetMusicPosition") == 0) stack->correctParams(1);
else {
stack->correctParams(2);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
- uint32 Time = stack->pop()->GetInt();
+ uint32 Time = stack->pop()->getInt();
if (FAILED(SetMusicStartTime(channel, Time))) stack->pushBool(false);
else stack->pushBool(true);
@@ -1230,7 +1230,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "GetMusicPosition") == 0) stack->correctParams(0);
else {
stack->correctParams(1);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) stack->pushInt(0);
@@ -1246,7 +1246,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "IsMusicPlaying") == 0) stack->correctParams(0);
else {
stack->correctParams(1);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) stack->pushBool(false);
@@ -1262,10 +1262,10 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "SetMusicVolume") == 0) stack->correctParams(1);
else {
stack->correctParams(2);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
- int Volume = stack->pop()->GetInt();
+ int Volume = stack->pop()->getInt();
if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) stack->pushBool(false);
else {
if (FAILED(_music[channel]->setVolume(Volume))) stack->pushBool(false);
@@ -1282,7 +1282,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
if (strcmp(name, "GetMusicVolume") == 0) stack->correctParams(0);
else {
stack->correctParams(1);
- channel = stack->pop()->GetInt();
+ channel = stack->pop()->getInt();
}
if (channel < 0 || channel >= NUM_MUSIC_CHANNELS || !_music[channel]) stack->pushInt(0);
@@ -1296,10 +1296,10 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MusicCrossfade") == 0) {
stack->correctParams(4);
- int channel1 = stack->pop()->GetInt(0);
- int channel2 = stack->pop()->GetInt(0);
- uint32 FadeLength = (uint32)stack->pop()->GetInt(0);
- bool Swap = stack->pop()->GetBool(true);
+ int channel1 = stack->pop()->getInt(0);
+ int channel2 = stack->pop()->getInt(0);
+ uint32 FadeLength = (uint32)stack->pop()->getInt(0);
+ bool Swap = stack->pop()->getBool(true);
if (_musicCrossfadeRunning) {
script->RuntimeError("Game.MusicCrossfade: Music crossfade is already in progress.");
@@ -1326,7 +1326,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
stack->correctParams(1);
int Length = 0;
- const char *filename = stack->pop()->GetString();
+ const char *filename = stack->pop()->getString();
CBSound *Sound = new CBSound(Game);
if (Sound && SUCCEEDED(Sound->setSound(filename, SOUND_MUSIC, true))) {
@@ -1343,8 +1343,8 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetMousePos") == 0) {
stack->correctParams(2);
- int x = stack->pop()->GetInt();
- int y = stack->pop()->GetInt();
+ int x = stack->pop()->getInt();
+ int y = stack->pop()->getInt();
x = MAX(x, 0);
x = MIN(x, _renderer->_width);
y = MAX(y, 0);
@@ -1364,10 +1364,10 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LockMouseRect") == 0) {
stack->correctParams(4);
- int left = stack->pop()->GetInt();
- int top = stack->pop()->GetInt();
- int right = stack->pop()->GetInt();
- int bottom = stack->pop()->GetInt();
+ int left = stack->pop()->getInt();
+ int top = stack->pop()->getInt();
+ int right = stack->pop()->getInt();
+ int bottom = stack->pop()->getInt();
if (right < left) CBUtils::Swap(&left, &right);
if (bottom < top) CBUtils::Swap(&top, &bottom);
@@ -1392,19 +1392,19 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
Game->LOG(0, "Warning: Game.PlayVideo() is now deprecated. Use Game.PlayTheora() instead.");
stack->correctParams(6);
- const char *filename = stack->pop()->GetString();
+ const char *filename = stack->pop()->getString();
warning("PlayVideo: %s - not implemented yet", filename);
CScValue *valType = stack->pop();
int Type;
- if (valType->IsNULL()) Type = (int)VID_PLAY_STRETCH;
- else Type = valType->GetInt();
+ if (valType->isNULL()) Type = (int)VID_PLAY_STRETCH;
+ else Type = valType->getInt();
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
- bool FreezeMusic = stack->pop()->GetBool(true);
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
+ bool FreezeMusic = stack->pop()->getBool(true);
CScValue *valSub = stack->pop();
- const char *SubtitleFile = valSub->IsNULL() ? NULL : valSub->GetString();
+ const char *SubtitleFile = valSub->isNULL() ? NULL : valSub->getString();
if (Type < (int)VID_PLAY_POS || Type > (int)VID_PLAY_CENTER)
Type = (int)VID_PLAY_STRETCH;
@@ -1430,20 +1430,20 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
// TODO: ADDVIDEO
stack->correctParams(7);
- const char *filename = stack->pop()->GetString();
+ const char *filename = stack->pop()->getString();
CScValue *valType = stack->pop();
int Type;
- if (valType->IsNULL())
+ if (valType->isNULL())
Type = (int)VID_PLAY_STRETCH;
- else Type = valType->GetInt();
+ else Type = valType->getInt();
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
- bool FreezeMusic = stack->pop()->GetBool(true);
- bool DropFrames = stack->pop()->GetBool(true);
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
+ bool FreezeMusic = stack->pop()->getBool(true);
+ bool DropFrames = stack->pop()->getBool(true);
CScValue *valSub = stack->pop();
- const char *SubtitleFile = valSub->IsNULL() ? NULL : valSub->GetString();
+ const char *SubtitleFile = valSub->isNULL() ? NULL : valSub->getString();
if (Type < (int)VID_PLAY_POS || Type > (int)VID_PLAY_CENTER) Type = (int)VID_PLAY_STRETCH;
@@ -1479,8 +1479,8 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RegWriteNumber") == 0) {
stack->correctParams(2);
- const char *Key = stack->pop()->GetString();
- int Val = stack->pop()->GetInt();
+ const char *Key = stack->pop()->getString();
+ int Val = stack->pop()->getInt();
_registry->WriteInt("PrivateSettings", Key, Val);
stack->pushNULL();
return S_OK;
@@ -1491,8 +1491,8 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RegReadNumber") == 0) {
stack->correctParams(2);
- const char *Key = stack->pop()->GetString();
- int InitVal = stack->pop()->GetInt();
+ const char *Key = stack->pop()->getString();
+ int InitVal = stack->pop()->getInt();
stack->pushInt(_registry->ReadInt("PrivateSettings", Key, InitVal));
return S_OK;
}
@@ -1502,8 +1502,8 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RegWriteString") == 0) {
stack->correctParams(2);
- const char *Key = stack->pop()->GetString();
- const char *Val = stack->pop()->GetString();
+ const char *Key = stack->pop()->getString();
+ const char *Val = stack->pop()->getString();
_registry->WriteString("PrivateSettings", Key, Val);
stack->pushNULL();
return S_OK;
@@ -1514,8 +1514,8 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RegReadString") == 0) {
stack->correctParams(2);
- const char *Key = stack->pop()->GetString();
- const char *InitVal = stack->pop()->GetString();
+ const char *Key = stack->pop()->getString();
+ const char *InitVal = stack->pop()->getString();
AnsiString val = _registry->ReadString("PrivateSettings", Key, InitVal);
stack->pushString(val.c_str());
return S_OK;
@@ -1526,9 +1526,9 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SaveGame") == 0) {
stack->correctParams(3);
- int Slot = stack->pop()->GetInt();
- const char *xdesc = stack->pop()->GetString();
- bool quick = stack->pop()->GetBool(false);
+ int Slot = stack->pop()->getInt();
+ const char *xdesc = stack->pop()->getString();
+ bool quick = stack->pop()->getBool(false);
char *Desc = new char[strlen(xdesc) + 1];
strcpy(Desc, xdesc);
@@ -1546,7 +1546,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LoadGame") == 0) {
stack->correctParams(1);
- _scheduledLoadSlot = stack->pop()->GetInt();
+ _scheduledLoadSlot = stack->pop()->getInt();
_loading = true;
stack->pushBool(false);
script->Sleep(0);
@@ -1558,7 +1558,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsSaveSlotUsed") == 0) {
stack->correctParams(1);
- int Slot = stack->pop()->GetInt();
+ int Slot = stack->pop()->getInt();
stack->pushBool(IsSaveSlotUsed(Slot));
return S_OK;
}
@@ -1568,7 +1568,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetSaveSlotDescription") == 0) {
stack->correctParams(1);
- int Slot = stack->pop()->GetInt();
+ int Slot = stack->pop()->getInt();
char Desc[512];
Desc[0] = '\0';
GetSaveSlotDescription(Slot, Desc);
@@ -1581,7 +1581,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "EmptySaveSlot") == 0) {
stack->correctParams(1);
- int Slot = stack->pop()->GetInt();
+ int Slot = stack->pop()->getInt();
EmptySaveSlot(Slot);
stack->pushNULL();
return S_OK;
@@ -1592,7 +1592,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetGlobalSFXVolume") == 0) {
stack->correctParams(1);
- Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte)stack->pop()->GetInt());
+ Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte)stack->pop()->getInt());
stack->pushNULL();
return S_OK;
}
@@ -1602,7 +1602,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetGlobalSpeechVolume") == 0) {
stack->correctParams(1);
- Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte)stack->pop()->GetInt());
+ Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte)stack->pop()->getInt());
stack->pushNULL();
return S_OK;
}
@@ -1612,7 +1612,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetGlobalMusicVolume") == 0) {
stack->correctParams(1);
- Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte)stack->pop()->GetInt());
+ Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte)stack->pop()->getInt());
stack->pushNULL();
return S_OK;
}
@@ -1622,7 +1622,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetGlobalMasterVolume") == 0) {
stack->correctParams(1);
- Game->_soundMgr->setMasterVolumePercent((byte)stack->pop()->GetInt());
+ Game->_soundMgr->setMasterVolumePercent((byte)stack->pop()->getInt());
stack->pushNULL();
return S_OK;
}
@@ -1668,7 +1668,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;
@@ -1725,7 +1725,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FileExists") == 0) {
stack->correctParams(1);
- const char *filename = stack->pop()->GetString();
+ const char *filename = stack->pop()->getString();
Common::SeekableReadStream *File = _fileManager->openFile(filename, false);
if (!File) stack->pushBool(false);
@@ -1741,11 +1741,11 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeOut") == 0 || strcmp(name, "FadeOutAsync") == 0 || strcmp(name, "SystemFadeOut") == 0 || strcmp(name, "SystemFadeOutAsync") == 0) {
stack->correctParams(5);
- uint32 Duration = stack->pop()->GetInt(500);
- byte Red = stack->pop()->GetInt(0);
- byte Green = stack->pop()->GetInt(0);
- byte Blue = stack->pop()->GetInt(0);
- byte Alpha = stack->pop()->GetInt(0xFF);
+ uint32 Duration = stack->pop()->getInt(500);
+ byte Red = stack->pop()->getInt(0);
+ byte Green = stack->pop()->getInt(0);
+ byte Blue = stack->pop()->getInt(0);
+ byte Alpha = stack->pop()->getInt(0xFF);
bool System = (strcmp(name, "SystemFadeOut") == 0 || strcmp(name, "SystemFadeOutAsync") == 0);
@@ -1761,11 +1761,11 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeIn") == 0 || strcmp(name, "FadeInAsync") == 0 || strcmp(name, "SystemFadeIn") == 0 || strcmp(name, "SystemFadeInAsync") == 0) {
stack->correctParams(5);
- uint32 Duration = stack->pop()->GetInt(500);
- byte Red = stack->pop()->GetInt(0);
- byte Green = stack->pop()->GetInt(0);
- byte Blue = stack->pop()->GetInt(0);
- byte Alpha = stack->pop()->GetInt(0xFF);
+ uint32 Duration = stack->pop()->getInt(500);
+ byte Red = stack->pop()->getInt(0);
+ byte Green = stack->pop()->getInt(0);
+ byte Blue = stack->pop()->getInt(0);
+ byte Alpha = stack->pop()->getInt(0xFF);
bool System = (strcmp(name, "SystemFadeIn") == 0 || strcmp(name, "SystemFadeInAsync") == 0);
@@ -1798,7 +1798,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
int FileNum = 0;
while (true) {
- sprintf(filename, "%s%03d.bmp", Val->IsNULL() ? _name : Val->GetString(), FileNum);
+ sprintf(filename, "%s%03d.bmp", Val->isNULL() ? _name : Val->getString(), FileNum);
if (!Common::File::exists(filename))
break;
FileNum++;
@@ -1820,9 +1820,9 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScreenshotEx") == 0) {
stack->correctParams(3);
- const char *filename = stack->pop()->GetString();
- int SizeX = stack->pop()->GetInt(_renderer->_width);
- int SizeY = stack->pop()->GetInt(_renderer->_height);
+ const char *filename = stack->pop()->getString();
+ int SizeX = stack->pop()->getInt(_renderer->_width);
+ int SizeY = stack->pop()->getInt(_renderer->_height);
bool ret = false;
CBImage *Image = Game->_renderer->takeScreenshot();
@@ -1846,7 +1846,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
CUIWindow *Win = new CUIWindow(Game);
_windows.Add(Win);
RegisterObject(Win);
- if (!Val->IsNULL()) Win->setName(Val->GetString());
+ if (!Val->isNULL()) Win->setName(Val->getString());
stack->pushNative(Win, true);
return S_OK;
}
@@ -1856,7 +1856,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DeleteWindow") == 0) {
stack->correctParams(1);
- CBObject *Obj = (CBObject *)stack->pop()->GetNative();
+ CBObject *Obj = (CBObject *)stack->pop()->getNative();
for (int i = 0; i < _windows.GetSize(); i++) {
if (_windows[i] == Obj) {
UnregisterObject(_windows[i]);
@@ -1893,14 +1893,14 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "SetLoadingScreen") == 0) {
stack->correctParams(3);
CScValue *Val = stack->pop();
- _loadImageX = stack->pop()->GetInt();
- _loadImageY = stack->pop()->GetInt();
+ _loadImageX = stack->pop()->getInt();
+ _loadImageY = stack->pop()->getInt();
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
delete[] _loadImageName;
_loadImageName = NULL;
} else {
- CBUtils::SetString(&_loadImageName, Val->GetString());
+ CBUtils::SetString(&_loadImageName, Val->getString());
}
stack->pushNULL();
return S_OK;
@@ -1912,14 +1912,14 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "SetSavingScreen") == 0) {
stack->correctParams(3);
CScValue *Val = stack->pop();
- _saveImageX = stack->pop()->GetInt();
- _saveImageY = stack->pop()->GetInt();
+ _saveImageX = stack->pop()->getInt();
+ _saveImageY = stack->pop()->getInt();
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
delete[] _saveImageName;
_saveImageName = NULL;
} else {
- CBUtils::SetString(&_saveImageName, Val->GetString());
+ CBUtils::SetString(&_saveImageName, Val->getString());
}
stack->pushNULL();
return S_OK;
@@ -1930,7 +1930,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetWaitCursor") == 0) {
stack->correctParams(1);
- if (SUCCEEDED(SetWaitCursor(stack->pop()->GetString()))) stack->pushBool(true);
+ if (SUCCEEDED(SetWaitCursor(stack->pop()->getString()))) stack->pushBool(true);
else stack->pushBool(false);
return S_OK;
@@ -1986,10 +1986,10 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "DisplayLoadingIcon") == 0) {
stack->correctParams(4);
- const char *filename = stack->pop()->GetString();
- _loadingIconX = stack->pop()->GetInt();
- _loadingIconY = stack->pop()->GetInt();
- _loadingIconPersistent = stack->pop()->GetBool();
+ const char *filename = stack->pop()->getString();
+ _loadingIconX = stack->pop()->getInt();
+ _loadingIconY = stack->pop()->getInt();
+ _loadingIconPersistent = stack->pop()->getBool();
delete _loadingIcon;
_loadingIcon = new CBSprite(this);
@@ -2022,7 +2022,7 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DumpTextureStats") == 0) {
stack->correctParams(1);
- const char *filename = stack->pop()->GetString();
+ const char *filename = stack->pop()->getString();
_renderer->dumpData(filename);
@@ -2036,9 +2036,9 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "AccOutputText") == 0) {
stack->correctParams(2);
/* const char *Str = */
- stack->pop()->GetString();
+ stack->pop()->getString();
/* int Type = */
- stack->pop()->GetInt();
+ stack->pop()->getInt();
// do nothing
stack->pushNULL();
@@ -2078,8 +2078,8 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetFileChecksum") == 0) {
stack->correctParams(2);
- const char *filename = stack->pop()->GetString();
- bool AsHex = stack->pop()->GetBool(false);
+ const char *filename = stack->pop()->getString();
+ bool AsHex = stack->pop()->getBool(false);
Common::SeekableReadStream *File = _fileManager->openFile(filename, false);
if (File) {
@@ -2165,27 +2165,27 @@ HRESULT CBGame::scCallMethod(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
CScValue *CBGame::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("game");
+ _scValue->setString("game");
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Name
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Name") == 0) {
- _scValue->SetString(_name);
+ _scValue->setString(_name);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Hwnd (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Hwnd") == 0) {
- _scValue->SetInt((int)_renderer->_window);
+ _scValue->setInt((int)_renderer->_window);
return _scValue;
}
@@ -2193,7 +2193,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// CurrentTime (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CurrentTime") == 0) {
- _scValue->SetInt((int)_timer);
+ _scValue->setInt((int)_timer);
return _scValue;
}
@@ -2201,7 +2201,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// WindowsTime (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WindowsTime") == 0) {
- _scValue->SetInt((int)CBPlatform::GetTime());
+ _scValue->setInt((int)CBPlatform::GetTime());
return _scValue;
}
@@ -2209,7 +2209,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// WindowedMode (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WindowedMode") == 0) {
- _scValue->SetBool(_renderer->_windowed);
+ _scValue->setBool(_renderer->_windowed);
return _scValue;
}
@@ -2217,7 +2217,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// MouseX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MouseX") == 0) {
- _scValue->SetInt(_mousePos.x);
+ _scValue->setInt(_mousePos.x);
return _scValue;
}
@@ -2225,7 +2225,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// MouseY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MouseY") == 0) {
- _scValue->SetInt(_mousePos.y);
+ _scValue->setInt(_mousePos.y);
return _scValue;
}
@@ -2233,7 +2233,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// MainObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MainObject") == 0) {
- _scValue->SetNative(_mainObject, true);
+ _scValue->setNative(_mainObject, true);
return _scValue;
}
@@ -2241,7 +2241,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// ActiveObject (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ActiveObject") == 0) {
- _scValue->SetNative(_activeObject, true);
+ _scValue->setNative(_activeObject, true);
return _scValue;
}
@@ -2249,7 +2249,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// ScreenWidth (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScreenWidth") == 0) {
- _scValue->SetInt(_renderer->_width);
+ _scValue->setInt(_renderer->_width);
return _scValue;
}
@@ -2257,7 +2257,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// ScreenHeight (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScreenHeight") == 0) {
- _scValue->SetInt(_renderer->_height);
+ _scValue->setInt(_renderer->_height);
return _scValue;
}
@@ -2265,7 +2265,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// Interactive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Interactive") == 0) {
- _scValue->SetBool(_interactive);
+ _scValue->setBool(_interactive);
return _scValue;
}
@@ -2273,7 +2273,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// DebugMode (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DebugMode") == 0) {
- _scValue->SetBool(_dEBUG_DebugMode);
+ _scValue->setBool(_dEBUG_DebugMode);
return _scValue;
}
@@ -2281,7 +2281,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// SoundAvailable (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SoundAvailable") == 0) {
- _scValue->SetBool(_soundMgr->_soundAvailable);
+ _scValue->setBool(_soundMgr->_soundAvailable);
return _scValue;
}
@@ -2290,7 +2290,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SFXVolume") == 0) {
Game->LOG(0, "**Warning** The SFXVolume attribute is obsolete");
- _scValue->SetInt(_soundMgr->getVolumePercent(SOUND_SFX));
+ _scValue->setInt(_soundMgr->getVolumePercent(SOUND_SFX));
return _scValue;
}
@@ -2299,7 +2299,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SpeechVolume") == 0) {
Game->LOG(0, "**Warning** The SpeechVolume attribute is obsolete");
- _scValue->SetInt(_soundMgr->getVolumePercent(SOUND_SPEECH));
+ _scValue->setInt(_soundMgr->getVolumePercent(SOUND_SPEECH));
return _scValue;
}
@@ -2308,7 +2308,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MusicVolume") == 0) {
Game->LOG(0, "**Warning** The MusicVolume attribute is obsolete");
- _scValue->SetInt(_soundMgr->getVolumePercent(SOUND_MUSIC));
+ _scValue->setInt(_soundMgr->getVolumePercent(SOUND_MUSIC));
return _scValue;
}
@@ -2317,7 +2317,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MasterVolume") == 0) {
Game->LOG(0, "**Warning** The MasterVolume attribute is obsolete");
- _scValue->SetInt(_soundMgr->getMasterVolumePercent());
+ _scValue->setInt(_soundMgr->getMasterVolumePercent());
return _scValue;
}
@@ -2325,8 +2325,8 @@ CScValue *CBGame::scGetProperty(const char *name) {
// Keyboard (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Keyboard") == 0) {
- if (_keyboardState) _scValue->SetNative(_keyboardState, true);
- else _scValue->SetNULL();
+ if (_keyboardState) _scValue->setNative(_keyboardState, true);
+ else _scValue->setNULL();
return _scValue;
}
@@ -2335,7 +2335,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// Subtitles
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Subtitles") == 0) {
- _scValue->SetBool(_subtitles);
+ _scValue->setBool(_subtitles);
return _scValue;
}
@@ -2343,14 +2343,14 @@ CScValue *CBGame::scGetProperty(const char *name) {
// SubtitlesSpeed
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesSpeed") == 0) {
- _scValue->SetInt(_subtitlesSpeed);
+ _scValue->setInt(_subtitlesSpeed);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// VideoSubtitles
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "VideoSubtitles") == 0) {
- _scValue->SetBool(_videoSubtitles);
+ _scValue->setBool(_videoSubtitles);
return _scValue;
}
@@ -2358,7 +2358,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// FPS (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FPS") == 0) {
- _scValue->SetInt(_fps);
+ _scValue->setInt(_fps);
return _scValue;
}
@@ -2366,7 +2366,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AcceleratedMode / Accelerated (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AcceleratedMode") == 0 || strcmp(name, "Accelerated") == 0) {
- _scValue->SetBool(_useD3D);
+ _scValue->setBool(_useD3D);
return _scValue;
}
@@ -2374,7 +2374,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// TextEncoding
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TextEncoding") == 0) {
- _scValue->SetInt(_textEncoding);
+ _scValue->setInt(_textEncoding);
return _scValue;
}
@@ -2382,7 +2382,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// TextRTL
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TextRTL") == 0) {
- _scValue->SetBool(_textRTL);
+ _scValue->setBool(_textRTL);
return _scValue;
}
@@ -2390,7 +2390,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// SoundBufferSize
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SoundBufferSize") == 0) {
- _scValue->SetInt(_soundBufferSizeSec);
+ _scValue->setInt(_soundBufferSizeSec);
return _scValue;
}
@@ -2398,7 +2398,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// SuspendedRendering
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SuspendedRendering") == 0) {
- _scValue->SetBool(_suspendedRendering);
+ _scValue->setBool(_suspendedRendering);
return _scValue;
}
@@ -2406,7 +2406,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// SuppressScriptErrors
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SuppressScriptErrors") == 0) {
- _scValue->SetBool(_suppressScriptErrors);
+ _scValue->setBool(_suppressScriptErrors);
return _scValue;
}
@@ -2415,7 +2415,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// Frozen
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Frozen") == 0) {
- _scValue->SetBool(_state == GAME_FROZEN);
+ _scValue->setBool(_state == GAME_FROZEN);
return _scValue;
}
@@ -2423,7 +2423,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AccTTSEnabled
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccTTSEnabled") == 0) {
- _scValue->SetBool(false);
+ _scValue->setBool(false);
return _scValue;
}
@@ -2431,7 +2431,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AccTTSTalk
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccTTSTalk") == 0) {
- _scValue->SetBool(false);
+ _scValue->setBool(false);
return _scValue;
}
@@ -2439,7 +2439,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AccTTSCaptions
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccTTSCaptions") == 0) {
- _scValue->SetBool(false);
+ _scValue->setBool(false);
return _scValue;
}
@@ -2447,7 +2447,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AccTTSKeypress
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccTTSKeypress") == 0) {
- _scValue->SetBool(false);
+ _scValue->setBool(false);
return _scValue;
}
@@ -2455,7 +2455,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AccKeyboardEnabled
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccKeyboardEnabled") == 0) {
- _scValue->SetBool(false);
+ _scValue->setBool(false);
return _scValue;
}
@@ -2463,7 +2463,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AccKeyboardCursorSkip
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccKeyboardCursorSkip") == 0) {
- _scValue->SetBool(false);
+ _scValue->setBool(false);
return _scValue;
}
@@ -2471,7 +2471,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AccKeyboardPause
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccKeyboardPause") == 0) {
- _scValue->SetBool(false);
+ _scValue->setBool(false);
return _scValue;
}
@@ -2479,7 +2479,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AutorunDisabled
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutorunDisabled") == 0) {
- _scValue->SetBool(_autorunDisabled);
+ _scValue->setBool(_autorunDisabled);
return _scValue;
}
@@ -2488,7 +2488,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SaveDirectory") == 0) {
AnsiString dataDir = GetDataDir();
- _scValue->SetString(dataDir.c_str());
+ _scValue->setString(dataDir.c_str());
return _scValue;
}
@@ -2496,7 +2496,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AutoSaveOnExit
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutoSaveOnExit") == 0) {
- _scValue->SetBool(_autoSaveOnExit);
+ _scValue->setBool(_autoSaveOnExit);
return _scValue;
}
@@ -2504,7 +2504,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// AutoSaveSlot
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutoSaveSlot") == 0) {
- _scValue->SetInt(_autoSaveSlot);
+ _scValue->setInt(_autoSaveSlot);
return _scValue;
}
@@ -2512,7 +2512,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// CursorHidden
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorHidden") == 0) {
- _scValue->SetBool(_cursorHidden);
+ _scValue->setBool(_cursorHidden);
return _scValue;
}
@@ -2520,7 +2520,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// Platform (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Platform") == 0) {
- _scValue->SetString(CBPlatform::GetPlatformName().c_str());
+ _scValue->setString(CBPlatform::GetPlatformName().c_str());
return _scValue;
}
@@ -2528,7 +2528,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// DeviceType (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DeviceType") == 0) {
- _scValue->SetString(GetDeviceType().c_str());
+ _scValue->setString(GetDeviceType().c_str());
return _scValue;
}
@@ -2536,7 +2536,7 @@ CScValue *CBGame::scGetProperty(const char *name) {
// MostRecentSaveSlot (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MostRecentSaveSlot") == 0) {
- _scValue->SetInt(_registry->ReadInt("System", "MostRecentSaveSlot", -1));
+ _scValue->setInt(_registry->ReadInt("System", "MostRecentSaveSlot", -1));
return _scValue;
}
@@ -2544,8 +2544,8 @@ CScValue *CBGame::scGetProperty(const char *name) {
// Store (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Store") == 0) {
- if (_store) _scValue->SetNative(_store, true);
- else _scValue->SetNULL();
+ if (_store) _scValue->setNative(_store, true);
+ else _scValue->setNULL();
return _scValue;
}
@@ -2560,7 +2560,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -2569,7 +2569,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// MouseX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MouseX") == 0) {
- _mousePos.x = value->GetInt();
+ _mousePos.x = value->getInt();
ResetMousePos();
return S_OK;
}
@@ -2578,7 +2578,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// MouseY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MouseY") == 0) {
- _mousePos.y = value->GetInt();
+ _mousePos.y = value->getInt();
ResetMousePos();
return S_OK;
}
@@ -2596,7 +2596,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// MainObject
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MainObject") == 0) {
- CBScriptable *obj = value->GetNative();
+ CBScriptable *obj = value->getNative();
if (obj == NULL || ValidObject((CBObject *)obj)) _mainObject = (CBObject *)obj;
return S_OK;
}
@@ -2605,7 +2605,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// Interactive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Interactive") == 0) {
- SetInteractive(value->GetBool());
+ SetInteractive(value->getBool());
return S_OK;
}
@@ -2614,7 +2614,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SFXVolume") == 0) {
Game->LOG(0, "**Warning** The SFXVolume attribute is obsolete");
- Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte)value->GetInt());
+ Game->_soundMgr->setVolumePercent(SOUND_SFX, (byte)value->getInt());
return S_OK;
}
@@ -2623,7 +2623,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SpeechVolume") == 0) {
Game->LOG(0, "**Warning** The SpeechVolume attribute is obsolete");
- Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte)value->GetInt());
+ Game->_soundMgr->setVolumePercent(SOUND_SPEECH, (byte)value->getInt());
return S_OK;
}
@@ -2632,7 +2632,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MusicVolume") == 0) {
Game->LOG(0, "**Warning** The MusicVolume attribute is obsolete");
- Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte)value->GetInt());
+ Game->_soundMgr->setVolumePercent(SOUND_MUSIC, (byte)value->getInt());
return S_OK;
}
@@ -2641,7 +2641,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MasterVolume") == 0) {
Game->LOG(0, "**Warning** The MasterVolume attribute is obsolete");
- Game->_soundMgr->setMasterVolumePercent((byte)value->GetInt());
+ Game->_soundMgr->setMasterVolumePercent((byte)value->getInt());
return S_OK;
}
@@ -2649,7 +2649,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// Subtitles
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Subtitles") == 0) {
- _subtitles = value->GetBool();
+ _subtitles = value->getBool();
return S_OK;
}
@@ -2657,7 +2657,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// SubtitlesSpeed
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SubtitlesSpeed") == 0) {
- _subtitlesSpeed = value->GetInt();
+ _subtitlesSpeed = value->getInt();
return S_OK;
}
@@ -2665,7 +2665,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// VideoSubtitles
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "VideoSubtitles") == 0) {
- _videoSubtitles = value->GetBool();
+ _videoSubtitles = value->getBool();
return S_OK;
}
@@ -2673,7 +2673,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// TextEncoding
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TextEncoding") == 0) {
- int Enc = value->GetInt();
+ int Enc = value->getInt();
if (Enc < 0) Enc = 0;
if (Enc >= NUM_TEXT_ENCODINGS) Enc = NUM_TEXT_ENCODINGS - 1;
_textEncoding = (TTextEncoding)Enc;
@@ -2684,7 +2684,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// TextRTL
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TextRTL") == 0) {
- _textRTL = value->GetBool();
+ _textRTL = value->getBool();
return S_OK;
}
@@ -2692,7 +2692,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// SoundBufferSize
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SoundBufferSize") == 0) {
- _soundBufferSizeSec = value->GetInt();
+ _soundBufferSizeSec = value->getInt();
_soundBufferSizeSec = MAX(3, _soundBufferSizeSec);
return S_OK;
}
@@ -2701,7 +2701,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// SuspendedRendering
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SuspendedRendering") == 0) {
- _suspendedRendering = value->GetBool();
+ _suspendedRendering = value->getBool();
return S_OK;
}
@@ -2709,7 +2709,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// SuppressScriptErrors
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SuppressScriptErrors") == 0) {
- _suppressScriptErrors = value->GetBool();
+ _suppressScriptErrors = value->getBool();
return S_OK;
}
@@ -2717,7 +2717,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// AutorunDisabled
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutorunDisabled") == 0) {
- _autorunDisabled = value->GetBool();
+ _autorunDisabled = value->getBool();
return S_OK;
}
@@ -2725,7 +2725,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// AutoSaveOnExit
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutoSaveOnExit") == 0) {
- _autoSaveOnExit = value->GetBool();
+ _autoSaveOnExit = value->getBool();
return S_OK;
}
@@ -2733,7 +2733,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// AutoSaveSlot
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AutoSaveSlot") == 0) {
- _autoSaveSlot = value->GetInt();
+ _autoSaveSlot = value->getInt();
return S_OK;
}
@@ -2741,7 +2741,7 @@ HRESULT CBGame::scSetProperty(const char *name, CScValue *value) {
// CursorHidden
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorHidden") == 0) {
- _cursorHidden = value->GetBool();
+ _cursorHidden = value->getBool();
return S_OK;
}
@@ -2857,12 +2857,12 @@ HRESULT CBGame::UnregisterObject(CBObject *object) {
//////////////////////////////////////////////////////////////////////////
void CBGame::InvalidateValues(void *value, void *data) {
CScValue *val = (CScValue *)value;
- if (val->IsNative() && val->GetNative() == data) {
+ if (val->isNative() && val->getNative() == data) {
if (!val->_persistent && ((CBScriptable *)data)->_refCount == 1) {
((CBScriptable *)data)->_refCount++;
}
- val->SetNative(NULL);
- val->SetNULL();
+ val->setNative(NULL);
+ val->setNULL();
}
}
@@ -2932,7 +2932,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "LOG") == 0) {
stack->correctParams(1);
- Game->LOG(0, "sc: %s", stack->pop()->GetString());
+ Game->LOG(0, "sc: %s", stack->pop()->getString());
stack->pushNULL();
}
@@ -2942,7 +2942,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "String") == 0) {
this_obj = thisStack->getTop();
- this_obj->SetNative(makeSXString(Game, stack));
+ this_obj->setNative(makeSXString(Game, stack));
stack->pushNULL();
}
@@ -2952,7 +2952,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "MemBuffer") == 0) {
this_obj = thisStack->getTop();
- this_obj->SetNative(makeSXMemBuffer(Game, stack));
+ this_obj->setNative(makeSXMemBuffer(Game, stack));
stack->pushNULL();
}
@@ -2962,7 +2962,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "File") == 0) {
this_obj = thisStack->getTop();
- this_obj->SetNative(makeSXFile(Game, stack));
+ this_obj->setNative(makeSXFile(Game, stack));
stack->pushNULL();
}
@@ -2972,7 +2972,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "Date") == 0) {
this_obj = thisStack->getTop();
- this_obj->SetNative(makeSXDate(Game, stack));
+ this_obj->setNative(makeSXDate(Game, stack));
stack->pushNULL();
}
@@ -2982,7 +2982,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "Array") == 0) {
this_obj = thisStack->getTop();
- this_obj->SetNative(makeSXArray(Game, stack));
+ this_obj->setNative(makeSXArray(Game, stack));
stack->pushNULL();
}
@@ -2992,7 +2992,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "Object") == 0) {
this_obj = thisStack->getTop();
- this_obj->SetNative(makeSXObject(Game, stack));
+ this_obj->setNative(makeSXObject(Game, stack));
stack->pushNULL();
}
@@ -3002,7 +3002,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "Sleep") == 0) {
stack->correctParams(1);
- script->Sleep((uint32)stack->pop()->GetInt());
+ script->Sleep((uint32)stack->pop()->getInt());
stack->pushNULL();
}
@@ -3012,7 +3012,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "WaitFor") == 0) {
stack->correctParams(1);
- CBScriptable *obj = stack->pop()->GetNative();
+ CBScriptable *obj = stack->pop()->getNative();
if (ValidObject((CBObject *)obj)) script->WaitForExclusive((CBObject *)obj);
stack->pushNULL();
}
@@ -3023,8 +3023,8 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "Random") == 0) {
stack->correctParams(2);
- int from = stack->pop()->GetInt();
- int to = stack->pop()->GetInt();
+ int from = stack->pop()->getInt();
+ int to = stack->pop()->getInt();
stack->pushInt(CBUtils::RandomInt(from, to));
}
@@ -3035,7 +3035,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "SetScriptTimeSlice") == 0) {
stack->correctParams(1);
- script->_timeSlice = (uint32)stack->pop()->GetInt();
+ script->_timeSlice = (uint32)stack->pop()->getInt();
stack->pushNULL();
}
@@ -3044,13 +3044,13 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MakeRGBA") == 0 || strcmp(name, "MakeRGB") == 0 || strcmp(name, "RGB") == 0) {
stack->correctParams(4);
- int r = stack->pop()->GetInt();
- int g = stack->pop()->GetInt();
- int b = stack->pop()->GetInt();
+ int r = stack->pop()->getInt();
+ int g = stack->pop()->getInt();
+ int b = stack->pop()->getInt();
int a;
CScValue *val = stack->pop();
- if (val->IsNULL()) a = 255;
- else a = val->GetInt();
+ if (val->isNULL()) a = 255;
+ else a = val->getInt();
stack->pushInt(DRGBA(r, g, b, a));
}
@@ -3060,9 +3060,9 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MakeHSL") == 0) {
stack->correctParams(3);
- int h = stack->pop()->GetInt();
- int s = stack->pop()->GetInt();
- int l = stack->pop()->GetInt();
+ int h = stack->pop()->getInt();
+ int s = stack->pop()->getInt();
+ int l = stack->pop()->getInt();
stack->pushInt(CBUtils::HSLtoRGB(h, s, l));
}
@@ -3073,7 +3073,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "GetRValue") == 0) {
stack->correctParams(1);
- uint32 rgba = (uint32)stack->pop()->GetInt();
+ uint32 rgba = (uint32)stack->pop()->getInt();
stack->pushInt(D3DCOLGetR(rgba));
}
@@ -3083,7 +3083,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "GetGValue") == 0) {
stack->correctParams(1);
- uint32 rgba = (uint32)stack->pop()->GetInt();
+ uint32 rgba = (uint32)stack->pop()->getInt();
stack->pushInt(D3DCOLGetG(rgba));
}
@@ -3093,7 +3093,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "GetBValue") == 0) {
stack->correctParams(1);
- uint32 rgba = (uint32)stack->pop()->GetInt();
+ uint32 rgba = (uint32)stack->pop()->getInt();
stack->pushInt(D3DCOLGetB(rgba));
}
@@ -3103,7 +3103,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
else if (strcmp(name, "GetAValue") == 0) {
stack->correctParams(1);
- uint32 rgba = (uint32)stack->pop()->GetInt();
+ uint32 rgba = (uint32)stack->pop()->getInt();
stack->pushInt(D3DCOLGetA(rgba));
}
@@ -3112,7 +3112,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetHValue") == 0) {
stack->correctParams(1);
- uint32 rgb = (uint32)stack->pop()->GetInt();
+ uint32 rgb = (uint32)stack->pop()->getInt();
byte H, S, L;
CBUtils::RGBtoHSL(rgb, &H, &S, &L);
@@ -3124,7 +3124,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetSValue") == 0) {
stack->correctParams(1);
- uint32 rgb = (uint32)stack->pop()->GetInt();
+ uint32 rgb = (uint32)stack->pop()->getInt();
byte H, S, L;
CBUtils::RGBtoHSL(rgb, &H, &S, &L);
@@ -3136,7 +3136,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetLValue") == 0) {
stack->correctParams(1);
- uint32 rgb = (uint32)stack->pop()->GetInt();
+ uint32 rgb = (uint32)stack->pop()->getInt();
byte H, S, L;
CBUtils::RGBtoHSL(rgb, &H, &S, &L);
@@ -3161,7 +3161,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ToString") == 0) {
stack->correctParams(1);
- const char *Str = stack->pop()->GetString();
+ const char *Str = stack->pop()->getString();
char *Str2 = new char[strlen(Str) + 1];
strcpy(Str2, Str);
stack->pushString(Str2);
@@ -3173,7 +3173,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ToInt") == 0) {
stack->correctParams(1);
- int Val = stack->pop()->GetInt();
+ int Val = stack->pop()->getInt();
stack->pushInt(Val);
}
@@ -3182,7 +3182,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ToFloat") == 0) {
stack->correctParams(1);
- double Val = stack->pop()->GetFloat();
+ double Val = stack->pop()->getFloat();
stack->pushFloat(Val);
}
@@ -3191,7 +3191,7 @@ HRESULT CBGame::ExternalCall(CScScript *script, CScStack *stack, CScStack *thisS
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ToBool") == 0) {
stack->correctParams(1);
- bool Val = stack->pop()->GetBool();
+ bool Val = stack->pop()->getBool();
stack->pushBool(Val);
}
diff --git a/engines/wintermute/Base/BKeyboardState.cpp b/engines/wintermute/Base/BKeyboardState.cpp
index a3f742fd69..94b015f5e9 100644
--- a/engines/wintermute/Base/BKeyboardState.cpp
+++ b/engines/wintermute/Base/BKeyboardState.cpp
@@ -82,12 +82,12 @@ HRESULT CBKeyboardState::scCallMethod(CScScript *script, CScStack *stack, CScSta
CScValue *val = stack->pop();
int vKey;
- if (val->_type == VAL_STRING && strlen(val->GetString()) > 0) {
- const char *str = val->GetString();
+ if (val->_type == VAL_STRING && strlen(val->getString()) > 0) {
+ const char *str = val->getString();
char temp = str[0];
if (temp >= 'A' && temp <= 'Z') temp += ('a' - 'A');
vKey = (int)temp;
- } else vKey = val->GetInt();
+ } else vKey = val->getInt();
warning("BKeyboardState doesnt yet have state-support %d", vKey); //TODO;
// Uint8 *state = SDL_GetKeyboardState(NULL);
@@ -104,13 +104,13 @@ HRESULT CBKeyboardState::scCallMethod(CScScript *script, CScStack *stack, CScSta
//////////////////////////////////////////////////////////////////////////
CScValue *CBKeyboardState::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("keyboard");
+ _scValue->setString("keyboard");
return _scValue;
}
@@ -122,8 +122,8 @@ CScValue *CBKeyboardState::scGetProperty(const char *name) {
char key[2];
key[0] = (char)_currentCharCode;
key[1] = '\0';
- _scValue->SetString(key);
- } else _scValue->SetString("");
+ _scValue->setString(key);
+ } else _scValue->setString("");
return _scValue;
}
@@ -132,7 +132,7 @@ CScValue *CBKeyboardState::scGetProperty(const char *name) {
// Printable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Printable") == 0) {
- _scValue->SetBool(_currentPrintable);
+ _scValue->setBool(_currentPrintable);
return _scValue;
}
@@ -140,7 +140,7 @@ CScValue *CBKeyboardState::scGetProperty(const char *name) {
// KeyCode
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "KeyCode") == 0) {
- _scValue->SetInt(_currentCharCode);
+ _scValue->setInt(_currentCharCode);
return _scValue;
}
@@ -148,7 +148,7 @@ CScValue *CBKeyboardState::scGetProperty(const char *name) {
// IsShift
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsShift") == 0) {
- _scValue->SetBool(_currentShift);
+ _scValue->setBool(_currentShift);
return _scValue;
}
@@ -156,7 +156,7 @@ CScValue *CBKeyboardState::scGetProperty(const char *name) {
// IsAlt
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsAlt") == 0) {
- _scValue->SetBool(_currentAlt);
+ _scValue->setBool(_currentAlt);
return _scValue;
}
@@ -164,7 +164,7 @@ CScValue *CBKeyboardState::scGetProperty(const char *name) {
// IsControl
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsControl") == 0) {
- _scValue->SetBool(_currentControl);
+ _scValue->setBool(_currentControl);
return _scValue;
}
@@ -179,7 +179,7 @@ HRESULT CBKeyboardState::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
if (_renderer) SetWindowText(_renderer->_window, _name);
return S_OK;
}
diff --git a/engines/wintermute/Base/BObject.cpp b/engines/wintermute/Base/BObject.cpp
index c84b58eecd..ab30ce33b0 100644
--- a/engines/wintermute/Base/BObject.cpp
+++ b/engines/wintermute/Base/BObject.cpp
@@ -172,8 +172,8 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SkipTo") == 0) {
stack->correctParams(2);
- _posX = stack->pop()->GetInt();
- _posY = stack->pop()->GetInt();
+ _posX = stack->pop()->getInt();
+ _posY = stack->pop()->getInt();
afterMove();
stack->pushNULL();
@@ -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;
@@ -268,7 +268,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();
+ const char *Filename = stack->pop()->getString();
if (SUCCEEDED(playSFX(Filename, false, false)))
stack->pushBool(true);
else
@@ -293,13 +293,13 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
if (val1->_type == VAL_BOOL) {
Filename = NULL;
- Looping = val1->GetBool();
- LoopStart = val2->GetInt();
+ Looping = val1->getBool();
+ LoopStart = val2->getInt();
} else {
- if (val1->IsNULL()) Filename = NULL;
- else Filename = val1->GetString();
- Looping = val2->IsNULL() ? false : val2->GetBool();
- LoopStart = val3->GetInt();
+ if (val1->isNULL()) Filename = NULL;
+ else Filename = val1->getString();
+ Looping = val2->isNULL() ? false : val2->getBool();
+ LoopStart = val3->getInt();
}
if (FAILED(playSFX(Filename, Looping, true, NULL, LoopStart))) stack->pushBool(false);
@@ -319,12 +319,12 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
CScValue *val1 = stack->pop();
CScValue *val2 = stack->pop();
- if (val2->IsNULL()) {
+ if (val2->isNULL()) {
Filename = NULL;
- EventName = val1->GetString();
+ EventName = val1->getString();
} else {
- Filename = val1->GetString();
- EventName = val2->GetString();
+ Filename = val1->getString();
+ EventName = val2->getString();
}
if (FAILED(playSFX(Filename, false, true, EventName))) stack->pushBool(false);
@@ -382,7 +382,7 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "SetSoundPosition") == 0) {
stack->correctParams(1);
- uint32 Time = stack->pop()->GetInt();
+ uint32 Time = stack->pop()->getInt();
if (FAILED(setSFXTime(Time))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
@@ -405,7 +405,7 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "SetSoundVolume") == 0) {
stack->correctParams(1);
- int Volume = stack->pop()->GetInt();
+ int Volume = stack->pop()->getInt();
if (FAILED(setSFXVolume(Volume))) stack->pushBool(false);
else stack->pushBool(true);
return S_OK;
@@ -444,10 +444,10 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "SoundFXEcho") == 0) {
stack->correctParams(4);
_sFXType = SFX_ECHO;
- _sFXParam1 = (float)stack->pop()->GetFloat(0); // Wet/Dry Mix [%] (0-100)
- _sFXParam2 = (float)stack->pop()->GetFloat(0); // Feedback [%] (0-100)
- _sFXParam3 = (float)stack->pop()->GetFloat(333.0f); // Left Delay [ms] (1-2000)
- _sFXParam4 = (float)stack->pop()->GetFloat(333.0f); // Right Delay [ms] (1-2000)
+ _sFXParam1 = (float)stack->pop()->getFloat(0); // Wet/Dry Mix [%] (0-100)
+ _sFXParam2 = (float)stack->pop()->getFloat(0); // Feedback [%] (0-100)
+ _sFXParam3 = (float)stack->pop()->getFloat(333.0f); // Left Delay [ms] (1-2000)
+ _sFXParam4 = (float)stack->pop()->getFloat(333.0f); // Right Delay [ms] (1-2000)
stack->pushNULL();
return S_OK;
@@ -459,10 +459,10 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "SoundFXReverb") == 0) {
stack->correctParams(4);
_sFXType = SFX_REVERB;
- _sFXParam1 = (float)stack->pop()->GetFloat(0); // In Gain [dB] (-96 - 0)
- _sFXParam2 = (float)stack->pop()->GetFloat(0); // Reverb Mix [dB] (-96 - 0)
- _sFXParam3 = (float)stack->pop()->GetFloat(1000.0f); // Reverb Time [ms] (0.001 - 3000)
- _sFXParam4 = (float)stack->pop()->GetFloat(0.001f); // HighFreq RT Ratio (0.001 - 0.999)
+ _sFXParam1 = (float)stack->pop()->getFloat(0); // In Gain [dB] (-96 - 0)
+ _sFXParam2 = (float)stack->pop()->getFloat(0); // Reverb Mix [dB] (-96 - 0)
+ _sFXParam3 = (float)stack->pop()->getFloat(1000.0f); // Reverb Time [ms] (0.001 - 3000)
+ _sFXParam4 = (float)stack->pop()->getFloat(0.001f); // HighFreq RT Ratio (0.001 - 0.999)
stack->pushNULL();
return S_OK;
@@ -474,13 +474,13 @@ HRESULT CBObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CBObject::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("object");
+ _scValue->setString("object");
return _scValue;
}
@@ -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;
}
@@ -496,7 +496,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// X
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "X") == 0) {
- _scValue->SetInt(_posX);
+ _scValue->setInt(_posX);
return _scValue;
}
@@ -504,7 +504,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Y
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Y") == 0) {
- _scValue->SetInt(_posY);
+ _scValue->setInt(_posY);
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;
}
@@ -520,7 +520,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Ready (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Ready") == 0) {
- _scValue->SetBool(_ready);
+ _scValue->setBool(_ready);
return _scValue;
}
@@ -528,7 +528,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Movable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Movable") == 0) {
- _scValue->SetBool(_movable);
+ _scValue->setBool(_movable);
return _scValue;
}
@@ -536,7 +536,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Registrable/Interactive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Registrable") == 0 || strcmp(name, "Interactive") == 0) {
- _scValue->SetBool(_registrable);
+ _scValue->setBool(_registrable);
return _scValue;
}
@@ -544,21 +544,21 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Zoomable/Scalable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Zoomable") == 0 || strcmp(name, "Scalable") == 0) {
- _scValue->SetBool(_zoomable);
+ _scValue->setBool(_zoomable);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Rotatable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotatable") == 0) {
- _scValue->SetBool(_rotatable);
+ _scValue->setBool(_rotatable);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// AlphaColor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AlphaColor") == 0) {
- _scValue->SetInt((int)_alphaColor);
+ _scValue->setInt((int)_alphaColor);
return _scValue;
}
@@ -566,7 +566,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// BlendMode
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "BlendMode") == 0) {
- _scValue->SetInt((int)_blendMode);
+ _scValue->setInt((int)_blendMode);
return _scValue;
}
@@ -574,8 +574,8 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Scale
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale") == 0) {
- if (_scale < 0) _scValue->SetNULL();
- else _scValue->SetFloat((double)_scale);
+ if (_scale < 0) _scValue->setNULL();
+ else _scValue->setFloat((double)_scale);
return _scValue;
}
@@ -583,8 +583,8 @@ CScValue *CBObject::scGetProperty(const char *name) {
// ScaleX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScaleX") == 0) {
- if (_scaleX < 0) _scValue->SetNULL();
- else _scValue->SetFloat((double)_scaleX);
+ if (_scaleX < 0) _scValue->setNULL();
+ else _scValue->setFloat((double)_scaleX);
return _scValue;
}
@@ -592,8 +592,8 @@ CScValue *CBObject::scGetProperty(const char *name) {
// ScaleY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScaleY") == 0) {
- if (_scaleY < 0) _scValue->SetNULL();
- else _scValue->SetFloat((double)_scaleY);
+ if (_scaleY < 0) _scValue->setNULL();
+ else _scValue->setFloat((double)_scaleY);
return _scValue;
}
@@ -601,7 +601,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// RelativeScale
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RelativeScale") == 0) {
- _scValue->SetFloat((double)_relativeScale);
+ _scValue->setFloat((double)_relativeScale);
return _scValue;
}
@@ -609,8 +609,8 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Rotate
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotate") == 0) {
- if (!_rotateValid) _scValue->SetNULL();
- else _scValue->SetFloat((double)_rotate);
+ if (!_rotateValid) _scValue->setNULL();
+ else _scValue->setFloat((double)_rotate);
return _scValue;
}
@@ -618,7 +618,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// RelativeRotate
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RelativeRotate") == 0) {
- _scValue->SetFloat((double)_relativeRotate);
+ _scValue->setFloat((double)_relativeRotate);
return _scValue;
}
@@ -626,14 +626,14 @@ CScValue *CBObject::scGetProperty(const char *name) {
// Colorable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Colorable") == 0) {
- _scValue->SetBool(_shadowable);
+ _scValue->setBool(_shadowable);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// SoundPanning
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SoundPanning") == 0) {
- _scValue->SetBool(_autoSoundPanning);
+ _scValue->setBool(_autoSoundPanning);
return _scValue;
}
@@ -641,7 +641,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// SaveState
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SaveState") == 0) {
- _scValue->SetBool(_saveState);
+ _scValue->setBool(_saveState);
return _scValue;
}
@@ -649,7 +649,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// NonIntMouseEvents
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NonIntMouseEvents") == 0) {
- _scValue->SetBool(_nonIntMouseEvents);
+ _scValue->setBool(_nonIntMouseEvents);
return _scValue;
}
@@ -657,7 +657,7 @@ CScValue *CBObject::scGetProperty(const char *name) {
// AccCaption
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccCaption") == 0) {
- _scValue->SetNULL();
+ _scValue->setNULL();
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;
}
@@ -679,7 +679,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// X
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "X") == 0) {
- _posX = value->GetInt();
+ _posX = value->getInt();
afterMove();
return S_OK;
}
@@ -688,7 +688,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Y
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Y") == 0) {
- _posY = value->GetInt();
+ _posY = value->getInt();
afterMove();
return S_OK;
}
@@ -697,7 +697,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Movable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Movable") == 0) {
- _movable = value->GetBool();
+ _movable = value->getBool();
return S_OK;
}
@@ -705,7 +705,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Registrable/Interactive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Registrable") == 0 || strcmp(name, "Interactive") == 0) {
- _registrable = value->GetBool();
+ _registrable = value->getBool();
return S_OK;
}
@@ -713,7 +713,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Zoomable/Scalable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Zoomable") == 0 || strcmp(name, "Scalable") == 0) {
- _zoomable = value->GetBool();
+ _zoomable = value->getBool();
return S_OK;
}
@@ -721,7 +721,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Rotatable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotatable") == 0) {
- _rotatable = value->GetBool();
+ _rotatable = value->getBool();
return S_OK;
}
@@ -729,7 +729,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// AlphaColor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AlphaColor") == 0) {
- _alphaColor = (uint32)value->GetInt();
+ _alphaColor = (uint32)value->getInt();
return S_OK;
}
@@ -737,7 +737,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// BlendMode
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "BlendMode") == 0) {
- int i = value->GetInt();
+ int i = value->getInt();
if (i < BLEND_NORMAL || i >= NUM_BLEND_MODES) i = BLEND_NORMAL;
_blendMode = (TSpriteBlendMode)i;
return S_OK;
@@ -747,8 +747,8 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Scale
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale") == 0) {
- if (value->IsNULL()) _scale = -1;
- else _scale = (float)value->GetFloat();
+ if (value->isNULL()) _scale = -1;
+ else _scale = (float)value->getFloat();
return S_OK;
}
@@ -756,8 +756,8 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// ScaleX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScaleX") == 0) {
- if (value->IsNULL()) _scaleX = -1;
- else _scaleX = (float)value->GetFloat();
+ if (value->isNULL()) _scaleX = -1;
+ else _scaleX = (float)value->getFloat();
return S_OK;
}
@@ -765,8 +765,8 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// ScaleY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScaleY") == 0) {
- if (value->IsNULL()) _scaleY = -1;
- else _scaleY = (float)value->GetFloat();
+ if (value->isNULL()) _scaleY = -1;
+ else _scaleY = (float)value->getFloat();
return S_OK;
}
@@ -774,7 +774,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// RelativeScale
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RelativeScale") == 0) {
- _relativeScale = (float)value->GetFloat();
+ _relativeScale = (float)value->getFloat();
return S_OK;
}
@@ -782,11 +782,11 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Rotate
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotate") == 0) {
- if (value->IsNULL()) {
+ if (value->isNULL()) {
_rotate = 0.0f;
_rotateValid = false;
} else {
- _rotate = (float)value->GetFloat();
+ _rotate = (float)value->getFloat();
_rotateValid = true;
}
return S_OK;
@@ -796,7 +796,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// RelativeRotate
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RelativeRotate") == 0) {
- _relativeRotate = (float)value->GetFloat();
+ _relativeRotate = (float)value->getFloat();
return S_OK;
}
@@ -804,7 +804,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// Colorable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Colorable") == 0) {
- _shadowable = value->GetBool();
+ _shadowable = value->getBool();
return S_OK;
}
@@ -812,7 +812,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// SoundPanning
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SoundPanning") == 0) {
- _autoSoundPanning = value->GetBool();
+ _autoSoundPanning = value->getBool();
if (!_autoSoundPanning) resetSoundPan();
return S_OK;
}
@@ -821,7 +821,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// SaveState
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SaveState") == 0) {
- _saveState = value->GetBool();
+ _saveState = value->getBool();
return S_OK;
}
@@ -829,7 +829,7 @@ HRESULT CBObject::scSetProperty(const char *name, CScValue *value) {
// NonIntMouseEvents
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NonIntMouseEvents") == 0) {
- _nonIntMouseEvents = value->GetBool();
+ _nonIntMouseEvents = value->getBool();
return S_OK;
}
diff --git a/engines/wintermute/Base/BRegion.cpp b/engines/wintermute/Base/BRegion.cpp
index dd0f06334d..c100a2c765 100644
--- a/engines/wintermute/Base/BRegion.cpp
+++ b/engines/wintermute/Base/BRegion.cpp
@@ -217,8 +217,8 @@ HRESULT CBRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "AddPoint") == 0) {
stack->correctParams(2);
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
_points.Add(new CBPoint(X, Y));
CreateRegion();
@@ -233,9 +233,9 @@ HRESULT CBRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InsertPoint") == 0) {
stack->correctParams(3);
- int Index = stack->pop()->GetInt();
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
if (Index >= 0 && Index < _points.GetSize()) {
_points.InsertAt(Index, new CBPoint(X, Y));
@@ -252,9 +252,9 @@ HRESULT CBRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetPoint") == 0) {
stack->correctParams(3);
- int Index = stack->pop()->GetInt();
- int X = stack->pop()->GetInt();
- int Y = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
+ int X = stack->pop()->getInt();
+ int Y = stack->pop()->getInt();
if (Index >= 0 && Index < _points.GetSize()) {
_points[Index]->x = X;
@@ -272,7 +272,7 @@ HRESULT CBRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RemovePoint") == 0) {
stack->correctParams(1);
- int Index = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
if (Index >= 0 && Index < _points.GetSize()) {
delete _points[Index];
@@ -292,13 +292,13 @@ HRESULT CBRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetPoint") == 0) {
stack->correctParams(1);
- int Index = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
if (Index >= 0 && Index < _points.GetSize()) {
CScValue *Val = stack->getPushValue();
if (Val) {
- Val->SetProperty("X", _points[Index]->x);
- Val->SetProperty("Y", _points[Index]->y);
+ Val->setProperty("X", _points[Index]->x);
+ Val->setProperty("Y", _points[Index]->y);
}
} else stack->pushNULL();
@@ -311,13 +311,13 @@ HRESULT CBRegion::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CBRegion::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("region");
+ _scValue->setString("region");
return _scValue;
}
@@ -325,7 +325,7 @@ CScValue *CBRegion::scGetProperty(const char *name) {
// Name
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Name") == 0) {
- _scValue->SetString(_name);
+ _scValue->setString(_name);
return _scValue;
}
@@ -333,7 +333,7 @@ CScValue *CBRegion::scGetProperty(const char *name) {
// Active
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Active") == 0) {
- _scValue->SetBool(_active);
+ _scValue->setBool(_active);
return _scValue;
}
@@ -341,7 +341,7 @@ CScValue *CBRegion::scGetProperty(const char *name) {
// NumPoints
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumPoints") == 0) {
- _scValue->SetInt(_points.GetSize());
+ _scValue->setInt(_points.GetSize());
return _scValue;
}
@@ -355,7 +355,7 @@ HRESULT CBRegion::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -363,7 +363,7 @@ HRESULT CBRegion::scSetProperty(const char *name, CScValue *value) {
// Active
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Active") == 0) {
- _active = value->GetBool();
+ _active = value->getBool();
return S_OK;
}
diff --git a/engines/wintermute/Base/BScriptHolder.cpp b/engines/wintermute/Base/BScriptHolder.cpp
index 4557c8d2b3..6165008bc1 100644
--- a/engines/wintermute/Base/BScriptHolder.cpp
+++ b/engines/wintermute/Base/BScriptHolder.cpp
@@ -129,7 +129,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *script, CScStack *stack, CScStac
stack->correctParams(1);
CScValue *val = stack->pop();
HRESULT ret;
- ret = applyEvent(val->GetString());
+ ret = applyEvent(val->getString());
if (SUCCEEDED(ret)) stack->pushBool(true);
else stack->pushBool(false);
@@ -142,7 +142,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *script, CScStack *stack, CScStac
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CanHandleEvent") == 0) {
stack->correctParams(1);
- stack->pushBool(canHandleEvent(stack->pop()->GetString()));
+ stack->pushBool(canHandleEvent(stack->pop()->getString()));
return S_OK;
}
@@ -152,7 +152,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *script, CScStack *stack, CScStac
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CanHandleMethod") == 0) {
stack->correctParams(1);
- stack->pushBool(canHandleMethod(stack->pop()->GetString()));
+ stack->pushBool(canHandleMethod(stack->pop()->getString()));
return S_OK;
}
@@ -162,7 +162,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *script, CScStack *stack, CScStac
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AttachScript") == 0) {
stack->correctParams(1);
- stack->pushBool(SUCCEEDED(addScript(stack->pop()->GetString())));
+ stack->pushBool(SUCCEEDED(addScript(stack->pop()->getString())));
return S_OK;
}
@@ -172,8 +172,8 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *script, CScStack *stack, CScStac
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DetachScript") == 0) {
stack->correctParams(2);
- const char *Filename = stack->pop()->GetString();
- bool KillThreads = stack->pop()->GetBool(false);
+ const char *Filename = stack->pop()->getString();
+ bool KillThreads = stack->pop()->getBool(false);
bool ret = false;
for (int i = 0; i < _scripts.GetSize(); i++) {
if (scumm_stricmp(_scripts[i]->_filename, Filename) == 0) {
@@ -192,7 +192,7 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *script, CScStack *stack, CScStac
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsScriptRunning") == 0) {
stack->correctParams(1);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
bool ret = false;
for (int i = 0; i < _scripts.GetSize(); i++) {
if (scumm_stricmp(_scripts[i]->_filename, Filename) == 0 && _scripts[i]->_state != SCRIPT_FINISHED && _scripts[i]->_state != SCRIPT_ERROR) {
@@ -209,13 +209,13 @@ HRESULT CBScriptHolder::scCallMethod(CScScript *script, CScStack *stack, CScStac
//////////////////////////////////////////////////////////////////////////
CScValue *CBScriptHolder::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("script_holder");
+ _scValue->setString("script_holder");
return _scValue;
}
@@ -223,7 +223,7 @@ CScValue *CBScriptHolder::scGetProperty(const char *name) {
// Name
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Name") == 0) {
- _scValue->SetString(_name);
+ _scValue->setString(_name);
return _scValue;
}
@@ -231,7 +231,7 @@ CScValue *CBScriptHolder::scGetProperty(const char *name) {
// Filename (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Filename") == 0) {
- _scValue->SetString(_filename);
+ _scValue->setString(_filename);
return _scValue;
}
@@ -245,7 +245,7 @@ HRESULT CBScriptHolder::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
} else return CBScriptable::scSetProperty(name, value);
}
@@ -404,7 +404,7 @@ HRESULT CBScriptHolder::parseProperty(byte *Buffer, bool Complete) {
CScValue *val = new CScValue(Game);
- val->SetString(PropValue);
+ val->setString(PropValue);
scSetProperty(PropName, val);
delete val;
diff --git a/engines/wintermute/Base/BScriptable.cpp b/engines/wintermute/Base/BScriptable.cpp
index 8d8c13df29..bd0018de24 100644
--- a/engines/wintermute/Base/BScriptable.cpp
+++ b/engines/wintermute/Base/BScriptable.cpp
@@ -76,7 +76,7 @@ HRESULT CBScriptable::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
CScValue *CBScriptable::scGetProperty(const char *name) {
if (!_scProp) _scProp = new CScValue(Game);
- if (_scProp) return _scProp->GetProp(name);
+ if (_scProp) return _scProp->getProp(name);
else return NULL;
}
@@ -84,7 +84,7 @@ CScValue *CBScriptable::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
HRESULT CBScriptable::scSetProperty(const char *name, CScValue *value) {
if (!_scProp) _scProp = new CScValue(Game);
- if (_scProp) return _scProp->SetProp(name, value);
+ if (_scProp) return _scProp->setProp(name, value);
else return E_FAIL;
}
diff --git a/engines/wintermute/Base/BSprite.cpp b/engines/wintermute/Base/BSprite.cpp
index 901d592a02..07b8bc8b1d 100644
--- a/engines/wintermute/Base/BSprite.cpp
+++ b/engines/wintermute/Base/BSprite.cpp
@@ -513,7 +513,7 @@ HRESULT CBSprite::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "GetFrame") == 0) {
stack->correctParams(1);
- int Index = stack->pop()->GetInt(-1);
+ int Index = stack->pop()->getInt(-1);
if (Index < 0 || Index >= _frames.GetSize()) {
script->RuntimeError("Sprite.GetFrame: Frame index %d is out of range.", Index);
stack->pushNULL();
@@ -527,13 +527,13 @@ HRESULT CBSprite::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
else if (strcmp(name, "DeleteFrame") == 0) {
stack->correctParams(1);
CScValue *Val = stack->pop();
- if (Val->IsInt()) {
- int Index = Val->GetInt(-1);
+ if (Val->isInt()) {
+ int Index = Val->getInt(-1);
if (Index < 0 || Index >= _frames.GetSize()) {
script->RuntimeError("Sprite.DeleteFrame: Frame index %d is out of range.", Index);
}
} else {
- CBFrame *Frame = (CBFrame *)Val->GetNative();
+ CBFrame *Frame = (CBFrame *)Val->getNative();
for (int i = 0; i < _frames.GetSize(); i++) {
if (_frames[i] == Frame) {
if (i == _currentFrame) _lastFrameTime = 0;
@@ -564,7 +564,7 @@ HRESULT CBSprite::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
stack->correctParams(1);
CScValue *Val = stack->pop();
const char *Filename = NULL;
- if (!Val->IsNULL()) Filename = Val->GetString();
+ if (!Val->isNULL()) Filename = Val->getString();
CBFrame *Frame = new CBFrame(Game);
if (Filename != NULL) {
@@ -585,12 +585,12 @@ HRESULT CBSprite::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InsertFrame") == 0) {
stack->correctParams(2);
- int Index = stack->pop()->GetInt();
+ int Index = stack->pop()->getInt();
if (Index < 0) Index = 0;
CScValue *Val = stack->pop();
const char *Filename = NULL;
- if (!Val->IsNULL()) Filename = Val->GetString();
+ if (!Val->isNULL()) Filename = Val->getString();
CBFrame *Frame = new CBFrame(Game);
if (Filename != NULL) {
@@ -632,13 +632,13 @@ HRESULT CBSprite::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CBSprite::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("sprite");
+ _scValue->setString("sprite");
return _scValue;
}
@@ -646,7 +646,7 @@ CScValue *CBSprite::scGetProperty(const char *name) {
// NumFrames (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumFrames") == 0) {
- _scValue->SetInt(_frames.GetSize());
+ _scValue->setInt(_frames.GetSize());
return _scValue;
}
@@ -654,7 +654,7 @@ CScValue *CBSprite::scGetProperty(const char *name) {
// CurrentFrame
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CurrentFrame") == 0) {
- _scValue->SetInt(_currentFrame);
+ _scValue->setInt(_currentFrame);
return _scValue;
}
@@ -662,7 +662,7 @@ CScValue *CBSprite::scGetProperty(const char *name) {
// PixelPerfect
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PixelPerfect") == 0) {
- _scValue->SetBool(_precise);
+ _scValue->setBool(_precise);
return _scValue;
}
@@ -670,7 +670,7 @@ CScValue *CBSprite::scGetProperty(const char *name) {
// Looping
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Looping") == 0) {
- _scValue->SetBool(_looping);
+ _scValue->setBool(_looping);
return _scValue;
}
@@ -678,8 +678,8 @@ CScValue *CBSprite::scGetProperty(const char *name) {
// Owner (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Owner") == 0) {
- if (_owner == NULL) _scValue->SetNULL();
- else _scValue->SetNative(_owner, true);
+ if (_owner == NULL) _scValue->setNULL();
+ else _scValue->setNative(_owner, true);
return _scValue;
}
@@ -687,7 +687,7 @@ CScValue *CBSprite::scGetProperty(const char *name) {
// Finished (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Finished") == 0) {
- _scValue->SetBool(_finished);
+ _scValue->setBool(_finished);
return _scValue;
}
@@ -695,7 +695,7 @@ CScValue *CBSprite::scGetProperty(const char *name) {
// Paused (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Paused") == 0) {
- _scValue->SetBool(_paused);
+ _scValue->setBool(_paused);
return _scValue;
}
@@ -709,7 +709,7 @@ HRESULT CBSprite::scSetProperty(const char *name, CScValue *value) {
// CurrentFrame
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "CurrentFrame") == 0) {
- _currentFrame = value->GetInt(0);
+ _currentFrame = value->getInt(0);
if (_currentFrame >= _frames.GetSize() || _currentFrame < 0) {
_currentFrame = -1;
}
@@ -721,7 +721,7 @@ HRESULT CBSprite::scSetProperty(const char *name, CScValue *value) {
// PixelPerfect
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PixelPerfect") == 0) {
- _precise = value->GetBool();
+ _precise = value->getBool();
return S_OK;
}
@@ -729,7 +729,7 @@ HRESULT CBSprite::scSetProperty(const char *name, CScValue *value) {
// Looping
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Looping") == 0) {
- _looping = value->GetBool();
+ _looping = value->getBool();
return S_OK;
}
diff --git a/engines/wintermute/Base/BSubFrame.cpp b/engines/wintermute/Base/BSubFrame.cpp
index 0c7048b7bd..5a46237239 100644
--- a/engines/wintermute/Base/BSubFrame.cpp
+++ b/engines/wintermute/Base/BSubFrame.cpp
@@ -362,13 +362,13 @@ HRESULT CBSubFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *t
stack->correctParams(1);
CScValue *Val = stack->pop();
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
if (_surface) Game->_surfaceStorage->removeSurface(_surface);
delete[] _surfaceFilename;
_surfaceFilename = NULL;
stack->pushBool(true);
} else {
- const char *Filename = Val->GetString();
+ const char *Filename = Val->getString();
if (SUCCEEDED(setSurface(Filename))) {
setDefaultRect();
stack->pushBool(true);
@@ -385,13 +385,13 @@ HRESULT CBSubFrame::scCallMethod(CScScript *script, CScStack *stack, CScStack *t
//////////////////////////////////////////////////////////////////////////
CScValue *CBSubFrame::scGetProperty(const char *name) {
if (!_scValue) _scValue = new CScValue(Game);
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("subframe");
+ _scValue->setString("subframe");
return _scValue;
}
@@ -400,7 +400,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AlphaColor") == 0) {
- _scValue->SetInt((int)_alpha);
+ _scValue->setInt((int)_alpha);
return _scValue;
}
@@ -408,7 +408,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// TransparentColor (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TransparentColor") == 0) {
- _scValue->SetInt((int)_transparent);
+ _scValue->setInt((int)_transparent);
return _scValue;
}
@@ -416,7 +416,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// Is2DOnly
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Is2DOnly") == 0) {
- _scValue->SetBool(_2DOnly);
+ _scValue->setBool(_2DOnly);
return _scValue;
}
@@ -424,7 +424,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// Is3DOnly
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Is3DOnly") == 0) {
- _scValue->SetBool(_3DOnly);
+ _scValue->setBool(_3DOnly);
return _scValue;
}
@@ -432,7 +432,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// MirrorX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MirrorX") == 0) {
- _scValue->SetBool(_mirrorX);
+ _scValue->setBool(_mirrorX);
return _scValue;
}
@@ -440,7 +440,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// MirrorY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MirrorY") == 0) {
- _scValue->SetBool(_mirrorY);
+ _scValue->setBool(_mirrorY);
return _scValue;
}
@@ -448,7 +448,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// Decoration
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Decoration") == 0) {
- _scValue->SetBool(_decoration);
+ _scValue->setBool(_decoration);
return _scValue;
}
@@ -456,7 +456,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// HotspotX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HotspotX") == 0) {
- _scValue->SetInt(_hotspotX);
+ _scValue->setInt(_hotspotX);
return _scValue;
}
@@ -464,7 +464,7 @@ CScValue *CBSubFrame::scGetProperty(const char *name) {
// HotspotY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HotspotY") == 0) {
- _scValue->SetInt(_hotspotY);
+ _scValue->setInt(_hotspotY);
return _scValue;
}
@@ -478,7 +478,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// AlphaColor
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "AlphaColor") == 0) {
- _alpha = (uint32)value->GetInt();
+ _alpha = (uint32)value->getInt();
return S_OK;
}
@@ -486,7 +486,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// Is2DOnly
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Is2DOnly") == 0) {
- _2DOnly = value->GetBool();
+ _2DOnly = value->getBool();
return S_OK;
}
@@ -494,7 +494,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// Is3DOnly
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Is3DOnly") == 0) {
- _3DOnly = value->GetBool();
+ _3DOnly = value->getBool();
return S_OK;
}
@@ -502,7 +502,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// MirrorX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MirrorX") == 0) {
- _mirrorX = value->GetBool();
+ _mirrorX = value->getBool();
return S_OK;
}
@@ -510,7 +510,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// MirrorY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MirrorY") == 0) {
- _mirrorY = value->GetBool();
+ _mirrorY = value->getBool();
return S_OK;
}
@@ -518,7 +518,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// Decoration
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Decoration") == 0) {
- _decoration = value->GetBool();
+ _decoration = value->getBool();
return S_OK;
}
@@ -526,7 +526,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// HotspotX
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HotspotX") == 0) {
- _hotspotX = value->GetInt();
+ _hotspotX = value->getInt();
return S_OK;
}
@@ -534,7 +534,7 @@ HRESULT CBSubFrame::scSetProperty(const char *name, CScValue *value) {
// HotspotY
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "HotspotY") == 0) {
- _hotspotY = value->GetInt();
+ _hotspotY = value->getInt();
return S_OK;
}
diff --git a/engines/wintermute/Base/PartEmitter.cpp b/engines/wintermute/Base/PartEmitter.cpp
index e9c597c429..276540a14f 100644
--- a/engines/wintermute/Base/PartEmitter.cpp
+++ b/engines/wintermute/Base/PartEmitter.cpp
@@ -422,10 +422,10 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SetBorder") == 0) {
stack->correctParams(4);
- int BorderX = stack->pop()->GetInt();
- int BorderY = stack->pop()->GetInt();
- int BorderWidth = stack->pop()->GetInt();
- int BorderHeight = stack->pop()->GetInt();
+ int BorderX = stack->pop()->getInt();
+ int BorderY = stack->pop()->getInt();
+ int BorderWidth = stack->pop()->getInt();
+ int BorderHeight = stack->pop()->getInt();
stack->pushBool(SUCCEEDED(setBorder(BorderX, BorderY, BorderWidth, BorderHeight)));
@@ -436,10 +436,10 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetBorderThickness") == 0) {
stack->correctParams(4);
- int Left = stack->pop()->GetInt();
- int Right = stack->pop()->GetInt();
- int Top = stack->pop()->GetInt();
- int Bottom = stack->pop()->GetInt();
+ int Left = stack->pop()->getInt();
+ int Right = stack->pop()->getInt();
+ int Top = stack->pop()->getInt();
+ int Bottom = stack->pop()->getInt();
stack->pushBool(SUCCEEDED(setBorderThickness(Left, Right, Top, Bottom)));
@@ -450,7 +450,7 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AddSprite") == 0) {
stack->correctParams(1);
- const char *SpriteFile = stack->pop()->GetString();
+ const char *SpriteFile = stack->pop()->getString();
stack->pushBool(SUCCEEDED(addSprite(SpriteFile)));
return S_OK;
@@ -460,7 +460,7 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RemoveSprite") == 0) {
stack->correctParams(1);
- const char *SpriteFile = stack->pop()->GetString();
+ const char *SpriteFile = stack->pop()->getString();
stack->pushBool(SUCCEEDED(removeSprite(SpriteFile)));
return S_OK;
@@ -471,7 +471,7 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Start") == 0) {
stack->correctParams(1);
- _overheadTime = stack->pop()->GetInt();
+ _overheadTime = stack->pop()->getInt();
stack->pushBool(SUCCEEDED(start()));
return S_OK;
@@ -521,9 +521,9 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AddGlobalForce") == 0) {
stack->correctParams(3);
- const char *forceName = stack->pop()->GetString();
- float Angle = stack->pop()->GetFloat();
- float Strength = stack->pop()->GetFloat();
+ const char *forceName = stack->pop()->getString();
+ float Angle = stack->pop()->getFloat();
+ float Strength = stack->pop()->getFloat();
stack->pushBool(SUCCEEDED(addForce(forceName, CPartForce::FORCE_GLOBAL, 0, 0, Angle, Strength)));
@@ -535,11 +535,11 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AddPointForce") == 0) {
stack->correctParams(5);
- const char *forceName = stack->pop()->GetString();
- int PosX = stack->pop()->GetInt();
- int PosY = stack->pop()->GetInt();
- float Angle = stack->pop()->GetFloat();
- float Strength = stack->pop()->GetFloat();
+ const char *forceName = stack->pop()->getString();
+ int PosX = stack->pop()->getInt();
+ int PosY = stack->pop()->getInt();
+ float Angle = stack->pop()->getFloat();
+ float Strength = stack->pop()->getFloat();
stack->pushBool(SUCCEEDED(addForce(forceName, CPartForce::FORCE_GLOBAL, PosX, PosY, Angle, Strength)));
@@ -551,7 +551,7 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RemoveForce") == 0) {
stack->correctParams(1);
- const char *forceName = stack->pop()->GetString();
+ const char *forceName = stack->pop()->getString();
stack->pushBool(SUCCEEDED(removeForce(forceName)));
@@ -563,41 +563,41 @@ HRESULT CPartEmitter::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
CScValue *CPartEmitter::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("particle-emitter");
+ _scValue->setString("particle-emitter");
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// X
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "X") == 0) {
- _scValue->SetInt(_posX);
+ _scValue->setInt(_posX);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Y
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Y") == 0) {
- _scValue->SetInt(_posY);
+ _scValue->setInt(_posY);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Width
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Width") == 0) {
- _scValue->SetInt(_width);
+ _scValue->setInt(_width);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Height
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Height") == 0) {
- _scValue->SetInt(_height);
+ _scValue->setInt(_height);
return _scValue;
}
@@ -605,21 +605,21 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// Scale1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale1") == 0) {
- _scValue->SetFloat(_scale1);
+ _scValue->setFloat(_scale1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Scale2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale2") == 0) {
- _scValue->SetFloat(_scale2);
+ _scValue->setFloat(_scale2);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// ScaleZBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScaleZBased") == 0) {
- _scValue->SetBool(_scaleZBased);
+ _scValue->setBool(_scaleZBased);
return _scValue;
}
@@ -627,21 +627,21 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// Velocity1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Velocity1") == 0) {
- _scValue->SetFloat(_velocity1);
+ _scValue->setFloat(_velocity1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Velocity2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Velocity2") == 0) {
- _scValue->SetFloat(_velocity2);
+ _scValue->setFloat(_velocity2);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// VelocityZBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "VelocityZBased") == 0) {
- _scValue->SetBool(_velocityZBased);
+ _scValue->setBool(_velocityZBased);
return _scValue;
}
@@ -649,21 +649,21 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// LifeTime1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LifeTime1") == 0) {
- _scValue->SetInt(_lifeTime1);
+ _scValue->setInt(_lifeTime1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// LifeTime2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LifeTime2") == 0) {
- _scValue->SetInt(_lifeTime2);
+ _scValue->setInt(_lifeTime2);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// LifeTimeZBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LifeTimeZBased") == 0) {
- _scValue->SetBool(_lifeTimeZBased);
+ _scValue->setBool(_lifeTimeZBased);
return _scValue;
}
@@ -671,14 +671,14 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// Angle1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Angle1") == 0) {
- _scValue->SetInt(_angle1);
+ _scValue->setInt(_angle1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Angle2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Angle2") == 0) {
- _scValue->SetInt(_angle2);
+ _scValue->setInt(_angle2);
return _scValue;
}
@@ -686,14 +686,14 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// AngVelocity1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AngVelocity1") == 0) {
- _scValue->SetFloat(_angVelocity1);
+ _scValue->setFloat(_angVelocity1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// AngVelocity2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AngVelocity2") == 0) {
- _scValue->SetFloat(_angVelocity2);
+ _scValue->setFloat(_angVelocity2);
return _scValue;
}
@@ -701,14 +701,14 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// Rotation1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotation1") == 0) {
- _scValue->SetFloat(_rotation1);
+ _scValue->setFloat(_rotation1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Rotation2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotation2") == 0) {
- _scValue->SetFloat(_rotation2);
+ _scValue->setFloat(_rotation2);
return _scValue;
}
@@ -716,21 +716,21 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// Alpha1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Alpha1") == 0) {
- _scValue->SetInt(_alpha1);
+ _scValue->setInt(_alpha1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Alpha2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Alpha2") == 0) {
- _scValue->SetInt(_alpha2);
+ _scValue->setInt(_alpha2);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// AlphaTimeBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AlphaTimeBased") == 0) {
- _scValue->SetBool(_alphaTimeBased);
+ _scValue->setBool(_alphaTimeBased);
return _scValue;
}
@@ -738,7 +738,7 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// MaxParticles
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MaxParticles") == 0) {
- _scValue->SetInt(_maxParticles);
+ _scValue->setInt(_maxParticles);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
@@ -749,7 +749,7 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
for (int i = 0; i < _particles.GetSize(); i++) {
if (_particles[i] && !_particles[i]->_isDead) NumAlive++;
}
- _scValue->SetInt(NumAlive);
+ _scValue->setInt(NumAlive);
return _scValue;
}
@@ -757,21 +757,21 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// GenerationInterval
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GenerationInterval") == 0) {
- _scValue->SetInt(_genInterval);
+ _scValue->setInt(_genInterval);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// GenerationAmount
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GenerationAmount") == 0) {
- _scValue->SetInt(_genAmount);
+ _scValue->setInt(_genAmount);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// MaxBatches
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MaxBatches") == 0) {
- _scValue->SetInt(_maxBatches);
+ _scValue->setInt(_maxBatches);
return _scValue;
}
@@ -779,14 +779,14 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// FadeInTime
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeInTime") == 0) {
- _scValue->SetInt(_fadeInTime);
+ _scValue->setInt(_fadeInTime);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// FadeOutTime
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeOutTime") == 0) {
- _scValue->SetInt(_fadeOutTime);
+ _scValue->setInt(_fadeOutTime);
return _scValue;
}
@@ -794,21 +794,21 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// GrowthRate1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GrowthRate1") == 0) {
- _scValue->SetFloat(_growthRate1);
+ _scValue->setFloat(_growthRate1);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// GrowthRate2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GrowthRate2") == 0) {
- _scValue->SetFloat(_growthRate2);
+ _scValue->setFloat(_growthRate2);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// ExponentialGrowth
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ExponentialGrowth") == 0) {
- _scValue->SetBool(_exponentialGrowth);
+ _scValue->setBool(_exponentialGrowth);
return _scValue;
}
@@ -816,7 +816,7 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// UseRegion
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "UseRegion") == 0) {
- _scValue->SetBool(_useRegion);
+ _scValue->setBool(_useRegion);
return _scValue;
}
@@ -824,8 +824,8 @@ CScValue *CPartEmitter::scGetProperty(const char *name) {
// EmitEvent
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "EmitEvent") == 0) {
- if (!_emitEvent) _scValue->SetNULL();
- else _scValue->SetString(_emitEvent);
+ if (!_emitEvent) _scValue->setNULL();
+ else _scValue->setString(_emitEvent);
return _scValue;
}
@@ -839,28 +839,28 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// X
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "X") == 0) {
- _posX = value->GetInt();
+ _posX = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Y
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Y") == 0) {
- _posY = value->GetInt();
+ _posY = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Width
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Width") == 0) {
- _width = value->GetInt();
+ _width = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Height
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Height") == 0) {
- _height = value->GetInt();
+ _height = value->getInt();
return S_OK;
}
@@ -868,21 +868,21 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// Scale1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale1") == 0) {
- _scale1 = value->GetFloat();
+ _scale1 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Scale2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Scale2") == 0) {
- _scale2 = value->GetFloat();
+ _scale2 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// ScaleZBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ScaleZBased") == 0) {
- _scaleZBased = value->GetBool();
+ _scaleZBased = value->getBool();
return S_OK;
}
@@ -890,21 +890,21 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// Velocity1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Velocity1") == 0) {
- _velocity1 = value->GetFloat();
+ _velocity1 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Velocity2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Velocity2") == 0) {
- _velocity2 = value->GetFloat();
+ _velocity2 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// VelocityZBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "VelocityZBased") == 0) {
- _velocityZBased = value->GetBool();
+ _velocityZBased = value->getBool();
return S_OK;
}
@@ -912,21 +912,21 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// LifeTime1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LifeTime1") == 0) {
- _lifeTime1 = value->GetInt();
+ _lifeTime1 = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// LifeTime2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LifeTime2") == 0) {
- _lifeTime2 = value->GetInt();
+ _lifeTime2 = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// LifeTimeZBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "LifeTimeZBased") == 0) {
- _lifeTimeZBased = value->GetBool();
+ _lifeTimeZBased = value->getBool();
return S_OK;
}
@@ -934,14 +934,14 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// Angle1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Angle1") == 0) {
- _angle1 = value->GetInt();
+ _angle1 = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Angle2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Angle2") == 0) {
- _angle2 = value->GetInt();
+ _angle2 = value->getInt();
return S_OK;
}
@@ -949,14 +949,14 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// AngVelocity1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AngVelocity1") == 0) {
- _angVelocity1 = value->GetFloat();
+ _angVelocity1 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// AngVelocity2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AngVelocity2") == 0) {
- _angVelocity2 = value->GetFloat();
+ _angVelocity2 = value->getFloat();
return S_OK;
}
@@ -964,14 +964,14 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// Rotation1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotation1") == 0) {
- _rotation1 = value->GetFloat();
+ _rotation1 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Rotation2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Rotation2") == 0) {
- _rotation2 = value->GetFloat();
+ _rotation2 = value->getFloat();
return S_OK;
}
@@ -979,7 +979,7 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// Alpha1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Alpha1") == 0) {
- _alpha1 = value->GetInt();
+ _alpha1 = value->getInt();
if (_alpha1 < 0) _alpha1 = 0;
if (_alpha1 > 255) _alpha1 = 255;
return S_OK;
@@ -988,7 +988,7 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// Alpha2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Alpha2") == 0) {
- _alpha2 = value->GetInt();
+ _alpha2 = value->getInt();
if (_alpha2 < 0) _alpha2 = 0;
if (_alpha2 > 255) _alpha2 = 255;
return S_OK;
@@ -997,7 +997,7 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// AlphaTimeBased
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AlphaTimeBased") == 0) {
- _alphaTimeBased = value->GetBool();
+ _alphaTimeBased = value->getBool();
return S_OK;
}
@@ -1005,7 +1005,7 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// MaxParticles
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MaxParticles") == 0) {
- _maxParticles = value->GetInt();
+ _maxParticles = value->getInt();
return S_OK;
}
@@ -1013,21 +1013,21 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// GenerationInterval
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GenerationInterval") == 0) {
- _genInterval = value->GetInt();
+ _genInterval = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// GenerationAmount
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GenerationAmount") == 0) {
- _genAmount = value->GetInt();
+ _genAmount = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// MaxBatches
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MaxBatches") == 0) {
- _maxBatches = value->GetInt();
+ _maxBatches = value->getInt();
return S_OK;
}
@@ -1035,14 +1035,14 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// FadeInTime
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeInTime") == 0) {
- _fadeInTime = value->GetInt();
+ _fadeInTime = value->getInt();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// FadeOutTime
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeOutTime") == 0) {
- _fadeOutTime = value->GetInt();
+ _fadeOutTime = value->getInt();
return S_OK;
}
@@ -1050,21 +1050,21 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// GrowthRate1
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GrowthRate1") == 0) {
- _growthRate1 = value->GetFloat();
+ _growthRate1 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// GrowthRate2
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GrowthRate2") == 0) {
- _growthRate2 = value->GetFloat();
+ _growthRate2 = value->getFloat();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// ExponentialGrowth
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ExponentialGrowth") == 0) {
- _exponentialGrowth = value->GetBool();
+ _exponentialGrowth = value->getBool();
return S_OK;
}
@@ -1072,7 +1072,7 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
// UseRegion
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "UseRegion") == 0) {
- _useRegion = value->GetBool();
+ _useRegion = value->getBool();
return S_OK;
}
@@ -1082,7 +1082,7 @@ HRESULT CPartEmitter::scSetProperty(const char *name, CScValue *value) {
else if (strcmp(name, "EmitEvent") == 0) {
delete[] _emitEvent;
_emitEvent = NULL;
- if (!value->IsNULL()) CBUtils::SetString(&_emitEvent, value->GetString());
+ if (!value->isNULL()) CBUtils::SetString(&_emitEvent, value->getString());
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXArray.cpp b/engines/wintermute/Base/scriptables/SXArray.cpp
index c22dd9e4b5..72c848f747 100644
--- a/engines/wintermute/Base/scriptables/SXArray.cpp
+++ b/engines/wintermute/Base/scriptables/SXArray.cpp
@@ -45,15 +45,15 @@ CSXArray::CSXArray(CBGame *inGame, CScStack *stack): CBScriptable(inGame) {
_length = 0;
_values = new CScValue(Game);
- int NumParams = stack->pop()->GetInt(0);
+ int NumParams = stack->pop()->getInt(0);
- if (NumParams == 1) _length = stack->pop()->GetInt(0);
+ if (NumParams == 1) _length = stack->pop()->getInt(0);
else if (NumParams > 1) {
_length = NumParams;
char ParamName[20];
for (int i = 0; i < NumParams; i++) {
sprintf(ParamName, "%d", i);
- _values->SetProp(ParamName, stack->pop());
+ _values->setProp(ParamName, stack->pop());
}
}
}
@@ -79,10 +79,10 @@ const char *CSXArray::scToString() {
char PropName[20];
for (int i = 0; i < _length; i++) {
sprintf(PropName, "%d", i);
- CScValue *val = _values->GetProp(PropName);
+ CScValue *val = _values->getProp(PropName);
if (val) {
- if (strlen(Dummy) + strlen(val->GetString()) < 32768) {
- strcat(Dummy, val->GetString());
+ if (strlen(Dummy) + strlen(val->getString()) < 32768) {
+ strcat(Dummy, val->getString());
}
}
@@ -98,13 +98,13 @@ HRESULT CSXArray::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
// Push
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Push") == 0) {
- int NumParams = stack->pop()->GetInt(0);
+ int NumParams = stack->pop()->getInt(0);
char ParamName[20];
for (int i = 0; i < NumParams; i++) {
_length++;
sprintf(ParamName, "%d", _length - 1);
- _values->SetProp(ParamName, stack->pop(), true);
+ _values->setProp(ParamName, stack->pop(), true);
}
stack->pushInt(_length);
@@ -121,8 +121,8 @@ HRESULT CSXArray::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
if (_length > 0) {
char ParamName[20];
sprintf(ParamName, "%d", _length - 1);
- stack->push(_values->GetProp(ParamName));
- _values->DeleteProp(ParamName);
+ stack->push(_values->getProp(ParamName));
+ _values->deleteProp(ParamName);
_length--;
} else stack->pushNULL();
@@ -135,13 +135,13 @@ HRESULT CSXArray::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CSXArray::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("array");
+ _scValue->setString("array");
return _scValue;
}
@@ -149,7 +149,7 @@ CScValue *CSXArray::scGetProperty(const char *name) {
// Length
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Length") == 0) {
- _scValue->SetInt(_length);
+ _scValue->setInt(_length);
return _scValue;
}
@@ -159,7 +159,7 @@ CScValue *CSXArray::scGetProperty(const char *name) {
else {
char ParamName[20];
if (ValidNumber(name, ParamName)) {
- return _values->GetProp(ParamName);
+ return _values->getProp(ParamName);
} else return _scValue;
}
}
@@ -172,13 +172,13 @@ HRESULT CSXArray::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Length") == 0) {
int OrigLength = _length;
- _length = MAX(value->GetInt(0), 0);
+ _length = MAX(value->getInt(0), 0);
char PropName[20];
if (_length < OrigLength) {
for (int i = _length; i < OrigLength; i++) {
sprintf(PropName, "%d", i);
- _values->DeleteProp(PropName);
+ _values->deleteProp(PropName);
}
}
return S_OK;
@@ -192,7 +192,7 @@ HRESULT CSXArray::scSetProperty(const char *name, CScValue *value) {
if (ValidNumber(name, ParamName)) {
int Index = atoi(ParamName);
if (Index >= _length) _length = Index + 1;
- return _values->SetProp(ParamName, value);
+ return _values->setProp(ParamName, value);
} else return E_FAIL;
}
}
@@ -231,7 +231,7 @@ HRESULT CSXArray::Push(CScValue *Val) {
char ParamName[20];
_length++;
sprintf(ParamName, "%d", _length - 1);
- _values->SetProp(ParamName, Val, true);
+ _values->setProp(ParamName, Val, true);
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXDate.cpp b/engines/wintermute/Base/scriptables/SXDate.cpp
index 61a646df43..e108c03a6e 100644
--- a/engines/wintermute/Base/scriptables/SXDate.cpp
+++ b/engines/wintermute/Base/scriptables/SXDate.cpp
@@ -45,14 +45,14 @@ CSXDate::CSXDate(CBGame *inGame, CScStack *stack): CBScriptable(inGame) {
memset(&_tm, 0, sizeof(_tm));
CScValue *valYear = stack->pop();
- _tm.tm_year = valYear->GetInt() - 1900;
- _tm.tm_mon = stack->pop()->GetInt() - 1;
- _tm.tm_mday = stack->pop()->GetInt();
- _tm.tm_hour = stack->pop()->GetInt();
- _tm.tm_min = stack->pop()->GetInt();
- _tm.tm_sec = stack->pop()->GetInt();
-
- if (valYear->IsNULL()) {
+ _tm.tm_year = valYear->getInt() - 1900;
+ _tm.tm_mon = stack->pop()->getInt() - 1;
+ _tm.tm_mday = stack->pop()->getInt();
+ _tm.tm_hour = stack->pop()->getInt();
+ _tm.tm_min = stack->pop()->getInt();
+ _tm.tm_sec = stack->pop()->getInt();
+
+ if (valYear->isNULL()) {
g_system->getTimeAndDate(_tm);
}
}
@@ -140,7 +140,7 @@ HRESULT CSXDate::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetYear") == 0) {
stack->correctParams(1);
- _tm.tm_year = stack->pop()->GetInt() - 1900;
+ _tm.tm_year = stack->pop()->getInt() - 1900;
stack->pushNULL();
return S_OK;
}
@@ -149,7 +149,7 @@ HRESULT CSXDate::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetMonth") == 0) {
stack->correctParams(1);
- _tm.tm_mon = stack->pop()->GetInt() - 1;
+ _tm.tm_mon = stack->pop()->getInt() - 1;
stack->pushNULL();
return S_OK;
}
@@ -158,7 +158,7 @@ HRESULT CSXDate::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetDate") == 0) {
stack->correctParams(1);
- _tm.tm_mday = stack->pop()->GetInt();
+ _tm.tm_mday = stack->pop()->getInt();
stack->pushNULL();
return S_OK;
}
@@ -167,7 +167,7 @@ HRESULT CSXDate::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetHours") == 0) {
stack->correctParams(1);
- _tm.tm_hour = stack->pop()->GetInt();
+ _tm.tm_hour = stack->pop()->getInt();
stack->pushNULL();
return S_OK;
}
@@ -176,7 +176,7 @@ HRESULT CSXDate::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetMinutes") == 0) {
stack->correctParams(1);
- _tm.tm_min = stack->pop()->GetInt();
+ _tm.tm_min = stack->pop()->getInt();
stack->pushNULL();
return S_OK;
}
@@ -185,7 +185,7 @@ HRESULT CSXDate::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetSeconds") == 0) {
stack->correctParams(1);
- _tm.tm_sec = stack->pop()->GetInt();
+ _tm.tm_sec = stack->pop()->getInt();
stack->pushNULL();
return S_OK;
}
@@ -208,13 +208,13 @@ HRESULT CSXDate::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CSXDate::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("date");
+ _scValue->setString("date");
return _scValue;
}
@@ -229,7 +229,7 @@ HRESULT CSXDate::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if(strcmp(name, "Name")==0){
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
diff --git a/engines/wintermute/Base/scriptables/SXFile.cpp b/engines/wintermute/Base/scriptables/SXFile.cpp
index fc2fca1991..6738df0301 100644
--- a/engines/wintermute/Base/scriptables/SXFile.cpp
+++ b/engines/wintermute/Base/scriptables/SXFile.cpp
@@ -60,7 +60,7 @@ CSXFile::CSXFile(CBGame *inGame, CScStack *stack): CBScriptable(inGame) {
CScValue *Val = stack->pop();
_filename = NULL;
- if (!Val->IsNULL()) CBUtils::SetString(&_filename, Val->GetString());
+ if (!Val->isNULL()) CBUtils::SetString(&_filename, Val->getString());
_readFile = NULL;
_writeFile = NULL;
@@ -111,7 +111,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SetFilename") == 0) {
stack->correctParams(1);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
cleanup();
CBUtils::SetString(&_filename, Filename);
stack->pushNULL();
@@ -124,7 +124,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
else if (strcmp(name, "OpenAsText") == 0 || strcmp(name, "OpenAsBinary") == 0) {
stack->correctParams(1);
Close();
- _mode = stack->pop()->GetInt(1);
+ _mode = stack->pop()->getInt(1);
if (_mode < 1 || _mode > 3) {
script->RuntimeError("File.%s: invalid access mode. Setting read mode.", name);
_mode = 1;
@@ -175,7 +175,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
script->RuntimeError("File.%s: File is not open", name);
stack->pushBool(false);
} else {
- int Pos = stack->pop()->GetInt();
+ int Pos = stack->pop()->getInt();
stack->pushBool(SetPos(Pos));
}
return S_OK;
@@ -196,8 +196,8 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Copy") == 0) {
stack->correctParams(2);
- const char *Dest = stack->pop()->GetString();
- bool Overwrite = stack->pop()->GetBool(true);
+ const char *Dest = stack->pop()->getString();
+ bool Overwrite = stack->pop()->getBool(true);
Close();
stack->pushBool(CBPlatform::CopyFile(_filename, Dest, !Overwrite) != false);
@@ -258,7 +258,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ReadText") == 0) {
stack->correctParams(1);
- int TextLen = stack->pop()->GetInt();
+ int TextLen = stack->pop()->getInt();
if (!_textMode || !_readFile) {
script->RuntimeError("File.%s: File must be open in text mode.", name);
@@ -305,7 +305,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteLine") == 0 || strcmp(name, "WriteText") == 0) {
stack->correctParams(1);
- const char *Line = stack->pop()->GetString();
+ const char *Line = stack->pop()->getString();
if (!_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in text mode.", name);
stack->pushBool(false);
@@ -454,7 +454,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteBool") == 0) {
stack->correctParams(1);
- bool Val = stack->pop()->GetBool();
+ bool Val = stack->pop()->getBool();
if (_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in binary mode.", name);
@@ -472,7 +472,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteByte") == 0) {
stack->correctParams(1);
- byte Val = stack->pop()->GetInt();
+ byte Val = stack->pop()->getInt();
if (_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in binary mode.", name);
@@ -490,7 +490,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteShort") == 0) {
stack->correctParams(1);
- short Val = stack->pop()->GetInt();
+ short Val = stack->pop()->getInt();
if (_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in binary mode.", name);
@@ -508,7 +508,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteInt") == 0 || strcmp(name, "WriteLong") == 0) {
stack->correctParams(1);
- int Val = stack->pop()->GetInt();
+ int Val = stack->pop()->getInt();
if (_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in binary mode.", name);
@@ -526,7 +526,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteFloat") == 0) {
stack->correctParams(1);
- float Val = stack->pop()->GetFloat();
+ float Val = stack->pop()->getFloat();
if (_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in binary mode.", name);
@@ -544,7 +544,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteDouble") == 0) {
stack->correctParams(1);
- double Val = stack->pop()->GetFloat();
+ double Val = stack->pop()->getFloat();
if (_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in binary mode.", name);
@@ -562,7 +562,7 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "WriteString") == 0) {
stack->correctParams(1);
- const char *Val = stack->pop()->GetString();
+ const char *Val = stack->pop()->getString();
if (_textMode || !_writeFile) {
script->RuntimeError("File.%s: File must be open for writing in binary mode.", name);
@@ -586,13 +586,13 @@ HRESULT CSXFile::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CSXFile::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("file");
+ _scValue->setString("file");
return _scValue;
}
@@ -600,7 +600,7 @@ CScValue *CSXFile::scGetProperty(const char *name) {
// Filename (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Filename") == 0) {
- _scValue->SetString(_filename);
+ _scValue->setString(_filename);
return _scValue;
}
@@ -608,7 +608,7 @@ CScValue *CSXFile::scGetProperty(const char *name) {
// Position (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Position") == 0) {
- _scValue->SetInt(GetPos());
+ _scValue->setInt(GetPos());
return _scValue;
}
@@ -616,7 +616,7 @@ CScValue *CSXFile::scGetProperty(const char *name) {
// Length (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Length") == 0) {
- _scValue->SetInt(GetLength());
+ _scValue->setInt(GetLength());
return _scValue;
}
@@ -624,7 +624,7 @@ CScValue *CSXFile::scGetProperty(const char *name) {
// TextMode (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TextMode") == 0) {
- _scValue->SetBool(_textMode);
+ _scValue->setBool(_textMode);
return _scValue;
}
@@ -632,7 +632,7 @@ CScValue *CSXFile::scGetProperty(const char *name) {
// AccessMode (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "AccessMode") == 0) {
- _scValue->SetInt(_mode);
+ _scValue->setInt(_mode);
return _scValue;
}
@@ -648,7 +648,7 @@ HRESULT CSXFile::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
if(strcmp(name, "Length")==0){
int OrigLength = _length;
- _length = max(value->GetInt(0), 0);
+ _length = max(value->getInt(0), 0);
char PropName[20];
if(_length < OrigLength){
diff --git a/engines/wintermute/Base/scriptables/SXMath.cpp b/engines/wintermute/Base/scriptables/SXMath.cpp
index 110330d4ef..92e6823534 100644
--- a/engines/wintermute/Base/scriptables/SXMath.cpp
+++ b/engines/wintermute/Base/scriptables/SXMath.cpp
@@ -64,7 +64,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Abs") == 0) {
stack->correctParams(1);
- stack->pushFloat(fabs(stack->pop()->GetFloat()));
+ stack->pushFloat(fabs(stack->pop()->getFloat()));
return S_OK;
}
@@ -73,7 +73,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Acos") == 0) {
stack->correctParams(1);
- stack->pushFloat(acos(stack->pop()->GetFloat()));
+ stack->pushFloat(acos(stack->pop()->getFloat()));
return S_OK;
}
@@ -82,7 +82,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Asin") == 0) {
stack->correctParams(1);
- stack->pushFloat(asin(stack->pop()->GetFloat()));
+ stack->pushFloat(asin(stack->pop()->getFloat()));
return S_OK;
}
@@ -91,7 +91,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Atan") == 0) {
stack->correctParams(1);
- stack->pushFloat(atan(stack->pop()->GetFloat()));
+ stack->pushFloat(atan(stack->pop()->getFloat()));
return S_OK;
}
@@ -100,8 +100,8 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Atan2") == 0) {
stack->correctParams(2);
- double y = stack->pop()->GetFloat();
- double x = stack->pop()->GetFloat();
+ double y = stack->pop()->getFloat();
+ double x = stack->pop()->getFloat();
stack->pushFloat(atan2(y, x));
return S_OK;
}
@@ -111,7 +111,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Ceil") == 0) {
stack->correctParams(1);
- stack->pushFloat(ceil(stack->pop()->GetFloat()));
+ stack->pushFloat(ceil(stack->pop()->getFloat()));
return S_OK;
}
@@ -120,7 +120,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Cos") == 0) {
stack->correctParams(1);
- stack->pushFloat(cos(DegreeToRadian(stack->pop()->GetFloat())));
+ stack->pushFloat(cos(DegreeToRadian(stack->pop()->getFloat())));
return S_OK;
}
@@ -129,7 +129,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Cosh") == 0) {
stack->correctParams(1);
- stack->pushFloat(cosh(DegreeToRadian(stack->pop()->GetFloat())));
+ stack->pushFloat(cosh(DegreeToRadian(stack->pop()->getFloat())));
return S_OK;
}
@@ -138,7 +138,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Exp") == 0) {
stack->correctParams(1);
- stack->pushFloat(exp(stack->pop()->GetFloat()));
+ stack->pushFloat(exp(stack->pop()->getFloat()));
return S_OK;
}
@@ -147,7 +147,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Floor") == 0) {
stack->correctParams(1);
- stack->pushFloat(floor(stack->pop()->GetFloat()));
+ stack->pushFloat(floor(stack->pop()->getFloat()));
return S_OK;
}
@@ -156,7 +156,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Log") == 0) {
stack->correctParams(1);
- stack->pushFloat(log(stack->pop()->GetFloat()));
+ stack->pushFloat(log(stack->pop()->getFloat()));
return S_OK;
}
@@ -165,7 +165,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Log10") == 0) {
stack->correctParams(1);
- stack->pushFloat(log10(stack->pop()->GetFloat()));
+ stack->pushFloat(log10(stack->pop()->getFloat()));
return S_OK;
}
@@ -174,8 +174,8 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Pow") == 0) {
stack->correctParams(2);
- double x = stack->pop()->GetFloat();
- double y = stack->pop()->GetFloat();
+ double x = stack->pop()->getFloat();
+ double y = stack->pop()->getFloat();
stack->pushFloat(pow(x, y));
return S_OK;
@@ -186,7 +186,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Sin") == 0) {
stack->correctParams(1);
- stack->pushFloat(sin(DegreeToRadian(stack->pop()->GetFloat())));
+ stack->pushFloat(sin(DegreeToRadian(stack->pop()->getFloat())));
return S_OK;
}
@@ -195,7 +195,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Sinh") == 0) {
stack->correctParams(1);
- stack->pushFloat(sinh(DegreeToRadian(stack->pop()->GetFloat())));
+ stack->pushFloat(sinh(DegreeToRadian(stack->pop()->getFloat())));
return S_OK;
}
@@ -204,7 +204,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Tan") == 0) {
stack->correctParams(1);
- stack->pushFloat(tan(DegreeToRadian(stack->pop()->GetFloat())));
+ stack->pushFloat(tan(DegreeToRadian(stack->pop()->getFloat())));
return S_OK;
}
@@ -213,7 +213,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Tanh") == 0) {
stack->correctParams(1);
- stack->pushFloat(tanh(DegreeToRadian(stack->pop()->GetFloat())));
+ stack->pushFloat(tanh(DegreeToRadian(stack->pop()->getFloat())));
return S_OK;
}
@@ -222,7 +222,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Sqrt") == 0) {
stack->correctParams(1);
- stack->pushFloat(sqrt(stack->pop()->GetFloat()));
+ stack->pushFloat(sqrt(stack->pop()->getFloat()));
return S_OK;
}
@@ -231,7 +231,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "DegToRad") == 0) {
stack->correctParams(1);
- stack->pushFloat(DegreeToRadian(stack->pop()->GetFloat()));
+ stack->pushFloat(DegreeToRadian(stack->pop()->getFloat()));
return S_OK;
}
@@ -240,7 +240,7 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "RadToDeg") == 0) {
stack->correctParams(1);
- stack->pushFloat(RadianToDegree(stack->pop()->GetFloat()));
+ stack->pushFloat(RadianToDegree(stack->pop()->getFloat()));
return S_OK;
}
@@ -250,13 +250,13 @@ HRESULT CSXMath::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CSXMath::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("math");
+ _scValue->setString("math");
return _scValue;
}
@@ -264,7 +264,7 @@ CScValue *CSXMath::scGetProperty(const char *name) {
// PI
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PI") == 0) {
- _scValue->SetFloat(PI);
+ _scValue->setFloat(PI);
return _scValue;
}
diff --git a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp
index 7dcb6ea1a7..0afdf08450 100644
--- a/engines/wintermute/Base/scriptables/SXMemBuffer.cpp
+++ b/engines/wintermute/Base/scriptables/SXMemBuffer.cpp
@@ -47,7 +47,7 @@ CSXMemBuffer::CSXMemBuffer(CBGame *inGame, CScStack *stack): CBScriptable(inGame
_buffer = NULL;
_size = 0;
- int NewSize = stack->pop()->GetInt();
+ int NewSize = stack->pop()->getInt();
Resize(MAX(0, NewSize));
}
@@ -128,7 +128,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SetSize") == 0) {
stack->correctParams(1);
- int NewSize = stack->pop()->GetInt();
+ int NewSize = stack->pop()->getInt();
NewSize = MAX(0, NewSize);
if (SUCCEEDED(Resize(NewSize))) stack->pushBool(true);
else stack->pushBool(false);
@@ -141,7 +141,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetBool") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(bool))) stack->pushNULL();
else stack->pushBool(*(bool *)((byte *)_buffer + Start));
@@ -153,7 +153,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetByte") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(byte))) stack->pushNULL();
else stack->pushInt(*(byte *)((byte *)_buffer + Start));
@@ -165,7 +165,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetShort") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(short))) stack->pushNULL();
else stack->pushInt(65536 + * (short *)((byte *)_buffer + Start));
@@ -177,7 +177,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetInt") == 0 || strcmp(name, "GetLong") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(int))) stack->pushNULL();
else stack->pushInt(*(int *)((byte *)_buffer + Start));
@@ -189,7 +189,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetFloat") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(float))) stack->pushNULL();
else stack->pushFloat(*(float *)((byte *)_buffer + Start));
@@ -201,7 +201,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetDouble") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(double))) stack->pushNULL();
else stack->pushFloat(*(double *)((byte *)_buffer + Start));
@@ -213,8 +213,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetString") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- int Length = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
+ int Length = stack->pop()->getInt();
// find end of string
if (Length == 0 && Start >= 0 && Start < _size) {
@@ -242,7 +242,7 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetPointer") == 0) {
stack->correctParams(1);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(void *))) stack->pushNULL();
else {
void *Pointer = *(void **)((byte *)_buffer + Start);
@@ -257,8 +257,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetBool") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- bool Val = stack->pop()->GetBool();
+ int Start = stack->pop()->getInt();
+ bool Val = stack->pop()->getBool();
if (!CheckBounds(script, Start, sizeof(bool))) stack->pushBool(false);
else {
@@ -273,8 +273,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetByte") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- byte Val = (byte)stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
+ byte Val = (byte)stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(byte))) stack->pushBool(false);
else {
@@ -289,8 +289,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetShort") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- short Val = (short)stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
+ short Val = (short)stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(short))) stack->pushBool(false);
else {
@@ -305,8 +305,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetInt") == 0 || strcmp(name, "SetLong") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- int Val = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
+ int Val = stack->pop()->getInt();
if (!CheckBounds(script, Start, sizeof(int))) stack->pushBool(false);
else {
@@ -321,8 +321,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetFloat") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- float Val = (float)stack->pop()->GetFloat();
+ int Start = stack->pop()->getInt();
+ float Val = (float)stack->pop()->getFloat();
if (!CheckBounds(script, Start, sizeof(float))) stack->pushBool(false);
else {
@@ -337,8 +337,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetDouble") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- double Val = stack->pop()->GetFloat();
+ int Start = stack->pop()->getInt();
+ double Val = stack->pop()->getFloat();
if (!CheckBounds(script, Start, sizeof(double))) stack->pushBool(false);
else {
@@ -353,8 +353,8 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetString") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
- const char *Val = stack->pop()->GetString();
+ int Start = stack->pop()->getInt();
+ const char *Val = stack->pop()->getString();
if (!CheckBounds(script, Start, strlen(Val) + 1)) stack->pushBool(false);
else {
@@ -369,13 +369,13 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SetPointer") == 0) {
stack->correctParams(2);
- int Start = stack->pop()->GetInt();
+ int Start = stack->pop()->getInt();
/* CScValue *Val = */ stack->pop();
if (!CheckBounds(script, Start, sizeof(void *))) stack->pushBool(false);
else {
/*
- int Pointer = (int)Val->GetMemBuffer();
+ int Pointer = (int)Val->getMemBuffer();
memcpy((byte *)_buffer+Start, &Pointer, sizeof(void*));
stack->pushBool(true);
*/
@@ -408,13 +408,13 @@ HRESULT CSXMemBuffer::scCallMethod(CScScript *script, CScStack *stack, CScStack
//////////////////////////////////////////////////////////////////////////
CScValue *CSXMemBuffer::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("membuffer");
+ _scValue->setString("membuffer");
return _scValue;
}
@@ -422,7 +422,7 @@ CScValue *CSXMemBuffer::scGetProperty(const char *name) {
// Size (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Size") == 0) {
- _scValue->SetInt(_size);
+ _scValue->setInt(_size);
return _scValue;
}
@@ -438,7 +438,7 @@ HRESULT CSXMemBuffer::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
if(strcmp(name, "Length")==0){
int OrigLength = _length;
- _length = max(value->GetInt(0), 0);
+ _length = max(value->getInt(0), 0);
char PropName[20];
if(_length < OrigLength){
diff --git a/engines/wintermute/Base/scriptables/SXStore.cpp b/engines/wintermute/Base/scriptables/SXStore.cpp
index a1d41c2db6..6d0461df54 100644
--- a/engines/wintermute/Base/scriptables/SXStore.cpp
+++ b/engines/wintermute/Base/scriptables/SXStore.cpp
@@ -108,7 +108,7 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ValidateProducts") == 0) {
stack->correctParams(1);
- const char *prodIdList = stack->pop()->GetString();
+ const char *prodIdList = stack->pop()->getString();
_lastProductRequestOwner = script->_owner;
ValidateProducts(prodIdList);
stack->pushNULL();
@@ -119,14 +119,14 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetValidProduct") == 0) {
stack->correctParams(1);
- int index = stack->pop()->GetInt();
+ int index = stack->pop()->getInt();
if (index >= 0 && index < _validProducts.GetSize()) {
CScValue *prod = stack->getPushValue();
if (prod) {
- prod->SetProperty("Id", _validProducts[index]->GetId());
- prod->SetProperty("Name", _validProducts[index]->GetName());
- prod->SetProperty("Description", _validProducts[index]->GetDesc());
- prod->SetProperty("Price", _validProducts[index]->GetPrice());
+ prod->setProperty("Id", _validProducts[index]->GetId());
+ prod->setProperty("Name", _validProducts[index]->GetName());
+ prod->setProperty("Description", _validProducts[index]->GetDesc());
+ prod->setProperty("Price", _validProducts[index]->GetPrice());
}
} else
stack->pushNULL();
@@ -138,7 +138,7 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetInvalidProduct") == 0) {
stack->correctParams(1);
- int index = stack->pop()->GetInt();
+ int index = stack->pop()->getInt();
if (index >= 0 && index < _invalidProducts.size())
stack->pushString(_invalidProducts[index].c_str());
else
@@ -151,13 +151,13 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "GetTransaction") == 0) {
stack->correctParams(1);
- int index = stack->pop()->GetInt();
+ int index = stack->pop()->getInt();
if (index >= 0 && index < _transactions.GetSize()) {
CScValue *trans = stack->getPushValue();
if (trans) {
- trans->SetProperty("Id", _transactions[index]->GetId());
- trans->SetProperty("ProductId", _transactions[index]->GetProductId());
- trans->SetProperty("State", _transactions[index]->GetState());
+ trans->setProperty("Id", _transactions[index]->GetId());
+ trans->setProperty("ProductId", _transactions[index]->GetProductId());
+ trans->setProperty("State", _transactions[index]->GetState());
}
} else
stack->pushNULL();
@@ -169,7 +169,7 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Purchase") == 0) {
stack->correctParams(1);
- const char *prodId = stack->pop()->GetString();
+ const char *prodId = stack->pop()->getString();
stack->pushBool(Purchase(script, prodId));
return S_OK;
@@ -179,7 +179,7 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FinishTransaction") == 0) {
stack->correctParams(1);
- const char *transId = stack->pop()->GetString();
+ const char *transId = stack->pop()->getString();
stack->pushBool(FinishTransaction(script, transId));
return S_OK;
@@ -200,7 +200,7 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "UnlockProduct") == 0) {
stack->correctParams(1);
- const char *prodId = stack->pop()->GetString();
+ const char *prodId = stack->pop()->getString();
Game->_registry->WriteBool("Purchases", prodId, true);
Game->_registry->SaveValues();
@@ -215,7 +215,7 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "IsProductUnlocked") == 0) {
stack->correctParams(1);
- const char *prodId = stack->pop()->GetString();
+ const char *prodId = stack->pop()->getString();
stack->pushBool(Game->_registry->ReadBool("Purchases", prodId, false));
@@ -228,48 +228,48 @@ HRESULT CSXStore::scCallMethod(CScScript *script, CScStack *stack, CScStack *thi
//////////////////////////////////////////////////////////////////////////
CScValue *CSXStore::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("store");
+ _scValue->setString("store");
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Available (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Available") == 0) {
- _scValue->SetBool(IsAvailable());
+ _scValue->setBool(IsAvailable());
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// EventsEnabled (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "EventsEnabled") == 0) {
- _scValue->SetBool(GetEventsEnabled());
+ _scValue->setBool(GetEventsEnabled());
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// NumValidProducts (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumValidProducts") == 0) {
- _scValue->SetInt(_validProducts.GetSize());
+ _scValue->setInt(_validProducts.GetSize());
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// NumInvalidProducts (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumInvalidProducts") == 0) {
- _scValue->SetInt(_invalidProducts.size());
+ _scValue->setInt(_invalidProducts.size());
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// NumTransactions (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumTransactions") == 0) {
- _scValue->SetInt(_transactions.GetSize());
+ _scValue->setInt(_transactions.GetSize());
return _scValue;
}
diff --git a/engines/wintermute/Base/scriptables/SXString.cpp b/engines/wintermute/Base/scriptables/SXString.cpp
index 36dc257229..4f6bd5a33d 100644
--- a/engines/wintermute/Base/scriptables/SXString.cpp
+++ b/engines/wintermute/Base/scriptables/SXString.cpp
@@ -51,14 +51,14 @@ CSXString::CSXString(CBGame *inGame, CScStack *stack): CBScriptable(inGame) {
stack->correctParams(1);
CScValue *Val = stack->pop();
- if (Val->IsInt()) {
- _capacity = MAX(0, Val->GetInt());
+ if (Val->isInt()) {
+ _capacity = MAX(0, Val->getInt());
if (_capacity > 0) {
_string = new char[_capacity];
memset(_string, 0, _capacity);
}
} else {
- SetStringVal(Val->GetString());
+ SetStringVal(Val->getString());
}
if (_capacity == 0) SetStringVal("");
@@ -105,8 +105,8 @@ HRESULT CSXString::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Substring") == 0) {
stack->correctParams(2);
- int start = stack->pop()->GetInt();
- int end = stack->pop()->GetInt();
+ int start = stack->pop()->getInt();
+ int end = stack->pop()->getInt();
if (end < start) CBUtils::Swap(&start, &end);
@@ -136,17 +136,17 @@ HRESULT CSXString::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Substr") == 0) {
stack->correctParams(2);
- int start = stack->pop()->GetInt();
+ int start = stack->pop()->getInt();
CScValue *val = stack->pop();
- int len = val->GetInt();
+ int len = val->getInt();
- if (!val->IsNULL() && len <= 0) {
+ if (!val->isNULL() && len <= 0) {
stack->pushString("");
return S_OK;
}
- if (val->IsNULL()) len = strlen(_string) - start;
+ if (val->isNULL()) len = strlen(_string) - start;
// try {
WideString str;
@@ -219,8 +219,8 @@ HRESULT CSXString::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
else if (strcmp(name, "IndexOf") == 0) {
stack->correctParams(2);
- const char *strToFind = stack->pop()->GetString();
- int index = stack->pop()->GetInt();
+ const char *strToFind = stack->pop()->getString();
+ int index = stack->pop()->getInt();
WideString str;
if (Game->_textEncoding == TEXT_UTF8)
@@ -247,7 +247,7 @@ HRESULT CSXString::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
stack->correctParams(1);
CScValue *Val = stack->pop();
char Separators[MAX_PATH] = ",";
- if (!Val->IsNULL()) strcpy(Separators, Val->GetString());
+ if (!Val->isNULL()) strcpy(Separators, Val->getString());
CSXArray *Array = new CSXArray(Game);
if (!Array) {
@@ -318,13 +318,13 @@ HRESULT CSXString::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CSXString::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type (RO)
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("string");
+ _scValue->setString("string");
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
@@ -333,9 +333,9 @@ CScValue *CSXString::scGetProperty(const char *name) {
else if (strcmp(name, "Length") == 0) {
if (Game->_textEncoding == TEXT_UTF8) {
WideString wstr = StringUtil::Utf8ToWide(_string);
- _scValue->SetInt(wstr.size());
+ _scValue->setInt(wstr.size());
} else
- _scValue->SetInt(strlen(_string));
+ _scValue->setInt(strlen(_string));
return _scValue;
}
@@ -343,7 +343,7 @@ CScValue *CSXString::scGetProperty(const char *name) {
// Capacity
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Capacity") == 0) {
- _scValue->SetInt(_capacity);
+ _scValue->setInt(_capacity);
return _scValue;
}
@@ -357,7 +357,7 @@ HRESULT CSXString::scSetProperty(const char *name, CScValue *value) {
// Capacity
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Capacity") == 0) {
- int NewCap = value->GetInt();
+ int NewCap = value->getInt();
if (NewCap < strlen(_string) + 1) Game->LOG(0, "Warning: cannot lower string capacity");
else if (NewCap != _capacity) {
char *NewStr = new char[NewCap];
diff --git a/engines/wintermute/Base/scriptables/ScEngine.cpp b/engines/wintermute/Base/scriptables/ScEngine.cpp
index e840d0cd78..8aca4c9edf 100644
--- a/engines/wintermute/Base/scriptables/ScEngine.cpp
+++ b/engines/wintermute/Base/scriptables/ScEngine.cpp
@@ -105,17 +105,17 @@ CScEngine::CScEngine(CBGame *inGame): CBBase(inGame) {
// register 'Game' as global variable
- if (!_globals->PropExists("Game")) {
+ if (!_globals->propExists("Game")) {
CScValue val(Game);
- val.SetNative(Game, true);
- _globals->SetProp("Game", &val);
+ val.setNative(Game, true);
+ _globals->setProp("Game", &val);
}
// register 'Math' as global variable
- if (!_globals->PropExists("Math")) {
+ if (!_globals->propExists("Math")) {
CScValue val(Game);
- val.SetNative(Game->_mathClass, true);
- _globals->SetProp("Math", &val);
+ val.setNative(Game->_mathClass, true);
+ _globals->setProp("Math", &val);
}
// prepare script cache
@@ -250,11 +250,11 @@ CScScript *CScEngine::RunScript(const char *Filename, CBScriptHolder *Owner) {
} else {
// publish the "self" pseudo-variable
CScValue val(Game);
- if (Owner)val.SetNative(Owner, true);
- else val.SetNULL();
+ if (Owner)val.setNative(Owner, true);
+ else val.setNULL();
- script->_globals->SetProp("self", &val);
- script->_globals->SetProp("this", &val);
+ script->_globals->setProp("self", &val);
+ script->_globals->setProp("this", &val);
_scripts.Add(script);
Game->GetDebugMgr()->OnScriptInit(script);
diff --git a/engines/wintermute/Base/scriptables/ScScript.cpp b/engines/wintermute/Base/scriptables/ScScript.cpp
index 61e1e91282..217233534c 100644
--- a/engines/wintermute/Base/scriptables/ScScript.cpp
+++ b/engines/wintermute/Base/scriptables/ScScript.cpp
@@ -486,16 +486,16 @@ HRESULT CScScript::ExecuteInstruction() {
switch (inst) {
case II_DEF_VAR:
- _operand->SetNULL();
+ _operand->setNULL();
dw = GetDWORD();
if (_scopeStack->_sP < 0) {
- _globals->SetProp(_symbols[dw], _operand);
+ _globals->setProp(_symbols[dw], _operand);
if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_SCRIPT, this, NULL, _globals->GetProp(_symbols[dw]), _symbols[dw]);
+ Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_SCRIPT, this, NULL, _globals->getProp(_symbols[dw]), _symbols[dw]);
} else {
- _scopeStack->getTop()->SetProp(_symbols[dw], _operand);
+ _scopeStack->getTop()->setProp(_symbols[dw], _operand);
if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_SCOPE, this, _scopeStack->getTop(), _scopeStack->getTop()->GetProp(_symbols[dw]), _symbols[dw]);
+ Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_SCOPE, this, _scopeStack->getTop(), _scopeStack->getTop()->getProp(_symbols[dw]), _symbols[dw]);
}
break;
@@ -505,12 +505,12 @@ HRESULT CScScript::ExecuteInstruction() {
dw = GetDWORD();
/* char *Temp = _symbols[dw]; // TODO delete */
// only create global var if it doesn't exist
- if (!_engine->_globals->PropExists(_symbols[dw])) {
- _operand->SetNULL();
- _engine->_globals->SetProp(_symbols[dw], _operand, false, inst == II_DEF_CONST_VAR);
+ if (!_engine->_globals->propExists(_symbols[dw])) {
+ _operand->setNULL();
+ _engine->_globals->setProp(_symbols[dw], _operand, false, inst == II_DEF_CONST_VAR);
if (Game->GetDebugMgr()->_enabled)
- Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_GLOBAL, this, NULL, _engine->_globals->GetProp(_symbols[dw]), _symbols[dw]);
+ Game->GetDebugMgr()->OnVariableInit(WME_DBGVAR_GLOBAL, this, NULL, _engine->_globals->getProp(_symbols[dw]), _symbols[dw]);
}
break;
}
@@ -520,7 +520,7 @@ HRESULT CScScript::ExecuteInstruction() {
Game->GetDebugMgr()->OnScriptShutdownScope(this, _scopeStack->getTop());
_scopeStack->pop();
- _iP = (uint32)_callStack->pop()->GetInt();
+ _iP = (uint32)_callStack->pop()->getInt();
if (_scopeStack->_sP < 0) Game->GetDebugMgr()->OnScriptChangeScope(this, NULL);
else Game->GetDebugMgr()->OnScriptChangeScope(this, _scopeStack->getTop());
@@ -543,7 +543,7 @@ HRESULT CScScript::ExecuteInstruction() {
case II_CALL:
dw = GetDWORD();
- _operand->SetInt(_iP);
+ _operand->setInt(_iP);
_callStack->push(_operand);
_iP = dw;
@@ -553,7 +553,7 @@ HRESULT CScScript::ExecuteInstruction() {
case II_CALL_BY_EXP: {
// push var
// push string
- str = _stack->pop()->GetString();
+ str = _stack->pop()->getString();
char *MethodName = new char[strlen(str) + 1];
strcpy(MethodName, str);
@@ -564,15 +564,15 @@ HRESULT CScScript::ExecuteInstruction() {
bool TriedNative = false;
// we are already calling this method, try native
- if (_thread && _methodThread && strcmp(MethodName, _threadEvent) == 0 && var->_type == VAL_NATIVE && _owner == var->GetNative()) {
+ if (_thread && _methodThread && strcmp(MethodName, _threadEvent) == 0 && var->_type == VAL_NATIVE && _owner == var->getNative()) {
TriedNative = true;
res = var->_valNative->scCallMethod(this, _stack, _thisStack, MethodName);
}
if (FAILED(res)) {
- if (var->IsNative() && var->GetNative()->canHandleMethod(MethodName)) {
+ if (var->isNative() && var->getNative()->canHandleMethod(MethodName)) {
if (!_unbreakable) {
- _waitScript = var->GetNative()->invokeMethodThread(MethodName);
+ _waitScript = var->getNative()->invokeMethodThread(MethodName);
if (!_waitScript) {
_stack->correctParams(0);
RuntimeError("Error invoking method '%s'.", MethodName);
@@ -591,21 +591,21 @@ HRESULT CScScript::ExecuteInstruction() {
break;
}
/*
- CScValue* val = var->GetProp(MethodName);
+ CScValue* val = var->getProp(MethodName);
if(val){
- dw = GetFuncPos(val->GetString());
+ dw = GetFuncPos(val->getString());
if(dw==0){
- TExternalFunction* f = GetExternal(val->GetString());
+ TExternalFunction* f = GetExternal(val->getString());
if(f){
ExternalCall(_stack, _thisStack, f);
}
else{
// not an internal nor external, try for native function
- Game->ExternalCall(this, _stack, _thisStack, val->GetString());
+ Game->ExternalCall(this, _stack, _thisStack, val->getString());
}
}
else{
- _operand->SetInt(_iP);
+ _operand->setInt(_iP);
_callStack->Push(_operand);
_iP = dw;
}
@@ -637,7 +637,7 @@ HRESULT CScScript::ExecuteInstruction() {
break;
}
case II_SCOPE:
- _operand->SetNULL();
+ _operand->setNULL();
_scopeStack->push(_operand);
if (_scopeStack->_sP < 0) Game->GetDebugMgr()->OnScriptChangeScope(this, NULL);
@@ -651,7 +651,7 @@ HRESULT CScScript::ExecuteInstruction() {
break;
case II_CREATE_OBJECT:
- _operand->SetObject();
+ _operand->setObject();
_stack->push(_operand);
break;
@@ -662,7 +662,7 @@ HRESULT CScScript::ExecuteInstruction() {
case II_PUSH_VAR: {
CScValue *var = GetVar(_symbols[GetDWORD()]);
if (false && /*var->_type==VAL_OBJECT ||*/ var->_type == VAL_NATIVE) {
- _operand->SetReference(var);
+ _operand->setReference(var);
_stack->push(_operand);
} else _stack->push(var);
break;
@@ -670,7 +670,7 @@ HRESULT CScScript::ExecuteInstruction() {
case II_PUSH_VAR_REF: {
CScValue *var = GetVar(_symbols[GetDWORD()]);
- _operand->SetReference(var);
+ _operand->setReference(var);
_stack->push(_operand);
break;
}
@@ -682,12 +682,12 @@ HRESULT CScScript::ExecuteInstruction() {
CScValue *val = _stack->pop();
if (!val) {
RuntimeError("Script stack corruption detected. Please report this script at WME bug reports forum.");
- var->SetNULL();
+ var->setNULL();
} else {
- if (val->GetType() == VAL_VARIABLE_REF) val = val->_valRef;
- if (val->_type == VAL_NATIVE) var->SetValue(val);
+ if (val->getType() == VAL_VARIABLE_REF) val = val->_valRef;
+ if (val->_type == VAL_NATIVE) var->setValue(val);
else {
- var->Copy(val);
+ var->copy(val);
}
}
@@ -725,12 +725,12 @@ HRESULT CScScript::ExecuteInstruction() {
break;
case II_PUSH_THIS_FROM_STACK:
- _operand->SetReference(_stack->getTop());
+ _operand->setReference(_stack->getTop());
_thisStack->push(_operand);
break;
case II_PUSH_THIS:
- _operand->SetReference(GetVar(_symbols[GetDWORD()]));
+ _operand->setReference(GetVar(_symbols[GetDWORD()]));
_thisStack->push(_operand);
break;
@@ -739,8 +739,8 @@ HRESULT CScScript::ExecuteInstruction() {
break;
case II_PUSH_BY_EXP: {
- str = _stack->pop()->GetString();
- CScValue *val = _stack->pop()->GetProp(str);
+ str = _stack->pop()->getString();
+ CScValue *val = _stack->pop()->getProp(str);
if (val) _stack->push(val);
else _stack->pushNULL();
@@ -748,14 +748,14 @@ HRESULT CScScript::ExecuteInstruction() {
}
case II_POP_BY_EXP: {
- str = _stack->pop()->GetString();
+ str = _stack->pop()->getString();
CScValue *var = _stack->pop();
CScValue *val = _stack->pop();
if (val == NULL) {
RuntimeError("Script stack corruption detected. Please report this script at WME bug reports forum.");
- var->SetNULL();
- } else var->SetProp(str, val);
+ var->setNULL();
+ } else var->setProp(str, val);
if (Game->GetDebugMgr()->_enabled)
Game->GetDebugMgr()->OnVariableChangeValue(var, NULL);
@@ -768,7 +768,7 @@ HRESULT CScScript::ExecuteInstruction() {
break;
case II_POP_REG1:
- _reg1->Copy(_stack->pop());
+ _reg1->copy(_stack->pop());
break;
case II_JMP:
@@ -777,12 +777,12 @@ HRESULT CScScript::ExecuteInstruction() {
case II_JMP_FALSE: {
dw = GetDWORD();
- //if(!_stack->pop()->GetBool()) _iP = dw;
+ //if(!_stack->pop()->getBool()) _iP = dw;
CScValue *Val = _stack->pop();
if (!Val) {
RuntimeError("Script corruption detected. Did you use '=' instead of '==' for comparison?");
} else {
- if (!Val->GetBool()) _iP = dw;
+ if (!Val->getBool()) _iP = dw;
}
break;
}
@@ -791,16 +791,16 @@ HRESULT CScScript::ExecuteInstruction() {
op2 = _stack->pop();
op1 = _stack->pop();
- if (op1->IsNULL() || op2->IsNULL()) _operand->SetNULL();
- else if (op1->GetType() == VAL_STRING || op2->GetType() == VAL_STRING) {
- char *tempStr = new char [strlen(op1->GetString()) + strlen(op2->GetString()) + 1];
- strcpy(tempStr, op1->GetString());
- strcat(tempStr, op2->GetString());
- _operand->SetString(tempStr);
+ if (op1->isNULL() || op2->isNULL()) _operand->setNULL();
+ else if (op1->getType() == VAL_STRING || op2->getType() == VAL_STRING) {
+ char *tempStr = new char [strlen(op1->getString()) + strlen(op2->getString()) + 1];
+ strcpy(tempStr, op1->getString());
+ strcat(tempStr, op2->getString());
+ _operand->setString(tempStr);
delete [] tempStr;
- } else if (op1->GetType() == VAL_INT && op2->GetType() == VAL_INT)
- _operand->SetInt(op1->GetInt() + op2->GetInt());
- else _operand->SetFloat(op1->GetFloat() + op2->GetFloat());
+ } else if (op1->getType() == VAL_INT && op2->getType() == VAL_INT)
+ _operand->setInt(op1->getInt() + op2->getInt());
+ else _operand->setFloat(op1->getFloat() + op2->getFloat());
_stack->push(_operand);
@@ -810,10 +810,10 @@ HRESULT CScScript::ExecuteInstruction() {
op2 = _stack->pop();
op1 = _stack->pop();
- if (op1->IsNULL() || op2->IsNULL()) _operand->SetNULL();
- else if (op1->GetType() == VAL_INT && op2->GetType() == VAL_INT)
- _operand->SetInt(op1->GetInt() - op2->GetInt());
- else _operand->SetFloat(op1->GetFloat() - op2->GetFloat());
+ if (op1->isNULL() || op2->isNULL()) _operand->setNULL();
+ else if (op1->getType() == VAL_INT && op2->getType() == VAL_INT)
+ _operand->setInt(op1->getInt() - op2->getInt());
+ else _operand->setFloat(op1->getFloat() - op2->getFloat());
_stack->push(_operand);
@@ -823,10 +823,10 @@ HRESULT CScScript::ExecuteInstruction() {
op2 = _stack->pop();
op1 = _stack->pop();
- if (op1->IsNULL() || op2->IsNULL()) _operand->SetNULL();
- else if (op1->GetType() == VAL_INT && op2->GetType() == VAL_INT)
- _operand->SetInt(op1->GetInt() * op2->GetInt());
- else _operand->SetFloat(op1->GetFloat() * op2->GetFloat());
+ if (op1->isNULL() || op2->isNULL()) _operand->setNULL();
+ else if (op1->getType() == VAL_INT && op2->getType() == VAL_INT)
+ _operand->setInt(op1->getInt() * op2->getInt());
+ else _operand->setFloat(op1->getFloat() * op2->getFloat());
_stack->push(_operand);
@@ -836,10 +836,10 @@ HRESULT CScScript::ExecuteInstruction() {
op2 = _stack->pop();
op1 = _stack->pop();
- if (op2->GetFloat() == 0.0f) RuntimeError("Division by zero.");
+ if (op2->getFloat() == 0.0f) RuntimeError("Division by zero.");
- if (op1->IsNULL() || op2->IsNULL() || op2->GetFloat() == 0.0f) _operand->SetNULL();
- else _operand->SetFloat(op1->GetFloat() / op2->GetFloat());
+ if (op1->isNULL() || op2->isNULL() || op2->getFloat() == 0.0f) _operand->setNULL();
+ else _operand->setFloat(op1->getFloat() / op2->getFloat());
_stack->push(_operand);
@@ -849,10 +849,10 @@ HRESULT CScScript::ExecuteInstruction() {
op2 = _stack->pop();
op1 = _stack->pop();
- if (op2->GetInt() == 0) RuntimeError("Division by zero.");
+ if (op2->getInt() == 0) RuntimeError("Division by zero.");
- if (op1->IsNULL() || op2->IsNULL() || op2->GetInt() == 0) _operand->SetNULL();
- else _operand->SetInt(op1->GetInt() % op2->GetInt());
+ if (op1->isNULL() || op2->isNULL() || op2->getInt() == 0) _operand->setNULL();
+ else _operand->setInt(op1->getInt() % op2->getInt());
_stack->push(_operand);
@@ -860,9 +860,9 @@ HRESULT CScScript::ExecuteInstruction() {
case II_NOT:
op1 = _stack->pop();
- //if(op1->IsNULL()) _operand->SetNULL();
- if (op1->IsNULL()) _operand->SetBool(true);
- else _operand->SetBool(!op1->GetBool());
+ //if(op1->isNULL()) _operand->setNULL();
+ if (op1->isNULL()) _operand->setBool(true);
+ else _operand->setBool(!op1->getBool());
_stack->push(_operand);
break;
@@ -872,9 +872,9 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
if (op1 == NULL || op2 == NULL) {
RuntimeError("Script corruption detected. Did you use '=' instead of '==' for comparison?");
- _operand->SetBool(false);
+ _operand->setBool(false);
} else {
- _operand->SetBool(op1->GetBool() && op2->GetBool());
+ _operand->setBool(op1->getBool() && op2->getBool());
}
_stack->push(_operand);
break;
@@ -884,9 +884,9 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
if (op1 == NULL || op2 == NULL) {
RuntimeError("Script corruption detected. Did you use '=' instead of '==' for comparison?");
- _operand->SetBool(false);
+ _operand->setBool(false);
} else {
- _operand->SetBool(op1->GetBool() || op2->GetBool());
+ _operand->setBool(op1->getBool() || op2->getBool());
}
_stack->push(_operand);
break;
@@ -896,22 +896,22 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
/*
- if((op1->IsNULL() && !op2->IsNULL()) || (!op1->IsNULL() && op2->IsNULL())) _operand->SetBool(false);
- else if(op1->IsNative() && op2->IsNative()){
- _operand->SetBool(op1->GetNative() == op2->GetNative());
+ if((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(false);
+ else if(op1->isNative() && op2->isNative()){
+ _operand->setBool(op1->getNative() == op2->getNative());
}
- else if(op1->GetType()==VAL_STRING || op2->GetType()==VAL_STRING){
- _operand->SetBool(scumm_stricmp(op1->GetString(), op2->GetString())==0);
+ else if(op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
+ _operand->setBool(scumm_stricmp(op1->getString(), op2->getString())==0);
}
- else if(op1->GetType()==VAL_FLOAT && op2->GetType()==VAL_FLOAT){
- _operand->SetBool(op1->GetFloat() == op2->GetFloat());
+ else if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ _operand->setBool(op1->getFloat() == op2->getFloat());
}
else{
- _operand->SetBool(op1->GetInt() == op2->GetInt());
+ _operand->setBool(op1->getInt() == op2->getInt());
}
*/
- _operand->SetBool(CScValue::Compare(op1, op2) == 0);
+ _operand->setBool(CScValue::compare(op1, op2) == 0);
_stack->push(_operand);
break;
@@ -920,22 +920,22 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
/*
- if((op1->IsNULL() && !op2->IsNULL()) || (!op1->IsNULL() && op2->IsNULL())) _operand->SetBool(true);
- else if(op1->IsNative() && op2->IsNative()){
- _operand->SetBool(op1->GetNative() != op2->GetNative());
+ if((op1->isNULL() && !op2->isNULL()) || (!op1->isNULL() && op2->isNULL())) _operand->setBool(true);
+ else if(op1->isNative() && op2->isNative()){
+ _operand->setBool(op1->getNative() != op2->getNative());
}
- else if(op1->GetType()==VAL_STRING || op2->GetType()==VAL_STRING){
- _operand->SetBool(scumm_stricmp(op1->GetString(), op2->GetString())!=0);
+ else if(op1->getType()==VAL_STRING || op2->getType()==VAL_STRING){
+ _operand->setBool(scumm_stricmp(op1->getString(), op2->getString())!=0);
}
- else if(op1->GetType()==VAL_FLOAT && op2->GetType()==VAL_FLOAT){
- _operand->SetBool(op1->GetFloat() != op2->GetFloat());
+ else if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ _operand->setBool(op1->getFloat() != op2->getFloat());
}
else{
- _operand->SetBool(op1->GetInt() != op2->GetInt());
+ _operand->setBool(op1->getInt() != op2->getInt());
}
*/
- _operand->SetBool(CScValue::Compare(op1, op2) != 0);
+ _operand->setBool(CScValue::compare(op1, op2) != 0);
_stack->push(_operand);
break;
@@ -944,13 +944,13 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
/*
- if(op1->GetType()==VAL_FLOAT && op2->GetType()==VAL_FLOAT){
- _operand->SetBool(op1->GetFloat() < op2->GetFloat());
+ if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ _operand->setBool(op1->getFloat() < op2->getFloat());
}
- else _operand->SetBool(op1->GetInt() < op2->GetInt());
+ else _operand->setBool(op1->getInt() < op2->getInt());
*/
- _operand->SetBool(CScValue::Compare(op1, op2) < 0);
+ _operand->setBool(CScValue::compare(op1, op2) < 0);
_stack->push(_operand);
break;
@@ -959,13 +959,13 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
/*
- if(op1->GetType()==VAL_FLOAT && op2->GetType()==VAL_FLOAT){
- _operand->SetBool(op1->GetFloat() > op2->GetFloat());
+ if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ _operand->setBool(op1->getFloat() > op2->getFloat());
}
- else _operand->SetBool(op1->GetInt() > op2->GetInt());
+ else _operand->setBool(op1->getInt() > op2->getInt());
*/
- _operand->SetBool(CScValue::Compare(op1, op2) > 0);
+ _operand->setBool(CScValue::compare(op1, op2) > 0);
_stack->push(_operand);
break;
@@ -974,13 +974,13 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
/*
- if(op1->GetType()==VAL_FLOAT && op2->GetType()==VAL_FLOAT){
- _operand->SetBool(op1->GetFloat() <= op2->GetFloat());
+ if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ _operand->setBool(op1->getFloat() <= op2->getFloat());
}
- else _operand->SetBool(op1->GetInt() <= op2->GetInt());
+ else _operand->setBool(op1->getInt() <= op2->getInt());
*/
- _operand->SetBool(CScValue::Compare(op1, op2) <= 0);
+ _operand->setBool(CScValue::compare(op1, op2) <= 0);
_stack->push(_operand);
break;
@@ -989,13 +989,13 @@ HRESULT CScScript::ExecuteInstruction() {
op1 = _stack->pop();
/*
- if(op1->GetType()==VAL_FLOAT && op2->GetType()==VAL_FLOAT){
- _operand->SetBool(op1->GetFloat() >= op2->GetFloat());
+ if(op1->getType()==VAL_FLOAT && op2->getType()==VAL_FLOAT){
+ _operand->setBool(op1->getFloat() >= op2->getFloat());
}
- else _operand->SetBool(op1->GetInt() >= op2->GetInt());
+ else _operand->setBool(op1->getInt() >= op2->getInt());
*/
- _operand->SetBool(CScValue::Compare(op1, op2) >= 0);
+ _operand->setBool(CScValue::compare(op1, op2) >= 0);
_stack->push(_operand);
break;
@@ -1003,8 +1003,8 @@ HRESULT CScScript::ExecuteInstruction() {
op2 = _stack->pop();
op1 = _stack->pop();
- //_operand->SetBool(op1->GetType()==op2->GetType() && op1->GetFloat()==op2->GetFloat());
- _operand->SetBool(CScValue::CompareStrict(op1, op2) == 0);
+ //_operand->setBool(op1->getType()==op2->getType() && op1->getFloat()==op2->getFloat());
+ _operand->setBool(CScValue::compareStrict(op1, op2) == 0);
_stack->push(_operand);
break;
@@ -1013,8 +1013,8 @@ HRESULT CScScript::ExecuteInstruction() {
op2 = _stack->pop();
op1 = _stack->pop();
- //_operand->SetBool(op1->GetType()!=op2->GetType() || op1->GetFloat()!=op2->GetFloat());
- _operand->SetBool(CScValue::CompareStrict(op1, op2) != 0);
+ //_operand->setBool(op1->getType()!=op2->getType() || op1->getFloat()!=op2->getFloat());
+ _operand->setBool(CScValue::compareStrict(op1, op2) != 0);
_stack->push(_operand);
break;
@@ -1077,17 +1077,17 @@ CScValue *CScScript::GetVar(char *name) {
// scope locals
if (_scopeStack->_sP >= 0) {
- if (_scopeStack->getTop()->PropExists(name)) ret = _scopeStack->getTop()->GetProp(name);
+ if (_scopeStack->getTop()->propExists(name)) ret = _scopeStack->getTop()->getProp(name);
}
// script globals
if (ret == NULL) {
- if (_globals->PropExists(name)) ret = _globals->GetProp(name);
+ if (_globals->propExists(name)) ret = _globals->getProp(name);
}
// engine globals
if (ret == NULL) {
- if (_engine->_globals->PropExists(name)) ret = _engine->_globals->GetProp(name);
+ if (_engine->_globals->propExists(name)) ret = _engine->_globals->getProp(name);
}
if (ret == NULL) {
@@ -1096,11 +1096,11 @@ CScValue *CScScript::GetVar(char *name) {
CScValue *Val = new CScValue(Game);
CScValue *Scope = _scopeStack->getTop();
if (Scope) {
- Scope->SetProp(name, Val);
- ret = _scopeStack->getTop()->GetProp(name);
+ Scope->setProp(name, Val);
+ ret = _scopeStack->getTop()->getProp(name);
} else {
- _globals->SetProp(name, Val);
- ret = _globals->GetProp(name);
+ _globals->setProp(name, Val);
+ ret = _globals->getProp(name);
}
delete Val;
}
@@ -1352,29 +1352,29 @@ HRESULT CScScript::ExternalCall(CScStack *stack, CScStack *thisStack, CScScript:
CScValue *Val = stack->pop();
switch (Function->params[i]) {
case TYPE_BOOL:
- Buffer->PutDWORD((uint32)Val->GetBool());
+ Buffer->PutDWORD((uint32)Val->getBool());
break;
case TYPE_LONG:
- Buffer->PutDWORD(Val->GetInt());
+ Buffer->PutDWORD(Val->getInt());
break;
case TYPE_BYTE:
- Buffer->PutDWORD((byte)Val->GetInt());
+ Buffer->PutDWORD((byte)Val->getInt());
break;
case TYPE_STRING:
- if (Val->IsNULL()) Buffer->PutDWORD(0);
- else Buffer->PutDWORD((uint32)Val->GetString());
+ if (Val->isNULL()) Buffer->PutDWORD(0);
+ else Buffer->PutDWORD((uint32)Val->getString());
break;
case TYPE_MEMBUFFER:
- if (Val->IsNULL()) Buffer->PutDWORD(0);
- else Buffer->PutDWORD((uint32)Val->GetMemBuffer());
+ if (Val->isNULL()) Buffer->PutDWORD(0);
+ else Buffer->PutDWORD((uint32)Val->getMemBuffer());
break;
case TYPE_FLOAT: {
- float f = Val->GetFloat();
+ float f = Val->getFloat();
Buffer->PutDWORD(*((uint32 *)&f));
break;
}
case TYPE_DOUBLE: {
- double d = Val->GetFloat();
+ double d = Val->getFloat();
uint32 *pd = (uint32 *)&d;
Buffer->PutDWORD(pd[0]);
@@ -1527,7 +1527,7 @@ double CScScript::GetST0Double(void) {
//////////////////////////////////////////////////////////////////////////
HRESULT CScScript::CopyParameters(CScStack *stack) {
int i;
- int NumParams = stack->pop()->GetInt();
+ int NumParams = stack->pop()->getInt();
for (i = NumParams - 1; i >= 0; i--) {
_stack->push(stack->getAt(i));
}
diff --git a/engines/wintermute/Base/scriptables/ScStack.cpp b/engines/wintermute/Base/scriptables/ScStack.cpp
index dc953ed8d0..c00f0656e0 100644
--- a/engines/wintermute/Base/scriptables/ScStack.cpp
+++ b/engines/wintermute/Base/scriptables/ScStack.cpp
@@ -71,10 +71,10 @@ void CScStack::push(CScValue *val) {
if (_sP < _values.GetSize()) {
_values[_sP]->cleanup();
- _values[_sP]->Copy(val);
+ _values[_sP]->copy(val);
} else {
CScValue *copyVal = new CScValue(Game);
- copyVal->Copy(val);
+ copyVal->copy(val);
_values.Add(copyVal);
}
}
@@ -111,7 +111,7 @@ CScValue *CScStack::getAt(int index) {
//////////////////////////////////////////////////////////////////////////
void CScStack::correctParams(uint32 expected_params) {
- int nu_params = pop()->GetInt();
+ int nu_params = pop()->getInt();
if (expected_params < nu_params) { // too many params
while (expected_params < nu_params) {
@@ -125,7 +125,7 @@ void CScStack::correctParams(uint32 expected_params) {
while (expected_params > nu_params) {
//Push(null_val);
CScValue *null_val = new CScValue(Game);
- null_val->SetNULL();
+ null_val->setNULL();
_values.InsertAt(_sP - nu_params + 1, null_val);
nu_params++;
_sP++;
@@ -143,11 +143,11 @@ void CScStack::correctParams(uint32 expected_params) {
void CScStack::pushNULL() {
/*
CScValue* val = new CScValue(Game);
- val->SetNULL();
+ val->setNULL();
Push(val);
delete val;
*/
- getPushValue()->SetNULL();
+ getPushValue()->setNULL();
}
@@ -155,11 +155,11 @@ void CScStack::pushNULL() {
void CScStack::pushInt(int val) {
/*
CScValue* val = new CScValue(Game);
- val->SetInt(Val);
+ val->setInt(Val);
Push(val);
delete val;
*/
- getPushValue()->SetInt(val);
+ getPushValue()->setInt(val);
}
@@ -167,11 +167,11 @@ void CScStack::pushInt(int val) {
void CScStack::pushFloat(double val) {
/*
CScValue* val = new CScValue(Game);
- val->SetFloat(Val);
+ val->setFloat(Val);
Push(val);
delete val;
*/
- getPushValue()->SetFloat(val);
+ getPushValue()->setFloat(val);
}
@@ -179,11 +179,11 @@ void CScStack::pushFloat(double val) {
void CScStack::pushBool(bool val) {
/*
CScValue* val = new CScValue(Game);
- val->SetBool(Val);
+ val->setBool(Val);
Push(val);
delete val;
*/
- getPushValue()->SetBool(val);
+ getPushValue()->setBool(val);
}
@@ -191,11 +191,11 @@ void CScStack::pushBool(bool val) {
void CScStack::pushString(const char *val) {
/*
CScValue* val = new CScValue(Game);
- val->SetString(Val);
+ val->setString(Val);
Push(val);
delete val;
*/
- getPushValue()->SetString(val);
+ getPushValue()->setString(val);
}
@@ -203,12 +203,12 @@ void CScStack::pushString(const char *val) {
void CScStack::pushNative(CBScriptable *val, bool persistent) {
/*
CScValue* val = new CScValue(Game);
- val->SetNative(Val, Persistent);
+ val->setNative(Val, Persistent);
Push(val);
delete val;
*/
- getPushValue()->SetNative(val, persistent);
+ getPushValue()->setNative(val, persistent);
}
diff --git a/engines/wintermute/Base/scriptables/ScValue.cpp b/engines/wintermute/Base/scriptables/ScValue.cpp
index aede849ecc..04872fb4ae 100644
--- a/engines/wintermute/Base/scriptables/ScValue.cpp
+++ b/engines/wintermute/Base/scriptables/ScValue.cpp
@@ -58,9 +58,9 @@ CScValue::CScValue(CBGame *inGame): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-CScValue::CScValue(CBGame *inGame, bool Val): CBBase(inGame) {
+CScValue::CScValue(CBGame *inGame, bool val): CBBase(inGame) {
_type = VAL_BOOL;
- _valBool = Val;
+ _valBool = val;
_valInt = 0;
_valFloat = 0.0f;
@@ -73,9 +73,9 @@ CScValue::CScValue(CBGame *inGame, bool Val): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-CScValue::CScValue(CBGame *inGame, int Val): CBBase(inGame) {
+CScValue::CScValue(CBGame *inGame, int val): CBBase(inGame) {
_type = VAL_INT;
- _valInt = Val;
+ _valInt = val;
_valFloat = 0.0f;
_valBool = false;
@@ -88,9 +88,9 @@ CScValue::CScValue(CBGame *inGame, int Val): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-CScValue::CScValue(CBGame *inGame, double Val): CBBase(inGame) {
+CScValue::CScValue(CBGame *inGame, double val): CBBase(inGame) {
_type = VAL_FLOAT;
- _valFloat = Val;
+ _valFloat = val;
_valInt = 0;
_valBool = false;
@@ -103,10 +103,10 @@ CScValue::CScValue(CBGame *inGame, double Val): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-CScValue::CScValue(CBGame *inGame, const char *Val): CBBase(inGame) {
+CScValue::CScValue(CBGame *inGame, const char *val): CBBase(inGame) {
_type = VAL_STRING;
_valString = NULL;
- SetStringVal(Val);
+ setStringVal(val);
_valBool = false;
_valInt = 0;
@@ -119,12 +119,12 @@ CScValue::CScValue(CBGame *inGame, const char *Val): CBBase(inGame) {
//////////////////////////////////////////////////////////////////////////
-void CScValue::cleanup(bool IgnoreNatives) {
- DeleteProps();
+void CScValue::cleanup(bool ignoreNatives) {
+ deleteProps();
if (_valString) delete [] _valString;
- if (!IgnoreNatives) {
+ if (!ignoreNatives) {
if (_valNative && !_persistent) {
_valNative->_refCount--;
if (_valNative->_refCount <= 0) {
@@ -156,8 +156,8 @@ CScValue::~CScValue() {
//////////////////////////////////////////////////////////////////////////
-CScValue *CScValue::GetProp(const char *name) {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetProp(name);
+CScValue *CScValue::getProp(const char *name) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getProp(name);
if (_type == VAL_STRING && strcmp(name, "Length") == 0) {
Game->_scValue->_type = VAL_INT;
@@ -167,10 +167,10 @@ CScValue *CScValue::GetProp(const char *name) {
#else
if (true) {
#endif
- Game->_scValue->SetInt(strlen(_valString));
+ Game->_scValue->setInt(strlen(_valString));
} else {
WideString wstr = StringUtil::Utf8ToWide(_valString);
- Game->_scValue->SetInt(wstr.size());
+ Game->_scValue->setInt(wstr.size());
}
return Game->_scValue;
@@ -188,8 +188,8 @@ CScValue *CScValue::GetProp(const char *name) {
}
//////////////////////////////////////////////////////////////////////////
-HRESULT CScValue::DeleteProp(const char *name) {
- if (_type == VAL_VARIABLE_REF) return _valRef->DeleteProp(name);
+HRESULT CScValue::deleteProp(const char *name) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->deleteProp(name);
_valIter = _valObject.find(name);
if (_valIter != _valObject.end()) {
@@ -203,8 +203,8 @@ HRESULT CScValue::DeleteProp(const char *name) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CScValue::SetProp(const char *name, CScValue *Val, bool CopyWhole, bool SetAsConst) {
- if (_type == VAL_VARIABLE_REF) return _valRef->SetProp(name, Val);
+HRESULT CScValue::setProp(const char *name, CScValue *Val, bool CopyWhole, bool SetAsConst) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->setProp(name, Val);
HRESULT ret = E_FAIL;
if (_type == VAL_NATIVE && _valNative) {
@@ -221,7 +221,7 @@ HRESULT CScValue::SetProp(const char *name, CScValue *Val, bool CopyWhole, bool
if (!val) val = new CScValue(Game);
else val->cleanup();
- val->Copy(Val, CopyWhole);
+ val->copy(Val, CopyWhole);
val->_isConstVar = SetAsConst;
_valObject[name] = val;
@@ -247,8 +247,8 @@ HRESULT CScValue::SetProp(const char *name, CScValue *Val, bool CopyWhole, bool
//////////////////////////////////////////////////////////////////////////
-bool CScValue::PropExists(const char *name) {
- if (_type == VAL_VARIABLE_REF) return _valRef->PropExists(name);
+bool CScValue::propExists(const char *name) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->propExists(name);
_valIter = _valObject.find(name);
return (_valIter != _valObject.end());
@@ -256,7 +256,7 @@ bool CScValue::PropExists(const char *name) {
//////////////////////////////////////////////////////////////////////////
-void CScValue::DeleteProps() {
+void CScValue::deleteProps() {
_valIter = _valObject.begin();
while (_valIter != _valObject.end()) {
delete(CScValue *)_valIter->_value;
@@ -270,170 +270,170 @@ void CScValue::DeleteProps() {
void CScValue::CleanProps(bool IncludingNatives) {
_valIter = _valObject.begin();
while (_valIter != _valObject.end()) {
- if (!_valIter->_value->_isConstVar && (!_valIter->_value->IsNative() || IncludingNatives)) _valIter->_value->SetNULL();
+ if (!_valIter->_value->_isConstVar && (!_valIter->_value->isNative() || IncludingNatives)) _valIter->_value->setNULL();
_valIter++;
}
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::IsNULL() {
- if (_type == VAL_VARIABLE_REF) return _valRef->IsNULL();
+bool CScValue::isNULL() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->isNULL();
return (_type == VAL_NULL);
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::IsNative() {
- if (_type == VAL_VARIABLE_REF) return _valRef->IsNative();
+bool CScValue::isNative() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->isNative();
return (_type == VAL_NATIVE);
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::IsString() {
- if (_type == VAL_VARIABLE_REF) return _valRef->IsString();
+bool CScValue::isString() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->isString();
return (_type == VAL_STRING);
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::IsFloat() {
- if (_type == VAL_VARIABLE_REF) return _valRef->IsFloat();
+bool CScValue::isFloat() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->isFloat();
return (_type == VAL_FLOAT);
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::IsInt() {
- if (_type == VAL_VARIABLE_REF) return _valRef->IsInt();
+bool CScValue::isInt() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->isInt();
return (_type == VAL_INT);
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::IsBool() {
- if (_type == VAL_VARIABLE_REF) return _valRef->IsBool();
+bool CScValue::isBool() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->isBool();
return (_type == VAL_BOOL);
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::IsObject() {
- if (_type == VAL_VARIABLE_REF) return _valRef->IsObject();
+bool CScValue::isObject() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->isObject();
return (_type == VAL_OBJECT);
}
//////////////////////////////////////////////////////////////////////////
-TValType CScValue::GetTypeTolerant() {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetType();
+TValType CScValue::getTypeTolerant() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getType();
return _type;
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetBool(bool Val) {
+void CScValue::setBool(bool val) {
if (_type == VAL_VARIABLE_REF) {
- _valRef->SetBool(Val);
+ _valRef->setBool(val);
return;
}
if (_type == VAL_NATIVE) {
- _valNative->scSetBool(Val);
+ _valNative->scSetBool(val);
return;
}
- _valBool = Val;
+ _valBool = val;
_type = VAL_BOOL;
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetInt(int Val) {
+void CScValue::setInt(int val) {
if (_type == VAL_VARIABLE_REF) {
- _valRef->SetInt(Val);
+ _valRef->setInt(val);
return;
}
if (_type == VAL_NATIVE) {
- _valNative->scSetInt(Val);
+ _valNative->scSetInt(val);
return;
}
- _valInt = Val;
+ _valInt = val;
_type = VAL_INT;
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetFloat(double Val) {
+void CScValue::setFloat(double val) {
if (_type == VAL_VARIABLE_REF) {
- _valRef->SetFloat(Val);
+ _valRef->setFloat(val);
return;
}
if (_type == VAL_NATIVE) {
- _valNative->scSetFloat(Val);
+ _valNative->scSetFloat(val);
return;
}
- _valFloat = Val;
+ _valFloat = val;
_type = VAL_FLOAT;
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetString(const char *Val) {
+void CScValue::setString(const char *val) {
if (_type == VAL_VARIABLE_REF) {
- _valRef->SetString(Val);
+ _valRef->setString(val);
return;
}
if (_type == VAL_NATIVE) {
- _valNative->scSetString(Val);
+ _valNative->scSetString(val);
return;
}
- SetStringVal(Val);
+ setStringVal(val);
if (_valString) _type = VAL_STRING;
else _type = VAL_NULL;
}
-void CScValue::SetString(const Common::String &Val) {
- SetString(Val.c_str());
+void CScValue::setString(const Common::String &val) {
+ setString(val.c_str());
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetStringVal(const char *Val) {
+void CScValue::setStringVal(const char *val) {
if (_valString) {
delete [] _valString;
_valString = NULL;
}
- if (Val == NULL) {
+ if (val == NULL) {
_valString = NULL;
return;
}
- _valString = new char [strlen(Val) + 1];
+ _valString = new char [strlen(val) + 1];
if (_valString) {
- strcpy(_valString, Val);
+ strcpy(_valString, val);
}
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetNULL() {
+void CScValue::setNULL() {
if (_type == VAL_VARIABLE_REF) {
- _valRef->SetNULL();
+ _valRef->setNULL();
return;
}
@@ -442,21 +442,21 @@ void CScValue::SetNULL() {
if (_valNative->_refCount <= 0) delete _valNative;
}
_valNative = NULL;
- DeleteProps();
+ deleteProps();
_type = VAL_NULL;
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetNative(CBScriptable *Val, bool Persistent) {
+void CScValue::setNative(CBScriptable *Val, bool Persistent) {
if (_type == VAL_VARIABLE_REF) {
- _valRef->SetNative(Val, Persistent);
+ _valRef->setNative(Val, Persistent);
return;
}
if (Val == NULL) {
- SetNULL();
+ setNULL();
} else {
if (_valNative && !_persistent) {
_valNative->_refCount--;
@@ -476,27 +476,27 @@ void CScValue::SetNative(CBScriptable *Val, bool Persistent) {
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetObject() {
+void CScValue::setObject() {
if (_type == VAL_VARIABLE_REF) {
- _valRef->SetObject();
+ _valRef->setObject();
return;
}
- DeleteProps();
+ deleteProps();
_type = VAL_OBJECT;
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetReference(CScValue *Val) {
+void CScValue::setReference(CScValue *Val) {
_valRef = Val;
_type = VAL_VARIABLE_REF;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::GetBool(bool Default) {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetBool();
+bool CScValue::getBool(bool Default) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getBool();
switch (_type) {
case VAL_BOOL:
@@ -521,8 +521,8 @@ bool CScValue::GetBool(bool Default) {
//////////////////////////////////////////////////////////////////////////
-int CScValue::GetInt(int Default) {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetInt();
+int CScValue::getInt(int Default) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getInt();
switch (_type) {
case VAL_BOOL:
@@ -547,8 +547,8 @@ int CScValue::GetInt(int Default) {
//////////////////////////////////////////////////////////////////////////
-double CScValue::GetFloat(double Default) {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetFloat();
+double CScValue::getFloat(double Default) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getFloat();
switch (_type) {
case VAL_BOOL:
@@ -572,8 +572,8 @@ double CScValue::GetFloat(double Default) {
}
//////////////////////////////////////////////////////////////////////////
-void *CScValue::GetMemBuffer() {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetMemBuffer();
+void *CScValue::getMemBuffer() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getMemBuffer();
if (_type == VAL_NATIVE) return _valNative->scToMemBuffer();
else return (void *)NULL;
@@ -581,40 +581,40 @@ void *CScValue::GetMemBuffer() {
//////////////////////////////////////////////////////////////////////////
-const char *CScValue::GetString() {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetString();
+const char *CScValue::getString() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getString();
switch (_type) {
case VAL_OBJECT:
- SetStringVal("[object]");
+ setStringVal("[object]");
break;
case VAL_NULL:
- SetStringVal("[null]");
+ setStringVal("[null]");
break;
case VAL_NATIVE: {
const char *StrVal = _valNative->scToString();
- SetStringVal(StrVal);
+ setStringVal(StrVal);
return StrVal;
break;
}
case VAL_BOOL:
- SetStringVal(_valBool ? "yes" : "no");
+ setStringVal(_valBool ? "yes" : "no");
break;
case VAL_INT: {
char dummy[50];
sprintf(dummy, "%d", _valInt);
- SetStringVal(dummy);
+ setStringVal(dummy);
break;
}
case VAL_FLOAT: {
char dummy[50];
sprintf(dummy, "%f", _valFloat);
- SetStringVal(dummy);
+ setStringVal(dummy);
break;
}
@@ -622,7 +622,7 @@ const char *CScValue::GetString() {
break;
default:
- SetStringVal("");
+ setStringVal("");
}
return _valString;
@@ -630,8 +630,8 @@ const char *CScValue::GetString() {
//////////////////////////////////////////////////////////////////////////
-CBScriptable *CScValue::GetNative() {
- if (_type == VAL_VARIABLE_REF) return _valRef->GetNative();
+CBScriptable *CScValue::getNative() {
+ if (_type == VAL_VARIABLE_REF) return _valRef->getNative();
if (_type == VAL_NATIVE) return _valNative;
else return NULL;
@@ -639,13 +639,13 @@ CBScriptable *CScValue::GetNative() {
//////////////////////////////////////////////////////////////////////////
-TValType CScValue::GetType() {
+TValType CScValue::getType() {
return _type;
}
//////////////////////////////////////////////////////////////////////////
-void CScValue::Copy(CScValue *orig, bool CopyWhole) {
+void CScValue::copy(CScValue *orig, bool copyWhole) {
Game = orig->Game;
if (_valNative && !_persistent) {
@@ -656,7 +656,7 @@ void CScValue::Copy(CScValue *orig, bool CopyWhole) {
}
}
- if (orig->_type == VAL_VARIABLE_REF && orig->_valRef && CopyWhole) orig = orig->_valRef;
+ if (orig->_type == VAL_VARIABLE_REF && orig->_valRef && copyWhole) orig = orig->_valRef;
cleanup(true);
@@ -664,7 +664,7 @@ void CScValue::Copy(CScValue *orig, bool CopyWhole) {
_valBool = orig->_valBool;
_valInt = orig->_valInt;
_valFloat = orig->_valFloat;
- SetStringVal(orig->_valString);
+ setStringVal(orig->_valString);
_valRef = orig->_valRef;
_persistent = orig->_persistent;
@@ -678,7 +678,7 @@ void CScValue::Copy(CScValue *orig, bool CopyWhole) {
orig->_valIter = orig->_valObject.begin();
while (orig->_valIter != orig->_valObject.end()) {
_valObject[orig->_valIter->_key] = new CScValue(Game);
- _valObject[orig->_valIter->_key]->Copy(orig->_valIter->_value);
+ _valObject[orig->_valIter->_key]->copy(orig->_valIter->_value);
orig->_valIter++;
}
} else _valObject.clear();
@@ -686,34 +686,34 @@ void CScValue::Copy(CScValue *orig, bool CopyWhole) {
//////////////////////////////////////////////////////////////////////////
-void CScValue::SetValue(CScValue *Val) {
- if (Val->_type == VAL_VARIABLE_REF) {
- SetValue(Val->_valRef);
+void CScValue::setValue(CScValue *val) {
+ if (val->_type == VAL_VARIABLE_REF) {
+ setValue(val->_valRef);
return;
}
// if being assigned a simple type, preserve native state
- if (_type == VAL_NATIVE && (Val->_type == VAL_INT || Val->_type == VAL_STRING || Val->_type == VAL_BOOL)) {
- switch (Val->_type) {
+ if (_type == VAL_NATIVE && (val->_type == VAL_INT || val->_type == VAL_STRING || val->_type == VAL_BOOL)) {
+ switch (val->_type) {
case VAL_INT:
- _valNative->scSetInt(Val->GetInt());
+ _valNative->scSetInt(val->getInt());
break;
case VAL_FLOAT:
- _valNative->scSetFloat(Val->GetFloat());
+ _valNative->scSetFloat(val->getFloat());
break;
case VAL_BOOL:
- _valNative->scSetBool(Val->GetBool());
+ _valNative->scSetBool(val->getBool());
break;
case VAL_STRING:
- _valNative->scSetString(Val->GetString());
+ _valNative->scSetString(val->getString());
break;
default:
- warning("CScValue::SetValue - unhandled enum");
+ warning("CScValue::setValue - unhandled enum");
break;
}
}
// otherwise just copy everything
- else Copy(Val);
+ else copy(val);
}
@@ -802,13 +802,13 @@ HRESULT CScValue::persist(CBPersistMgr *persistMgr) {
//////////////////////////////////////////////////////////////////////////
-HRESULT CScValue::saveAsText(CBDynBuffer *Buffer, int Indent) {
+HRESULT CScValue::saveAsText(CBDynBuffer *buffer, int indent) {
_valIter = _valObject.begin();
while (_valIter != _valObject.end()) {
- Buffer->putTextIndent(Indent, "PROPERTY {\n");
- Buffer->putTextIndent(Indent + 2, "NAME=\"%s\"\n", _valIter->_key.c_str());
- Buffer->putTextIndent(Indent + 2, "VALUE=\"%s\"\n", _valIter->_value->GetString());
- Buffer->putTextIndent(Indent, "}\n\n");
+ buffer->putTextIndent(indent, "PROPERTY {\n");
+ buffer->putTextIndent(indent + 2, "NAME=\"%s\"\n", _valIter->_key.c_str());
+ buffer->putTextIndent(indent + 2, "VALUE=\"%s\"\n", _valIter->_value->getString());
+ buffer->putTextIndent(indent, "}\n\n");
_valIter++;
}
@@ -818,45 +818,45 @@ HRESULT CScValue::saveAsText(CBDynBuffer *Buffer, int Indent) {
//////////////////////////////////////////////////////////////////////////
// -1 ... left is less, 0 ... equals, 1 ... left is greater
-int CScValue::Compare(CScValue *Val1, CScValue *Val2) {
+int CScValue::compare(CScValue *val1, CScValue *val2) {
// both natives?
- if (Val1->IsNative() && Val2->IsNative()) {
+ if (val1->isNative() && val2->isNative()) {
// same class?
- if (strcmp(Val1->GetNative()->getClassName(), Val2->GetNative()->getClassName()) == 0) {
- return Val1->GetNative()->scCompare(Val2->GetNative());
- } else return strcmp(Val1->GetString(), Val2->GetString());
+ if (strcmp(val1->getNative()->getClassName(), val2->getNative()->getClassName()) == 0) {
+ return val1->getNative()->scCompare(val2->getNative());
+ } else return strcmp(val1->getString(), val2->getString());
}
// both objects?
- if (Val1->IsObject() && Val2->IsObject()) return -1;
+ if (val1->isObject() && val2->isObject()) return -1;
// null states
- if (Val1->IsNULL() && !Val2->IsNULL()) return -1;
- else if (!Val1->IsNULL() && Val2->IsNULL()) return 1;
- else if (Val1->IsNULL() && Val2->IsNULL()) return 0;
+ if (val1->isNULL() && !val2->isNULL()) return -1;
+ else if (!val1->isNULL() && val2->isNULL()) return 1;
+ else if (val1->isNULL() && val2->isNULL()) return 0;
// one of them is string? convert both to string
- if (Val1->IsString() || Val2->IsString()) return strcmp(Val1->GetString(), Val2->GetString());
+ if (val1->isString() || val2->isString()) return strcmp(val1->getString(), val2->getString());
// one of them is float?
- if (Val1->IsFloat() || Val2->IsFloat()) {
- if (Val1->GetFloat() < Val2->GetFloat()) return -1;
- else if (Val1->GetFloat() > Val2->GetFloat()) return 1;
+ if (val1->isFloat() || val2->isFloat()) {
+ if (val1->getFloat() < val2->getFloat()) return -1;
+ else if (val1->getFloat() > val2->getFloat()) return 1;
else return 0;
}
// otherwise compare as int's
- if (Val1->GetInt() < Val2->GetInt()) return -1;
- else if (Val1->GetInt() > Val2->GetInt()) return 1;
+ if (val1->getInt() < val2->getInt()) return -1;
+ else if (val1->getInt() > val2->getInt()) return 1;
else return 0;
}
//////////////////////////////////////////////////////////////////////////
-int CScValue::CompareStrict(CScValue *Val1, CScValue *Val2) {
- if (Val1->GetTypeTolerant() != Val2->GetTypeTolerant()) return -1;
- else return CScValue::Compare(Val1, Val2);
+int CScValue::compareStrict(CScValue *val1, CScValue *val2) {
+ if (val1->getTypeTolerant() != val2->getTypeTolerant()) return -1;
+ else return CScValue::compare(val1, val2);
}
@@ -872,43 +872,43 @@ HRESULT CScValue::DbgSendVariables(IWmeDebugClient *Client, EWmeDebuggerVariable
//////////////////////////////////////////////////////////////////////////
-bool CScValue::SetProperty(const char *propName, int value) {
+bool CScValue::setProperty(const char *propName, int value) {
CScValue *Val = new CScValue(Game, value);
- bool Ret = SUCCEEDED(SetProp(propName, Val));
+ bool Ret = SUCCEEDED(setProp(propName, Val));
delete Val;
return Ret;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::SetProperty(const char *propName, const char *value) {
+bool CScValue::setProperty(const char *propName, const char *value) {
CScValue *Val = new CScValue(Game, value);
- bool Ret = SUCCEEDED(SetProp(propName, Val));
+ bool Ret = SUCCEEDED(setProp(propName, Val));
delete Val;
return Ret;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::SetProperty(const char *propName, double value) {
+bool CScValue::setProperty(const char *propName, double value) {
CScValue *Val = new CScValue(Game, value);
- bool Ret = SUCCEEDED(SetProp(propName, Val));
+ bool Ret = SUCCEEDED(setProp(propName, Val));
delete Val;
return Ret;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::SetProperty(const char *propName, bool value) {
+bool CScValue::setProperty(const char *propName, bool value) {
CScValue *Val = new CScValue(Game, value);
- bool Ret = SUCCEEDED(SetProp(propName, Val));
+ bool Ret = SUCCEEDED(setProp(propName, Val));
delete Val;
return Ret;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::SetProperty(const char *propName) {
+bool CScValue::setProperty(const char *propName) {
CScValue *Val = new CScValue(Game);
- bool Ret = SUCCEEDED(SetProp(propName, Val));
+ bool Ret = SUCCEEDED(setProp(propName, Val));
delete Val;
return Ret;
}
@@ -918,7 +918,7 @@ bool CScValue::SetProperty(const char *propName) {
// IWmeDebugProp
//////////////////////////////////////////////////////////////////////////
EWmeDebuggerPropType CScValue::DbgGetType() {
- switch (GetType()) {
+ switch (getType()) {
case VAL_NULL:
return WME_DBGPROP_NULL;
case VAL_STRING:
@@ -940,56 +940,56 @@ EWmeDebuggerPropType CScValue::DbgGetType() {
//////////////////////////////////////////////////////////////////////////
int CScValue::DbgGetValInt() {
- return GetInt();
+ return getInt();
}
//////////////////////////////////////////////////////////////////////////
double CScValue::DbgGetValFloat() {
- return GetFloat();
+ return getFloat();
}
//////////////////////////////////////////////////////////////////////////
bool CScValue::DbgGetValBool() {
- return GetBool();
+ return getBool();
}
//////////////////////////////////////////////////////////////////////////
const char *CScValue::DbgGetValString() {
- return GetString();
+ return getString();
}
//////////////////////////////////////////////////////////////////////////
IWmeDebugObject *CScValue::DbgGetValNative() {
- return GetNative();
+ return getNative();
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::DbgSetVal(int Value) {
- SetInt(Value);
+bool CScValue::DbgSetVal(int value) {
+ setInt(value);
return true;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::DbgSetVal(double Value) {
- SetFloat(Value);
+bool CScValue::DbgSetVal(double value) {
+ setFloat(value);
return true;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::DbgSetVal(bool Value) {
- SetBool(Value);
+bool CScValue::DbgSetVal(bool value) {
+ setBool(value);
return true;
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::DbgSetVal(const char *Value) {
- SetString(Value);
+bool CScValue::DbgSetVal(const char *value) {
+ setString(value);
return true;
}
//////////////////////////////////////////////////////////////////////////
bool CScValue::DbgSetVal() {
- SetNULL();
+ setNULL();
return true;
}
@@ -1020,13 +1020,13 @@ bool CScValue::DbgGetProperty(int index, const char **name, IWmeDebugProp **valu
}
//////////////////////////////////////////////////////////////////////////
-bool CScValue::DbgGetDescription(char *Buf, int BufSize) {
- if (_type == VAL_VARIABLE_REF) return _valRef->DbgGetDescription(Buf, BufSize);
+bool CScValue::DbgGetDescription(char *buf, int bufSize) {
+ if (_type == VAL_VARIABLE_REF) return _valRef->DbgGetDescription(buf, bufSize);
if (_type == VAL_NATIVE) {
- _valNative->scDebuggerDesc(Buf, BufSize);
+ _valNative->scDebuggerDesc(buf, bufSize);
} else {
- strncpy(Buf, GetString(), BufSize);
+ strncpy(buf, getString(), bufSize);
}
return true;
}
diff --git a/engines/wintermute/Base/scriptables/ScValue.h b/engines/wintermute/Base/scriptables/ScValue.h
index 90c783c9ce..3c25a4d1e7 100644
--- a/engines/wintermute/Base/scriptables/ScValue.h
+++ b/engines/wintermute/Base/scriptables/ScValue.h
@@ -43,49 +43,49 @@ class CBScriptable;
class CScValue : public CBBase, public IWmeDebugProp {
public:
- HRESULT DbgSendVariables(IWmeDebugClient *Client, EWmeDebuggerVariableType Type, CScScript *script, unsigned int ScopeID);
+ HRESULT DbgSendVariables(IWmeDebugClient *client, EWmeDebuggerVariableType type, CScScript *script, unsigned int scopeID);
- static int Compare(CScValue *Val1, CScValue *Val2);
- static int CompareStrict(CScValue *Val1, CScValue *Val2);
- TValType GetTypeTolerant();
+ static int compare(CScValue *Val1, CScValue *Val2);
+ static int compareStrict(CScValue *Val1, CScValue *Val2);
+ TValType getTypeTolerant();
void cleanup(bool IgnoreNatives = false);
DECLARE_PERSISTENT(CScValue, CBBase)
bool _isConstVar;
HRESULT saveAsText(CBDynBuffer *Buffer, int Indent);
- void SetValue(CScValue *Val);
+ void setValue(CScValue *Val);
bool _persistent;
- bool PropExists(const char *name);
- void Copy(CScValue *orig, bool CopyWhole = false);
- void SetStringVal(const char *Val);
- TValType GetType();
- bool GetBool(bool Default = false);
- int GetInt(int Default = 0);
- double GetFloat(double Default = 0.0f);
- const char *GetString();
- void *GetMemBuffer();
- CBScriptable *GetNative();
- HRESULT DeleteProp(const char *name);
- void DeleteProps();
- void CleanProps(bool IncludingNatives);
- void SetBool(bool Val);
- void SetInt(int Val);
- void SetFloat(double Val);
- void SetString(const char *Val);
- void SetString(const Common::String &Val);
- void SetNULL();
- void SetNative(CBScriptable *Val, bool Persistent = false);
- void SetObject();
- void SetReference(CScValue *Val);
- bool IsNULL();
- bool IsNative();
- bool IsString();
- bool IsBool();
- bool IsFloat();
- bool IsInt();
- bool IsObject();
- HRESULT SetProp(const char *name, CScValue *Val, bool CopyWhole = false, bool SetAsConst = false);
- CScValue *GetProp(const char *name);
+ bool propExists(const char *name);
+ void copy(CScValue *orig, bool copyWhole = false);
+ void setStringVal(const char *val);
+ TValType getType();
+ bool getBool(bool Default = false);
+ int getInt(int Default = 0);
+ double getFloat(double Default = 0.0f);
+ const char *getString();
+ void *getMemBuffer();
+ CBScriptable *getNative();
+ HRESULT deleteProp(const char *name);
+ void deleteProps();
+ void CleanProps(bool includingNatives);
+ void setBool(bool val);
+ void setInt(int val);
+ void setFloat(double val);
+ void setString(const char *val);
+ void setString(const Common::String &val);
+ void setNULL();
+ void setNative(CBScriptable *val, bool persistent = false);
+ void setObject();
+ void setReference(CScValue *val);
+ bool isNULL();
+ bool isNative();
+ bool isString();
+ bool isBool();
+ bool isFloat();
+ bool isInt();
+ bool isObject();
+ HRESULT setProp(const char *name, CScValue *val, bool copyWhole = false, bool setAsConst = false);
+ CScValue *getProp(const char *name);
CBScriptable *_valNative;
CScValue *_valRef;
protected:
@@ -104,11 +104,11 @@ public:
Common::HashMap<Common::String, CScValue *> _valObject;
Common::HashMap<Common::String, CScValue *>::iterator _valIter;
- bool SetProperty(const char *PropName, int Value);
- bool SetProperty(const char *PropName, const char *Value);
- bool SetProperty(const char *PropName, double Value);
- bool SetProperty(const char *PropName, bool Value);
- bool SetProperty(const char *PropName);
+ bool setProperty(const char *PropName, int Value);
+ bool setProperty(const char *PropName, const char *Value);
+ bool setProperty(const char *PropName, double Value);
+ bool setProperty(const char *PropName, bool Value);
+ bool setProperty(const char *PropName);
// IWmeDebugProp interface implementation
diff --git a/engines/wintermute/Base/scriptables/SxObject.cpp b/engines/wintermute/Base/scriptables/SxObject.cpp
index b4fd782f76..7f61a81b19 100644
--- a/engines/wintermute/Base/scriptables/SxObject.cpp
+++ b/engines/wintermute/Base/scriptables/SxObject.cpp
@@ -44,9 +44,9 @@ CBScriptable *makeSXObject(CBGame *inGame, CScStack *stack) {
//////////////////////////////////////////////////////////////////////////
CSXObject::CSXObject(CBGame *inGame, CScStack *stack): CBObject(inGame) {
- int NumParams = stack->pop()->GetInt(0);
+ int NumParams = stack->pop()->getInt(0);
for (int i = 0; i < NumParams; i++) {
- addScript(stack->pop()->GetString());
+ addScript(stack->pop()->getString());
}
}
diff --git a/engines/wintermute/UI/UIButton.cpp b/engines/wintermute/UI/UIButton.cpp
index 538f8eb886..69809874bf 100644
--- a/engines/wintermute/UI/UIButton.cpp
+++ b/engines/wintermute/UI/UIButton.cpp
@@ -675,11 +675,11 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
if (_fontDisable) Game->_fontStorage->RemoveFont(_fontDisable);
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
_fontDisable = NULL;
stack->pushBool(true);
} else {
- _fontDisable = Game->_fontStorage->AddFont(Val->GetString());
+ _fontDisable = Game->_fontStorage->AddFont(Val->getString());
stack->pushBool(_fontDisable != NULL);
}
return S_OK;
@@ -693,11 +693,11 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
if (_fontHover) Game->_fontStorage->RemoveFont(_fontHover);
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
_fontHover = NULL;
stack->pushBool(true);
} else {
- _fontHover = Game->_fontStorage->AddFont(Val->GetString());
+ _fontHover = Game->_fontStorage->AddFont(Val->getString());
stack->pushBool(_fontHover != NULL);
}
return S_OK;
@@ -711,11 +711,11 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
if (_fontPress) Game->_fontStorage->RemoveFont(_fontPress);
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
_fontPress = NULL;
stack->pushBool(true);
} else {
- _fontPress = Game->_fontStorage->AddFont(Val->GetString());
+ _fontPress = Game->_fontStorage->AddFont(Val->getString());
stack->pushBool(_fontPress != NULL);
}
return S_OK;
@@ -729,11 +729,11 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
if (_fontFocus) Game->_fontStorage->RemoveFont(_fontFocus);
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
_fontFocus = NULL;
stack->pushBool(true);
} else {
- _fontFocus = Game->_fontStorage->AddFont(Val->GetString());
+ _fontFocus = Game->_fontStorage->AddFont(Val->getString());
stack->pushBool(_fontFocus != NULL);
}
return S_OK;
@@ -747,7 +747,7 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
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;
@@ -788,7 +788,7 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
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;
@@ -828,7 +828,7 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
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;
@@ -868,7 +868,7 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
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;
@@ -922,13 +922,13 @@ HRESULT CUIButton::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CUIButton::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("button");
+ _scValue->setString("button");
return _scValue;
}
@@ -936,7 +936,7 @@ CScValue *CUIButton::scGetProperty(const char *name) {
// TextAlign
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TextAlign") == 0) {
- _scValue->SetInt(_align);
+ _scValue->setInt(_align);
return _scValue;
}
@@ -944,21 +944,21 @@ CScValue *CUIButton::scGetProperty(const char *name) {
// Focusable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Focusable") == 0) {
- _scValue->SetBool(_canFocus);
+ _scValue->setBool(_canFocus);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// Pressed
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Pressed") == 0) {
- _scValue->SetBool(_stayPressed);
+ _scValue->setBool(_stayPressed);
return _scValue;
}
//////////////////////////////////////////////////////////////////////////
// PixelPerfect
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PixelPerfect") == 0) {
- _scValue->SetBool(_pixelPerfect);
+ _scValue->setBool(_pixelPerfect);
return _scValue;
}
@@ -972,7 +972,7 @@ HRESULT CUIButton::scSetProperty(const char *name, CScValue *value) {
// TextAlign
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "TextAlign") == 0) {
- int i = value->GetInt();
+ int i = value->getInt();
if (i < 0 || i >= NUM_TEXT_ALIGN) i = 0;
_align = (TTextAlign)i;
return S_OK;
@@ -982,21 +982,21 @@ HRESULT CUIButton::scSetProperty(const char *name, CScValue *value) {
// Focusable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Focusable") == 0) {
- _canFocus = value->GetBool();
+ _canFocus = value->getBool();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// Pressed
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Pressed") == 0) {
- _stayPressed = value->GetBool();
+ _stayPressed = value->getBool();
return S_OK;
}
//////////////////////////////////////////////////////////////////////////
// PixelPerfect
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PixelPerfect") == 0) {
- _pixelPerfect = value->GetBool();
+ _pixelPerfect = value->getBool();
return S_OK;
}
diff --git a/engines/wintermute/UI/UIEdit.cpp b/engines/wintermute/UI/UIEdit.cpp
index eb59724089..c17bd405ab 100644
--- a/engines/wintermute/UI/UIEdit.cpp
+++ b/engines/wintermute/UI/UIEdit.cpp
@@ -369,7 +369,7 @@ HRESULT CUIEdit::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
stack->correctParams(1);
if (_fontSelected) Game->_fontStorage->RemoveFont(_fontSelected);
- _fontSelected = Game->_fontStorage->AddFont(stack->pop()->GetString());
+ _fontSelected = Game->_fontStorage->AddFont(stack->pop()->getString());
stack->pushBool(_fontSelected != NULL);
return S_OK;
@@ -381,13 +381,13 @@ HRESULT CUIEdit::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CUIEdit::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("editor");
+ _scValue->setString("editor");
return _scValue;
}
@@ -395,7 +395,7 @@ CScValue *CUIEdit::scGetProperty(const char *name) {
// SelStart
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SelStart") == 0) {
- _scValue->SetInt(_selStart);
+ _scValue->setInt(_selStart);
return _scValue;
}
@@ -403,7 +403,7 @@ CScValue *CUIEdit::scGetProperty(const char *name) {
// SelEnd
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SelEnd") == 0) {
- _scValue->SetInt(_selEnd);
+ _scValue->setInt(_selEnd);
return _scValue;
}
@@ -411,7 +411,7 @@ CScValue *CUIEdit::scGetProperty(const char *name) {
// CursorBlinkRate
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorBlinkRate") == 0) {
- _scValue->SetInt(_cursorBlinkRate);
+ _scValue->setInt(_cursorBlinkRate);
return _scValue;
}
@@ -419,7 +419,7 @@ CScValue *CUIEdit::scGetProperty(const char *name) {
// CursorChar
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorChar") == 0) {
- _scValue->SetString(_cursorChar);
+ _scValue->setString(_cursorChar);
return _scValue;
}
@@ -427,7 +427,7 @@ CScValue *CUIEdit::scGetProperty(const char *name) {
// FrameWidth
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FrameWidth") == 0) {
- _scValue->SetInt(_frameWidth);
+ _scValue->setInt(_frameWidth);
return _scValue;
}
@@ -435,7 +435,7 @@ CScValue *CUIEdit::scGetProperty(const char *name) {
// MaxLength
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MaxLength") == 0) {
- _scValue->SetInt(_maxLength);
+ _scValue->setInt(_maxLength);
return _scValue;
}
@@ -445,9 +445,9 @@ CScValue *CUIEdit::scGetProperty(const char *name) {
else if (strcmp(name, "Text") == 0) {
if (Game->_textEncoding == TEXT_UTF8) {
WideString wstr = StringUtil::AnsiToWide(_text);
- _scValue->SetString(StringUtil::WideToUtf8(wstr).c_str());
+ _scValue->setString(StringUtil::WideToUtf8(wstr).c_str());
} else {
- _scValue->SetString(_text);
+ _scValue->setString(_text);
}
return _scValue;
}
@@ -462,7 +462,7 @@ HRESULT CUIEdit::scSetProperty(const char *name, CScValue *value) {
// SelStart
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "SelStart") == 0) {
- _selStart = value->GetInt();
+ _selStart = value->getInt();
_selStart = MAX(_selStart, 0);
_selStart = MIN((size_t)_selStart, strlen(_text));
return S_OK;
@@ -472,7 +472,7 @@ HRESULT CUIEdit::scSetProperty(const char *name, CScValue *value) {
// SelEnd
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SelEnd") == 0) {
- _selEnd = value->GetInt();
+ _selEnd = value->getInt();
_selEnd = MAX(_selEnd, 0);
_selEnd = MIN((size_t)_selEnd, strlen(_text));
return S_OK;
@@ -482,7 +482,7 @@ HRESULT CUIEdit::scSetProperty(const char *name, CScValue *value) {
// CursorBlinkRate
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorBlinkRate") == 0) {
- _cursorBlinkRate = value->GetInt();
+ _cursorBlinkRate = value->getInt();
return S_OK;
}
@@ -490,7 +490,7 @@ HRESULT CUIEdit::scSetProperty(const char *name, CScValue *value) {
// CursorChar
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "CursorChar") == 0) {
- setCursorChar(value->GetString());
+ setCursorChar(value->getString());
return S_OK;
}
@@ -498,7 +498,7 @@ HRESULT CUIEdit::scSetProperty(const char *name, CScValue *value) {
// FrameWidth
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FrameWidth") == 0) {
- _frameWidth = value->GetInt();
+ _frameWidth = value->getInt();
return S_OK;
}
@@ -506,7 +506,7 @@ HRESULT CUIEdit::scSetProperty(const char *name, CScValue *value) {
// MaxLength
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "MaxLength") == 0) {
- _maxLength = value->GetInt();
+ _maxLength = value->getInt();
return S_OK;
}
@@ -515,10 +515,10 @@ HRESULT CUIEdit::scSetProperty(const char *name, CScValue *value) {
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Text") == 0) {
if (Game->_textEncoding == TEXT_UTF8) {
- WideString wstr = StringUtil::Utf8ToWide(value->GetString());
+ WideString wstr = StringUtil::Utf8ToWide(value->getString());
setText(StringUtil::WideToAnsi(wstr).c_str());
} else {
- setText(value->GetString());
+ setText(value->getString());
}
return S_OK;
}
diff --git a/engines/wintermute/UI/UIEntity.cpp b/engines/wintermute/UI/UIEntity.cpp
index 305f9642a5..a2b065dd3d 100644
--- a/engines/wintermute/UI/UIEntity.cpp
+++ b/engines/wintermute/UI/UIEntity.cpp
@@ -270,7 +270,7 @@ HRESULT CUIEntity::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
else if (strcmp(name, "SetEntity") == 0) {
stack->correctParams(1);
- const char *Filename = stack->pop()->GetString();
+ const char *Filename = stack->pop()->getString();
if (SUCCEEDED(setEntity(Filename)))
stack->pushBool(true);
@@ -286,13 +286,13 @@ HRESULT CUIEntity::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CUIEntity::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("entity container");
+ _scValue->setString("entity container");
return _scValue;
}
@@ -300,8 +300,8 @@ CScValue *CUIEntity::scGetProperty(const char *name) {
// Freezable
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Freezable") == 0) {
- if (_entity) _scValue->SetBool(_entity->_freezable);
- else _scValue->SetBool(false);
+ if (_entity) _scValue->setBool(_entity->_freezable);
+ else _scValue->setBool(false);
return _scValue;
}
@@ -315,7 +315,7 @@ HRESULT CUIEntity::scSetProperty(const char *name, CScValue *value) {
// Freezable
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Freezable") == 0) {
- if (_entity) _entity->makeFreezable(value->GetBool());
+ if (_entity) _entity->makeFreezable(value->getBool());
return S_OK;
} else return CUIObject::scSetProperty(name, value);
}
diff --git a/engines/wintermute/UI/UIObject.cpp b/engines/wintermute/UI/UIObject.cpp
index a713649604..0a387c48c8 100644
--- a/engines/wintermute/UI/UIObject.cpp
+++ b/engines/wintermute/UI/UIObject.cpp
@@ -146,11 +146,11 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
if (_font) Game->_fontStorage->RemoveFont(_font);
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
_font = NULL;
stack->pushBool(true);
} else {
- _font = Game->_fontStorage->AddFont(Val->GetString());
+ _font = Game->_fontStorage->AddFont(Val->getString());
stack->pushBool(_font != NULL);
}
return S_OK;
@@ -163,17 +163,17 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
stack->correctParams(1);
CScValue *Val = stack->pop();
- /* const char *Filename = */ Val->GetString();
+ /* const char *Filename = */ Val->getString();
delete _image;
_image = NULL;
- if (Val->IsNULL()) {
+ if (Val->isNULL()) {
stack->pushBool(true);
return S_OK;
}
_image = new CBSprite(Game);
- if (!_image || FAILED(_image->loadFile(Val->GetString()))) {
+ if (!_image || FAILED(_image->loadFile(Val->getString()))) {
delete _image;
_image = NULL;
stack->pushBool(false);
@@ -227,8 +227,8 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
bool found = false;
CScValue *val = stack->pop();
// find directly
- if (val->IsNative()) {
- CUIObject *widget = (CUIObject *)val->GetNative();
+ if (val->isNative()) {
+ CUIObject *widget = (CUIObject *)val->getNative();
for (i = 0; i < win->_widgets.GetSize(); i++) {
if (win->_widgets[i] == widget) {
found = true;
@@ -238,7 +238,7 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
}
// find by name
else {
- const char *name = val->GetString();
+ const char *name = val->getString();
for (i = 0; i < win->_widgets.GetSize(); i++) {
if (scumm_stricmp(win->_widgets[i]->_name, name) == 0) {
found = true;
@@ -318,13 +318,13 @@ HRESULT CUIObject::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CUIObject::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("ui_object");
+ _scValue->setString("ui_object");
return _scValue;
}
@@ -332,7 +332,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// Name
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Name") == 0) {
- _scValue->SetString(_name);
+ _scValue->setString(_name);
return _scValue;
}
@@ -340,7 +340,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// Parent (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Parent") == 0) {
- _scValue->SetNative(_parent, true);
+ _scValue->setNative(_parent, true);
return _scValue;
}
@@ -348,7 +348,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// ParentNotify
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ParentNotify") == 0) {
- _scValue->SetBool(_parentNotify);
+ _scValue->setBool(_parentNotify);
return _scValue;
}
@@ -356,7 +356,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// Width
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Width") == 0) {
- _scValue->SetInt(_width);
+ _scValue->setInt(_width);
return _scValue;
}
@@ -364,7 +364,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// Height
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Height") == 0) {
- _scValue->SetInt(_height);
+ _scValue->setInt(_height);
return _scValue;
}
@@ -372,7 +372,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// Visible
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Visible") == 0) {
- _scValue->SetBool(_visible);
+ _scValue->setBool(_visible);
return _scValue;
}
@@ -380,7 +380,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// Disabled
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Disabled") == 0) {
- _scValue->SetBool(_disable);
+ _scValue->setBool(_disable);
return _scValue;
}
@@ -388,7 +388,7 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// Text
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Text") == 0) {
- _scValue->SetString(_text);
+ _scValue->setString(_text);
return _scValue;
}
@@ -396,15 +396,15 @@ CScValue *CUIObject::scGetProperty(const char *name) {
// NextSibling (RO) / PrevSibling (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NextSibling") == 0 || strcmp(name, "PrevSibling") == 0) {
- _scValue->SetNULL();
+ _scValue->setNULL();
if (_parent && _parent->_type == UI_WINDOW) {
CUIWindow *win = (CUIWindow *)_parent;
for (int i = 0; i < win->_widgets.GetSize(); i++) {
if (win->_widgets[i] == this) {
if (strcmp(name, "NextSibling") == 0) {
- if (i < win->_widgets.GetSize() - 1) _scValue->SetNative(win->_widgets[i + 1], true);
+ if (i < win->_widgets.GetSize() - 1) _scValue->setNative(win->_widgets[i + 1], true);
} else {
- if (i > 0) _scValue->SetNative(win->_widgets[i - 1], true);
+ if (i > 0) _scValue->setNative(win->_widgets[i - 1], true);
}
break;
}
@@ -423,7 +423,7 @@ HRESULT CUIObject::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -431,7 +431,7 @@ HRESULT CUIObject::scSetProperty(const char *name, CScValue *value) {
// ParentNotify
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ParentNotify") == 0) {
- _parentNotify = value->GetBool();
+ _parentNotify = value->getBool();
return S_OK;
}
@@ -439,7 +439,7 @@ HRESULT CUIObject::scSetProperty(const char *name, CScValue *value) {
// Width
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Width") == 0) {
- _width = value->GetInt();
+ _width = value->getInt();
return S_OK;
}
@@ -447,7 +447,7 @@ HRESULT CUIObject::scSetProperty(const char *name, CScValue *value) {
// Height
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Height") == 0) {
- _height = value->GetInt();
+ _height = value->getInt();
return S_OK;
}
@@ -455,7 +455,7 @@ HRESULT CUIObject::scSetProperty(const char *name, CScValue *value) {
// Visible
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Visible") == 0) {
- _visible = value->GetBool();
+ _visible = value->getBool();
return S_OK;
}
@@ -463,7 +463,7 @@ HRESULT CUIObject::scSetProperty(const char *name, CScValue *value) {
// Disabled
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Disabled") == 0) {
- _disable = value->GetBool();
+ _disable = value->getBool();
return S_OK;
}
@@ -471,7 +471,7 @@ HRESULT CUIObject::scSetProperty(const char *name, CScValue *value) {
// Text
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Text") == 0) {
- setText(value->GetString());
+ setText(value->getString());
return S_OK;
}
diff --git a/engines/wintermute/UI/UIText.cpp b/engines/wintermute/UI/UIText.cpp
index 414a237556..0d7966188e 100644
--- a/engines/wintermute/UI/UIText.cpp
+++ b/engines/wintermute/UI/UIText.cpp
@@ -403,13 +403,13 @@ HRESULT CUIText::scCallMethod(CScScript *script, CScStack *stack, CScStack *this
//////////////////////////////////////////////////////////////////////////
CScValue *CUIText::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("static");
+ _scValue->setString("static");
return _scValue;
}
@@ -417,7 +417,7 @@ CScValue *CUIText::scGetProperty(const char *name) {
// TextAlign
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "TextAlign") == 0) {
- _scValue->SetInt(_textAlign);
+ _scValue->setInt(_textAlign);
return _scValue;
}
@@ -425,7 +425,7 @@ CScValue *CUIText::scGetProperty(const char *name) {
// VerticalAlign
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "VerticalAlign") == 0) {
- _scValue->SetInt(_verticalAlign);
+ _scValue->setInt(_verticalAlign);
return _scValue;
}
@@ -439,7 +439,7 @@ HRESULT CUIText::scSetProperty(const char *name, CScValue *value) {
// TextAlign
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "TextAlign") == 0) {
- int i = value->GetInt();
+ int i = value->getInt();
if (i < 0 || i >= NUM_TEXT_ALIGN) i = 0;
_textAlign = (TTextAlign)i;
return S_OK;
@@ -449,7 +449,7 @@ HRESULT CUIText::scSetProperty(const char *name, CScValue *value) {
// VerticalAlign
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "VerticalAlign") == 0) {
- int i = value->GetInt();
+ int i = value->getInt();
if (i < 0 || i >= NUM_VERTICAL_ALIGN) i = 0;
_verticalAlign = (TVerticalAlign)i;
return S_OK;
diff --git a/engines/wintermute/UI/UIWindow.cpp b/engines/wintermute/UI/UIWindow.cpp
index 24e2255d2b..ffa3df97c4 100644
--- a/engines/wintermute/UI/UIWindow.cpp
+++ b/engines/wintermute/UI/UIWindow.cpp
@@ -697,13 +697,13 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
if (strcmp(name, "GetWidget") == 0 || strcmp(name, "GetControl") == 0) {
stack->correctParams(1);
CScValue *val = stack->pop();
- if (val->GetType() == VAL_INT) {
- int widget = val->GetInt();
+ if (val->getType() == VAL_INT) {
+ int widget = val->getInt();
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) {
+ if (scumm_stricmp(_widgets[i]->_name, val->getString()) == 0) {
stack->pushNative(_widgets[i], true);
return S_OK;
}
@@ -721,7 +721,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
stack->correctParams(1);
if (_fontInactive) Game->_fontStorage->RemoveFont(_fontInactive);
- _fontInactive = Game->_fontStorage->AddFont(stack->pop()->GetString());
+ _fontInactive = Game->_fontStorage->AddFont(stack->pop()->getString());
stack->pushBool(_fontInactive != NULL);
return S_OK;
@@ -735,7 +735,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
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;
@@ -818,8 +818,8 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
cleanup();
- if (!Val->IsNULL()) {
- stack->pushBool(SUCCEEDED(loadFile(Val->GetString())));
+ if (!Val->isNULL()) {
+ stack->pushBool(SUCCEEDED(loadFile(Val->getString())));
} else stack->pushBool(true);
return S_OK;
@@ -833,7 +833,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
CUIButton *Btn = new CUIButton(Game);
- if (!Val->IsNULL()) Btn->setName(Val->GetString());
+ if (!Val->isNULL()) Btn->setName(Val->getString());
stack->pushNative(Btn, true);
Btn->_parent = this;
@@ -850,7 +850,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
CUIText *Sta = new CUIText(Game);
- if (!Val->IsNULL()) Sta->setName(Val->GetString());
+ if (!Val->isNULL()) Sta->setName(Val->getString());
stack->pushNative(Sta, true);
Sta->_parent = this;
@@ -867,7 +867,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
CUIEdit *Edi = new CUIEdit(Game);
- if (!Val->IsNULL()) Edi->setName(Val->GetString());
+ if (!Val->isNULL()) Edi->setName(Val->getString());
stack->pushNative(Edi, true);
Edi->_parent = this;
@@ -884,7 +884,7 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
CScValue *Val = stack->pop();
CUIWindow *Win = new CUIWindow(Game);
- if (!Val->IsNULL()) Win->setName(Val->GetString());
+ if (!Val->isNULL()) Win->setName(Val->getString());
stack->pushNative(Win, true);
Win->_parent = this;
@@ -899,13 +899,13 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
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();
- CUIObject *obj = (CUIObject *)val->GetNative();
+ CUIObject *obj = (CUIObject *)val->getNative();
for (int i = 0; i < _widgets.GetSize(); i++) {
if (_widgets[i] == obj) {
delete _widgets[i];
_widgets.RemoveAt(i);
- if (val->GetType() == VAL_VARIABLE_REF) val->SetNULL();
+ if (val->getType() == VAL_VARIABLE_REF) val->setNULL();
}
}
stack->pushNULL();
@@ -918,13 +918,13 @@ HRESULT CUIWindow::scCallMethod(CScScript *script, CScStack *stack, CScStack *th
//////////////////////////////////////////////////////////////////////////
CScValue *CUIWindow::scGetProperty(const char *name) {
- _scValue->SetNULL();
+ _scValue->setNULL();
//////////////////////////////////////////////////////////////////////////
// Type
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Type") == 0) {
- _scValue->SetString("window");
+ _scValue->setString("window");
return _scValue;
}
@@ -932,7 +932,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// NumWidgets / NumControls (RO)
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "NumWidgets") == 0 || strcmp(name, "NumControls") == 0) {
- _scValue->SetInt(_widgets.GetSize());
+ _scValue->setInt(_widgets.GetSize());
return _scValue;
}
@@ -940,7 +940,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// Exclusive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Exclusive") == 0) {
- _scValue->SetBool(_mode == WINDOW_EXCLUSIVE);
+ _scValue->setBool(_mode == WINDOW_EXCLUSIVE);
return _scValue;
}
@@ -948,7 +948,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// SystemExclusive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SystemExclusive") == 0) {
- _scValue->SetBool(_mode == WINDOW_SYSTEM_EXCLUSIVE);
+ _scValue->setBool(_mode == WINDOW_SYSTEM_EXCLUSIVE);
return _scValue;
}
@@ -956,7 +956,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// Menu
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Menu") == 0) {
- _scValue->SetBool(_isMenu);
+ _scValue->setBool(_isMenu);
return _scValue;
}
@@ -964,7 +964,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// InGame
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InGame") == 0) {
- _scValue->SetBool(_inGame);
+ _scValue->setBool(_inGame);
return _scValue;
}
@@ -972,7 +972,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// PauseMusic
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PauseMusic") == 0) {
- _scValue->SetBool(_pauseMusic);
+ _scValue->setBool(_pauseMusic);
return _scValue;
}
@@ -980,7 +980,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// ClipContents
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ClipContents") == 0) {
- _scValue->SetBool(_clipContents);
+ _scValue->setBool(_clipContents);
return _scValue;
}
@@ -988,7 +988,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// Transparent
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Transparent") == 0) {
- _scValue->SetBool(_transparent);
+ _scValue->setBool(_transparent);
return _scValue;
}
@@ -996,7 +996,7 @@ CScValue *CUIWindow::scGetProperty(const char *name) {
// FadeColor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeColor") == 0) {
- _scValue->SetInt((int)_fadeColor);
+ _scValue->setInt((int)_fadeColor);
return _scValue;
}
@@ -1010,7 +1010,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// Name
//////////////////////////////////////////////////////////////////////////
if (strcmp(name, "Name") == 0) {
- setName(value->GetString());
+ setName(value->getString());
return S_OK;
}
@@ -1018,7 +1018,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// Menu
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Menu") == 0) {
- _isMenu = value->GetBool();
+ _isMenu = value->getBool();
return S_OK;
}
@@ -1026,7 +1026,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// InGame
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "InGame") == 0) {
- _inGame = value->GetBool();
+ _inGame = value->getBool();
return S_OK;
}
@@ -1034,7 +1034,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// PauseMusic
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "PauseMusic") == 0) {
- _pauseMusic = value->GetBool();
+ _pauseMusic = value->getBool();
return S_OK;
}
@@ -1042,7 +1042,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// ClipContents
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "ClipContents") == 0) {
- _clipContents = value->GetBool();
+ _clipContents = value->getBool();
return S_OK;
}
@@ -1050,7 +1050,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// Transparent
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Transparent") == 0) {
- _transparent = value->GetBool();
+ _transparent = value->getBool();
return S_OK;
}
@@ -1058,7 +1058,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// FadeColor
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "FadeColor") == 0) {
- _fadeColor = (uint32)value->GetInt();
+ _fadeColor = (uint32)value->getInt();
_fadeBackground = (_fadeColor != 0);
return S_OK;
}
@@ -1067,7 +1067,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// Exclusive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "Exclusive") == 0) {
- if (value->GetBool())
+ if (value->getBool())
goExclusive();
else {
close();
@@ -1080,7 +1080,7 @@ HRESULT CUIWindow::scSetProperty(const char *name, CScValue *value) {
// SystemExclusive
//////////////////////////////////////////////////////////////////////////
else if (strcmp(name, "SystemExclusive") == 0) {
- if (value->GetBool())
+ if (value->getBool())
goSystemExclusive();
else {
close();