RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.23
diff -u -d -b -u -r1.23 scumm.h
|
|
|
220 | 220 | void drawBits(); |
221 | 221 | void printChar(int chr); |
222 | 222 | void printCharOld(int chr); |
223 | | int getSpacing(char chr, byte *charset); |
| 223 | int getSpacing(byte chr, byte *charset); |
224 | 224 | int getStringWidth(int a, byte *str, int pos); |
225 | 225 | void addLinebreaks(int a, byte *str, int pos, int maxwidth); |
226 | 226 | }; |
RCS file: /cvsroot/scummvm/scummvm/scumm/string.cpp,v
retrieving revision 1.17
diff -u -d -b -u -r1.17 string.cpp
|
|
|
71 | 71 | } |
72 | 72 | width += getSpacing(chr, ptr); |
73 | 73 | } |
| 74 | |
74 | 75 | return width; |
75 | 76 | } |
76 | 77 | |
… |
… |
|
125 | 126 | |
126 | 127 | if (chr == ' ') |
127 | 128 | lastspace = pos - 1; |
| 129 | |
128 | 130 | curw += getSpacing(chr, ptr); |
129 | 131 | if (lastspace == -1) |
130 | 132 | continue; |
… |
… |
|
1019 | 1021 | } |
1020 | 1022 | |
1021 | 1023 | // do spacing for variable width old-style font |
1022 | | int CharsetRenderer::getSpacing(char chr, byte *ptr) |
| 1024 | int CharsetRenderer::getSpacing(byte chr, byte *charset) |
1023 | 1025 | { |
1024 | | int spacing; |
| 1026 | int spacing = 0; |
1025 | 1027 | |
1026 | 1028 | if (_vm->_features & GF_OLD256) { |
1027 | | spacing = *(ptr - 11 + chr); |
| 1029 | spacing = *(charset - 11 + chr); |
1028 | 1030 | } else { |
1029 | | int offs = READ_LE_UINT32(ptr + chr * 4 + 4); |
| 1031 | int offs = READ_LE_UINT32(charset + chr * 4 + 4); |
1030 | 1032 | if (offs) { |
1031 | | spacing = ptr[offs]; |
1032 | | if (ptr[offs + 2] >= 0x80) { |
1033 | | spacing += ptr[offs + 2] - 0x100; |
| 1033 | spacing = charset[offs]; |
| 1034 | if (charset[offs + 2] >= 0x80) { |
| 1035 | spacing += charset[offs + 2] - 0x100; |
1034 | 1036 | } else { |
1035 | | spacing += ptr[offs + 2]; |
| 1037 | spacing += charset[offs + 2]; |
1036 | 1038 | } |
1037 | 1039 | } |
1038 | 1040 | } |