diff options
| -rw-r--r-- | engines/kyra/screen.cpp | 20 | ||||
| -rw-r--r-- | engines/kyra/screen.h | 3 | 
2 files changed, 21 insertions, 2 deletions
| diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index f7f579b0e1..61fed19cbc 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1233,10 +1233,12 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int  		0, 0, 0,  		&Screen::drawShapePlotType8,	// used by Kyra 2  		&Screen::drawShapePlotType9,	// used by Kyra 1 -		0, 0, +		0,  +		&Screen::drawShapePlotType11_15,// used by Kyra 1  		&Screen::drawShapePlotType12,	// used by Kyra 2  		&Screen::drawShapePlotType13,	// used by Kyra 1  		&Screen::drawShapePlotType14,	// used by Kyra 1 (invisibility) +		&Screen::drawShapePlotType11_15,  		0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  		0, 0, 0, 0, 0, 0, 0, 0, 0, 0  	}; @@ -1682,6 +1684,22 @@ void Screen::drawShapePlotType9(uint8 *dst, uint8 cmd) {  		*dst = cmd;  } +void Screen::drawShapePlotType11_15(uint8 *dst, uint8 cmd) { +	uint32 relOffs = dst - _dsDstPage; +	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87; + +	if (_dsDrawLayer < t) { +		cmd = _shapePages[1][relOffs]; +	} else { +		cmd = *dst; +		for (int i = 0; i < _dsTableLoopCount; ++i) +			cmd = _dsTable[cmd]; +	} + +	if (cmd) +		*dst = cmd; +} +  void Screen::drawShapePlotType12(uint8 *dst, uint8 cmd) {  	uint32 relOffs = dst - _dsDstPage;  	int t = (_shapePages[0][relOffs] & 0x7f) & 0x87; diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index add8473eff..9db5a7b44a 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -194,9 +194,10 @@ public:  	void drawShapePlotType4(uint8 *dst, uint8 cmd);  	void drawShapePlotType8(uint8 *dst, uint8 cmd);  	void drawShapePlotType9(uint8 *dst, uint8 cmd); +	void drawShapePlotType11_15(uint8 *dst, uint8 cmd);  	void drawShapePlotType12(uint8 *dst, uint8 cmd);  	void drawShapePlotType13(uint8 *dst, uint8 cmd); -	void drawShapePlotType14(uint8 *dst, uint8 cmd); +	void drawShapePlotType14(uint8 *dst, uint8 cmd);		  	typedef int (Screen::*DsMarginSkipFunc)(uint8 *&dst, const uint8 *&src, int &cnt);  	typedef void (Screen::*DsLineFunc)(uint8 *&dst, const uint8 *&src, int &cnt, int scaleState); | 
