Use new CPU-neutral program-memory API.
[bertos.git] / mware / text.c
index d7d0d3b5ce5894aa4ba9d07b007f7fd8cb524222..692119119b32f29f444af74ea7594be07551cb0e 100755 (executable)
 
 /*#*
  *#* $Log$
+ *#* Revision 1.11  2005/01/20 18:46:31  aleph
+ *#* Fix progmem includes.
+ *#*
+ *#* Revision 1.10  2005/01/08 09:20:12  bernie
+ *#* Really make it work on both architectures.
+ *#*
+ *#* Revision 1.9  2004/12/31 16:44:29  bernie
+ *#* Sanitize for non-Harvard processors.
+ *#*
+ *#* Revision 1.8  2004/11/16 21:16:28  bernie
+ *#* Update to new naming scheme in mware/gfx.c.
+ *#*
  *#* Revision 1.7  2004/09/20 03:28:28  bernie
  *#* Fix header.
  *#*
 #include "gfx.h"
 #include "font.h"
 #include "text.h"
+
 #include <debug.h>
 
+
 /*!
  * Flags degli stili algoritmici
  *
@@ -145,7 +159,7 @@ static int text_putglyph(char c, struct Bitmap *bm)
                /* Per ogni colonna di dot del glyph... */
                for (i = 0; i < glyph_width; ++i)
                {
-                       dots = pgm_read_byte(glyph);
+                       dots = PGM_READ_CHAR(glyph);
 
                        /* Advance to next column in glyph.
                         * Expand: advances only once every two columns
@@ -183,7 +197,7 @@ static int text_putglyph(char c, struct Bitmap *bm)
        }
        else /* No style: fast vanilla copy of glyph to line buffer */
                while (glyph_width--)
-                       *buf++ = pgm_read_byte(glyph++);
+                       *buf++ = PGM_READ_CHAR(glyph++);
 
        return c;
 }
@@ -201,7 +215,7 @@ int text_putchar(char c, struct Bitmap *bm)
                switch (c)
                {
                case ANSI_ESC_CLEARSCREEN:
-                       gfx_ClearBitmap(bm);
+                       gfx_bitmapClear(bm);
                        bm->penX = 0;
                        bm->penY = 0;
                        text_style(0, STYLEF_MASK);
@@ -243,7 +257,7 @@ void text_clear(struct Bitmap *bmp)
 
 void text_clearLine(struct Bitmap *bmp, int line)
 {
-       gfx_ClearRect(bmp, 0, line * FONT_HEIGHT, bmp->width, (line + 1) * FONT_HEIGHT);
+       gfx_rectClear(bmp, 0, line * FONT_HEIGHT, bmp->width, (line + 1) * FONT_HEIGHT);
 }