亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fblin-2.c

?? 該源碼是miniGUI的全部代碼
?? C
字號:
/*** $Id: fblin-2.c,v 1.6 2003/09/04 02:57:09 weiym Exp $** ** fblin-2.c: Frame buffer 2 bpp Linear Video Driver for MiniGUI**  This driver is suitable for the most significant bit being left.** ** Copyright (C) 2003 Feynman Software.** Copyright (C) 2001, 2002 Wei Yongming**** 2001/02/08 created by Wei Yongming*//*** This program is free software; you can redistribute it and/or modify** it under the terms of the GNU General Public License as published by** the Free Software Foundation; either version 2 of the License, or** (at your option) any later version.**** This program is distributed in the hope that it will be useful,** but WITHOUT ANY WARRANTY; without even the implied warranty of** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the** GNU General Public License for more details.**** You should have received a copy of the GNU General Public License** along with this program; if not, write to the Free Software** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA*/#include <stdlib.h>#include <string.h>#include <linux/fb.h>#include "native.h"#include "fb.h"#ifdef _FBLIN2L_SUPPORT#define SHIFT(x) (6 - ((x & 3) << 1))static unsigned char pixmask [] = {0xc0, 0x30, 0x0c, 0x03};static unsigned char pixnotmask [] = {0x3f, 0xcf, 0xf3, 0xfc};#define normalize_pixel(c) (c & 0x03)static inline gal_uint8* get_pixel_address(PSD psd, int x, int y){    return (gal_uint8 *) psd->addr + y*psd->linelen + (x >> 2);}static inline void xsetpixel_in_byte(int x, gal_pixel c, gal_uint8 *byte){    *byte = (*byte & (pixnotmask [x&3])) | ((c << SHIFT(x)) ^ (*byte & pixmask[x&3]) );}static inline void setpixel_in_byte(int x, gal_pixel c, gal_uint8 *byte){    *byte = (*byte & (pixnotmask [x&3])) | (c << SHIFT(x));}static inline gal_pixel getpixel_in_byte(int x, const gal_uint8 *byte){    gal_uint8 tmp = *byte;    tmp = tmp & pixmask[x&3];    return (tmp >> SHIFT(x));}static int fblin2_init (PSD psd){    if (!psd->size) {        psd->size = psd->yres * psd->linelen;        return 1;    }    return 1;}/* Set pixel at x, y, to gal_pixel c */static void fblin2_drawpixel (PSD psd, int x, int y, gal_pixel c){    c = normalize_pixel (c);    if (psd->gr_mode == MODE_XOR)        xsetpixel_in_byte (x, c, get_pixel_address (psd, x, y));    else        setpixel_in_byte (x, c, get_pixel_address (psd, x, y));}/* Read pixel at x, y */static gal_pixel fblin2_readpixel (PSD psd, int x, int y){    return getpixel_in_byte (x, get_pixel_address (psd, x, y));}/* Draw horizontal line from x1,y to x2,y including final point*/static void fblin2_drawhline (PSD psd, int x, int y, int w, gal_pixel c){    gal_uint8 *addr;    int cc, i;    c = normalize_pixel (c);    cc = c | (c << 2);    cc = cc | (cc << 4);        addr = get_pixel_address (psd, x, y);    if (psd->gr_mode == MODE_XOR) {        if (x & 3) {            for(i = x&3; i&3 && w > 0; i++) {                xsetpixel_in_byte (i, c, addr);                w--;            }            addr++;        }                while (w > 3) {            *addr++ ^= cc ;            w -= 4;        }                if (w > 0) {            for (i = 0; i < w; i++)                xsetpixel_in_byte (i, c, addr);        }            } else {        if (x & 3) {            for (i= x & 3; i & 3 && w > 0; i++) {                setpixel_in_byte (i, c, addr);                w--;            }            addr++;        }                while (w > 3) {            *addr++ = cc ;            w -= 4;        }                if (w > 0) {            for (i = 0; i < w; i++)                setpixel_in_byte (i, c, addr);        }    }}static void fblin2_drawvline (PSD psd, int x, int y, int h, gal_pixel c){    gal_uint8* addr;    c = normalize_pixel (c);    addr = get_pixel_address (psd, x, y);        if (psd->gr_mode == MODE_XOR) {        while (h--) {            xsetpixel_in_byte (x, c, addr);            addr += psd->linelen;        }    }    else {        while (h--) {            setpixel_in_byte (x, c, addr);            addr += psd->linelen;        }    }}/*clip to screen*/static void fblin2_getbox (PSD psd, int x, int y, int w, int h, void* buf){    int i;    gal_uint8 *dst = (gal_uint8*) buf;    const gal_uint8 *src;    int d_pitch = w;    if (y < 0) {        h += y;        dst -= y * d_pitch;        y = 0;    }    if (x < 0) {        w += x;        dst -= x;        x = 0;    }    if (y + h - 1 >= psd->yres)         h = psd->yres - y ;    if (x + w - 1 >= psd->xres)         w = psd->xres - x ;        if (w <= 0 || h <= 0) return;    w += x;    src = get_pixel_address (psd, x, y);    while (h--) {        const gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            *d_line = getpixel_in_byte (i, s_line);            d_line++; i++;            if (!(i&3)) s_line++;        }        src += psd->linelen;        dst += d_pitch;    }}/*do clip*/static void fblin2_putbox (PSD psd, int x, int y, int w, int h, void *buf){    int i;    const gal_uint8 *src = (gal_uint8*) buf;    gal_uint8 *dst;    int s_pitch = w;    if (psd->doclip) {        if (y < psd->clipminy) {            h -= psd->clipminy - y;            src += (psd->clipminy - y) * s_pitch;            y = psd->clipminy;        }        if (x < psd->clipminx) {            w -= psd->clipminx - x;            src += psd->clipminx - x;            x = psd->clipminx;        }        if (y + h - 1 >= psd->clipmaxy)            h = psd->clipmaxy- y;        if (x + w - 1 >= psd->clipmaxx)            w = psd->clipmaxx- x;    }    else {        if ( y < 0 ) {            h += y;            src += -y * s_pitch;            y = 0;        }        if ( x < 0 ) {            w += x;            src += -x;            x = 0;        }        if ( y + h  -1 >= psd->yres)            h = psd->yres - y;        if ( x + w  -1 >= psd->xres)            w = psd->xres - x;    }    if (w <= 0 || h <= 0) return;    w += x;    dst = get_pixel_address (psd, x, y);    while (h--) {        const gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            setpixel_in_byte (i, normalize_pixel (*s_line), d_line);            s_line ++; i ++;            if (!(i&3)) d_line++;        }        dst += psd->linelen;        src += s_pitch;    }}static void fblin2_putboxmask (PSD psd, int x, int y, int w, int h, void *buf, gal_pixel cxx){    int i;    gal_uint8 *src = (gal_uint8*) buf;    gal_uint8 *dst;    int s_pitch =  w ;    if (psd->doclip) {            if (y < psd->clipminy) {            h -= psd->clipminy - y;            src += (psd->clipminy - y) * s_pitch;            y = psd->clipminy;        }        if (x < psd->clipminx) {            w -= psd->clipminx - x;            src += psd->clipminx - x;            x = psd->clipminx;        }                if (y + h - 1 >= psd->clipmaxy)             h =  psd->clipmaxy- y;        if (x + w - 1 >= psd->clipmaxx)             w =  psd->clipmaxx- x;    }    else {        if ( y < 0 ) {            h += y;            src += -y * s_pitch;            y = 0;        }        if ( x < 0 ) {            w += x;            src += -x;            x = 0;        }                if ( y + h  -1 >= psd->yres)             h = psd->yres - y ;        if ( x + w  -1 >= psd->xres)             w = psd->xres - x ;    }    if (w <= 0 || h <= 0) return;    cxx = normalize_pixel (cxx);    w += x;    dst = get_pixel_address (psd, x, y);    while (h--) {        gal_uint8 *s_line = src;        gal_uint8 *d_line = dst;        i = x;        while (i < w) {            gal_uint8 spix = normalize_pixel (*s_line);            if (spix != cxx)                setpixel_in_byte (i, spix, d_line);            s_line++; i++;            if (!(i&3)) d_line ++;        }        dst += psd->linelen;        src += s_pitch;    }}static unsigned char right_side_mask [] = {0xff,0x3f,0x0f,0x03};static unsigned char left_side_mask [] = {0x00,0xc0,0xf0,0xfc};static unsigned char right_ban_mask [] = {0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};static unsigned char left_ban_mask [] = {0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};/* copyline - left to right */static void fblin2_copyline_lr (gal_uint8 *src, int x1, gal_uint8 *dst, int x2, int w){    int s_head = x1 & 3;    int d_head = x2 & 3;    if (s_head == d_head) {        if (d_head) {            if (d_head + w > 4) {                *dst = (*src & right_side_mask [d_head]) | (*dst & left_side_mask [d_head]);                src ++; dst ++;                w -= 4 - d_head;            }            else {                gal_uint8 mask = left_ban_mask [w] >> d_head;                *dst = (*src & mask) | (*dst & ~mask);                return;            }        }        while (w > 3) {            *dst++ = *src++;            w -= 4;        }        if (w) {            *dst = (*src & left_side_mask [w]) | (*dst & (right_side_mask [w]));        }    }    else if (d_head > s_head) {        int shift = (d_head - s_head) << 1;        gal_uint8 sl_half = *src >> shift;        gal_uint8 sr_half;        gal_uint8 sb_new;        if (d_head + w > 4) {            *dst = (sl_half & right_side_mask [d_head]) | (*dst & left_side_mask [d_head]);            dst++;            w -= 4 - d_head;        }        else {            gal_uint8 mask = left_ban_mask [w] >> d_head;            *dst = (sl_half & mask) | (*dst & ~mask);            return;        }        sr_half = *src & right_ban_mask [shift];        while (w > 3) {            src++;            sl_half = *src >> shift;            sb_new = sl_half | (sr_half << (8 - shift));            sr_half = *src & right_ban_mask [shift];            *dst = sb_new;            dst++;             w -= 4;        }        if (w) {            sr_half = *src & right_ban_mask [shift];            if (w > shift) {                src++;                sl_half = *src >> shift;                sb_new = sl_half | (sr_half << (8 - shift));            }            else                sb_new = (sr_half << (8 - shift));            *dst = (sb_new & left_side_mask [w]) | (*dst & right_side_mask[w]);        }    }    else /* s_head > d_head */    {        int shift = (s_head - d_head) << 1;        gal_uint8 sl_half = *src << shift;        gal_uint8 sr_half;        gal_uint8 sb_new;        if (s_head + w > 4) {            sr_half = *(src + 1) & (left_ban_mask [shift]);            sb_new = sl_half | (sr_half >> (8 - shift));        }        else            sb_new = sl_half;        if (d_head) {            if (d_head + w > 4) {                *dst = (sb_new & right_side_mask [d_head]) | (*dst & left_side_mask [d_head]);                dst++; src++;                w -= 4 - d_head;            }            else {                gal_uint8 mask = left_ban_mask [w] >> d_head;                *dst = (sb_new & mask) | (*dst & ~mask);                return;            }        }        while (w > 3) {            sl_half = *src << shift;            sr_half = *(++src) & (left_ban_mask [shift]);            sb_new = sl_half | (sr_half >> (8 - shift));            *dst = sb_new;            dst++;             w -= 4;        }        if (w) {            sl_half = *src << shift;            if (w > ((8 - shift) >> 1)) {                sr_half = *(++src) & (left_ban_mask [shift]);                sb_new = sl_half | (sr_half >> (8 - shift));            }            else                sb_new = sl_half;            *dst = (sb_new & left_side_mask [w]) | (*dst & right_side_mask[w]);        }    }}static void fblin2_copybox (PSD psd,int x1, int y1, int w, int h, int x2, int y2){    register gal_uint8 *src, *dst;    register int linelen = psd->linelen;    if (y1 == y2) {        if (x1 < x2 && x1 + w > x2) {            gal_uint8 *tmp = alloca (w >> 2);            src= psd->addr + y1 * linelen + (x1 >> 3);            dst= psd->addr + y2 * linelen + (x2 >> 3);            while (h) {                fblin2_copyline_lr (src, x1, tmp, 0, w);                fblin2_copyline_lr (tmp, 0, dst, x2, w);                src += linelen;                dst += linelen;                h--;            }        }        else {            src= psd->addr + y1 * linelen + (x1 >> 3);            dst= psd->addr + y2 * linelen + (x2 >> 3);            while (h) {                fblin2_copyline_lr (src, x1, dst, x2, w);                src += linelen;                dst += linelen;                h--;            }        }    }    else if (y1 < y2 && y1 + h >= y2) {        y1 += (h-1);        y2 += (h-1);        src= psd->addr + y1 * linelen + (x1 >> 3);        dst= psd->addr + y2 * linelen + (x2 >> 3);        while (h) {            fblin2_copyline_lr (src, x1, dst, x2, w);            src -= linelen;            dst -= linelen;            h--;        }    }    else {        src= psd->addr + y1 * linelen + (x1 >> 3);        dst= psd->addr + y2 * linelen + (x2 >> 3);        while (h) {            fblin2_copyline_lr (src, x1, dst, x2, w);            src += linelen;            dst += linelen;            h--;        }    }}/* Bitblt, not do clip */static void fblin2_blit (PSD dstpsd, int dstx, int dsty, int w, int h,    PSD srcpsd, int srcx, int srcy){    gal_uint8* dst;    gal_uint8* src;    dst = get_pixel_address (dstpsd, dstx, dsty);    src = get_pixel_address (srcpsd, srcx, srcy);    while (h) {        fblin2_copyline_lr (src, srcx, dst, dstx, w);        src += srcpsd->linelen;        dst += dstpsd->linelen;        h--;    }}SUBDRIVER fblinear_2 = {    fblin2_init,    fblin2_drawpixel,    fblin2_readpixel,    fblin2_drawhline,    fblin2_drawvline,    fblin2_blit,    fblin2_putbox,    fblin2_getbox,    fblin2_putboxmask,    fblin2_copybox};#endif /* _FBLIN2L_SUPPORT */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级欧美一级在线播放| 亚洲精品国产无天堂网2021 | av亚洲精华国产精华| 欧美日韩的一区二区| 国产精品嫩草影院av蜜臀| 亚洲成人av一区二区| 94-欧美-setu| 久久久国产综合精品女国产盗摄| 丝袜国产日韩另类美女| 99久久国产综合精品麻豆| 久久久久综合网| 毛片不卡一区二区| 欧美日韩黄色一区二区| 亚洲人成网站在线| 成人毛片老司机大片| 久久综合五月天婷婷伊人| 午夜欧美电影在线观看| 在线免费观看日韩欧美| 中文乱码免费一区二区| 国产一区二区三区综合| 日韩欧美中文字幕制服| 日本va欧美va精品发布| 精品视频123区在线观看| 亚洲乱码国产乱码精品精小说 | 91国偷自产一区二区三区观看| 久久久www成人免费无遮挡大片| 麻豆一区二区99久久久久| 91麻豆精品国产91| 秋霞av亚洲一区二区三| 欧美一区二区在线不卡| 香蕉av福利精品导航| 欧美日韩不卡在线| 三级不卡在线观看| 日韩亚洲欧美一区二区三区| 天天综合色天天| 欧美精品日韩综合在线| 日产国产欧美视频一区精品 | 欧美性xxxxx极品少妇| 夜色激情一区二区| 欧美日韩一级大片网址| 亚洲国产va精品久久久不卡综合 | 成人精品电影在线观看| 中文在线资源观看网站视频免费不卡| 国产乱码精品一区二区三区五月婷 | 中文字幕第一区第二区| 不卡在线视频中文字幕| 一区二区三区四区国产精品| 欧美午夜在线一二页| 日本不卡一二三| 国产性色一区二区| 91理论电影在线观看| 亚洲成人tv网| 久久亚洲精精品中文字幕早川悠里 | 欧美日韩一区二区在线观看 | 久久久久国产成人精品亚洲午夜| 国产成人8x视频一区二区| 亚洲天堂福利av| 欧美日韩国产综合草草| 九九九久久久精品| 亚洲男人天堂一区| 日韩亚洲欧美一区二区三区| 白白色 亚洲乱淫| 日韩成人dvd| 国产欧美精品国产国产专区| 91在线视频网址| 久久99精品久久久| 日韩伦理免费电影| 2021国产精品久久精品| 91高清视频免费看| 国产成人综合网站| 亚洲成人免费影院| 国产精品国产三级国产普通话99| 欧美自拍偷拍午夜视频| 国内成人精品2018免费看| 亚洲欧美韩国综合色| 日韩午夜精品视频| 欧美性色欧美a在线播放| 国产一区二区不卡老阿姨| 亚洲一级二级在线| 中文字幕一区二区三区四区不卡| 欧美一区二区三区的| 99精品视频在线免费观看| 精品一区二区三区在线观看| 亚洲国产日韩一级| 综合激情成人伊人| 国产视频一区在线播放| 91精品婷婷国产综合久久性色| 色综合久久久久久久久久久| 国产又黄又大久久| 美女视频黄 久久| 亚洲国产cao| 一区二区成人在线视频| 亚洲欧洲一区二区在线播放| 久久久高清一区二区三区| 欧美一区二区在线看| 欧美人与性动xxxx| 欧美三级电影网站| 91久久久免费一区二区| 成人动漫av在线| 成人免费黄色在线| 粉嫩13p一区二区三区| 国产馆精品极品| 国产大陆精品国产| 成人性生交大片免费看视频在线 | 色婷婷激情久久| 99久久亚洲一区二区三区青草| 国产成人精品影视| 成人18精品视频| 不卡的av中国片| 91在线无精精品入口| 一本一本大道香蕉久在线精品 | 国产宾馆实践打屁股91| 国产高清无密码一区二区三区| 国产主播一区二区| 国产九色sp调教91| 成人一区在线观看| proumb性欧美在线观看| 91一区一区三区| 色www精品视频在线观看| 色成人在线视频| 欧美一区二区三区免费在线看 | 经典三级视频一区| 国产精品白丝jk黑袜喷水| 国产91精品露脸国语对白| 成人免费av资源| 91高清视频免费看| 欧美精品第一页| 欧美成人video| 国产午夜精品福利| 伊人色综合久久天天人手人婷| 亚洲国产视频在线| 精品一区二区久久久| 国产精品18久久久久久久久 | 777xxx欧美| 久久综合久久99| 中文字幕一区免费在线观看| 亚洲精品videosex极品| 日韩高清一区在线| 国产成人丝袜美腿| 欧美体内she精视频| 欧美一级精品在线| 国产精品免费观看视频| 午夜国产精品一区| 国产乱码一区二区三区| 色香色香欲天天天影视综合网| 在线播放91灌醉迷j高跟美女| 日韩午夜av电影| 亚洲欧美偷拍另类a∨色屁股| 天堂影院一区二区| 成人精品视频网站| 91精品国产综合久久香蕉的特点| 日韩美女视频在线| 一区二区三区日本| 国产在线精品不卡| 欧美性一区二区| 中文字幕欧美三区| 欧美a级一区二区| 91猫先生在线| 国产欧美精品一区二区三区四区| 亚洲第一久久影院| 成人午夜视频在线| 日韩精品在线一区| 亚洲一区二区三区四区在线| 国产一区二区精品久久91| 欧美久久高跟鞋激| 国产精品国产三级国产有无不卡| 裸体一区二区三区| 欧美日韩一区二区三区免费看 | 91片在线免费观看| 久久久噜噜噜久久人人看| 亚州成人在线电影| 91色乱码一区二区三区| 国产女同互慰高潮91漫画| 麻豆一区二区在线| 欧美一区二区三区视频| 亚洲欧美日韩成人高清在线一区| 国产精品自拍一区| 精品国产91乱码一区二区三区 | 成人av网址在线| 久久综合久久综合久久综合| 日韩av在线播放中文字幕| 色久优优欧美色久优优| 中文子幕无线码一区tr| 国产一区二区三区视频在线播放| 9191精品国产综合久久久久久| 亚洲精品免费电影| 99久久国产综合精品女不卡| 欧美国产欧美亚州国产日韩mv天天看完整| 日韩av在线发布| 在线电影欧美成精品| 伊人开心综合网| 91极品视觉盛宴| 亚洲精品视频在线| 91久久精品网| 亚洲一区影音先锋| 7777精品伊人久久久大香线蕉的| 亚洲国产精品久久久男人的天堂| 欧美天天综合网| 日本不卡在线视频| 91精品国产综合久久精品app|