diff -ur ScummVM-cvs20030603/scummvm/scumm/scumm.h ScummVM-cvs20030603+hack/scummvm/scumm/scumm.h
old
|
new
|
|
718 | 718 | // TODO: This should be moved into Scumm_v2 if posisble |
719 | 719 | ScummVM::Rect v2_mouseover_boxes[7]; |
720 | 720 | int8 v2_mouseover_box; |
| 721 | int32 _oldV2Ego; |
721 | 722 | |
722 | 723 | void initV2MouseOver(); |
723 | 724 | void checkV2MouseOver(ScummVM::Point pos); |
… |
… |
|
1037 | 1038 | bool hasCharsetMask(int left, int top, int right, int bottom); |
1038 | 1039 | protected: |
1039 | 1040 | void CHARSET_1(); |
1040 | | void drawString(int a); |
| 1041 | void drawString(int a, int max_length = 0x7FFF); |
1041 | 1042 | const byte *addMessageToStack(const byte *msg); |
1042 | 1043 | void addIntToStack(int var); |
1043 | 1044 | void addVerbToStack(int var); |
diff -ur ScummVM-cvs20030603/scummvm/scumm/scummvm.cpp ScummVM-cvs20030603+hack/scummvm/scumm/scummvm.cpp
old
|
new
|
|
684 | 684 | |
685 | 685 | if (_features & GF_AFTER_V2) { |
686 | 686 | initV2MouseOver(); |
| 687 | _oldV2Ego = 0; |
687 | 688 | // Seems in V2 there was only a single room effect (iris), |
688 | 689 | // so we set that here. |
689 | 690 | _switchRoomEffect2 = 1; |
… |
… |
|
1011 | 1012 | if (_features & GF_AFTER_V2) { |
1012 | 1013 | redrawV2Inventory(); |
1013 | 1014 | checkV2MouseOver(_mouse); |
| 1015 | _oldV2Ego = VAR(VAR_EGO); |
1014 | 1016 | } |
1015 | 1017 | |
1016 | 1018 | _verbRedraw = false; |
… |
… |
|
1078 | 1080 | } |
1079 | 1081 | _verbRedraw = false; |
1080 | 1082 | |
1081 | | if (_features & GF_AFTER_V2) |
| 1083 | if (_features & GF_AFTER_V2) { |
| 1084 | if (_oldV2Ego != VAR(VAR_EGO)) { |
| 1085 | // FIXME: Reset and redraw the sentence line |
| 1086 | _oldV2Ego = VAR(VAR_EGO); |
| 1087 | redrawV2Inventory(); |
| 1088 | } |
1082 | 1089 | checkV2MouseOver(_mouse); |
| 1090 | } |
1083 | 1091 | |
1084 | 1092 | drawBlastObjects(); |
1085 | 1093 | if (_features & GF_AFTER_V8) |
diff -ur ScummVM-cvs20030603/scummvm/scumm/string.cpp ScummVM-cvs20030603+hack/scummvm/scumm/string.cpp
old
|
new
|
|
336 | 336 | gdi._mask.extend(_charset->_str); |
337 | 337 | } |
338 | 338 | |
339 | | void Scumm::drawString(int a) { |
| 339 | void Scumm::drawString(int a, int max_length) { |
340 | 340 | byte buf[256]; |
341 | 341 | byte *space; |
342 | 342 | int i; |
343 | 343 | byte fontHeight = 0, chr; |
344 | 344 | uint color; |
| 345 | int char_count = 0; |
345 | 346 | |
346 | 347 | _msgPtrToAdd = buf; |
347 | 348 | _messagePtr = addMessageToStack(_messagePtr); |
… |
… |
|
431 | 432 | } |
432 | 433 | _charset->printChar(chr); |
433 | 434 | _charset->_blitAlso = false; |
| 435 | if (++char_count >= max_length) |
| 436 | break; |
434 | 437 | } |
435 | 438 | } |
436 | 439 | |
diff -ur ScummVM-cvs20030603/scummvm/scumm/verbs.cpp ScummVM-cvs20030603+hack/scummvm/scumm/verbs.cpp
old
|
new
|
|
199 | 199 | |
200 | 200 | _messagePtr = getObjOrActorName(obj); |
201 | 201 | assert(_messagePtr); |
202 | | drawString(1); |
| 202 | drawString(1, v2_mouseover_boxes[i].width() / 8); |
203 | 203 | } |
204 | 204 | |
205 | 205 | // If necessary, draw "up" arrow |