aboutsummaryrefslogtreecommitdiff
path: root/sword2/speech.cpp
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-11-11 07:43:02 +0000
committerTorbjörn Andersson2003-11-11 07:43:02 +0000
commit446a01ba09192a132ee9b6e40129161a7ec09be0 (patch)
tree720edb242a2b0ef813092c01d5efc76d000e37ff /sword2/speech.cpp
parent0bcc7ce80eb6a8daa35bf2591281974cceff8078 (diff)
downloadscummvm-rg350-446a01ba09192a132ee9b6e40129161a7ec09be0.tar.gz
scummvm-rg350-446a01ba09192a132ee9b6e40129161a7ec09be0.tar.bz2
scummvm-rg350-446a01ba09192a132ee9b6e40129161a7ec09be0.zip
Moved low-level keyboard and mouse handling to a new Input class, and
renamed the Display class Graphics for no better reason than me liking the phrase "sound and graphics" better than "sound and display". svn-id: r11258
Diffstat (limited to 'sword2/speech.cpp')
-rw-r--r--sword2/speech.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/sword2/speech.cpp b/sword2/speech.cpp
index 6b64558b72..f81c31f4a1 100644
--- a/sword2/speech.cpp
+++ b/sword2/speech.cpp
@@ -172,17 +172,17 @@ int32 Logic::fnChoose(int32 *params) {
if (j < IN_SUBJECT) {
debug(5, " ICON res %d for %d", _subjectList[j].res, j);
icon = res_man->openResource(_subjectList[j].res) + sizeof(_standardHeader) + RDMENU_ICONWIDE * RDMENU_ICONDEEP;
- g_display->setMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);
+ g_graphics->setMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);
res_man->closeResource(_subjectList[j].res);
} else {
//no icon here
debug(5, " NULL for %d", j);
- g_display->setMenuIcon(RDMENU_BOTTOM, (uint8) j, NULL);
+ g_graphics->setMenuIcon(RDMENU_BOTTOM, (uint8) j, NULL);
}
}
// start menus appearing
- g_display->showMenu(RDMENU_BOTTOM);
+ g_graphics->showMenu(RDMENU_BOTTOM);
// lets have the mouse pointer back
_vm->setMouse(NORMAL_MOUSE_ID);
@@ -195,7 +195,7 @@ int32 Logic::fnChoose(int32 *params) {
// menu is there - we're just waiting for a click
debug(5, "choosing");
- me = MouseEvent();
+ me = g_input->mouseEvent();
// we only care about left clicks
// we ignore mouse releases
@@ -205,9 +205,9 @@ int32 Logic::fnChoose(int32 *params) {
// if so then end the choose, highlight only the
// chosen, blank the mouse and return the ref code * 8
- if (g_display->_mouseY > 399 && g_display->_mouseX >= 24 && g_display->_mouseX < 640 - 24) {
+ if (g_input->_mouseY > 399 && g_input->_mouseX >= 24 && g_input->_mouseX < 640 - 24) {
//which are we over?
- hit = (g_display->_mouseX - 24) / 40;
+ hit = (g_input->_mouseX - 24) / 40;
//clicked on something - what button?
if (hit < IN_SUBJECT) {
@@ -220,7 +220,7 @@ int32 Logic::fnChoose(int32 *params) {
// change all others to grey
if (j != hit) {
icon = res_man->openResource( _subjectList[j].res ) + sizeof(_standardHeader);
- g_display->setMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);
+ g_graphics->setMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);
res_man->closeResource(_subjectList[j].res);
}
}
@@ -279,9 +279,9 @@ int32 Logic::fnEndConversation(int32 *params) {
// params: none
- g_display->hideMenu(RDMENU_BOTTOM);
+ g_graphics->hideMenu(RDMENU_BOTTOM);
- if (g_display->_mouseY > 399) {
+ if (g_input->_mouseY > 399) {
// will wait for cursor to move off the bottom menu
_vm->_mouseMode = MOUSE_holding;
debug(5, " holding");
@@ -1233,8 +1233,8 @@ int32 Logic::fnISpeak(int32 *params) {
// so that we can go to the options panel while text & speech is
// being tested
- if (SYSTEM_TESTING_TEXT == 0 || g_display->_mouseY > 0) {
- me = MouseEvent();
+ if (SYSTEM_TESTING_TEXT == 0 || g_input->_mouseY > 0) {
+ me = g_input->mouseEvent();
// Note that we now have TWO click-delays - one for LEFT
// button, one for RIGHT BUTTON
@@ -1258,7 +1258,7 @@ int32 Logic::fnISpeak(int32 *params) {
do {
// trash anything thats buffered
- me = MouseEvent();
+ me = g_input->mouseEvent();
} while (me);
speechFinished = 1;