diff options
| -rw-r--r-- | engines/avalanche/dialogs.cpp | 28 | ||||
| -rw-r--r-- | engines/avalanche/graphics.cpp | 30 | ||||
| -rw-r--r-- | engines/avalanche/graphics.h | 1 | 
3 files changed, 32 insertions, 27 deletions
| diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp index 9367c072c2..d2c413163b 100644 --- a/engines/avalanche/dialogs.cpp +++ b/engines/avalanche/dialogs.cpp @@ -419,34 +419,8 @@ void Dialogs::drawScroll(DialogFunctionType modeFunc) {  	if ((1 <= _useIcon) && (_useIcon <= 34))  		lx += kHalfIconWidth; -	_vm->_graphics->_scrolls.copyFrom(_vm->_graphics->_surface); -  	CursorMan.showMouse(false); - -	// The right corners of the scroll. -	_vm->_graphics->drawPieSlice(mx + lx, my - ly, 0, 90, 15, kColorLightgray); -	_vm->_graphics->drawPieSlice(mx + lx, my + ly, 270, 360, 15, kColorLightgray); -	_vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx + lx, my - ly, 0, 90, 15, kColorRed); -	_vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx + lx, my + ly, 270, 360, 15, kColorRed); - -	// The body of the scroll. -	_vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly, mx + lx, my + ly + 6), kColorLightgray); -	_vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly + 1), kColorLightgray); -	_vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx + lx + 15, my + ly + 1), kColorLightgray); - -	// The left corners of the scroll. -	_vm->_graphics->drawPieSlice(mx - lx - 31, my - ly, 0, 180, 15, kColorDarkgray); -	_vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx - lx - 31, my - ly, 0, 180, 15, kColorRed); -	_vm->_graphics->_scrolls.drawLine(mx - lx - 31 - 15, my - ly, mx - lx - 31 + 15, my - ly, kColorRed); -	_vm->_graphics->drawPieSlice(mx - lx - 31, my + ly, 180, 360, 15, kColorDarkgray); -	_vm->_graphics->drawArc(_vm->_graphics->_scrolls, mx - lx - 31, my + ly, 180, 360, 15, kColorRed); -	_vm->_graphics->_scrolls.drawLine(mx - lx - 31 - 15, my + ly, mx - lx - 31 + 15, my + ly, kColorRed); - -	// The rear borders of the scroll. -	_vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly - 5), kColorRed); -	_vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly + 6, mx + lx, my + ly + 7), kColorRed); -	_vm->_graphics->_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx - lx - 14, my + ly), kColorRed); -	_vm->_graphics->_scrolls.fillRect(Common::Rect(mx + lx + 15, my - ly, mx + lx + 16, my + ly), kColorRed); +	_vm->_graphics->drawScroll(mx, lx, my, ly);  	mx -= lx;  	my -= ly + 2; diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp index 007c5101f3..1961ce9a39 100644 --- a/engines/avalanche/graphics.cpp +++ b/engines/avalanche/graphics.cpp @@ -363,6 +363,36 @@ void Graphics::drawShadowBox(int16 x1, int16 y1, int16 x2, int16 y2, Common::Str  	CursorMan.showMouse(true);  } +void Graphics::drawScroll(int mx, int lx, int my, int ly) { +	_scrolls.copyFrom(_surface); + +	// The right corners of the scroll. +	drawPieSlice(mx + lx, my - ly, 0, 90, 15, kColorLightgray); +	drawPieSlice(mx + lx, my + ly, 270, 360, 15, kColorLightgray); +	drawArc(_scrolls, mx + lx, my - ly, 0, 90, 15, kColorRed); +	drawArc(_scrolls, mx + lx, my + ly, 270, 360, 15, kColorRed); + +	// The body of the scroll. +	_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly, mx + lx, my + ly + 6), kColorLightgray); +	_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly + 1), kColorLightgray); +	_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx + lx + 15, my + ly + 1), kColorLightgray); + +	// The left corners of the scroll. +	drawPieSlice(mx - lx - 31, my - ly, 0, 180, 15, kColorDarkgray); +	drawArc(_scrolls, mx - lx - 31, my - ly, 0, 180, 15, kColorRed); +	_scrolls.drawLine(mx - lx - 31 - 15, my - ly, mx - lx - 31 + 15, my - ly, kColorRed); +	drawPieSlice(mx - lx - 31, my + ly, 180, 360, 15, kColorDarkgray); +	drawArc(_scrolls, mx - lx - 31, my + ly, 180, 360, 15, kColorRed); +	_scrolls.drawLine(mx - lx - 31 - 15, my + ly, mx - lx - 31 + 15, my + ly, kColorRed); + +	// The rear borders of the scroll. +	_scrolls.fillRect(Common::Rect(mx - lx - 30, my - ly - 6, mx + lx, my - ly - 5), kColorRed); +	_scrolls.fillRect(Common::Rect(mx - lx - 30, my + ly + 6, mx + lx, my + ly + 7), kColorRed); +	_scrolls.fillRect(Common::Rect(mx - lx - 15, my - ly, mx - lx - 14, my + ly), kColorRed); +	_scrolls.fillRect(Common::Rect(mx + lx + 15, my - ly, mx + lx + 16, my + ly), kColorRed); + +} +  ::Graphics::Surface Graphics::loadPictureGraphic(Common::File &file) {  	// This function mimics Pascal's getimage().  	// The height and the width are stored in 2-2 bytes. We have to add 1 to each because Pascal stores the value of them -1. diff --git a/engines/avalanche/graphics.h b/engines/avalanche/graphics.h index de2723115d..8fdc39f34f 100644 --- a/engines/avalanche/graphics.h +++ b/engines/avalanche/graphics.h @@ -81,6 +81,7 @@ public:  	void drawDirection(int index, int x, int y);  	void drawScrollShadow(int16 x1, int16 y1, int16 x2, int16 y2);  	void drawShadowBox(int16 x1, int16 y1, int16 x2, int16 y2, Common::String text); +	void drawScroll(int mx, int lx, int my, int ly);  	void clearAlso();  	void clearTextBar();  	void setAlsoLine(int x1, int y1, int x2, int y2, Color color); | 
