⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbm888.c

📁 linux嵌入式开发程序
💻 C
字号:

/*===========================================================================
        2D Graphics Library
        ALL RIGHTS RESERVED, COPYRIGHT (C) FUJITSU LIMITED 1993-2002
        LICENSED MATERIAL - PROGRAM PROPERTY OF FUJITSU LIMITED
 ===========================================================================*/

#include "gl.h"
#include "defhook.h"

int
_GL_bbmaskRGB888(GL_WP *gp)
{
    long    doffs ;
    int     lines, ti, tj ;
    BYTE    *sadr ;

    doffs = gp->bitblt.doffs ;
    lines = gp->bitblt.ty ;

    if(gp->bitblt.tx<=0||lines<=0)
        return GL_Ok ;

    sadr  = (BYTE *)gp->bitblt.tilep ;
    ti    =  (gp->bitblt.dx - gp->bitblt.bx) & 0x1f ;
    tj    = ((gp->bitblt.dy - gp->bitblt.by) & 0x1f) << (MaskSft-3) ;

    do {
        register BYTE   *dst ;
        register DWORD  dots,c0,c1,c2 ;
        register int    tx ;

        dots    = *(DWORD *)(sadr+tj) ;
        if(dots!=0){
            dst   = _AddAdr(gp->hwork.VRAMadr[gp->hwork.page][0],doffs) ;
            c2    = gp->bitblt.color ;
            c0    = c2 >> 16 ;
            c1    = c2 >> 8 ;
            tx    = gp->bitblt.tx ;
            dots  = (dots << ti) | (dots >> (32-ti)) ;
            do {
                if((long)dots<0){
                    dst[0] = (BYTE)c0 ;
                    dst[1] = (BYTE)c1 ;
                    dst[2] = (BYTE)c2 ;
                }
                dots = (dots<<1) | (dots>>31) ;
                dst += 3 ;

            } while( --tx ) ;
        }
        tj += MaskBpl ;
        tj &= MaskBpp-1 ;
        doffs += gp->bitblt.dlbytes ;
    } while( --lines ) ;
    return GL_Ok ;
}



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -