aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
Diffstat (limited to 'sky')
-rw-r--r--sky/text.cpp62
1 files changed, 47 insertions, 15 deletions
diff --git a/sky/text.cpp b/sky/text.cpp
index 26c9600bb9..12d7cc7aab 100644
--- a/sky/text.cpp
+++ b/sky/text.cpp
@@ -78,8 +78,10 @@ void SkyText::patchChar(byte *charSetPtr, int width, int height, int c, const ui
charSetPtr[c] = width;
for (int i = 0; i < height; i++) {
- ptr[i * 4 + 0] = ptr[i * 4 + 2] = (data[i] & 0xFF00) >> 8;
- ptr[i * 4 + 1] = ptr[i * 4 + 3] = data[i] & 0x00FF;
+ ptr[i * 4 + 0] = (data[i] & 0xFF00) >> 8;
+ ptr[i * 4 + 1] = data[i] & 0x00FF;
+ ptr[i * 4 + 2] = (data[i + height] & 0xFF00) >> 8;
+ ptr[i * 4 + 3] = data[i + height] & 0x00FF;
}
}
@@ -106,64 +108,94 @@ void SkyText::patchLINCCharset() {
// two. This is particularly noticeable when using a non-English
// version.
+ // Since the same character data is used both in LINC terminals and
+ // in LINC-space, we need to provide a mask (for the black outline)
+ // even though it's only visible in the latter. We store the mask
+ // as the second half of the array to make it more human-readable.
+ // In the actual game data, the character and mask are interleaved.
+
const uint16 slash[] = {
0x0000, 0x0000, 0x0000, 0x0800, 0x1000, 0x1000,
- 0x2000, 0x2000, 0x4000, 0x0000, 0x0000, 0x0000
+ 0x2000, 0x2000, 0x4000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x0800, 0x1C00, 0x3800, 0x3800,
+ 0x7000, 0x7000, 0xE000, 0x4000, 0x0000, 0x0000
};
const uint16 lt[] = {
0x0000, 0x0000, 0x0800, 0x1000, 0x2000, 0x4000,
- 0x2000, 0x1000, 0x0800, 0x0000, 0x0000, 0x0000
+ 0x2000, 0x1000, 0x0800, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0800, 0x1C00, 0x3800, 0x7000, 0xE000,
+ 0x7000, 0x3800, 0x1C00, 0x0800, 0x0000, 0x0000
};
const uint16 gt[] = {
0x0000, 0x0000, 0x4000, 0x2000, 0x1000, 0x0800,
- 0x1000, 0x2000, 0x4000, 0x0000, 0x0000, 0x0000
+ 0x1000, 0x2000, 0x4000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x4000, 0xE000, 0x7000, 0x3800, 0x1C00,
+ 0x3800, 0x7000, 0xE000, 0x4000, 0x0000, 0x0000
};
const uint16 a_umlaut[] = {
- 0x0000, 0x0000, 0x2800, 0x0000, 0x3000, 0x0800,
- 0x3800, 0x4800, 0x3800, 0x0000, 0x0000, 0x0000
+ 0x0000, 0x0000, 0x2800, 0x0000, 0x3000, 0x0800,
+ 0x3800, 0x4800, 0x3800, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2800, 0x7C00, 0x3800, 0x7800, 0x3C00,
+ 0x7C00, 0xFC00, 0x7C00, 0x3800, 0x0000, 0x0000
};
const uint16 o_umlaut[] = {
0x0000, 0x0000, 0x4800, 0x0000, 0x3000, 0x4800,
- 0x4800, 0x4800, 0x3000, 0x0000, 0x0000, 0x0000
+ 0x4800, 0x4800, 0x3000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x4800, 0xFC00, 0x7800, 0x7800, 0xFC00,
+ 0xFC00, 0xFC00, 0x7800, 0x3000, 0x0000, 0x0000
};
const uint16 u_umlaut[] = {
0x0000, 0x0000, 0x4800, 0x0000, 0x4800, 0x4800,
- 0x4800, 0x4800, 0x3000, 0x0000, 0x0000, 0x0000
+ 0x4800, 0x4800, 0x3800, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x4800, 0xFC00, 0x4800, 0xFC00, 0xFC00,
+ 0xFC00, 0xFC00, 0x7C00, 0x3800, 0x0000, 0x0000
};
const uint16 A_umlaut[] = {
0x0000, 0x4800, 0x0000, 0x3000, 0x4800, 0x4800,
- 0x7800, 0x4800, 0x4800, 0x0000, 0x0000, 0x0000
+ 0x7800, 0x4800, 0x4800, 0x0000, 0x0000, 0x0000,
+ 0x4800, 0xFC00, 0x7800, 0x7800, 0xFC00, 0xFC00,
+ 0xFC00, 0xFC00, 0xFC00, 0x4800, 0x0000, 0x0000
};
const uint16 O_umlaut[] = {
0x0000, 0x4800, 0x0000, 0x3000, 0x4800, 0x4800,
- 0x4800, 0x4800, 0x3000, 0x0000, 0x0000, 0x0000
+ 0x4800, 0x4800, 0x3000, 0x0000, 0x0000, 0x0000,
+ 0x4800, 0xFC00, 0x7800, 0x7800, 0xFC00, 0xFC00,
+ 0xFC00, 0xFC00, 0x7800, 0x3000, 0x0000, 0x0000
};
const uint16 U_umlaut[] = {
0x0000, 0x4800, 0x0000, 0x4800, 0x4800, 0x4800,
- 0x4800, 0x4800, 0x3000, 0x0000, 0x0000, 0x0000
+ 0x4800, 0x4800, 0x3000, 0x0000, 0x0000, 0x0000,
+ 0x4800, 0xFC00, 0x4800, 0xFC00, 0xFC00, 0xFC00,
+ 0xFC00, 0xFC00, 0x7800, 0x3000, 0x0000, 0x0000
};
const uint16 normal_j[] = {
0x0000, 0x0000, 0x0000, 0x0800, 0x0000, 0x0800,
- 0x0800, 0x0800, 0x0800, 0x4800, 0x3000, 0x0000
+ 0x0800, 0x0800, 0x0800, 0x4800, 0x3000, 0x0000,
+ 0x0000, 0x0000, 0x0800, 0x1C00, 0x0800, 0x1C00,
+ 0x1C00, 0x1C00, 0x5C00, 0xFC00, 0x7800, 0x3000
};
const uint16 german_sz[] = {
0x0000, 0x0000, 0x2000, 0x5000, 0x5000, 0x4800,
- 0x4800, 0x4800, 0x5000, 0x0000, 0x0000, 0x0000
+ 0x4800, 0x4800, 0x5000, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x2000, 0x7000, 0xF800, 0xF800, 0xFC00,
+ 0xFC00, 0xFC00, 0xF800, 0x7000, 0x0000, 0x0000
};
const uint16 normal_1[] = {
0x0000, 0x0000, 0x0000, 0x1000, 0x7000, 0x1000,
- 0x1000, 0x1000, 0x7c00, 0x0000, 0x0000, 0x0000
+ 0x1000, 0x1000, 0x7c00, 0x0000, 0x0000, 0x0000,
+ 0x0000, 0x0000, 0x1000, 0x7800, 0xF800, 0x7800,
+ 0x3800, 0x7c00, 0xFE00, 0x7c00, 0x0000, 0x0000
};
patchChar(charSetPtr, 5, charHeight, 3, u_umlaut);