Ticket #8330: queenheb.diff

File queenheb.diff, 5.1 KB (added by salty-horse, 21 years ago)
Line 
1Index: scummvm/queen/graphics.cpp
2===================================================================
3RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
4retrieving revision 1.93
5diff -c -r1.93 graphics.cpp
6*** scummvm/queen/graphics.cpp 27 Jan 2004 16:56:11 -0000 1.93
7--- scummvm/queen/graphics.cpp 13 Feb 2004 20:24:04 -0000
8***************
9*** 432,455 ****
10
11 char lines[8][MAX_STRING_SIZE];
12 int lineCount = 0;
13- int wordCount = 0;
14 int lineLength = 0;
15 int i;
16
17! for (i = 0; i < length; i++) {
18! if (textCopy[i] == ' ')
19! wordCount++;
20
21! lineLength++;
22
23! if ((lineLength > 20 && textCopy[i] == ' ') || i == (length-1)) {
24! memcpy(lines[lineCount], textCopy + i + 1 - lineLength, lineLength);
25! lines[lineCount][lineLength] = '\0';
26! lineCount++;
27! lineLength = 0;
28 }
29 }
30-
31
32 // Plan: write each line to Screen 2, put black outline around lines and
33 // pick them up as a BOB.
34--- 432,465 ----
35
36 char lines[8][MAX_STRING_SIZE];
37 int lineCount = 0;
38 int lineLength = 0;
39 int i;
40
41! // Hebrew strings are written from right to left and should be cut
42! // to lines in reverse
43! if (_vm->resource()->getLanguage() == HEBREW) {
44! for (i = length - 1; i >= 0; i--) {
45! lineLength++;
46
47! if ((lineLength > 20 && textCopy[i] == ' ') || i == 0) {
48! memcpy(lines[lineCount], textCopy + i, lineLength);
49! lines[lineCount][lineLength] = '\0';
50! lineCount++;
51! lineLength = 0;
52! }
53! }
54! } else {
55! for (i = 0; i < length; i++) {
56! lineLength++;
57
58! if ((lineLength > 20 && textCopy[i] == ' ') || i == (length-1)) {
59! memcpy(lines[lineCount], textCopy + i + 1 - lineLength, lineLength);
60! lines[lineCount][lineLength] = '\0';
61! lineCount++;
62! lineLength = 0;
63! }
64 }
65 }
66
67 // Plan: write each line to Screen 2, put black outline around lines and
68 // pick them up as a BOB.
69Index: scummvm/queen/command.cpp
70===================================================================
71RCS file: /cvsroot/scummvm/scummvm/queen/command.cpp,v
72retrieving revision 1.67
73diff -c -r1.67 command.cpp
74*** scummvm/queen/command.cpp 23 Jan 2004 10:27:30 -0000 1.67
75--- scummvm/queen/command.cpp 13 Feb 2004 20:24:08 -0000
76***************
77*** 45,59 ****
78 }
79
80 void CmdText::displayTemp(uint8 color, bool locked, Verb v, const char *name) {
81! char temp[MAX_COMMAND_LEN];
82! if (locked) {
83! sprintf(temp, "%s%s", _vm->logic()->joeResponse(39), _vm->logic()->verbName(v));
84 } else {
85! strcpy(temp, _vm->logic()->verbName(v));
86! }
87! if (name != NULL) {
88! strcat(temp, " ");
89! strcat(temp, name);
90 }
91 _vm->display()->textCurrentColor(color);
92 _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false);
93--- 45,71 ----
94 }
95
96 void CmdText::displayTemp(uint8 color, bool locked, Verb v, const char *name) {
97! char temp[MAX_COMMAND_LEN] = "";
98! if (_vm->resource()->getLanguage() == HEBREW) {
99! if (name != NULL)
100! sprintf(temp, "%s ", name);
101!
102! if (locked) {
103! strcat(temp, _vm->logic()->verbName(v));
104! strcat(temp, " ");
105! strcat(temp, _vm->logic()->joeResponse(39));
106! } else
107! strcat(temp, _vm->logic()->verbName(v));
108 } else {
109! if (locked)
110! sprintf(temp, "%s %s", _vm->logic()->joeResponse(39), _vm->logic()->verbName(v));
111! else
112! strcpy(temp, _vm->logic()->verbName(v));
113!
114! if (name != NULL) {
115! strcat(temp, " ");
116! strcat(temp, name);
117! }
118 }
119 _vm->display()->textCurrentColor(color);
120 _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false);
121***************
122*** 61,67 ****
123
124 void CmdText::displayTemp(uint8 color, const char *name) {
125 char temp[MAX_COMMAND_LEN];
126! sprintf(temp, "%s %s", _command, name);
127 _vm->display()->textCurrentColor(color);
128 _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false);
129 }
130--- 73,82 ----
131
132 void CmdText::displayTemp(uint8 color, const char *name) {
133 char temp[MAX_COMMAND_LEN];
134! if (_vm->resource()->getLanguage() == HEBREW)
135! sprintf(temp, "%s %s", name, _command);
136! else
137! sprintf(temp, "%s %s", _command, name);
138 _vm->display()->textCurrentColor(color);
139 _vm->display()->setTextCentered(COMMAND_Y_POS, temp, false);
140 }
141***************
142*** 71,83 ****
143 }
144
145 void CmdText::addLinkWord(Verb v) {
146! strcat(_command, " ");
147! strcat(_command, _vm->logic()->verbName(v));
148 }
149
150 void CmdText::addObject(const char *objName) {
151! strcat(_command, " ");
152! strcat(_command, objName);
153 }
154
155 bool CmdText::isEmpty() const {
156--- 86,116 ----
157 }
158
159 void CmdText::addLinkWord(Verb v) {
160! if (_vm->resource()->getLanguage() == HEBREW) {
161! char temp[MAX_COMMAND_LEN];
162!
163! strcpy(temp, _command);
164! strcpy(_command, _vm->logic()->verbName(v));
165! strcat(_command, " ");
166! strcat(_command, temp);
167! } else {
168! strcat(_command, " ");
169! strcat(_command, _vm->logic()->verbName(v));
170! }
171 }
172
173 void CmdText::addObject(const char *objName) {
174! if (_vm->resource()->getLanguage() == HEBREW) {
175! char temp[MAX_COMMAND_LEN];
176!
177! strcpy(temp, _command);
178! strcpy(_command, objName);
179! strcat(_command, " ");
180! strcat(_command, temp);
181! } else {
182! strcat(_command, " ");
183! strcat(_command, objName);
184! }
185 }
186
187 bool CmdText::isEmpty() const {