RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.93
diff -u -r1.93 graphics.cpp
|
|
|
|
| 432 | 432 | |
| 433 | 433 | char lines[8][MAX_STRING_SIZE]; |
| 434 | 434 | int lineCount = 0; |
| 435 | | int wordCount = 0; |
| 436 | 435 | int lineLength = 0; |
| 437 | 436 | int i; |
| 438 | 437 | |
| 439 | | for (i = 0; i < length; i++) { |
| 440 | | if (textCopy[i] == ' ') |
| 441 | | wordCount++; |
| | 438 | // Hebrew strings are written from right to left and should be cut |
| | 439 | // to lines in reverse |
| | 440 | if (_vm->resource()->getLanguage() == HEBREW) { |
| | 441 | for (i = length - 1; i >= 0; i--) { |
| | 442 | lineLength++; |
| 442 | 443 | |
| 443 | | lineLength++; |
| | 444 | if ((lineLength > 20 && textCopy[i] == ' ') || i == 0) { |
| | 445 | memcpy(lines[lineCount], textCopy + i, lineLength); |
| | 446 | lines[lineCount][lineLength] = '\0'; |
| | 447 | lineCount++; |
| | 448 | lineLength = 0; |
| | 449 | } |
| | 450 | } |
| | 451 | } else { |
| | 452 | for (i = 0; i < length; i++) { |
| | 453 | lineLength++; |
| 444 | 454 | |
| 445 | | if ((lineLength > 20 && textCopy[i] == ' ') || i == (length-1)) { |
| 446 | | memcpy(lines[lineCount], textCopy + i + 1 - lineLength, lineLength); |
| 447 | | lines[lineCount][lineLength] = '\0'; |
| 448 | | lineCount++; |
| 449 | | lineLength = 0; |
| | 455 | if ((lineLength > 20 && textCopy[i] == ' ') || i == (length-1)) { |
| | 456 | memcpy(lines[lineCount], textCopy + i + 1 - lineLength, lineLength); |
| | 457 | lines[lineCount][lineLength] = '\0'; |
| | 458 | lineCount++; |
| | 459 | lineLength = 0; |
| | 460 | } |
| 450 | 461 | } |
| 451 | 462 | } |
| 452 | | |
| 453 | 463 | |
| 454 | 464 | // Plan: write each line to Screen 2, put black outline around lines and |
| 455 | 465 | // pick them up as a BOB. |
RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
retrieving revision 1.67
diff -u -r1.67 command.cpp
|
|
|
|
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | void CmdText::displayTemp(uint8 color, bool locked, Verb v, const char *name) { |
| 48 | | char temp[MAX_COMMAND_LEN]; |
| 49 | | if (locked) { |
| 50 | | sprintf(temp, "%s%s", _vm->logic()->joeResponse(39), _vm->logic()->verbName(v)); |
| | 48 | char temp[MAX_COMMAND_LEN] = ""; |
| | 49 | if (_vm->resource()->getLanguage() == HEBREW) { |
| | 50 | if (name != NULL) |
| | 51 | sprintf(temp, "%s ", name); |
| | 52 | |
| | 53 | if (locked) { |
| | 54 | strcat(temp, _vm->logic()->verbName(v)); |
| | 55 | strcat(temp, " "); |
| | 56 | strcat(temp, _vm->logic()->joeResponse(39)); |
| | 57 | } else |
| | 58 | strcat(temp, _vm->logic()->verbName(v)); |
| 51 | 59 | } else { |
| 52 | | strcpy(temp, _vm->logic()->verbName(v)); |
| 53 | | } |
| 54 | | if (name != NULL) { |
| 55 | | strcat(temp, " "); |
| 56 | | strcat(temp, name); |
| | 60 | if (locked) |
| | 61 | sprintf(temp, "%s %s", _vm->logic()->joeResponse(39), _vm->logic()->verbName(v)); |
| | 62 | else |
| | 63 | strcpy(temp, _vm->logic()->verbName(v)); |
| | 64 | |
| | 65 | if (name != NULL) { |
| | 66 | strcat(temp, " "); |
| | 67 | strcat(temp, name); |
| | 68 | } |
| 57 | 69 | } |
| 58 | 70 | _vm->display()->textCurrentColor(color); |
| 59 | 71 | _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false); |
| … |
… |
|
| 61 | 73 | |
| 62 | 74 | void CmdText::displayTemp(uint8 color, const char *name) { |
| 63 | 75 | char temp[MAX_COMMAND_LEN]; |
| 64 | | sprintf(temp, "%s %s", _command, name); |
| | 76 | if (_vm->resource()->getLanguage() == HEBREW) |
| | 77 | sprintf(temp, "%s %s", name, _command); |
| | 78 | else |
| | 79 | sprintf(temp, "%s %s", _command, name); |
| 65 | 80 | _vm->display()->textCurrentColor(color); |
| 66 | 81 | _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false); |
| 67 | 82 | } |
| … |
… |
|
| 71 | 86 | } |
| 72 | 87 | |
| 73 | 88 | void CmdText::addLinkWord(Verb v) { |
| 74 | | strcat(_command, " "); |
| 75 | | strcat(_command, _vm->logic()->verbName(v)); |
| | 89 | if (_vm->resource()->getLanguage() == HEBREW) { |
| | 90 | char temp[MAX_COMMAND_LEN]; |
| | 91 | |
| | 92 | strcpy(temp, _command); |
| | 93 | strcpy(_command, _vm->logic()->verbName(v)); |
| | 94 | strcat(_command, " "); |
| | 95 | strcat(_command, temp); |
| | 96 | } else { |
| | 97 | strcat(_command, " "); |
| | 98 | strcat(_command, _vm->logic()->verbName(v)); |
| | 99 | } |
| 76 | 100 | } |
| 77 | 101 | |
| 78 | 102 | void CmdText::addObject(const char *objName) { |
| 79 | | strcat(_command, " "); |
| 80 | | strcat(_command, objName); |
| | 103 | if (_vm->resource()->getLanguage() == HEBREW) { |
| | 104 | char temp[MAX_COMMAND_LEN]; |
| | 105 | |
| | 106 | strcpy(temp, _command); |
| | 107 | strcpy(_command, objName); |
| | 108 | strcat(_command, " "); |
| | 109 | strcat(_command, temp); |
| | 110 | } else { |
| | 111 | strcat(_command, " "); |
| | 112 | strcat(_command, objName); |
| | 113 | } |
| 81 | 114 | } |
| 82 | 115 | |
| 83 | 116 | bool CmdText::isEmpty() const { |