aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/Ad
diff options
context:
space:
mode:
Diffstat (limited to 'engines/wintermute/Ad')
-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
10 files changed, 351 insertions, 351 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;
}