Index: engines/kyra/sequences_hof.cpp
===================================================================
--- engines/kyra/sequences_hof.cpp	(revision 32139)
+++ engines/kyra/sequences_hof.cpp	(working copy)
@@ -2395,14 +2395,31 @@
 	if (!data)
 		return;
 
-	static const char mark[] = { 5, 13, 0};
+	static const char mark[] = { 5, 13, 0 };
 
 	_screen->clearPage(tempPage1);
 	_screen->clearPage(tempPage2);
 	_screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, 0, tempPage1);
 
-	uint8 *tmp = new uint8[397];
-	memset(tmp, 0, 397);
+	struct ScrollTextData {
+		int16	x;
+		int16	y;
+		uint16	index;
+		byte	unk1;
+		byte	height;
+		byte	adjust;
+
+		ScrollTextData() {
+			x = 0;       // 0  11
+			y = 0;       // 2  13
+			index = 0;   // 4  15
+			unk1 = 0;    // 8  19
+			height = 0;  // 9  20
+			adjust = 0;  // 10 21
+		}
+	};
+
+	ScrollTextData *textData = new ScrollTextData[36];
 	uint8 **tmpStringTable = new uint8*[35];
 	uint8 *ptr = data;
 	int strTblIndex = 0;
@@ -2414,21 +2431,28 @@
 		uint32 endTime = _system->getMillis() + speed * _tickLength;
 
 		while (cnt < 35 && *ptr) {
-			int m = cnt * 11;
-			uint16 cH = cnt ? READ_LE_UINT16(&tmp[m + 2]) + tmp[m + 9] + (tmp[m + 9] >> 3) : d->h;
+			uint16 cH;
 
+			if (cnt)
+				cH = textData[cnt].y + textData[cnt].height + (textData[cnt].height >> 3);
+			else
+				cH = d->h;
+
 			char *str = (char*)ptr;
 
 			ptr = (uint8*)strpbrk(str, mark);
 			if (!ptr)
 				ptr = (uint8*)strchr(str, 0);
 
-			tmp[m + 19] = *ptr;
+			textData[cnt + 1].unk1 = *ptr;
 			*ptr = 0;
-			if (tmp[m + 19])
+			if (textData[cnt + 1].unk1)
 				ptr++;
 
-			tmp[m + 21] = (*str == 3 || *str == 4) ? tmp[m + 21] = *str++ : 0;
+			if (*str == 3 || *str == 4)
+				textData[cnt + 1].adjust = *str++;
+			else
+				textData[cnt + 1].adjust = 0;
 
 			_screen->setFont(fid1);
 
@@ -2439,16 +2463,25 @@
 				str++;
 			}
 
-			tmp[m + 20] = _screen->getFontHeight();
+			textData[cnt + 1].height = _screen->getFontHeight();
 
-			WRITE_LE_UINT16(&tmp[m + 11], (tmp[m + 21] == 3) ? 157 - _screen->getTextWidth(str) :
-				((tmp[m + 21] == 4) ? 161 : (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1));
+			switch (textData[cnt + 1].adjust) {
+			case 3:
+				textData[cnt + 1].x = 157 - _screen->getTextWidth(str);
+				break;
+			case 4:
+				textData[cnt + 1].x = 161;
+				break;
+			default:
+				textData[cnt + 1].x = (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1;
+				break;
+			}
 
-			if (tmp[m + 8] == 5)
-				cH -= (tmp[m + 9] + (tmp[m + 9] >> 3));
+			if (textData[cnt].unk1 == 5)
+				cH -= (textData[cnt].height + (textData[cnt].height >> 3));
 
-			WRITE_LE_UINT16(&tmp[m + 13], cH);
-			WRITE_LE_UINT32(&tmp[m + 15], strTblIndex);
+			textData[cnt + 1].y = cH;
+			textData[cnt + 1].index = strTblIndex;
 			tmpStringTable[strTblIndex] = (uint8*) str;
 			strTblIndex = (strTblIndex + 1) % 35;
 			cnt++;
@@ -2460,11 +2493,10 @@
 		bool palCycle = 0;
 
 		while (cnt2 < cnt) {
-			int m = cnt2 * 11;
-			const char *str = (const char*)tmpStringTable[READ_LE_UINT32(&tmp[m + 15])];
+			const char *str = (const char*)tmpStringTable[textData[cnt2 + 1].index];
 			const char *str2 = str;
-			uint16 cW = READ_LE_UINT16(&tmp[m + 11]) - 10;
-			uint16 cH = READ_LE_UINT16(&tmp[m + 13]);
+			uint16 cW = textData[cnt2 + 1].x - 10;
+			uint16 cH = textData[cnt2 + 1].y;
 			int x = (d->sx << 3) + cW;
 			int y = d->sy + cH;
 			int col1 = 255;
@@ -2472,7 +2504,7 @@
 			if (cH < d->h) {
 				_screen->setCurPage(tempPage2);
 				_screen->setFont(fid1);
-				if (tmp[m + 20] != _screen->getFontHeight())
+				if (textData[cnt2 + 1].height != _screen->getFontHeight())
 					_screen->setFont(fid2);
 
 				if (specialData) {
@@ -2503,18 +2535,18 @@
 				_screen->setCurPage(0);
 			}
 
-			WRITE_LE_UINT16(&tmp[m + 13], READ_LE_UINT16(&tmp[m + 13]) - step);
+			textData[cnt2 + 1].y -= step;
 			cnt2++;
 		}
 
 		_screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage2, 0);
 		_screen->updateScreen();
 
-		if ((int16)READ_LE_UINT16(&tmp[13]) < -10) {
-			tmpStringTable[tmp[15]] += strlen((char*)tmpStringTable[tmp[15]]);
-			tmpStringTable[tmp[15]][0] = tmp[19];
+		if (textData[1].y < -10) {
+			tmpStringTable[textData[1].index] += strlen((char*)tmpStringTable[textData[1].index]);
+			tmpStringTable[textData[1].index][0] = textData[1].unk1;
 			cnt--;
-			memcpy(&tmp[11], &tmp[22], cnt * 11);
+			memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData));
 		}
 
 		if (palCycle) {
@@ -2526,7 +2558,7 @@
 
 		delayUntil(endTime);
 
-		if ((cnt < 36) && ((d->sy + d->h) > (READ_LE_UINT16(&tmp[cnt * 11 + 2]) + tmp[cnt * 11 + 9])) && !skipFlag()) {
+		if ((cnt < 36) && ((d->sy + d->h) > (textData[cnt].y + textData[cnt].height)) && !skipFlag()) {
 			resetSkipFlag();
 			delay(_tickLength * 500);
 			cnt = 0;
@@ -2542,7 +2574,7 @@
 	_abortIntroFlag= false;
 	resetSkipFlag();
 
-	delete[] tmp;
+	delete[] textData;
 	delete[] tmpStringTable;
 }
 
