Ticket #2539: 1452272.diff
File 1452272.diff, 3.3 KB (added by , 18 years ago) |
---|
-
scumm/intern.h
822 822 int32 offset; 823 823 }; 824 824 825 int _verbCharset ;825 int _verbCharset, _verbLineSpacing; 826 826 bool _existLanguageFile; 827 827 char *_languageBuffer; 828 828 LangIndexNode *_languageIndex; -
scumm/scumm.cpp
920 920 ScummEngine_v7::ScummEngine_v7(OSystem *syst, const DetectorResult &dr) 921 921 : ScummEngine_v6(syst, dr) { 922 922 _verbCharset = 0; 923 _verbLineSpacing = 10; 923 924 _existLanguageFile = false; 924 925 _languageBuffer = NULL; 925 926 _languageIndex = NULL; -
scumm/verbs.cpp
687 687 while (*msg == 0xFF) 688 688 msg += 4; 689 689 690 enqueueText(msg, vs->curRect.left, vs->curRect.top, color, vs->charset_nr, vs->center);691 692 690 // Set the specified charset id 693 691 _charset->setCurID(vs->charset_nr); 694 692 695 693 // Compute the text rect 696 694 vs->curRect.right = 0; 697 695 vs->curRect.bottom = 0; 698 while (*msg) { 699 const int charWidth = _charset->getCharWidth(*msg); 700 const int charHeight = _charset->getCharHeight(*msg); 696 const byte *msg2 = msg; 697 while (*msg2) { 698 const int charWidth = _charset->getCharWidth(*msg2); 699 const int charHeight = _charset->getCharHeight(*msg2); 701 700 vs->curRect.right += charWidth; 702 701 if (vs->curRect.bottom < charHeight) 703 702 vs->curRect.bottom = charHeight; 704 msg ++;703 msg2++; 705 704 } 706 705 vs->curRect.right += vs->curRect.left; 707 706 vs->curRect.bottom += vs->curRect.top; 708 707 vs->oldRect = vs->curRect; 708 709 const int maxWidth = _screenWidth - vs->curRect.left; 710 if (_charset->getStringWidth(0, buf) > maxWidth && _game.version == 8) { 711 byte tmpBuf[384]; 712 memcpy(tmpBuf, msg, 384); 713 714 int len = resStrLen(tmpBuf) - 1; 715 while (len >= 0) { 716 if (tmpBuf[len] == ' ') { 717 tmpBuf[len] = 0; 718 if (_charset->getStringWidth(0, tmpBuf) <= maxWidth) { 719 break; 720 } 721 } 722 --len; 723 } 724 enqueueText(tmpBuf, vs->curRect.left, vs->curRect.top, color, vs->charset_nr, vs->center); 725 if (len >= 0) { 726 enqueueText(&msg[len + 1], vs->curRect.left, vs->curRect.top + _verbLineSpacing, color, vs->charset_nr, vs->center); 727 vs->curRect.bottom += _verbLineSpacing; 728 } 729 } else { 730 enqueueText(msg, vs->curRect.left, vs->curRect.top, color, vs->charset_nr, vs->center); 731 } 709 732 } 710 733 } 711 734 #endif -
scumm/script_v8.cpp
1147 1147 vs->charset_nr = pop(); 1148 1148 break; 1149 1149 case 0xA7: // SO_VERB_LINE_SPACING Choose linespacing for verb 1150 // FIXME - TODO 1151 // Note: it seems that var596 stores the "line spacing". It is used by various 1152 // scripts that place verbs for that. 1153 // Also, var595 contains the vertical position at which to start placing verbs (330) 1154 a = pop(); 1155 debug(0, "SO_VERB_LINE_SPACING %d: not yet implemented", a); 1150 _verbLineSpacing = pop(); 1156 1151 break; 1157 1152 default: 1158 1153 error("o8_verbops: default case 0x%x", subOp);