ulxfont.c 25.6 KB
/*
 *  F i l e N a m e  :  U L X F O N T . C
 *
 ****************************************************************************
 *                   (C) CopyRight ALPS Electric Co., Ltd. 1996
 ****************************************************************************
 *  Version
 *
 *  ver     Date
 *  ----  --------
 *  1.00  '95.02.05  Initial revision .
 ****************************************************************************
*/
/*===========================================*/
/* TV画面へのフレームバッファへの描画ルーチン           */
/*===========================================*/

#include <ultra64.h>

#include "ulxlib.h"
/**************************************/
/* DEFINITIONS                        */
/**************************************/

/**************************************/
/* PROTOTYPE DEFINITIONS              */
/**************************************/

/**************************************/
/* STATIC DEFINITION                  */
/**************************************/

u8 font_img[128][64] = {
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,
    0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,7,0,0,0,
    0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,7,7,7,0,0,0,0,7,0,7,7,7,0,0,0,0,7,7,7,7,0,0,0,0,7,7,7,0,7,0,0,0,7,7,7,7,0,0,0,7,7,7,7,7,0,0,0,7,0,7,7,7,0,0,0,0,7,7,7,0,0,0,
    0,7,0,0,0,7,0,0,0,7,7,0,0,0,7,0,0,7,0,0,0,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0,0,0,0,7,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,7,0,7,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
};

static char letters_string[] = "abcdefhiuvsnorm.klxz4321567890`!gjpqytw,EFGHKLNOPRSUVXZ@JM:WIYABCD'T\"+-=Q_/?()[] ";

static Bitmap letters_bms[] = {
   /* W Wtbl Xoffset Yoffset file      H  ?  */
    { 8, 64, 0*8,    0*12, font_img,   12,0 }, /* a */
    { 8, 64, 1*8,    0*12, font_img,   12,0 }, /* b */
    { 8, 64, 2*8,    0*12, font_img,   12,0 }, /* c */
    { 8, 64, 3*8,    0*12, font_img,   12,0 }, /* d */
    { 8, 64, 4*8,    0*12, font_img,   12,0 }, /* e */
    { 8, 64, 5*8,    0*12, font_img,   12,0 }, /* f */
    { 8, 64, 6*8,    0*12, font_img,   12,0 }, /* h */
    { 8, 64, 7*8,    0*12, font_img,   12,0 }, /* i */

    { 8, 64, 0*8,    1*12, font_img,   12,0 }, /* u */
    { 8, 64, 1*8,    1*12, font_img,   12,0 }, /* v */
    { 8, 64, 2*8,    1*12, font_img,   12,0 }, /* s */
    { 8, 64, 3*8,    1*12, font_img,   12,0 }, /* n */
    { 8, 64, 4*8,    1*12, font_img,   12,0 }, /* o */
    { 8, 64, 5*8,    1*12, font_img,   12,0 }, /* r */
    { 8, 64, 6*8,    1*12, font_img,   12,0 }, /* m */
    { 8, 64, 7*8,    1*12, font_img,   12,0 }, /* . */

    { 8, 64, 0*8,    2*12, font_img,   12,0 }, /* k */
    { 8, 64, 1*8,    2*12, font_img,   12,0 }, /* l */
    { 8, 64, 2*8,    2*12, font_img,   12,0 }, /* x */
    { 8, 64, 3*8,    2*12, font_img,   12,0 }, /* z */
    { 8, 64, 4*8,    2*12, font_img,   12,0 }, /* 4 */
    { 8, 64, 5*8,    2*12, font_img,   12,0 }, /* 3 */
    { 8, 64, 6*8,    2*12, font_img,   12,0 }, /* 2 */
    { 8, 64, 7*8,    2*12, font_img,   12,0 }, /* 1 */

    { 8, 64, 0*8,    3*12, font_img,   12,0 }, /* 5 */
    { 8, 64, 1*8,    3*12, font_img,   12,0 }, /* 6 */
    { 8, 64, 2*8,    3*12, font_img,   12,0 }, /* 7 */
    { 8, 64, 3*8,    3*12, font_img,   12,0 }, /* 8 */
    { 8, 64, 4*8,    3*12, font_img,   12,0 }, /* 9 */
    { 8, 64, 5*8,    3*12, font_img,   12,0 }, /* 0 */
    { 8, 64, 6*8,    3*12, font_img,   12,0 }, /* ` */
    { 8, 64, 7*8,    3*12, font_img,   12,0 }, /* ! */

    { 8, 64, 0*8,    4*12, font_img,   16,0 }, /* g */
    { 8, 64, 1*8,    4*12, font_img,   16,0 }, /* j */
    { 8, 64, 2*8,    4*12, font_img,   16,0 }, /* p */
    { 8, 64, 3*8,    4*12, font_img,   16,0 }, /* q */
    { 8, 64, 4*8,    4*12, font_img,   16,0 }, /* y */
    { 8, 64, 5*8,    4*12, font_img,   16,0 }, /* t */
    { 8, 64, 6*8,    4*12, font_img,   16,0 }, /* w */
    { 8, 64, 7*8,    4*12, font_img,   16,0 }, /* , */

    { 8, 64, 0*8, 64+0*12, font_img,   12,0 }, /* E */
    { 8, 64, 1*8, 64+0*12, font_img,   12,0 }, /* F */
    { 8, 64, 2*8, 64+0*12, font_img,   12,0 }, /* G */
    { 8, 64, 3*8, 64+0*12, font_img,   12,0 }, /* H */
    { 8, 64, 4*8, 64+0*12, font_img,   12,0 }, /* K */
    { 8, 64, 5*8, 64+0*12, font_img,   12,0 }, /* L */
    { 8, 64, 6*8, 64+0*12, font_img,   12,0 }, /* N */
    { 8, 64, 7*8, 64+0*12, font_img,   12,0 }, /* O */

    { 8, 64, 0*8, 64+1*12, font_img,   12,0 }, /* P */
    { 8, 64, 1*8, 64+1*12, font_img,   12,0 }, /* R */
    { 8, 64, 2*8, 64+1*12, font_img,   12,0 }, /* S */
    { 8, 64, 3*8, 64+1*12, font_img,   12,0 }, /* U */
    { 8, 64, 4*8, 64+1*12, font_img,   12,0 }, /* V */
    { 8, 64, 5*8, 64+1*12, font_img,   12,0 }, /* X */
    { 8, 64, 6*8, 64+1*12, font_img,   12,0 }, /* Z */
    { 8, 64, 7*8, 64+1*12, font_img,   12,0 }, /* @ */

    { 8, 64, 0*8, 64+2*12, font_img,   12,0 }, /* J */
    { 8, 64, 1*8, 64+2*12, font_img,   12,0 }, /* M */
    { 8, 64, 2*8, 64+2*12, font_img,   12,0 }, /* : */
    { 8, 64, 3*8, 64+2*12, font_img,   12,0 }, /* W */
    { 8, 64, 4*8, 64+2*12, font_img,   12,0 }, /* I */
    { 8, 64, 5*8, 64+2*12, font_img,   12,0 }, /* Y */
    { 8, 64, 6*8, 64+2*12, font_img,   12,0 }, /* A */
    { 8, 64, 7*8, 64+2*12, font_img,   12,0 }, /* B */

    { 8, 64, 0*8, 64+3*12, font_img,   12,0 }, /* C */
    { 8, 64, 1*8, 64+3*12, font_img,   12,0 }, /* D */
    { 8, 64, 2*8, 64+3*12, font_img,   12,0 }, /* ' */
    { 8, 64, 3*8, 64+3*12, font_img,   12,0 }, /* T */
    { 8, 64, 4*8, 64+3*12, font_img,   12,0 }, /* " */
    { 8, 64, 5*8, 64+3*12, font_img,   12,0 }, /* + */
    { 8, 64, 6*8, 64+3*12, font_img,   12,0 }, /* - */
    { 8, 64, 7*8, 64+3*12, font_img,   12,0 }, /* = */

    { 8, 64, 0*8, 64+4*12+1, font_img,   16-1,0 }, /* Q */
    { 8, 64, 1*8, 64+4*12, font_img,   16,0 }, /* _ */
    { 8, 64, 2*8, 64+4*12, font_img,   16-4,0 }, /* / */
    { 8, 64, 3*8, 64+4*12, font_img,   16,0 }, /* ? */
    { 8, 64, 4*8, 64+4*12, font_img,   16,0 }, /* ( */
    { 8, 64, 5*8, 64+4*12, font_img,   16,0 }, /* ) */
    { 8, 64, 6*8, 64+4*12, font_img,   12,0 }, /* [ */
    { 8, 64, 7*8, 64+4*12, font_img,   12,0 }, /* ] */

    { 8, 64, 1*8, 63+4*12, font_img,   13,0 }, /*   */
};


static int font_xpos = 0;
static int font_ypos = 0;

/*
static int font_win_width = 40;
static int font_win_height = 1;

static double font_xscale = 1.0;
static double font_yscale = 1.0;

static unsigned char font_red = 255;
static unsigned char font_grn = 255;
static unsigned char font_blu = 255;
static unsigned char font_alf = 255;
*/
u16    font_color = WHITE;
u16    background = BLACK;


extern void cursor(u16*,u32,u32);
extern void color(u16);
extern void putc(u8);
extern void puts(u8*);

void set_font_atrrib(u16 xposdot, u16 yposdot, u16 color, u16 back_color);
u32  draw_string( char *);
u32  draw_letter(char letter);
void draw_letter_image(u32 ci);
void clear_display(u16 color);

extern char STR[80];
extern u16 _boot_cfb[2][320*240];

/*-----------------------------------------------------------
 文字表示準備ルーチン(表示位置、色を設定)
    xpos:表示位置 X 座標 (0 - 34)
    ypos:表示位置 Y 座標 (0 - 14)
    clr :表示文字色属性
    戻り:無し
------------------------------------------------------------*/
void    set_font_attrib(u16 xposdot, u16 yposdot, u16 color, u16 back_color)
{
    font_xpos  = xposdot;
    font_ypos  = yposdot;
    font_color = color;
    background = back_color;
}

/*-----------------------------------------------------------
  文字表示書き込み(画面への書き込み)
    戻り:無し
------------------------------------------------------------*/
u32    draw_string( char *STR )
{
    u32 si;

    for (si=0; ;si++)
    {
          if (draw_letter(*STR++))
            break;
    }
    osWritebackDCache(_boot_cfb[0],240*320);
    osViSwapBuffer(_boot_cfb[0]);

    return(si);
}

u32 draw_letter(char letter)
{
    char *str;
    u32  ci;

    if (letter == '\0')
        return -1;

    str = letters_string;
    ci = 0;
    while( *str && (*str != letter) )
        str++,ci++;

    if (!(*str))
        return -1;

    draw_letter_image(ci );
    return 0;
}

void draw_letter_image(u32 ci )
{
    short srcx_w,srcy_w,srcw,sx;
    u8   *srcy_base,*bitmap;
    u16  *vy_base,*vp;

    srcx_w = letters_bms[ci].width;           /* .width : size across to draw in texels */
    srcy_w = letters_bms[ci].actualHeight;    /* .actualH.. : true heght of this bitmap piece */
    srcw   = letters_bms[ci].width_img;       /* .width_img : Actual size across in texcels */
    srcy_base = letters_bms[ci].buf;          /* .buf : pointer to bitmap data */ 
    srcy_base += (letters_bms[ci].t * srcw) + letters_bms[ci].s;
                                              /* .t : vertical offset into bitmap */
                                              /* .s : horizontal offset into bitmap */
    vy_base = &_boot_cfb[0][0] + (font_ypos * 320) + font_xpos;
    for ( ; srcy_w ; srcy_w--)
    {
        vp = vy_base;
        bitmap = srcy_base;
        for (sx = srcx_w ; sx ; sx--)
        {
            if (*bitmap++)
                *vp++ = font_color;
            else
                *vp++ = background;
        }
        vy_base += 320;
        srcy_base += srcw;
    }
    font_xpos += srcx_w;                      /* set next letter pos */
}
/*-----------------------------------------------------------
 画面をクリアする
    戻り:無し
------------------------------------------------------------*/
void    clear_display( u16 color )
{
   u32 i;

   for (i=0;i!=320*240;++i)
       _boot_cfb[0][i] = _boot_cfb[1][i] = color;

   osWritebackDCache(_boot_cfb[0],240*320);
   osViSwapBuffer(_boot_cfb[0]);
}