[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcaca] Re: updated patches for libcaca



updated it again, new URL:

http://zoehep.xent.com/~bsittler/libcaca-trunk-1125.diff

changes:

* caca/driver_x11: fixed data for left and right tee

* cucul/transform.c: add flip, flop, and rotate data for addition
cp437 box drawings

* cucul/charset.c: improve ASCII mapping for upper half block and
lower half block so they are distinct, this allows using them for
pseudo-bitmap graphics with each character cell holding two bits

there is a corresponding version of myman (same URL as before):

http://zoehep.xent.com/~bsittler/myman-0.7pre1.tar.gz

now it can approximate the look of the arcade game with reasonable performance:

env CACA_DRIVER=x11 CACA_FONT=nil2 ./myman -z bitmap2

there is a known rendering bug: myman does not support background
colors other than black yet, so when two colors combine in a single
character cell only one is visible. i hope to fix this eventually. to
see a non-buggy version which is also twice as big:

env CACA_DRIVER=x11 CACA_FONT=nil2 ./myman -2 -z bitmap

do let me know if you have any questions or comments.

thanks,
-ben

On 6/28/07, Sam Hocevar <sam@zoy.org> wrote:
On Wed, Jun 27, 2007, Ben Wiley Sittler wrote:

> i also notice that the slang driver prints incorrect output for
> fullwidth characters. for instance,  'Hello' becomes 'HHeelloo',
> but
> 'H e l l o ' is a much better approximation. maybe there should be a
> cucul_utf32_to_ascii-like function that converts to a string of ASCII
> characters instead...

   I was thinking about that. Either a string, or a uint16_t that has
an optional MSB with a character value, which is easier to handle (no
allocations) but slightly ugly.

or a separate call to get the right hand side?
Index: caca/driver_x11.c
===================================================================
--- caca/driver_x11.c	(revision 1125)
+++ caca/driver_x11.c	(working copy)
@@ -556,9 +556,9 @@
         0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
         /* 0x2510 - 0x251f: â?? . . . â?? . . . â?? . . . â?? . . . */
         0x14, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00,
-        0x44, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
+        0x44, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00,
         /* 0x2520 - 0x252f: . . . . â?¤ . . . . . . . â?¬ . . . */
-        0x00, 0x00, 0x00, 0x00, 0x51, 0x00, 0x00, 0x00,
+        0x00, 0x00, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00,
         0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00,
         /* 0x2530 - 0x253f: . . . . â?´ . . . . . . . â?¼ . . . */
         0x00, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00,
Index: cucul/transform.c
===================================================================
--- cucul/transform.c	(revision 1125)
+++ cucul/transform.c	(working copy)
@@ -274,8 +274,14 @@
          0x250f, 0x2513, /* â?? â?? */
          0x2517, 0x251b, /* â?? â?? */
          0x2523, 0x252b, /* â?£ â?« */
+         0x2552, 0x2555, /* â?? â?? */
+         0x2558, 0x255b, /* â?? â?? */
+         0x2553, 0x2556, /* â?? â?? */
+         0x2559, 0x255c, /* â?? â?? */
          0x2554, 0x2557, /* â?? â?? */
          0x255a, 0x255d, /* â?? â?? */
+         0x255e, 0x2561, /* â?? â?¡ */
+         0x255f, 0x2562, /* â?? â?¢ */
          0x2560, 0x2563, /* â?  â?£ */
          0x2574, 0x2576, /* â?´ â?¶ */
          0x2578, 0x257a, /* â?¸ â?º */
@@ -360,6 +366,12 @@
          0x2554, 0x255a, /* â?? â?? */
          0x2557, 0x255d, /* â?? â?? */
          0x2566, 0x2569, /* â?¦ â?© */
+         0x2552, 0x2558, /* â?? â?? */
+         0x2555, 0x255b, /* â?? â?? */
+         0x2564, 0x2567, /* â?¤ â?§ */
+         0x2553, 0x2559, /* â?? â?? */
+         0x2556, 0x255c, /* â?? â?? */
+         0x2565, 0x2568, /* â?¥ â?¨ */
          0x2575, 0x2577, /* â?µ â?· */
          0x2579, 0x257b, /* â?¹ â?» */
          0
@@ -458,6 +470,14 @@
          0x2557, 0x255a, /* â?? â?? */
          0x2560, 0x2563, /* â?  â?£ */
          0x2566, 0x2569, /* â?¦ â?© */
+         0x2552, 0x255b, /* â?? â?? */
+         0x2555, 0x2558, /* â?? â?? */
+         0x255e, 0x2561, /* â?? â?¡ */
+         0x2564, 0x2567, /* â?¤ â?§ */
+         0x2553, 0x255c, /* â?? â?? */
+         0x2556, 0x2559, /* â?? â?? */
+         0x255f, 0x2562, /* â?? â?¢ */
+         0x2565, 0x2568, /* â?¥ â?¨ */
          0x2574, 0x2576, /* â?´ â?¶ */
          0x2575, 0x2577, /* â?µ â?· */
          0x2578, 0x257a, /* â?¸ â?º */
Index: cucul/charset.c
===================================================================
--- cucul/charset.c	(revision 1125)
+++ cucul/charset.c	(working copy)
@@ -349,8 +349,6 @@
     case 0x00002591: /* â?? */
     case 0x00002592: /* â?? */
     case 0x00002593: /* â?? */
-    case 0x00002580: /* â?? */
-    case 0x00002584: /* â?? */
     case 0x00002588: /* â?? */
     case 0x0000258c: /* â?? */
     case 0x00002590: /* â?? */
@@ -358,6 +356,10 @@
     case 0x000025ac: /* â?¬ */
     case 0x000025ae: /* â?® */
         return '#';
+    case 0x00002580: /* â?? */
+        return '"';
+    case 0x00002584: /* â?? */
+        return ',';
     case 0x000025c6: /* â?? */
     case 0x00002666: /* â?¦ */
         return '+';