aboutsummaryrefslogtreecommitdiff
path: root/engines/bladerunner/script
diff options
context:
space:
mode:
Diffstat (limited to 'engines/bladerunner/script')
-rw-r--r--engines/bladerunner/script/script.cpp39
-rw-r--r--engines/bladerunner/script/script.h2
2 files changed, 18 insertions, 23 deletions
diff --git a/engines/bladerunner/script/script.cpp b/engines/bladerunner/script/script.cpp
index ba78a42b4c..32528c9728 100644
--- a/engines/bladerunner/script/script.cpp
+++ b/engines/bladerunner/script/script.cpp
@@ -32,6 +32,7 @@
#include "bladerunner/audio_speech.h"
#include "bladerunner/crimes_database.h"
#include "bladerunner/combat.h"
+#include "bladerunner/dialogue_menu.h"
#include "bladerunner/gameflags.h"
#include "bladerunner/gameinfo.h"
#include "bladerunner/items.h"
@@ -896,47 +897,44 @@ void ScriptBase::Setup_Scene_Information(float actorX, float actorY, float actor
}
bool ScriptBase::Dialogue_Menu_Appear(int x, int y) {
- //TODO
- warning("Dialogue_Menu_Appear(%d, %d)", x, y);
+ if (!_vm->_dialogueMenu->isVisible()) {
+ return _vm->_dialogueMenu->show();
+ }
return false;
}
bool ScriptBase::Dialogue_Menu_Disappear() {
- //TODO
- warning("Dialogue_Menu_Disappear()");
+ if (_vm->_dialogueMenu->isVisible()) {
+ return _vm->_dialogueMenu->hide();
+ }
return false;
}
bool ScriptBase::Dialogue_Menu_Clear_List() {
- //TODO
- warning("Dialogue_Menu_Clear_List()");
+ _vm->_dialogueMenu->clearList();
return false;
}
bool ScriptBase::Dialogue_Menu_Add_To_List(int answer) {
- //TODO
- warning("Dialogue_Menu_Add_To_List(%d)", answer);
+ _vm->_dialogueMenu->addToList(answer, 0, 5, 5, 5);
return false;
}
bool ScriptBase::Dialogue_Menu_Add_DONE_To_List(int answerValue) {
- //TODO
- warning("Dialogue_Menu_Add_DONE_To_List(%d)", answerValue);
+ _vm->_dialogueMenu->addToList(answerValue, 1, 0, 0, 0);
return false;
}
-// Dialogue_Menu_Add_To_List_Never_Repeat_Once_Selected
+bool ScriptBase::Dialogue_Menu_Add_To_List_Never_Repeat_Once_Selected(int answer) {
+ return _vm->_dialogueMenu->addToListNeverRepeatOnceSelected(answer, 5, 5, 5);
+}
bool ScriptBase::DM_Add_To_List(int answer, int a2, int a3, int a4) {
- //TODO
- warning("DM_Add_To_List(%d, %d, %d, %d)", answer, a2, a3, a4);
- return false;
+ return _vm->_dialogueMenu->addToList(answer, 0, a2, a3, a4);
}
bool ScriptBase::DM_Add_To_List_Never_Repeat_Once_Selected(int answer, int a2, int a3, int a4) {
- //TODO
- warning("DM_Add_To_List_Never_Repeat_Once_Selected(%d, %d, %d, %d)", answer, a2, a3, a4);
- return false;
+ return _vm->_dialogueMenu->addToListNeverRepeatOnceSelected(answer, a2, a3, a4);
}
void ScriptBase::Dialogue_Menu_Remove_From_List(int answer) {
@@ -946,14 +944,11 @@ void ScriptBase::Dialogue_Menu_Remove_From_List(int answer) {
int ScriptBase::Dialogue_Menu_Query_Input() {
//TODO
- warning("Dialogue_Menu_Query_Input()");
- return 0;
+ return _vm->_dialogueMenu->queryInput();
}
int ScriptBase::Dialogue_Menu_Query_List_Size() {
- //TODO
- warning("Dialogue_Menu_Query_List_Size()");
- return 0;
+ return _vm->_dialogueMenu->listSize();
}
void ScriptBase::Scene_Exit_Add_2D_Exit(int index, int left, int top, int right, int down, int type) {
diff --git a/engines/bladerunner/script/script.h b/engines/bladerunner/script/script.h
index 94112a9e42..93c955dedd 100644
--- a/engines/bladerunner/script/script.h
+++ b/engines/bladerunner/script/script.h
@@ -587,7 +587,7 @@ protected:
bool Dialogue_Menu_Clear_List();
bool Dialogue_Menu_Add_To_List(int answer);
bool Dialogue_Menu_Add_DONE_To_List(int answer);
- // Dialogue_Menu_Add_To_List_Never_Repeat_Once_Selected
+ bool Dialogue_Menu_Add_To_List_Never_Repeat_Once_Selected(int answer);
bool DM_Add_To_List(int answer, int a2, int a3, int a4);
bool DM_Add_To_List_Never_Repeat_Once_Selected(int answer, int a2, int a3, int a4);
void Dialogue_Menu_Remove_From_List(int answer);