equal
deleted
inserted
replaced
27 #include "signs.h" |
27 #include "signs.h" |
28 #include "waypoint.h" |
28 #include "waypoint.h" |
29 #include "variables.h" |
29 #include "variables.h" |
30 #include "train.h" |
30 #include "train.h" |
31 #include "unmovable_map.h" |
31 #include "unmovable_map.h" |
|
32 #include "string.h" |
32 #include "screenshot.h" |
33 #include "screenshot.h" |
33 #include "genworld.h" |
34 #include "genworld.h" |
34 #include "settings.h" |
35 #include "settings.h" |
35 #include "date.h" |
36 #include "date.h" |
36 #include "vehicle_gui.h" |
37 #include "vehicle_gui.h" |
2083 GetString(buf, str, lastof(buf)); |
2084 GetString(buf, str, lastof(buf)); |
2084 |
2085 |
2085 s = buf; |
2086 s = buf; |
2086 d = buffer; |
2087 d = buffer; |
2087 |
2088 |
2088 for (;; s++) { |
2089 for (;;) { |
2089 if (*s == '\0') { |
2090 WChar c = Utf8Consume(&s); |
|
2091 if (c == 0) { |
2090 *d = '\0'; |
2092 *d = '\0'; |
2091 break; |
2093 break; |
2092 } else if (*s == 0x0D) { |
2094 } else if (*s == 0x0D) { |
2093 d[0] = d[1] = d[2] = d[3] = ' '; |
2095 d[0] = d[1] = d[2] = d[3] = ' '; |
2094 d += 4; |
2096 d += 4; |
2095 } else if ((byte)*s >= ' ' && ((byte)*s < 0x88 || (byte)*s >= 0x99)) { |
2097 } else if (IsPrintable(c)) { |
2096 *d++ = *s; |
2098 d += Utf8Encode(d, c); |
2097 } |
2099 } |
2098 } |
2100 } |
2099 |
2101 |
2100 if (!FillDrawPixelInfo(&tmp_dpi, 141, 1, 358, 11)) return true; |
2102 if (!FillDrawPixelInfo(&tmp_dpi, 141, 1, 358, 11)) return true; |
2101 |
2103 |