diff options
| author | Torbjörn Andersson | 2003-10-15 06:40:31 +0000 | 
|---|---|---|
| committer | Torbjörn Andersson | 2003-10-15 06:40:31 +0000 | 
| commit | 8b42d65a7e922a9b9241ebe509968331fe958fb6 (patch) | |
| tree | 5dcef554baa412cf676beb11c453d54957ecaa8c /sword2/speech.cpp | |
| parent | f74a0c18aa2ef244f987c31d3d146207c72e81ee (diff) | |
| download | scummvm-rg350-8b42d65a7e922a9b9241ebe509968331fe958fb6.tar.gz scummvm-rg350-8b42d65a7e922a9b9241ebe509968331fe958fb6.tar.bz2 scummvm-rg350-8b42d65a7e922a9b9241ebe509968331fe958fb6.zip | |
Dumped most of the remaining "driver" code into a new "Display" class. This
touches a lot of the code, of course, and adds yet another global variable
(temporarily, I hope), but everything still seems to work.
Knock on wood.
svn-id: r10806
Diffstat (limited to 'sword2/speech.cpp')
| -rw-r--r-- | sword2/speech.cpp | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/sword2/speech.cpp b/sword2/speech.cpp index b09f46155d..42ac9ef551 100644 --- a/sword2/speech.cpp +++ b/sword2/speech.cpp @@ -220,17 +220,17 @@ int32 FN_choose(int32 *params) {  			if (j < IN_SUBJECT) {  				debug(5, " ICON res %d for %d", subject_list[j].res, j);  				icon = res_man.open(subject_list[j].res) + sizeof(_standardHeader) + RDMENU_ICONWIDE * RDMENU_ICONDEEP; -				SetMenuIcon(RDMENU_BOTTOM, (uint8) j, icon); +				g_display->setMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);  				res_man.close(subject_list[j].res);  			} else {  				//no icon here  				debug(5, " NULL for %d", j); -				SetMenuIcon(RDMENU_BOTTOM, (uint8) j, NULL); +				g_display->setMenuIcon(RDMENU_BOTTOM, (uint8) j, NULL);  			}  		}  		// start menus appearing -		ShowMenu(RDMENU_BOTTOM); +		g_display->showMenu(RDMENU_BOTTOM);  		// lets have the mouse pointer back  		Set_mouse(NORMAL_MOUSE_ID); @@ -253,9 +253,9 @@ int32 FN_choose(int32 *params) {  			// if so then end the choose, highlight only the  			// chosen, blank the mouse and return the ref code * 8 -			if (mousey > 399 && mousex >= 24 && mousex < 640 - 24) { +			if (g_display->_mouseY > 399 && g_display->_mouseX >= 24 && g_display->_mouseX < 640 - 24) {  				//which are we over? -				hit = (mousex - 24) / 40; +				hit = (g_display->_mouseX - 24) / 40;  				//clicked on something - what button?  				if (hit < IN_SUBJECT) { @@ -268,7 +268,7 @@ int32 FN_choose(int32 *params) {  						// change all others to grey  						if (j != hit) {  							icon = res_man.open( subject_list[j].res ) + sizeof(_standardHeader); -							SetMenuIcon(RDMENU_BOTTOM, (uint8) j, icon); +							g_display->setMenuIcon(RDMENU_BOTTOM, (uint8) j, icon);  							res_man.close(subject_list[j].res);  						}  					} @@ -338,9 +338,9 @@ int32 FN_end_conversation(int32 *params) {  	debug(5, "FN_end_conversation"); -	HideMenu(RDMENU_BOTTOM); +	g_display->hideMenu(RDMENU_BOTTOM); -	if (mousey > 399) { +	if (g_display->_mouseY > 399) {  		// will wait for cursor to move off the bottom menu  		mouse_mode = MOUSE_holding;  		debug(5, "   holding"); @@ -1302,7 +1302,7 @@ int32 FN_i_speak(int32 *params) {  #ifdef _SWORD2_DEBUG  	// so that we can go to the options panel while text & speech is  	// being tested -	if (SYSTEM_TESTING_TEXT == 0 || mousey > 0) { +	if (SYSTEM_TESTING_TEXT == 0 || g_display->_mouseY > 0) {  #endif  	me = MouseEvent(); | 
