aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorbjörn Andersson2003-08-13 15:29:44 +0000
committerTorbjörn Andersson2003-08-13 15:29:44 +0000
commita02fe9e46e6b87a879e5800bc0b4992be2b63fbf (patch)
tree0827de8b29ed0596baa6b1b8ed26b440ae660393
parentfb62ba61cab0d4e2e2c0b8f4c7b44c081313f1e7 (diff)
downloadscummvm-rg350-a02fe9e46e6b87a879e5800bc0b4992be2b63fbf.tar.gz
scummvm-rg350-a02fe9e46e6b87a879e5800bc0b4992be2b63fbf.tar.bz2
scummvm-rg350-a02fe9e46e6b87a879e5800bc0b4992be2b63fbf.zip
I didn't realize it at first, but LINC-space uses the same character data
as the LINC terminals, so our patched characters looked very out of place since they didn't have the black outline the other characters had. I've fixed that, and tweaked the character data for "�" slightly. svn-id: r9657
-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);