Ticket #2539: 1452272-2.diff
File 1452272-2.diff, 4.8 KB (added by , 17 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 691 int oldID = _charset->getCurID(); 693 692 _charset->setCurID(vs->charset_nr); 694 693 695 694 // Compute the text rect 696 695 vs->curRect.right = 0; 697 696 vs->curRect.bottom = 0; 698 while (*msg) { 699 const int charWidth = _charset->getCharWidth(*msg); 700 const int charHeight = _charset->getCharHeight(*msg); 697 const byte *msg2 = msg; 698 while (*msg2) { 699 const int charWidth = _charset->getCharWidth(*msg2); 700 const int charHeight = _charset->getCharHeight(*msg2); 701 701 vs->curRect.right += charWidth; 702 702 if (vs->curRect.bottom < charHeight) 703 703 vs->curRect.bottom = charHeight; 704 msg ++;704 msg2++; 705 705 } 706 706 vs->curRect.right += vs->curRect.left; 707 707 vs->curRect.bottom += vs->curRect.top; 708 708 vs->oldRect = vs->curRect; 709 710 const int maxWidth = _screenWidth - vs->curRect.left; 711 if (_charset->getStringWidth(0, buf) > maxWidth && _game.version == 8) { 712 byte tmpBuf[384]; 713 memcpy(tmpBuf, msg, 384); 714 715 int len = resStrLen(tmpBuf) - 1; 716 while (len >= 0) { 717 if (tmpBuf[len] == ' ') { 718 tmpBuf[len] = 0; 719 if (_charset->getStringWidth(0, tmpBuf) <= maxWidth) { 720 break; 721 } 722 } 723 --len; 724 } 725 enqueueText(tmpBuf, vs->curRect.left, vs->curRect.top, color, vs->charset_nr, vs->center); 726 if (len >= 0) { 727 enqueueText(&msg[len + 1], vs->curRect.left, vs->curRect.top + _verbLineSpacing, color, vs->charset_nr, vs->center); 728 vs->curRect.bottom += _verbLineSpacing; 729 } 730 } else { 731 enqueueText(msg, vs->curRect.left, vs->curRect.top, color, vs->charset_nr, vs->center); 732 } 733 _charset->setCurID(oldID); 709 734 } 710 735 } 711 736 #endif -
scumm/saveload.cpp
1197 1197 1198 1198 const SaveLoadEntry V7Entries[] = { 1199 1199 MKLINE(ScummEngine_v7, _subtitleQueuePos, sleInt32, VER(61)), 1200 MKLINE(ScummEngine_v7, _verbCharset, sleInt32, VER(68)), 1201 MKLINE(ScummEngine_v7, _verbLineSpacing, sleInt32, VER(68)), 1200 1202 MKEND() 1201 1203 }; 1202 1204 -
scumm/script_v8.cpp
719 719 case 0xE6: // SO_CURSOR_TRANSPARENT Set cursor transparent color 720 720 setCursorTransparency(pop()); 721 721 break; 722 case 0xE7: {// SO_CHARSET_SET722 case 0xE7: // SO_CHARSET_SET 723 723 _verbCharset = pop(); 724 724 break; 725 }726 725 case 0xE8: // SO_CHARSET_COLOR 727 726 getStackList(args, ARRAYSIZE(args)); 728 727 for (i = 0; i < 16; i++) … … 1147 1146 vs->charset_nr = pop(); 1148 1147 break; 1149 1148 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); 1149 _verbLineSpacing = pop(); 1156 1150 break; 1157 1151 default: 1158 1152 error("o8_verbops: default case 0x%x", subOp); … … 1466 1460 msg = transBuf; 1467 1461 1468 1462 // Temporary set the specified charset id 1469 _charset->setCurID( _string[charset].charset);1463 _charset->setCurID(charset); 1470 1464 // Determine the strings width 1471 1465 width = _charset->getStringWidth(0, msg); 1472 1466 // Revert to old font -
scumm/saveload.h
47 47 * only saves/loads those which are valid for the version of the savegame 48 48 * which is being loaded/saved currently. 49 49 */ 50 #define CURRENT_VER 6 750 #define CURRENT_VER 68 51 51 52 52 /** 53 53 * An auxillary macro, used to specify savegame versions. We use this instead