aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlolbot-iichan2018-08-27 01:02:17 +0300
committerFilippos Karapetis2020-01-11 18:05:39 +0200
commit04d47de5d68cccae617f31b55aebfc4de11252cb (patch)
tree14f49ada49701e2b3145151df2eb730e2aa3d005
parent46f523d773676a29f18bf0333d646d1d0d6557b5 (diff)
downloadscummvm-rg350-04d47de5d68cccae617f31b55aebfc4de11252cb.tar.gz
scummvm-rg350-04d47de5d68cccae617f31b55aebfc4de11252cb.tar.bz2
scummvm-rg350-04d47de5d68cccae617f31b55aebfc4de11252cb.zip
WINTERMUTE: Add FoxTail item methods
FoxTail have flexible cursor settings system that require things like toggling visability of inventory items.
-rw-r--r--engines/wintermute/ad/ad_game.cpp13
-rw-r--r--engines/wintermute/ad/ad_item.cpp34
2 files changed, 47 insertions, 0 deletions
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index dff0216c10..a6730feecd 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -873,6 +873,19 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
return STATUS_OK;
}
+#ifdef ENABLE_FOXTAIL
+ //////////////////////////////////////////////////////////////////////////
+ // [FoxTail] SetInventoryBoxHideSelected
+ // Used while changing cursor type at some included script
+ // Return value is never used
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "SetInventoryBoxHideSelected") == 0) {
+ stack->correctParams(1);
+ _inventoryBox->_hideSelected = stack->pop()->getBool(false);
+ stack->pushNULL();
+ return STATUS_OK;
+ }
+#endif
else {
return BaseGame::scCallMethod(script, stack, thisStack, name);
diff --git a/engines/wintermute/ad/ad_item.cpp b/engines/wintermute/ad/ad_item.cpp
index b414fbdadf..cebc6980d9 100644
--- a/engines/wintermute/ad/ad_item.cpp
+++ b/engines/wintermute/ad/ad_item.cpp
@@ -535,6 +535,23 @@ bool AdItem::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
return STATUS_OK;
}
+#ifdef ENABLE_FOXTAIL
+ //////////////////////////////////////////////////////////////////////////
+ // [FoxTail] RemoveNormalCursor
+ // Used while changing cursor type at some included script
+ // Return value is never used
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "RemoveNormalCursor") == 0) {
+ stack->correctParams(0);
+
+ delete _cursorNormal;
+ _cursorNormal = nullptr;
+
+ stack->pushNULL();
+ return STATUS_OK;
+ }
+#endif
+
//////////////////////////////////////////////////////////////////////////
// GetNormalCursor
//////////////////////////////////////////////////////////////////////////
@@ -584,6 +601,23 @@ bool AdItem::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
return STATUS_OK;
}
+#ifdef ENABLE_FOXTAIL
+ //////////////////////////////////////////////////////////////////////////
+ // [FoxTail] RemoveHoverCursor
+ // Used while changing cursor type at some included script
+ // Return value is never used
+ //////////////////////////////////////////////////////////////////////////
+ else if (strcmp(name, "RemoveHoverCursor") == 0) {
+ stack->correctParams(0);
+
+ delete _cursorHover;
+ _cursorHover = nullptr;
+
+ stack->pushNULL();
+ return STATUS_OK;
+ }
+#endif
+
//////////////////////////////////////////////////////////////////////////
// GetHoverCursor
//////////////////////////////////////////////////////////////////////////